@tmsoft/webphone 5.0.3 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/webphone.component.js +22 -22
- package/dist/webphone.es.js +109 -59
- package/dist/webphone.umd.js +2 -2
- package/package.json +1 -1
|
@@ -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-1feccefe],[data-v-1feccefe]:before,[data-v-1feccefe]: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-1feccefe]::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-1feccefe]:root,[data-v-1feccefe]: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-1feccefe]:root,[data-v-1feccefe]: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-1feccefe]:root,[data-v-1feccefe]: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-1feccefe],[data-v-1feccefe]:after,[data-v-1feccefe]:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-1feccefe]::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-1feccefe]::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-1feccefe]::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html[data-v-1feccefe],[data-v-1feccefe]: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-1feccefe]{height:0;color:inherit;border-top-width:1px}abbr[data-v-1feccefe]:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1[data-v-1feccefe],h2[data-v-1feccefe],h3[data-v-1feccefe],h4[data-v-1feccefe],h5[data-v-1feccefe],h6[data-v-1feccefe]{font-size:inherit;font-weight:inherit}a[data-v-1feccefe]{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b[data-v-1feccefe],strong[data-v-1feccefe]{font-weight:bolder}code[data-v-1feccefe],kbd[data-v-1feccefe],samp[data-v-1feccefe],pre[data-v-1feccefe]{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-1feccefe]{font-size:80%}sub[data-v-1feccefe],sup[data-v-1feccefe]{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub[data-v-1feccefe]{bottom:-.25em}sup[data-v-1feccefe]{top:-.5em}table[data-v-1feccefe]{text-indent:0;border-color:inherit;border-collapse:collapse}[data-v-1feccefe]:-moz-focusring{outline:auto}progress[data-v-1feccefe]{vertical-align:baseline}summary[data-v-1feccefe]{display:list-item}ol[data-v-1feccefe],ul[data-v-1feccefe],menu[data-v-1feccefe]{list-style:none}img[data-v-1feccefe],svg[data-v-1feccefe],video[data-v-1feccefe],canvas[data-v-1feccefe],audio[data-v-1feccefe],iframe[data-v-1feccefe],embed[data-v-1feccefe],object[data-v-1feccefe]{vertical-align:middle;display:block}img[data-v-1feccefe],video[data-v-1feccefe]{max-width:100%;height:auto}button[data-v-1feccefe],input[data-v-1feccefe],select[data-v-1feccefe],optgroup[data-v-1feccefe],textarea[data-v-1feccefe]{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-1feccefe]::-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-1feccefe]::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-1feccefe]{font-weight:bolder}:where(select:is([multiple],[size])) optgroup[data-v-1feccefe]{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option[data-v-1feccefe]{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option[data-v-1feccefe]{padding-inline-start:20px}[data-v-1feccefe]::-webkit-file-upload-button{margin-inline-end:4px}[data-v-1feccefe]::file-selector-button{margin-inline-end:4px}[data-v-1feccefe]::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){[data-v-1feccefe]::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){[data-v-1feccefe]::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea[data-v-1feccefe]{resize:vertical}[data-v-1feccefe]::-webkit-search-decoration{-webkit-appearance:none}[data-v-1feccefe]::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}[data-v-1feccefe]::-webkit-datetime-edit{display:inline-flex}[data-v-1feccefe]::-webkit-datetime-edit-fields-wrapper{padding:0}[data-v-1feccefe]::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}[data-v-1feccefe]::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}[data-v-1feccefe]::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}[data-v-1feccefe]::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}[data-v-1feccefe]::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}[data-v-1feccefe]::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}[data-v-1feccefe]::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}[data-v-1feccefe]::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}[data-v-1feccefe]::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}[data-v-1feccefe]::-webkit-calendar-picker-indicator{line-height:1}[data-v-1feccefe]:-moz-ui-invalid{box-shadow:none}button[data-v-1feccefe]{-webkit-appearance:button;appearance:button}input[data-v-1feccefe]:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}[data-v-1feccefe]::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}[data-v-1feccefe]::file-selector-button{-webkit-appearance:button;appearance:button}[data-v-1feccefe]::-webkit-inner-spin-button{height:auto}[data-v-1feccefe]::-webkit-outer-spin-button{height:auto}[hidden][data-v-1feccefe]:where(:not([hidden=until-found])){display:none!important}[data-v-1feccefe]{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){[data-v-1feccefe]{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body[data-v-1feccefe]{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-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-1feccefe]{container:card-header/inline-size}.wp\\:pointer-events-none[data-v-1feccefe]{pointer-events:none}.wp\\:sr-only[data-v-1feccefe]{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-1feccefe]{position:absolute}.wp\\:fixed[data-v-1feccefe]{position:fixed}.wp\\:relative[data-v-1feccefe]{position:relative}.wp\\:sticky[data-v-1feccefe]{position:sticky}.wp\\:inset-0[data-v-1feccefe]{inset:calc(var(--wp-spacing) * 0)}.wp\\:inset-x-0[data-v-1feccefe]{inset-inline:calc(var(--wp-spacing) * 0)}.wp\\:top-0[data-v-1feccefe]{top:calc(var(--wp-spacing) * 0)}.wp\\:top-1\\/2[data-v-1feccefe]{top:50%}.wp\\:top-2\\.5[data-v-1feccefe]{top:calc(var(--wp-spacing) * 2.5)}.wp\\:top-4[data-v-1feccefe]{top:calc(var(--wp-spacing) * 4)}.wp\\:top-\\[50\\%\\][data-v-1feccefe]{top:50%}.wp\\:top-full[data-v-1feccefe]{top:100%}.wp\\:right-0[data-v-1feccefe]{right:calc(var(--wp-spacing) * 0)}.wp\\:right-1[data-v-1feccefe]{right:calc(var(--wp-spacing) * 1)}.wp\\:right-2[data-v-1feccefe]{right:calc(var(--wp-spacing) * 2)}.wp\\:right-4[data-v-1feccefe]{right:calc(var(--wp-spacing) * 4)}.wp\\:bottom-2[data-v-1feccefe]{bottom:calc(var(--wp-spacing) * 2)}.wp\\:bottom-full[data-v-1feccefe]{bottom:100%}.wp\\:left-0[data-v-1feccefe]{left:calc(var(--wp-spacing) * 0)}.wp\\:left-0\\.5[data-v-1feccefe]{left:calc(var(--wp-spacing) * .5)}.wp\\:left-2[data-v-1feccefe]{left:calc(var(--wp-spacing) * 2)}.wp\\:left-\\[50\\%\\][data-v-1feccefe]{left:50%}.wp\\:z-10[data-v-1feccefe]{z-index:10}.wp\\:z-40[data-v-1feccefe]{z-index:40}.wp\\:z-50[data-v-1feccefe]{z-index:50}.wp\\:order-first[data-v-1feccefe]{order:-9999}.wp\\:col-start-2[data-v-1feccefe]{grid-column-start:2}.wp\\:row-span-2[data-v-1feccefe]{grid-row:span 2/span 2}.wp\\:row-start-1[data-v-1feccefe]{grid-row-start:1}.wp\\:container[data-v-1feccefe]{width:100%}@media (min-width:40rem){.wp\\:container[data-v-1feccefe]{max-width:40rem}}@media (min-width:48rem){.wp\\:container[data-v-1feccefe]{max-width:48rem}}@media (min-width:64rem){.wp\\:container[data-v-1feccefe]{max-width:64rem}}@media (min-width:80rem){.wp\\:container[data-v-1feccefe]{max-width:80rem}}@media (min-width:96rem){.wp\\:container[data-v-1feccefe]{max-width:96rem}}.wp\\:-mx-1[data-v-1feccefe]{margin-inline:calc(var(--wp-spacing) * -1)}.wp\\:mx-2[data-v-1feccefe]{margin-inline:calc(var(--wp-spacing) * 2)}.wp\\:mx-auto[data-v-1feccefe]{margin-inline-start:auto;margin-inline-end:auto}.wp\\:my-1[data-v-1feccefe]{margin-block:calc(var(--wp-spacing) * 1)}.wp\\:my-2[data-v-1feccefe]{margin-block:calc(var(--wp-spacing) * 2)}.wp\\:my-8[data-v-1feccefe]{margin-block:calc(var(--wp-spacing) * 8)}.wp\\:mt-1[data-v-1feccefe]{margin-top:calc(var(--wp-spacing) * 1)}.wp\\:mr-4[data-v-1feccefe]{margin-right:calc(var(--wp-spacing) * 4)}.wp\\:mr-auto[data-v-1feccefe]{margin-right:auto}.wp\\:mb-1[data-v-1feccefe]{margin-bottom:calc(var(--wp-spacing) * 1)}.wp\\:mb-2[data-v-1feccefe]{margin-bottom:calc(var(--wp-spacing) * 2)}.wp\\:mb-4[data-v-1feccefe]{margin-bottom:calc(var(--wp-spacing) * 4)}.wp\\:mb-5[data-v-1feccefe]{margin-bottom:calc(var(--wp-spacing) * 5)}.wp\\:ml-auto[data-v-1feccefe]{margin-left:auto}.wp\\:block[data-v-1feccefe]{display:block}.wp\\:flex[data-v-1feccefe]{display:flex}.wp\\:grid[data-v-1feccefe]{display:grid}.wp\\:hidden[data-v-1feccefe]{display:none}.wp\\:inline-flex[data-v-1feccefe]{display:inline-flex}.wp\\:aspect-square[data-v-1feccefe]{aspect-ratio:1}.wp\\:aspect-video[data-v-1feccefe]{aspect-ratio:var(--wp-aspect-video)}.wp\\:size-2[data-v-1feccefe]{width:calc(var(--wp-spacing) * 2);height:calc(var(--wp-spacing) * 2)}.wp\\:size-2\\.5[data-v-1feccefe]{width:calc(var(--wp-spacing) * 2.5);height:calc(var(--wp-spacing) * 2.5)}.wp\\:size-3[data-v-1feccefe]{width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:size-3\\.5[data-v-1feccefe]{width:calc(var(--wp-spacing) * 3.5);height:calc(var(--wp-spacing) * 3.5)}.wp\\:size-4[data-v-1feccefe]{width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:size-5[data-v-1feccefe]{width:calc(var(--wp-spacing) * 5);height:calc(var(--wp-spacing) * 5)}.wp\\:size-6[data-v-1feccefe]{width:calc(var(--wp-spacing) * 6);height:calc(var(--wp-spacing) * 6)}.wp\\:size-7[data-v-1feccefe]{width:calc(var(--wp-spacing) * 7);height:calc(var(--wp-spacing) * 7)}.wp\\:size-8[data-v-1feccefe]{width:calc(var(--wp-spacing) * 8);height:calc(var(--wp-spacing) * 8)}.wp\\:size-9[data-v-1feccefe]{width:calc(var(--wp-spacing) * 9);height:calc(var(--wp-spacing) * 9)}.wp\\:size-10[data-v-1feccefe]{width:calc(var(--wp-spacing) * 10);height:calc(var(--wp-spacing) * 10)}.wp\\:size-12[data-v-1feccefe]{width:calc(var(--wp-spacing) * 12);height:calc(var(--wp-spacing) * 12)}.wp\\:size-full[data-v-1feccefe]{width:100%;height:100%}.wp\\:h-2\\.5[data-v-1feccefe]{height:calc(var(--wp-spacing) * 2.5)}.wp\\:h-3[data-v-1feccefe]{height:calc(var(--wp-spacing) * 3)}.wp\\:h-4[data-v-1feccefe]{height:calc(var(--wp-spacing) * 4)}.wp\\:h-5[data-v-1feccefe]{height:calc(var(--wp-spacing) * 5)}.wp\\:h-6[data-v-1feccefe]{height:calc(var(--wp-spacing) * 6)}.wp\\:h-7[data-v-1feccefe]{height:calc(var(--wp-spacing) * 7)}.wp\\:h-8[data-v-1feccefe]{height:calc(var(--wp-spacing) * 8)}.wp\\:h-9[data-v-1feccefe]{height:calc(var(--wp-spacing) * 9)}.wp\\:h-10[data-v-1feccefe]{height:calc(var(--wp-spacing) * 10)}.wp\\:h-12[data-v-1feccefe]{height:calc(var(--wp-spacing) * 12)}.wp\\:h-14[data-v-1feccefe]{height:calc(var(--wp-spacing) * 14)}.wp\\:h-16[data-v-1feccefe]{height:calc(var(--wp-spacing) * 16)}.wp\\:h-64[data-v-1feccefe]{height:calc(var(--wp-spacing) * 64)}.wp\\:h-80[data-v-1feccefe]{height:calc(var(--wp-spacing) * 80)}.wp\\:h-\\[15px\\][data-v-1feccefe]{height:15px}.wp\\:h-\\[16px\\][data-v-1feccefe]{height:16px}.wp\\:h-\\[60vh\\][data-v-1feccefe]{height:60vh}.wp\\:h-\\[var\\(--reka-select-trigger-height\\)\\][data-v-1feccefe]{height:var(--reka-select-trigger-height)}.wp\\:h-full[data-v-1feccefe]{height:100%}.wp\\:h-px[data-v-1feccefe]{height:1px}.wp\\:max-h-\\(--reka-dropdown-menu-content-available-height\\)[data-v-1feccefe]{max-height:var(--reka-dropdown-menu-content-available-height)}.wp\\:max-h-\\(--reka-select-content-available-height\\)[data-v-1feccefe]{max-height:var(--reka-select-content-available-height)}.wp\\:max-h-0[data-v-1feccefe]{max-height:calc(var(--wp-spacing) * 0)}.wp\\:max-h-40[data-v-1feccefe]{max-height:calc(var(--wp-spacing) * 40)}.wp\\:max-h-60[data-v-1feccefe]{max-height:calc(var(--wp-spacing) * 60)}.wp\\:max-h-\\[300px\\][data-v-1feccefe]{max-height:300px}.wp\\:min-h-10[data-v-1feccefe]{min-height:calc(var(--wp-spacing) * 10)}.wp\\:min-h-\\[calc\\(100vh-3\\.5rem\\)\\][data-v-1feccefe]{min-height:calc(100vh - 3.5rem)}.wp\\:min-h-screen[data-v-1feccefe]{min-height:100vh}.wp\\:\\!w-full[data-v-1feccefe]{width:100%!important}.wp\\:w-2\\.5[data-v-1feccefe]{width:calc(var(--wp-spacing) * 2.5)}.wp\\:w-3[data-v-1feccefe]{width:calc(var(--wp-spacing) * 3)}.wp\\:w-4[data-v-1feccefe]{width:calc(var(--wp-spacing) * 4)}.wp\\:w-5[data-v-1feccefe]{width:calc(var(--wp-spacing) * 5)}.wp\\:w-6[data-v-1feccefe]{width:calc(var(--wp-spacing) * 6)}.wp\\:w-8[data-v-1feccefe]{width:calc(var(--wp-spacing) * 8)}.wp\\:w-9[data-v-1feccefe]{width:calc(var(--wp-spacing) * 9)}.wp\\:w-12[data-v-1feccefe]{width:calc(var(--wp-spacing) * 12)}.wp\\:w-16[data-v-1feccefe]{width:calc(var(--wp-spacing) * 16)}.wp\\:w-24[data-v-1feccefe]{width:calc(var(--wp-spacing) * 24)}.wp\\:w-48[data-v-1feccefe]{width:calc(var(--wp-spacing) * 48)}.wp\\:w-72[data-v-1feccefe]{width:calc(var(--wp-spacing) * 72)}.wp\\:w-\\[15px\\][data-v-1feccefe]{width:15px}.wp\\:w-\\[16px\\][data-v-1feccefe]{width:16px}.wp\\:w-\\[min\\(92vw\\,330px\\)\\][data-v-1feccefe]{width:min(92vw,330px)}.wp\\:w-auto[data-v-1feccefe]{width:auto}.wp\\:w-fit[data-v-1feccefe]{width:-moz-fit-content;width:fit-content}.wp\\:w-full[data-v-1feccefe]{width:100%}.wp\\:max-w-80[data-v-1feccefe]{max-width:calc(var(--wp-spacing) * 80)}.wp\\:max-w-\\[330px\\][data-v-1feccefe]{max-width:330px}.wp\\:max-w-\\[calc\\(100\\%-2rem\\)\\][data-v-1feccefe]{max-width:calc(100% - 2rem)}.wp\\:max-w-lg[data-v-1feccefe]{max-width:var(--wp-container-lg)}.wp\\:max-w-md[data-v-1feccefe]{max-width:var(--wp-container-md)}.wp\\:max-w-screen-2xl[data-v-1feccefe]{max-width:var(--wp-breakpoint-2xl)}.wp\\:min-w-0[data-v-1feccefe]{min-width:calc(var(--wp-spacing) * 0)}.wp\\:min-w-5[data-v-1feccefe]{min-width:calc(var(--wp-spacing) * 5)}.wp\\:min-w-8[data-v-1feccefe]{min-width:calc(var(--wp-spacing) * 8)}.wp\\:min-w-9[data-v-1feccefe]{min-width:calc(var(--wp-spacing) * 9)}.wp\\:min-w-10[data-v-1feccefe]{min-width:calc(var(--wp-spacing) * 10)}.wp\\:min-w-\\[8rem\\][data-v-1feccefe]{min-width:8rem}.wp\\:min-w-\\[var\\(--reka-select-trigger-width\\)\\][data-v-1feccefe]{min-width:var(--reka-select-trigger-width)}.wp\\:flex-1[data-v-1feccefe]{flex:1}.wp\\:shrink-0[data-v-1feccefe]{flex-shrink:0}.wp\\:grow[data-v-1feccefe]{flex-grow:1}.wp\\:origin-\\(--reka-dropdown-menu-content-transform-origin\\)[data-v-1feccefe]{transform-origin:var(--reka-dropdown-menu-content-transform-origin)}.wp\\:origin-\\(--reka-popover-content-transform-origin\\)[data-v-1feccefe]{transform-origin:var(--reka-popover-content-transform-origin)}.wp\\:translate-x-\\[-50\\%\\][data-v-1feccefe]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:-translate-y-1\\/2[data-v-1feccefe]{--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-1feccefe]{--tw-translate-y:calc(var(--wp-spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[-50\\%\\][data-v-1feccefe]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[calc\\(-50\\%_-_2px\\)\\][data-v-1feccefe]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:rotate-45[data-v-1feccefe]{rotate:45deg}.wp\\:animate-in[data-v-1feccefe]{animation:enter-1feccefe 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-1feccefe]{animation:var(--wp-animate-pulse)}.wp\\:cursor-default[data-v-1feccefe]{cursor:default}.wp\\:cursor-move[data-v-1feccefe]{cursor:move}.wp\\:cursor-pointer[data-v-1feccefe]{cursor:pointer}.wp\\:touch-none[data-v-1feccefe]{touch-action:none}.wp\\:scroll-my-1[data-v-1feccefe]{scroll-margin-block:calc(var(--wp-spacing) * 1)}.wp\\:scroll-py-1[data-v-1feccefe]{scroll-padding-block:calc(var(--wp-spacing) * 1)}.wp\\:auto-rows-min[data-v-1feccefe]{grid-auto-rows:min-content}.wp\\:grid-cols-2[data-v-1feccefe]{grid-template-columns:repeat(2,minmax(0,1fr))}.wp\\:grid-cols-3[data-v-1feccefe]{grid-template-columns:repeat(3,minmax(0,1fr))}.wp\\:grid-rows-\\[auto_auto\\][data-v-1feccefe]{grid-template-rows:auto auto}.wp\\:flex-col[data-v-1feccefe]{flex-direction:column}.wp\\:flex-col-reverse[data-v-1feccefe]{flex-direction:column-reverse}.wp\\:place-items-center[data-v-1feccefe]{place-items:center}.wp\\:items-center[data-v-1feccefe]{align-items:center}.wp\\:items-end[data-v-1feccefe]{align-items:flex-end}.wp\\:items-start[data-v-1feccefe]{align-items:flex-start}.wp\\:justify-between[data-v-1feccefe]{justify-content:space-between}.wp\\:justify-center[data-v-1feccefe]{justify-content:center}.wp\\:gap-0[data-v-1feccefe]{gap:calc(var(--wp-spacing) * 0)}.wp\\:gap-1[data-v-1feccefe]{gap:calc(var(--wp-spacing) * 1)}.wp\\:gap-1\\.5[data-v-1feccefe]{gap:calc(var(--wp-spacing) * 1.5)}.wp\\:gap-2[data-v-1feccefe]{gap:calc(var(--wp-spacing) * 2)}.wp\\:gap-3[data-v-1feccefe]{gap:calc(var(--wp-spacing) * 3)}.wp\\:gap-4[data-v-1feccefe]{gap:calc(var(--wp-spacing) * 4)}.wp\\:gap-6[data-v-1feccefe]{gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-\\[--spacing\\(var\\(--gap\\)\\)\\][data-v-1feccefe]{gap:calc(var(--wp-spacing) * var(--gap))}:where(.wp\\:space-y-2[data-v-1feccefe]>: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-1feccefe]>: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-1feccefe]>: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-1feccefe]{column-gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-y-3[data-v-1feccefe]{row-gap:calc(var(--wp-spacing) * 3)}.wp\\:self-start[data-v-1feccefe]{align-self:flex-start}.wp\\:justify-self-end[data-v-1feccefe]{justify-self:flex-end}.wp\\:truncate[data-v-1feccefe]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.wp\\:overflow-auto[data-v-1feccefe]{overflow:auto}.wp\\:overflow-hidden[data-v-1feccefe]{overflow:hidden}.wp\\:overflow-x-hidden[data-v-1feccefe]{overflow-x:hidden}.wp\\:overflow-y-auto[data-v-1feccefe]{overflow-y:auto}.wp\\:rounded[data-v-1feccefe]{border-radius:.25rem}.wp\\:rounded-2xl[data-v-1feccefe]{border-radius:var(--wp-radius-2xl)}.wp\\:rounded-\\[2px\\][data-v-1feccefe]{border-radius:2px}.wp\\:rounded-\\[inherit\\][data-v-1feccefe]{border-radius:inherit}.wp\\:rounded-full[data-v-1feccefe]{border-radius:3.40282e38px}.wp\\:rounded-lg[data-v-1feccefe]{border-radius:var(--radius)}.wp\\:rounded-md[data-v-1feccefe]{border-radius:calc(var(--radius) - 2px)}.wp\\:rounded-sm[data-v-1feccefe]{border-radius:calc(var(--radius) - 4px)}.wp\\:rounded-xl[data-v-1feccefe]{border-radius:calc(var(--radius) + 4px)}.wp\\:rounded-xs[data-v-1feccefe]{border-radius:var(--wp-radius-xs)}.wp\\:border[data-v-1feccefe]{border-style:var(--tw-border-style);border-width:1px}.wp\\:border-0[data-v-1feccefe]{border-style:var(--tw-border-style);border-width:0}.wp\\:border-t[data-v-1feccefe]{border-top-style:var(--tw-border-style);border-top-width:1px}.wp\\:border-b[data-v-1feccefe]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.wp\\:border-l[data-v-1feccefe]{border-left-style:var(--tw-border-style);border-left-width:1px}.wp\\:border-blue-500[data-v-1feccefe]{border-color:var(--wp-color-blue-500)}.wp\\:border-border[data-v-1feccefe]{border-color:var(--border)}.wp\\:border-destructive[data-v-1feccefe]{border-color:var(--destructive)}.wp\\:border-input[data-v-1feccefe]{border-color:var(--input)}.wp\\:border-primary[data-v-1feccefe]{border-color:var(--primary)}.wp\\:border-white\\/20[data-v-1feccefe]{border-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:border-white\\/20[data-v-1feccefe]{border-color:color-mix(in oklab, var(--wp-color-white) 20%, transparent)}}.wp\\:border-t-transparent[data-v-1feccefe]{border-top-color:#0000}.wp\\:border-l-transparent[data-v-1feccefe]{border-left-color:#0000}.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-1feccefe]{background-color:var(--color-red)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-1feccefe]{background-color:color-mix(in oklab, var(--color-red) 12%, transparent)}}.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-1feccefe]{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-1feccefe]{background-color:color-mix(in oklab, var(--p-primary-color) 12%, transparent)}}.wp\\:bg-amber-100[data-v-1feccefe]{background-color:var(--wp-color-amber-100)}.wp\\:bg-background[data-v-1feccefe],.wp\\:bg-background\\/95[data-v-1feccefe]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-background\\/95[data-v-1feccefe]{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.wp\\:bg-black[data-v-1feccefe],.wp\\:bg-black\\/80[data-v-1feccefe]{background-color:var(--wp-color-black)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-black\\/80[data-v-1feccefe]{background-color:color-mix(in oklab, var(--wp-color-black) 80%, transparent)}}.wp\\:bg-blue-100[data-v-1feccefe]{background-color:var(--wp-color-blue-100)}.wp\\:bg-border[data-v-1feccefe]{background-color:var(--border)}.wp\\:bg-card[data-v-1feccefe]{background-color:var(--card)}.wp\\:bg-destructive[data-v-1feccefe]{background-color:var(--destructive)}.wp\\:bg-emerald-100[data-v-1feccefe]{background-color:var(--wp-color-emerald-100)}.wp\\:bg-foreground[data-v-1feccefe]{background-color:var(--foreground)}.wp\\:bg-muted[data-v-1feccefe]{background-color:var(--muted)}.wp\\:bg-neutral-100[data-v-1feccefe]{background-color:var(--wp-color-neutral-100)}.wp\\:bg-neutral-800[data-v-1feccefe]{background-color:var(--wp-color-neutral-800)}.wp\\:bg-popover[data-v-1feccefe]{background-color:var(--popover)}.wp\\:bg-primary[data-v-1feccefe],.wp\\:bg-primary\\/10[data-v-1feccefe]{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-primary\\/10[data-v-1feccefe]{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:bg-purple-100[data-v-1feccefe]{background-color:var(--wp-color-purple-100)}.wp\\:bg-secondary[data-v-1feccefe]{background-color:var(--secondary)}.wp\\:bg-status-available[data-v-1feccefe]{background-color:var(--status-available)}.wp\\:bg-status-hold\\/12[data-v-1feccefe]{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-status-hold\\/12[data-v-1feccefe]{background-color:color-mix(in oklab, var(--status-hold) 12%, transparent)}}.wp\\:bg-transparent[data-v-1feccefe]{background-color:#0000}.wp\\:bg-white[data-v-1feccefe],.wp\\:bg-white\\/70[data-v-1feccefe]{background-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-white\\/70[data-v-1feccefe]{background-color:color-mix(in oklab, var(--wp-color-white) 70%, transparent)}}.wp\\:bg-gradient-to-r[data-v-1feccefe]{--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-1feccefe]{--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-1feccefe]{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 80%, transparent)}}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80[data-v-1feccefe]{--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-1feccefe]{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-destructive\\/60[data-v-1feccefe]{--tw-gradient-from:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:from-destructive\\/60[data-v-1feccefe]{--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-1feccefe]{--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-1feccefe]{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:to-destructive\\/90[data-v-1feccefe]{--tw-gradient-to:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:to-destructive\\/90[data-v-1feccefe]{--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-1feccefe]{fill:currentColor}.wp\\:fill-foreground[data-v-1feccefe]{fill:var(--foreground)}.wp\\:object-contain[data-v-1feccefe]{object-fit:contain}.wp\\:object-cover[data-v-1feccefe]{object-fit:cover}.wp\\:p-0[data-v-1feccefe]{padding:calc(var(--wp-spacing) * 0)}.wp\\:p-0\\.5[data-v-1feccefe]{padding:calc(var(--wp-spacing) * .5)}.wp\\:p-1[data-v-1feccefe]{padding:calc(var(--wp-spacing) * 1)}.wp\\:p-2[data-v-1feccefe]{padding:calc(var(--wp-spacing) * 2)}.wp\\:p-3[data-v-1feccefe]{padding:calc(var(--wp-spacing) * 3)}.wp\\:p-4[data-v-1feccefe]{padding:calc(var(--wp-spacing) * 4)}.wp\\:p-6[data-v-1feccefe]{padding:calc(var(--wp-spacing) * 6)}.wp\\:p-px[data-v-1feccefe]{padding:1px}.wp\\:px-1[data-v-1feccefe]{padding-inline:calc(var(--wp-spacing) * 1)}.wp\\:px-1\\.5[data-v-1feccefe]{padding-inline:calc(var(--wp-spacing) * 1.5)}.wp\\:px-2[data-v-1feccefe]{padding-inline:calc(var(--wp-spacing) * 2)}.wp\\:px-2\\.5[data-v-1feccefe]{padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:px-3[data-v-1feccefe]{padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:px-4[data-v-1feccefe]{padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:px-6[data-v-1feccefe]{padding-inline:calc(var(--wp-spacing) * 6)}.wp\\:px-10[data-v-1feccefe]{padding-inline:calc(var(--wp-spacing) * 10)}.wp\\:px-14[data-v-1feccefe]{padding-inline:calc(var(--wp-spacing) * 14)}.wp\\:py-1[data-v-1feccefe]{padding-block:calc(var(--wp-spacing) * 1)}.wp\\:py-1\\.5[data-v-1feccefe]{padding-block:calc(var(--wp-spacing) * 1.5)}.wp\\:py-2[data-v-1feccefe]{padding-block:calc(var(--wp-spacing) * 2)}.wp\\:py-3[data-v-1feccefe]{padding-block:calc(var(--wp-spacing) * 3)}.wp\\:py-4[data-v-1feccefe]{padding-block:calc(var(--wp-spacing) * 4)}.wp\\:py-6[data-v-1feccefe]{padding-block:calc(var(--wp-spacing) * 6)}.wp\\:py-8[data-v-1feccefe]{padding-block:calc(var(--wp-spacing) * 8)}.wp\\:pt-0[data-v-1feccefe]{padding-top:calc(var(--wp-spacing) * 0)}.wp\\:pr-2[data-v-1feccefe]{padding-right:calc(var(--wp-spacing) * 2)}.wp\\:pr-4[data-v-1feccefe]{padding-right:calc(var(--wp-spacing) * 4)}.wp\\:pr-8[data-v-1feccefe]{padding-right:calc(var(--wp-spacing) * 8)}.wp\\:pb-0[data-v-1feccefe]{padding-bottom:calc(var(--wp-spacing) * 0)}.wp\\:pb-4[data-v-1feccefe]{padding-bottom:calc(var(--wp-spacing) * 4)}.wp\\:pl-2[data-v-1feccefe]{padding-left:calc(var(--wp-spacing) * 2)}.wp\\:pl-8[data-v-1feccefe]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:text-center[data-v-1feccefe]{text-align:center}.wp\\:text-left[data-v-1feccefe]{text-align:left}.wp\\:font-mono[data-v-1feccefe]{font-family:var(--wp-font-mono)}.wp\\:font-sans[data-v-1feccefe]{font-family:Montserrat,sans-serif}.wp\\:text-3xl[data-v-1feccefe]{font-size:var(--wp-text-3xl);line-height:var(--tw-leading,var(--wp-text-3xl--line-height))}.wp\\:text-base[data-v-1feccefe]{font-size:var(--wp-text-base);line-height:var(--tw-leading,var(--wp-text-base--line-height))}.wp\\:text-lg[data-v-1feccefe]{font-size:var(--wp-text-lg);line-height:var(--tw-leading,var(--wp-text-lg--line-height))}.wp\\:text-sm[data-v-1feccefe]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:text-xs[data-v-1feccefe]{font-size:var(--wp-text-xs);line-height:var(--tw-leading,var(--wp-text-xs--line-height))}.wp\\:text-\\[10px\\][data-v-1feccefe]{font-size:10px}.wp\\:text-\\[11px\\][data-v-1feccefe]{font-size:11px}.wp\\:leading-none[data-v-1feccefe]{--tw-leading:1;line-height:1}.wp\\:font-bold[data-v-1feccefe]{--tw-font-weight:var(--wp-font-weight-bold);font-weight:var(--wp-font-weight-bold)}.wp\\:font-light[data-v-1feccefe]{--tw-font-weight:var(--wp-font-weight-light);font-weight:var(--wp-font-weight-light)}.wp\\:font-medium[data-v-1feccefe]{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:font-semibold[data-v-1feccefe]{--tw-font-weight:var(--wp-font-weight-semibold);font-weight:var(--wp-font-weight-semibold)}.wp\\:tracking-wider[data-v-1feccefe]{--tw-tracking:var(--wp-tracking-wider);letter-spacing:var(--wp-tracking-wider)}.wp\\:tracking-widest[data-v-1feccefe]{--tw-tracking:var(--wp-tracking-widest);letter-spacing:var(--wp-tracking-widest)}.wp\\:text-balance[data-v-1feccefe]{text-wrap:balance}.wp\\:whitespace-nowrap[data-v-1feccefe]{white-space:nowrap}.wp\\:text-\\[var\\(--color-avaible\\)\\][data-v-1feccefe]{color:var(--color-avaible)}.wp\\:text-\\[var\\(--color-primary\\)\\][data-v-1feccefe]{color:var(--color-primary)}.wp\\:text-\\[var\\(--color-red\\)\\][data-v-1feccefe]{color:var(--color-red)}.wp\\:text-\\[var\\(--color-settings\\)\\][data-v-1feccefe]{color:var(--color-settings)}.wp\\:text-\\[var\\(--p-primary-color\\)\\][data-v-1feccefe]{color:var(--p-primary-color)}.wp\\:text-\\[var\\(--primary\\)\\][data-v-1feccefe]{color:var(--primary)}.wp\\:text-amber-500[data-v-1feccefe]{color:var(--wp-color-amber-500)}.wp\\:text-amber-600[data-v-1feccefe]{color:var(--wp-color-amber-600)}.wp\\:text-background[data-v-1feccefe]{color:var(--background)}.wp\\:text-black[data-v-1feccefe]{color:var(--wp-color-black)}.wp\\:text-blue-500[data-v-1feccefe]{color:var(--wp-color-blue-500)}.wp\\:text-blue-600[data-v-1feccefe]{color:var(--wp-color-blue-600)}.wp\\:text-card-foreground[data-v-1feccefe]{color:var(--card-foreground)}.wp\\:text-destructive[data-v-1feccefe]{color:var(--destructive)}.wp\\:text-emerald-600[data-v-1feccefe]{color:var(--wp-color-emerald-600)}.wp\\:text-foreground[data-v-1feccefe]{color:var(--foreground)}.wp\\:text-green-500[data-v-1feccefe]{color:var(--wp-color-green-500)}.wp\\:text-muted-foreground[data-v-1feccefe]{color:var(--muted-foreground)}.wp\\:text-neutral-400[data-v-1feccefe]{color:var(--wp-color-neutral-400)}.wp\\:text-neutral-500[data-v-1feccefe]{color:var(--wp-color-neutral-500)}.wp\\:text-neutral-600[data-v-1feccefe]{color:var(--wp-color-neutral-600)}.wp\\:text-neutral-800[data-v-1feccefe]{color:var(--wp-color-neutral-800)}.wp\\:text-neutral-900[data-v-1feccefe]{color:var(--wp-color-neutral-900)}.wp\\:text-popover-foreground[data-v-1feccefe]{color:var(--popover-foreground)}.wp\\:text-primary[data-v-1feccefe]{color:var(--primary)}.wp\\:text-primary-foreground[data-v-1feccefe]{color:var(--primary-foreground)}.wp\\:text-purple-600[data-v-1feccefe]{color:var(--wp-color-purple-600)}.wp\\:text-red-500[data-v-1feccefe]{color:var(--wp-color-red-500)}.wp\\:text-secondary-foreground[data-v-1feccefe]{color:var(--secondary-foreground)}.wp\\:text-status-available[data-v-1feccefe]{color:var(--status-available)}.wp\\:text-status-disconnected[data-v-1feccefe]{color:var(--status-disconnected)}.wp\\:text-status-hold[data-v-1feccefe]{color:var(--status-hold)}.wp\\:text-status-incall[data-v-1feccefe]{color:var(--status-incall)}.wp\\:text-status-incoming[data-v-1feccefe]{color:var(--status-incoming)}.wp\\:text-white[data-v-1feccefe]{color:var(--wp-color-white)}.wp\\:capitalize[data-v-1feccefe]{text-transform:capitalize}.wp\\:underline-offset-4[data-v-1feccefe]{text-underline-offset:4px}.wp\\:opacity-0[data-v-1feccefe]{opacity:0}.wp\\:opacity-50[data-v-1feccefe]{opacity:.5}.wp\\:opacity-70[data-v-1feccefe]{opacity:.7}.wp\\:opacity-100[data-v-1feccefe]{opacity:1}.wp\\:shadow-lg[data-v-1feccefe]{--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-1feccefe]{--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-1feccefe]{--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-1feccefe]{--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-1feccefe]{--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-1feccefe]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:ring-ring\\/50[data-v-1feccefe]{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:ring-offset-background[data-v-1feccefe]{--tw-ring-offset-color:var(--background)}.wp\\:outline-hidden[data-v-1feccefe]{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:outline-hidden[data-v-1feccefe]{outline-offset:2px;outline:2px solid #0000}}.wp\\:backdrop-blur[data-v-1feccefe]{--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-1feccefe]{--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-1feccefe]{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-1feccefe]{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-1feccefe]{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-1feccefe]{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-1feccefe]{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-1feccefe]{--tw-duration:.15s;transition-duration:.15s}.wp\\:duration-200[data-v-1feccefe]{--tw-duration:.2s;transition-duration:.2s}.wp\\:duration-300[data-v-1feccefe]{--tw-duration:.3s;transition-duration:.3s}.wp\\:ease-in-out[data-v-1feccefe]{--tw-ease:var(--wp-ease-in-out);transition-timing-function:var(--wp-ease-in-out)}.wp\\:fade-in-0[data-v-1feccefe]{--tw-enter-opacity:0}.wp\\:outline-none[data-v-1feccefe]{--tw-outline-style:none;outline-style:none}.wp\\:select-none[data-v-1feccefe]{-webkit-user-select:none;user-select:none}.wp\\:select-text[data-v-1feccefe]{-webkit-user-select:text;user-select:text}.wp\\:zoom-in-95[data-v-1feccefe]{--tw-enter-scale:.95}.wp\\:group-data-\\[disabled\\=true\\]\\:pointer-events-none[data-v-1feccefe]:is(:where(.wp\\:group)[data-disabled=true] *){pointer-events:none}.wp\\:group-data-\\[disabled\\=true\\]\\:opacity-50[data-v-1feccefe]:is(:where(.wp\\:group)[data-disabled=true] *){opacity:.5}.wp\\:peer-disabled\\:cursor-not-allowed[data-v-1feccefe]:is(:where(.wp\\:peer):disabled~*){cursor:not-allowed}.wp\\:peer-disabled\\:opacity-50[data-v-1feccefe]:is(:where(.wp\\:peer):disabled~*){opacity:.5}.wp\\:selection\\:bg-primary[data-v-1feccefe] ::selection,.wp\\:selection\\:bg-primary[data-v-1feccefe]::selection{background-color:var(--primary)}.wp\\:selection\\:text-primary-foreground[data-v-1feccefe] ::selection,.wp\\:selection\\:text-primary-foreground[data-v-1feccefe]::selection{color:var(--primary-foreground)}.wp\\:file\\:inline-flex[data-v-1feccefe]::-webkit-file-upload-button{display:inline-flex}.wp\\:file\\:inline-flex[data-v-1feccefe]::file-selector-button{display:inline-flex}.wp\\:file\\:h-7[data-v-1feccefe]::-webkit-file-upload-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:h-7[data-v-1feccefe]::file-selector-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:border-0[data-v-1feccefe]::-webkit-file-upload-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:border-0[data-v-1feccefe]::file-selector-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:bg-transparent[data-v-1feccefe]::-webkit-file-upload-button{background-color:#0000}.wp\\:file\\:bg-transparent[data-v-1feccefe]::file-selector-button{background-color:#0000}.wp\\:file\\:text-sm[data-v-1feccefe]::-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-1feccefe]::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-1feccefe]::-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-1feccefe]::file-selector-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:text-foreground[data-v-1feccefe]::-webkit-file-upload-button{color:var(--foreground)}.wp\\:file\\:text-foreground[data-v-1feccefe]::file-selector-button{color:var(--foreground)}.wp\\:placeholder\\:text-muted-foreground[data-v-1feccefe]::placeholder{color:var(--muted-foreground)}.wp\\:last\\:border-b-0[data-v-1feccefe]: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-1feccefe]: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-1feccefe]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 8%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10[data-v-1feccefe]: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-1feccefe]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 10%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20[data-v-1feccefe]: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-1feccefe]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 20%, transparent)}}.wp\\:hover\\:bg-accent[data-v-1feccefe]:hover,.wp\\:hover\\:bg-accent\\/50[data-v-1feccefe]:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-accent\\/50[data-v-1feccefe]:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:hover\\:bg-destructive\\/90[data-v-1feccefe]:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-destructive\\/90[data-v-1feccefe]:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:hover\\:bg-muted[data-v-1feccefe]:hover{background-color:var(--muted)}.wp\\:hover\\:bg-neutral-100[data-v-1feccefe]:hover{background-color:var(--wp-color-neutral-100)}.wp\\:hover\\:bg-neutral-200[data-v-1feccefe]:hover{background-color:var(--wp-color-neutral-200)}.wp\\:hover\\:bg-primary\\/90[data-v-1feccefe]:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/90[data-v-1feccefe]:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.wp\\:hover\\:bg-secondary[data-v-1feccefe]:hover,.wp\\:hover\\:bg-secondary\\/80[data-v-1feccefe]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-secondary\\/80[data-v-1feccefe]:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.wp\\:hover\\:bg-status-available\\/90[data-v-1feccefe]:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-available\\/90[data-v-1feccefe]:hover{background-color:color-mix(in oklab, var(--status-available) 90%, transparent)}}.wp\\:hover\\:bg-transparent[data-v-1feccefe]:hover{background-color:#0000}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75[data-v-1feccefe]: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-1feccefe]: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-1feccefe]: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-1feccefe]:hover{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-destructive\\/70[data-v-1feccefe]:hover{--tw-gradient-from:color-mix(in oklab, var(--destructive) 70%, transparent)}}.wp\\:hover\\:from-destructive\\/70[data-v-1feccefe]: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-1feccefe]: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-1feccefe]:hover{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:to-destructive\\/95[data-v-1feccefe]:hover{--tw-gradient-to:color-mix(in oklab, var(--destructive) 95%, transparent)}}.wp\\:hover\\:to-destructive\\/95[data-v-1feccefe]: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-1feccefe]:hover{color:var(--accent-foreground)}.wp\\:hover\\:text-destructive[data-v-1feccefe]:hover{color:var(--destructive)}.wp\\:hover\\:text-muted-foreground[data-v-1feccefe]:hover{color:var(--muted-foreground)}.wp\\:hover\\:text-primary[data-v-1feccefe]:hover{color:var(--primary)}.wp\\:hover\\:text-status-available\\/80[data-v-1feccefe]:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-available\\/80[data-v-1feccefe]:hover{color:color-mix(in oklab, var(--status-available) 80%, transparent)}}.wp\\:hover\\:text-status-disconnected[data-v-1feccefe]:hover,.wp\\:hover\\:text-status-disconnected\\/80[data-v-1feccefe]:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-disconnected\\/80[data-v-1feccefe]:hover{color:color-mix(in oklab, var(--status-disconnected) 80%, transparent)}}.wp\\:hover\\:text-status-hold\\/80[data-v-1feccefe]:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-hold\\/80[data-v-1feccefe]:hover{color:color-mix(in oklab, var(--status-hold) 80%, transparent)}}.wp\\:hover\\:text-status-incall\\/80[data-v-1feccefe]:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incall\\/80[data-v-1feccefe]:hover{color:color-mix(in oklab, var(--status-incall) 80%, transparent)}}.wp\\:hover\\:text-status-incoming\\/80[data-v-1feccefe]:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incoming\\/80[data-v-1feccefe]:hover{color:color-mix(in oklab, var(--status-incoming) 80%, transparent)}}.wp\\:hover\\:underline[data-v-1feccefe]:hover{text-decoration-line:underline}.wp\\:hover\\:opacity-80[data-v-1feccefe]:hover{opacity:.8}.wp\\:hover\\:opacity-100[data-v-1feccefe]:hover{opacity:1}.wp\\:hover\\:ring-4[data-v-1feccefe]: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-1feccefe]:focus{z-index:10}.wp\\:focus\\:bg-accent[data-v-1feccefe]:focus{background-color:var(--accent)}.wp\\:focus\\:text-accent-foreground[data-v-1feccefe]:focus{color:var(--accent-foreground)}.wp\\:focus\\:ring-2[data-v-1feccefe]: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-1feccefe]:focus{--tw-ring-color:var(--ring)}.wp\\:focus\\:ring-offset-2[data-v-1feccefe]: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-1feccefe]:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus\\:outline-hidden[data-v-1feccefe]:focus{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:z-10[data-v-1feccefe]:focus-visible{z-index:10}.wp\\:focus-visible\\:border-ring[data-v-1feccefe]:focus-visible{border-color:var(--ring)}.wp\\:focus-visible\\:ring-2[data-v-1feccefe]: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-1feccefe]: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-1feccefe]: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-1feccefe]:focus-visible{--tw-ring-color:var(--p-primary-color)}.wp\\:focus-visible\\:ring-destructive\\/20[data-v-1feccefe]:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-destructive\\/20[data-v-1feccefe]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:focus-visible\\:ring-ring\\/50[data-v-1feccefe]:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-ring\\/50[data-v-1feccefe]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:focus-visible\\:ring-offset-2[data-v-1feccefe]: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-1feccefe]:focus-visible{--tw-ring-offset-color:var(--wp-color-white)}.wp\\:focus-visible\\:outline-hidden[data-v-1feccefe]:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus-visible\\:outline-hidden[data-v-1feccefe]:focus-visible{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:outline-1[data-v-1feccefe]:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.wp\\:active\\:scale-95[data-v-1feccefe]: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-1feccefe]:disabled{pointer-events:none}.wp\\:disabled\\:cursor-not-allowed[data-v-1feccefe]:disabled{cursor:not-allowed}.wp\\:disabled\\:opacity-50[data-v-1feccefe]:disabled{opacity:.5}.wp\\:has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\][data-v-1feccefe]:has([data-slot=card-action]){grid-template-columns:1fr auto}.wp\\:has-\\[\\>svg\\]\\:px-2\\.5[data-v-1feccefe]:has(>svg){padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:has-\\[\\>svg\\]\\:px-3[data-v-1feccefe]:has(>svg){padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:has-\\[\\>svg\\]\\:px-4[data-v-1feccefe]:has(>svg){padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:aria-invalid\\:border-destructive[aria-invalid=true][data-v-1feccefe]{border-color:var(--destructive)}.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-1feccefe]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-1feccefe]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:data-\\[disabled\\]\\:pointer-events-none[data-disabled][data-v-1feccefe]{pointer-events:none}.wp\\:data-\\[disabled\\]\\:opacity-50[data-disabled][data-v-1feccefe]{opacity:.5}.wp\\:data-\\[highlighted\\]\\:bg-accent[data-highlighted][data-v-1feccefe]{background-color:var(--accent)}.wp\\:data-\\[highlighted\\]\\:text-accent-foreground[data-highlighted][data-v-1feccefe]{color:var(--accent-foreground)}.wp\\:data-\\[inset\\]\\:pl-8[data-inset][data-v-1feccefe]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal][data-v-1feccefe]{height:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal][data-v-1feccefe]{height:100%}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal][data-v-1feccefe]{height:1px}.wp\\:data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal][data-v-1feccefe]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical][data-v-1feccefe]{height:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical][data-v-1feccefe]{min-height:calc(var(--wp-spacing) * 44)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical][data-v-1feccefe]{width:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical][data-v-1feccefe]{width:auto}.wp\\:data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical][data-v-1feccefe]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical][data-v-1feccefe]{width:1px}.wp\\:data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical][data-v-1feccefe]{flex-direction:column}.wp\\:data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder][data-v-1feccefe]{color:var(--muted-foreground)}.wp\\:data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom][data-v-1feccefe]{--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-1feccefe]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=left\\]\\:-translate-x-1[data-side=left][data-v-1feccefe]{--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-1feccefe]{--tw-enter-translate-x:calc(2*var(--spacing))}.wp\\:data-\\[side\\=right\\]\\:translate-x-1[data-side=right][data-v-1feccefe]{--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-1feccefe]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=top\\]\\:-translate-y-1[data-side=top][data-v-1feccefe]{--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-1feccefe]{--tw-enter-translate-y:calc(2*var(--spacing))}.wp\\:data-\\[size\\=default\\]\\:h-9[data-size=default][data-v-1feccefe]{height:calc(var(--wp-spacing) * 9)}.wp\\:data-\\[size\\=sm\\]\\:h-8[data-size=sm][data-v-1feccefe]{height:calc(var(--wp-spacing) * 8)}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value][data-v-1feccefe]{-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-1feccefe]{display:flex}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value][data-v-1feccefe]{align-items:center}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value][data-v-1feccefe]{gap:calc(var(--wp-spacing) * 2)}.wp\\:data-\\[spacing\\=0\\]\\:rounded-none[data-spacing="0"][data-v-1feccefe]{border-radius:0}.wp\\:data-\\[spacing\\=0\\]\\:shadow-none[data-spacing="0"][data-v-1feccefe]{--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-1feccefe]: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-1feccefe]: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-1feccefe]{animation:accordion-up-1feccefe 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-1feccefe]{animation:exit-1feccefe 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-1feccefe]{--tw-exit-opacity:0}.wp\\:data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed][data-v-1feccefe]{--tw-exit-scale:.95}.wp\\:data-\\[state\\=on\\]\\:bg-accent[data-state=on][data-v-1feccefe]{background-color:var(--accent)}.wp\\:data-\\[state\\=on\\]\\:text-accent-foreground[data-state=on][data-v-1feccefe]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open][data-v-1feccefe]{animation:accordion-down-1feccefe 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-1feccefe]{animation:enter-1feccefe 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-1feccefe]{background-color:var(--accent)}.wp\\:data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open][data-v-1feccefe]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open][data-v-1feccefe]{color:var(--muted-foreground)}.wp\\:data-\\[state\\=open\\]\\:fade-in-0[data-state=open][data-v-1feccefe]{--tw-enter-opacity:0}.wp\\:data-\\[state\\=open\\]\\:zoom-in-95[data-state=open][data-v-1feccefe]{--tw-enter-scale:.95}.wp\\:data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive][data-v-1feccefe]{color:var(--destructive)}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive][data-v-1feccefe]: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-1feccefe]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive][data-v-1feccefe]:focus{color:var(--destructive)}.wp\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-1feccefe]{border-color:var(--color-primary-500)}.wp\\:data-\\[variant\\=outline\\]\\:focus-visible\\:ring-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-1feccefe]: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-1feccefe]{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-1feccefe]{border-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=default\\]\\:data-\\[variant\\=outline\\]\\:shadow-xs[data-spacing=default][data-variant=outline][data-v-1feccefe]{--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-1feccefe]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:supports-backdrop-filter\\:bg-background\\/60[data-v-1feccefe]{background-color:color-mix(in oklab, var(--background) 60%, transparent)}}}@media (min-width:40rem){.wp\\:sm\\:block[data-v-1feccefe]{display:block}.wp\\:sm\\:inline[data-v-1feccefe]{display:inline}.wp\\:sm\\:inline-block[data-v-1feccefe]{display:inline-block}.wp\\:sm\\:max-w-lg[data-v-1feccefe]{max-width:var(--wp-container-lg)}.wp\\:sm\\:max-w-md[data-v-1feccefe]{max-width:var(--wp-container-md)}.wp\\:sm\\:max-w-sm[data-v-1feccefe]{max-width:var(--wp-container-sm)}.wp\\:sm\\:flex-row[data-v-1feccefe]{flex-direction:row}.wp\\:sm\\:justify-end[data-v-1feccefe]{justify-content:flex-end}.wp\\:sm\\:gap-0[data-v-1feccefe]{gap:calc(var(--wp-spacing) * 0)}.wp\\:sm\\:rounded-lg[data-v-1feccefe]{border-radius:var(--radius)}.wp\\:sm\\:text-left[data-v-1feccefe]{text-align:left}}@media (min-width:48rem){.wp\\:md\\:w-full[data-v-1feccefe]{width:100%}.wp\\:md\\:text-sm[data-v-1feccefe]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}}.wp\\:dark\\:border-input[data-v-1feccefe]:where(.dark,.dark *){border-color:var(--input)}.wp\\:dark\\:bg-amber-900\\/30[data-v-1feccefe]: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-1feccefe]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-amber-900) 30%, transparent)}}.wp\\:dark\\:bg-blue-900\\/30[data-v-1feccefe]: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-1feccefe]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-blue-900) 30%, transparent)}}.wp\\:dark\\:bg-destructive\\/60[data-v-1feccefe]:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-destructive\\/60[data-v-1feccefe]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:dark\\:bg-emerald-900\\/30[data-v-1feccefe]: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-1feccefe]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-emerald-900) 30%, transparent)}}.wp\\:dark\\:bg-input\\/30[data-v-1feccefe]:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-input\\/30[data-v-1feccefe]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.wp\\:dark\\:bg-neutral-700[data-v-1feccefe]:where(.dark,.dark *){background-color:var(--wp-color-neutral-700)}.wp\\:dark\\:bg-neutral-800[data-v-1feccefe]:where(.dark,.dark *){background-color:var(--wp-color-neutral-800)}.wp\\:dark\\:bg-neutral-900[data-v-1feccefe]:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:bg-neutral-900\\/70[data-v-1feccefe]: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-1feccefe]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-neutral-900) 70%, transparent)}}.wp\\:dark\\:bg-purple-900\\/30[data-v-1feccefe]: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-1feccefe]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-purple-900) 30%, transparent)}}.wp\\:dark\\:text-amber-400[data-v-1feccefe]:where(.dark,.dark *){color:var(--wp-color-amber-400)}.wp\\:dark\\:text-blue-400[data-v-1feccefe]:where(.dark,.dark *){color:var(--wp-color-blue-400)}.wp\\:dark\\:text-emerald-400[data-v-1feccefe]:where(.dark,.dark *){color:var(--wp-color-emerald-400)}.wp\\:dark\\:text-neutral-100[data-v-1feccefe]:where(.dark,.dark *){color:var(--wp-color-neutral-100)}.wp\\:dark\\:text-neutral-400[data-v-1feccefe]:where(.dark,.dark *){color:var(--wp-color-neutral-400)}.wp\\:dark\\:text-neutral-500[data-v-1feccefe]:where(.dark,.dark *){color:var(--wp-color-neutral-500)}.wp\\:dark\\:text-purple-400[data-v-1feccefe]:where(.dark,.dark *){color:var(--wp-color-purple-400)}.wp\\:dark\\:text-white[data-v-1feccefe]:where(.dark,.dark *){color:var(--wp-color-white)}@media (hover:hover){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-1feccefe]:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-1feccefe]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-input\\/50[data-v-1feccefe]:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-input\\/50[data-v-1feccefe]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-600[data-v-1feccefe]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-600)}.wp\\:dark\\:hover\\:bg-neutral-800\\/80[data-v-1feccefe]: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-1feccefe]: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-1feccefe]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:hover\\:text-neutral-100[data-v-1feccefe]:where(.dark,.dark *):hover{color:var(--wp-color-neutral-100)}.wp\\:dark\\:hover\\:text-status-disconnected[data-v-1feccefe]:where(.dark,.dark *):hover{color:var(--status-disconnected)}}.wp\\:dark\\:focus-visible\\:ring-destructive\\/40[data-v-1feccefe]: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-1feccefe]: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-1feccefe]: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-1feccefe]{--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-1feccefe]{--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-1feccefe]: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-1feccefe]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:\\[\\&_button\\]\\:cursor-pointer button[data-v-1feccefe]{cursor:pointer}.wp\\:\\[\\&_svg\\]\\:pointer-events-none svg[data-v-1feccefe]{pointer-events:none}.wp\\:\\[\\&_svg\\]\\:shrink-0 svg[data-v-1feccefe]{flex-shrink:0}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg[data-v-1feccefe]: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-1feccefe]: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-1feccefe]: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-1feccefe]:not([class*="'text-'"]){color:var(--muted-foreground)}.wp\\:\\[\\.border-b\\]\\:pb-6.border-b[data-v-1feccefe]{padding-bottom:calc(var(--wp-spacing) * 6)}.wp\\:\\[\\.border-t\\]\\:pt-6.border-t[data-v-1feccefe]{padding-top:calc(var(--wp-spacing) * 6)}:is(.wp\\:\\*\\*\\:\\[\\[role\\=button\\]\\]\\:cursor-pointer *)[role=button][data-v-1feccefe]{cursor:pointer}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-1feccefe]>*):-webkit-any(span):last-child{display:flex}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-1feccefe]>*):is(span):last-child{display:flex}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-1feccefe]>*):-webkit-any(span):last-child{align-items:center}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-1feccefe]>*):is(span):last-child{align-items:center}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-1feccefe]>*):-webkit-any(span):last-child{gap:calc(var(--wp-spacing) * 2)}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-1feccefe]>*):is(span):last-child{gap:calc(var(--wp-spacing) * 2)}:-webkit-any(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-1feccefe]>*):-webkit-any(svg){color:var(--destructive)!important}:is(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-1feccefe]>*):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-1feccefe]: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-1feccefe]{rotate:180deg}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20[data-v-1feccefe]{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-1feccefe]{background-color:color-mix(in oklab, var(--background) 20%, transparent)}}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:text-background[data-v-1feccefe]{color:var(--background)}[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10[data-v-1feccefe]: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-1feccefe]: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-1feccefe]{clip-path:none!important}[data-v-1feccefe]: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-1feccefe]: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-1feccefe]: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-1feccefe]{--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-1feccefe]{--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-1feccefe]{--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-1feccefe]{font-family:Ibrand,sans-serif}.montserrat[data-v-1feccefe]{font-family:Montserrat}.quicksand[data-v-1feccefe]{font-family:Quicksand}.manrope[data-v-1feccefe]{font-family:Manrope}@keyframes pulse-1feccefe{50%{opacity:.5}}@keyframes enter-1feccefe{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-1feccefe{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-1feccefe{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-1feccefe{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(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
3
|
-
(function(){var Yc=Object.defineProperty,mg=(e,t)=>{let r={};for(var n in e)Yc(r,n,{get:e[n],enumerable:!0});return t&&Yc(r,Symbol.toStringTag,{value:"Module"}),r};function Vs(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var Ue={},us=[],or=()=>{},Zc=()=>!1,js=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ya=e=>e.startsWith("onUpdate:"),Xe=Object.assign,ba=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},wg=Object.prototype.hasOwnProperty,Ze=(e,t)=>wg.call(e,t),_e=Array.isArray,ds=e=>fs(e)==="[object Map]",jn=e=>fs(e)==="[object Set]",Xc=e=>fs(e)==="[object Date]",yg=e=>fs(e)==="[object RegExp]",Ie=e=>typeof e=="function",ot=e=>typeof e=="string",yr=e=>typeof e=="symbol",Je=e=>e!==null&&typeof e=="object",_a=e=>(Je(e)||Ie(e))&&Ie(e.then)&&Ie(e.catch),Qc=Object.prototype.toString,fs=e=>Qc.call(e),bg=e=>fs(e).slice(8,-1),Oi=e=>fs(e)==="[object Object]",Hi=e=>ot(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Un=Vs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Mi=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},_g=/-\w/g,bt=Mi(e=>e.replace(_g,t=>t.slice(1).toUpperCase())),Sg=/\B([A-Z])/g,Kt=Mi(e=>e.replace(Sg,"-$1").toLowerCase()),Us=Mi(e=>e.charAt(0).toUpperCase()+e.slice(1)),ps=Mi(e=>e?`on${Us(e)}`:""),Bt=(e,t)=>!Object.is(e,t),hs=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},eu=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Ni=e=>{const t=parseFloat(e);return isNaN(t)?e:t},qi=e=>{const t=ot(e)?Number(e):NaN;return isNaN(t)?e:t},tu,Bi=()=>tu||(tu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Cg=Vs("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 xt(e){if(_e(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=ot(n)?Ag(n):xt(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(ot(e)||Je(e))return e}var xg=/;(?![^(]*\))/g,Tg=/:([^]+)/,Eg=/\/\*[^]*?\*\//g;function Ag(e){const t={};return e.replace(Eg,"").split(xg).forEach(r=>{if(r){const n=r.split(Tg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function it(e){let t="";if(ot(e))t=e;else if(_e(e))for(let r=0;r<e.length;r++){const n=it(e[r]);n&&(t+=n+" ")}else if(Je(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function br(e){if(!e)return null;let{class:t,style:r}=e;return t&&!ot(t)&&(e.class=it(t)),r&&(e.style=xt(r)),e}var ru="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",kg=Vs(ru),bx=Vs(ru+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function nu(e){return!!e||e===""}function Rg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Lr(e[n],t[n]);return r}function Lr(e,t){if(e===t)return!0;let r=Xc(e),n=Xc(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=yr(e),n=yr(t),r||n)return e===t;if(r=_e(e),n=_e(t),r||n)return r&&n?Rg(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||!Lr(e[s],t[s]))return!1}}return String(e)===String(t)}function Li(e,t){return e.findIndex(r=>Lr(r,t))}var su=e=>!!(e&&e.__v_isRef===!0),Le=e=>ot(e)?e:e==null?"":_e(e)||Je(e)&&(e.toString===Qc||!Ie(e.toString))?su(e)?Le(e.value):JSON.stringify(e,iu,2):String(e),iu=(e,t)=>su(t)?iu(e,t.value):ds(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[Sa(n,i)+" =>"]=s,r),{})}:jn(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>Sa(r))}:yr(t)?Sa(t):Je(t)&&!_e(t)&&!Oi(t)?String(t):t,Sa=(e,t="")=>{var r;return yr(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function Ig(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var Pt,Ca=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=Pt,!e&&Pt&&(this.index=(Pt.scopes||(Pt.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=Pt;try{return Pt=this,e()}finally{Pt=t}}}on(){++this._on===1&&(this.prevScope=Pt,Pt=this)}off(){this._on>0&&--this._on===0&&(Pt=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 xa(e){return new Ca(e)}function Fi(){return Pt}function Ta(e,t=!1){Pt&&Pt.cleanups.push(e)}var at,Ea=new WeakSet,zs=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,Pt&&Pt.active&&Pt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ea.has(this)&&(Ea.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||au(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,fu(this),lu(this);const e=at,t=_r;at=this,_r=!0;try{return this.fn()}finally{cu(this),at=e,_r=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ia(e);this.deps=this.depsTail=void 0,fu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ea.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ra(this)&&this.run()}get dirty(){return Ra(this)}},ou=0,Ks,Ws;function au(e,t=!1){if(e.flags|=8,t){e.next=Ws,Ws=e;return}e.next=Ks,Ks=e}function Aa(){ou++}function ka(){if(--ou>0)return;if(Ws){let t=Ws;for(Ws=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Ks;){let t=Ks;for(Ks=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 lu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cu(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),Ia(n),$g(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function Ra(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(uu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function uu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Gs)||(e.globalVersion=Gs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ra(e))))return;e.flags|=2;const t=e.dep,r=at,n=_r;at=e,_r=!0;try{lu(e);const s=e.fn(e._value);(t.version===0||Bt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{at=r,_r=n,cu(e),e.flags&=-3}}function Ia(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)Ia(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function $g(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function Pg(e,t){e.effect instanceof zs&&(e=e.effect.fn);const r=new zs(e);t&&Xe(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function Dg(e){e.effect.stop()}var _r=!0,du=[];function Fr(){du.push(_r),_r=!1}function Vr(){const e=du.pop();_r=e===void 0?!0:e}function fu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=at;at=void 0;try{t()}finally{at=r}}}var Gs=0,Og=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}},Vi=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(!at||!_r||at===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==at)t=this.activeLink=new Og(at,this),at.deps?(t.prevDep=at.depsTail,at.depsTail.nextDep=t,at.depsTail=t):at.deps=at.depsTail=t,pu(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=at.depsTail,t.nextDep=void 0,at.depsTail.nextDep=t,at.depsTail=t,at.deps===t&&(at.deps=r)}return t}trigger(e){this.version++,Gs++,this.notify(e)}notify(e){Aa();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{ka()}}};function pu(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)pu(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var ji=new WeakMap,zn=Symbol(""),$a=Symbol(""),Js=Symbol("");function Dt(e,t,r){if(_r&&at){let n=ji.get(e);n||ji.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new Vi),s.map=n,s.key=r),s.track()}}function jr(e,t,r,n,s,i){const o=ji.get(e);if(!o){Gs++;return}const a=l=>{l&&l.trigger()};if(Aa(),t==="clear")o.forEach(a);else{const l=_e(e),u=l&&Hi(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===Js||!yr(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(Js)),t){case"add":l?u&&a(o.get("length")):(a(o.get(zn)),ds(e)&&a(o.get($a)));break;case"delete":l||(a(o.get(zn)),ds(e)&&a(o.get($a)));break;case"set":ds(e)&&a(o.get(zn));break}}ka()}function Hg(e,t){const r=ji.get(e);return r&&r.get(t)}function gs(e){const t=ze(e);return t===e?t:(Dt(t,"iterate",Js),Wt(e)?t:t.map(Sr))}function Ui(e){return Dt(e=ze(e),"iterate",Js),e}function gn(e,t){return Ir(e)?vs(Wr(e)?Sr(t):t):Sr(t)}var Mg={__proto__:null,[Symbol.iterator](){return Pa(this,Symbol.iterator,e=>gn(this,e))},concat(...e){return gs(this).concat(...e.map(t=>_e(t)?gs(t):t))},entries(){return Pa(this,"entries",e=>(e[1]=gn(this,e[1]),e))},every(e,t){return Ur(this,"every",e,t,void 0,arguments)},filter(e,t){return Ur(this,"filter",e,t,r=>r.map(n=>gn(this,n)),arguments)},find(e,t){return Ur(this,"find",e,t,r=>gn(this,r),arguments)},findIndex(e,t){return Ur(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ur(this,"findLast",e,t,r=>gn(this,r),arguments)},findLastIndex(e,t){return Ur(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ur(this,"forEach",e,t,void 0,arguments)},includes(...e){return Da(this,"includes",e)},indexOf(...e){return Da(this,"indexOf",e)},join(e){return gs(this).join(e)},lastIndexOf(...e){return Da(this,"lastIndexOf",e)},map(e,t){return Ur(this,"map",e,t,void 0,arguments)},pop(){return Ys(this,"pop")},push(...e){return Ys(this,"push",e)},reduce(e,...t){return hu(this,"reduce",e,t)},reduceRight(e,...t){return hu(this,"reduceRight",e,t)},shift(){return Ys(this,"shift")},some(e,t){return Ur(this,"some",e,t,void 0,arguments)},splice(...e){return Ys(this,"splice",e)},toReversed(){return gs(this).toReversed()},toSorted(e){return gs(this).toSorted(e)},toSpliced(...e){return gs(this).toSpliced(...e)},unshift(...e){return Ys(this,"unshift",e)},values(){return Pa(this,"values",e=>gn(this,e))}};function Pa(e,t,r){const n=Ui(e),s=n[t]();return n!==e&&!Wt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var Ng=Array.prototype;function Ur(e,t,r,n,s,i){const o=Ui(e),a=o!==e&&!Wt(e),l=o[t];if(l!==Ng[t]){const d=l.apply(e,i);return a?Sr(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,gn(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 hu(e,t,r,n){const s=Ui(e);let i=r;return s!==e&&(Wt(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,gn(e,a),l,e)}),s[t](i,...n)}function Da(e,t,r){const n=ze(e);Dt(n,"iterate",Js);const s=n[t](...r);return(s===-1||s===!1)&&Zs(r[0])?(r[0]=ze(r[0]),n[t](...r)):s}function Ys(e,t,r=[]){Fr(),Aa();const n=ze(e)[t].apply(e,r);return ka(),Vr(),n}var qg=Vs("__proto__,__v_isRef,__isVue"),gu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yr));function Bg(e){yr(e)||(e=String(e));const t=ze(this);return Dt(t,"has",e),t.hasOwnProperty(e)}var vu=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?Su:_u:s?bu:yu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=_e(e);if(!n){let a;if(i&&(a=Mg[t]))return a;if(t==="hasOwnProperty")return Bg}const o=Reflect.get(e,t,nt(e)?e:r);if((yr(t)?gu.has(t):qg(t))||(n||Dt(e,"get",t),s))return o;if(nt(o)){const a=i&&Hi(t)?o:o.value;return n&&Je(a)?Ot(a):a}return Je(o)?n?Ot(o):zr(o):o}},mu=class extends vu{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=_e(e)&&Hi(t);if(!this._isShallow){const l=Ir(s);if(!Wt(r)&&!Ir(r)&&(s=ze(s),r=ze(r)),!i&&nt(s)&&!nt(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Ze(e,t),a=Reflect.set(e,t,r,nt(e)?e:n);return e===ze(n)&&(o?Bt(r,s)&&jr(e,"set",t,r,s):jr(e,"add",t,r)),a}deleteProperty(e,t){const r=Ze(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&jr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!yr(t)||!gu.has(t))&&Dt(e,"has",t),r}ownKeys(e){return Dt(e,"iterate",_e(e)?"length":zn),Reflect.ownKeys(e)}},wu=class extends vu{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Lg=new mu,Fg=new wu,Vg=new mu(!0),jg=new wu(!0),Oa=e=>e,zi=e=>Reflect.getPrototypeOf(e);function Ug(e,t,r){return function(...n){const s=this.__v_raw,i=ze(s),o=ds(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?Oa:t?vs:Sr;return!t&&Dt(i,"iterate",l?$a:zn),Xe(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 Ki(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function zg(e,t){const r={get(n){const s=this.__v_raw,i=ze(s),o=ze(n);e||(Bt(n,o)&&Dt(i,"get",n),Dt(i,"get",o));const{has:a}=zi(i),l=t?Oa:e?vs:Sr;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&&Dt(ze(n),"iterate",zn),n.size},has(n){const s=this.__v_raw,i=ze(s),o=ze(n);return e||(Bt(n,o)&&Dt(i,"has",n),Dt(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=ze(o),l=t?Oa:e?vs:Sr;return!e&&Dt(a,"iterate",zn),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return Xe(r,e?{add:Ki("add"),set:Ki("set"),delete:Ki("delete"),clear:Ki("clear")}:{add(n){!t&&!Wt(n)&&!Ir(n)&&(n=ze(n));const s=ze(this);return zi(s).has.call(s,n)||(s.add(n),jr(s,"add",n,n)),this},set(n,s){!t&&!Wt(s)&&!Ir(s)&&(s=ze(s));const i=ze(this),{has:o,get:a}=zi(i);let l=o.call(i,n);l||(n=ze(n),l=o.call(i,n));const u=a.call(i,n);return i.set(n,s),l?Bt(s,u)&&jr(i,"set",n,s,u):jr(i,"add",n,s),this},delete(n){const s=ze(this),{has:i,get:o}=zi(s);let a=i.call(s,n);a||(n=ze(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,u=s.delete(n);return a&&jr(s,"delete",n,void 0,l),u},clear(){const n=ze(this),s=n.size!==0,i=void 0,o=n.clear();return s&&jr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=Ug(n,e,t)}),r}function Wi(e,t){const r=zg(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 Kg={get:Wi(!1,!1)},Wg={get:Wi(!1,!0)},Gg={get:Wi(!0,!1)},Jg={get:Wi(!0,!0)},yu=new WeakMap,bu=new WeakMap,_u=new WeakMap,Su=new WeakMap;function Yg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Zg(e){return e.__v_skip||!Object.isExtensible(e)?0:Yg(bg(e))}function zr(e){return Ir(e)?e:Gi(e,!1,Lg,Kg,yu)}function Cu(e){return Gi(e,!1,Vg,Wg,bu)}function Ot(e){return Gi(e,!0,Fg,Gg,_u)}function Kr(e){return Gi(e,!0,jg,Jg,Su)}function Gi(e,t,r,n,s){if(!Je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Zg(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 Wr(e){return Ir(e)?Wr(e.__v_raw):!!(e&&e.__v_isReactive)}function Ir(e){return!!(e&&e.__v_isReadonly)}function Wt(e){return!!(e&&e.__v_isShallow)}function Zs(e){return e?!!e.__v_raw:!1}function ze(e){const t=e&&e.__v_raw;return t?ze(t):e}function Ha(e){return!Ze(e,"__v_skip")&&Object.isExtensible(e)&&eu(e,"__v_skip",!0),e}var Sr=e=>Je(e)?zr(e):e,vs=e=>Je(e)?Ot(e):e;function nt(e){return e?e.__v_isRef===!0:!1}function F(e){return xu(e,!1)}function ut(e){return xu(e,!0)}function xu(e,t){return nt(e)?e:new Xg(e,t)}var Xg=class{constructor(e,t){this.dep=new Vi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ze(e),this._value=t?e:Sr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Wt(e)||Ir(e);e=r?e:ze(e),Bt(e,t)&&(this._rawValue=e,this._value=r?e:Sr(e),this.dep.trigger())}};function Tu(e){e.dep&&e.dep.trigger()}function f(e){return nt(e)?e.value:e}function Ae(e){return Ie(e)?e():f(e)}var Qg={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return nt(s)&&!nt(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Ma(e){return Wr(e)?e:new Proxy(e,Qg)}var ev=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Vi,{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 Xs(e){return new ev(e)}function Ht(e){const t=_e(e)?new Array(e.length):{};for(const r in e)t[r]=Eu(e,r);return t}var tv=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=ze(e);let n=!0,s=e;if(!_e(e)||!Hi(String(t)))do n=!Zs(s)||Wt(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&&nt(this._raw[this._key])){const t=this._object[this._key];if(nt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Hg(this._raw,this._key)}},rv=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 Na(e,t,r){return nt(e)?e:Ie(e)?new rv(e):Je(e)&&arguments.length>1?Eu(e,t,r):F(e)}function Eu(e,t,r){return new tv(e,t,r)}var nv=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Vi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Gs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&at!==this)return au(this,!0),!0}get value(){const e=this.dep.track();return uu(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function sv(e,t,r=!1){let n,s;return Ie(e)?n=e:(n=e.get,s=e.set),new nv(n,s,r)}var iv={GET:"get",HAS:"has",ITERATE:"iterate"},ov={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Ji={},Yi=new WeakMap,vn=void 0;function av(){return vn}function Au(e,t=!1,r=vn){if(r){let n=Yi.get(r);n||Yi.set(r,n=[]),n.push(e)}}function lv(e,t,r=Ue){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=C=>s?C:Wt(C)||s===!1||s===0?Gr(C,1):Gr(C);let c,d,p,h,m=!1,y=!1;if(nt(e)?(d=()=>e.value,m=Wt(e)):Wr(e)?(d=()=>u(e),m=!0):_e(e)?(y=!0,m=e.some(C=>Wr(C)||Wt(C)),d=()=>e.map(C=>{if(nt(C))return C.value;if(Wr(C))return u(C);if(Ie(C))return l?l(C,2):C()})):Ie(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Fr();try{p()}finally{Vr()}}const C=vn;vn=c;try{return l?l(e,3,[h]):e(h)}finally{vn=C}}:d=or,t&&s){const C=d,E=s===!0?1/0:s;d=()=>Gr(C(),E)}const T=Fi(),v=()=>{c.stop(),T&&T.active&&ba(T.effects,c)};if(i&&t){const C=t;t=(...E)=>{C(...E),v()}}let x=y?new Array(e.length).fill(Ji):Ji;const b=C=>{if(!(!(c.flags&1)||!c.dirty&&!C))if(t){const E=c.run();if(s||m||(y?E.some((I,M)=>Bt(I,x[M])):Bt(E,x))){p&&p();const I=vn;vn=c;try{const M=[E,x===Ji?void 0:y&&x[0]===Ji?[]:x,h];x=E,l?l(t,3,M):t(...M)}finally{vn=I}}}else c.run()};return a&&a(b),c=new zs(d),c.scheduler=o?()=>o(b,!1):b,h=C=>Au(C,!1,c),p=c.onStop=()=>{const C=Yi.get(c);if(C){if(l)l(C,4);else for(const E of C)E();Yi.delete(c)}},t?n?b(!0):x=c.run():o?o(b.bind(null,!0),!0):c.run(),v.pause=c.pause.bind(c),v.resume=c.resume.bind(c),v.stop=v,v}function Gr(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--,nt(e))Gr(e.value,t,r);else if(_e(e))for(let n=0;n<e.length;n++)Gr(e[n],t,r);else if(jn(e)||ds(e))e.forEach(n=>{Gr(n,t,r)});else if(Oi(e)){for(const n in e)Gr(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Gr(e[n],t,r)}return e}var ku=[];function cv(e){ku.push(e)}function uv(){ku.pop()}function dv(e,t){}var fv={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"},pv={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 ms(e,t,r,n){try{return n?e(...n):e()}catch(s){Kn(s,t,r)}}function ar(e,t,r,n){if(Ie(e)){const s=ms(e,t,r,n);return s&&_a(s)&&s.catch(i=>{Kn(i,t,r)}),s}if(_e(e)){const s=[];for(let i=0;i<e.length;i++)s.push(ar(e[i],t,r,n));return s}}function Kn(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ue;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){Fr(),ms(i,null,10,[e,l,u]),Vr();return}}hv(e,r,s,n,o)}function hv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Lt=[],$r=-1,ws=[],mn=null,ys=0,Ru=Promise.resolve(),Zi=null;function Tt(e){const t=Zi||Ru;return e?t.then(this?e.bind(this):e):t}function gv(e){let t=$r+1,r=Lt.length;for(;t<r;){const n=t+r>>>1,s=Lt[n],i=ei(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function qa(e){if(!(e.flags&1)){const t=ei(e),r=Lt[Lt.length-1];!r||!(e.flags&2)&&t>=ei(r)?Lt.push(e):Lt.splice(gv(t),0,e),e.flags|=1,Iu()}}function Iu(){Zi||(Zi=Ru.then(Pu))}function Qs(e){_e(e)?ws.push(...e):mn&&e.id===-1?mn.splice(ys+1,0,e):e.flags&1||(ws.push(e),e.flags|=1),Iu()}function $u(e,t,r=$r+1){for(;r<Lt.length;r++){const n=Lt[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Lt.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Xi(e){if(ws.length){const t=[...new Set(ws)].sort((r,n)=>ei(r)-ei(n));if(ws.length=0,mn){mn.push(...t);return}for(mn=t,ys=0;ys<mn.length;ys++){const r=mn[ys];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}mn=null,ys=0}}var ei=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pu(e){try{for($r=0;$r<Lt.length;$r++){const t=Lt[$r];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ms(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;$r<Lt.length;$r++){const t=Lt[$r];t&&(t.flags&=-2)}$r=-1,Lt.length=0,Xi(e),Zi=null,(Lt.length||ws.length)&&Pu(e)}}var bs,Qi=[];function Du(e,t){var r,n;bs=e,bs?(bs.enabled=!0,Qi.forEach(({event:s,args:i})=>bs.emit(s,...i)),Qi=[]):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=>{Du(s,t)}),setTimeout(()=>{bs||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Qi=[])},3e3)):Qi=[]}var Rt=null,eo=null;function ti(e){const t=Rt;return Rt=e,eo=e&&e.type.__scopeId||null,t}function vv(e){eo=e}function mv(){eo=null}var wv=e=>k;function k(e,t=Rt,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&hi(-1);const i=ti(t);let o;try{o=e(...s)}finally{ti(i),n._d&&hi(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function to(e,t){if(Rt===null)return e;const r=gi(Rt),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Ue]=t[s];i&&(Ie(i)&&(i={mounted:i,updated:i}),i.deep&&Gr(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Pr(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&&(Fr(),ar(l,r,8,[e.el,a,e,t]),Vr())}}function Wn(e,t){if(It){let r=It.provides;const n=It.parent&&It.parent.provides;n===r&&(r=It.provides=Object.create(n)),r[e]=t}}function Ft(e,t,r=!1){const n=ht();if(n||Gn){let s=Gn?Gn._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&&Ie(t)?t.call(n&&n.proxy):t}}function yv(){return!!(ht()||Gn)}var Ou=Symbol.for("v-scx"),Hu=()=>{{const e=Ft(Ou);return e}};function lt(e,t){return ri(e,null,t)}function Ba(e,t){return ri(e,null,{flush:"post"})}function Mu(e,t){return ri(e,null,{flush:"sync"})}function Oe(e,t,r){return ri(e,t,r)}function ri(e,t,r=Ue){const{immediate:n,deep:s,flush:i,once:o}=r,a=Xe({},r),l=t&&n||!t&&i!=="post";let u;if(As){if(i==="sync"){const h=Hu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=or,h.resume=or,h.pause=or,h}}const c=It;a.call=(h,m,y)=>ar(h,c,m,y);let d=!1;i==="post"?a.scheduler=h=>{vt(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():qa(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=lv(e,t,a);return As&&(u?u.push(p):l&&p()),p}function bv(e,t,r){const n=this.proxy,s=ot(e)?e.includes(".")?Nu(n,e):()=>n[e]:e.bind(n,n);let i;Ie(t)?i=t:(i=t.handler,r=t);const o=Xn(this),a=ri(s,i.bind(n),r);return o(),a}function Nu(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 qu=Symbol("_vte"),Bu=e=>e.__isTeleport,ni=e=>e&&(e.disabled||e.disabled===""),Lu=e=>e&&(e.defer||e.defer===""),Fu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Vu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,La=(e,t)=>{const r=e&&e.to;return ot(r)?t?t(r):null:r},ju={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:y,createComment:T}}=u,v=ni(t.props);let{shapeFlag:x,children:b,dynamicChildren:C}=t;if(e==null){const E=t.el=y(""),I=t.anchor=y("");h(E,r,n),h(I,r,n);const M=(H,N)=>{x&16&&c(b,H,N,s,i,o,a,l)},g=()=>{const H=t.target=La(t.props,m),N=Va(H,t,y,h);H&&(o!=="svg"&&Fu(H)?o="svg":o!=="mathml"&&Vu(H)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(H),v||(M(H,N),no(t,!1)))};v&&(M(r,I),no(t,!0)),Lu(t.props)?(t.el.__isMounted=!1,vt(()=>{g(),delete t.el.__isMounted},i)):g()}else{if(Lu(t.props)&&e.el.__isMounted===!1){vt(()=>{ju.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const E=t.anchor=e.anchor,I=t.target=e.target,M=t.targetAnchor=e.targetAnchor,g=ni(e.props),H=g?r:I,N=g?E:M;if(o==="svg"||Fu(I)?o="svg":(o==="mathml"||Vu(I))&&(o="mathml"),C?(p(e.dynamicChildren,C,H,s,i,o,a),ll(e,t,!0)):l||d(e,t,H,N,s,i,o,a,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):ro(t,r,E,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const _=t.target=La(t.props,m);_&&ro(t,_,null,u,0)}else g&&ro(t,I,M,u,1);no(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||!ni(p);for(let m=0;m<a.length;m++){const y=a[m];n(y,t,r,h,!!y.dynamicChildren)}}},move:ro,hydrate:_v};function ro(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||ni(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function _v(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(T,v){let x=v;for(;x;){if(x&&x.nodeType===8){if(x.data==="teleport start anchor")t.targetStart=x;else if(x.data==="teleport anchor"){t.targetAnchor=x,T._lpa=t.targetAnchor&&o(t.targetAnchor);break}}x=o(x)}}function h(T,v){v.anchor=d(o(T),v,a(T),r,n,s,i)}const m=t.target=La(t.props,l),y=ni(t.props);if(m){const T=m._lpa||m.firstChild;t.shapeFlag&16&&(y?(h(e,t),p(m,T),t.targetAnchor||Va(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,T),t.targetAnchor||Va(m,t,c,u),d(T&&o(T),t,m,r,n,s,i))),no(t,y)}else y&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var Fa=ju;function no(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 Va(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[qu]=o,e&&(n(i,e,s),n(o,e,s)),o}var Dr=Symbol("_leaveCb"),si=Symbol("_enterCb");function ja(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Qe(()=>{e.isMounted=!0}),Ts(()=>{e.isUnmounting=!0}),e}var lr=[Function,Array],Ua={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:lr,onEnter:lr,onAfterEnter:lr,onEnterCancelled:lr,onBeforeLeave:lr,onLeave:lr,onAfterLeave:lr,onLeaveCancelled:lr,onBeforeAppear:lr,onAppear:lr,onAfterAppear:lr,onAppearCancelled:lr},Uu=e=>{const t=e.subTree;return t.component?Uu(t.component):t},Sv={name:"BaseTransition",props:Ua,setup(e,{slots:t}){const r=ht(),n=ja();return()=>{const s=t.default&&so(t.default(),!0);if(!s||!s.length)return;const i=zu(s),o=ze(e),{mode:a}=o;if(n.isLeaving)return za(i);const l=Gu(i);if(!l)return za(i);let u=_s(l,o,n,r,d=>u=d);l.type!==pt&&Jr(l,u);let c=r.subTree&&Gu(r.subTree);if(c&&c.type!==pt&&!Cr(c,l)&&Uu(r).type!==pt){let d=_s(c,o,n,r);if(Jr(c,d),a==="out-in"&&l.type!==pt)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,c=void 0},za(i);a==="in-out"&&l.type!==pt?d.delayLeave=(p,h,m)=>{const y=Wu(n,c);y[String(c.key)]=c,p[Dr]=()=>{h(),p[Dr]=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 zu(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==pt){t=r;break}}return t}var Ku=Sv;function Wu(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 _s(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:y,onBeforeAppear:T,onAppear:v,onAfterAppear:x,onAppearCancelled:b}=t,C=String(e.key),E=Wu(r,e),I=(H,N)=>{H&&ar(H,n,9,N)},M=(H,N)=>{const _=N[1];I(H,N),_e(H)?H.every(w=>w.length<=1)&&_():H.length<=1&&_()},g={mode:o,persisted:a,beforeEnter(H){let N=l;if(!r.isMounted)if(i)N=T||l;else return;H[Dr]&&H[Dr](!0);const _=E[C];_&&Cr(e,_)&&_.el[Dr]&&_.el[Dr](),I(N,[H])},enter(H){if(E[C]===e)return;let N=u,_=c,w=d;if(!r.isMounted)if(i)N=v||u,_=x||c,w=b||d;else return;let S=!1;H[si]=q=>{S||(S=!0,q?I(w,[H]):I(_,[H]),g.delayedLeave&&g.delayedLeave(),H[si]=void 0)};const O=H[si].bind(null,!1);N?M(N,[H,O]):O()},leave(H,N){const _=String(e.key);if(H[si]&&H[si](!0),r.isUnmounting)return N();I(p,[H]);let w=!1;H[Dr]=O=>{w||(w=!0,N(),O?I(y,[H]):I(m,[H]),H[Dr]=void 0,E[_]===e&&delete E[_])};const S=H[Dr].bind(null,!1);E[_]=e,h?M(h,[H,S]):S()},clone(H){const N=_s(H,t,r,n,s);return s&&s(N),N}};return g}function za(e){if(ii(e))return e=xr(e),e.children=null,e}function Gu(e){if(!ii(e))return Bu(e.type)&&e.children?zu(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&&Ie(r.default))return r.default()}}function Jr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Jr(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 so(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===Ke?(o.patchFlag&128&&s++,n=n.concat(so(o.children,t,a))):(t||o.type!==pt)&&n.push(a!=null?xr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function X(e,t){return Ie(e)?Xe({name:e.name},t,{setup:e}):e}function Ju(){const e=ht();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Ka(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Cv(e){const t=ht(),r=ut(null);if(t){const n=t.refs===Ue?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}function Yu(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var io=new WeakMap;function Ss(e,t,r,n,s=!1){if(_e(e)){e.forEach((y,T)=>Ss(y,t&&(_e(t)?t[T]:t),r,n,s));return}if(Yr(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Ss(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?gi(n.component):n.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Ue?a.refs={}:a.refs,d=a.setupState,p=ze(d),h=d===Ue?Zc:y=>Yu(c,y)?!1:Ze(p,y),m=(y,T)=>!(T&&Yu(c,T));if(u!=null&&u!==l){if(Zu(t),ot(u))c[u]=null,h(u)&&(d[u]=null);else if(nt(u)){const y=t;m(u,y.k)&&(u.value=null),y.k&&(c[y.k]=null)}}if(Ie(l))ms(l,a,12,[o,c]);else{const y=ot(l),T=nt(l);if(y||T){const v=()=>{if(e.f){const x=y?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)_e(x)&&ba(x,i);else if(_e(x))x.includes(i)||x.push(i);else if(y)c[l]=[i],h(l)&&(d[l]=c[l]);else{const b=[i];m(l,e.k)&&(l.value=b),e.k&&(c[e.k]=b)}}else y?(c[l]=o,h(l)&&(d[l]=o)):T&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const x=()=>{v(),io.delete(e)};x.id=-1,io.set(e,x),vt(x,r)}else Zu(e),v()}}}function Zu(e){const t=io.get(e);t&&(t.flags|=8,io.delete(e))}var Xu=!1,Cs=()=>{Xu||(console.error("Hydration completed but contains mismatches."),Xu=!0)},xv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Tv=e=>e.namespaceURI.includes("MathML"),oo=e=>{if(e.nodeType===1){if(xv(e))return"svg";if(Tv(e))return"mathml"}},xs=e=>e.nodeType===8;function Ev(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(b,C)=>{if(!C.hasChildNodes()){r(null,b,C),Xi(),C._vnode=b;return}d(C.firstChild,b,null,null,null),Xi(),C._vnode=b},d=(b,C,E,I,M,g=!1)=>{g=g||!!C.dynamicChildren;const H=xs(b)&&b.data==="[",N=()=>y(b,C,E,I,M,H),{type:_,ref:w,shapeFlag:S,patchFlag:O}=C;let q=b.nodeType;C.el=b,O===-2&&(g=!1,C.dynamicChildren=null);let B=null;switch(_){case wn:q!==3?C.children===""?(l(C.el=s(""),o(b),b),B=b):B=N():(b.data!==C.children&&(Cs(),b.data=C.children),B=i(b));break;case pt:x(b)?(B=i(b),v(C.el=b.content.firstChild,b,E)):q!==8||H?B=N():B=i(b);break;case Yn:if(H&&(b=i(b),q=b.nodeType),q===1||q===3){B=b;const Z=!C.children.length;for(let W=0;W<C.staticCount;W++)Z&&(C.children+=B.nodeType===1?B.outerHTML:B.data),W===C.staticCount-1&&(C.anchor=B),B=i(B);return H?i(B):B}else N();break;case Ke:H?B=m(b,C,E,I,M,g):B=N();break;default:if(S&1)(q!==1||C.type.toLowerCase()!==b.tagName.toLowerCase())&&!x(b)?B=N():B=p(b,C,E,I,M,g);else if(S&6){C.slotScopeIds=M;const Z=o(b);if(H?B=T(b):xs(b)&&b.data==="teleport start"?B=T(b,b.data,"teleport end"):B=i(b),t(C,Z,null,E,I,oo(Z),g),Yr(C)&&!C.type.__asyncResolved){let W;H?(W=D(Ke),W.anchor=B?B.previousSibling:Z.lastChild):W=b.nodeType===3?qe(""):D("div"),W.el=b,C.component.subTree=W}}else S&64?q!==8?B=N():B=C.type.hydrate(b,C,E,I,M,g,e,h):S&128&&(B=C.type.hydrate(b,C,E,I,oo(o(b)),M,g,e,d))}return w!=null&&Ss(w,null,I,C),B},p=(b,C,E,I,M,g)=>{g=g||!!C.dynamicChildren;const{type:H,props:N,patchFlag:_,shapeFlag:w,dirs:S,transition:O}=C,q=H==="input"||H==="option";if(q||_!==-1){S&&Pr(C,null,E,"created");let B=!1;if(x(b)){B=Od(null,O)&&E&&E.vnode.props&&E.vnode.props.appear;const W=b.content.firstChild;if(B){const le=W.getAttribute("class");le&&(W.$cls=le),O.beforeEnter(W)}v(W,b,E),C.el=b=W}if(w&16&&!(N&&(N.innerHTML||N.textContent))){let W=h(b.firstChild,C,b,E,I,M,g);for(;W;){ao(b,1)||Cs();const le=W;W=W.nextSibling,a(le)}}else if(w&8){let W=C.children;W[0]===`
|
|
4
|
-
`&&(
|
|
5
|
-
`)&&(ao(b,0)||Cs(),b.textContent=C.children)}if(N){if(q||!g||_&48){const W=b.tagName.includes("-");for(const le in N)(q&&(le.endsWith("value")||le==="indeterminate")||js(le)&&!Un(le)||le[0]==="."||W&&!Un(le))&&n(b,le,null,N[le],void 0,E)}else if(N.onClick)n(b,"onClick",null,N.onClick,void 0,E);else if(_&4&&Wr(N.style))for(const W in N.style)N.style[W]}let Z;(Z=N&&N.onVnodeBeforeMount)&&Jt(Z,E,C),S&&Pr(C,null,E,"beforeMount"),((Z=N&&N.onVnodeMounted)||S||B)&&Bd(()=>{Z&&Jt(Z,E,C),B&&O.enter(b),S&&Pr(C,null,E,"mounted")},I)}return b.nextSibling},h=(b,C,E,I,M,g,H)=>{H=H||!!C.dynamicChildren;const N=C.children,_=N.length;for(let w=0;w<_;w++){const S=H?N[w]:N[w]=Gt(N[w]),O=S.type===wn;b?(O&&!H&&w+1<_&&Gt(N[w+1]).type===wn&&(l(s(b.data.slice(S.children.length)),E,i(b)),b.data=S.children),b=d(b,S,I,M,g,H)):O&&!S.children?l(S.el=s(""),E):(ao(E,1)||Cs(),r(null,S,E,null,I,M,oo(E),g))}return b},m=(b,C,E,I,M,g)=>{const{slotScopeIds:H}=C;H&&(M=M?M.concat(H):H);const N=o(b),_=h(i(b),C,N,E,I,M,g);return _&&xs(_)&&_.data==="]"?i(C.anchor=_):(Cs(),l(C.anchor=u("]"),N,_),_)},y=(b,C,E,I,M,g)=>{if(ao(b.parentElement,1)||Cs(),C.el=null,g){const _=T(b);for(;;){const w=i(b);if(w&&w!==_)a(w);else break}}const H=i(b),N=o(b);return a(b),r(null,C,N,H,E,I,oo(N),M),E&&(E.vnode.el=C.el,go(E,C.el)),H},T=(b,C="[",E="]")=>{let I=0;for(;b;)if(b=i(b),b&&xs(b)&&(b.data===C&&I++,b.data===E)){if(I===0)return i(b);I--}return b},v=(b,C,E)=>{const I=C.parentNode;I&&I.replaceChild(b,C);let M=E;for(;M;)M.vnode.el===C&&(M.vnode.el=M.subTree.el=b),M=M.parent},x=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[c,d]}var Qu="data-allow-mismatch",Av={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function ao(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Qu);)e=e.parentElement;const r=e&&e.getAttribute(Qu);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(Av[t])}}var kv=Bi().requestIdleCallback||(e=>setTimeout(e,1)),Rv=Bi().cancelIdleCallback||(e=>clearTimeout(e)),Iv=(e=1e4)=>t=>{const r=kv(t,{timeout:e});return()=>Rv(r)};function $v(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 Pv=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($v(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},Dv=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},Ov=(e=[])=>(t,r)=>{ot(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 Hv(e,t){if(xs(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(xs(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var Yr=e=>!!e.type.__asyncLoader;function Mv(e){Ie(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(y=>{if(y=y instanceof Error?y:new Error(String(y)),l)return new Promise((T,v)=>{l(y,()=>T(p()),()=>v(y),d+1)});throw y}).then(y=>m!==u&&u?u:(y&&(y.__esModule||y[Symbol.toStringTag]==="Module")&&(y=y.default),c=y,y)))};return X({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,y,T){let v=!1;(y.bu||(y.bu=[])).push(()=>v=!0);const x=()=>{v||T()},b=i?()=>{const C=i(x,E=>Hv(m,E));C&&(y.bum||(y.bum=[])).push(C)}:x;c?b():h().then(()=>!y.isUnmounted&&b())},get __asyncResolved(){return c},setup(){const m=It;if(Ka(m),c)return()=>lo(c,m);const y=b=>{u=null,Kn(b,m,13,!n)};if(a&&m.suspense||As)return h().then(b=>()=>lo(b,m)).catch(b=>(y(b),()=>n?D(n,{error:b}):null));const T=F(!1),v=F(),x=F(!!s);return s&&setTimeout(()=>{x.value=!1},s),o!=null&&setTimeout(()=>{if(!T.value&&!v.value){const b=new Error(`Async component timed out after ${o}ms.`);y(b),v.value=b}},o),h().then(()=>{T.value=!0,m.parent&&ii(m.parent.vnode)&&m.parent.update()}).catch(b=>{y(b),v.value=b}),()=>{if(T.value&&c)return lo(c,m);if(v.value&&n)return D(n,{error:v.value});if(r&&!x.value)return lo(r,m)}}})}function lo(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=D(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var ii=e=>e.type.__isKeepAlive,Nv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=ht(),n=r.ctx;if(!n.renderer)return()=>{const x=t.default&&t.default();return x&&x.length===1?x[0]:x};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=(x,b,C,E,I)=>{const M=x.component;u(x,b,C,0,a),l(M.vnode,x,b,C,M,a,E,x.slotScopeIds,I),vt(()=>{M.isDeactivated=!1,M.a&&hs(M.a);const g=x.props&&x.props.onVnodeMounted;g&&Jt(g,M.parent,x)},a)},n.deactivate=x=>{const b=x.component;vo(b.m),vo(b.a),u(x,p,null,1,a),vt(()=>{b.da&&hs(b.da);const C=x.props&&x.props.onVnodeUnmounted;C&&Jt(C,b.parent,x),b.isDeactivated=!0},a)};function h(x){Wa(x),c(x,r,a,!0)}function m(x){s.forEach((b,C)=>{const E=gl(Yr(b)?b.type.__asyncResolved||{}:b.type);E&&!x(E)&&y(C)})}function y(x){const b=s.get(x);b&&(!o||!Cr(b,o))?h(b):o&&Wa(o),s.delete(x),i.delete(x)}Oe(()=>[e.include,e.exclude],([x,b])=>{x&&m(C=>oi(x,C)),b&&m(C=>!oi(b,C))},{flush:"post",deep:!0});let T=null;const v=()=>{T!=null&&(mo(r.subTree.type)?vt(()=>{s.set(T,co(r.subTree))},r.subTree.suspense):s.set(T,co(r.subTree)))};return Qe(v),ai(v),Ts(()=>{s.forEach(x=>{const{subTree:b,suspense:C}=r,E=co(b);if(x.type===E.type&&x.key===E.key){Wa(E);const I=E.component.da;I&&vt(I,C);return}h(x)})}),()=>{if(T=null,!t.default)return o=null;const x=t.default(),b=x[0];if(x.length>1)return o=null,x;if(!Xr(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return o=null,b;let C=co(b);if(C.type===pt)return o=null,C;const E=C.type,I=gl(Yr(C)?C.type.__asyncResolved||{}:E),{include:M,exclude:g,max:H}=e;if(M&&(!I||!oi(M,I))||g&&I&&oi(g,I))return C.shapeFlag&=-257,o=C,b;const N=C.key==null?E:C.key,_=s.get(N);return C.el&&(C=xr(C),b.shapeFlag&128&&(b.ssContent=C)),T=N,_?(C.el=_.el,C.component=_.component,C.transition&&Jr(C,C.transition),C.shapeFlag|=512,i.delete(N),i.add(N)):(i.add(N),H&&i.size>parseInt(H,10)&&y(i.values().next().value)),C.shapeFlag|=256,o=C,mo(b.type)?b:C}}};function oi(e,t){return _e(e)?e.some(r=>oi(r,t)):ot(e)?e.split(",").includes(t):yg(e)?(e.lastIndex=0,e.test(t)):!1}function ed(e,t){rd(e,"a",t)}function td(e,t){rd(e,"da",t)}function rd(e,t,r=It){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(uo(t,n,r),r){let s=r.parent;for(;s&&s.parent;)ii(s.parent.vnode)&&qv(n,t,r,s),s=s.parent}}function qv(e,t,r,n){const s=uo(t,e,n,!0);Vt(()=>{ba(n[t],s)},r)}function Wa(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function co(e){return e.shapeFlag&128?e.ssContent:e}function uo(e,t,r=It,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Fr();const a=Xn(r),l=ar(t,r,e,o);return a(),Vr(),l});return n?s.unshift(i):s.push(i),i}}var Zr=e=>(t,r=It)=>{(!As||e==="sp")&&uo(e,(...n)=>t(...n),r)},nd=Zr("bm"),Qe=Zr("m"),Ga=Zr("bu"),ai=Zr("u"),Ts=Zr("bum"),Vt=Zr("um"),sd=Zr("sp"),id=Zr("rtg"),od=Zr("rtc");function ad(e,t=It){uo("ec",e,t)}var Ja="components",Bv="directives";function Lv(e,t){return Ya(Ja,e,!0,t)||e}var ld=Symbol.for("v-ndc");function li(e){return ot(e)?Ya(Ja,e,!1)||e:e||ld}function Fv(e){return Ya(Bv,e)}function Ya(e,t,r=!0,n=!1){const s=Rt||It;if(s){const i=s.type;if(e===Ja){const a=gl(i,!1);if(a&&(a===t||a===bt(t)||a===Us(bt(t))))return i}const o=cd(s[e]||i[e],t)||cd(s.appContext[e],t);return!o&&n?i:o}}function cd(e,t){return e&&(e[t]||e[bt(t)]||e[Us(bt(t))])}function cr(e,t,r,n){let s;const i=r&&r[n],o=_e(e);if(o||ot(e)){const a=o&&Wr(e);let l=!1,u=!1;a&&(l=!Wt(e),u=Ir(e),e=Ui(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?vs(Sr(e[c])):Sr(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 Vv(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(_e(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 se(e,t,r={},n,s){if(Rt.ce||Rt.parent&&Yr(Rt.parent)&&Rt.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),R(),K(Ke,null,[D("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),R();const o=i&&Za(i(r)),a=r.key||o&&o.key,l=K(Ke,{key:(a&&!yr(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 Za(e){return e.some(t=>Xr(t)?!(t.type===pt||t.type===Ke&&!Za(t.children)):!0)?e:null}function ud(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:ps(n)]=e[n];return r}var Xa=e=>e?Ud(e)?gi(e):Xa(e.parent):null,ci=Xe(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=>Xa(e.parent),$root:e=>Xa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>rl(e),$forceUpdate:e=>e.f||(e.f=()=>{qa(e.update)}),$nextTick:e=>e.n||(e.n=Tt.bind(e.proxy)),$watch:e=>bv.bind(e)}),Qa=(e,t)=>e!==Ue&&!e.__isScriptSetup&&Ze(e,t),el={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!==Ue&&Ze(s,t))return o[t]=2,s[t];if(Ze(i,t))return o[t]=3,i[t];if(r!==Ue&&Ze(r,t))return o[t]=4,r[t];tl&&(o[t]=0)}}const u=ci[t];let c,d;if(u)return t==="$attrs"&&Dt(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==Ue&&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!==Ue&&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!==Ue&&a[0]!=="$"&&Ze(e,a)||Qa(t,a)||Ze(i,a)||Ze(n,a)||Ze(ci,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)}},jv=Xe({},el,{get(e,t){if(t!==Symbol.unscopables)return el.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Cg(t)}});function Uv(){return null}function zv(){return null}function Kv(e){}function Wv(e){}function Gv(){return null}function Jv(){}function Yv(e,t){return null}function Zv(){return dd("useSlots").slots}function Xv(){return dd("useAttrs").attrs}function dd(e){const t=ht();return t.setupContext||(t.setupContext=Wd(t))}function ui(e){return _e(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function fd(e,t){const r=ui(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?_e(s)||Ie(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 Qv(e,t){return!e||!t?e||t:_e(e)&&_e(t)?e.concat(t):Xe({},ui(e),ui(t))}function em(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function tm(e){const t=ht();let r=e();bo();const n=()=>{ht()!==t&&t.scope.off(),bo()};return _a(r)&&(r=r.catch(s=>{throw Xn(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{Xn(t),Promise.resolve().then(n)}]}var tl=!0;function rm(e){const t=rl(e),r=e.proxy,n=e.ctx;tl=!1,t.beforeCreate&&pd(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:y,deactivated:T,beforeDestroy:v,beforeUnmount:x,destroyed:b,unmounted:C,render:E,renderTracked:I,renderTriggered:M,errorCaptured:g,serverPrefetch:H,expose:N,inheritAttrs:_,components:w,directives:S,filters:O}=t;if(u&&nm(u,n,null),o)for(const Z in o){const W=o[Z];Ie(W)&&(n[Z]=W.bind(r))}if(s){const Z=s.call(r,r);Je(Z)&&(e.data=zr(Z))}if(tl=!0,i)for(const Z in i){const W=i[Z],le=j({get:Ie(W)?W.bind(r,r):Ie(W.get)?W.get.bind(r,r):or,set:!Ie(W)&&Ie(W.set)?W.set.bind(r):or});Object.defineProperty(n,Z,{enumerable:!0,configurable:!0,get:()=>le.value,set:G=>le.value=G})}if(a)for(const Z in a)hd(a[Z],n,r,Z);if(l){const Z=Ie(l)?l.call(r):l;Reflect.ownKeys(Z).forEach(W=>{Wn(W,Z[W])})}c&&pd(c,e,"c");function B(Z,W){_e(W)?W.forEach(le=>Z(le.bind(r))):W&&Z(W.bind(r))}if(B(nd,d),B(Qe,p),B(Ga,h),B(ai,m),B(ed,y),B(td,T),B(ad,g),B(od,I),B(id,M),B(Ts,x),B(Vt,C),B(sd,H),_e(N))if(N.length){const Z=e.exposed||(e.exposed={});N.forEach(W=>{Object.defineProperty(Z,W,{get:()=>r[W],set:le=>r[W]=le,enumerable:!0})})}else e.exposed||(e.exposed={});E&&e.render===or&&(e.render=E),_!=null&&(e.inheritAttrs=_),w&&(e.components=w),S&&(e.directives=S),H&&Ka(e)}function nm(e,t,r=or){_e(e)&&(e=nl(e));for(const n in e){const s=e[n];let i;Je(s)?"default"in s?i=Ft(s.from||n,s.default,!0):i=Ft(s.from||n):i=Ft(s),nt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function pd(e,t,r){ar(_e(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function hd(e,t,r,n){let s=n.includes(".")?Nu(r,n):()=>r[n];if(ot(e)){const i=t[e];Ie(i)&&Oe(s,i)}else if(Ie(e))Oe(s,e.bind(r));else if(Je(e))if(_e(e))e.forEach(i=>hd(i,t,r,n));else{const i=Ie(e.handler)?e.handler.bind(r):t[e.handler];Ie(i)&&Oe(s,i,e)}}function rl(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=>fo(l,u,o,!0)),fo(l,t,o)),Je(t)&&i.set(t,l),l}function fo(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&fo(e,i,r,!0),s&&s.forEach(o=>fo(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=sm[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var sm={data:gd,props:vd,emits:vd,methods:di,computed:di,beforeCreate:jt,created:jt,beforeMount:jt,mounted:jt,beforeUpdate:jt,updated:jt,beforeDestroy:jt,beforeUnmount:jt,destroyed:jt,unmounted:jt,activated:jt,deactivated:jt,errorCaptured:jt,serverPrefetch:jt,components:di,directives:di,watch:om,provide:gd,inject:im};function gd(e,t){return t?e?function(){return Xe(Ie(e)?e.call(this,this):e,Ie(t)?t.call(this,this):t)}:t:e}function im(e,t){return di(nl(e),nl(t))}function nl(e){if(_e(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function jt(e,t){return e?[...new Set([].concat(e,t))]:t}function di(e,t){return e?Xe(Object.create(null),e,t):t}function vd(e,t){return e?_e(e)&&_e(t)?[...new Set([...e,...t])]:Xe(Object.create(null),ui(e),ui(t??{})):t}function om(e,t){if(!e)return t;if(!t)return e;const r=Xe(Object.create(null),e);for(const n in t)r[n]=jt(e[n],t[n]);return r}function md(){return{app:null,config:{isNativeTag:Zc,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 am=0;function lm(e,t){return function(n,s=null){Ie(n)||(n=Xe({},n)),s!=null&&!Je(s)&&(s=null);const i=md(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:am++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:Jd,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Ie(c.install)?(o.add(c),c.install(u,...d)):Ie(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||D(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,gi(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(ar(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=Gn;Gn=u;try{return c()}finally{Gn=d}}};return u}}var Gn=null;function cm(e,t,r=Ue){const n=ht(),s=bt(t),i=Kt(t),o=wd(e,s),a=Xs((l,u)=>{let c,d=Ue,p;return Mu(()=>{const h=e[s];Bt(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(!Bt(m,c)&&!(d!==Ue&&Bt(h,d)))return;const y=n.vnode.props;y&&(t in y||s in y||i in y)&&(`onUpdate:${t}`in y||`onUpdate:${s}`in y||`onUpdate:${i}`in y)||(c=h,u()),n.emit(`update:${t}`,m),Bt(h,m)&&Bt(h,d)&&!Bt(m,p)&&u(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||Ue:a,done:!1}:{done:!0}}}},a}var wd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${bt(t)}Modifiers`]||e[`${Kt(t)}Modifiers`];function um(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||Ue;let s=r;const i=t.startsWith("update:"),o=i&&wd(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>ot(c)?c.trim():c)),o.number&&(s=r.map(Ni)));let a,l=n[a=ps(t)]||n[a=ps(bt(t))];!l&&i&&(l=n[a=ps(Kt(t))]),l&&ar(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,ar(u,e,6,s)}}var dm=new WeakMap;function yd(e,t,r=!1){const n=r?dm:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Ie(e)){const l=u=>{const c=yd(u,t,!0);c&&(a=!0,Xe(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):(_e(i)?i.forEach(l=>o[l]=null):Xe(o,i),Je(e)&&n.set(e,o),o)}function po(e,t){return!e||!js(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ze(e,t[0].toLowerCase()+t.slice(1))||Ze(e,Kt(t))||Ze(e,t))}function ho(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:y}=e,T=ti(e);let v,x;try{if(r.shapeFlag&4){const C=s||n,E=C;v=Gt(u.call(E,C,c,d,h,p,m)),x=a}else{const C=t;v=Gt(C.length>1?C(d,{attrs:a,slots:o,emit:l}):C(d,null)),x=t.props?a:pm(a)}}catch(C){pi.length=0,Kn(C,e,1),v=D(pt)}let b=v;if(x&&y!==!1){const C=Object.keys(x),{shapeFlag:E}=b;C.length&&E&7&&(i&&C.some(ya)&&(x=hm(x,i)),b=xr(b,x,!1,!0))}return r.dirs&&(b=xr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&Jr(b,r.transition),v=b,ti(T),v}function fm(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(Xr(s)){if(s.type!==pt||s.children==="v-if"){if(r)return;r=s}}else return}return r}var pm=e=>{let t;for(const r in e)(r==="class"||r==="style"||js(r))&&((t||(t={}))[r]=e[r]);return t},hm=(e,t)=>{const r={};for(const n in e)(!ya(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function gm(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?bd(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(_d(o,n,p)&&!po(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?bd(n,o,u):!0:!!o;return!1}function bd(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(_d(t,e,i)&&!po(r,i))return!0}return!1}function _d(e,t,r){const n=e[r],s=t[r];return r==="style"&&Je(n)&&Je(s)?!Lr(n,s):n!==s}function go({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 Sd={},Cd=()=>Object.create(Sd),xd=e=>Object.getPrototypeOf(e)===Sd;function vm(e,t,r,n=!1){const s={},i=Cd();e.propsDefaults=Object.create(null),Td(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:Cu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function mm(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=ze(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(po(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=bt(p);s[m]=sl(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{Td(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Ze(t,d)&&((c=Kt(d))===d||!Ze(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=sl(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&&jr(e.attrs,"set","")}function Td(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Un(l))continue;const u=t[l];let c;s&&Ze(s,c=bt(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:po(e.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,o=!0)}if(i){const l=ze(r),u=a||Ue;for(let c=0;c<i.length;c++){const d=i[c];r[d]=sl(s,l,d,u[d],e,!Ze(u,d))}}return o}function sl(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&&Ie(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=Xn(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===Kt(r))&&(n=!0))}return n}var wm=new WeakMap;function Ed(e,t,r=!1){const n=r?wm:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Ie(e)){const c=d=>{l=!0;const[p,h]=Ed(d,t,!0);Xe(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,us),us;if(_e(i))for(let c=0;c<i.length;c++){const d=bt(i[c]);Ad(d)&&(o[d]=Ue)}else if(i)for(const c in i){const d=bt(c);if(Ad(d)){const p=i[c],h=o[d]=_e(p)||Ie(p)?{type:p}:Xe({},p),m=h.type;let y=!1,T=!0;if(_e(m))for(let v=0;v<m.length;++v){const x=m[v],b=Ie(x)&&x.name;if(b==="Boolean"){y=!0;break}else b==="String"&&(T=!1)}else y=Ie(m)&&m.name==="Boolean";h[0]=y,h[1]=T,(y||Ze(h,"default"))&&a.push(d)}}const u=[o,a];return Je(e)&&n.set(e,u),u}function Ad(e){return e[0]!=="$"&&!Un(e)}var il=e=>e==="_"||e==="_ctx"||e==="$stable",ol=e=>_e(e)?e.map(Gt):[Gt(e)],ym=(e,t,r)=>{if(t._n)return t;const n=k((...s)=>ol(t(...s)),r);return n._c=!1,n},kd=(e,t,r)=>{const n=e._ctx;for(const s in e){if(il(s))continue;const i=e[s];if(Ie(i))t[s]=ym(s,i,n);else if(i!=null){const o=ol(i);t[s]=()=>o}}},Rd=(e,t)=>{const r=ol(t);e.slots.default=()=>r},Id=(e,t,r)=>{for(const n in t)(r||!il(n))&&(e[n]=t[n])},bm=(e,t,r)=>{const n=e.slots=Cd();if(e.vnode.shapeFlag&32){const s=t._;s?(Id(n,t,r),r&&eu(n,"_",s,!0)):kd(t,n)}else t&&Rd(e,t)},_m=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=Ue;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:Id(s,t,r):(i=!t.$stable,kd(t,s)),o=t}else t&&(Rd(e,t),o={default:1});if(i)for(const a in s)!il(a)&&o[a]==null&&delete s[a]};function _x(){}var vt=Bd;function $d(e){return Dd(e)}function Pd(e){return Dd(e,Ev)}function Dd(e,t){const r=Bi();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=or,insertStaticContent:m}=e,y=(A,$,J,ae=null,ne=null,re=null,de=void 0,fe=null,ue=!!$.dynamicChildren)=>{if(A===$)return;A&&!Cr(A,$)&&(ae=Ge(A),he(A,ne,re,!0),A=null),$.patchFlag===-2&&(ue=!1,$.dynamicChildren=null);const{type:ee,ref:Ee,shapeFlag:me}=$;switch(ee){case wn:T(A,$,J,ae);break;case pt:v(A,$,J,ae);break;case Yn:A==null&&x($,J,ae,de);break;case Ke:w(A,$,J,ae,ne,re,de,fe,ue);break;default:me&1?E(A,$,J,ae,ne,re,de,fe,ue):me&6?S(A,$,J,ae,ne,re,de,fe,ue):(me&64||me&128)&&ee.process(A,$,J,ae,ne,re,de,fe,ue,et)}Ee!=null&&ne?Ss(Ee,A&&A.ref,re,$||A,!$):Ee==null&&A&&A.ref!=null&&Ss(A.ref,null,re,A,!0)},T=(A,$,J,ae)=>{if(A==null)n($.el=a($.children),J,ae);else{const ne=$.el=A.el;$.children!==A.children&&u(ne,$.children)}},v=(A,$,J,ae)=>{A==null?n($.el=l($.children||""),J,ae):$.el=A.el},x=(A,$,J,ae)=>{[A.el,A.anchor]=m(A.children,$,J,ae,A.el,A.anchor)},b=({el:A,anchor:$},J,ae)=>{let ne;for(;A&&A!==$;)ne=p(A),n(A,J,ae),A=ne;n($,J,ae)},C=({el:A,anchor:$})=>{let J;for(;A&&A!==$;)J=p(A),s(A),A=J;s($)},E=(A,$,J,ae,ne,re,de,fe,ue)=>{if($.type==="svg"?de="svg":$.type==="math"&&(de="mathml"),A==null)I($,J,ae,ne,re,de,fe,ue);else{const ee=A.el&&A.el._isVueCE?A.el:null;try{ee&&ee._beginPatch(),H(A,$,ne,re,de,fe,ue)}finally{ee&&ee._endPatch()}}},I=(A,$,J,ae,ne,re,de,fe)=>{let ue,ee;const{props:Ee,shapeFlag:me,transition:Te,dirs:De}=A;if(ue=A.el=o(A.type,re,Ee&&Ee.is,Ee),me&8?c(ue,A.children):me&16&&g(A.children,ue,null,ae,ne,al(A,re),de,fe),De&&Pr(A,null,ae,"created"),M(ue,A,A.scopeId,de,ae),Ee){for(const Y in Ee)Y!=="value"&&!Un(Y)&&i(ue,Y,null,Ee[Y],re,ae);"value"in Ee&&i(ue,"value",null,Ee.value,re),(ee=Ee.onVnodeBeforeMount)&&Jt(ee,ae,A)}De&&Pr(A,null,ae,"beforeMount");const Fe=Od(ne,Te);Fe&&Te.beforeEnter(ue),n(ue,$,J),((ee=Ee&&Ee.onVnodeMounted)||Fe||De)&&vt(()=>{ee&&Jt(ee,ae,A),Fe&&Te.enter(ue),De&&Pr(A,null,ae,"mounted")},ne)},M=(A,$,J,ae,ne)=>{if(J&&h(A,J),ae)for(let re=0;re<ae.length;re++)h(A,ae[re]);if(ne){let re=ne.subTree;if($===re||mo(re.type)&&(re.ssContent===$||re.ssFallback===$)){const de=ne.vnode;M(A,de,de.scopeId,de.slotScopeIds,ne.parent)}}},g=(A,$,J,ae,ne,re,de,fe,ue=0)=>{for(let ee=ue;ee<A.length;ee++)y(null,A[ee]=fe?Qr(A[ee]):Gt(A[ee]),$,J,ae,ne,re,de,fe)},H=(A,$,J,ae,ne,re,de)=>{const fe=$.el=A.el;let{patchFlag:ue,dynamicChildren:ee,dirs:Ee}=$;ue|=A.patchFlag&16;const me=A.props||Ue,Te=$.props||Ue;let De;if(J&&Jn(J,!1),(De=Te.onVnodeBeforeUpdate)&&Jt(De,J,$,A),Ee&&Pr($,A,J,"beforeUpdate"),J&&Jn(J,!0),(me.innerHTML&&Te.innerHTML==null||me.textContent&&Te.textContent==null)&&c(fe,""),ee?N(A.dynamicChildren,ee,fe,J,ae,al($,ne),re):de||W(A,$,fe,null,J,ae,al($,ne),re,!1),ue>0){if(ue&16)_(fe,me,Te,J,ne);else if(ue&2&&me.class!==Te.class&&i(fe,"class",null,Te.class,ne),ue&4&&i(fe,"style",me.style,Te.style,ne),ue&8){const Fe=$.dynamicProps;for(let Y=0;Y<Fe.length;Y++){const ce=Fe[Y],pe=me[ce],tt=Te[ce];(tt!==pe||ce==="value")&&i(fe,ce,pe,tt,ne,J)}}ue&1&&A.children!==$.children&&c(fe,$.children)}else!de&&ee==null&&_(fe,me,Te,J,ne);((De=Te.onVnodeUpdated)||Ee)&&vt(()=>{De&&Jt(De,J,$,A),Ee&&Pr($,A,J,"updated")},ae)},N=(A,$,J,ae,ne,re,de)=>{for(let fe=0;fe<$.length;fe++){const ue=A[fe],ee=$[fe];y(ue,ee,ue.el&&(ue.type===Ke||!Cr(ue,ee)||ue.shapeFlag&198)?d(ue.el):J,null,ae,ne,re,de,!0)}},_=(A,$,J,ae,ne)=>{if($!==J){if($!==Ue)for(const re in $)!Un(re)&&!(re in J)&&i(A,re,$[re],null,ne,ae);for(const re in J){if(Un(re))continue;const de=J[re],fe=$[re];de!==fe&&re!=="value"&&i(A,re,fe,de,ne,ae)}"value"in J&&i(A,"value",$.value,J.value,ne)}},w=(A,$,J,ae,ne,re,de,fe,ue)=>{const ee=$.el=A?A.el:a(""),Ee=$.anchor=A?A.anchor:a("");let{patchFlag:me,dynamicChildren:Te,slotScopeIds:De}=$;De&&(fe=fe?fe.concat(De):De),A==null?(n(ee,J,ae),n(Ee,J,ae),g($.children||[],J,Ee,ne,re,de,fe,ue)):me>0&&me&64&&Te&&A.dynamicChildren&&A.dynamicChildren.length===Te.length?(N(A.dynamicChildren,Te,J,ne,re,de,fe),($.key!=null||ne&&$===ne.subTree)&&ll(A,$,!0)):W(A,$,J,Ee,ne,re,de,fe,ue)},S=(A,$,J,ae,ne,re,de,fe,ue)=>{$.slotScopeIds=fe,A==null?$.shapeFlag&512?ne.ctx.activate($,J,ae,de,ue):O($,J,ae,ne,re,de,ue):q(A,$,ue)},O=(A,$,J,ae,ne,re,de)=>{const fe=A.component=jd(A,ae,ne);if(ii(A)&&(fe.ctx.renderer=et),zd(fe,!1,de),fe.asyncDep){if(ne&&ne.registerDep(fe,B,de),!A.el){const ue=fe.subTree=D(pt);v(null,ue,$,J),A.placeholder=ue.el}}else B(fe,A,$,J,ne,re,de)},q=(A,$,J)=>{const ae=$.component=A.component;if(gm(A,$,J))if(ae.asyncDep&&!ae.asyncResolved){Z(ae,$,J);return}else ae.next=$,ae.update();else $.el=A.el,ae.vnode=$},B=(A,$,J,ae,ne,re,de)=>{const fe=()=>{if(A.isMounted){let{next:me,bu:Te,u:De,parent:Fe,vnode:Y}=A;{const P=Hd(A);if(P){me&&(me.el=Y.el,Z(A,me,de)),P.asyncDep.then(()=>{vt(()=>{A.isUnmounted||ee()},ne)});return}}let ce=me,pe;Jn(A,!1),me?(me.el=Y.el,Z(A,me,de)):me=Y,Te&&hs(Te),(pe=me.props&&me.props.onVnodeBeforeUpdate)&&Jt(pe,Fe,me,Y),Jn(A,!0);const tt=ho(A),zt=A.subTree;A.subTree=tt,y(zt,tt,d(zt.el),Ge(zt),A,ne,re),me.el=tt.el,ce===null&&go(A,tt.el),De&&vt(De,ne),(pe=me.props&&me.props.onVnodeUpdated)&&vt(()=>Jt(pe,Fe,me,Y),ne)}else{let me;const{el:Te,props:De}=$,{bm:Fe,m:Y,parent:ce,root:pe,type:tt}=A,zt=Yr($);if(Jn(A,!1),Fe&&hs(Fe),!zt&&(me=De&&De.onVnodeBeforeMount)&&Jt(me,ce,$),Jn(A,!0),Te&&Ct){const P=()=>{A.subTree=ho(A),Ct(Te,A.subTree,A,ne,null)};zt&&tt.__asyncHydrate?tt.__asyncHydrate(Te,A,P):P()}else{pe.ce&&pe.ce._hasShadowRoot()&&pe.ce._injectChildStyle(tt);const P=A.subTree=ho(A);y(null,P,J,ae,A,ne,re),$.el=P.el}if(Y&&vt(Y,ne),!zt&&(me=De&&De.onVnodeMounted)){const P=$;vt(()=>Jt(me,ce,P),ne)}($.shapeFlag&256||ce&&Yr(ce.vnode)&&ce.vnode.shapeFlag&256)&&A.a&&vt(A.a,ne),A.isMounted=!0,$=J=ae=null}};A.scope.on();const ue=A.effect=new zs(fe);A.scope.off();const ee=A.update=ue.run.bind(ue),Ee=A.job=ue.runIfDirty.bind(ue);Ee.i=A,Ee.id=A.uid,ue.scheduler=()=>qa(Ee),Jn(A,!0),ee()},Z=(A,$,J)=>{$.component=A;const ae=A.vnode.props;A.vnode=$,A.next=null,mm(A,$.props,ae,J),_m(A,$.children,J),Fr(),$u(A),Vr()},W=(A,$,J,ae,ne,re,de,fe,ue=!1)=>{const ee=A&&A.children,Ee=A?A.shapeFlag:0,me=$.children,{patchFlag:Te,shapeFlag:De}=$;if(Te>0){if(Te&128){G(ee,me,J,ae,ne,re,de,fe,ue);return}else if(Te&256){le(ee,me,J,ae,ne,re,de,fe,ue);return}}De&8?(Ee&16&&Pe(ee,ne,re),me!==ee&&c(J,me)):Ee&16?De&16?G(ee,me,J,ae,ne,re,de,fe,ue):Pe(ee,ne,re,!0):(Ee&8&&c(J,""),De&16&&g(me,J,ae,ne,re,de,fe,ue))},le=(A,$,J,ae,ne,re,de,fe,ue)=>{A=A||us,$=$||us;const ee=A.length,Ee=$.length,me=Math.min(ee,Ee);let Te;for(Te=0;Te<me;Te++){const De=$[Te]=ue?Qr($[Te]):Gt($[Te]);y(A[Te],De,J,null,ne,re,de,fe,ue)}ee>Ee?Pe(A,ne,re,!0,!1,me):g($,J,ae,ne,re,de,fe,ue,me)},G=(A,$,J,ae,ne,re,de,fe,ue)=>{let ee=0;const Ee=$.length;let me=A.length-1,Te=Ee-1;for(;ee<=me&&ee<=Te;){const De=A[ee],Fe=$[ee]=ue?Qr($[ee]):Gt($[ee]);if(Cr(De,Fe))y(De,Fe,J,null,ne,re,de,fe,ue);else break;ee++}for(;ee<=me&&ee<=Te;){const De=A[me],Fe=$[Te]=ue?Qr($[Te]):Gt($[Te]);if(Cr(De,Fe))y(De,Fe,J,null,ne,re,de,fe,ue);else break;me--,Te--}if(ee>me){if(ee<=Te){const De=Te+1,Fe=De<Ee?$[De].el:ae;for(;ee<=Te;)y(null,$[ee]=ue?Qr($[ee]):Gt($[ee]),J,Fe,ne,re,de,fe,ue),ee++}}else if(ee>Te)for(;ee<=me;)he(A[ee],ne,re,!0),ee++;else{const De=ee,Fe=ee,Y=new Map;for(ee=Fe;ee<=Te;ee++){const oe=$[ee]=ue?Qr($[ee]):Gt($[ee]);oe.key!=null&&Y.set(oe.key,ee)}let ce,pe=0;const tt=Te-Fe+1;let zt=!1,P=0;const U=new Array(tt);for(ee=0;ee<tt;ee++)U[ee]=0;for(ee=De;ee<=me;ee++){const oe=A[ee];if(pe>=tt){he(oe,ne,re,!0);continue}let te;if(oe.key!=null)te=Y.get(oe.key);else for(ce=Fe;ce<=Te;ce++)if(U[ce-Fe]===0&&Cr(oe,$[ce])){te=ce;break}te===void 0?he(oe,ne,re,!0):(U[te-Fe]=ee+1,te>=P?P=te:zt=!0,y(oe,$[te],J,null,ne,re,de,fe,ue),pe++)}const L=zt?Sm(U):us;for(ce=L.length-1,ee=tt-1;ee>=0;ee--){const oe=Fe+ee,te=$[oe],ve=$[oe+1],ye=oe+1<Ee?ve.el||Md(ve):ae;U[ee]===0?y(null,te,J,ye,ne,re,de,fe,ue):zt&&(ce<0||ee!==L[ce]?ie(te,J,ye,2):ce--)}}},ie=(A,$,J,ae,ne=null)=>{const{el:re,type:de,transition:fe,children:ue,shapeFlag:ee}=A;if(ee&6){ie(A.component.subTree,$,J,ae);return}if(ee&128){A.suspense.move($,J,ae);return}if(ee&64){de.move(A,$,J,et);return}if(de===Ke){n(re,$,J);for(let Ee=0;Ee<ue.length;Ee++)ie(ue[Ee],$,J,ae);n(A.anchor,$,J);return}if(de===Yn){b(A,$,J);return}if(ae!==2&&ee&1&&fe)if(ae===0)fe.beforeEnter(re),n(re,$,J),vt(()=>fe.enter(re),ne);else{const{leave:Ee,delayLeave:me,afterLeave:Te}=fe,De=()=>{A.ctx.isUnmounted?s(re):n(re,$,J)},Fe=()=>{re._isLeaving&&re[Dr](!0),Ee(re,()=>{De(),Te&&Te()})};me?me(re,De,Fe):Fe()}else n(re,$,J)},he=(A,$,J,ae=!1,ne=!1)=>{const{type:re,props:de,ref:fe,children:ue,dynamicChildren:ee,shapeFlag:Ee,patchFlag:me,dirs:Te,cacheIndex:De}=A;if(me===-2&&(ne=!1),fe!=null&&(Fr(),Ss(fe,null,J,A,!0),Vr()),De!=null&&($.renderCache[De]=void 0),Ee&256){$.ctx.deactivate(A);return}const Fe=Ee&1&&Te,Y=!Yr(A);let ce;if(Y&&(ce=de&&de.onVnodeBeforeUnmount)&&Jt(ce,$,A),Ee&6)Re(A.component,J,ae);else{if(Ee&128){A.suspense.unmount(J,ae);return}Fe&&Pr(A,null,$,"beforeUnmount"),Ee&64?A.type.remove(A,$,J,et,ae):ee&&!ee.hasOnce&&(re!==Ke||me>0&&me&64)?Pe(ee,$,J,!1,!0):(re===Ke&&me&384||!ne&&Ee&16)&&Pe(ue,$,J),ae&&ke(A)}(Y&&(ce=de&&de.onVnodeUnmounted)||Fe)&&vt(()=>{ce&&Jt(ce,$,A),Fe&&Pr(A,null,$,"unmounted")},J)},ke=A=>{const{type:$,el:J,anchor:ae,transition:ne}=A;if($===Ke){Ve(J,ae);return}if($===Yn){C(A);return}const re=()=>{s(J),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave()};if(A.shapeFlag&1&&ne&&!ne.persisted){const{leave:de,delayLeave:fe}=ne,ue=()=>de(J,re);fe?fe(A.el,re,ue):ue()}else re()},Ve=(A,$)=>{let J;for(;A!==$;)J=p(A),s(A),A=J;s($)},Re=(A,$,J)=>{const{bum:ae,scope:ne,job:re,subTree:de,um:fe,m:ue,a:ee}=A;vo(ue),vo(ee),ae&&hs(ae),ne.stop(),re&&(re.flags|=8,he(de,A,$,J)),fe&&vt(fe,$),vt(()=>{A.isUnmounted=!0},$)},Pe=(A,$,J,ae=!1,ne=!1,re=0)=>{for(let de=re;de<A.length;de++)he(A[de],$,J,ae,ne)},Ge=A=>{if(A.shapeFlag&6)return Ge(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const $=p(A.anchor||A.el),J=$&&$[qu];return J?p(J):$};let mt=!1;const je=(A,$,J)=>{let ae;A==null?$._vnode&&(he($._vnode,null,null,!0),ae=$._vnode.component):y($._vnode||null,A,$,null,null,null,J),$._vnode=A,mt||(mt=!0,$u(ae),Xi(),mt=!1)},et={p:y,um:he,m:ie,r:ke,mt:O,mc:g,pc:W,pbc:N,n:Ge,o:e};let wt,Ct;return t&&([wt,Ct]=t(et)),{render:je,hydrate:wt,createApp:lm(je,wt)}}function al({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 Jn({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Od(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ll(e,t,r=!1){const n=e.children,s=t.children;if(_e(n)&&_e(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]=Qr(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&ll(o,a)),a.type===wn&&(a.patchFlag===-1&&(a=s[i]=Qr(a)),a.el=o.el),a.type===pt&&!a.el&&(a.el=o.el)}}function Sm(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 Hd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Hd(t)}function vo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Md(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Md(t.subTree):null}var mo=e=>e.__isSuspense,cl=0,Cm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)xm(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}Tm(e,t,r,n,s,o,a,l,u)}},hydrate:Em,normalize:Am};function fi(e,t){const r=e.props&&e.props[t];Ie(r)&&r()}function xm(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=Nd(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?(fi(e,"onPending"),fi(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),Es(p,e.ssFallback)):p.resolve(!1,!0)}function Tm(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:y,isInFallback:T,isHydrating:v}=d;if(y)d.pendingBranch=p,Cr(y,p)?(l(y,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():T&&(v||(l(m,h,r,n,s,null,i,o,a),Es(d,h)))):(d.pendingId=cl++,v?(d.isHydrating=!1,d.activeBranch=y):u(y,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),T?(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),Es(d,h))):m&&Cr(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&&Cr(m,p))l(m,p,r,n,s,d,i,o,a),Es(d,p);else if(fi(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=cl++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:x,pendingId:b}=d;x>0?setTimeout(()=>{d.pendingId===b&&d.fallback(h)},x):x===0&&d.fallback(h)}}function Nd(e,t,r,n,s,i,o,a,l,u,c=!1){const{p:d,m:p,um:h,n:m,o:{parentNode:y,remove:T}}=u;let v;const x=km(e);x&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?qi(e.props.timeout):void 0,C=i,E={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:cl++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(I=!1,M=!1){const{vnode:g,activeBranch:H,pendingBranch:N,pendingId:_,effects:w,parentComponent:S,container:O,isInFallback:q}=E;let B=!1;E.isHydrating?E.isHydrating=!1:I||(B=H&&N.transition&&N.transition.mode==="out-in",B&&(H.transition.afterLeave=()=>{_===E.pendingId&&(p(N,O,i===C?m(H):i,0),Qs(w),q&&g.ssFallback&&(g.ssFallback.el=null))}),H&&(y(H.el)===O&&(i=m(H)),h(H,S,E,!0),!B&&q&&g.ssFallback&&vt(()=>g.ssFallback.el=null,E)),B||p(N,O,i,0)),Es(E,N),E.pendingBranch=null,E.isInFallback=!1;let Z=E.parent,W=!1;for(;Z;){if(Z.pendingBranch){Z.effects.push(...w),W=!0;break}Z=Z.parent}!W&&!B&&Qs(w),E.effects=[],x&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,t.deps===0&&!M&&t.resolve()),fi(g,"onResolve")},fallback(I){if(!E.pendingBranch)return;const{vnode:M,activeBranch:g,parentComponent:H,container:N,namespace:_}=E;fi(M,"onFallback");const w=m(g),S=()=>{E.isInFallback&&(d(null,I,N,w,H,null,_,a,l),Es(E,I))},O=I.transition&&I.transition.mode==="out-in";O&&(g.transition.afterLeave=S),E.isInFallback=!0,h(g,H,null,!0),O||S()},move(I,M,g){E.activeBranch&&p(E.activeBranch,I,M,g),E.container=I},next(){return E.activeBranch&&m(E.activeBranch)},registerDep(I,M,g){const H=!!E.pendingBranch;H&&E.deps++;const N=I.vnode.el;I.asyncDep.catch(_=>{Kn(_,I,0)}).then(_=>{if(I.isUnmounted||E.isUnmounted||E.pendingId!==I.suspenseId)return;I.asyncResolved=!0;const{vnode:w}=I;pl(I,_,!1),N&&(w.el=N);const S=!N&&I.subTree.el;M(I,w,y(N||I.subTree.el),N?null:m(I.subTree),E,o,g),S&&(w.placeholder=null,T(S)),go(I,w.el),H&&--E.deps===0&&E.resolve()})},unmount(I,M){E.isUnmounted=!0,E.activeBranch&&h(E.activeBranch,r,I,M),E.pendingBranch&&h(E.pendingBranch,r,I,M)}};return E}function Em(e,t,r,n,s,i,o,a,l){const u=t.suspense=Nd(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 Am(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=qd(n?r.default:r),e.ssFallback=n?qd(r.fallback):D(pt)}function qd(e){let t;if(Ie(e)){const r=Zn&&e._c;r&&(e._d=!1,R()),e=e(),r&&(e._d=!0,t=Mt,Ld())}return _e(e)&&(e=fm(e)),e=Gt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function Bd(e,t){t&&t.pendingBranch?_e(e)?t.effects.push(...e):t.effects.push(e):Qs(e)}function Es(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,go(n,s))}function km(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Ke=Symbol.for("v-fgt"),wn=Symbol.for("v-txt"),pt=Symbol.for("v-cmt"),Yn=Symbol.for("v-stc"),pi=[],Mt=null;function R(e=!1){pi.push(Mt=e?null:[])}function Ld(){pi.pop(),Mt=pi[pi.length-1]||null}var Zn=1;function hi(e,t=!1){Zn+=e,e<0&&Mt&&t&&(Mt.hasOnce=!0)}function Fd(e){return e.dynamicChildren=Zn>0?Mt||us:null,Ld(),Zn>0&&Mt&&Mt.push(e),e}function Se(e,t,r,n,s,i){return Fd(Q(e,t,r,n,s,i,!0))}function K(e,t,r,n,s){return Fd(D(e,t,r,n,s,!0))}function Xr(e){return e?e.__v_isVNode===!0:!1}function Cr(e,t){return e.type===t.type&&e.key===t.key}function Rm(e){}var Vd=({key:e})=>e??null,wo=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?ot(e)||nt(e)||Ie(e)?{i:Rt,r:e,k:t,f:!!r}:e:null);function Q(e,t=null,r=null,n=0,s=null,i=e===Ke?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Vd(t),ref:t&&wo(t),scopeId:eo,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:Rt};return a?(dl(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=ot(r)?8:16),Zn>0&&!o&&Mt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Mt.push(l),l}var D=Im;function Im(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===ld)&&(e=pt),Xr(e)){const a=xr(e,t,!0);return r&&dl(a,r),Zn>0&&!i&&Mt&&(a.shapeFlag&6?Mt[Mt.indexOf(e)]=a:Mt.push(a)),a.patchFlag=-2,a}if(Nm(e)&&(e=e.__vccOpts),t){t=ur(t);let{class:a,style:l}=t;a&&!ot(a)&&(t.class=it(a)),Je(l)&&(Zs(l)&&!_e(l)&&(l=Xe({},l)),t.style=xt(l))}const o=ot(e)?1:mo(e)?128:Bu(e)?64:Je(e)?4:Ie(e)?2:0;return Q(e,t,r,n,s,o,i,!0)}function ur(e){return e?Zs(e)||xd(e)?Xe({},e):e:null}function xr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?we(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Vd(u),ref:t&&t.ref?r&&i?_e(i)?i.concat(wo(t)):[i,wo(t)]:wo(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!==Ke?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&&xr(e.ssContent),ssFallback:e.ssFallback&&xr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Jr(c,l.clone(c)),c}function qe(e=" ",t=0){return D(wn,null,e,t)}function ul(e,t){const r=D(Yn,null,e);return r.staticCount=t,r}function Ne(e="",t=!1){return t?(R(),K(pt,null,e)):D(pt,null,e)}function Gt(e){return e==null||typeof e=="boolean"?D(pt):_e(e)?D(Ke,null,e.slice()):Xr(e)?Qr(e):D(wn,null,String(e))}function Qr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xr(e)}function dl(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(_e(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),dl(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!xd(t)?t._ctx=Rt:s===3&&Rt&&(Rt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ie(t)?(t={default:t,_ctx:Rt},r=32):(t=String(t),n&64?(r=16,t=[qe(t)]):r=8);e.children=t,e.shapeFlag|=r}function we(...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=it([t.class,n.class]));else if(s==="style")t.style=xt([t.style,n.style]);else if(js(s)){const i=t[s],o=n[s];o&&i!==o&&!(_e(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Jt(e,t,r,n=null){ar(e,t,7,[r,n])}var $m=md(),Pm=0;function jd(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||$m,i={uid:Pm++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ca(!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:Ed(n,s),emitsOptions:yd(n,s),emit:null,emitted:null,propsDefaults:Ue,inheritAttrs:n.inheritAttrs,ctx:Ue,data:Ue,props:Ue,attrs:Ue,slots:Ue,refs:Ue,setupState:Ue,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=um.bind(null,i),e.ce&&e.ce(i),i}var It=null,ht=()=>It||Rt,yo,fl;{const e=Bi(),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)}};yo=t("__VUE_INSTANCE_SETTERS__",r=>It=r),fl=t("__VUE_SSR_SETTERS__",r=>As=r)}var Xn=e=>{const t=It;return yo(e),e.scope.on(),()=>{e.scope.off(),yo(t)}},bo=()=>{It&&It.scope.off(),yo(null)};function Ud(e){return e.vnode.shapeFlag&4}var As=!1;function zd(e,t=!1,r=!1){t&&fl(t);const{props:n,children:s}=e.vnode,i=Ud(e);vm(e,n,i,t),bm(e,s,r||t);const o=i?Dm(e,t):void 0;return t&&fl(!1),o}function Dm(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,el);const{setup:n}=r;if(n){Fr();const s=e.setupContext=n.length>1?Wd(e):null,i=Xn(e),o=ms(n,e,0,[e.props,s]),a=_a(o);if(Vr(),i(),(a||e.sp)&&!Yr(e)&&Ka(e),a){if(o.then(bo,bo),t)return o.then(l=>{pl(e,l,t)}).catch(l=>{Kn(l,e,0)});e.asyncDep=o}else pl(e,o,t)}else Kd(e,t)}function pl(e,t,r){Ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Je(t)&&(e.setupState=Ma(t)),Kd(e,r)}var _o,hl;function Om(e){_o=e,hl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,jv))}}var Hm=()=>!_o;function Kd(e,t,r){const n=e.type;if(!e.render){if(!t&&_o&&!n.render){const s=n.template||rl(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=Xe(Xe({isCustomElement:i,delimiters:a},o),l);n.render=_o(s,u)}}e.render=n.render||or,hl&&hl(e)}{const s=Xn(e);Fr();try{rm(e)}finally{Vr(),s()}}}var Mm={get(e,t){return Dt(e,"get",""),e[t]}};function Wd(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,Mm),slots:e.slots,emit:e.emit,expose:t}}function gi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ma(Ha(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in ci)return ci[r](e)},has(t,r){return r in t||r in ci}})):e.proxy}function gl(e,t=!0){return Ie(e)?e.displayName||e.name:e.name||t&&e.__name}function Nm(e){return Ie(e)&&"__vccOpts"in e}var j=(e,t)=>sv(e,t,As);function dr(e,t,r){try{hi(-1);const n=arguments.length;return n===2?Je(t)&&!_e(t)?Xr(t)?D(e,null,[t]):D(e,t):D(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Xr(r)&&(r=[r]),D(e,t,r))}finally{hi(1)}}function qm(){return;function e(t,r,n){const s=t[n];if(_e(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 Bm(e,t,r,n){const s=r[n];if(s&&Gd(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function Gd(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(Bt(r[n],t[n]))return!1;return Zn>0&&Mt&&Mt.push(e),!0}var Jd="3.5.29",Lm=or,Fm=pv,Vm=bs,jm=Du,Um={createComponentInstance:jd,setupComponent:zd,renderComponentRoot:ho,setCurrentRenderingInstance:ti,isVNode:Xr,normalizeVNode:Gt,getComponentPublicInstance:gi,ensureValidVNode:Za,pushWarningContext:cv,popWarningContext:uv},Sx=null,Cx=null,xx=null;var vl=void 0,Yd=typeof window<"u"&&window.trustedTypes;if(Yd)try{vl=Yd.createPolicy("vue",{createHTML:e=>e})}catch{}var Zd=vl?e=>vl.createHTML(e):e=>e,zm="http://www.w3.org/2000/svg",Km="http://www.w3.org/1998/Math/MathML",en=typeof document<"u"?document:null,Xd=en&&en.createElement("template"),Qd={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"?en.createElementNS(zm,e):t==="mathml"?en.createElementNS(Km,e):r?en.createElement(e,{is:r}):en.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>en.createTextNode(e),createComment:e=>en.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>en.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{Xd.innerHTML=Zd(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Xd.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]}},yn="transition",vi="animation",ks=Symbol("_vtc"),ef={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},tf=Xe({},Ua,ef),Wm=e=>(e.displayName="Transition",e.props=tf,e),Gm=Wm((e,{slots:t})=>dr(Ku,nf(e),t)),Qn=(e,t=[])=>{_e(e)?e.forEach(r=>r(...t)):e&&e(...t)},rf=e=>e?_e(e)?e.some(t=>t.length>1):e.length>1:!1;function nf(e){const t={};for(const w in e)w in ef||(t[w]=e[w]);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=Jm(s),y=m&&m[0],T=m&&m[1],{onBeforeEnter:v,onEnter:x,onEnterCancelled:b,onLeave:C,onLeaveCancelled:E,onBeforeAppear:I=v,onAppear:M=x,onAppearCancelled:g=b}=t,H=(w,S,O,q)=>{w._enterCancelled=q,bn(w,S?c:a),bn(w,S?u:o),O&&O()},N=(w,S)=>{w._isLeaving=!1,bn(w,d),bn(w,h),bn(w,p),S&&S()},_=w=>(S,O)=>{const q=w?M:x,B=()=>H(S,w,O);Qn(q,[S,B]),sf(()=>{bn(S,w?l:i),Or(S,w?c:a),rf(q)||of(S,n,y,B)})};return Xe(t,{onBeforeEnter(w){Qn(v,[w]),Or(w,i),Or(w,o)},onBeforeAppear(w){Qn(I,[w]),Or(w,l),Or(w,u)},onEnter:_(!1),onAppear:_(!0),onLeave(w,S){w._isLeaving=!0;const O=()=>N(w,S);Or(w,d),w._enterCancelled?(Or(w,p),wl(w)):(wl(w),Or(w,p)),sf(()=>{w._isLeaving&&(bn(w,d),Or(w,h),rf(C)||of(w,n,T,O))}),Qn(C,[w,O])},onEnterCancelled(w){H(w,!1,void 0,!0),Qn(b,[w])},onAppearCancelled(w){H(w,!0,void 0,!0),Qn(g,[w])},onLeaveCancelled(w){N(w),Qn(E,[w])}})}function Jm(e){if(e==null)return null;if(Je(e))return[ml(e.enter),ml(e.leave)];{const t=ml(e);return[t,t]}}function ml(e){return qi(e)}function Or(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ks]||(e[ks]=new Set)).add(t)}function bn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[ks];r&&(r.delete(t),r.size||(e[ks]=void 0))}function sf(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Ym=0;function of(e,t,r,n){const s=e._endId=++Ym,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=af(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 af(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${yn}Delay`),i=n(`${yn}Duration`),o=lf(s,i),a=n(`${vi}Delay`),l=n(`${vi}Duration`),u=lf(a,l);let c=null,d=0,p=0;t===yn?o>0&&(c=yn,d=o,p=i.length):t===vi?u>0&&(c=vi,d=u,p=l.length):(d=Math.max(o,u),c=d>0?o>u?yn:vi:null,p=c?c===yn?i.length:l.length:0);const h=c===yn&&/\b(?:transform|all)(?:,|$)/.test(n(`${yn}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function lf(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>cf(r)+cf(e[n])))}function cf(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function wl(e){return(e?e.ownerDocument:document).body.offsetHeight}function Zm(e,t,r){const n=e[ks];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var So=Symbol("_vod"),uf=Symbol("_vsh"),Co={name:"show",beforeMount(e,{value:t},{transition:r}){e[So]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):mi(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),mi(e,!0),n.enter(e)):n.leave(e,()=>{mi(e,!1)}):mi(e,t))},beforeUnmount(e,{value:t}){mi(e,t)}};function mi(e,t){e.style.display=t?e[So]:"none",e[uf]=!t}function Xm(){Co.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var df=Symbol("");function Qm(e){const t=ht();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>xo(i,s))},n=()=>{const s=e(t.proxy);t.ce?xo(t.ce,s):yl(t.subTree,s),r(s)};Ga(()=>{Qs(n)}),Qe(()=>{Oe(n,or,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Vt(()=>s.disconnect())})}function yl(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{yl(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)xo(e.el,t);else if(e.type===Ke)e.children.forEach(r=>yl(r,t));else if(e.type===Yn){let{el:r,anchor:n}=e;for(;r&&(xo(r,t),r!==n);)r=r.nextSibling}}function xo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=Ig(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[df]=n}}var e0=/(?:^|;)\s*display\s*:/;function t0(e,t,r){const n=e.style,s=ot(r);let i=!1;if(r&&!s){if(t)if(ot(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&To(n,a,"")}else for(const o in t)r[o]==null&&To(n,o,"");for(const o in r)o==="display"&&(i=!0),To(n,o,r[o])}else if(s){if(t!==r){const o=n[df];o&&(r+=";"+o),n.cssText=r,i=e0.test(r)}}else t&&e.removeAttribute("style");So in e&&(e[So]=i?n.display:"",e[uf]&&(n.display="none"))}var ff=/\s*!important$/;function To(e,t,r){if(_e(r))r.forEach(n=>To(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=r0(e,t);ff.test(r)?e.setProperty(Kt(n),r.replace(ff,""),"important"):e[n]=r}}var pf=["Webkit","Moz","ms"],bl={};function r0(e,t){const r=bl[t];if(r)return r;let n=bt(t);if(n!=="filter"&&n in e)return bl[t]=n;n=Us(n);for(let s=0;s<pf.length;s++){const i=pf[s]+n;if(i in e)return bl[t]=i}return t}var hf="http://www.w3.org/1999/xlink";function gf(e,t,r,n,s,i=kg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(hf,t.slice(6,t.length)):e.setAttributeNS(hf,t,r):r==null||i&&!nu(r)?e.removeAttribute(t):e.setAttribute(t,i?"":yr(r)?String(r):r)}function vf(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Zd(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=nu(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 tn(e,t,r,n){e.addEventListener(t,r,n)}function n0(e,t,r,n){e.removeEventListener(t,r,n)}var mf=Symbol("_vei");function s0(e,t,r,n,s=null){const i=e[mf]||(e[mf]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=i0(t);n?tn(e,a,i[t]=l0(n,s),l):o&&(n0(e,a,o,l),i[t]=void 0)}}var wf=/(?:Once|Passive|Capture)$/;function i0(e){let t;if(wf.test(e)){t={};let r;for(;r=e.match(wf);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Kt(e.slice(2)),t]}var _l=0,o0=Promise.resolve(),a0=()=>_l||(o0.then(()=>_l=0),_l=Date.now());function l0(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;ar(c0(n,r.value),t,5,[n])};return r.value=e,r.attached=a0(),r}function c0(e,t){if(_e(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 yf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,bf=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?Zm(e,n,o):t==="style"?t0(e,r,n):js(t)?ya(t)||s0(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):u0(e,t,n,o))?(vf(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&gf(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ot(n))?vf(e,bt(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),gf(e,t,n,o))};function u0(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&yf(t)&&Ie(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 yf(t)&&ot(r)?!1:t in e}var _f={};function Sl(e,t,r){let n=X(e,t);Oi(n)&&(n=Xe({},n,t));class s extends Sf{constructor(o){super(n,o,r)}}return s.def=n,s}var d0=((e,t)=>Sl(e,t,Ff)),f0=typeof HTMLElement<"u"?HTMLElement:class{},Sf=class dg extends f0{constructor(t,r={},n=El){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!==El?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Xe({},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 dg){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,Tt(()=>{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&&!_e(i))for(const l in i){const u=i[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=qi(this._props[l])),(a||(a=Object.create(null)))[bt(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=_e(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(bt))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):_f;const s=bt(t);r&&this._numberProps&&this._numberProps[s]&&(n=qi(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===_f?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(Kt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Kt(t),r+""):r||this.removeAttribute(Kt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Lf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=D(this._def,Xe(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,Oi(o[0])?Xe({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Kt(i)!==i&&s(Kt(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 Cf(e){const t=ht(),r=t&&t.ce;return r||null}function p0(){const e=Cf();return e&&e.shadowRoot}function h0(e="$style"){{const t=ht();if(!t)return Ue;const r=t.type.__cssModules;if(!r)return Ue;const n=r[e];return n||Ue}}var xf=new WeakMap,Tf=new WeakMap,Eo=Symbol("_moveCb"),Ef=Symbol("_enterCb"),g0=e=>(delete e.props.mode,e),v0=g0({name:"TransitionGroup",props:Xe({},tf,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=ht(),n=ja();let s,i;return ai(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!b0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(m0),s.forEach(w0);const a=s.filter(y0);wl(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Or(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Eo]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Eo]=null,bn(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=ze(e),a=nf(o);let l=o.tag||Ke;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Jr(c,_s(c,a,n,r)),xf.set(c,Af(c.el)))}i=t.default?so(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Jr(c,_s(c,a,n,r))}return D(l,null,i)}}});function m0(e){const t=e.el;t[Eo]&&t[Eo](),t[Ef]&&t[Ef]()}function w0(e){Tf.set(e,Af(e.el))}function y0(e){const t=xf.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 Af(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function b0(e,t,r){const n=e.cloneNode(),s=e[ks];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}=af(n);return i.removeChild(n),o}var _n=e=>{const t=e.props["onUpdate:modelValue"]||!1;return _e(t)?r=>hs(t,r):t};function _0(e){e.target.composing=!0}function kf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var fr=Symbol("_assign");function Rf(e,t,r){return t&&(e=e.trim()),r&&(e=Ni(e)),e}var wi={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[fr]=_n(s);const i=n||s.props&&s.props.type==="number";tn(e,t?"change":"input",o=>{o.target.composing||e[fr](Rf(e.value,r,i))}),(r||i)&&tn(e,"change",()=>{e.value=Rf(e.value,r,i)}),t||(tn(e,"compositionstart",_0),tn(e,"compositionend",kf),tn(e,"change",kf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[fr]=_n(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Ni(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))}},Cl={deep:!0,created(e,t,r){e[fr]=_n(r),tn(e,"change",()=>{const n=e._modelValue,s=Rs(e),i=e.checked,o=e[fr];if(_e(n)){const a=Li(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(jn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(Df(e,i))})},mounted:If,beforeUpdate(e,t,r){e[fr]=_n(r),If(e,t,r)}};function If(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(_e(t))s=Li(t,n.props.value)>-1;else if(jn(t))s=t.has(n.props.value);else{if(t===r)return;s=Lr(t,Df(e,!0))}e.checked!==s&&(e.checked=s)}var xl={created(e,{value:t},r){e.checked=Lr(t,r.props.value),e[fr]=_n(r),tn(e,"change",()=>{e[fr](Rs(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[fr]=_n(n),t!==r&&(e.checked=Lr(t,n.props.value))}},$f={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=jn(t);tn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Ni(Rs(o)):Rs(o));e[fr](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,Tt(()=>{e._assigning=!1})}),e[fr]=_n(n)},mounted(e,{value:t}){Pf(e,t)},beforeUpdate(e,t,r){e[fr]=_n(r)},updated(e,{value:t}){e._assigning||Pf(e,t)}};function Pf(e,t){const r=e.multiple,n=_e(t);if(!(r&&!n&&!jn(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Rs(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=Li(t,a)>-1}else o.selected=t.has(a);else if(Lr(Rs(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Rs(e){return"_value"in e?e._value:e.value}function Df(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var Of={created(e,t,r){Ao(e,t,r,null,"created")},mounted(e,t,r){Ao(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){Ao(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){Ao(e,t,r,n,"updated")}};function Hf(e,t){switch(e){case"SELECT":return $f;case"TEXTAREA":return wi;default:switch(t){case"checkbox":return Cl;case"radio":return xl;default:return wi}}}function Ao(e,t,r,n,s){const i=Hf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function S0(){wi.getSSRProps=({value:e})=>({value:e}),xl.getSSRProps=({value:e},t)=>{if(t.props&&Lr(t.props.value,e))return{checked:!0}},Cl.getSSRProps=({value:e},t)=>{if(_e(e)){if(t.props&&Li(e,t.props.value)>-1)return{checked:!0}}else if(jn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Of.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=Hf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var C0=["ctrl","shift","alt","meta"],x0={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)=>C0.some(r=>e[`${r}Key`]&&!t.includes(r))},pr=(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=x0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},T0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Tl=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Kt(s.key);if(t.some(o=>o===i||T0[o]===i))return e(s)}))},Mf=Xe({patchProp:bf},Qd),yi,Nf=!1;function qf(){return yi||(yi=$d(Mf))}function Bf(){return yi=Nf?yi:Pd(Mf),Nf=!0,yi}var Lf=((...e)=>{qf().render(...e)}),E0=((...e)=>{Bf().hydrate(...e)}),El=((...e)=>{const t=qf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=jf(n);if(!s)return;const i=t._component;!Ie(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,Vf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),Ff=((...e)=>{const t=Bf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=jf(n);if(s)return r(s,!0,Vf(s))},t});function Vf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function jf(e){return ot(e)?document.querySelector(e):e}var Uf=!1,A0=()=>{Uf||(Uf=!0,S0(),Xm())},k0=mg({BaseTransition:()=>Ku,BaseTransitionPropsValidators:()=>Ua,Comment:()=>pt,DeprecationTypes:()=>null,EffectScope:()=>Ca,ErrorCodes:()=>fv,ErrorTypeStrings:()=>Fm,Fragment:()=>Ke,KeepAlive:()=>Nv,ReactiveEffect:()=>zs,Static:()=>Yn,Suspense:()=>Cm,Teleport:()=>Fa,Text:()=>wn,TrackOpTypes:()=>iv,Transition:()=>Gm,TransitionGroup:()=>v0,TriggerOpTypes:()=>ov,VueElement:()=>Sf,assertNumber:()=>dv,callWithAsyncErrorHandling:()=>ar,callWithErrorHandling:()=>ms,camelize:()=>bt,capitalize:()=>Us,cloneVNode:()=>xr,compatUtils:()=>null,compile:()=>R0,computed:()=>j,createApp:()=>El,createBlock:()=>K,createCommentVNode:()=>Ne,createElementBlock:()=>Se,createElementVNode:()=>Q,createHydrationRenderer:()=>Pd,createPropsRestProxy:()=>em,createRenderer:()=>$d,createSSRApp:()=>Ff,createSlots:()=>Vv,createStaticVNode:()=>ul,createTextVNode:()=>qe,createVNode:()=>D,customRef:()=>Xs,defineAsyncComponent:()=>Mv,defineComponent:()=>X,defineCustomElement:()=>Sl,defineEmits:()=>zv,defineExpose:()=>Kv,defineModel:()=>Jv,defineOptions:()=>Wv,defineProps:()=>Uv,defineSSRCustomElement:()=>d0,defineSlots:()=>Gv,devtools:()=>Vm,effect:()=>Pg,effectScope:()=>xa,getCurrentInstance:()=>ht,getCurrentScope:()=>Fi,getCurrentWatcher:()=>av,getTransitionRawChildren:()=>so,guardReactiveProps:()=>ur,h:()=>dr,handleError:()=>Kn,hasInjectionContext:()=>yv,hydrate:()=>E0,hydrateOnIdle:()=>Iv,hydrateOnInteraction:()=>Ov,hydrateOnMediaQuery:()=>Dv,hydrateOnVisible:()=>Pv,initCustomFormatter:()=>qm,initDirectivesForSSR:()=>A0,inject:()=>Ft,isMemoSame:()=>Gd,isProxy:()=>Zs,isReactive:()=>Wr,isReadonly:()=>Ir,isRef:()=>nt,isRuntimeOnly:()=>Hm,isShallow:()=>Wt,isVNode:()=>Xr,markRaw:()=>Ha,mergeDefaults:()=>fd,mergeModels:()=>Qv,mergeProps:()=>we,nextTick:()=>Tt,nodeOps:()=>Qd,normalizeClass:()=>it,normalizeProps:()=>br,normalizeStyle:()=>xt,onActivated:()=>ed,onBeforeMount:()=>nd,onBeforeUnmount:()=>Ts,onBeforeUpdate:()=>Ga,onDeactivated:()=>td,onErrorCaptured:()=>ad,onMounted:()=>Qe,onRenderTracked:()=>od,onRenderTriggered:()=>id,onScopeDispose:()=>Ta,onServerPrefetch:()=>sd,onUnmounted:()=>Vt,onUpdated:()=>ai,onWatcherCleanup:()=>Au,openBlock:()=>R,patchProp:()=>bf,popScopeId:()=>mv,provide:()=>Wn,proxyRefs:()=>Ma,pushScopeId:()=>vv,queuePostFlushCb:()=>Qs,reactive:()=>zr,readonly:()=>Ot,ref:()=>F,registerRuntimeCompiler:()=>Om,render:()=>Lf,renderList:()=>cr,renderSlot:()=>se,resolveComponent:()=>Lv,resolveDirective:()=>Fv,resolveDynamicComponent:()=>li,resolveFilter:()=>null,resolveTransitionHooks:()=>_s,setBlockTracking:()=>hi,setDevtoolsHook:()=>jm,setTransitionHooks:()=>Jr,shallowReactive:()=>Cu,shallowReadonly:()=>Kr,shallowRef:()=>ut,ssrContextKey:()=>Ou,ssrUtils:()=>Um,stop:()=>Dg,toDisplayString:()=>Le,toHandlerKey:()=>ps,toHandlers:()=>ud,toRaw:()=>ze,toRef:()=>Na,toRefs:()=>Ht,toValue:()=>Ae,transformVNodeArgs:()=>Rm,triggerRef:()=>Tu,unref:()=>f,useAttrs:()=>Xv,useCssModule:()=>h0,useCssVars:()=>Qm,useHost:()=>Cf,useId:()=>Ju,useModel:()=>cm,useSSRContext:()=>Hu,useShadowRoot:()=>p0,useSlots:()=>Zv,useTemplateRef:()=>Cv,useTransitionState:()=>ja,vModelCheckbox:()=>Cl,vModelDynamic:()=>Of,vModelRadio:()=>xl,vModelSelect:()=>$f,vModelText:()=>wi,vShow:()=>Co,version:()=>Jd,warn:()=>Lm,watch:()=>Oe,watchEffect:()=>lt,watchPostEffect:()=>Ba,watchSyncEffect:()=>Mu,withAsyncContext:()=>tm,withCtx:()=>k,withDefaults:()=>Yv,withDirectives:()=>to,withKeys:()=>Tl,withMemo:()=>Bm,withModifiers:()=>pr,withScopeId:()=>wv},1),R0=()=>{},I0=2;const Tr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},$0=(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,I0);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(Tr.CALL_HISTORY)||p.createObjectStore(Tr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(Tr.CONTACTS)||p.createObjectStore(Tr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(Tr.CONNECTIONS)||p.createObjectStore(Tr.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}},P0=e=>{const t=F(e?.initialConnected??!1),r=F(0),n=F(null),s=F([]),i=F([]),{initDB:o,getAll:a,add:l}=$0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(Tr.CALL_HISTORY)).sort((G,ie)=>ie.startTime-G.startTime),i.value=await a(Tr.CONTACTS)}catch(G){console.error("Error loading data from IndexedDB:",G)}});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=j(()=>u.value.find(G=>G.id===r.value)||u.value[0]),m=j(()=>h.value?.status||"idle"),y=j(()=>h.value?.remoteNumber||""),T=j(()=>h.value?.isMuted||!1),v=j(()=>h.value?.isHeld||!1),x=j({get:()=>h.value?.keypadValue||"",set:G=>{h.value&&(h.value.keypadValue=G)}}),b=G=>{t.value=G},C=G=>{u.value.some(ie=>ie.id===G)&&(r.value=G)},E=(G,ie)=>{const he=u.value.find(ke=>ke.id===G);he&&Object.assign(he,ie)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:y,isMuted:T,isHeld:v,keypadValue:x,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:b,setActiveChannelId:C,updateChannelState:E,setCallStatus:G=>{E(r.value,{status:G})},setIncomingCall:G=>{E(r.value,{remoteNumber:G})},resetCall:()=>{E(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async G=>{const ie={id:crypto.randomUUID(),...G};s.value.unshift(ie);try{await l(Tr.CALL_HISTORY,ie)}catch(he){console.error("Error saving call log:",he)}},callHistory:s,contacts:i,addContact:async G=>{try{await l(Tr.CONTACTS,G),i.value=await a(Tr.CONTACTS)}catch(ie){console.error("Error saving contact:",ie)}},setMuted:G=>{E(r.value,{isMuted:G})},setHeld:G=>{E(r.value,{isHeld:G})},appendKeypad:G=>{x.value+=G},clearKeypad:()=>{x.value=""},backspaceKeypad:()=>{x.value=x.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:G=>{d.value=G},setTransferInProgress:G=>{n.value=G},toggleVideoMode:()=>{p.value=!p.value}}},D0="0.21.1";var es=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},Al=class extends es{constructor(e){super(e||"Unsupported content type.")}},kl=class extends es{constructor(e){super(e||"Request pending.")}},O0=class extends es{constructor(e){super(e||"Unspecified session description handler error.")}},Rl=class extends es{constructor(){super("The session has terminated.")}},bi=class extends es{constructor(e){super(e||"An error occurred during state transition.")}},H0=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},M0=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()}},N0=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},_i=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})}},q0=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()}},zf=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={}}},hr=class fg extends zf{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 fg(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}},Sn=class pg extends zf{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 pg(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 Kf(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 Il(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var Wf=class va 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,va.prototype):this.__proto__=va.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,va)}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=Il("",i.line.toString().length," "),u=n[i.line-1],c=i.line===a.line?a.column:u.length+1;r+=`
|
|
3
|
+
(function(){var Yc=Object.defineProperty,mg=(e,t)=>{let r={};for(var n in e)Yc(r,n,{get:e[n],enumerable:!0});return t&&Yc(r,Symbol.toStringTag,{value:"Module"}),r};function Vs(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var Ue={},us=[],or=()=>{},Zc=()=>!1,js=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ba=e=>e.startsWith("onUpdate:"),Xe=Object.assign,_a=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},wg=Object.prototype.hasOwnProperty,Ze=(e,t)=>wg.call(e,t),_e=Array.isArray,ds=e=>fs(e)==="[object Map]",jn=e=>fs(e)==="[object Set]",Xc=e=>fs(e)==="[object Date]",yg=e=>fs(e)==="[object RegExp]",Ie=e=>typeof e=="function",ot=e=>typeof e=="string",yr=e=>typeof e=="symbol",Je=e=>e!==null&&typeof e=="object",Sa=e=>(Je(e)||Ie(e))&&Ie(e.then)&&Ie(e.catch),Qc=Object.prototype.toString,fs=e=>Qc.call(e),bg=e=>fs(e).slice(8,-1),Mi=e=>fs(e)==="[object Object]",Ni=e=>ot(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Un=Vs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),qi=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},_g=/-\w/g,bt=qi(e=>e.replace(_g,t=>t.slice(1).toUpperCase())),Sg=/\B([A-Z])/g,Kt=qi(e=>e.replace(Sg,"-$1").toLowerCase()),Us=qi(e=>e.charAt(0).toUpperCase()+e.slice(1)),ps=qi(e=>e?`on${Us(e)}`:""),Bt=(e,t)=>!Object.is(e,t),hs=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},eu=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Bi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Li=e=>{const t=ot(e)?Number(e):NaN;return isNaN(t)?e:t},tu,Fi=()=>tu||(tu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Cg=Vs("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 xt(e){if(_e(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=ot(n)?Ag(n):xt(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(ot(e)||Je(e))return e}var xg=/;(?![^(]*\))/g,Tg=/:([^]+)/,Eg=/\/\*[^]*?\*\//g;function Ag(e){const t={};return e.replace(Eg,"").split(xg).forEach(r=>{if(r){const n=r.split(Tg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function it(e){let t="";if(ot(e))t=e;else if(_e(e))for(let r=0;r<e.length;r++){const n=it(e[r]);n&&(t+=n+" ")}else if(Je(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function br(e){if(!e)return null;let{class:t,style:r}=e;return t&&!ot(t)&&(e.class=it(t)),r&&(e.style=xt(r)),e}var ru="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",kg=Vs(ru),bx=Vs(ru+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function nu(e){return!!e||e===""}function Rg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Lr(e[n],t[n]);return r}function Lr(e,t){if(e===t)return!0;let r=Xc(e),n=Xc(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=yr(e),n=yr(t),r||n)return e===t;if(r=_e(e),n=_e(t),r||n)return r&&n?Rg(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||!Lr(e[s],t[s]))return!1}}return String(e)===String(t)}function Vi(e,t){return e.findIndex(r=>Lr(r,t))}var su=e=>!!(e&&e.__v_isRef===!0),Le=e=>ot(e)?e:e==null?"":_e(e)||Je(e)&&(e.toString===Qc||!Ie(e.toString))?su(e)?Le(e.value):JSON.stringify(e,iu,2):String(e),iu=(e,t)=>su(t)?iu(e,t.value):ds(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[Ca(n,i)+" =>"]=s,r),{})}:jn(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>Ca(r))}:yr(t)?Ca(t):Je(t)&&!_e(t)&&!Mi(t)?String(t):t,Ca=(e,t="")=>{var r;return yr(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function Ig(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var Pt,xa=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=Pt,!e&&Pt&&(this.index=(Pt.scopes||(Pt.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=Pt;try{return Pt=this,e()}finally{Pt=t}}}on(){++this._on===1&&(this.prevScope=Pt,Pt=this)}off(){this._on>0&&--this._on===0&&(Pt=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 Ta(e){return new xa(e)}function ji(){return Pt}function Ea(e,t=!1){Pt&&Pt.cleanups.push(e)}var at,Aa=new WeakSet,zs=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,Pt&&Pt.active&&Pt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Aa.has(this)&&(Aa.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||au(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,fu(this),lu(this);const e=at,t=_r;at=this,_r=!0;try{return this.fn()}finally{cu(this),at=e,_r=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)$a(e);this.deps=this.depsTail=void 0,fu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Aa.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ia(this)&&this.run()}get dirty(){return Ia(this)}},ou=0,Ks,Ws;function au(e,t=!1){if(e.flags|=8,t){e.next=Ws,Ws=e;return}e.next=Ks,Ks=e}function ka(){ou++}function Ra(){if(--ou>0)return;if(Ws){let t=Ws;for(Ws=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;Ks;){let t=Ks;for(Ks=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 lu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function cu(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),$a(n),$g(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function Ia(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(uu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function uu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Gs)||(e.globalVersion=Gs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ia(e))))return;e.flags|=2;const t=e.dep,r=at,n=_r;at=e,_r=!0;try{lu(e);const s=e.fn(e._value);(t.version===0||Bt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{at=r,_r=n,cu(e),e.flags&=-3}}function $a(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)$a(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function $g(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function Pg(e,t){e.effect instanceof zs&&(e=e.effect.fn);const r=new zs(e);t&&Xe(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function Dg(e){e.effect.stop()}var _r=!0,du=[];function Fr(){du.push(_r),_r=!1}function Vr(){const e=du.pop();_r=e===void 0?!0:e}function fu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=at;at=void 0;try{t()}finally{at=r}}}var Gs=0,Og=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}},Ui=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(!at||!_r||at===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==at)t=this.activeLink=new Og(at,this),at.deps?(t.prevDep=at.depsTail,at.depsTail.nextDep=t,at.depsTail=t):at.deps=at.depsTail=t,pu(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=at.depsTail,t.nextDep=void 0,at.depsTail.nextDep=t,at.depsTail=t,at.deps===t&&(at.deps=r)}return t}trigger(e){this.version++,Gs++,this.notify(e)}notify(e){ka();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{Ra()}}};function pu(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)pu(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var zi=new WeakMap,zn=Symbol(""),Pa=Symbol(""),Js=Symbol("");function Dt(e,t,r){if(_r&&at){let n=zi.get(e);n||zi.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new Ui),s.map=n,s.key=r),s.track()}}function jr(e,t,r,n,s,i){const o=zi.get(e);if(!o){Gs++;return}const a=l=>{l&&l.trigger()};if(ka(),t==="clear")o.forEach(a);else{const l=_e(e),u=l&&Ni(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===Js||!yr(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(Js)),t){case"add":l?u&&a(o.get("length")):(a(o.get(zn)),ds(e)&&a(o.get(Pa)));break;case"delete":l||(a(o.get(zn)),ds(e)&&a(o.get(Pa)));break;case"set":ds(e)&&a(o.get(zn));break}}Ra()}function Hg(e,t){const r=zi.get(e);return r&&r.get(t)}function gs(e){const t=ze(e);return t===e?t:(Dt(t,"iterate",Js),Wt(e)?t:t.map(Sr))}function Ki(e){return Dt(e=ze(e),"iterate",Js),e}function gn(e,t){return Ir(e)?vs(Wr(e)?Sr(t):t):Sr(t)}var Mg={__proto__:null,[Symbol.iterator](){return Da(this,Symbol.iterator,e=>gn(this,e))},concat(...e){return gs(this).concat(...e.map(t=>_e(t)?gs(t):t))},entries(){return Da(this,"entries",e=>(e[1]=gn(this,e[1]),e))},every(e,t){return Ur(this,"every",e,t,void 0,arguments)},filter(e,t){return Ur(this,"filter",e,t,r=>r.map(n=>gn(this,n)),arguments)},find(e,t){return Ur(this,"find",e,t,r=>gn(this,r),arguments)},findIndex(e,t){return Ur(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ur(this,"findLast",e,t,r=>gn(this,r),arguments)},findLastIndex(e,t){return Ur(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ur(this,"forEach",e,t,void 0,arguments)},includes(...e){return Oa(this,"includes",e)},indexOf(...e){return Oa(this,"indexOf",e)},join(e){return gs(this).join(e)},lastIndexOf(...e){return Oa(this,"lastIndexOf",e)},map(e,t){return Ur(this,"map",e,t,void 0,arguments)},pop(){return Ys(this,"pop")},push(...e){return Ys(this,"push",e)},reduce(e,...t){return hu(this,"reduce",e,t)},reduceRight(e,...t){return hu(this,"reduceRight",e,t)},shift(){return Ys(this,"shift")},some(e,t){return Ur(this,"some",e,t,void 0,arguments)},splice(...e){return Ys(this,"splice",e)},toReversed(){return gs(this).toReversed()},toSorted(e){return gs(this).toSorted(e)},toSpliced(...e){return gs(this).toSpliced(...e)},unshift(...e){return Ys(this,"unshift",e)},values(){return Da(this,"values",e=>gn(this,e))}};function Da(e,t,r){const n=Ki(e),s=n[t]();return n!==e&&!Wt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var Ng=Array.prototype;function Ur(e,t,r,n,s,i){const o=Ki(e),a=o!==e&&!Wt(e),l=o[t];if(l!==Ng[t]){const d=l.apply(e,i);return a?Sr(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,gn(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 hu(e,t,r,n){const s=Ki(e);let i=r;return s!==e&&(Wt(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,gn(e,a),l,e)}),s[t](i,...n)}function Oa(e,t,r){const n=ze(e);Dt(n,"iterate",Js);const s=n[t](...r);return(s===-1||s===!1)&&Zs(r[0])?(r[0]=ze(r[0]),n[t](...r)):s}function Ys(e,t,r=[]){Fr(),ka();const n=ze(e)[t].apply(e,r);return Ra(),Vr(),n}var qg=Vs("__proto__,__v_isRef,__isVue"),gu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yr));function Bg(e){yr(e)||(e=String(e));const t=ze(this);return Dt(t,"has",e),t.hasOwnProperty(e)}var vu=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?Su:_u:s?bu:yu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=_e(e);if(!n){let a;if(i&&(a=Mg[t]))return a;if(t==="hasOwnProperty")return Bg}const o=Reflect.get(e,t,nt(e)?e:r);if((yr(t)?gu.has(t):qg(t))||(n||Dt(e,"get",t),s))return o;if(nt(o)){const a=i&&Ni(t)?o:o.value;return n&&Je(a)?Ot(a):a}return Je(o)?n?Ot(o):zr(o):o}},mu=class extends vu{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=_e(e)&&Ni(t);if(!this._isShallow){const l=Ir(s);if(!Wt(r)&&!Ir(r)&&(s=ze(s),r=ze(r)),!i&&nt(s)&&!nt(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Ze(e,t),a=Reflect.set(e,t,r,nt(e)?e:n);return e===ze(n)&&(o?Bt(r,s)&&jr(e,"set",t,r,s):jr(e,"add",t,r)),a}deleteProperty(e,t){const r=Ze(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&jr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!yr(t)||!gu.has(t))&&Dt(e,"has",t),r}ownKeys(e){return Dt(e,"iterate",_e(e)?"length":zn),Reflect.ownKeys(e)}},wu=class extends vu{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},Lg=new mu,Fg=new wu,Vg=new mu(!0),jg=new wu(!0),Ha=e=>e,Wi=e=>Reflect.getPrototypeOf(e);function Ug(e,t,r){return function(...n){const s=this.__v_raw,i=ze(s),o=ds(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?Ha:t?vs:Sr;return!t&&Dt(i,"iterate",l?Pa:zn),Xe(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 Gi(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function zg(e,t){const r={get(n){const s=this.__v_raw,i=ze(s),o=ze(n);e||(Bt(n,o)&&Dt(i,"get",n),Dt(i,"get",o));const{has:a}=Wi(i),l=t?Ha:e?vs:Sr;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&&Dt(ze(n),"iterate",zn),n.size},has(n){const s=this.__v_raw,i=ze(s),o=ze(n);return e||(Bt(n,o)&&Dt(i,"has",n),Dt(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=ze(o),l=t?Ha:e?vs:Sr;return!e&&Dt(a,"iterate",zn),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return Xe(r,e?{add:Gi("add"),set:Gi("set"),delete:Gi("delete"),clear:Gi("clear")}:{add(n){!t&&!Wt(n)&&!Ir(n)&&(n=ze(n));const s=ze(this);return Wi(s).has.call(s,n)||(s.add(n),jr(s,"add",n,n)),this},set(n,s){!t&&!Wt(s)&&!Ir(s)&&(s=ze(s));const i=ze(this),{has:o,get:a}=Wi(i);let l=o.call(i,n);l||(n=ze(n),l=o.call(i,n));const u=a.call(i,n);return i.set(n,s),l?Bt(s,u)&&jr(i,"set",n,s,u):jr(i,"add",n,s),this},delete(n){const s=ze(this),{has:i,get:o}=Wi(s);let a=i.call(s,n);a||(n=ze(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,u=s.delete(n);return a&&jr(s,"delete",n,void 0,l),u},clear(){const n=ze(this),s=n.size!==0,i=void 0,o=n.clear();return s&&jr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=Ug(n,e,t)}),r}function Ji(e,t){const r=zg(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 Kg={get:Ji(!1,!1)},Wg={get:Ji(!1,!0)},Gg={get:Ji(!0,!1)},Jg={get:Ji(!0,!0)},yu=new WeakMap,bu=new WeakMap,_u=new WeakMap,Su=new WeakMap;function Yg(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Zg(e){return e.__v_skip||!Object.isExtensible(e)?0:Yg(bg(e))}function zr(e){return Ir(e)?e:Yi(e,!1,Lg,Kg,yu)}function Cu(e){return Yi(e,!1,Vg,Wg,bu)}function Ot(e){return Yi(e,!0,Fg,Gg,_u)}function Kr(e){return Yi(e,!0,jg,Jg,Su)}function Yi(e,t,r,n,s){if(!Je(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=Zg(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 Wr(e){return Ir(e)?Wr(e.__v_raw):!!(e&&e.__v_isReactive)}function Ir(e){return!!(e&&e.__v_isReadonly)}function Wt(e){return!!(e&&e.__v_isShallow)}function Zs(e){return e?!!e.__v_raw:!1}function ze(e){const t=e&&e.__v_raw;return t?ze(t):e}function Ma(e){return!Ze(e,"__v_skip")&&Object.isExtensible(e)&&eu(e,"__v_skip",!0),e}var Sr=e=>Je(e)?zr(e):e,vs=e=>Je(e)?Ot(e):e;function nt(e){return e?e.__v_isRef===!0:!1}function F(e){return xu(e,!1)}function ut(e){return xu(e,!0)}function xu(e,t){return nt(e)?e:new Xg(e,t)}var Xg=class{constructor(e,t){this.dep=new Ui,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ze(e),this._value=t?e:Sr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Wt(e)||Ir(e);e=r?e:ze(e),Bt(e,t)&&(this._rawValue=e,this._value=r?e:Sr(e),this.dep.trigger())}};function Tu(e){e.dep&&e.dep.trigger()}function f(e){return nt(e)?e.value:e}function Ae(e){return Ie(e)?e():f(e)}var Qg={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return nt(s)&&!nt(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Na(e){return Wr(e)?e:new Proxy(e,Qg)}var ev=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Ui,{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 Xs(e){return new ev(e)}function Ht(e){const t=_e(e)?new Array(e.length):{};for(const r in e)t[r]=Eu(e,r);return t}var tv=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=ze(e);let n=!0,s=e;if(!_e(e)||!Ni(String(t)))do n=!Zs(s)||Wt(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&&nt(this._raw[this._key])){const t=this._object[this._key];if(nt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Hg(this._raw,this._key)}},rv=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 qa(e,t,r){return nt(e)?e:Ie(e)?new rv(e):Je(e)&&arguments.length>1?Eu(e,t,r):F(e)}function Eu(e,t,r){return new tv(e,t,r)}var nv=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ui(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Gs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&at!==this)return au(this,!0),!0}get value(){const e=this.dep.track();return uu(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function sv(e,t,r=!1){let n,s;return Ie(e)?n=e:(n=e.get,s=e.set),new nv(n,s,r)}var iv={GET:"get",HAS:"has",ITERATE:"iterate"},ov={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Zi={},Xi=new WeakMap,vn=void 0;function av(){return vn}function Au(e,t=!1,r=vn){if(r){let n=Xi.get(r);n||Xi.set(r,n=[]),n.push(e)}}function lv(e,t,r=Ue){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=S=>s?S:Wt(S)||s===!1||s===0?Gr(S,1):Gr(S);let c,d,p,h,m=!1,w=!1;if(nt(e)?(d=()=>e.value,m=Wt(e)):Wr(e)?(d=()=>u(e),m=!0):_e(e)?(w=!0,m=e.some(S=>Wr(S)||Wt(S)),d=()=>e.map(S=>{if(nt(S))return S.value;if(Wr(S))return u(S);if(Ie(S))return l?l(S,2):S()})):Ie(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Fr();try{p()}finally{Vr()}}const S=vn;vn=c;try{return l?l(e,3,[h]):e(h)}finally{vn=S}}:d=or,t&&s){const S=d,E=s===!0?1/0:s;d=()=>Gr(S(),E)}const T=ji(),g=()=>{c.stop(),T&&T.active&&_a(T.effects,c)};if(i&&t){const S=t;t=(...E)=>{S(...E),g()}}let C=w?new Array(e.length).fill(Zi):Zi;const _=S=>{if(!(!(c.flags&1)||!c.dirty&&!S))if(t){const E=c.run();if(s||m||(w?E.some((I,N)=>Bt(I,C[N])):Bt(E,C))){p&&p();const I=vn;vn=c;try{const N=[E,C===Zi?void 0:w&&C[0]===Zi?[]:C,h];C=E,l?l(t,3,N):t(...N)}finally{vn=I}}}else c.run()};return a&&a(_),c=new zs(d),c.scheduler=o?()=>o(_,!1):_,h=S=>Au(S,!1,c),p=c.onStop=()=>{const S=Xi.get(c);if(S){if(l)l(S,4);else for(const E of S)E();Xi.delete(c)}},t?n?_(!0):C=c.run():o?o(_.bind(null,!0),!0):c.run(),g.pause=c.pause.bind(c),g.resume=c.resume.bind(c),g.stop=g,g}function Gr(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--,nt(e))Gr(e.value,t,r);else if(_e(e))for(let n=0;n<e.length;n++)Gr(e[n],t,r);else if(jn(e)||ds(e))e.forEach(n=>{Gr(n,t,r)});else if(Mi(e)){for(const n in e)Gr(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Gr(e[n],t,r)}return e}var ku=[];function cv(e){ku.push(e)}function uv(){ku.pop()}function dv(e,t){}var fv={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"},pv={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 ms(e,t,r,n){try{return n?e(...n):e()}catch(s){Kn(s,t,r)}}function ar(e,t,r,n){if(Ie(e)){const s=ms(e,t,r,n);return s&&Sa(s)&&s.catch(i=>{Kn(i,t,r)}),s}if(_e(e)){const s=[];for(let i=0;i<e.length;i++)s.push(ar(e[i],t,r,n));return s}}function Kn(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||Ue;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){Fr(),ms(i,null,10,[e,l,u]),Vr();return}}hv(e,r,s,n,o)}function hv(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Lt=[],$r=-1,ws=[],mn=null,ys=0,Ru=Promise.resolve(),Qi=null;function Tt(e){const t=Qi||Ru;return e?t.then(this?e.bind(this):e):t}function gv(e){let t=$r+1,r=Lt.length;for(;t<r;){const n=t+r>>>1,s=Lt[n],i=ei(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Ba(e){if(!(e.flags&1)){const t=ei(e),r=Lt[Lt.length-1];!r||!(e.flags&2)&&t>=ei(r)?Lt.push(e):Lt.splice(gv(t),0,e),e.flags|=1,Iu()}}function Iu(){Qi||(Qi=Ru.then(Pu))}function Qs(e){_e(e)?ws.push(...e):mn&&e.id===-1?mn.splice(ys+1,0,e):e.flags&1||(ws.push(e),e.flags|=1),Iu()}function $u(e,t,r=$r+1){for(;r<Lt.length;r++){const n=Lt[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Lt.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function eo(e){if(ws.length){const t=[...new Set(ws)].sort((r,n)=>ei(r)-ei(n));if(ws.length=0,mn){mn.push(...t);return}for(mn=t,ys=0;ys<mn.length;ys++){const r=mn[ys];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}mn=null,ys=0}}var ei=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pu(e){try{for($r=0;$r<Lt.length;$r++){const t=Lt[$r];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ms(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;$r<Lt.length;$r++){const t=Lt[$r];t&&(t.flags&=-2)}$r=-1,Lt.length=0,eo(e),Qi=null,(Lt.length||ws.length)&&Pu(e)}}var bs,to=[];function Du(e,t){var r,n;bs=e,bs?(bs.enabled=!0,to.forEach(({event:s,args:i})=>bs.emit(s,...i)),to=[]):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=>{Du(s,t)}),setTimeout(()=>{bs||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,to=[])},3e3)):to=[]}var Rt=null,ro=null;function ti(e){const t=Rt;return Rt=e,ro=e&&e.type.__scopeId||null,t}function vv(e){ro=e}function mv(){ro=null}var wv=e=>k;function k(e,t=Rt,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&hi(-1);const i=ti(t);let o;try{o=e(...s)}finally{ti(i),n._d&&hi(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function no(e,t){if(Rt===null)return e;const r=gi(Rt),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Ue]=t[s];i&&(Ie(i)&&(i={mounted:i,updated:i}),i.deep&&Gr(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Pr(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&&(Fr(),ar(l,r,8,[e.el,a,e,t]),Vr())}}function Wn(e,t){if(It){let r=It.provides;const n=It.parent&&It.parent.provides;n===r&&(r=It.provides=Object.create(n)),r[e]=t}}function Ft(e,t,r=!1){const n=ht();if(n||Gn){let s=Gn?Gn._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&&Ie(t)?t.call(n&&n.proxy):t}}function yv(){return!!(ht()||Gn)}var Ou=Symbol.for("v-scx"),Hu=()=>{{const e=Ft(Ou);return e}};function lt(e,t){return ri(e,null,t)}function La(e,t){return ri(e,null,{flush:"post"})}function Mu(e,t){return ri(e,null,{flush:"sync"})}function Oe(e,t,r){return ri(e,t,r)}function ri(e,t,r=Ue){const{immediate:n,deep:s,flush:i,once:o}=r,a=Xe({},r),l=t&&n||!t&&i!=="post";let u;if(As){if(i==="sync"){const h=Hu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=or,h.resume=or,h.pause=or,h}}const c=It;a.call=(h,m,w)=>ar(h,c,m,w);let d=!1;i==="post"?a.scheduler=h=>{vt(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Ba(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=lv(e,t,a);return As&&(u?u.push(p):l&&p()),p}function bv(e,t,r){const n=this.proxy,s=ot(e)?e.includes(".")?Nu(n,e):()=>n[e]:e.bind(n,n);let i;Ie(t)?i=t:(i=t.handler,r=t);const o=Xn(this),a=ri(s,i.bind(n),r);return o(),a}function Nu(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 qu=Symbol("_vte"),Bu=e=>e.__isTeleport,ni=e=>e&&(e.disabled||e.disabled===""),Lu=e=>e&&(e.defer||e.defer===""),Fu=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Vu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Fa=(e,t)=>{const r=e&&e.to;return ot(r)?t?t(r):null:r},ju={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:T}}=u,g=ni(t.props);let{shapeFlag:C,children:_,dynamicChildren:S}=t;if(e==null){const E=t.el=w(""),I=t.anchor=w("");h(E,r,n),h(I,r,n);const N=(H,M)=>{C&16&&c(_,H,M,s,i,o,a,l)},v=()=>{const H=t.target=Fa(t.props,m),M=ja(H,t,w,h);H&&(o!=="svg"&&Fu(H)?o="svg":o!=="mathml"&&Vu(H)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(H),g||(N(H,M),io(t,!1)))};g&&(N(r,I),io(t,!0)),Lu(t.props)?(t.el.__isMounted=!1,vt(()=>{v(),delete t.el.__isMounted},i)):v()}else{if(Lu(t.props)&&e.el.__isMounted===!1){vt(()=>{ju.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const E=t.anchor=e.anchor,I=t.target=e.target,N=t.targetAnchor=e.targetAnchor,v=ni(e.props),H=v?r:I,M=v?E:N;if(o==="svg"||Fu(I)?o="svg":(o==="mathml"||Vu(I))&&(o="mathml"),S?(p(e.dynamicChildren,S,H,s,i,o,a),cl(e,t,!0)):l||d(e,t,H,M,s,i,o,a,!1),g)v?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):so(t,r,E,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const x=t.target=Fa(t.props,m);x&&so(t,x,null,u,0)}else v&&so(t,I,N,u,1);io(t,g)}},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||!ni(p);for(let m=0;m<a.length;m++){const w=a[m];n(w,t,r,h,!!w.dynamicChildren)}}},move:so,hydrate:_v};function so(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||ni(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function _v(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(T,g){let C=g;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,T._lpa=t.targetAnchor&&o(t.targetAnchor);break}}C=o(C)}}function h(T,g){g.anchor=d(o(T),g,a(T),r,n,s,i)}const m=t.target=Fa(t.props,l),w=ni(t.props);if(m){const T=m._lpa||m.firstChild;t.shapeFlag&16&&(w?(h(e,t),p(m,T),t.targetAnchor||ja(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,T),t.targetAnchor||ja(m,t,c,u),d(T&&o(T),t,m,r,n,s,i))),io(t,w)}else w&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var Va=ju;function io(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 ja(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[qu]=o,e&&(n(i,e,s),n(o,e,s)),o}var Dr=Symbol("_leaveCb"),si=Symbol("_enterCb");function Ua(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Qe(()=>{e.isMounted=!0}),Ts(()=>{e.isUnmounting=!0}),e}var lr=[Function,Array],za={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:lr,onEnter:lr,onAfterEnter:lr,onEnterCancelled:lr,onBeforeLeave:lr,onLeave:lr,onAfterLeave:lr,onLeaveCancelled:lr,onBeforeAppear:lr,onAppear:lr,onAfterAppear:lr,onAppearCancelled:lr},Uu=e=>{const t=e.subTree;return t.component?Uu(t.component):t},Sv={name:"BaseTransition",props:za,setup(e,{slots:t}){const r=ht(),n=Ua();return()=>{const s=t.default&&oo(t.default(),!0);if(!s||!s.length)return;const i=zu(s),o=ze(e),{mode:a}=o;if(n.isLeaving)return Ka(i);const l=Gu(i);if(!l)return Ka(i);let u=_s(l,o,n,r,d=>u=d);l.type!==pt&&Jr(l,u);let c=r.subTree&&Gu(r.subTree);if(c&&c.type!==pt&&!Cr(c,l)&&Uu(r).type!==pt){let d=_s(c,o,n,r);if(Jr(c,d),a==="out-in"&&l.type!==pt)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!==pt?d.delayLeave=(p,h,m)=>{const w=Wu(n,c);w[String(c.key)]=c,p[Dr]=()=>{h(),p[Dr]=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 zu(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==pt){t=r;break}}return t}var Ku=Sv;function Wu(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 _s(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:T,onAppear:g,onAfterAppear:C,onAppearCancelled:_}=t,S=String(e.key),E=Wu(r,e),I=(H,M)=>{H&&ar(H,n,9,M)},N=(H,M)=>{const x=M[1];I(H,M),_e(H)?H.every(b=>b.length<=1)&&x():H.length<=1&&x()},v={mode:o,persisted:a,beforeEnter(H){let M=l;if(!r.isMounted)if(i)M=T||l;else return;H[Dr]&&H[Dr](!0);const x=E[S];x&&Cr(e,x)&&x.el[Dr]&&x.el[Dr](),I(M,[H])},enter(H){if(E[S]===e)return;let M=u,x=c,b=d;if(!r.isMounted)if(i)M=g||u,x=C||c,b=_||d;else return;let y=!1;H[si]=q=>{y||(y=!0,q?I(b,[H]):I(x,[H]),v.delayedLeave&&v.delayedLeave(),H[si]=void 0)};const O=H[si].bind(null,!1);M?N(M,[H,O]):O()},leave(H,M){const x=String(e.key);if(H[si]&&H[si](!0),r.isUnmounting)return M();I(p,[H]);let b=!1;H[Dr]=O=>{b||(b=!0,M(),O?I(w,[H]):I(m,[H]),H[Dr]=void 0,E[x]===e&&delete E[x])};const y=H[Dr].bind(null,!1);E[x]=e,h?N(h,[H,y]):y()},clone(H){const M=_s(H,t,r,n,s);return s&&s(M),M}};return v}function Ka(e){if(ii(e))return e=xr(e),e.children=null,e}function Gu(e){if(!ii(e))return Bu(e.type)&&e.children?zu(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&&Ie(r.default))return r.default()}}function Jr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Jr(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 oo(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===Ke?(o.patchFlag&128&&s++,n=n.concat(oo(o.children,t,a))):(t||o.type!==pt)&&n.push(a!=null?xr(o,{key:a}):o)}if(s>1)for(let i=0;i<n.length;i++)n[i].patchFlag=-2;return n}function X(e,t){return Ie(e)?Xe({name:e.name},t,{setup:e}):e}function Ju(){const e=ht();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Wa(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Cv(e){const t=ht(),r=ut(null);if(t){const n=t.refs===Ue?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}function Yu(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var ao=new WeakMap;function Ss(e,t,r,n,s=!1){if(_e(e)){e.forEach((w,T)=>Ss(w,t&&(_e(t)?t[T]:t),r,n,s));return}if(Yr(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Ss(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?gi(n.component):n.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===Ue?a.refs={}:a.refs,d=a.setupState,p=ze(d),h=d===Ue?Zc:w=>Yu(c,w)?!1:Ze(p,w),m=(w,T)=>!(T&&Yu(c,T));if(u!=null&&u!==l){if(Zu(t),ot(u))c[u]=null,h(u)&&(d[u]=null);else if(nt(u)){const w=t;m(u,w.k)&&(u.value=null),w.k&&(c[w.k]=null)}}if(Ie(l))ms(l,a,12,[o,c]);else{const w=ot(l),T=nt(l);if(w||T){const g=()=>{if(e.f){const C=w?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)_e(C)&&_a(C,i);else if(_e(C))C.includes(i)||C.push(i);else if(w)c[l]=[i],h(l)&&(d[l]=c[l]);else{const _=[i];m(l,e.k)&&(l.value=_),e.k&&(c[e.k]=_)}}else w?(c[l]=o,h(l)&&(d[l]=o)):T&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const C=()=>{g(),ao.delete(e)};C.id=-1,ao.set(e,C),vt(C,r)}else Zu(e),g()}}}function Zu(e){const t=ao.get(e);t&&(t.flags|=8,ao.delete(e))}var Xu=!1,Cs=()=>{Xu||(console.error("Hydration completed but contains mismatches."),Xu=!0)},xv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Tv=e=>e.namespaceURI.includes("MathML"),lo=e=>{if(e.nodeType===1){if(xv(e))return"svg";if(Tv(e))return"mathml"}},xs=e=>e.nodeType===8;function Ev(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(_,S)=>{if(!S.hasChildNodes()){r(null,_,S),eo(),S._vnode=_;return}d(S.firstChild,_,null,null,null),eo(),S._vnode=_},d=(_,S,E,I,N,v=!1)=>{v=v||!!S.dynamicChildren;const H=xs(_)&&_.data==="[",M=()=>w(_,S,E,I,N,H),{type:x,ref:b,shapeFlag:y,patchFlag:O}=S;let q=_.nodeType;S.el=_,O===-2&&(v=!1,S.dynamicChildren=null);let B=null;switch(x){case wn:q!==3?S.children===""?(l(S.el=s(""),o(_),_),B=_):B=M():(_.data!==S.children&&(Cs(),_.data=S.children),B=i(_));break;case pt:C(_)?(B=i(_),g(S.el=_.content.firstChild,_,E)):q!==8||H?B=M():B=i(_);break;case Yn:if(H&&(_=i(_),q=_.nodeType),q===1||q===3){B=_;const Z=!S.children.length;for(let W=0;W<S.staticCount;W++)Z&&(S.children+=B.nodeType===1?B.outerHTML:B.data),W===S.staticCount-1&&(S.anchor=B),B=i(B);return H?i(B):B}else M();break;case Ke:H?B=m(_,S,E,I,N,v):B=M();break;default:if(y&1)(q!==1||S.type.toLowerCase()!==_.tagName.toLowerCase())&&!C(_)?B=M():B=p(_,S,E,I,N,v);else if(y&6){S.slotScopeIds=N;const Z=o(_);if(H?B=T(_):xs(_)&&_.data==="teleport start"?B=T(_,_.data,"teleport end"):B=i(_),t(S,Z,null,E,I,lo(Z),v),Yr(S)&&!S.type.__asyncResolved){let W;H?(W=D(Ke),W.anchor=B?B.previousSibling:Z.lastChild):W=_.nodeType===3?qe(""):D("div"),W.el=_,S.component.subTree=W}}else y&64?q!==8?B=M():B=S.type.hydrate(_,S,E,I,N,v,e,h):y&128&&(B=S.type.hydrate(_,S,E,I,lo(o(_)),N,v,e,d))}return b!=null&&Ss(b,null,I,S),B},p=(_,S,E,I,N,v)=>{v=v||!!S.dynamicChildren;const{type:H,props:M,patchFlag:x,shapeFlag:b,dirs:y,transition:O}=S,q=H==="input"||H==="option";if(q||x!==-1){y&&Pr(S,null,E,"created");let B=!1;if(C(_)){B=Od(null,O)&&E&&E.vnode.props&&E.vnode.props.appear;const W=_.content.firstChild;if(B){const le=W.getAttribute("class");le&&(W.$cls=le),O.beforeEnter(W)}g(W,_,E),S.el=_=W}if(b&16&&!(M&&(M.innerHTML||M.textContent))){let W=h(_.firstChild,S,_,E,I,N,v);for(;W;){co(_,1)||Cs();const le=W;W=W.nextSibling,a(le)}}else if(b&8){let W=S.children;W[0]===`
|
|
4
|
+
`&&(_.tagName==="PRE"||_.tagName==="TEXTAREA")&&(W=W.slice(1));const{textContent:le}=_;le!==W&&le!==W.replace(/\r\n|\r/g,`
|
|
5
|
+
`)&&(co(_,0)||Cs(),_.textContent=S.children)}if(M){if(q||!v||x&48){const W=_.tagName.includes("-");for(const le in M)(q&&(le.endsWith("value")||le==="indeterminate")||js(le)&&!Un(le)||le[0]==="."||W&&!Un(le))&&n(_,le,null,M[le],void 0,E)}else if(M.onClick)n(_,"onClick",null,M.onClick,void 0,E);else if(x&4&&Wr(M.style))for(const W in M.style)M.style[W]}let Z;(Z=M&&M.onVnodeBeforeMount)&&Jt(Z,E,S),y&&Pr(S,null,E,"beforeMount"),((Z=M&&M.onVnodeMounted)||y||B)&&Bd(()=>{Z&&Jt(Z,E,S),B&&O.enter(_),y&&Pr(S,null,E,"mounted")},I)}return _.nextSibling},h=(_,S,E,I,N,v,H)=>{H=H||!!S.dynamicChildren;const M=S.children,x=M.length;for(let b=0;b<x;b++){const y=H?M[b]:M[b]=Gt(M[b]),O=y.type===wn;_?(O&&!H&&b+1<x&&Gt(M[b+1]).type===wn&&(l(s(_.data.slice(y.children.length)),E,i(_)),_.data=y.children),_=d(_,y,I,N,v,H)):O&&!y.children?l(y.el=s(""),E):(co(E,1)||Cs(),r(null,y,E,null,I,N,lo(E),v))}return _},m=(_,S,E,I,N,v)=>{const{slotScopeIds:H}=S;H&&(N=N?N.concat(H):H);const M=o(_),x=h(i(_),S,M,E,I,N,v);return x&&xs(x)&&x.data==="]"?i(S.anchor=x):(Cs(),l(S.anchor=u("]"),M,x),x)},w=(_,S,E,I,N,v)=>{if(co(_.parentElement,1)||Cs(),S.el=null,v){const x=T(_);for(;;){const b=i(_);if(b&&b!==x)a(b);else break}}const H=i(_),M=o(_);return a(_),r(null,S,M,H,E,I,lo(M),N),E&&(E.vnode.el=S.el,mo(E,S.el)),H},T=(_,S="[",E="]")=>{let I=0;for(;_;)if(_=i(_),_&&xs(_)&&(_.data===S&&I++,_.data===E)){if(I===0)return i(_);I--}return _},g=(_,S,E)=>{const I=S.parentNode;I&&I.replaceChild(_,S);let N=E;for(;N;)N.vnode.el===S&&(N.vnode.el=N.subTree.el=_),N=N.parent},C=_=>_.nodeType===1&&_.tagName==="TEMPLATE";return[c,d]}var Qu="data-allow-mismatch",Av={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function co(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Qu);)e=e.parentElement;const r=e&&e.getAttribute(Qu);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(Av[t])}}var kv=Fi().requestIdleCallback||(e=>setTimeout(e,1)),Rv=Fi().cancelIdleCallback||(e=>clearTimeout(e)),Iv=(e=1e4)=>t=>{const r=kv(t,{timeout:e});return()=>Rv(r)};function $v(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 Pv=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($v(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},Dv=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},Ov=(e=[])=>(t,r)=>{ot(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 Hv(e,t){if(xs(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(xs(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var Yr=e=>!!e.type.__asyncLoader;function Mv(e){Ie(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((T,g)=>{l(w,()=>T(p()),()=>g(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 X({name:"AsyncComponentWrapper",__asyncLoader:h,__asyncHydrate(m,w,T){let g=!1;(w.bu||(w.bu=[])).push(()=>g=!0);const C=()=>{g||T()},_=i?()=>{const S=i(C,E=>Hv(m,E));S&&(w.bum||(w.bum=[])).push(S)}:C;c?_():h().then(()=>!w.isUnmounted&&_())},get __asyncResolved(){return c},setup(){const m=It;if(Wa(m),c)return()=>uo(c,m);const w=_=>{u=null,Kn(_,m,13,!n)};if(a&&m.suspense||As)return h().then(_=>()=>uo(_,m)).catch(_=>(w(_),()=>n?D(n,{error:_}):null));const T=F(!1),g=F(),C=F(!!s);return s&&setTimeout(()=>{C.value=!1},s),o!=null&&setTimeout(()=>{if(!T.value&&!g.value){const _=new Error(`Async component timed out after ${o}ms.`);w(_),g.value=_}},o),h().then(()=>{T.value=!0,m.parent&&ii(m.parent.vnode)&&m.parent.update()}).catch(_=>{w(_),g.value=_}),()=>{if(T.value&&c)return uo(c,m);if(g.value&&n)return D(n,{error:g.value});if(r&&!C.value)return uo(r,m)}}})}function uo(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=D(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var ii=e=>e.type.__isKeepAlive,Nv={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=ht(),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,_,S,E,I)=>{const N=C.component;u(C,_,S,0,a),l(N.vnode,C,_,S,N,a,E,C.slotScopeIds,I),vt(()=>{N.isDeactivated=!1,N.a&&hs(N.a);const v=C.props&&C.props.onVnodeMounted;v&&Jt(v,N.parent,C)},a)},n.deactivate=C=>{const _=C.component;wo(_.m),wo(_.a),u(C,p,null,1,a),vt(()=>{_.da&&hs(_.da);const S=C.props&&C.props.onVnodeUnmounted;S&&Jt(S,_.parent,C),_.isDeactivated=!0},a)};function h(C){Ga(C),c(C,r,a,!0)}function m(C){s.forEach((_,S)=>{const E=vl(Yr(_)?_.type.__asyncResolved||{}:_.type);E&&!C(E)&&w(S)})}function w(C){const _=s.get(C);_&&(!o||!Cr(_,o))?h(_):o&&Ga(o),s.delete(C),i.delete(C)}Oe(()=>[e.include,e.exclude],([C,_])=>{C&&m(S=>oi(C,S)),_&&m(S=>!oi(_,S))},{flush:"post",deep:!0});let T=null;const g=()=>{T!=null&&(yo(r.subTree.type)?vt(()=>{s.set(T,fo(r.subTree))},r.subTree.suspense):s.set(T,fo(r.subTree)))};return Qe(g),ai(g),Ts(()=>{s.forEach(C=>{const{subTree:_,suspense:S}=r,E=fo(_);if(C.type===E.type&&C.key===E.key){Ga(E);const I=E.component.da;I&&vt(I,S);return}h(C)})}),()=>{if(T=null,!t.default)return o=null;const C=t.default(),_=C[0];if(C.length>1)return o=null,C;if(!Xr(_)||!(_.shapeFlag&4)&&!(_.shapeFlag&128))return o=null,_;let S=fo(_);if(S.type===pt)return o=null,S;const E=S.type,I=vl(Yr(S)?S.type.__asyncResolved||{}:E),{include:N,exclude:v,max:H}=e;if(N&&(!I||!oi(N,I))||v&&I&&oi(v,I))return S.shapeFlag&=-257,o=S,_;const M=S.key==null?E:S.key,x=s.get(M);return S.el&&(S=xr(S),_.shapeFlag&128&&(_.ssContent=S)),T=M,x?(S.el=x.el,S.component=x.component,S.transition&&Jr(S,S.transition),S.shapeFlag|=512,i.delete(M),i.add(M)):(i.add(M),H&&i.size>parseInt(H,10)&&w(i.values().next().value)),S.shapeFlag|=256,o=S,yo(_.type)?_:S}}};function oi(e,t){return _e(e)?e.some(r=>oi(r,t)):ot(e)?e.split(",").includes(t):yg(e)?(e.lastIndex=0,e.test(t)):!1}function ed(e,t){rd(e,"a",t)}function td(e,t){rd(e,"da",t)}function rd(e,t,r=It){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(po(t,n,r),r){let s=r.parent;for(;s&&s.parent;)ii(s.parent.vnode)&&qv(n,t,r,s),s=s.parent}}function qv(e,t,r,n){const s=po(t,e,n,!0);Vt(()=>{_a(n[t],s)},r)}function Ga(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function fo(e){return e.shapeFlag&128?e.ssContent:e}function po(e,t,r=It,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Fr();const a=Xn(r),l=ar(t,r,e,o);return a(),Vr(),l});return n?s.unshift(i):s.push(i),i}}var Zr=e=>(t,r=It)=>{(!As||e==="sp")&&po(e,(...n)=>t(...n),r)},nd=Zr("bm"),Qe=Zr("m"),Ja=Zr("bu"),ai=Zr("u"),Ts=Zr("bum"),Vt=Zr("um"),sd=Zr("sp"),id=Zr("rtg"),od=Zr("rtc");function ad(e,t=It){po("ec",e,t)}var Ya="components",Bv="directives";function Lv(e,t){return Za(Ya,e,!0,t)||e}var ld=Symbol.for("v-ndc");function li(e){return ot(e)?Za(Ya,e,!1)||e:e||ld}function Fv(e){return Za(Bv,e)}function Za(e,t,r=!0,n=!1){const s=Rt||It;if(s){const i=s.type;if(e===Ya){const a=vl(i,!1);if(a&&(a===t||a===bt(t)||a===Us(bt(t))))return i}const o=cd(s[e]||i[e],t)||cd(s.appContext[e],t);return!o&&n?i:o}}function cd(e,t){return e&&(e[t]||e[bt(t)]||e[Us(bt(t))])}function cr(e,t,r,n){let s;const i=r&&r[n],o=_e(e);if(o||ot(e)){const a=o&&Wr(e);let l=!1,u=!1;a&&(l=!Wt(e),u=Ir(e),e=Ki(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?vs(Sr(e[c])):Sr(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 Vv(e,t){for(let r=0;r<t.length;r++){const n=t[r];if(_e(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 se(e,t,r={},n,s){if(Rt.ce||Rt.parent&&Yr(Rt.parent)&&Rt.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),R(),K(Ke,null,[D("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),R();const o=i&&Xa(i(r)),a=r.key||o&&o.key,l=K(Ke,{key:(a&&!yr(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 Xa(e){return e.some(t=>Xr(t)?!(t.type===pt||t.type===Ke&&!Xa(t.children)):!0)?e:null}function ud(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:ps(n)]=e[n];return r}var Qa=e=>e?Ud(e)?gi(e):Qa(e.parent):null,ci=Xe(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=>Qa(e.parent),$root:e=>Qa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>nl(e),$forceUpdate:e=>e.f||(e.f=()=>{Ba(e.update)}),$nextTick:e=>e.n||(e.n=Tt.bind(e.proxy)),$watch:e=>bv.bind(e)}),el=(e,t)=>e!==Ue&&!e.__isScriptSetup&&Ze(e,t),tl={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(el(n,t))return o[t]=1,n[t];if(s!==Ue&&Ze(s,t))return o[t]=2,s[t];if(Ze(i,t))return o[t]=3,i[t];if(r!==Ue&&Ze(r,t))return o[t]=4,r[t];rl&&(o[t]=0)}}const u=ci[t];let c,d;if(u)return t==="$attrs"&&Dt(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==Ue&&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 el(s,t)?(s[t]=r,!0):n!==Ue&&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!==Ue&&a[0]!=="$"&&Ze(e,a)||el(t,a)||Ze(i,a)||Ze(n,a)||Ze(ci,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)}},jv=Xe({},tl,{get(e,t){if(t!==Symbol.unscopables)return tl.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Cg(t)}});function Uv(){return null}function zv(){return null}function Kv(e){}function Wv(e){}function Gv(){return null}function Jv(){}function Yv(e,t){return null}function Zv(){return dd("useSlots").slots}function Xv(){return dd("useAttrs").attrs}function dd(e){const t=ht();return t.setupContext||(t.setupContext=Wd(t))}function ui(e){return _e(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function fd(e,t){const r=ui(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?_e(s)||Ie(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 Qv(e,t){return!e||!t?e||t:_e(e)&&_e(t)?e.concat(t):Xe({},ui(e),ui(t))}function em(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function tm(e){const t=ht();let r=e();So();const n=()=>{ht()!==t&&t.scope.off(),So()};return Sa(r)&&(r=r.catch(s=>{throw Xn(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{Xn(t),Promise.resolve().then(n)}]}var rl=!0;function rm(e){const t=nl(e),r=e.proxy,n=e.ctx;rl=!1,t.beforeCreate&&pd(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:T,beforeDestroy:g,beforeUnmount:C,destroyed:_,unmounted:S,render:E,renderTracked:I,renderTriggered:N,errorCaptured:v,serverPrefetch:H,expose:M,inheritAttrs:x,components:b,directives:y,filters:O}=t;if(u&&nm(u,n,null),o)for(const Z in o){const W=o[Z];Ie(W)&&(n[Z]=W.bind(r))}if(s){const Z=s.call(r,r);Je(Z)&&(e.data=zr(Z))}if(rl=!0,i)for(const Z in i){const W=i[Z],le=j({get:Ie(W)?W.bind(r,r):Ie(W.get)?W.get.bind(r,r):or,set:!Ie(W)&&Ie(W.set)?W.set.bind(r):or});Object.defineProperty(n,Z,{enumerable:!0,configurable:!0,get:()=>le.value,set:G=>le.value=G})}if(a)for(const Z in a)hd(a[Z],n,r,Z);if(l){const Z=Ie(l)?l.call(r):l;Reflect.ownKeys(Z).forEach(W=>{Wn(W,Z[W])})}c&&pd(c,e,"c");function B(Z,W){_e(W)?W.forEach(le=>Z(le.bind(r))):W&&Z(W.bind(r))}if(B(nd,d),B(Qe,p),B(Ja,h),B(ai,m),B(ed,w),B(td,T),B(ad,v),B(od,I),B(id,N),B(Ts,C),B(Vt,S),B(sd,H),_e(M))if(M.length){const Z=e.exposed||(e.exposed={});M.forEach(W=>{Object.defineProperty(Z,W,{get:()=>r[W],set:le=>r[W]=le,enumerable:!0})})}else e.exposed||(e.exposed={});E&&e.render===or&&(e.render=E),x!=null&&(e.inheritAttrs=x),b&&(e.components=b),y&&(e.directives=y),H&&Wa(e)}function nm(e,t,r=or){_e(e)&&(e=sl(e));for(const n in e){const s=e[n];let i;Je(s)?"default"in s?i=Ft(s.from||n,s.default,!0):i=Ft(s.from||n):i=Ft(s),nt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function pd(e,t,r){ar(_e(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function hd(e,t,r,n){let s=n.includes(".")?Nu(r,n):()=>r[n];if(ot(e)){const i=t[e];Ie(i)&&Oe(s,i)}else if(Ie(e))Oe(s,e.bind(r));else if(Je(e))if(_e(e))e.forEach(i=>hd(i,t,r,n));else{const i=Ie(e.handler)?e.handler.bind(r):t[e.handler];Ie(i)&&Oe(s,i,e)}}function nl(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=>ho(l,u,o,!0)),ho(l,t,o)),Je(t)&&i.set(t,l),l}function ho(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&ho(e,i,r,!0),s&&s.forEach(o=>ho(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=sm[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var sm={data:gd,props:vd,emits:vd,methods:di,computed:di,beforeCreate:jt,created:jt,beforeMount:jt,mounted:jt,beforeUpdate:jt,updated:jt,beforeDestroy:jt,beforeUnmount:jt,destroyed:jt,unmounted:jt,activated:jt,deactivated:jt,errorCaptured:jt,serverPrefetch:jt,components:di,directives:di,watch:om,provide:gd,inject:im};function gd(e,t){return t?e?function(){return Xe(Ie(e)?e.call(this,this):e,Ie(t)?t.call(this,this):t)}:t:e}function im(e,t){return di(sl(e),sl(t))}function sl(e){if(_e(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function jt(e,t){return e?[...new Set([].concat(e,t))]:t}function di(e,t){return e?Xe(Object.create(null),e,t):t}function vd(e,t){return e?_e(e)&&_e(t)?[...new Set([...e,...t])]:Xe(Object.create(null),ui(e),ui(t??{})):t}function om(e,t){if(!e)return t;if(!t)return e;const r=Xe(Object.create(null),e);for(const n in t)r[n]=jt(e[n],t[n]);return r}function md(){return{app:null,config:{isNativeTag:Zc,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 am=0;function lm(e,t){return function(n,s=null){Ie(n)||(n=Xe({},n)),s!=null&&!Je(s)&&(s=null);const i=md(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:am++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:Jd,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Ie(c.install)?(o.add(c),c.install(u,...d)):Ie(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||D(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,gi(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(ar(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=Gn;Gn=u;try{return c()}finally{Gn=d}}};return u}}var Gn=null;function cm(e,t,r=Ue){const n=ht(),s=bt(t),i=Kt(t),o=wd(e,s),a=Xs((l,u)=>{let c,d=Ue,p;return Mu(()=>{const h=e[s];Bt(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(!Bt(m,c)&&!(d!==Ue&&Bt(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),Bt(h,m)&&Bt(h,d)&&!Bt(m,p)&&u(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||Ue:a,done:!1}:{done:!0}}}},a}var wd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${bt(t)}Modifiers`]||e[`${Kt(t)}Modifiers`];function um(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||Ue;let s=r;const i=t.startsWith("update:"),o=i&&wd(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>ot(c)?c.trim():c)),o.number&&(s=r.map(Bi)));let a,l=n[a=ps(t)]||n[a=ps(bt(t))];!l&&i&&(l=n[a=ps(Kt(t))]),l&&ar(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,ar(u,e,6,s)}}var dm=new WeakMap;function yd(e,t,r=!1){const n=r?dm:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Ie(e)){const l=u=>{const c=yd(u,t,!0);c&&(a=!0,Xe(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):(_e(i)?i.forEach(l=>o[l]=null):Xe(o,i),Je(e)&&n.set(e,o),o)}function go(e,t){return!e||!js(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ze(e,t[0].toLowerCase()+t.slice(1))||Ze(e,Kt(t))||Ze(e,t))}function vo(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,T=ti(e);let g,C;try{if(r.shapeFlag&4){const S=s||n,E=S;g=Gt(u.call(E,S,c,d,h,p,m)),C=a}else{const S=t;g=Gt(S.length>1?S(d,{attrs:a,slots:o,emit:l}):S(d,null)),C=t.props?a:pm(a)}}catch(S){pi.length=0,Kn(S,e,1),g=D(pt)}let _=g;if(C&&w!==!1){const S=Object.keys(C),{shapeFlag:E}=_;S.length&&E&7&&(i&&S.some(ba)&&(C=hm(C,i)),_=xr(_,C,!1,!0))}return r.dirs&&(_=xr(_,null,!1,!0),_.dirs=_.dirs?_.dirs.concat(r.dirs):r.dirs),r.transition&&Jr(_,r.transition),g=_,ti(T),g}function fm(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(Xr(s)){if(s.type!==pt||s.children==="v-if"){if(r)return;r=s}}else return}return r}var pm=e=>{let t;for(const r in e)(r==="class"||r==="style"||js(r))&&((t||(t={}))[r]=e[r]);return t},hm=(e,t)=>{const r={};for(const n in e)(!ba(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function gm(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?bd(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(_d(o,n,p)&&!go(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?bd(n,o,u):!0:!!o;return!1}function bd(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(_d(t,e,i)&&!go(r,i))return!0}return!1}function _d(e,t,r){const n=e[r],s=t[r];return r==="style"&&Je(n)&&Je(s)?!Lr(n,s):n!==s}function mo({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 Sd={},Cd=()=>Object.create(Sd),xd=e=>Object.getPrototypeOf(e)===Sd;function vm(e,t,r,n=!1){const s={},i=Cd();e.propsDefaults=Object.create(null),Td(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:Cu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function mm(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=ze(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(go(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=bt(p);s[m]=il(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{Td(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Ze(t,d)&&((c=Kt(d))===d||!Ze(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=il(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&&jr(e.attrs,"set","")}function Td(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Un(l))continue;const u=t[l];let c;s&&Ze(s,c=bt(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:go(e.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,o=!0)}if(i){const l=ze(r),u=a||Ue;for(let c=0;c<i.length;c++){const d=i[c];r[d]=il(s,l,d,u[d],e,!Ze(u,d))}}return o}function il(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&&Ie(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=Xn(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===Kt(r))&&(n=!0))}return n}var wm=new WeakMap;function Ed(e,t,r=!1){const n=r?wm:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Ie(e)){const c=d=>{l=!0;const[p,h]=Ed(d,t,!0);Xe(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,us),us;if(_e(i))for(let c=0;c<i.length;c++){const d=bt(i[c]);Ad(d)&&(o[d]=Ue)}else if(i)for(const c in i){const d=bt(c);if(Ad(d)){const p=i[c],h=o[d]=_e(p)||Ie(p)?{type:p}:Xe({},p),m=h.type;let w=!1,T=!0;if(_e(m))for(let g=0;g<m.length;++g){const C=m[g],_=Ie(C)&&C.name;if(_==="Boolean"){w=!0;break}else _==="String"&&(T=!1)}else w=Ie(m)&&m.name==="Boolean";h[0]=w,h[1]=T,(w||Ze(h,"default"))&&a.push(d)}}const u=[o,a];return Je(e)&&n.set(e,u),u}function Ad(e){return e[0]!=="$"&&!Un(e)}var ol=e=>e==="_"||e==="_ctx"||e==="$stable",al=e=>_e(e)?e.map(Gt):[Gt(e)],ym=(e,t,r)=>{if(t._n)return t;const n=k((...s)=>al(t(...s)),r);return n._c=!1,n},kd=(e,t,r)=>{const n=e._ctx;for(const s in e){if(ol(s))continue;const i=e[s];if(Ie(i))t[s]=ym(s,i,n);else if(i!=null){const o=al(i);t[s]=()=>o}}},Rd=(e,t)=>{const r=al(t);e.slots.default=()=>r},Id=(e,t,r)=>{for(const n in t)(r||!ol(n))&&(e[n]=t[n])},bm=(e,t,r)=>{const n=e.slots=Cd();if(e.vnode.shapeFlag&32){const s=t._;s?(Id(n,t,r),r&&eu(n,"_",s,!0)):kd(t,n)}else t&&Rd(e,t)},_m=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=Ue;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:Id(s,t,r):(i=!t.$stable,kd(t,s)),o=t}else t&&(Rd(e,t),o={default:1});if(i)for(const a in s)!ol(a)&&o[a]==null&&delete s[a]};function _x(){}var vt=Bd;function $d(e){return Dd(e)}function Pd(e){return Dd(e,Ev)}function Dd(e,t){const r=Fi();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=or,insertStaticContent:m}=e,w=(A,$,J,ae=null,ne=null,re=null,de=void 0,fe=null,ue=!!$.dynamicChildren)=>{if(A===$)return;A&&!Cr(A,$)&&(ae=Ge(A),he(A,ne,re,!0),A=null),$.patchFlag===-2&&(ue=!1,$.dynamicChildren=null);const{type:ee,ref:Ee,shapeFlag:me}=$;switch(ee){case wn:T(A,$,J,ae);break;case pt:g(A,$,J,ae);break;case Yn:A==null&&C($,J,ae,de);break;case Ke:b(A,$,J,ae,ne,re,de,fe,ue);break;default:me&1?E(A,$,J,ae,ne,re,de,fe,ue):me&6?y(A,$,J,ae,ne,re,de,fe,ue):(me&64||me&128)&&ee.process(A,$,J,ae,ne,re,de,fe,ue,et)}Ee!=null&&ne?Ss(Ee,A&&A.ref,re,$||A,!$):Ee==null&&A&&A.ref!=null&&Ss(A.ref,null,re,A,!0)},T=(A,$,J,ae)=>{if(A==null)n($.el=a($.children),J,ae);else{const ne=$.el=A.el;$.children!==A.children&&u(ne,$.children)}},g=(A,$,J,ae)=>{A==null?n($.el=l($.children||""),J,ae):$.el=A.el},C=(A,$,J,ae)=>{[A.el,A.anchor]=m(A.children,$,J,ae,A.el,A.anchor)},_=({el:A,anchor:$},J,ae)=>{let ne;for(;A&&A!==$;)ne=p(A),n(A,J,ae),A=ne;n($,J,ae)},S=({el:A,anchor:$})=>{let J;for(;A&&A!==$;)J=p(A),s(A),A=J;s($)},E=(A,$,J,ae,ne,re,de,fe,ue)=>{if($.type==="svg"?de="svg":$.type==="math"&&(de="mathml"),A==null)I($,J,ae,ne,re,de,fe,ue);else{const ee=A.el&&A.el._isVueCE?A.el:null;try{ee&&ee._beginPatch(),H(A,$,ne,re,de,fe,ue)}finally{ee&&ee._endPatch()}}},I=(A,$,J,ae,ne,re,de,fe)=>{let ue,ee;const{props:Ee,shapeFlag:me,transition:Te,dirs:De}=A;if(ue=A.el=o(A.type,re,Ee&&Ee.is,Ee),me&8?c(ue,A.children):me&16&&v(A.children,ue,null,ae,ne,ll(A,re),de,fe),De&&Pr(A,null,ae,"created"),N(ue,A,A.scopeId,de,ae),Ee){for(const Y in Ee)Y!=="value"&&!Un(Y)&&i(ue,Y,null,Ee[Y],re,ae);"value"in Ee&&i(ue,"value",null,Ee.value,re),(ee=Ee.onVnodeBeforeMount)&&Jt(ee,ae,A)}De&&Pr(A,null,ae,"beforeMount");const Fe=Od(ne,Te);Fe&&Te.beforeEnter(ue),n(ue,$,J),((ee=Ee&&Ee.onVnodeMounted)||Fe||De)&&vt(()=>{ee&&Jt(ee,ae,A),Fe&&Te.enter(ue),De&&Pr(A,null,ae,"mounted")},ne)},N=(A,$,J,ae,ne)=>{if(J&&h(A,J),ae)for(let re=0;re<ae.length;re++)h(A,ae[re]);if(ne){let re=ne.subTree;if($===re||yo(re.type)&&(re.ssContent===$||re.ssFallback===$)){const de=ne.vnode;N(A,de,de.scopeId,de.slotScopeIds,ne.parent)}}},v=(A,$,J,ae,ne,re,de,fe,ue=0)=>{for(let ee=ue;ee<A.length;ee++)w(null,A[ee]=fe?Qr(A[ee]):Gt(A[ee]),$,J,ae,ne,re,de,fe)},H=(A,$,J,ae,ne,re,de)=>{const fe=$.el=A.el;let{patchFlag:ue,dynamicChildren:ee,dirs:Ee}=$;ue|=A.patchFlag&16;const me=A.props||Ue,Te=$.props||Ue;let De;if(J&&Jn(J,!1),(De=Te.onVnodeBeforeUpdate)&&Jt(De,J,$,A),Ee&&Pr($,A,J,"beforeUpdate"),J&&Jn(J,!0),(me.innerHTML&&Te.innerHTML==null||me.textContent&&Te.textContent==null)&&c(fe,""),ee?M(A.dynamicChildren,ee,fe,J,ae,ll($,ne),re):de||W(A,$,fe,null,J,ae,ll($,ne),re,!1),ue>0){if(ue&16)x(fe,me,Te,J,ne);else if(ue&2&&me.class!==Te.class&&i(fe,"class",null,Te.class,ne),ue&4&&i(fe,"style",me.style,Te.style,ne),ue&8){const Fe=$.dynamicProps;for(let Y=0;Y<Fe.length;Y++){const ce=Fe[Y],pe=me[ce],tt=Te[ce];(tt!==pe||ce==="value")&&i(fe,ce,pe,tt,ne,J)}}ue&1&&A.children!==$.children&&c(fe,$.children)}else!de&&ee==null&&x(fe,me,Te,J,ne);((De=Te.onVnodeUpdated)||Ee)&&vt(()=>{De&&Jt(De,J,$,A),Ee&&Pr($,A,J,"updated")},ae)},M=(A,$,J,ae,ne,re,de)=>{for(let fe=0;fe<$.length;fe++){const ue=A[fe],ee=$[fe];w(ue,ee,ue.el&&(ue.type===Ke||!Cr(ue,ee)||ue.shapeFlag&198)?d(ue.el):J,null,ae,ne,re,de,!0)}},x=(A,$,J,ae,ne)=>{if($!==J){if($!==Ue)for(const re in $)!Un(re)&&!(re in J)&&i(A,re,$[re],null,ne,ae);for(const re in J){if(Un(re))continue;const de=J[re],fe=$[re];de!==fe&&re!=="value"&&i(A,re,fe,de,ne,ae)}"value"in J&&i(A,"value",$.value,J.value,ne)}},b=(A,$,J,ae,ne,re,de,fe,ue)=>{const ee=$.el=A?A.el:a(""),Ee=$.anchor=A?A.anchor:a("");let{patchFlag:me,dynamicChildren:Te,slotScopeIds:De}=$;De&&(fe=fe?fe.concat(De):De),A==null?(n(ee,J,ae),n(Ee,J,ae),v($.children||[],J,Ee,ne,re,de,fe,ue)):me>0&&me&64&&Te&&A.dynamicChildren&&A.dynamicChildren.length===Te.length?(M(A.dynamicChildren,Te,J,ne,re,de,fe),($.key!=null||ne&&$===ne.subTree)&&cl(A,$,!0)):W(A,$,J,Ee,ne,re,de,fe,ue)},y=(A,$,J,ae,ne,re,de,fe,ue)=>{$.slotScopeIds=fe,A==null?$.shapeFlag&512?ne.ctx.activate($,J,ae,de,ue):O($,J,ae,ne,re,de,ue):q(A,$,ue)},O=(A,$,J,ae,ne,re,de)=>{const fe=A.component=jd(A,ae,ne);if(ii(A)&&(fe.ctx.renderer=et),zd(fe,!1,de),fe.asyncDep){if(ne&&ne.registerDep(fe,B,de),!A.el){const ue=fe.subTree=D(pt);g(null,ue,$,J),A.placeholder=ue.el}}else B(fe,A,$,J,ne,re,de)},q=(A,$,J)=>{const ae=$.component=A.component;if(gm(A,$,J))if(ae.asyncDep&&!ae.asyncResolved){Z(ae,$,J);return}else ae.next=$,ae.update();else $.el=A.el,ae.vnode=$},B=(A,$,J,ae,ne,re,de)=>{const fe=()=>{if(A.isMounted){let{next:me,bu:Te,u:De,parent:Fe,vnode:Y}=A;{const P=Hd(A);if(P){me&&(me.el=Y.el,Z(A,me,de)),P.asyncDep.then(()=>{vt(()=>{A.isUnmounted||ee()},ne)});return}}let ce=me,pe;Jn(A,!1),me?(me.el=Y.el,Z(A,me,de)):me=Y,Te&&hs(Te),(pe=me.props&&me.props.onVnodeBeforeUpdate)&&Jt(pe,Fe,me,Y),Jn(A,!0);const tt=vo(A),zt=A.subTree;A.subTree=tt,w(zt,tt,d(zt.el),Ge(zt),A,ne,re),me.el=tt.el,ce===null&&mo(A,tt.el),De&&vt(De,ne),(pe=me.props&&me.props.onVnodeUpdated)&&vt(()=>Jt(pe,Fe,me,Y),ne)}else{let me;const{el:Te,props:De}=$,{bm:Fe,m:Y,parent:ce,root:pe,type:tt}=A,zt=Yr($);if(Jn(A,!1),Fe&&hs(Fe),!zt&&(me=De&&De.onVnodeBeforeMount)&&Jt(me,ce,$),Jn(A,!0),Te&&Ct){const P=()=>{A.subTree=vo(A),Ct(Te,A.subTree,A,ne,null)};zt&&tt.__asyncHydrate?tt.__asyncHydrate(Te,A,P):P()}else{pe.ce&&pe.ce._hasShadowRoot()&&pe.ce._injectChildStyle(tt);const P=A.subTree=vo(A);w(null,P,J,ae,A,ne,re),$.el=P.el}if(Y&&vt(Y,ne),!zt&&(me=De&&De.onVnodeMounted)){const P=$;vt(()=>Jt(me,ce,P),ne)}($.shapeFlag&256||ce&&Yr(ce.vnode)&&ce.vnode.shapeFlag&256)&&A.a&&vt(A.a,ne),A.isMounted=!0,$=J=ae=null}};A.scope.on();const ue=A.effect=new zs(fe);A.scope.off();const ee=A.update=ue.run.bind(ue),Ee=A.job=ue.runIfDirty.bind(ue);Ee.i=A,Ee.id=A.uid,ue.scheduler=()=>Ba(Ee),Jn(A,!0),ee()},Z=(A,$,J)=>{$.component=A;const ae=A.vnode.props;A.vnode=$,A.next=null,mm(A,$.props,ae,J),_m(A,$.children,J),Fr(),$u(A),Vr()},W=(A,$,J,ae,ne,re,de,fe,ue=!1)=>{const ee=A&&A.children,Ee=A?A.shapeFlag:0,me=$.children,{patchFlag:Te,shapeFlag:De}=$;if(Te>0){if(Te&128){G(ee,me,J,ae,ne,re,de,fe,ue);return}else if(Te&256){le(ee,me,J,ae,ne,re,de,fe,ue);return}}De&8?(Ee&16&&Pe(ee,ne,re),me!==ee&&c(J,me)):Ee&16?De&16?G(ee,me,J,ae,ne,re,de,fe,ue):Pe(ee,ne,re,!0):(Ee&8&&c(J,""),De&16&&v(me,J,ae,ne,re,de,fe,ue))},le=(A,$,J,ae,ne,re,de,fe,ue)=>{A=A||us,$=$||us;const ee=A.length,Ee=$.length,me=Math.min(ee,Ee);let Te;for(Te=0;Te<me;Te++){const De=$[Te]=ue?Qr($[Te]):Gt($[Te]);w(A[Te],De,J,null,ne,re,de,fe,ue)}ee>Ee?Pe(A,ne,re,!0,!1,me):v($,J,ae,ne,re,de,fe,ue,me)},G=(A,$,J,ae,ne,re,de,fe,ue)=>{let ee=0;const Ee=$.length;let me=A.length-1,Te=Ee-1;for(;ee<=me&&ee<=Te;){const De=A[ee],Fe=$[ee]=ue?Qr($[ee]):Gt($[ee]);if(Cr(De,Fe))w(De,Fe,J,null,ne,re,de,fe,ue);else break;ee++}for(;ee<=me&&ee<=Te;){const De=A[me],Fe=$[Te]=ue?Qr($[Te]):Gt($[Te]);if(Cr(De,Fe))w(De,Fe,J,null,ne,re,de,fe,ue);else break;me--,Te--}if(ee>me){if(ee<=Te){const De=Te+1,Fe=De<Ee?$[De].el:ae;for(;ee<=Te;)w(null,$[ee]=ue?Qr($[ee]):Gt($[ee]),J,Fe,ne,re,de,fe,ue),ee++}}else if(ee>Te)for(;ee<=me;)he(A[ee],ne,re,!0),ee++;else{const De=ee,Fe=ee,Y=new Map;for(ee=Fe;ee<=Te;ee++){const oe=$[ee]=ue?Qr($[ee]):Gt($[ee]);oe.key!=null&&Y.set(oe.key,ee)}let ce,pe=0;const tt=Te-Fe+1;let zt=!1,P=0;const U=new Array(tt);for(ee=0;ee<tt;ee++)U[ee]=0;for(ee=De;ee<=me;ee++){const oe=A[ee];if(pe>=tt){he(oe,ne,re,!0);continue}let te;if(oe.key!=null)te=Y.get(oe.key);else for(ce=Fe;ce<=Te;ce++)if(U[ce-Fe]===0&&Cr(oe,$[ce])){te=ce;break}te===void 0?he(oe,ne,re,!0):(U[te-Fe]=ee+1,te>=P?P=te:zt=!0,w(oe,$[te],J,null,ne,re,de,fe,ue),pe++)}const L=zt?Sm(U):us;for(ce=L.length-1,ee=tt-1;ee>=0;ee--){const oe=Fe+ee,te=$[oe],ve=$[oe+1],ye=oe+1<Ee?ve.el||Md(ve):ae;U[ee]===0?w(null,te,J,ye,ne,re,de,fe,ue):zt&&(ce<0||ee!==L[ce]?ie(te,J,ye,2):ce--)}}},ie=(A,$,J,ae,ne=null)=>{const{el:re,type:de,transition:fe,children:ue,shapeFlag:ee}=A;if(ee&6){ie(A.component.subTree,$,J,ae);return}if(ee&128){A.suspense.move($,J,ae);return}if(ee&64){de.move(A,$,J,et);return}if(de===Ke){n(re,$,J);for(let Ee=0;Ee<ue.length;Ee++)ie(ue[Ee],$,J,ae);n(A.anchor,$,J);return}if(de===Yn){_(A,$,J);return}if(ae!==2&&ee&1&&fe)if(ae===0)fe.beforeEnter(re),n(re,$,J),vt(()=>fe.enter(re),ne);else{const{leave:Ee,delayLeave:me,afterLeave:Te}=fe,De=()=>{A.ctx.isUnmounted?s(re):n(re,$,J)},Fe=()=>{re._isLeaving&&re[Dr](!0),Ee(re,()=>{De(),Te&&Te()})};me?me(re,De,Fe):Fe()}else n(re,$,J)},he=(A,$,J,ae=!1,ne=!1)=>{const{type:re,props:de,ref:fe,children:ue,dynamicChildren:ee,shapeFlag:Ee,patchFlag:me,dirs:Te,cacheIndex:De}=A;if(me===-2&&(ne=!1),fe!=null&&(Fr(),Ss(fe,null,J,A,!0),Vr()),De!=null&&($.renderCache[De]=void 0),Ee&256){$.ctx.deactivate(A);return}const Fe=Ee&1&&Te,Y=!Yr(A);let ce;if(Y&&(ce=de&&de.onVnodeBeforeUnmount)&&Jt(ce,$,A),Ee&6)Re(A.component,J,ae);else{if(Ee&128){A.suspense.unmount(J,ae);return}Fe&&Pr(A,null,$,"beforeUnmount"),Ee&64?A.type.remove(A,$,J,et,ae):ee&&!ee.hasOnce&&(re!==Ke||me>0&&me&64)?Pe(ee,$,J,!1,!0):(re===Ke&&me&384||!ne&&Ee&16)&&Pe(ue,$,J),ae&&ke(A)}(Y&&(ce=de&&de.onVnodeUnmounted)||Fe)&&vt(()=>{ce&&Jt(ce,$,A),Fe&&Pr(A,null,$,"unmounted")},J)},ke=A=>{const{type:$,el:J,anchor:ae,transition:ne}=A;if($===Ke){Ve(J,ae);return}if($===Yn){S(A);return}const re=()=>{s(J),ne&&!ne.persisted&&ne.afterLeave&&ne.afterLeave()};if(A.shapeFlag&1&&ne&&!ne.persisted){const{leave:de,delayLeave:fe}=ne,ue=()=>de(J,re);fe?fe(A.el,re,ue):ue()}else re()},Ve=(A,$)=>{let J;for(;A!==$;)J=p(A),s(A),A=J;s($)},Re=(A,$,J)=>{const{bum:ae,scope:ne,job:re,subTree:de,um:fe,m:ue,a:ee}=A;wo(ue),wo(ee),ae&&hs(ae),ne.stop(),re&&(re.flags|=8,he(de,A,$,J)),fe&&vt(fe,$),vt(()=>{A.isUnmounted=!0},$)},Pe=(A,$,J,ae=!1,ne=!1,re=0)=>{for(let de=re;de<A.length;de++)he(A[de],$,J,ae,ne)},Ge=A=>{if(A.shapeFlag&6)return Ge(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const $=p(A.anchor||A.el),J=$&&$[qu];return J?p(J):$};let mt=!1;const je=(A,$,J)=>{let ae;A==null?$._vnode&&(he($._vnode,null,null,!0),ae=$._vnode.component):w($._vnode||null,A,$,null,null,null,J),$._vnode=A,mt||(mt=!0,$u(ae),eo(),mt=!1)},et={p:w,um:he,m:ie,r:ke,mt:O,mc:v,pc:W,pbc:M,n:Ge,o:e};let wt,Ct;return t&&([wt,Ct]=t(et)),{render:je,hydrate:wt,createApp:lm(je,wt)}}function ll({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 Jn({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Od(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function cl(e,t,r=!1){const n=e.children,s=t.children;if(_e(n)&&_e(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]=Qr(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&cl(o,a)),a.type===wn&&(a.patchFlag===-1&&(a=s[i]=Qr(a)),a.el=o.el),a.type===pt&&!a.el&&(a.el=o.el)}}function Sm(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 Hd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Hd(t)}function wo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Md(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Md(t.subTree):null}var yo=e=>e.__isSuspense,ul=0,Cm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)xm(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}Tm(e,t,r,n,s,o,a,l,u)}},hydrate:Em,normalize:Am};function fi(e,t){const r=e.props&&e.props[t];Ie(r)&&r()}function xm(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=Nd(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?(fi(e,"onPending"),fi(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),Es(p,e.ssFallback)):p.resolve(!1,!0)}function Tm(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:T,isHydrating:g}=d;if(w)d.pendingBranch=p,Cr(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():T&&(g||(l(m,h,r,n,s,null,i,o,a),Es(d,h)))):(d.pendingId=ul++,g?(d.isHydrating=!1,d.activeBranch=w):u(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),T?(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),Es(d,h))):m&&Cr(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&&Cr(m,p))l(m,p,r,n,s,d,i,o,a),Es(d,p);else if(fi(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=ul++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:C,pendingId:_}=d;C>0?setTimeout(()=>{d.pendingId===_&&d.fallback(h)},C):C===0&&d.fallback(h)}}function Nd(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:T}}=u;let g;const C=km(e);C&&t&&t.pendingBranch&&(g=t.pendingId,t.deps++);const _=e.props?Li(e.props.timeout):void 0,S=i,E={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:ul++,timeout:typeof _=="number"?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(I=!1,N=!1){const{vnode:v,activeBranch:H,pendingBranch:M,pendingId:x,effects:b,parentComponent:y,container:O,isInFallback:q}=E;let B=!1;E.isHydrating?E.isHydrating=!1:I||(B=H&&M.transition&&M.transition.mode==="out-in",B&&(H.transition.afterLeave=()=>{x===E.pendingId&&(p(M,O,i===S?m(H):i,0),Qs(b),q&&v.ssFallback&&(v.ssFallback.el=null))}),H&&(w(H.el)===O&&(i=m(H)),h(H,y,E,!0),!B&&q&&v.ssFallback&&vt(()=>v.ssFallback.el=null,E)),B||p(M,O,i,0)),Es(E,M),E.pendingBranch=null,E.isInFallback=!1;let Z=E.parent,W=!1;for(;Z;){if(Z.pendingBranch){Z.effects.push(...b),W=!0;break}Z=Z.parent}!W&&!B&&Qs(b),E.effects=[],C&&t&&t.pendingBranch&&g===t.pendingId&&(t.deps--,t.deps===0&&!N&&t.resolve()),fi(v,"onResolve")},fallback(I){if(!E.pendingBranch)return;const{vnode:N,activeBranch:v,parentComponent:H,container:M,namespace:x}=E;fi(N,"onFallback");const b=m(v),y=()=>{E.isInFallback&&(d(null,I,M,b,H,null,x,a,l),Es(E,I))},O=I.transition&&I.transition.mode==="out-in";O&&(v.transition.afterLeave=y),E.isInFallback=!0,h(v,H,null,!0),O||y()},move(I,N,v){E.activeBranch&&p(E.activeBranch,I,N,v),E.container=I},next(){return E.activeBranch&&m(E.activeBranch)},registerDep(I,N,v){const H=!!E.pendingBranch;H&&E.deps++;const M=I.vnode.el;I.asyncDep.catch(x=>{Kn(x,I,0)}).then(x=>{if(I.isUnmounted||E.isUnmounted||E.pendingId!==I.suspenseId)return;I.asyncResolved=!0;const{vnode:b}=I;hl(I,x,!1),M&&(b.el=M);const y=!M&&I.subTree.el;N(I,b,w(M||I.subTree.el),M?null:m(I.subTree),E,o,v),y&&(b.placeholder=null,T(y)),mo(I,b.el),H&&--E.deps===0&&E.resolve()})},unmount(I,N){E.isUnmounted=!0,E.activeBranch&&h(E.activeBranch,r,I,N),E.pendingBranch&&h(E.pendingBranch,r,I,N)}};return E}function Em(e,t,r,n,s,i,o,a,l){const u=t.suspense=Nd(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 Am(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=qd(n?r.default:r),e.ssFallback=n?qd(r.fallback):D(pt)}function qd(e){let t;if(Ie(e)){const r=Zn&&e._c;r&&(e._d=!1,R()),e=e(),r&&(e._d=!0,t=Mt,Ld())}return _e(e)&&(e=fm(e)),e=Gt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function Bd(e,t){t&&t.pendingBranch?_e(e)?t.effects.push(...e):t.effects.push(e):Qs(e)}function Es(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,mo(n,s))}function km(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Ke=Symbol.for("v-fgt"),wn=Symbol.for("v-txt"),pt=Symbol.for("v-cmt"),Yn=Symbol.for("v-stc"),pi=[],Mt=null;function R(e=!1){pi.push(Mt=e?null:[])}function Ld(){pi.pop(),Mt=pi[pi.length-1]||null}var Zn=1;function hi(e,t=!1){Zn+=e,e<0&&Mt&&t&&(Mt.hasOnce=!0)}function Fd(e){return e.dynamicChildren=Zn>0?Mt||us:null,Ld(),Zn>0&&Mt&&Mt.push(e),e}function Se(e,t,r,n,s,i){return Fd(Q(e,t,r,n,s,i,!0))}function K(e,t,r,n,s){return Fd(D(e,t,r,n,s,!0))}function Xr(e){return e?e.__v_isVNode===!0:!1}function Cr(e,t){return e.type===t.type&&e.key===t.key}function Rm(e){}var Vd=({key:e})=>e??null,bo=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?ot(e)||nt(e)||Ie(e)?{i:Rt,r:e,k:t,f:!!r}:e:null);function Q(e,t=null,r=null,n=0,s=null,i=e===Ke?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Vd(t),ref:t&&bo(t),scopeId:ro,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:Rt};return a?(fl(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=ot(r)?8:16),Zn>0&&!o&&Mt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Mt.push(l),l}var D=Im;function Im(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===ld)&&(e=pt),Xr(e)){const a=xr(e,t,!0);return r&&fl(a,r),Zn>0&&!i&&Mt&&(a.shapeFlag&6?Mt[Mt.indexOf(e)]=a:Mt.push(a)),a.patchFlag=-2,a}if(Nm(e)&&(e=e.__vccOpts),t){t=ur(t);let{class:a,style:l}=t;a&&!ot(a)&&(t.class=it(a)),Je(l)&&(Zs(l)&&!_e(l)&&(l=Xe({},l)),t.style=xt(l))}const o=ot(e)?1:yo(e)?128:Bu(e)?64:Je(e)?4:Ie(e)?2:0;return Q(e,t,r,n,s,o,i,!0)}function ur(e){return e?Zs(e)||xd(e)?Xe({},e):e:null}function xr(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?we(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Vd(u),ref:t&&t.ref?r&&i?_e(i)?i.concat(bo(t)):[i,bo(t)]:bo(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!==Ke?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&&xr(e.ssContent),ssFallback:e.ssFallback&&xr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&Jr(c,l.clone(c)),c}function qe(e=" ",t=0){return D(wn,null,e,t)}function dl(e,t){const r=D(Yn,null,e);return r.staticCount=t,r}function Ne(e="",t=!1){return t?(R(),K(pt,null,e)):D(pt,null,e)}function Gt(e){return e==null||typeof e=="boolean"?D(pt):_e(e)?D(Ke,null,e.slice()):Xr(e)?Qr(e):D(wn,null,String(e))}function Qr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xr(e)}function fl(e,t){let r=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(_e(t))r=16;else if(typeof t=="object")if(n&65){const s=t.default;s&&(s._c&&(s._d=!1),fl(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!xd(t)?t._ctx=Rt:s===3&&Rt&&(Rt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Ie(t)?(t={default:t,_ctx:Rt},r=32):(t=String(t),n&64?(r=16,t=[qe(t)]):r=8);e.children=t,e.shapeFlag|=r}function we(...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=it([t.class,n.class]));else if(s==="style")t.style=xt([t.style,n.style]);else if(js(s)){const i=t[s],o=n[s];o&&i!==o&&!(_e(i)&&i.includes(o))&&(t[s]=i?[].concat(i,o):o)}else s!==""&&(t[s]=n[s])}return t}function Jt(e,t,r,n=null){ar(e,t,7,[r,n])}var $m=md(),Pm=0;function jd(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||$m,i={uid:Pm++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new xa(!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:Ed(n,s),emitsOptions:yd(n,s),emit:null,emitted:null,propsDefaults:Ue,inheritAttrs:n.inheritAttrs,ctx:Ue,data:Ue,props:Ue,attrs:Ue,slots:Ue,refs:Ue,setupState:Ue,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=um.bind(null,i),e.ce&&e.ce(i),i}var It=null,ht=()=>It||Rt,_o,pl;{const e=Fi(),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)}};_o=t("__VUE_INSTANCE_SETTERS__",r=>It=r),pl=t("__VUE_SSR_SETTERS__",r=>As=r)}var Xn=e=>{const t=It;return _o(e),e.scope.on(),()=>{e.scope.off(),_o(t)}},So=()=>{It&&It.scope.off(),_o(null)};function Ud(e){return e.vnode.shapeFlag&4}var As=!1;function zd(e,t=!1,r=!1){t&&pl(t);const{props:n,children:s}=e.vnode,i=Ud(e);vm(e,n,i,t),bm(e,s,r||t);const o=i?Dm(e,t):void 0;return t&&pl(!1),o}function Dm(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,tl);const{setup:n}=r;if(n){Fr();const s=e.setupContext=n.length>1?Wd(e):null,i=Xn(e),o=ms(n,e,0,[e.props,s]),a=Sa(o);if(Vr(),i(),(a||e.sp)&&!Yr(e)&&Wa(e),a){if(o.then(So,So),t)return o.then(l=>{hl(e,l,t)}).catch(l=>{Kn(l,e,0)});e.asyncDep=o}else hl(e,o,t)}else Kd(e,t)}function hl(e,t,r){Ie(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Je(t)&&(e.setupState=Na(t)),Kd(e,r)}var Co,gl;function Om(e){Co=e,gl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,jv))}}var Hm=()=>!Co;function Kd(e,t,r){const n=e.type;if(!e.render){if(!t&&Co&&!n.render){const s=n.template||nl(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=Xe(Xe({isCustomElement:i,delimiters:a},o),l);n.render=Co(s,u)}}e.render=n.render||or,gl&&gl(e)}{const s=Xn(e);Fr();try{rm(e)}finally{Vr(),s()}}}var Mm={get(e,t){return Dt(e,"get",""),e[t]}};function Wd(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,Mm),slots:e.slots,emit:e.emit,expose:t}}function gi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Na(Ma(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in ci)return ci[r](e)},has(t,r){return r in t||r in ci}})):e.proxy}function vl(e,t=!0){return Ie(e)?e.displayName||e.name:e.name||t&&e.__name}function Nm(e){return Ie(e)&&"__vccOpts"in e}var j=(e,t)=>sv(e,t,As);function dr(e,t,r){try{hi(-1);const n=arguments.length;return n===2?Je(t)&&!_e(t)?Xr(t)?D(e,null,[t]):D(e,t):D(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&Xr(r)&&(r=[r]),D(e,t,r))}finally{hi(1)}}function qm(){return;function e(t,r,n){const s=t[n];if(_e(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 Bm(e,t,r,n){const s=r[n];if(s&&Gd(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function Gd(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(Bt(r[n],t[n]))return!1;return Zn>0&&Mt&&Mt.push(e),!0}var Jd="3.5.29",Lm=or,Fm=pv,Vm=bs,jm=Du,Um={createComponentInstance:jd,setupComponent:zd,renderComponentRoot:vo,setCurrentRenderingInstance:ti,isVNode:Xr,normalizeVNode:Gt,getComponentPublicInstance:gi,ensureValidVNode:Xa,pushWarningContext:cv,popWarningContext:uv},Sx=null,Cx=null,xx=null;var ml=void 0,Yd=typeof window<"u"&&window.trustedTypes;if(Yd)try{ml=Yd.createPolicy("vue",{createHTML:e=>e})}catch{}var Zd=ml?e=>ml.createHTML(e):e=>e,zm="http://www.w3.org/2000/svg",Km="http://www.w3.org/1998/Math/MathML",en=typeof document<"u"?document:null,Xd=en&&en.createElement("template"),Qd={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"?en.createElementNS(zm,e):t==="mathml"?en.createElementNS(Km,e):r?en.createElement(e,{is:r}):en.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>en.createTextNode(e),createComment:e=>en.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>en.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{Xd.innerHTML=Zd(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=Xd.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]}},yn="transition",vi="animation",ks=Symbol("_vtc"),ef={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},tf=Xe({},za,ef),Wm=e=>(e.displayName="Transition",e.props=tf,e),Gm=Wm((e,{slots:t})=>dr(Ku,nf(e),t)),Qn=(e,t=[])=>{_e(e)?e.forEach(r=>r(...t)):e&&e(...t)},rf=e=>e?_e(e)?e.some(t=>t.length>1):e.length>1:!1;function nf(e){const t={};for(const b in e)b in ef||(t[b]=e[b]);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=Jm(s),w=m&&m[0],T=m&&m[1],{onBeforeEnter:g,onEnter:C,onEnterCancelled:_,onLeave:S,onLeaveCancelled:E,onBeforeAppear:I=g,onAppear:N=C,onAppearCancelled:v=_}=t,H=(b,y,O,q)=>{b._enterCancelled=q,bn(b,y?c:a),bn(b,y?u:o),O&&O()},M=(b,y)=>{b._isLeaving=!1,bn(b,d),bn(b,h),bn(b,p),y&&y()},x=b=>(y,O)=>{const q=b?N:C,B=()=>H(y,b,O);Qn(q,[y,B]),sf(()=>{bn(y,b?l:i),Or(y,b?c:a),rf(q)||of(y,n,w,B)})};return Xe(t,{onBeforeEnter(b){Qn(g,[b]),Or(b,i),Or(b,o)},onBeforeAppear(b){Qn(I,[b]),Or(b,l),Or(b,u)},onEnter:x(!1),onAppear:x(!0),onLeave(b,y){b._isLeaving=!0;const O=()=>M(b,y);Or(b,d),b._enterCancelled?(Or(b,p),yl(b)):(yl(b),Or(b,p)),sf(()=>{b._isLeaving&&(bn(b,d),Or(b,h),rf(S)||of(b,n,T,O))}),Qn(S,[b,O])},onEnterCancelled(b){H(b,!1,void 0,!0),Qn(_,[b])},onAppearCancelled(b){H(b,!0,void 0,!0),Qn(v,[b])},onLeaveCancelled(b){M(b),Qn(E,[b])}})}function Jm(e){if(e==null)return null;if(Je(e))return[wl(e.enter),wl(e.leave)];{const t=wl(e);return[t,t]}}function wl(e){return Li(e)}function Or(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[ks]||(e[ks]=new Set)).add(t)}function bn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[ks];r&&(r.delete(t),r.size||(e[ks]=void 0))}function sf(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Ym=0;function of(e,t,r,n){const s=e._endId=++Ym,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=af(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 af(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${yn}Delay`),i=n(`${yn}Duration`),o=lf(s,i),a=n(`${vi}Delay`),l=n(`${vi}Duration`),u=lf(a,l);let c=null,d=0,p=0;t===yn?o>0&&(c=yn,d=o,p=i.length):t===vi?u>0&&(c=vi,d=u,p=l.length):(d=Math.max(o,u),c=d>0?o>u?yn:vi:null,p=c?c===yn?i.length:l.length:0);const h=c===yn&&/\b(?:transform|all)(?:,|$)/.test(n(`${yn}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function lf(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>cf(r)+cf(e[n])))}function cf(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function yl(e){return(e?e.ownerDocument:document).body.offsetHeight}function Zm(e,t,r){const n=e[ks];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var xo=Symbol("_vod"),uf=Symbol("_vsh"),To={name:"show",beforeMount(e,{value:t},{transition:r}){e[xo]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):mi(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),mi(e,!0),n.enter(e)):n.leave(e,()=>{mi(e,!1)}):mi(e,t))},beforeUnmount(e,{value:t}){mi(e,t)}};function mi(e,t){e.style.display=t?e[xo]:"none",e[uf]=!t}function Xm(){To.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var df=Symbol("");function Qm(e){const t=ht();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Eo(i,s))},n=()=>{const s=e(t.proxy);t.ce?Eo(t.ce,s):bl(t.subTree,s),r(s)};Ja(()=>{Qs(n)}),Qe(()=>{Oe(n,or,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Vt(()=>s.disconnect())})}function bl(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{bl(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Eo(e.el,t);else if(e.type===Ke)e.children.forEach(r=>bl(r,t));else if(e.type===Yn){let{el:r,anchor:n}=e;for(;r&&(Eo(r,t),r!==n);)r=r.nextSibling}}function Eo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=Ig(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[df]=n}}var e0=/(?:^|;)\s*display\s*:/;function t0(e,t,r){const n=e.style,s=ot(r);let i=!1;if(r&&!s){if(t)if(ot(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&Ao(n,a,"")}else for(const o in t)r[o]==null&&Ao(n,o,"");for(const o in r)o==="display"&&(i=!0),Ao(n,o,r[o])}else if(s){if(t!==r){const o=n[df];o&&(r+=";"+o),n.cssText=r,i=e0.test(r)}}else t&&e.removeAttribute("style");xo in e&&(e[xo]=i?n.display:"",e[uf]&&(n.display="none"))}var ff=/\s*!important$/;function Ao(e,t,r){if(_e(r))r.forEach(n=>Ao(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=r0(e,t);ff.test(r)?e.setProperty(Kt(n),r.replace(ff,""),"important"):e[n]=r}}var pf=["Webkit","Moz","ms"],_l={};function r0(e,t){const r=_l[t];if(r)return r;let n=bt(t);if(n!=="filter"&&n in e)return _l[t]=n;n=Us(n);for(let s=0;s<pf.length;s++){const i=pf[s]+n;if(i in e)return _l[t]=i}return t}var hf="http://www.w3.org/1999/xlink";function gf(e,t,r,n,s,i=kg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(hf,t.slice(6,t.length)):e.setAttributeNS(hf,t,r):r==null||i&&!nu(r)?e.removeAttribute(t):e.setAttribute(t,i?"":yr(r)?String(r):r)}function vf(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?Zd(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=nu(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 tn(e,t,r,n){e.addEventListener(t,r,n)}function n0(e,t,r,n){e.removeEventListener(t,r,n)}var mf=Symbol("_vei");function s0(e,t,r,n,s=null){const i=e[mf]||(e[mf]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=i0(t);n?tn(e,a,i[t]=l0(n,s),l):o&&(n0(e,a,o,l),i[t]=void 0)}}var wf=/(?:Once|Passive|Capture)$/;function i0(e){let t;if(wf.test(e)){t={};let r;for(;r=e.match(wf);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Kt(e.slice(2)),t]}var Sl=0,o0=Promise.resolve(),a0=()=>Sl||(o0.then(()=>Sl=0),Sl=Date.now());function l0(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;ar(c0(n,r.value),t,5,[n])};return r.value=e,r.attached=a0(),r}function c0(e,t){if(_e(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 yf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,bf=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?Zm(e,n,o):t==="style"?t0(e,r,n):js(t)?ba(t)||s0(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):u0(e,t,n,o))?(vf(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&gf(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ot(n))?vf(e,bt(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),gf(e,t,n,o))};function u0(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&yf(t)&&Ie(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 yf(t)&&ot(r)?!1:t in e}var _f={};function Cl(e,t,r){let n=X(e,t);Mi(n)&&(n=Xe({},n,t));class s extends Sf{constructor(o){super(n,o,r)}}return s.def=n,s}var d0=((e,t)=>Cl(e,t,Ff)),f0=typeof HTMLElement<"u"?HTMLElement:class{},Sf=class dg extends f0{constructor(t,r={},n=Al){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!==Al?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Xe({},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 dg){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,Tt(()=>{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&&!_e(i))for(const l in i){const u=i[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=Li(this._props[l])),(a||(a=Object.create(null)))[bt(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=_e(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(bt))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):_f;const s=bt(t);r&&this._numberProps&&this._numberProps[s]&&(n=Li(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===_f?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(Kt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Kt(t),r+""):r||this.removeAttribute(Kt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Lf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=D(this._def,Xe(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,Mi(o[0])?Xe({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Kt(i)!==i&&s(Kt(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 Cf(e){const t=ht(),r=t&&t.ce;return r||null}function p0(){const e=Cf();return e&&e.shadowRoot}function h0(e="$style"){{const t=ht();if(!t)return Ue;const r=t.type.__cssModules;if(!r)return Ue;const n=r[e];return n||Ue}}var xf=new WeakMap,Tf=new WeakMap,ko=Symbol("_moveCb"),Ef=Symbol("_enterCb"),g0=e=>(delete e.props.mode,e),v0=g0({name:"TransitionGroup",props:Xe({},tf,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=ht(),n=Ua();let s,i;return ai(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!b0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(m0),s.forEach(w0);const a=s.filter(y0);yl(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Or(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[ko]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[ko]=null,bn(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=ze(e),a=nf(o);let l=o.tag||Ke;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),Jr(c,_s(c,a,n,r)),xf.set(c,Af(c.el)))}i=t.default?oo(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&Jr(c,_s(c,a,n,r))}return D(l,null,i)}}});function m0(e){const t=e.el;t[ko]&&t[ko](),t[Ef]&&t[Ef]()}function w0(e){Tf.set(e,Af(e.el))}function y0(e){const t=xf.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 Af(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function b0(e,t,r){const n=e.cloneNode(),s=e[ks];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}=af(n);return i.removeChild(n),o}var _n=e=>{const t=e.props["onUpdate:modelValue"]||!1;return _e(t)?r=>hs(t,r):t};function _0(e){e.target.composing=!0}function kf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var fr=Symbol("_assign");function Rf(e,t,r){return t&&(e=e.trim()),r&&(e=Bi(e)),e}var wi={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[fr]=_n(s);const i=n||s.props&&s.props.type==="number";tn(e,t?"change":"input",o=>{o.target.composing||e[fr](Rf(e.value,r,i))}),(r||i)&&tn(e,"change",()=>{e.value=Rf(e.value,r,i)}),t||(tn(e,"compositionstart",_0),tn(e,"compositionend",kf),tn(e,"change",kf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[fr]=_n(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Bi(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))}},xl={deep:!0,created(e,t,r){e[fr]=_n(r),tn(e,"change",()=>{const n=e._modelValue,s=Rs(e),i=e.checked,o=e[fr];if(_e(n)){const a=Vi(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(jn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(Df(e,i))})},mounted:If,beforeUpdate(e,t,r){e[fr]=_n(r),If(e,t,r)}};function If(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(_e(t))s=Vi(t,n.props.value)>-1;else if(jn(t))s=t.has(n.props.value);else{if(t===r)return;s=Lr(t,Df(e,!0))}e.checked!==s&&(e.checked=s)}var Tl={created(e,{value:t},r){e.checked=Lr(t,r.props.value),e[fr]=_n(r),tn(e,"change",()=>{e[fr](Rs(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[fr]=_n(n),t!==r&&(e.checked=Lr(t,n.props.value))}},$f={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=jn(t);tn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Bi(Rs(o)):Rs(o));e[fr](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,Tt(()=>{e._assigning=!1})}),e[fr]=_n(n)},mounted(e,{value:t}){Pf(e,t)},beforeUpdate(e,t,r){e[fr]=_n(r)},updated(e,{value:t}){e._assigning||Pf(e,t)}};function Pf(e,t){const r=e.multiple,n=_e(t);if(!(r&&!n&&!jn(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Rs(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=Vi(t,a)>-1}else o.selected=t.has(a);else if(Lr(Rs(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Rs(e){return"_value"in e?e._value:e.value}function Df(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var Of={created(e,t,r){Ro(e,t,r,null,"created")},mounted(e,t,r){Ro(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){Ro(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){Ro(e,t,r,n,"updated")}};function Hf(e,t){switch(e){case"SELECT":return $f;case"TEXTAREA":return wi;default:switch(t){case"checkbox":return xl;case"radio":return Tl;default:return wi}}}function Ro(e,t,r,n,s){const i=Hf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function S0(){wi.getSSRProps=({value:e})=>({value:e}),Tl.getSSRProps=({value:e},t)=>{if(t.props&&Lr(t.props.value,e))return{checked:!0}},xl.getSSRProps=({value:e},t)=>{if(_e(e)){if(t.props&&Vi(e,t.props.value)>-1)return{checked:!0}}else if(jn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Of.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=Hf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var C0=["ctrl","shift","alt","meta"],x0={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)=>C0.some(r=>e[`${r}Key`]&&!t.includes(r))},pr=(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=x0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},T0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},El=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Kt(s.key);if(t.some(o=>o===i||T0[o]===i))return e(s)}))},Mf=Xe({patchProp:bf},Qd),yi,Nf=!1;function qf(){return yi||(yi=$d(Mf))}function Bf(){return yi=Nf?yi:Pd(Mf),Nf=!0,yi}var Lf=((...e)=>{qf().render(...e)}),E0=((...e)=>{Bf().hydrate(...e)}),Al=((...e)=>{const t=qf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=jf(n);if(!s)return;const i=t._component;!Ie(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,Vf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),Ff=((...e)=>{const t=Bf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=jf(n);if(s)return r(s,!0,Vf(s))},t});function Vf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function jf(e){return ot(e)?document.querySelector(e):e}var Uf=!1,A0=()=>{Uf||(Uf=!0,S0(),Xm())},k0=mg({BaseTransition:()=>Ku,BaseTransitionPropsValidators:()=>za,Comment:()=>pt,DeprecationTypes:()=>null,EffectScope:()=>xa,ErrorCodes:()=>fv,ErrorTypeStrings:()=>Fm,Fragment:()=>Ke,KeepAlive:()=>Nv,ReactiveEffect:()=>zs,Static:()=>Yn,Suspense:()=>Cm,Teleport:()=>Va,Text:()=>wn,TrackOpTypes:()=>iv,Transition:()=>Gm,TransitionGroup:()=>v0,TriggerOpTypes:()=>ov,VueElement:()=>Sf,assertNumber:()=>dv,callWithAsyncErrorHandling:()=>ar,callWithErrorHandling:()=>ms,camelize:()=>bt,capitalize:()=>Us,cloneVNode:()=>xr,compatUtils:()=>null,compile:()=>R0,computed:()=>j,createApp:()=>Al,createBlock:()=>K,createCommentVNode:()=>Ne,createElementBlock:()=>Se,createElementVNode:()=>Q,createHydrationRenderer:()=>Pd,createPropsRestProxy:()=>em,createRenderer:()=>$d,createSSRApp:()=>Ff,createSlots:()=>Vv,createStaticVNode:()=>dl,createTextVNode:()=>qe,createVNode:()=>D,customRef:()=>Xs,defineAsyncComponent:()=>Mv,defineComponent:()=>X,defineCustomElement:()=>Cl,defineEmits:()=>zv,defineExpose:()=>Kv,defineModel:()=>Jv,defineOptions:()=>Wv,defineProps:()=>Uv,defineSSRCustomElement:()=>d0,defineSlots:()=>Gv,devtools:()=>Vm,effect:()=>Pg,effectScope:()=>Ta,getCurrentInstance:()=>ht,getCurrentScope:()=>ji,getCurrentWatcher:()=>av,getTransitionRawChildren:()=>oo,guardReactiveProps:()=>ur,h:()=>dr,handleError:()=>Kn,hasInjectionContext:()=>yv,hydrate:()=>E0,hydrateOnIdle:()=>Iv,hydrateOnInteraction:()=>Ov,hydrateOnMediaQuery:()=>Dv,hydrateOnVisible:()=>Pv,initCustomFormatter:()=>qm,initDirectivesForSSR:()=>A0,inject:()=>Ft,isMemoSame:()=>Gd,isProxy:()=>Zs,isReactive:()=>Wr,isReadonly:()=>Ir,isRef:()=>nt,isRuntimeOnly:()=>Hm,isShallow:()=>Wt,isVNode:()=>Xr,markRaw:()=>Ma,mergeDefaults:()=>fd,mergeModels:()=>Qv,mergeProps:()=>we,nextTick:()=>Tt,nodeOps:()=>Qd,normalizeClass:()=>it,normalizeProps:()=>br,normalizeStyle:()=>xt,onActivated:()=>ed,onBeforeMount:()=>nd,onBeforeUnmount:()=>Ts,onBeforeUpdate:()=>Ja,onDeactivated:()=>td,onErrorCaptured:()=>ad,onMounted:()=>Qe,onRenderTracked:()=>od,onRenderTriggered:()=>id,onScopeDispose:()=>Ea,onServerPrefetch:()=>sd,onUnmounted:()=>Vt,onUpdated:()=>ai,onWatcherCleanup:()=>Au,openBlock:()=>R,patchProp:()=>bf,popScopeId:()=>mv,provide:()=>Wn,proxyRefs:()=>Na,pushScopeId:()=>vv,queuePostFlushCb:()=>Qs,reactive:()=>zr,readonly:()=>Ot,ref:()=>F,registerRuntimeCompiler:()=>Om,render:()=>Lf,renderList:()=>cr,renderSlot:()=>se,resolveComponent:()=>Lv,resolveDirective:()=>Fv,resolveDynamicComponent:()=>li,resolveFilter:()=>null,resolveTransitionHooks:()=>_s,setBlockTracking:()=>hi,setDevtoolsHook:()=>jm,setTransitionHooks:()=>Jr,shallowReactive:()=>Cu,shallowReadonly:()=>Kr,shallowRef:()=>ut,ssrContextKey:()=>Ou,ssrUtils:()=>Um,stop:()=>Dg,toDisplayString:()=>Le,toHandlerKey:()=>ps,toHandlers:()=>ud,toRaw:()=>ze,toRef:()=>qa,toRefs:()=>Ht,toValue:()=>Ae,transformVNodeArgs:()=>Rm,triggerRef:()=>Tu,unref:()=>f,useAttrs:()=>Xv,useCssModule:()=>h0,useCssVars:()=>Qm,useHost:()=>Cf,useId:()=>Ju,useModel:()=>cm,useSSRContext:()=>Hu,useShadowRoot:()=>p0,useSlots:()=>Zv,useTemplateRef:()=>Cv,useTransitionState:()=>Ua,vModelCheckbox:()=>xl,vModelDynamic:()=>Of,vModelRadio:()=>Tl,vModelSelect:()=>$f,vModelText:()=>wi,vShow:()=>To,version:()=>Jd,warn:()=>Lm,watch:()=>Oe,watchEffect:()=>lt,watchPostEffect:()=>La,watchSyncEffect:()=>Mu,withAsyncContext:()=>tm,withCtx:()=>k,withDefaults:()=>Yv,withDirectives:()=>no,withKeys:()=>El,withMemo:()=>Bm,withModifiers:()=>pr,withScopeId:()=>wv},1),R0=()=>{},I0=2;const Tr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},$0=(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,I0);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(Tr.CALL_HISTORY)||p.createObjectStore(Tr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(Tr.CONTACTS)||p.createObjectStore(Tr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(Tr.CONNECTIONS)||p.createObjectStore(Tr.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}},P0=e=>{const t=F(e?.initialConnected??!1),r=F(0),n=F(null),s=F([]),i=F([]),{initDB:o,getAll:a,add:l}=$0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(Tr.CALL_HISTORY)).sort((G,ie)=>ie.startTime-G.startTime),i.value=await a(Tr.CONTACTS)}catch(G){console.error("Error loading data from IndexedDB:",G)}});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=j(()=>u.value.find(G=>G.id===r.value)||u.value[0]),m=j(()=>h.value?.status||"idle"),w=j(()=>h.value?.remoteNumber||""),T=j(()=>h.value?.isMuted||!1),g=j(()=>h.value?.isHeld||!1),C=j({get:()=>h.value?.keypadValue||"",set:G=>{h.value&&(h.value.keypadValue=G)}}),_=G=>{t.value=G},S=G=>{u.value.some(ie=>ie.id===G)&&(r.value=G)},E=(G,ie)=>{const he=u.value.find(ke=>ke.id===G);he&&Object.assign(he,ie)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:w,isMuted:T,isHeld:g,keypadValue:C,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:_,setActiveChannelId:S,updateChannelState:E,setCallStatus:G=>{E(r.value,{status:G})},setIncomingCall:G=>{E(r.value,{remoteNumber:G})},resetCall:()=>{E(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async G=>{const ie={id:crypto.randomUUID(),...G};s.value.unshift(ie);try{await l(Tr.CALL_HISTORY,ie)}catch(he){console.error("Error saving call log:",he)}},callHistory:s,contacts:i,addContact:async G=>{try{await l(Tr.CONTACTS,G),i.value=await a(Tr.CONTACTS)}catch(ie){console.error("Error saving contact:",ie)}},setMuted:G=>{E(r.value,{isMuted:G})},setHeld:G=>{E(r.value,{isHeld:G})},appendKeypad:G=>{C.value+=G},clearKeypad:()=>{C.value=""},backspaceKeypad:()=>{C.value=C.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:G=>{d.value=G},setTransferInProgress:G=>{n.value=G},toggleVideoMode:()=>{p.value=!p.value}}},D0="0.21.1";var es=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},kl=class extends es{constructor(e){super(e||"Unsupported content type.")}},Rl=class extends es{constructor(e){super(e||"Request pending.")}},O0=class extends es{constructor(e){super(e||"Unspecified session description handler error.")}},Il=class extends es{constructor(){super("The session has terminated.")}},bi=class extends es{constructor(e){super(e||"An error occurred during state transition.")}},H0=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},M0=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()}},N0=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},_i=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})}},q0=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()}},zf=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={}}},hr=class fg extends zf{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 fg(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}},Sn=class pg extends zf{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 pg(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 Kf(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 $l(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var Wf=class ma 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,ma.prototype):this.__proto__=ma.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ma)}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=$l("",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
|
-
`+l+" | "
|
|
9
|
+
`+l+" | "+$l("",i.column-1," ")+$l("",c-i.column,"^")}else r+=`
|
|
10
10
|
at `+o}return r}};function B0(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
|
-
`,
|
|
12
|
-
`,!1),/^[0-9]/,x([["0","9"]],!1,!1),/^[a-zA-Z]/,x([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,x([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,x([["\0","ÿ"]],!1,!1),/^["]/,x(['"'],!1,!1)," ",v(" ",!1)," ",v(" ",!1),/^[a-zA-Z0-9]/,x([["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":"},/^[!-~]/,x([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,x([["",""]],!1,!1),/^[\x80-\xBF]/,x([["","¿"]],!1,!1),/^[a-f]/,x([["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'"'},/^[!-']/,x([["!","'"]],!1,!1),/^[*-[]/,x([["*","["]],!1,!1),/^[\]-~]/,x([["]","~"]],!1,!1),function(_){return _},/^[#-[]/,x([["#","["]],!1,!1),/^[\0-\t]/,x([["\0"," "]],!1,!1),/^[\v-\f]/,x([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,x([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new Sn(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 Sn(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(_){t=t||{data:{}},t.data.scheme=_},function(){t=t||{data:{}},t.data.user=decodeURIComponent(y().slice(0,-1))},function(){t=t||{data:{}},t.data.password=y()},function(){return t=t||{data:{}},t.data.host=y(),t.data.host},function(){return t=t||{data:{}},t.data.host_type="domain",y()},/^[a-zA-Z0-9_\-]/,x([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,x([["a","z"],["A","Z"],["0","9"],"-"],!1,!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",y()},"::",v("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",y()},function(){return t=t||{data:{}},t.data.host_type="IPv4",y()},"25",v("25",!1),/^[0-5]/,x([["0","5"]],!1,!1),"2",v("2",!1),/^[0-4]/,x([["0","4"]],!1,!1),"1",v("1",!1),/^[1-9]/,x([["1","9"]],!1,!1),function(_){return t=t||{data:{}},_=parseInt(_.join("")),t.data.port=_,_},"transport=",v("transport=",!0),"udp",v("udp",!0),"tcp",v("tcp",!0),"sctp",v("sctp",!0),"tls",v("tls",!0),function(_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=_.toLowerCase()},"user=",v("user=",!0),"phone",v("phone",!0),"ip",v("ip",!0),function(_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=_.toLowerCase()},"method=",v("method=",!0),function(_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=_},"ttl=",v("ttl=",!0),function(_){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=_},"maddr=",v("maddr=",!0),function(_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=_},"lr",v("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(_,w){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),w===null?w=void 0:w=w[1],t.data.uri_params[_.toLowerCase()]=w},function(_,w){_=_.join("").toLowerCase(),w=w.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[_]?t.data.uri_headers[_].push(w):t.data.uri_headers[_]=[w]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new Sn(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=y()},v("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=y()},"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=y(),t.data.method},function(_){t=t||{data:{}},t.data.status_code=parseInt(_.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=y()},function(){t=t||{data:{}},t.data=y()},function(){var _,w;for(t=t||{data:{}},w=t.data.multi_header.length,_=0;_<w;_++)if(t.data.multi_header[_].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var _;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{_=new hr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{_=null}t.data.multi_header.push({position:l,offset:T().start.offset,parsed:_})},function(_){_=y().trim(),_[0]==='"'&&(_=_.substring(1,_.length-1)),t=t||{data:{}},t.data.displayName=_},"q",v("q",!0),function(_){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=_},"expires",v("expires",!0),function(_){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=_},function(_){return parseInt(_.join(""))},"0",v("0",!1),function(){return parseFloat(y())},function(_,w){t=t||{data:{}},t.data.params||(t.data.params={}),w===null?w=void 0:w=w[1],t.data.params[_.toLowerCase()]=w},"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=y().toLowerCase())},"handling",v("handling",!0),"optional",v("optional",!0),"required",v("required",!0),function(_){t=t||{data:{}},t.data=parseInt(_.join(""))},function(){t=t||{data:{}},t.data=y()},"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(_){t=t||{data:{}},t.data.value=parseInt(_.join(""))},function(_){t=t||{data:{}},t.data=_},function(_){t=t||{data:{}},t.data.event=_.toLowerCase()},function(){t=t||{data:{}};var _=t.data.tag;t.data=new hr(t.data.uri,t.data.displayName,t.data.params),_&&t.data.setParam("tag",_)},"tag",v("tag",!0),function(_){t=t||{data:{}},t.data.tag=_},function(_){t=t||{data:{}},t.data=parseInt(_.join(""))},function(_){t=t||{data:{}},t.data=_},function(){t=t||{data:{}},t.data=new hr(t.data.uri,t.data.displayName,t.data.params)},"digest",v("Digest",!0),"realm",v("realm",!0),function(_){t=t||{data:{}},t.data.realm=_},"domain",v("domain",!0),"nonce",v("nonce",!0),function(_){t=t||{data:{}},t.data.nonce=_},"opaque",v("opaque",!0),function(_){t=t||{data:{}},t.data.opaque=_},"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(_){t=t||{data:{}},t.data.algorithm=_.toUpperCase()},"qop",v("qop",!0),"auth-int",v("auth-int",!0),"auth",v("auth",!0),function(_){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(_.toLowerCase())},function(_){t=t||{data:{}},t.data.value=parseInt(_.join(""))},function(){var _,w;for(t=t||{data:{}},w=t.data.multi_header.length,_=0;_<w;_++)if(t.data.multi_header[_].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var _;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{_=new hr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{_=null}t.data.multi_header.push({position:l,offset:T().start.offset,parsed:_})},function(){t=t||{data:{}},t.data=new hr(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(_){t=t||{data:{}},t.data.replaces_from_tag=_},"to-tag",v("to-tag",!0),function(_){t=t||{data:{}},t.data.replaces_to_tag=_},"early-only",v("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(_,w){return w},function(_,w){return N(_,w)},function(_){t=t||{data:{}},t.startRule==="Require"&&(t.data=_||[])},function(_){t=t||{data:{}},t.data.value=parseInt(_.join(""))},"active",v("active",!0),"pending",v("pending",!0),"terminated",v("terminated",!0),function(){t=t||{data:{}},t.data.state=y()},"reason",v("reason",!0),function(_){t=t||{data:{}},typeof _<"u"&&(t.data.reason=_)},function(_){t=t||{data:{}},typeof _<"u"&&(t.data.expires=_)},"retry_after",v("retry_after",!0),function(_){t=t||{data:{}},typeof _<"u"&&(t.data.retry_after=_)},"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(_){t=t||{data:{}},t.startRule==="Supported"&&(t.data=_||[])},function(){t=t||{data:{}};var _=t.data.tag;t.data=new hr(t.data.uri,t.data.displayName,t.data.params),_&&t.data.setParam("tag",_)},"ttl",v("ttl",!0),function(_){t=t||{data:{}},t.data.ttl=_},"maddr",v("maddr",!0),function(_){t=t||{data:{}},t.data.maddr=_},"received",v("received",!0),function(_){t=t||{data:{}},t.data.received=_},"branch",v("branch",!0),function(_){t=t||{data:{}},t.data.branch=_},"rport",v("rport",!0),function(_){t=t||{data:{}},typeof _<"u"&&(t.data.rport=_.join(""))},function(_){t=t||{data:{}},t.data.protocol=_},v("UDP",!0),v("TCP",!0),v("TLS",!0),v("SCTP",!0),function(_){t=t||{data:{}},t.data.transport=_},function(){t=t||{data:{}},t.data.host=y()},function(_){t=t||{data:{}},t.data.port=parseInt(_.join(""))},function(_){return parseInt(_.join(""))},function(_){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=_)},"refresher",v("refresher",!1),"uas",v("uas",!1),"uac",v("uac",!1),function(_){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=_)},function(_){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=_)},"stuns",v("stuns",!0),"stun",v("stun",!0),function(_){t=t||{data:{}},t.data.scheme=_},function(_){t=t||{data:{}},t.data.host=_},"?transport=",v("?transport=",!1),"turns",v("turns",!0),"turn",v("turn",!0),function(_){t=t||{data:{}},t.data.transport=_},function(){t=t||{data:{}},t.data=y()},"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#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/�#*;$&&&#/'$8":Z" )("'#&'#`),g(';.." &"'),g(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),g(`%%$;2/�#*;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!70)*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""67/¤#;Z/$28""6879/$;Z/$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2""67/#;Z/$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2""67/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2""67/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2""67/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2""67/,#;[/#$+")("'#&'#.ծ &%2""67/,#;Z/#$+")("'#&'#.Տ &%;Z/#2""67/$;Z/$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/$2""67/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2""67/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2""67/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2""67/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2""67/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2""67/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 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/�#*;j&&&#/"!&,)'),g('%$;j/�#*;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$$;!/�#*;!&&&#/L$2J""6J7K/=$$;!/�#*;!&&&#/'$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("%$;!/�#*;!&&&#/' 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("%$;!/�#*;!&&&#/' 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("%$;!/�#*;!&&&#/' 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("%$;!/�#*;!&&&#/' 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/
$;Å/|$$%$;'/�#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/�#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;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("%$;!/�#*;!&&&#/' 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("%$;!/�#*;!&&&#/' 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 y(){return e.substring(u,l)}function T(){return E(u,l)}function v(_,w){return{type:"literal",text:_,ignoreCase:w}}function x(_,w,S){return{type:"class",parts:_,inverted:w,ignoreCase:S}}function b(){return{type:"end"}}function C(_){let w=c[_],S;if(w)return w;for(S=_-1;!c[S];)S--;for(w=c[S],w={line:w.line,column:w.column};S<_;)e.charCodeAt(S)===10?(w.line++,w.column=1):w.column++,S++;return c[_]=w,w}function E(_,w){const S=C(_),O=C(w);return{source:n,start:{offset:_,line:S.line,column:S.column},end:{offset:w,line:O.line,column:O.column}}}function I(_){l<d||(l>d&&(d=l,p=[]),p.push(_))}function M(_,w,S){return new Wf(Wf.buildMessage(_,w),_,w,S)}function g(_){return _.split("").map(w=>w.charCodeAt(0)-32)}function H(_){const w=a[_];let S=0;const O=[];let q=w.length;const B=[],Z=[];let W;for(;;){for(;S<q;)switch(w[S]){case 0:Z.push(o[w[S+1]]),S+=2;break;case 1:Z.push(void 0),S++;break;case 2:Z.push(null),S++;break;case 3:Z.push(r),S++;break;case 4:Z.push([]),S++;break;case 5:Z.push(l),S++;break;case 6:Z.pop(),S++;break;case 7:l=Z.pop(),S++;break;case 8:Z.length-=w[S+1],S+=2;break;case 9:Z.splice(-2,1),S++;break;case 10:Z[Z.length-2].push(Z.pop()),S++;break;case 11:Z.push(Z.splice(Z.length-w[S+1],w[S+1])),S+=2;break;case 12:Z.push(e.substring(Z.pop(),l)),S++;break;case 13:B.push(q),O.push(S+3+w[S+1]+w[S+2]),Z[Z.length-1]?(q=S+3+w[S+1],S+=3):(q=S+3+w[S+1]+w[S+2],S+=3+w[S+1]);break;case 14:B.push(q),O.push(S+3+w[S+1]+w[S+2]),Z[Z.length-1]===r?(q=S+3+w[S+1],S+=3):(q=S+3+w[S+1]+w[S+2],S+=3+w[S+1]);break;case 15:B.push(q),O.push(S+3+w[S+1]+w[S+2]),Z[Z.length-1]!==r?(q=S+3+w[S+1],S+=3):(q=S+3+w[S+1]+w[S+2],S+=3+w[S+1]);break;case 16:Z[Z.length-1]!==r?(B.push(q),O.push(S),q=S+2+w[S+1],S+=2):S+=2+w[S+1];break;case 17:B.push(q),O.push(S+3+w[S+1]+w[S+2]),e.length>l?(q=S+3+w[S+1],S+=3):(q=S+3+w[S+1]+w[S+2],S+=3+w[S+1]);break;case 18:B.push(q),O.push(S+4+w[S+2]+w[S+3]),e.substr(l,o[w[S+1]].length)===o[w[S+1]]?(q=S+4+w[S+2],S+=4):(q=S+4+w[S+2]+w[S+3],S+=4+w[S+2]);break;case 19:B.push(q),O.push(S+4+w[S+2]+w[S+3]),e.substr(l,o[w[S+1]].length).toLowerCase()===o[w[S+1]]?(q=S+4+w[S+2],S+=4):(q=S+4+w[S+2]+w[S+3],S+=4+w[S+2]);break;case 20:B.push(q),O.push(S+4+w[S+2]+w[S+3]),o[w[S+1]].test(e.charAt(l))?(q=S+4+w[S+2],S+=4):(q=S+4+w[S+2]+w[S+3],S+=4+w[S+2]);break;case 21:Z.push(e.substr(l,w[S+1])),l+=w[S+1],S+=2;break;case 22:Z.push(o[w[S+1]]),l+=o[w[S+1]].length,S+=2;break;case 23:Z.push(r),h===0&&I(o[w[S+1]]),S+=2;break;case 24:u=Z[Z.length-1-w[S+1]],S+=2;break;case 25:u=l,S++;break;case 26:W=w.slice(S+4,S+4+w[S+3]).map(function(le){return Z[Z.length-1-le]}),Z.splice(Z.length-w[S+2],w[S+2],o[w[S+1]].apply(null,W)),S+=4+w[S+3];break;case 27:Z.push(H(w[S+1])),S+=2;break;case 28:h++,S++;break;case 29:h--,S++;break;default:throw new Error("Invalid opcode: "+w[S]+".")}if(B.length>0)q=B.pop(),S=O.pop();else break}return Z[0]}t.data={};function N(_,w){return[_].concat(w)}if(m=H(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&I(b()),M(p,d<e.length?e.charAt(d):null,d<e.length?E(d,d+1):E(d,d))}const L0=B0;var _t;(function(e){function t(s,i){const o={startRule:i};try{L0(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})(_t=_t||(_t={}));var F0={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 ts(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 ko(e){return F0[e]||""}function Ro(){return ts(10)}function Hr(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 Si(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var Gf=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=Hr(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[Hr(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[Hr(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[Hr(e)]}parseHeader(e,t=0){if(e=Hr(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=_t.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[Hr(e)]=[{raw:t}]}toString(){return this.data}},Is=class extends Gf{constructor(){super()}},Cn=class extends Gf{constructor(){super()}},$l=class ma{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=ma.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:Ro(),this.from=ma.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=ma.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+ts(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 hr(t,r,s)}getHeader(t){const r=this.headers[Hr(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[Hr(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[Hr(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[Hr(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
|
|
11
|
+
`,g(`\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)," ",g(" ",!1)," ",g(" ",!1),/^[a-zA-Z0-9]/,C([["a","z"],["A","Z"],["0","9"]],!1,!1),";",g(";",!1),"/",g("/",!1),"?",g("?",!1),":",g(":",!1),"@",g("@",!1),"&",g("&",!1),"=",g("=",!1),"+",g("+",!1),"$",g("$",!1),",",g(",",!1),"-",g("-",!1),"_",g("_",!1),".",g(".",!1),"!",g("!",!1),"~",g("~",!1),"*",g("*",!1),"'",g("'",!1),"(",g("(",!1),")",g(")",!1),"%",g("%",!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),"`",g("`",!1),"<",g("<",!1),">",g(">",!1),"\\",g("\\",!1),"[",g("[",!1),"]",g("]",!1),"{",g("{",!1),"}",g("}",!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(x){return x},/^[#-[]/,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 Sn(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 Sn(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",g("sips",!0),"sip",g("sip",!0),function(x){t=t||{data:{}},t.data.scheme=x},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()},"::",g("::",!1),function(){return t=t||{data:{}},t.data.host_type="IPv6",w()},function(){return t=t||{data:{}},t.data.host_type="IPv4",w()},"25",g("25",!1),/^[0-5]/,C([["0","5"]],!1,!1),"2",g("2",!1),/^[0-4]/,C([["0","4"]],!1,!1),"1",g("1",!1),/^[1-9]/,C([["1","9"]],!1,!1),function(x){return t=t||{data:{}},x=parseInt(x.join("")),t.data.port=x,x},"transport=",g("transport=",!0),"udp",g("udp",!0),"tcp",g("tcp",!0),"sctp",g("sctp",!0),"tls",g("tls",!0),function(x){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=x.toLowerCase()},"user=",g("user=",!0),"phone",g("phone",!0),"ip",g("ip",!0),function(x){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=x.toLowerCase()},"method=",g("method=",!0),function(x){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=x},"ttl=",g("ttl=",!0),function(x){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=x},"maddr=",g("maddr=",!0),function(x){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=x},"lr",g("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(x,b){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),b===null?b=void 0:b=b[1],t.data.uri_params[x.toLowerCase()]=b},function(x,b){x=x.join("").toLowerCase(),b=b.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[x]?t.data.uri_headers[x].push(b):t.data.uri_headers[x]=[b]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new Sn(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)},"//",g("//",!1),function(){t=t||{data:{}},t.data.scheme=w()},g("SIP",!0),function(){t=t||{data:{}},t.data.sip_version=w()},"INVITE",g("INVITE",!1),"ACK",g("ACK",!1),"VXACH",g("VXACH",!1),"OPTIONS",g("OPTIONS",!1),"BYE",g("BYE",!1),"CANCEL",g("CANCEL",!1),"REGISTER",g("REGISTER",!1),"SUBSCRIBE",g("SUBSCRIBE",!1),"NOTIFY",g("NOTIFY",!1),"REFER",g("REFER",!1),"PUBLISH",g("PUBLISH",!1),function(){return t=t||{data:{}},t.data.method=w(),t.data.method},function(x){t=t||{data:{}},t.data.status_code=parseInt(x.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=w()},function(){t=t||{data:{}},t.data=w()},function(){var x,b;for(t=t||{data:{}},b=t.data.multi_header.length,x=0;x<b;x++)if(t.data.multi_header[x].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var x;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{x=new hr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{x=null}t.data.multi_header.push({position:l,offset:T().start.offset,parsed:x})},function(x){x=w().trim(),x[0]==='"'&&(x=x.substring(1,x.length-1)),t=t||{data:{}},t.data.displayName=x},"q",g("q",!0),function(x){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=x},"expires",g("expires",!0),function(x){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=x},function(x){return parseInt(x.join(""))},"0",g("0",!1),function(){return parseFloat(w())},function(x,b){t=t||{data:{}},t.data.params||(t.data.params={}),b===null?b=void 0:b=b[1],t.data.params[x.toLowerCase()]=b},"render",g("render",!0),"session",g("session",!0),"icon",g("icon",!0),"alert",g("alert",!0),function(){t=t||{data:{}},t.startRule==="Content_Disposition"&&(t.data.type=w().toLowerCase())},"handling",g("handling",!0),"optional",g("optional",!0),"required",g("required",!0),function(x){t=t||{data:{}},t.data=parseInt(x.join(""))},function(){t=t||{data:{}},t.data=w()},"text",g("text",!0),"image",g("image",!0),"audio",g("audio",!0),"video",g("video",!0),"application",g("application",!0),"message",g("message",!0),"multipart",g("multipart",!0),"x-",g("x-",!0),function(x){t=t||{data:{}},t.data.value=parseInt(x.join(""))},function(x){t=t||{data:{}},t.data=x},function(x){t=t||{data:{}},t.data.event=x.toLowerCase()},function(){t=t||{data:{}};var x=t.data.tag;t.data=new hr(t.data.uri,t.data.displayName,t.data.params),x&&t.data.setParam("tag",x)},"tag",g("tag",!0),function(x){t=t||{data:{}},t.data.tag=x},function(x){t=t||{data:{}},t.data=parseInt(x.join(""))},function(x){t=t||{data:{}},t.data=x},function(){t=t||{data:{}},t.data=new hr(t.data.uri,t.data.displayName,t.data.params)},"digest",g("Digest",!0),"realm",g("realm",!0),function(x){t=t||{data:{}},t.data.realm=x},"domain",g("domain",!0),"nonce",g("nonce",!0),function(x){t=t||{data:{}},t.data.nonce=x},"opaque",g("opaque",!0),function(x){t=t||{data:{}},t.data.opaque=x},"stale",g("stale",!0),"true",g("true",!0),function(){t=t||{data:{}},t.data.stale=!0},"false",g("false",!0),function(){t=t||{data:{}},t.data.stale=!1},"algorithm",g("algorithm",!0),"md5",g("MD5",!0),"md5-sess",g("MD5-sess",!0),function(x){t=t||{data:{}},t.data.algorithm=x.toUpperCase()},"qop",g("qop",!0),"auth-int",g("auth-int",!0),"auth",g("auth",!0),function(x){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(x.toLowerCase())},function(x){t=t||{data:{}},t.data.value=parseInt(x.join(""))},function(){var x,b;for(t=t||{data:{}},b=t.data.multi_header.length,x=0;x<b;x++)if(t.data.multi_header[x].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var x;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{x=new hr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{x=null}t.data.multi_header.push({position:l,offset:T().start.offset,parsed:x})},function(){t=t||{data:{}},t.data=new hr(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",g("from-tag",!0),function(x){t=t||{data:{}},t.data.replaces_from_tag=x},"to-tag",g("to-tag",!0),function(x){t=t||{data:{}},t.data.replaces_to_tag=x},"early-only",g("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(x,b){return b},function(x,b){return M(x,b)},function(x){t=t||{data:{}},t.startRule==="Require"&&(t.data=x||[])},function(x){t=t||{data:{}},t.data.value=parseInt(x.join(""))},"active",g("active",!0),"pending",g("pending",!0),"terminated",g("terminated",!0),function(){t=t||{data:{}},t.data.state=w()},"reason",g("reason",!0),function(x){t=t||{data:{}},typeof x<"u"&&(t.data.reason=x)},function(x){t=t||{data:{}},typeof x<"u"&&(t.data.expires=x)},"retry_after",g("retry_after",!0),function(x){t=t||{data:{}},typeof x<"u"&&(t.data.retry_after=x)},"deactivated",g("deactivated",!0),"probation",g("probation",!0),"rejected",g("rejected",!0),"timeout",g("timeout",!0),"giveup",g("giveup",!0),"noresource",g("noresource",!0),"invariant",g("invariant",!0),function(x){t=t||{data:{}},t.startRule==="Supported"&&(t.data=x||[])},function(){t=t||{data:{}};var x=t.data.tag;t.data=new hr(t.data.uri,t.data.displayName,t.data.params),x&&t.data.setParam("tag",x)},"ttl",g("ttl",!0),function(x){t=t||{data:{}},t.data.ttl=x},"maddr",g("maddr",!0),function(x){t=t||{data:{}},t.data.maddr=x},"received",g("received",!0),function(x){t=t||{data:{}},t.data.received=x},"branch",g("branch",!0),function(x){t=t||{data:{}},t.data.branch=x},"rport",g("rport",!0),function(x){t=t||{data:{}},typeof x<"u"&&(t.data.rport=x.join(""))},function(x){t=t||{data:{}},t.data.protocol=x},g("UDP",!0),g("TCP",!0),g("TLS",!0),g("SCTP",!0),function(x){t=t||{data:{}},t.data.transport=x},function(){t=t||{data:{}},t.data.host=w()},function(x){t=t||{data:{}},t.data.port=parseInt(x.join(""))},function(x){return parseInt(x.join(""))},function(x){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=x)},"refresher",g("refresher",!1),"uas",g("uas",!1),"uac",g("uac",!1),function(x){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=x)},function(x){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=x)},"stuns",g("stuns",!0),"stun",g("stun",!0),function(x){t=t||{data:{}},t.data.scheme=x},function(x){t=t||{data:{}},t.data.host=x},"?transport=",g("?transport=",!1),"turns",g("turns",!0),"turn",g("turn",!0),function(x){t=t||{data:{}},t.data.transport=x},function(){t=t||{data:{}},t.data=w()},"Referred-By",g("Referred-By",!1),"b",g("b",!1),"cid",g("cid",!1)],a=[v('2 ""6 7!'),v('4"""5!7#'),v('4$""5!7%'),v(`4&""5!7'`),v(";'.# &;("),v('4(""5!7)'),v('4*""5!7+'),v('2,""6,7-'),v('2.""6.7/'),v('40""5!71'),v('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'),v(";).# &;,"),v('2F""6F7G.} &2H""6H7I.q &2J""6J7K.e &2L""6L7M.Y &2N""6N7O.M &2P""6P7Q.A &2R""6R7S.5 &2T""6T7U.) &2V""6V7W'),v(`%%2X""6X7Y/5#;#/,$;#/#$+#)(#'#("'#&'#/"!&,)`),v(`%%$;$0#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/�#*;$&&&#/'$8":Z" )("'#&'#`),v(';.." &"'),v(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),v(`%%$;2/�#*;2&&&#/g#$%$;.0#*;.&/,#;2/#$+")("'#&'#0=*%$;.0#*;.&/,#;2/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),v('4\\""5!7].# &;3'),v('4^""5!7_'),v('4`""5!7a'),v(';!.) &4b""5!7c'),v('%$;). &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&&&#/"!&,)'),v('%$;). &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&&&#/"!&,)'),v(`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.) &;'.# &;(`),v('%$;).ī &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&&&#/"!&,)'),v(`%;//?#2P""6P7Q/0$;//'$8#:t# )(#'#("'#&'#`),v(`%;//?#24""6475/0$;//'$8#:u# )(#'#("'#&'#`),v(`%;//?#2>""6>7?/0$;//'$8#:v# )(#'#("'#&'#`),v(`%;//?#2T""6T7U/0$;//'$8#:w# )(#'#("'#&'#`),v(`%;//?#2V""6V7W/0$;//'$8#:x# )(#'#("'#&'#`),v(`%2h""6h7i/0#;//'$8":y" )("'#&'#`),v(`%;//6#2f""6f7g/'$8":z" )("'#&'#`),v(`%;//?#2D""6D7E/0$;//'$8#:{# )(#'#("'#&'#`),v(`%;//?#22""6273/0$;//'$8#:|# )(#'#("'#&'#`),v(`%;//?#28""6879/0$;//'$8#:}# )(#'#("'#&'#`),v(`%;//0#;&/'$8":~" )("'#&'#`),v(`%;&/0#;//'$8":~" )("'#&'#`),v(`%;=/T#$;G.) &;K.# &;F0/*;G.) &;K.# &;F&/,$;>/#$+#)(#'#("'#&'#`),v('4""5!7.A &4""5!7.5 &4""5!7.) &;3.# &;.'),v(`%%;//Q#;&/H$$;J.# &;K0)*;J.# &;K&/,$;&/#$+$)($'#(#'#("'#&'#/"!&,)`),v(`%;//]#;&/T$%$;J.# &;K0)*;J.# &;K&/"!&,)/1$;&/($8$:
$!!)($'#(#'#("'#&'#`),v(';..G &2L""6L7M.; &4""5!7./ &4""5!7.# &;3'),v(`%2j""6j7k/J#4""5!7.5 &4""5!7.) &4""5!7/#$+")("'#&'#`),v(`%;N/M#28""6879/>$;O." &"/0$;S/'$8$:$ )($'#(#'#("'#&'#`),v(`%;N/d#28""6879/U$;O." &"/G$;S/>$;_/5$;l." &"/'$8&:& )(&'#(%'#($'#(#'#("'#&'#`),v(`%3""5$7.) &3""5#7/' 8!:!! )`),v(`%;P/]#%28""6879/,#;R/#$+")("'#&'#." &"/6$2:""6:7;/'$8#:# )(#'#("'#&'#`),v("$;+.) &;-.# &;Q/2#0/*;+.) &;-.# &;Q&&&#"),v('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'),v('%$;+._ &;-.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!:! )'),v(`%;T/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),v("%;U.) &;\\.# &;X/& 8!:! )"),v(`%$%;V/2#2J""6J7K/#$+")("'#&'#0<*%;V/2#2J""6J7K/#$+")("'#&'#&/D#;W/;$2J""6J7K." &"/'$8#:# )(#'#("'#&'#`),v('$4""5!7/,#0)*4""5!7&&&#'),v(`%4$""5!7%/?#$4""5!70)*4""5!7&/#$+")("'#&'#`),v(`%2l""6l7m/?#;Y/6$2n""6n7o/'$8#:# )(#'#("'#&'#`),v(`%%;Z/³#28""6879/¤$;Z/$28""6879/$;Z/$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+-)(-'#(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ސ &%2""67/¤#;Z/$28""6879/$;Z/$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2""67/#;Z/$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2""67/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2""67/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2""67/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2""67/,#;[/#$+")("'#&'#.ծ &%2""67/,#;Z/#$+")("'#&'#.Տ &%;Z/#2""67/$;Z/$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/$2""67/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2""67/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2""67/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2""67/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2""67/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2""67/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 8!: ! )`),v(`%;#/M#;#." &"/?$;#." &"/1$;#." &"/#$+$)($'#(#'#("'#&'#`),v(`%;Z/;#28""6879/,$;Z/#$+#)(#'#("'#&'#.# &;\\`),v(`%;]/o#2J""6J7K/\`$;]/W$2J""6J7K/H$;]/?$2J""6J7K/0$;]/'$8':¡' )(''#(&'#(%'#($'#(#'#("'#&'#`),v(`%2¢""6¢7£/2#4¤""5!7¥/#$+")("'#&'#. &%2¦""6¦7§/;#4¨""5!7©/,$;!/#$+#)(#'#("'#&'#.j &%2ª""6ª7«/5#;!/,$;!/#$+#)(#'#("'#&'#.B &%4¬""5!7/,#;!/#$+")("'#&'#.# &;!`),v(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:®!! )`),v(`$%22""6273/,#;\`/#$+")("'#&'#0<*%22""6273/,#;\`/#$+")("'#&'#&`),v(";a.A &;b.; &;c.5 &;d./ &;e.) &;f.# &;g"),v(`%3¯""5*7°/a#3±""5#7².G &3³""5#7´.; &3µ""5$7¶./ &3·""5#7¸.# &;6/($8":¹"! )("'#&'#`),v(`%3º""5%7»/I#3¼""5%7½./ &3¾""5"7¿.# &;6/($8":À"! )("'#&'#`),v(`%3Á""5'7Â/1#;/($8":Ã"! )("'#&'#`),v(`%3Ä""5$7Å/1#;ð/($8":Æ"! )("'#&'#`),v(`%3Ç""5&7È/1#;T/($8":É"! )("'#&'#`),v(`%3Ê""5"7Ë/N#%2>""6>7?/,#;6/#$+")("'#&'#." &"/'$8":Ì" )("'#&'#`),v(`%;h/P#%2>""6>7?/,#;i/#$+")("'#&'#." &"/)$8":Í""! )("'#&'#`),v('%$;j/�#*;j&&&#/"!&,)'),v('%$;j/�#*;j&&&#/"!&,)'),v(";k.) &;+.# &;-"),v('2l""6l7m.e &2n""6n7o.Y &24""6475.M &28""6879.A &2<""6<7=.5 &2@""6@7A.) &2B""6B7C'),v(`%26""6677/n#;m/e$$%2<""6<7=/,#;m/#$+")("'#&'#0<*%2<""6<7=/,#;m/#$+")("'#&'#&/#$+#)(#'#("'#&'#`),v(`%;n/A#2>""6>7?/2$;o/)$8#:Î#"" )(#'#("'#&'#`),v("$;p.) &;+.# &;-/2#0/*;p.) &;+.# &;-&&&#"),v("$;p.) &;+.# &;-0/*;p.) &;+.# &;-&"),v('2l""6l7m.e &2n""6n7o.Y &24""6475.M &26""6677.A &28""6879.5 &2@""6@7A.) &2B""6B7C'),v(";.# &;r"),v(`%;/G#;'/>$;s/5$;'/,$;/#$+%)(%'#($'#(#'#("'#&'#`),v(";M.# &;t"),v(`%;/E#28""6879/6$;u.# &;x/'$8#:Ï# )(#'#("'#&'#`),v(`%;v.# &;w/J#%26""6677/,#;/#$+")("'#&'#." &"/#$+")("'#&'#`),v(`%2Ð""6Ð7Ñ/:#;/1$;w." &"/#$+#)(#'#("'#&'#`),v(`%24""6475/,#;{/#$+")("'#&'#`),v(`%;z/3#$;y0#*;y&/#$+")("'#&'#`),v(";*.) &;+.# &;-"),v(';+. &;-. &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'),v(`%;|/e#$%24""6475/,#;|/#$+")("'#&'#0<*%24""6475/,#;|/#$+")("'#&'#&/#$+")("'#&'#`),v(`%$;~0#*;~&/e#$%22""6273/,#;}/#$+")("'#&'#0<*%22""6273/,#;}/#$+")("'#&'#&/#$+")("'#&'#`),v("$;~0#*;~&"),v(';+.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'),v(`%%;"/#$;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K0M*;".G &;!.A &2@""6@7A.5 &2F""6F7G.) &2J""6J7K&/#$+")("'#&'#/& 8!:Ò! )`),v(";.# &;"),v(`%%;O/2#2:""6:7;/#$+")("'#&'#." &"/,#;S/#$+")("'#&'#." &"`),v('$;+. &;-.} &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&&&#'),v("$;y0#*;y&"),v(`%3""5#7Ó/q#24""6475/b$$;!/�#*;!&&&#/L$2J""6J7K/=$$;!/�#*;!&&&#/'$8%:Ô% )(%'#($'#(#'#("'#&'#`),v('2Õ""6Õ7Ö'),v('2×""6×7Ø'),v('2Ù""6Ù7Ú'),v('2Û""6Û7Ü'),v('2Ý""6Ý7Þ'),v('2ß""6ß7à'),v('2á""6á7â'),v('2ã""6ã7ä'),v('2å""6å7æ'),v('2ç""6ç7è'),v('2é""6é7ê'),v("%;
.Y &;.S &;.M &;.G &;.A &;.; &;.5 &;./ &;.) &;.# &;6/& 8!:ë! )"),v(`%;/G#;'/>$;/5$;'/,$;/#$+%)(%'#($'#(#'#("'#&'#`),v("%;/' 8!:ì!! )"),v(`%;!/5#;!/,$;!/#$+#)(#'#("'#&'#`),v("%$;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(0G*;*.A &;+.; &;-.5 &;3./ &;4.) &;'.# &;(&/& 8!:í! )"),v(`%;¶/Y#$%;A/,#;¶/#$+")("'#&'#06*%;A/,#;¶/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;9/N#%2:""6:7;/,#;9/#$+")("'#&'#." &"/'$8":î" )("'#&'#`),v(`%;:.c &%;/Y#$%;A/,#;/#$+")("'#&'#06*%;A/,#;/#$+")("'#&'#&/#$+")("'#&'#/& 8!:ï! )`),v(`%;L.# &;/]#$%;B/,#;/#$+")("'#&'#06*%;B/,#;/#$+")("'#&'#&/'$8":ð" )("'#&'#`),v(`%;." &"/>#;@/5$;M/,$;?/#$+$)($'#(#'#("'#&'#`),v(`%%;6/Y#$%;./,#;6/#$+")("'#&'#06*%;./,#;6/#$+")("'#&'#&/#$+")("'#&'#.# &;H/' 8!:ñ!! )`),v(";.) &;.# &; "),v(`%3ò""5!7ó/:#;</1$;/($8#:ô#! )(#'#("'#&'#`),v(`%3õ""5'7ö/:#;</1$;/($8#:÷#! )(#'#("'#&'#`),v("%$;!/�#*;!&&&#/' 8!:ø!! )"),v(`%2ù""6ù7ú/o#%2J""6J7K/M#;!." &"/?$;!." &"/1$;!." &"/#$+$)($'#(#'#("'#&'#." &"/'$8":û" )("'#&'#`),v(`%;6/J#%;</,#;¡/#$+")("'#&'#." &"/)$8":ü""! )("'#&'#`),v(";6.) &;T.# &;H"),v(`%;£/Y#$%;B/,#;¤/#$+")("'#&'#06*%;B/,#;¤/#$+")("'#&'#&/#$+")("'#&'#`),v(`%3ý""5&7þ.G &3ÿ""5'7Ā.; &3ā""5$7Ă./ &3ă""5%7Ą.# &;6/& 8!:ą! )`),v(";¥.# &; "),v(`%3Ć""5(7ć/M#;</D$3Ĉ""5(7ĉ./ &3Ċ""5(7ċ.# &;6/#$+#)(#'#("'#&'#`),v(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),v("%$;!/�#*;!&&&#/' 8!:Č!! )"),v("%;©/& 8!:č! )"),v(`%;ª/k#;;/b$;¯/Y$$%;B/,#;°/#$+")("'#&'#06*%;B/,#;°/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(";«.# &;¬"),v('3Ď""5$7ď.S &3Đ""5%7đ.G &3Ē""5%7ē.; &3Ĕ""5%7ĕ./ &3Ė""5+7ė.# &;'),v(`3Ę""5'7ę./ &3Ě""5)7ě.# &;`),v(";6.# &;®"),v(`%3Ĝ""5"7ĝ/,#;6/#$+")("'#&'#`),v(";.# &;6"),v(`%;6/5#;</,$;±/#$+#)(#'#("'#&'#`),v(";6.# &;H"),v(`%;³/5#;./,$;/#$+#)(#'#("'#&'#`),v("%$;!/�#*;!&&&#/' 8!:Ğ!! )"),v("%;/' 8!:ğ!! )"),v(`%;¶/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ġ"!!)("'#&'#`),v(`%%;7/e#$%2J""6J7K/,#;7/#$+")("'#&'#0<*%2J""6J7K/,#;7/#$+")("'#&'#&/#$+")("'#&'#/"!&,)`),v(`%;L.# &;/]#$%;B/,#;¸/#$+")("'#&'#06*%;B/,#;¸/#$+")("'#&'#&/'$8":ġ" )("'#&'#`),v(";¹.# &; "),v(`%3Ģ""5#7ģ/:#;</1$;6/($8#:Ĥ#! )(#'#("'#&'#`),v("%$;!/�#*;!&&&#/' 8!:ĥ!! )"),v("%;/' 8!:Ħ!! )"),v(`%$;0#*;&/x#;@/o$;M/f$;?/]$$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8%:ħ% )(%'#($'#(#'#("'#&'#`),v(";¾"),v(`%3Ĩ""5&7ĩ/k#;./b$;Á/Y$$%;A/,#;Á/#$+")("'#&'#06*%;A/,#;Á/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#.# &;¿`),v(`%;6/k#;./b$;À/Y$$%;A/,#;À/#$+")("'#&'#06*%;A/,#;À/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(`%;6/;#;</2$;6.# &;H/#$+#)(#'#("'#&'#`),v(";Â.G &;Ä.A &;Æ.; &;È.5 &;É./ &;Ê.) &;Ë.# &;À"),v(`%3Ī""5%7ī/5#;</,$;Ã/#$+#)(#'#("'#&'#`),v("%;I/' 8!:Ĭ!! )"),v(`%3ĭ""5&7Į/#;</$;D/
$;Å/|$$%$;'/�#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/�#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;E/#$+&)(&'#(%'#($'#(#'#("'#&'#`),v(";t.# &;w"),v(`%3į""5%7İ/5#;</,$;Ç/#$+#)(#'#("'#&'#`),v("%;I/' 8!:ı!! )"),v(`%3IJ""5&7ij/:#;</1$;I/($8#:Ĵ#! )(#'#("'#&'#`),v(`%3ĵ""5%7Ķ/]#;</T$%3ķ""5$7ĸ/& 8!:Ĺ! ).4 &%3ĺ""5%7Ļ/& 8!:ļ! )/#$+#)(#'#("'#&'#`),v(`%3Ľ""5)7ľ/R#;</I$3Ŀ""5#7ŀ./ &3Ł""5(7ł.# &;6/($8#:Ń#! )(#'#("'#&'#`),v(`%3ń""5#7Ņ/#;</$;D/$%;Ì/e#$%2D""6D7E/,#;Ì/#$+")("'#&'#0<*%2D""6D7E/,#;Ì/#$+")("'#&'#&/#$+")("'#&'#/,$;E/#$+%)(%'#($'#(#'#("'#&'#`),v(`%3ņ""5(7Ň./ &3ň""5$7ʼn.# &;6/' 8!:Ŋ!! )`),v(`%;6/Y#$%;A/,#;6/#$+")("'#&'#06*%;A/,#;6/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;Ï/G#;./>$;Ï/5$;./,$;/#$+%)(%'#($'#(#'#("'#&'#`),v("%$;!/�#*;!&&&#/' 8!:ŋ!! )"),v(`%;Ñ/]#$%;A/,#;Ñ/#$+")("'#&'#06*%;A/,#;Ñ/#$+")("'#&'#&/'$8":Ō" )("'#&'#`),v(`%;/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":ō" )("'#&'#`),v(`%;L.O &;.I &%;@." &"/:#;t/1$;?." &"/#$+#)(#'#("'#&'#/]#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/'$8":Ŏ" )("'#&'#`),v(`%;Ô/]#$%;B/,#;Õ/#$+")("'#&'#06*%;B/,#;Õ/#$+")("'#&'#&/'$8":ŏ" )("'#&'#`),v("%;/& 8!:Ő! )"),v(`%3ő""5(7Œ/:#;</1$;6/($8#:œ#! )(#'#("'#&'#.g &%3Ŕ""5&7ŕ/:#;</1$;6/($8#:Ŗ#! )(#'#("'#&'#.: &%3ŗ""5*7Ř/& 8!:ř! ).# &; `),v(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:Ŝ!! )`),v(`%;Ø/Y#$%;A/,#;Ø/#$+")("'#&'#06*%;A/,#;Ø/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;/Y#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/#$+")("'#&'#`),v("%$;!/�#*;!&&&#/' 8!:ŝ!! )"),v(`%;Û/Y#$%;B/,#;Ü/#$+")("'#&'#06*%;B/,#;Ü/#$+")("'#&'#&/#$+")("'#&'#`),v(`%3Ş""5&7ş.; &3Š""5'7š./ &3Ţ""5*7ţ.# &;6/& 8!:Ť! )`),v(`%3ť""5&7Ŧ/:#;</1$;Ý/($8#:ŧ#! )(#'#("'#&'#.} &%3õ""5'7ö/:#;</1$;/($8#:Ũ#! )(#'#("'#&'#.P &%3ũ""5+7Ū/:#;</1$;/($8#:ū#! )(#'#("'#&'#.# &; `),v(`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`),v(';1." &"'),v(`%%;6/k#$%;A/2#;6/)$8":Ś""$ )("'#&'#0<*%;A/2#;6/)$8":Ś""$ )("'#&'#&/)$8":ś""! )("'#&'#." &"/' 8!:ź!! )`),v(`%;L.# &;/]#$%;B/,#;á/#$+")("'#&'#06*%;B/,#;á/#$+")("'#&'#&/'$8":Ż" )("'#&'#`),v(";¹.# &; "),v(`%;ã/Y#$%;A/,#;ã/#$+")("'#&'#06*%;A/,#;ã/#$+")("'#&'#&/#$+")("'#&'#`),v(`%;ê/k#;./b$;í/Y$$%;B/,#;ä/#$+")("'#&'#06*%;B/,#;ä/#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(";å.; &;æ.5 &;ç./ &;è.) &;é.# &; "),v(`%3ż""5#7Ž/:#;</1$;ð/($8#:ž#! )(#'#("'#&'#`),v(`%3ſ""5%7ƀ/:#;</1$;T/($8#:Ɓ#! )(#'#("'#&'#`),v(`%3Ƃ""5(7ƃ/F#;</=$;\\.) &;Y.# &;X/($8#:Ƅ#! )(#'#("'#&'#`),v(`%3ƅ""5&7Ɔ/:#;</1$;6/($8#:Ƈ#! )(#'#("'#&'#`),v(`%3ƈ""5%7Ɖ/A#;</8$$;!0#*;!&/($8#:Ɗ#! )(#'#("'#&'#`),v(`%;ë/G#;;/>$;6/5$;;/,$;ì/#$+%)(%'#($'#(#'#("'#&'#`),v(`%3""5#7Ó.# &;6/' 8!:Ƌ!! )`),v(`%3±""5#7ƌ.G &3³""5#7ƍ.; &3·""5#7Ǝ./ &3µ""5$7Ə.# &;6/' 8!:Ɛ!! )`),v(`%;î/D#%;C/,#;ï/#$+")("'#&'#." &"/#$+")("'#&'#`),v("%;U.) &;\\.# &;X/& 8!:Ƒ! )"),v(`%%;!." &"/[#;!." &"/M$;!." &"/?$;!." &"/1$;!." &"/#$+%)(%'#($'#(#'#("'#&'#/' 8!:ƒ!! )`),v(`%%;!/?#;!." &"/1$;!." &"/#$+#)(#'#("'#&'#/' 8!:Ɠ!! )`),v(";¾"),v(`%;/^#$%;B/,#;ó/#$+")("'#&'#06*%;B/,#;ó/#$+")("'#&'#&/($8":Ɣ"!!)("'#&'#`),v(";ô.# &; "),v(`%2ƕ""6ƕ7Ɩ/L#;</C$2Ɨ""6Ɨ7Ƙ.) &2ƙ""6ƙ7ƚ/($8#:ƛ#! )(#'#("'#&'#`),v(`%;/^#$%;B/,#; /#$+")("'#&'#06*%;B/,#; /#$+")("'#&'#&/($8":Ɯ"!!)("'#&'#`),v(`%;6/5#;0/,$;÷/#$+#)(#'#("'#&'#`),v("$;2.) &;4.# &;.0/*;2.) &;4.# &;.&"),v("$;%0#*;%&"),v(`%;ú/;#28""6879/,$;û/#$+#)(#'#("'#&'#`),v(`%3Ɲ""5%7ƞ.) &3Ɵ""5$7Ơ/' 8!:ơ!! )`),v(`%;ü/J#%28""6879/,#;^/#$+")("'#&'#." &"/#$+")("'#&'#`),v("%;\\.) &;X.# &;/' 8!:Ƣ!! )"),v(';".S &;!.M &2F""6F7G.A &2J""6J7K.5 &2H""6H7I.) &2N""6N7O'),v('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?'),v(`%;Ā/b#28""6879/S$;û/J$%2ƣ""6ƣ7Ƥ/,#;ì/#$+")("'#&'#." &"/#$+$)($'#(#'#("'#&'#`),v(`%3ƥ""5%7Ʀ.) &3Ƨ""5$7ƨ/' 8!:ơ!! )`),v(`%3±""5#7².6 &3³""5#7´.* &$;+0#*;+&/' 8!:Ʃ!! )`),v(`%;Ą/#2F""6F7G/x$;ă/o$2F""6F7G/\`$;ă/W$2F""6F7G/H$;ă/?$2F""6F7G/0$;ą/'$8):ƪ) )()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#`),v(`%;#/>#;#/5$;#/,$;#/#$+$)($'#(#'#("'#&'#`),v(`%;ă/,#;ă/#$+")("'#&'#`),v(`%;ă/5#;ă/,$;ă/#$+#)(#'#("'#&'#`),v(`%;q/T#$;m0#*;m&/D$%; /,#;ø/#$+")("'#&'#." &"/#$+#)(#'#("'#&'#`),v(`%2ƫ""6ƫ7Ƭ.) &2ƭ""6ƭ7Ʈ/w#;0/n$;Ĉ/e$$%;B/2#;ĉ.# &; /#$+")("'#&'#0<*%;B/2#;ĉ.# &; /#$+")("'#&'#&/#$+$)($'#(#'#("'#&'#`),v(";.# &;L"),v(`%2Ư""6Ư7ư/5#;</,$;Ċ/#$+#)(#'#("'#&'#`),v(`%;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 T(){return E(u,l)}function g(x,b){return{type:"literal",text:x,ignoreCase:b}}function C(x,b,y){return{type:"class",parts:x,inverted:b,ignoreCase:y}}function _(){return{type:"end"}}function S(x){let b=c[x],y;if(b)return b;for(y=x-1;!c[y];)y--;for(b=c[y],b={line:b.line,column:b.column};y<x;)e.charCodeAt(y)===10?(b.line++,b.column=1):b.column++,y++;return c[x]=b,b}function E(x,b){const y=S(x),O=S(b);return{source:n,start:{offset:x,line:y.line,column:y.column},end:{offset:b,line:O.line,column:O.column}}}function I(x){l<d||(l>d&&(d=l,p=[]),p.push(x))}function N(x,b,y){return new Wf(Wf.buildMessage(x,b),x,b,y)}function v(x){return x.split("").map(b=>b.charCodeAt(0)-32)}function H(x){const b=a[x];let y=0;const O=[];let q=b.length;const B=[],Z=[];let W;for(;;){for(;y<q;)switch(b[y]){case 0:Z.push(o[b[y+1]]),y+=2;break;case 1:Z.push(void 0),y++;break;case 2:Z.push(null),y++;break;case 3:Z.push(r),y++;break;case 4:Z.push([]),y++;break;case 5:Z.push(l),y++;break;case 6:Z.pop(),y++;break;case 7:l=Z.pop(),y++;break;case 8:Z.length-=b[y+1],y+=2;break;case 9:Z.splice(-2,1),y++;break;case 10:Z[Z.length-2].push(Z.pop()),y++;break;case 11:Z.push(Z.splice(Z.length-b[y+1],b[y+1])),y+=2;break;case 12:Z.push(e.substring(Z.pop(),l)),y++;break;case 13:B.push(q),O.push(y+3+b[y+1]+b[y+2]),Z[Z.length-1]?(q=y+3+b[y+1],y+=3):(q=y+3+b[y+1]+b[y+2],y+=3+b[y+1]);break;case 14:B.push(q),O.push(y+3+b[y+1]+b[y+2]),Z[Z.length-1]===r?(q=y+3+b[y+1],y+=3):(q=y+3+b[y+1]+b[y+2],y+=3+b[y+1]);break;case 15:B.push(q),O.push(y+3+b[y+1]+b[y+2]),Z[Z.length-1]!==r?(q=y+3+b[y+1],y+=3):(q=y+3+b[y+1]+b[y+2],y+=3+b[y+1]);break;case 16:Z[Z.length-1]!==r?(B.push(q),O.push(y),q=y+2+b[y+1],y+=2):y+=2+b[y+1];break;case 17:B.push(q),O.push(y+3+b[y+1]+b[y+2]),e.length>l?(q=y+3+b[y+1],y+=3):(q=y+3+b[y+1]+b[y+2],y+=3+b[y+1]);break;case 18:B.push(q),O.push(y+4+b[y+2]+b[y+3]),e.substr(l,o[b[y+1]].length)===o[b[y+1]]?(q=y+4+b[y+2],y+=4):(q=y+4+b[y+2]+b[y+3],y+=4+b[y+2]);break;case 19:B.push(q),O.push(y+4+b[y+2]+b[y+3]),e.substr(l,o[b[y+1]].length).toLowerCase()===o[b[y+1]]?(q=y+4+b[y+2],y+=4):(q=y+4+b[y+2]+b[y+3],y+=4+b[y+2]);break;case 20:B.push(q),O.push(y+4+b[y+2]+b[y+3]),o[b[y+1]].test(e.charAt(l))?(q=y+4+b[y+2],y+=4):(q=y+4+b[y+2]+b[y+3],y+=4+b[y+2]);break;case 21:Z.push(e.substr(l,b[y+1])),l+=b[y+1],y+=2;break;case 22:Z.push(o[b[y+1]]),l+=o[b[y+1]].length,y+=2;break;case 23:Z.push(r),h===0&&I(o[b[y+1]]),y+=2;break;case 24:u=Z[Z.length-1-b[y+1]],y+=2;break;case 25:u=l,y++;break;case 26:W=b.slice(y+4,y+4+b[y+3]).map(function(le){return Z[Z.length-1-le]}),Z.splice(Z.length-b[y+2],b[y+2],o[b[y+1]].apply(null,W)),y+=4+b[y+3];break;case 27:Z.push(H(b[y+1])),y+=2;break;case 28:h++,y++;break;case 29:h--,y++;break;default:throw new Error("Invalid opcode: "+b[y]+".")}if(B.length>0)q=B.pop(),y=O.pop();else break}return Z[0]}t.data={};function M(x,b){return[x].concat(b)}if(m=H(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&I(_()),N(p,d<e.length?e.charAt(d):null,d<e.length?E(d,d+1):E(d,d))}const L0=B0;var _t;(function(e){function t(s,i){const o={startRule:i};try{L0(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})(_t=_t||(_t={}));var F0={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 ts(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 Io(e){return F0[e]||""}function $o(){return ts(10)}function Hr(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 Si(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var Gf=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=Hr(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[Hr(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[Hr(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[Hr(e)]}parseHeader(e,t=0){if(e=Hr(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=_t.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[Hr(e)]=[{raw:t}]}toString(){return this.data}},Is=class extends Gf{constructor(){super()}},Cn=class extends Gf{constructor(){super()}},Pl=class wa{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=wa.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:$o(),this.from=wa.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=wa.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+ts(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 hr(t,r,s)}getHeader(t){const r=this.headers[Hr(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[Hr(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[Hr(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[Hr(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,14 +23,14 @@
|
|
|
23
23
|
\r
|
|
24
24
|
`:t+=`Content-Length: 0\r
|
|
25
25
|
\r
|
|
26
|
-
`,t}};function Jf(e){return e==="application/sdp"?"session":"render"}function Io(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:Jf(r),contentType:r,content:t}}function Yf(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function Ci(e){let t,r,n;if(e instanceof Is&&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 Cn&&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 $l&&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(Yf(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=Jf(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var gr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(gr=gr||(gr={}));var ge;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(ge=ge||(ge={}));var rn=500,V0=4e3,Pl=5e3;const Et={T1:rn,T2:V0,T4:Pl,TIMER_B:64*rn,TIMER_D:0*rn,TIMER_F:64*rn,TIMER_H:64*rn,TIMER_I:0*Pl,TIMER_J:0*rn,TIMER_K:0*Pl,TIMER_L:64*rn,TIMER_M:64*rn,TIMER_N:64*rn,PROVISIONAL_RESPONSE_INTERVAL:6e4};var xn=class extends es{constructor(e){super(e||"Transaction state error.")}},be;(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"})(be=be||(be={}));const Tn=[be.ACK,be.BYE,be.CANCEL,be.INFO,be.INVITE,be.MESSAGE,be.NOTIFY,be.OPTIONS,be.PRACK,be.REFER,be.REGISTER,be.SUBSCRIBE];var Zf=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()}},Dl=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()}},j0=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof hr))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 Ol=class hg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=z.Initial,this.delegate=r.delegate,this._stateEventEmitter=new _i,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 kl("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=Ci(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: "+Tn.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 hg&&!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 gr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case gr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case gr.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 gr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(z.Terminated),Promise.resolve(s)}case gr.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 H0(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case ge.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 ge.Stable:{const s=Ci(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 ge.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 ge.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 ge.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 M0(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 q0(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=_t.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===ge.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 Zf(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 Dl(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new Dl(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 j0(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=Ci(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 ge.Initial:return this.getOffer(t);case ge.HaveLocalOffer:return Promise.resolve(void 0);case ge.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 ge.Stable:return this.state!==z.Established?Promise.resolve(void 0):this.getOffer(t);case ge.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=>Io(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 Al)}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 Al)}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=>Io(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=ko(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 Sn)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}},Er;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(Er=Er||(Er={}));const U0={"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 $s=class extends Ol{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=_t.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===Er.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:ko(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?Io(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 N0(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=Ci(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 ge.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ge.Stable:return this.setAnswer(t,r).then(()=>{});case ge.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ge.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case ge.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 Al?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof O0?this.logger.error("A session description handler occurred while sending response"):e instanceof Rl?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):e instanceof xn&&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?Io(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:T=>{u=T,clearTimeout(p),clearTimeout(y),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(x){a(x)}}).catch(v=>a(v)))}};const p=setTimeout(()=>{this.waitingForPrack&&(this.waitingForPrack=!1,this.logger.warn("No PRACK received, rejecting INVITE."),clearTimeout(y),this.reject({statusCode:504}).then(()=>a(new Rl)).catch(T=>a(T)))},Et.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(T){this.waitingForPrack=!1,a(T);return}y=setTimeout(h,m*=2)};let m=Et.T1,y=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 Rl),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},$o=class extends Ol{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=Ro(),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"?_t.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"?_t.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===Er.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===Er.Required&&u.push("Require: replaces"),n.extraHeaders=u,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(be.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=ko(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 Ol))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=_t.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 ge.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 ge.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 ge.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 ge.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 ge.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=_t.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 ge.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 ge.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case ge.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 ge.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 ge.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}}},st;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(st=st||(st={}));var Hl=class cs{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=st.Initial,this._waiting=!1,this._stateEventEmitter=new _i,this._waitingEventEmitter=new _i,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},cs.defaultOptions()),{registrar:n}),cs.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&&_t.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(be.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||cs.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||cs.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:cs.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new Sn("sip","anonymous","anonymous.invalid"),refreshFrequency:cs.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===st.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===st.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 kl("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&&Kf(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(Kf(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=_t.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=_t.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===st.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==st.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new kl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==st.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!==st.Registered&&this.stateTransition(st.Registered)}unregistered(){this.clearTimers(),this._state!==st.Unregistered&&this.stateTransition(st.Unregistered)}terminated(){this.clearTimers(),this._state!==st.Terminated&&this.stateTransition(st.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case st.Initial:t!==st.Registered&&t!==st.Unregistered&&t!==st.Terminated&&r();break;case st.Registered:t!==st.Unregistered&&t!==st.Terminated&&r();break;case st.Unregistered:t!==st.Registered&&t!==st.Terminated&&r();break;case st.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===st.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===st.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)}};Hl.defaultExpires=600,Hl.defaultRefreshFrequency=99;var Ye;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Ye=Ye||(Ye={}));var Me;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(Me=Me||(Me={}));var $t;(function(e){e.Started="Started",e.Stopped="Stopped"})($t=$t||($t={}));var En=class wr{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=wr.hexChars,n=wr.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(wr.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,wr._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,wr._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,wr._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(wr.buffer32Identity.subarray(i),i),r>55&&(wr._md5cycle(this._state,s),s.set(wr.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 wr._md5cycle(this._state,s),t?this._state:wr._hex(this._state)}};En.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),En.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),En.hexChars="0123456789abcdef",En.hexOut=[],En.onePassHasher=new En,En.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function An(e){return En.hashStr(e)}var z0=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=ts(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=An(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=An(this.method+":"+this.uri),this.response=An(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=An(this.method+":"+this.uri+":"+An(e||"")),this.response=An(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=An(this.method+":"+this.uri),this.response=An(t+":"+this.nonce+":"+r))}},At;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(At=At||(At={}));var Xf=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(At.error,e)}warn(e){this.genericLog(At.warn,e)}log(e){this.genericLog(At.log,e)}debug(e){this.genericLog(At.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}},K0=class{constructor(){this.builtinEnabled=!0,this._level=At.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:At.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 Xf(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new Xf(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(At[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 At.error:console.error(n);break;case At.warn:console.warn(n);break;case At.log:console.log(n);break;case At.debug:console.debug(n);break;default:break}}},Po;(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
|
|
26
|
+
`,t}};function Jf(e){return e==="application/sdp"?"session":"render"}function Po(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:Jf(r),contentType:r,content:t}}function Yf(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function Ci(e){let t,r,n;if(e instanceof Is&&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 Cn&&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 Pl&&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(Yf(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=Jf(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var gr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(gr=gr||(gr={}));var ge;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(ge=ge||(ge={}));var rn=500,V0=4e3,Dl=5e3;const Et={T1:rn,T2:V0,T4:Dl,TIMER_B:64*rn,TIMER_D:0*rn,TIMER_F:64*rn,TIMER_H:64*rn,TIMER_I:0*Dl,TIMER_J:0*rn,TIMER_K:0*Dl,TIMER_L:64*rn,TIMER_M:64*rn,TIMER_N:64*rn,PROVISIONAL_RESPONSE_INTERVAL:6e4};var xn=class extends es{constructor(e){super(e||"Transaction state error.")}},be;(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"})(be=be||(be={}));const Tn=[be.ACK,be.BYE,be.CANCEL,be.INFO,be.INVITE,be.MESSAGE,be.NOTIFY,be.OPTIONS,be.PRACK,be.REFER,be.REGISTER,be.SUBSCRIBE];var Zf=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()}},Ol=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()}},j0=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof hr))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 Hl=class hg{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=z.Initial,this.delegate=r.delegate,this._stateEventEmitter=new _i,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 Rl("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=Ci(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: "+Tn.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 hg&&!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 gr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case gr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case gr.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 gr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(z.Terminated),Promise.resolve(s)}case gr.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 H0(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case ge.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 ge.Stable:{const s=Ci(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 ge.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 ge.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 ge.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 M0(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 q0(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=_t.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===ge.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 Zf(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 Ol(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new Ol(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 j0(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=Ci(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 ge.Initial:return this.getOffer(t);case ge.HaveLocalOffer:return Promise.resolve(void 0);case ge.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 ge.Stable:return this.state!==z.Established?Promise.resolve(void 0):this.getOffer(t);case ge.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=>Po(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 kl)}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 kl)}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=>Po(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=Io(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 Sn)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}},Er;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(Er=Er||(Er={}));const U0={"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 $s=class extends Hl{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=_t.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===Er.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:Io(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?Po(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 N0(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=Ci(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 ge.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ge.Stable:return this.setAnswer(t,r).then(()=>{});case ge.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ge.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case ge.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 kl?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof O0?this.logger.error("A session description handler occurred while sending response"):e instanceof Il?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):e instanceof xn&&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?Po(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:T=>{u=T,clearTimeout(p),clearTimeout(w),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(u).then(g=>{try{c=u.accept({statusCode:200,body:g}),this.prackArrived(),o({prackRequest:u,prackResponse:c,progressResponse:l})}catch(C){a(C)}}).catch(g=>a(g)))}};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 Il)).catch(T=>a(T)))},Et.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(T){this.waitingForPrack=!1,a(T);return}w=setTimeout(h,m*=2)};let m=Et.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 Il),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},Do=class extends Hl{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=$o(),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"?_t.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"?_t.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===Er.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===Er.Required&&u.push("Require: replaces"),n.extraHeaders=u,this.outgoingRequestMessage=e.userAgentCore.makeOutgoingRequestMessage(be.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=Io(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 Hl))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=_t.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 ge.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 ge.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 ge.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 ge.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 ge.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=_t.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 ge.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 ge.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case ge.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 ge.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 ge.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}}},st;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(st=st||(st={}));var Ml=class cs{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=st.Initial,this._waiting=!1,this._stateEventEmitter=new _i,this._waitingEventEmitter=new _i,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},cs.defaultOptions()),{registrar:n}),cs.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&&_t.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(be.REGISTER,s,i,o,a,l,void 0),this.expires=this.options.expires||cs.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||cs.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:cs.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new Sn("sip","anonymous","anonymous.invalid"),refreshFrequency:cs.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===st.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===st.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 Rl("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&&Kf(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(Kf(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=_t.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=_t.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===st.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==st.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new Rl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==st.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!==st.Registered&&this.stateTransition(st.Registered)}unregistered(){this.clearTimers(),this._state!==st.Unregistered&&this.stateTransition(st.Unregistered)}terminated(){this.clearTimers(),this._state!==st.Terminated&&this.stateTransition(st.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case st.Initial:t!==st.Registered&&t!==st.Unregistered&&t!==st.Terminated&&r();break;case st.Registered:t!==st.Unregistered&&t!==st.Terminated&&r();break;case st.Unregistered:t!==st.Registered&&t!==st.Terminated&&r();break;case st.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===st.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===st.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)}};Ml.defaultExpires=600,Ml.defaultRefreshFrequency=99;var Ye;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Ye=Ye||(Ye={}));var Me;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(Me=Me||(Me={}));var $t;(function(e){e.Started="Started",e.Stopped="Stopped"})($t=$t||($t={}));var En=class wr{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=wr.hexChars,n=wr.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(wr.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,wr._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,wr._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,wr._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(wr.buffer32Identity.subarray(i),i),r>55&&(wr._md5cycle(this._state,s),s.set(wr.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 wr._md5cycle(this._state,s),t?this._state:wr._hex(this._state)}};En.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),En.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),En.hexChars="0123456789abcdef",En.hexOut=[],En.onePassHasher=new En,En.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function An(e){return En.hashStr(e)}var z0=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=ts(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=An(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=An(this.method+":"+this.uri),this.response=An(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=An(this.method+":"+this.uri+":"+An(e||"")),this.response=An(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=An(this.method+":"+this.uri),this.response=An(t+":"+this.nonce+":"+r))}},At;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(At=At||(At={}));var Xf=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(At.error,e)}warn(e){this.genericLog(At.warn,e)}log(e){this.genericLog(At.log,e)}debug(e){this.genericLog(At.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}},K0=class{constructor(){this.builtinEnabled=!0,this._level=At.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:At.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 Xf(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new Xf(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(At[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 At.error:console.error(n);break;case At.warn:console.warn(n);break;case At.log:console.log(n);break;case At.debug:console.debug(n);break;default:break}}},Oo;(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
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=_t.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=_t.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 Cn&&(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=_t.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 Cn,c.statusCode=u.status_code,c.reasonPhrase=u.reason_phrase):(c=new Is,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})(
|
|
28
|
+
`);if(a===-1){i.warn("no CRLF found, not a SIP message, discarded");return}const l=s.substring(0,a),u=_t.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 Cn,c.statusCode=u.status_code,c.reasonPhrase=u.reason_phrase):(c=new Is,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})(Oo=Oo||(Oo={}));function Qf(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:Io(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
|
|
32
32
|
`,l=e.getHeaders("via").reduce((h,m)=>h+"Via: "+m+`\r
|
|
33
|
-
`,"");let u="To: "+e.getHeader("to");if(t.statusCode>100&&!e.parseHeader("to").hasParam("tag")){let h=t.toTag;h||(h
|
|
33
|
+
`,"");let u="To: "+e.getHeader("to");if(t.statusCode>100&&!e.parseHeader("to").hasParam("tag")){let h=t.toTag;h||(h=$o()),u+=";tag="+h}u+=`\r
|
|
34
34
|
`;let c="";t.supported&&(c="Supported: "+t.supported.join(", ")+`\r
|
|
35
35
|
`);let d="";t.userAgent&&(d="User-Agent: "+t.userAgent+`\r
|
|
36
36
|
`);let p="";return t.extraHeaders&&(p=t.extraHeaders.reduce((h,m)=>h+m.trim()+`\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 Ml=class extends es{constructor(e){super(e||"Unspecified transport error.")}},ep=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 Ml)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Ml(t.message):r=new Ml,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"}},tp=class extends ep{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},V;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(V=V||(V={}));var Yt=class extends tp{constructor(e,t,r){super(e,t,r,V.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 V.Proceeding:if(e.method===be.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case V.Accepted:if(e.method===be.INVITE)return;break;case V.Completed:if(e.method===be.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===be.ACK){this.stateTransition(V.Confirmed);return}break;case V.Confirmed:if(e.method===be.INVITE||e.method===be.ACK)return;break;case V.Terminated:if(e.method===be.INVITE||e.method===be.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 V.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(V.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(V.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case V.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case V.Completed:break;case V.Confirmed:break;case V.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===V.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 V.Proceeding:t();break;case V.Accepted:case V.Completed:this.state!==V.Proceeding&&t();break;case V.Confirmed:this.state!==V.Completed&&t();break;case V.Terminated:this.state!==V.Accepted&&this.state!==V.Completed&&this.state!==V.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===V.Accepted&&(this.L=setTimeout(()=>this.timerL(),Et.TIMER_L)),e===V.Completed&&(this.H=setTimeout(()=>this.timerH(),Et.TIMER_H)),e===V.Confirmed&&(this.I=setTimeout(()=>this.timerI(),Et.TIMER_I)),e===V.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.")})},Et.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===V.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(V.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(V.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===V.Accepted&&this.stateTransition(V.Terminated)}},rp=class gg extends ep{constructor(t,r,n,s,i){super(r,n,gg.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()}},Qt=class extends rp{constructor(e,t,r){super(e,t,r,V.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),Et.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 V.Trying:if(t>=100&&t<=199){this.stateTransition(V.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(V.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(V.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.Completed:return;case V.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(V.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 V.Trying:r();break;case V.Proceeding:this.state!==V.Trying&&r();break;case V.Completed:this.state!==V.Trying&&this.state!==V.Proceeding&&r();break;case V.Terminated:this.state!==V.Trying&&this.state!==V.Proceeding&&this.state!==V.Completed&&(t||r());break;default:r()}e===V.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),Et.TIMER_K)),e===V.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===V.Trying||this.state===V.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(V.Terminated))}timerK(){this.state===V.Completed&&this.stateTransition(V.Terminated)}},Ps=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 hr))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 hr))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!==be.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===be.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},kn=class extends rp{constructor(e,t,r){super(e,t,r,V.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),Et.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 V.Calling:if(t>=100&&t<=199){this.stateTransition(V.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(V.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(V.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.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(V.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(V.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.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 V.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case V.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(V.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 Nl=class extends es{constructor(e){super(e||"Unspecified transport error.")}},ep=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 Nl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Nl(t.message):r=new Nl,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"}},tp=class extends ep{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},V;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(V=V||(V={}));var Yt=class extends tp{constructor(e,t,r){super(e,t,r,V.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 V.Proceeding:if(e.method===be.INVITE){this.lastProvisionalResponse&&this.send(this.lastProvisionalResponse).catch(r=>{this.logTransportError(r,"Failed to send retransmission of provisional response.")});return}break;case V.Accepted:if(e.method===be.INVITE)return;break;case V.Completed:if(e.method===be.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===be.ACK){this.stateTransition(V.Confirmed);return}break;case V.Confirmed:if(e.method===be.INVITE||e.method===be.ACK)return;break;case V.Terminated:if(e.method===be.INVITE||e.method===be.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 V.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(V.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(V.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case V.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case V.Completed:break;case V.Confirmed:break;case V.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===V.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 V.Proceeding:t();break;case V.Accepted:case V.Completed:this.state!==V.Proceeding&&t();break;case V.Confirmed:this.state!==V.Completed&&t();break;case V.Terminated:this.state!==V.Accepted&&this.state!==V.Completed&&this.state!==V.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===V.Accepted&&(this.L=setTimeout(()=>this.timerL(),Et.TIMER_L)),e===V.Completed&&(this.H=setTimeout(()=>this.timerH(),Et.TIMER_H)),e===V.Confirmed&&(this.I=setTimeout(()=>this.timerI(),Et.TIMER_I)),e===V.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.")})},Et.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===V.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(V.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(V.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===V.Accepted&&this.stateTransition(V.Terminated)}},rp=class gg extends ep{constructor(t,r,n,s,i){super(r,n,gg.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()}},Qt=class extends rp{constructor(e,t,r){super(e,t,r,V.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),Et.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 V.Trying:if(t>=100&&t<=199){this.stateTransition(V.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(V.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(V.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.Completed:return;case V.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(V.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 V.Trying:r();break;case V.Proceeding:this.state!==V.Trying&&r();break;case V.Completed:this.state!==V.Trying&&this.state!==V.Proceeding&&r();break;case V.Terminated:this.state!==V.Trying&&this.state!==V.Proceeding&&this.state!==V.Completed&&(t||r());break;default:r()}e===V.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),Et.TIMER_K)),e===V.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===V.Trying||this.state===V.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(V.Terminated))}timerK(){this.state===V.Completed&&this.stateTransition(V.Terminated)}},Ps=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 hr))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 hr))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!==be.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===be.ACK?!0:this.remoteSequenceNumber&&e.cseq<=this.remoteSequenceNumber?(this.core.replyStateless(e,{statusCode:500}),!1):!0}},kn=class extends rp{constructor(e,t,r){super(e,t,r,V.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),Et.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 V.Calling:if(t>=100&&t<=199){this.stateTransition(V.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(V.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(V.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.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(V.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(V.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case V.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 V.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case V.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(V.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,7 +49,7 @@
|
|
|
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 V.Calling:r();break;case V.Proceeding:this.state!==V.Calling&&r();break;case V.Accepted:case V.Completed:this.state!==V.Calling&&this.state!==V.Proceeding&&r();break;case V.Terminated:this.state!==V.Calling&&this.state!==V.Accepted&&this.state!==V.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),V.Proceeding,e===V.Completed&&(this.D=setTimeout(()=>this.timerD(),Et.TIMER_D)),e===V.Accepted&&(this.M=setTimeout(()=>this.timerM(),Et.TIMER_M)),e===V.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===V.Calling&&(this.onRequestTimeout(),this.stateTransition(V.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===V.Completed&&this.stateTransition(V.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===V.Accepted&&this.stateTransition(V.Terminated)}},er=class Jc{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(be.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===V.Proceeding?new Jc(Qt,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===V.Proceeding&&new Jc(Qt,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 Cn;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 Cn;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===V.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)}},W0=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.BYE,r);super(Qt,e.userAgentCore,n,t),e.dispose()}},tr=class extends tp{constructor(e,t,r){super(e,t,r,V.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 V.Trying:break;case V.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 V.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 V.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 V.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(V.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(V.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case V.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(V.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case V.Completed:return;case V.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(V.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 V.Trying:r();break;case V.Proceeding:this.state!==V.Trying&&r();break;case V.Completed:this.state!==V.Trying&&this.state!==V.Proceeding&&r();break;case V.Terminated:this.state!==V.Proceeding&&this.state!==V.Completed&&(t||r());break;default:r()}e===V.Completed&&(this.J=setTimeout(()=>this.timerJ(),Et.TIMER_J)),e===V.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===V.Completed&&this.stateTransition(V.Terminated)}},Mr=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:Ro(),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 xn(`${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 xn(`${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 xn(`${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 xn(`${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 xn(`${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 Yt)return this.transaction.state===V.Proceeding||this.transaction.state===V.Accepted;if(this.transaction instanceof tr)return this.transaction.state===V.Trying||this.transaction.state===V.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof Yt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof tr)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof Yt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof tr)return this.transaction.state===V.Trying||this.transaction.state===V.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof Yt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof tr)return this.transaction.state===V.Trying||this.transaction.state===V.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof Yt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof tr)return this.transaction.state===V.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=Qf(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===V.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)}},G0=class extends Mr{constructor(e,t,r){super(tr,e.userAgentCore,t,r)}},J0=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INFO,r);super(Qt,e.userAgentCore,n,t)}},Y0=class extends Mr{constructor(e,t,r){super(tr,e.userAgentCore,t,r)}},np=class extends er{constructor(e,t,r){super(Qt,e,t,r)}},sp=class extends Mr{constructor(e,t,r){super(tr,e,t,r)}},Z0=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.NOTIFY,r);super(Qt,e.userAgentCore,n,t)}};function X0(e){return e.userAgentCore!==void 0}var Do=class extends Mr{constructor(e,t,r){const n=X0(e)?e.userAgentCore:e;super(tr,n,t,r)}},Q0=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.PRACK,r);super(Qt,e.userAgentCore,n,t),e.signalingStateTransition(n)}},ew=class extends Mr{constructor(e,t,r){super(tr,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)}},tw=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INVITE,r);super(kn,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}`)}}},rw=class extends Mr{constructor(e,t,r){super(Yt,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)}},nw=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.REFER,r);super(Qt,e.userAgentCore,n,t)}};function sw(e){return e.userAgentCore!==void 0}var ip=class extends Mr{constructor(e,t,r){const n=sw(e)?e.userAgentCore:e;super(tr,n,t,r)}},Oo=class extends Ps{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=ge.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof Yt&&(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=ge.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?gr.Early:this.ackWait?gr.AckWait:this._signalingState===ge.Closed?gr.Terminated:gr.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 kn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof kn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(be.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 Yt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==V.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 W0(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 J0(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 tw(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(be.MESSAGE,t);return new np(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 Z0(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new Q0(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 nw(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===be.ACK){if(this.ackWait){if(this.initialTransaction instanceof kn){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===be.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!==ge.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===be.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof hr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case be.BYE:{const t=new G0(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case be.INFO:{const t=new Y0(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case be.INVITE:{const t=new rw(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case be.MESSAGE:{const t=new sp(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Do(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case be.PRACK:{const t=new ew(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case be.REFER:{const t=new ip(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===ge.HaveLocalOffer||this.signalingState===ge.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=ge.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=Ci(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===ge.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof Is)switch(this._signalingState){case ge.Initial:case ge.Stable:this._signalingState=ge.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ge.HaveLocalOffer:this._signalingState=ge.Stable,this._answer=t;break;case ge.HaveRemoteOffer:break;case ge.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Cn)switch(this._signalingState){case ge.Initial:case ge.Stable:this._signalingState=ge.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ge.HaveLocalOffer:this._signalingState=ge.Stable,this._answer=t;break;case ge.HaveRemoteOffer:break;case ge.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof $l)switch(this._signalingState){case ge.Initial:case ge.Stable:this._signalingState=ge.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ge.HaveLocalOffer:break;case ge.HaveRemoteOffer:this._signalingState=ge.Stable,this._answer=t;break;case ge.Closed:break;default:throw new Error("Unexpected signaling state.")}if(Yf(e))switch(this._signalingState){case ge.Initial:case ge.Stable:this._signalingState=ge.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ge.HaveLocalOffer:break;case ge.HaveRemoteOffer:this._signalingState=ge.Stable,this._answer=t;break;case ge.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof Yt){const e=this.initialTransaction;let t=Et.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,Et.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===V.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 Yt){const e=this.reinviteUserAgentServer.transaction;let t=Et.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,Et.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===V.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},iw=class extends er{constructor(e,t,r){super(kn,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===V.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=Ps.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof kn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Oo(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===ge.Initial||n.signalingState===ge.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=Ps.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 kn))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 kn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Oo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===ge.Initial||n.signalingState===ge.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.`)}},Nl=class extends Mr{constructor(e,t,r){super(Yt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new xn(`${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 Yt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Ps.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Oo(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: "+Tn.toString();if(!e.body){if(this.confirmedDialog.signalingState===ge.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===ge.Initial||this.confirmedDialog.signalingState===ge.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!==ge.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new xn(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof Yt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Ps.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Oo(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!==ge.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)}},ow=class extends er{constructor(e,t,r){super(Qt,e,t,r)}},aw=class extends er{constructor(e,t,r){super(Qt,e,t,r)}},lw=class extends Mr{constructor(e,t,r){super(tr,e,t,r),this.core=e}},cw=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.SUBSCRIBE,r);super(Qt,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)}},op=class extends Ps{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 hr))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===be.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: "+Tn.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!==Ye.Pending&&this.subscriptionState!==Ye.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 cw(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(),Et.TIMER_N)),n}terminate(){this.stateTransition(Ye.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+Tn.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(Ye.Pending,s);break;case"active":this.stateTransition(Ye.Active,s);break;case"terminated":this.stateTransition(Ye.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new Do(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 Ye.Initial:r();return;case Ye.NotifyWait:r();return;case Ye.Pending:if(this.subscriptionState!==Ye.NotifyWait&&this.subscriptionState!==Ye.Pending){r();return}break;case Ye.Active:if(this.subscriptionState!==Ye.NotifyWait&&this.subscriptionState!==Ye.Pending&&this.subscriptionState!==Ye.Active){r();return}break;case Ye.Terminated:if(this.subscriptionState!==Ye.NotifyWait&&this.subscriptionState!==Ye.Pending&&this.subscriptionState!==Ye.Active){r();return}break;default:r();return}e===Ye.Pending&&t&&(this.subscriptionExpires=t),e===Ye.Active&&t&&(this.subscriptionExpires=t),e===Ye.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Ye.Terminated&&(this.stateTransition(Ye.Terminated),this.onTerminated())}},uw=class extends er{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(Qt,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Ye.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=Ye.Pending;break;case"active":this.subscriptionState=Ye.Active;break;case"terminated":this.subscriptionState=Ye.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Ye.Terminated){const s=op.initialDialogStateForSubscription(this.message,e.message);this.dialog=new op(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(),Et.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()}},dw=class extends Mr{constructor(e,t,r){super(tr,e,t,r),this.core=e}},ap=["application/sdp","application/dtmf-relay"],fw=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 iw(this,e,t)}message(e,t){return new np(this,e,t)}publish(e,t){return new ow(this,e,t)}register(e,t){return new aw(this,e,t)}subscribe(e,t){return new uw(this,e,t)}request(e,t){return new er(Qt,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===be.REGISTER&&d.push("path","gruu"),e===be.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 $l(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=Qf(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===be.ACK&&r&&r.transaction.state===V.Accepted&&r instanceof Nl){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===be.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof Yt&&r.transaction.state===V.Proceeding&&r instanceof Nl&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!Tn.includes(e.method)){const n="Allow: "+Tn.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!==be.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===be.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===be.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 Do(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===be.OPTIONS){const n="Allow: "+Tn.toString(),s="Accept: "+ap.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==be.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case be.ACK:break;case be.BYE:this.replyStateless(e,{statusCode:481});break;case be.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case be.INFO:this.replyStateless(e,{statusCode:405});break;case be.INVITE:{const t=new Nl(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case be.MESSAGE:{const t=new sp(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Do(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case be.OPTIONS:{const t="Allow: "+Tn.toString(),r="Accept: "+ap.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case be.REFER:{const t=new ip(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case be.REGISTER:{const t=new lw(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case be.SUBSCRIBE:{const t=new dw(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 pw(){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 hw(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var gw=class Vn{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),Vn.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),Vn.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),Vn.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),Vn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Vn.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),Vn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Vn.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 V.Calling:r();break;case V.Proceeding:this.state!==V.Calling&&r();break;case V.Accepted:case V.Completed:this.state!==V.Calling&&this.state!==V.Proceeding&&r();break;case V.Terminated:this.state!==V.Calling&&this.state!==V.Accepted&&this.state!==V.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),V.Proceeding,e===V.Completed&&(this.D=setTimeout(()=>this.timerD(),Et.TIMER_D)),e===V.Accepted&&(this.M=setTimeout(()=>this.timerM(),Et.TIMER_M)),e===V.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===V.Calling&&(this.onRequestTimeout(),this.stateTransition(V.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===V.Completed&&this.stateTransition(V.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===V.Accepted&&this.stateTransition(V.Terminated)}},er=class Jc{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(be.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===V.Proceeding?new Jc(Qt,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===V.Proceeding&&new Jc(Qt,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 Cn;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 Cn;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===V.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)}},W0=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.BYE,r);super(Qt,e.userAgentCore,n,t),e.dispose()}},tr=class extends tp{constructor(e,t,r){super(e,t,r,V.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 V.Trying:break;case V.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 V.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 V.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 V.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(V.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(V.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case V.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(V.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case V.Completed:return;case V.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(V.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 V.Trying:r();break;case V.Proceeding:this.state!==V.Trying&&r();break;case V.Completed:this.state!==V.Trying&&this.state!==V.Proceeding&&r();break;case V.Terminated:this.state!==V.Proceeding&&this.state!==V.Completed&&(t||r());break;default:r()}e===V.Completed&&(this.J=setTimeout(()=>this.timerJ(),Et.TIMER_J)),e===V.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===V.Completed&&this.stateTransition(V.Terminated)}},Mr=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:$o(),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 xn(`${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 xn(`${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 xn(`${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 xn(`${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 xn(`${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 Yt)return this.transaction.state===V.Proceeding||this.transaction.state===V.Accepted;if(this.transaction instanceof tr)return this.transaction.state===V.Trying||this.transaction.state===V.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof Yt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof tr)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof Yt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof tr)return this.transaction.state===V.Trying||this.transaction.state===V.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof Yt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof tr)return this.transaction.state===V.Trying||this.transaction.state===V.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof Yt)return this.transaction.state===V.Proceeding;if(this.transaction instanceof tr)return this.transaction.state===V.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=Qf(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===V.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)}},G0=class extends Mr{constructor(e,t,r){super(tr,e.userAgentCore,t,r)}},J0=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INFO,r);super(Qt,e.userAgentCore,n,t)}},Y0=class extends Mr{constructor(e,t,r){super(tr,e.userAgentCore,t,r)}},np=class extends er{constructor(e,t,r){super(Qt,e,t,r)}},sp=class extends Mr{constructor(e,t,r){super(tr,e,t,r)}},Z0=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.NOTIFY,r);super(Qt,e.userAgentCore,n,t)}};function X0(e){return e.userAgentCore!==void 0}var Ho=class extends Mr{constructor(e,t,r){const n=X0(e)?e.userAgentCore:e;super(tr,n,t,r)}},Q0=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.PRACK,r);super(Qt,e.userAgentCore,n,t),e.signalingStateTransition(n)}},ew=class extends Mr{constructor(e,t,r){super(tr,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)}},tw=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INVITE,r);super(kn,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}`)}}},rw=class extends Mr{constructor(e,t,r){super(Yt,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)}},nw=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.REFER,r);super(Qt,e.userAgentCore,n,t)}};function sw(e){return e.userAgentCore!==void 0}var ip=class extends Mr{constructor(e,t,r){const n=sw(e)?e.userAgentCore:e;super(tr,n,t,r)}},Mo=class extends Ps{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=ge.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof Yt&&(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=ge.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?gr.Early:this.ackWait?gr.AckWait:this._signalingState===ge.Closed?gr.Terminated:gr.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 kn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof kn))throw new Error("Initial transaction not instance of InviteClientTransaction.");t=this.initialTransaction}const r=this.createOutgoingRequestMessage(be.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 Yt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==V.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 W0(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 J0(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 tw(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(be.MESSAGE,t);return new np(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 Z0(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new Q0(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 nw(this,e,t)}receiveRequest(e){if(this.logger.log(`INVITE dialog ${this.id} received ${e.method} request`),e.method===be.ACK){if(this.ackWait){if(this.initialTransaction instanceof kn){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===be.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!==ge.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===be.INVITE){const t=e.parseHeader("contact");if(!t)throw new Error("Contact undefined.");if(!(t instanceof hr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case be.BYE:{const t=new G0(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case be.INFO:{const t=new Y0(this,e);this.delegate&&this.delegate.onInfo?this.delegate.onInfo(t):t.reject({statusCode:469,extraHeaders:["Recv-Info:"]})}break;case be.INVITE:{const t=new rw(this,e);this.signalingStateTransition(e),this.delegate&&this.delegate.onInvite?this.delegate.onInvite(t):t.reject({statusCode:488})}break;case be.MESSAGE:{const t=new sp(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Ho(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case be.PRACK:{const t=new ew(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case be.REFER:{const t=new ip(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===ge.HaveLocalOffer||this.signalingState===ge.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=ge.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=Ci(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===ge.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof Is)switch(this._signalingState){case ge.Initial:case ge.Stable:this._signalingState=ge.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ge.HaveLocalOffer:this._signalingState=ge.Stable,this._answer=t;break;case ge.HaveRemoteOffer:break;case ge.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Cn)switch(this._signalingState){case ge.Initial:case ge.Stable:this._signalingState=ge.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ge.HaveLocalOffer:this._signalingState=ge.Stable,this._answer=t;break;case ge.HaveRemoteOffer:break;case ge.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Pl)switch(this._signalingState){case ge.Initial:case ge.Stable:this._signalingState=ge.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ge.HaveLocalOffer:break;case ge.HaveRemoteOffer:this._signalingState=ge.Stable,this._answer=t;break;case ge.Closed:break;default:throw new Error("Unexpected signaling state.")}if(Yf(e))switch(this._signalingState){case ge.Initial:case ge.Stable:this._signalingState=ge.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ge.HaveLocalOffer:break;case ge.HaveRemoteOffer:this._signalingState=ge.Stable,this._answer=t;break;case ge.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof Yt){const e=this.initialTransaction;let t=Et.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,Et.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===V.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 Yt){const e=this.reinviteUserAgentServer.transaction;let t=Et.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,Et.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===V.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},iw=class extends er{constructor(e,t,r){super(kn,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===V.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=Ps.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof kn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Mo(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===ge.Initial||n.signalingState===ge.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=Ps.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 kn))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 kn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Mo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===ge.Initial||n.signalingState===ge.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.`)}},ql=class extends Mr{constructor(e,t,r){super(Yt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new xn(`${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 Yt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Ps.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Mo(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: "+Tn.toString();if(!e.body){if(this.confirmedDialog.signalingState===ge.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===ge.Initial||this.confirmedDialog.signalingState===ge.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!==ge.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new xn(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof Yt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Ps.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Mo(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!==ge.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)}},ow=class extends er{constructor(e,t,r){super(Qt,e,t,r)}},aw=class extends er{constructor(e,t,r){super(Qt,e,t,r)}},lw=class extends Mr{constructor(e,t,r){super(tr,e,t,r),this.core=e}},cw=class extends er{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.SUBSCRIBE,r);super(Qt,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)}},op=class extends Ps{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 hr))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===be.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: "+Tn.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!==Ye.Pending&&this.subscriptionState!==Ye.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 cw(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(),Et.TIMER_N)),n}terminate(){this.stateTransition(Ye.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+Tn.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(Ye.Pending,s);break;case"active":this.stateTransition(Ye.Active,s);break;case"terminated":this.stateTransition(Ye.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new Ho(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 Ye.Initial:r();return;case Ye.NotifyWait:r();return;case Ye.Pending:if(this.subscriptionState!==Ye.NotifyWait&&this.subscriptionState!==Ye.Pending){r();return}break;case Ye.Active:if(this.subscriptionState!==Ye.NotifyWait&&this.subscriptionState!==Ye.Pending&&this.subscriptionState!==Ye.Active){r();return}break;case Ye.Terminated:if(this.subscriptionState!==Ye.NotifyWait&&this.subscriptionState!==Ye.Pending&&this.subscriptionState!==Ye.Active){r();return}break;default:r();return}e===Ye.Pending&&t&&(this.subscriptionExpires=t),e===Ye.Active&&t&&(this.subscriptionExpires=t),e===Ye.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Ye.Terminated&&(this.stateTransition(Ye.Terminated),this.onTerminated())}},uw=class extends er{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(Qt,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Ye.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=Ye.Pending;break;case"active":this.subscriptionState=Ye.Active;break;case"terminated":this.subscriptionState=Ye.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Ye.Terminated){const s=op.initialDialogStateForSubscription(this.message,e.message);this.dialog=new op(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(),Et.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()}},dw=class extends Mr{constructor(e,t,r){super(tr,e,t,r),this.core=e}},ap=["application/sdp","application/dtmf-relay"],fw=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 iw(this,e,t)}message(e,t){return new np(this,e,t)}publish(e,t){return new ow(this,e,t)}register(e,t){return new aw(this,e,t)}subscribe(e,t){return new uw(this,e,t)}request(e,t){return new er(Qt,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===be.REGISTER&&d.push("path","gruu"),e===be.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 Pl(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=Qf(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===be.ACK&&r&&r.transaction.state===V.Accepted&&r instanceof ql){this.logger.warn(`Discarding out of dialog ACK after 2xx response sent on transaction ${t}.`);return}if(e.method===be.CANCEL){r?(this.replyStateless(e,{statusCode:200}),r.transaction instanceof Yt&&r.transaction.state===V.Proceeding&&r instanceof ql&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!Tn.includes(e.method)){const n="Allow: "+Tn.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!==be.ACK&&this.replyStateless(e,{statusCode:404});return}if(e.method===be.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===be.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 Ho(this,e);i.onNotify(o);return}}const t=e.callId+e.toTag+e.fromTag,r=this.dialogs.get(t);if(r){if(e.method===be.OPTIONS){const n="Allow: "+Tn.toString(),s="Accept: "+ap.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[n,s]});return}r.receiveRequest(e);return}e.method!==be.ACK&&this.replyStateless(e,{statusCode:481})}receiveOutsideDialogRequest(e){switch(e.method){case be.ACK:break;case be.BYE:this.replyStateless(e,{statusCode:481});break;case be.CANCEL:throw new Error(`Unexpected out of dialog request method ${e.method}.`);case be.INFO:this.replyStateless(e,{statusCode:405});break;case be.INVITE:{const t=new ql(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case be.MESSAGE:{const t=new sp(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Ho(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case be.OPTIONS:{const t="Allow: "+Tn.toString(),r="Accept: "+ap.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case be.REFER:{const t=new ip(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case be.REGISTER:{const t=new lw(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case be.SUBSCRIBE:{const t=new dw(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 pw(){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 hw(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var gw=class Vn{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),Vn.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),Vn.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),Vn.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),Vn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Vn.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),Vn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Vn.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
|
|
@@ -64,16 +64,16 @@
|
|
|
64
64
|
`+s+`
|
|
65
65
|
`);if(this.state!==Me.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===Me.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(Me.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 bi("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 Me.Connecting:t!==Me.Connected&&t!==Me.Disconnecting&&t!==Me.Disconnected&&n();break;case Me.Connected:t!==Me.Disconnecting&&t!==Me.Disconnected&&n();break;case Me.Disconnecting:t!==Me.Connecting&&t!==Me.Disconnected&&n();break;case Me.Disconnected:t!==Me.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===Me.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===Me.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===Me.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===Me.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===Me.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===Me.Connected?i():o(r||new Error("Connect aborted."))}if(s===Me.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===Me.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}};lp.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var Rn=class wa{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=$t.Stopped,this._stateEventEmitter=new _i,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},wa.defaultOptions()),{sipjsId:ts(5)}),{uri:new Sn("sip","anonymous."+ts(6),"anonymous.invalid")}),{viaHost:ts(12)+".invalid"}),wa.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 K0,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=At.error;break;case"warn":this.loggerFactory.level=At.warn;break;case"log":this.loggerFactory.level=At.log;break;case"debug":this.loggerFactory.level=At.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:wa.newUUID(),_t.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return _t.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:vw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:Er.Unsupported,sipExtensionReplaces:Er.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:lp,transportOptions:{},uri:new Sn("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+D0,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===$t.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===$t.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState($t.Started),this.transport.connect())}async stop(){if(this.state===$t.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($t.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($t.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:ts(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new Sn("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===Er.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===Er.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>U0[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new fw({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 z0(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new $s(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!==Er.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 Zf(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new Dl(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!==$t.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==$t.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=Po.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===$t.Stopped&&r instanceof Is){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 Is){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=Si(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof Cn){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=Si(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 Is){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof Cn){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 $t.Started:t!==$t.Stopped&&n();break;case $t.Stopped:t!==$t.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)}},kt=new window.AudioContext,mw={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]},Ho=F(null),Mo=F(null),xi=F(null),No=F(.5),qo=F(1),ql=F("classic"),Bo=F(!1),Bl={classic:{frequencies:[440,480],type:"sine"},original:{frequencies:[523.25,659.25,783.99],type:"sine",originalMelody:!0}};const cp=()=>{const e=u=>{No.value=Math.max(0,Math.min(1,u/100))},t=u=>{qo.value=Math.max(0,Math.min(1,u/100))},r=()=>{Bo.value&&(o(),i())},n=u=>{ql.value=Bl[u]?u:"classic",r()},s=(u,c=150)=>{kt.state==="suspended"&&kt.resume();const d=mw[u.toUpperCase()];if(!d)return;const p=kt.createOscillator(),h=kt.createOscillator(),m=kt.createGain();p.frequency.value=d[0],h.frequency.value=d[1],p.type="sine",h.type="sine",m.gain.value=.1*No.value,p.connect(m),h.connect(m),m.connect(kt.destination),p.start(),h.start(),setTimeout(()=>{p.stop(),h.stop(),p.disconnect(),h.disconnect(),m.disconnect()},c)},i=()=>{if(Bo.value)return;Bo.value=!0,kt.state==="suspended"&&kt.resume();const u=()=>{const c=kt.currentTime,d=Bl[ql.value]||Bl.classic,p=kt.createGain(),h=d.originalMelody?.5:1.2,m=(d.originalMelody?[d.frequencies[0]]:d.frequencies).map(y=>{const T=kt.createOscillator();return T.type=d.type,T.frequency.setValueAtTime(y,c),d.originalMelody&&d.frequencies.slice(1).forEach((v,x)=>{T.frequency.setValueAtTime(v,c+(x+1)*.1)}),T.connect(p),T});d.originalMelody?(p.gain.setValueAtTime(.7*qo.value,c),p.gain.exponentialRampToValueAtTime(.001,c+h)):(p.gain.setValueAtTime(0,c),p.gain.linearRampToValueAtTime(.7*qo.value,c+.02),p.gain.setValueAtTime(.7*qo.value,c+1.05),p.gain.linearRampToValueAtTime(0,c+h)),p.connect(kt.destination),m.forEach(y=>{y.start(c),y.stop(c+h)})};u(),Ho.value=window.setInterval(()=>{u(),ql.value==="original"&&(Mo.value=window.setTimeout(u,400))},3e3)},o=()=>{Ho.value&&(clearInterval(Ho.value),Ho.value=null),Mo.value&&(clearTimeout(Mo.value),Mo.value=null),Bo.value=!1};return{playDtmf:s,startRingtone:i,stopRingtone:o,startRingback:()=>{if(xi.value)return;kt.state==="suspended"&&kt.resume();const u=()=>{const c=kt.currentTime,d=kt.createOscillator(),p=kt.createGain();d.type="sine",d.frequency.value=425,p.gain.setValueAtTime(.1*No.value,c),p.gain.linearRampToValueAtTime(.1*No.value,c+1),p.gain.linearRampToValueAtTime(0,c+1.1),d.connect(p),p.connect(kt.destination),d.start(c),d.stop(c+1.1)};u(),xi.value=window.setInterval(()=>{u()},4e3)},stopRingback:()=>{xi.value&&(clearInterval(xi.value),xi.value=null)},setNotificationVolume:e,setRingtoneVolume:t,setRingtoneTone:n}};function up(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=up(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function dp(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=up(e))&&(n&&(n+=" "),n+=t);return n}var ww=(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},yw=(e,t)=>({classGroupId:e,validator:t}),fp=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Lo="-",pp=[],bw="arbitrary..",_w=e=>{const t=Cw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Sw(o);const a=o.split(Lo);return hp(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?ww(u,l):l:u||pp}return r[o]||pp}}},hp=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=hp(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(Lo):e.slice(t).join(Lo),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(o))return u.classGroupId}},Sw=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?bw+n:void 0})(),Cw=e=>{const{theme:t,classGroups:r}=e;return xw(r,t)},xw=(e,t)=>{const r=fp();for(const n in e){const s=e[n];Ll(s,r,n,t)}return r},Ll=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];Tw(o,t,r,n)}},Tw=(e,t,r,n)=>{if(typeof e=="string"){Ew(e,t,r);return}if(typeof e=="function"){Aw(e,t,r,n);return}kw(e,t,r,n)},Ew=(e,t,r)=>{const n=e===""?t:gp(t,e);n.classGroupId=r},Aw=(e,t,r,n)=>{if(Rw(e)){Ll(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(yw(r,e))},kw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Ll(l,gp(t,a),r,n)}},gp=(e,t)=>{let r=e;const n=t.split(Lo),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=fp(),r.nextPart.set(o,a)),r=a}return r},Rw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Iw=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)}}},Fl="!",vp=":",$w=[],mp=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Pw=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 y=0;y<c;y++){const T=s[y];if(o===0&&a===0){if(T===vp){i.push(s.slice(l,y)),l=y+1;continue}if(T==="/"){u=y;continue}}T==="["?o++:T==="]"?o--:T==="("?a++:T===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(Fl)?(p=d.slice(0,-1),h=!0):d.startsWith(Fl)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return mp(i,h,p,m)};if(t){const s=t+vp,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):mp($w,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},Dw=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}},Ow=e=>({cache:Iw(e.cacheSize),parseClassName:Pw(e),sortModifiers:Dw(e),..._w(e)}),Hw=/\s+/,Mw=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(Hw);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:y}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let T=!!y,v=n(T?m.substring(0,y):m);if(!v){if(!T){l=c+(l.length>0?" "+l:l);continue}if(v=n(m),!v){l=c+(l.length>0?" "+l:l);continue}T=!1}const x=p.length===0?"":p.length===1?p[0]:i(p).join(":"),b=h?x+Fl:x,C=b+v;if(o.indexOf(C)>-1)continue;o.push(C);const E=s(v,T);for(let I=0;I<E.length;++I){const M=E[I];o.push(b+M)}l=c+(l.length>0?" "+l:l)}return l},Nw=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=wp(r))&&(s&&(s+=" "),s+=n);return s},wp=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=wp(e[n]))&&(r&&(r+=" "),r+=t);return r},qw=(e,...t)=>{let r,n,s,i;const o=l=>(r=Ow(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=Mw(l,r);return s(l,c),c};return i=o,(...l)=>i(Nw(...l))},Bw=[],St=e=>{const t=r=>r[e]||Bw;return t.isThemeGetter=!0,t},yp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Lw=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vw=/\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$/,jw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Uw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,In=e=>Lw.test(e),Be=e=>!!e&&!Number.isNaN(Number(e)),$n=e=>!!e&&Number.isInteger(Number(e)),Vl=e=>e.endsWith("%")&&Be(e.slice(0,-1)),nn=e=>Fw.test(e),_p=()=>!0,Kw=e=>Vw.test(e)&&!jw.test(e),jl=()=>!1,Ww=e=>Uw.test(e),Gw=e=>zw.test(e),Jw=e=>!Ce(e)&&!xe(e),Yw=e=>Pn(e,Ap,jl),Ce=e=>yp.test(e),rs=e=>Pn(e,kp,Kw),Sp=e=>Pn(e,sy,Be),Zw=e=>Pn(e,Ip,_p),Xw=e=>Pn(e,Rp,jl),Cp=e=>Pn(e,Tp,jl),Qw=e=>Pn(e,Ep,Gw),Fo=e=>Pn(e,$p,Ww),xe=e=>bp.test(e),Ti=e=>ns(e,kp),ey=e=>ns(e,Rp),xp=e=>ns(e,Tp),ty=e=>ns(e,Ap),ry=e=>ns(e,Ep),Vo=e=>ns(e,$p,!0),ny=e=>ns(e,Ip,!0),Pn=(e,t,r)=>{const n=yp.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ns=(e,t,r=!1)=>{const n=bp.exec(e);return n?n[1]?t(n[1]):r:!1},Tp=e=>e==="position"||e==="percentage",Ep=e=>e==="image"||e==="url",Ap=e=>e==="length"||e==="size"||e==="bg-size",kp=e=>e==="length",sy=e=>e==="number",Rp=e=>e==="family-name",Ip=e=>e==="number"||e==="weight",$p=e=>e==="shadow",iy=()=>{const e=St("color"),t=St("font"),r=St("text"),n=St("font-weight"),s=St("tracking"),i=St("leading"),o=St("breakpoint"),a=St("container"),l=St("spacing"),u=St("radius"),c=St("shadow"),d=St("inset-shadow"),p=St("text-shadow"),h=St("drop-shadow"),m=St("blur"),y=St("perspective"),T=St("aspect"),v=St("ease"),x=St("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...C(),xe,Ce],I=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],g=()=>[xe,Ce,l],H=()=>[In,"full","auto",...g()],N=()=>[$n,"none","subgrid",xe,Ce],_=()=>["auto",{span:["full",$n,xe,Ce]},$n,xe,Ce],w=()=>[$n,"auto",xe,Ce],S=()=>["auto","min","max","fr",xe,Ce],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...g()],Z=()=>[In,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...g()],W=()=>[In,"screen","full","dvw","lvw","svw","min","max","fit",...g()],le=()=>[In,"screen","full","lh","dvh","lvh","svh","min","max","fit",...g()],G=()=>[e,xe,Ce],ie=()=>[...C(),xp,Cp,{position:[xe,Ce]}],he=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ke=()=>["auto","cover","contain",ty,Yw,{size:[xe,Ce]}],Ve=()=>[Vl,Ti,rs],Re=()=>["","none","full",u,xe,Ce],Pe=()=>["",Be,Ti,rs],Ge=()=>["solid","dashed","dotted","double"],mt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],je=()=>[Be,Vl,xp,Cp],et=()=>["","none",m,xe,Ce],wt=()=>["none",Be,xe,Ce],Ct=()=>["none",Be,xe,Ce],A=()=>[Be,xe,Ce],$=()=>[In,"full",...g()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nn],breakpoint:[nn],color:[_p],container:[nn],"drop-shadow":[nn],ease:["in","out","in-out"],font:[Jw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nn],shadow:[nn],spacing:["px",Be],text:[nn],"text-shadow":[nn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",In,Ce,xe,T]}],container:["container"],columns:[{columns:[Be,Ce,xe,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],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",xe,Ce]}],basis:[{basis:[In,"full","auto",a,...g()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Be,In,"auto","initial","none",Ce]}],grow:[{grow:["",Be,xe,Ce]}],shrink:[{shrink:["",Be,xe,Ce]}],order:[{order:[$n,"first","last","none",xe,Ce]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":S()}],"auto-rows":[{"auto-rows":S()}],gap:[{gap:g()}],"gap-x":[{"gap-x":g()}],"gap-y":[{"gap-y":g()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"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:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":g()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":g()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[a,"screen",...Z()]}],"min-w":[{"min-w":[a,"screen","none",...Z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,Ti,rs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ny,Zw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vl,Ce]}],"font-family":[{font:[ey,Xw,t]}],"font-features":[{"font-features":[Ce]}],"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,xe,Ce]}],"line-clamp":[{"line-clamp":[Be,"none",xe,Sp]}],leading:[{leading:[i,...g()]}],"list-image":[{"list-image":["none",xe,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[Be,"from-font","auto",xe,rs]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Be,"auto",xe,Ce]}],"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",xe,Ce]}],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",xe,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:he()}],"bg-size":[{bg:ke()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$n,xe,Ce],radial:["",xe,Ce],conic:[$n,xe,Ce]},ry,Qw]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:Ve()}],"gradient-via-pos":[{via:Ve()}],"gradient-to-pos":[{to:Ve()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:Re()}],"rounded-s":[{"rounded-s":Re()}],"rounded-e":[{"rounded-e":Re()}],"rounded-t":[{"rounded-t":Re()}],"rounded-r":[{"rounded-r":Re()}],"rounded-b":[{"rounded-b":Re()}],"rounded-l":[{"rounded-l":Re()}],"rounded-ss":[{"rounded-ss":Re()}],"rounded-se":[{"rounded-se":Re()}],"rounded-ee":[{"rounded-ee":Re()}],"rounded-es":[{"rounded-es":Re()}],"rounded-tl":[{"rounded-tl":Re()}],"rounded-tr":[{"rounded-tr":Re()}],"rounded-br":[{"rounded-br":Re()}],"rounded-bl":[{"rounded-bl":Re()}],"border-w":[{border:Pe()}],"border-w-x":[{"border-x":Pe()}],"border-w-y":[{"border-y":Pe()}],"border-w-s":[{"border-s":Pe()}],"border-w-e":[{"border-e":Pe()}],"border-w-bs":[{"border-bs":Pe()}],"border-w-be":[{"border-be":Pe()}],"border-w-t":[{"border-t":Pe()}],"border-w-r":[{"border-r":Pe()}],"border-w-b":[{"border-b":Pe()}],"border-w-l":[{"border-l":Pe()}],"divide-x":[{"divide-x":Pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ge(),"hidden","none"]}],"divide-style":[{divide:[...Ge(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-bs":[{"border-bs":G()}],"border-color-be":[{"border-be":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...Ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Be,xe,Ce]}],"outline-w":[{outline:["",Be,Ti,rs]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",c,Vo,Fo]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",d,Vo,Fo]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:Pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Be,rs]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":Pe()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",p,Vo,Fo]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Be,xe,Ce]}],"mix-blend":[{"mix-blend":[...mt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":mt()}],"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":[Be]}],"mask-image-linear-from-pos":[{"mask-linear-from":je()}],"mask-image-linear-to-pos":[{"mask-linear-to":je()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":je()}],"mask-image-t-to-pos":[{"mask-t-to":je()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":je()}],"mask-image-r-to-pos":[{"mask-r-to":je()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":je()}],"mask-image-b-to-pos":[{"mask-b-to":je()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":je()}],"mask-image-l-to-pos":[{"mask-l-to":je()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":je()}],"mask-image-x-to-pos":[{"mask-x-to":je()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":je()}],"mask-image-y-to-pos":[{"mask-y-to":je()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[xe,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":je()}],"mask-image-radial-to-pos":[{"mask-radial-to":je()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[Be]}],"mask-image-conic-from-pos":[{"mask-conic-from":je()}],"mask-image-conic-to-pos":[{"mask-conic-to":je()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:he()}],"mask-size":[{mask:ke()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,Ce]}],filter:[{filter:["","none",xe,Ce]}],blur:[{blur:et()}],brightness:[{brightness:[Be,xe,Ce]}],contrast:[{contrast:[Be,xe,Ce]}],"drop-shadow":[{"drop-shadow":["","none",h,Vo,Fo]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Be,xe,Ce]}],"hue-rotate":[{"hue-rotate":[Be,xe,Ce]}],invert:[{invert:["",Be,xe,Ce]}],saturate:[{saturate:[Be,xe,Ce]}],sepia:[{sepia:["",Be,xe,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,Ce]}],"backdrop-blur":[{"backdrop-blur":et()}],"backdrop-brightness":[{"backdrop-brightness":[Be,xe,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[Be,xe,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Be,xe,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Be,xe,Ce]}],"backdrop-invert":[{"backdrop-invert":["",Be,xe,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[Be,xe,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[Be,xe,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Be,xe,Ce]}],"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",xe,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Be,"initial",xe,Ce]}],ease:[{ease:["linear","initial",v,xe,Ce]}],delay:[{delay:[Be,xe,Ce]}],animate:[{animate:["none",x,xe,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,xe,Ce]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:wt()}],"rotate-x":[{"rotate-x":wt()}],"rotate-y":[{"rotate-y":wt()}],"rotate-z":[{"rotate-z":wt()}],scale:[{scale:Ct()}],"scale-x":[{"scale-x":Ct()}],"scale-y":[{"scale-y":Ct()}],"scale-z":[{"scale-z":Ct()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[xe,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",xe,Ce]}],"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",xe,Ce]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Be,Ti,rs,Sp]}],stroke:[{stroke:["none",...G()]}],"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"]}},oy=qw(iy);const dt=(...e)=>oy(dp(e)),sn=e=>e.length<=3?e:`${e.slice(0,3)}${"*".repeat(e.length-3)}`,ay=(e,t)=>{if(e){const r=Ul(e);if(r&&Pp(r))return r;if(e.trim())return e.trim()}if(t){const r=Ul(t);if(r&&Pp(r))return r;const n=ly(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var Ul=e=>e.replace(/[^\d+*#]/g,""),Pp=e=>/^\+?[\d*#]{2,}$/.test(e),ly=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]?Ul(t[1]):null)},cy="X-Nebula-Queue",uy="X-Nebula-Queue-Id";const Tx=30,dy=(e,t={})=>{const r=ut(null),n=ut(null),s=ut(new Map),i=new Audio;i.autoplay=!0;const o=ut(void 0),a=ut(null),l=ut(null),u=new Map,c=new Map,d=new Set,p=new Map,h=5e3;let m=!1,y=null,T=null,v=null,x=null,b=null;const C=j(()=>r.value?.configuration.uri?.user||""),{startRingtone:E,stopRingtone:I,startRingback:M,stopRingback:g,setNotificationVolume:H,setRingtoneVolume:N,setRingtoneTone:_}=cp(),w=P=>P instanceof $o||P instanceof $s?P.request?.callId||P.dialog?.callId||P.id||crypto.randomUUID():P.dialog?.callId||P.id||crypto.randomUUID(),S=P=>{if(!(P instanceof $s))return;const U=P.request;if(!U)return;const L=U.getHeader(cy)?.trim(),oe=U.getHeader(uy)?.trim();if(!(!L&&!oe))return{...oe?{id:oe}:{},...L?{name:L}:{}}},O=(P,U,L,oe)=>{const te=S(P),ve={channelId:U,sipCallId:w(P),direction:L,remoteNumber:oe,...te?{queue:te}:{}};return u.set(U,ve),t.onCallContext?.(ve),ve},q=(P,U)=>{const L=u.get(P);L&&t.onCallState?.({...L,state:U,timestamp:Date.now()})},B=(P,U)=>{if(s.value.get(U)!==P||P.state!==z.Established)return;const L=u.get(U),oe=P.sessionDescriptionHandler,te=oe?.localMediaStream??l.value,ve=oe?.remoteMediaStream??a.value,ye=te?.getAudioTracks()??[],He=ve?.getAudioTracks()??[];if(!L||!te||!ve||ye.length===0||He.length===0)return;const ct=[L.sipCallId,...ye.map(rt=>`local:${rt.id}`),...He.map(rt=>`remote:${rt.id}`)].join("|");c.get(U)!==ct&&(c.set(U,ct),t.onMediaReady?.({...L,localStream:te,remoteStream:ve}))},Z=P=>{u.delete(P),c.delete(P),d.delete(P)},W=(P,U)=>{if(s.value.get(P)!==U)return;const L=p.get(U);L&&clearTimeout(L),p.delete(U);const oe=e.channels.value.find(He=>He.id===P),te=u.get(P),ve=d.has(P)||oe?.status==="connected";Z(P),s.value.delete(P),e.updateChannelState(P,{status:"idle",remoteNumber:"",remoteDisplayName:void 0,isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1});const ye=e.transferInProgress.value;if(ye&&(ye.originalChannelId===P||ye.consultationChannelId===P)&&e.setTransferInProgress(null),e.activeChannelId.value===P&&zt(),ie(),te){try{e.addCallLog({number:te.remoteNumber,direction:te.direction,status:ve?"answered":te.direction==="incoming"?"missed":"cancelled",startTime:ve?oe?.startTime??Date.now():Date.now(),duration:ve?Math.floor((Date.now()-(oe?.startTime??Date.now()))/1e3):0})}catch(He){console.warn("[SipJs] Call ended, but saving its history failed:",He)}try{t.onCallState?.({...te,state:ve?"ended":"failed",timestamp:Date.now()})}catch(He){console.warn("[SipJs] Call ended, but the state callback failed:",He)}}},le=(P,U)=>{p.has(U)||p.set(U,setTimeout(()=>{console.warn("[SipJs] Hangup did not terminate; releasing local call state"),G(U),W(P,U)},h))},G=P=>{if(P.state!==z.Terminated)try{P.dispose().catch(U=>{console.warn("[SipJs] Session disposal failed:",U)})}catch(U){console.warn("[SipJs] Session disposal failed:",U)}},ie=()=>{e.channels.value.some(P=>P.status==="incoming")?E():I(),e.activeChannel.value?.status==="calling"?M():g()},he=P=>{i.volume=P/100},ke=async P=>{typeof i.setSinkId=="function"&&await i.setSinkId(P)},Ve=async P=>{if(!P)return;const U=[...s.value.entries()].flatMap(([te,ve])=>{const ye=ve.sessionDescriptionHandler,He=ye?.peerConnection?.getSenders().find(ct=>ct.track?.kind==="audio");return He?[{channelId:te,session:ve,sdh:ye,sender:He}]:[]});if(U.length===0){o.value=P;return}const L=[],oe=[];try{for(const{sender:ve}of U){const ye=await navigator.mediaDevices.getUserMedia(et(!1,P));L.push(ye);const[He]=ye.getAudioTracks(),ct=ve.track;if(!He||!ct)throw new Error("Could not acquire an audio track for the selected microphone");He.enabled=ct.enabled,await ve.replaceTrack(He),oe.push({sender:ve,previousTrack:ct})}o.value=P,U.forEach(({channelId:ve,session:ye,sdh:He,sender:ct},rt)=>{const gt=L[rt]?.getAudioTracks()[0];if(!gt)return;const Fn=e.channels.value.find(hn=>hn.id===ve),Di=!(Fn?.isHeld||Fn?.isMuted);ct.track.enabled=Di;const mr=He.localMediaStream;mr&&(mr.getAudioTracks().forEach(hn=>{hn!==gt&&mr.removeTrack(hn)}),mr.getTracks().includes(gt)||mr.addTrack(gt)),e.activeChannelId.value===ve&&(mr?l.value=mr:l.value&&(l.value.getAudioTracks().forEach(hn=>{hn!==gt&&l.value?.removeTrack(hn)}),l.value.getTracks().includes(gt)||l.value.addTrack(gt)));try{B(ye,ve)}catch(hn){console.error("[SipJs] Media-ready callback failed after microphone switch:",hn)}});const te=new Set([...s.value.values()].flatMap(ve=>ve.sessionDescriptionHandler?.peerConnection?.getSenders().map(ye=>ye.track).filter(ye=>ye?.kind==="audio")??[]));oe.forEach(({previousTrack:ve})=>{te.has(ve)||ve.stop()}),L.forEach((ve,ye)=>{ve.getTracks().forEach(He=>{He!==U[ye]?.sender.track&&He.stop()})})}catch(te){await Promise.allSettled(oe.map(({sender:ve,previousTrack:ye})=>ve.replaceTrack(ye))),L.forEach(ve=>ve.getTracks().forEach(ye=>ye.stop())),console.warn("[SipJs] Failed to switch microphone:",te)}},Re=(P,U)=>{let L=!1;const oe=P.sessionDescriptionHandler;return oe?.peerConnection&&oe.peerConnection.getSenders().forEach(te=>{te.track&&te.track.kind==="audio"&&(te.track.enabled=U,L=!0)}),L},Pe=P=>{let U=!1;return l.value&&l.value.getAudioTracks().forEach(L=>{L.enabled=P,U=!0}),U},Ge=(P,U)=>{const L=!(U?.isHeld||U?.isMuted),oe=Re(P,L),te=Pe(L);!oe&&!te&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},mt=P=>{for(const[U,L]of s.value.entries())if(L===P)return e.channels.value.find(oe=>oe.id===U)||null;return e.activeChannel.value||null},je=async P=>{const U=P.sessionDescriptionHandler?.peerConnection;if(!U)return;const L=mt(P),oe=!(L?.isHeld||L?.isMuted),te=U.getSenders().find(ve=>ve.track?.kind==="audio");if(te?.track){te.track.enabled=oe,L&&B(P,L.id);return}try{const ve=await navigator.mediaDevices.getUserMedia(et(!1));if(![...s.value.values()].includes(P)){ve.getTracks().forEach(rt=>rt.stop());return}const[ye]=ve.getAudioTracks();if(!ye)return;ye.enabled=oe;const He=new MediaStream([ye]);l.value=He;const ct=U.getSenders().find(rt=>rt.track===null);ct?await ct.replaceTrack(ye):U.addTrack(ye,He),Ge(P,L),L&&B(P,L.id)}catch(ve){console.warn("[SipJs] Failed to recover outbound audio track:",ve)}},et=(P=!1,U=o.value)=>{const L={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return U&&(L.deviceId={exact:U}),{audio:L,video:P}},wt=async()=>{const P=n.value;P&&await P.register({requestDelegate:{onAccept:()=>{e.setConnected(!0)},onReject:()=>{e.setConnected(!1)}}})},Ct=async P=>{if(!r.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(U=>U.stop())}catch(U){console.error("Microphone permission denied",U);return}try{const U=Rn.makeURI(P.uri);if(!U)throw new Error("Invalid URI");m=P.earlyMedia??!1,r.value=new Rn({uri:U,logLevel:"error",transportOptions:{server:P.transportOptions.server,keepAliveInterval:P.transportOptions.keepAliveInterval??30},authorizationUsername:P.authorizationUsername,authorizationPassword:P.authorizationPassword,reconnectionDelay:5,reconnectionAttempts:3,delegate:{onConnect:()=>{},onDisconnect:()=>e.setConnected(!1),onInvite:L=>ae(L)}}),await r.value.start(),n.value=new Hl(r.value),await wt(),A()}catch{}}},A=()=>{v=new AbortController;const{signal:P}=v;let U=Date.now();const L=5e3,oe=(gt=1e3)=>{x&&clearTimeout(x),x=setTimeout(async()=>{x=null,await $()},gt)},te=()=>{if(document.visibilityState==="visible"){const gt=Date.now()-U;gt>L?(console.log(`[SipJs] Device was suspended for ${Math.round(gt/1e3)}s, reconnecting...`),oe(1500)):oe(500)}U=Date.now()},ve=()=>{console.log("[SipJs] Network online, reconnecting..."),oe(1e3)},ye=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),x&&(clearTimeout(x),x=null)},He=()=>{b=setInterval(()=>{const gt=Date.now(),Fn=gt-U;Fn>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(Fn/1e3)}s), device may have woken from sleep`),oe(1500)),U=gt},1e3)},ct=()=>{console.log("[SipJs] Page frozen"),b&&(clearInterval(b),b=null)},rt=()=>{console.log("[SipJs] Page resumed"),U=Date.now(),He(),oe(1e3)};document.addEventListener("visibilitychange",te,{signal:P}),window.addEventListener("online",ve,{signal:P}),window.addEventListener("offline",ye,{signal:P}),document.addEventListener("freeze",ct,{signal:P}),document.addEventListener("resume",rt,{signal:P}),He()},$=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 wt()}catch{}}catch(P){console.error("[SipJs] Reconnection failed:",P)}}},J=async()=>{v?.abort(),v=null,x&&(clearTimeout(x),x=null),b&&(clearInterval(b),b=null);for(const[L,oe]of s.value.entries()){let te;try{await Promise.race([de(L,oe),new Promise(ve=>{te=setTimeout(ve,1500)})])}finally{te&&clearTimeout(te)}}zt();const P=n.value,U=r.value;if(n.value=null,r.value=null,P)try{await P.unregister()}catch(L){console.warn("[SipJs] Unregister failed:",L)}if(U)try{await U.stop()}catch(L){console.warn("[SipJs] UserAgent stop failed:",L)}},ae=P=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",P.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",P.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",P.remoteIdentity.displayName);const U=e.channels.value.find(ve=>ve.status==="idle"&&!s.value.has(ve.id));if(!U){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),P.reject();return}const L=U.id;s.value.set(L,P);const oe=P.body?P.body.includes("m=video"):!1,te=ay(P.remoteIdentity.uri.user,P.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",te),console.log("[SipJs] 🎥 Video:",oe?"Sí":"No"),e.updateChannelState(L,{status:"incoming",remoteNumber:te,remoteDisplayName:P.remoteIdentity.displayName||void 0,hasVideo:oe}),O(P,L,"incoming",te),q(L,"ringing"),ie(),e.setActiveChannelId(L),P.stateChange.addListener(ve=>{switch(ve){case z.Terminated:W(L,P);break;case z.Established:if(s.value.get(L)!==P)break;d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),q(L,"connected"),e.activeChannelId.value===L&&(tt(P),je(P).then(()=>B(P,L))),ie();break}})},ne=async(P,U=!1)=>{if(!r.value)return;const L=e.activeChannelId.value;if(s.value.has(L))return;let oe=Rn.makeURI(P);if(!oe&&r.value.configuration.uri){const ye=r.value.configuration.uri.host;oe=Rn.makeURI(`sip:${P}@${ye}`)}if(!oe)return;const te=new $o(r.value,oe,{earlyMedia:m});s.value.set(L,te),O(te,L,"outgoing",P),q(L,"dialing"),e.updateChannelState(L,{status:"calling",remoteNumber:P,hasVideo:U}),e.setLastDialedNumber(P),ie(),te.stateChange.addListener(ye=>{switch(ye){case z.Established:if(s.value.get(L)!==te)break;d.add(L),e.channels.value.find(He=>He.id===L)?.status!=="connected"&&(e.updateChannelState(L,{status:"connected",startTime:Date.now()}),q(L,"connected"),tt(te),je(te).then(()=>B(te,L)),ie());break;case z.Terminated:W(L,te);break}});const ve={sessionDescriptionHandlerOptions:{constraints:et(U)},requestDelegate:{onProgress:ye=>{s.value.get(L)===te&&(ye.message.statusCode===180||ye.message.statusCode===183)&&(ye.message.body&&(e.updateChannelState(L,{hasEarlyMedia:!0}),tt(te)),ie())},onAccept:ye=>{s.value.get(L)===te&&e.channels.value.find(He=>He.id===L)?.status!=="connected"&&(d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),q(L,"connected"),tt(te),je(te).then(()=>B(te,L)),ie())}}};try{await te.invite(ve)}catch(ye){throw W(L,te),ye}},re=async(P=!1)=>{const U=e.activeChannelId.value,L=s.value.get(U);if(L instanceof $s&&L.state===z.Initial){I(),e.updateChannelState(U,{status:"connected",startTime:Date.now()}),ie();for(const[te,ve]of s.value.entries())if(te!==e.activeChannelId.value&&ve.state===z.Established&&!e.channels.value.find(ye=>ye.id===te)?.isHeld)try{await ee(ve,!0),e.updateChannelState(te,{isHeld:!0})}catch(ye){console.error(`[SipJs] Failed to hold channel ${te}:`,ye)}const oe={sessionDescriptionHandlerOptions:{constraints:et(P),iceGatheringTimeout:1e3}};try{await L.accept(oe),ie()}catch(te){const ve=s.value.get(U);throw ve instanceof $s&&ve.state===z.Initial&&(e.updateChannelState(U,{status:"incoming",startTime:void 0}),ie()),te}}},de=async(P,U)=>{le(P,U);try{switch(U.state){case z.Initial:case z.Establishing:U instanceof $o?await U.cancel():U instanceof $s&&await U.reject();break;case z.Established:await U.bye();break}}catch(L){console.warn("[SipJs] Hangup signaling failed:",L)}finally{G(U),W(P,U)}},fe=async()=>{const P=e.activeChannelId.value,U=s.value.get(P);U&&await de(P,U)},ue=()=>{const P=s.value.get(e.activeChannelId.value);if(!P)return;const U=!e.isMuted.value;e.setMuted(U),Ge(P,e.channels.value.find(L=>L.id===e.activeChannelId.value))},ee=async(P,U)=>{const L={sessionDescriptionHandlerOptions:{hold:U}};await P.invite(L)},Ee=async()=>{const P=s.value.get(e.activeChannelId.value);if(P?.state!==z.Established)return;const U=!e.isHeld.value;try{await ee(P,U),e.setHeld(U),Ge(P,e.channels.value.find(L=>L.id===e.activeChannelId.value))}catch{}},me=async P=>{const U=e.activeChannelId.value;if(U===P)return;const L=s.value.get(U),oe=s.value.get(P),te=e.channels.value.find(ye=>ye.id===U),ve=e.channels.value.find(ye=>ye.id===P);if(L&&L.state===z.Established&&!te?.isHeld)try{await ee(L,!0),e.updateChannelState(U,{isHeld:!0}),Ge(L,e.channels.value.find(ye=>ye.id===U))}catch{}if(e.setActiveChannelId(P),ie(),oe&&oe.state===z.Established){if(ve?.isHeld)try{await ee(oe,!1),e.updateChannelState(P,{isHeld:!1})}catch{}Ge(oe,e.channels.value.find(ye=>ye.id===P)),tt(oe)}else zt()},Te=P=>{if(!/^[0-9*#]$/.test(P))return;const U=s.value.get(e.activeChannelId.value);if(U?.state!==z.Established)return;const L=U.sessionDescriptionHandler?.peerConnection?.getSenders().find(te=>te.track?.kind==="audio")?.dtmf;if(L?.canInsertDTMF){L.insertDTMF(P,160,70);return}const oe={requestOptions:{body:{content:`Signal=${P}\r
|
|
68
|
-
Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};U.info(oe)},De=(P,U)=>{const L=e.channels.value.find(oe=>oe.id===P);!L||L.status!=="connected"||(tt(U),Ge(U,L),je(U),i.play().catch(()=>{}))},Fe=async P=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",P);const U=e.activeChannelId.value,L=s.value.get(U);if(!L)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",U),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",L.state),console.log("[SipJs] Dialog ID:",L.dialog?.id),console.log("[SipJs] Call ID:",L.dialog?.callId),L.state!==z.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",L.state),new Error(`Cannot transfer call. Call is not established (state: ${L.state})`);let oe=Rn.makeURI(P);if(!oe&&r.value?.configuration.uri){const te=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",te),oe=Rn.makeURI(`sip:${P}@${te}`)}if(!oe)throw console.error("[SipJs] ❌ URI de destino inválida:",P),new Error(`Invalid transfer target: ${P}`);console.log("[SipJs] 📤 URI de transferencia:",oe.toString()),console.log("[SipJs] URI scheme:",oe.scheme),console.log("[SipJs] URI user:",oe.user),console.log("[SipJs] URI host:",oe.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await L.refer(oe,{requestDelegate:{onAccept:te=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",te.message)},onReject:te=>{const ve=te.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",ve),console.error("[SipJs] Response completo:",te.message),De(U,L)}},onNotify:te=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",te.request),te.accept();const ve=te.request.body;if(console.log("[SipJs] NOTIFY body:",ve),ve){const ye=ve.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(ye&&ye[1]){const He=parseInt(ye[1],10),ct=ye[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",He),console.log("[SipJs] 📊 Status text:",ct),He>=200&&He<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{L.bye().catch(rt=>{console.warn("[SipJs] Error hanging up after successful transfer:",rt)})},500);else if(He>=400){console.error("[SipJs] ❌ Transfer falló con status:",He,ct),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const rt={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[He]||`Error en transferencia (código ${He})`;console.warn("[SipJs] 💬",rt),De(U,L)}else He>=100&&He<200&&console.log("[SipJs] 📞 Transferencia en progreso:",He,ct)}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(te){throw console.error("[SipJs] ❌ Error en transferCall:",te),console.error("[SipJs] Error type:",te?.constructor?.name),console.error("[SipJs] Error message:",te instanceof Error?te.message:String(te)),console.error("[SipJs] Error stack:",te instanceof Error?te.stack:"N/A"),te}},Y=async P=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",P);const U=e.activeChannelId.value,L=s.value.get(U);if(console.log("[SipJs] Canal original:",U),console.log("[SipJs] Sesión original:",L?.state),!L||L.state!==z.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const oe=e.channels.value.find(te=>te.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",oe?.id),!oe)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 ee(L,!0),e.updateChannelState(U,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(te){throw console.error("[SipJs] ❌ Failed to hold original call:",te),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",oe.id),e.setActiveChannelId(oe.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",P),await ne(P,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:U,consultationChannelId:oe.id,targetNumber:P}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(te){throw console.error("[SipJs] ❌ Failed to start consultation call:",te),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(U),await ee(L,!1).catch(()=>{}),e.updateChannelState(U,{isHeld:!1}),new Error("Failed to initiate consultation call")}},ce=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const P=e.transferInProgress.value;if(!P)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",P);const U=s.value.get(P.originalChannelId),L=s.value.get(P.consultationChannelId);if(console.log("[SipJs] Sesión original:",U?.state),console.log("[SipJs] Sesión de consulta:",L?.state),!U||!L)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(L.state!==z.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",L.state),new Error("Consultation call not established");const oe=L.dialog;if(!oe)throw new Error("No dialog available for consultation session");const te=oe.callId,ve=oe.remoteTag,ye=oe.localTag;let He=Rn.makeURI(P.targetNumber);if(!He&&r.value?.configuration.uri){const rt=r.value.configuration.uri.host;He=Rn.makeURI(`sip:${P.targetNumber}@${rt}`)}if(!He)throw new Error("Invalid transfer target URI");const ct=`${encodeURIComponent(te)}%3Bto-tag%3D${encodeURIComponent(ve)}%3Bfrom-tag%3D${encodeURIComponent(ye)}`;He.setHeader("Replaces",ct);try{await U.refer(He,{onNotify:rt=>{rt.accept();const gt=rt.request.body,Fn=typeof gt=="string"?gt:gt&&typeof gt=="object"&&"content"in gt?gt.content:void 0;if(Fn){const Di=Fn.match(/SIP\/2\.0\s+(\d+)/);if(Di&&Di[1]){const mr=parseInt(Di[1]);mr>=200&&mr<300?setTimeout(()=>{de(P.originalChannelId,U),de(P.consultationChannelId,L),e.setTransferInProgress(null)},500):mr>=400&&(console.error("[SipJs] Attended transfer failed with status:",mr),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:rt=>{console.error("[SipJs] Attended transfer REFER rejected:",rt.message.statusCode),e.setTransferInProgress(null)}}})}catch(rt){throw console.error("[SipJs] Attended transfer failed:",rt),rt}},pe=async()=>{const P=e.transferInProgress.value;if(!P)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const U=s.value.get(P.originalChannelId),L=s.value.get(P.consultationChannelId);if(L)try{await de(P.consultationChannelId,L),console.log("[SipJs] Consultation call ended")}catch(oe){console.warn("[SipJs] Error ending consultation:",oe)}if(U)try{e.setActiveChannelId(P.originalChannelId),await ee(U,!1),e.updateChannelState(P.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(oe){console.warn("[SipJs] Error resuming original call:",oe)}e.setTransferInProgress(null)},tt=P=>{const U=P.sessionDescriptionHandler;if(!U){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const L=U.remoteMediaStream;if(!L){console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");return}if(a.value===L)return;i.pause(),i.srcObject=null,y?.abort(),y=new AbortController,a.value=L,l.value=U.localMediaStream??null;const oe=mt(P);Ge(P,oe),oe&&B(P,oe.id);const te=ye=>{T?.abort(),T=new AbortController;const{signal:He}=T,ct=()=>{i.play().catch(rt=>{rt.name!=="AbortError"&&console.error("[SipJs] play() failed:",rt.name,rt.message)})};ye.addEventListener("unmute",()=>{ct()},{signal:He}),ct()};L.addEventListener("addtrack",ye=>{ye.track.kind==="audio"&&(i.srcObject=null,i.srcObject=L,te(ye.track),oe&&B(P,oe.id))},{signal:y.signal});const[ve]=L.getTracks();ve&&(i.srcObject=L,te(ve),oe&&B(P,oe.id))},zt=()=>{T?.abort(),T=null,y?.abort(),y=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:Ct,stop:J,makeCall:ne,answerCall:re,hangupCall:fe,toggleMute:ue,toggleHold:Ee,sendDTMF:Te,transferCall:Fe,startAttendedTransfer:Y,completeAttendedTransfer:ce,cancelAttendedTransfer:pe,switchChannel:me,extension:C,setVolume:he,setNotificationVolume:H,setRingtoneVolume:N,setRingtoneTone:_,setOutputDevice:ke,setInputDevice:Ve,remoteStream:a,localStream:l}};var Dp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const Op=dp,fy=(e,t)=>r=>{var n;if(t?.variants==null)return Op(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 Op(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,y]=h;return Array.isArray(y)?y.includes({...i,...a}[m]):{...i,...a}[m]===y})?[...l,c,d]:l},[]),r?.class,r?.className)};function py(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hy(e,t,r){py(e,t),t.set(e,r)}function gy(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 jo(e,t){return e.get(gy(e,t))}function Hp(e){return typeof e=="string"?`'${e}'`:new vy().serialize(e)}var vy=(function(){var e=new WeakMap;class t{constructor(){hy(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=jo(e,this).get(n);return s===void 0&&(jo(e,this).set(n,`#${jo(e,this).size}`),s=this.serializeObject(n),jo(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 my(e,t){return e===t||Hp(e)===Hp(t)}function Ei(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function Nt(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=Ft(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=>(Wn(n,o),o)]}function rr(){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 zl(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 Kl(e){return e==null}function Wl(e){return e?e.flatMap(t=>t.type===Ke?Wl(t.children):[t]):[]}var[Uo,Ax]=Nt("ConfigProvider");function wy(e,t){var r;const n=ut();return lt(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),Ot(n)}function Dn(e,t){return Fi()?(Ta(e,t),!0):!1}function yy(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Dn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function by(e){let t=!1,r;const n=xa(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var qt=typeof window<"u"&&typeof document<"u",kx=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,_y=e=>typeof e<"u",Sy=Object.prototype.toString,Cy=e=>Sy.call(e)==="[object Object]",on=()=>{},Gl=xy();function xy(){var e,t,r;return qt&&!!(!((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 Ty(...e){if(e.length!==1)return Na(...e);const t=e[0];return typeof t=="function"?Ot(Xs(()=>({get:t,set:on}))):F(t)}function Mp(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 Np=e=>e();function Ey(e,t={}){let r,n,s=on;const i=l=>{clearTimeout(l),s(),s=on};let o;return l=>{const u=Ae(e),c=Ae(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 Ay(e=Np,t={}){const{initialState:r="active"}=t,n=Ty(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:Ot(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function Jl(e){return Array.isArray(e)?e:[e]}function qp(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var ky=/\B([A-Z])/g,Rx=qp(e=>e.replace(ky,"-$1").toLowerCase()),Ry=/-(\w)/g,Ix=qp(e=>e.replace(Ry,(t,r)=>r?r.toUpperCase():""));function Bp(e){return e||ht()}function Iy(e){if(!qt)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=xa(!0),r=n.run(()=>e(...i))),Dn(s),r))}function $y(e){return zr(nt(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return nt(e.value[r])&&!nt(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 Py(e){return $y(j(e))}function Zt(e,...t){const r=t.flat(),n=r[0];return Py(()=>Object.fromEntries(typeof n=="function"?Object.entries(Ht(e)).filter(([s,i])=>!n(Ae(i),s)):Object.entries(Ht(e)).filter(s=>!r.includes(s[0]))))}function Lp(e,t=1e4){return Xs((r,n)=>{let s=Ae(e),i;const o=()=>setTimeout(()=>{s=Ae(e),n()},Ae(t));return Dn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function Yl(e,t=200,r={}){return Mp(Ey(t,r),e)}function Dy(e,t,r={}){const{eventFilter:n=Np,...s}=r;return Oe(e,Mp(n,t),s)}function Oy(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=Ay(n,{initialState:s});return{stop:Dy(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function Hy(e,t={}){if(!nt(e))return Ht(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=Xs(()=>({get(){return e.value[n]},set(s){var i;if(!((i=Ae(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 My(e,t){Bp(t)&&Ts(e,t)}function Ny(e,t=!0,r){Bp(r)?Qe(e,r):t?e():Tt(e)}function qy(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=ut(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=Ae(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&qt&&u(),(nt(t)||typeof t=="function")&&Dn(Oe(t,()=>{o.value&&qt&&u()})),Dn(l),{isActive:Kr(o),pause:l,resume:u}}function Fp(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=ut(!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)},Ae(t))}return n&&(i.value=!0,qt&&u()),Dn(l),{isPending:Kr(i),start:u,stop:l}}function By(e,t,r){return Oe(e,t,{...r,immediate:!0})}function Ly(e,t,r){return Oe(e,t,{...r,once:!0})}var Ar=qt?window:void 0,$x=qt?window.document:void 0,Px=qt?window.navigator:void 0,Dx=qt?window.location:void 0;function Xt(e){var t;const r=Ae(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function Ut(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=j(()=>{const n=Jl(Ae(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return By(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>Xt(i)))!==null&&n!==void 0?n:[Ar].filter(i=>i!=null),Jl(Ae(r.value?e[1]:e[0])),Jl(f(r.value?e[2]:e[1])),Ae(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 Vp=!1;function Fy(e,t,r={}){const{window:n=Ar,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:on,cancel:on,trigger:on}:on;if(Gl&&!Vp){Vp=!0;const T={passive:!0};Array.from(n.document.body.children).forEach(v=>v.addEventListener("click",on,T)),n.document.documentElement.addEventListener("click",on,T)}let l=!0;const u=T=>Ae(s).some(v=>{if(typeof v=="string")return Array.from(n.document.querySelectorAll(v)).some(x=>x===T.target||T.composedPath().includes(x));{const x=Xt(v);return x&&(T.target===x||T.composedPath().includes(x))}});function c(T){const v=Ae(T);return v&&v.$.subTree.shapeFlag===16}function d(T,v){const x=Ae(T),b=x.$.subTree&&x.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(C=>C.el===v.target||v.composedPath().includes(C.el))}const p=T=>{const v=Xt(e);if(T.target!=null&&!(!(v instanceof Element)&&c(e)&&d(e,T))&&!(!v||v===T.target||T.composedPath().includes(v))){if("detail"in T&&T.detail===0&&(l=!u(T)),!l){l=!0;return}t(T)}};let h=!1;const m=[Ut(n,"click",T=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(T))},{passive:!0,capture:i}),Ut(n,"pointerdown",T=>{const v=Xt(e);l=!u(T)&&!!(v&&!T.composedPath().includes(v))},{passive:!0}),o&&Ut(n,"blur",T=>{setTimeout(()=>{var v;const x=Xt(e);((v=n.document.activeElement)===null||v===void 0?void 0:v.tagName)==="IFRAME"&&!x?.contains(n.document.activeElement)&&t(T)},0)},{passive:!0})].filter(Boolean),y=()=>m.forEach(T=>T());return a?{stop:y,cancel:()=>{l=!1},trigger:T=>{l=!0,p(T),l=!1}}:y}function Zl(){const e=ut(!1),t=ht();return t&&Qe(()=>{e.value=!0},t),e}function jp(e){const t=Zl();return j(()=>(t.value,!!e()))}function Vy(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function jy(...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=Ar,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Vy(t);return Ut(s,i,c=>{c.repeat&&Ae(a)||l(c)&&r(c)},o)}function Uy(e){return JSON.parse(JSON.stringify(e))}var zo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ko="__vueuse_ssr_handlers__",zy=Ky();function Ky(){return Ko in zo||(zo[Ko]=zo[Ko]||{}),zo[Ko]}function Wy(e,t){return zy[e]||t}function Gy(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 Jy={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()}},Up="vueuse-storage";function Ds(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=Ar,eventFilter:p,onError:h=O=>{console.error(O)},initOnMounted:m}=n,y=(c?ut:F)(typeof t=="function"?t():t),T=j(()=>Ae(e));if(!r)try{r=Wy("getDefaultStorage",()=>Ar?.localStorage)()}catch(O){h(O)}if(!r)return y;const v=Ae(t),x=Gy(v),b=(s=n.serializer)!==null&&s!==void 0?s:Jy[x],{pause:C,resume:E}=Oy(y,O=>N(O),{flush:i,deep:o,eventFilter:p});Oe(T,()=>w(),{flush:i});let I=!1;const M=O=>{m&&!I||w(O)},g=O=>{m&&!I||S(O)};d&&a&&(r instanceof Storage?Ut(d,"storage",M,{passive:!0}):Ut(d,Up,g)),m?Ny(()=>{I=!0,w()}):w();function H(O,q){if(d){const B={key:T.value,oldValue:O,newValue:q,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",B):new CustomEvent(Up,{detail:B}))}}function N(O){try{const q=r.getItem(T.value);if(O==null)H(q,null),r.removeItem(T.value);else{const B=b.write(O);q!==B&&(r.setItem(T.value,B),H(q,B))}}catch(q){h(q)}}function _(O){const q=O?O.newValue:r.getItem(T.value);if(q==null)return l&&v!=null&&r.setItem(T.value,b.write(v)),v;if(!O&&u){const B=b.read(q);return typeof u=="function"?u(B,v):x==="object"&&!Array.isArray(B)?{...v,...B}:B}else return typeof q!="string"?q:b.read(q)}function w(O){if(!(O&&O.storageArea!==r)){if(O&&O.key==null){y.value=v;return}if(!(O&&O.key!==T.value)){C();try{const q=b.write(y.value);(O===void 0||O?.newValue!==q)&&(y.value=_(O))}catch(q){h(q)}finally{O?Tt(E):E()}}}}function S(O){w(O.detail)}return y}var Wo={speed:2,margin:30,direction:"both"};function Yy(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 Zy(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:y=Ar,containerElement:T,handle:v=e,buttons:x=[0],restrictInView:b,autoScroll:C=!1}=t,E=F((r=Ae(h))!==null&&r!==void 0?r:{x:0,y:0}),I=F(),M=ie=>o?o.includes(ie.pointerType):!0,g=ie=>{Ae(a)&&ie.preventDefault(),Ae(l)&&ie.stopPropagation()},H=Ae(C),N=typeof H=="object"?{speed:(n=Ae(H.speed))!==null&&n!==void 0?n:Wo.speed,margin:(s=Ae(H.margin))!==null&&s!==void 0?s:Wo.margin,direction:(i=H.direction)!==null&&i!==void 0?i:Wo.direction}:Wo,_=ie=>typeof ie=="number"?[ie,ie]:[ie.x,ie.y],w=(ie,he,ke)=>{const{clientWidth:Ve,clientHeight:Re,scrollLeft:Pe,scrollTop:Ge,scrollWidth:mt,scrollHeight:je}=ie,[et,wt]=_(N.margin),[Ct,A]=_(N.speed);let $=0,J=0;(N.direction==="x"||N.direction==="both")&&(ke.x<et&&Pe>0?$=-Ct:ke.x+he.width>Ve-et&&Pe<mt-Ve&&($=Ct)),(N.direction==="y"||N.direction==="both")&&(ke.y<wt&&Ge>0?J=-A:ke.y+he.height>Re-wt&&Ge<je-Re&&(J=A)),($||J)&&ie.scrollBy({left:$,top:J,behavior:"auto"})};let S=null;const O=()=>{const ie=Ae(T);ie&&!S&&(S=setInterval(()=>{const he=Ae(e).getBoundingClientRect(),{x:ke,y:Ve}=E.value,Re={x:ke-ie.scrollLeft,y:Ve-ie.scrollTop};Re.x>=0&&Re.y>=0&&(w(ie,he,Re),Re.x+=ie.scrollLeft,Re.y+=ie.scrollTop,E.value=Re)},1e3/60))},q=()=>{S&&(clearInterval(S),S=null)},B=(ie,he,ke,Ve)=>{const[Re,Pe]=typeof ke=="number"?[ke,ke]:[ke.x,ke.y],{clientWidth:Ge,clientHeight:mt}=he;return ie.x<Re||ie.x+Ve.width>Ge-Re||ie.y<Pe||ie.y+Ve.height>mt-Pe},Z=()=>{if(Ae(t.disabled)||!I.value)return;const ie=Ae(T);if(!ie)return;const he=Ae(e).getBoundingClientRect(),{x:ke,y:Ve}=E.value;B({x:ke-ie.scrollLeft,y:Ve-ie.scrollTop},ie,N.margin,he)?O():q()};Ae(C)&&Oe(E,Z);const W=ie=>{var he;if(!Ae(x).includes(ie.button)||Ae(t.disabled)||!M(ie)||Ae(u)&&ie.target!==Ae(e))return;const ke=Ae(T),Ve=ke==null||(he=ke.getBoundingClientRect)===null||he===void 0?void 0:he.call(ke),Re=Ae(e).getBoundingClientRect(),Pe={x:ie.clientX-(ke?Re.left-Ve.left+(C?0:ke.scrollLeft):Re.left),y:ie.clientY-(ke?Re.top-Ve.top+(C?0:ke.scrollTop):Re.top)};p?.(Pe,ie)!==!1&&(I.value=Pe,g(ie))},le=ie=>{if(Ae(t.disabled)||!M(ie)||!I.value)return;const he=Ae(T);he instanceof HTMLElement&&Yy(he);const ke=Ae(e).getBoundingClientRect();let{x:Ve,y:Re}=E.value;if((m==="x"||m==="both")&&(Ve=ie.clientX-I.value.x,he&&(Ve=Math.min(Math.max(0,Ve),he.scrollWidth-ke.width))),(m==="y"||m==="both")&&(Re=ie.clientY-I.value.y,he&&(Re=Math.min(Math.max(0,Re),he.scrollHeight-ke.height))),Ae(C)&&he&&(S===null&&w(he,ke,{x:Ve,y:Re}),Ve+=he.scrollLeft,Re+=he.scrollTop),he&&(b||C)){if(m!=="y"){const Pe=Ve-he.scrollLeft;Pe<0?Ve=he.scrollLeft:Pe>he.clientWidth-ke.width&&(Ve=he.clientWidth-ke.width+he.scrollLeft)}if(m!=="x"){const Pe=Re-he.scrollTop;Pe<0?Re=he.scrollTop:Pe>he.clientHeight-ke.height&&(Re=he.clientHeight-ke.height+he.scrollTop)}}E.value={x:Ve,y:Re},c?.(E.value,ie),g(ie)},G=ie=>{Ae(t.disabled)||!M(ie)||I.value&&(I.value=void 0,C&&q(),d?.(E.value,ie),g(ie))};if(qt){const ie=()=>{var he;return{capture:(he=t.capture)!==null&&he!==void 0?he:!0,passive:!Ae(a)}};Ut(v,"pointerdown",W,ie),Ut(y,"pointermove",le,ie),Ut(y,"pointerup",G,ie)}return{...Hy(E),position:E,isDragging:j(()=>!!I.value),style:j(()=>`
|
|
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}};lp.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var Rn=class ya{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=$t.Stopped,this._stateEventEmitter=new _i,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ya.defaultOptions()),{sipjsId:ts(5)}),{uri:new Sn("sip","anonymous."+ts(6),"anonymous.invalid")}),{viaHost:ts(12)+".invalid"}),ya.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 K0,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=At.error;break;case"warn":this.loggerFactory.level=At.warn;break;case"log":this.loggerFactory.level=At.log;break;case"debug":this.loggerFactory.level=At.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:ya.newUUID(),_t.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return _t.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:vw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:Er.Unsupported,sipExtensionReplaces:Er.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:lp,transportOptions:{},uri:new Sn("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+D0,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===$t.Stopped?Promise.reject(new Error("User agent stopped.")):Promise.resolve().then(()=>this.transport.connect())}start(){return this.state===$t.Started?(this.logger.warn("User agent already started"),Promise.resolve()):(this.logger.log(`Starting ${this.configuration.uri}`),this.transitionState($t.Started),this.transport.connect())}async stop(){if(this.state===$t.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($t.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($t.Stopped)}_makeInviter(t,r){return new Do(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:ts(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new Sn("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===Er.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===Er.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>U0[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new fw({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 z0(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new $s(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!==Er.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 Zf(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new Ol(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!==$t.Stopped&&this.delegate&&this.delegate.onConnect&&this.delegate.onConnect()}onTransportDisconnect(t){this.state!==$t.Stopped&&(this.delegate&&this.delegate.onDisconnect&&this.delegate.onDisconnect(t),t&&this.options.reconnectionAttempts>0&&this.attemptReconnection())}onTransportMessage(t){const r=Oo.parseMessage(t,this.getLogger("sip.Parser"));if(!r){this.logger.warn("Failed to parse incoming message. Dropping.");return}if(this.state===$t.Stopped&&r instanceof Is){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 Is){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=Si(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof Cn){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=Si(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 Is){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof Cn){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 $t.Started:t!==$t.Stopped&&n();break;case $t.Stopped:t!==$t.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)}},kt=new window.AudioContext,mw={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]},No=F(null),qo=F(null),xi=F(null),Bo=F(.5),Lo=F(1),Bl=F("original"),Fo=F(!1),Ti={original:{frequencies:[523.25,659.25,783.99],type:"sine",originalMelody:!0,gain:.7,duration:.5,repeatDelay:400},aurora:{frequencies:[523.25,659.25,783.99,1046.5],type:"sine",originalMelody:!0,gain:.85,duration:.55,repeatDelay:400},resonancia:{frequencies:[392,523.25,659.25,783.99],type:"triangle",originalMelody:!0,gain:1,duration:.6,repeatDelay:400}};const cp=()=>{const e={classic:"original","original-loud":"aurora","original-intense":"resonancia"},t=c=>{Bo.value=Math.max(0,Math.min(1,c/100))},r=c=>{Lo.value=Math.max(0,Math.min(1,c/100))},n=()=>{Fo.value&&(a(),o())},s=c=>{const d=e[c]??c;Bl.value=Ti[d]?d:"original",n()},i=(c,d=150)=>{kt.state==="suspended"&&kt.resume();const p=mw[c.toUpperCase()];if(!p)return;const h=kt.createOscillator(),m=kt.createOscillator(),w=kt.createGain();h.frequency.value=p[0],m.frequency.value=p[1],h.type="sine",m.type="sine",w.gain.value=.1*Bo.value,h.connect(w),m.connect(w),w.connect(kt.destination),h.start(),m.start(),setTimeout(()=>{h.stop(),m.stop(),h.disconnect(),m.disconnect(),w.disconnect()},d)},o=()=>{if(Fo.value)return;Fo.value=!0,kt.state==="suspended"&&kt.resume();const c=()=>{const p=kt.currentTime,h=Ti[Bl.value]||Ti.original,m=kt.createGain(),w=h.duration,T=(h.originalMelody?[h.frequencies[0]]:h.frequencies).map(g=>{const C=kt.createOscillator();return C.type=h.type,C.frequency.setValueAtTime(g,p),h.originalMelody&&h.frequencies.slice(1).forEach((_,S)=>{C.frequency.setValueAtTime(_,p+(S+1)*.1)}),C.connect(m),C});h.originalMelody?(m.gain.setValueAtTime(h.gain*Lo.value,p),m.gain.exponentialRampToValueAtTime(.001,p+w)):(m.gain.setValueAtTime(0,p),m.gain.linearRampToValueAtTime(.7*Lo.value,p+.02),m.gain.setValueAtTime(.7*Lo.value,p+1.05),m.gain.linearRampToValueAtTime(0,p+w)),m.connect(kt.destination),T.forEach(g=>{g.start(p),g.stop(p+w)})},d=()=>{const p=Ti[Bl.value]||Ti.original;qo.value=window.setTimeout(c,p.repeatDelay)};c(),d(),No.value=window.setInterval(()=>{c(),d()},3e3)},a=()=>{No.value&&(clearInterval(No.value),No.value=null),qo.value&&(clearTimeout(qo.value),qo.value=null),Fo.value=!1};return{playDtmf:i,startRingtone:o,stopRingtone:a,startRingback:()=>{if(xi.value)return;kt.state==="suspended"&&kt.resume();const c=()=>{const d=kt.currentTime,p=kt.createOscillator(),h=kt.createGain();p.type="sine",p.frequency.value=425,h.gain.setValueAtTime(.1*Bo.value,d),h.gain.linearRampToValueAtTime(.1*Bo.value,d+1),h.gain.linearRampToValueAtTime(0,d+1.1),p.connect(h),h.connect(kt.destination),p.start(d),p.stop(d+1.1)};c(),xi.value=window.setInterval(()=>{c()},4e3)},stopRingback:()=>{xi.value&&(clearInterval(xi.value),xi.value=null)},setNotificationVolume:t,setRingtoneVolume:r,setRingtoneTone:s}};function up(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=up(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function dp(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=up(e))&&(n&&(n+=" "),n+=t);return n}var ww=(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},yw=(e,t)=>({classGroupId:e,validator:t}),fp=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Vo="-",pp=[],bw="arbitrary..",_w=e=>{const t=Cw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Sw(o);const a=o.split(Vo);return hp(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?ww(u,l):l:u||pp}return r[o]||pp}}},hp=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=hp(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(Vo):e.slice(t).join(Vo),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(o))return u.classGroupId}},Sw=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?bw+n:void 0})(),Cw=e=>{const{theme:t,classGroups:r}=e;return xw(r,t)},xw=(e,t)=>{const r=fp();for(const n in e){const s=e[n];Ll(s,r,n,t)}return r},Ll=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];Tw(o,t,r,n)}},Tw=(e,t,r,n)=>{if(typeof e=="string"){Ew(e,t,r);return}if(typeof e=="function"){Aw(e,t,r,n);return}kw(e,t,r,n)},Ew=(e,t,r)=>{const n=e===""?t:gp(t,e);n.classGroupId=r},Aw=(e,t,r,n)=>{if(Rw(e)){Ll(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(yw(r,e))},kw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Ll(l,gp(t,a),r,n)}},gp=(e,t)=>{let r=e;const n=t.split(Vo),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=fp(),r.nextPart.set(o,a)),r=a}return r},Rw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Iw=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)}}},Fl="!",vp=":",$w=[],mp=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Pw=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 T=s[w];if(o===0&&a===0){if(T===vp){i.push(s.slice(l,w)),l=w+1;continue}if(T==="/"){u=w;continue}}T==="["?o++:T==="]"?o--:T==="("?a++:T===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(Fl)?(p=d.slice(0,-1),h=!0):d.startsWith(Fl)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return mp(i,h,p,m)};if(t){const s=t+vp,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):mp($w,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},Dw=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}},Ow=e=>({cache:Iw(e.cacheSize),parseClassName:Pw(e),sortModifiers:Dw(e),..._w(e)}),Hw=/\s+/,Mw=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(Hw);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 T=!!w,g=n(T?m.substring(0,w):m);if(!g){if(!T){l=c+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=c+(l.length>0?" "+l:l);continue}T=!1}const C=p.length===0?"":p.length===1?p[0]:i(p).join(":"),_=h?C+Fl:C,S=_+g;if(o.indexOf(S)>-1)continue;o.push(S);const E=s(g,T);for(let I=0;I<E.length;++I){const N=E[I];o.push(_+N)}l=c+(l.length>0?" "+l:l)}return l},Nw=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=wp(r))&&(s&&(s+=" "),s+=n);return s},wp=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=wp(e[n]))&&(r&&(r+=" "),r+=t);return r},qw=(e,...t)=>{let r,n,s,i;const o=l=>(r=Ow(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=Mw(l,r);return s(l,c),c};return i=o,(...l)=>i(Nw(...l))},Bw=[],St=e=>{const t=r=>r[e]||Bw;return t.isThemeGetter=!0,t},yp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Lw=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vw=/\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$/,jw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Uw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,In=e=>Lw.test(e),Be=e=>!!e&&!Number.isNaN(Number(e)),$n=e=>!!e&&Number.isInteger(Number(e)),Vl=e=>e.endsWith("%")&&Be(e.slice(0,-1)),nn=e=>Fw.test(e),_p=()=>!0,Kw=e=>Vw.test(e)&&!jw.test(e),jl=()=>!1,Ww=e=>Uw.test(e),Gw=e=>zw.test(e),Jw=e=>!Ce(e)&&!xe(e),Yw=e=>Pn(e,Ap,jl),Ce=e=>yp.test(e),rs=e=>Pn(e,kp,Kw),Sp=e=>Pn(e,sy,Be),Zw=e=>Pn(e,Ip,_p),Xw=e=>Pn(e,Rp,jl),Cp=e=>Pn(e,Tp,jl),Qw=e=>Pn(e,Ep,Gw),jo=e=>Pn(e,$p,Ww),xe=e=>bp.test(e),Ei=e=>ns(e,kp),ey=e=>ns(e,Rp),xp=e=>ns(e,Tp),ty=e=>ns(e,Ap),ry=e=>ns(e,Ep),Uo=e=>ns(e,$p,!0),ny=e=>ns(e,Ip,!0),Pn=(e,t,r)=>{const n=yp.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ns=(e,t,r=!1)=>{const n=bp.exec(e);return n?n[1]?t(n[1]):r:!1},Tp=e=>e==="position"||e==="percentage",Ep=e=>e==="image"||e==="url",Ap=e=>e==="length"||e==="size"||e==="bg-size",kp=e=>e==="length",sy=e=>e==="number",Rp=e=>e==="family-name",Ip=e=>e==="number"||e==="weight",$p=e=>e==="shadow",iy=()=>{const e=St("color"),t=St("font"),r=St("text"),n=St("font-weight"),s=St("tracking"),i=St("leading"),o=St("breakpoint"),a=St("container"),l=St("spacing"),u=St("radius"),c=St("shadow"),d=St("inset-shadow"),p=St("text-shadow"),h=St("drop-shadow"),m=St("blur"),w=St("perspective"),T=St("aspect"),g=St("ease"),C=St("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),xe,Ce],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],v=()=>[xe,Ce,l],H=()=>[In,"full","auto",...v()],M=()=>[$n,"none","subgrid",xe,Ce],x=()=>["auto",{span:["full",$n,xe,Ce]},$n,xe,Ce],b=()=>[$n,"auto",xe,Ce],y=()=>["auto","min","max","fr",xe,Ce],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...v()],Z=()=>[In,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],W=()=>[In,"screen","full","dvw","lvw","svw","min","max","fit",...v()],le=()=>[In,"screen","full","lh","dvh","lvh","svh","min","max","fit",...v()],G=()=>[e,xe,Ce],ie=()=>[...S(),xp,Cp,{position:[xe,Ce]}],he=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ke=()=>["auto","cover","contain",ty,Yw,{size:[xe,Ce]}],Ve=()=>[Vl,Ei,rs],Re=()=>["","none","full",u,xe,Ce],Pe=()=>["",Be,Ei,rs],Ge=()=>["solid","dashed","dotted","double"],mt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],je=()=>[Be,Vl,xp,Cp],et=()=>["","none",m,xe,Ce],wt=()=>["none",Be,xe,Ce],Ct=()=>["none",Be,xe,Ce],A=()=>[Be,xe,Ce],$=()=>[In,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nn],breakpoint:[nn],color:[_p],container:[nn],"drop-shadow":[nn],ease:["in","out","in-out"],font:[Jw],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nn],shadow:[nn],spacing:["px",Be],text:[nn],"text-shadow":[nn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",In,Ce,xe,T]}],container:["container"],columns:[{columns:[Be,Ce,xe,a]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"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:E()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],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",xe,Ce]}],basis:[{basis:[In,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Be,In,"auto","initial","none",Ce]}],grow:[{grow:["",Be,xe,Ce]}],shrink:[{shrink:["",Be,xe,Ce]}],order:[{order:[$n,"first","last","none",xe,Ce]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:x()}],"col-start":[{"col-start":b()}],"col-end":[{"col-end":b()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:x()}],"row-start":[{"row-start":b()}],"row-end":[{"row-end":b()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":y()}],"auto-rows":[{"auto-rows":y()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pbs:[{pbs:v()}],pbe:[{pbe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...le()]}],"min-block-size":[{"min-block":["auto",...le()]}],"max-block-size":[{"max-block":["none",...le()]}],w:[{w:[a,"screen",...Z()]}],"min-w":[{"min-w":[a,"screen","none",...Z()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...Z()]}],h:[{h:["screen","lh",...Z()]}],"min-h":[{"min-h":["screen","lh","none",...Z()]}],"max-h":[{"max-h":["screen","lh",...Z()]}],"font-size":[{text:["base",r,Ei,rs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ny,Zw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Vl,Ce]}],"font-family":[{font:[ey,Xw,t]}],"font-features":[{"font-features":[Ce]}],"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,xe,Ce]}],"line-clamp":[{"line-clamp":[Be,"none",xe,Sp]}],leading:[{leading:[i,...v()]}],"list-image":[{"list-image":["none",xe,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[Be,"from-font","auto",xe,rs]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Be,"auto",xe,Ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,Ce]}],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",xe,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:he()}],"bg-size":[{bg:ke()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},$n,xe,Ce],radial:["",xe,Ce],conic:[$n,xe,Ce]},ry,Qw]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:Ve()}],"gradient-via-pos":[{via:Ve()}],"gradient-to-pos":[{to:Ve()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:Re()}],"rounded-s":[{"rounded-s":Re()}],"rounded-e":[{"rounded-e":Re()}],"rounded-t":[{"rounded-t":Re()}],"rounded-r":[{"rounded-r":Re()}],"rounded-b":[{"rounded-b":Re()}],"rounded-l":[{"rounded-l":Re()}],"rounded-ss":[{"rounded-ss":Re()}],"rounded-se":[{"rounded-se":Re()}],"rounded-ee":[{"rounded-ee":Re()}],"rounded-es":[{"rounded-es":Re()}],"rounded-tl":[{"rounded-tl":Re()}],"rounded-tr":[{"rounded-tr":Re()}],"rounded-br":[{"rounded-br":Re()}],"rounded-bl":[{"rounded-bl":Re()}],"border-w":[{border:Pe()}],"border-w-x":[{"border-x":Pe()}],"border-w-y":[{"border-y":Pe()}],"border-w-s":[{"border-s":Pe()}],"border-w-e":[{"border-e":Pe()}],"border-w-bs":[{"border-bs":Pe()}],"border-w-be":[{"border-be":Pe()}],"border-w-t":[{"border-t":Pe()}],"border-w-r":[{"border-r":Pe()}],"border-w-b":[{"border-b":Pe()}],"border-w-l":[{"border-l":Pe()}],"divide-x":[{"divide-x":Pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ge(),"hidden","none"]}],"divide-style":[{divide:[...Ge(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-bs":[{"border-bs":G()}],"border-color-be":[{"border-be":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...Ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Be,xe,Ce]}],"outline-w":[{outline:["",Be,Ei,rs]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",c,Uo,jo]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",d,Uo,jo]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:Pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Be,rs]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":Pe()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",p,Uo,jo]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Be,xe,Ce]}],"mix-blend":[{"mix-blend":[...mt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":mt()}],"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":[Be]}],"mask-image-linear-from-pos":[{"mask-linear-from":je()}],"mask-image-linear-to-pos":[{"mask-linear-to":je()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":je()}],"mask-image-t-to-pos":[{"mask-t-to":je()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":je()}],"mask-image-r-to-pos":[{"mask-r-to":je()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":je()}],"mask-image-b-to-pos":[{"mask-b-to":je()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":je()}],"mask-image-l-to-pos":[{"mask-l-to":je()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":je()}],"mask-image-x-to-pos":[{"mask-x-to":je()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":je()}],"mask-image-y-to-pos":[{"mask-y-to":je()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[xe,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":je()}],"mask-image-radial-to-pos":[{"mask-radial-to":je()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[Be]}],"mask-image-conic-from-pos":[{"mask-conic-from":je()}],"mask-image-conic-to-pos":[{"mask-conic-to":je()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:he()}],"mask-size":[{mask:ke()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,Ce]}],filter:[{filter:["","none",xe,Ce]}],blur:[{blur:et()}],brightness:[{brightness:[Be,xe,Ce]}],contrast:[{contrast:[Be,xe,Ce]}],"drop-shadow":[{"drop-shadow":["","none",h,Uo,jo]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Be,xe,Ce]}],"hue-rotate":[{"hue-rotate":[Be,xe,Ce]}],invert:[{invert:["",Be,xe,Ce]}],saturate:[{saturate:[Be,xe,Ce]}],sepia:[{sepia:["",Be,xe,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,Ce]}],"backdrop-blur":[{"backdrop-blur":et()}],"backdrop-brightness":[{"backdrop-brightness":[Be,xe,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[Be,xe,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Be,xe,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Be,xe,Ce]}],"backdrop-invert":[{"backdrop-invert":["",Be,xe,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[Be,xe,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[Be,xe,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Be,xe,Ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Be,"initial",xe,Ce]}],ease:[{ease:["linear","initial",g,xe,Ce]}],delay:[{delay:[Be,xe,Ce]}],animate:[{animate:["none",C,xe,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,xe,Ce]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:wt()}],"rotate-x":[{"rotate-x":wt()}],"rotate-y":[{"rotate-y":wt()}],"rotate-z":[{"rotate-z":wt()}],scale:[{scale:Ct()}],"scale-x":[{"scale-x":Ct()}],"scale-y":[{"scale-y":Ct()}],"scale-z":[{"scale-z":Ct()}],"scale-3d":["scale-3d"],skew:[{skew:A()}],"skew-x":[{"skew-x":A()}],"skew-y":[{"skew-y":A()}],transform:[{transform:[xe,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$()}],"translate-x":[{"translate-x":$()}],"translate-y":[{"translate-y":$()}],"translate-z":[{"translate-z":$()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",xe,Ce]}],"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":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mbs":[{"scroll-mbs":v()}],"scroll-mbe":[{"scroll-mbe":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pbs":[{"scroll-pbs":v()}],"scroll-pbe":[{"scroll-pbe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"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",xe,Ce]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Be,Ei,rs,Sp]}],stroke:[{stroke:["none",...G()]}],"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"]}},oy=qw(iy);const dt=(...e)=>oy(dp(e)),sn=e=>e.length<=3?e:`${e.slice(0,3)}${"*".repeat(e.length-3)}`,ay=(e,t)=>{if(e){const r=Ul(e);if(r&&Pp(r))return r;if(e.trim())return e.trim()}if(t){const r=Ul(t);if(r&&Pp(r))return r;const n=ly(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var Ul=e=>e.replace(/[^\d+*#]/g,""),Pp=e=>/^\+?[\d*#]{2,}$/.test(e),ly=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]?Ul(t[1]):null)},cy="X-Nebula-Queue",uy="X-Nebula-Queue-Id";const Tx=30,dy=(e,t={})=>{const r=ut(null),n=ut(null),s=ut(new Map),i=new Audio;i.autoplay=!0;const o=ut(void 0),a=ut(null),l=ut(null),u=new Map,c=new Map,d=new Set,p=new Map,h=5e3;let m=!1,w=null,T=null,g=null,C=null,_=null;const S=j(()=>r.value?.configuration.uri?.user||""),{startRingtone:E,stopRingtone:I,startRingback:N,stopRingback:v,setNotificationVolume:H,setRingtoneVolume:M,setRingtoneTone:x}=cp(),b=P=>P instanceof Do||P instanceof $s?P.request?.callId||P.dialog?.callId||P.id||crypto.randomUUID():P.dialog?.callId||P.id||crypto.randomUUID(),y=P=>{if(!(P instanceof $s))return;const U=P.request;if(!U)return;const L=U.getHeader(cy)?.trim(),oe=U.getHeader(uy)?.trim();if(!(!L&&!oe))return{...oe?{id:oe}:{},...L?{name:L}:{}}},O=(P,U,L,oe)=>{const te=y(P),ve={channelId:U,sipCallId:b(P),direction:L,remoteNumber:oe,...te?{queue:te}:{}};return u.set(U,ve),t.onCallContext?.(ve),ve},q=(P,U)=>{const L=u.get(P);L&&t.onCallState?.({...L,state:U,timestamp:Date.now()})},B=(P,U)=>{if(s.value.get(U)!==P||P.state!==z.Established)return;const L=u.get(U),oe=P.sessionDescriptionHandler,te=oe?.localMediaStream??l.value,ve=oe?.remoteMediaStream??a.value,ye=te?.getAudioTracks()??[],He=ve?.getAudioTracks()??[];if(!L||!te||!ve||ye.length===0||He.length===0)return;const ct=[L.sipCallId,...ye.map(rt=>`local:${rt.id}`),...He.map(rt=>`remote:${rt.id}`)].join("|");c.get(U)!==ct&&(c.set(U,ct),t.onMediaReady?.({...L,localStream:te,remoteStream:ve}))},Z=P=>{u.delete(P),c.delete(P),d.delete(P)},W=(P,U)=>{if(s.value.get(P)!==U)return;const L=p.get(U);L&&clearTimeout(L),p.delete(U);const oe=e.channels.value.find(He=>He.id===P),te=u.get(P),ve=d.has(P)||oe?.status==="connected";Z(P),s.value.delete(P),e.updateChannelState(P,{status:"idle",remoteNumber:"",remoteDisplayName:void 0,isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1});const ye=e.transferInProgress.value;if(ye&&(ye.originalChannelId===P||ye.consultationChannelId===P)&&e.setTransferInProgress(null),e.activeChannelId.value===P&&zt(),ie(),te){try{e.addCallLog({number:te.remoteNumber,direction:te.direction,status:ve?"answered":te.direction==="incoming"?"missed":"cancelled",startTime:ve?oe?.startTime??Date.now():Date.now(),duration:ve?Math.floor((Date.now()-(oe?.startTime??Date.now()))/1e3):0})}catch(He){console.warn("[SipJs] Call ended, but saving its history failed:",He)}try{t.onCallState?.({...te,state:ve?"ended":"failed",timestamp:Date.now()})}catch(He){console.warn("[SipJs] Call ended, but the state callback failed:",He)}}},le=(P,U)=>{p.has(U)||p.set(U,setTimeout(()=>{console.warn("[SipJs] Hangup did not terminate; releasing local call state"),G(U),W(P,U)},h))},G=P=>{if(P.state!==z.Terminated)try{P.dispose().catch(U=>{console.warn("[SipJs] Session disposal failed:",U)})}catch(U){console.warn("[SipJs] Session disposal failed:",U)}},ie=()=>{e.channels.value.some(P=>P.status==="incoming")?E():I(),e.activeChannel.value?.status==="calling"?N():v()},he=P=>{i.volume=P/100},ke=async P=>{typeof i.setSinkId=="function"&&await i.setSinkId(P)},Ve=async P=>{if(!P)return;const U=[...s.value.entries()].flatMap(([te,ve])=>{const ye=ve.sessionDescriptionHandler,He=ye?.peerConnection?.getSenders().find(ct=>ct.track?.kind==="audio");return He?[{channelId:te,session:ve,sdh:ye,sender:He}]:[]});if(U.length===0){o.value=P;return}const L=[],oe=[];try{for(const{sender:ve}of U){const ye=await navigator.mediaDevices.getUserMedia(et(!1,P));L.push(ye);const[He]=ye.getAudioTracks(),ct=ve.track;if(!He||!ct)throw new Error("Could not acquire an audio track for the selected microphone");He.enabled=ct.enabled,await ve.replaceTrack(He),oe.push({sender:ve,previousTrack:ct})}o.value=P,U.forEach(({channelId:ve,session:ye,sdh:He,sender:ct},rt)=>{const gt=L[rt]?.getAudioTracks()[0];if(!gt)return;const Fn=e.channels.value.find(hn=>hn.id===ve),Hi=!(Fn?.isHeld||Fn?.isMuted);ct.track.enabled=Hi;const mr=He.localMediaStream;mr&&(mr.getAudioTracks().forEach(hn=>{hn!==gt&&mr.removeTrack(hn)}),mr.getTracks().includes(gt)||mr.addTrack(gt)),e.activeChannelId.value===ve&&(mr?l.value=mr:l.value&&(l.value.getAudioTracks().forEach(hn=>{hn!==gt&&l.value?.removeTrack(hn)}),l.value.getTracks().includes(gt)||l.value.addTrack(gt)));try{B(ye,ve)}catch(hn){console.error("[SipJs] Media-ready callback failed after microphone switch:",hn)}});const te=new Set([...s.value.values()].flatMap(ve=>ve.sessionDescriptionHandler?.peerConnection?.getSenders().map(ye=>ye.track).filter(ye=>ye?.kind==="audio")??[]));oe.forEach(({previousTrack:ve})=>{te.has(ve)||ve.stop()}),L.forEach((ve,ye)=>{ve.getTracks().forEach(He=>{He!==U[ye]?.sender.track&&He.stop()})})}catch(te){await Promise.allSettled(oe.map(({sender:ve,previousTrack:ye})=>ve.replaceTrack(ye))),L.forEach(ve=>ve.getTracks().forEach(ye=>ye.stop())),console.warn("[SipJs] Failed to switch microphone:",te)}},Re=(P,U)=>{let L=!1;const oe=P.sessionDescriptionHandler;return oe?.peerConnection&&oe.peerConnection.getSenders().forEach(te=>{te.track&&te.track.kind==="audio"&&(te.track.enabled=U,L=!0)}),L},Pe=P=>{let U=!1;return l.value&&l.value.getAudioTracks().forEach(L=>{L.enabled=P,U=!0}),U},Ge=(P,U)=>{const L=!(U?.isHeld||U?.isMuted),oe=Re(P,L),te=Pe(L);!oe&&!te&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},mt=P=>{for(const[U,L]of s.value.entries())if(L===P)return e.channels.value.find(oe=>oe.id===U)||null;return e.activeChannel.value||null},je=async P=>{const U=P.sessionDescriptionHandler?.peerConnection;if(!U)return;const L=mt(P),oe=!(L?.isHeld||L?.isMuted),te=U.getSenders().find(ve=>ve.track?.kind==="audio");if(te?.track){te.track.enabled=oe,L&&B(P,L.id);return}try{const ve=await navigator.mediaDevices.getUserMedia(et(!1));if(![...s.value.values()].includes(P)){ve.getTracks().forEach(rt=>rt.stop());return}const[ye]=ve.getAudioTracks();if(!ye)return;ye.enabled=oe;const He=new MediaStream([ye]);l.value=He;const ct=U.getSenders().find(rt=>rt.track===null);ct?await ct.replaceTrack(ye):U.addTrack(ye,He),Ge(P,L),L&&B(P,L.id)}catch(ve){console.warn("[SipJs] Failed to recover outbound audio track:",ve)}},et=(P=!1,U=o.value)=>{const L={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return U&&(L.deviceId={exact:U}),{audio:L,video:P}},wt=async()=>{const P=n.value;P&&await P.register({requestDelegate:{onAccept:()=>{e.setConnected(!0)},onReject:()=>{e.setConnected(!1)}}})},Ct=async P=>{if(!r.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(U=>U.stop())}catch(U){console.error("Microphone permission denied",U);return}try{const U=Rn.makeURI(P.uri);if(!U)throw new Error("Invalid URI");m=P.earlyMedia??!1,r.value=new Rn({uri:U,logLevel:"error",transportOptions:{server:P.transportOptions.server,keepAliveInterval:P.transportOptions.keepAliveInterval??30},authorizationUsername:P.authorizationUsername,authorizationPassword:P.authorizationPassword,reconnectionDelay:5,reconnectionAttempts:3,delegate:{onConnect:()=>{},onDisconnect:()=>e.setConnected(!1),onInvite:L=>ae(L)}}),await r.value.start(),n.value=new Ml(r.value),await wt(),A()}catch{}}},A=()=>{g=new AbortController;const{signal:P}=g;let U=Date.now();const L=5e3,oe=(gt=1e3)=>{C&&clearTimeout(C),C=setTimeout(async()=>{C=null,await $()},gt)},te=()=>{if(document.visibilityState==="visible"){const gt=Date.now()-U;gt>L?(console.log(`[SipJs] Device was suspended for ${Math.round(gt/1e3)}s, reconnecting...`),oe(1500)):oe(500)}U=Date.now()},ve=()=>{console.log("[SipJs] Network online, reconnecting..."),oe(1e3)},ye=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),C&&(clearTimeout(C),C=null)},He=()=>{_=setInterval(()=>{const gt=Date.now(),Fn=gt-U;Fn>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(Fn/1e3)}s), device may have woken from sleep`),oe(1500)),U=gt},1e3)},ct=()=>{console.log("[SipJs] Page frozen"),_&&(clearInterval(_),_=null)},rt=()=>{console.log("[SipJs] Page resumed"),U=Date.now(),He(),oe(1e3)};document.addEventListener("visibilitychange",te,{signal:P}),window.addEventListener("online",ve,{signal:P}),window.addEventListener("offline",ye,{signal:P}),document.addEventListener("freeze",ct,{signal:P}),document.addEventListener("resume",rt,{signal:P}),He()},$=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 wt()}catch{}}catch(P){console.error("[SipJs] Reconnection failed:",P)}}},J=async()=>{g?.abort(),g=null,C&&(clearTimeout(C),C=null),_&&(clearInterval(_),_=null);for(const[L,oe]of s.value.entries()){let te;try{await Promise.race([de(L,oe),new Promise(ve=>{te=setTimeout(ve,1500)})])}finally{te&&clearTimeout(te)}}zt();const P=n.value,U=r.value;if(n.value=null,r.value=null,P)try{await P.unregister()}catch(L){console.warn("[SipJs] Unregister failed:",L)}if(U)try{await U.stop()}catch(L){console.warn("[SipJs] UserAgent stop failed:",L)}},ae=P=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",P.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",P.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",P.remoteIdentity.displayName);const U=e.channels.value.find(ve=>ve.status==="idle"&&!s.value.has(ve.id));if(!U){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),P.reject();return}const L=U.id;s.value.set(L,P);const oe=P.body?P.body.includes("m=video"):!1,te=ay(P.remoteIdentity.uri.user,P.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",te),console.log("[SipJs] 🎥 Video:",oe?"Sí":"No"),e.updateChannelState(L,{status:"incoming",remoteNumber:te,remoteDisplayName:P.remoteIdentity.displayName||void 0,hasVideo:oe}),O(P,L,"incoming",te),q(L,"ringing"),ie(),e.setActiveChannelId(L),P.stateChange.addListener(ve=>{switch(ve){case z.Terminated:W(L,P);break;case z.Established:if(s.value.get(L)!==P)break;d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),q(L,"connected"),e.activeChannelId.value===L&&(tt(P),je(P).then(()=>B(P,L))),ie();break}})},ne=async(P,U=!1)=>{if(!r.value)return;const L=e.activeChannelId.value;if(s.value.has(L))return;let oe=Rn.makeURI(P);if(!oe&&r.value.configuration.uri){const ye=r.value.configuration.uri.host;oe=Rn.makeURI(`sip:${P}@${ye}`)}if(!oe)return;const te=new Do(r.value,oe,{earlyMedia:m});s.value.set(L,te),O(te,L,"outgoing",P),q(L,"dialing"),e.updateChannelState(L,{status:"calling",remoteNumber:P,hasVideo:U}),e.setLastDialedNumber(P),ie(),te.stateChange.addListener(ye=>{switch(ye){case z.Established:if(s.value.get(L)!==te)break;d.add(L),e.channels.value.find(He=>He.id===L)?.status!=="connected"&&(e.updateChannelState(L,{status:"connected",startTime:Date.now()}),q(L,"connected"),tt(te),je(te).then(()=>B(te,L)),ie());break;case z.Terminated:W(L,te);break}});const ve={sessionDescriptionHandlerOptions:{constraints:et(U)},requestDelegate:{onProgress:ye=>{s.value.get(L)===te&&(ye.message.statusCode===180||ye.message.statusCode===183)&&(ye.message.body&&(e.updateChannelState(L,{hasEarlyMedia:!0}),tt(te)),ie())},onAccept:ye=>{s.value.get(L)===te&&e.channels.value.find(He=>He.id===L)?.status!=="connected"&&(d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),q(L,"connected"),tt(te),je(te).then(()=>B(te,L)),ie())}}};try{await te.invite(ve)}catch(ye){throw W(L,te),ye}},re=async(P=!1)=>{const U=e.activeChannelId.value,L=s.value.get(U);if(L instanceof $s&&L.state===z.Initial){I(),e.updateChannelState(U,{status:"connected",startTime:Date.now()}),ie();for(const[te,ve]of s.value.entries())if(te!==e.activeChannelId.value&&ve.state===z.Established&&!e.channels.value.find(ye=>ye.id===te)?.isHeld)try{await ee(ve,!0),e.updateChannelState(te,{isHeld:!0})}catch(ye){console.error(`[SipJs] Failed to hold channel ${te}:`,ye)}const oe={sessionDescriptionHandlerOptions:{constraints:et(P),iceGatheringTimeout:1e3}};try{await L.accept(oe),ie()}catch(te){const ve=s.value.get(U);throw ve instanceof $s&&ve.state===z.Initial&&(e.updateChannelState(U,{status:"incoming",startTime:void 0}),ie()),te}}},de=async(P,U)=>{le(P,U);try{switch(U.state){case z.Initial:case z.Establishing:U instanceof Do?await U.cancel():U instanceof $s&&await U.reject();break;case z.Established:await U.bye();break}}catch(L){console.warn("[SipJs] Hangup signaling failed:",L)}finally{G(U),W(P,U)}},fe=async()=>{const P=e.activeChannelId.value,U=s.value.get(P);U&&await de(P,U)},ue=()=>{const P=s.value.get(e.activeChannelId.value);if(!P)return;const U=!e.isMuted.value;e.setMuted(U),Ge(P,e.channels.value.find(L=>L.id===e.activeChannelId.value))},ee=async(P,U)=>{const L={sessionDescriptionHandlerOptions:{hold:U}};await P.invite(L)},Ee=async()=>{const P=s.value.get(e.activeChannelId.value);if(P?.state!==z.Established)return;const U=!e.isHeld.value;try{await ee(P,U),e.setHeld(U),Ge(P,e.channels.value.find(L=>L.id===e.activeChannelId.value))}catch{}},me=async P=>{const U=e.activeChannelId.value;if(U===P)return;const L=s.value.get(U),oe=s.value.get(P),te=e.channels.value.find(ye=>ye.id===U),ve=e.channels.value.find(ye=>ye.id===P);if(L&&L.state===z.Established&&!te?.isHeld)try{await ee(L,!0),e.updateChannelState(U,{isHeld:!0}),Ge(L,e.channels.value.find(ye=>ye.id===U))}catch{}if(e.setActiveChannelId(P),ie(),oe&&oe.state===z.Established){if(ve?.isHeld)try{await ee(oe,!1),e.updateChannelState(P,{isHeld:!1})}catch{}Ge(oe,e.channels.value.find(ye=>ye.id===P)),tt(oe)}else zt()},Te=P=>{if(!/^[0-9*#]$/.test(P))return;const U=s.value.get(e.activeChannelId.value);if(U?.state!==z.Established)return;const L=U.sessionDescriptionHandler?.peerConnection?.getSenders().find(te=>te.track?.kind==="audio")?.dtmf;if(L?.canInsertDTMF){L.insertDTMF(P,160,70);return}const oe={requestOptions:{body:{content:`Signal=${P}\r
|
|
68
|
+
Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};U.info(oe)},De=(P,U)=>{const L=e.channels.value.find(oe=>oe.id===P);!L||L.status!=="connected"||(tt(U),Ge(U,L),je(U),i.play().catch(()=>{}))},Fe=async P=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",P);const U=e.activeChannelId.value,L=s.value.get(U);if(!L)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",U),new Error("No active session to transfer");if(console.log("[SipJs] Sesión encontrada - Estado:",L.state),console.log("[SipJs] Dialog ID:",L.dialog?.id),console.log("[SipJs] Call ID:",L.dialog?.callId),L.state!==z.Established)throw console.error("[SipJs] ❌ Sesión no establecida. Estado actual:",L.state),new Error(`Cannot transfer call. Call is not established (state: ${L.state})`);let oe=Rn.makeURI(P);if(!oe&&r.value?.configuration.uri){const te=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",te),oe=Rn.makeURI(`sip:${P}@${te}`)}if(!oe)throw console.error("[SipJs] ❌ URI de destino inválida:",P),new Error(`Invalid transfer target: ${P}`);console.log("[SipJs] 📤 URI de transferencia:",oe.toString()),console.log("[SipJs] URI scheme:",oe.scheme),console.log("[SipJs] URI user:",oe.user),console.log("[SipJs] URI host:",oe.host);try{console.log("[SipJs] 🚀 Enviando REFER..."),await L.refer(oe,{requestDelegate:{onAccept:te=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",te.message)},onReject:te=>{const ve=te.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",ve),console.error("[SipJs] Response completo:",te.message),De(U,L)}},onNotify:te=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",te.request),te.accept();const ve=te.request.body;if(console.log("[SipJs] NOTIFY body:",ve),ve){const ye=ve.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(ye&&ye[1]){const He=parseInt(ye[1],10),ct=ye[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",He),console.log("[SipJs] 📊 Status text:",ct),He>=200&&He<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{L.bye().catch(rt=>{console.warn("[SipJs] Error hanging up after successful transfer:",rt)})},500);else if(He>=400){console.error("[SipJs] ❌ Transfer falló con status:",He,ct),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const rt={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[He]||`Error en transferencia (código ${He})`;console.warn("[SipJs] 💬",rt),De(U,L)}else He>=100&&He<200&&console.log("[SipJs] 📞 Transferencia en progreso:",He,ct)}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(te){throw console.error("[SipJs] ❌ Error en transferCall:",te),console.error("[SipJs] Error type:",te?.constructor?.name),console.error("[SipJs] Error message:",te instanceof Error?te.message:String(te)),console.error("[SipJs] Error stack:",te instanceof Error?te.stack:"N/A"),te}},Y=async P=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",P);const U=e.activeChannelId.value,L=s.value.get(U);if(console.log("[SipJs] Canal original:",U),console.log("[SipJs] Sesión original:",L?.state),!L||L.state!==z.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const oe=e.channels.value.find(te=>te.status==="idle");if(console.log("[SipJs] Canal de consulta encontrado:",oe?.id),!oe)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 ee(L,!0),e.updateChannelState(U,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(te){throw console.error("[SipJs] ❌ Failed to hold original call:",te),new Error("Failed to put call on hold")}console.log("[SipJs] 🔄 Cambiando al canal de consulta:",oe.id),e.setActiveChannelId(oe.id);try{console.log("[SipJs] 📞 Iniciando llamada de consulta a:",P),await ne(P,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:U,consultationChannelId:oe.id,targetNumber:P}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(te){throw console.error("[SipJs] ❌ Failed to start consultation call:",te),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(U),await ee(L,!1).catch(()=>{}),e.updateChannelState(U,{isHeld:!1}),new Error("Failed to initiate consultation call")}},ce=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const P=e.transferInProgress.value;if(!P)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",P);const U=s.value.get(P.originalChannelId),L=s.value.get(P.consultationChannelId);if(console.log("[SipJs] Sesión original:",U?.state),console.log("[SipJs] Sesión de consulta:",L?.state),!U||!L)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(L.state!==z.Established)throw console.error("[SipJs] ❌ Llamada de consulta no está establecida. Estado:",L.state),new Error("Consultation call not established");const oe=L.dialog;if(!oe)throw new Error("No dialog available for consultation session");const te=oe.callId,ve=oe.remoteTag,ye=oe.localTag;let He=Rn.makeURI(P.targetNumber);if(!He&&r.value?.configuration.uri){const rt=r.value.configuration.uri.host;He=Rn.makeURI(`sip:${P.targetNumber}@${rt}`)}if(!He)throw new Error("Invalid transfer target URI");const ct=`${encodeURIComponent(te)}%3Bto-tag%3D${encodeURIComponent(ve)}%3Bfrom-tag%3D${encodeURIComponent(ye)}`;He.setHeader("Replaces",ct);try{await U.refer(He,{onNotify:rt=>{rt.accept();const gt=rt.request.body,Fn=typeof gt=="string"?gt:gt&&typeof gt=="object"&&"content"in gt?gt.content:void 0;if(Fn){const Hi=Fn.match(/SIP\/2\.0\s+(\d+)/);if(Hi&&Hi[1]){const mr=parseInt(Hi[1]);mr>=200&&mr<300?setTimeout(()=>{de(P.originalChannelId,U),de(P.consultationChannelId,L),e.setTransferInProgress(null)},500):mr>=400&&(console.error("[SipJs] Attended transfer failed with status:",mr),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:rt=>{console.error("[SipJs] Attended transfer REFER rejected:",rt.message.statusCode),e.setTransferInProgress(null)}}})}catch(rt){throw console.error("[SipJs] Attended transfer failed:",rt),rt}},pe=async()=>{const P=e.transferInProgress.value;if(!P)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const U=s.value.get(P.originalChannelId),L=s.value.get(P.consultationChannelId);if(L)try{await de(P.consultationChannelId,L),console.log("[SipJs] Consultation call ended")}catch(oe){console.warn("[SipJs] Error ending consultation:",oe)}if(U)try{e.setActiveChannelId(P.originalChannelId),await ee(U,!1),e.updateChannelState(P.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(oe){console.warn("[SipJs] Error resuming original call:",oe)}e.setTransferInProgress(null)},tt=P=>{const U=P.sessionDescriptionHandler;if(!U){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const L=U.remoteMediaStream;if(!L){console.error("[SipJs] setupRemoteMedia: no remoteMediaStream on SDH");return}if(a.value===L)return;i.pause(),i.srcObject=null,w?.abort(),w=new AbortController,a.value=L,l.value=U.localMediaStream??null;const oe=mt(P);Ge(P,oe),oe&&B(P,oe.id);const te=ye=>{T?.abort(),T=new AbortController;const{signal:He}=T,ct=()=>{i.play().catch(rt=>{rt.name!=="AbortError"&&console.error("[SipJs] play() failed:",rt.name,rt.message)})};ye.addEventListener("unmute",()=>{ct()},{signal:He}),ct()};L.addEventListener("addtrack",ye=>{ye.track.kind==="audio"&&(i.srcObject=null,i.srcObject=L,te(ye.track),oe&&B(P,oe.id))},{signal:w.signal});const[ve]=L.getTracks();ve&&(i.srcObject=L,te(ve),oe&&B(P,oe.id))},zt=()=>{T?.abort(),T=null,w?.abort(),w=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:Ct,stop:J,makeCall:ne,answerCall:re,hangupCall:fe,toggleMute:ue,toggleHold:Ee,sendDTMF:Te,transferCall:Fe,startAttendedTransfer:Y,completeAttendedTransfer:ce,cancelAttendedTransfer:pe,switchChannel:me,extension:S,setVolume:he,setNotificationVolume:H,setRingtoneVolume:M,setRingtoneTone:x,setOutputDevice:ke,setInputDevice:Ve,remoteStream:a,localStream:l}};var Dp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const Op=dp,fy=(e,t)=>r=>{var n;if(t?.variants==null)return Op(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 Op(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 py(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hy(e,t,r){py(e,t),t.set(e,r)}function gy(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 zo(e,t){return e.get(gy(e,t))}function Hp(e){return typeof e=="string"?`'${e}'`:new vy().serialize(e)}var vy=(function(){var e=new WeakMap;class t{constructor(){hy(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=zo(e,this).get(n);return s===void 0&&(zo(e,this).set(n,`#${zo(e,this).size}`),s=this.serializeObject(n),zo(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 my(e,t){return e===t||Hp(e)===Hp(t)}function Ai(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function Nt(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=Ft(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=>(Wn(n,o),o)]}function rr(){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 zl(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 Kl(e){return e==null}function Wl(e){return e?e.flatMap(t=>t.type===Ke?Wl(t.children):[t]):[]}var[Ko,Ax]=Nt("ConfigProvider");function wy(e,t){var r;const n=ut();return lt(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),Ot(n)}function Dn(e,t){return ji()?(Ea(e,t),!0):!1}function yy(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Dn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function by(e){let t=!1,r;const n=Ta(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var qt=typeof window<"u"&&typeof document<"u",kx=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,_y=e=>typeof e<"u",Sy=Object.prototype.toString,Cy=e=>Sy.call(e)==="[object Object]",on=()=>{},Gl=xy();function xy(){var e,t,r;return qt&&!!(!((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 Ty(...e){if(e.length!==1)return qa(...e);const t=e[0];return typeof t=="function"?Ot(Xs(()=>({get:t,set:on}))):F(t)}function Mp(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 Np=e=>e();function Ey(e,t={}){let r,n,s=on;const i=l=>{clearTimeout(l),s(),s=on};let o;return l=>{const u=Ae(e),c=Ae(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 Ay(e=Np,t={}){const{initialState:r="active"}=t,n=Ty(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:Ot(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function Jl(e){return Array.isArray(e)?e:[e]}function qp(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var ky=/\B([A-Z])/g,Rx=qp(e=>e.replace(ky,"-$1").toLowerCase()),Ry=/-(\w)/g,Ix=qp(e=>e.replace(Ry,(t,r)=>r?r.toUpperCase():""));function Bp(e){return e||ht()}function Iy(e){if(!qt)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=Ta(!0),r=n.run(()=>e(...i))),Dn(s),r))}function $y(e){return zr(nt(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return nt(e.value[r])&&!nt(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 Py(e){return $y(j(e))}function Zt(e,...t){const r=t.flat(),n=r[0];return Py(()=>Object.fromEntries(typeof n=="function"?Object.entries(Ht(e)).filter(([s,i])=>!n(Ae(i),s)):Object.entries(Ht(e)).filter(s=>!r.includes(s[0]))))}function Lp(e,t=1e4){return Xs((r,n)=>{let s=Ae(e),i;const o=()=>setTimeout(()=>{s=Ae(e),n()},Ae(t));return Dn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function Yl(e,t=200,r={}){return Mp(Ey(t,r),e)}function Dy(e,t,r={}){const{eventFilter:n=Np,...s}=r;return Oe(e,Mp(n,t),s)}function Oy(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=Ay(n,{initialState:s});return{stop:Dy(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function Hy(e,t={}){if(!nt(e))return Ht(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=Xs(()=>({get(){return e.value[n]},set(s){var i;if(!((i=Ae(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 My(e,t){Bp(t)&&Ts(e,t)}function Ny(e,t=!0,r){Bp(r)?Qe(e,r):t?e():Tt(e)}function qy(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=ut(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=Ae(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&qt&&u(),(nt(t)||typeof t=="function")&&Dn(Oe(t,()=>{o.value&&qt&&u()})),Dn(l),{isActive:Kr(o),pause:l,resume:u}}function Fp(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=ut(!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)},Ae(t))}return n&&(i.value=!0,qt&&u()),Dn(l),{isPending:Kr(i),start:u,stop:l}}function By(e,t,r){return Oe(e,t,{...r,immediate:!0})}function Ly(e,t,r){return Oe(e,t,{...r,once:!0})}var Ar=qt?window:void 0,$x=qt?window.document:void 0,Px=qt?window.navigator:void 0,Dx=qt?window.location:void 0;function Xt(e){var t;const r=Ae(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function Ut(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=j(()=>{const n=Jl(Ae(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return By(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>Xt(i)))!==null&&n!==void 0?n:[Ar].filter(i=>i!=null),Jl(Ae(r.value?e[1]:e[0])),Jl(f(r.value?e[2]:e[1])),Ae(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 Vp=!1;function Fy(e,t,r={}){const{window:n=Ar,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:on,cancel:on,trigger:on}:on;if(Gl&&!Vp){Vp=!0;const T={passive:!0};Array.from(n.document.body.children).forEach(g=>g.addEventListener("click",on,T)),n.document.documentElement.addEventListener("click",on,T)}let l=!0;const u=T=>Ae(s).some(g=>{if(typeof g=="string")return Array.from(n.document.querySelectorAll(g)).some(C=>C===T.target||T.composedPath().includes(C));{const C=Xt(g);return C&&(T.target===C||T.composedPath().includes(C))}});function c(T){const g=Ae(T);return g&&g.$.subTree.shapeFlag===16}function d(T,g){const C=Ae(T),_=C.$.subTree&&C.$.subTree.children;return _==null||!Array.isArray(_)?!1:_.some(S=>S.el===g.target||g.composedPath().includes(S.el))}const p=T=>{const g=Xt(e);if(T.target!=null&&!(!(g instanceof Element)&&c(e)&&d(e,T))&&!(!g||g===T.target||T.composedPath().includes(g))){if("detail"in T&&T.detail===0&&(l=!u(T)),!l){l=!0;return}t(T)}};let h=!1;const m=[Ut(n,"click",T=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(T))},{passive:!0,capture:i}),Ut(n,"pointerdown",T=>{const g=Xt(e);l=!u(T)&&!!(g&&!T.composedPath().includes(g))},{passive:!0}),o&&Ut(n,"blur",T=>{setTimeout(()=>{var g;const C=Xt(e);((g=n.document.activeElement)===null||g===void 0?void 0:g.tagName)==="IFRAME"&&!C?.contains(n.document.activeElement)&&t(T)},0)},{passive:!0})].filter(Boolean),w=()=>m.forEach(T=>T());return a?{stop:w,cancel:()=>{l=!1},trigger:T=>{l=!0,p(T),l=!1}}:w}function Zl(){const e=ut(!1),t=ht();return t&&Qe(()=>{e.value=!0},t),e}function jp(e){const t=Zl();return j(()=>(t.value,!!e()))}function Vy(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function jy(...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=Ar,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=Vy(t);return Ut(s,i,c=>{c.repeat&&Ae(a)||l(c)&&r(c)},o)}function Uy(e){return JSON.parse(JSON.stringify(e))}var Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Go="__vueuse_ssr_handlers__",zy=Ky();function Ky(){return Go in Wo||(Wo[Go]=Wo[Go]||{}),Wo[Go]}function Wy(e,t){return zy[e]||t}function Gy(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 Jy={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()}},Up="vueuse-storage";function Ds(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=Ar,eventFilter:p,onError:h=O=>{console.error(O)},initOnMounted:m}=n,w=(c?ut:F)(typeof t=="function"?t():t),T=j(()=>Ae(e));if(!r)try{r=Wy("getDefaultStorage",()=>Ar?.localStorage)()}catch(O){h(O)}if(!r)return w;const g=Ae(t),C=Gy(g),_=(s=n.serializer)!==null&&s!==void 0?s:Jy[C],{pause:S,resume:E}=Oy(w,O=>M(O),{flush:i,deep:o,eventFilter:p});Oe(T,()=>b(),{flush:i});let I=!1;const N=O=>{m&&!I||b(O)},v=O=>{m&&!I||y(O)};d&&a&&(r instanceof Storage?Ut(d,"storage",N,{passive:!0}):Ut(d,Up,v)),m?Ny(()=>{I=!0,b()}):b();function H(O,q){if(d){const B={key:T.value,oldValue:O,newValue:q,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",B):new CustomEvent(Up,{detail:B}))}}function M(O){try{const q=r.getItem(T.value);if(O==null)H(q,null),r.removeItem(T.value);else{const B=_.write(O);q!==B&&(r.setItem(T.value,B),H(q,B))}}catch(q){h(q)}}function x(O){const q=O?O.newValue:r.getItem(T.value);if(q==null)return l&&g!=null&&r.setItem(T.value,_.write(g)),g;if(!O&&u){const B=_.read(q);return typeof u=="function"?u(B,g):C==="object"&&!Array.isArray(B)?{...g,...B}:B}else return typeof q!="string"?q:_.read(q)}function b(O){if(!(O&&O.storageArea!==r)){if(O&&O.key==null){w.value=g;return}if(!(O&&O.key!==T.value)){S();try{const q=_.write(w.value);(O===void 0||O?.newValue!==q)&&(w.value=x(O))}catch(q){h(q)}finally{O?Tt(E):E()}}}}function y(O){b(O.detail)}return w}var Jo={speed:2,margin:30,direction:"both"};function Yy(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 Zy(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=Ar,containerElement:T,handle:g=e,buttons:C=[0],restrictInView:_,autoScroll:S=!1}=t,E=F((r=Ae(h))!==null&&r!==void 0?r:{x:0,y:0}),I=F(),N=ie=>o?o.includes(ie.pointerType):!0,v=ie=>{Ae(a)&&ie.preventDefault(),Ae(l)&&ie.stopPropagation()},H=Ae(S),M=typeof H=="object"?{speed:(n=Ae(H.speed))!==null&&n!==void 0?n:Jo.speed,margin:(s=Ae(H.margin))!==null&&s!==void 0?s:Jo.margin,direction:(i=H.direction)!==null&&i!==void 0?i:Jo.direction}:Jo,x=ie=>typeof ie=="number"?[ie,ie]:[ie.x,ie.y],b=(ie,he,ke)=>{const{clientWidth:Ve,clientHeight:Re,scrollLeft:Pe,scrollTop:Ge,scrollWidth:mt,scrollHeight:je}=ie,[et,wt]=x(M.margin),[Ct,A]=x(M.speed);let $=0,J=0;(M.direction==="x"||M.direction==="both")&&(ke.x<et&&Pe>0?$=-Ct:ke.x+he.width>Ve-et&&Pe<mt-Ve&&($=Ct)),(M.direction==="y"||M.direction==="both")&&(ke.y<wt&&Ge>0?J=-A:ke.y+he.height>Re-wt&&Ge<je-Re&&(J=A)),($||J)&&ie.scrollBy({left:$,top:J,behavior:"auto"})};let y=null;const O=()=>{const ie=Ae(T);ie&&!y&&(y=setInterval(()=>{const he=Ae(e).getBoundingClientRect(),{x:ke,y:Ve}=E.value,Re={x:ke-ie.scrollLeft,y:Ve-ie.scrollTop};Re.x>=0&&Re.y>=0&&(b(ie,he,Re),Re.x+=ie.scrollLeft,Re.y+=ie.scrollTop,E.value=Re)},1e3/60))},q=()=>{y&&(clearInterval(y),y=null)},B=(ie,he,ke,Ve)=>{const[Re,Pe]=typeof ke=="number"?[ke,ke]:[ke.x,ke.y],{clientWidth:Ge,clientHeight:mt}=he;return ie.x<Re||ie.x+Ve.width>Ge-Re||ie.y<Pe||ie.y+Ve.height>mt-Pe},Z=()=>{if(Ae(t.disabled)||!I.value)return;const ie=Ae(T);if(!ie)return;const he=Ae(e).getBoundingClientRect(),{x:ke,y:Ve}=E.value;B({x:ke-ie.scrollLeft,y:Ve-ie.scrollTop},ie,M.margin,he)?O():q()};Ae(S)&&Oe(E,Z);const W=ie=>{var he;if(!Ae(C).includes(ie.button)||Ae(t.disabled)||!N(ie)||Ae(u)&&ie.target!==Ae(e))return;const ke=Ae(T),Ve=ke==null||(he=ke.getBoundingClientRect)===null||he===void 0?void 0:he.call(ke),Re=Ae(e).getBoundingClientRect(),Pe={x:ie.clientX-(ke?Re.left-Ve.left+(S?0:ke.scrollLeft):Re.left),y:ie.clientY-(ke?Re.top-Ve.top+(S?0:ke.scrollTop):Re.top)};p?.(Pe,ie)!==!1&&(I.value=Pe,v(ie))},le=ie=>{if(Ae(t.disabled)||!N(ie)||!I.value)return;const he=Ae(T);he instanceof HTMLElement&&Yy(he);const ke=Ae(e).getBoundingClientRect();let{x:Ve,y:Re}=E.value;if((m==="x"||m==="both")&&(Ve=ie.clientX-I.value.x,he&&(Ve=Math.min(Math.max(0,Ve),he.scrollWidth-ke.width))),(m==="y"||m==="both")&&(Re=ie.clientY-I.value.y,he&&(Re=Math.min(Math.max(0,Re),he.scrollHeight-ke.height))),Ae(S)&&he&&(y===null&&b(he,ke,{x:Ve,y:Re}),Ve+=he.scrollLeft,Re+=he.scrollTop),he&&(_||S)){if(m!=="y"){const Pe=Ve-he.scrollLeft;Pe<0?Ve=he.scrollLeft:Pe>he.clientWidth-ke.width&&(Ve=he.clientWidth-ke.width+he.scrollLeft)}if(m!=="x"){const Pe=Re-he.scrollTop;Pe<0?Re=he.scrollTop:Pe>he.clientHeight-ke.height&&(Re=he.clientHeight-ke.height+he.scrollTop)}}E.value={x:Ve,y:Re},c?.(E.value,ie),v(ie)},G=ie=>{Ae(t.disabled)||!N(ie)||I.value&&(I.value=void 0,S&&q(),d?.(E.value,ie),v(ie))};if(qt){const ie=()=>{var he;return{capture:(he=t.capture)!==null&&he!==void 0?he:!0,passive:!Ae(a)}};Ut(g,"pointerdown",W,ie),Ut(w,"pointermove",le,ie),Ut(w,"pointerup",G,ie)}return{...Hy(E),position:E,isDragging:j(()=>!!I.value),style:j(()=>`
|
|
69
69
|
left: ${E.value.x}px;
|
|
70
70
|
top: ${E.value.y}px;
|
|
71
|
-
${
|
|
72
|
-
`)}}function ss(e,t,r={}){const{window:n=Ar,...s}=r;let i;const o=jp(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Oe(j(()=>{const c=Ae(e);return Array.isArray(c)?c.map(d=>Xt(d)):[Xt(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 Dn(u),{isSupported:o,stop:u}}function Xy(e={}){const{window:t=Ar}=e,r=t?.navigator,n=jp(()=>r&&"connection"in r),s=ut(!0),i=ut(!1),o=ut(void 0),a=ut(void 0),l=ut(void 0),u=ut(void 0),c=ut(void 0),d=ut(void 0),p=ut("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 y={passive:!0};return t&&(Ut(t,"offline",()=>{s.value=!1,o.value=Date.now()},y),Ut(t,"online",()=>{s.value=!0,a.value=Date.now()},y)),h&&Ut(h,"change",m,y),m(),{isSupported:n,isOnline:Ot(s),saveData:Ot(i),offlineAt:Ot(o),onlineAt:Ot(a),downlink:Ot(l),downlinkMax:Ot(u),effectiveType:Ot(d),rtt:Ot(c),type:Ot(p)}}var Ox=[{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 Os(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=ht(),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 y=x=>o?typeof o=="function"?o(x):Uy(x):x,T=()=>_y(e[t])?y(e[t]):c,v=x=>{d?d(x)&&h(m,x):h(m,x)};if(a){const x=F(T());let b=!1;return Oe(()=>e[t],C=>{b||(b=!0,x.value=y(C),Tt(()=>b=!1))}),Oe(x,C=>{!b&&(C!==e[t]||u)&&v(C)},{deep:u}),x}else return j({get(){return T()},set(x){v(x)}})}function Xl(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 Ql(e,t,r=".",n){if(!Xl(t))return Ql(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]]:Xl(o)&&Xl(s[i])?s[i]=Ql(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function ec(e){return(...t)=>t.reduce((r,n)=>Ql(r,n,"",e),{})}var zp=ec(),Hx=ec((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),Mx=ec((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),Qy=Iy(()=>{const e=F(new Map),t=F(),r=j(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=Uo({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??"",Gl&&s?.(),t.value=void 0};return Oe(r,(o,a)=>{if(!qt)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"?zp({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"),Gl&&(s=Ut(document,"touchmove",d=>eb(d),{passive:!1})),Tt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Kp(e){const t=Math.random().toString(36).substring(2,7),r=Qy();r.value.set(t,e??!1);const n=j({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return My(()=>{r.value.delete(t)}),n}function Wp(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:Wp(r)}}function eb(e){const t=e||window.event,r=t.target;return r instanceof Element&&Wp(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function tc(e){const t=Uo({dir:F("ltr")});return j(()=>e?.value||t.dir?.value||"ltr")}function Go(e){const t=ht(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[ps(bt(s))]=(...i)=>e(s,...i)}),n}var rc=0;function tb(){lt(e=>{if(!qt)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Gp()),document.body.insertAdjacentElement("beforeend",t[1]??Gp()),rc++,e(()=>{rc===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),rc--})})}function Gp(){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 Jp(e){return j(()=>Ae(e)?!!Xt(e)?.closest("form"):!0)}function $e(){const e=ht(),t=F(),r=j(()=>n());ai(()=>{r.value!==n()&&Tu(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:Xt(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 an(e){const t=ht(),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=Na(e);return j(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[bt(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function ln(e,t){const r=an(e),n=t?Go(t):{};return j(()=>({...r.value,...n}))}function rb(e,t){const r=Lp(!1,300);Dn(()=>{r.value=!1});const n=F(null),s=yy();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=sb(c,nb(c,u.getBoundingClientRect()),1),p=ib(l.getBoundingClientRect());n.value=ab([...d,...p]),r.value=!0}return lt(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)})}}),lt(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=!ob(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 nb(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 sb(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 ib(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 ob(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 ab(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),lb(t)}function lb(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 cb=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Hs=new WeakMap,Jo=new WeakMap,Yo={},nc=0,Yp=function(e){return e&&(e.host||Yp(e.parentNode))},ub=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Yp(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})},db=function(e,t,r,n){var s=ub(t,Array.isArray(e)?e:[e]);Yo[r]||(Yo[r]=new WeakMap);var i=Yo[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",y=(Hs.get(p)||0)+1,T=(i.get(p)||0)+1;Hs.set(p,y),i.set(p,T),o.push(p),y===1&&m&&Jo.set(p,!0),T===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(),nc++,function(){o.forEach(function(d){var p=Hs.get(d)-1,h=i.get(d)-1;Hs.set(d,p),i.set(d,h),p||(Jo.has(d)||d.removeAttribute(n),Jo.delete(d)),h||d.removeAttribute(r)}),nc--,nc||(Hs=new WeakMap,Hs=new WeakMap,Jo=new WeakMap,Yo={})}},fb=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||cb(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),db(n,s,r,"aria-hidden")):function(){return null}};function Zp(e){let t;Oe(()=>Xt(e),r=>{r?t=fb(r):t&&t()}),Vt(()=>{t&&t()})}var pb=0;function Ms(e,t="reka"){if(e)return e;let r;return"useId"in k0?r=Ju?.():r=Uo({useId:void 0}).useId?.()??`${++pb}`,t?`${t}-${r}`:r}function Xp(e){const t=F(),r=j(()=>t.value?.width??0),n=j(()=>t.value?.height??0);return Qe(()=>{const s=Xt(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 sc(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 Qp(e){const t=Lp("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=rr(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=gb(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 hb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function gb(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=hb(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 vb(e,t){const r=F({}),n=F("none"),s=F(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??Ar,{state:l,dispatch:u}=sc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=y=>{if(qt){const T=new CustomEvent(y,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(T)}};Oe(e,async(y,T)=>{const v=T!==y;if(await Tt(),v){const x=n.value,b=Zo(t.value);y?(u("MOUNT"),c("enter"),b==="none"&&c("after-enter")):b==="none"||b==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):T&&x!==b?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=y=>{const T=Zo(t.value),v=T.includes(CSS.escape(y.animationName)),x=l.value==="mounted"?"enter":"leave";if(y.target===t.value&&v&&(c(`after-${x}`),u("ANIMATION_END"),!s.value)){const b=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=a?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=b)})}y.target===t.value&&T==="none"&&u("ANIMATION_END")},p=y=>{y.target===t.value&&(n.value=Zo(t.value))},h=Oe(t,(y,T)=>{y?(r.value=getComputedStyle(y),y.addEventListener("animationstart",p),y.addEventListener("animationcancel",d),y.addEventListener("animationend",d)):(u("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),T?.removeEventListener("animationstart",p),T?.removeEventListener("animationcancel",d),T?.removeEventListener("animationend",d))},{immediate:!0}),m=Oe(l,()=>{const y=Zo(t.value);n.value=l.value==="mounted"?y:"none"});return Vt(()=>{h(),m()}),{isPresent:j(()=>["mounted","unmountSuspended"].includes(l.value))}}function Zo(e){return e&&getComputedStyle(e).animationName||"none"}var On=X({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=Ht(e),i=F(),{isPresent:o}=vb(n,i);r({present:o});let a=t.default({present:o.value});a=Wl(a||[]);const l=ht();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(`
|
|
71
|
+
${S?"text-wrap: nowrap;":""}
|
|
72
|
+
`)}}function ss(e,t,r={}){const{window:n=Ar,...s}=r;let i;const o=jp(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Oe(j(()=>{const c=Ae(e);return Array.isArray(c)?c.map(d=>Xt(d)):[Xt(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 Dn(u),{isSupported:o,stop:u}}function Xy(e={}){const{window:t=Ar}=e,r=t?.navigator,n=jp(()=>r&&"connection"in r),s=ut(!0),i=ut(!1),o=ut(void 0),a=ut(void 0),l=ut(void 0),u=ut(void 0),c=ut(void 0),d=ut(void 0),p=ut("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&&(Ut(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),Ut(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&Ut(h,"change",m,w),m(),{isSupported:n,isOnline:Ot(s),saveData:Ot(i),offlineAt:Ot(o),onlineAt:Ot(a),downlink:Ot(l),downlinkMax:Ot(u),effectiveType:Ot(d),rtt:Ot(c),type:Ot(p)}}var Ox=[{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 Os(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=ht(),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):Uy(C):C,T=()=>_y(e[t])?w(e[t]):c,g=C=>{d?d(C)&&h(m,C):h(m,C)};if(a){const C=F(T());let _=!1;return Oe(()=>e[t],S=>{_||(_=!0,C.value=w(S),Tt(()=>_=!1))}),Oe(C,S=>{!_&&(S!==e[t]||u)&&g(S)},{deep:u}),C}else return j({get(){return T()},set(C){g(C)}})}function Xl(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 Ql(e,t,r=".",n){if(!Xl(t))return Ql(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]]:Xl(o)&&Xl(s[i])?s[i]=Ql(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function ec(e){return(...t)=>t.reduce((r,n)=>Ql(r,n,"",e),{})}var zp=ec(),Hx=ec((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),Mx=ec((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),Qy=Iy(()=>{const e=F(new Map),t=F(),r=j(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=Ko({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??"",Gl&&s?.(),t.value=void 0};return Oe(r,(o,a)=>{if(!qt)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"?zp({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"),Gl&&(s=Ut(document,"touchmove",d=>eb(d),{passive:!1})),Tt(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Kp(e){const t=Math.random().toString(36).substring(2,7),r=Qy();r.value.set(t,e??!1);const n=j({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return My(()=>{r.value.delete(t)}),n}function Wp(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:Wp(r)}}function eb(e){const t=e||window.event,r=t.target;return r instanceof Element&&Wp(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function tc(e){const t=Ko({dir:F("ltr")});return j(()=>e?.value||t.dir?.value||"ltr")}function Yo(e){const t=ht(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[ps(bt(s))]=(...i)=>e(s,...i)}),n}var rc=0;function tb(){lt(e=>{if(!qt)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??Gp()),document.body.insertAdjacentElement("beforeend",t[1]??Gp()),rc++,e(()=>{rc===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),rc--})})}function Gp(){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 Jp(e){return j(()=>Ae(e)?!!Xt(e)?.closest("form"):!0)}function $e(){const e=ht(),t=F(),r=j(()=>n());ai(()=>{r.value!==n()&&Tu(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:Xt(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 an(e){const t=ht(),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=qa(e);return j(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[bt(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function ln(e,t){const r=an(e),n=t?Yo(t):{};return j(()=>({...r.value,...n}))}function rb(e,t){const r=Lp(!1,300);Dn(()=>{r.value=!1});const n=F(null),s=yy();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=sb(c,nb(c,u.getBoundingClientRect()),1),p=ib(l.getBoundingClientRect());n.value=ab([...d,...p]),r.value=!0}return lt(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)})}}),lt(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=!ob(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 nb(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 sb(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 ib(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 ob(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 ab(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),lb(t)}function lb(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 cb=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Hs=new WeakMap,Zo=new WeakMap,Xo={},nc=0,Yp=function(e){return e&&(e.host||Yp(e.parentNode))},ub=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Yp(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})},db=function(e,t,r,n){var s=ub(t,Array.isArray(e)?e:[e]);Xo[r]||(Xo[r]=new WeakMap);var i=Xo[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=(Hs.get(p)||0)+1,T=(i.get(p)||0)+1;Hs.set(p,w),i.set(p,T),o.push(p),w===1&&m&&Zo.set(p,!0),T===1&&p.setAttribute(r,"true"),m||p.setAttribute(n,"true")}catch(g){console.error("aria-hidden: cannot operate on ",p,g)}})};return c(t),a.clear(),nc++,function(){o.forEach(function(d){var p=Hs.get(d)-1,h=i.get(d)-1;Hs.set(d,p),i.set(d,h),p||(Zo.has(d)||d.removeAttribute(n),Zo.delete(d)),h||d.removeAttribute(r)}),nc--,nc||(Hs=new WeakMap,Hs=new WeakMap,Zo=new WeakMap,Xo={})}},fb=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||cb(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),db(n,s,r,"aria-hidden")):function(){return null}};function Zp(e){let t;Oe(()=>Xt(e),r=>{r?t=fb(r):t&&t()}),Vt(()=>{t&&t()})}var pb=0;function Ms(e,t="reka"){if(e)return e;let r;return"useId"in k0?r=Ju?.():r=Ko({useId:void 0}).useId?.()??`${++pb}`,t?`${t}-${r}`:r}function Xp(e){const t=F(),r=j(()=>t.value?.width??0),n=j(()=>t.value?.height??0);return Qe(()=>{const s=Xt(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 sc(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 Qp(e){const t=Lp("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=rr(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=gb(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 hb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function gb(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=hb(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 vb(e,t){const r=F({}),n=F("none"),s=F(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??Ar,{state:l,dispatch:u}=sc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=w=>{if(qt){const T=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(T)}};Oe(e,async(w,T)=>{const g=T!==w;if(await Tt(),g){const C=n.value,_=Qo(t.value);w?(u("MOUNT"),c("enter"),_==="none"&&c("after-enter")):_==="none"||_==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):T&&C!==_?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=w=>{const T=Qo(t.value),g=T.includes(CSS.escape(w.animationName)),C=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&g&&(c(`after-${C}`),u("ANIMATION_END"),!s.value)){const _=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",o=a?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=_)})}w.target===t.value&&T==="none"&&u("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=Qo(t.value))},h=Oe(t,(w,T)=>{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),T?.removeEventListener("animationstart",p),T?.removeEventListener("animationcancel",d),T?.removeEventListener("animationend",d))},{immediate:!0}),m=Oe(l,()=>{const w=Qo(t.value);n.value=l.value==="mounted"?w:"none"});return Vt(()=>{h(),m()}),{isPresent:j(()=>["mounted","unmountSuspended"].includes(l.value))}}function Qo(e){return e&&getComputedStyle(e).animationName||"none"}var On=X({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=Ht(e),i=F(),{isPresent:o}=vb(n,i);r({present:o});let a=t.default({present:o.value});a=Wl(a||[]);const l=ht();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?dr(t.default({present:o.value})[0],{ref:u=>{const c=Xt(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),ic=X({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=Wl(r.default()),s=n.findIndex(l=>l.type!==pt);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?we(t,i.props):t,a=xr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),mb=["area","img","input"],We=X({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"&&mb.includes(n)?()=>dr(n,t):n!=="template"?()=>dr(e.as,t,{default:r.default}):()=>dr(ic,t,{default:r.default})}});function oc(){const e=F();return{primitiveElement:e,currentElement:j(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:Xt(e))}}var[Hn,wb]=Nt("DialogRoot"),yb=X({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=Os(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=F(),i=F(),{modal:o}=Ht(r);return wb({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)=>se(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),bb=X({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;$e();const r=Hn();return(n,s)=>(R(),K(f(We),we(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["type"]))}}),_b="dismissableLayer.pointerDownOutside",Sb="dismissableLayer.focusOutside";function eh(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 lt(o=>{if(!qt||!Ae(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(eh(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){zl(_b,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:()=>{Ae(r)&&(s.value=!0)}}}function xb(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1);return lt(i=>{if(!qt||!Ae(r))return;const o=async a=>{if(!t?.value)return;await Tt(),await Tt();const l=a.target;!t.value||!l||eh(t.value,l)||a.target&&!s.value&&zl(Sb,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{Ae(r)&&(s.value=!0)},onBlurCapture:()=>{Ae(r)&&(s.value=!1)}}}var vr=zr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),ac=X({__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}=$e(),o=j(()=>i.value?.ownerDocument??globalThis.document),a=j(()=>vr.layersRoot),l=j(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=j(()=>vr.layersWithOutsidePointerEventsDisabled.size>0),c=j(()=>{const h=Array.from(a.value),[m]=[...vr.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(m);return l.value>=y}),d=Cb(async h=>{const m=[...vr.branches].some(y=>y?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await Tt(),h.defaultPrevented||n("dismiss"))},i),p=xb(h=>{[...vr.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return jy("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),lt(h=>{i.value&&(r.disableOutsidePointerEvents&&(vr.layersWithOutsidePointerEventsDisabled.size===0&&(vr.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),vr.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&vr.layersWithOutsidePointerEventsDisabled.size===1&&!Kl(vr.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=vr.originalBodyPointerEvents)}))}),lt(h=>{h(()=>{i.value&&(a.value.delete(i.value),vr.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>(R(),K(f(We),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:xt({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:k(()=>[se(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Tb=by(()=>F([]));function Eb(){const e=Tb();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=th(e.value,t),e.value.unshift(t)},remove(t){e.value=th(e.value,t),e.value[0]?.resume()}}}function th(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var lc="focusScope.autoFocusOnMount",cc="focusScope.autoFocusOnUnmount",rh={bubbles:!1,cancelable:!0};function Ab(e,{select:t=!1}={}){const r=rr();for(const n of e)if(Mn(n,{select:t}),rr()!==r)return!0}function kb(e){const t=nh(e);return[sh(t,e),sh(t.reverse(),e)]}function nh(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 sh(e,t){for(const r of e)if(!Rb(r,{upTo:t}))return r}function Rb(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 Ib(e){return e instanceof HTMLInputElement&&"select"in e}function Mn(e,{select:t=!1}={}){if(e&&e.focus){const r=rr();e.focus({preventScroll:!0}),e!==r&&Ib(e)&&t&&e.select()}}var ih=X({__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}=$e(),o=F(null),a=Eb(),l=zr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});lt(c=>{if(!qt)return;const d=i.value;if(!r.trapped)return;function p(T){if(l.paused||!d)return;const v=T.target;d.contains(v)?o.value=v:Mn(o.value,{select:!0})}function h(T){if(l.paused||!d)return;const v=T.relatedTarget;v!==null&&(d.contains(v)||Mn(o.value,{select:!0}))}function m(T){d.contains(o.value)||Mn(d)}document.addEventListener("focusin",p),document.addEventListener("focusout",h);const y=new MutationObserver(m);d&&y.observe(d,{childList:!0,subtree:!0}),c(()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",h),y.disconnect()})}),lt(async c=>{const d=i.value;if(await Tt(),!d)return;a.add(l);const p=rr();if(!d.contains(p)){const h=new CustomEvent(lc,rh);d.addEventListener(lc,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(Ab(nh(d),{select:!0}),rr()===p&&Mn(d))}c(()=>{d.removeEventListener(lc,y=>n("mountAutoFocus",y));const h=new CustomEvent(cc,rh),m=y=>{n("unmountAutoFocus",y)};d.addEventListener(cc,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Mn(p??document.body,{select:!0}),d.removeEventListener(cc,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=rr();if(d&&p){const h=c.currentTarget,[m,y]=kb(h);m&&y?!c.shiftKey&&p===y?(c.preventDefault(),r.loop&&Mn(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&Mn(y,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>(R(),K(f(We),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:k(()=>[se(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),oh=["Enter"," "],$b=["ArrowDown","PageUp","Home"],Pb=["ArrowUp","PageDown","End"],Nx=[...$b,...Pb],qx={ltr:[...oh,"ArrowRight"],rtl:[...oh,"ArrowLeft"]};function Db(e){return e?"open":"closed"}function ah(e){const t=rr();for(const r of e)if(r===t||(r.focus(),rr()!==t))return}var lh=X({__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=Hn(),{forwardRef:i,currentElement:o}=$e();return s.titleId||(s.titleId=Ms(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=Ms(void 0,"reka-dialog-description")),Qe(()=>{s.contentElement=o,rr()!==document.body&&(s.triggerElement.value=rr())}),(a,l)=>(R(),K(f(ih),{"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(()=>[D(f(ac),we({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(Db)(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(()=>[se(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Ob=X({__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=Hn(),i=Go(n),{forwardRef:o,currentElement:a}=$e();return Zp(a),(l,u)=>(R(),K(lh,we({...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(()=>[se(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),Hb=X({__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=Go(t);$e();const s=Hn(),i=F(!1),o=F(!1);return(a,l)=>(R(),K(lh,we({...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(()=>[se(a.$slots,"default")]),_:3},16))}}),Mb=X({__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=Hn(),i=Go(n),{forwardRef:o}=$e();return(a,l)=>(R(),K(f(On),{present:a.forceMount||f(s).open.value},{default:k(()=>[f(s).modal.value?(R(),K(Ob,we({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[se(a.$slots,"default")]),_:3},16)):(R(),K(Hb,we({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[se(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Nb=X({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Hn();return Kp(!0),$e(),(r,n)=>(R(),K(f(We),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:k(()=>[se(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),qb=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Hn(),{forwardRef:r}=$e();return(n,s)=>f(t)?.modal.value?(R(),K(f(On),{key:0,present:n.forceMount||f(t).open.value},{default:k(()=>[D(Nb,we(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Ne("v-if",!0)}}),uc=X({__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=Zl();return(r,n)=>f(t)||r.forceMount?(R(),K(Fa,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[se(r.$slots,"default")],8,["to","disabled","defer"])):Ne("v-if",!0)}}),Bb=X({__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)=>(R(),K(f(uc),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),Lb=X({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=Hn();return $e(),(n,s)=>(R(),K(f(We),we(t,{id:f(r).titleId}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["id"]))}}),ch="data-reka-collection-item";function cn(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:F(),itemMap:F(new Map)},Wn(n,s)):s=Ft(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${ch}]`)),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=X({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=oc();return Oe(p,()=>{s.collectionRef.value=p.value}),()=>dr(ic,{ref:d,...c},u)}}),a=X({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=oc();return lt(h=>{if(p.value){const m=Ha(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>dr(ic,{...c,[ch]:"",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 dc=X({__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)=>(R(),K(f(We),{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(()=>[se(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),uh=X({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}=oc();return Oe(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)=>(R(),K(dc,we({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),Fb=X({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)=>(R(),Se(Ke,null,[Ne(" We render single input if it's required "),r.value?(R(),K(uh,we({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(R(!0),Se(Ke,{key:1},cr(n.value,o=>(R(),K(uh,we({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[dh,Vb]=Nt("PopperRoot"),fh=X({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=F();return Vb({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>se(r.$slots,"default")}}),ph=X({__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}=$e(),s=dh();return Ba(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>(R(),K(f(We),{ref:f(r),as:i.as,"as-child":i.asChild},{default:k(()=>[se(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),jb={key:0,d:"M0 0L6 6L12 0"},Ub={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},zb=X({__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 $e(),(r,n)=>(R(),K(f(We),we(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:k(()=>[se(r.$slots,"default",{},()=>[r.rounded?(R(),Se("path",Ub)):(R(),Se("path",jb))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function Kb(e){return e!==null}function Wb(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]=fc(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 fc(e){const[t,r="center"]=e.split("-");return[t,r]}var Gb=["top","right","bottom","left"],Nn=Math.min,nr=Math.max,Xo=Math.round,Qo=Math.floor,Nr=e=>({x:e,y:e}),Jb={left:"right",right:"left",bottom:"top",top:"bottom"};function pc(e,t,r){return nr(e,Nn(t,r))}function un(e,t){return typeof e=="function"?e(t):e}function dn(e){return e.split("-")[0]}function Ns(e){return e.split("-")[1]}function hc(e){return e==="x"?"y":"x"}function gc(e){return e==="y"?"height":"width"}function qr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function vc(e){return hc(qr(e))}function Yb(e,t,r){r===void 0&&(r=!1);const n=Ns(e),s=vc(e),i=gc(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=ea(o)),[o,ea(o)]}function Zb(e){const t=ea(e);return[mc(e),t,mc(t)]}function mc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var hh=["left","right"],gh=["right","left"],Xb=["top","bottom"],Qb=["bottom","top"];function e1(e,t,r){switch(e){case"top":case"bottom":return r?t?gh:hh:t?hh:gh;case"left":case"right":return t?Xb:Qb;default:return[]}}function t1(e,t,r,n){const s=Ns(e);let i=e1(dn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(mc)))),i}function ea(e){const t=dn(e);return Jb[t]+e.slice(t.length)}function r1(e){return{top:0,right:0,bottom:0,left:0,...e}}function vh(e){return typeof e!="number"?r1(e):{top:e,right:e,bottom:e,left:e}}function ta(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 mh(e,t,r){let{reference:n,floating:s}=e;const i=qr(t),o=vc(t),a=gc(o),l=dn(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(Ns(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 n1(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}=un(t,e),m=vh(h),y=a[p?d==="floating"?"reference":"floating":d],T=ta(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.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,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=ta(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:l}):v);return{top:(T.top-C.top+m.top)/b.y,bottom:(C.bottom-T.bottom+m.bottom)/b.y,left:(T.left-C.left+m.left)/b.x,right:(C.right-T.right+m.right)/b.x}}var s1=50,i1=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:n1},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}=mh(u,n,l),p=n,h=0;const m={};for(let y=0;y<i.length;y++){const T=i[y];if(!T)continue;const{name:v,fn:x}=T,{x:b,y:C,data:E,reset:I}=await x({x:c,y:d,initialPlacement:n,placement:p,strategy:s,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});c=b??c,d=C??d,m[v]={...m[v],...E},I&&h<s1&&(h++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(u=I.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):I.rects),{x:c,y:d}=mh(u,p,l)),y=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},o1=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}=un(e,t)||{};if(u==null)return{};const d=vh(c),p={x:r,y:n},h=vc(s),m=gc(h),y=await o.getDimensions(u),T=h==="y",v=T?"top":"left",x=T?"bottom":"right",b=T?"clientHeight":"clientWidth",C=i.reference[m]+i.reference[h]-p[h]-i.floating[m],E=p[h]-i.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let M=I?I[b]:0;(!M||!await(o.isElement==null?void 0:o.isElement(I)))&&(M=a.floating[b]||i.floating[m]);const g=C/2-E/2,H=M/2-y[m]/2-1,N=Nn(d[v],H),_=Nn(d[x],H),w=N,S=M-y[m]-_,O=M/2-y[m]/2+g,q=pc(w,O,S),B=!l.arrow&&Ns(s)!=null&&O!==q&&i.reference[m]/2-(O<w?N:_)-y[m]/2<0,Z=B?O<w?O-w:O-S:0;return{[h]:p[h]+Z,data:{[h]:q,centerOffset:O-q-Z,...B&&{alignmentOffset:Z}},reset:B}}}),a1=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:y=!0,...T}=un(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const v=dn(s),x=qr(a),b=dn(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=p||(b||!y?[ea(a)]:Zb(a)),I=m!=="none";!p&&I&&E.push(...t1(a,y,m,C));const M=[a,...E],g=await l.detectOverflow(t,T),H=[];let N=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&H.push(g[v]),d){const O=Yb(s,o,C);H.push(g[O[0]],g[O[1]])}if(N=[...N,{placement:s,overflows:H}],!H.every(O=>O<=0)){var _,w;const O=(((_=i.flip)==null?void 0:_.index)||0)+1,q=M[O];if(q&&(!(d==="alignment"&&x!==qr(q))||N.every(Z=>qr(Z.placement)===x?Z.overflows[0]>0:!0)))return{data:{index:O,overflows:N},reset:{placement:q}};let B=(w=N.filter(Z=>Z.overflows[0]<=0).sort((Z,W)=>Z.overflows[1]-W.overflows[1])[0])==null?void 0:w.placement;if(!B)switch(h){case"bestFit":{var S;const Z=(S=N.filter(W=>{if(I){const le=qr(W.placement);return le===x||le==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(le=>le>0).reduce((le,G)=>le+G,0)]).sort((W,le)=>W[1]-le[1])[0])==null?void 0:S[0];Z&&(B=Z);break}case"initialPlacement":B=a;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function wh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yh(e){return Gb.some(t=>e[t]>=0)}var l1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=un(e,t);switch(s){case"referenceHidden":{const o=wh(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:yh(o)}}}case"escaped":{const o=wh(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:yh(o)}}}default:return{}}}}},bh=new Set(["left","top"]);async function c1(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=dn(r),a=Ns(r),l=qr(r)==="y",u=bh.has(o)?-1:1,c=i&&l?-1:1,d=un(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 u1=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 c1(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}}}}},d1=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,y:b}=v;return{x,y:b}}},...u}=un(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=qr(dn(s)),h=hc(p);let m=c[h],y=c[p];if(o){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=m+d[v],C=m-d[x];m=pc(b,m,C)}if(a){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",b=y+d[v],C=y-d[x];y=pc(b,y,C)}const T=l.fn({...t,[h]:m,[p]:y});return{...T,data:{x:T.x-r,y:T.y-n,enabled:{[h]:o,[p]:a}}}}}},f1=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}=un(e,t),c={x:r,y:n},d=qr(s),p=hc(d);let h=c[p],m=c[d];const y=un(a,t),T=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const b=p==="y"?"height":"width",C=i.reference[p]-i.floating[b]+T.mainAxis,E=i.reference[p]+i.reference[b]-T.mainAxis;h<C?h=C:h>E&&(h=E)}if(u){var v,x;const b=p==="y"?"width":"height",C=bh.has(dn(s)),E=i.reference[d]-i.floating[b]+(C&&((v=o.offset)==null?void 0:v[d])||0)+(C?0:T.crossAxis),I=i.reference[d]+i.reference[b]+(C?0:((x=o.offset)==null?void 0:x[d])||0)-(C?T.crossAxis:0);m<E?m=E:m>I&&(m=I)}return{[p]:h,[d]:m}}}},p1=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}=un(e,t),c=await o.detectOverflow(t,u),d=dn(s),p=Ns(s),h=qr(s)==="y",{width:m,height:y}=i.floating;let T,v;d==="top"||d==="bottom"?(T=d,v=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,T=p==="end"?"top":"bottom");const x=y-c.top-c.bottom,b=m-c.left-c.right,C=Nn(y-c[T],x),E=Nn(m-c[v],b),I=!t.middlewareData.shift;let M=C,g=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(g=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(M=x),I&&!p){const N=nr(c.left,0),_=nr(c.right,0),w=nr(c.top,0),S=nr(c.bottom,0);h?g=m-2*(N!==0||_!==0?N+_:nr(c.left,c.right)):M=y-2*(w!==0||S!==0?w+S:nr(c.top,c.bottom))}await l({...t,availableWidth:g,availableHeight:M});const H=await o.getDimensions(a.floating);return m!==H.width||y!==H.height?{reset:{rects:!0}}:{}}}};function ra(){return typeof window<"u"}function is(e){return wc(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Br(e){var t;return(t=(wc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wc(e){return ra()?e instanceof Node||e instanceof sr(e).Node:!1}function kr(e){return ra()?e instanceof Element||e instanceof sr(e).Element:!1}function fn(e){return ra()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function _h(e){return!ra()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}function Ai(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function h1(e){return/^(table|td|th)$/.test(is(e))}function na(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var g1=/transform|translate|scale|rotate|perspective|filter/,v1=/paint|layout|strict|content/,os=e=>!!e&&e!=="none",yc;function bc(e){const t=kr(e)?Rr(e):e;return os(t.transform)||os(t.translate)||os(t.scale)||os(t.rotate)||os(t.perspective)||!_c()&&(os(t.backdropFilter)||os(t.filter))||g1.test(t.willChange||"")||v1.test(t.contain||"")}function m1(e){let t=qn(e);for(;fn(t)&&!qs(t);){if(bc(t))return t;if(na(t))return null;t=qn(t)}return null}function _c(){return yc==null&&(yc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yc}function qs(e){return/^(html|body|#document)$/.test(is(e))}function Rr(e){return sr(e).getComputedStyle(e)}function sa(e){return kr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qn(e){if(is(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_h(e)&&e.host||Br(e);return _h(t)?t.host:t}function Sh(e){const t=qn(e);return qs(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&Ai(t)?t:Sh(t)}function ki(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Sh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=sr(s);if(i){const a=Sc(o);return t.concat(o,o.visualViewport||[],Ai(s)?s:[],a&&r?ki(a):[])}else return t.concat(s,ki(s,[],r))}function Sc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ch(e){const t=Rr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=fn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=Xo(r)!==i||Xo(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Cc(e){return kr(e)?e:e.contextElement}function Bs(e){const t=Cc(e);if(!fn(t))return Nr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Ch(t);let o=(i?Xo(r.width):r.width)/n,a=(i?Xo(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var w1=Nr(0);function xh(e){const t=sr(e);return!_c()||!t.visualViewport?w1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function y1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==sr(e)?!1:t}function as(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Cc(e);let o=Nr(1);t&&(n?kr(n)&&(o=Bs(n)):o=Bs(e));const a=y1(i,r,n)?xh(i):Nr(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=sr(i),h=n&&kr(n)?sr(n):n;let m=p,y=Sc(m);for(;y&&n&&h!==m;){const T=Bs(y),v=y.getBoundingClientRect(),x=Rr(y),b=v.left+(y.clientLeft+parseFloat(x.paddingLeft))*T.x,C=v.top+(y.clientTop+parseFloat(x.paddingTop))*T.y;l*=T.x,u*=T.y,c*=T.x,d*=T.y,l+=b,u+=C,m=sr(y),y=Sc(m)}}return ta({width:c,height:d,x:l,y:u})}function ia(e,t){const r=sa(e).scrollLeft;return t?t.left+r:as(Br(e)).left+r}function Th(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-ia(e,r),y:r.top+t.scrollTop}}function b1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Br(n),a=t?na(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Nr(1);const c=Nr(0),d=fn(n);if((d||!d&&!i)&&((is(n)!=="body"||Ai(o))&&(l=sa(n)),d)){const h=as(n);u=Bs(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?Th(o,l):Nr(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 _1(e){return Array.from(e.getClientRects())}function S1(e){const t=Br(e),r=sa(e),n=e.ownerDocument.body,s=nr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=nr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+ia(e);const a=-r.scrollTop;return Rr(n).direction==="rtl"&&(o+=nr(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var Eh=25;function C1(e,t){const r=sr(e),n=Br(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=_c();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=ia(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<=Eh&&(i-=m)}else u<=Eh&&(i+=u);return{width:i,height:o,x:a,y:l}}function x1(e,t){const r=as(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=fn(e)?Bs(e):Nr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function Ah(e,t,r){let n;if(t==="viewport")n=C1(e,r);else if(t==="document")n=S1(Br(e));else if(kr(t))n=x1(t,r);else{const s=xh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ta(n)}function kh(e,t){const r=qn(e);return r===t||!kr(r)||qs(r)?!1:Rr(r).position==="fixed"||kh(r,t)}function T1(e,t){const r=t.get(e);if(r)return r;let n=ki(e,[],!1).filter(a=>kr(a)&&is(a)!=="body"),s=null;const i=Rr(e).position==="fixed";let o=i?qn(e):e;for(;kr(o)&&!qs(o);){const a=Rr(o),l=bc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||Ai(o)&&!l&&kh(e,o))?n=n.filter(u=>u!==o):s=a,o=qn(o)}return t.set(e,n),n}function E1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?na(t)?[]:T1(t,this._c):[].concat(r),n],o=Ah(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=Ah(t,i[d],s);a=nr(p.top,a),l=Nn(p.right,l),u=Nn(p.bottom,u),c=nr(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function A1(e){const{width:t,height:r}=Ch(e);return{width:t,height:r}}function k1(e,t,r){const n=fn(t),s=Br(t),i=r==="fixed",o=as(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Nr(0);function u(){l.x=ia(s)}if(n||!n&&!i)if((is(t)!=="body"||Ai(s))&&(a=sa(t)),n){const d=as(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?Th(s,a):Nr(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 xc(e){return Rr(e).position==="static"}function Rh(e,t){if(!fn(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Br(e)===r&&(r=r.ownerDocument.body),r}function Ih(e,t){const r=sr(e);if(na(e))return r;if(!fn(e)){let s=qn(e);for(;s&&!qs(s);){if(kr(s)&&!xc(s))return s;s=qn(s)}return r}let n=Rh(e,t);for(;n&&h1(n)&&xc(n);)n=Rh(n,t);return n&&qs(n)&&xc(n)&&!bc(n)?r:n||m1(e)||r}var R1=async function(e){const t=this.getOffsetParent||Ih,r=this.getDimensions,n=await r(e.floating);return{reference:k1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function I1(e){return Rr(e).direction==="rtl"}var $1={convertOffsetParentRelativeRectToViewportRelativeRect:b1,getDocumentElement:Br,getClippingRect:E1,getOffsetParent:Ih,getElementRects:R1,getClientRects:_1,getDimensions:A1,getScale:Bs,isElement:kr,isRTL:I1};function $h(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function P1(e,t){let r=null,n;const s=Br(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=Qo(d),y=Qo(s.clientWidth-(c+p)),T=Qo(s.clientHeight-(d+h)),v=Qo(c),x={rootMargin:-m+"px "+-y+"px "+-T+"px "+-v+"px",threshold:nr(0,Nn(1,l))||1};let b=!0;function C(E){const I=E[0].intersectionRatio;if(I!==l){if(!b)return o();I?o(!1,I):n=setTimeout(()=>{o(!1,1e-7)},1e3)}I===1&&!$h(u,e.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(C,{...x,root:s.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}return o(!0),i}function D1(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=Cc(e),c=s||i?[...u?ki(u):[],...t?ki(t):[]]:[];c.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});const d=u&&a?P1(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),r()}),u&&!l&&h.observe(u),t&&h.observe(t));let m,y=l?as(e):null;l&&T();function T(){const v=as(e);y&&!$h(y,v)&&r(),y=v,m=requestAnimationFrame(T)}return r(),()=>{var v;c.forEach(x=>{s&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),d?.(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var O1=u1,H1=d1,Ph=a1,M1=p1,N1=l1,q1=o1,B1=f1,L1=(e,t,r)=>{const n=new Map,s={platform:$1,...r},i={...s.platform,_c:n};return i1(e,t,{...s,platform:i})};function F1(e){return e!=null&&typeof e=="object"&&"$el"in e}function Tc(e){if(F1(e)){const t=e.$el;return wc(t)&&is(t)==="#comment"?null:t}return e}function Ls(e){return typeof e=="function"?e():f(e)}function V1(e){return{name:"arrow",options:e,fn(t){const r=Tc(Ls(e.element));return r==null?{}:q1({element:r,padding:e.padding}).fn(t)}}}function Dh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oh(e,t){const r=Dh(e);return Math.round(t*r)/r}function j1(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=j(()=>{var M;return(M=Ls(r.open))!=null?M:!0}),i=j(()=>Ls(r.middleware)),o=j(()=>{var M;return(M=Ls(r.placement))!=null?M:"bottom"}),a=j(()=>{var M;return(M=Ls(r.strategy))!=null?M:"absolute"}),l=j(()=>{var M;return(M=Ls(r.transform))!=null?M:!0}),u=j(()=>Tc(e.value)),c=j(()=>Tc(t.value)),d=F(0),p=F(0),h=F(a.value),m=F(o.value),y=ut({}),T=F(!1),v=j(()=>{const M={position:h.value,left:"0",top:"0"};if(!c.value)return M;const g=Oh(c.value,d.value),H=Oh(c.value,p.value);return l.value?{...M,transform:"translate("+g+"px, "+H+"px)",...Dh(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:g+"px",top:H+"px"}});let x;function b(){if(u.value==null||c.value==null)return;const M=s.value;L1(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,y.value=g.middlewareData,T.value=M!==!1})}function C(){typeof x=="function"&&(x(),x=void 0)}function E(){if(C(),n===void 0){b();return}if(u.value!=null&&c.value!=null){x=n(u.value,c.value,b);return}}function I(){s.value||(T.value=!1)}return Oe([i,o,a,s],b,{flush:"sync"}),Oe([u,c],E,{flush:"sync"}),Oe(s,I,{flush:"sync"}),Fi()&&Ta(C),{x:Kr(d),y:Kr(p),strategy:Kr(h),placement:Kr(m),middlewareData:Kr(y),isPositioned:Kr(T),floatingStyles:v,update:b}}var U1={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},[z1,K1]=Nt("PopperContent"),Hh=X({inheritAttrs:!1,__name:"PopperContent",props:fd({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}},{...U1}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=dh(),{forwardRef:i,currentElement:o}=$e(),a=F(),l=F(),{width:u,height:c}=Xp(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(Kb),altBoundary:h.value.length>0})),y=j(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),T=wy(()=>[O1({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&Ph({...m.value,...y.value}),r.avoidCollisions&&H1({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?B1():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&Ph({...m.value,...y.value}),M1({...m.value,apply:({elements:N,rects:_,availableWidth:w,availableHeight:S})=>{const{width:O,height:q}=_.reference,B=N.floating.style;B.setProperty("--reka-popper-available-width",`${w}px`),B.setProperty("--reka-popper-available-height",`${S}px`),B.setProperty("--reka-popper-anchor-width",`${O}px`),B.setProperty("--reka-popper-anchor-height",`${q}px`)}}),l.value&&V1({element:l.value,padding:r.arrowPadding}),Wb({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&N1({strategy:"referenceHidden",...m.value})]),{floatingStyles:v,placement:x,isPositioned:b,middlewareData:C,update:E}=j1(j(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...N)=>D1(...N,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:T}),I=j(()=>fc(x.value)[0]),M=j(()=>fc(x.value)[1]);Ba(()=>{b.value&&n("placed")});const g=j(()=>{const N=C.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&N}),H=F("");return lt(()=>{o.value&&(H.value=window.getComputedStyle(o.value).zIndex)}),K1({placedSide:I,onArrowChange:N=>l.value=N,arrowX:j(()=>C.value.arrow?.x??0),arrowY:j(()=>C.value.arrow?.y??0),shouldHideArrow:g}),(N,_)=>(R(),Se("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:xt({...f(v),transform:f(b)?f(v).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H.value,"--reka-popper-transform-origin":[f(C).transformOrigin?.x,f(C).transformOrigin?.y].join(" "),...f(C).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[D(f(We),we({ref:f(i)},N.$attrs,{"as-child":r.asChild,as:N.as,"data-side":I.value,"data-align":M.value,style:{animation:f(b)?void 0:"none"}}),{default:k(()=>[se(N.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),W1={top:"bottom",right:"left",bottom:"top",left:"right"},G1=X({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}=$e(),r=z1(),n=j(()=>W1[r.placedSide.value]);return(s,i)=>(R(),Se("span",{ref:o=>{f(r).onArrowChange(o)},style:xt({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})},[D(zb,we(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(()=>[se(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function Mh(e){const t=Uo({nonce:F()});return j(()=>e?.value||t.nonce?.value)}function J1(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function Nh(e,t,r){return Ei(100/(r-t)*(e-t),0,100)}function Y1(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Z1(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 X1(e,t,r){const n=e/2;return(n-Ec([0,50],[0,n])(t)*r)*r}function Q1(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function e2(e,t){if(t>0){const r=Q1(e);return Math.min(...r)>=t}return!0}function Ec(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 t2(e){return(String(e).split(".")[1]||"").length}function r2(e,t){const r=10**t;return Math.round(e*r)/r}var qh=["PageUp","PageDown"],Bh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Lh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[Fh,Vh]=Nt(["SliderVertical","SliderHorizontal"]),n2=X({__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}=Ht(r),{forwardRef:l,currentElement:u}=$e(),c=Fs(),d=F(),p=F(),h=j(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(y,T){const v=p.value||u.value.getBoundingClientRect(),x=[...c.thumbElements.value][c.valueIndexToChangeRef.value],b=c.thumbAlignment.value==="contain"?x.clientWidth:0;!d.value&&!T&&c.thumbAlignment.value==="contain"&&(d.value=y.clientX-x.getBoundingClientRect().left);const C=Ec([0,v.width-b],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=v,C(T?y.clientX-v.left-b/2:y.clientX-v.left-(d.value??0))}return Vh({startEdge:j(()=>h.value?"left":"right"),endEdge:j(()=>h.value?"right":"left"),direction:j(()=>h.value?1:-1),size:"width"}),(y,T)=>(R(),K(jh,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:xt({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:T[0]||(T[0]=v=>{n("slideStart",m(v,!0))}),onSlideMove:T[1]||(T[1]=v=>{n("slideMove",m(v))}),onSlideEnd:T[2]||(T[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:T[3]||(T[3]=v=>{const x=h.value?"from-left":"from-right";n("stepKeyDown",v,f(Lh)[x].includes(v.key)?-1:1)}),onEndKeyDown:T[4]||(T[4]=v=>n("endKeyDown",v)),onHomeKeyDown:T[5]||(T[5]=v=>n("homeKeyDown",v))},{default:k(()=>[se(y.$slots,"default")]),_:3},8,["dir","style"]))}}),s2=X({__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}=Ht(r),a=Fs(),{forwardRef:l,currentElement:u}=$e(),c=F(),d=F(),p=j(()=>!o.value);function h(m,y){const T=d.value||u.value.getBoundingClientRect(),v=[...a.thumbElements.value][a.valueIndexToChangeRef.value],x=a.thumbAlignment.value==="contain"?v.clientHeight:0;!c.value&&!y&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-v.getBoundingClientRect().top);const b=Ec([0,T.height-x],p.value?[s.value,i.value]:[i.value,s.value]),C=y?m.clientY-T.top-x/2:m.clientY-T.top-(c.value??0);return d.value=T,b(C)}return Vh({startEdge:j(()=>p.value?"bottom":"top"),endEdge:j(()=>p.value?"top":"bottom"),direction:j(()=>p.value?1:-1),size:"height"}),(m,y)=>(R(),K(jh,{ref:f(l),"data-orientation":"vertical",style:xt({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:y[0]||(y[0]=T=>{n("slideStart",h(T,!0))}),onSlideMove:y[1]||(y[1]=T=>{n("slideMove",h(T))}),onSlideEnd:y[2]||(y[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:y[3]||(y[3]=T=>{const v=p.value?"from-bottom":"from-top";n("stepKeyDown",T,f(Lh)[v].includes(T.key)?-1:1)}),onEndKeyDown:y[4]||(y[4]=T=>n("endKeyDown",T)),onHomeKeyDown:y[5]||(y[5]=T=>n("homeKeyDown",T))},{default:k(()=>[se(m.$slots,"default")]),_:3},8,["style"]))}}),[Fs,i2]=Nt("SliderRoot"),o2=X({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}=Ht(r),p=tc(d),{forwardRef:h,currentElement:m}=$e(),y=Jp(m),{CollectionSlot:T}=cn({isProvider:!0}),v=Os(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),x=j(()=>Array.isArray(v.value)?[...v.value]:[]),b=F(0),C=F(x.value);function E(N){g(N,Z1(x.value,N))}function I(N){g(N,b.value)}function M(){const N=C.value[b.value];x.value[b.value]!==N&&n("valueCommit",ze(x.value))}function g(N,_,{commit:w}={commit:!1}){const S=t2(o.value),O=Ei(r2(Math.round((N-s.value)/o.value)*o.value+s.value,S),s.value,i.value),q=J1(x.value,O,_);if(e2(q,a.value*o.value)){b.value=q.indexOf(O);const B=String(q)!==String(v.value);B&&w&&n("valueCommit",q),B&&(H.value[b.value]?.focus(),v.value=q)}}const H=F([]);return i2({modelValue:v,currentModelValue:x,valueIndexToChangeRef:b,thumbElements:H,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(N,_)=>(R(),K(f(T),null,{default:k(()=>[(R(),K(li(f(l)==="horizontal"?n2:s2),we(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:_[0]||(_[0]=()=>{f(u)||(C.value=x.value)}),onSlideStart:_[1]||(_[1]=w=>!f(u)&&E(w)),onSlideMove:_[2]||(_[2]=w=>!f(u)&&I(w)),onSlideEnd:_[3]||(_[3]=w=>!f(u)&&M()),onHomeKeyDown:_[4]||(_[4]=w=>!f(u)&&g(f(s),0,{commit:!0})),onEndKeyDown:_[5]||(_[5]=w=>!f(u)&&g(f(i),x.value.length-1,{commit:!0})),onStepKeyDown:_[6]||(_[6]=(w,S)=>{if(!f(u)){const O=f(qh).includes(w.key)||w.shiftKey&&f(Bh).includes(w.key)?10:1,q=b.value,B=x.value[q];g(B+f(o)*O*S,q,{commit:!0})}})}),{default:k(()=>[se(N.$slots,"default",{modelValue:f(v)}),f(y)&&N.name?(R(),K(f(Fb),{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"])):Ne("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),jh=X({__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=Fs();return(i,o)=>(R(),K(f(We),we({"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(qh).concat(f(Bh)).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(()=>[se(i.$slots,"default")]),_:3},16))}}),a2=X({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Fs(),r=Fh();$e();const n=j(()=>t.currentModelValue.value.map(o=>Nh(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)=>(R(),K(f(We),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:xt({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:k(()=>[se(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),l2=X({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=Fs(),n=Fh(),{forwardRef:s,currentElement:i}=$e(),{CollectionItem:o}=cn(),a=j(()=>r.modelValue?.value?.[t.index]),l=j(()=>a.value===void 0?0:Nh(a.value,r.min.value??0,r.max.value??100)),u=j(()=>Y1(t.index,r.modelValue?.value?.length??0)),c=Xp(i),d=j(()=>c[n.size].value),p=j(()=>r.thumbAlignment.value==="overflow"||!d.value?0:X1(d.value,l.value,n.direction.value)),h=Zl();return Qe(()=>{r.thumbElements.value.push(i.value)}),Vt(()=>{const m=r.thumbElements.value.findIndex(y=>y===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,y)=>(R(),K(f(o),null,{default:k(()=>[D(f(We),we(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:y[0]||(y[0]=()=>{f(r).valueIndexToChangeRef.value=m.index})}),{default:k(()=>[se(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}))}}),c2=X({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=cn(),{forwardRef:n,currentElement:s}=$e(),i=j(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>(R(),K(l2,we({ref:f(n)},t,{index:i.value}),{default:k(()=>[se(o.$slots,"default")]),_:3},16,["index"]))}}),u2=X({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Fs();return $e(),(r,n)=>(R(),K(f(We),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:k(()=>[se(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),d2=X({__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 $e(),(r,n)=>(R(),K(f(We),we(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),[ir,f2]=Nt("ScrollAreaRoot"),p2=X({__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}=Ht(r),m=tc(p);function y(){i.value?.scrollTo({top:0})}function T(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:y,scrollTopLeft:T});const{forwardRef:v,currentElement:x}=$e();return f2({type:d,dir:m,scrollHideDelay:h,scrollArea:x,viewport:i,onViewportChange:b=>{i.value=b||void 0},content:o,onContentChange:b=>{o.value=b},scrollbarX:a,scrollbarXEnabled:u,scrollbarY:l,scrollbarYEnabled:c,onScrollbarXChange:b=>{a.value=b||void 0},onScrollbarYChange:b=>{l.value=b||void 0},onScrollbarXEnabledChange:b=>{u.value=b},onScrollbarYEnabledChange:b=>{c.value=b},onCornerWidthChange:b=>{n.value=b},onCornerHeightChange:b=>{s.value=b}}),(b,C)=>(R(),K(f(We),{ref:f(v),"as-child":r.asChild,as:b.as,dir:f(m),style:xt({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:k(()=>[se(b.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),h2=X({__name:"ScrollAreaCornerImpl",setup(e){const t=ir(),r=F(0),n=F(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 ss(t.scrollbarX.value,i),ss(t.scrollbarY.value,o),Oe(()=>t.scrollbarX.value,i),Oe(()=>t.scrollbarY.value,o),(a,l)=>s.value?(R(),K(f(We),we({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(()=>[se(a.$slots,"default")]),_:3},16,["style"])):Ne("v-if",!0)}}),g2=X({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=$e(),n=ir(),s=j(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=j(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?(R(),K(h2,we({key:0},t,{ref:f(r)}),{default:k(()=>[se(o.$slots,"default")]),_:3},16)):Ne("v-if",!0)}});function Uh(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 oa(e){const t=zh(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function zh(e,t){const r=e/t;return Number.isNaN(r)?0:r}function v2(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 Kh(e,t,r="ltr"){const n=oa(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=Ei(e,l[0],l[1]);return Uh([0,o],[0,a])(u)}function aa(e){return e?Number.parseInt(e,10):0}function m2(e,t,r,n="ltr"){const s=oa(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 Uh([l,u],d)(e)}function Wh(e,t){return e>0&&e<t}var w2=X({__name:"ScrollAreaScrollbarX",setup(e){const t=ir(),r=la(),{forwardRef:n,currentElement:s}=$e();Qe(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=j(()=>r.sizes.value);return(o,a)=>(R(),K(Gh,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:xt({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(oa)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:k(()=>[se(o.$slots,"default")]),_:3},8,["style"]))}}),y2=X({__name:"ScrollAreaScrollbarY",setup(e){const t=ir(),r=la(),{forwardRef:n,currentElement:s}=$e();Qe(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=j(()=>r.sizes.value);return(o,a)=>(R(),K(Gh,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:xt({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(oa)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:k(()=>[se(o.$slots,"default")]),_:3},8,["style"]))}}),Ac=X({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ir(),r=Ri(),{forwardRef:n}=$e(),s=F(!1),i=Yl(()=>{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 Qe(()=>i()),ss(t.viewport,i),ss(t.content,i),(o,a)=>(R(),K(f(On),{present:o.forceMount||s.value},{default:k(()=>[D(kc,we(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[se(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),b2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ir(),r=Ri(),{forwardRef:n}=$e(),{state:s,dispatch:i}=sc("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=Yl(()=>i("SCROLL_END"),100);return lt(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),lt(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),lt(c=>{const d=t.viewport.value,p=r.isHorizontal.value?"scrollLeft":"scrollTop";if(d){let h=d[p];const m=()=>{const y=d[p];h!==y&&(i("SCROLL"),u()),h=y};d.addEventListener("scroll",m),c(()=>{d.removeEventListener("scroll",m)})}}),Qe(()=>{const c=t.scrollArea.value;c&&(c.addEventListener("pointerenter",a),c.addEventListener("pointerleave",l))}),Vt(()=>{const c=t.scrollArea.value;c&&(c.removeEventListener("pointerenter",a),c.removeEventListener("pointerleave",l))}),(c,d)=>(R(),K(f(On),{present:c.forceMount||o.value},{default:k(()=>[D(Ac,we(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:k(()=>[se(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),_2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ir(),{forwardRef:r}=$e();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 Qe(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),Vt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>(R(),K(f(On),{present:a.forceMount||s.value},{default:k(()=>[D(Ac,we(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[se(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),S2=X({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ir(),r=Ri(),{forwardRef:n}=$e(),{state:s,dispatch:i}=sc("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");lt(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=Yl(()=>i("SCROLL_END"),100);return lt(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)=>(R(),K(f(On),{present:l.forceMount||o.value},{default:k(()=>[D(kc,we(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:k(()=>[se(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Ri,C2]=Nt("ScrollAreaScrollbar"),x2=X({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}=$e(),n=ir(),s=j(()=>t.orientation==="horizontal");Oe(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Vt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=Ht(t);return C2({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?(R(),K(_2,we({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(R(),K(S2,we({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?(R(),K(b2,we({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(R(),K(Ac,we({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(R(),K(kc,we({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:k(()=>[se(u.$slots,"default")]),_:3},16)):Ne("v-if",!0)}}),[la,T2]=Nt("ScrollAreaScrollbarVisible"),kc=X({__name:"ScrollAreaScrollbarVisible",setup(e){const t=ir(),r=Ri(),{forwardRef:n}=$e(),s=F({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=j(()=>{const v=zh(s.value.viewport,s.value.content);return v>0&&v<1}),o=F(),a=F(0);function l(v,x){if(h.value){const b=t.viewport.value.scrollLeft+v.deltaY;t.viewport.value.scrollLeft=b,Wh(b,x)&&v.preventDefault()}else{const b=t.viewport.value.scrollTop+v.deltaY;t.viewport.value.scrollTop=b,Wh(b,x)&&v.preventDefault()}}function u(v,x){h.value?a.value=x.x:a.value=x.y}function c(v){a.value=0}function d(v){s.value=v}function p(v,x){return m2(v,a.value,s.value,x)}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 y(){if(h.value){if(t.viewport.value&&o.value){const v=t.viewport.value.scrollLeft,x=Kh(v,s.value,t.dir.value);o.value.style.transform=`translate3d(${x}px, 0, 0)`}}else if(t.viewport.value&&o.value){const v=t.viewport.value.scrollTop,x=Kh(v,s.value);o.value.style.transform=`translate3d(0, ${x}px, 0)`}}function T(v){o.value=v}return T2({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:y,onThumbChange:T,onDragScroll:m}),(v,x)=>h.value?(R(),K(w2,we({key:0},v.$attrs,{ref:f(n)}),{default:k(()=>[se(v.$slots,"default")]),_:3},16)):(R(),K(y2,we({key:1},v.$attrs,{ref:f(n)}),{default:k(()=>[se(v.$slots,"default")]),_:3},16))}}),Gh=X({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=ir(),i=la(),o=Ri(),{forwardRef:a,currentElement:l}=$e(),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 x=v.target;x.hasPointerCapture(v.pointerId)&&x.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function y(v){const x=v.target,b=l.value?.contains(x),C=i.sizes.value.content-i.sizes.value.viewport;b&&i.handleWheelScroll(v,C)}Qe(()=>{document.addEventListener("wheel",y,{passive:!1})}),Vt(()=>{document.removeEventListener("wheel",y)});function T(){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:aa(getComputedStyle(l.value).paddingLeft),paddingEnd:aa(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:aa(getComputedStyle(l.value).paddingTop),paddingEnd:aa(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return ss(l,T),ss(s.content,T),(v,x)=>(R(),K(f(We),{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(()=>[se(v.$slots,"default")]),_:3},8,["as","as-child"]))}}),E2=X({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=ir(),n=la();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}=$e(),l=F(),u=j(()=>r.viewport.value);function c(){l.value||(l.value=v2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return Ly(j(()=>n.sizes.value),()=>{n.onThumbChange(a.value),u.value&&(n.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),Vt(()=>{u.value.removeEventListener("scroll",c),r.viewport.value?.removeEventListener("scroll",c)}),(d,p)=>(R(),K(f(We),{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(()=>[se(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),A2=X({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}=Ht(r),s=Mh(n),i=ir(),o=F();Qe(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=$e();return(u,c)=>(R(),Se(Ke,null,[Q("div",we({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}),[D(f(We),{ref:f(a),style:xt({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:k(()=>[se(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),D(f(We),{as:"style",nonce:f(s)},{default:k(()=>c[0]||(c[0]=[qe(" /* 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))}}),k2=[" ","Enter","ArrowUp","ArrowDown"],R2=[" ","Enter"],Bx=10;function Ii(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>Rc(n,t,r)):Rc(e,t,r)}function Rc(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]:my(e,t)}function I2(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var $2={key:0,value:""},[Bn,Jh]=Nt("SelectRoot"),P2=X({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}=Ht(r),l=Os(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=Os(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=F(),d=F(),p=F({x:0,y:0}),h=j(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:Kl(l.value));cn({isProvider:!0});const m=tc(a),y=Jp(c),T=F(new Set),v=j(()=>Array.from(T.value).map(C=>C.value).join(";"));function x(C){if(o.value){const E=Array.isArray(l.value)?[...l.value]:[],I=E.findIndex(M=>Rc(M,C,r.by));I===-1?E.push(C):E.splice(I,1),l.value=[...E]}else l.value=C}function b(C){return Array.from(T.value).find(E=>Ii(C,E.value,r.by))}return Jh({triggerElement:c,onTriggerChange:C=>{c.value=C},valueElement:d,onValueElementChange:C=>{d.value=C},contentId:"",modelValue:l,onValueChange:x,by:r.by,open:u,multiple:o,required:s,onOpenChange:C=>{u.value=C},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:T,onOptionAdd:C=>{const E=b(C.value);E&&T.value.delete(E),T.value.add(C)},onOptionRemove:C=>{const E=b(C.value);E&&T.value.delete(E)}}),(C,E)=>(R(),K(f(fh),null,{default:k(()=>[se(C.$slots,"default",{modelValue:f(l),open:f(u)}),f(y)?(R(),K(D2,{key:v.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:C.name,autocomplete:C.autocomplete,disabled:f(i),value:f(l)},{default:k(()=>[f(Kl)(f(l))?(R(),Se("option",$2)):Ne("v-if",!0),(R(!0),Se(Ke,null,cr(Array.from(T.value),I=>(R(),Se("option",we({key:I.value??""},{ref_for:!0},I),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Ne("v-if",!0)]),_:3}))}}),D2=X({__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=Bn();Oe(()=>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)=>(R(),K(f(dc),{"as-child":""},{default:k(()=>[Q("select",we({ref_key:"selectElement",ref:r},t,{onInput:s}),[se(i.$slots,"default")],16)]),_:3}))}}),O2=X({__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=an(e);return(r,n)=>(R(),K(f(Hh),we(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(()=>[se(r.$slots,"default")]),_:3},16))}}),H2={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[ls,Yh]=Nt("SelectContent"),M2=X({__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=Bn();tb(),Kp(r.bodyLock);const{CollectionSlot:i,getItems:o}=cn(),a=F();Zp(a);const{search:l,handleTypeaheadSearch:u}=Qp(),c=F(),d=F(),p=F(),h=F(!1),m=F(!1),y=F(!1);function T(){d.value&&a.value&&ah([d.value,a.value])}Oe(h,()=>{T()});const{onOpenChange:v,triggerPointerDownPosRef:x}=s;lt(E=>{if(!a.value)return;let I={x:0,y:0};const M=H=>{I={x:Math.abs(Math.round(H.pageX)-(x.value?.x??0)),y:Math.abs(Math.round(H.pageY)-(x.value?.y??0))}},g=H=>{H.pointerType!=="touch"&&(I.x<=10&&I.y<=10?H.preventDefault():a.value?.contains(H.target)||v(!1),document.removeEventListener("pointermove",M),x.value=null)};x.value!==null&&(document.addEventListener("pointermove",M),document.addEventListener("pointerup",g,{capture:!0,once:!0})),E(()=>{document.removeEventListener("pointermove",M),document.removeEventListener("pointerup",g,{capture:!0})})});function b(E){const I=E.ctrlKey||E.altKey||E.metaKey;if(E.key==="Tab"&&E.preventDefault(),!I&&E.key.length===1&&u(E.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(E.key)){let M=[...o().map(g=>g.ref)];if(["ArrowUp","End"].includes(E.key)&&(M=M.slice().reverse()),["ArrowUp","ArrowDown"].includes(E.key)){const g=E.target,H=M.indexOf(g);M=M.slice(H+1)}setTimeout(()=>ah(M)),E.preventDefault()}}const C=an(j(()=>r.position==="popper"?r:{}).value);return Yh({content:a,viewport:c,onViewportChange:E=>{c.value=E},itemRefCallback:(E,I,M)=>{const g=!m.value&&!M,H=Ii(s.modelValue.value,I,s.by);if(s.multiple.value){if(y.value)return;(H||g)&&(d.value=E,H&&(y.value=!0))}else(H||g)&&(d.value=E);g&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(E,I,M)=>{const g=!m.value&&!M;(Ii(s.modelValue.value,I,s.by)||g)&&(p.value=E)},focusSelectedItem:T,position:r.position,isPositioned:h,searchRef:l}),(E,I)=>(R(),K(f(i),null,{default:k(()=>[D(f(ih),{"as-child":"",onMountAutoFocus:I[6]||(I[6]=pr(()=>{},["prevent"])),onUnmountAutoFocus:I[7]||(I[7]=M=>{n("closeAutoFocus",M),!M.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),M.preventDefault())})},{default:k(()=>[D(f(ac),{"as-child":"","disable-outside-pointer-events":E.disableOutsidePointerEvents,onFocusOutside:I[2]||(I[2]=pr(()=>{},["prevent"])),onDismiss:I[3]||(I[3]=M=>f(s).onOpenChange(!1)),onEscapeKeyDown:I[4]||(I[4]=M=>n("escapeKeyDown",M)),onPointerDownOutside:I[5]||(I[5]=M=>n("pointerDownOutside",M))},{default:k(()=>[(R(),K(li(E.position==="popper"?O2:q2),we({...E.$attrs,...f(C)},{id:f(s).contentId,ref:M=>{const g=f(Xt)(M);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:I[0]||(I[0]=pr(()=>{},["prevent"])),onPlaced:I[1]||(I[1]=M=>h.value=!0),onKeydown:b}),{default:k(()=>[se(E.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[Ic,N2]=Nt("SelectItemAlignedPosition"),q2=X({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}=cn(),i=Bn(),o=ls(),a=F(!1),l=F(!0),u=F(),{forwardRef:c,currentElement:d}=$e(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:y}=o;function T(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const b=i.triggerElement.value.getBoundingClientRect(),C=d.value.getBoundingClientRect(),E=i.valueElement.value.getBoundingClientRect(),I=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const Pe=I.left-C.left,Ge=E.left-Pe,mt=b.left-Ge,je=b.width+mt,et=Math.max(je,C.width),wt=window.innerWidth-10,Ct=Ei(Ge,10,Math.max(10,wt-et));u.value.style.minWidth=`${je}px`,u.value.style.left=`${Ct}px`}else{const Pe=C.right-I.right,Ge=window.innerWidth-E.right-Pe,mt=window.innerWidth-b.right-Ge,je=b.width+mt,et=Math.max(je,C.width),wt=window.innerWidth-10,Ct=Ei(Ge,10,Math.max(10,wt-et));u.value.style.minWidth=`${je}px`,u.value.style.right=`${Ct}px`}const M=s().map(Pe=>Pe.ref),g=window.innerHeight-20,H=p.value.scrollHeight,N=window.getComputedStyle(d.value),_=Number.parseInt(N.borderTopWidth,10),w=Number.parseInt(N.paddingTop,10),S=Number.parseInt(N.borderBottomWidth,10),O=Number.parseInt(N.paddingBottom,10),q=_+w+H+O+S,B=Math.min(h.value.offsetHeight*5,q),Z=window.getComputedStyle(p.value),W=Number.parseInt(Z.paddingTop,10),le=Number.parseInt(Z.paddingBottom,10),G=b.top+b.height/2-10,ie=g-G,he=h.value.offsetHeight/2,ke=h.value.offsetTop+he,Ve=_+w+ke,Re=q-Ve;if(Ve<=G){const Pe=h.value===M[M.length-1];u.value.style.bottom="0px";const Ge=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,mt=Ve+Math.max(ie,he+(Pe?le:0)+Ge+S);u.value.style.height=`${mt}px`}else{const Pe=h.value===M[0];u.value.style.top="0px";const Ge=Math.max(G,_+p.value.offsetTop+(Pe?W:0)+he)+Re;u.value.style.height=`${Ge}px`,p.value.scrollTop=Ve-G+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${B}px`,u.value.style.maxHeight=`${g}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const v=F("");Qe(async()=>{await Tt(),T(),d.value&&(v.value=window.getComputedStyle(d.value).zIndex)});function x(b){b&&l.value===!0&&(T(),y?.(),l.value=!1)}return ss(i.triggerElement,()=>{T()}),N2({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:x}),(b,C)=>(R(),Se("div",{ref_key:"contentWrapperElement",ref:u,style:xt({display:"flex",flexDirection:"column",position:"fixed",zIndex:v.value})},[D(f(We),we({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...b.$attrs,...r}),{default:k(()=>[se(b.$slots,"default")]),_:3},16)],4))}}),B2=X({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return Jh(e.context),Yh(H2),(t,r)=>se(t.$slots,"default")}}),L2={key:1},F2=X({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=ln(r,t),s=Bn(),i=F();Qe(()=>{i.value=new DocumentFragment});const o=F(),a=j(()=>r.forceMount||s.open.value),l=F(a.value);return Oe(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?(R(),K(f(On),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:k(()=>[D(M2,br(ur({...f(n),...u.$attrs})),{default:k(()=>[se(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(R(),Se("div",L2,[(R(),K(Fa,{to:i.value},[D(B2,{context:f(s)},{default:k(()=>[se(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Ne("v-if",!0)}}),[Lx,V2]=Nt("SelectGroup"),j2=X({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Ms(void 0,"reka-select-group");return V2({id:r}),(n,s)=>(R(),K(f(We),we({role:"group"},t,{"aria-labelledby":f(r)}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),U2=X({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(R(),K(f(We),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:k(()=>[se(t.$slots,"default",{},()=>[r[0]||(r[0]=qe("▼"))])]),_:3},8,["as","as-child"]))}}),[Zh,z2]=Nt("SelectItem"),K2=X({__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}=Ht(r),i=Bn(),o=ls(),{forwardRef:a,currentElement:l}=$e(),{CollectionItem:u}=cn(),c=j(()=>Ii(i.modelValue?.value,r.value,i.by)),d=F(!1),p=F(r.textValue??""),h=Ms(void 0,"reka-select-item-text"),m="select.select";async function y(C){C.defaultPrevented||zl(m,T,{originalEvent:C,value:r.value})}async function T(C){await Tt(),n("select",C),!C.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function v(C){await Tt(),!C.defaultPrevented&&(s.value?o.onItemLeave?.():C.currentTarget?.focus({preventScroll:!0}))}async function x(C){await Tt(),!C.defaultPrevented&&C.currentTarget===rr()&&o.onItemLeave?.()}async function b(C){await Tt(),!C.defaultPrevented&&(o.searchRef?.value!==""&&C.key===" "||(R2.includes(C.key)&&y(C),C.key===" "&&C.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 Qe(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),z2({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:C=>{p.value=((p.value||C?.textContent)??"").trim()}}),(C,E)=>(R(),K(f(u),{value:{textValue:p.value}},{default:k(()=>[D(f(We),{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:C.as,"as-child":C.asChild,onFocus:E[0]||(E[0]=I=>d.value=!0),onBlur:E[1]||(E[1]=I=>d.value=!1),onPointerup:y,onPointerdown:E[2]||(E[2]=I=>{I.currentTarget.focus({preventScroll:!0})}),onTouchend:E[3]||(E[3]=pr(()=>{},["prevent","stop"])),onPointermove:v,onPointerleave:x,onKeydown:b},{default:k(()=>[se(C.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),W2=X({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Zh();return(n,s)=>f(r).isSelected.value?(R(),K(f(We),we({key:0,"aria-hidden":"true"},t),{default:k(()=>[se(n.$slots,"default")]),_:3},16)):Ne("v-if",!0)}}),G2=X({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Bn(),n=ls(),s=Zh(),{forwardRef:i,currentElement:o}=$e(),a=j(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return Qe(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),Vt(()=>{r.onOptionRemove(a.value)}),(l,u)=>(R(),K(f(We),we({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:k(()=>[se(l.$slots,"default")]),_:3},16,["id"]))}}),J2=X({__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)=>(R(),K(f(uc),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),Xh=X({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=cn(),s=ls(),i=F(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}lt(()=>{n().map(u=>u.ref).find(u=>u===rr())?.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 Ts(()=>o()),(u,c)=>(R(),K(f(We),we({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:k(()=>[se(u.$slots,"default")]),_:3},16))}}),Y2=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=ls(),r=t.position==="item-aligned"?Ic():void 0,{forwardRef:n,currentElement:s}=$e(),i=F(!1);return lt(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))}}),Oe(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(R(),K(Xh,{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(()=>[se(o.$slots,"default")]),_:3},512)):Ne("v-if",!0)}}),Z2=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=ls(),r=t.position==="item-aligned"?Ic():void 0,{forwardRef:n,currentElement:s}=$e(),i=F(!1);return lt(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))}}),Oe(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(R(),K(Xh,{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(()=>[se(o.$slots,"default")]),_:3},512)):Ne("v-if",!0)}}),X2=X({__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=Bn(),{forwardRef:n,currentElement:s}=$e(),i=j(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=Ms(void 0,"reka-select-content")),Qe(()=>{r.onTriggerChange(s.value)});const{getItems:o}=cn(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=Qp();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)=>(R(),K(f(ph),{"as-child":"",reference:p.reference},{default:k(()=>[D(f(We),{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(I2)(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 y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&(d(m),m.preventDefault())}),onPointerup:h[2]||(h[2]=pr(m=>{m.pointerType==="touch"&&d(m)},["prevent"])),onKeydown:h[3]||(h[3]=m=>{const y=f(a)!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&y&&m.key===" "||(f(l)(m.key,f(o)()),f(k2).includes(m.key)&&(c(),m.preventDefault()))})},{default:k(()=>[se(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"]))}}),Q2=X({__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}=$e(),s=Bn();Qe(()=>{s.valueElement=n});const i=j(()=>{let a=[];const l=Array.from(s.optionsSet.value),u=c=>l.find(d=>Ii(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)=>(R(),K(f(We),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:k(()=>[se(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[qe(Le(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),e_=X({__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}=Ht(t),n=Mh(r),s=ls(),i=s.position==="item-aligned"?Ic():void 0,{forwardRef:o,currentElement:a}=$e();Qe(()=>{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 y=window.innerHeight-20,T=Number.parseFloat(h.value.style.minHeight),v=Number.parseFloat(h.value.style.height),x=Math.max(T,v);if(x<y){const b=x+m,C=Math.min(y,b),E=b-C;h.value.style.height=`${C}px`,h.value.style.bottom==="0px"&&(d.scrollTop=E>0?E:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>(R(),Se(Ke,null,[D(f(We),we({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:k(()=>[se(c.$slots,"default")]),_:3},16),D(f(We),{as:"style",nonce:f(n)},{default:k(()=>d[0]||(d[0]=[qe(" /* 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))}}),t_=X({__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)=>(R(),K(f(We),we({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:k(()=>[se(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),r_=X({__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)=>(R(),K(t_,br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),n_=X({__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 $e(),(r,n)=>(R(),K(f(G1),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),[ca,s_]=Nt("TooltipProvider"),i_=X({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}=Ht(e);$e();const l=F(!0),u=F(!1),{start:c,stop:d}=Fp(()=>{l.value=!0},r,{immediate:!1});return s_({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)=>se(p.$slots,"default")}}),Qh="tooltip.open",[ua,o_]=Nt("TooltipRoot"),a_=X({__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;$e();const s=ca(),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=Os(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Oe(c,b=>{s.onClose&&(b?(s.onOpen(),document.dispatchEvent(new CustomEvent(Qh))):s.onClose())});const d=F(!1),p=F(),h=j(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:y}=Fp(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function T(){y(),d.value=!1,c.value=!0}function v(){y(),c.value=!1}function x(){m()}return o_({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){s.isOpenDelayed.value?x():T()},onTriggerLeave(){i.value?v():y()},onOpen:T,onClose:v,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(b,C)=>(R(),K(f(fh),null,{default:k(()=>[se(b.$slots,"default",{open:f(c)})]),_:3}))}}),eg=X({__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=ua(),i=ca(),{forwardRef:o,currentElement:a}=$e(),l=j(()=>r.ariaLabel||a.value?.textContent),u=j(()=>{const{ariaLabel:c,...d}=r;return zp(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return Qe(()=>{Ut(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),Ut(window,Qh,s.onClose)}),(c,d)=>(R(),K(f(ac),{"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]=pr(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:k(()=>[D(f(Hh),we({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(()=>[se(c.$slots,"default"),D(f(dc),{id:f(s).contentId,role:"tooltip"},{default:k(()=>[qe(Le(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),l_=X({__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=an(e),{forwardRef:r,currentElement:n}=$e(),{trigger:s,onClose:i}=ua(),o=ca(),{isPointerInTransit:a,onPointerExit:l}=rb(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>(R(),K(eg,we({ref:f(r)},f(t)),{default:k(()=>[se(u.$slots,"default")]),_:3},16))}}),c_=X({__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=ua(),i=ln(r,n),{forwardRef:o}=$e();return(a,l)=>(R(),K(f(On),{present:a.forceMount||f(s).open.value},{default:k(()=>[(R(),K(li(f(s).disableHoverableContent.value?eg:l_),we({ref:f(o)},f(i)),{default:k(()=>[se(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),u_=X({__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)=>(R(),K(f(uc),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),d_=X({__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=ua(),n=ca();r.contentId||(r.contentId=Ms(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=$e(),o=F(!1),a=F(!1),l=j(()=>r.disabled.value?{}:{click:y,focus:h,pointermove:d,pointerleave:p,pointerdown:c,blur:m});Qe(()=>{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(T){T.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(T){o.value||r.ignoreNonKeyboardFocus.value&&!T.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function y(){r.disableClosingTrigger.value||r.onClose()}return(T,v)=>(R(),K(f(ph),{"as-child":"",reference:T.reference},{default:k(()=>[D(f(We),we({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:T.as,"as-child":t.asChild,"data-grace-area-trigger":""},ud(l.value)),{default:k(()=>[se(T.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),f_=X({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},type:{default:"button"},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(r,n)=>(R(),K(f(We),{"data-slot":"button",as:e.as,"as-child":e.asChild,type:e.as==="button"?e.type:void 0,class:it(f(dt)(f(p_)({variant:e.variant,size:e.size}),t.class))},{default:k(()=>[se(r.$slots,"default")]),_:3},8,["as","as-child","type","class"]))}}),ft=f_;const p_=fy("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 h_={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"},g_=X({__name:"KeyPad",setup(e){const t=Ft("webphone"),{sendDTMF:r}=Ft("sip"),{playDtmf:n}=cp(),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)=>(R(),Se("div",h_,[(R(),Se(Ke,null,cr(s,l=>D(f(ft),{key:l,type:"button",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(()=>[qe(Le(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),$c=g_;var tg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),v_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),m_=e=>{const t=v_(e);return t.charAt(0).toUpperCase()+t.slice(1)},w_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),rg=e=>e==="";var $i={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 y_=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=$i.width,color:a=$i.stroke,...l},{slots:u})=>dr("svg",{...$i,...l,width:o,height:o,stroke:a,"stroke-width":rg(r)||rg(n)||r===!0||n===!0?Number(s||i||$i["stroke-width"])*24/Number(o):s||i||$i["stroke-width"],class:w_("lucide",l.class,...e?[`lucide-${tg(m_(e))}-icon`,`lucide-${tg(e)}`]:["lucide-icon"])},[...t.map(c=>dr(...c)),...u.default?[u.default()]:[]]);var yt=(e,t)=>(r,{slots:n,attrs:s})=>dr(y_,{...s,...r,iconNode:t,name:e},n);var ng=yt("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 sg=yt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var ig=yt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var b_=yt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var Pc=yt("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 __=yt("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 S_=yt("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_=yt("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 x_=yt("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 T_=yt("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 E_=yt("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 og=yt("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 A_=yt("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 k_=yt("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 R_=yt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var I_=yt("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 $_=yt("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 ag=yt("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 lg=yt("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 Dc=yt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),P_=X({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=Os(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>to((R(),Se("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>nt(n)?n.value=o:null),"data-slot":"input",class:it(f(dt)("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)),[[wi,f(n)]])}}),Pi=P_,D_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function O_(e,t){return R(),Se("svg",D_,[...t[0]||(t[0]=[ul('<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 Oc={render:O_},H_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function M_(e,t){return R(),Se("svg",H_,[...t[0]||(t[0]=[Q("g",{"clip-path":"url(#a)"},[Q("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),Q("defs",null,[Q("clipPath",{id:"a"},[Q("path",{fill:"#fff",d:"M0 0h9v9H0z"})])],-1)])])}var N_={render:M_},q_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function B_(e,t){return R(),Se("svg",q_,[...t[0]||(t[0]=[ul('<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 L_={render:B_},F_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function V_(e,t){return R(),Se("svg",F_,[...t[0]||(t[0]=[Q("circle",{cx:"9.899",cy:"9.899",r:"6.6",stroke:"currentColor","stroke-width":".8",transform:"rotate(-135 9.9 9.9)"},null,-1),Q("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 j_={render:V_},U_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function z_(e,t){return R(),Se("svg",U_,[...t[0]||(t[0]=[Q("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 Hc={render:z_},K_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function W_(e,t){return R(),Se("svg",K_,[...t[0]||(t[0]=[Q("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),Q("path",{stroke:"currentColor","stroke-linecap":"round",d:"M2 16.293 16.293 2"},null,-1)])])}var Mc={render:W_},G_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function J_(e,t){return R(),Se("svg",G_,[...t[0]||(t[0]=[Q("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 Nc={render:J_},Y_=["data-call-status"],Z_={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},X_={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},Q_={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},eS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},tS=["data-visible"],rS={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},nS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},sS=["data-visible"],iS={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"},oS=X({__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=Ft("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a,sendDTMF:l}=Ft("sip"),u=/^[0-9*#]+$/,c=_=>{if(u.test(_)){for(const w of _)l(w);for(const w of _)r.appendKeypad(w)}},d=_=>{_.ctrlKey||_.metaKey||_.altKey||_.key.length!==1||(_.preventDefault(),_.stopPropagation(),c(_.key))},p=_=>{_.data&&(_.preventDefault(),_.stopPropagation(),c(_.data))},h=_=>{_.preventDefault(),_.stopPropagation(),c(_.clipboardData?.getData("text").replace(/\s/g,"")||"")};Oe(()=>r.callStatus,(_,w)=>{_==="connected"&&w!=="connected"&&r.clearKeypad()});const m=e,y=t,T=j(()=>!!r.transferInProgress),v=j(()=>m.destination||r.keypadValue||r.lastDialedNumber||""),x=j(()=>!!m.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),b=j(()=>x.value||!!r.lastDialedNumber),C=j(()=>!m.isVideo||!x.value?!1:v.value?/^[0-9*#]{1,5}$/.test(v.value):!0),E=async _=>{try{m.destination?await n(m.destination,_):r.keypadValue?await n(r.keypadValue,_):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(w){if(console.error("Error initiating call:",w),_){let S="No se pudo acceder a la cámara.";const O=w instanceof Error?w.name:String(w);O==="NotReadableError"?S="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":O==="NotAllowedError"||O==="PermissionDeniedError"?S="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":O==="NotFoundError"?S="No se detectó ninguna cámara en el sistema.":S+=" "+(w instanceof Error?w.message:String(w)),confirm(`${S}
|
|
74
|
+
`))}return()=>s.value||n.value||o.value?dr(t.default({present:o.value})[0],{ref:u=>{const c=Xt(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),ic=X({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=Wl(r.default()),s=n.findIndex(l=>l.type!==pt);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?we(t,i.props):t,a=xr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),mb=["area","img","input"],We=X({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"&&mb.includes(n)?()=>dr(n,t):n!=="template"?()=>dr(e.as,t,{default:r.default}):()=>dr(ic,t,{default:r.default})}});function oc(){const e=F();return{primitiveElement:e,currentElement:j(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:Xt(e))}}var[Hn,wb]=Nt("DialogRoot"),yb=X({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=Os(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=F(),i=F(),{modal:o}=Ht(r);return wb({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)=>se(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),bb=X({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;$e();const r=Hn();return(n,s)=>(R(),K(f(We),we(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["type"]))}}),_b="dismissableLayer.pointerDownOutside",Sb="dismissableLayer.focusOutside";function eh(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 lt(o=>{if(!qt||!Ae(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(eh(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){zl(_b,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:()=>{Ae(r)&&(s.value=!0)}}}function xb(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1);return lt(i=>{if(!qt||!Ae(r))return;const o=async a=>{if(!t?.value)return;await Tt(),await Tt();const l=a.target;!t.value||!l||eh(t.value,l)||a.target&&!s.value&&zl(Sb,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{Ae(r)&&(s.value=!0)},onBlurCapture:()=>{Ae(r)&&(s.value=!1)}}}var vr=zr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),ac=X({__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}=$e(),o=j(()=>i.value?.ownerDocument??globalThis.document),a=j(()=>vr.layersRoot),l=j(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=j(()=>vr.layersWithOutsidePointerEventsDisabled.size>0),c=j(()=>{const h=Array.from(a.value),[m]=[...vr.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(m);return l.value>=w}),d=Cb(async h=>{const m=[...vr.branches].some(w=>w?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await Tt(),h.defaultPrevented||n("dismiss"))},i),p=xb(h=>{[...vr.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return jy("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),lt(h=>{i.value&&(r.disableOutsidePointerEvents&&(vr.layersWithOutsidePointerEventsDisabled.size===0&&(vr.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),vr.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&vr.layersWithOutsidePointerEventsDisabled.size===1&&!Kl(vr.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=vr.originalBodyPointerEvents)}))}),lt(h=>{h(()=>{i.value&&(a.value.delete(i.value),vr.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>(R(),K(f(We),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:xt({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:k(()=>[se(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Tb=by(()=>F([]));function Eb(){const e=Tb();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=th(e.value,t),e.value.unshift(t)},remove(t){e.value=th(e.value,t),e.value[0]?.resume()}}}function th(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var lc="focusScope.autoFocusOnMount",cc="focusScope.autoFocusOnUnmount",rh={bubbles:!1,cancelable:!0};function Ab(e,{select:t=!1}={}){const r=rr();for(const n of e)if(Mn(n,{select:t}),rr()!==r)return!0}function kb(e){const t=nh(e);return[sh(t,e),sh(t.reverse(),e)]}function nh(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 sh(e,t){for(const r of e)if(!Rb(r,{upTo:t}))return r}function Rb(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 Ib(e){return e instanceof HTMLInputElement&&"select"in e}function Mn(e,{select:t=!1}={}){if(e&&e.focus){const r=rr();e.focus({preventScroll:!0}),e!==r&&Ib(e)&&t&&e.select()}}var ih=X({__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}=$e(),o=F(null),a=Eb(),l=zr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});lt(c=>{if(!qt)return;const d=i.value;if(!r.trapped)return;function p(T){if(l.paused||!d)return;const g=T.target;d.contains(g)?o.value=g:Mn(o.value,{select:!0})}function h(T){if(l.paused||!d)return;const g=T.relatedTarget;g!==null&&(d.contains(g)||Mn(o.value,{select:!0}))}function m(T){d.contains(o.value)||Mn(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()})}),lt(async c=>{const d=i.value;if(await Tt(),!d)return;a.add(l);const p=rr();if(!d.contains(p)){const h=new CustomEvent(lc,rh);d.addEventListener(lc,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(Ab(nh(d),{select:!0}),rr()===p&&Mn(d))}c(()=>{d.removeEventListener(lc,w=>n("mountAutoFocus",w));const h=new CustomEvent(cc,rh),m=w=>{n("unmountAutoFocus",w)};d.addEventListener(cc,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Mn(p??document.body,{select:!0}),d.removeEventListener(cc,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=rr();if(d&&p){const h=c.currentTarget,[m,w]=kb(h);m&&w?!c.shiftKey&&p===w?(c.preventDefault(),r.loop&&Mn(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&Mn(w,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>(R(),K(f(We),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:k(()=>[se(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),oh=["Enter"," "],$b=["ArrowDown","PageUp","Home"],Pb=["ArrowUp","PageDown","End"],Nx=[...$b,...Pb],qx={ltr:[...oh,"ArrowRight"],rtl:[...oh,"ArrowLeft"]};function Db(e){return e?"open":"closed"}function ah(e){const t=rr();for(const r of e)if(r===t||(r.focus(),rr()!==t))return}var lh=X({__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=Hn(),{forwardRef:i,currentElement:o}=$e();return s.titleId||(s.titleId=Ms(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=Ms(void 0,"reka-dialog-description")),Qe(()=>{s.contentElement=o,rr()!==document.body&&(s.triggerElement.value=rr())}),(a,l)=>(R(),K(f(ih),{"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(()=>[D(f(ac),we({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(Db)(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(()=>[se(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Ob=X({__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=Hn(),i=Yo(n),{forwardRef:o,currentElement:a}=$e();return Zp(a),(l,u)=>(R(),K(lh,we({...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(()=>[se(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),Hb=X({__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=Yo(t);$e();const s=Hn(),i=F(!1),o=F(!1);return(a,l)=>(R(),K(lh,we({...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(()=>[se(a.$slots,"default")]),_:3},16))}}),Mb=X({__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=Hn(),i=Yo(n),{forwardRef:o}=$e();return(a,l)=>(R(),K(f(On),{present:a.forceMount||f(s).open.value},{default:k(()=>[f(s).modal.value?(R(),K(Ob,we({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[se(a.$slots,"default")]),_:3},16)):(R(),K(Hb,we({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:k(()=>[se(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Nb=X({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Hn();return Kp(!0),$e(),(r,n)=>(R(),K(f(We),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:k(()=>[se(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),qb=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Hn(),{forwardRef:r}=$e();return(n,s)=>f(t)?.modal.value?(R(),K(f(On),{key:0,present:n.forceMount||f(t).open.value},{default:k(()=>[D(Nb,we(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Ne("v-if",!0)}}),uc=X({__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=Zl();return(r,n)=>f(t)||r.forceMount?(R(),K(Va,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[se(r.$slots,"default")],8,["to","disabled","defer"])):Ne("v-if",!0)}}),Bb=X({__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)=>(R(),K(f(uc),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),Lb=X({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=Hn();return $e(),(n,s)=>(R(),K(f(We),we(t,{id:f(r).titleId}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["id"]))}}),ch="data-reka-collection-item";function cn(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:F(),itemMap:F(new Map)},Wn(n,s)):s=Ft(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${ch}]`)),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=X({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=oc();return Oe(p,()=>{s.collectionRef.value=p.value}),()=>dr(ic,{ref:d,...c},u)}}),a=X({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:u,attrs:c}){const{primitiveElement:d,currentElement:p}=oc();return lt(h=>{if(p.value){const m=Ma(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>dr(ic,{...c,[ch]:"",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 dc=X({__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)=>(R(),K(f(We),{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(()=>[se(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),uh=X({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}=oc();return Oe(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)=>(R(),K(dc,we({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),Fb=X({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)=>(R(),Se(Ke,null,[Ne(" We render single input if it's required "),r.value?(R(),K(uh,we({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):(R(!0),Se(Ke,{key:1},cr(n.value,o=>(R(),K(uh,we({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[dh,Vb]=Nt("PopperRoot"),fh=X({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=F();return Vb({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>se(r.$slots,"default")}}),ph=X({__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}=$e(),s=dh();return La(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>(R(),K(f(We),{ref:f(r),as:i.as,"as-child":i.asChild},{default:k(()=>[se(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),jb={key:0,d:"M0 0L6 6L12 0"},Ub={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},zb=X({__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 $e(),(r,n)=>(R(),K(f(We),we(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:k(()=>[se(r.$slots,"default",{},()=>[r.rounded?(R(),Se("path",Ub)):(R(),Se("path",jb))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function Kb(e){return e!==null}function Wb(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]=fc(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 fc(e){const[t,r="center"]=e.split("-");return[t,r]}var Gb=["top","right","bottom","left"],Nn=Math.min,nr=Math.max,ea=Math.round,ta=Math.floor,Nr=e=>({x:e,y:e}),Jb={left:"right",right:"left",bottom:"top",top:"bottom"};function pc(e,t,r){return nr(e,Nn(t,r))}function un(e,t){return typeof e=="function"?e(t):e}function dn(e){return e.split("-")[0]}function Ns(e){return e.split("-")[1]}function hc(e){return e==="x"?"y":"x"}function gc(e){return e==="y"?"height":"width"}function qr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function vc(e){return hc(qr(e))}function Yb(e,t,r){r===void 0&&(r=!1);const n=Ns(e),s=vc(e),i=gc(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=ra(o)),[o,ra(o)]}function Zb(e){const t=ra(e);return[mc(e),t,mc(t)]}function mc(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var hh=["left","right"],gh=["right","left"],Xb=["top","bottom"],Qb=["bottom","top"];function e1(e,t,r){switch(e){case"top":case"bottom":return r?t?gh:hh:t?hh:gh;case"left":case"right":return t?Xb:Qb;default:return[]}}function t1(e,t,r,n){const s=Ns(e);let i=e1(dn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(mc)))),i}function ra(e){const t=dn(e);return Jb[t]+e.slice(t.length)}function r1(e){return{top:0,right:0,bottom:0,left:0,...e}}function vh(e){return typeof e!="number"?r1(e):{top:e,right:e,bottom:e,left:e}}function na(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 mh(e,t,r){let{reference:n,floating:s}=e;const i=qr(t),o=vc(t),a=gc(o),l=dn(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(Ns(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 n1(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}=un(t,e),m=vh(h),w=a[p?d==="floating"?"reference":"floating":d],T=na(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})),g=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)),_=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},S=na(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:C,strategy:l}):g);return{top:(T.top-S.top+m.top)/_.y,bottom:(S.bottom-T.bottom+m.bottom)/_.y,left:(T.left-S.left+m.left)/_.x,right:(S.right-T.right+m.right)/_.x}}var s1=50,i1=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:n1},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}=mh(u,n,l),p=n,h=0;const m={};for(let w=0;w<i.length;w++){const T=i[w];if(!T)continue;const{name:g,fn:C}=T,{x:_,y:S,data:E,reset:I}=await C({x:c,y:d,initialPlacement:n,placement:p,strategy:s,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});c=_??c,d=S??d,m[g]={...m[g],...E},I&&h<s1&&(h++,typeof I=="object"&&(I.placement&&(p=I.placement),I.rects&&(u=I.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):I.rects),{x:c,y:d}=mh(u,p,l)),w=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},o1=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}=un(e,t)||{};if(u==null)return{};const d=vh(c),p={x:r,y:n},h=vc(s),m=gc(h),w=await o.getDimensions(u),T=h==="y",g=T?"top":"left",C=T?"bottom":"right",_=T?"clientHeight":"clientWidth",S=i.reference[m]+i.reference[h]-p[h]-i.floating[m],E=p[h]-i.reference[h],I=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let N=I?I[_]:0;(!N||!await(o.isElement==null?void 0:o.isElement(I)))&&(N=a.floating[_]||i.floating[m]);const v=S/2-E/2,H=N/2-w[m]/2-1,M=Nn(d[g],H),x=Nn(d[C],H),b=M,y=N-w[m]-x,O=N/2-w[m]/2+v,q=pc(b,O,y),B=!l.arrow&&Ns(s)!=null&&O!==q&&i.reference[m]/2-(O<b?M:x)-w[m]/2<0,Z=B?O<b?O-b:O-y:0;return{[h]:p[h]+Z,data:{[h]:q,centerOffset:O-q-Z,...B&&{alignmentOffset:Z}},reset:B}}}),a1=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,...T}=un(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=dn(s),C=qr(a),_=dn(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=p||(_||!w?[ra(a)]:Zb(a)),I=m!=="none";!p&&I&&E.push(...t1(a,w,m,S));const N=[a,...E],v=await l.detectOverflow(t,T),H=[];let M=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&H.push(v[g]),d){const O=Yb(s,o,S);H.push(v[O[0]],v[O[1]])}if(M=[...M,{placement:s,overflows:H}],!H.every(O=>O<=0)){var x,b;const O=(((x=i.flip)==null?void 0:x.index)||0)+1,q=N[O];if(q&&(!(d==="alignment"&&C!==qr(q))||M.every(Z=>qr(Z.placement)===C?Z.overflows[0]>0:!0)))return{data:{index:O,overflows:M},reset:{placement:q}};let B=(b=M.filter(Z=>Z.overflows[0]<=0).sort((Z,W)=>Z.overflows[1]-W.overflows[1])[0])==null?void 0:b.placement;if(!B)switch(h){case"bestFit":{var y;const Z=(y=M.filter(W=>{if(I){const le=qr(W.placement);return le===C||le==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(le=>le>0).reduce((le,G)=>le+G,0)]).sort((W,le)=>W[1]-le[1])[0])==null?void 0:y[0];Z&&(B=Z);break}case"initialPlacement":B=a;break}if(s!==B)return{reset:{placement:B}}}return{}}}};function wh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yh(e){return Gb.some(t=>e[t]>=0)}var l1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=un(e,t);switch(s){case"referenceHidden":{const o=wh(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:yh(o)}}}case"escaped":{const o=wh(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:yh(o)}}}default:return{}}}}},bh=new Set(["left","top"]);async function c1(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=dn(r),a=Ns(r),l=qr(r)==="y",u=bh.has(o)?-1:1,c=i&&l?-1:1,d=un(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 u1=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 c1(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}}}}},d1=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:g=>{let{x:C,y:_}=g;return{x:C,y:_}}},...u}=un(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=qr(dn(s)),h=hc(p);let m=c[h],w=c[p];if(o){const g=h==="y"?"top":"left",C=h==="y"?"bottom":"right",_=m+d[g],S=m-d[C];m=pc(_,m,S)}if(a){const g=p==="y"?"top":"left",C=p==="y"?"bottom":"right",_=w+d[g],S=w-d[C];w=pc(_,w,S)}const T=l.fn({...t,[h]:m,[p]:w});return{...T,data:{x:T.x-r,y:T.y-n,enabled:{[h]:o,[p]:a}}}}}},f1=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}=un(e,t),c={x:r,y:n},d=qr(s),p=hc(d);let h=c[p],m=c[d];const w=un(a,t),T=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const _=p==="y"?"height":"width",S=i.reference[p]-i.floating[_]+T.mainAxis,E=i.reference[p]+i.reference[_]-T.mainAxis;h<S?h=S:h>E&&(h=E)}if(u){var g,C;const _=p==="y"?"width":"height",S=bh.has(dn(s)),E=i.reference[d]-i.floating[_]+(S&&((g=o.offset)==null?void 0:g[d])||0)+(S?0:T.crossAxis),I=i.reference[d]+i.reference[_]+(S?0:((C=o.offset)==null?void 0:C[d])||0)-(S?T.crossAxis:0);m<E?m=E:m>I&&(m=I)}return{[p]:h,[d]:m}}}},p1=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}=un(e,t),c=await o.detectOverflow(t,u),d=dn(s),p=Ns(s),h=qr(s)==="y",{width:m,height:w}=i.floating;let T,g;d==="top"||d==="bottom"?(T=d,g=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,T=p==="end"?"top":"bottom");const C=w-c.top-c.bottom,_=m-c.left-c.right,S=Nn(w-c[T],C),E=Nn(m-c[g],_),I=!t.middlewareData.shift;let N=S,v=E;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(v=_),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=C),I&&!p){const M=nr(c.left,0),x=nr(c.right,0),b=nr(c.top,0),y=nr(c.bottom,0);h?v=m-2*(M!==0||x!==0?M+x:nr(c.left,c.right)):N=w-2*(b!==0||y!==0?b+y:nr(c.top,c.bottom))}await l({...t,availableWidth:v,availableHeight:N});const H=await o.getDimensions(a.floating);return m!==H.width||w!==H.height?{reset:{rects:!0}}:{}}}};function sa(){return typeof window<"u"}function is(e){return wc(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Br(e){var t;return(t=(wc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wc(e){return sa()?e instanceof Node||e instanceof sr(e).Node:!1}function kr(e){return sa()?e instanceof Element||e instanceof sr(e).Element:!1}function fn(e){return sa()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function _h(e){return!sa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}function ki(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function h1(e){return/^(table|td|th)$/.test(is(e))}function ia(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var g1=/transform|translate|scale|rotate|perspective|filter/,v1=/paint|layout|strict|content/,os=e=>!!e&&e!=="none",yc;function bc(e){const t=kr(e)?Rr(e):e;return os(t.transform)||os(t.translate)||os(t.scale)||os(t.rotate)||os(t.perspective)||!_c()&&(os(t.backdropFilter)||os(t.filter))||g1.test(t.willChange||"")||v1.test(t.contain||"")}function m1(e){let t=qn(e);for(;fn(t)&&!qs(t);){if(bc(t))return t;if(ia(t))return null;t=qn(t)}return null}function _c(){return yc==null&&(yc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yc}function qs(e){return/^(html|body|#document)$/.test(is(e))}function Rr(e){return sr(e).getComputedStyle(e)}function oa(e){return kr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qn(e){if(is(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_h(e)&&e.host||Br(e);return _h(t)?t.host:t}function Sh(e){const t=qn(e);return qs(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&ki(t)?t:Sh(t)}function Ri(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Sh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=sr(s);if(i){const a=Sc(o);return t.concat(o,o.visualViewport||[],ki(s)?s:[],a&&r?Ri(a):[])}else return t.concat(s,Ri(s,[],r))}function Sc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ch(e){const t=Rr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=fn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=ea(r)!==i||ea(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Cc(e){return kr(e)?e:e.contextElement}function Bs(e){const t=Cc(e);if(!fn(t))return Nr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Ch(t);let o=(i?ea(r.width):r.width)/n,a=(i?ea(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var w1=Nr(0);function xh(e){const t=sr(e);return!_c()||!t.visualViewport?w1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function y1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==sr(e)?!1:t}function as(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Cc(e);let o=Nr(1);t&&(n?kr(n)&&(o=Bs(n)):o=Bs(e));const a=y1(i,r,n)?xh(i):Nr(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=sr(i),h=n&&kr(n)?sr(n):n;let m=p,w=Sc(m);for(;w&&n&&h!==m;){const T=Bs(w),g=w.getBoundingClientRect(),C=Rr(w),_=g.left+(w.clientLeft+parseFloat(C.paddingLeft))*T.x,S=g.top+(w.clientTop+parseFloat(C.paddingTop))*T.y;l*=T.x,u*=T.y,c*=T.x,d*=T.y,l+=_,u+=S,m=sr(w),w=Sc(m)}}return na({width:c,height:d,x:l,y:u})}function aa(e,t){const r=oa(e).scrollLeft;return t?t.left+r:as(Br(e)).left+r}function Th(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-aa(e,r),y:r.top+t.scrollTop}}function b1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Br(n),a=t?ia(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Nr(1);const c=Nr(0),d=fn(n);if((d||!d&&!i)&&((is(n)!=="body"||ki(o))&&(l=oa(n)),d)){const h=as(n);u=Bs(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?Th(o,l):Nr(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 _1(e){return Array.from(e.getClientRects())}function S1(e){const t=Br(e),r=oa(e),n=e.ownerDocument.body,s=nr(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=nr(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+aa(e);const a=-r.scrollTop;return Rr(n).direction==="rtl"&&(o+=nr(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var Eh=25;function C1(e,t){const r=sr(e),n=Br(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=_c();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=aa(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<=Eh&&(i-=m)}else u<=Eh&&(i+=u);return{width:i,height:o,x:a,y:l}}function x1(e,t){const r=as(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=fn(e)?Bs(e):Nr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function Ah(e,t,r){let n;if(t==="viewport")n=C1(e,r);else if(t==="document")n=S1(Br(e));else if(kr(t))n=x1(t,r);else{const s=xh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return na(n)}function kh(e,t){const r=qn(e);return r===t||!kr(r)||qs(r)?!1:Rr(r).position==="fixed"||kh(r,t)}function T1(e,t){const r=t.get(e);if(r)return r;let n=Ri(e,[],!1).filter(a=>kr(a)&&is(a)!=="body"),s=null;const i=Rr(e).position==="fixed";let o=i?qn(e):e;for(;kr(o)&&!qs(o);){const a=Rr(o),l=bc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||ki(o)&&!l&&kh(e,o))?n=n.filter(u=>u!==o):s=a,o=qn(o)}return t.set(e,n),n}function E1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?ia(t)?[]:T1(t,this._c):[].concat(r),n],o=Ah(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=Ah(t,i[d],s);a=nr(p.top,a),l=Nn(p.right,l),u=Nn(p.bottom,u),c=nr(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function A1(e){const{width:t,height:r}=Ch(e);return{width:t,height:r}}function k1(e,t,r){const n=fn(t),s=Br(t),i=r==="fixed",o=as(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Nr(0);function u(){l.x=aa(s)}if(n||!n&&!i)if((is(t)!=="body"||ki(s))&&(a=oa(t)),n){const d=as(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?Th(s,a):Nr(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 xc(e){return Rr(e).position==="static"}function Rh(e,t){if(!fn(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Br(e)===r&&(r=r.ownerDocument.body),r}function Ih(e,t){const r=sr(e);if(ia(e))return r;if(!fn(e)){let s=qn(e);for(;s&&!qs(s);){if(kr(s)&&!xc(s))return s;s=qn(s)}return r}let n=Rh(e,t);for(;n&&h1(n)&&xc(n);)n=Rh(n,t);return n&&qs(n)&&xc(n)&&!bc(n)?r:n||m1(e)||r}var R1=async function(e){const t=this.getOffsetParent||Ih,r=this.getDimensions,n=await r(e.floating);return{reference:k1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function I1(e){return Rr(e).direction==="rtl"}var $1={convertOffsetParentRelativeRectToViewportRelativeRect:b1,getDocumentElement:Br,getClippingRect:E1,getOffsetParent:Ih,getElementRects:R1,getClientRects:_1,getDimensions:A1,getScale:Bs,isElement:kr,isRTL:I1};function $h(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function P1(e,t){let r=null,n;const s=Br(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=ta(d),w=ta(s.clientWidth-(c+p)),T=ta(s.clientHeight-(d+h)),g=ta(c),C={rootMargin:-m+"px "+-w+"px "+-T+"px "+-g+"px",threshold:nr(0,Nn(1,l))||1};let _=!0;function S(E){const I=E[0].intersectionRatio;if(I!==l){if(!_)return o();I?o(!1,I):n=setTimeout(()=>{o(!1,1e-7)},1e3)}I===1&&!$h(u,e.getBoundingClientRect())&&o(),_=!1}try{r=new IntersectionObserver(S,{...C,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,C)}r.observe(e)}return o(!0),i}function D1(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=Cc(e),c=s||i?[...u?Ri(u):[],...t?Ri(t):[]]:[];c.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=u&&a?P1(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(g=>{let[C]=g;C&&C.target===u&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=h)==null||_.observe(t)})),r()}),u&&!l&&h.observe(u),t&&h.observe(t));let m,w=l?as(e):null;l&&T();function T(){const g=as(e);w&&!$h(w,g)&&r(),w=g,m=requestAnimationFrame(T)}return r(),()=>{var g;c.forEach(C=>{s&&C.removeEventListener("scroll",r),i&&C.removeEventListener("resize",r)}),d?.(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var O1=u1,H1=d1,Ph=a1,M1=p1,N1=l1,q1=o1,B1=f1,L1=(e,t,r)=>{const n=new Map,s={platform:$1,...r},i={...s.platform,_c:n};return i1(e,t,{...s,platform:i})};function F1(e){return e!=null&&typeof e=="object"&&"$el"in e}function Tc(e){if(F1(e)){const t=e.$el;return wc(t)&&is(t)==="#comment"?null:t}return e}function Ls(e){return typeof e=="function"?e():f(e)}function V1(e){return{name:"arrow",options:e,fn(t){const r=Tc(Ls(e.element));return r==null?{}:q1({element:r,padding:e.padding}).fn(t)}}}function Dh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oh(e,t){const r=Dh(e);return Math.round(t*r)/r}function j1(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=j(()=>{var N;return(N=Ls(r.open))!=null?N:!0}),i=j(()=>Ls(r.middleware)),o=j(()=>{var N;return(N=Ls(r.placement))!=null?N:"bottom"}),a=j(()=>{var N;return(N=Ls(r.strategy))!=null?N:"absolute"}),l=j(()=>{var N;return(N=Ls(r.transform))!=null?N:!0}),u=j(()=>Tc(e.value)),c=j(()=>Tc(t.value)),d=F(0),p=F(0),h=F(a.value),m=F(o.value),w=ut({}),T=F(!1),g=j(()=>{const N={position:h.value,left:"0",top:"0"};if(!c.value)return N;const v=Oh(c.value,d.value),H=Oh(c.value,p.value);return l.value?{...N,transform:"translate("+v+"px, "+H+"px)",...Dh(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:v+"px",top:H+"px"}});let C;function _(){if(u.value==null||c.value==null)return;const N=s.value;L1(u.value,c.value,{middleware:i.value,placement:o.value,strategy:a.value}).then(v=>{d.value=v.x,p.value=v.y,h.value=v.strategy,m.value=v.placement,w.value=v.middlewareData,T.value=N!==!1})}function S(){typeof C=="function"&&(C(),C=void 0)}function E(){if(S(),n===void 0){_();return}if(u.value!=null&&c.value!=null){C=n(u.value,c.value,_);return}}function I(){s.value||(T.value=!1)}return Oe([i,o,a,s],_,{flush:"sync"}),Oe([u,c],E,{flush:"sync"}),Oe(s,I,{flush:"sync"}),ji()&&Ea(S),{x:Kr(d),y:Kr(p),strategy:Kr(h),placement:Kr(m),middlewareData:Kr(w),isPositioned:Kr(T),floatingStyles:g,update:_}}var U1={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},[z1,K1]=Nt("PopperContent"),Hh=X({inheritAttrs:!1,__name:"PopperContent",props:fd({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}},{...U1}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=dh(),{forwardRef:i,currentElement:o}=$e(),a=F(),l=F(),{width:u,height:c}=Xp(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(Kb),altBoundary:h.value.length>0})),w=j(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),T=wy(()=>[O1({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&Ph({...m.value,...w.value}),r.avoidCollisions&&H1({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?B1():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&Ph({...m.value,...w.value}),M1({...m.value,apply:({elements:M,rects:x,availableWidth:b,availableHeight:y})=>{const{width:O,height:q}=x.reference,B=M.floating.style;B.setProperty("--reka-popper-available-width",`${b}px`),B.setProperty("--reka-popper-available-height",`${y}px`),B.setProperty("--reka-popper-anchor-width",`${O}px`),B.setProperty("--reka-popper-anchor-height",`${q}px`)}}),l.value&&V1({element:l.value,padding:r.arrowPadding}),Wb({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&N1({strategy:"referenceHidden",...m.value})]),{floatingStyles:g,placement:C,isPositioned:_,middlewareData:S,update:E}=j1(j(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...M)=>D1(...M,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:T}),I=j(()=>fc(C.value)[0]),N=j(()=>fc(C.value)[1]);La(()=>{_.value&&n("placed")});const v=j(()=>{const M=S.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&M}),H=F("");return lt(()=>{o.value&&(H.value=window.getComputedStyle(o.value).zIndex)}),K1({placedSide:I,onArrowChange:M=>l.value=M,arrowX:j(()=>S.value.arrow?.x??0),arrowY:j(()=>S.value.arrow?.y??0),shouldHideArrow:v}),(M,x)=>(R(),Se("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:xt({...f(g),transform:f(_)?f(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H.value,"--reka-popper-transform-origin":[f(S).transformOrigin?.x,f(S).transformOrigin?.y].join(" "),...f(S).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[D(f(We),we({ref:f(i)},M.$attrs,{"as-child":r.asChild,as:M.as,"data-side":I.value,"data-align":N.value,style:{animation:f(_)?void 0:"none"}}),{default:k(()=>[se(M.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),W1={top:"bottom",right:"left",bottom:"top",left:"right"},G1=X({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}=$e(),r=z1(),n=j(()=>W1[r.placedSide.value]);return(s,i)=>(R(),Se("span",{ref:o=>{f(r).onArrowChange(o)},style:xt({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})},[D(zb,we(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(()=>[se(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function Mh(e){const t=Ko({nonce:F()});return j(()=>e?.value||t.nonce?.value)}function J1(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function Nh(e,t,r){return Ai(100/(r-t)*(e-t),0,100)}function Y1(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function Z1(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 X1(e,t,r){const n=e/2;return(n-Ec([0,50],[0,n])(t)*r)*r}function Q1(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function e2(e,t){if(t>0){const r=Q1(e);return Math.min(...r)>=t}return!0}function Ec(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 t2(e){return(String(e).split(".")[1]||"").length}function r2(e,t){const r=10**t;return Math.round(e*r)/r}var qh=["PageUp","PageDown"],Bh=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Lh={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[Fh,Vh]=Nt(["SliderVertical","SliderHorizontal"]),n2=X({__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}=Ht(r),{forwardRef:l,currentElement:u}=$e(),c=Fs(),d=F(),p=F(),h=j(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(w,T){const g=p.value||u.value.getBoundingClientRect(),C=[...c.thumbElements.value][c.valueIndexToChangeRef.value],_=c.thumbAlignment.value==="contain"?C.clientWidth:0;!d.value&&!T&&c.thumbAlignment.value==="contain"&&(d.value=w.clientX-C.getBoundingClientRect().left);const S=Ec([0,g.width-_],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=g,S(T?w.clientX-g.left-_/2:w.clientX-g.left-(d.value??0))}return Vh({startEdge:j(()=>h.value?"left":"right"),endEdge:j(()=>h.value?"right":"left"),direction:j(()=>h.value?1:-1),size:"width"}),(w,T)=>(R(),K(jh,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:xt({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:T[0]||(T[0]=g=>{n("slideStart",m(g,!0))}),onSlideMove:T[1]||(T[1]=g=>{n("slideMove",m(g))}),onSlideEnd:T[2]||(T[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:T[3]||(T[3]=g=>{const C=h.value?"from-left":"from-right";n("stepKeyDown",g,f(Lh)[C].includes(g.key)?-1:1)}),onEndKeyDown:T[4]||(T[4]=g=>n("endKeyDown",g)),onHomeKeyDown:T[5]||(T[5]=g=>n("homeKeyDown",g))},{default:k(()=>[se(w.$slots,"default")]),_:3},8,["dir","style"]))}}),s2=X({__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}=Ht(r),a=Fs(),{forwardRef:l,currentElement:u}=$e(),c=F(),d=F(),p=j(()=>!o.value);function h(m,w){const T=d.value||u.value.getBoundingClientRect(),g=[...a.thumbElements.value][a.valueIndexToChangeRef.value],C=a.thumbAlignment.value==="contain"?g.clientHeight:0;!c.value&&!w&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-g.getBoundingClientRect().top);const _=Ec([0,T.height-C],p.value?[s.value,i.value]:[i.value,s.value]),S=w?m.clientY-T.top-C/2:m.clientY-T.top-(c.value??0);return d.value=T,_(S)}return Vh({startEdge:j(()=>p.value?"bottom":"top"),endEdge:j(()=>p.value?"top":"bottom"),direction:j(()=>p.value?1:-1),size:"height"}),(m,w)=>(R(),K(jh,{ref:f(l),"data-orientation":"vertical",style:xt({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:w[0]||(w[0]=T=>{n("slideStart",h(T,!0))}),onSlideMove:w[1]||(w[1]=T=>{n("slideMove",h(T))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=T=>{const g=p.value?"from-bottom":"from-top";n("stepKeyDown",T,f(Lh)[g].includes(T.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=T=>n("endKeyDown",T)),onHomeKeyDown:w[5]||(w[5]=T=>n("homeKeyDown",T))},{default:k(()=>[se(m.$slots,"default")]),_:3},8,["style"]))}}),[Fs,i2]=Nt("SliderRoot"),o2=X({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}=Ht(r),p=tc(d),{forwardRef:h,currentElement:m}=$e(),w=Jp(m),{CollectionSlot:T}=cn({isProvider:!0}),g=Os(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),C=j(()=>Array.isArray(g.value)?[...g.value]:[]),_=F(0),S=F(C.value);function E(M){v(M,Z1(C.value,M))}function I(M){v(M,_.value)}function N(){const M=S.value[_.value];C.value[_.value]!==M&&n("valueCommit",ze(C.value))}function v(M,x,{commit:b}={commit:!1}){const y=t2(o.value),O=Ai(r2(Math.round((M-s.value)/o.value)*o.value+s.value,y),s.value,i.value),q=J1(C.value,O,x);if(e2(q,a.value*o.value)){_.value=q.indexOf(O);const B=String(q)!==String(g.value);B&&b&&n("valueCommit",q),B&&(H.value[_.value]?.focus(),g.value=q)}}const H=F([]);return i2({modelValue:g,currentModelValue:C,valueIndexToChangeRef:_,thumbElements:H,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(M,x)=>(R(),K(f(T),null,{default:k(()=>[(R(),K(li(f(l)==="horizontal"?n2:s2),we(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:x[0]||(x[0]=()=>{f(u)||(S.value=C.value)}),onSlideStart:x[1]||(x[1]=b=>!f(u)&&E(b)),onSlideMove:x[2]||(x[2]=b=>!f(u)&&I(b)),onSlideEnd:x[3]||(x[3]=b=>!f(u)&&N()),onHomeKeyDown:x[4]||(x[4]=b=>!f(u)&&v(f(s),0,{commit:!0})),onEndKeyDown:x[5]||(x[5]=b=>!f(u)&&v(f(i),C.value.length-1,{commit:!0})),onStepKeyDown:x[6]||(x[6]=(b,y)=>{if(!f(u)){const O=f(qh).includes(b.key)||b.shiftKey&&f(Bh).includes(b.key)?10:1,q=_.value,B=C.value[q];v(B+f(o)*O*y,q,{commit:!0})}})}),{default:k(()=>[se(M.$slots,"default",{modelValue:f(g)}),f(w)&&M.name?(R(),K(f(Fb),{key:0,type:"number",value:f(g),name:M.name,required:M.required,disabled:f(u),step:f(o)},null,8,["value","name","required","disabled","step"])):Ne("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),jh=X({__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=Fs();return(i,o)=>(R(),K(f(We),we({"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(qh).concat(f(Bh)).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(()=>[se(i.$slots,"default")]),_:3},16))}}),a2=X({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Fs(),r=Fh();$e();const n=j(()=>t.currentModelValue.value.map(o=>Nh(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)=>(R(),K(f(We),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:xt({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:k(()=>[se(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),l2=X({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=Fs(),n=Fh(),{forwardRef:s,currentElement:i}=$e(),{CollectionItem:o}=cn(),a=j(()=>r.modelValue?.value?.[t.index]),l=j(()=>a.value===void 0?0:Nh(a.value,r.min.value??0,r.max.value??100)),u=j(()=>Y1(t.index,r.modelValue?.value?.length??0)),c=Xp(i),d=j(()=>c[n.size].value),p=j(()=>r.thumbAlignment.value==="overflow"||!d.value?0:X1(d.value,l.value,n.direction.value)),h=Zl();return Qe(()=>{r.thumbElements.value.push(i.value)}),Vt(()=>{const m=r.thumbElements.value.findIndex(w=>w===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,w)=>(R(),K(f(o),null,{default:k(()=>[D(f(We),we(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(()=>[se(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}))}}),c2=X({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=cn(),{forwardRef:n,currentElement:s}=$e(),i=j(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>(R(),K(l2,we({ref:f(n)},t,{index:i.value}),{default:k(()=>[se(o.$slots,"default")]),_:3},16,["index"]))}}),u2=X({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Fs();return $e(),(r,n)=>(R(),K(f(We),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:k(()=>[se(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),d2=X({__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 $e(),(r,n)=>(R(),K(f(We),we(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),[ir,f2]=Nt("ScrollAreaRoot"),p2=X({__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}=Ht(r),m=tc(p);function w(){i.value?.scrollTo({top:0})}function T(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:T});const{forwardRef:g,currentElement:C}=$e();return f2({type:d,dir:m,scrollHideDelay:h,scrollArea:C,viewport:i,onViewportChange:_=>{i.value=_||void 0},content:o,onContentChange:_=>{o.value=_},scrollbarX:a,scrollbarXEnabled:u,scrollbarY:l,scrollbarYEnabled:c,onScrollbarXChange:_=>{a.value=_||void 0},onScrollbarYChange:_=>{l.value=_||void 0},onScrollbarXEnabledChange:_=>{u.value=_},onScrollbarYEnabledChange:_=>{c.value=_},onCornerWidthChange:_=>{n.value=_},onCornerHeightChange:_=>{s.value=_}}),(_,S)=>(R(),K(f(We),{ref:f(g),"as-child":r.asChild,as:_.as,dir:f(m),style:xt({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:k(()=>[se(_.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),h2=X({__name:"ScrollAreaCornerImpl",setup(e){const t=ir(),r=F(0),n=F(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 ss(t.scrollbarX.value,i),ss(t.scrollbarY.value,o),Oe(()=>t.scrollbarX.value,i),Oe(()=>t.scrollbarY.value,o),(a,l)=>s.value?(R(),K(f(We),we({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(()=>[se(a.$slots,"default")]),_:3},16,["style"])):Ne("v-if",!0)}}),g2=X({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=$e(),n=ir(),s=j(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=j(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?(R(),K(h2,we({key:0},t,{ref:f(r)}),{default:k(()=>[se(o.$slots,"default")]),_:3},16)):Ne("v-if",!0)}});function Uh(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 la(e){const t=zh(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function zh(e,t){const r=e/t;return Number.isNaN(r)?0:r}function v2(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 Kh(e,t,r="ltr"){const n=la(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=Ai(e,l[0],l[1]);return Uh([0,o],[0,a])(u)}function ca(e){return e?Number.parseInt(e,10):0}function m2(e,t,r,n="ltr"){const s=la(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 Uh([l,u],d)(e)}function Wh(e,t){return e>0&&e<t}var w2=X({__name:"ScrollAreaScrollbarX",setup(e){const t=ir(),r=ua(),{forwardRef:n,currentElement:s}=$e();Qe(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=j(()=>r.sizes.value);return(o,a)=>(R(),K(Gh,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:xt({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(la)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:k(()=>[se(o.$slots,"default")]),_:3},8,["style"]))}}),y2=X({__name:"ScrollAreaScrollbarY",setup(e){const t=ir(),r=ua(),{forwardRef:n,currentElement:s}=$e();Qe(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=j(()=>r.sizes.value);return(o,a)=>(R(),K(Gh,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:xt({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(la)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:k(()=>[se(o.$slots,"default")]),_:3},8,["style"]))}}),Ac=X({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ir(),r=Ii(),{forwardRef:n}=$e(),s=F(!1),i=Yl(()=>{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 Qe(()=>i()),ss(t.viewport,i),ss(t.content,i),(o,a)=>(R(),K(f(On),{present:o.forceMount||s.value},{default:k(()=>[D(kc,we(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[se(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),b2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ir(),r=Ii(),{forwardRef:n}=$e(),{state:s,dispatch:i}=sc("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=Yl(()=>i("SCROLL_END"),100);return lt(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),lt(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),lt(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)})}}),Qe(()=>{const c=t.scrollArea.value;c&&(c.addEventListener("pointerenter",a),c.addEventListener("pointerleave",l))}),Vt(()=>{const c=t.scrollArea.value;c&&(c.removeEventListener("pointerenter",a),c.removeEventListener("pointerleave",l))}),(c,d)=>(R(),K(f(On),{present:c.forceMount||o.value},{default:k(()=>[D(Ac,we(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:k(()=>[se(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),_2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ir(),{forwardRef:r}=$e();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 Qe(()=>{const a=t.scrollArea.value;a&&(a.addEventListener("pointerenter",i),a.addEventListener("pointerleave",o))}),Vt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>(R(),K(f(On),{present:a.forceMount||s.value},{default:k(()=>[D(Ac,we(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:k(()=>[se(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),S2=X({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=ir(),r=Ii(),{forwardRef:n}=$e(),{state:s,dispatch:i}=sc("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");lt(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=Yl(()=>i("SCROLL_END"),100);return lt(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)=>(R(),K(f(On),{present:l.forceMount||o.value},{default:k(()=>[D(kc,we(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:k(()=>[se(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Ii,C2]=Nt("ScrollAreaScrollbar"),x2=X({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}=$e(),n=ir(),s=j(()=>t.orientation==="horizontal");Oe(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),Vt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=Ht(t);return C2({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?(R(),K(_2,we({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?(R(),K(S2,we({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?(R(),K(b2,we({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?(R(),K(Ac,we({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:k(()=>[se(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?(R(),K(kc,we({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:k(()=>[se(u.$slots,"default")]),_:3},16)):Ne("v-if",!0)}}),[ua,T2]=Nt("ScrollAreaScrollbarVisible"),kc=X({__name:"ScrollAreaScrollbarVisible",setup(e){const t=ir(),r=Ii(),{forwardRef:n}=$e(),s=F({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=j(()=>{const g=zh(s.value.viewport,s.value.content);return g>0&&g<1}),o=F(),a=F(0);function l(g,C){if(h.value){const _=t.viewport.value.scrollLeft+g.deltaY;t.viewport.value.scrollLeft=_,Wh(_,C)&&g.preventDefault()}else{const _=t.viewport.value.scrollTop+g.deltaY;t.viewport.value.scrollTop=_,Wh(_,C)&&g.preventDefault()}}function u(g,C){h.value?a.value=C.x:a.value=C.y}function c(g){a.value=0}function d(g){s.value=g}function p(g,C){return m2(g,a.value,s.value,C)}const h=j(()=>r.isHorizontal.value);function m(g){h.value?t.viewport.value.scrollLeft=p(g,t.dir.value):t.viewport.value.scrollTop=p(g)}function w(){if(h.value){if(t.viewport.value&&o.value){const g=t.viewport.value.scrollLeft,C=Kh(g,s.value,t.dir.value);o.value.style.transform=`translate3d(${C}px, 0, 0)`}}else if(t.viewport.value&&o.value){const g=t.viewport.value.scrollTop,C=Kh(g,s.value);o.value.style.transform=`translate3d(0, ${C}px, 0)`}}function T(g){o.value=g}return T2({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:T,onDragScroll:m}),(g,C)=>h.value?(R(),K(w2,we({key:0},g.$attrs,{ref:f(n)}),{default:k(()=>[se(g.$slots,"default")]),_:3},16)):(R(),K(y2,we({key:1},g.$attrs,{ref:f(n)}),{default:k(()=>[se(g.$slots,"default")]),_:3},16))}}),Gh=X({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=ir(),i=ua(),o=Ii(),{forwardRef:a,currentElement:l}=$e(),u=F(""),c=F();function d(g){c.value&&n("onDragScroll",{x:g.clientX-c.value?.left,y:g.clientY-c.value?.top})}function p(g){g.button===0&&(g.target.setPointerCapture(g.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(g))}function h(g){d(g)}function m(g){const C=g.target;C.hasPointerCapture(g.pointerId)&&C.releasePointerCapture(g.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function w(g){const C=g.target,_=l.value?.contains(C),S=i.sizes.value.content-i.sizes.value.viewport;_&&i.handleWheelScroll(g,S)}Qe(()=>{document.addEventListener("wheel",w,{passive:!1})}),Vt(()=>{document.removeEventListener("wheel",w)});function T(){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:ca(getComputedStyle(l.value).paddingLeft),paddingEnd:ca(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:ca(getComputedStyle(l.value).paddingTop),paddingEnd:ca(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return ss(l,T),ss(s.content,T),(g,C)=>(R(),K(f(We),{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(()=>[se(g.$slots,"default")]),_:3},8,["as","as-child"]))}}),E2=X({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=ir(),n=ua();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}=$e(),l=F(),u=j(()=>r.viewport.value);function c(){l.value||(l.value=v2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return Ly(j(()=>n.sizes.value),()=>{n.onThumbChange(a.value),u.value&&(n.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),Vt(()=>{u.value.removeEventListener("scroll",c),r.viewport.value?.removeEventListener("scroll",c)}),(d,p)=>(R(),K(f(We),{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(()=>[se(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),A2=X({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}=Ht(r),s=Mh(n),i=ir(),o=F();Qe(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=$e();return(u,c)=>(R(),Se(Ke,null,[Q("div",we({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}),[D(f(We),{ref:f(a),style:xt({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:k(()=>[se(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),D(f(We),{as:"style",nonce:f(s)},{default:k(()=>c[0]||(c[0]=[qe(" /* 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))}}),k2=[" ","Enter","ArrowUp","ArrowDown"],R2=[" ","Enter"],Bx=10;function $i(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>Rc(n,t,r)):Rc(e,t,r)}function Rc(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]:my(e,t)}function I2(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var $2={key:0,value:""},[Bn,Jh]=Nt("SelectRoot"),P2=X({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}=Ht(r),l=Os(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=Os(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=F(),d=F(),p=F({x:0,y:0}),h=j(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:Kl(l.value));cn({isProvider:!0});const m=tc(a),w=Jp(c),T=F(new Set),g=j(()=>Array.from(T.value).map(S=>S.value).join(";"));function C(S){if(o.value){const E=Array.isArray(l.value)?[...l.value]:[],I=E.findIndex(N=>Rc(N,S,r.by));I===-1?E.push(S):E.splice(I,1),l.value=[...E]}else l.value=S}function _(S){return Array.from(T.value).find(E=>$i(S,E.value,r.by))}return Jh({triggerElement:c,onTriggerChange:S=>{c.value=S},valueElement:d,onValueElementChange:S=>{d.value=S},contentId:"",modelValue:l,onValueChange:C,by:r.by,open:u,multiple:o,required:s,onOpenChange:S=>{u.value=S},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:T,onOptionAdd:S=>{const E=_(S.value);E&&T.value.delete(E),T.value.add(S)},onOptionRemove:S=>{const E=_(S.value);E&&T.value.delete(E)}}),(S,E)=>(R(),K(f(fh),null,{default:k(()=>[se(S.$slots,"default",{modelValue:f(l),open:f(u)}),f(w)?(R(),K(D2,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:S.name,autocomplete:S.autocomplete,disabled:f(i),value:f(l)},{default:k(()=>[f(Kl)(f(l))?(R(),Se("option",$2)):Ne("v-if",!0),(R(!0),Se(Ke,null,cr(Array.from(T.value),I=>(R(),Se("option",we({key:I.value??""},{ref_for:!0},I),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Ne("v-if",!0)]),_:3}))}}),D2=X({__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=Bn();Oe(()=>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)=>(R(),K(f(dc),{"as-child":""},{default:k(()=>[Q("select",we({ref_key:"selectElement",ref:r},t,{onInput:s}),[se(i.$slots,"default")],16)]),_:3}))}}),O2=X({__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=an(e);return(r,n)=>(R(),K(f(Hh),we(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(()=>[se(r.$slots,"default")]),_:3},16))}}),H2={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[ls,Yh]=Nt("SelectContent"),M2=X({__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=Bn();tb(),Kp(r.bodyLock);const{CollectionSlot:i,getItems:o}=cn(),a=F();Zp(a);const{search:l,handleTypeaheadSearch:u}=Qp(),c=F(),d=F(),p=F(),h=F(!1),m=F(!1),w=F(!1);function T(){d.value&&a.value&&ah([d.value,a.value])}Oe(h,()=>{T()});const{onOpenChange:g,triggerPointerDownPosRef:C}=s;lt(E=>{if(!a.value)return;let I={x:0,y:0};const N=H=>{I={x:Math.abs(Math.round(H.pageX)-(C.value?.x??0)),y:Math.abs(Math.round(H.pageY)-(C.value?.y??0))}},v=H=>{H.pointerType!=="touch"&&(I.x<=10&&I.y<=10?H.preventDefault():a.value?.contains(H.target)||g(!1),document.removeEventListener("pointermove",N),C.value=null)};C.value!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",v,{capture:!0,once:!0})),E(()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",v,{capture:!0})})});function _(E){const I=E.ctrlKey||E.altKey||E.metaKey;if(E.key==="Tab"&&E.preventDefault(),!I&&E.key.length===1&&u(E.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(E.key)){let N=[...o().map(v=>v.ref)];if(["ArrowUp","End"].includes(E.key)&&(N=N.slice().reverse()),["ArrowUp","ArrowDown"].includes(E.key)){const v=E.target,H=N.indexOf(v);N=N.slice(H+1)}setTimeout(()=>ah(N)),E.preventDefault()}}const S=an(j(()=>r.position==="popper"?r:{}).value);return Yh({content:a,viewport:c,onViewportChange:E=>{c.value=E},itemRefCallback:(E,I,N)=>{const v=!m.value&&!N,H=$i(s.modelValue.value,I,s.by);if(s.multiple.value){if(w.value)return;(H||v)&&(d.value=E,H&&(w.value=!0))}else(H||v)&&(d.value=E);v&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(E,I,N)=>{const v=!m.value&&!N;($i(s.modelValue.value,I,s.by)||v)&&(p.value=E)},focusSelectedItem:T,position:r.position,isPositioned:h,searchRef:l}),(E,I)=>(R(),K(f(i),null,{default:k(()=>[D(f(ih),{"as-child":"",onMountAutoFocus:I[6]||(I[6]=pr(()=>{},["prevent"])),onUnmountAutoFocus:I[7]||(I[7]=N=>{n("closeAutoFocus",N),!N.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),N.preventDefault())})},{default:k(()=>[D(f(ac),{"as-child":"","disable-outside-pointer-events":E.disableOutsidePointerEvents,onFocusOutside:I[2]||(I[2]=pr(()=>{},["prevent"])),onDismiss:I[3]||(I[3]=N=>f(s).onOpenChange(!1)),onEscapeKeyDown:I[4]||(I[4]=N=>n("escapeKeyDown",N)),onPointerDownOutside:I[5]||(I[5]=N=>n("pointerDownOutside",N))},{default:k(()=>[(R(),K(li(E.position==="popper"?O2:q2),we({...E.$attrs,...f(S)},{id:f(s).contentId,ref:N=>{const v=f(Xt)(N);v?.hasAttribute("data-reka-popper-content-wrapper")?a.value=v.firstElementChild:a.value=v},role:"listbox","data-state":f(s).open.value?"open":"closed",dir:f(s).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:I[0]||(I[0]=pr(()=>{},["prevent"])),onPlaced:I[1]||(I[1]=N=>h.value=!0),onKeydown:_}),{default:k(()=>[se(E.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[Ic,N2]=Nt("SelectItemAlignedPosition"),q2=X({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}=cn(),i=Bn(),o=ls(),a=F(!1),l=F(!0),u=F(),{forwardRef:c,currentElement:d}=$e(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:w}=o;function T(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const _=i.triggerElement.value.getBoundingClientRect(),S=d.value.getBoundingClientRect(),E=i.valueElement.value.getBoundingClientRect(),I=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const Pe=I.left-S.left,Ge=E.left-Pe,mt=_.left-Ge,je=_.width+mt,et=Math.max(je,S.width),wt=window.innerWidth-10,Ct=Ai(Ge,10,Math.max(10,wt-et));u.value.style.minWidth=`${je}px`,u.value.style.left=`${Ct}px`}else{const Pe=S.right-I.right,Ge=window.innerWidth-E.right-Pe,mt=window.innerWidth-_.right-Ge,je=_.width+mt,et=Math.max(je,S.width),wt=window.innerWidth-10,Ct=Ai(Ge,10,Math.max(10,wt-et));u.value.style.minWidth=`${je}px`,u.value.style.right=`${Ct}px`}const N=s().map(Pe=>Pe.ref),v=window.innerHeight-20,H=p.value.scrollHeight,M=window.getComputedStyle(d.value),x=Number.parseInt(M.borderTopWidth,10),b=Number.parseInt(M.paddingTop,10),y=Number.parseInt(M.borderBottomWidth,10),O=Number.parseInt(M.paddingBottom,10),q=x+b+H+O+y,B=Math.min(h.value.offsetHeight*5,q),Z=window.getComputedStyle(p.value),W=Number.parseInt(Z.paddingTop,10),le=Number.parseInt(Z.paddingBottom,10),G=_.top+_.height/2-10,ie=v-G,he=h.value.offsetHeight/2,ke=h.value.offsetTop+he,Ve=x+b+ke,Re=q-Ve;if(Ve<=G){const Pe=h.value===N[N.length-1];u.value.style.bottom="0px";const Ge=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,mt=Ve+Math.max(ie,he+(Pe?le:0)+Ge+y);u.value.style.height=`${mt}px`}else{const Pe=h.value===N[0];u.value.style.top="0px";const Ge=Math.max(G,x+p.value.offsetTop+(Pe?W:0)+he)+Re;u.value.style.height=`${Ge}px`,p.value.scrollTop=Ve-G+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${B}px`,u.value.style.maxHeight=`${v}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=F("");Qe(async()=>{await Tt(),T(),d.value&&(g.value=window.getComputedStyle(d.value).zIndex)});function C(_){_&&l.value===!0&&(T(),w?.(),l.value=!1)}return ss(i.triggerElement,()=>{T()}),N2({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:C}),(_,S)=>(R(),Se("div",{ref_key:"contentWrapperElement",ref:u,style:xt({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[D(f(We),we({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{..._.$attrs,...r}),{default:k(()=>[se(_.$slots,"default")]),_:3},16)],4))}}),B2=X({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return Jh(e.context),Yh(H2),(t,r)=>se(t.$slots,"default")}}),L2={key:1},F2=X({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=ln(r,t),s=Bn(),i=F();Qe(()=>{i.value=new DocumentFragment});const o=F(),a=j(()=>r.forceMount||s.open.value),l=F(a.value);return Oe(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?(R(),K(f(On),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:k(()=>[D(M2,br(ur({...f(n),...u.$attrs})),{default:k(()=>[se(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?(R(),Se("div",L2,[(R(),K(Va,{to:i.value},[D(B2,{context:f(s)},{default:k(()=>[se(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Ne("v-if",!0)}}),[Lx,V2]=Nt("SelectGroup"),j2=X({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Ms(void 0,"reka-select-group");return V2({id:r}),(n,s)=>(R(),K(f(We),we({role:"group"},t,{"aria-labelledby":f(r)}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),U2=X({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>(R(),K(f(We),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:k(()=>[se(t.$slots,"default",{},()=>[r[0]||(r[0]=qe("▼"))])]),_:3},8,["as","as-child"]))}}),[Zh,z2]=Nt("SelectItem"),K2=X({__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}=Ht(r),i=Bn(),o=ls(),{forwardRef:a,currentElement:l}=$e(),{CollectionItem:u}=cn(),c=j(()=>$i(i.modelValue?.value,r.value,i.by)),d=F(!1),p=F(r.textValue??""),h=Ms(void 0,"reka-select-item-text"),m="select.select";async function w(S){S.defaultPrevented||zl(m,T,{originalEvent:S,value:r.value})}async function T(S){await Tt(),n("select",S),!S.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function g(S){await Tt(),!S.defaultPrevented&&(s.value?o.onItemLeave?.():S.currentTarget?.focus({preventScroll:!0}))}async function C(S){await Tt(),!S.defaultPrevented&&S.currentTarget===rr()&&o.onItemLeave?.()}async function _(S){await Tt(),!S.defaultPrevented&&(o.searchRef?.value!==""&&S.key===" "||(R2.includes(S.key)&&w(S),S.key===" "&&S.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 Qe(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),z2({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:S=>{p.value=((p.value||S?.textContent)??"").trim()}}),(S,E)=>(R(),K(f(u),{value:{textValue:p.value}},{default:k(()=>[D(f(We),{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:S.as,"as-child":S.asChild,onFocus:E[0]||(E[0]=I=>d.value=!0),onBlur:E[1]||(E[1]=I=>d.value=!1),onPointerup:w,onPointerdown:E[2]||(E[2]=I=>{I.currentTarget.focus({preventScroll:!0})}),onTouchend:E[3]||(E[3]=pr(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:C,onKeydown:_},{default:k(()=>[se(S.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),W2=X({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Zh();return(n,s)=>f(r).isSelected.value?(R(),K(f(We),we({key:0,"aria-hidden":"true"},t),{default:k(()=>[se(n.$slots,"default")]),_:3},16)):Ne("v-if",!0)}}),G2=X({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=Bn(),n=ls(),s=Zh(),{forwardRef:i,currentElement:o}=$e(),a=j(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return Qe(()=>{o.value&&(s.onItemTextChange(o.value),n.itemTextRefCallback(o.value,s.value,s.disabled.value),r.onOptionAdd(a.value))}),Vt(()=>{r.onOptionRemove(a.value)}),(l,u)=>(R(),K(f(We),we({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:k(()=>[se(l.$slots,"default")]),_:3},16,["id"]))}}),J2=X({__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)=>(R(),K(f(uc),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),Xh=X({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=cn(),s=ls(),i=F(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}lt(()=>{n().map(u=>u.ref).find(u=>u===rr())?.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 Ts(()=>o()),(u,c)=>(R(),K(f(We),we({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:k(()=>[se(u.$slots,"default")]),_:3},16))}}),Y2=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=ls(),r=t.position==="item-aligned"?Ic():void 0,{forwardRef:n,currentElement:s}=$e(),i=F(!1);return lt(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))}}),Oe(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(R(),K(Xh,{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(()=>[se(o.$slots,"default")]),_:3},512)):Ne("v-if",!0)}}),Z2=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=ls(),r=t.position==="item-aligned"?Ic():void 0,{forwardRef:n,currentElement:s}=$e(),i=F(!1);return lt(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))}}),Oe(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?(R(),K(Xh,{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(()=>[se(o.$slots,"default")]),_:3},512)):Ne("v-if",!0)}}),X2=X({__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=Bn(),{forwardRef:n,currentElement:s}=$e(),i=j(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=Ms(void 0,"reka-select-content")),Qe(()=>{r.onTriggerChange(s.value)});const{getItems:o}=cn(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=Qp();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)=>(R(),K(f(ph),{"as-child":"",reference:p.reference},{default:k(()=>[D(f(We),{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(I2)(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]=pr(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(k2).includes(m.key)&&(c(),m.preventDefault()))})},{default:k(()=>[se(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"]))}}),Q2=X({__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}=$e(),s=Bn();Qe(()=>{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)=>(R(),K(f(We),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:k(()=>[se(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[qe(Le(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),e_=X({__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}=Ht(t),n=Mh(r),s=ls(),i=s.position==="item-aligned"?Ic():void 0,{forwardRef:o,currentElement:a}=$e();Qe(()=>{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,T=Number.parseFloat(h.value.style.minHeight),g=Number.parseFloat(h.value.style.height),C=Math.max(T,g);if(C<w){const _=C+m,S=Math.min(w,_),E=_-S;h.value.style.height=`${S}px`,h.value.style.bottom==="0px"&&(d.scrollTop=E>0?E:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>(R(),Se(Ke,null,[D(f(We),we({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:k(()=>[se(c.$slots,"default")]),_:3},16),D(f(We),{as:"style",nonce:f(n)},{default:k(()=>d[0]||(d[0]=[qe(" /* 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))}}),t_=X({__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)=>(R(),K(f(We),we({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:k(()=>[se(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),r_=X({__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)=>(R(),K(t_,br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),n_=X({__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 $e(),(r,n)=>(R(),K(f(G1),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),[da,s_]=Nt("TooltipProvider"),i_=X({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}=Ht(e);$e();const l=F(!0),u=F(!1),{start:c,stop:d}=Fp(()=>{l.value=!0},r,{immediate:!1});return s_({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)=>se(p.$slots,"default")}}),Qh="tooltip.open",[fa,o_]=Nt("TooltipRoot"),a_=X({__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;$e();const s=da(),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=Os(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Oe(c,_=>{s.onClose&&(_?(s.onOpen(),document.dispatchEvent(new CustomEvent(Qh))):s.onClose())});const d=F(!1),p=F(),h=j(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:w}=Fp(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function T(){w(),d.value=!1,c.value=!0}function g(){w(),c.value=!1}function C(){m()}return o_({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(_){p.value=_},onTriggerEnter(){s.isOpenDelayed.value?C():T()},onTriggerLeave(){i.value?g():w()},onOpen:T,onClose:g,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(_,S)=>(R(),K(f(fh),null,{default:k(()=>[se(_.$slots,"default",{open:f(c)})]),_:3}))}}),eg=X({__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=fa(),i=da(),{forwardRef:o,currentElement:a}=$e(),l=j(()=>r.ariaLabel||a.value?.textContent),u=j(()=>{const{ariaLabel:c,...d}=r;return zp(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return Qe(()=>{Ut(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),Ut(window,Qh,s.onClose)}),(c,d)=>(R(),K(f(ac),{"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]=pr(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:k(()=>[D(f(Hh),we({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(()=>[se(c.$slots,"default"),D(f(dc),{id:f(s).contentId,role:"tooltip"},{default:k(()=>[qe(Le(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),l_=X({__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=an(e),{forwardRef:r,currentElement:n}=$e(),{trigger:s,onClose:i}=fa(),o=da(),{isPointerInTransit:a,onPointerExit:l}=rb(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>(R(),K(eg,we({ref:f(r)},f(t)),{default:k(()=>[se(u.$slots,"default")]),_:3},16))}}),c_=X({__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=fa(),i=ln(r,n),{forwardRef:o}=$e();return(a,l)=>(R(),K(f(On),{present:a.forceMount||f(s).open.value},{default:k(()=>[(R(),K(li(f(s).disableHoverableContent.value?eg:l_),we({ref:f(o)},f(i)),{default:k(()=>[se(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),u_=X({__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)=>(R(),K(f(uc),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),d_=X({__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=fa(),n=da();r.contentId||(r.contentId=Ms(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=$e(),o=F(!1),a=F(!1),l=j(()=>r.disabled.value?{}:{click:w,focus:h,pointermove:d,pointerleave:p,pointerdown:c,blur:m});Qe(()=>{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(T){T.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(T){o.value||r.ignoreNonKeyboardFocus.value&&!T.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(T,g)=>(R(),K(f(ph),{"as-child":"",reference:T.reference},{default:k(()=>[D(f(We),we({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:T.as,"as-child":t.asChild,"data-grace-area-trigger":""},ud(l.value)),{default:k(()=>[se(T.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),f_=X({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},type:{default:"button"},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(r,n)=>(R(),K(f(We),{"data-slot":"button",as:e.as,"as-child":e.asChild,type:e.as==="button"?e.type:void 0,class:it(f(dt)(f(p_)({variant:e.variant,size:e.size}),t.class))},{default:k(()=>[se(r.$slots,"default")]),_:3},8,["as","as-child","type","class"]))}}),ft=f_;const p_=fy("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 h_={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"},g_=X({__name:"KeyPad",setup(e){const t=Ft("webphone"),{sendDTMF:r}=Ft("sip"),{playDtmf:n}=cp(),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)=>(R(),Se("div",h_,[(R(),Se(Ke,null,cr(s,l=>D(f(ft),{key:l,type:"button",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(()=>[qe(Le(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),$c=g_;var tg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),v_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),m_=e=>{const t=v_(e);return t.charAt(0).toUpperCase()+t.slice(1)},w_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),rg=e=>e==="";var Pi={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 y_=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=Pi.width,color:a=Pi.stroke,...l},{slots:u})=>dr("svg",{...Pi,...l,width:o,height:o,stroke:a,"stroke-width":rg(r)||rg(n)||r===!0||n===!0?Number(s||i||Pi["stroke-width"])*24/Number(o):s||i||Pi["stroke-width"],class:w_("lucide",l.class,...e?[`lucide-${tg(m_(e))}-icon`,`lucide-${tg(e)}`]:["lucide-icon"])},[...t.map(c=>dr(...c)),...u.default?[u.default()]:[]]);var yt=(e,t)=>(r,{slots:n,attrs:s})=>dr(y_,{...s,...r,iconNode:t,name:e},n);var ng=yt("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 sg=yt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var ig=yt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var b_=yt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var Pc=yt("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 __=yt("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 S_=yt("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_=yt("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 x_=yt("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 T_=yt("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 E_=yt("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 og=yt("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 A_=yt("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 k_=yt("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 R_=yt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var I_=yt("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 $_=yt("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 ag=yt("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 lg=yt("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 Dc=yt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),P_=X({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=Os(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>no((R(),Se("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>nt(n)?n.value=o:null),"data-slot":"input",class:it(f(dt)("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)),[[wi,f(n)]])}}),Di=P_,D_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function O_(e,t){return R(),Se("svg",D_,[...t[0]||(t[0]=[dl('<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 Oc={render:O_},H_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function M_(e,t){return R(),Se("svg",H_,[...t[0]||(t[0]=[Q("g",{"clip-path":"url(#a)"},[Q("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),Q("defs",null,[Q("clipPath",{id:"a"},[Q("path",{fill:"#fff",d:"M0 0h9v9H0z"})])],-1)])])}var N_={render:M_},q_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function B_(e,t){return R(),Se("svg",q_,[...t[0]||(t[0]=[dl('<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 L_={render:B_},F_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function V_(e,t){return R(),Se("svg",F_,[...t[0]||(t[0]=[Q("circle",{cx:"9.899",cy:"9.899",r:"6.6",stroke:"currentColor","stroke-width":".8",transform:"rotate(-135 9.9 9.9)"},null,-1),Q("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 j_={render:V_},U_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function z_(e,t){return R(),Se("svg",U_,[...t[0]||(t[0]=[Q("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 Hc={render:z_},K_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function W_(e,t){return R(),Se("svg",K_,[...t[0]||(t[0]=[Q("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),Q("path",{stroke:"currentColor","stroke-linecap":"round",d:"M2 16.293 16.293 2"},null,-1)])])}var Mc={render:W_},G_={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function J_(e,t){return R(),Se("svg",G_,[...t[0]||(t[0]=[Q("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 Nc={render:J_},Y_=["data-call-status"],Z_={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},X_={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},Q_={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},eS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},tS=["data-visible"],rS={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},nS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},sS=["data-visible"],iS={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"},oS=X({__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=Ft("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a,sendDTMF:l}=Ft("sip"),u=/^[0-9*#]+$/,c=x=>{if(u.test(x)){for(const b of x)l(b);for(const b of x)r.appendKeypad(b)}},d=x=>{x.ctrlKey||x.metaKey||x.altKey||x.key.length!==1||(x.preventDefault(),x.stopPropagation(),c(x.key))},p=x=>{x.data&&(x.preventDefault(),x.stopPropagation(),c(x.data))},h=x=>{x.preventDefault(),x.stopPropagation(),c(x.clipboardData?.getData("text").replace(/\s/g,"")||"")};Oe(()=>r.callStatus,(x,b)=>{x==="connected"&&b!=="connected"&&r.clearKeypad()});const m=e,w=t,T=j(()=>!!r.transferInProgress),g=j(()=>m.destination||r.keypadValue||r.lastDialedNumber||""),C=j(()=>!!m.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),_=j(()=>C.value||!!r.lastDialedNumber),S=j(()=>!m.isVideo||!C.value?!1:g.value?/^[0-9*#]{1,5}$/.test(g.value):!0),E=async x=>{try{m.destination?await n(m.destination,x):r.keypadValue?await n(r.keypadValue,x):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(b){if(console.error("Error initiating call:",b),x){let y="No se pudo acceder a la cámara.";const O=b instanceof Error?b.name:String(b);O==="NotReadableError"?y="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":O==="NotAllowedError"||O==="PermissionDeniedError"?y="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":O==="NotFoundError"?y="No se detectó ninguna cámara en el sistema.":y+=" "+(b instanceof Error?b.message:String(b)),confirm(`${y}
|
|
75
75
|
|
|
76
|
-
¿Desea realizar la llamada solo con AUDIO?`)&&E(!1)}else alert("Error al iniciar la llamada: "+(w instanceof Error?w.message:String(w)))}},I=(_=!1)=>{if(m.onAnswer){m.onAnswer(_);return}i(_)},M=async()=>{await s(),await m.onHangup?.()},g=()=>{if(m.onReject){m.onReject();return}s()},H=j(()=>{const _={};return r.channels.forEach(w=>{const S=w.status==="connected"||w.status==="calling"||w.status==="incoming";_[w.id]=S?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),_}),N=j(()=>H.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(_,w)=>(R(),Se("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"?(R(),Se("div",Z_,[b.value?(R(),K(f(ft),{key:0,variant:"default",size:"icon",onClick:w[0]||(w[0]=S=>E(!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(()=>[D(f(L_),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),w[12]||(w[12]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):Ne("",!0),C.value?(R(),K(f(ft),{key:1,variant:"outline",size:"icon",onClick:w[1]||(w[1]=S=>E(!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(()=>[D(f(j_),{class:it(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",N.value])},null,8,["class"]),w[13]||(w[13]=Q("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})):Ne("",!0)])):Ne("",!0),f(r).callStatus==="incoming"?(R(),Se(Ke,{key:1},[f(r).activeChannel?.hasVideo?(R(),K(f(ft),{key:0,variant:"default",size:"icon",onClick:w[2]||(w[2]=S=>I(!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(()=>[D(f($_),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):Ne("",!0),D(f(ft),{variant:"default",size:"icon",onClick:w[3]||(w[3]=S=>I(!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(()=>[D(f(og),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),D(f(ft),{variant:"destructive",size:"icon",onClick:g,"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(()=>[D(f(Oc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):Ne("",!0),f(r).callStatus==="connected"?(R(),Se("div",X_,[Q("div",Q_,[D(f(ft),{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?(R(),K(f(__),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):(R(),K(f(S_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),D(f(ft),{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?(R(),K(f(k_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):(R(),K(f(C_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),T.value?Ne("",!0):(R(),K(f(ft),{key:0,variant:"secondary",size:"icon",onClick:w[4]||(w[4]=S=>y("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(()=>[D(f(N_),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),Q("div",eS,[D(f(ft),{variant:"ghost",size:"icon",onClick:w[5]||(w[5]=S=>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?(R(),K(f(Mc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(R(),K(f(Hc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),D(f(Pi),{"model-value":f(r).keypadValue,type:"text",inputmode:"tel",pattern:"[0-9*#]*",placeholder:"Marcar opción (0-9, * o #)...","aria-label":"Tonos de marcación",onKeydown:d,onBeforeinput:p,onPaste:h,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,["model-value"]),Q("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:w[6]||(w[6]=pr(S=>f(r).backspaceKeypad(),["stop"]))},[D(f(Nc),{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"})])]),Q("div",{class:it(["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"},[D($c)],10,tS),D(f(ft),{size:"icon",onClick:M,"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(()=>[D(f(Oc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),w[14]||(w[14]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):Ne("",!0),f(r).callStatus==="calling"?(R(),Se("div",rS,[Q("div",nS,[D(f(ft),{variant:"ghost",size:"icon",onClick:w[7]||(w[7]=S=>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?(R(),K(f(Mc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(R(),K(f(Hc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),D(f(Pi),{modelValue:f(r).keypadValue,"onUpdate:modelValue":w[8]||(w[8]=S=>f(r).keypadValue=S),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"]),Q("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:w[9]||(w[9]=pr(S=>f(r).backspaceKeypad(),["stop"]))},[D(f(Nc),{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"})])]),Q("div",{class:it(["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"},[D($c)],10,sS),D(f(ft),{variant:"destructive",size:"lg",onClick:M,"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(()=>[D(f(Oc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),w[15]||(w[15]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):Ne("",!0),T.value&&f(r).callStatus==="connected"?(R(),Se("div",iS,[D(f(ft),{variant:"default",size:"sm",onClick:w[10]||(w[10]=S=>y("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(()=>[D(f(sg),{class:"wp:w-4 wp:h-4"}),w[16]||(w[16]=qe(" Completar Transferencia ",-1))]),_:1}),D(f(ft),{variant:"destructive",size:"sm",onClick:w[11]||(w[11]=S=>y("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:k(()=>[D(f(Dc),{class:"wp:w-4 wp:h-4"}),w[17]||(w[17]=qe(" Cancelar ",-1))]),_:1})])):Ne("",!0)],8,Y_))}}),aS=oS,lS=X({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(R(),Se("kbd",{class:it(f(dt)("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))},[se(r.$slots,"default")],2))}}),pn=lS,cS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function uS(e,t){return R(),Se("svg",cS,[...t[0]||(t[0]=[Q("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 qc={render:uS},dS=X({__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=ln(e,t);return(n,s)=>(R(),K(f(a_),we({"data-slot":"tooltip"},f(r)),{default:k(i=>[se(n.$slots,"default",br(ur(i)))]),_:3},16))}}),da=dS,fS=X({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=ln(Zt(r,"class"),n);return(i,o)=>(R(),K(f(u_),null,{default:k(()=>[D(f(c_),we({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(dt)("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(()=>[se(i.$slots,"default"),D(f(n_),{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}))}}),fa=fS,pS=X({__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)=>(R(),K(f(i_),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),pa=pS,hS=X({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(R(),K(f(d_),we({"data-slot":"tooltip-trigger"},t),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),ha=hS,gS=["data-call-status"],vS={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},mS={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},wS={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},yS={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},bS={class:"webphone-display__dialer-field wp:relative"},_S={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"},SS=["onPointerdown"],CS={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},xS={class:"webphone-display__contact-name wp:truncate"},TS={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},ES={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},AS={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},kS={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},RS={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},IS={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},$S={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},PS={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},DS={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},OS={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},HS=X({__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},maskNumber:{type:Boolean,default:!1}},setup(e){const t=Ft("webphone"),r=Ft("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=j(()=>s.channelId!==void 0?t.channels.find(S=>S.id===s.channelId):t.activeChannel),o=j(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const S=i.value;return S&&S.status!=="idle"?S.isHeld||S.status==="held"?"wp:text-status-hold":S.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=F(!1),l=F(null),u=F(null),c=S=>S.replace(/[^0-9*#]/g,""),d=S=>{S.ctrlKey||S.metaKey||S.altKey||S.key.length!==1||/[0-9*#]/.test(S.key)||S.preventDefault()},p=S=>{S.data&&c(S.data)!==S.data&&S.preventDefault()};Fy(l,()=>{a.value=!1});const h=j({get:()=>i.value?.keypadValue||"",set:S=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(S)})}}),m=j(()=>/^[0-9*#]+$/.test(h.value)),y=j(()=>{if(!h.value)return s.contacts.slice(0,10);const S=h.value.toLowerCase(),O=[];for(const q of s.contacts)if((q.name.toLowerCase().includes(S)||q.number.includes(S))&&(O.push(q),O.length>=10))break;return O}),T=S=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(S.number)}),a.value=!1},v=()=>{!h.value||!m.value||(a.value=!1,r.makeCall(h.value))};Oe(h,()=>{a.value=!0});const x=()=>{h.value&&m.value&&v()},b=()=>{a.value=!1},C=()=>{a.value=!0},E=()=>{setTimeout(()=>{a.value=!1},150)},I=F(Date.now());qy(()=>{I.value=Date.now()},1e3);const M=j(()=>{const S=i.value?.startTime,O=i.value?.status||"idle";if(!S||O!=="connected")return"00:00:00";const q=Math.floor((I.value-S)/1e3);return q<0?"00:00:00":`${Math.floor(q/3600).toString().padStart(2,"0")}:${Math.floor(q%3600/60).toString().padStart(2,"0")}:${(q%60).toString().padStart(2,"0")}`}),g=j(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const S=i.value,O=S?.status||"idle";if(O==="idle")return"Disponible";if(O==="calling")return"Llamando...";if(S?.isHeld){const q=S.remoteNumber||S.keypadValue||"Unknown";return`En espera - ${s.maskNumber?sn(q):q}`}return O==="connected"?"Conectado":O.charAt(0).toUpperCase()+O.slice(1)}),H=S=>{if(!S)return"";const O=S.trim(),q=O.startsWith("+"),B=O.replace(/[^\d]/g,"");return q?`+${B}`:B},N=S=>/\d/.test(S)&&/^[+\d\s().*#-]+$/.test(S.trim()),_=j(()=>{const S=i.value,O=S?.remoteNumber||S?.keypadValue,q=S?.remoteDisplayName;if(!O)return"Unknown";const B=H(O),Z=s.contacts?.find(W=>H(W.number)===B);return Z?s.maskNumber&&N(Z.name)?sn(Z.name):Z.name:q&&q!==O?s.maskNumber&&N(q)?H(q)===B?sn(O):sn(q):q:s.maskNumber?sn(O):O}),w=j(()=>{const S=i.value,O=S?.remoteNumber||S?.keypadValue||"";return s.maskNumber?sn(O):O});return(S,O)=>(R(),Se("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"?(R(),Se("div",{key:0,class:it([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"])},[Q("div",vS,[D(f(qc),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),O[3]||(O[3]=Q("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),Q("span",mS,Le(M.value),1)],2)):Ne("",!0),s.user?(R(),Se("span",{key:1,class:it([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"])},[Q("div",wS,[D(f(qc),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),qe(" "+Le(s.user),1)]),Q("div",{class:it(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},Le(g.value),3)],2)):Ne("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?(R(),Se("div",yS,[Q("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[Q("div",bS,[D(f(pa),null,{default:k(()=>[D(f(da),null,{default:k(()=>[D(f(ha),{"as-child":""},{default:k(()=>[D(f(ft),{onClick:O[0]||(O[0]=q=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:it(f(dt)("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?(R(),K(f(Mc),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):(R(),K(f(Hc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),D(f(fa),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),D(f(Pi),{ref_key:"inputRef",ref:u,modelValue:h.value,"onUpdate:modelValue":O[1]||(O[1]=q=>h.value=q),type:"text",inputmode:"tel",pattern:"[0-9*#]*",onFocus:C,onBlur:E,onKeydown:[d,Tl(x,["enter"]),Tl(b,["escape"])],onBeforeinput:p,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"]),Q("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:O[2]||(O[2]=pr(q=>f(t).backspaceKeypad(),["stop"]))},[D(f(Nc),{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"})])]),to(Q("div",_S,[m.value?(R(),Se("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:pr(v,["prevent"])},[D(f(og),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),Q("span",null,"Marcar "+Le(h.value),1)],32)):Ne("",!0),(R(!0),Se(Ke,null,cr(y.value,q=>(R(),Se("div",{key:q.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:pr(B=>T(q),["prevent"])},[Q("div",{class:it(f(dt)("webphone-display__contact-badge wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",q.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":q.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":q.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":q.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"))},[q.type==="extension"?(R(),K(f(ng),{key:0,class:"wp:w-3 wp:h-3"})):q.type==="contact"?(R(),K(f(Pc),{key:1,class:"wp:w-3 wp:h-3"})):q.type==="voicemail"?(R(),K(f(ag),{key:2,class:"wp:w-3 wp:h-3"})):q.type==="tool"?(R(),K(f(lg),{key:3,class:"wp:w-3 wp:h-3"})):(R(),K(f(Pc),{key:4,class:"wp:w-3 wp:h-3"}))],2),Q("div",CS,[Q("span",xS,Le(q.name),1),Q("span",TS,Le(q.number),1)])],40,SS))),128))],512),[[Co,a.value&&h.value&&(y.value.length>0||m.value)]])],512)])):(i.value?.status||"idle")==="connected"?(R(),Se("div",ES,[Q("div",AS,[Q("div",kS," En llamada con "+Le(_.value),1),_.value!==w.value?(R(),Se("div",RS,Le(w.value),1)):Ne("",!0)])])):(i.value?.status||"idle")!=="idle"?(R(),Se("div",IS,[Q("div",$S,[Q("div",PS,[Q("div",DS,Le(_.value),1),_.value!==w.value?(R(),Se("div",OS,Le(w.value),1)):Ne("",!0)]),D(f(pa),null,{default:k(()=>[D(f(da),null,{default:k(()=>[D(f(ha),{"as-child":""}),D(f(fa),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):Ne("",!0)],8,gS))}}),MS=HS,NS=X({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ln(e,t);return(n,s)=>(R(),K(f(yb),we({"data-slot":"dialog"},f(r)),{default:k(i=>[se(n.$slots,"default",br(ur(i)))]),_:3},16))}}),Bc=NS,qS=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zt(t,"class");return(n,s)=>(R(),K(f(qb),we({"data-slot":"dialog-overlay"},f(r),{class:f(dt)("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(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),BS=qS,LS=X({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=ln(Zt(r,"class"),n);return(i,o)=>(R(),K(f(Bb),null,{default:k(()=>[D(BS),D(f(Mb),we({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(dt)("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(()=>[se(i.$slots,"default"),e.showCloseButton?(R(),K(f(bb),{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(()=>[D(f(Dc)),o[0]||(o[0]=Q("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):Ne("",!0)]),_:3},16,["class"])]),_:3}))}}),Lc=LS,FS=X({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(R(),Se("div",{"data-slot":"dialog-footer",class:it(f(dt)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[se(r.$slots,"default")],2))}}),cg=FS,VS=X({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(R(),Se("div",{"data-slot":"dialog-header",class:it(f(dt)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[se(r.$slots,"default")],2))}}),Fc=VS,jS=X({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=an(Zt(t,"class"));return(n,s)=>(R(),K(f(Lb),we({"data-slot":"dialog-title"},f(r),{class:f(dt)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),Vc=jS,US=X({__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=ln(e,t);return(n,s)=>(R(),K(f(P2),we({"data-slot":"select"},f(r)),{default:k(i=>[se(n.$slots,"default",br(ur(i)))]),_:3},16))}}),jc=US,zS=X({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=ln(Zt(r,"class"),n);return(i,o)=>(R(),K(f(J2),null,{default:k(()=>[D(f(F2),we({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(dt)("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(()=>[D(f(XS)),D(f(e_),{class:it(f(dt)("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(()=>[se(i.$slots,"default")]),_:3},8,["class"]),D(f(YS))]),_:3},16,["class"])]),_:3}))}}),Uc=zS,KS=X({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(R(),K(f(j2),we({"data-slot":"select-group"},t),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),zc=KS,WS={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},GS=X({__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=an(Zt(t,"class"));return(n,s)=>(R(),K(f(K2),we({"data-slot":"select-item"},f(r),{class:f(dt)("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(()=>[Q("span",WS,[D(f(W2),null,{default:k(()=>[se(n.$slots,"indicator-icon",{},()=>[D(f(sg),{class:"wp:size-4"})])]),_:3})]),D(f(G2),null,{default:k(()=>[se(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),ga=GS,JS=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=an(Zt(t,"class"));return(n,s)=>(R(),K(f(Y2),we({"data-slot":"select-scroll-down-button"},f(r),{class:f(dt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:k(()=>[se(n.$slots,"default",{},()=>[D(f(ig),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),YS=JS,ZS=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=an(Zt(t,"class"));return(n,s)=>(R(),K(f(Z2),we({"data-slot":"select-scroll-up-button"},f(r),{class:f(dt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:k(()=>[se(n.$slots,"default",{},()=>[D(f(b_),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),XS=ZS,QS=X({__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=an(Zt(t,"class","size"));return(n,s)=>(R(),K(f(X2),we({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(dt)("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(()=>[se(n.$slots,"default"),D(f(U2),{"as-child":""},{default:k(()=>[D(f(ig),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),Kc=QS,eC=X({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(R(),K(f(Q2),we({"data-slot":"select-value"},t),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),Wc=eC,tC=X({__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=ln(Zt(r,"class"),n);return(i,o)=>(R(),K(f(o2),we({"data-slot":"slider",class:f(dt)("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})=>[D(f(u2),{"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(()=>[D(f(a2),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),(R(!0),Se(Ke,null,cr(a,(l,u)=>(R(),K(f(c2),{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"]))}}),Gc=tC,rC=X({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zt(t,"class");return(n,s)=>(R(),K(f(d2),we({"data-slot":"label"},f(r),{class:f(dt)("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(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),Ln=rC,nC=X({__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=Zt(t,"class");return(n,s)=>(R(),K(f(r_),we({"data-slot":"separator"},f(r),{class:f(dt)("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"]))}}),sC=nC,iC={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},oC={class:"wp:flex wp:flex-col wp:gap-2"},aC={class:"wp:flex wp:flex-col wp:gap-2"},lC={class:"wp:flex wp:flex-col wp:gap-4"},cC={class:"wp:flex wp:justify-between"},uC={class:"wp:text-sm wp:text-muted-foreground"},dC={class:"wp:flex wp:flex-col wp:gap-4"},fC={class:"wp:flex wp:justify-between"},pC={class:"wp:text-sm wp:text-muted-foreground"},hC={class:"wp:flex wp:flex-col wp:gap-2"},gC={class:"wp:flex wp:justify-between"},vC={class:"wp:text-sm wp:text-muted-foreground"},mC={class:"wp:flex wp:flex-col wp:gap-2"},wC={class:"wp:flex wp:flex-col wp:gap-3"},yC={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},bC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},_C={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"},CC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},xC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},TC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},EC=X({__name:"AudioSettingsDialog",props:{visible:{type:Boolean}},emits:["update:visible"],setup(e,{emit:t}){const r=t,n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",s=Ft("sip"),{setVolume:i,setOutputDevice:o,setInputDevice:a,setNotificationVolume:l}=s,u=s.setRingtoneVolume??(()=>{}),c=s.setRingtoneTone??(()=>{}),d=F([]),p=F([]),h=Ds("webphone-input-device",""),m=Ds("webphone-output-device",""),y=Ds("webphone-volume",100),T=Ds("webphone-notification-volume",100),v=Ds("webphone-ringtone-volume",100),x=Ds("webphone-ringtone-tone","classic"),b=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const _=await navigator.mediaDevices.enumerateDevices();d.value=_.filter(O=>O.kind==="audioinput").map((O,q)=>({deviceId:O.deviceId,label:O.label||`Microphone ${q+1}`})),p.value=_.filter(O=>O.kind==="audiooutput").map((O,q)=>({deviceId:O.deviceId,label:O.label||`Speaker ${q+1}`}));const w=d.value.some(O=>O.deviceId===h.value);(!h.value||!w)&&d.value.length>0&&(h.value=d.value[0]?.deviceId??"");const S=p.value.some(O=>O.deviceId===m.value);(!m.value||!S)&&p.value.length>0&&(m.value=p.value[0]?.deviceId??""),h.value&&a(h.value),m.value&&o(m.value)}catch(_){console.error("Error loading devices",_)}},C=_=>{const w=String(_);h.value=w,a(w)},E=_=>{const w=String(_);m.value=w,o(w)},I=(_,w=35)=>_.length<=w?_:_.substring(0,w)+"...",M=j({get:()=>[y.value],set:_=>{y.value=_[0],i(y.value)}}),g=j({get:()=>[T.value],set:_=>{T.value=_[0],l(T.value)}}),H=j({get:()=>[v.value],set:_=>{v.value=_[0]??100,u(v.value)}}),N=_=>{x.value=String(_),c(x.value)};return Qe(()=>{b(),i(y.value),l(T.value),u(v.value),localStorage.removeItem("webphone-custom-ringtone"),["classic","original"].includes(x.value)||(x.value="classic"),c(x.value)}),(_,w)=>e.visible?(R(),K(f(Bc),{key:0,open:e.visible,"onUpdate:open":w[6]||(w[6]=S=>r("update:visible",S))},{default:k(()=>[D(f(Lc),{class:"wp:sm:max-w-sm"},{default:k(()=>[D(f(Fc),null,{default:k(()=>[D(f(Vc),null,{default:k(()=>[...w[7]||(w[7]=[qe("Audio Settings",-1)])]),_:1})]),_:1}),Q("div",iC,[Q("div",oC,[D(f(Ln),null,{default:k(()=>[...w[8]||(w[8]=[qe("Microphone",-1)])]),_:1}),D(f(jc),{modelValue:f(h),"onUpdate:modelValue":[w[0]||(w[0]=S=>nt(h)?h.value=S:null),C]},{default:k(()=>[D(f(Kc),{class:"wp:w-full"},{default:k(()=>[D(f(Wc),{placeholder:"Select Microphone"})]),_:1}),D(f(Uc),null,{default:k(()=>[D(f(zc),null,{default:k(()=>[(R(!0),Se(Ke,null,cr(d.value,S=>(R(),K(f(ga),{key:S.deviceId,value:S.deviceId,title:S.label},{default:k(()=>[qe(Le(I(S.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",aC,[D(f(Ln),null,{default:k(()=>[...w[9]||(w[9]=[qe("Speaker",-1)])]),_:1}),D(f(jc),{modelValue:f(m),"onUpdate:modelValue":[w[1]||(w[1]=S=>nt(m)?m.value=S:null),E]},{default:k(()=>[D(f(Kc),{class:"wp:w-full"},{default:k(()=>[D(f(Wc),{placeholder:"Select Speaker"})]),_:1}),D(f(Uc),null,{default:k(()=>[D(f(zc),null,{default:k(()=>[(R(!0),Se(Ke,null,cr(p.value,S=>(R(),K(f(ga),{key:S.deviceId,value:S.deviceId,title:S.label},{default:k(()=>[qe(Le(I(S.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",lC,[Q("div",cC,[D(f(Ln),null,{default:k(()=>[...w[10]||(w[10]=[qe("Media Volume",-1)])]),_:1}),Q("span",uC,Le(f(y))+"%",1)]),D(f(Gc),{modelValue:M.value,"onUpdate:modelValue":w[2]||(w[2]=S=>M.value=S),max:100,step:1},null,8,["modelValue"])]),Q("div",dC,[Q("div",fC,[D(f(Ln),null,{default:k(()=>[...w[11]||(w[11]=[qe("Notification Volume",-1)])]),_:1}),Q("span",pC,Le(f(T))+"%",1)]),D(f(Gc),{modelValue:g.value,"onUpdate:modelValue":w[3]||(w[3]=S=>g.value=S),max:100,step:1},null,8,["modelValue"])]),Q("div",hC,[Q("div",gC,[D(f(Ln),null,{default:k(()=>[...w[12]||(w[12]=[qe("Volumen del tono",-1)])]),_:1}),Q("span",vC,Le(f(v))+"%",1)]),D(f(Gc),{modelValue:H.value,"onUpdate:modelValue":w[4]||(w[4]=S=>H.value=S),max:100,step:1},null,8,["modelValue"])]),Q("div",mC,[D(f(Ln),null,{default:k(()=>[...w[13]||(w[13]=[qe("Tono de llamada",-1)])]),_:1}),D(f(jc),{"model-value":f(x),"onUpdate:modelValue":N},{default:k(()=>[D(f(Kc),{class:"wp:w-full"},{default:k(()=>[D(f(Wc),{placeholder:"Seleccionar tono"})]),_:1}),D(f(Uc),null,{default:k(()=>[D(f(zc),null,{default:k(()=>[D(f(ga),{value:"classic"},{default:k(()=>[...w[14]||(w[14]=[qe("Teléfono clásico",-1)])]),_:1}),D(f(ga),{value:"original"},{default:k(()=>[...w[15]||(w[15]=[qe("Original",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])]),D(f(sC)),Q("div",wC,[D(f(Ln),{class:"wp:text-base"},{default:k(()=>[...w[16]||(w[16]=[qe("Atajos de teclado",-1)])]),_:1}),Q("div",yC,[Q("div",bC,[w[17]||(w[17]=Q("span",{class:"wp:text-muted-foreground"},"Historial",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"H",1)]),_:1})]),Q("div",_C,[w[18]||(w[18]=Q("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+",",1)]),_:1})]),Q("div",SC,[w[19]||(w[19]=Q("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"K",1)]),_:1})]),Q("div",CC,[w[20]||(w[20]=Q("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"1",1)]),_:1})]),Q("div",xC,[w[21]||(w[21]=Q("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"2",1)]),_:1})]),Q("div",TC,[w[22]||(w[22]=Q("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"3",1)]),_:1})])])])]),D(f(cg),null,{default:k(()=>[D(f(ft),{variant:"secondary",onClick:w[5]||(w[5]=S=>r("update:visible",!1))},{default:k(()=>[...w[23]||(w[23]=[qe("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Ne("",!0)}}),AC=EC,kC=X({__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=Zt(t,"class");return(n,s)=>(R(),K(f(x2),we({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(dt)("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(()=>[D(f(E2),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),RC=kC,IC=X({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zt(t,"class");return(n,s)=>(R(),K(f(p2),we({"data-slot":"scroll-area"},f(r),{class:f(dt)("wp:relative",t.class)}),{default:k(()=>[D(f(A2),{"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(()=>[se(n.$slots,"default")]),_:3}),D(RC),D(f(g2))]),_:3},16,["class"]))}}),ug=IC,$C={class:"wp:relative wp:my-2"},PC={class:"wp:flex wp:flex-col wp:gap-2"},DC=["onClick"],OC={class:"wp:flex wp:items-center wp:gap-3"},HC={class:"wp:flex wp:flex-col"},MC={class:"wp:text-sm wp:font-medium"},NC={class:"wp:text-[10px] wp:text-muted-foreground"},qC={class:"wp:flex wp:flex-col wp:items-end"},BC={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},LC={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},FC={key:0,class:"wp:text-center wp:text-muted-foreground wp:py-8"},VC={key:1,class:"wp:text-center wp:text-muted-foreground wp:py-8"},jC=X({__name:"CallHistoryDialog",props:{visible:{type:Boolean},maskNumber:{type:Boolean},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Ft("webphone"),i=F(""),o=h=>{if(!r.contacts)return h;const m=r.contacts.find(y=>y.number===h);return m?m.name:h},a=h=>{const m=o(h);return r.maskNumber&&m===h?sn(h):m},l=j(()=>{if(!i.value)return s.callHistory;const h=i.value.toLowerCase();return s.callHistory.filter(m=>{const y=o(m.number).toLowerCase(),T=m.number.toLowerCase();return y.includes(h)||T.includes(h)})}),u=h=>h===0?"":`${Math.floor(h/60)}:${(h%60).toString().padStart(2,"0")}`,c=h=>h.direction==="incoming"?h.status==="missed"?T_:x_:E_,d=h=>h.status==="missed"?"wp:text-red-500":h.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",p=h=>{n("update:visible",!1),n("call",h)};return(h,m)=>e.visible?(R(),K(f(Bc),{key:0,open:e.visible,"onUpdate:open":m[1]||(m[1]=y=>n("update:visible",y))},{default:k(()=>[D(f(Lc),{class:"wp:sm:max-w-sm"},{default:k(()=>[D(f(Fc),null,{default:k(()=>[D(f(Vc),null,{default:k(()=>[...m[2]||(m[2]=[qe("Call History",-1)])]),_:1})]),_:1}),Q("div",$C,[D(f(R_),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),D(f(Pi),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=y=>i.value=y),placeholder:"Search history...",class:"wp:pl-8"},null,8,["modelValue"])]),D(f(ug),{class:"wp:h-[60vh] wp:pr-4"},{default:k(()=>[Q("div",PC,[(R(!0),Se(Ke,null,cr(l.value,y=>(R(),Se("div",{key:y.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:T=>p(y.number)},[Q("div",OC,[(R(),K(li(c(y)),{class:it([d(y),"wp:w-4 wp:h-4"])},null,8,["class"])),Q("div",HC,[Q("span",MC,Le(a(y.number)),1),Q("span",NC,Le(new Date(y.startTime).toLocaleString()),1)])]),Q("div",qC,[y.duration>0?(R(),Se("span",BC,Le(u(y.duration)),1)):Ne("",!0),Q("span",LC,Le(y.status),1)])],8,DC))),128)),f(s).callHistory.length===0?(R(),Se("div",FC," No call history ")):l.value.length===0?(R(),Se("div",VC," No results found ")):Ne("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])):Ne("",!0)}}),UC=jC,zC={class:"wp:grid wp:gap-4 wp:py-4"},KC={class:"wp:grid wp:gap-2 wp:relative"},WC={class:"wp:relative"},GC={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"},JC={class:"wp:p-1"},YC=["onClick"],ZC={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},XC={class:"wp:font-medium wp:text-sm wp:truncate"},QC={class:"wp:text-xs wp:text-muted-foreground"},ex=X({__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);Oe(()=>r.visible,p=>{p&&(s.value="",i.value=!1)}),Oe(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?(R(),K(f(Bc),{key:0,open:e.visible,"onUpdate:open":h[5]||(h[5]=m=>n("update:visible",m))},{default:k(()=>[D(f(Lc),{class:"wp:sm:max-w-md"},{default:k(()=>[D(f(Fc),null,{default:k(()=>[D(f(Vc),null,{default:k(()=>[...h[6]||(h[6]=[qe("Transferir Llamada",-1)])]),_:1})]),_:1}),Q("div",zC,[Q("div",KC,[D(f(Ln),{for:"transfer-input"},{default:k(()=>[...h[7]||(h[7]=[qe("Número o Contacto",-1)])]),_:1}),Q("div",WC,[D(f(Pi),{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?(R(),K(f(ft),{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(()=>[D(f(Dc),{class:"wp:h-4 wp:w-4"})]),_:1})):Ne("",!0)]),i.value&&a.value.length>0?(R(),Se("div",GC,[D(f(ug),{class:"wp:max-h-60"},{default:k(()=>[Q("div",JC,[(R(!0),Se(Ke,null,cr(a.value,m=>(R(),Se("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:y=>l(m)},[m.type?(R(),Se("div",{key:0,class:it(f(dt)("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"?(R(),K(f(ng),{key:0,class:"wp:w-4 wp:h-4"})):m.type==="contact"?(R(),K(f(Pc),{key:1,class:"wp:w-4 wp:h-4"})):m.type==="voicemail"?(R(),K(f(ag),{key:2,class:"wp:w-4 wp:h-4"})):(R(),K(f(lg),{key:3,class:"wp:w-4 wp:h-4"}))],2)):Ne("",!0),Q("div",ZC,[Q("span",XC,Le(m.name),1),Q("span",QC,Le(m.number),1)])],8,YC))),128))])]),_:1})])):Ne("",!0),h[8]||(h[8]=Q("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),D(f(cg),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:k(()=>[D(f(ft),{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]=[qe(" Cancelar ",-1)])]),_:1}),D(f(ft),{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]=[qe(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),D(f(ft),{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]=[qe(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):Ne("",!0)}}),tx=ex,rx=X({__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;Qe(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",y),window.addEventListener("blur",T)}),Vt(()=>{document.removeEventListener("visibilitychange",y),window.removeEventListener("blur",T),p&&(clearTimeout(p),p=null),x(),B()});const h=()=>{const W=n.callStatus!=="idle",le=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&W&&i.value&&le&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&q()},120))},y=()=>{m()},T=()=>{m()},v=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},x=()=>{c.value&&(clearInterval(c.value),c.value=null)},b=W=>{const le=Math.floor(W/60),G=W%60;return`${le.toString().padStart(2,"0")}:${G.toString().padStart(2,"0")}`};Oe(()=>n.callStatus,(W,le)=>{W==="connected"&&le!=="connected"?v():W==="idle"&&le!=="idle"&&(x(),o.value&&B())},{immediate:!0}),Oe(()=>n.isConnected,W=>{!W&&o.value&&(x(),B())}),Oe(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(_(l.value.document),H(l.value.document))});const C=j(()=>i.value&&n.isConnected),E={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>'},I=W=>{const le=W.createElement("style");le.textContent=`
|
|
76
|
+
¿Desea realizar la llamada solo con AUDIO?`)&&E(!1)}else alert("Error al iniciar la llamada: "+(b instanceof Error?b.message:String(b)))}},I=(x=!1)=>{if(m.onAnswer){m.onAnswer(x);return}i(x)},N=async()=>{await s(),await m.onHangup?.()},v=()=>{if(m.onReject){m.onReject();return}s()},H=j(()=>{const x={};return r.channels.forEach(b=>{const y=b.status==="connected"||b.status==="calling"||b.status==="incoming";x[b.id]=y?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),x}),M=j(()=>H.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(x,b)=>(R(),Se("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"?(R(),Se("div",Z_,[_.value?(R(),K(f(ft),{key:0,variant:"default",size:"icon",onClick:b[0]||(b[0]=y=>E(!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(()=>[D(f(L_),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),b[12]||(b[12]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):Ne("",!0),S.value?(R(),K(f(ft),{key:1,variant:"outline",size:"icon",onClick:b[1]||(b[1]=y=>E(!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(()=>[D(f(j_),{class:it(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",M.value])},null,8,["class"]),b[13]||(b[13]=Q("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})):Ne("",!0)])):Ne("",!0),f(r).callStatus==="incoming"?(R(),Se(Ke,{key:1},[f(r).activeChannel?.hasVideo?(R(),K(f(ft),{key:0,variant:"default",size:"icon",onClick:b[2]||(b[2]=y=>I(!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(()=>[D(f($_),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):Ne("",!0),D(f(ft),{variant:"default",size:"icon",onClick:b[3]||(b[3]=y=>I(!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(()=>[D(f(og),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),D(f(ft),{variant:"destructive",size:"icon",onClick:v,"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(()=>[D(f(Oc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):Ne("",!0),f(r).callStatus==="connected"?(R(),Se("div",X_,[Q("div",Q_,[D(f(ft),{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?(R(),K(f(__),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):(R(),K(f(S_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),D(f(ft),{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?(R(),K(f(k_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):(R(),K(f(C_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),T.value?Ne("",!0):(R(),K(f(ft),{key:0,variant:"secondary",size:"icon",onClick:b[4]||(b[4]=y=>w("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(()=>[D(f(N_),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),Q("div",eS,[D(f(ft),{variant:"ghost",size:"icon",onClick:b[5]||(b[5]=y=>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?(R(),K(f(Mc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(R(),K(f(Hc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),D(f(Di),{"model-value":f(r).keypadValue,type:"text",inputmode:"tel",pattern:"[0-9*#]*",placeholder:"Marcar opción (0-9, * o #)...","aria-label":"Tonos de marcación",onKeydown:d,onBeforeinput:p,onPaste:h,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,["model-value"]),Q("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:b[6]||(b[6]=pr(y=>f(r).backspaceKeypad(),["stop"]))},[D(f(Nc),{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"})])]),Q("div",{class:it(["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"},[D($c)],10,tS),D(f(ft),{size:"icon",onClick:N,"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(()=>[D(f(Oc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),b[14]||(b[14]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):Ne("",!0),f(r).callStatus==="calling"?(R(),Se("div",rS,[Q("div",nS,[D(f(ft),{variant:"ghost",size:"icon",onClick:b[7]||(b[7]=y=>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?(R(),K(f(Mc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):(R(),K(f(Hc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),D(f(Di),{modelValue:f(r).keypadValue,"onUpdate:modelValue":b[8]||(b[8]=y=>f(r).keypadValue=y),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"]),Q("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:b[9]||(b[9]=pr(y=>f(r).backspaceKeypad(),["stop"]))},[D(f(Nc),{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"})])]),Q("div",{class:it(["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"},[D($c)],10,sS),D(f(ft),{variant:"destructive",size:"lg",onClick:N,"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(()=>[D(f(Oc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),b[15]||(b[15]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):Ne("",!0),T.value&&f(r).callStatus==="connected"?(R(),Se("div",iS,[D(f(ft),{variant:"default",size:"sm",onClick:b[10]||(b[10]=y=>w("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(()=>[D(f(sg),{class:"wp:w-4 wp:h-4"}),b[16]||(b[16]=qe(" Completar Transferencia ",-1))]),_:1}),D(f(ft),{variant:"destructive",size:"sm",onClick:b[11]||(b[11]=y=>w("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:k(()=>[D(f(Dc),{class:"wp:w-4 wp:h-4"}),b[17]||(b[17]=qe(" Cancelar ",-1))]),_:1})])):Ne("",!0)],8,Y_))}}),aS=oS,lS=X({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(R(),Se("kbd",{class:it(f(dt)("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))},[se(r.$slots,"default")],2))}}),pn=lS,cS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function uS(e,t){return R(),Se("svg",cS,[...t[0]||(t[0]=[Q("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 qc={render:uS},dS=X({__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=ln(e,t);return(n,s)=>(R(),K(f(a_),we({"data-slot":"tooltip"},f(r)),{default:k(i=>[se(n.$slots,"default",br(ur(i)))]),_:3},16))}}),pa=dS,fS=X({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=ln(Zt(r,"class"),n);return(i,o)=>(R(),K(f(u_),null,{default:k(()=>[D(f(c_),we({"data-slot":"tooltip-content"},{...f(s),...i.$attrs},{class:f(dt)("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(()=>[se(i.$slots,"default"),D(f(n_),{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}))}}),ha=fS,pS=X({__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)=>(R(),K(f(i_),br(ur(t)),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),ga=pS,hS=X({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(R(),K(f(d_),we({"data-slot":"tooltip-trigger"},t),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),va=hS,gS=["data-call-status"],vS={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},mS={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},wS={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},yS={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},bS={class:"webphone-display__dialer-field wp:relative"},_S={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"},SS=["onPointerdown"],CS={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},xS={class:"webphone-display__contact-name wp:truncate"},TS={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},ES={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},AS={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},kS={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},RS={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},IS={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},$S={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},PS={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},DS={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},OS={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},HS=X({__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},maskNumber:{type:Boolean,default:!1}},setup(e){const t=Ft("webphone"),r=Ft("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=j(()=>s.channelId!==void 0?t.channels.find(y=>y.id===s.channelId):t.activeChannel),o=j(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const y=i.value;return y&&y.status!=="idle"?y.isHeld||y.status==="held"?"wp:text-status-hold":y.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=F(!1),l=F(null),u=F(null),c=y=>y.replace(/[^0-9*#]/g,""),d=y=>{y.ctrlKey||y.metaKey||y.altKey||y.key.length!==1||/[0-9*#]/.test(y.key)||y.preventDefault()},p=y=>{y.data&&c(y.data)!==y.data&&y.preventDefault()};Fy(l,()=>{a.value=!1});const h=j({get:()=>i.value?.keypadValue||"",set:y=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(y)})}}),m=j(()=>/^[0-9*#]+$/.test(h.value)),w=j(()=>{if(!h.value)return s.contacts.slice(0,10);const y=h.value.toLowerCase(),O=[];for(const q of s.contacts)if((q.name.toLowerCase().includes(y)||q.number.includes(y))&&(O.push(q),O.length>=10))break;return O}),T=y=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(y.number)}),a.value=!1},g=()=>{!h.value||!m.value||(a.value=!1,r.makeCall(h.value))};Oe(h,()=>{a.value=!0});const C=()=>{h.value&&m.value&&g()},_=()=>{a.value=!1},S=()=>{a.value=!0},E=()=>{setTimeout(()=>{a.value=!1},150)},I=F(Date.now());qy(()=>{I.value=Date.now()},1e3);const N=j(()=>{const y=i.value?.startTime,O=i.value?.status||"idle";if(!y||O!=="connected")return"00:00:00";const q=Math.floor((I.value-y)/1e3);return q<0?"00:00:00":`${Math.floor(q/3600).toString().padStart(2,"0")}:${Math.floor(q%3600/60).toString().padStart(2,"0")}:${(q%60).toString().padStart(2,"0")}`}),v=j(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const y=i.value,O=y?.status||"idle";if(O==="idle")return"Disponible";if(O==="calling")return"Llamando...";if(y?.isHeld){const q=y.remoteNumber||y.keypadValue||"Unknown";return`En espera - ${s.maskNumber?sn(q):q}`}return O==="connected"?"Conectado":O.charAt(0).toUpperCase()+O.slice(1)}),H=y=>{if(!y)return"";const O=y.trim(),q=O.startsWith("+"),B=O.replace(/[^\d]/g,"");return q?`+${B}`:B},M=y=>/\d/.test(y)&&/^[+\d\s().*#-]+$/.test(y.trim()),x=j(()=>{const y=i.value,O=y?.remoteNumber||y?.keypadValue,q=y?.remoteDisplayName;if(!O)return"Unknown";const B=H(O),Z=s.contacts?.find(W=>H(W.number)===B);return Z?s.maskNumber&&M(Z.name)?sn(Z.name):Z.name:q&&q!==O?s.maskNumber&&M(q)?H(q)===B?sn(O):sn(q):q:s.maskNumber?sn(O):O}),b=j(()=>{const y=i.value,O=y?.remoteNumber||y?.keypadValue||"";return s.maskNumber?sn(O):O});return(y,O)=>(R(),Se("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"?(R(),Se("div",{key:0,class:it([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"])},[Q("div",vS,[D(f(qc),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),O[3]||(O[3]=Q("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),Q("span",mS,Le(N.value),1)],2)):Ne("",!0),s.user?(R(),Se("span",{key:1,class:it([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"])},[Q("div",wS,[D(f(qc),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),qe(" "+Le(s.user),1)]),Q("div",{class:it(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},Le(v.value),3)],2)):Ne("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?(R(),Se("div",yS,[Q("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[Q("div",bS,[D(f(ga),null,{default:k(()=>[D(f(pa),null,{default:k(()=>[D(f(va),{"as-child":""},{default:k(()=>[D(f(ft),{onClick:O[0]||(O[0]=q=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:it(f(dt)("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?(R(),K(f(Mc),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):(R(),K(f(Hc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),D(f(ha),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),D(f(Di),{ref_key:"inputRef",ref:u,modelValue:h.value,"onUpdate:modelValue":O[1]||(O[1]=q=>h.value=q),type:"text",inputmode:"tel",pattern:"[0-9*#]*",onFocus:S,onBlur:E,onKeydown:[d,El(C,["enter"]),El(_,["escape"])],onBeforeinput:p,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"]),Q("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:O[2]||(O[2]=pr(q=>f(t).backspaceKeypad(),["stop"]))},[D(f(Nc),{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"})])]),no(Q("div",_S,[m.value?(R(),Se("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:pr(g,["prevent"])},[D(f(og),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),Q("span",null,"Marcar "+Le(h.value),1)],32)):Ne("",!0),(R(!0),Se(Ke,null,cr(w.value,q=>(R(),Se("div",{key:q.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:pr(B=>T(q),["prevent"])},[Q("div",{class:it(f(dt)("webphone-display__contact-badge wp:flex wp:items-center wp:justify-center wp:w-6 wp:h-6 wp:rounded-full wp:shrink-0",q.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":q.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":q.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":q.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"))},[q.type==="extension"?(R(),K(f(ng),{key:0,class:"wp:w-3 wp:h-3"})):q.type==="contact"?(R(),K(f(Pc),{key:1,class:"wp:w-3 wp:h-3"})):q.type==="voicemail"?(R(),K(f(ag),{key:2,class:"wp:w-3 wp:h-3"})):q.type==="tool"?(R(),K(f(lg),{key:3,class:"wp:w-3 wp:h-3"})):(R(),K(f(Pc),{key:4,class:"wp:w-3 wp:h-3"}))],2),Q("div",CS,[Q("span",xS,Le(q.name),1),Q("span",TS,Le(q.number),1)])],40,SS))),128))],512),[[To,a.value&&h.value&&(w.value.length>0||m.value)]])],512)])):(i.value?.status||"idle")==="connected"?(R(),Se("div",ES,[Q("div",AS,[Q("div",kS," En llamada con "+Le(x.value),1),x.value!==b.value?(R(),Se("div",RS,Le(b.value),1)):Ne("",!0)])])):(i.value?.status||"idle")!=="idle"?(R(),Se("div",IS,[Q("div",$S,[Q("div",PS,[Q("div",DS,Le(x.value),1),x.value!==b.value?(R(),Se("div",OS,Le(b.value),1)):Ne("",!0)]),D(f(ga),null,{default:k(()=>[D(f(pa),null,{default:k(()=>[D(f(va),{"as-child":""}),D(f(ha),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):Ne("",!0)],8,gS))}}),MS=HS,NS=X({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=ln(e,t);return(n,s)=>(R(),K(f(yb),we({"data-slot":"dialog"},f(r)),{default:k(i=>[se(n.$slots,"default",br(ur(i)))]),_:3},16))}}),Bc=NS,qS=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zt(t,"class");return(n,s)=>(R(),K(f(qb),we({"data-slot":"dialog-overlay"},f(r),{class:f(dt)("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(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),BS=qS,LS=X({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=ln(Zt(r,"class"),n);return(i,o)=>(R(),K(f(Bb),null,{default:k(()=>[D(BS),D(f(Mb),we({"data-slot":"dialog-content"},{...i.$attrs,...f(s)},{class:f(dt)("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(()=>[se(i.$slots,"default"),e.showCloseButton?(R(),K(f(bb),{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(()=>[D(f(Dc)),o[0]||(o[0]=Q("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):Ne("",!0)]),_:3},16,["class"])]),_:3}))}}),Lc=LS,FS=X({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(R(),Se("div",{"data-slot":"dialog-footer",class:it(f(dt)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[se(r.$slots,"default")],2))}}),cg=FS,VS=X({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>(R(),Se("div",{"data-slot":"dialog-header",class:it(f(dt)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[se(r.$slots,"default")],2))}}),Fc=VS,jS=X({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=an(Zt(t,"class"));return(n,s)=>(R(),K(f(Lb),we({"data-slot":"dialog-title"},f(r),{class:f(dt)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:k(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),Vc=jS,US=X({__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=ln(e,t);return(n,s)=>(R(),K(f(P2),we({"data-slot":"select"},f(r)),{default:k(i=>[se(n.$slots,"default",br(ur(i)))]),_:3},16))}}),jc=US,zS=X({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=ln(Zt(r,"class"),n);return(i,o)=>(R(),K(f(J2),null,{default:k(()=>[D(f(F2),we({"data-slot":"select-content"},{...i.$attrs,...f(s)},{class:f(dt)("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(()=>[D(f(XS)),D(f(e_),{class:it(f(dt)("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(()=>[se(i.$slots,"default")]),_:3},8,["class"]),D(f(YS))]),_:3},16,["class"])]),_:3}))}}),Uc=zS,KS=X({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(R(),K(f(j2),we({"data-slot":"select-group"},t),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),zc=KS,WS={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},GS=X({__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=an(Zt(t,"class"));return(n,s)=>(R(),K(f(K2),we({"data-slot":"select-item"},f(r),{class:f(dt)("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(()=>[Q("span",WS,[D(f(W2),null,{default:k(()=>[se(n.$slots,"indicator-icon",{},()=>[D(f(sg),{class:"wp:size-4"})])]),_:3})]),D(f(G2),null,{default:k(()=>[se(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),Oi=GS,JS=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=an(Zt(t,"class"));return(n,s)=>(R(),K(f(Y2),we({"data-slot":"select-scroll-down-button"},f(r),{class:f(dt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:k(()=>[se(n.$slots,"default",{},()=>[D(f(ig),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),YS=JS,ZS=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=an(Zt(t,"class"));return(n,s)=>(R(),K(f(Z2),we({"data-slot":"select-scroll-up-button"},f(r),{class:f(dt)("wp:flex wp:cursor-default wp:items-center wp:justify-center wp:py-1",t.class)}),{default:k(()=>[se(n.$slots,"default",{},()=>[D(f(b_),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),XS=ZS,QS=X({__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=an(Zt(t,"class","size"));return(n,s)=>(R(),K(f(X2),we({"data-slot":"select-trigger","data-size":e.size},f(r),{class:f(dt)("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(()=>[se(n.$slots,"default"),D(f(U2),{"as-child":""},{default:k(()=>[D(f(ig),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),Kc=QS,eC=X({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>(R(),K(f(Q2),we({"data-slot":"select-value"},t),{default:k(()=>[se(r.$slots,"default")]),_:3},16))}}),Wc=eC,tC=X({__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=ln(Zt(r,"class"),n);return(i,o)=>(R(),K(f(o2),we({"data-slot":"slider",class:f(dt)("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})=>[D(f(u2),{"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(()=>[D(f(a2),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),(R(!0),Se(Ke,null,cr(a,(l,u)=>(R(),K(f(c2),{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"]))}}),Gc=tC,rC=X({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zt(t,"class");return(n,s)=>(R(),K(f(d2),we({"data-slot":"label"},f(r),{class:f(dt)("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(()=>[se(n.$slots,"default")]),_:3},16,["class"]))}}),Ln=rC,nC=X({__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=Zt(t,"class");return(n,s)=>(R(),K(f(r_),we({"data-slot":"separator"},f(r),{class:f(dt)("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"]))}}),sC=nC,iC={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},oC={class:"wp:flex wp:flex-col wp:gap-2"},aC={class:"wp:flex wp:flex-col wp:gap-2"},lC={class:"wp:flex wp:flex-col wp:gap-4"},cC={class:"wp:flex wp:justify-between"},uC={class:"wp:text-sm wp:text-muted-foreground"},dC={class:"wp:flex wp:flex-col wp:gap-4"},fC={class:"wp:flex wp:justify-between"},pC={class:"wp:text-sm wp:text-muted-foreground"},hC={class:"wp:flex wp:flex-col wp:gap-2"},gC={class:"wp:flex wp:justify-between"},vC={class:"wp:text-sm wp:text-muted-foreground"},mC={class:"wp:flex wp:flex-col wp:gap-2"},wC={class:"wp:flex wp:flex-col wp:gap-3"},yC={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},bC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},_C={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"},CC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},xC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},TC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},EC=X({__name:"AudioSettingsDialog",props:{visible:{type:Boolean}},emits:["update:visible"],setup(e,{emit:t}){const r=t,n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",s=Ft("sip"),{setVolume:i,setOutputDevice:o,setInputDevice:a,setNotificationVolume:l}=s,u=s.setRingtoneVolume??(()=>{}),c=s.setRingtoneTone??(()=>{}),d=F([]),p=F([]),h=Ds("webphone-input-device",""),m=Ds("webphone-output-device",""),w=Ds("webphone-volume",100),T=Ds("webphone-notification-volume",100),g=Ds("webphone-ringtone-volume",100),C=Ds("webphone-ringtone-tone","original"),_={classic:"original","original-loud":"aurora","original-intense":"resonancia"},S=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const b=await navigator.mediaDevices.enumerateDevices();d.value=b.filter(q=>q.kind==="audioinput").map((q,B)=>({deviceId:q.deviceId,label:q.label||`Microphone ${B+1}`})),p.value=b.filter(q=>q.kind==="audiooutput").map((q,B)=>({deviceId:q.deviceId,label:q.label||`Speaker ${B+1}`}));const y=d.value.some(q=>q.deviceId===h.value);(!h.value||!y)&&d.value.length>0&&(h.value=d.value[0]?.deviceId??"");const O=p.value.some(q=>q.deviceId===m.value);(!m.value||!O)&&p.value.length>0&&(m.value=p.value[0]?.deviceId??""),h.value&&a(h.value),m.value&&o(m.value)}catch(b){console.error("Error loading devices",b)}},E=b=>{const y=String(b);h.value=y,a(y)},I=b=>{const y=String(b);m.value=y,o(y)},N=(b,y=35)=>b.length<=y?b:b.substring(0,y)+"...",v=j({get:()=>[w.value],set:b=>{w.value=b[0],i(w.value)}}),H=j({get:()=>[T.value],set:b=>{T.value=b[0],l(T.value)}}),M=j({get:()=>[g.value],set:b=>{g.value=b[0]??100,u(g.value)}}),x=b=>{C.value=String(b),c(C.value)};return Qe(()=>{S(),i(w.value),l(T.value),u(g.value),localStorage.removeItem("webphone-custom-ringtone");const b=_[C.value]??C.value;C.value=["original","aurora","resonancia"].includes(b)?b:"original",c(C.value)}),(b,y)=>e.visible?(R(),K(f(Bc),{key:0,open:e.visible,"onUpdate:open":y[6]||(y[6]=O=>r("update:visible",O))},{default:k(()=>[D(f(Lc),{class:"wp:sm:max-w-sm"},{default:k(()=>[D(f(Fc),null,{default:k(()=>[D(f(Vc),null,{default:k(()=>[...y[7]||(y[7]=[qe("Audio Settings",-1)])]),_:1})]),_:1}),Q("div",iC,[Q("div",oC,[D(f(Ln),null,{default:k(()=>[...y[8]||(y[8]=[qe("Microphone",-1)])]),_:1}),D(f(jc),{modelValue:f(h),"onUpdate:modelValue":[y[0]||(y[0]=O=>nt(h)?h.value=O:null),E]},{default:k(()=>[D(f(Kc),{class:"wp:w-full"},{default:k(()=>[D(f(Wc),{placeholder:"Select Microphone"})]),_:1}),D(f(Uc),null,{default:k(()=>[D(f(zc),null,{default:k(()=>[(R(!0),Se(Ke,null,cr(d.value,O=>(R(),K(f(Oi),{key:O.deviceId,value:O.deviceId,title:O.label},{default:k(()=>[qe(Le(N(O.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",aC,[D(f(Ln),null,{default:k(()=>[...y[9]||(y[9]=[qe("Speaker",-1)])]),_:1}),D(f(jc),{modelValue:f(m),"onUpdate:modelValue":[y[1]||(y[1]=O=>nt(m)?m.value=O:null),I]},{default:k(()=>[D(f(Kc),{class:"wp:w-full"},{default:k(()=>[D(f(Wc),{placeholder:"Select Speaker"})]),_:1}),D(f(Uc),null,{default:k(()=>[D(f(zc),null,{default:k(()=>[(R(!0),Se(Ke,null,cr(p.value,O=>(R(),K(f(Oi),{key:O.deviceId,value:O.deviceId,title:O.label},{default:k(()=>[qe(Le(N(O.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",lC,[Q("div",cC,[D(f(Ln),null,{default:k(()=>[...y[10]||(y[10]=[qe("Media Volume",-1)])]),_:1}),Q("span",uC,Le(f(w))+"%",1)]),D(f(Gc),{modelValue:v.value,"onUpdate:modelValue":y[2]||(y[2]=O=>v.value=O),max:100,step:1},null,8,["modelValue"])]),Q("div",dC,[Q("div",fC,[D(f(Ln),null,{default:k(()=>[...y[11]||(y[11]=[qe("Notification Volume",-1)])]),_:1}),Q("span",pC,Le(f(T))+"%",1)]),D(f(Gc),{modelValue:H.value,"onUpdate:modelValue":y[3]||(y[3]=O=>H.value=O),max:100,step:1},null,8,["modelValue"])]),Q("div",hC,[Q("div",gC,[D(f(Ln),null,{default:k(()=>[...y[12]||(y[12]=[qe("Volumen del tono",-1)])]),_:1}),Q("span",vC,Le(f(g))+"%",1)]),D(f(Gc),{modelValue:M.value,"onUpdate:modelValue":y[4]||(y[4]=O=>M.value=O),max:100,step:1},null,8,["modelValue"])]),Q("div",mC,[D(f(Ln),null,{default:k(()=>[...y[13]||(y[13]=[qe("Tono de llamada",-1)])]),_:1}),D(f(jc),{"model-value":f(C),"onUpdate:modelValue":x},{default:k(()=>[D(f(Kc),{class:"wp:w-full"},{default:k(()=>[D(f(Wc),{placeholder:"Seleccionar tono"})]),_:1}),D(f(Uc),null,{default:k(()=>[D(f(zc),null,{default:k(()=>[D(f(Oi),{value:"original"},{default:k(()=>[...y[14]||(y[14]=[qe("Original",-1)])]),_:1}),D(f(Oi),{value:"aurora"},{default:k(()=>[...y[15]||(y[15]=[qe("Aurora",-1)])]),_:1}),D(f(Oi),{value:"resonancia"},{default:k(()=>[...y[16]||(y[16]=[qe("Resonancia",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])]),D(f(sC)),Q("div",wC,[D(f(Ln),{class:"wp:text-base"},{default:k(()=>[...y[17]||(y[17]=[qe("Atajos de teclado",-1)])]),_:1}),Q("div",yC,[Q("div",bC,[y[18]||(y[18]=Q("span",{class:"wp:text-muted-foreground"},"Historial",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"H",1)]),_:1})]),Q("div",_C,[y[19]||(y[19]=Q("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+",",1)]),_:1})]),Q("div",SC,[y[20]||(y[20]=Q("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"K",1)]),_:1})]),Q("div",CC,[y[21]||(y[21]=Q("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"1",1)]),_:1})]),Q("div",xC,[y[22]||(y[22]=Q("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"2",1)]),_:1})]),Q("div",TC,[y[23]||(y[23]=Q("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(n))+"3",1)]),_:1})])])])]),D(f(cg),null,{default:k(()=>[D(f(ft),{variant:"secondary",onClick:y[5]||(y[5]=O=>r("update:visible",!1))},{default:k(()=>[...y[24]||(y[24]=[qe("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Ne("",!0)}}),AC=EC,kC=X({__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=Zt(t,"class");return(n,s)=>(R(),K(f(x2),we({"data-slot":"scroll-area-scrollbar"},f(r),{class:f(dt)("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(()=>[D(f(E2),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),RC=kC,IC=X({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Zt(t,"class");return(n,s)=>(R(),K(f(p2),we({"data-slot":"scroll-area"},f(r),{class:f(dt)("wp:relative",t.class)}),{default:k(()=>[D(f(A2),{"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(()=>[se(n.$slots,"default")]),_:3}),D(RC),D(f(g2))]),_:3},16,["class"]))}}),ug=IC,$C={class:"wp:relative wp:my-2"},PC={class:"wp:flex wp:flex-col wp:gap-2"},DC=["onClick"],OC={class:"wp:flex wp:items-center wp:gap-3"},HC={class:"wp:flex wp:flex-col"},MC={class:"wp:text-sm wp:font-medium"},NC={class:"wp:text-[10px] wp:text-muted-foreground"},qC={class:"wp:flex wp:flex-col wp:items-end"},BC={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},LC={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},FC={key:0,class:"wp:text-center wp:text-muted-foreground wp:py-8"},VC={key:1,class:"wp:text-center wp:text-muted-foreground wp:py-8"},jC=X({__name:"CallHistoryDialog",props:{visible:{type:Boolean},maskNumber:{type:Boolean},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Ft("webphone"),i=F(""),o=h=>{if(!r.contacts)return h;const m=r.contacts.find(w=>w.number===h);return m?m.name:h},a=h=>{const m=o(h);return r.maskNumber&&m===h?sn(h):m},l=j(()=>{if(!i.value)return s.callHistory;const h=i.value.toLowerCase();return s.callHistory.filter(m=>{const w=o(m.number).toLowerCase(),T=m.number.toLowerCase();return w.includes(h)||T.includes(h)})}),u=h=>h===0?"":`${Math.floor(h/60)}:${(h%60).toString().padStart(2,"0")}`,c=h=>h.direction==="incoming"?h.status==="missed"?T_:x_:E_,d=h=>h.status==="missed"?"wp:text-red-500":h.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",p=h=>{n("update:visible",!1),n("call",h)};return(h,m)=>e.visible?(R(),K(f(Bc),{key:0,open:e.visible,"onUpdate:open":m[1]||(m[1]=w=>n("update:visible",w))},{default:k(()=>[D(f(Lc),{class:"wp:sm:max-w-sm"},{default:k(()=>[D(f(Fc),null,{default:k(()=>[D(f(Vc),null,{default:k(()=>[...m[2]||(m[2]=[qe("Call History",-1)])]),_:1})]),_:1}),Q("div",$C,[D(f(R_),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),D(f(Di),{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=w=>i.value=w),placeholder:"Search history...",class:"wp:pl-8"},null,8,["modelValue"])]),D(f(ug),{class:"wp:h-[60vh] wp:pr-4"},{default:k(()=>[Q("div",PC,[(R(!0),Se(Ke,null,cr(l.value,w=>(R(),Se("div",{key:w.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:T=>p(w.number)},[Q("div",OC,[(R(),K(li(c(w)),{class:it([d(w),"wp:w-4 wp:h-4"])},null,8,["class"])),Q("div",HC,[Q("span",MC,Le(a(w.number)),1),Q("span",NC,Le(new Date(w.startTime).toLocaleString()),1)])]),Q("div",qC,[w.duration>0?(R(),Se("span",BC,Le(u(w.duration)),1)):Ne("",!0),Q("span",LC,Le(w.status),1)])],8,DC))),128)),f(s).callHistory.length===0?(R(),Se("div",FC," No call history ")):l.value.length===0?(R(),Se("div",VC," No results found ")):Ne("",!0)])]),_:1})]),_:1})]),_:1},8,["open"])):Ne("",!0)}}),UC=jC,zC={class:"wp:grid wp:gap-4 wp:py-4"},KC={class:"wp:grid wp:gap-2 wp:relative"},WC={class:"wp:relative"},GC={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"},JC={class:"wp:p-1"},YC=["onClick"],ZC={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},XC={class:"wp:font-medium wp:text-sm wp:truncate"},QC={class:"wp:text-xs wp:text-muted-foreground"},ex=X({__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);Oe(()=>r.visible,p=>{p&&(s.value="",i.value=!1)}),Oe(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?(R(),K(f(Bc),{key:0,open:e.visible,"onUpdate:open":h[5]||(h[5]=m=>n("update:visible",m))},{default:k(()=>[D(f(Lc),{class:"wp:sm:max-w-md"},{default:k(()=>[D(f(Fc),null,{default:k(()=>[D(f(Vc),null,{default:k(()=>[...h[6]||(h[6]=[qe("Transferir Llamada",-1)])]),_:1})]),_:1}),Q("div",zC,[Q("div",KC,[D(f(Ln),{for:"transfer-input"},{default:k(()=>[...h[7]||(h[7]=[qe("Número o Contacto",-1)])]),_:1}),Q("div",WC,[D(f(Di),{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?(R(),K(f(ft),{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(()=>[D(f(Dc),{class:"wp:h-4 wp:w-4"})]),_:1})):Ne("",!0)]),i.value&&a.value.length>0?(R(),Se("div",GC,[D(f(ug),{class:"wp:max-h-60"},{default:k(()=>[Q("div",JC,[(R(!0),Se(Ke,null,cr(a.value,m=>(R(),Se("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?(R(),Se("div",{key:0,class:it(f(dt)("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"?(R(),K(f(ng),{key:0,class:"wp:w-4 wp:h-4"})):m.type==="contact"?(R(),K(f(Pc),{key:1,class:"wp:w-4 wp:h-4"})):m.type==="voicemail"?(R(),K(f(ag),{key:2,class:"wp:w-4 wp:h-4"})):(R(),K(f(lg),{key:3,class:"wp:w-4 wp:h-4"}))],2)):Ne("",!0),Q("div",ZC,[Q("span",XC,Le(m.name),1),Q("span",QC,Le(m.number),1)])],8,YC))),128))])]),_:1})])):Ne("",!0),h[8]||(h[8]=Q("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),D(f(cg),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:k(()=>[D(f(ft),{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]=[qe(" Cancelar ",-1)])]),_:1}),D(f(ft),{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]=[qe(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),D(f(ft),{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]=[qe(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):Ne("",!0)}}),tx=ex,rx=X({__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;Qe(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",w),window.addEventListener("blur",T)}),Vt(()=>{document.removeEventListener("visibilitychange",w),window.removeEventListener("blur",T),p&&(clearTimeout(p),p=null),C(),B()});const h=()=>{const W=n.callStatus!=="idle",le=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&W&&i.value&&le&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&q()},120))},w=()=>{m()},T=()=>{m()},g=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},C=()=>{c.value&&(clearInterval(c.value),c.value=null)},_=W=>{const le=Math.floor(W/60),G=W%60;return`${le.toString().padStart(2,"0")}:${G.toString().padStart(2,"0")}`};Oe(()=>n.callStatus,(W,le)=>{W==="connected"&&le!=="connected"?g():W==="idle"&&le!=="idle"&&(C(),o.value&&B())},{immediate:!0}),Oe(()=>n.isConnected,W=>{!W&&o.value&&(C(),B())}),Oe(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(x(l.value.document),H(l.value.document))});const S=j(()=>i.value&&n.isConnected),E={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>'},I=W=>{const le=W.createElement("style");le.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
|
-
`,W.head.appendChild(le)},
|
|
282
|
+
`,W.head.appendChild(le)},N=()=>{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""}},v=()=>{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=W=>{const le=W.querySelector(".pip-status-text");le&&(le.textContent=N(),le.className=`pip-status-text ${v()}`)},M=W=>{const le=W.createElement("div");return le.className="pip-wrapper",n.hasVideo?le.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">
|
|
@@ -287,15 +287,15 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
|
|
|
287
287
|
</div>
|
|
288
288
|
<div class="pip-overlay">
|
|
289
289
|
<span class="pip-name">${n.remoteNumber||"Llamada"}</span>
|
|
290
|
-
<span id="pip-timer" class="pip-timer">${
|
|
290
|
+
<span id="pip-timer" class="pip-timer">${_(u.value)}</span>
|
|
291
291
|
</div>
|
|
292
292
|
</div>
|
|
293
293
|
<div class="pip-actions" id="pip-actions"></div>
|
|
294
294
|
`:le.innerHTML=`
|
|
295
295
|
<div class="pip-audio-area">
|
|
296
296
|
<div class="pip-caller-name">${n.remoteNumber||"Llamada"}</div>
|
|
297
|
-
<div class="pip-status-text ${
|
|
298
|
-
<div class="pip-duration" id="pip-timer">${
|
|
297
|
+
<div class="pip-status-text ${v()}">${N()}</div>
|
|
298
|
+
<div class="pip-duration" id="pip-timer">${_(u.value)}</div>
|
|
299
299
|
</div>
|
|
300
300
|
<div class="pip-actions" id="pip-actions"></div>
|
|
301
|
-
`,le},_=W=>{const le=W.getElementById("pip-actions");if(le){if(le.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const he=W.createElement("button");he.className="pip-btn pip-btn-video",he.title="Contestar con Video",he.innerHTML=E.video,he.onclick=()=>s("answer",!0),le.appendChild(he)}const G=W.createElement("button");G.className="pip-btn pip-btn-answer",G.title="Contestar",G.innerHTML=E.phone,G.onclick=()=>s("answer",!1),le.appendChild(G);const ie=W.createElement("button");ie.className="pip-btn pip-btn-hangup",ie.title="Rechazar",ie.innerHTML=E.phoneOff,ie.onclick=()=>{s("hangup"),B()},le.appendChild(ie)}else if(n.callStatus==="connected"){const G=W.createElement("button");G.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,G.title=n.isMuted?"Activar micrófono":"Silenciar",G.innerHTML=n.isMuted?E.micOff:E.mic,G.onclick=()=>s("toggleMute"),le.appendChild(G);const ie=W.createElement("button");ie.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,ie.title=n.isHeld?"Reanudar":"Pausar",ie.innerHTML=n.isHeld?E.play:E.pause,ie.onclick=()=>s("toggleHold"),le.appendChild(ie);const he=W.createElement("button");he.className="pip-btn pip-btn-transfer",he.title="Transferir",he.innerHTML=E.transfer,he.onclick=()=>s("transfer"),le.appendChild(he);const ke=W.createElement("button");ke.className="pip-btn pip-btn-hangup",ke.title="Colgar",ke.innerHTML=E.phoneOff,ke.onclick=()=>{s("hangup"),B()},le.appendChild(ke)}else if(n.callStatus==="calling"){const G=W.createElement("button");G.className="pip-btn pip-btn-hangup",G.title="Cancelar",G.innerHTML=E.phoneOff,G.onclick=()=>{s("hangup"),B()},le.appendChild(G)}}},w=W=>{setTimeout(()=>{const le=W.getElementById("pip-remote-video"),G=W.getElementById("pip-local-video");le&&n.remoteStream&&(le.srcObject=n.remoteStream,le.play().catch(()=>{})),G&&n.localStream&&(G.srcObject=n.localStream,G.play().catch(()=>{}))},50)},S=W=>{const le=W.getElementById("pip-timer");le&&(d=setInterval(()=>{le.textContent=b(u.value)},1e3))},O=()=>{d&&(clearInterval(d),d=null)},q=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const W=n.hasVideo?340:280,le=n.hasVideo?280:200,G=await window.documentPictureInPicture.requestWindow({width:W,height:le,preferInitialWindowPlacement:!0});l.value=G,o.value=!0,s("update:active",!0),I(G.document);const ie=N(G.document);G.document.body.appendChild(ie),n.hasVideo&&w(G.document),_(G.document),S(G.document),G.addEventListener("pagehide",()=>{O(),o.value=!1,l.value=null,s("update:active",!1)})}catch(W){console.error("[DocumentPip] Error:",W)}finally{a.value=!1}}},B=()=>{O(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:q,close:B,toggle:()=>{o.value?B():q()},isActive:o,isSupported:i,canUsePip:C}),(W,le)=>se(W.$slots,"default")}}),nx=rx,sx=["data-mode","data-call-status","data-network-status"],ix={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},ox={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"},ax={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},lx={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"},cx={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"},ux={class:"wp:flex"},dx=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],fx={class:"webphone__display wp:py-1"},px=["data-visible"],hx={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"},gx={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},vx=X({__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},maskNumber:{type:Boolean,default:!1},earlyMedia:{type:Boolean,default:!1},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=P0({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=zr(u),d=dy(u,{onCallContext:Y=>i("call-context",Y),onCallState:Y=>i("call-state",Y),onMediaReady:Y=>i("media-ready",Y)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:y}=d;Wn("webphone",c),Wn("sip",d),t({stop:d.stop}),lt(()=>{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 T=F(!1),v=F(!1),x=F(!1),b=F(null),C=F(null),E=F(null),I=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",M=j(()=>s.mode==="webcall"),g=F(0),H=Y=>!!Y&&Y.getVideoTracks().length>0;Oe(()=>c.callStatus,Y=>{if(Y==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}Y!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const N=j(()=>c.channels.find(Y=>Y.id===c.activeChannelId)??null),_=Y=>{if(!Y)return"";const ce=Y.trim(),pe=ce.startsWith("+"),tt=ce.replace(/[^\d]/g,"");return pe?`+${tt}`:tt},w=j(()=>{const Y=N.value?.remoteNumber||c.remoteNumber,ce=_(Y),pe=s.contacts.find(tt=>_(tt.number)===ce);return pe?.name?pe.name:s.maskNumber&&Y?sn(Y):Y||"Llamada"}),S=j(()=>{const Y=N.value?.remoteNumber||c.remoteNumber;return s.maskNumber?sn(Y):Y}),O=j(()=>(g.value,!!N.value?.hasVideo||H(m.value)||H(y.value))),{isOnline:q}=Xy(),B=j(()=>!q.value),Z=F(null),W=F(!1),le=j(()=>s.enablePictureInPicture),G=()=>{le.value&&Z.value?.toggle()},ie=async(Y,ce)=>{try{ce==="blind"?await d.transferCall(Y):await d.startAttendedTransfer(Y)}catch(pe){console.error("[WebPhone] Transfer error:",pe),alert(pe instanceof Error?pe.message:"Transfer failed. Please try again.")}},he=async()=>{try{await d.completeAttendedTransfer()}catch(Y){console.error("[WebPhone] Complete transfer error:",Y),alert(Y instanceof Error?Y.message:"Failed to complete transfer.")}},ke=async()=>{try{await d.cancelAttendedTransfer()}catch(Y){console.error("[WebPhone] Cancel transfer error:",Y),alert(Y instanceof Error?Y.message:"Failed to cancel transfer.")}},Ve=Y=>{c.keypadValue=Y,d.makeCall(Y)},Re=Y=>{if(s.onAnswer){s.onAnswer(Y);return}d.answerCall(Y)},Pe=async()=>{await d.hangupCall(),await s.onHangup?.()},Ge=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},mt=()=>{x.value=!0,Z.value?.close(),window.focus()},je=()=>{if(!le.value)return!1;const Y=c.callStatus!=="idle",ce=document.hidden||!document.hasFocus();return Y&&ce&&!W.value},et=()=>{window.setTimeout(()=>{je()&&Z.value?.open()},150)};lt(()=>{C.value&&(W.value||!m.value?C.value.srcObject=null:C.value.srcObject=m.value),E.value&&(W.value||!y.value?E.value.srcObject=null:E.value.srcObject=y.value)});const wt=Y=>{if(!Y||typeof Y.addEventListener!="function"||typeof Y.removeEventListener!="function")return()=>{};const ce=()=>{g.value+=1};return Y.addEventListener("addtrack",ce),Y.addEventListener("removetrack",ce),()=>{Y.removeEventListener("addtrack",ce),Y.removeEventListener("removetrack",ce)}};Oe(m,(Y,ce,pe)=>{g.value+=1,pe(wt(Y))},{immediate:!0}),Oe(y,(Y,ce,pe)=>{g.value+=1,pe(wt(Y))},{immediate:!0});const Ct=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),A=()=>{const Y=window.innerWidth<640,ce=window.innerWidth<1024;let pe=360;return Y?pe=window.innerWidth*.9:ce&&(pe=340),{x:Math.max(0,(window.innerWidth-pe)/2),y:Y?30:80}},{x:$,y:J,style:ae}=Zy(b,{initialValue:j(()=>{const Y=A();return{x:s.position.x??Y.x,y:s.position.y??Y.y}}).value,preventDefault:!0,onStart:(Y,ce)=>{const pe=ce.target;if(pe instanceof HTMLElement&&pe.closest(Ct))return!1}});Oe(()=>s.position,Y=>{const ce=A();$.value=Y.x??ce.x,J.value=Y.y??ce.y},{deep:!0});const ne=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],re=F(!1),de=j({get:()=>c.activeChannelId.toString(),set:async Y=>{if(!B.value&&Y&&!re.value){re.value=!0;try{await h(parseInt(Y))}finally{re.value=!1}}}}),fe=Y=>{const ce=c.channels.find(pe=>pe.id===Y);return ce?ce.status==="connected"||ce.status==="calling"||ce.status==="incoming":!1},ue=Y=>{const ce=c.channels.find(pe=>pe.id===Y);return ce?ce.isHeld||ce.status==="held":!1},ee=Y=>{B.value||(de.value=Y.toString())},Ee=Y=>{if(!B.value&&((Y.metaKey||Y.ctrlKey)&&Y.key.toLowerCase()==="h"&&(Y.preventDefault(),v.value=!0),(Y.metaKey||Y.ctrlKey)&&Y.key===","&&(Y.preventDefault(),T.value=!0),(Y.metaKey||Y.ctrlKey)&&Y.key.toLowerCase()==="k"&&(Y.preventDefault(),c.toggleKeypad()),(Y.metaKey||Y.ctrlKey)&&["1","2","3"].includes(Y.key))){Y.preventDefault();const ce=parseInt(Y.key)-1;re.value||(re.value=!0,h(ce).finally(()=>{re.value=!1}))}};Oe(()=>c.callStatus,()=>{je()&&et()}),Oe(()=>c.isConnected,Y=>{a.value&&n.set(a.value,Y)},{immediate:!0}),Oe(le,Y=>{!Y&&W.value&&Z.value?.close()});const me=F(!1),Te=async()=>{me.value||B.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,earlyMedia:s.earlyMedia}),d.extension.value&&(me.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},De=()=>Te(),Fe=async()=>{await d.stop(),me.value=!1};return Wn("webphoneRegistration",{isConnected:j(()=>c.isConnected),register:De,unregister:Fe}),Qe(async()=>{window.addEventListener("keydown",Ee),document.addEventListener("visibilitychange",et),window.addEventListener("blur",et),window.addEventListener("pagehide",et),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await Te()}),Oe(()=>q.value,async Y=>{Y&&await Te()}),Vt(()=>{d.stop(),window.removeEventListener("keydown",Ee),document.removeEventListener("visibilitychange",et),window.removeEventListener("blur",et),window.removeEventListener("pagehide",et)}),(Y,ce)=>(R(),Se(Ke,null,[Q("div",{ref_key:"phoneRef",ref:b,style:xt(f(ae)),class:it(["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",B.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":B.value?"offline":"online"},[O.value&&!W.value?(R(),Se("div",ix,[Q("video",{ref_key:"remoteVideoRef",ref:C,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),Q("div",ox,[Q("video",{ref_key:"localVideoRef",ref:E,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):Ne("",!0),Q("div",ax,[M.value?Ne("",!0):(R(),Se("div",lx,[Q("div",cx,[Q("div",ux,[(R(),Se(Ke,null,cr(ne,pe=>Q("button",{key:pe.value,type:"button",role:"radio","aria-checked":de.value===pe.value.toString(),disabled:B.value,title:`${pe.label} (${f(I)}${pe.value+1})`,class:it(["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(pe.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":fe(pe.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":de.value===pe.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":pe.value,"data-state":de.value===pe.value.toString()?"active":"idle","data-call-state":ue(pe.value)?"held":fe(pe.value)?"busy":"available",onClick:tt=>ee(pe.value)},[D(f(qc),{class:it(["webphone__channel-icon wp:size-3 wp:shrink-0",ue(pe.value)?"wp:text-status-hold":fe(pe.value)?"wp:text-[var(--color-red)]":de.value===pe.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),Q("span",{class:it(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",ue(pe.value)?"wp:text-status-hold":fe(pe.value)?"wp:text-[var(--color-red)]":de.value===pe.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},Le(pe.label),3)],10,dx)),64))]),D(f(pa),null,{default:k(()=>[D(f(da),null,{default:k(()=>[D(f(ha),{"as-child":""},{default:k(()=>[D(f(ft),{variant:"ghost",size:"icon",class:it(["wp:h-8 wp:w-8 wp:rounded-full",W.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:G},{default:k(()=>[D(f(A_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),D(f(fa),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[...ce[8]||(ce[8]=[Q("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),D(f(pa),null,{default:k(()=>[D(f(da),null,{default:k(()=>[D(f(ha),{"as-child":""},{default:k(()=>[D(f(ft),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:ce[0]||(ce[0]=pe=>T.value=!0)},{default:k(()=>[D(f(I_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),D(f(fa),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[ce[9]||(ce[9]=Q("span",null,"Configuración",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(I))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),Q("div",fx,[(R(!0),Se(Ke,null,cr(c.channels,pe=>to((R(),K(MS,{key:pe.id,"channel-id":pe.id,"allow-input":!M.value,"is-web-call":M.value,"is-online":f(q),contacts:s.contacts,user:s.extension,"mask-number":s.maskNumber},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user","mask-number"])),[[Co,pe.id===c.activeChannelId]])),128))]),Q("div",{class:it(["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"},[D($c)],10,px),D(aS,{class:"webphone__actions",style:xt(B.value?"pointer-events: none;":void 0),destination:M.value?s.to:void 0,"is-video":s.mode==="video","on-answer":s.onAnswer,"on-hangup":s.onHangup,"on-reject":s.onReject,onTransfer:ce[1]||(ce[1]=pe=>x.value=!0),onCompleteTransfer:he,onCancelTransfer:ke},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),B.value?(R(),Se("div",hx,[...ce[10]||(ce[10]=[Q("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):Ne("",!0),M.value?(R(),Se("div",gx,[...ce[11]||(ce[11]=[Q("div",{class:"webphone__footer-label wp:text-[10px] wp:text-primary"},"Powered By",-1),Q("div",{class:"webphone__footer-content wp:flex wp:items-center wp:gap-2"},[Q("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)])])):Ne("",!0)],14,sx),D(AC,{visible:T.value,"onUpdate:visible":ce[2]||(ce[2]=pe=>T.value=pe)},null,8,["visible"]),D(UC,{visible:v.value,"onUpdate:visible":ce[3]||(ce[3]=pe=>v.value=pe),contacts:s.contacts,"mask-number":s.maskNumber,onCall:Ve},null,8,["visible","contacts","mask-number"]),D(tx,{visible:x.value,"onUpdate:visible":ce[4]||(ce[4]=pe=>x.value=pe),contacts:s.contacts,onTransfer:ie},null,8,["visible","contacts"]),D(nx,{ref_key:"documentPipRef",ref:Z,active:W.value,"onUpdate:active":ce[5]||(ce[5]=pe=>W.value=pe),"auto-open-on-blur":le.value,"is-connected":c.isConnected,"remote-number":S.value,"caller-name":w.value,"has-video":O.value??!1,"remote-stream":f(m),"local-stream":f(y),destination:M.value?s.to:void 0,"is-video":s.mode==="video","call-status":c.callStatus,"is-muted":c.isMuted,"is-held":c.isHeld,onTransfer:mt,onTransferRequest:ie,onHangup:Pe,onReject:Ge,onAnswer:Re,onToggleMute:ce[6]||(ce[6]=pe=>f(d).toggleMute()),onToggleHold:ce[7]||(ce[7]=pe=>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))}}),mx=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},wx=mx(vx,[["__scopeId","data-v-1feccefe"]]),yx=Sl({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},maskNumber:{type:[Boolean,String],default:!1},earlyMedia:{type:[Boolean,String],default:!1},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 dr(wx,{...e,contacts:t,initialKeypadVisible:!(e.initialKeypadVisible===!1||e.initialKeypadVisible==="false"),maskNumber:e.maskNumber===!0||e.maskNumber==="true",earlyMedia:e.earlyMedia===!0||e.earlyMedia==="true"})}}},{shadowRoot:!1});customElements.define("web-phone",yx)})();
|
|
301
|
+
`,le},x=W=>{const le=W.getElementById("pip-actions");if(le){if(le.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const he=W.createElement("button");he.className="pip-btn pip-btn-video",he.title="Contestar con Video",he.innerHTML=E.video,he.onclick=()=>s("answer",!0),le.appendChild(he)}const G=W.createElement("button");G.className="pip-btn pip-btn-answer",G.title="Contestar",G.innerHTML=E.phone,G.onclick=()=>s("answer",!1),le.appendChild(G);const ie=W.createElement("button");ie.className="pip-btn pip-btn-hangup",ie.title="Rechazar",ie.innerHTML=E.phoneOff,ie.onclick=()=>{s("hangup"),B()},le.appendChild(ie)}else if(n.callStatus==="connected"){const G=W.createElement("button");G.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,G.title=n.isMuted?"Activar micrófono":"Silenciar",G.innerHTML=n.isMuted?E.micOff:E.mic,G.onclick=()=>s("toggleMute"),le.appendChild(G);const ie=W.createElement("button");ie.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,ie.title=n.isHeld?"Reanudar":"Pausar",ie.innerHTML=n.isHeld?E.play:E.pause,ie.onclick=()=>s("toggleHold"),le.appendChild(ie);const he=W.createElement("button");he.className="pip-btn pip-btn-transfer",he.title="Transferir",he.innerHTML=E.transfer,he.onclick=()=>s("transfer"),le.appendChild(he);const ke=W.createElement("button");ke.className="pip-btn pip-btn-hangup",ke.title="Colgar",ke.innerHTML=E.phoneOff,ke.onclick=()=>{s("hangup"),B()},le.appendChild(ke)}else if(n.callStatus==="calling"){const G=W.createElement("button");G.className="pip-btn pip-btn-hangup",G.title="Cancelar",G.innerHTML=E.phoneOff,G.onclick=()=>{s("hangup"),B()},le.appendChild(G)}}},b=W=>{setTimeout(()=>{const le=W.getElementById("pip-remote-video"),G=W.getElementById("pip-local-video");le&&n.remoteStream&&(le.srcObject=n.remoteStream,le.play().catch(()=>{})),G&&n.localStream&&(G.srcObject=n.localStream,G.play().catch(()=>{}))},50)},y=W=>{const le=W.getElementById("pip-timer");le&&(d=setInterval(()=>{le.textContent=_(u.value)},1e3))},O=()=>{d&&(clearInterval(d),d=null)},q=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const W=n.hasVideo?340:280,le=n.hasVideo?280:200,G=await window.documentPictureInPicture.requestWindow({width:W,height:le,preferInitialWindowPlacement:!0});l.value=G,o.value=!0,s("update:active",!0),I(G.document);const ie=M(G.document);G.document.body.appendChild(ie),n.hasVideo&&b(G.document),x(G.document),y(G.document),G.addEventListener("pagehide",()=>{O(),o.value=!1,l.value=null,s("update:active",!1)})}catch(W){console.error("[DocumentPip] Error:",W)}finally{a.value=!1}}},B=()=>{O(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:q,close:B,toggle:()=>{o.value?B():q()},isActive:o,isSupported:i,canUsePip:S}),(W,le)=>se(W.$slots,"default")}}),nx=rx,sx=["data-mode","data-call-status","data-network-status"],ix={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},ox={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"},ax={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},lx={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"},cx={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"},ux={class:"wp:flex"},dx=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],fx={class:"webphone__display wp:py-1"},px=["data-visible"],hx={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"},gx={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},vx=X({__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},maskNumber:{type:Boolean,default:!1},earlyMedia:{type:Boolean,default:!1},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=P0({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=zr(u),d=dy(u,{onCallContext:Y=>i("call-context",Y),onCallState:Y=>i("call-state",Y),onMediaReady:Y=>i("media-ready",Y)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:w}=d;Wn("webphone",c),Wn("sip",d),t({stop:d.stop}),lt(()=>{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 T=F(!1),g=F(!1),C=F(!1),_=F(null),S=F(null),E=F(null),I=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",N=j(()=>s.mode==="webcall"),v=F(0),H=Y=>!!Y&&Y.getVideoTracks().length>0;Oe(()=>c.callStatus,Y=>{if(Y==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}Y!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const M=j(()=>c.channels.find(Y=>Y.id===c.activeChannelId)??null),x=Y=>{if(!Y)return"";const ce=Y.trim(),pe=ce.startsWith("+"),tt=ce.replace(/[^\d]/g,"");return pe?`+${tt}`:tt},b=j(()=>{const Y=M.value?.remoteNumber||c.remoteNumber,ce=x(Y),pe=s.contacts.find(tt=>x(tt.number)===ce);return pe?.name?pe.name:s.maskNumber&&Y?sn(Y):Y||"Llamada"}),y=j(()=>{const Y=M.value?.remoteNumber||c.remoteNumber;return s.maskNumber?sn(Y):Y}),O=j(()=>(v.value,!!M.value?.hasVideo||H(m.value)||H(w.value))),{isOnline:q}=Xy(),B=j(()=>!q.value),Z=F(null),W=F(!1),le=j(()=>s.enablePictureInPicture),G=()=>{le.value&&Z.value?.toggle()},ie=async(Y,ce)=>{try{ce==="blind"?await d.transferCall(Y):await d.startAttendedTransfer(Y)}catch(pe){console.error("[WebPhone] Transfer error:",pe),alert(pe instanceof Error?pe.message:"Transfer failed. Please try again.")}},he=async()=>{try{await d.completeAttendedTransfer()}catch(Y){console.error("[WebPhone] Complete transfer error:",Y),alert(Y instanceof Error?Y.message:"Failed to complete transfer.")}},ke=async()=>{try{await d.cancelAttendedTransfer()}catch(Y){console.error("[WebPhone] Cancel transfer error:",Y),alert(Y instanceof Error?Y.message:"Failed to cancel transfer.")}},Ve=Y=>{c.keypadValue=Y,d.makeCall(Y)},Re=Y=>{if(s.onAnswer){s.onAnswer(Y);return}d.answerCall(Y)},Pe=async()=>{await d.hangupCall(),await s.onHangup?.()},Ge=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},mt=()=>{C.value=!0,Z.value?.close(),window.focus()},je=()=>{if(!le.value)return!1;const Y=c.callStatus!=="idle",ce=document.hidden||!document.hasFocus();return Y&&ce&&!W.value},et=()=>{window.setTimeout(()=>{je()&&Z.value?.open()},150)};lt(()=>{S.value&&(W.value||!m.value?S.value.srcObject=null:S.value.srcObject=m.value),E.value&&(W.value||!w.value?E.value.srcObject=null:E.value.srcObject=w.value)});const wt=Y=>{if(!Y||typeof Y.addEventListener!="function"||typeof Y.removeEventListener!="function")return()=>{};const ce=()=>{v.value+=1};return Y.addEventListener("addtrack",ce),Y.addEventListener("removetrack",ce),()=>{Y.removeEventListener("addtrack",ce),Y.removeEventListener("removetrack",ce)}};Oe(m,(Y,ce,pe)=>{v.value+=1,pe(wt(Y))},{immediate:!0}),Oe(w,(Y,ce,pe)=>{v.value+=1,pe(wt(Y))},{immediate:!0});const Ct=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),A=()=>{const Y=window.innerWidth<640,ce=window.innerWidth<1024;let pe=360;return Y?pe=window.innerWidth*.9:ce&&(pe=340),{x:Math.max(0,(window.innerWidth-pe)/2),y:Y?30:80}},{x:$,y:J,style:ae}=Zy(_,{initialValue:j(()=>{const Y=A();return{x:s.position.x??Y.x,y:s.position.y??Y.y}}).value,preventDefault:!0,onStart:(Y,ce)=>{const pe=ce.target;if(pe instanceof HTMLElement&&pe.closest(Ct))return!1}});Oe(()=>s.position,Y=>{const ce=A();$.value=Y.x??ce.x,J.value=Y.y??ce.y},{deep:!0});const ne=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],re=F(!1),de=j({get:()=>c.activeChannelId.toString(),set:async Y=>{if(!B.value&&Y&&!re.value){re.value=!0;try{await h(parseInt(Y))}finally{re.value=!1}}}}),fe=Y=>{const ce=c.channels.find(pe=>pe.id===Y);return ce?ce.status==="connected"||ce.status==="calling"||ce.status==="incoming":!1},ue=Y=>{const ce=c.channels.find(pe=>pe.id===Y);return ce?ce.isHeld||ce.status==="held":!1},ee=Y=>{B.value||(de.value=Y.toString())},Ee=Y=>{if(!B.value&&((Y.metaKey||Y.ctrlKey)&&Y.key.toLowerCase()==="h"&&(Y.preventDefault(),g.value=!0),(Y.metaKey||Y.ctrlKey)&&Y.key===","&&(Y.preventDefault(),T.value=!0),(Y.metaKey||Y.ctrlKey)&&Y.key.toLowerCase()==="k"&&(Y.preventDefault(),c.toggleKeypad()),(Y.metaKey||Y.ctrlKey)&&["1","2","3"].includes(Y.key))){Y.preventDefault();const ce=parseInt(Y.key)-1;re.value||(re.value=!0,h(ce).finally(()=>{re.value=!1}))}};Oe(()=>c.callStatus,()=>{je()&&et()}),Oe(()=>c.isConnected,Y=>{a.value&&n.set(a.value,Y)},{immediate:!0}),Oe(le,Y=>{!Y&&W.value&&Z.value?.close()});const me=F(!1),Te=async()=>{me.value||B.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,earlyMedia:s.earlyMedia}),d.extension.value&&(me.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},De=()=>Te(),Fe=async()=>{await d.stop(),me.value=!1};return Wn("webphoneRegistration",{isConnected:j(()=>c.isConnected),register:De,unregister:Fe}),Qe(async()=>{window.addEventListener("keydown",Ee),document.addEventListener("visibilitychange",et),window.addEventListener("blur",et),window.addEventListener("pagehide",et),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await Te()}),Oe(()=>q.value,async Y=>{Y&&await Te()}),Vt(()=>{d.stop(),window.removeEventListener("keydown",Ee),document.removeEventListener("visibilitychange",et),window.removeEventListener("blur",et),window.removeEventListener("pagehide",et)}),(Y,ce)=>(R(),Se(Ke,null,[Q("div",{ref_key:"phoneRef",ref:_,style:xt(f(ae)),class:it(["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",B.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":B.value?"offline":"online"},[O.value&&!W.value?(R(),Se("div",ix,[Q("video",{ref_key:"remoteVideoRef",ref:S,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),Q("div",ox,[Q("video",{ref_key:"localVideoRef",ref:E,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):Ne("",!0),Q("div",ax,[N.value?Ne("",!0):(R(),Se("div",lx,[Q("div",cx,[Q("div",ux,[(R(),Se(Ke,null,cr(ne,pe=>Q("button",{key:pe.value,type:"button",role:"radio","aria-checked":de.value===pe.value.toString(),disabled:B.value,title:`${pe.label} (${f(I)}${pe.value+1})`,class:it(["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(pe.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":fe(pe.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":de.value===pe.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":pe.value,"data-state":de.value===pe.value.toString()?"active":"idle","data-call-state":ue(pe.value)?"held":fe(pe.value)?"busy":"available",onClick:tt=>ee(pe.value)},[D(f(qc),{class:it(["webphone__channel-icon wp:size-3 wp:shrink-0",ue(pe.value)?"wp:text-status-hold":fe(pe.value)?"wp:text-[var(--color-red)]":de.value===pe.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),Q("span",{class:it(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",ue(pe.value)?"wp:text-status-hold":fe(pe.value)?"wp:text-[var(--color-red)]":de.value===pe.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},Le(pe.label),3)],10,dx)),64))]),D(f(ga),null,{default:k(()=>[D(f(pa),null,{default:k(()=>[D(f(va),{"as-child":""},{default:k(()=>[D(f(ft),{variant:"ghost",size:"icon",class:it(["wp:h-8 wp:w-8 wp:rounded-full",W.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:G},{default:k(()=>[D(f(A_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),D(f(ha),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[...ce[8]||(ce[8]=[Q("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),D(f(ga),null,{default:k(()=>[D(f(pa),null,{default:k(()=>[D(f(va),{"as-child":""},{default:k(()=>[D(f(ft),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:ce[0]||(ce[0]=pe=>T.value=!0)},{default:k(()=>[D(f(I_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),D(f(ha),{class:"wp:flex wp:items-center wp:gap-2"},{default:k(()=>[ce[9]||(ce[9]=Q("span",null,"Configuración",-1)),D(f(pn),null,{default:k(()=>[qe(Le(f(I))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),Q("div",fx,[(R(!0),Se(Ke,null,cr(c.channels,pe=>no((R(),K(MS,{key:pe.id,"channel-id":pe.id,"allow-input":!N.value,"is-web-call":N.value,"is-online":f(q),contacts:s.contacts,user:s.extension,"mask-number":s.maskNumber},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user","mask-number"])),[[To,pe.id===c.activeChannelId]])),128))]),Q("div",{class:it(["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"},[D($c)],10,px),D(aS,{class:"webphone__actions",style:xt(B.value?"pointer-events: none;":void 0),destination:N.value?s.to:void 0,"is-video":s.mode==="video","on-answer":s.onAnswer,"on-hangup":s.onHangup,"on-reject":s.onReject,onTransfer:ce[1]||(ce[1]=pe=>C.value=!0),onCompleteTransfer:he,onCancelTransfer:ke},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),B.value?(R(),Se("div",hx,[...ce[10]||(ce[10]=[Q("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):Ne("",!0),N.value?(R(),Se("div",gx,[...ce[11]||(ce[11]=[Q("div",{class:"webphone__footer-label wp:text-[10px] wp:text-primary"},"Powered By",-1),Q("div",{class:"webphone__footer-content wp:flex wp:items-center wp:gap-2"},[Q("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)])])):Ne("",!0)],14,sx),D(AC,{visible:T.value,"onUpdate:visible":ce[2]||(ce[2]=pe=>T.value=pe)},null,8,["visible"]),D(UC,{visible:g.value,"onUpdate:visible":ce[3]||(ce[3]=pe=>g.value=pe),contacts:s.contacts,"mask-number":s.maskNumber,onCall:Ve},null,8,["visible","contacts","mask-number"]),D(tx,{visible:C.value,"onUpdate:visible":ce[4]||(ce[4]=pe=>C.value=pe),contacts:s.contacts,onTransfer:ie},null,8,["visible","contacts"]),D(nx,{ref_key:"documentPipRef",ref:Z,active:W.value,"onUpdate:active":ce[5]||(ce[5]=pe=>W.value=pe),"auto-open-on-blur":le.value,"is-connected":c.isConnected,"remote-number":y.value,"caller-name":b.value,"has-video":O.value??!1,"remote-stream":f(m),"local-stream":f(w),destination:N.value?s.to:void 0,"is-video":s.mode==="video","call-status":c.callStatus,"is-muted":c.isMuted,"is-held":c.isHeld,onTransfer:mt,onTransferRequest:ie,onHangup:Pe,onReject:Ge,onAnswer:Re,onToggleMute:ce[6]||(ce[6]=pe=>f(d).toggleMute()),onToggleHold:ce[7]||(ce[7]=pe=>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))}}),mx=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},wx=mx(vx,[["__scopeId","data-v-1feccefe"]]),yx=Cl({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},maskNumber:{type:[Boolean,String],default:!1},earlyMedia:{type:[Boolean,String],default:!1},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 dr(wx,{...e,contacts:t,initialKeypadVisible:!(e.initialKeypadVisible===!1||e.initialKeypadVisible==="false"),maskNumber:e.maskNumber===!0||e.maskNumber==="true",earlyMedia:e.earlyMedia===!0||e.earlyMedia==="true"})}}},{shadowRoot:!1});customElements.define("web-phone",yx)})();
|