@tmsoft/webphone 5.0.12 → 5.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,31 +1,31 @@
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-be5461fa],[data-v-be5461fa]:before,[data-v-be5461fa]: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-be5461fa]::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-be5461fa]:root,[data-v-be5461fa]: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-be5461fa]:root,[data-v-be5461fa]: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-be5461fa]:root,[data-v-be5461fa]: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-be5461fa],[data-v-be5461fa]:after,[data-v-be5461fa]:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-be5461fa]::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-be5461fa]::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}[data-v-be5461fa]::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html[data-v-be5461fa],[data-v-be5461fa]: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-be5461fa]{height:0;color:inherit;border-top-width:1px}abbr[data-v-be5461fa]:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1[data-v-be5461fa],h2[data-v-be5461fa],h3[data-v-be5461fa],h4[data-v-be5461fa],h5[data-v-be5461fa],h6[data-v-be5461fa]{font-size:inherit;font-weight:inherit}a[data-v-be5461fa]{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b[data-v-be5461fa],strong[data-v-be5461fa]{font-weight:bolder}code[data-v-be5461fa],kbd[data-v-be5461fa],samp[data-v-be5461fa],pre[data-v-be5461fa]{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-be5461fa]{font-size:80%}sub[data-v-be5461fa],sup[data-v-be5461fa]{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub[data-v-be5461fa]{bottom:-.25em}sup[data-v-be5461fa]{top:-.5em}table[data-v-be5461fa]{text-indent:0;border-color:inherit;border-collapse:collapse}[data-v-be5461fa]:-moz-focusring{outline:auto}progress[data-v-be5461fa]{vertical-align:baseline}summary[data-v-be5461fa]{display:list-item}ol[data-v-be5461fa],ul[data-v-be5461fa],menu[data-v-be5461fa]{list-style:none}img[data-v-be5461fa],svg[data-v-be5461fa],video[data-v-be5461fa],canvas[data-v-be5461fa],audio[data-v-be5461fa],iframe[data-v-be5461fa],embed[data-v-be5461fa],object[data-v-be5461fa]{vertical-align:middle;display:block}img[data-v-be5461fa],video[data-v-be5461fa]{max-width:100%;height:auto}button[data-v-be5461fa],input[data-v-be5461fa],select[data-v-be5461fa],optgroup[data-v-be5461fa],textarea[data-v-be5461fa]{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-be5461fa]::-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-be5461fa]::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-be5461fa]{font-weight:bolder}:where(select:is([multiple],[size])) optgroup[data-v-be5461fa]{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option[data-v-be5461fa]{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option[data-v-be5461fa]{padding-inline-start:20px}[data-v-be5461fa]::-webkit-file-upload-button{margin-inline-end:4px}[data-v-be5461fa]::file-selector-button{margin-inline-end:4px}[data-v-be5461fa]::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){[data-v-be5461fa]::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){[data-v-be5461fa]::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea[data-v-be5461fa]{resize:vertical}[data-v-be5461fa]::-webkit-search-decoration{-webkit-appearance:none}[data-v-be5461fa]::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}[data-v-be5461fa]::-webkit-datetime-edit{display:inline-flex}[data-v-be5461fa]::-webkit-datetime-edit-fields-wrapper{padding:0}[data-v-be5461fa]::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}[data-v-be5461fa]::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}[data-v-be5461fa]::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}[data-v-be5461fa]::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}[data-v-be5461fa]::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}[data-v-be5461fa]::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}[data-v-be5461fa]::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}[data-v-be5461fa]::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}[data-v-be5461fa]::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}[data-v-be5461fa]::-webkit-calendar-picker-indicator{line-height:1}[data-v-be5461fa]:-moz-ui-invalid{box-shadow:none}button[data-v-be5461fa]{-webkit-appearance:button;appearance:button}input[data-v-be5461fa]:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}[data-v-be5461fa]::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}[data-v-be5461fa]::file-selector-button{-webkit-appearance:button;appearance:button}[data-v-be5461fa]::-webkit-inner-spin-button{height:auto}[data-v-be5461fa]::-webkit-outer-spin-button{height:auto}[hidden][data-v-be5461fa]:where(:not([hidden=until-found])){display:none!important}[data-v-be5461fa]{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){[data-v-be5461fa]{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body[data-v-be5461fa]{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-0{--tw-translate-x:calc(var(--wp-spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-x-5{--tw-translate-x:calc(var(--wp-spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.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\\:justify-start{justify-content:flex-start}.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\\/10:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/10:hover{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.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-foreground:hover{color:var(--foreground)}.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-primary\\/50:focus-visible{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-primary\\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--primary) 50%, 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-be5461fa]{container:card-header/inline-size}.wp\\:pointer-events-none[data-v-be5461fa]{pointer-events:none}.wp\\:sr-only[data-v-be5461fa]{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-be5461fa]{position:absolute}.wp\\:fixed[data-v-be5461fa]{position:fixed}.wp\\:relative[data-v-be5461fa]{position:relative}.wp\\:sticky[data-v-be5461fa]{position:sticky}.wp\\:inset-0[data-v-be5461fa]{inset:calc(var(--wp-spacing) * 0)}.wp\\:inset-x-0[data-v-be5461fa]{inset-inline:calc(var(--wp-spacing) * 0)}.wp\\:top-0[data-v-be5461fa]{top:calc(var(--wp-spacing) * 0)}.wp\\:top-1\\/2[data-v-be5461fa]{top:50%}.wp\\:top-2\\.5[data-v-be5461fa]{top:calc(var(--wp-spacing) * 2.5)}.wp\\:top-4[data-v-be5461fa]{top:calc(var(--wp-spacing) * 4)}.wp\\:top-\\[50\\%\\][data-v-be5461fa]{top:50%}.wp\\:top-full[data-v-be5461fa]{top:100%}.wp\\:right-0[data-v-be5461fa]{right:calc(var(--wp-spacing) * 0)}.wp\\:right-1[data-v-be5461fa]{right:calc(var(--wp-spacing) * 1)}.wp\\:right-2[data-v-be5461fa]{right:calc(var(--wp-spacing) * 2)}.wp\\:right-4[data-v-be5461fa]{right:calc(var(--wp-spacing) * 4)}.wp\\:bottom-2[data-v-be5461fa]{bottom:calc(var(--wp-spacing) * 2)}.wp\\:bottom-full[data-v-be5461fa]{bottom:100%}.wp\\:left-0[data-v-be5461fa]{left:calc(var(--wp-spacing) * 0)}.wp\\:left-0\\.5[data-v-be5461fa]{left:calc(var(--wp-spacing) * .5)}.wp\\:left-2[data-v-be5461fa]{left:calc(var(--wp-spacing) * 2)}.wp\\:left-\\[50\\%\\][data-v-be5461fa]{left:50%}.wp\\:z-10[data-v-be5461fa]{z-index:10}.wp\\:z-40[data-v-be5461fa]{z-index:40}.wp\\:z-50[data-v-be5461fa]{z-index:50}.wp\\:order-first[data-v-be5461fa]{order:-9999}.wp\\:col-start-2[data-v-be5461fa]{grid-column-start:2}.wp\\:row-span-2[data-v-be5461fa]{grid-row:span 2/span 2}.wp\\:row-start-1[data-v-be5461fa]{grid-row-start:1}.wp\\:container[data-v-be5461fa]{width:100%}@media (min-width:40rem){.wp\\:container[data-v-be5461fa]{max-width:40rem}}@media (min-width:48rem){.wp\\:container[data-v-be5461fa]{max-width:48rem}}@media (min-width:64rem){.wp\\:container[data-v-be5461fa]{max-width:64rem}}@media (min-width:80rem){.wp\\:container[data-v-be5461fa]{max-width:80rem}}@media (min-width:96rem){.wp\\:container[data-v-be5461fa]{max-width:96rem}}.wp\\:-mx-1[data-v-be5461fa]{margin-inline:calc(var(--wp-spacing) * -1)}.wp\\:mx-2[data-v-be5461fa]{margin-inline:calc(var(--wp-spacing) * 2)}.wp\\:mx-auto[data-v-be5461fa]{margin-inline-start:auto;margin-inline-end:auto}.wp\\:my-1[data-v-be5461fa]{margin-block:calc(var(--wp-spacing) * 1)}.wp\\:my-2[data-v-be5461fa]{margin-block:calc(var(--wp-spacing) * 2)}.wp\\:my-8[data-v-be5461fa]{margin-block:calc(var(--wp-spacing) * 8)}.wp\\:mt-1[data-v-be5461fa]{margin-top:calc(var(--wp-spacing) * 1)}.wp\\:mr-4[data-v-be5461fa]{margin-right:calc(var(--wp-spacing) * 4)}.wp\\:mr-auto[data-v-be5461fa]{margin-right:auto}.wp\\:mb-1[data-v-be5461fa]{margin-bottom:calc(var(--wp-spacing) * 1)}.wp\\:mb-2[data-v-be5461fa]{margin-bottom:calc(var(--wp-spacing) * 2)}.wp\\:mb-4[data-v-be5461fa]{margin-bottom:calc(var(--wp-spacing) * 4)}.wp\\:mb-5[data-v-be5461fa]{margin-bottom:calc(var(--wp-spacing) * 5)}.wp\\:ml-auto[data-v-be5461fa]{margin-left:auto}.wp\\:block[data-v-be5461fa]{display:block}.wp\\:flex[data-v-be5461fa]{display:flex}.wp\\:grid[data-v-be5461fa]{display:grid}.wp\\:hidden[data-v-be5461fa]{display:none}.wp\\:inline-flex[data-v-be5461fa]{display:inline-flex}.wp\\:aspect-square[data-v-be5461fa]{aspect-ratio:1}.wp\\:aspect-video[data-v-be5461fa]{aspect-ratio:var(--wp-aspect-video)}.wp\\:size-2[data-v-be5461fa]{width:calc(var(--wp-spacing) * 2);height:calc(var(--wp-spacing) * 2)}.wp\\:size-2\\.5[data-v-be5461fa]{width:calc(var(--wp-spacing) * 2.5);height:calc(var(--wp-spacing) * 2.5)}.wp\\:size-3[data-v-be5461fa]{width:calc(var(--wp-spacing) * 3);height:calc(var(--wp-spacing) * 3)}.wp\\:size-3\\.5[data-v-be5461fa]{width:calc(var(--wp-spacing) * 3.5);height:calc(var(--wp-spacing) * 3.5)}.wp\\:size-4[data-v-be5461fa]{width:calc(var(--wp-spacing) * 4);height:calc(var(--wp-spacing) * 4)}.wp\\:size-5[data-v-be5461fa]{width:calc(var(--wp-spacing) * 5);height:calc(var(--wp-spacing) * 5)}.wp\\:size-6[data-v-be5461fa]{width:calc(var(--wp-spacing) * 6);height:calc(var(--wp-spacing) * 6)}.wp\\:size-7[data-v-be5461fa]{width:calc(var(--wp-spacing) * 7);height:calc(var(--wp-spacing) * 7)}.wp\\:size-8[data-v-be5461fa]{width:calc(var(--wp-spacing) * 8);height:calc(var(--wp-spacing) * 8)}.wp\\:size-9[data-v-be5461fa]{width:calc(var(--wp-spacing) * 9);height:calc(var(--wp-spacing) * 9)}.wp\\:size-10[data-v-be5461fa]{width:calc(var(--wp-spacing) * 10);height:calc(var(--wp-spacing) * 10)}.wp\\:size-12[data-v-be5461fa]{width:calc(var(--wp-spacing) * 12);height:calc(var(--wp-spacing) * 12)}.wp\\:size-full[data-v-be5461fa]{width:100%;height:100%}.wp\\:h-2\\.5[data-v-be5461fa]{height:calc(var(--wp-spacing) * 2.5)}.wp\\:h-3[data-v-be5461fa]{height:calc(var(--wp-spacing) * 3)}.wp\\:h-4[data-v-be5461fa]{height:calc(var(--wp-spacing) * 4)}.wp\\:h-5[data-v-be5461fa]{height:calc(var(--wp-spacing) * 5)}.wp\\:h-6[data-v-be5461fa]{height:calc(var(--wp-spacing) * 6)}.wp\\:h-7[data-v-be5461fa]{height:calc(var(--wp-spacing) * 7)}.wp\\:h-8[data-v-be5461fa]{height:calc(var(--wp-spacing) * 8)}.wp\\:h-9[data-v-be5461fa]{height:calc(var(--wp-spacing) * 9)}.wp\\:h-10[data-v-be5461fa]{height:calc(var(--wp-spacing) * 10)}.wp\\:h-12[data-v-be5461fa]{height:calc(var(--wp-spacing) * 12)}.wp\\:h-14[data-v-be5461fa]{height:calc(var(--wp-spacing) * 14)}.wp\\:h-16[data-v-be5461fa]{height:calc(var(--wp-spacing) * 16)}.wp\\:h-64[data-v-be5461fa]{height:calc(var(--wp-spacing) * 64)}.wp\\:h-80[data-v-be5461fa]{height:calc(var(--wp-spacing) * 80)}.wp\\:h-\\[15px\\][data-v-be5461fa]{height:15px}.wp\\:h-\\[16px\\][data-v-be5461fa]{height:16px}.wp\\:h-\\[60vh\\][data-v-be5461fa]{height:60vh}.wp\\:h-\\[var\\(--reka-select-trigger-height\\)\\][data-v-be5461fa]{height:var(--reka-select-trigger-height)}.wp\\:h-full[data-v-be5461fa]{height:100%}.wp\\:h-px[data-v-be5461fa]{height:1px}.wp\\:max-h-\\(--reka-dropdown-menu-content-available-height\\)[data-v-be5461fa]{max-height:var(--reka-dropdown-menu-content-available-height)}.wp\\:max-h-\\(--reka-select-content-available-height\\)[data-v-be5461fa]{max-height:var(--reka-select-content-available-height)}.wp\\:max-h-0[data-v-be5461fa]{max-height:calc(var(--wp-spacing) * 0)}.wp\\:max-h-40[data-v-be5461fa]{max-height:calc(var(--wp-spacing) * 40)}.wp\\:max-h-60[data-v-be5461fa]{max-height:calc(var(--wp-spacing) * 60)}.wp\\:max-h-\\[300px\\][data-v-be5461fa]{max-height:300px}.wp\\:min-h-10[data-v-be5461fa]{min-height:calc(var(--wp-spacing) * 10)}.wp\\:min-h-\\[calc\\(100vh-3\\.5rem\\)\\][data-v-be5461fa]{min-height:calc(100vh - 3.5rem)}.wp\\:min-h-screen[data-v-be5461fa]{min-height:100vh}.wp\\:\\!w-full[data-v-be5461fa]{width:100%!important}.wp\\:w-2\\.5[data-v-be5461fa]{width:calc(var(--wp-spacing) * 2.5)}.wp\\:w-3[data-v-be5461fa]{width:calc(var(--wp-spacing) * 3)}.wp\\:w-4[data-v-be5461fa]{width:calc(var(--wp-spacing) * 4)}.wp\\:w-5[data-v-be5461fa]{width:calc(var(--wp-spacing) * 5)}.wp\\:w-6[data-v-be5461fa]{width:calc(var(--wp-spacing) * 6)}.wp\\:w-8[data-v-be5461fa]{width:calc(var(--wp-spacing) * 8)}.wp\\:w-9[data-v-be5461fa]{width:calc(var(--wp-spacing) * 9)}.wp\\:w-12[data-v-be5461fa]{width:calc(var(--wp-spacing) * 12)}.wp\\:w-16[data-v-be5461fa]{width:calc(var(--wp-spacing) * 16)}.wp\\:w-24[data-v-be5461fa]{width:calc(var(--wp-spacing) * 24)}.wp\\:w-48[data-v-be5461fa]{width:calc(var(--wp-spacing) * 48)}.wp\\:w-72[data-v-be5461fa]{width:calc(var(--wp-spacing) * 72)}.wp\\:w-\\[15px\\][data-v-be5461fa]{width:15px}.wp\\:w-\\[16px\\][data-v-be5461fa]{width:16px}.wp\\:w-\\[min\\(92vw\\,330px\\)\\][data-v-be5461fa]{width:min(92vw,330px)}.wp\\:w-auto[data-v-be5461fa]{width:auto}.wp\\:w-fit[data-v-be5461fa]{width:-moz-fit-content;width:fit-content}.wp\\:w-full[data-v-be5461fa]{width:100%}.wp\\:max-w-80[data-v-be5461fa]{max-width:calc(var(--wp-spacing) * 80)}.wp\\:max-w-\\[330px\\][data-v-be5461fa]{max-width:330px}.wp\\:max-w-\\[calc\\(100\\%-2rem\\)\\][data-v-be5461fa]{max-width:calc(100% - 2rem)}.wp\\:max-w-lg[data-v-be5461fa]{max-width:var(--wp-container-lg)}.wp\\:max-w-md[data-v-be5461fa]{max-width:var(--wp-container-md)}.wp\\:max-w-screen-2xl[data-v-be5461fa]{max-width:var(--wp-breakpoint-2xl)}.wp\\:min-w-0[data-v-be5461fa]{min-width:calc(var(--wp-spacing) * 0)}.wp\\:min-w-5[data-v-be5461fa]{min-width:calc(var(--wp-spacing) * 5)}.wp\\:min-w-8[data-v-be5461fa]{min-width:calc(var(--wp-spacing) * 8)}.wp\\:min-w-9[data-v-be5461fa]{min-width:calc(var(--wp-spacing) * 9)}.wp\\:min-w-10[data-v-be5461fa]{min-width:calc(var(--wp-spacing) * 10)}.wp\\:min-w-\\[8rem\\][data-v-be5461fa]{min-width:8rem}.wp\\:min-w-\\[var\\(--reka-select-trigger-width\\)\\][data-v-be5461fa]{min-width:var(--reka-select-trigger-width)}.wp\\:flex-1[data-v-be5461fa]{flex:1}.wp\\:shrink-0[data-v-be5461fa]{flex-shrink:0}.wp\\:grow[data-v-be5461fa]{flex-grow:1}.wp\\:origin-\\(--reka-dropdown-menu-content-transform-origin\\)[data-v-be5461fa]{transform-origin:var(--reka-dropdown-menu-content-transform-origin)}.wp\\:origin-\\(--reka-popover-content-transform-origin\\)[data-v-be5461fa]{transform-origin:var(--reka-popover-content-transform-origin)}.wp\\:translate-x-0[data-v-be5461fa]{--tw-translate-x:calc(var(--wp-spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-x-5[data-v-be5461fa]{--tw-translate-x:calc(var(--wp-spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-x-\\[-50\\%\\][data-v-be5461fa]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:-translate-y-1\\/2[data-v-be5461fa]{--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-be5461fa]{--tw-translate-y:calc(var(--wp-spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[-50\\%\\][data-v-be5461fa]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:translate-y-\\[calc\\(-50\\%_-_2px\\)\\][data-v-be5461fa]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.wp\\:rotate-45[data-v-be5461fa]{rotate:45deg}.wp\\:animate-in[data-v-be5461fa]{animation:enter-be5461fa 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-be5461fa]{animation:var(--wp-animate-pulse)}.wp\\:cursor-default[data-v-be5461fa]{cursor:default}.wp\\:cursor-move[data-v-be5461fa]{cursor:move}.wp\\:cursor-pointer[data-v-be5461fa]{cursor:pointer}.wp\\:touch-none[data-v-be5461fa]{touch-action:none}.wp\\:scroll-my-1[data-v-be5461fa]{scroll-margin-block:calc(var(--wp-spacing) * 1)}.wp\\:scroll-py-1[data-v-be5461fa]{scroll-padding-block:calc(var(--wp-spacing) * 1)}.wp\\:auto-rows-min[data-v-be5461fa]{grid-auto-rows:min-content}.wp\\:grid-cols-2[data-v-be5461fa]{grid-template-columns:repeat(2,minmax(0,1fr))}.wp\\:grid-cols-3[data-v-be5461fa]{grid-template-columns:repeat(3,minmax(0,1fr))}.wp\\:grid-rows-\\[auto_auto\\][data-v-be5461fa]{grid-template-rows:auto auto}.wp\\:flex-col[data-v-be5461fa]{flex-direction:column}.wp\\:flex-col-reverse[data-v-be5461fa]{flex-direction:column-reverse}.wp\\:place-items-center[data-v-be5461fa]{place-items:center}.wp\\:items-center[data-v-be5461fa]{align-items:center}.wp\\:items-end[data-v-be5461fa]{align-items:flex-end}.wp\\:items-start[data-v-be5461fa]{align-items:flex-start}.wp\\:justify-between[data-v-be5461fa]{justify-content:space-between}.wp\\:justify-center[data-v-be5461fa]{justify-content:center}.wp\\:justify-start[data-v-be5461fa]{justify-content:flex-start}.wp\\:gap-0[data-v-be5461fa]{gap:calc(var(--wp-spacing) * 0)}.wp\\:gap-1[data-v-be5461fa]{gap:calc(var(--wp-spacing) * 1)}.wp\\:gap-1\\.5[data-v-be5461fa]{gap:calc(var(--wp-spacing) * 1.5)}.wp\\:gap-2[data-v-be5461fa]{gap:calc(var(--wp-spacing) * 2)}.wp\\:gap-3[data-v-be5461fa]{gap:calc(var(--wp-spacing) * 3)}.wp\\:gap-4[data-v-be5461fa]{gap:calc(var(--wp-spacing) * 4)}.wp\\:gap-6[data-v-be5461fa]{gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-\\[--spacing\\(var\\(--gap\\)\\)\\][data-v-be5461fa]{gap:calc(var(--wp-spacing) * var(--gap))}:where(.wp\\:space-y-2[data-v-be5461fa]>: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-be5461fa]>: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-be5461fa]>: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-be5461fa]{column-gap:calc(var(--wp-spacing) * 6)}.wp\\:gap-y-3[data-v-be5461fa]{row-gap:calc(var(--wp-spacing) * 3)}.wp\\:self-start[data-v-be5461fa]{align-self:flex-start}.wp\\:justify-self-end[data-v-be5461fa]{justify-self:flex-end}.wp\\:truncate[data-v-be5461fa]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.wp\\:overflow-auto[data-v-be5461fa]{overflow:auto}.wp\\:overflow-hidden[data-v-be5461fa]{overflow:hidden}.wp\\:overflow-x-hidden[data-v-be5461fa]{overflow-x:hidden}.wp\\:overflow-y-auto[data-v-be5461fa]{overflow-y:auto}.wp\\:rounded[data-v-be5461fa]{border-radius:.25rem}.wp\\:rounded-2xl[data-v-be5461fa]{border-radius:var(--wp-radius-2xl)}.wp\\:rounded-\\[2px\\][data-v-be5461fa]{border-radius:2px}.wp\\:rounded-\\[inherit\\][data-v-be5461fa]{border-radius:inherit}.wp\\:rounded-full[data-v-be5461fa]{border-radius:3.40282e38px}.wp\\:rounded-lg[data-v-be5461fa]{border-radius:var(--radius)}.wp\\:rounded-md[data-v-be5461fa]{border-radius:calc(var(--radius) - 2px)}.wp\\:rounded-sm[data-v-be5461fa]{border-radius:calc(var(--radius) - 4px)}.wp\\:rounded-xl[data-v-be5461fa]{border-radius:calc(var(--radius) + 4px)}.wp\\:rounded-xs[data-v-be5461fa]{border-radius:var(--wp-radius-xs)}.wp\\:border[data-v-be5461fa]{border-style:var(--tw-border-style);border-width:1px}.wp\\:border-0[data-v-be5461fa]{border-style:var(--tw-border-style);border-width:0}.wp\\:border-t[data-v-be5461fa]{border-top-style:var(--tw-border-style);border-top-width:1px}.wp\\:border-b[data-v-be5461fa]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.wp\\:border-l[data-v-be5461fa]{border-left-style:var(--tw-border-style);border-left-width:1px}.wp\\:border-blue-500[data-v-be5461fa]{border-color:var(--wp-color-blue-500)}.wp\\:border-border[data-v-be5461fa]{border-color:var(--border)}.wp\\:border-destructive[data-v-be5461fa]{border-color:var(--destructive)}.wp\\:border-input[data-v-be5461fa]{border-color:var(--input)}.wp\\:border-primary[data-v-be5461fa]{border-color:var(--primary)}.wp\\:border-white\\/20[data-v-be5461fa]{border-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:border-white\\/20[data-v-be5461fa]{border-color:color-mix(in oklab, var(--wp-color-white) 20%, transparent)}}.wp\\:border-t-transparent[data-v-be5461fa]{border-top-color:#0000}.wp\\:border-l-transparent[data-v-be5461fa]{border-left-color:#0000}.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-be5461fa]{background-color:var(--color-red)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--color-red\\)\\]\\/12[data-v-be5461fa]{background-color:color-mix(in oklab, var(--color-red) 12%, transparent)}}.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-be5461fa]{background-color:var(--p-primary-color)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-\\[var\\(--p-primary-color\\)\\]\\/12[data-v-be5461fa]{background-color:color-mix(in oklab, var(--p-primary-color) 12%, transparent)}}.wp\\:bg-amber-100[data-v-be5461fa]{background-color:var(--wp-color-amber-100)}.wp\\:bg-background[data-v-be5461fa],.wp\\:bg-background\\/95[data-v-be5461fa]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-background\\/95[data-v-be5461fa]{background-color:color-mix(in oklab, var(--background) 95%, transparent)}}.wp\\:bg-black[data-v-be5461fa],.wp\\:bg-black\\/80[data-v-be5461fa]{background-color:var(--wp-color-black)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-black\\/80[data-v-be5461fa]{background-color:color-mix(in oklab, var(--wp-color-black) 80%, transparent)}}.wp\\:bg-blue-100[data-v-be5461fa]{background-color:var(--wp-color-blue-100)}.wp\\:bg-border[data-v-be5461fa]{background-color:var(--border)}.wp\\:bg-card[data-v-be5461fa]{background-color:var(--card)}.wp\\:bg-destructive[data-v-be5461fa]{background-color:var(--destructive)}.wp\\:bg-emerald-100[data-v-be5461fa]{background-color:var(--wp-color-emerald-100)}.wp\\:bg-foreground[data-v-be5461fa]{background-color:var(--foreground)}.wp\\:bg-muted[data-v-be5461fa]{background-color:var(--muted)}.wp\\:bg-neutral-100[data-v-be5461fa]{background-color:var(--wp-color-neutral-100)}.wp\\:bg-neutral-800[data-v-be5461fa]{background-color:var(--wp-color-neutral-800)}.wp\\:bg-popover[data-v-be5461fa]{background-color:var(--popover)}.wp\\:bg-primary[data-v-be5461fa],.wp\\:bg-primary\\/10[data-v-be5461fa]{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-primary\\/10[data-v-be5461fa]{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:bg-purple-100[data-v-be5461fa]{background-color:var(--wp-color-purple-100)}.wp\\:bg-secondary[data-v-be5461fa]{background-color:var(--secondary)}.wp\\:bg-status-available[data-v-be5461fa]{background-color:var(--status-available)}.wp\\:bg-status-hold\\/12[data-v-be5461fa]{background-color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-status-hold\\/12[data-v-be5461fa]{background-color:color-mix(in oklab, var(--status-hold) 12%, transparent)}}.wp\\:bg-transparent[data-v-be5461fa]{background-color:#0000}.wp\\:bg-white[data-v-be5461fa],.wp\\:bg-white\\/70[data-v-be5461fa]{background-color:var(--wp-color-white)}@supports (color:color-mix(in lab, red, red)){.wp\\:bg-white\\/70[data-v-be5461fa]{background-color:color-mix(in oklab, var(--wp-color-white) 70%, transparent)}}.wp\\:bg-gradient-to-r[data-v-be5461fa]{--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-be5461fa]{--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-be5461fa]{--tw-gradient-from:color-mix(in oklab, var(--p-primary-color) 80%, transparent)}}.wp\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/80[data-v-be5461fa]{--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-be5461fa]{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:from-destructive\\/60[data-v-be5461fa]{--tw-gradient-from:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:from-destructive\\/60[data-v-be5461fa]{--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-be5461fa]{--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-be5461fa]{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:to-destructive\\/90[data-v-be5461fa]{--tw-gradient-to:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:to-destructive\\/90[data-v-be5461fa]{--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-be5461fa]{fill:currentColor}.wp\\:fill-foreground[data-v-be5461fa]{fill:var(--foreground)}.wp\\:object-contain[data-v-be5461fa]{object-fit:contain}.wp\\:object-cover[data-v-be5461fa]{object-fit:cover}.wp\\:p-0[data-v-be5461fa]{padding:calc(var(--wp-spacing) * 0)}.wp\\:p-0\\.5[data-v-be5461fa]{padding:calc(var(--wp-spacing) * .5)}.wp\\:p-1[data-v-be5461fa]{padding:calc(var(--wp-spacing) * 1)}.wp\\:p-2[data-v-be5461fa]{padding:calc(var(--wp-spacing) * 2)}.wp\\:p-3[data-v-be5461fa]{padding:calc(var(--wp-spacing) * 3)}.wp\\:p-4[data-v-be5461fa]{padding:calc(var(--wp-spacing) * 4)}.wp\\:p-6[data-v-be5461fa]{padding:calc(var(--wp-spacing) * 6)}.wp\\:p-px[data-v-be5461fa]{padding:1px}.wp\\:px-1[data-v-be5461fa]{padding-inline:calc(var(--wp-spacing) * 1)}.wp\\:px-1\\.5[data-v-be5461fa]{padding-inline:calc(var(--wp-spacing) * 1.5)}.wp\\:px-2[data-v-be5461fa]{padding-inline:calc(var(--wp-spacing) * 2)}.wp\\:px-2\\.5[data-v-be5461fa]{padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:px-3[data-v-be5461fa]{padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:px-4[data-v-be5461fa]{padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:px-6[data-v-be5461fa]{padding-inline:calc(var(--wp-spacing) * 6)}.wp\\:px-10[data-v-be5461fa]{padding-inline:calc(var(--wp-spacing) * 10)}.wp\\:px-14[data-v-be5461fa]{padding-inline:calc(var(--wp-spacing) * 14)}.wp\\:py-1[data-v-be5461fa]{padding-block:calc(var(--wp-spacing) * 1)}.wp\\:py-1\\.5[data-v-be5461fa]{padding-block:calc(var(--wp-spacing) * 1.5)}.wp\\:py-2[data-v-be5461fa]{padding-block:calc(var(--wp-spacing) * 2)}.wp\\:py-3[data-v-be5461fa]{padding-block:calc(var(--wp-spacing) * 3)}.wp\\:py-4[data-v-be5461fa]{padding-block:calc(var(--wp-spacing) * 4)}.wp\\:py-6[data-v-be5461fa]{padding-block:calc(var(--wp-spacing) * 6)}.wp\\:py-8[data-v-be5461fa]{padding-block:calc(var(--wp-spacing) * 8)}.wp\\:pt-0[data-v-be5461fa]{padding-top:calc(var(--wp-spacing) * 0)}.wp\\:pr-2[data-v-be5461fa]{padding-right:calc(var(--wp-spacing) * 2)}.wp\\:pr-4[data-v-be5461fa]{padding-right:calc(var(--wp-spacing) * 4)}.wp\\:pr-8[data-v-be5461fa]{padding-right:calc(var(--wp-spacing) * 8)}.wp\\:pb-0[data-v-be5461fa]{padding-bottom:calc(var(--wp-spacing) * 0)}.wp\\:pb-4[data-v-be5461fa]{padding-bottom:calc(var(--wp-spacing) * 4)}.wp\\:pl-2[data-v-be5461fa]{padding-left:calc(var(--wp-spacing) * 2)}.wp\\:pl-8[data-v-be5461fa]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:text-center[data-v-be5461fa]{text-align:center}.wp\\:text-left[data-v-be5461fa]{text-align:left}.wp\\:font-mono[data-v-be5461fa]{font-family:var(--wp-font-mono)}.wp\\:font-sans[data-v-be5461fa]{font-family:Montserrat,sans-serif}.wp\\:text-3xl[data-v-be5461fa]{font-size:var(--wp-text-3xl);line-height:var(--tw-leading,var(--wp-text-3xl--line-height))}.wp\\:text-base[data-v-be5461fa]{font-size:var(--wp-text-base);line-height:var(--tw-leading,var(--wp-text-base--line-height))}.wp\\:text-lg[data-v-be5461fa]{font-size:var(--wp-text-lg);line-height:var(--tw-leading,var(--wp-text-lg--line-height))}.wp\\:text-sm[data-v-be5461fa]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}.wp\\:text-xs[data-v-be5461fa]{font-size:var(--wp-text-xs);line-height:var(--tw-leading,var(--wp-text-xs--line-height))}.wp\\:text-\\[10px\\][data-v-be5461fa]{font-size:10px}.wp\\:text-\\[11px\\][data-v-be5461fa]{font-size:11px}.wp\\:leading-none[data-v-be5461fa]{--tw-leading:1;line-height:1}.wp\\:font-bold[data-v-be5461fa]{--tw-font-weight:var(--wp-font-weight-bold);font-weight:var(--wp-font-weight-bold)}.wp\\:font-light[data-v-be5461fa]{--tw-font-weight:var(--wp-font-weight-light);font-weight:var(--wp-font-weight-light)}.wp\\:font-medium[data-v-be5461fa]{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:font-semibold[data-v-be5461fa]{--tw-font-weight:var(--wp-font-weight-semibold);font-weight:var(--wp-font-weight-semibold)}.wp\\:tracking-wider[data-v-be5461fa]{--tw-tracking:var(--wp-tracking-wider);letter-spacing:var(--wp-tracking-wider)}.wp\\:tracking-widest[data-v-be5461fa]{--tw-tracking:var(--wp-tracking-widest);letter-spacing:var(--wp-tracking-widest)}.wp\\:text-balance[data-v-be5461fa]{text-wrap:balance}.wp\\:whitespace-nowrap[data-v-be5461fa]{white-space:nowrap}.wp\\:text-\\[var\\(--color-avaible\\)\\][data-v-be5461fa]{color:var(--color-avaible)}.wp\\:text-\\[var\\(--color-primary\\)\\][data-v-be5461fa]{color:var(--color-primary)}.wp\\:text-\\[var\\(--color-red\\)\\][data-v-be5461fa]{color:var(--color-red)}.wp\\:text-\\[var\\(--color-settings\\)\\][data-v-be5461fa]{color:var(--color-settings)}.wp\\:text-\\[var\\(--p-primary-color\\)\\][data-v-be5461fa]{color:var(--p-primary-color)}.wp\\:text-\\[var\\(--primary\\)\\][data-v-be5461fa]{color:var(--primary)}.wp\\:text-amber-500[data-v-be5461fa]{color:var(--wp-color-amber-500)}.wp\\:text-amber-600[data-v-be5461fa]{color:var(--wp-color-amber-600)}.wp\\:text-background[data-v-be5461fa]{color:var(--background)}.wp\\:text-black[data-v-be5461fa]{color:var(--wp-color-black)}.wp\\:text-blue-500[data-v-be5461fa]{color:var(--wp-color-blue-500)}.wp\\:text-blue-600[data-v-be5461fa]{color:var(--wp-color-blue-600)}.wp\\:text-card-foreground[data-v-be5461fa]{color:var(--card-foreground)}.wp\\:text-destructive[data-v-be5461fa]{color:var(--destructive)}.wp\\:text-emerald-600[data-v-be5461fa]{color:var(--wp-color-emerald-600)}.wp\\:text-foreground[data-v-be5461fa]{color:var(--foreground)}.wp\\:text-green-500[data-v-be5461fa]{color:var(--wp-color-green-500)}.wp\\:text-muted-foreground[data-v-be5461fa]{color:var(--muted-foreground)}.wp\\:text-neutral-400[data-v-be5461fa]{color:var(--wp-color-neutral-400)}.wp\\:text-neutral-500[data-v-be5461fa]{color:var(--wp-color-neutral-500)}.wp\\:text-neutral-600[data-v-be5461fa]{color:var(--wp-color-neutral-600)}.wp\\:text-neutral-800[data-v-be5461fa]{color:var(--wp-color-neutral-800)}.wp\\:text-neutral-900[data-v-be5461fa]{color:var(--wp-color-neutral-900)}.wp\\:text-popover-foreground[data-v-be5461fa]{color:var(--popover-foreground)}.wp\\:text-primary[data-v-be5461fa]{color:var(--primary)}.wp\\:text-primary-foreground[data-v-be5461fa]{color:var(--primary-foreground)}.wp\\:text-purple-600[data-v-be5461fa]{color:var(--wp-color-purple-600)}.wp\\:text-red-500[data-v-be5461fa]{color:var(--wp-color-red-500)}.wp\\:text-secondary-foreground[data-v-be5461fa]{color:var(--secondary-foreground)}.wp\\:text-status-available[data-v-be5461fa]{color:var(--status-available)}.wp\\:text-status-disconnected[data-v-be5461fa]{color:var(--status-disconnected)}.wp\\:text-status-hold[data-v-be5461fa]{color:var(--status-hold)}.wp\\:text-status-incall[data-v-be5461fa]{color:var(--status-incall)}.wp\\:text-status-incoming[data-v-be5461fa]{color:var(--status-incoming)}.wp\\:text-white[data-v-be5461fa]{color:var(--wp-color-white)}.wp\\:capitalize[data-v-be5461fa]{text-transform:capitalize}.wp\\:underline-offset-4[data-v-be5461fa]{text-underline-offset:4px}.wp\\:opacity-0[data-v-be5461fa]{opacity:0}.wp\\:opacity-50[data-v-be5461fa]{opacity:.5}.wp\\:opacity-70[data-v-be5461fa]{opacity:.7}.wp\\:opacity-100[data-v-be5461fa]{opacity:1}.wp\\:shadow-lg[data-v-be5461fa]{--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-be5461fa]{--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-be5461fa]{--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-be5461fa]{--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-be5461fa]{--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-be5461fa]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:ring-ring\\/50[data-v-be5461fa]{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:ring-offset-background[data-v-be5461fa]{--tw-ring-offset-color:var(--background)}.wp\\:outline-hidden[data-v-be5461fa]{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:outline-hidden[data-v-be5461fa]{outline-offset:2px;outline:2px solid #0000}}.wp\\:backdrop-blur[data-v-be5461fa]{--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-be5461fa]{--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-be5461fa]{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-be5461fa]{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-be5461fa]{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-be5461fa]{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-be5461fa]{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-be5461fa]{--tw-duration:.15s;transition-duration:.15s}.wp\\:duration-200[data-v-be5461fa]{--tw-duration:.2s;transition-duration:.2s}.wp\\:duration-300[data-v-be5461fa]{--tw-duration:.3s;transition-duration:.3s}.wp\\:ease-in-out[data-v-be5461fa]{--tw-ease:var(--wp-ease-in-out);transition-timing-function:var(--wp-ease-in-out)}.wp\\:fade-in-0[data-v-be5461fa]{--tw-enter-opacity:0}.wp\\:outline-none[data-v-be5461fa]{--tw-outline-style:none;outline-style:none}.wp\\:select-none[data-v-be5461fa]{-webkit-user-select:none;user-select:none}.wp\\:select-text[data-v-be5461fa]{-webkit-user-select:text;user-select:text}.wp\\:zoom-in-95[data-v-be5461fa]{--tw-enter-scale:.95}.wp\\:group-data-\\[disabled\\=true\\]\\:pointer-events-none[data-v-be5461fa]:is(:where(.wp\\:group)[data-disabled=true] *){pointer-events:none}.wp\\:group-data-\\[disabled\\=true\\]\\:opacity-50[data-v-be5461fa]:is(:where(.wp\\:group)[data-disabled=true] *){opacity:.5}.wp\\:peer-disabled\\:cursor-not-allowed[data-v-be5461fa]:is(:where(.wp\\:peer):disabled~*){cursor:not-allowed}.wp\\:peer-disabled\\:opacity-50[data-v-be5461fa]:is(:where(.wp\\:peer):disabled~*){opacity:.5}.wp\\:selection\\:bg-primary[data-v-be5461fa] ::selection,.wp\\:selection\\:bg-primary[data-v-be5461fa]::selection{background-color:var(--primary)}.wp\\:selection\\:text-primary-foreground[data-v-be5461fa] ::selection,.wp\\:selection\\:text-primary-foreground[data-v-be5461fa]::selection{color:var(--primary-foreground)}.wp\\:file\\:inline-flex[data-v-be5461fa]::-webkit-file-upload-button{display:inline-flex}.wp\\:file\\:inline-flex[data-v-be5461fa]::file-selector-button{display:inline-flex}.wp\\:file\\:h-7[data-v-be5461fa]::-webkit-file-upload-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:h-7[data-v-be5461fa]::file-selector-button{height:calc(var(--wp-spacing) * 7)}.wp\\:file\\:border-0[data-v-be5461fa]::-webkit-file-upload-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:border-0[data-v-be5461fa]::file-selector-button{border-style:var(--tw-border-style);border-width:0}.wp\\:file\\:bg-transparent[data-v-be5461fa]::-webkit-file-upload-button{background-color:#0000}.wp\\:file\\:bg-transparent[data-v-be5461fa]::file-selector-button{background-color:#0000}.wp\\:file\\:text-sm[data-v-be5461fa]::-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-be5461fa]::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-be5461fa]::-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-be5461fa]::file-selector-button{--tw-font-weight:var(--wp-font-weight-medium);font-weight:var(--wp-font-weight-medium)}.wp\\:file\\:text-foreground[data-v-be5461fa]::-webkit-file-upload-button{color:var(--foreground)}.wp\\:file\\:text-foreground[data-v-be5461fa]::file-selector-button{color:var(--foreground)}.wp\\:placeholder\\:text-muted-foreground[data-v-be5461fa]::placeholder{color:var(--muted-foreground)}.wp\\:last\\:border-b-0[data-v-be5461fa]: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-be5461fa]: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-be5461fa]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 8%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/10[data-v-be5461fa]: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-be5461fa]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 10%, transparent)}}.wp\\:hover\\:bg-\\[var\\(--p-primary-color\\)\\]\\/20[data-v-be5461fa]: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-be5461fa]:hover{background-color:color-mix(in oklab, var(--p-primary-color) 20%, transparent)}}.wp\\:hover\\:bg-accent[data-v-be5461fa]:hover,.wp\\:hover\\:bg-accent\\/50[data-v-be5461fa]:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-accent\\/50[data-v-be5461fa]:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:hover\\:bg-destructive\\/90[data-v-be5461fa]:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-destructive\\/90[data-v-be5461fa]:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.wp\\:hover\\:bg-muted[data-v-be5461fa]:hover{background-color:var(--muted)}.wp\\:hover\\:bg-neutral-100[data-v-be5461fa]:hover{background-color:var(--wp-color-neutral-100)}.wp\\:hover\\:bg-neutral-200[data-v-be5461fa]:hover{background-color:var(--wp-color-neutral-200)}.wp\\:hover\\:bg-primary\\/10[data-v-be5461fa]:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/10[data-v-be5461fa]:hover{background-color:color-mix(in oklab, var(--primary) 10%, transparent)}}.wp\\:hover\\:bg-primary\\/90[data-v-be5461fa]:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-primary\\/90[data-v-be5461fa]:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.wp\\:hover\\:bg-secondary[data-v-be5461fa]:hover,.wp\\:hover\\:bg-secondary\\/80[data-v-be5461fa]:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-secondary\\/80[data-v-be5461fa]:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.wp\\:hover\\:bg-status-available\\/90[data-v-be5461fa]:hover{background-color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:bg-status-available\\/90[data-v-be5461fa]:hover{background-color:color-mix(in oklab, var(--status-available) 90%, transparent)}}.wp\\:hover\\:bg-transparent[data-v-be5461fa]:hover{background-color:#0000}.wp\\:hover\\:from-\\[color\\:var\\(--p-primary-color\\)\\]\\/75[data-v-be5461fa]: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-be5461fa]: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-be5461fa]: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-be5461fa]:hover{--tw-gradient-from:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:from-destructive\\/70[data-v-be5461fa]:hover{--tw-gradient-from:color-mix(in oklab, var(--destructive) 70%, transparent)}}.wp\\:hover\\:from-destructive\\/70[data-v-be5461fa]: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-be5461fa]: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-be5461fa]:hover{--tw-gradient-to:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:to-destructive\\/95[data-v-be5461fa]:hover{--tw-gradient-to:color-mix(in oklab, var(--destructive) 95%, transparent)}}.wp\\:hover\\:to-destructive\\/95[data-v-be5461fa]: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-be5461fa]:hover{color:var(--accent-foreground)}.wp\\:hover\\:text-destructive[data-v-be5461fa]:hover{color:var(--destructive)}.wp\\:hover\\:text-foreground[data-v-be5461fa]:hover{color:var(--foreground)}.wp\\:hover\\:text-muted-foreground[data-v-be5461fa]:hover{color:var(--muted-foreground)}.wp\\:hover\\:text-primary[data-v-be5461fa]:hover{color:var(--primary)}.wp\\:hover\\:text-status-available\\/80[data-v-be5461fa]:hover{color:var(--status-available)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-available\\/80[data-v-be5461fa]:hover{color:color-mix(in oklab, var(--status-available) 80%, transparent)}}.wp\\:hover\\:text-status-disconnected[data-v-be5461fa]:hover,.wp\\:hover\\:text-status-disconnected\\/80[data-v-be5461fa]:hover{color:var(--status-disconnected)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-disconnected\\/80[data-v-be5461fa]:hover{color:color-mix(in oklab, var(--status-disconnected) 80%, transparent)}}.wp\\:hover\\:text-status-hold\\/80[data-v-be5461fa]:hover{color:var(--status-hold)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-hold\\/80[data-v-be5461fa]:hover{color:color-mix(in oklab, var(--status-hold) 80%, transparent)}}.wp\\:hover\\:text-status-incall\\/80[data-v-be5461fa]:hover{color:var(--status-incall)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incall\\/80[data-v-be5461fa]:hover{color:color-mix(in oklab, var(--status-incall) 80%, transparent)}}.wp\\:hover\\:text-status-incoming\\/80[data-v-be5461fa]:hover{color:var(--status-incoming)}@supports (color:color-mix(in lab, red, red)){.wp\\:hover\\:text-status-incoming\\/80[data-v-be5461fa]:hover{color:color-mix(in oklab, var(--status-incoming) 80%, transparent)}}.wp\\:hover\\:underline[data-v-be5461fa]:hover{text-decoration-line:underline}.wp\\:hover\\:opacity-80[data-v-be5461fa]:hover{opacity:.8}.wp\\:hover\\:opacity-100[data-v-be5461fa]:hover{opacity:1}.wp\\:hover\\:ring-4[data-v-be5461fa]: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-be5461fa]:focus{z-index:10}.wp\\:focus\\:bg-accent[data-v-be5461fa]:focus{background-color:var(--accent)}.wp\\:focus\\:text-accent-foreground[data-v-be5461fa]:focus{color:var(--accent-foreground)}.wp\\:focus\\:ring-2[data-v-be5461fa]: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-be5461fa]:focus{--tw-ring-color:var(--ring)}.wp\\:focus\\:ring-offset-2[data-v-be5461fa]: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-be5461fa]:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus\\:outline-hidden[data-v-be5461fa]:focus{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:z-10[data-v-be5461fa]:focus-visible{z-index:10}.wp\\:focus-visible\\:border-ring[data-v-be5461fa]:focus-visible{border-color:var(--ring)}.wp\\:focus-visible\\:ring-2[data-v-be5461fa]: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-be5461fa]: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-be5461fa]: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-be5461fa]:focus-visible{--tw-ring-color:var(--p-primary-color)}.wp\\:focus-visible\\:ring-destructive\\/20[data-v-be5461fa]:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-destructive\\/20[data-v-be5461fa]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:focus-visible\\:ring-primary\\/50[data-v-be5461fa]:focus-visible{--tw-ring-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-primary\\/50[data-v-be5461fa]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--primary) 50%, transparent)}}.wp\\:focus-visible\\:ring-ring\\/50[data-v-be5461fa]:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.wp\\:focus-visible\\:ring-ring\\/50[data-v-be5461fa]:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.wp\\:focus-visible\\:ring-offset-2[data-v-be5461fa]: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-be5461fa]:focus-visible{--tw-ring-offset-color:var(--wp-color-white)}.wp\\:focus-visible\\:outline-hidden[data-v-be5461fa]:focus-visible{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.wp\\:focus-visible\\:outline-hidden[data-v-be5461fa]:focus-visible{outline-offset:2px;outline:2px solid #0000}}.wp\\:focus-visible\\:outline-1[data-v-be5461fa]:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.wp\\:active\\:scale-95[data-v-be5461fa]: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-be5461fa]:disabled{pointer-events:none}.wp\\:disabled\\:cursor-not-allowed[data-v-be5461fa]:disabled{cursor:not-allowed}.wp\\:disabled\\:opacity-50[data-v-be5461fa]:disabled{opacity:.5}.wp\\:has-data-\\[slot\\=card-action\\]\\:grid-cols-\\[1fr_auto\\][data-v-be5461fa]:has([data-slot=card-action]){grid-template-columns:1fr auto}.wp\\:has-\\[\\>svg\\]\\:px-2\\.5[data-v-be5461fa]:has(>svg){padding-inline:calc(var(--wp-spacing) * 2.5)}.wp\\:has-\\[\\>svg\\]\\:px-3[data-v-be5461fa]:has(>svg){padding-inline:calc(var(--wp-spacing) * 3)}.wp\\:has-\\[\\>svg\\]\\:px-4[data-v-be5461fa]:has(>svg){padding-inline:calc(var(--wp-spacing) * 4)}.wp\\:aria-invalid\\:border-destructive[aria-invalid=true][data-v-be5461fa]{border-color:var(--destructive)}.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-be5461fa]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:aria-invalid\\:ring-destructive\\/20[aria-invalid=true][data-v-be5461fa]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:data-\\[disabled\\]\\:pointer-events-none[data-disabled][data-v-be5461fa]{pointer-events:none}.wp\\:data-\\[disabled\\]\\:opacity-50[data-disabled][data-v-be5461fa]{opacity:.5}.wp\\:data-\\[highlighted\\]\\:bg-accent[data-highlighted][data-v-be5461fa]{background-color:var(--accent)}.wp\\:data-\\[highlighted\\]\\:text-accent-foreground[data-highlighted][data-v-be5461fa]{color:var(--accent-foreground)}.wp\\:data-\\[inset\\]\\:pl-8[data-inset][data-v-be5461fa]{padding-left:calc(var(--wp-spacing) * 8)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-1\\.5[data-orientation=horizontal][data-v-be5461fa]{height:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-full[data-orientation=horizontal][data-v-be5461fa]{height:100%}.wp\\:data-\\[orientation\\=horizontal\\]\\:h-px[data-orientation=horizontal][data-v-be5461fa]{height:1px}.wp\\:data-\\[orientation\\=horizontal\\]\\:w-full[data-orientation=horizontal][data-v-be5461fa]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:h-full[data-orientation=vertical][data-v-be5461fa]{height:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:min-h-44[data-orientation=vertical][data-v-be5461fa]{min-height:calc(var(--wp-spacing) * 44)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-1\\.5[data-orientation=vertical][data-v-be5461fa]{width:calc(var(--wp-spacing) * 1.5)}.wp\\:data-\\[orientation\\=vertical\\]\\:w-auto[data-orientation=vertical][data-v-be5461fa]{width:auto}.wp\\:data-\\[orientation\\=vertical\\]\\:w-full[data-orientation=vertical][data-v-be5461fa]{width:100%}.wp\\:data-\\[orientation\\=vertical\\]\\:w-px[data-orientation=vertical][data-v-be5461fa]{width:1px}.wp\\:data-\\[orientation\\=vertical\\]\\:flex-col[data-orientation=vertical][data-v-be5461fa]{flex-direction:column}.wp\\:data-\\[placeholder\\]\\:text-muted-foreground[data-placeholder][data-v-be5461fa]{color:var(--muted-foreground)}.wp\\:data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom][data-v-be5461fa]{--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-be5461fa]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=left\\]\\:-translate-x-1[data-side=left][data-v-be5461fa]{--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-be5461fa]{--tw-enter-translate-x:calc(2*var(--spacing))}.wp\\:data-\\[side\\=right\\]\\:translate-x-1[data-side=right][data-v-be5461fa]{--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-be5461fa]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.wp\\:data-\\[side\\=top\\]\\:-translate-y-1[data-side=top][data-v-be5461fa]{--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-be5461fa]{--tw-enter-translate-y:calc(2*var(--spacing))}.wp\\:data-\\[size\\=default\\]\\:h-9[data-size=default][data-v-be5461fa]{height:calc(var(--wp-spacing) * 9)}.wp\\:data-\\[size\\=sm\\]\\:h-8[data-size=sm][data-v-be5461fa]{height:calc(var(--wp-spacing) * 8)}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1>*)[data-slot=select-value][data-v-be5461fa]{-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-be5461fa]{display:flex}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:items-center>*)[data-slot=select-value][data-v-be5461fa]{align-items:center}:is(.wp\\:\\*\\:data-\\[slot\\=select-value\\]\\:gap-2>*)[data-slot=select-value][data-v-be5461fa]{gap:calc(var(--wp-spacing) * 2)}.wp\\:data-\\[spacing\\=0\\]\\:rounded-none[data-spacing="0"][data-v-be5461fa]{border-radius:0}.wp\\:data-\\[spacing\\=0\\]\\:shadow-none[data-spacing="0"][data-v-be5461fa]{--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-be5461fa]: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-be5461fa]: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-be5461fa]{animation:accordion-up-be5461fa 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-be5461fa]{animation:exit-be5461fa 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-be5461fa]{--tw-exit-opacity:0}.wp\\:data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed][data-v-be5461fa]{--tw-exit-scale:.95}.wp\\:data-\\[state\\=on\\]\\:bg-accent[data-state=on][data-v-be5461fa]{background-color:var(--accent)}.wp\\:data-\\[state\\=on\\]\\:text-accent-foreground[data-state=on][data-v-be5461fa]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open][data-v-be5461fa]{animation:accordion-down-be5461fa 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-be5461fa]{animation:enter-be5461fa 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-be5461fa]{background-color:var(--accent)}.wp\\:data-\\[state\\=open\\]\\:text-accent-foreground[data-state=open][data-v-be5461fa]{color:var(--accent-foreground)}.wp\\:data-\\[state\\=open\\]\\:text-muted-foreground[data-state=open][data-v-be5461fa]{color:var(--muted-foreground)}.wp\\:data-\\[state\\=open\\]\\:fade-in-0[data-state=open][data-v-be5461fa]{--tw-enter-opacity:0}.wp\\:data-\\[state\\=open\\]\\:zoom-in-95[data-state=open][data-v-be5461fa]{--tw-enter-scale:.95}.wp\\:data-\\[variant\\=destructive\\]\\:text-destructive[data-variant=destructive][data-v-be5461fa]{color:var(--destructive)}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10[data-variant=destructive][data-v-be5461fa]: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-be5461fa]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.wp\\:data-\\[variant\\=destructive\\]\\:focus\\:text-destructive[data-variant=destructive][data-v-be5461fa]:focus{color:var(--destructive)}.wp\\:data-\\[variant\\=outline\\]\\:border-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-be5461fa]{border-color:var(--color-primary-500)}.wp\\:data-\\[variant\\=outline\\]\\:focus-visible\\:ring-\\[color\\:var\\(--color-primary-500\\)\\][data-variant=outline][data-v-be5461fa]: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-be5461fa]{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-be5461fa]{border-color:var(--color-primary-500)}.wp\\:data-\\[spacing\\=default\\]\\:data-\\[variant\\=outline\\]\\:shadow-xs[data-spacing=default][data-variant=outline][data-v-be5461fa]{--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-be5461fa]{background-color:var(--background)}@supports (color:color-mix(in lab, red, red)){.wp\\:supports-backdrop-filter\\:bg-background\\/60[data-v-be5461fa]{background-color:color-mix(in oklab, var(--background) 60%, transparent)}}}@media (min-width:40rem){.wp\\:sm\\:block[data-v-be5461fa]{display:block}.wp\\:sm\\:inline[data-v-be5461fa]{display:inline}.wp\\:sm\\:inline-block[data-v-be5461fa]{display:inline-block}.wp\\:sm\\:max-w-lg[data-v-be5461fa]{max-width:var(--wp-container-lg)}.wp\\:sm\\:max-w-md[data-v-be5461fa]{max-width:var(--wp-container-md)}.wp\\:sm\\:max-w-sm[data-v-be5461fa]{max-width:var(--wp-container-sm)}.wp\\:sm\\:flex-row[data-v-be5461fa]{flex-direction:row}.wp\\:sm\\:justify-end[data-v-be5461fa]{justify-content:flex-end}.wp\\:sm\\:gap-0[data-v-be5461fa]{gap:calc(var(--wp-spacing) * 0)}.wp\\:sm\\:rounded-lg[data-v-be5461fa]{border-radius:var(--radius)}.wp\\:sm\\:text-left[data-v-be5461fa]{text-align:left}}@media (min-width:48rem){.wp\\:md\\:w-full[data-v-be5461fa]{width:100%}.wp\\:md\\:text-sm[data-v-be5461fa]{font-size:var(--wp-text-sm);line-height:var(--tw-leading,var(--wp-text-sm--line-height))}}.wp\\:dark\\:border-input[data-v-be5461fa]:where(.dark,.dark *){border-color:var(--input)}.wp\\:dark\\:bg-amber-900\\/30[data-v-be5461fa]: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-be5461fa]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-amber-900) 30%, transparent)}}.wp\\:dark\\:bg-blue-900\\/30[data-v-be5461fa]: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-be5461fa]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-blue-900) 30%, transparent)}}.wp\\:dark\\:bg-destructive\\/60[data-v-be5461fa]:where(.dark,.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-destructive\\/60[data-v-be5461fa]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.wp\\:dark\\:bg-emerald-900\\/30[data-v-be5461fa]: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-be5461fa]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-emerald-900) 30%, transparent)}}.wp\\:dark\\:bg-input\\/30[data-v-be5461fa]:where(.dark,.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:bg-input\\/30[data-v-be5461fa]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.wp\\:dark\\:bg-neutral-700[data-v-be5461fa]:where(.dark,.dark *){background-color:var(--wp-color-neutral-700)}.wp\\:dark\\:bg-neutral-800[data-v-be5461fa]:where(.dark,.dark *){background-color:var(--wp-color-neutral-800)}.wp\\:dark\\:bg-neutral-900[data-v-be5461fa]:where(.dark,.dark *){background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:bg-neutral-900\\/70[data-v-be5461fa]: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-be5461fa]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-neutral-900) 70%, transparent)}}.wp\\:dark\\:bg-purple-900\\/30[data-v-be5461fa]: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-be5461fa]:where(.dark,.dark *){background-color:color-mix(in oklab, var(--wp-color-purple-900) 30%, transparent)}}.wp\\:dark\\:text-amber-400[data-v-be5461fa]:where(.dark,.dark *){color:var(--wp-color-amber-400)}.wp\\:dark\\:text-blue-400[data-v-be5461fa]:where(.dark,.dark *){color:var(--wp-color-blue-400)}.wp\\:dark\\:text-emerald-400[data-v-be5461fa]:where(.dark,.dark *){color:var(--wp-color-emerald-400)}.wp\\:dark\\:text-neutral-100[data-v-be5461fa]:where(.dark,.dark *){color:var(--wp-color-neutral-100)}.wp\\:dark\\:text-neutral-400[data-v-be5461fa]:where(.dark,.dark *){color:var(--wp-color-neutral-400)}.wp\\:dark\\:text-neutral-500[data-v-be5461fa]:where(.dark,.dark *){color:var(--wp-color-neutral-500)}.wp\\:dark\\:text-purple-400[data-v-be5461fa]:where(.dark,.dark *){color:var(--wp-color-purple-400)}.wp\\:dark\\:text-white[data-v-be5461fa]:where(.dark,.dark *){color:var(--wp-color-white)}@media (hover:hover){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-be5461fa]:where(.dark,.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-accent\\/50[data-v-be5461fa]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-input\\/50[data-v-be5461fa]:where(.dark,.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.wp\\:dark\\:hover\\:bg-input\\/50[data-v-be5461fa]:where(.dark,.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.wp\\:dark\\:hover\\:bg-neutral-600[data-v-be5461fa]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-600)}.wp\\:dark\\:hover\\:bg-neutral-800\\/80[data-v-be5461fa]: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-be5461fa]: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-be5461fa]:where(.dark,.dark *):hover{background-color:var(--wp-color-neutral-900)}.wp\\:dark\\:hover\\:text-neutral-100[data-v-be5461fa]:where(.dark,.dark *):hover{color:var(--wp-color-neutral-100)}.wp\\:dark\\:hover\\:text-status-disconnected[data-v-be5461fa]:where(.dark,.dark *):hover{color:var(--status-disconnected)}}.wp\\:dark\\:focus-visible\\:ring-destructive\\/40[data-v-be5461fa]: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-be5461fa]: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-be5461fa]: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-be5461fa]{--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-be5461fa]{--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-be5461fa]: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-be5461fa]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.wp\\:\\[\\&_button\\]\\:cursor-pointer button[data-v-be5461fa]{cursor:pointer}.wp\\:\\[\\&_svg\\]\\:pointer-events-none svg[data-v-be5461fa]{pointer-events:none}.wp\\:\\[\\&_svg\\]\\:shrink-0 svg[data-v-be5461fa]{flex-shrink:0}.wp\\:\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 svg[data-v-be5461fa]: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-be5461fa]: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-be5461fa]: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-be5461fa]:not([class*="'text-'"]){color:var(--muted-foreground)}.wp\\:\\[\\.border-b\\]\\:pb-6.border-b[data-v-be5461fa]{padding-bottom:calc(var(--wp-spacing) * 6)}.wp\\:\\[\\.border-t\\]\\:pt-6.border-t[data-v-be5461fa]{padding-top:calc(var(--wp-spacing) * 6)}:is(.wp\\:\\*\\*\\:\\[\\[role\\=button\\]\\]\\:cursor-pointer *)[role=button][data-v-be5461fa]{cursor:pointer}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-be5461fa]>*):-webkit-any(span):last-child{display:flex}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:flex[data-v-be5461fa]>*):is(span):last-child{display:flex}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-be5461fa]>*):-webkit-any(span):last-child{align-items:center}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:items-center[data-v-be5461fa]>*):is(span):last-child{align-items:center}:-webkit-any(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-be5461fa]>*):-webkit-any(span):last-child{gap:calc(var(--wp-spacing) * 2)}:is(.wp\\:\\*\\:\\[span\\]\\:last\\:gap-2[data-v-be5461fa]>*):is(span):last-child{gap:calc(var(--wp-spacing) * 2)}:-webkit-any(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-be5461fa]>*):-webkit-any(svg){color:var(--destructive)!important}:is(.wp\\:data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive[data-variant=destructive][data-v-be5461fa]>*):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-be5461fa]: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-be5461fa]{rotate:180deg}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/20[data-v-be5461fa]{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-be5461fa]{background-color:color-mix(in oklab, var(--background) 20%, transparent)}}[data-slot=tooltip-content] .wp\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:text-background[data-v-be5461fa]{color:var(--background)}[data-slot=tooltip-content] .wp\\:dark\\:\\[\\[data-slot\\=tooltip-content\\]_\\&\\]\\:bg-background\\/10[data-v-be5461fa]: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-be5461fa]: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-be5461fa]{clip-path:none!important}[data-v-be5461fa]: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-be5461fa]: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-be5461fa]: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-be5461fa]{--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-be5461fa]{--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-be5461fa]{--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-be5461fa]{font-family:Ibrand,sans-serif}.montserrat[data-v-be5461fa]{font-family:Montserrat}.quicksand[data-v-be5461fa]{font-family:Quicksand}.manrope[data-v-be5461fa]{font-family:Manrope}@keyframes pulse-be5461fa{50%{opacity:.5}}@keyframes enter-be5461fa{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-be5461fa{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-be5461fa{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-be5461fa{0%{height:var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto)))))}to{height:0}}
2
2
  /*$vite$:1*/`)),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
3
- (function(){var cu=Object.defineProperty,Og=(e,t)=>{let r={};for(var n in e)cu(r,n,{get:e[n],enumerable:!0});return t&&cu(r,Symbol.toStringTag,{value:"Module"}),r};function Qs(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var je={},ws=[],dr=()=>{},uu=()=>!1,ei=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ra=e=>e.startsWith("onUpdate:"),Ze=Object.assign,$a=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},Hg=Object.prototype.hasOwnProperty,Ye=(e,t)=>Hg.call(e,t),_e=Array.isArray,ys=e=>bs(e)==="[object Map]",Gn=e=>bs(e)==="[object Set]",du=e=>bs(e)==="[object Date]",Mg=e=>bs(e)==="[object RegExp]",Oe=e=>typeof e=="function",st=e=>typeof e=="string",Tr=e=>typeof e=="symbol",Ge=e=>e!==null&&typeof e=="object",Pa=e=>(Ge(e)||Oe(e))&&Oe(e.then)&&Oe(e.catch),fu=Object.prototype.toString,bs=e=>fu.call(e),Ng=e=>bs(e).slice(8,-1),Ji=e=>bs(e)==="[object Object]",Yi=e=>st(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Jn=Qs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zi=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},qg=/-\w/g,St=Zi(e=>e.replace(qg,t=>t.slice(1).toUpperCase())),Bg=/\B([A-Z])/g,Gt=Zi(e=>e.replace(Bg,"-$1").toLowerCase()),ti=Zi(e=>e.charAt(0).toUpperCase()+e.slice(1)),_s=Zi(e=>e?`on${ti(e)}`:""),Lt=(e,t)=>!Object.is(e,t),Ss=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},pu=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Xi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Qi=e=>{const t=st(e)?Number(e):NaN;return isNaN(t)?e:t},hu,eo=()=>hu||(hu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Lg=Qs("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 Ct(e){if(_e(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=st(n)?Ug(n):Ct(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(st(e)||Ge(e))return e}var Fg=/;(?![^(]*\))/g,Vg=/:([^]+)/,jg=/\/\*[^]*?\*\//g;function Ug(e){const t={};return e.replace(jg,"").split(Fg).forEach(r=>{if(r){const n=r.split(Vg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Xe(e){let t="";if(st(e))t=e;else if(_e(e))for(let r=0;r<e.length;r++){const n=Xe(e[r]);n&&(t+=n+" ")}else if(Ge(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function fr(e){if(!e)return null;let{class:t,style:r}=e;return t&&!st(t)&&(e.class=Xe(t)),r&&(e.style=Ct(r)),e}var gu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",zg=Qs(gu),Zx=Qs(gu+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function vu(e){return!!e||e===""}function Kg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Wr(e[n],t[n]);return r}function Wr(e,t){if(e===t)return!0;let r=du(e),n=du(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=Tr(e),n=Tr(t),r||n)return e===t;if(r=_e(e),n=_e(t),r||n)return r&&n?Kg(e,t):!1;if(r=Ge(e),n=Ge(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||!Wr(e[s],t[s]))return!1}}return String(e)===String(t)}function to(e,t){return e.findIndex(r=>Wr(r,t))}var mu=e=>!!(e&&e.__v_isRef===!0),Be=e=>st(e)?e:e==null?"":_e(e)||Ge(e)&&(e.toString===fu||!Oe(e.toString))?mu(e)?Be(e.value):JSON.stringify(e,wu,2):String(e),wu=(e,t)=>mu(t)?wu(e,t.value):ys(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[Da(n,i)+" =>"]=s,r),{})}:Gn(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>Da(r))}:Tr(t)?Da(t):Ge(t)&&!_e(t)&&!Ji(t)?String(t):t,Da=(e,t="")=>{var r;return Tr(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function Wg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var Dt,Oa=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=Dt,!e&&Dt&&(this.index=(Dt.scopes||(Dt.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=Dt;try{return Dt=this,e()}finally{Dt=t}}}on(){++this._on===1&&(this.prevScope=Dt,Dt=this)}off(){this._on>0&&--this._on===0&&(Dt=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 Ha(e){return new Oa(e)}function ro(){return Dt}function Ma(e,t=!1){Dt&&Dt.cleanups.push(e)}var it,Na=new WeakSet,ri=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,Dt&&Dt.active&&Dt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Na.has(this)&&(Na.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||bu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Tu(this),_u(this);const e=it,t=Er;it=this,Er=!0;try{return this.fn()}finally{Su(this),it=e,Er=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Fa(e);this.deps=this.depsTail=void 0,Tu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Na.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){La(this)&&this.run()}get dirty(){return La(this)}},yu=0,ni,si;function bu(e,t=!1){if(e.flags|=8,t){e.next=si,si=e;return}e.next=ni,ni=e}function qa(){yu++}function Ba(){if(--yu>0)return;if(si){let t=si;for(si=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;ni;){let t=ni;for(ni=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 _u(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Su(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),Fa(n),Gg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function La(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Cu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Cu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ii)||(e.globalVersion=ii,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!La(e))))return;e.flags|=2;const t=e.dep,r=it,n=Er;it=e,Er=!0;try{_u(e);const s=e.fn(e._value);(t.version===0||Lt(s,e._value))&&(e.flags|=128,e._value=s,t.version++)}catch(s){throw t.version++,s}finally{it=r,Er=n,Su(e),e.flags&=-3}}function Fa(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)Fa(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function Gg(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function Jg(e,t){e.effect instanceof ri&&(e=e.effect.fn);const r=new ri(e);t&&Ze(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function Yg(e){e.effect.stop()}var Er=!0,xu=[];function Gr(){xu.push(Er),Er=!1}function Jr(){const e=xu.pop();Er=e===void 0?!0:e}function Tu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=it;it=void 0;try{t()}finally{it=r}}}var ii=0,Zg=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}},no=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(!it||!Er||it===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==it)t=this.activeLink=new Zg(it,this),it.deps?(t.prevDep=it.depsTail,it.depsTail.nextDep=t,it.depsTail=t):it.deps=it.depsTail=t,Eu(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=it.depsTail,t.nextDep=void 0,it.depsTail.nextDep=t,it.depsTail=t,it.deps===t&&(it.deps=r)}return t}trigger(e){this.version++,ii++,this.notify(e)}notify(e){qa();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{Ba()}}};function Eu(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)Eu(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var so=new WeakMap,Yn=Symbol(""),Va=Symbol(""),oi=Symbol("");function Ot(e,t,r){if(Er&&it){let n=so.get(e);n||so.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new no),s.map=n,s.key=r),s.track()}}function Yr(e,t,r,n,s,i){const o=so.get(e);if(!o){ii++;return}const a=l=>{l&&l.trigger()};if(qa(),t==="clear")o.forEach(a);else{const l=_e(e),u=l&&Yi(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===oi||!Tr(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(oi)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Yn)),ys(e)&&a(o.get(Va)));break;case"delete":l||(a(o.get(Yn)),ys(e)&&a(o.get(Va)));break;case"set":ys(e)&&a(o.get(Yn));break}}Ba()}function Xg(e,t){const r=so.get(e);return r&&r.get(t)}function Cs(e){const t=Ue(e);return t===e?t:(Ot(t,"iterate",oi),Jt(e)?t:t.map(Ar))}function io(e){return Ot(e=Ue(e),"iterate",oi),e}function Sn(e,t){return Hr(e)?xs(en(e)?Ar(t):t):Ar(t)}var Qg={__proto__:null,[Symbol.iterator](){return ja(this,Symbol.iterator,e=>Sn(this,e))},concat(...e){return Cs(this).concat(...e.map(t=>_e(t)?Cs(t):t))},entries(){return ja(this,"entries",e=>(e[1]=Sn(this,e[1]),e))},every(e,t){return Zr(this,"every",e,t,void 0,arguments)},filter(e,t){return Zr(this,"filter",e,t,r=>r.map(n=>Sn(this,n)),arguments)},find(e,t){return Zr(this,"find",e,t,r=>Sn(this,r),arguments)},findIndex(e,t){return Zr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Zr(this,"findLast",e,t,r=>Sn(this,r),arguments)},findLastIndex(e,t){return Zr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Zr(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ua(this,"includes",e)},indexOf(...e){return Ua(this,"indexOf",e)},join(e){return Cs(this).join(e)},lastIndexOf(...e){return Ua(this,"lastIndexOf",e)},map(e,t){return Zr(this,"map",e,t,void 0,arguments)},pop(){return ai(this,"pop")},push(...e){return ai(this,"push",e)},reduce(e,...t){return Au(this,"reduce",e,t)},reduceRight(e,...t){return Au(this,"reduceRight",e,t)},shift(){return ai(this,"shift")},some(e,t){return Zr(this,"some",e,t,void 0,arguments)},splice(...e){return ai(this,"splice",e)},toReversed(){return Cs(this).toReversed()},toSorted(e){return Cs(this).toSorted(e)},toSpliced(...e){return Cs(this).toSpliced(...e)},unshift(...e){return ai(this,"unshift",e)},values(){return ja(this,"values",e=>Sn(this,e))}};function ja(e,t,r){const n=io(e),s=n[t]();return n!==e&&!Jt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var ev=Array.prototype;function Zr(e,t,r,n,s,i){const o=io(e),a=o!==e&&!Jt(e),l=o[t];if(l!==ev[t]){const d=l.apply(e,i);return a?Ar(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,Sn(e,d),p,e)}:r.length>2&&(u=function(d,p){return r.call(this,d,p,e)}));const c=l.call(o,u,n);return a&&s?s(c):c}function Au(e,t,r,n){const s=io(e);let i=r;return s!==e&&(Jt(e)?r.length>3&&(i=function(o,a,l){return r.call(this,o,a,l,e)}):i=function(o,a,l){return r.call(this,o,Sn(e,a),l,e)}),s[t](i,...n)}function Ua(e,t,r){const n=Ue(e);Ot(n,"iterate",oi);const s=n[t](...r);return(s===-1||s===!1)&&li(r[0])?(r[0]=Ue(r[0]),n[t](...r)):s}function ai(e,t,r=[]){Gr(),qa();const n=Ue(e)[t].apply(e,r);return Ba(),Jr(),n}var tv=Qs("__proto__,__v_isRef,__isVue"),ku=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Tr));function rv(e){Tr(e)||(e=String(e));const t=Ue(this);return Ot(t,"has",e),t.hasOwnProperty(e)}var Iu=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?Hu:Ou:s?Du:Pu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=_e(e);if(!n){let a;if(i&&(a=Qg[t]))return a;if(t==="hasOwnProperty")return rv}const o=Reflect.get(e,t,tt(e)?e:r);if((Tr(t)?ku.has(t):tv(t))||(n||Ot(e,"get",t),s))return o;if(tt(o)){const a=i&&Yi(t)?o:o.value;return n&&Ge(a)?Ht(a):a}return Ge(o)?n?Ht(o):Xr(o):o}},Ru=class extends Iu{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=_e(e)&&Yi(t);if(!this._isShallow){const l=Hr(s);if(!Jt(r)&&!Hr(r)&&(s=Ue(s),r=Ue(r)),!i&&tt(s)&&!tt(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Ye(e,t),a=Reflect.set(e,t,r,tt(e)?e:n);return e===Ue(n)&&(o?Lt(r,s)&&Yr(e,"set",t,r,s):Yr(e,"add",t,r)),a}deleteProperty(e,t){const r=Ye(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&Yr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!Tr(t)||!ku.has(t))&&Ot(e,"has",t),r}ownKeys(e){return Ot(e,"iterate",_e(e)?"length":Yn),Reflect.ownKeys(e)}},$u=class extends Iu{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},nv=new Ru,sv=new $u,iv=new Ru(!0),ov=new $u(!0),za=e=>e,oo=e=>Reflect.getPrototypeOf(e);function av(e,t,r){return function(...n){const s=this.__v_raw,i=Ue(s),o=ys(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?za:t?xs:Ar;return!t&&Ot(i,"iterate",l?Va:Yn),Ze(Object.create(u),{next(){const{value:d,done:p}=u.next();return p?{value:d,done:p}:{value:a?[c(d[0]),c(d[1])]:c(d),done:p}}})}}function ao(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function lv(e,t){const r={get(n){const s=this.__v_raw,i=Ue(s),o=Ue(n);e||(Lt(n,o)&&Ot(i,"get",n),Ot(i,"get",o));const{has:a}=oo(i),l=t?za:e?xs:Ar;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&&Ot(Ue(n),"iterate",Yn),n.size},has(n){const s=this.__v_raw,i=Ue(s),o=Ue(n);return e||(Lt(n,o)&&Ot(i,"has",n),Ot(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=Ue(o),l=t?za:e?xs:Ar;return!e&&Ot(a,"iterate",Yn),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return Ze(r,e?{add:ao("add"),set:ao("set"),delete:ao("delete"),clear:ao("clear")}:{add(n){!t&&!Jt(n)&&!Hr(n)&&(n=Ue(n));const s=Ue(this);return oo(s).has.call(s,n)||(s.add(n),Yr(s,"add",n,n)),this},set(n,s){!t&&!Jt(s)&&!Hr(s)&&(s=Ue(s));const i=Ue(this),{has:o,get:a}=oo(i);let l=o.call(i,n);l||(n=Ue(n),l=o.call(i,n));const u=a.call(i,n);return i.set(n,s),l?Lt(s,u)&&Yr(i,"set",n,s,u):Yr(i,"add",n,s),this},delete(n){const s=Ue(this),{has:i,get:o}=oo(s);let a=i.call(s,n);a||(n=Ue(n),a=i.call(s,n));const l=o?o.call(s,n):void 0,u=s.delete(n);return a&&Yr(s,"delete",n,void 0,l),u},clear(){const n=Ue(this),s=n.size!==0,i=void 0,o=n.clear();return s&&Yr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=av(n,e,t)}),r}function lo(e,t){const r=lv(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(Ye(r,s)&&s in n?r:n,s,i)}var cv={get:lo(!1,!1)},uv={get:lo(!1,!0)},dv={get:lo(!0,!1)},fv={get:lo(!0,!0)},Pu=new WeakMap,Du=new WeakMap,Ou=new WeakMap,Hu=new WeakMap;function pv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function hv(e){return e.__v_skip||!Object.isExtensible(e)?0:pv(Ng(e))}function Xr(e){return Hr(e)?e:co(e,!1,nv,cv,Pu)}function Mu(e){return co(e,!1,iv,uv,Du)}function Ht(e){return co(e,!0,sv,dv,Ou)}function Qr(e){return co(e,!0,ov,fv,Hu)}function co(e,t,r,n,s){if(!Ge(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=hv(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 en(e){return Hr(e)?en(e.__v_raw):!!(e&&e.__v_isReactive)}function Hr(e){return!!(e&&e.__v_isReadonly)}function Jt(e){return!!(e&&e.__v_isShallow)}function li(e){return e?!!e.__v_raw:!1}function Ue(e){const t=e&&e.__v_raw;return t?Ue(t):e}function Ka(e){return!Ye(e,"__v_skip")&&Object.isExtensible(e)&&pu(e,"__v_skip",!0),e}var Ar=e=>Ge(e)?Xr(e):e,xs=e=>Ge(e)?Ht(e):e;function tt(e){return e?e.__v_isRef===!0:!1}function F(e){return Nu(e,!1)}function pt(e){return Nu(e,!0)}function Nu(e,t){return tt(e)?e:new gv(e,t)}var gv=class{constructor(e,t){this.dep=new no,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ue(e),this._value=t?e:Ar(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Jt(e)||Hr(e);e=r?e:Ue(e),Lt(e,t)&&(this._rawValue=e,this._value=r?e:Ar(e),this.dep.trigger())}};function qu(e){e.dep&&e.dep.trigger()}function f(e){return tt(e)?e.value:e}function Re(e){return Oe(e)?e():f(e)}var vv={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return tt(s)&&!tt(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Wa(e){return en(e)?e:new Proxy(e,vv)}var mv=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new no,{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 ci(e){return new mv(e)}function Mt(e){const t=_e(e)?new Array(e.length):{};for(const r in e)t[r]=Bu(e,r);return t}var wv=class{constructor(e,t,r){this._object=e,this._key=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._raw=Ue(e);let n=!0,s=e;if(!_e(e)||!Yi(String(t)))do n=!li(s)||Jt(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&&tt(this._raw[this._key])){const t=this._object[this._key];if(tt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return Xg(this._raw,this._key)}},yv=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 Ga(e,t,r){return tt(e)?e:Oe(e)?new yv(e):Ge(e)&&arguments.length>1?Bu(e,t,r):F(e)}function Bu(e,t,r){return new wv(e,t,r)}var bv=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new no(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ii-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&it!==this)return bu(this,!0),!0}get value(){const e=this.dep.track();return Cu(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function _v(e,t,r=!1){let n,s;return Oe(e)?n=e:(n=e.get,s=e.set),new bv(n,s,r)}var Sv={GET:"get",HAS:"has",ITERATE:"iterate"},Cv={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},uo={},fo=new WeakMap,Cn=void 0;function xv(){return Cn}function Lu(e,t=!1,r=Cn){if(r){let n=fo.get(r);n||fo.set(r,n=[]),n.push(e)}}function Tv(e,t,r=je){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=y=>s?y:Jt(y)||s===!1||s===0?tn(y,1):tn(y);let c,d,p,h,m=!1,w=!1;if(tt(e)?(d=()=>e.value,m=Jt(e)):en(e)?(d=()=>u(e),m=!0):_e(e)?(w=!0,m=e.some(y=>en(y)||Jt(y)),d=()=>e.map(y=>{if(tt(y))return y.value;if(en(y))return u(y);if(Oe(y))return l?l(y,2):y()})):Oe(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Gr();try{p()}finally{Jr()}}const y=Cn;Cn=c;try{return l?l(e,3,[h]):e(h)}finally{Cn=y}}:d=dr,t&&s){const y=d,T=s===!0?1/0:s;d=()=>tn(y(),T)}const x=ro(),g=()=>{c.stop(),x&&x.active&&$a(x.effects,c)};if(i&&t){const y=t;t=(...T)=>{y(...T),g()}}let S=w?new Array(e.length).fill(uo):uo;const b=y=>{if(!(!(c.flags&1)||!c.dirty&&!y))if(t){const T=c.run();if(s||m||(w?T.some((k,N)=>Lt(k,S[N])):Lt(T,S))){p&&p();const k=Cn;Cn=c;try{const N=[T,S===uo?void 0:w&&S[0]===uo?[]:S,h];S=T,l?l(t,3,N):t(...N)}finally{Cn=k}}}else c.run()};return a&&a(b),c=new ri(d),c.scheduler=o?()=>o(b,!1):b,h=y=>Lu(y,!1,c),p=c.onStop=()=>{const y=fo.get(c);if(y){if(l)l(y,4);else for(const T of y)T();fo.delete(c)}},t?n?b(!0):S=c.run():o?o(b.bind(null,!0),!0):c.run(),g.pause=c.pause.bind(c),g.resume=c.resume.bind(c),g.stop=g,g}function tn(e,t=1/0,r){if(t<=0||!Ge(e)||e.__v_skip||(r=r||new Map,(r.get(e)||0)>=t))return e;if(r.set(e,t),t--,tt(e))tn(e.value,t,r);else if(_e(e))for(let n=0;n<e.length;n++)tn(e[n],t,r);else if(Gn(e)||ys(e))e.forEach(n=>{tn(n,t,r)});else if(Ji(e)){for(const n in e)tn(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&tn(e[n],t,r)}return e}var Fu=[];function Ev(e){Fu.push(e)}function Av(){Fu.pop()}function kv(e,t){}var Iv={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"},Rv={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 Ts(e,t,r,n){try{return n?e(...n):e()}catch(s){Zn(s,t,r)}}function pr(e,t,r,n){if(Oe(e)){const s=Ts(e,t,r,n);return s&&Pa(s)&&s.catch(i=>{Zn(i,t,r)}),s}if(_e(e)){const s=[];for(let i=0;i<e.length;i++)s.push(pr(e[i],t,r,n));return s}}function Zn(e,t,r,n=!0){const s=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||je;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){Gr(),Ts(i,null,10,[e,l,u]),Jr();return}}$v(e,r,s,n,o)}function $v(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Ft=[],Mr=-1,Es=[],xn=null,As=0,Vu=Promise.resolve(),po=null;function Et(e){const t=po||Vu;return e?t.then(this?e.bind(this):e):t}function Pv(e){let t=Mr+1,r=Ft.length;for(;t<r;){const n=t+r>>>1,s=Ft[n],i=di(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Ja(e){if(!(e.flags&1)){const t=di(e),r=Ft[Ft.length-1];!r||!(e.flags&2)&&t>=di(r)?Ft.push(e):Ft.splice(Pv(t),0,e),e.flags|=1,ju()}}function ju(){po||(po=Vu.then(zu))}function ui(e){_e(e)?Es.push(...e):xn&&e.id===-1?xn.splice(As+1,0,e):e.flags&1||(Es.push(e),e.flags|=1),ju()}function Uu(e,t,r=Mr+1){for(;r<Ft.length;r++){const n=Ft[r];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Ft.splice(r,1),r--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function ho(e){if(Es.length){const t=[...new Set(Es)].sort((r,n)=>di(r)-di(n));if(Es.length=0,xn){xn.push(...t);return}for(xn=t,As=0;As<xn.length;As++){const r=xn[As];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}xn=null,As=0}}var di=e=>e.id==null?e.flags&2?-1:1/0:e.id;function zu(e){try{for(Mr=0;Mr<Ft.length;Mr++){const t=Ft[Mr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ts(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Mr<Ft.length;Mr++){const t=Ft[Mr];t&&(t.flags&=-2)}Mr=-1,Ft.length=0,ho(e),po=null,(Ft.length||Es.length)&&zu(e)}}var ks,go=[];function Ku(e,t){var r,n;ks=e,ks?(ks.enabled=!0,go.forEach(({event:s,args:i})=>ks.emit(s,...i)),go=[]):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=>{Ku(s,t)}),setTimeout(()=>{ks||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,go=[])},3e3)):go=[]}var It=null,vo=null;function fi(e){const t=It;return It=e,vo=e&&e.type.__scopeId||null,t}function Dv(e){vo=e}function Ov(){vo=null}var Hv=e=>I;function I(e,t=It,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&Ti(-1);const i=fi(t);let o;try{o=e(...s)}finally{fi(i),n._d&&Ti(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function mo(e,t){if(It===null)return e;const r=Ei(It),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=je]=t[s];i&&(Oe(i)&&(i={mounted:i,updated:i}),i.deep&&tn(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function Nr(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&&(Gr(),pr(l,r,8,[e.el,a,e,t]),Jr())}}function Xn(e,t){if(Rt){let r=Rt.provides;const n=Rt.parent&&Rt.parent.provides;n===r&&(r=Rt.provides=Object.create(n)),r[e]=t}}function Vt(e,t,r=!1){const n=vt();if(n||Qn){let s=Qn?Qn._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&&Oe(t)?t.call(n&&n.proxy):t}}function Mv(){return!!(vt()||Qn)}var Wu=Symbol.for("v-scx"),Gu=()=>{{const e=Vt(Wu);return e}};function ct(e,t){return pi(e,null,t)}function Ya(e,t){return pi(e,null,{flush:"post"})}function Ju(e,t){return pi(e,null,{flush:"sync"})}function Me(e,t,r){return pi(e,t,r)}function pi(e,t,r=je){const{immediate:n,deep:s,flush:i,once:o}=r,a=Ze({},r),l=t&&n||!t&&i!=="post";let u;if(Hs){if(i==="sync"){const h=Gu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=dr,h.resume=dr,h.pause=dr,h}}const c=Rt;a.call=(h,m,w)=>pr(h,c,m,w);let d=!1;i==="post"?a.scheduler=h=>{yt(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Ja(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=Tv(e,t,a);return Hs&&(u?u.push(p):l&&p()),p}function Nv(e,t,r){const n=this.proxy,s=st(e)?e.includes(".")?Yu(n,e):()=>n[e]:e.bind(n,n);let i;Oe(t)?i=t:(i=t.handler,r=t);const o=ns(this),a=pi(s,i.bind(n),r);return o(),a}function Yu(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 Zu=Symbol("_vte"),Xu=e=>e.__isTeleport,hi=e=>e&&(e.disabled||e.disabled===""),Qu=e=>e&&(e.defer||e.defer===""),ed=e=>typeof SVGElement<"u"&&e instanceof SVGElement,td=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Za=(e,t)=>{const r=e&&e.to;return st(r)?t?t(r):null:r},rd={name:"Teleport",__isTeleport:!0,process(e,t,r,n,s,i,o,a,l,u){const{mc:c,pc:d,pbc:p,o:{insert:h,querySelector:m,createText:w,createComment:x}}=u,g=hi(t.props);let{shapeFlag:S,children:b,dynamicChildren:y}=t;if(e==null){const T=t.el=w(""),k=t.anchor=w("");h(T,r,n),h(k,r,n);const N=(B,q)=>{S&16&&c(b,B,q,s,i,o,a,l)},v=()=>{const B=t.target=Za(t.props,m),q=Qa(B,t,w,h);B&&(o!=="svg"&&ed(B)?o="svg":o!=="mathml"&&td(B)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(B),g||(N(B,q),yo(t,!1)))};g&&(N(r,k),yo(t,!0)),Qu(t.props)?(t.el.__isMounted=!1,yt(()=>{v(),delete t.el.__isMounted},i)):v()}else{if(Qu(t.props)&&e.el.__isMounted===!1){yt(()=>{rd.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const T=t.anchor=e.anchor,k=t.target=e.target,N=t.targetAnchor=e.targetAnchor,v=hi(e.props),B=v?r:k,q=v?T:N;if(o==="svg"||ed(k)?o="svg":(o==="mathml"||td(k))&&(o="mathml"),y?(p(e.dynamicChildren,y,B,s,i,o,a),yl(e,t,!0)):l||d(e,t,B,q,s,i,o,a,!1),g)v?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):wo(t,r,T,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const C=t.target=Za(t.props,m);C&&wo(t,C,null,u,0)}else v&&wo(t,k,N,u,1);yo(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||!hi(p);for(let m=0;m<a.length;m++){const w=a[m];n(w,t,r,h,!!w.dynamicChildren)}}},move:wo,hydrate:qv};function wo(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||hi(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function qv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(x,g){let S=g;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,x._lpa=t.targetAnchor&&o(t.targetAnchor);break}}S=o(S)}}function h(x,g){g.anchor=d(o(x),g,a(x),r,n,s,i)}const m=t.target=Za(t.props,l),w=hi(t.props);if(m){const x=m._lpa||m.firstChild;t.shapeFlag&16&&(w?(h(e,t),p(m,x),t.targetAnchor||Qa(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,x),t.targetAnchor||Qa(m,t,c,u),d(x&&o(x),t,m,r,n,s,i))),yo(t,w)}else w&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var Xa=rd;function yo(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 Qa(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[Zu]=o,e&&(n(i,e,s),n(o,e,s)),o}var qr=Symbol("_leaveCb"),gi=Symbol("_enterCb");function el(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Qe(()=>{e.isMounted=!0}),Ds(()=>{e.isUnmounting=!0}),e}var hr=[Function,Array],tl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:hr,onEnter:hr,onAfterEnter:hr,onEnterCancelled:hr,onBeforeLeave:hr,onLeave:hr,onAfterLeave:hr,onLeaveCancelled:hr,onBeforeAppear:hr,onAppear:hr,onAfterAppear:hr,onAppearCancelled:hr},nd=e=>{const t=e.subTree;return t.component?nd(t.component):t},Bv={name:"BaseTransition",props:tl,setup(e,{slots:t}){const r=vt(),n=el();return()=>{const s=t.default&&bo(t.default(),!0);if(!s||!s.length)return;const i=sd(s),o=Ue(e),{mode:a}=o;if(n.isLeaving)return rl(i);const l=ad(i);if(!l)return rl(i);let u=Is(l,o,n,r,d=>u=d);l.type!==gt&&rn(l,u);let c=r.subTree&&ad(r.subTree);if(c&&c.type!==gt&&!kr(c,l)&&nd(r).type!==gt){let d=Is(c,o,n,r);if(rn(c,d),a==="out-in"&&l.type!==gt)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,c=void 0},rl(i);a==="in-out"&&l.type!==gt?d.delayLeave=(p,h,m)=>{const w=od(n,c);w[String(c.key)]=c,p[qr]=()=>{h(),p[qr]=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 sd(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==gt){t=r;break}}return t}var id=Bv;function od(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 Is(e,t,r,n,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:w,onBeforeAppear:x,onAppear:g,onAfterAppear:S,onAppearCancelled:b}=t,y=String(e.key),T=od(r,e),k=(B,q)=>{B&&pr(B,n,9,q)},N=(B,q)=>{const C=q[1];k(B,q),_e(B)?B.every(_=>_.length<=1)&&C():B.length<=1&&C()},v={mode:o,persisted:a,beforeEnter(B){let q=l;if(!r.isMounted)if(i)q=x||l;else return;B[qr]&&B[qr](!0);const C=T[y];C&&kr(e,C)&&C.el[qr]&&C.el[qr](),k(q,[B])},enter(B){if(T[y]===e)return;let q=u,C=c,_=d;if(!r.isMounted)if(i)q=g||u,C=S||c,_=b||d;else return;let E=!1;B[gi]=R=>{E||(E=!0,R?k(_,[B]):k(C,[B]),v.delayedLeave&&v.delayedLeave(),B[gi]=void 0)};const P=B[gi].bind(null,!1);q?N(q,[B,P]):P()},leave(B,q){const C=String(e.key);if(B[gi]&&B[gi](!0),r.isUnmounting)return q();k(p,[B]);let _=!1;B[qr]=P=>{_||(_=!0,q(),P?k(w,[B]):k(m,[B]),B[qr]=void 0,T[C]===e&&delete T[C])};const E=B[qr].bind(null,!1);T[C]=e,h?N(h,[B,E]):E()},clone(B){const q=Is(B,t,r,n,s);return s&&s(q),q}};return v}function rl(e){if(vi(e))return e=Ir(e),e.children=null,e}function ad(e){if(!vi(e))return Xu(e.type)&&e.children?sd(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&&Oe(r.default))return r.default()}}function rn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,rn(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 bo(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===ze?(o.patchFlag&128&&s++,n=n.concat(bo(o.children,t,a))):(t||o.type!==gt)&&n.push(a!=null?Ir(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 Oe(e)?Ze({name:e.name},t,{setup:e}):e}function ld(){const e=vt();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function nl(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Lv(e){const t=vt(),r=pt(null);if(t){const n=t.refs===je?t.refs={}:t.refs;Object.defineProperty(n,e,{enumerable:!0,get:()=>r.value,set:s=>r.value=s})}return r}function cd(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var _o=new WeakMap;function Rs(e,t,r,n,s=!1){if(_e(e)){e.forEach((w,x)=>Rs(w,t&&(_e(t)?t[x]:t),r,n,s));return}if(nn(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Rs(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?Ei(n.component):n.el,o=s?null:i,{i:a,r:l}=e,u=t&&t.r,c=a.refs===je?a.refs={}:a.refs,d=a.setupState,p=Ue(d),h=d===je?uu:w=>cd(c,w)?!1:Ye(p,w),m=(w,x)=>!(x&&cd(c,x));if(u!=null&&u!==l){if(ud(t),st(u))c[u]=null,h(u)&&(d[u]=null);else if(tt(u)){const w=t;m(u,w.k)&&(u.value=null),w.k&&(c[w.k]=null)}}if(Oe(l))Ts(l,a,12,[o,c]);else{const w=st(l),x=tt(l);if(w||x){const g=()=>{if(e.f){const S=w?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)_e(S)&&$a(S,i);else if(_e(S))S.includes(i)||S.push(i);else if(w)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 w?(c[l]=o,h(l)&&(d[l]=o)):x&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const S=()=>{g(),_o.delete(e)};S.id=-1,_o.set(e,S),yt(S,r)}else ud(e),g()}}}function ud(e){const t=_o.get(e);t&&(t.flags|=8,_o.delete(e))}var dd=!1,$s=()=>{dd||(console.error("Hydration completed but contains mismatches."),dd=!0)},Fv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Vv=e=>e.namespaceURI.includes("MathML"),So=e=>{if(e.nodeType===1){if(Fv(e))return"svg";if(Vv(e))return"mathml"}},Ps=e=>e.nodeType===8;function jv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(b,y)=>{if(!y.hasChildNodes()){r(null,b,y),ho(),y._vnode=b;return}d(y.firstChild,b,null,null,null),ho(),y._vnode=b},d=(b,y,T,k,N,v=!1)=>{v=v||!!y.dynamicChildren;const B=Ps(b)&&b.data==="[",q=()=>w(b,y,T,k,N,B),{type:C,ref:_,shapeFlag:E,patchFlag:P}=y;let R=b.nodeType;y.el=b,P===-2&&(v=!1,y.dynamicChildren=null);let D=null;switch(C){case Tn:R!==3?y.children===""?(l(y.el=s(""),o(b),b),D=b):D=q():(b.data!==y.children&&($s(),b.data=y.children),D=i(b));break;case gt:S(b)?(D=i(b),g(y.el=b.content.firstChild,b,T)):R!==8||B?D=q():D=i(b);break;case ts:if(B&&(b=i(b),R=b.nodeType),R===1||R===3){D=b;const J=!y.children.length;for(let W=0;W<y.staticCount;W++)J&&(y.children+=D.nodeType===1?D.outerHTML:D.data),W===y.staticCount-1&&(y.anchor=D),D=i(D);return B?i(D):D}else q();break;case ze:B?D=m(b,y,T,k,N,v):D=q();break;default:if(E&1)(R!==1||y.type.toLowerCase()!==b.tagName.toLowerCase())&&!S(b)?D=q():D=p(b,y,T,k,N,v);else if(E&6){y.slotScopeIds=N;const J=o(b);if(B?D=x(b):Ps(b)&&b.data==="teleport start"?D=x(b,b.data,"teleport end"):D=i(b),t(y,J,null,T,k,So(J),v),nn(y)&&!y.type.__asyncResolved){let W;B?(W=H(ze),W.anchor=D?D.previousSibling:J.lastChild):W=b.nodeType===3?Ne(""):H("div"),W.el=b,y.component.subTree=W}}else E&64?R!==8?D=q():D=y.type.hydrate(b,y,T,k,N,v,e,h):E&128&&(D=y.type.hydrate(b,y,T,k,So(o(b)),N,v,e,d))}return _!=null&&Rs(_,null,k,y),D},p=(b,y,T,k,N,v)=>{v=v||!!y.dynamicChildren;const{type:B,props:q,patchFlag:C,shapeFlag:_,dirs:E,transition:P}=y,R=B==="input"||B==="option";if(R||C!==-1){E&&Nr(y,null,T,"created");let D=!1;if(S(b)){D=Wd(null,P)&&T&&T.vnode.props&&T.vnode.props.appear;const W=b.content.firstChild;if(D){const ae=W.getAttribute("class");ae&&(W.$cls=ae),P.beforeEnter(W)}g(W,b,T),y.el=b=W}if(_&16&&!(q&&(q.innerHTML||q.textContent))){let W=h(b.firstChild,y,b,T,k,N,v);for(;W;){Co(b,1)||$s();const ae=W;W=W.nextSibling,a(ae)}}else if(_&8){let W=y.children;W[0]===`
3
+ (function(){var fu=Object.defineProperty,Ng=(e,t)=>{let r={};for(var n in e)fu(r,n,{get:e[n],enumerable:!0});return t&&fu(r,Symbol.toStringTag,{value:"Module"}),r};function Xs(e){const t=Object.create(null);for(const r of e.split(","))t[r]=1;return r=>r in t}var Ue={},ms=[],fr=()=>{},pu=()=>!1,Qs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Pa=e=>e.startsWith("onUpdate:"),Qe=Object.assign,Da=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},qg=Object.prototype.hasOwnProperty,Ye=(e,t)=>qg.call(e,t),_e=Array.isArray,ws=e=>ys(e)==="[object Map]",Gn=e=>ys(e)==="[object Set]",hu=e=>ys(e)==="[object Date]",Bg=e=>ys(e)==="[object RegExp]",De=e=>typeof e=="function",it=e=>typeof e=="string",Er=e=>typeof e=="symbol",Ge=e=>e!==null&&typeof e=="object",Oa=e=>(Ge(e)||De(e))&&De(e.then)&&De(e.catch),gu=Object.prototype.toString,ys=e=>gu.call(e),Lg=e=>ys(e).slice(8,-1),Ji=e=>ys(e)==="[object Object]",Yi=e=>it(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Jn=Xs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Zi=e=>{const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))},Fg=/-\w/g,_t=Zi(e=>e.replace(Fg,t=>t.slice(1).toUpperCase())),Vg=/\B([A-Z])/g,Gt=Zi(e=>e.replace(Vg,"-$1").toLowerCase()),ei=Zi(e=>e.charAt(0).toUpperCase()+e.slice(1)),bs=Zi(e=>e?`on${ei(e)}`:""),Bt=(e,t)=>!Object.is(e,t),_s=(e,...t)=>{for(let r=0;r<e.length;r++)e[r](...t)},vu=(e,t,r,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:r})},Xi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Qi=e=>{const t=it(e)?Number(e):NaN;return isNaN(t)?e:t},mu,eo=()=>mu||(mu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),jg=Xs("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 St(e){if(_e(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],s=it(n)?Wg(n):St(n);if(s)for(const i in s)t[i]=s[i]}return t}else if(it(e)||Ge(e))return e}var Ug=/;(?![^(]*\))/g,zg=/:([^]+)/,Kg=/\/\*[^]*?\*\//g;function Wg(e){const t={};return e.replace(Kg,"").split(Ug).forEach(r=>{if(r){const n=r.split(zg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function et(e){let t="";if(it(e))t=e;else if(_e(e))for(let r=0;r<e.length;r++){const n=et(e[r]);n&&(t+=n+" ")}else if(Ge(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}function pr(e){if(!e)return null;let{class:t,style:r}=e;return t&&!it(t)&&(e.class=et(t)),r&&(e.style=St(r)),e}var wu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Gg=Xs(wu),nT=Xs(wu+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function yu(e){return!!e||e===""}function Jg(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=Gr(e[n],t[n]);return r}function Gr(e,t){if(e===t)return!0;let r=hu(e),n=hu(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=Er(e),n=Er(t),r||n)return e===t;if(r=_e(e),n=_e(t),r||n)return r&&n?Jg(e,t):!1;if(r=Ge(e),n=Ge(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||!Gr(e[s],t[s]))return!1}}return String(e)===String(t)}function to(e,t){return e.findIndex(r=>Gr(r,t))}var bu=e=>!!(e&&e.__v_isRef===!0),Le=e=>it(e)?e:e==null?"":_e(e)||Ge(e)&&(e.toString===gu||!De(e.toString))?bu(e)?Le(e.value):JSON.stringify(e,_u,2):String(e),_u=(e,t)=>bu(t)?_u(e,t.value):ws(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,s],i)=>(r[Ha(n,i)+" =>"]=s,r),{})}:Gn(t)?{[`Set(${t.size})`]:[...t.values()].map(r=>Ha(r))}:Er(t)?Ha(t):Ge(t)&&!_e(t)&&!Ji(t)?String(t):t,Ha=(e,t="")=>{var r;return Er(e)?`Symbol(${(r=e.description)!=null?r:t})`:e};function Yg(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:(typeof e!="number"||Number.isFinite(e),String(e))}var Dt,Ma=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=Dt,!e&&Dt&&(this.index=(Dt.scopes||(Dt.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=Dt;try{return Dt=this,e()}finally{Dt=t}}}on(){++this._on===1&&(this.prevScope=Dt,Dt=this)}off(){this._on>0&&--this._on===0&&(Dt=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 Na(e){return new Ma(e)}function ro(){return Dt}function qa(e,t=!1){Dt&&Dt.cleanups.push(e)}var ot,Ba=new WeakSet,ti=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,Dt&&Dt.active&&Dt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ba.has(this)&&(Ba.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Cu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,ku(this),xu(this);const e=ot,t=Ar;ot=this,Ar=!0;try{return this.fn()}finally{Tu(this),ot=e,Ar=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)ja(e);this.deps=this.depsTail=void 0,ku(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ba.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Va(this)&&this.run()}get dirty(){return Va(this)}},Su=0,ri,ni;function Cu(e,t=!1){if(e.flags|=8,t){e.next=ni,ni=e;return}e.next=ri,ri=e}function La(){Su++}function Fa(){if(--Su>0)return;if(ni){let t=ni;for(ni=void 0;t;){const r=t.next;t.next=void 0,t.flags&=-9,t=r}}let e;for(;ri;){let t=ri;for(ri=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 xu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tu(e){let t,r=e.depsTail,n=r;for(;n;){const s=n.prevDep;n.version===-1?(n===r&&(r=s),ja(n),Zg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=s}e.deps=t,e.depsTail=r}function Va(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Eu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Eu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===si)||(e.globalVersion=si,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Va(e))))return;e.flags|=2;const t=e.dep,r=ot,n=Ar;ot=e,Ar=!0;try{xu(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{ot=r,Ar=n,Tu(e),e.flags&=-3}}function ja(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)ja(i,!0)}!t&&!--r.sc&&r.map&&r.map.delete(r.key)}function Zg(e){const{prevDep:t,nextDep:r}=e;t&&(t.nextDep=r,e.prevDep=void 0),r&&(r.prevDep=t,e.nextDep=void 0)}function Xg(e,t){e.effect instanceof ti&&(e=e.effect.fn);const r=new ti(e);t&&Qe(r,t);try{r.run()}catch(s){throw r.stop(),s}const n=r.run.bind(r);return n.effect=r,n}function Qg(e){e.effect.stop()}var Ar=!0,Au=[];function Jr(){Au.push(Ar),Ar=!1}function Yr(){const e=Au.pop();Ar=e===void 0?!0:e}function ku(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const r=ot;ot=void 0;try{t()}finally{ot=r}}}var si=0,ev=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}},no=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(!ot||!Ar||ot===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==ot)t=this.activeLink=new ev(ot,this),ot.deps?(t.prevDep=ot.depsTail,ot.depsTail.nextDep=t,ot.depsTail=t):ot.deps=ot.depsTail=t,Iu(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=ot.depsTail,t.nextDep=void 0,ot.depsTail.nextDep=t,ot.depsTail=t,ot.deps===t&&(ot.deps=r)}return t}trigger(e){this.version++,si++,this.notify(e)}notify(e){La();try{for(let t=this.subs;t;t=t.prevSub)t.sub.notify()&&t.sub.dep.notify()}finally{Fa()}}};function Iu(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)Iu(n)}const r=e.dep.subs;r!==e&&(e.prevSub=r,r&&(r.nextSub=e)),e.dep.subs=e}}var so=new WeakMap,Yn=Symbol(""),Ua=Symbol(""),ii=Symbol("");function Ot(e,t,r){if(Ar&&ot){let n=so.get(e);n||so.set(e,n=new Map);let s=n.get(r);s||(n.set(r,s=new no),s.map=n,s.key=r),s.track()}}function Zr(e,t,r,n,s,i){const o=so.get(e);if(!o){si++;return}const a=l=>{l&&l.trigger()};if(La(),t==="clear")o.forEach(a);else{const l=_e(e),u=l&&Yi(r);if(l&&r==="length"){const c=Number(n);o.forEach((d,p)=>{(p==="length"||p===ii||!Er(p)&&p>=c)&&a(d)})}else switch((r!==void 0||o.has(void 0))&&a(o.get(r)),u&&a(o.get(ii)),t){case"add":l?u&&a(o.get("length")):(a(o.get(Yn)),ws(e)&&a(o.get(Ua)));break;case"delete":l||(a(o.get(Yn)),ws(e)&&a(o.get(Ua)));break;case"set":ws(e)&&a(o.get(Yn));break}}Fa()}function tv(e,t){const r=so.get(e);return r&&r.get(t)}function Ss(e){const t=ze(e);return t===e?t:(Ot(t,"iterate",ii),Jt(e)?t:t.map(kr))}function io(e){return Ot(e=ze(e),"iterate",ii),e}function Sn(e,t){return Mr(e)?Cs(tn(e)?kr(t):t):kr(t)}var rv={__proto__:null,[Symbol.iterator](){return za(this,Symbol.iterator,e=>Sn(this,e))},concat(...e){return Ss(this).concat(...e.map(t=>_e(t)?Ss(t):t))},entries(){return za(this,"entries",e=>(e[1]=Sn(this,e[1]),e))},every(e,t){return Xr(this,"every",e,t,void 0,arguments)},filter(e,t){return Xr(this,"filter",e,t,r=>r.map(n=>Sn(this,n)),arguments)},find(e,t){return Xr(this,"find",e,t,r=>Sn(this,r),arguments)},findIndex(e,t){return Xr(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Xr(this,"findLast",e,t,r=>Sn(this,r),arguments)},findLastIndex(e,t){return Xr(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Xr(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ka(this,"includes",e)},indexOf(...e){return Ka(this,"indexOf",e)},join(e){return Ss(this).join(e)},lastIndexOf(...e){return Ka(this,"lastIndexOf",e)},map(e,t){return Xr(this,"map",e,t,void 0,arguments)},pop(){return oi(this,"pop")},push(...e){return oi(this,"push",e)},reduce(e,...t){return Ru(this,"reduce",e,t)},reduceRight(e,...t){return Ru(this,"reduceRight",e,t)},shift(){return oi(this,"shift")},some(e,t){return Xr(this,"some",e,t,void 0,arguments)},splice(...e){return oi(this,"splice",e)},toReversed(){return Ss(this).toReversed()},toSorted(e){return Ss(this).toSorted(e)},toSpliced(...e){return Ss(this).toSpliced(...e)},unshift(...e){return oi(this,"unshift",e)},values(){return za(this,"values",e=>Sn(this,e))}};function za(e,t,r){const n=io(e),s=n[t]();return n!==e&&!Jt(e)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=r(i.value)),i}),s}var nv=Array.prototype;function Xr(e,t,r,n,s,i){const o=io(e),a=o!==e&&!Jt(e),l=o[t];if(l!==nv[t]){const d=l.apply(e,i);return a?kr(d):d}let u=r;o!==e&&(a?u=function(d,p){return r.call(this,Sn(e,d),p,e)}:r.length>2&&(u=function(d,p){return r.call(this,d,p,e)}));const c=l.call(o,u,n);return a&&s?s(c):c}function Ru(e,t,r,n){const s=io(e);let i=r;return s!==e&&(Jt(e)?r.length>3&&(i=function(o,a,l){return r.call(this,o,a,l,e)}):i=function(o,a,l){return r.call(this,o,Sn(e,a),l,e)}),s[t](i,...n)}function Ka(e,t,r){const n=ze(e);Ot(n,"iterate",ii);const s=n[t](...r);return(s===-1||s===!1)&&ai(r[0])?(r[0]=ze(r[0]),n[t](...r)):s}function oi(e,t,r=[]){Jr(),La();const n=ze(e)[t].apply(e,r);return Fa(),Yr(),n}var sv=Xs("__proto__,__v_isRef,__isVue"),$u=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Er));function iv(e){Er(e)||(e=String(e));const t=ze(this);return Ot(t,"has",e),t.hasOwnProperty(e)}var Pu=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?qu:Nu:s?Mu:Hu).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const i=_e(e);if(!n){let a;if(i&&(a=rv[t]))return a;if(t==="hasOwnProperty")return iv}const o=Reflect.get(e,t,rt(e)?e:r);if((Er(t)?$u.has(t):sv(t))||(n||Ot(e,"get",t),s))return o;if(rt(o)){const a=i&&Yi(t)?o:o.value;return n&&Ge(a)?Ht(a):a}return Ge(o)?n?Ht(o):Qr(o):o}},Du=class extends Pu{constructor(e=!1){super(!1,e)}set(e,t,r,n){let s=e[t];const i=_e(e)&&Yi(t);if(!this._isShallow){const l=Mr(s);if(!Jt(r)&&!Mr(r)&&(s=ze(s),r=ze(r)),!i&&rt(s)&&!rt(r))return l||(s.value=r),!0}const o=i?Number(t)<e.length:Ye(e,t),a=Reflect.set(e,t,r,rt(e)?e:n);return e===ze(n)&&(o?Bt(r,s)&&Zr(e,"set",t,r,s):Zr(e,"add",t,r)),a}deleteProperty(e,t){const r=Ye(e,t),n=e[t],s=Reflect.deleteProperty(e,t);return s&&r&&Zr(e,"delete",t,void 0,n),s}has(e,t){const r=Reflect.has(e,t);return(!Er(t)||!$u.has(t))&&Ot(e,"has",t),r}ownKeys(e){return Ot(e,"iterate",_e(e)?"length":Yn),Reflect.ownKeys(e)}},Ou=class extends Pu{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},ov=new Du,av=new Ou,lv=new Du(!0),cv=new Ou(!0),Wa=e=>e,oo=e=>Reflect.getPrototypeOf(e);function uv(e,t,r){return function(...n){const s=this.__v_raw,i=ze(s),o=ws(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,u=s[e](...n),c=r?Wa:t?Cs:kr;return!t&&Ot(i,"iterate",l?Ua:Yn),Qe(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 ao(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function dv(e,t){const r={get(n){const s=this.__v_raw,i=ze(s),o=ze(n);e||(Bt(n,o)&&Ot(i,"get",n),Ot(i,"get",o));const{has:a}=oo(i),l=t?Wa:e?Cs:kr;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&&Ot(ze(n),"iterate",Yn),n.size},has(n){const s=this.__v_raw,i=ze(s),o=ze(n);return e||(Bt(n,o)&&Ot(i,"has",n),Ot(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?Wa:e?Cs:kr;return!e&&Ot(a,"iterate",Yn),o.forEach((u,c)=>n.call(s,l(u),l(c),i))}};return Qe(r,e?{add:ao("add"),set:ao("set"),delete:ao("delete"),clear:ao("clear")}:{add(n){!t&&!Jt(n)&&!Mr(n)&&(n=ze(n));const s=ze(this);return oo(s).has.call(s,n)||(s.add(n),Zr(s,"add",n,n)),this},set(n,s){!t&&!Jt(s)&&!Mr(s)&&(s=ze(s));const i=ze(this),{has:o,get:a}=oo(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)&&Zr(i,"set",n,s,u):Zr(i,"add",n,s),this},delete(n){const s=ze(this),{has:i,get:o}=oo(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&&Zr(s,"delete",n,void 0,l),u},clear(){const n=ze(this),s=n.size!==0,i=void 0,o=n.clear();return s&&Zr(n,"clear",void 0,void 0,i),o}}),["keys","values","entries",Symbol.iterator].forEach(n=>{r[n]=uv(n,e,t)}),r}function lo(e,t){const r=dv(e,t);return(n,s,i)=>s==="__v_isReactive"?!e:s==="__v_isReadonly"?e:s==="__v_raw"?n:Reflect.get(Ye(r,s)&&s in n?r:n,s,i)}var fv={get:lo(!1,!1)},pv={get:lo(!1,!0)},hv={get:lo(!0,!1)},gv={get:lo(!0,!0)},Hu=new WeakMap,Mu=new WeakMap,Nu=new WeakMap,qu=new WeakMap;function vv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function mv(e){return e.__v_skip||!Object.isExtensible(e)?0:vv(Lg(e))}function Qr(e){return Mr(e)?e:co(e,!1,ov,fv,Hu)}function Bu(e){return co(e,!1,lv,pv,Mu)}function Ht(e){return co(e,!0,av,hv,Nu)}function en(e){return co(e,!0,cv,gv,qu)}function co(e,t,r,n,s){if(!Ge(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=mv(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 tn(e){return Mr(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function Mr(e){return!!(e&&e.__v_isReadonly)}function Jt(e){return!!(e&&e.__v_isShallow)}function ai(e){return e?!!e.__v_raw:!1}function ze(e){const t=e&&e.__v_raw;return t?ze(t):e}function Ga(e){return!Ye(e,"__v_skip")&&Object.isExtensible(e)&&vu(e,"__v_skip",!0),e}var kr=e=>Ge(e)?Qr(e):e,Cs=e=>Ge(e)?Ht(e):e;function rt(e){return e?e.__v_isRef===!0:!1}function F(e){return Lu(e,!1)}function ft(e){return Lu(e,!0)}function Lu(e,t){return rt(e)?e:new wv(e,t)}var wv=class{constructor(e,t){this.dep=new no,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:ze(e),this._value=t?e:kr(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,r=this.__v_isShallow||Jt(e)||Mr(e);e=r?e:ze(e),Bt(e,t)&&(this._rawValue=e,this._value=r?e:kr(e),this.dep.trigger())}};function Fu(e){e.dep&&e.dep.trigger()}function f(e){return rt(e)?e.value:e}function $e(e){return De(e)?e():f(e)}var yv={get:(e,t,r)=>t==="__v_raw"?e:f(Reflect.get(e,t,r)),set:(e,t,r,n)=>{const s=e[t];return rt(s)&&!rt(r)?(s.value=r,!0):Reflect.set(e,t,r,n)}};function Ja(e){return tn(e)?e:new Proxy(e,yv)}var bv=class{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new no,{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 li(e){return new bv(e)}function Mt(e){const t=_e(e)?new Array(e.length):{};for(const r in e)t[r]=Vu(e,r);return t}var _v=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)||!Yi(String(t)))do n=!ai(s)||Jt(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&&rt(this._raw[this._key])){const t=this._object[this._key];if(rt(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return tv(this._raw,this._key)}},Sv=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 Ya(e,t,r){return rt(e)?e:De(e)?new Sv(e):Ge(e)&&arguments.length>1?Vu(e,t,r):F(e)}function Vu(e,t,r){return new _v(e,t,r)}var Cv=class{constructor(e,t,r){this.fn=e,this.setter=t,this._value=void 0,this.dep=new no(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=si-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&ot!==this)return Cu(this,!0),!0}get value(){const e=this.dep.track();return Eu(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function xv(e,t,r=!1){let n,s;return De(e)?n=e:(n=e.get,s=e.set),new Cv(n,s,r)}var Tv={GET:"get",HAS:"has",ITERATE:"iterate"},Ev={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},uo={},fo=new WeakMap,Cn=void 0;function Av(){return Cn}function ju(e,t=!1,r=Cn){if(r){let n=fo.get(r);n||fo.set(r,n=[]),n.push(e)}}function kv(e,t,r=Ue){const{immediate:n,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=r,u=y=>s?y:Jt(y)||s===!1||s===0?rn(y,1):rn(y);let c,d,p,h,m=!1,w=!1;if(rt(e)?(d=()=>e.value,m=Jt(e)):tn(e)?(d=()=>u(e),m=!0):_e(e)?(w=!0,m=e.some(y=>tn(y)||Jt(y)),d=()=>e.map(y=>{if(rt(y))return y.value;if(tn(y))return u(y);if(De(y))return l?l(y,2):y()})):De(e)?t?d=l?()=>l(e,2):e:d=()=>{if(p){Jr();try{p()}finally{Yr()}}const y=Cn;Cn=c;try{return l?l(e,3,[h]):e(h)}finally{Cn=y}}:d=fr,t&&s){const y=d,T=s===!0?1/0:s;d=()=>rn(y(),T)}const x=ro(),g=()=>{c.stop(),x&&x.active&&Da(x.effects,c)};if(i&&t){const y=t;t=(...T)=>{y(...T),g()}}let S=w?new Array(e.length).fill(uo):uo;const b=y=>{if(!(!(c.flags&1)||!c.dirty&&!y))if(t){const T=c.run();if(s||m||(w?T.some((k,N)=>Bt(k,S[N])):Bt(T,S))){p&&p();const k=Cn;Cn=c;try{const N=[T,S===uo?void 0:w&&S[0]===uo?[]:S,h];S=T,l?l(t,3,N):t(...N)}finally{Cn=k}}}else c.run()};return a&&a(b),c=new ti(d),c.scheduler=o?()=>o(b,!1):b,h=y=>ju(y,!1,c),p=c.onStop=()=>{const y=fo.get(c);if(y){if(l)l(y,4);else for(const T of y)T();fo.delete(c)}},t?n?b(!0):S=c.run():o?o(b.bind(null,!0),!0):c.run(),g.pause=c.pause.bind(c),g.resume=c.resume.bind(c),g.stop=g,g}function rn(e,t=1/0,r){if(t<=0||!Ge(e)||e.__v_skip||(r=r||new Map,(r.get(e)||0)>=t))return e;if(r.set(e,t),t--,rt(e))rn(e.value,t,r);else if(_e(e))for(let n=0;n<e.length;n++)rn(e[n],t,r);else if(Gn(e)||ws(e))e.forEach(n=>{rn(n,t,r)});else if(Ji(e)){for(const n in e)rn(e[n],t,r);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&rn(e[n],t,r)}return e}var Uu=[];function Iv(e){Uu.push(e)}function Rv(){Uu.pop()}function $v(e,t){}var Pv={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"},Dv={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 xs(e,t,r,n){try{return n?e(...n):e()}catch(s){Zn(s,t,r)}}function hr(e,t,r,n){if(De(e)){const s=xs(e,t,r,n);return s&&Oa(s)&&s.catch(i=>{Zn(i,t,r)}),s}if(_e(e)){const s=[];for(let i=0;i<e.length;i++)s.push(hr(e[i],t,r,n));return s}}function Zn(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){Jr(),xs(i,null,10,[e,l,u]),Yr();return}}Ov(e,r,s,n,o)}function Ov(e,t,r,n=!0,s=!1){if(s)throw e;console.error(e)}var Lt=[],Nr=-1,Ts=[],xn=null,Es=0,zu=Promise.resolve(),po=null;function Et(e){const t=po||zu;return e?t.then(this?e.bind(this):e):t}function Hv(e){let t=Nr+1,r=Lt.length;for(;t<r;){const n=t+r>>>1,s=Lt[n],i=ui(s);i<e||i===e&&s.flags&2?t=n+1:r=n}return t}function Za(e){if(!(e.flags&1)){const t=ui(e),r=Lt[Lt.length-1];!r||!(e.flags&2)&&t>=ui(r)?Lt.push(e):Lt.splice(Hv(t),0,e),e.flags|=1,Ku()}}function Ku(){po||(po=zu.then(Gu))}function ci(e){_e(e)?Ts.push(...e):xn&&e.id===-1?xn.splice(Es+1,0,e):e.flags&1||(Ts.push(e),e.flags|=1),Ku()}function Wu(e,t,r=Nr+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 ho(e){if(Ts.length){const t=[...new Set(Ts)].sort((r,n)=>ui(r)-ui(n));if(Ts.length=0,xn){xn.push(...t);return}for(xn=t,Es=0;Es<xn.length;Es++){const r=xn[Es];r.flags&4&&(r.flags&=-2),r.flags&8||r(),r.flags&=-2}xn=null,Es=0}}var ui=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Gu(e){try{for(Nr=0;Nr<Lt.length;Nr++){const t=Lt[Nr];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),xs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Nr<Lt.length;Nr++){const t=Lt[Nr];t&&(t.flags&=-2)}Nr=-1,Lt.length=0,ho(e),po=null,(Lt.length||Ts.length)&&Gu(e)}}var As,go=[];function Ju(e,t){var r,n;As=e,As?(As.enabled=!0,go.forEach(({event:s,args:i})=>As.emit(s,...i)),go=[]):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=>{Ju(s,t)}),setTimeout(()=>{As||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,go=[])},3e3)):go=[]}var It=null,vo=null;function di(e){const t=It;return It=e,vo=e&&e.type.__scopeId||null,t}function Mv(e){vo=e}function Nv(){vo=null}var qv=e=>I;function I(e,t=It,r){if(!t||e._n)return e;const n=(...s)=>{n._d&&xi(-1);const i=di(t);let o;try{o=e(...s)}finally{di(i),n._d&&xi(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function mo(e,t){if(It===null)return e;const r=Ti(It),n=e.dirs||(e.dirs=[]);for(let s=0;s<t.length;s++){let[i,o,a,l=Ue]=t[s];i&&(De(i)&&(i={mounted:i,updated:i}),i.deep&&rn(o),n.push({dir:i,instance:r,value:o,oldValue:void 0,arg:a,modifiers:l}))}return e}function qr(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&&(Jr(),hr(l,r,8,[e.el,a,e,t]),Yr())}}function Xn(e,t){if(Rt){let r=Rt.provides;const n=Rt.parent&&Rt.parent.provides;n===r&&(r=Rt.provides=Object.create(n)),r[e]=t}}function Ft(e,t,r=!1){const n=gt();if(n||Qn){let s=Qn?Qn._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&&De(t)?t.call(n&&n.proxy):t}}function Bv(){return!!(gt()||Qn)}var Yu=Symbol.for("v-scx"),Zu=()=>{{const e=Ft(Yu);return e}};function ct(e,t){return fi(e,null,t)}function Xa(e,t){return fi(e,null,{flush:"post"})}function Xu(e,t){return fi(e,null,{flush:"sync"})}function Me(e,t,r){return fi(e,t,r)}function fi(e,t,r=Ue){const{immediate:n,deep:s,flush:i,once:o}=r,a=Qe({},r),l=t&&n||!t&&i!=="post";let u;if(Os){if(i==="sync"){const h=Zu();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=fr,h.resume=fr,h.pause=fr,h}}const c=Rt;a.call=(h,m,w)=>hr(h,c,m,w);let d=!1;i==="post"?a.scheduler=h=>{wt(h,c&&c.suspense)}:i!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():Za(h)}),a.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const p=kv(e,t,a);return Os&&(u?u.push(p):l&&p()),p}function Lv(e,t,r){const n=this.proxy,s=it(e)?e.includes(".")?Qu(n,e):()=>n[e]:e.bind(n,n);let i;De(t)?i=t:(i=t.handler,r=t);const o=ns(this),a=fi(s,i.bind(n),r);return o(),a}function Qu(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 ed=Symbol("_vte"),td=e=>e.__isTeleport,pi=e=>e&&(e.disabled||e.disabled===""),rd=e=>e&&(e.defer||e.defer===""),nd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,sd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Qa=(e,t)=>{const r=e&&e.to;return it(r)?t?t(r):null:r},id={name:"Teleport",__isTeleport:!0,process(e,t,r,n,s,i,o,a,l,u){const{mc:c,pc:d,pbc:p,o:{insert:h,querySelector:m,createText:w,createComment:x}}=u,g=pi(t.props);let{shapeFlag:S,children:b,dynamicChildren:y}=t;if(e==null){const T=t.el=w(""),k=t.anchor=w("");h(T,r,n),h(k,r,n);const N=(B,q)=>{S&16&&c(b,B,q,s,i,o,a,l)},v=()=>{const B=t.target=Qa(t.props,m),q=tl(B,t,w,h);B&&(o!=="svg"&&nd(B)?o="svg":o!=="mathml"&&sd(B)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(B),g||(N(B,q),yo(t,!1)))};g&&(N(r,k),yo(t,!0)),rd(t.props)?(t.el.__isMounted=!1,wt(()=>{v(),delete t.el.__isMounted},i)):v()}else{if(rd(t.props)&&e.el.__isMounted===!1){wt(()=>{id.process(e,t,r,n,s,i,o,a,l,u)},i);return}t.el=e.el,t.targetStart=e.targetStart;const T=t.anchor=e.anchor,k=t.target=e.target,N=t.targetAnchor=e.targetAnchor,v=pi(e.props),B=v?r:k,q=v?T:N;if(o==="svg"||nd(k)?o="svg":(o==="mathml"||sd(k))&&(o="mathml"),y?(p(e.dynamicChildren,y,B,s,i,o,a),_l(e,t,!0)):l||d(e,t,B,q,s,i,o,a,!1),g)v?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):wo(t,r,T,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const C=t.target=Qa(t.props,m);C&&wo(t,C,null,u,0)}else v&&wo(t,k,N,u,1);yo(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||!pi(p);for(let m=0;m<a.length;m++){const w=a[m];n(w,t,r,h,!!w.dynamicChildren)}}},move:wo,hydrate:Fv};function wo(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||pi(c))&&l&16)for(let p=0;p<u.length;p++)s(u[p],t,r,2);d&&n(a,t,r)}function Fv(e,t,r,n,s,i,{o:{nextSibling:o,parentNode:a,querySelector:l,insert:u,createText:c}},d){function p(x,g){let S=g;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,x._lpa=t.targetAnchor&&o(t.targetAnchor);break}}S=o(S)}}function h(x,g){g.anchor=d(o(x),g,a(x),r,n,s,i)}const m=t.target=Qa(t.props,l),w=pi(t.props);if(m){const x=m._lpa||m.firstChild;t.shapeFlag&16&&(w?(h(e,t),p(m,x),t.targetAnchor||tl(m,t,c,u,a(e)===m?e:null)):(t.anchor=o(e),p(m,x),t.targetAnchor||tl(m,t,c,u),d(x&&o(x),t,m,r,n,s,i))),yo(t,w)}else w&&t.shapeFlag&16&&(h(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var el=id;function yo(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 tl(e,t,r,n,s=null){const i=t.targetStart=r(""),o=t.targetAnchor=r("");return i[ed]=o,e&&(n(i,e,s),n(o,e,s)),o}var Br=Symbol("_leaveCb"),hi=Symbol("_enterCb");function rl(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return tt(()=>{e.isMounted=!0}),Ps(()=>{e.isUnmounting=!0}),e}var gr=[Function,Array],nl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:gr,onEnter:gr,onAfterEnter:gr,onEnterCancelled:gr,onBeforeLeave:gr,onLeave:gr,onAfterLeave:gr,onLeaveCancelled:gr,onBeforeAppear:gr,onAppear:gr,onAfterAppear:gr,onAppearCancelled:gr},od=e=>{const t=e.subTree;return t.component?od(t.component):t},Vv={name:"BaseTransition",props:nl,setup(e,{slots:t}){const r=gt(),n=rl();return()=>{const s=t.default&&bo(t.default(),!0);if(!s||!s.length)return;const i=ad(s),o=ze(e),{mode:a}=o;if(n.isLeaving)return sl(i);const l=ud(i);if(!l)return sl(i);let u=ks(l,o,n,r,d=>u=d);l.type!==ht&&nn(l,u);let c=r.subTree&&ud(r.subTree);if(c&&c.type!==ht&&!Ir(c,l)&&od(r).type!==ht){let d=ks(c,o,n,r);if(nn(c,d),a==="out-in"&&l.type!==ht)return n.isLeaving=!0,d.afterLeave=()=>{n.isLeaving=!1,r.job.flags&8||r.update(),delete d.afterLeave,c=void 0},sl(i);a==="in-out"&&l.type!==ht?d.delayLeave=(p,h,m)=>{const w=cd(n,c);w[String(c.key)]=c,p[Br]=()=>{h(),p[Br]=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 ad(e){let t=e[0];if(e.length>1){for(const r of e)if(r.type!==ht){t=r;break}}return t}var ld=Vv;function cd(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 ks(e,t,r,n,s){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:w,onBeforeAppear:x,onAppear:g,onAfterAppear:S,onAppearCancelled:b}=t,y=String(e.key),T=cd(r,e),k=(B,q)=>{B&&hr(B,n,9,q)},N=(B,q)=>{const C=q[1];k(B,q),_e(B)?B.every(_=>_.length<=1)&&C():B.length<=1&&C()},v={mode:o,persisted:a,beforeEnter(B){let q=l;if(!r.isMounted)if(i)q=x||l;else return;B[Br]&&B[Br](!0);const C=T[y];C&&Ir(e,C)&&C.el[Br]&&C.el[Br](),k(q,[B])},enter(B){if(T[y]===e)return;let q=u,C=c,_=d;if(!r.isMounted)if(i)q=g||u,C=S||c,_=b||d;else return;let E=!1;B[hi]=R=>{E||(E=!0,R?k(_,[B]):k(C,[B]),v.delayedLeave&&v.delayedLeave(),B[hi]=void 0)};const P=B[hi].bind(null,!1);q?N(q,[B,P]):P()},leave(B,q){const C=String(e.key);if(B[hi]&&B[hi](!0),r.isUnmounting)return q();k(p,[B]);let _=!1;B[Br]=P=>{_||(_=!0,q(),P?k(w,[B]):k(m,[B]),B[Br]=void 0,T[C]===e&&delete T[C])};const E=B[Br].bind(null,!1);T[C]=e,h?N(h,[B,E]):E()},clone(B){const q=ks(B,t,r,n,s);return s&&s(q),q}};return v}function sl(e){if(gi(e))return e=Rr(e),e.children=null,e}function ud(e){if(!gi(e))return td(e.type)&&e.children?ad(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&&De(r.default))return r.default()}}function nn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,nn(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 bo(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(bo(o.children,t,a))):(t||o.type!==ht)&&n.push(a!=null?Rr(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 De(e)?Qe({name:e.name},t,{setup:e}):e}function dd(){const e=gt();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function il(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function jv(e){const t=gt(),r=ft(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 fd(e,t){let r;return!!((r=Object.getOwnPropertyDescriptor(e,t))&&!r.configurable)}var _o=new WeakMap;function Is(e,t,r,n,s=!1){if(_e(e)){e.forEach((w,x)=>Is(w,t&&(_e(t)?t[x]:t),r,n,s));return}if(sn(n)&&!s){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Is(e,t,r,n.component.subTree);return}const i=n.shapeFlag&4?Ti(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?pu:w=>fd(c,w)?!1:Ye(p,w),m=(w,x)=>!(x&&fd(c,x));if(u!=null&&u!==l){if(pd(t),it(u))c[u]=null,h(u)&&(d[u]=null);else if(rt(u)){const w=t;m(u,w.k)&&(u.value=null),w.k&&(c[w.k]=null)}}if(De(l))xs(l,a,12,[o,c]);else{const w=it(l),x=rt(l);if(w||x){const g=()=>{if(e.f){const S=w?h(l)?d[l]:c[l]:m(l)||!e.k?l.value:c[e.k];if(s)_e(S)&&Da(S,i);else if(_e(S))S.includes(i)||S.push(i);else if(w)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 w?(c[l]=o,h(l)&&(d[l]=o)):x&&(m(l,e.k)&&(l.value=o),e.k&&(c[e.k]=o))};if(o){const S=()=>{g(),_o.delete(e)};S.id=-1,_o.set(e,S),wt(S,r)}else pd(e),g()}}}function pd(e){const t=_o.get(e);t&&(t.flags|=8,_o.delete(e))}var hd=!1,Rs=()=>{hd||(console.error("Hydration completed but contains mismatches."),hd=!0)},Uv=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",zv=e=>e.namespaceURI.includes("MathML"),So=e=>{if(e.nodeType===1){if(Uv(e))return"svg";if(zv(e))return"mathml"}},$s=e=>e.nodeType===8;function Kv(e){const{mt:t,p:r,o:{patchProp:n,createText:s,nextSibling:i,parentNode:o,remove:a,insert:l,createComment:u}}=e,c=(b,y)=>{if(!y.hasChildNodes()){r(null,b,y),ho(),y._vnode=b;return}d(y.firstChild,b,null,null,null),ho(),y._vnode=b},d=(b,y,T,k,N,v=!1)=>{v=v||!!y.dynamicChildren;const B=$s(b)&&b.data==="[",q=()=>w(b,y,T,k,N,B),{type:C,ref:_,shapeFlag:E,patchFlag:P}=y;let R=b.nodeType;y.el=b,P===-2&&(v=!1,y.dynamicChildren=null);let D=null;switch(C){case Tn:R!==3?y.children===""?(l(y.el=s(""),o(b),b),D=b):D=q():(b.data!==y.children&&(Rs(),b.data=y.children),D=i(b));break;case ht:S(b)?(D=i(b),g(y.el=b.content.firstChild,b,T)):R!==8||B?D=q():D=i(b);break;case ts:if(B&&(b=i(b),R=b.nodeType),R===1||R===3){D=b;const G=!y.children.length;for(let W=0;W<y.staticCount;W++)G&&(y.children+=D.nodeType===1?D.outerHTML:D.data),W===y.staticCount-1&&(y.anchor=D),D=i(D);return B?i(D):D}else q();break;case Ke:B?D=m(b,y,T,k,N,v):D=q();break;default:if(E&1)(R!==1||y.type.toLowerCase()!==b.tagName.toLowerCase())&&!S(b)?D=q():D=p(b,y,T,k,N,v);else if(E&6){y.slotScopeIds=N;const G=o(b);if(B?D=x(b):$s(b)&&b.data==="teleport start"?D=x(b,b.data,"teleport end"):D=i(b),t(y,G,null,T,k,So(G),v),sn(y)&&!y.type.__asyncResolved){let W;B?(W=O(Ke),W.anchor=D?D.previousSibling:G.lastChild):W=b.nodeType===3?qe(""):O("div"),W.el=b,y.component.subTree=W}}else E&64?R!==8?D=q():D=y.type.hydrate(b,y,T,k,N,v,e,h):E&128&&(D=y.type.hydrate(b,y,T,k,So(o(b)),N,v,e,d))}return _!=null&&Is(_,null,k,y),D},p=(b,y,T,k,N,v)=>{v=v||!!y.dynamicChildren;const{type:B,props:q,patchFlag:C,shapeFlag:_,dirs:E,transition:P}=y,R=B==="input"||B==="option";if(R||C!==-1){E&&qr(y,null,T,"created");let D=!1;if(S(b)){D=Yd(null,P)&&T&&T.vnode.props&&T.vnode.props.appear;const W=b.content.firstChild;if(D){const ae=W.getAttribute("class");ae&&(W.$cls=ae),P.beforeEnter(W)}g(W,b,T),y.el=b=W}if(_&16&&!(q&&(q.innerHTML||q.textContent))){let W=h(b.firstChild,y,b,T,k,N,v);for(;W;){Co(b,1)||Rs();const ae=W;W=W.nextSibling,a(ae)}}else if(_&8){let W=y.children;W[0]===`
4
4
  `&&(b.tagName==="PRE"||b.tagName==="TEXTAREA")&&(W=W.slice(1));const{textContent:ae}=b;ae!==W&&ae!==W.replace(/\r\n|\r/g,`
5
- `)&&(Co(b,0)||$s(),b.textContent=y.children)}if(q){if(R||!v||C&48){const W=b.tagName.includes("-");for(const ae in q)(R&&(ae.endsWith("value")||ae==="indeterminate")||ei(ae)&&!Jn(ae)||ae[0]==="."||W&&!Jn(ae))&&n(b,ae,null,q[ae],void 0,T)}else if(q.onClick)n(b,"onClick",null,q.onClick,void 0,T);else if(C&4&&en(q.style))for(const W in q.style)q.style[W]}let J;(J=q&&q.onVnodeBeforeMount)&&Zt(J,T,y),E&&Nr(y,null,T,"beforeMount"),((J=q&&q.onVnodeMounted)||E||D)&&Xd(()=>{J&&Zt(J,T,y),D&&P.enter(b),E&&Nr(y,null,T,"mounted")},k)}return b.nextSibling},h=(b,y,T,k,N,v,B)=>{B=B||!!y.dynamicChildren;const q=y.children,C=q.length;for(let _=0;_<C;_++){const E=B?q[_]:q[_]=Yt(q[_]),P=E.type===Tn;b?(P&&!B&&_+1<C&&Yt(q[_+1]).type===Tn&&(l(s(b.data.slice(E.children.length)),T,i(b)),b.data=E.children),b=d(b,E,k,N,v,B)):P&&!E.children?l(E.el=s(""),T):(Co(T,1)||$s(),r(null,E,T,null,k,N,So(T),v))}return b},m=(b,y,T,k,N,v)=>{const{slotScopeIds:B}=y;B&&(N=N?N.concat(B):B);const q=o(b),C=h(i(b),y,q,T,k,N,v);return C&&Ps(C)&&C.data==="]"?i(y.anchor=C):($s(),l(y.anchor=u("]"),q,C),C)},w=(b,y,T,k,N,v)=>{if(Co(b.parentElement,1)||$s(),y.el=null,v){const C=x(b);for(;;){const _=i(b);if(_&&_!==C)a(_);else break}}const B=i(b),q=o(b);return a(b),r(null,y,q,B,T,k,So(q),N),T&&(T.vnode.el=y.el,Ro(T,y.el)),B},x=(b,y="[",T="]")=>{let k=0;for(;b;)if(b=i(b),b&&Ps(b)&&(b.data===y&&k++,b.data===T)){if(k===0)return i(b);k--}return b},g=(b,y,T)=>{const k=y.parentNode;k&&k.replaceChild(b,y);let N=T;for(;N;)N.vnode.el===y&&(N.vnode.el=N.subTree.el=b),N=N.parent},S=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[c,d]}var fd="data-allow-mismatch",Uv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Co(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(fd);)e=e.parentElement;const r=e&&e.getAttribute(fd);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(Uv[t])}}var zv=eo().requestIdleCallback||(e=>setTimeout(e,1)),Kv=eo().cancelIdleCallback||(e=>clearTimeout(e)),Wv=(e=1e4)=>t=>{const r=zv(t,{timeout:e});return()=>Kv(r)};function Gv(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 Jv=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(Gv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},Yv=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},Zv=(e=[])=>(t,r)=>{st(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 Xv(e,t){if(Ps(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if(Ps(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var nn=e=>!!e.type.__asyncLoader;function Qv(e){Oe(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:n,delay:s=200,hydrate:i,timeout:o,suspensible:a=!0,onError:l}=e;let u=null,c,d=0;const p=()=>(d++,u=null,h()),h=()=>{let m;return u||(m=u=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((x,g)=>{l(w,()=>x(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,x){let g=!1;(w.bu||(w.bu=[])).push(()=>g=!0);const S=()=>{g||x()},b=i?()=>{const y=i(S,T=>Xv(m,T));y&&(w.bum||(w.bum=[])).push(y)}:S;c?b():h().then(()=>!w.isUnmounted&&b())},get __asyncResolved(){return c},setup(){const m=Rt;if(nl(m),c)return()=>xo(c,m);const w=b=>{u=null,Zn(b,m,13,!n)};if(a&&m.suspense||Hs)return h().then(b=>()=>xo(b,m)).catch(b=>(w(b),()=>n?H(n,{error:b}):null));const x=F(!1),g=F(),S=F(!!s);return s&&setTimeout(()=>{S.value=!1},s),o!=null&&setTimeout(()=>{if(!x.value&&!g.value){const b=new Error(`Async component timed out after ${o}ms.`);w(b),g.value=b}},o),h().then(()=>{x.value=!0,m.parent&&vi(m.parent.vnode)&&m.parent.update()}).catch(b=>{w(b),g.value=b}),()=>{if(x.value&&c)return xo(c,m);if(g.value&&n)return H(n,{error:g.value});if(r&&!S.value)return xo(r,m)}}})}function xo(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=H(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var vi=e=>e.type.__isKeepAlive,em={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=vt(),n=r.ctx;if(!n.renderer)return()=>{const S=t.default&&t.default();return S&&S.length===1?S[0]:S};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=(S,b,y,T,k)=>{const N=S.component;u(S,b,y,0,a),l(N.vnode,S,b,y,N,a,T,S.slotScopeIds,k),yt(()=>{N.isDeactivated=!1,N.a&&Ss(N.a);const v=S.props&&S.props.onVnodeMounted;v&&Zt(v,N.parent,S)},a)},n.deactivate=S=>{const b=S.component;$o(b.m),$o(b.a),u(S,p,null,1,a),yt(()=>{b.da&&Ss(b.da);const y=S.props&&S.props.onVnodeUnmounted;y&&Zt(y,b.parent,S),b.isDeactivated=!0},a)};function h(S){sl(S),c(S,r,a,!0)}function m(S){s.forEach((b,y)=>{const T=El(nn(b)?b.type.__asyncResolved||{}:b.type);T&&!S(T)&&w(y)})}function w(S){const b=s.get(S);b&&(!o||!kr(b,o))?h(b):o&&sl(o),s.delete(S),i.delete(S)}Me(()=>[e.include,e.exclude],([S,b])=>{S&&m(y=>mi(S,y)),b&&m(y=>!mi(b,y))},{flush:"post",deep:!0});let x=null;const g=()=>{x!=null&&(Po(r.subTree.type)?yt(()=>{s.set(x,To(r.subTree))},r.subTree.suspense):s.set(x,To(r.subTree)))};return Qe(g),wi(g),Ds(()=>{s.forEach(S=>{const{subTree:b,suspense:y}=r,T=To(b);if(S.type===T.type&&S.key===T.key){sl(T);const k=T.component.da;k&&yt(k,y);return}h(S)})}),()=>{if(x=null,!t.default)return o=null;const S=t.default(),b=S[0];if(S.length>1)return o=null,S;if(!on(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return o=null,b;let y=To(b);if(y.type===gt)return o=null,y;const T=y.type,k=El(nn(y)?y.type.__asyncResolved||{}:T),{include:N,exclude:v,max:B}=e;if(N&&(!k||!mi(N,k))||v&&k&&mi(v,k))return y.shapeFlag&=-257,o=y,b;const q=y.key==null?T:y.key,C=s.get(q);return y.el&&(y=Ir(y),b.shapeFlag&128&&(b.ssContent=y)),x=q,C?(y.el=C.el,y.component=C.component,y.transition&&rn(y,y.transition),y.shapeFlag|=512,i.delete(q),i.add(q)):(i.add(q),B&&i.size>parseInt(B,10)&&w(i.values().next().value)),y.shapeFlag|=256,o=y,Po(b.type)?b:y}}};function mi(e,t){return _e(e)?e.some(r=>mi(r,t)):st(e)?e.split(",").includes(t):Mg(e)?(e.lastIndex=0,e.test(t)):!1}function pd(e,t){gd(e,"a",t)}function hd(e,t){gd(e,"da",t)}function gd(e,t,r=Rt){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Eo(t,n,r),r){let s=r.parent;for(;s&&s.parent;)vi(s.parent.vnode)&&tm(n,t,r,s),s=s.parent}}function tm(e,t,r,n){const s=Eo(t,e,n,!0);jt(()=>{$a(n[t],s)},r)}function sl(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function To(e){return e.shapeFlag&128?e.ssContent:e}function Eo(e,t,r=Rt,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Gr();const a=ns(r),l=pr(t,r,e,o);return a(),Jr(),l});return n?s.unshift(i):s.push(i),i}}var sn=e=>(t,r=Rt)=>{(!Hs||e==="sp")&&Eo(e,(...n)=>t(...n),r)},vd=sn("bm"),Qe=sn("m"),il=sn("bu"),wi=sn("u"),Ds=sn("bum"),jt=sn("um"),md=sn("sp"),wd=sn("rtg"),yd=sn("rtc");function bd(e,t=Rt){Eo("ec",e,t)}var ol="components",rm="directives";function nm(e,t){return al(ol,e,!0,t)||e}var _d=Symbol.for("v-ndc");function yi(e){return st(e)?al(ol,e,!1)||e:e||_d}function sm(e){return al(rm,e)}function al(e,t,r=!0,n=!1){const s=It||Rt;if(s){const i=s.type;if(e===ol){const a=El(i,!1);if(a&&(a===t||a===St(t)||a===ti(St(t))))return i}const o=Sd(s[e]||i[e],t)||Sd(s.appContext[e],t);return!o&&n?i:o}}function Sd(e,t){return e&&(e[t]||e[St(t)]||e[ti(St(t))])}function gr(e,t,r,n){let s;const i=r&&r[n],o=_e(e);if(o||st(e)){const a=o&&en(e);let l=!1,u=!1;a&&(l=!Jt(e),u=Hr(e),e=io(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?xs(Ar(e[c])):Ar(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(Ge(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 im(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 te(e,t,r={},n,s){if(It.ce||It.parent&&nn(It.parent)&&It.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),$(),U(ze,null,[H("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),$();const o=i&&ll(i(r)),a=r.key||o&&o.key,l=U(ze,{key:(a&&!Tr(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 ll(e){return e.some(t=>on(t)?!(t.type===gt||t.type===ze&&!ll(t.children)):!0)?e:null}function Cd(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:_s(n)]=e[n];return r}var cl=e=>e?nf(e)?Ei(e):cl(e.parent):null,bi=Ze(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>cl(e.parent),$root:e=>cl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>pl(e),$forceUpdate:e=>e.f||(e.f=()=>{Ja(e.update)}),$nextTick:e=>e.n||(e.n=Et.bind(e.proxy)),$watch:e=>Nv.bind(e)}),ul=(e,t)=>e!==je&&!e.__isScriptSetup&&Ye(e,t),dl={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(ul(n,t))return o[t]=1,n[t];if(s!==je&&Ye(s,t))return o[t]=2,s[t];if(Ye(i,t))return o[t]=3,i[t];if(r!==je&&Ye(r,t))return o[t]=4,r[t];fl&&(o[t]=0)}}const u=bi[t];let c,d;if(u)return t==="$attrs"&&Ot(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==je&&Ye(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,Ye(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return ul(s,t)?(s[t]=r,!0):n!==je&&Ye(n,t)?(n[t]=r,!0):Ye(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!==je&&a[0]!=="$"&&Ye(e,a)||ul(t,a)||Ye(i,a)||Ye(n,a)||Ye(bi,a)||Ye(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Ye(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},om=Ze({},dl,{get(e,t){if(t!==Symbol.unscopables)return dl.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Lg(t)}});function am(){return null}function lm(){return null}function cm(e){}function um(e){}function dm(){return null}function fm(){}function pm(e,t){return null}function hm(){return xd("useSlots").slots}function gm(){return xd("useAttrs").attrs}function xd(e){const t=vt();return t.setupContext||(t.setupContext=af(t))}function _i(e){return _e(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function Td(e,t){const r=_i(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?_e(s)||Oe(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 vm(e,t){return!e||!t?e||t:_e(e)&&_e(t)?e.concat(t):Ze({},_i(e),_i(t))}function mm(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function wm(e){const t=vt();let r=e();Ho();const n=()=>{vt()!==t&&t.scope.off(),Ho()};return Pa(r)&&(r=r.catch(s=>{throw ns(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{ns(t),Promise.resolve().then(n)}]}var fl=!0;function ym(e){const t=pl(e),r=e.proxy,n=e.ctx;fl=!1,t.beforeCreate&&Ed(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:p,beforeUpdate:h,updated:m,activated:w,deactivated:x,beforeDestroy:g,beforeUnmount:S,destroyed:b,unmounted:y,render:T,renderTracked:k,renderTriggered:N,errorCaptured:v,serverPrefetch:B,expose:q,inheritAttrs:C,components:_,directives:E,filters:P}=t;if(u&&bm(u,n,null),o)for(const J in o){const W=o[J];Oe(W)&&(n[J]=W.bind(r))}if(s){const J=s.call(r,r);Ge(J)&&(e.data=Xr(J))}if(fl=!0,i)for(const J in i){const W=i[J],ae=V({get:Oe(W)?W.bind(r,r):Oe(W.get)?W.get.bind(r,r):dr,set:!Oe(W)&&Oe(W.set)?W.set.bind(r):dr});Object.defineProperty(n,J,{enumerable:!0,configurable:!0,get:()=>ae.value,set:z=>ae.value=z})}if(a)for(const J in a)Ad(a[J],n,r,J);if(l){const J=Oe(l)?l.call(r):l;Reflect.ownKeys(J).forEach(W=>{Xn(W,J[W])})}c&&Ed(c,e,"c");function D(J,W){_e(W)?W.forEach(ae=>J(ae.bind(r))):W&&J(W.bind(r))}if(D(vd,d),D(Qe,p),D(il,h),D(wi,m),D(pd,w),D(hd,x),D(bd,v),D(yd,k),D(wd,N),D(Ds,S),D(jt,y),D(md,B),_e(q))if(q.length){const J=e.exposed||(e.exposed={});q.forEach(W=>{Object.defineProperty(J,W,{get:()=>r[W],set:ae=>r[W]=ae,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===dr&&(e.render=T),C!=null&&(e.inheritAttrs=C),_&&(e.components=_),E&&(e.directives=E),B&&nl(e)}function bm(e,t,r=dr){_e(e)&&(e=hl(e));for(const n in e){const s=e[n];let i;Ge(s)?"default"in s?i=Vt(s.from||n,s.default,!0):i=Vt(s.from||n):i=Vt(s),tt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Ed(e,t,r){pr(_e(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Ad(e,t,r,n){let s=n.includes(".")?Yu(r,n):()=>r[n];if(st(e)){const i=t[e];Oe(i)&&Me(s,i)}else if(Oe(e))Me(s,e.bind(r));else if(Ge(e))if(_e(e))e.forEach(i=>Ad(i,t,r,n));else{const i=Oe(e.handler)?e.handler.bind(r):t[e.handler];Oe(i)&&Me(s,i,e)}}function pl(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=>Ao(l,u,o,!0)),Ao(l,t,o)),Ge(t)&&i.set(t,l),l}function Ao(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&Ao(e,i,r,!0),s&&s.forEach(o=>Ao(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=_m[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var _m={data:kd,props:Id,emits:Id,methods:Si,computed:Si,beforeCreate:Ut,created:Ut,beforeMount:Ut,mounted:Ut,beforeUpdate:Ut,updated:Ut,beforeDestroy:Ut,beforeUnmount:Ut,destroyed:Ut,unmounted:Ut,activated:Ut,deactivated:Ut,errorCaptured:Ut,serverPrefetch:Ut,components:Si,directives:Si,watch:Cm,provide:kd,inject:Sm};function kd(e,t){return t?e?function(){return Ze(Oe(e)?e.call(this,this):e,Oe(t)?t.call(this,this):t)}:t:e}function Sm(e,t){return Si(hl(e),hl(t))}function hl(e){if(_e(e)){const t={};for(let r=0;r<e.length;r++)t[e[r]]=e[r];return t}return e}function Ut(e,t){return e?[...new Set([].concat(e,t))]:t}function Si(e,t){return e?Ze(Object.create(null),e,t):t}function Id(e,t){return e?_e(e)&&_e(t)?[...new Set([...e,...t])]:Ze(Object.create(null),_i(e),_i(t??{})):t}function Cm(e,t){if(!e)return t;if(!t)return e;const r=Ze(Object.create(null),e);for(const n in t)r[n]=Ut(e[n],t[n]);return r}function Rd(){return{app:null,config:{isNativeTag:uu,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 xm=0;function Tm(e,t){return function(n,s=null){Oe(n)||(n=Ze({},n)),s!=null&&!Ge(s)&&(s=null);const i=Rd(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:xm++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:cf,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&Oe(c.install)?(o.add(c),c.install(u,...d)):Oe(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||H(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,Ei(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(pr(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=Qn;Qn=u;try{return c()}finally{Qn=d}}};return u}}var Qn=null;function Em(e,t,r=je){const n=vt(),s=St(t),i=Gt(t),o=$d(e,s),a=ci((l,u)=>{let c,d=je,p;return Ju(()=>{const h=e[s];Lt(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(!Lt(m,c)&&!(d!==je&&Lt(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),Lt(h,m)&&Lt(h,d)&&!Lt(m,p)&&u(),d=h,p=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||je:a,done:!1}:{done:!0}}}},a}var $d=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${St(t)}Modifiers`]||e[`${Gt(t)}Modifiers`];function Am(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||je;let s=r;const i=t.startsWith("update:"),o=i&&$d(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>st(c)?c.trim():c)),o.number&&(s=r.map(Xi)));let a,l=n[a=_s(t)]||n[a=_s(St(t))];!l&&i&&(l=n[a=_s(Gt(t))]),l&&pr(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,pr(u,e,6,s)}}var km=new WeakMap;function Pd(e,t,r=!1){const n=r?km:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!Oe(e)){const l=u=>{const c=Pd(u,t,!0);c&&(a=!0,Ze(o,c))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Ge(e)&&n.set(e,null),null):(_e(i)?i.forEach(l=>o[l]=null):Ze(o,i),Ge(e)&&n.set(e,o),o)}function ko(e,t){return!e||!ei(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ye(e,t[0].toLowerCase()+t.slice(1))||Ye(e,Gt(t))||Ye(e,t))}function Io(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:p,setupState:h,ctx:m,inheritAttrs:w}=e,x=fi(e);let g,S;try{if(r.shapeFlag&4){const y=s||n,T=y;g=Yt(u.call(T,y,c,d,h,p,m)),S=a}else{const y=t;g=Yt(y.length>1?y(d,{attrs:a,slots:o,emit:l}):y(d,null)),S=t.props?a:Rm(a)}}catch(y){xi.length=0,Zn(y,e,1),g=H(gt)}let b=g;if(S&&w!==!1){const y=Object.keys(S),{shapeFlag:T}=b;y.length&&T&7&&(i&&y.some(Ra)&&(S=$m(S,i)),b=Ir(b,S,!1,!0))}return r.dirs&&(b=Ir(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&rn(b,r.transition),g=b,fi(x),g}function Im(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(on(s)){if(s.type!==gt||s.children==="v-if"){if(r)return;r=s}}else return}return r}var Rm=e=>{let t;for(const r in e)(r==="class"||r==="style"||ei(r))&&((t||(t={}))[r]=e[r]);return t},$m=(e,t)=>{const r={};for(const n in e)(!Ra(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function Pm(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?Dd(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(Od(o,n,p)&&!ko(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Dd(n,o,u):!0:!!o;return!1}function Dd(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(Od(t,e,i)&&!ko(r,i))return!0}return!1}function Od(e,t,r){const n=e[r],s=t[r];return r==="style"&&Ge(n)&&Ge(s)?!Wr(n,s):n!==s}function Ro({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 Hd={},Md=()=>Object.create(Hd),Nd=e=>Object.getPrototypeOf(e)===Hd;function Dm(e,t,r,n=!1){const s={},i=Md();e.propsDefaults=Object.create(null),qd(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:Mu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Om(e,t,r,n){const{props:s,attrs:i,vnode:{patchFlag:o}}=e,a=Ue(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(ko(e.emitsOptions,p))continue;const h=t[p];if(l)if(Ye(i,p))h!==i[p]&&(i[p]=h,u=!0);else{const m=St(p);s[m]=gl(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{qd(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Ye(t,d)&&((c=Gt(d))===d||!Ye(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=gl(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Ye(t,d))&&(delete i[d],u=!0)}u&&Yr(e.attrs,"set","")}function qd(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Jn(l))continue;const u=t[l];let c;s&&Ye(s,c=St(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:ko(e.emitsOptions,l)||(!(l in n)||u!==n[l])&&(n[l]=u,o=!0)}if(i){const l=Ue(r),u=a||je;for(let c=0;c<i.length;c++){const d=i[c];r[d]=gl(s,l,d,u[d],e,!Ye(u,d))}}return o}function gl(e,t,r,n,s,i){const o=e[r];if(o!=null){const a=Ye(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&Oe(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=ns(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===Gt(r))&&(n=!0))}return n}var Hm=new WeakMap;function Bd(e,t,r=!1){const n=r?Hm:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!Oe(e)){const c=d=>{l=!0;const[p,h]=Bd(d,t,!0);Ze(o,p),h&&a.push(...h)};!r&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!l)return Ge(e)&&n.set(e,ws),ws;if(_e(i))for(let c=0;c<i.length;c++){const d=St(i[c]);Ld(d)&&(o[d]=je)}else if(i)for(const c in i){const d=St(c);if(Ld(d)){const p=i[c],h=o[d]=_e(p)||Oe(p)?{type:p}:Ze({},p),m=h.type;let w=!1,x=!0;if(_e(m))for(let g=0;g<m.length;++g){const S=m[g],b=Oe(S)&&S.name;if(b==="Boolean"){w=!0;break}else b==="String"&&(x=!1)}else w=Oe(m)&&m.name==="Boolean";h[0]=w,h[1]=x,(w||Ye(h,"default"))&&a.push(d)}}const u=[o,a];return Ge(e)&&n.set(e,u),u}function Ld(e){return e[0]!=="$"&&!Jn(e)}var vl=e=>e==="_"||e==="_ctx"||e==="$stable",ml=e=>_e(e)?e.map(Yt):[Yt(e)],Mm=(e,t,r)=>{if(t._n)return t;const n=I((...s)=>ml(t(...s)),r);return n._c=!1,n},Fd=(e,t,r)=>{const n=e._ctx;for(const s in e){if(vl(s))continue;const i=e[s];if(Oe(i))t[s]=Mm(s,i,n);else if(i!=null){const o=ml(i);t[s]=()=>o}}},Vd=(e,t)=>{const r=ml(t);e.slots.default=()=>r},jd=(e,t,r)=>{for(const n in t)(r||!vl(n))&&(e[n]=t[n])},Nm=(e,t,r)=>{const n=e.slots=Md();if(e.vnode.shapeFlag&32){const s=t._;s?(jd(n,t,r),r&&pu(n,"_",s,!0)):Fd(t,n)}else t&&Vd(e,t)},qm=(e,t,r)=>{const{vnode:n,slots:s}=e;let i=!0,o=je;if(n.shapeFlag&32){const a=t._;a?r&&a===1?i=!1:jd(s,t,r):(i=!t.$stable,Fd(t,s)),o=t}else t&&(Vd(e,t),o={default:1});if(i)for(const a in s)!vl(a)&&o[a]==null&&delete s[a]};function Xx(){}var yt=Xd;function Ud(e){return Kd(e)}function zd(e){return Kd(e,jv)}function Kd(e,t){const r=eo();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=dr,insertStaticContent:m}=e,w=(A,O,Y,se=null,re=null,ee=null,de=void 0,fe=null,ue=!!O.dynamicChildren)=>{if(A===O)return;A&&!kr(A,O)&&(se=nt(A),pe(A,re,ee,!0),A=null),O.patchFlag===-2&&(ue=!1,O.dynamicChildren=null);const{type:ne,ref:ke,shapeFlag:we}=O;switch(ne){case Tn:x(A,O,Y,se);break;case gt:g(A,O,Y,se);break;case ts:A==null&&S(O,Y,se,de);break;case ze:_(A,O,Y,se,re,ee,de,fe,ue);break;default:we&1?T(A,O,Y,se,re,ee,de,fe,ue):we&6?E(A,O,Y,se,re,ee,de,fe,ue):(we&64||we&128)&&ne.process(A,O,Y,se,re,ee,de,fe,ue,ot)}ke!=null&&re?Rs(ke,A&&A.ref,ee,O||A,!O):ke==null&&A&&A.ref!=null&&Rs(A.ref,null,ee,A,!0)},x=(A,O,Y,se)=>{if(A==null)n(O.el=a(O.children),Y,se);else{const re=O.el=A.el;O.children!==A.children&&u(re,O.children)}},g=(A,O,Y,se)=>{A==null?n(O.el=l(O.children||""),Y,se):O.el=A.el},S=(A,O,Y,se)=>{[A.el,A.anchor]=m(A.children,O,Y,se,A.el,A.anchor)},b=({el:A,anchor:O},Y,se)=>{let re;for(;A&&A!==O;)re=p(A),n(A,Y,se),A=re;n(O,Y,se)},y=({el:A,anchor:O})=>{let Y;for(;A&&A!==O;)Y=p(A),s(A),A=Y;s(O)},T=(A,O,Y,se,re,ee,de,fe,ue)=>{if(O.type==="svg"?de="svg":O.type==="math"&&(de="mathml"),A==null)k(O,Y,se,re,ee,de,fe,ue);else{const ne=A.el&&A.el._isVueCE?A.el:null;try{ne&&ne._beginPatch(),B(A,O,re,ee,de,fe,ue)}finally{ne&&ne._endPatch()}}},k=(A,O,Y,se,re,ee,de,fe)=>{let ue,ne;const{props:ke,shapeFlag:we,transition:Te,dirs:Ie}=A;if(ue=A.el=o(A.type,ee,ke&&ke.is,ke),we&8?c(ue,A.children):we&16&&v(A.children,ue,null,se,re,wl(A,ee),de,fe),Ie&&Nr(A,null,se,"created"),N(ue,A,A.scopeId,de,se),ke){for(const Z in ke)Z!=="value"&&!Jn(Z)&&i(ue,Z,null,ke[Z],ee,se);"value"in ke&&i(ue,"value",null,ke.value,ee),(ne=ke.onVnodeBeforeMount)&&Zt(ne,se,A)}Ie&&Nr(A,null,se,"beforeMount");const Ve=Wd(re,Te);Ve&&Te.beforeEnter(ue),n(ue,O,Y),((ne=ke&&ke.onVnodeMounted)||Ve||Ie)&&yt(()=>{ne&&Zt(ne,se,A),Ve&&Te.enter(ue),Ie&&Nr(A,null,se,"mounted")},re)},N=(A,O,Y,se,re)=>{if(Y&&h(A,Y),se)for(let ee=0;ee<se.length;ee++)h(A,se[ee]);if(re){let ee=re.subTree;if(O===ee||Po(ee.type)&&(ee.ssContent===O||ee.ssFallback===O)){const de=re.vnode;N(A,de,de.scopeId,de.slotScopeIds,re.parent)}}},v=(A,O,Y,se,re,ee,de,fe,ue=0)=>{for(let ne=ue;ne<A.length;ne++)w(null,A[ne]=fe?an(A[ne]):Yt(A[ne]),O,Y,se,re,ee,de,fe)},B=(A,O,Y,se,re,ee,de)=>{const fe=O.el=A.el;let{patchFlag:ue,dynamicChildren:ne,dirs:ke}=O;ue|=A.patchFlag&16;const we=A.props||je,Te=O.props||je;let Ie;if(Y&&es(Y,!1),(Ie=Te.onVnodeBeforeUpdate)&&Zt(Ie,Y,O,A),ke&&Nr(O,A,Y,"beforeUpdate"),Y&&es(Y,!0),(we.innerHTML&&Te.innerHTML==null||we.textContent&&Te.textContent==null)&&c(fe,""),ne?q(A.dynamicChildren,ne,fe,Y,se,wl(O,re),ee):de||W(A,O,fe,null,Y,se,wl(O,re),ee,!1),ue>0){if(ue&16)C(fe,we,Te,Y,re);else if(ue&2&&we.class!==Te.class&&i(fe,"class",null,Te.class,re),ue&4&&i(fe,"style",we.style,Te.style,re),ue&8){const Ve=O.dynamicProps;for(let Z=0;Z<Ve.length;Z++){const le=Ve[Z],he=we[le],ft=Te[le];(ft!==he||le==="value")&&i(fe,le,he,ft,re,Y)}}ue&1&&A.children!==O.children&&c(fe,O.children)}else!de&&ne==null&&C(fe,we,Te,Y,re);((Ie=Te.onVnodeUpdated)||ke)&&yt(()=>{Ie&&Zt(Ie,Y,O,A),ke&&Nr(O,A,Y,"updated")},se)},q=(A,O,Y,se,re,ee,de)=>{for(let fe=0;fe<O.length;fe++){const ue=A[fe],ne=O[fe];w(ue,ne,ue.el&&(ue.type===ze||!kr(ue,ne)||ue.shapeFlag&198)?d(ue.el):Y,null,se,re,ee,de,!0)}},C=(A,O,Y,se,re)=>{if(O!==Y){if(O!==je)for(const ee in O)!Jn(ee)&&!(ee in Y)&&i(A,ee,O[ee],null,re,se);for(const ee in Y){if(Jn(ee))continue;const de=Y[ee],fe=O[ee];de!==fe&&ee!=="value"&&i(A,ee,fe,de,re,se)}"value"in Y&&i(A,"value",O.value,Y.value,re)}},_=(A,O,Y,se,re,ee,de,fe,ue)=>{const ne=O.el=A?A.el:a(""),ke=O.anchor=A?A.anchor:a("");let{patchFlag:we,dynamicChildren:Te,slotScopeIds:Ie}=O;Ie&&(fe=fe?fe.concat(Ie):Ie),A==null?(n(ne,Y,se),n(ke,Y,se),v(O.children||[],Y,ke,re,ee,de,fe,ue)):we>0&&we&64&&Te&&A.dynamicChildren&&A.dynamicChildren.length===Te.length?(q(A.dynamicChildren,Te,Y,re,ee,de,fe),(O.key!=null||re&&O===re.subTree)&&yl(A,O,!0)):W(A,O,Y,ke,re,ee,de,fe,ue)},E=(A,O,Y,se,re,ee,de,fe,ue)=>{O.slotScopeIds=fe,A==null?O.shapeFlag&512?re.ctx.activate(O,Y,se,de,ue):P(O,Y,se,re,ee,de,ue):R(A,O,ue)},P=(A,O,Y,se,re,ee,de)=>{const fe=A.component=rf(A,se,re);if(vi(A)&&(fe.ctx.renderer=ot),sf(fe,!1,de),fe.asyncDep){if(re&&re.registerDep(fe,D,de),!A.el){const ue=fe.subTree=H(gt);g(null,ue,O,Y),A.placeholder=ue.el}}else D(fe,A,O,Y,re,ee,de)},R=(A,O,Y)=>{const se=O.component=A.component;if(Pm(A,O,Y))if(se.asyncDep&&!se.asyncResolved){J(se,O,Y);return}else se.next=O,se.update();else O.el=A.el,se.vnode=O},D=(A,O,Y,se,re,ee,de)=>{const fe=()=>{if(A.isMounted){let{next:we,bu:Te,u:Ie,parent:Ve,vnode:Z}=A;{const Bt=Gd(A);if(Bt){we&&(we.el=Z.el,J(A,we,de)),Bt.asyncDep.then(()=>{yt(()=>{A.isUnmounted||ne()},re)});return}}let le=we,he;es(A,!1),we?(we.el=Z.el,J(A,we,de)):we=Z,Te&&Ss(Te),(he=we.props&&we.props.onVnodeBeforeUpdate)&&Zt(he,Ve,we,Z),es(A,!0);const ft=Io(A),ur=A.subTree;A.subTree=ft,w(ur,ft,d(ur.el),nt(ur),A,re,ee),we.el=ft.el,le===null&&Ro(A,ft.el),Ie&&yt(Ie,re),(he=we.props&&we.props.onVnodeUpdated)&&yt(()=>Zt(he,Ve,we,Z),re)}else{let we;const{el:Te,props:Ie}=O,{bm:Ve,m:Z,parent:le,root:he,type:ft}=A,ur=nn(O);if(es(A,!1),Ve&&Ss(Ve),!ur&&(we=Ie&&Ie.onVnodeBeforeMount)&&Zt(we,le,O),es(A,!0),Te&&lt){const Bt=()=>{A.subTree=Io(A),lt(Te,A.subTree,A,re,null)};ur&&ft.__asyncHydrate?ft.__asyncHydrate(Te,A,Bt):Bt()}else{he.ce&&he.ce._hasShadowRoot()&&he.ce._injectChildStyle(ft);const Bt=A.subTree=Io(A);w(null,Bt,Y,se,A,re,ee),O.el=Bt.el}if(Z&&yt(Z,re),!ur&&(we=Ie&&Ie.onVnodeMounted)){const Bt=O;yt(()=>Zt(we,le,Bt),re)}(O.shapeFlag&256||le&&nn(le.vnode)&&le.vnode.shapeFlag&256)&&A.a&&yt(A.a,re),A.isMounted=!0,O=Y=se=null}};A.scope.on();const ue=A.effect=new ri(fe);A.scope.off();const ne=A.update=ue.run.bind(ue),ke=A.job=ue.runIfDirty.bind(ue);ke.i=A,ke.id=A.uid,ue.scheduler=()=>Ja(ke),es(A,!0),ne()},J=(A,O,Y)=>{O.component=A;const se=A.vnode.props;A.vnode=O,A.next=null,Om(A,O.props,se,Y),qm(A,O.children,Y),Gr(),Uu(A),Jr()},W=(A,O,Y,se,re,ee,de,fe,ue=!1)=>{const ne=A&&A.children,ke=A?A.shapeFlag:0,we=O.children,{patchFlag:Te,shapeFlag:Ie}=O;if(Te>0){if(Te&128){z(ne,we,Y,se,re,ee,de,fe,ue);return}else if(Te&256){ae(ne,we,Y,se,re,ee,de,fe,ue);return}}Ie&8?(ke&16&&He(ne,re,ee),we!==ne&&c(Y,we)):ke&16?Ie&16?z(ne,we,Y,se,re,ee,de,fe,ue):He(ne,re,ee,!0):(ke&8&&c(Y,""),Ie&16&&v(we,Y,se,re,ee,de,fe,ue))},ae=(A,O,Y,se,re,ee,de,fe,ue)=>{A=A||ws,O=O||ws;const ne=A.length,ke=O.length,we=Math.min(ne,ke);let Te;for(Te=0;Te<we;Te++){const Ie=O[Te]=ue?an(O[Te]):Yt(O[Te]);w(A[Te],Ie,Y,null,re,ee,de,fe,ue)}ne>ke?He(A,re,ee,!0,!1,we):v(O,Y,se,re,ee,de,fe,ue,we)},z=(A,O,Y,se,re,ee,de,fe,ue)=>{let ne=0;const ke=O.length;let we=A.length-1,Te=ke-1;for(;ne<=we&&ne<=Te;){const Ie=A[ne],Ve=O[ne]=ue?an(O[ne]):Yt(O[ne]);if(kr(Ie,Ve))w(Ie,Ve,Y,null,re,ee,de,fe,ue);else break;ne++}for(;ne<=we&&ne<=Te;){const Ie=A[we],Ve=O[Te]=ue?an(O[Te]):Yt(O[Te]);if(kr(Ie,Ve))w(Ie,Ve,Y,null,re,ee,de,fe,ue);else break;we--,Te--}if(ne>we){if(ne<=Te){const Ie=Te+1,Ve=Ie<ke?O[Ie].el:se;for(;ne<=Te;)w(null,O[ne]=ue?an(O[ne]):Yt(O[ne]),Y,Ve,re,ee,de,fe,ue),ne++}}else if(ne>Te)for(;ne<=we;)pe(A[ne],re,ee,!0),ne++;else{const Ie=ne,Ve=ne,Z=new Map;for(ne=Ve;ne<=Te;ne++){const Wt=O[ne]=ue?an(O[ne]):Yt(O[ne]);Wt.key!=null&&Z.set(Wt.key,ne)}let le,he=0;const ft=Te-Ve+1;let ur=!1,Bt=0;const vs=new Array(ft);for(ne=0;ne<ft;ne++)vs[ne]=0;for(ne=Ie;ne<=we;ne++){const Wt=A[ne];if(he>=ft){pe(Wt,re,ee,!0);continue}let Sr;if(Wt.key!=null)Sr=Z.get(Wt.key);else for(le=Ve;le<=Te;le++)if(vs[le-Ve]===0&&kr(Wt,O[le])){Sr=le;break}Sr===void 0?pe(Wt,re,ee,!0):(vs[Sr-Ve]=ne+1,Sr>=Bt?Bt=Sr:ur=!0,w(Wt,O[Sr],Y,null,re,ee,de,fe,ue),he++)}const Ea=ur?Bm(vs):ws;for(le=Ea.length-1,ne=ft-1;ne>=0;ne--){const Wt=Ve+ne,Sr=O[Wt],bn=O[Wt+1],Xs=Wt+1<ke?bn.el||Jd(bn):se;vs[ne]===0?w(null,Sr,Y,Xs,re,ee,de,fe,ue):ur&&(le<0||ne!==Ea[le]?ce(Sr,Y,Xs,2):le--)}}},ce=(A,O,Y,se,re=null)=>{const{el:ee,type:de,transition:fe,children:ue,shapeFlag:ne}=A;if(ne&6){ce(A.component.subTree,O,Y,se);return}if(ne&128){A.suspense.move(O,Y,se);return}if(ne&64){de.move(A,O,Y,ot);return}if(de===ze){n(ee,O,Y);for(let ke=0;ke<ue.length;ke++)ce(ue[ke],O,Y,se);n(A.anchor,O,Y);return}if(de===ts){b(A,O,Y);return}if(se!==2&&ne&1&&fe)if(se===0)fe.beforeEnter(ee),n(ee,O,Y),yt(()=>fe.enter(ee),re);else{const{leave:ke,delayLeave:we,afterLeave:Te}=fe,Ie=()=>{A.ctx.isUnmounted?s(ee):n(ee,O,Y)},Ve=()=>{ee._isLeaving&&ee[qr](!0),ke(ee,()=>{Ie(),Te&&Te()})};we?we(ee,Ie,Ve):Ve()}else n(ee,O,Y)},pe=(A,O,Y,se=!1,re=!1)=>{const{type:ee,props:de,ref:fe,children:ue,dynamicChildren:ne,shapeFlag:ke,patchFlag:we,dirs:Te,cacheIndex:Ie}=A;if(we===-2&&(re=!1),fe!=null&&(Gr(),Rs(fe,null,Y,A,!0),Jr()),Ie!=null&&(O.renderCache[Ie]=void 0),ke&256){O.ctx.deactivate(A);return}const Ve=ke&1&&Te,Z=!nn(A);let le;if(Z&&(le=de&&de.onVnodeBeforeUnmount)&&Zt(le,O,A),ke&6)Ee(A.component,Y,se);else{if(ke&128){A.suspense.unmount(Y,se);return}Ve&&Nr(A,null,O,"beforeUnmount"),ke&64?A.type.remove(A,O,Y,ot,se):ne&&!ne.hasOnce&&(ee!==ze||we>0&&we&64)?He(ne,O,Y,!1,!0):(ee===ze&&we&384||!re&&ke&16)&&He(ue,O,Y),se&&Pe(A)}(Z&&(le=de&&de.onVnodeUnmounted)||Ve)&&yt(()=>{le&&Zt(le,O,A),Ve&&Nr(A,null,O,"unmounted")},Y)},Pe=A=>{const{type:O,el:Y,anchor:se,transition:re}=A;if(O===ze){Fe(Y,se);return}if(O===ts){y(A);return}const ee=()=>{s(Y),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(A.shapeFlag&1&&re&&!re.persisted){const{leave:de,delayLeave:fe}=re,ue=()=>de(Y,ee);fe?fe(A.el,ee,ue):ue()}else ee()},Fe=(A,O)=>{let Y;for(;A!==O;)Y=p(A),s(A),A=Y;s(O)},Ee=(A,O,Y)=>{const{bum:se,scope:re,job:ee,subTree:de,um:fe,m:ue,a:ne}=A;$o(ue),$o(ne),se&&Ss(se),re.stop(),ee&&(ee.flags|=8,pe(de,A,O,Y)),fe&&yt(fe,O),yt(()=>{A.isUnmounted=!0},O)},He=(A,O,Y,se=!1,re=!1,ee=0)=>{for(let de=ee;de<A.length;de++)pe(A[de],O,Y,se,re)},nt=A=>{if(A.shapeFlag&6)return nt(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const O=p(A.anchor||A.el),Y=O&&O[Zu];return Y?p(Y):O};let bt=!1;const We=(A,O,Y)=>{let se;A==null?O._vnode&&(pe(O._vnode,null,null,!0),se=O._vnode.component):w(O._vnode||null,A,O,null,null,null,Y),O._vnode=A,bt||(bt=!0,Uu(se),ho(),bt=!1)},ot={p:w,um:pe,m:ce,r:Pe,mt:P,mc:v,pc:W,pbc:q,n:nt,o:e};let _t,lt;return t&&([_t,lt]=t(ot)),{render:We,hydrate:_t,createApp:Tm(We,_t)}}function wl({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 es({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Wd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function yl(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]=an(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&yl(o,a)),a.type===Tn&&(a.patchFlag===-1&&(a=s[i]=an(a)),a.el=o.el),a.type===gt&&!a.el&&(a.el=o.el)}}function Bm(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 Gd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Gd(t)}function $o(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Jd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Jd(t.subTree):null}var Po=e=>e.__isSuspense,bl=0,Lm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)Fm(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}Vm(e,t,r,n,s,o,a,l,u)}},hydrate:jm,normalize:Um};function Ci(e,t){const r=e.props&&e.props[t];Oe(r)&&r()}function Fm(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=Yd(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?(Ci(e,"onPending"),Ci(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),Os(p,e.ssFallback)):p.resolve(!1,!0)}function Vm(e,t,r,n,s,i,o,a,{p:l,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:m,pendingBranch:w,isInFallback:x,isHydrating:g}=d;if(w)d.pendingBranch=p,kr(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():x&&(g||(l(m,h,r,n,s,null,i,o,a),Os(d,h)))):(d.pendingId=bl++,g?(d.isHydrating=!1,d.activeBranch=w):u(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),x?(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():(l(m,h,r,n,s,null,i,o,a),Os(d,h))):m&&kr(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&&kr(m,p))l(m,p,r,n,s,d,i,o,a),Os(d,p);else if(Ci(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=bl++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:S,pendingId:b}=d;S>0?setTimeout(()=>{d.pendingId===b&&d.fallback(h)},S):S===0&&d.fallback(h)}}function Yd(e,t,r,n,s,i,o,a,l,u,c=!1){const{p:d,m:p,um:h,n:m,o:{parentNode:w,remove:x}}=u;let g;const S=zm(e);S&&t&&t.pendingBranch&&(g=t.pendingId,t.deps++);const b=e.props?Qi(e.props.timeout):void 0,y=i,T={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:bl++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(k=!1,N=!1){const{vnode:v,activeBranch:B,pendingBranch:q,pendingId:C,effects:_,parentComponent:E,container:P,isInFallback:R}=T;let D=!1;T.isHydrating?T.isHydrating=!1:k||(D=B&&q.transition&&q.transition.mode==="out-in",D&&(B.transition.afterLeave=()=>{C===T.pendingId&&(p(q,P,i===y?m(B):i,0),ui(_),R&&v.ssFallback&&(v.ssFallback.el=null))}),B&&(w(B.el)===P&&(i=m(B)),h(B,E,T,!0),!D&&R&&v.ssFallback&&yt(()=>v.ssFallback.el=null,T)),D||p(q,P,i,0)),Os(T,q),T.pendingBranch=null,T.isInFallback=!1;let J=T.parent,W=!1;for(;J;){if(J.pendingBranch){J.effects.push(..._),W=!0;break}J=J.parent}!W&&!D&&ui(_),T.effects=[],S&&t&&t.pendingBranch&&g===t.pendingId&&(t.deps--,t.deps===0&&!N&&t.resolve()),Ci(v,"onResolve")},fallback(k){if(!T.pendingBranch)return;const{vnode:N,activeBranch:v,parentComponent:B,container:q,namespace:C}=T;Ci(N,"onFallback");const _=m(v),E=()=>{T.isInFallback&&(d(null,k,q,_,B,null,C,a,l),Os(T,k))},P=k.transition&&k.transition.mode==="out-in";P&&(v.transition.afterLeave=E),T.isInFallback=!0,h(v,B,null,!0),P||E()},move(k,N,v){T.activeBranch&&p(T.activeBranch,k,N,v),T.container=k},next(){return T.activeBranch&&m(T.activeBranch)},registerDep(k,N,v){const B=!!T.pendingBranch;B&&T.deps++;const q=k.vnode.el;k.asyncDep.catch(C=>{Zn(C,k,0)}).then(C=>{if(k.isUnmounted||T.isUnmounted||T.pendingId!==k.suspenseId)return;k.asyncResolved=!0;const{vnode:_}=k;xl(k,C,!1),q&&(_.el=q);const E=!q&&k.subTree.el;N(k,_,w(q||k.subTree.el),q?null:m(k.subTree),T,o,v),E&&(_.placeholder=null,x(E)),Ro(k,_.el),B&&--T.deps===0&&T.resolve()})},unmount(k,N){T.isUnmounted=!0,T.activeBranch&&h(T.activeBranch,r,k,N),T.pendingBranch&&h(T.pendingBranch,r,k,N)}};return T}function jm(e,t,r,n,s,i,o,a,l){const u=t.suspense=Yd(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 Um(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=Zd(n?r.default:r),e.ssFallback=n?Zd(r.fallback):H(gt)}function Zd(e){let t;if(Oe(e)){const r=rs&&e._c;r&&(e._d=!1,$()),e=e(),r&&(e._d=!0,t=Nt,Qd())}return _e(e)&&(e=Im(e)),e=Yt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function Xd(e,t){t&&t.pendingBranch?_e(e)?t.effects.push(...e):t.effects.push(e):ui(e)}function Os(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,Ro(n,s))}function zm(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var ze=Symbol.for("v-fgt"),Tn=Symbol.for("v-txt"),gt=Symbol.for("v-cmt"),ts=Symbol.for("v-stc"),xi=[],Nt=null;function $(e=!1){xi.push(Nt=e?null:[])}function Qd(){xi.pop(),Nt=xi[xi.length-1]||null}var rs=1;function Ti(e,t=!1){rs+=e,e<0&&Nt&&t&&(Nt.hasOnce=!0)}function ef(e){return e.dynamicChildren=rs>0?Nt||ws:null,Qd(),rs>0&&Nt&&Nt.push(e),e}function Se(e,t,r,n,s,i){return ef(Q(e,t,r,n,s,i,!0))}function U(e,t,r,n,s){return ef(H(e,t,r,n,s,!0))}function on(e){return e?e.__v_isVNode===!0:!1}function kr(e,t){return e.type===t.type&&e.key===t.key}function Km(e){}var tf=({key:e})=>e??null,Do=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?st(e)||tt(e)||Oe(e)?{i:It,r:e,k:t,f:!!r}:e:null);function Q(e,t=null,r=null,n=0,s=null,i=e===ze?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&tf(t),ref:t&&Do(t),scopeId:vo,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:It};return a?(Sl(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=st(r)?8:16),rs>0&&!o&&Nt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Nt.push(l),l}var H=Wm;function Wm(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===_d)&&(e=gt),on(e)){const a=Ir(e,t,!0);return r&&Sl(a,r),rs>0&&!i&&Nt&&(a.shapeFlag&6?Nt[Nt.indexOf(e)]=a:Nt.push(a)),a.patchFlag=-2,a}if(e0(e)&&(e=e.__vccOpts),t){t=rr(t);let{class:a,style:l}=t;a&&!st(a)&&(t.class=Xe(a)),Ge(l)&&(li(l)&&!_e(l)&&(l=Ze({},l)),t.style=Ct(l))}const o=st(e)?1:Po(e)?128:Xu(e)?64:Ge(e)?4:Oe(e)?2:0;return Q(e,t,r,n,s,o,i,!0)}function rr(e){return e?li(e)||Nd(e)?Ze({},e):e:null}function Ir(e,t,r=!1,n=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=e,u=t?ye(s||{},t):s,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&tf(u),ref:t&&t.ref?r&&i?_e(i)?i.concat(Do(t)):[i,Do(t)]:Do(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!==ze?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&&Ir(e.ssContent),ssFallback:e.ssFallback&&Ir(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&rn(c,l.clone(c)),c}function Ne(e=" ",t=0){return H(Tn,null,e,t)}function _l(e,t){const r=H(ts,null,e);return r.staticCount=t,r}function qe(e="",t=!1){return t?($(),U(gt,null,e)):H(gt,null,e)}function Yt(e){return e==null||typeof e=="boolean"?H(gt):_e(e)?H(ze,null,e.slice()):on(e)?an(e):H(Tn,null,String(e))}function an(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ir(e)}function Sl(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),Sl(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!Nd(t)?t._ctx=It:s===3&&It&&(It.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Oe(t)?(t={default:t,_ctx:It},r=32):(t=String(t),n&64?(r=16,t=[Ne(t)]):r=8);e.children=t,e.shapeFlag|=r}function ye(...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=Xe([t.class,n.class]));else if(s==="style")t.style=Ct([t.style,n.style]);else if(ei(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 Zt(e,t,r,n=null){pr(e,t,7,[r,n])}var Gm=Rd(),Jm=0;function rf(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||Gm,i={uid:Jm++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Oa(!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:Bd(n,s),emitsOptions:Pd(n,s),emit:null,emitted:null,propsDefaults:je,inheritAttrs:n.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,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=Am.bind(null,i),e.ce&&e.ce(i),i}var Rt=null,vt=()=>Rt||It,Oo,Cl;{const e=eo(),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)}};Oo=t("__VUE_INSTANCE_SETTERS__",r=>Rt=r),Cl=t("__VUE_SSR_SETTERS__",r=>Hs=r)}var ns=e=>{const t=Rt;return Oo(e),e.scope.on(),()=>{e.scope.off(),Oo(t)}},Ho=()=>{Rt&&Rt.scope.off(),Oo(null)};function nf(e){return e.vnode.shapeFlag&4}var Hs=!1;function sf(e,t=!1,r=!1){t&&Cl(t);const{props:n,children:s}=e.vnode,i=nf(e);Dm(e,n,i,t),Nm(e,s,r||t);const o=i?Ym(e,t):void 0;return t&&Cl(!1),o}function Ym(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,dl);const{setup:n}=r;if(n){Gr();const s=e.setupContext=n.length>1?af(e):null,i=ns(e),o=Ts(n,e,0,[e.props,s]),a=Pa(o);if(Jr(),i(),(a||e.sp)&&!nn(e)&&nl(e),a){if(o.then(Ho,Ho),t)return o.then(l=>{xl(e,l,t)}).catch(l=>{Zn(l,e,0)});e.asyncDep=o}else xl(e,o,t)}else of(e,t)}function xl(e,t,r){Oe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ge(t)&&(e.setupState=Wa(t)),of(e,r)}var Mo,Tl;function Zm(e){Mo=e,Tl=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,om))}}var Xm=()=>!Mo;function of(e,t,r){const n=e.type;if(!e.render){if(!t&&Mo&&!n.render){const s=n.template||pl(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=Ze(Ze({isCustomElement:i,delimiters:a},o),l);n.render=Mo(s,u)}}e.render=n.render||dr,Tl&&Tl(e)}{const s=ns(e);Gr();try{ym(e)}finally{Jr(),s()}}}var Qm={get(e,t){return Ot(e,"get",""),e[t]}};function af(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,Qm),slots:e.slots,emit:e.emit,expose:t}}function Ei(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Wa(Ka(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in bi)return bi[r](e)},has(t,r){return r in t||r in bi}})):e.proxy}function El(e,t=!0){return Oe(e)?e.displayName||e.name:e.name||t&&e.__name}function e0(e){return Oe(e)&&"__vccOpts"in e}var V=(e,t)=>_v(e,t,Hs);function vr(e,t,r){try{Ti(-1);const n=arguments.length;return n===2?Ge(t)&&!_e(t)?on(t)?H(e,null,[t]):H(e,t):H(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&on(r)&&(r=[r]),H(e,t,r))}finally{Ti(1)}}function t0(){return;function e(t,r,n){const s=t[n];if(_e(s)&&s.includes(r)||Ge(s)&&r in s||t.extends&&e(t.extends,r,n)||t.mixins&&t.mixins.some(i=>e(i,r,n)))return!0}}function r0(e,t,r,n){const s=r[n];if(s&&lf(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function lf(e,t){const r=e.memo;if(r.length!=t.length)return!1;for(let n=0;n<r.length;n++)if(Lt(r[n],t[n]))return!1;return rs>0&&Nt&&Nt.push(e),!0}var cf="3.5.29",n0=dr,s0=Rv,i0=ks,o0=Ku,a0={createComponentInstance:rf,setupComponent:sf,renderComponentRoot:Io,setCurrentRenderingInstance:fi,isVNode:on,normalizeVNode:Yt,getComponentPublicInstance:Ei,ensureValidVNode:ll,pushWarningContext:Ev,popWarningContext:Av},Qx=null,eT=null,tT=null;var Al=void 0,uf=typeof window<"u"&&window.trustedTypes;if(uf)try{Al=uf.createPolicy("vue",{createHTML:e=>e})}catch{}var df=Al?e=>Al.createHTML(e):e=>e,l0="http://www.w3.org/2000/svg",c0="http://www.w3.org/1998/Math/MathML",ln=typeof document<"u"?document:null,ff=ln&&ln.createElement("template"),pf={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"?ln.createElementNS(l0,e):t==="mathml"?ln.createElementNS(c0,e):r?ln.createElement(e,{is:r}):ln.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>ln.createTextNode(e),createComment:e=>ln.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ln.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{ff.innerHTML=df(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=ff.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]}},En="transition",Ai="animation",Ms=Symbol("_vtc"),hf={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},gf=Ze({},tl,hf),u0=e=>(e.displayName="Transition",e.props=gf,e),d0=u0((e,{slots:t})=>vr(id,mf(e),t)),ss=(e,t=[])=>{_e(e)?e.forEach(r=>r(...t)):e&&e(...t)},vf=e=>e?_e(e)?e.some(t=>t.length>1):e.length>1:!1;function mf(e){const t={};for(const _ in e)_ in hf||(t[_]=e[_]);if(e.css===!1)return t;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:a=`${r}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${r}-leave-from`,leaveActiveClass:p=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,m=f0(s),w=m&&m[0],x=m&&m[1],{onBeforeEnter:g,onEnter:S,onEnterCancelled:b,onLeave:y,onLeaveCancelled:T,onBeforeAppear:k=g,onAppear:N=S,onAppearCancelled:v=b}=t,B=(_,E,P,R)=>{_._enterCancelled=R,An(_,E?c:a),An(_,E?u:o),P&&P()},q=(_,E)=>{_._isLeaving=!1,An(_,d),An(_,h),An(_,p),E&&E()},C=_=>(E,P)=>{const R=_?N:S,D=()=>B(E,_,P);ss(R,[E,D]),wf(()=>{An(E,_?l:i),Br(E,_?c:a),vf(R)||yf(E,n,w,D)})};return Ze(t,{onBeforeEnter(_){ss(g,[_]),Br(_,i),Br(_,o)},onBeforeAppear(_){ss(k,[_]),Br(_,l),Br(_,u)},onEnter:C(!1),onAppear:C(!0),onLeave(_,E){_._isLeaving=!0;const P=()=>q(_,E);Br(_,d),_._enterCancelled?(Br(_,p),Il(_)):(Il(_),Br(_,p)),wf(()=>{_._isLeaving&&(An(_,d),Br(_,h),vf(y)||yf(_,n,x,P))}),ss(y,[_,P])},onEnterCancelled(_){B(_,!1,void 0,!0),ss(b,[_])},onAppearCancelled(_){B(_,!0,void 0,!0),ss(v,[_])},onLeaveCancelled(_){q(_),ss(T,[_])}})}function f0(e){if(e==null)return null;if(Ge(e))return[kl(e.enter),kl(e.leave)];{const t=kl(e);return[t,t]}}function kl(e){return Qi(e)}function Br(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[Ms]||(e[Ms]=new Set)).add(t)}function An(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[Ms];r&&(r.delete(t),r.size||(e[Ms]=void 0))}function wf(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var p0=0;function yf(e,t,r,n){const s=e._endId=++p0,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=bf(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 bf(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${En}Delay`),i=n(`${En}Duration`),o=_f(s,i),a=n(`${Ai}Delay`),l=n(`${Ai}Duration`),u=_f(a,l);let c=null,d=0,p=0;t===En?o>0&&(c=En,d=o,p=i.length):t===Ai?u>0&&(c=Ai,d=u,p=l.length):(d=Math.max(o,u),c=d>0?o>u?En:Ai:null,p=c?c===En?i.length:l.length:0);const h=c===En&&/\b(?:transform|all)(?:,|$)/.test(n(`${En}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function _f(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Sf(r)+Sf(e[n])))}function Sf(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Il(e){return(e?e.ownerDocument:document).body.offsetHeight}function h0(e,t,r){const n=e[Ms];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var No=Symbol("_vod"),Cf=Symbol("_vsh"),qo={name:"show",beforeMount(e,{value:t},{transition:r}){e[No]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):ki(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),ki(e,!0),n.enter(e)):n.leave(e,()=>{ki(e,!1)}):ki(e,t))},beforeUnmount(e,{value:t}){ki(e,t)}};function ki(e,t){e.style.display=t?e[No]:"none",e[Cf]=!t}function g0(){qo.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var xf=Symbol("");function v0(e){const t=vt();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Bo(i,s))},n=()=>{const s=e(t.proxy);t.ce?Bo(t.ce,s):Rl(t.subTree,s),r(s)};il(()=>{ui(n)}),Qe(()=>{Me(n,dr,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),jt(()=>s.disconnect())})}function Rl(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{Rl(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Bo(e.el,t);else if(e.type===ze)e.children.forEach(r=>Rl(r,t));else if(e.type===ts){let{el:r,anchor:n}=e;for(;r&&(Bo(r,t),r!==n);)r=r.nextSibling}}function Bo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=Wg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[xf]=n}}var m0=/(?:^|;)\s*display\s*:/;function w0(e,t,r){const n=e.style,s=st(r);let i=!1;if(r&&!s){if(t)if(st(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&Lo(n,a,"")}else for(const o in t)r[o]==null&&Lo(n,o,"");for(const o in r)o==="display"&&(i=!0),Lo(n,o,r[o])}else if(s){if(t!==r){const o=n[xf];o&&(r+=";"+o),n.cssText=r,i=m0.test(r)}}else t&&e.removeAttribute("style");No in e&&(e[No]=i?n.display:"",e[Cf]&&(n.display="none"))}var Tf=/\s*!important$/;function Lo(e,t,r){if(_e(r))r.forEach(n=>Lo(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=y0(e,t);Tf.test(r)?e.setProperty(Gt(n),r.replace(Tf,""),"important"):e[n]=r}}var Ef=["Webkit","Moz","ms"],$l={};function y0(e,t){const r=$l[t];if(r)return r;let n=St(t);if(n!=="filter"&&n in e)return $l[t]=n;n=ti(n);for(let s=0;s<Ef.length;s++){const i=Ef[s]+n;if(i in e)return $l[t]=i}return t}var Af="http://www.w3.org/1999/xlink";function kf(e,t,r,n,s,i=zg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Af,t.slice(6,t.length)):e.setAttributeNS(Af,t,r):r==null||i&&!vu(r)?e.removeAttribute(t):e.setAttribute(t,i?"":Tr(r)?String(r):r)}function If(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?df(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=vu(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 cn(e,t,r,n){e.addEventListener(t,r,n)}function b0(e,t,r,n){e.removeEventListener(t,r,n)}var Rf=Symbol("_vei");function _0(e,t,r,n,s=null){const i=e[Rf]||(e[Rf]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=S0(t);n?cn(e,a,i[t]=T0(n,s),l):o&&(b0(e,a,o,l),i[t]=void 0)}}var $f=/(?:Once|Passive|Capture)$/;function S0(e){let t;if($f.test(e)){t={};let r;for(;r=e.match($f);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Gt(e.slice(2)),t]}var Pl=0,C0=Promise.resolve(),x0=()=>Pl||(C0.then(()=>Pl=0),Pl=Date.now());function T0(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;pr(E0(n,r.value),t,5,[n])};return r.value=e,r.attached=x0(),r}function E0(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 Pf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Df=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?h0(e,n,o):t==="style"?w0(e,r,n):ei(t)?Ra(t)||_0(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):A0(e,t,n,o))?(If(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&kf(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!st(n))?If(e,St(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),kf(e,t,n,o))};function A0(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pf(t)&&Oe(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 Pf(t)&&st(r)?!1:t in e}var Of={};function Dl(e,t,r){let n=X(e,t);Ji(n)&&(n=Ze({},n,t));class s extends Hf{constructor(o){super(n,o,r)}}return s.def=n,s}var k0=((e,t)=>Dl(e,t,ep)),I0=typeof HTMLElement<"u"?HTMLElement:class{},Hf=class kg extends I0{constructor(t,r={},n=Nl){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!==Nl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Ze({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof kg){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,Et(()=>{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)))[St(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)Ye(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(St))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):Of;const s=St(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===Of?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(Gt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Gt(t),r+""):r||this.removeAttribute(Gt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Qf(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=H(this._def,Ze(t,this._props));return this._instance||(r.ce=n=>{this._instance=n,n.ce=this,n.isCE=!0;const s=(i,o)=>{this.dispatchEvent(new CustomEvent(i,Ji(o[0])?Ze({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Gt(i)!==i&&s(Gt(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 Mf(e){const t=vt(),r=t&&t.ce;return r||null}function R0(){const e=Mf();return e&&e.shadowRoot}function $0(e="$style"){{const t=vt();if(!t)return je;const r=t.type.__cssModules;if(!r)return je;const n=r[e];return n||je}}var Nf=new WeakMap,qf=new WeakMap,Fo=Symbol("_moveCb"),Bf=Symbol("_enterCb"),P0=e=>(delete e.props.mode,e),D0=P0({name:"TransitionGroup",props:Ze({},gf,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=vt(),n=el();let s,i;return wi(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!N0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(O0),s.forEach(H0);const a=s.filter(M0);Il(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Br(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Fo]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Fo]=null,An(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Ue(e),a=mf(o);let l=o.tag||ze;if(s=[],i)for(let u=0;u<i.length;u++){const c=i[u];c.el&&c.el instanceof Element&&(s.push(c),rn(c,Is(c,a,n,r)),Nf.set(c,Lf(c.el)))}i=t.default?bo(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&rn(c,Is(c,a,n,r))}return H(l,null,i)}}});function O0(e){const t=e.el;t[Fo]&&t[Fo](),t[Bf]&&t[Bf]()}function H0(e){qf.set(e,Lf(e.el))}function M0(e){const t=Nf.get(e),r=qf.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 Lf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function N0(e,t,r){const n=e.cloneNode(),s=e[Ms];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),r.split(/\s+/).forEach(a=>a&&n.classList.add(a)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:o}=bf(n);return i.removeChild(n),o}var kn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return _e(t)?r=>Ss(t,r):t};function q0(e){e.target.composing=!0}function Ff(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var mr=Symbol("_assign");function Vf(e,t,r){return t&&(e=e.trim()),r&&(e=Xi(e)),e}var Ii={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[mr]=kn(s);const i=n||s.props&&s.props.type==="number";cn(e,t?"change":"input",o=>{o.target.composing||e[mr](Vf(e.value,r,i))}),(r||i)&&cn(e,"change",()=>{e.value=Vf(e.value,r,i)}),t||(cn(e,"compositionstart",q0),cn(e,"compositionend",Ff),cn(e,"change",Ff))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[mr]=kn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Xi(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))}},Ol={deep:!0,created(e,t,r){e[mr]=kn(r),cn(e,"change",()=>{const n=e._modelValue,s=Ns(e),i=e.checked,o=e[mr];if(_e(n)){const a=to(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(Gn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(Kf(e,i))})},mounted:jf,beforeUpdate(e,t,r){e[mr]=kn(r),jf(e,t,r)}};function jf(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(_e(t))s=to(t,n.props.value)>-1;else if(Gn(t))s=t.has(n.props.value);else{if(t===r)return;s=Wr(t,Kf(e,!0))}e.checked!==s&&(e.checked=s)}var Hl={created(e,{value:t},r){e.checked=Wr(t,r.props.value),e[mr]=kn(r),cn(e,"change",()=>{e[mr](Ns(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[mr]=kn(n),t!==r&&(e.checked=Wr(t,n.props.value))}},Uf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=Gn(t);cn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Xi(Ns(o)):Ns(o));e[mr](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,Et(()=>{e._assigning=!1})}),e[mr]=kn(n)},mounted(e,{value:t}){zf(e,t)},beforeUpdate(e,t,r){e[mr]=kn(r)},updated(e,{value:t}){e._assigning||zf(e,t)}};function zf(e,t){const r=e.multiple,n=_e(t);if(!(r&&!n&&!Gn(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Ns(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=to(t,a)>-1}else o.selected=t.has(a);else if(Wr(Ns(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ns(e){return"_value"in e?e._value:e.value}function Kf(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var Wf={created(e,t,r){Vo(e,t,r,null,"created")},mounted(e,t,r){Vo(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){Vo(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){Vo(e,t,r,n,"updated")}};function Gf(e,t){switch(e){case"SELECT":return Uf;case"TEXTAREA":return Ii;default:switch(t){case"checkbox":return Ol;case"radio":return Hl;default:return Ii}}}function Vo(e,t,r,n,s){const i=Gf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function B0(){Ii.getSSRProps=({value:e})=>({value:e}),Hl.getSSRProps=({value:e},t)=>{if(t.props&&Wr(t.props.value,e))return{checked:!0}},Ol.getSSRProps=({value:e},t)=>{if(_e(e)){if(t.props&&to(e,t.props.value)>-1)return{checked:!0}}else if(Gn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Wf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=Gf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var L0=["ctrl","shift","alt","meta"],F0={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)=>L0.some(r=>e[`${r}Key`]&&!t.includes(r))},Xt=(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=F0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},V0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ml=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Gt(s.key);if(t.some(o=>o===i||V0[o]===i))return e(s)}))},Jf=Ze({patchProp:Df},pf),Ri,Yf=!1;function Zf(){return Ri||(Ri=Ud(Jf))}function Xf(){return Ri=Yf?Ri:zd(Jf),Yf=!0,Ri}var Qf=((...e)=>{Zf().render(...e)}),j0=((...e)=>{Xf().hydrate(...e)}),Nl=((...e)=>{const t=Zf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=rp(n);if(!s)return;const i=t._component;!Oe(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,tp(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),ep=((...e)=>{const t=Xf().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=rp(n);if(s)return r(s,!0,tp(s))},t});function tp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function rp(e){return st(e)?document.querySelector(e):e}var np=!1,U0=()=>{np||(np=!0,B0(),g0())},z0=Og({BaseTransition:()=>id,BaseTransitionPropsValidators:()=>tl,Comment:()=>gt,DeprecationTypes:()=>null,EffectScope:()=>Oa,ErrorCodes:()=>Iv,ErrorTypeStrings:()=>s0,Fragment:()=>ze,KeepAlive:()=>em,ReactiveEffect:()=>ri,Static:()=>ts,Suspense:()=>Lm,Teleport:()=>Xa,Text:()=>Tn,TrackOpTypes:()=>Sv,Transition:()=>d0,TransitionGroup:()=>D0,TriggerOpTypes:()=>Cv,VueElement:()=>Hf,assertNumber:()=>kv,callWithAsyncErrorHandling:()=>pr,callWithErrorHandling:()=>Ts,camelize:()=>St,capitalize:()=>ti,cloneVNode:()=>Ir,compatUtils:()=>null,compile:()=>K0,computed:()=>V,createApp:()=>Nl,createBlock:()=>U,createCommentVNode:()=>qe,createElementBlock:()=>Se,createElementVNode:()=>Q,createHydrationRenderer:()=>zd,createPropsRestProxy:()=>mm,createRenderer:()=>Ud,createSSRApp:()=>ep,createSlots:()=>im,createStaticVNode:()=>_l,createTextVNode:()=>Ne,createVNode:()=>H,customRef:()=>ci,defineAsyncComponent:()=>Qv,defineComponent:()=>X,defineCustomElement:()=>Dl,defineEmits:()=>lm,defineExpose:()=>cm,defineModel:()=>fm,defineOptions:()=>um,defineProps:()=>am,defineSSRCustomElement:()=>k0,defineSlots:()=>dm,devtools:()=>i0,effect:()=>Jg,effectScope:()=>Ha,getCurrentInstance:()=>vt,getCurrentScope:()=>ro,getCurrentWatcher:()=>xv,getTransitionRawChildren:()=>bo,guardReactiveProps:()=>rr,h:()=>vr,handleError:()=>Zn,hasInjectionContext:()=>Mv,hydrate:()=>j0,hydrateOnIdle:()=>Wv,hydrateOnInteraction:()=>Zv,hydrateOnMediaQuery:()=>Yv,hydrateOnVisible:()=>Jv,initCustomFormatter:()=>t0,initDirectivesForSSR:()=>U0,inject:()=>Vt,isMemoSame:()=>lf,isProxy:()=>li,isReactive:()=>en,isReadonly:()=>Hr,isRef:()=>tt,isRuntimeOnly:()=>Xm,isShallow:()=>Jt,isVNode:()=>on,markRaw:()=>Ka,mergeDefaults:()=>Td,mergeModels:()=>vm,mergeProps:()=>ye,nextTick:()=>Et,nodeOps:()=>pf,normalizeClass:()=>Xe,normalizeProps:()=>fr,normalizeStyle:()=>Ct,onActivated:()=>pd,onBeforeMount:()=>vd,onBeforeUnmount:()=>Ds,onBeforeUpdate:()=>il,onDeactivated:()=>hd,onErrorCaptured:()=>bd,onMounted:()=>Qe,onRenderTracked:()=>yd,onRenderTriggered:()=>wd,onScopeDispose:()=>Ma,onServerPrefetch:()=>md,onUnmounted:()=>jt,onUpdated:()=>wi,onWatcherCleanup:()=>Lu,openBlock:()=>$,patchProp:()=>Df,popScopeId:()=>Ov,provide:()=>Xn,proxyRefs:()=>Wa,pushScopeId:()=>Dv,queuePostFlushCb:()=>ui,reactive:()=>Xr,readonly:()=>Ht,ref:()=>F,registerRuntimeCompiler:()=>Zm,render:()=>Qf,renderList:()=>gr,renderSlot:()=>te,resolveComponent:()=>nm,resolveDirective:()=>sm,resolveDynamicComponent:()=>yi,resolveFilter:()=>null,resolveTransitionHooks:()=>Is,setBlockTracking:()=>Ti,setDevtoolsHook:()=>o0,setTransitionHooks:()=>rn,shallowReactive:()=>Mu,shallowReadonly:()=>Qr,shallowRef:()=>pt,ssrContextKey:()=>Wu,ssrUtils:()=>a0,stop:()=>Yg,toDisplayString:()=>Be,toHandlerKey:()=>_s,toHandlers:()=>Cd,toRaw:()=>Ue,toRef:()=>Ga,toRefs:()=>Mt,toValue:()=>Re,transformVNodeArgs:()=>Km,triggerRef:()=>qu,unref:()=>f,useAttrs:()=>gm,useCssModule:()=>$0,useCssVars:()=>v0,useHost:()=>Mf,useId:()=>ld,useModel:()=>Em,useSSRContext:()=>Gu,useShadowRoot:()=>R0,useSlots:()=>hm,useTemplateRef:()=>Lv,useTransitionState:()=>el,vModelCheckbox:()=>Ol,vModelDynamic:()=>Wf,vModelRadio:()=>Hl,vModelSelect:()=>Uf,vModelText:()=>Ii,vShow:()=>qo,version:()=>cf,warn:()=>n0,watch:()=>Me,watchEffect:()=>ct,watchPostEffect:()=>Ya,watchSyncEffect:()=>Ju,withAsyncContext:()=>wm,withCtx:()=>I,withDefaults:()=>pm,withDirectives:()=>mo,withKeys:()=>Ml,withMemo:()=>r0,withModifiers:()=>Xt,withScopeId:()=>Hv},1),K0=()=>{},W0=2;const Rr={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},G0=(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,W0);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(Rr.CALL_HISTORY)||p.createObjectStore(Rr.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains(Rr.CONTACTS)||p.createObjectStore(Rr.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains(Rr.CONNECTIONS)||p.createObjectStore(Rr.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}},J0=e=>{const t=F(e?.initialConnected??!1),r=F(0),n=F(null),s=F([]),i=F([]),{initDB:o,getAll:a,add:l}=G0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a(Rr.CALL_HISTORY)).sort((z,ce)=>ce.startTime-z.startTime),i.value=await a(Rr.CONTACTS)}catch(z){console.error("Error loading data from IndexedDB:",z)}});const u=F([{id:0,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:1,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:2,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1}]),c=F(e?.initialKeypadVisible??!0),d=F(""),p=F(!1),h=V(()=>u.value.find(z=>z.id===r.value)||u.value[0]),m=V(()=>h.value?.status||"idle"),w=V(()=>h.value?.remoteNumber||""),x=V(()=>h.value?.isMuted||!1),g=V(()=>h.value?.isHeld||!1),S=V({get:()=>h.value?.keypadValue||"",set:z=>{h.value&&(h.value.keypadValue=z)}}),b=z=>{t.value=z},y=z=>{u.value.some(ce=>ce.id===z)&&(r.value=z)},T=(z,ce)=>{const pe=u.value.find(Pe=>Pe.id===z);pe&&Object.assign(pe,ce)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:w,isMuted:x,isHeld:g,keypadValue:S,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:b,setActiveChannelId:y,updateChannelState:T,setCallStatus:z=>{T(r.value,{status:z})},setIncomingCall:z=>{T(r.value,{remoteNumber:z})},resetCall:()=>{T(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async z=>{const ce={id:crypto.randomUUID(),...z};s.value.unshift(ce);try{await l(Rr.CALL_HISTORY,ce)}catch(pe){console.error("Error saving call log:",pe)}},callHistory:s,contacts:i,addContact:async z=>{try{await l(Rr.CONTACTS,z),i.value=await a(Rr.CONTACTS)}catch(ce){console.error("Error saving contact:",ce)}},setMuted:z=>{T(r.value,{isMuted:z})},setHeld:z=>{T(r.value,{isHeld:z})},appendKeypad:z=>{S.value+=z},clearKeypad:()=>{S.value=""},backspaceKeypad:()=>{S.value=S.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:z=>{d.value=z},setTransferInProgress:z=>{n.value=z},toggleVideoMode:()=>{p.value=!p.value}}},Y0="0.21.1";var is=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},ql=class extends is{constructor(e){super(e||"Unsupported content type.")}},Bl=class extends is{constructor(e){super(e||"Request pending.")}},Z0=class extends is{constructor(e){super(e||"Unspecified session description handler error.")}},Ll=class extends is{constructor(){super("The session has terminated.")}},$i=class extends is{constructor(e){super(e||"An error occurred during state transition.")}},X0=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},Q0=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()}},ew=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},qs=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})}},tw=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()}},sp=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={}}},wr=class Ig extends sp{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 Ig(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}},In=class Rg extends sp{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 Rg(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 ip(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 Fl(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var op=class Aa 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,Aa.prototype):this.__proto__=Aa.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Aa)}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=Fl("",i.line.toString().length," "),u=n[i.line-1],c=i.line===a.line?a.column:u.length+1;r+=`
5
+ `)&&(Co(b,0)||Rs(),b.textContent=y.children)}if(q){if(R||!v||C&48){const W=b.tagName.includes("-");for(const ae in q)(R&&(ae.endsWith("value")||ae==="indeterminate")||Qs(ae)&&!Jn(ae)||ae[0]==="."||W&&!Jn(ae))&&n(b,ae,null,q[ae],void 0,T)}else if(q.onClick)n(b,"onClick",null,q.onClick,void 0,T);else if(C&4&&tn(q.style))for(const W in q.style)q.style[W]}let G;(G=q&&q.onVnodeBeforeMount)&&Zt(G,T,y),E&&qr(y,null,T,"beforeMount"),((G=q&&q.onVnodeMounted)||E||D)&&tf(()=>{G&&Zt(G,T,y),D&&P.enter(b),E&&qr(y,null,T,"mounted")},k)}return b.nextSibling},h=(b,y,T,k,N,v,B)=>{B=B||!!y.dynamicChildren;const q=y.children,C=q.length;for(let _=0;_<C;_++){const E=B?q[_]:q[_]=Yt(q[_]),P=E.type===Tn;b?(P&&!B&&_+1<C&&Yt(q[_+1]).type===Tn&&(l(s(b.data.slice(E.children.length)),T,i(b)),b.data=E.children),b=d(b,E,k,N,v,B)):P&&!E.children?l(E.el=s(""),T):(Co(T,1)||Rs(),r(null,E,T,null,k,N,So(T),v))}return b},m=(b,y,T,k,N,v)=>{const{slotScopeIds:B}=y;B&&(N=N?N.concat(B):B);const q=o(b),C=h(i(b),y,q,T,k,N,v);return C&&$s(C)&&C.data==="]"?i(y.anchor=C):(Rs(),l(y.anchor=u("]"),q,C),C)},w=(b,y,T,k,N,v)=>{if(Co(b.parentElement,1)||Rs(),y.el=null,v){const C=x(b);for(;;){const _=i(b);if(_&&_!==C)a(_);else break}}const B=i(b),q=o(b);return a(b),r(null,y,q,B,T,k,So(q),N),T&&(T.vnode.el=y.el,Ro(T,y.el)),B},x=(b,y="[",T="]")=>{let k=0;for(;b;)if(b=i(b),b&&$s(b)&&(b.data===y&&k++,b.data===T)){if(k===0)return i(b);k--}return b},g=(b,y,T)=>{const k=y.parentNode;k&&k.replaceChild(b,y);let N=T;for(;N;)N.vnode.el===y&&(N.vnode.el=N.subTree.el=b),N=N.parent},S=b=>b.nodeType===1&&b.tagName==="TEMPLATE";return[c,d]}var gd="data-allow-mismatch",Wv={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Co(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(gd);)e=e.parentElement;const r=e&&e.getAttribute(gd);if(r==null)return!1;if(r==="")return!0;{const n=r.split(",");return t===0&&n.includes("children")?!0:n.includes(Wv[t])}}var Gv=eo().requestIdleCallback||(e=>setTimeout(e,1)),Jv=eo().cancelIdleCallback||(e=>clearTimeout(e)),Yv=(e=1e4)=>t=>{const r=Gv(t,{timeout:e});return()=>Jv(r)};function Zv(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 Xv=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(Zv(s))return t(),n.disconnect(),!1;n.observe(s)}}),()=>n.disconnect()},Qv=e=>t=>{if(e){const r=matchMedia(e);if(r.matches)t();else return r.addEventListener("change",t,{once:!0}),()=>r.removeEventListener("change",t)}},em=(e=[])=>(t,r)=>{it(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 tm(e,t){if($s(e)&&e.data==="["){let r=1,n=e.nextSibling;for(;n;){if(n.nodeType===1){if(t(n)===!1)break}else if($s(n))if(n.data==="]"){if(--r===0)break}else n.data==="["&&r++;n=n.nextSibling}}else t(e)}var sn=e=>!!e.type.__asyncLoader;function rm(e){De(e)&&(e={loader:e});const{loader:t,loadingComponent:r,errorComponent:n,delay:s=200,hydrate:i,timeout:o,suspensible:a=!0,onError:l}=e;let u=null,c,d=0;const p=()=>(d++,u=null,h()),h=()=>{let m;return u||(m=u=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),l)return new Promise((x,g)=>{l(w,()=>x(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,x){let g=!1;(w.bu||(w.bu=[])).push(()=>g=!0);const S=()=>{g||x()},b=i?()=>{const y=i(S,T=>tm(m,T));y&&(w.bum||(w.bum=[])).push(y)}:S;c?b():h().then(()=>!w.isUnmounted&&b())},get __asyncResolved(){return c},setup(){const m=Rt;if(il(m),c)return()=>xo(c,m);const w=b=>{u=null,Zn(b,m,13,!n)};if(a&&m.suspense||Os)return h().then(b=>()=>xo(b,m)).catch(b=>(w(b),()=>n?O(n,{error:b}):null));const x=F(!1),g=F(),S=F(!!s);return s&&setTimeout(()=>{S.value=!1},s),o!=null&&setTimeout(()=>{if(!x.value&&!g.value){const b=new Error(`Async component timed out after ${o}ms.`);w(b),g.value=b}},o),h().then(()=>{x.value=!0,m.parent&&gi(m.parent.vnode)&&m.parent.update()}).catch(b=>{w(b),g.value=b}),()=>{if(x.value&&c)return xo(c,m);if(g.value&&n)return O(n,{error:g.value});if(r&&!S.value)return xo(r,m)}}})}function xo(e,t){const{ref:r,props:n,children:s,ce:i}=t.vnode,o=O(e,n,s);return o.ref=r,o.ce=i,delete t.vnode.ce,o}var gi=e=>e.type.__isKeepAlive,nm={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const r=gt(),n=r.ctx;if(!n.renderer)return()=>{const S=t.default&&t.default();return S&&S.length===1?S[0]:S};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=(S,b,y,T,k)=>{const N=S.component;u(S,b,y,0,a),l(N.vnode,S,b,y,N,a,T,S.slotScopeIds,k),wt(()=>{N.isDeactivated=!1,N.a&&_s(N.a);const v=S.props&&S.props.onVnodeMounted;v&&Zt(v,N.parent,S)},a)},n.deactivate=S=>{const b=S.component;$o(b.m),$o(b.a),u(S,p,null,1,a),wt(()=>{b.da&&_s(b.da);const y=S.props&&S.props.onVnodeUnmounted;y&&Zt(y,b.parent,S),b.isDeactivated=!0},a)};function h(S){ol(S),c(S,r,a,!0)}function m(S){s.forEach((b,y)=>{const T=kl(sn(b)?b.type.__asyncResolved||{}:b.type);T&&!S(T)&&w(y)})}function w(S){const b=s.get(S);b&&(!o||!Ir(b,o))?h(b):o&&ol(o),s.delete(S),i.delete(S)}Me(()=>[e.include,e.exclude],([S,b])=>{S&&m(y=>vi(S,y)),b&&m(y=>!vi(b,y))},{flush:"post",deep:!0});let x=null;const g=()=>{x!=null&&(Po(r.subTree.type)?wt(()=>{s.set(x,To(r.subTree))},r.subTree.suspense):s.set(x,To(r.subTree)))};return tt(g),mi(g),Ps(()=>{s.forEach(S=>{const{subTree:b,suspense:y}=r,T=To(b);if(S.type===T.type&&S.key===T.key){ol(T);const k=T.component.da;k&&wt(k,y);return}h(S)})}),()=>{if(x=null,!t.default)return o=null;const S=t.default(),b=S[0];if(S.length>1)return o=null,S;if(!an(b)||!(b.shapeFlag&4)&&!(b.shapeFlag&128))return o=null,b;let y=To(b);if(y.type===ht)return o=null,y;const T=y.type,k=kl(sn(y)?y.type.__asyncResolved||{}:T),{include:N,exclude:v,max:B}=e;if(N&&(!k||!vi(N,k))||v&&k&&vi(v,k))return y.shapeFlag&=-257,o=y,b;const q=y.key==null?T:y.key,C=s.get(q);return y.el&&(y=Rr(y),b.shapeFlag&128&&(b.ssContent=y)),x=q,C?(y.el=C.el,y.component=C.component,y.transition&&nn(y,y.transition),y.shapeFlag|=512,i.delete(q),i.add(q)):(i.add(q),B&&i.size>parseInt(B,10)&&w(i.values().next().value)),y.shapeFlag|=256,o=y,Po(b.type)?b:y}}};function vi(e,t){return _e(e)?e.some(r=>vi(r,t)):it(e)?e.split(",").includes(t):Bg(e)?(e.lastIndex=0,e.test(t)):!1}function vd(e,t){wd(e,"a",t)}function md(e,t){wd(e,"da",t)}function wd(e,t,r=Rt){const n=e.__wdc||(e.__wdc=()=>{let s=r;for(;s;){if(s.isDeactivated)return;s=s.parent}return e()});if(Eo(t,n,r),r){let s=r.parent;for(;s&&s.parent;)gi(s.parent.vnode)&&sm(n,t,r,s),s=s.parent}}function sm(e,t,r,n){const s=Eo(t,e,n,!0);Vt(()=>{Da(n[t],s)},r)}function ol(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function To(e){return e.shapeFlag&128?e.ssContent:e}function Eo(e,t,r=Rt,n=!1){if(r){const s=r[e]||(r[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Jr();const a=ns(r),l=hr(t,r,e,o);return a(),Yr(),l});return n?s.unshift(i):s.push(i),i}}var on=e=>(t,r=Rt)=>{(!Os||e==="sp")&&Eo(e,(...n)=>t(...n),r)},yd=on("bm"),tt=on("m"),al=on("bu"),mi=on("u"),Ps=on("bum"),Vt=on("um"),bd=on("sp"),_d=on("rtg"),Sd=on("rtc");function Cd(e,t=Rt){Eo("ec",e,t)}var ll="components",im="directives";function om(e,t){return cl(ll,e,!0,t)||e}var xd=Symbol.for("v-ndc");function wi(e){return it(e)?cl(ll,e,!1)||e:e||xd}function am(e){return cl(im,e)}function cl(e,t,r=!0,n=!1){const s=It||Rt;if(s){const i=s.type;if(e===ll){const a=kl(i,!1);if(a&&(a===t||a===_t(t)||a===ei(_t(t))))return i}const o=Td(s[e]||i[e],t)||Td(s.appContext[e],t);return!o&&n?i:o}}function Td(e,t){return e&&(e[t]||e[_t(t)]||e[ei(_t(t))])}function vr(e,t,r,n){let s;const i=r&&r[n],o=_e(e);if(o||it(e)){const a=o&&tn(e);let l=!1,u=!1;a&&(l=!Jt(e),u=Mr(e),e=io(e)),s=new Array(e.length);for(let c=0,d=e.length;c<d;c++)s[c]=t(l?u?Cs(kr(e[c])):kr(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(Ge(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 lm(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 ne(e,t,r={},n,s){if(It.ce||It.parent&&sn(It.parent)&&It.parent.ce){const u=Object.keys(r).length>0;return t!=="default"&&(r.name=t),$(),U(Ke,null,[O("slot",r,n&&n())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),$();const o=i&&ul(i(r)),a=r.key||o&&o.key,l=U(Ke,{key:(a&&!Er(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 ul(e){return e.some(t=>an(t)?!(t.type===ht||t.type===Ke&&!ul(t.children)):!0)?e:null}function Ed(e,t){const r={};for(const n in e)r[t&&/[A-Z]/.test(n)?`on:${n}`:bs(n)]=e[n];return r}var dl=e=>e?af(e)?Ti(e):dl(e.parent):null,yi=Qe(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=>dl(e.parent),$root:e=>dl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>gl(e),$forceUpdate:e=>e.f||(e.f=()=>{Za(e.update)}),$nextTick:e=>e.n||(e.n=Et.bind(e.proxy)),$watch:e=>Lv.bind(e)}),fl=(e,t)=>e!==Ue&&!e.__isScriptSetup&&Ye(e,t),pl={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(fl(n,t))return o[t]=1,n[t];if(s!==Ue&&Ye(s,t))return o[t]=2,s[t];if(Ye(i,t))return o[t]=3,i[t];if(r!==Ue&&Ye(r,t))return o[t]=4,r[t];hl&&(o[t]=0)}}const u=yi[t];let c,d;if(u)return t==="$attrs"&&Ot(e.attrs,"get",""),u(e);if((c=a.__cssModules)&&(c=c[t]))return c;if(r!==Ue&&Ye(r,t))return o[t]=4,r[t];if(d=l.config.globalProperties,Ye(d,t))return d[t]},set({_:e},t,r){const{data:n,setupState:s,ctx:i}=e;return fl(s,t)?(s[t]=r,!0):n!==Ue&&Ye(n,t)?(n[t]=r,!0):Ye(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]!=="$"&&Ye(e,a)||fl(t,a)||Ye(i,a)||Ye(n,a)||Ye(yi,a)||Ye(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(e,t,r){return r.get!=null?e._.accessCache[t]=0:Ye(r,"value")&&this.set(e,t,r.value,null),Reflect.defineProperty(e,t,r)}},cm=Qe({},pl,{get(e,t){if(t!==Symbol.unscopables)return pl.get(e,t,e)},has(e,t){return t[0]!=="_"&&!jg(t)}});function um(){return null}function dm(){return null}function fm(e){}function pm(e){}function hm(){return null}function gm(){}function vm(e,t){return null}function mm(){return Ad("useSlots").slots}function wm(){return Ad("useAttrs").attrs}function Ad(e){const t=gt();return t.setupContext||(t.setupContext=uf(t))}function bi(e){return _e(e)?e.reduce((t,r)=>(t[r]=null,t),{}):e}function kd(e,t){const r=bi(e);for(const n in t){if(n.startsWith("__skip"))continue;let s=r[n];s?_e(s)||De(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 ym(e,t){return!e||!t?e||t:_e(e)&&_e(t)?e.concat(t):Qe({},bi(e),bi(t))}function bm(e,t){const r={};for(const n in e)t.includes(n)||Object.defineProperty(r,n,{enumerable:!0,get:()=>e[n]});return r}function _m(e){const t=gt();let r=e();Ho();const n=()=>{gt()!==t&&t.scope.off(),Ho()};return Oa(r)&&(r=r.catch(s=>{throw ns(t),Promise.resolve().then(()=>Promise.resolve().then(n)),s})),[r,()=>{ns(t),Promise.resolve().then(n)}]}var hl=!0;function Sm(e){const t=gl(e),r=e.proxy,n=e.ctx;hl=!1,t.beforeCreate&&Id(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:p,beforeUpdate:h,updated:m,activated:w,deactivated:x,beforeDestroy:g,beforeUnmount:S,destroyed:b,unmounted:y,render:T,renderTracked:k,renderTriggered:N,errorCaptured:v,serverPrefetch:B,expose:q,inheritAttrs:C,components:_,directives:E,filters:P}=t;if(u&&Cm(u,n,null),o)for(const G in o){const W=o[G];De(W)&&(n[G]=W.bind(r))}if(s){const G=s.call(r,r);Ge(G)&&(e.data=Qr(G))}if(hl=!0,i)for(const G in i){const W=i[G],ae=V({get:De(W)?W.bind(r,r):De(W.get)?W.get.bind(r,r):fr,set:!De(W)&&De(W.set)?W.set.bind(r):fr});Object.defineProperty(n,G,{enumerable:!0,configurable:!0,get:()=>ae.value,set:Y=>ae.value=Y})}if(a)for(const G in a)Rd(a[G],n,r,G);if(l){const G=De(l)?l.call(r):l;Reflect.ownKeys(G).forEach(W=>{Xn(W,G[W])})}c&&Id(c,e,"c");function D(G,W){_e(W)?W.forEach(ae=>G(ae.bind(r))):W&&G(W.bind(r))}if(D(yd,d),D(tt,p),D(al,h),D(mi,m),D(vd,w),D(md,x),D(Cd,v),D(Sd,k),D(_d,N),D(Ps,S),D(Vt,y),D(bd,B),_e(q))if(q.length){const G=e.exposed||(e.exposed={});q.forEach(W=>{Object.defineProperty(G,W,{get:()=>r[W],set:ae=>r[W]=ae,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===fr&&(e.render=T),C!=null&&(e.inheritAttrs=C),_&&(e.components=_),E&&(e.directives=E),B&&il(e)}function Cm(e,t,r=fr){_e(e)&&(e=vl(e));for(const n in e){const s=e[n];let i;Ge(s)?"default"in s?i=Ft(s.from||n,s.default,!0):i=Ft(s.from||n):i=Ft(s),rt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[n]=i}}function Id(e,t,r){hr(_e(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,r)}function Rd(e,t,r,n){let s=n.includes(".")?Qu(r,n):()=>r[n];if(it(e)){const i=t[e];De(i)&&Me(s,i)}else if(De(e))Me(s,e.bind(r));else if(Ge(e))if(_e(e))e.forEach(i=>Rd(i,t,r,n));else{const i=De(e.handler)?e.handler.bind(r):t[e.handler];De(i)&&Me(s,i,e)}}function gl(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=>Ao(l,u,o,!0)),Ao(l,t,o)),Ge(t)&&i.set(t,l),l}function Ao(e,t,r,n=!1){const{mixins:s,extends:i}=t;i&&Ao(e,i,r,!0),s&&s.forEach(o=>Ao(e,o,r,!0));for(const o in t)if(!(n&&o==="expose")){const a=xm[o]||r&&r[o];e[o]=a?a(e[o],t[o]):t[o]}return e}var xm={data:$d,props:Pd,emits:Pd,methods:_i,computed:_i,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:_i,directives:_i,watch:Em,provide:$d,inject:Tm};function $d(e,t){return t?e?function(){return Qe(De(e)?e.call(this,this):e,De(t)?t.call(this,this):t)}:t:e}function Tm(e,t){return _i(vl(e),vl(t))}function vl(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 _i(e,t){return e?Qe(Object.create(null),e,t):t}function Pd(e,t){return e?_e(e)&&_e(t)?[...new Set([...e,...t])]:Qe(Object.create(null),bi(e),bi(t??{})):t}function Em(e,t){if(!e)return t;if(!t)return e;const r=Qe(Object.create(null),e);for(const n in t)r[n]=jt(e[n],t[n]);return r}function Dd(){return{app:null,config:{isNativeTag:pu,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 km(e,t){return function(n,s=null){De(n)||(n=Qe({},n)),s!=null&&!Ge(s)&&(s=null);const i=Dd(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:Am++,_component:n,_props:s,_container:null,_context:i,_instance:null,version:ff,get config(){return i.config},set config(c){},use(c,...d){return o.has(c)||(c&&De(c.install)?(o.add(c),c.install(u,...d)):De(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||O(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,Ti(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(hr(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=Qn;Qn=u;try{return c()}finally{Qn=d}}};return u}}var Qn=null;function Im(e,t,r=Ue){const n=gt(),s=_t(t),i=Gt(t),o=Od(e,s),a=li((l,u)=>{let c,d=Ue,p;return Xu(()=>{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 Od=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${_t(t)}Modifiers`]||e[`${Gt(t)}Modifiers`];function Rm(e,t,...r){if(e.isUnmounted)return;const n=e.vnode.props||Ue;let s=r;const i=t.startsWith("update:"),o=i&&Od(n,t.slice(7));o&&(o.trim&&(s=r.map(c=>it(c)?c.trim():c)),o.number&&(s=r.map(Xi)));let a,l=n[a=bs(t)]||n[a=bs(_t(t))];!l&&i&&(l=n[a=bs(Gt(t))]),l&&hr(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,hr(u,e,6,s)}}var $m=new WeakMap;function Hd(e,t,r=!1){const n=r?$m:t.emitsCache,s=n.get(e);if(s!==void 0)return s;const i=e.emits;let o={},a=!1;if(!De(e)){const l=u=>{const c=Hd(u,t,!0);c&&(a=!0,Qe(o,c))};!r&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!a?(Ge(e)&&n.set(e,null),null):(_e(i)?i.forEach(l=>o[l]=null):Qe(o,i),Ge(e)&&n.set(e,o),o)}function ko(e,t){return!e||!Qs(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ye(e,t[0].toLowerCase()+t.slice(1))||Ye(e,Gt(t))||Ye(e,t))}function Io(e){const{type:t,vnode:r,proxy:n,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:d,data:p,setupState:h,ctx:m,inheritAttrs:w}=e,x=di(e);let g,S;try{if(r.shapeFlag&4){const y=s||n,T=y;g=Yt(u.call(T,y,c,d,h,p,m)),S=a}else{const y=t;g=Yt(y.length>1?y(d,{attrs:a,slots:o,emit:l}):y(d,null)),S=t.props?a:Dm(a)}}catch(y){Ci.length=0,Zn(y,e,1),g=O(ht)}let b=g;if(S&&w!==!1){const y=Object.keys(S),{shapeFlag:T}=b;y.length&&T&7&&(i&&y.some(Pa)&&(S=Om(S,i)),b=Rr(b,S,!1,!0))}return r.dirs&&(b=Rr(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(r.dirs):r.dirs),r.transition&&nn(b,r.transition),g=b,di(x),g}function Pm(e,t=!0){let r;for(let n=0;n<e.length;n++){const s=e[n];if(an(s)){if(s.type!==ht||s.children==="v-if"){if(r)return;r=s}}else return}return r}var Dm=e=>{let t;for(const r in e)(r==="class"||r==="style"||Qs(r))&&((t||(t={}))[r]=e[r]);return t},Om=(e,t)=>{const r={};for(const n in e)(!Pa(n)||!(n.slice(9)in t))&&(r[n]=e[n]);return r};function Hm(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?Md(n,o,u):!!o;if(l&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const p=c[d];if(Nd(o,n,p)&&!ko(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:n===o?!1:n?o?Md(n,o,u):!0:!!o;return!1}function Md(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(Nd(t,e,i)&&!ko(r,i))return!0}return!1}function Nd(e,t,r){const n=e[r],s=t[r];return r==="style"&&Ge(n)&&Ge(s)?!Gr(n,s):n!==s}function Ro({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 qd={},Bd=()=>Object.create(qd),Ld=e=>Object.getPrototypeOf(e)===qd;function Mm(e,t,r,n=!1){const s={},i=Bd();e.propsDefaults=Object.create(null),Fd(e,t,s,i);for(const o in e.propsOptions[0])o in s||(s[o]=void 0);r?e.props=n?s:Bu(s):e.type.props?e.props=s:e.props=i,e.attrs=i}function Nm(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(ko(e.emitsOptions,p))continue;const h=t[p];if(l)if(Ye(i,p))h!==i[p]&&(i[p]=h,u=!0);else{const m=_t(p);s[m]=ml(l,a,m,h,e,!1)}else h!==i[p]&&(i[p]=h,u=!0)}}}else{Fd(e,t,s,i)&&(u=!0);let c;for(const d in a)(!t||!Ye(t,d)&&((c=Gt(d))===d||!Ye(t,c)))&&(l?r&&(r[d]!==void 0||r[c]!==void 0)&&(s[d]=ml(l,a,d,void 0,e,!0)):delete s[d]);if(i!==a)for(const d in i)(!t||!Ye(t,d))&&(delete i[d],u=!0)}u&&Zr(e.attrs,"set","")}function Fd(e,t,r,n){const[s,i]=e.propsOptions;let o=!1,a;if(t)for(let l in t){if(Jn(l))continue;const u=t[l];let c;s&&Ye(s,c=_t(l))?!i||!i.includes(c)?r[c]=u:(a||(a={}))[c]=u:ko(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]=ml(s,l,d,u[d],e,!Ye(u,d))}}return o}function ml(e,t,r,n,s,i){const o=e[r];if(o!=null){const a=Ye(o,"default");if(a&&n===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&De(l)){const{propsDefaults:u}=s;if(r in u)n=u[r];else{const c=ns(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===Gt(r))&&(n=!0))}return n}var qm=new WeakMap;function Vd(e,t,r=!1){const n=r?qm:t.propsCache,s=n.get(e);if(s)return s;const i=e.props,o={},a=[];let l=!1;if(!De(e)){const c=d=>{l=!0;const[p,h]=Vd(d,t,!0);Qe(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 Ge(e)&&n.set(e,ms),ms;if(_e(i))for(let c=0;c<i.length;c++){const d=_t(i[c]);jd(d)&&(o[d]=Ue)}else if(i)for(const c in i){const d=_t(c);if(jd(d)){const p=i[c],h=o[d]=_e(p)||De(p)?{type:p}:Qe({},p),m=h.type;let w=!1,x=!0;if(_e(m))for(let g=0;g<m.length;++g){const S=m[g],b=De(S)&&S.name;if(b==="Boolean"){w=!0;break}else b==="String"&&(x=!1)}else w=De(m)&&m.name==="Boolean";h[0]=w,h[1]=x,(w||Ye(h,"default"))&&a.push(d)}}const u=[o,a];return Ge(e)&&n.set(e,u),u}function jd(e){return e[0]!=="$"&&!Jn(e)}var wl=e=>e==="_"||e==="_ctx"||e==="$stable",yl=e=>_e(e)?e.map(Yt):[Yt(e)],Bm=(e,t,r)=>{if(t._n)return t;const n=I((...s)=>yl(t(...s)),r);return n._c=!1,n},Ud=(e,t,r)=>{const n=e._ctx;for(const s in e){if(wl(s))continue;const i=e[s];if(De(i))t[s]=Bm(s,i,n);else if(i!=null){const o=yl(i);t[s]=()=>o}}},zd=(e,t)=>{const r=yl(t);e.slots.default=()=>r},Kd=(e,t,r)=>{for(const n in t)(r||!wl(n))&&(e[n]=t[n])},Lm=(e,t,r)=>{const n=e.slots=Bd();if(e.vnode.shapeFlag&32){const s=t._;s?(Kd(n,t,r),r&&vu(n,"_",s,!0)):Ud(t,n)}else t&&zd(e,t)},Fm=(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:Kd(s,t,r):(i=!t.$stable,Ud(t,s)),o=t}else t&&(zd(e,t),o={default:1});if(i)for(const a in s)!wl(a)&&o[a]==null&&delete s[a]};function sT(){}var wt=tf;function Wd(e){return Jd(e)}function Gd(e){return Jd(e,Kv)}function Jd(e,t){const r=eo();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=fr,insertStaticContent:m}=e,w=(A,H,J,se=null,re=null,ee=null,fe=void 0,de=null,ue=!!H.dynamicChildren)=>{if(A===H)return;A&&!Ir(A,H)&&(se=Xe(A),pe(A,re,ee,!0),A=null),H.patchFlag===-2&&(ue=!1,H.dynamicChildren=null);const{type:ie,ref:Re,shapeFlag:ge}=H;switch(ie){case Tn:x(A,H,J,se);break;case ht:g(A,H,J,se);break;case ts:A==null&&S(H,J,se,fe);break;case Ke:_(A,H,J,se,re,ee,fe,de,ue);break;default:ge&1?T(A,H,J,se,re,ee,fe,de,ue):ge&6?E(A,H,J,se,re,ee,fe,de,ue):(ge&64||ge&128)&&ie.process(A,H,J,se,re,ee,fe,de,ue,at)}Re!=null&&re?Is(Re,A&&A.ref,ee,H||A,!H):Re==null&&A&&A.ref!=null&&Is(A.ref,null,ee,A,!0)},x=(A,H,J,se)=>{if(A==null)n(H.el=a(H.children),J,se);else{const re=H.el=A.el;H.children!==A.children&&u(re,H.children)}},g=(A,H,J,se)=>{A==null?n(H.el=l(H.children||""),J,se):H.el=A.el},S=(A,H,J,se)=>{[A.el,A.anchor]=m(A.children,H,J,se,A.el,A.anchor)},b=({el:A,anchor:H},J,se)=>{let re;for(;A&&A!==H;)re=p(A),n(A,J,se),A=re;n(H,J,se)},y=({el:A,anchor:H})=>{let J;for(;A&&A!==H;)J=p(A),s(A),A=J;s(H)},T=(A,H,J,se,re,ee,fe,de,ue)=>{if(H.type==="svg"?fe="svg":H.type==="math"&&(fe="mathml"),A==null)k(H,J,se,re,ee,fe,de,ue);else{const ie=A.el&&A.el._isVueCE?A.el:null;try{ie&&ie._beginPatch(),B(A,H,re,ee,fe,de,ue)}finally{ie&&ie._endPatch()}}},k=(A,H,J,se,re,ee,fe,de)=>{let ue,ie;const{props:Re,shapeFlag:ge,transition:Te,dirs:He}=A;if(ue=A.el=o(A.type,ee,Re&&Re.is,Re),ge&8?c(ue,A.children):ge&16&&v(A.children,ue,null,se,re,bl(A,ee),fe,de),He&&qr(A,null,se,"created"),N(ue,A,A.scopeId,fe,se),Re){for(const Z in Re)Z!=="value"&&!Jn(Z)&&i(ue,Z,null,Re[Z],ee,se);"value"in Re&&i(ue,"value",null,Re.value,ee),(ie=Re.onVnodeBeforeMount)&&Zt(ie,se,A)}He&&qr(A,null,se,"beforeMount");const Ve=Yd(re,Te);Ve&&Te.beforeEnter(ue),n(ue,H,J),((ie=Re&&Re.onVnodeMounted)||Ve||He)&&wt(()=>{ie&&Zt(ie,se,A),Ve&&Te.enter(ue),He&&qr(A,null,se,"mounted")},re)},N=(A,H,J,se,re)=>{if(J&&h(A,J),se)for(let ee=0;ee<se.length;ee++)h(A,se[ee]);if(re){let ee=re.subTree;if(H===ee||Po(ee.type)&&(ee.ssContent===H||ee.ssFallback===H)){const fe=re.vnode;N(A,fe,fe.scopeId,fe.slotScopeIds,re.parent)}}},v=(A,H,J,se,re,ee,fe,de,ue=0)=>{for(let ie=ue;ie<A.length;ie++)w(null,A[ie]=de?ln(A[ie]):Yt(A[ie]),H,J,se,re,ee,fe,de)},B=(A,H,J,se,re,ee,fe)=>{const de=H.el=A.el;let{patchFlag:ue,dynamicChildren:ie,dirs:Re}=H;ue|=A.patchFlag&16;const ge=A.props||Ue,Te=H.props||Ue;let He;if(J&&es(J,!1),(He=Te.onVnodeBeforeUpdate)&&Zt(He,J,H,A),Re&&qr(H,A,J,"beforeUpdate"),J&&es(J,!0),(ge.innerHTML&&Te.innerHTML==null||ge.textContent&&Te.textContent==null)&&c(de,""),ie?q(A.dynamicChildren,ie,de,J,se,bl(H,re),ee):fe||W(A,H,de,null,J,se,bl(H,re),ee,!1),ue>0){if(ue&16)C(de,ge,Te,J,re);else if(ue&2&&ge.class!==Te.class&&i(de,"class",null,Te.class,re),ue&4&&i(de,"style",ge.style,Te.style,re),ue&8){const Ve=H.dynamicProps;for(let Z=0;Z<Ve.length;Z++){const ce=Ve[Z],he=ge[ce],st=Te[ce];(st!==he||ce==="value")&&i(de,ce,he,st,re,J)}}ue&1&&A.children!==H.children&&c(de,H.children)}else!fe&&ie==null&&C(de,ge,Te,J,re);((He=Te.onVnodeUpdated)||Re)&&wt(()=>{He&&Zt(He,J,H,A),Re&&qr(H,A,J,"updated")},se)},q=(A,H,J,se,re,ee,fe)=>{for(let de=0;de<H.length;de++){const ue=A[de],ie=H[de];w(ue,ie,ue.el&&(ue.type===Ke||!Ir(ue,ie)||ue.shapeFlag&198)?d(ue.el):J,null,se,re,ee,fe,!0)}},C=(A,H,J,se,re)=>{if(H!==J){if(H!==Ue)for(const ee in H)!Jn(ee)&&!(ee in J)&&i(A,ee,H[ee],null,re,se);for(const ee in J){if(Jn(ee))continue;const fe=J[ee],de=H[ee];fe!==de&&ee!=="value"&&i(A,ee,de,fe,re,se)}"value"in J&&i(A,"value",H.value,J.value,re)}},_=(A,H,J,se,re,ee,fe,de,ue)=>{const ie=H.el=A?A.el:a(""),Re=H.anchor=A?A.anchor:a("");let{patchFlag:ge,dynamicChildren:Te,slotScopeIds:He}=H;He&&(de=de?de.concat(He):He),A==null?(n(ie,J,se),n(Re,J,se),v(H.children||[],J,Re,re,ee,fe,de,ue)):ge>0&&ge&64&&Te&&A.dynamicChildren&&A.dynamicChildren.length===Te.length?(q(A.dynamicChildren,Te,J,re,ee,fe,de),(H.key!=null||re&&H===re.subTree)&&_l(A,H,!0)):W(A,H,J,Re,re,ee,fe,de,ue)},E=(A,H,J,se,re,ee,fe,de,ue)=>{H.slotScopeIds=de,A==null?H.shapeFlag&512?re.ctx.activate(H,J,se,fe,ue):P(H,J,se,re,ee,fe,ue):R(A,H,ue)},P=(A,H,J,se,re,ee,fe)=>{const de=A.component=of(A,se,re);if(gi(A)&&(de.ctx.renderer=at),lf(de,!1,fe),de.asyncDep){if(re&&re.registerDep(de,D,fe),!A.el){const ue=de.subTree=O(ht);g(null,ue,H,J),A.placeholder=ue.el}}else D(de,A,H,J,re,ee,fe)},R=(A,H,J)=>{const se=H.component=A.component;if(Hm(A,H,J))if(se.asyncDep&&!se.asyncResolved){G(se,H,J);return}else se.next=H,se.update();else H.el=A.el,se.vnode=H},D=(A,H,J,se,re,ee,fe)=>{const de=()=>{if(A.isMounted){let{next:ge,bu:Te,u:He,parent:Ve,vnode:Z}=A;{const Kt=Zd(A);if(Kt){ge&&(ge.el=Z.el,G(A,ge,fe)),Kt.asyncDep.then(()=>{wt(()=>{A.isUnmounted||ie()},re)});return}}let ce=ge,he;es(A,!1),ge?(ge.el=Z.el,G(A,ge,fe)):ge=Z,Te&&_s(Te),(he=ge.props&&ge.props.onVnodeBeforeUpdate)&&Zt(he,Ve,ge,Z),es(A,!0);const st=Io(A),ur=A.subTree;A.subTree=st,w(ur,st,d(ur.el),Xe(ur),A,re,ee),ge.el=st.el,ce===null&&Ro(A,st.el),He&&wt(He,re),(he=ge.props&&ge.props.onVnodeUpdated)&&wt(()=>Zt(he,Ve,ge,Z),re)}else{let ge;const{el:Te,props:He}=H,{bm:Ve,m:Z,parent:ce,root:he,type:st}=A,ur=sn(H);if(es(A,!1),Ve&&_s(Ve),!ur&&(ge=He&&He.onVnodeBeforeMount)&&Zt(ge,ce,H),es(A,!0),Te&&Tt){const Kt=()=>{A.subTree=Io(A),Tt(Te,A.subTree,A,re,null)};ur&&st.__asyncHydrate?st.__asyncHydrate(Te,A,Kt):Kt()}else{he.ce&&he.ce._hasShadowRoot()&&he.ce._injectChildStyle(st);const Kt=A.subTree=Io(A);w(null,Kt,J,se,A,re,ee),H.el=Kt.el}if(Z&&wt(Z,re),!ur&&(ge=He&&He.onVnodeMounted)){const Kt=H;wt(()=>Zt(ge,ce,Kt),re)}(H.shapeFlag&256||ce&&sn(ce.vnode)&&ce.vnode.shapeFlag&256)&&A.a&&wt(A.a,re),A.isMounted=!0,H=J=se=null}};A.scope.on();const ue=A.effect=new ti(de);A.scope.off();const ie=A.update=ue.run.bind(ue),Re=A.job=ue.runIfDirty.bind(ue);Re.i=A,Re.id=A.uid,ue.scheduler=()=>Za(Re),es(A,!0),ie()},G=(A,H,J)=>{H.component=A;const se=A.vnode.props;A.vnode=H,A.next=null,Nm(A,H.props,se,J),Fm(A,H.children,J),Jr(),Wu(A),Yr()},W=(A,H,J,se,re,ee,fe,de,ue=!1)=>{const ie=A&&A.children,Re=A?A.shapeFlag:0,ge=H.children,{patchFlag:Te,shapeFlag:He}=H;if(Te>0){if(Te&128){Y(ie,ge,J,se,re,ee,fe,de,ue);return}else if(Te&256){ae(ie,ge,J,se,re,ee,fe,de,ue);return}}He&8?(Re&16&&Oe(ie,re,ee),ge!==ie&&c(J,ge)):Re&16?He&16?Y(ie,ge,J,se,re,ee,fe,de,ue):Oe(ie,re,ee,!0):(Re&8&&c(J,""),He&16&&v(ge,J,se,re,ee,fe,de,ue))},ae=(A,H,J,se,re,ee,fe,de,ue)=>{A=A||ms,H=H||ms;const ie=A.length,Re=H.length,ge=Math.min(ie,Re);let Te;for(Te=0;Te<ge;Te++){const He=H[Te]=ue?ln(H[Te]):Yt(H[Te]);w(A[Te],He,J,null,re,ee,fe,de,ue)}ie>Re?Oe(A,re,ee,!0,!1,ge):v(H,J,se,re,ee,fe,de,ue,ge)},Y=(A,H,J,se,re,ee,fe,de,ue)=>{let ie=0;const Re=H.length;let ge=A.length-1,Te=Re-1;for(;ie<=ge&&ie<=Te;){const He=A[ie],Ve=H[ie]=ue?ln(H[ie]):Yt(H[ie]);if(Ir(He,Ve))w(He,Ve,J,null,re,ee,fe,de,ue);else break;ie++}for(;ie<=ge&&ie<=Te;){const He=A[ge],Ve=H[Te]=ue?ln(H[Te]):Yt(H[Te]);if(Ir(He,Ve))w(He,Ve,J,null,re,ee,fe,de,ue);else break;ge--,Te--}if(ie>ge){if(ie<=Te){const He=Te+1,Ve=He<Re?H[He].el:se;for(;ie<=Te;)w(null,H[ie]=ue?ln(H[ie]):Yt(H[ie]),J,Ve,re,ee,fe,de,ue),ie++}}else if(ie>Te)for(;ie<=ge;)pe(A[ie],re,ee,!0),ie++;else{const He=ie,Ve=ie,Z=new Map;for(ie=Ve;ie<=Te;ie++){const Wt=H[ie]=ue?ln(H[ie]):Yt(H[ie]);Wt.key!=null&&Z.set(Wt.key,ie)}let ce,he=0;const st=Te-Ve+1;let ur=!1,Kt=0;const dr=new Array(st);for(ie=0;ie<st;ie++)dr[ie]=0;for(ie=He;ie<=ge;ie++){const Wt=A[ie];if(he>=st){pe(Wt,re,ee,!0);continue}let Cr;if(Wt.key!=null)Cr=Z.get(Wt.key);else for(ce=Ve;ce<=Te;ce++)if(dr[ce-Ve]===0&&Ir(Wt,H[ce])){Cr=ce;break}Cr===void 0?pe(Wt,re,ee,!0):(dr[Cr-Ve]=ie+1,Cr>=Kt?Kt=Cr:ur=!0,w(Wt,H[Cr],J,null,re,ee,fe,de,ue),he++)}const Aa=ur?Vm(dr):ms;for(ce=Aa.length-1,ie=st-1;ie>=0;ie--){const Wt=Ve+ie,Cr=H[Wt],Wi=H[Wt+1],ka=Wt+1<Re?Wi.el||Xd(Wi):se;dr[ie]===0?w(null,Cr,J,ka,re,ee,fe,de,ue):ur&&(ce<0||ie!==Aa[ce]?le(Cr,J,ka,2):ce--)}}},le=(A,H,J,se,re=null)=>{const{el:ee,type:fe,transition:de,children:ue,shapeFlag:ie}=A;if(ie&6){le(A.component.subTree,H,J,se);return}if(ie&128){A.suspense.move(H,J,se);return}if(ie&64){fe.move(A,H,J,at);return}if(fe===Ke){n(ee,H,J);for(let Re=0;Re<ue.length;Re++)le(ue[Re],H,J,se);n(A.anchor,H,J);return}if(fe===ts){b(A,H,J);return}if(se!==2&&ie&1&&de)if(se===0)de.beforeEnter(ee),n(ee,H,J),wt(()=>de.enter(ee),re);else{const{leave:Re,delayLeave:ge,afterLeave:Te}=de,He=()=>{A.ctx.isUnmounted?s(ee):n(ee,H,J)},Ve=()=>{ee._isLeaving&&ee[Br](!0),Re(ee,()=>{He(),Te&&Te()})};ge?ge(ee,He,Ve):Ve()}else n(ee,H,J)},pe=(A,H,J,se=!1,re=!1)=>{const{type:ee,props:fe,ref:de,children:ue,dynamicChildren:ie,shapeFlag:Re,patchFlag:ge,dirs:Te,cacheIndex:He}=A;if(ge===-2&&(re=!1),de!=null&&(Jr(),Is(de,null,J,A,!0),Yr()),He!=null&&(H.renderCache[He]=void 0),Re&256){H.ctx.deactivate(A);return}const Ve=Re&1&&Te,Z=!sn(A);let ce;if(Z&&(ce=fe&&fe.onVnodeBeforeUnmount)&&Zt(ce,H,A),Re&6)Ie(A.component,J,se);else{if(Re&128){A.suspense.unmount(J,se);return}Ve&&qr(A,null,H,"beforeUnmount"),Re&64?A.type.remove(A,H,J,at,se):ie&&!ie.hasOnce&&(ee!==Ke||ge>0&&ge&64)?Oe(ie,H,J,!1,!0):(ee===Ke&&ge&384||!re&&Re&16)&&Oe(ue,H,J),se&&Ae(A)}(Z&&(ce=fe&&fe.onVnodeUnmounted)||Ve)&&wt(()=>{ce&&Zt(ce,H,A),Ve&&qr(A,null,H,"unmounted")},J)},Ae=A=>{const{type:H,el:J,anchor:se,transition:re}=A;if(H===Ke){je(J,se);return}if(H===ts){y(A);return}const ee=()=>{s(J),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(A.shapeFlag&1&&re&&!re.persisted){const{leave:fe,delayLeave:de}=re,ue=()=>fe(J,ee);de?de(A.el,ee,ue):ue()}else ee()},je=(A,H)=>{let J;for(;A!==H;)J=p(A),s(A),A=J;s(H)},Ie=(A,H,J)=>{const{bum:se,scope:re,job:ee,subTree:fe,um:de,m:ue,a:ie}=A;$o(ue),$o(ie),se&&_s(se),re.stop(),ee&&(ee.flags|=8,pe(fe,A,H,J)),de&&wt(de,H),wt(()=>{A.isUnmounted=!0},H)},Oe=(A,H,J,se=!1,re=!1,ee=0)=>{for(let fe=ee;fe<A.length;fe++)pe(A[fe],H,J,se,re)},Xe=A=>{if(A.shapeFlag&6)return Xe(A.component.subTree);if(A.shapeFlag&128)return A.suspense.next();const H=p(A.anchor||A.el),J=H&&H[ed];return J?p(J):H};let yt=!1;const Ne=(A,H,J)=>{let se;A==null?H._vnode&&(pe(H._vnode,null,null,!0),se=H._vnode.component):w(H._vnode||null,A,H,null,null,null,J),H._vnode=A,yt||(yt=!0,Wu(se),ho(),yt=!1)},at={p:w,um:pe,m:le,r:Ae,mt:P,mc:v,pc:W,pbc:q,n:Xe,o:e};let bt,Tt;return t&&([bt,Tt]=t(at)),{render:Ne,hydrate:bt,createApp:km(Ne,bt)}}function bl({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 es({effect:e,job:t},r){r?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Yd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function _l(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]=ln(s[i]),a.el=o.el),!r&&a.patchFlag!==-2&&_l(o,a)),a.type===Tn&&(a.patchFlag===-1&&(a=s[i]=ln(a)),a.el=o.el),a.type===ht&&!a.el&&(a.el=o.el)}}function Vm(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 Zd(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zd(t)}function $o(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Xd(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Xd(t.subTree):null}var Po=e=>e.__isSuspense,Sl=0,jm={name:"Suspense",__isSuspense:!0,process(e,t,r,n,s,i,o,a,l,u){if(e==null)Um(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}zm(e,t,r,n,s,o,a,l,u)}},hydrate:Km,normalize:Wm};function Si(e,t){const r=e.props&&e.props[t];De(r)&&r()}function Um(e,t,r,n,s,i,o,a,l){const{p:u,o:{createElement:c}}=l,d=c("div"),p=e.suspense=Qd(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?(Si(e,"onPending"),Si(e,"onFallback"),u(null,e.ssFallback,t,r,n,null,i,o),Ds(p,e.ssFallback)):p.resolve(!1,!0)}function zm(e,t,r,n,s,i,o,a,{p:l,um:u,o:{createElement:c}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:m,pendingBranch:w,isInFallback:x,isHydrating:g}=d;if(w)d.pendingBranch=p,Ir(w,p)?(l(w,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():x&&(g||(l(m,h,r,n,s,null,i,o,a),Ds(d,h)))):(d.pendingId=Sl++,g?(d.isHydrating=!1,d.activeBranch=w):u(w,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=c("div"),x?(l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0?d.resolve():(l(m,h,r,n,s,null,i,o,a),Ds(d,h))):m&&Ir(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&&Ir(m,p))l(m,p,r,n,s,d,i,o,a),Ds(d,p);else if(Si(t,"onPending"),d.pendingBranch=p,p.shapeFlag&512?d.pendingId=p.component.suspenseId:d.pendingId=Sl++,l(null,p,d.hiddenContainer,null,s,d,i,o,a),d.deps<=0)d.resolve();else{const{timeout:S,pendingId:b}=d;S>0?setTimeout(()=>{d.pendingId===b&&d.fallback(h)},S):S===0&&d.fallback(h)}}function Qd(e,t,r,n,s,i,o,a,l,u,c=!1){const{p:d,m:p,um:h,n:m,o:{parentNode:w,remove:x}}=u;let g;const S=Gm(e);S&&t&&t.pendingBranch&&(g=t.pendingId,t.deps++);const b=e.props?Qi(e.props.timeout):void 0,y=i,T={vnode:e,parent:t,parentComponent:r,namespace:o,container:n,hiddenContainer:s,deps:0,pendingId:Sl++,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!c,isHydrating:c,isUnmounted:!1,effects:[],resolve(k=!1,N=!1){const{vnode:v,activeBranch:B,pendingBranch:q,pendingId:C,effects:_,parentComponent:E,container:P,isInFallback:R}=T;let D=!1;T.isHydrating?T.isHydrating=!1:k||(D=B&&q.transition&&q.transition.mode==="out-in",D&&(B.transition.afterLeave=()=>{C===T.pendingId&&(p(q,P,i===y?m(B):i,0),ci(_),R&&v.ssFallback&&(v.ssFallback.el=null))}),B&&(w(B.el)===P&&(i=m(B)),h(B,E,T,!0),!D&&R&&v.ssFallback&&wt(()=>v.ssFallback.el=null,T)),D||p(q,P,i,0)),Ds(T,q),T.pendingBranch=null,T.isInFallback=!1;let G=T.parent,W=!1;for(;G;){if(G.pendingBranch){G.effects.push(..._),W=!0;break}G=G.parent}!W&&!D&&ci(_),T.effects=[],S&&t&&t.pendingBranch&&g===t.pendingId&&(t.deps--,t.deps===0&&!N&&t.resolve()),Si(v,"onResolve")},fallback(k){if(!T.pendingBranch)return;const{vnode:N,activeBranch:v,parentComponent:B,container:q,namespace:C}=T;Si(N,"onFallback");const _=m(v),E=()=>{T.isInFallback&&(d(null,k,q,_,B,null,C,a,l),Ds(T,k))},P=k.transition&&k.transition.mode==="out-in";P&&(v.transition.afterLeave=E),T.isInFallback=!0,h(v,B,null,!0),P||E()},move(k,N,v){T.activeBranch&&p(T.activeBranch,k,N,v),T.container=k},next(){return T.activeBranch&&m(T.activeBranch)},registerDep(k,N,v){const B=!!T.pendingBranch;B&&T.deps++;const q=k.vnode.el;k.asyncDep.catch(C=>{Zn(C,k,0)}).then(C=>{if(k.isUnmounted||T.isUnmounted||T.pendingId!==k.suspenseId)return;k.asyncResolved=!0;const{vnode:_}=k;El(k,C,!1),q&&(_.el=q);const E=!q&&k.subTree.el;N(k,_,w(q||k.subTree.el),q?null:m(k.subTree),T,o,v),E&&(_.placeholder=null,x(E)),Ro(k,_.el),B&&--T.deps===0&&T.resolve()})},unmount(k,N){T.isUnmounted=!0,T.activeBranch&&h(T.activeBranch,r,k,N),T.pendingBranch&&h(T.pendingBranch,r,k,N)}};return T}function Km(e,t,r,n,s,i,o,a,l){const u=t.suspense=Qd(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 Wm(e){const{shapeFlag:t,children:r}=e,n=t&32;e.ssContent=ef(n?r.default:r),e.ssFallback=n?ef(r.fallback):O(ht)}function ef(e){let t;if(De(e)){const r=rs&&e._c;r&&(e._d=!1,$()),e=e(),r&&(e._d=!0,t=Nt,rf())}return _e(e)&&(e=Pm(e)),e=Yt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(r=>r!==e)),e}function tf(e,t){t&&t.pendingBranch?_e(e)?t.effects.push(...e):t.effects.push(e):ci(e)}function Ds(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,Ro(n,s))}function Gm(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var Ke=Symbol.for("v-fgt"),Tn=Symbol.for("v-txt"),ht=Symbol.for("v-cmt"),ts=Symbol.for("v-stc"),Ci=[],Nt=null;function $(e=!1){Ci.push(Nt=e?null:[])}function rf(){Ci.pop(),Nt=Ci[Ci.length-1]||null}var rs=1;function xi(e,t=!1){rs+=e,e<0&&Nt&&t&&(Nt.hasOnce=!0)}function nf(e){return e.dynamicChildren=rs>0?Nt||ms:null,rf(),rs>0&&Nt&&Nt.push(e),e}function Se(e,t,r,n,s,i){return nf(Q(e,t,r,n,s,i,!0))}function U(e,t,r,n,s){return nf(O(e,t,r,n,s,!0))}function an(e){return e?e.__v_isVNode===!0:!1}function Ir(e,t){return e.type===t.type&&e.key===t.key}function Jm(e){}var sf=({key:e})=>e??null,Do=({ref:e,ref_key:t,ref_for:r})=>(typeof e=="number"&&(e=""+e),e!=null?it(e)||rt(e)||De(e)?{i:It,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&&sf(t),ref:t&&Do(t),scopeId:vo,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:It};return a?(xl(l,r),i&128&&e.normalize(l)):r&&(l.shapeFlag|=it(r)?8:16),rs>0&&!o&&Nt&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Nt.push(l),l}var O=Ym;function Ym(e,t=null,r=null,n=0,s=null,i=!1){if((!e||e===xd)&&(e=ht),an(e)){const a=Rr(e,t,!0);return r&&xl(a,r),rs>0&&!i&&Nt&&(a.shapeFlag&6?Nt[Nt.indexOf(e)]=a:Nt.push(a)),a.patchFlag=-2,a}if(n0(e)&&(e=e.__vccOpts),t){t=rr(t);let{class:a,style:l}=t;a&&!it(a)&&(t.class=et(a)),Ge(l)&&(ai(l)&&!_e(l)&&(l=Qe({},l)),t.style=St(l))}const o=it(e)?1:Po(e)?128:td(e)?64:Ge(e)?4:De(e)?2:0;return Q(e,t,r,n,s,o,i,!0)}function rr(e){return e?ai(e)||Ld(e)?Qe({},e):e:null}function Rr(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&&sf(u),ref:t&&t.ref?r&&i?_e(i)?i.concat(Do(t)):[i,Do(t)]:Do(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&&Rr(e.ssContent),ssFallback:e.ssFallback&&Rr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&nn(c,l.clone(c)),c}function qe(e=" ",t=0){return O(Tn,null,e,t)}function Cl(e,t){const r=O(ts,null,e);return r.staticCount=t,r}function Be(e="",t=!1){return t?($(),U(ht,null,e)):O(ht,null,e)}function Yt(e){return e==null||typeof e=="boolean"?O(ht):_e(e)?O(Ke,null,e.slice()):an(e)?ln(e):O(Tn,null,String(e))}function ln(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Rr(e)}function xl(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),xl(e,s()),s._c&&(s._d=!0));return}else{r=32;const s=t._;!s&&!Ld(t)?t._ctx=It:s===3&&It&&(It.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else De(t)?(t={default:t,_ctx:It},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=et([t.class,n.class]));else if(s==="style")t.style=St([t.style,n.style]);else if(Qs(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 Zt(e,t,r,n=null){hr(e,t,7,[r,n])}var Zm=Dd(),Xm=0;function of(e,t,r){const n=e.type,s=(t?t.appContext:e.appContext)||Zm,i={uid:Xm++,vnode:e,type:n,parent:t,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ma(!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:Vd(n,s),emitsOptions:Hd(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=Rm.bind(null,i),e.ce&&e.ce(i),i}var Rt=null,gt=()=>Rt||It,Oo,Tl;{const e=eo(),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)}};Oo=t("__VUE_INSTANCE_SETTERS__",r=>Rt=r),Tl=t("__VUE_SSR_SETTERS__",r=>Os=r)}var ns=e=>{const t=Rt;return Oo(e),e.scope.on(),()=>{e.scope.off(),Oo(t)}},Ho=()=>{Rt&&Rt.scope.off(),Oo(null)};function af(e){return e.vnode.shapeFlag&4}var Os=!1;function lf(e,t=!1,r=!1){t&&Tl(t);const{props:n,children:s}=e.vnode,i=af(e);Mm(e,n,i,t),Lm(e,s,r||t);const o=i?Qm(e,t):void 0;return t&&Tl(!1),o}function Qm(e,t){const r=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,pl);const{setup:n}=r;if(n){Jr();const s=e.setupContext=n.length>1?uf(e):null,i=ns(e),o=xs(n,e,0,[e.props,s]),a=Oa(o);if(Yr(),i(),(a||e.sp)&&!sn(e)&&il(e),a){if(o.then(Ho,Ho),t)return o.then(l=>{El(e,l,t)}).catch(l=>{Zn(l,e,0)});e.asyncDep=o}else El(e,o,t)}else cf(e,t)}function El(e,t,r){De(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ge(t)&&(e.setupState=Ja(t)),cf(e,r)}var Mo,Al;function e0(e){Mo=e,Al=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,cm))}}var t0=()=>!Mo;function cf(e,t,r){const n=e.type;if(!e.render){if(!t&&Mo&&!n.render){const s=n.template||gl(e).template;if(s){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:a,compilerOptions:l}=n,u=Qe(Qe({isCustomElement:i,delimiters:a},o),l);n.render=Mo(s,u)}}e.render=n.render||fr,Al&&Al(e)}{const s=ns(e);Jr();try{Sm(e)}finally{Yr(),s()}}}var r0={get(e,t){return Ot(e,"get",""),e[t]}};function uf(e){const t=r=>{e.exposed=r||{}};return{attrs:new Proxy(e.attrs,r0),slots:e.slots,emit:e.emit,expose:t}}function Ti(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ja(Ga(e.exposed)),{get(t,r){if(r in t)return t[r];if(r in yi)return yi[r](e)},has(t,r){return r in t||r in yi}})):e.proxy}function kl(e,t=!0){return De(e)?e.displayName||e.name:e.name||t&&e.__name}function n0(e){return De(e)&&"__vccOpts"in e}var V=(e,t)=>xv(e,t,Os);function mr(e,t,r){try{xi(-1);const n=arguments.length;return n===2?Ge(t)&&!_e(t)?an(t)?O(e,null,[t]):O(e,t):O(e,null,t):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&an(r)&&(r=[r]),O(e,t,r))}finally{xi(1)}}function s0(){return;function e(t,r,n){const s=t[n];if(_e(s)&&s.includes(r)||Ge(s)&&r in s||t.extends&&e(t.extends,r,n)||t.mixins&&t.mixins.some(i=>e(i,r,n)))return!0}}function i0(e,t,r,n){const s=r[n];if(s&&df(s,e))return s;const i=t();return i.memo=e.slice(),i.cacheIndex=n,r[n]=i}function df(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 rs>0&&Nt&&Nt.push(e),!0}var ff="3.5.29",o0=fr,a0=Dv,l0=As,c0=Ju,u0={createComponentInstance:of,setupComponent:lf,renderComponentRoot:Io,setCurrentRenderingInstance:di,isVNode:an,normalizeVNode:Yt,getComponentPublicInstance:Ti,ensureValidVNode:ul,pushWarningContext:Iv,popWarningContext:Rv},iT=null,oT=null,aT=null;var Il=void 0,pf=typeof window<"u"&&window.trustedTypes;if(pf)try{Il=pf.createPolicy("vue",{createHTML:e=>e})}catch{}var hf=Il?e=>Il.createHTML(e):e=>e,d0="http://www.w3.org/2000/svg",f0="http://www.w3.org/1998/Math/MathML",cn=typeof document<"u"?document:null,gf=cn&&cn.createElement("template"),vf={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"?cn.createElementNS(d0,e):t==="mathml"?cn.createElementNS(f0,e):r?cn.createElement(e,{is:r}):cn.createElement(e);return e==="select"&&n&&n.multiple!=null&&s.setAttribute("multiple",n.multiple),s},createText:e=>cn.createTextNode(e),createComment:e=>cn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>cn.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{gf.innerHTML=hf(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const a=gf.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]}},En="transition",Ei="animation",Hs=Symbol("_vtc"),mf={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},wf=Qe({},nl,mf),p0=e=>(e.displayName="Transition",e.props=wf,e),h0=p0((e,{slots:t})=>mr(ld,bf(e),t)),ss=(e,t=[])=>{_e(e)?e.forEach(r=>r(...t)):e&&e(...t)},yf=e=>e?_e(e)?e.some(t=>t.length>1):e.length>1:!1;function bf(e){const t={};for(const _ in e)_ in mf||(t[_]=e[_]);if(e.css===!1)return t;const{name:r="v",type:n,duration:s,enterFromClass:i=`${r}-enter-from`,enterActiveClass:o=`${r}-enter-active`,enterToClass:a=`${r}-enter-to`,appearFromClass:l=i,appearActiveClass:u=o,appearToClass:c=a,leaveFromClass:d=`${r}-leave-from`,leaveActiveClass:p=`${r}-leave-active`,leaveToClass:h=`${r}-leave-to`}=e,m=g0(s),w=m&&m[0],x=m&&m[1],{onBeforeEnter:g,onEnter:S,onEnterCancelled:b,onLeave:y,onLeaveCancelled:T,onBeforeAppear:k=g,onAppear:N=S,onAppearCancelled:v=b}=t,B=(_,E,P,R)=>{_._enterCancelled=R,An(_,E?c:a),An(_,E?u:o),P&&P()},q=(_,E)=>{_._isLeaving=!1,An(_,d),An(_,h),An(_,p),E&&E()},C=_=>(E,P)=>{const R=_?N:S,D=()=>B(E,_,P);ss(R,[E,D]),_f(()=>{An(E,_?l:i),Lr(E,_?c:a),yf(R)||Sf(E,n,w,D)})};return Qe(t,{onBeforeEnter(_){ss(g,[_]),Lr(_,i),Lr(_,o)},onBeforeAppear(_){ss(k,[_]),Lr(_,l),Lr(_,u)},onEnter:C(!1),onAppear:C(!0),onLeave(_,E){_._isLeaving=!0;const P=()=>q(_,E);Lr(_,d),_._enterCancelled?(Lr(_,p),$l(_)):($l(_),Lr(_,p)),_f(()=>{_._isLeaving&&(An(_,d),Lr(_,h),yf(y)||Sf(_,n,x,P))}),ss(y,[_,P])},onEnterCancelled(_){B(_,!1,void 0,!0),ss(b,[_])},onAppearCancelled(_){B(_,!0,void 0,!0),ss(v,[_])},onLeaveCancelled(_){q(_),ss(T,[_])}})}function g0(e){if(e==null)return null;if(Ge(e))return[Rl(e.enter),Rl(e.leave)];{const t=Rl(e);return[t,t]}}function Rl(e){return Qi(e)}function Lr(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.add(r)),(e[Hs]||(e[Hs]=new Set)).add(t)}function An(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const r=e[Hs];r&&(r.delete(t),r.size||(e[Hs]=void 0))}function _f(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var v0=0;function Sf(e,t,r,n){const s=e._endId=++v0,i=()=>{s===e._endId&&n()};if(r!=null)return setTimeout(i,r);const{type:o,timeout:a,propCount:l}=Cf(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 Cf(e,t){const r=window.getComputedStyle(e),n=m=>(r[m]||"").split(", "),s=n(`${En}Delay`),i=n(`${En}Duration`),o=xf(s,i),a=n(`${Ei}Delay`),l=n(`${Ei}Duration`),u=xf(a,l);let c=null,d=0,p=0;t===En?o>0&&(c=En,d=o,p=i.length):t===Ei?u>0&&(c=Ei,d=u,p=l.length):(d=Math.max(o,u),c=d>0?o>u?En:Ei:null,p=c?c===En?i.length:l.length:0);const h=c===En&&/\b(?:transform|all)(?:,|$)/.test(n(`${En}Property`).toString());return{type:c,timeout:d,propCount:p,hasTransform:h}}function xf(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((r,n)=>Tf(r)+Tf(e[n])))}function Tf(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function $l(e){return(e?e.ownerDocument:document).body.offsetHeight}function m0(e,t,r){const n=e[Hs];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):r?e.setAttribute("class",t):e.className=t}var No=Symbol("_vod"),Ef=Symbol("_vsh"),qo={name:"show",beforeMount(e,{value:t},{transition:r}){e[No]=e.style.display==="none"?"":e.style.display,r&&t?r.beforeEnter(e):Ai(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),Ai(e,!0),n.enter(e)):n.leave(e,()=>{Ai(e,!1)}):Ai(e,t))},beforeUnmount(e,{value:t}){Ai(e,t)}};function Ai(e,t){e.style.display=t?e[No]:"none",e[Ef]=!t}function w0(){qo.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}var Af=Symbol("");function y0(e){const t=gt();if(!t)return;const r=t.ut=(s=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(i=>Bo(i,s))},n=()=>{const s=e(t.proxy);t.ce?Bo(t.ce,s):Pl(t.subTree,s),r(s)};al(()=>{ci(n)}),tt(()=>{Me(n,fr,{flush:"post"});const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Vt(()=>s.disconnect())})}function Pl(e,t){if(e.shapeFlag&128){const r=e.suspense;e=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{Pl(r.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Bo(e.el,t);else if(e.type===Ke)e.children.forEach(r=>Pl(r,t));else if(e.type===ts){let{el:r,anchor:n}=e;for(;r&&(Bo(r,t),r!==n);)r=r.nextSibling}}function Bo(e,t){if(e.nodeType===1){const r=e.style;let n="";for(const s in t){const i=Yg(t[s]);r.setProperty(`--${s}`,i),n+=`--${s}: ${i};`}r[Af]=n}}var b0=/(?:^|;)\s*display\s*:/;function _0(e,t,r){const n=e.style,s=it(r);let i=!1;if(r&&!s){if(t)if(it(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();r[a]==null&&Lo(n,a,"")}else for(const o in t)r[o]==null&&Lo(n,o,"");for(const o in r)o==="display"&&(i=!0),Lo(n,o,r[o])}else if(s){if(t!==r){const o=n[Af];o&&(r+=";"+o),n.cssText=r,i=b0.test(r)}}else t&&e.removeAttribute("style");No in e&&(e[No]=i?n.display:"",e[Ef]&&(n.display="none"))}var kf=/\s*!important$/;function Lo(e,t,r){if(_e(r))r.forEach(n=>Lo(e,t,n));else if(r==null&&(r=""),t.startsWith("--"))e.setProperty(t,r);else{const n=S0(e,t);kf.test(r)?e.setProperty(Gt(n),r.replace(kf,""),"important"):e[n]=r}}var If=["Webkit","Moz","ms"],Dl={};function S0(e,t){const r=Dl[t];if(r)return r;let n=_t(t);if(n!=="filter"&&n in e)return Dl[t]=n;n=ei(n);for(let s=0;s<If.length;s++){const i=If[s]+n;if(i in e)return Dl[t]=i}return t}var Rf="http://www.w3.org/1999/xlink";function $f(e,t,r,n,s,i=Gg(t)){n&&t.startsWith("xlink:")?r==null?e.removeAttributeNS(Rf,t.slice(6,t.length)):e.setAttributeNS(Rf,t,r):r==null||i&&!yu(r)?e.removeAttribute(t):e.setAttribute(t,i?"":Er(r)?String(r):r)}function Pf(e,t,r,n,s){if(t==="innerHTML"||t==="textContent"){r!=null&&(e[t]=t==="innerHTML"?hf(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=yu(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 un(e,t,r,n){e.addEventListener(t,r,n)}function C0(e,t,r,n){e.removeEventListener(t,r,n)}var Df=Symbol("_vei");function x0(e,t,r,n,s=null){const i=e[Df]||(e[Df]={}),o=i[t];if(n&&o)o.value=n;else{const[a,l]=T0(t);n?un(e,a,i[t]=k0(n,s),l):o&&(C0(e,a,o,l),i[t]=void 0)}}var Of=/(?:Once|Passive|Capture)$/;function T0(e){let t;if(Of.test(e)){t={};let r;for(;r=e.match(Of);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Gt(e.slice(2)),t]}var Ol=0,E0=Promise.resolve(),A0=()=>Ol||(E0.then(()=>Ol=0),Ol=Date.now());function k0(e,t){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;hr(I0(n,r.value),t,5,[n])};return r.value=e,r.attached=A0(),r}function I0(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 Hf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Mf=(e,t,r,n,s,i)=>{const o=s==="svg";t==="class"?m0(e,n,o):t==="style"?_0(e,r,n):Qs(t)?Pa(t)||x0(e,t,r,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):R0(e,t,n,o))?(Pf(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&$f(e,t,n,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!it(n))?Pf(e,_t(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),$f(e,t,n,o))};function R0(e,t,r,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Hf(t)&&De(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 Hf(t)&&it(r)?!1:t in e}var Nf={};function Hl(e,t,r){let n=X(e,t);Ji(n)&&(n=Qe({},n,t));class s extends qf{constructor(o){super(n,o,r)}}return s.def=n,s}var $0=((e,t)=>Hl(e,t,np)),P0=typeof HTMLElement<"u"?HTMLElement:class{},qf=class $g extends P0{constructor(t,r={},n=Bl){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!==Bl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Qe({},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 $g){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,Et(()=>{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)))[_t(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)Ye(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(_t))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):Nf;const s=_t(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===Nf?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(Gt(t),""):typeof r=="string"||typeof r=="number"?this.setAttribute(Gt(t),r+""):r||this.removeAttribute(Gt(t)),i&&i.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),rp(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const r=O(this._def,Qe(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,Ji(o[0])?Qe({detail:o},o[0]):{detail:o}))};n.emit=(i,...o)=>{s(i,o),Gt(i)!==i&&s(Gt(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 Bf(e){const t=gt(),r=t&&t.ce;return r||null}function D0(){const e=Bf();return e&&e.shadowRoot}function O0(e="$style"){{const t=gt();if(!t)return Ue;const r=t.type.__cssModules;if(!r)return Ue;const n=r[e];return n||Ue}}var Lf=new WeakMap,Ff=new WeakMap,Fo=Symbol("_moveCb"),Vf=Symbol("_enterCb"),H0=e=>(delete e.props.mode,e),M0=H0({name:"TransitionGroup",props:Qe({},wf,{tag:String,moveClass:String}),setup(e,{slots:t}){const r=gt(),n=rl();let s,i;return mi(()=>{if(!s.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!L0(s[0].el,r.vnode.el,o)){s=[];return}s.forEach(N0),s.forEach(q0);const a=s.filter(B0);$l(r.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Lr(u,o),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[Fo]=p=>{p&&p.target!==u||(!p||p.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[Fo]=null,An(u,o))};u.addEventListener("transitionend",d)}),s=[]}),()=>{const o=ze(e),a=bf(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),nn(c,ks(c,a,n,r)),Lf.set(c,jf(c.el)))}i=t.default?bo(t.default()):[];for(let u=0;u<i.length;u++){const c=i[u];c.key!=null&&nn(c,ks(c,a,n,r))}return O(l,null,i)}}});function N0(e){const t=e.el;t[Fo]&&t[Fo](),t[Vf]&&t[Vf]()}function q0(e){Ff.set(e,jf(e.el))}function B0(e){const t=Lf.get(e),r=Ff.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 jf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function L0(e,t,r){const n=e.cloneNode(),s=e[Hs];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}=Cf(n);return i.removeChild(n),o}var kn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return _e(t)?r=>_s(t,r):t};function F0(e){e.target.composing=!0}function Uf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}var wr=Symbol("_assign");function zf(e,t,r){return t&&(e=e.trim()),r&&(e=Xi(e)),e}var ki={created(e,{modifiers:{lazy:t,trim:r,number:n}},s){e[wr]=kn(s);const i=n||s.props&&s.props.type==="number";un(e,t?"change":"input",o=>{o.target.composing||e[wr](zf(e.value,r,i))}),(r||i)&&un(e,"change",()=>{e.value=zf(e.value,r,i)}),t||(un(e,"compositionstart",F0),un(e,"compositionend",Uf),un(e,"change",Uf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:r,modifiers:{lazy:n,trim:s,number:i}},o){if(e[wr]=kn(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Xi(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))}},Ml={deep:!0,created(e,t,r){e[wr]=kn(r),un(e,"change",()=>{const n=e._modelValue,s=Ms(e),i=e.checked,o=e[wr];if(_e(n)){const a=to(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(Gn(n)){const a=new Set(n);i?a.add(s):a.delete(s),o(a)}else o(Jf(e,i))})},mounted:Kf,beforeUpdate(e,t,r){e[wr]=kn(r),Kf(e,t,r)}};function Kf(e,{value:t,oldValue:r},n){e._modelValue=t;let s;if(_e(t))s=to(t,n.props.value)>-1;else if(Gn(t))s=t.has(n.props.value);else{if(t===r)return;s=Gr(t,Jf(e,!0))}e.checked!==s&&(e.checked=s)}var Nl={created(e,{value:t},r){e.checked=Gr(t,r.props.value),e[wr]=kn(r),un(e,"change",()=>{e[wr](Ms(e))})},beforeUpdate(e,{value:t,oldValue:r},n){e[wr]=kn(n),t!==r&&(e.checked=Gr(t,n.props.value))}},Wf={deep:!0,created(e,{value:t,modifiers:{number:r}},n){const s=Gn(t);un(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>r?Xi(Ms(o)):Ms(o));e[wr](e.multiple?s?new Set(i):i:i[0]),e._assigning=!0,Et(()=>{e._assigning=!1})}),e[wr]=kn(n)},mounted(e,{value:t}){Gf(e,t)},beforeUpdate(e,t,r){e[wr]=kn(r)},updated(e,{value:t}){e._assigning||Gf(e,t)}};function Gf(e,t){const r=e.multiple,n=_e(t);if(!(r&&!n&&!Gn(t))){for(let s=0,i=e.options.length;s<i;s++){const o=e.options[s],a=Ms(o);if(r)if(n){const l=typeof a;l==="string"||l==="number"?o.selected=t.some(u=>String(u)===String(a)):o.selected=to(t,a)>-1}else o.selected=t.has(a);else if(Gr(Ms(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!r&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ms(e){return"_value"in e?e._value:e.value}function Jf(e,t){const r=t?"_trueValue":"_falseValue";return r in e?e[r]:t}var Yf={created(e,t,r){Vo(e,t,r,null,"created")},mounted(e,t,r){Vo(e,t,r,null,"mounted")},beforeUpdate(e,t,r,n){Vo(e,t,r,n,"beforeUpdate")},updated(e,t,r,n){Vo(e,t,r,n,"updated")}};function Zf(e,t){switch(e){case"SELECT":return Wf;case"TEXTAREA":return ki;default:switch(t){case"checkbox":return Ml;case"radio":return Nl;default:return ki}}}function Vo(e,t,r,n,s){const i=Zf(e.tagName,r.props&&r.props.type)[s];i&&i(e,t,r,n)}function V0(){ki.getSSRProps=({value:e})=>({value:e}),Nl.getSSRProps=({value:e},t)=>{if(t.props&&Gr(t.props.value,e))return{checked:!0}},Ml.getSSRProps=({value:e},t)=>{if(_e(e)){if(t.props&&to(e,t.props.value)>-1)return{checked:!0}}else if(Gn(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Yf.getSSRProps=(e,t)=>{if(typeof t.type!="string")return;const r=Zf(t.type.toUpperCase(),t.props&&t.props.type);if(r.getSSRProps)return r.getSSRProps(e,t)}}var j0=["ctrl","shift","alt","meta"],U0={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)=>j0.some(r=>e[`${r}Key`]&&!t.includes(r))},Xt=(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=U0[t[o]];if(a&&a(s,t))return}return e(s,...i)}))},z0={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ql=(e,t)=>{const r=e._withKeys||(e._withKeys={}),n=t.join(".");return r[n]||(r[n]=(s=>{if(!("key"in s))return;const i=Gt(s.key);if(t.some(o=>o===i||z0[o]===i))return e(s)}))},Xf=Qe({patchProp:Mf},vf),Ii,Qf=!1;function ep(){return Ii||(Ii=Wd(Xf))}function tp(){return Ii=Qf?Ii:Gd(Xf),Qf=!0,Ii}var rp=((...e)=>{ep().render(...e)}),K0=((...e)=>{tp().hydrate(...e)}),Bl=((...e)=>{const t=ep().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=ip(n);if(!s)return;const i=t._component;!De(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=r(s,!1,sp(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},t}),np=((...e)=>{const t=tp().createApp(...e),{mount:r}=t;return t.mount=n=>{const s=ip(n);if(s)return r(s,!0,sp(s))},t});function sp(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function ip(e){return it(e)?document.querySelector(e):e}var op=!1,W0=()=>{op||(op=!0,V0(),w0())},G0=Ng({BaseTransition:()=>ld,BaseTransitionPropsValidators:()=>nl,Comment:()=>ht,DeprecationTypes:()=>null,EffectScope:()=>Ma,ErrorCodes:()=>Pv,ErrorTypeStrings:()=>a0,Fragment:()=>Ke,KeepAlive:()=>nm,ReactiveEffect:()=>ti,Static:()=>ts,Suspense:()=>jm,Teleport:()=>el,Text:()=>Tn,TrackOpTypes:()=>Tv,Transition:()=>h0,TransitionGroup:()=>M0,TriggerOpTypes:()=>Ev,VueElement:()=>qf,assertNumber:()=>$v,callWithAsyncErrorHandling:()=>hr,callWithErrorHandling:()=>xs,camelize:()=>_t,capitalize:()=>ei,cloneVNode:()=>Rr,compatUtils:()=>null,compile:()=>J0,computed:()=>V,createApp:()=>Bl,createBlock:()=>U,createCommentVNode:()=>Be,createElementBlock:()=>Se,createElementVNode:()=>Q,createHydrationRenderer:()=>Gd,createPropsRestProxy:()=>bm,createRenderer:()=>Wd,createSSRApp:()=>np,createSlots:()=>lm,createStaticVNode:()=>Cl,createTextVNode:()=>qe,createVNode:()=>O,customRef:()=>li,defineAsyncComponent:()=>rm,defineComponent:()=>X,defineCustomElement:()=>Hl,defineEmits:()=>dm,defineExpose:()=>fm,defineModel:()=>gm,defineOptions:()=>pm,defineProps:()=>um,defineSSRCustomElement:()=>$0,defineSlots:()=>hm,devtools:()=>l0,effect:()=>Xg,effectScope:()=>Na,getCurrentInstance:()=>gt,getCurrentScope:()=>ro,getCurrentWatcher:()=>Av,getTransitionRawChildren:()=>bo,guardReactiveProps:()=>rr,h:()=>mr,handleError:()=>Zn,hasInjectionContext:()=>Bv,hydrate:()=>K0,hydrateOnIdle:()=>Yv,hydrateOnInteraction:()=>em,hydrateOnMediaQuery:()=>Qv,hydrateOnVisible:()=>Xv,initCustomFormatter:()=>s0,initDirectivesForSSR:()=>W0,inject:()=>Ft,isMemoSame:()=>df,isProxy:()=>ai,isReactive:()=>tn,isReadonly:()=>Mr,isRef:()=>rt,isRuntimeOnly:()=>t0,isShallow:()=>Jt,isVNode:()=>an,markRaw:()=>Ga,mergeDefaults:()=>kd,mergeModels:()=>ym,mergeProps:()=>we,nextTick:()=>Et,nodeOps:()=>vf,normalizeClass:()=>et,normalizeProps:()=>pr,normalizeStyle:()=>St,onActivated:()=>vd,onBeforeMount:()=>yd,onBeforeUnmount:()=>Ps,onBeforeUpdate:()=>al,onDeactivated:()=>md,onErrorCaptured:()=>Cd,onMounted:()=>tt,onRenderTracked:()=>Sd,onRenderTriggered:()=>_d,onScopeDispose:()=>qa,onServerPrefetch:()=>bd,onUnmounted:()=>Vt,onUpdated:()=>mi,onWatcherCleanup:()=>ju,openBlock:()=>$,patchProp:()=>Mf,popScopeId:()=>Nv,provide:()=>Xn,proxyRefs:()=>Ja,pushScopeId:()=>Mv,queuePostFlushCb:()=>ci,reactive:()=>Qr,readonly:()=>Ht,ref:()=>F,registerRuntimeCompiler:()=>e0,render:()=>rp,renderList:()=>vr,renderSlot:()=>ne,resolveComponent:()=>om,resolveDirective:()=>am,resolveDynamicComponent:()=>wi,resolveFilter:()=>null,resolveTransitionHooks:()=>ks,setBlockTracking:()=>xi,setDevtoolsHook:()=>c0,setTransitionHooks:()=>nn,shallowReactive:()=>Bu,shallowReadonly:()=>en,shallowRef:()=>ft,ssrContextKey:()=>Yu,ssrUtils:()=>u0,stop:()=>Qg,toDisplayString:()=>Le,toHandlerKey:()=>bs,toHandlers:()=>Ed,toRaw:()=>ze,toRef:()=>Ya,toRefs:()=>Mt,toValue:()=>$e,transformVNodeArgs:()=>Jm,triggerRef:()=>Fu,unref:()=>f,useAttrs:()=>wm,useCssModule:()=>O0,useCssVars:()=>y0,useHost:()=>Bf,useId:()=>dd,useModel:()=>Im,useSSRContext:()=>Zu,useShadowRoot:()=>D0,useSlots:()=>mm,useTemplateRef:()=>jv,useTransitionState:()=>rl,vModelCheckbox:()=>Ml,vModelDynamic:()=>Yf,vModelRadio:()=>Nl,vModelSelect:()=>Wf,vModelText:()=>ki,vShow:()=>qo,version:()=>ff,warn:()=>o0,watch:()=>Me,watchEffect:()=>ct,watchPostEffect:()=>Xa,watchSyncEffect:()=>Xu,withAsyncContext:()=>_m,withCtx:()=>I,withDefaults:()=>vm,withDirectives:()=>mo,withKeys:()=>ql,withMemo:()=>i0,withModifiers:()=>Xt,withScopeId:()=>qv},1),J0=()=>{},Y0=2;const $r={CALL_HISTORY:"call_history",CONTACTS:"contacts",CONNECTIONS:"connections"},Z0=(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,Y0);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($r.CALL_HISTORY)||p.createObjectStore($r.CALL_HISTORY,{keyPath:"id"}),p.objectStoreNames.contains($r.CONTACTS)||p.createObjectStore($r.CONTACTS,{keyPath:"number"}),p.objectStoreNames.contains($r.CONNECTIONS)||p.createObjectStore($r.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}},X0=e=>{const t=F(e?.initialConnected??!1),r=F(0),n=F(null),s=F([]),i=F([]),{initDB:o,getAll:a,add:l}=Z0(e?.server&&e?.extension?`webphone_${e.server}_${e.extension}`.replace(/[^a-z0-9_]/gi,"_"):"webphone_db");o().then(async()=>{try{s.value=(await a($r.CALL_HISTORY)).sort((Y,le)=>le.startTime-Y.startTime),i.value=await a($r.CONTACTS)}catch(Y){console.error("Error loading data from IndexedDB:",Y)}});const u=F([{id:0,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:1,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1},{id:2,status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1}]),c=F(e?.initialKeypadVisible??!0),d=F(""),p=F(!1),h=V(()=>u.value.find(Y=>Y.id===r.value)||u.value[0]),m=V(()=>h.value?.status||"idle"),w=V(()=>h.value?.remoteNumber||""),x=V(()=>h.value?.isMuted||!1),g=V(()=>h.value?.isHeld||!1),S=V({get:()=>h.value?.keypadValue||"",set:Y=>{h.value&&(h.value.keypadValue=Y)}}),b=Y=>{t.value=Y},y=Y=>{u.value.some(le=>le.id===Y)&&(r.value=Y)},T=(Y,le)=>{const pe=u.value.find(Ae=>Ae.id===Y);pe&&Object.assign(pe,le)};return{isConnected:t,activeChannelId:r,channels:u,activeChannel:h,callStatus:m,remoteNumber:w,isMuted:x,isHeld:g,keypadValue:S,isKeypadVisible:c,lastDialedNumber:d,videoModeEnabled:p,transferInProgress:n,setConnected:b,setActiveChannelId:y,updateChannelState:T,setCallStatus:Y=>{T(r.value,{status:Y})},setIncomingCall:Y=>{T(r.value,{remoteNumber:Y})},resetCall:()=>{T(r.value,{status:"idle",remoteNumber:"",isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1})},addCallLog:async Y=>{const le={id:crypto.randomUUID(),...Y};s.value.unshift(le);try{await l($r.CALL_HISTORY,le)}catch(pe){console.error("Error saving call log:",pe)}},callHistory:s,contacts:i,addContact:async Y=>{try{await l($r.CONTACTS,Y),i.value=await a($r.CONTACTS)}catch(le){console.error("Error saving contact:",le)}},setMuted:Y=>{T(r.value,{isMuted:Y})},setHeld:Y=>{T(r.value,{isHeld:Y})},appendKeypad:Y=>{S.value+=Y},clearKeypad:()=>{S.value=""},backspaceKeypad:()=>{S.value=S.value.slice(0,-1)},toggleKeypad:()=>{c.value=!c.value},setLastDialedNumber:Y=>{d.value=Y},setTransferInProgress:Y=>{n.value=Y},toggleVideoMode:()=>{p.value=!p.value}}},Q0="0.21.1";var is=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},Ll=class extends is{constructor(e){super(e||"Unsupported content type.")}},Fl=class extends is{constructor(e){super(e||"Request pending.")}},ew=class extends is{constructor(e){super(e||"Unspecified session description handler error.")}},Vl=class extends is{constructor(){super("The session has terminated.")}},Ri=class extends is{constructor(e){super(e||"An error occurred during state transition.")}},tw=class{constructor(e){this.incomingAckRequest=e}get request(){return this.incomingAckRequest.message}},rw=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()}},nw=class{constructor(e){this.incomingCancelRequest=e}get request(){return this.incomingCancelRequest}},Ns=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})}},sw=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()}},ap=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={}}},yr=class Pg extends ap{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 Pg(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}},In=class Dg extends ap{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 Dg(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 lp(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 jl(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,r+=r.repeat(t),e+r.slice(0,t))}var cp=class Ia 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,Ia.prototype):this.__proto__=Ia.prototype,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ia)}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=jl("",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+" | "+Fl("",i.column-1," ")+Fl("",c-i.column,"^")}else r+=`
10
- at `+o}return r}};function rw(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
9
+ `+l+" | "+jl("",i.column-1," ")+jl("",c-i.column,"^")}else r+=`
10
+ at `+o}return r}};function iw(e,t){t=t!==void 0?t:{};const r={},n=t.grammarSource,s={Contact:119,Name_Addr_Header:156,Record_Route:176,Request_Response:81,SIP_URI:45,Subscription_State:186,Supported:191,Require:182,Via:194,absoluteURI:84,Call_ID:118,Content_Disposition:130,Content_Length:135,Content_Type:136,CSeq:146,displayName:122,Event:149,From:151,host:52,Max_Forwards:154,Min_SE:213,Proxy_Authenticate:157,quoted_string:40,Refer_To:178,Replaces:179,Session_Expires:210,stun_URI:217,To:192,turn_URI:223,uuid:226,WWW_Authenticate:209,challenge:158,sipfrag:230,Referred_By:231};let i=119;const o=[`\r
11
11
  `,g(`\r
12
- `,!1),/^[0-9]/,S([["0","9"]],!1,!1),/^[a-zA-Z]/,S([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,S([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,S([["\0","ÿ"]],!1,!1),/^["]/,S(['"'],!1,!1)," ",g(" ",!1)," ",g(" ",!1),/^[a-zA-Z0-9]/,S([["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":"},/^[!-~]/,S([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,S([["€","￿"]],!1,!1),/^[\x80-\xBF]/,S([["€","¿"]],!1,!1),/^[a-f]/,S([["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'"'},/^[!-']/,S([["!","'"]],!1,!1),/^[*-[]/,S([["*","["]],!1,!1),/^[\]-~]/,S([["]","~"]],!1,!1),function(C){return C},/^[#-[]/,S([["#","["]],!1,!1),/^[\0-\t]/,S([["\0"," "]],!1,!1),/^[\v-\f]/,S([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,S([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new In(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 In(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(C){t=t||{data:{}},t.data.scheme=C},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_\-]/,S([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,S([["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]/,S([["0","5"]],!1,!1),"2",g("2",!1),/^[0-4]/,S([["0","4"]],!1,!1),"1",g("1",!1),/^[1-9]/,S([["1","9"]],!1,!1),function(C){return t=t||{data:{}},C=parseInt(C.join("")),t.data.port=C,C},"transport=",g("transport=",!0),"udp",g("udp",!0),"tcp",g("tcp",!0),"sctp",g("sctp",!0),"tls",g("tls",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=C.toLowerCase()},"user=",g("user=",!0),"phone",g("phone",!0),"ip",g("ip",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=C.toLowerCase()},"method=",g("method=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=C},"ttl=",g("ttl=",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=C},"maddr=",g("maddr=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=C},"lr",g("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(C,_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),_===null?_=void 0:_=_[1],t.data.uri_params[C.toLowerCase()]=_},function(C,_){C=C.join("").toLowerCase(),_=_.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[C]?t.data.uri_headers[C].push(_):t.data.uri_headers[C]=[_]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new In(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(C){t=t||{data:{}},t.data.status_code=parseInt(C.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=w()},function(){t=t||{data:{}},t.data=w()},function(){var C,_;for(t=t||{data:{}},_=t.data.multi_header.length,C=0;C<_;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new wr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:C})},function(C){C=w().trim(),C[0]==='"'&&(C=C.substring(1,C.length-1)),t=t||{data:{}},t.data.displayName=C},"q",g("q",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=C},"expires",g("expires",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=C},function(C){return parseInt(C.join(""))},"0",g("0",!1),function(){return parseFloat(w())},function(C,_){t=t||{data:{}},t.data.params||(t.data.params={}),_===null?_=void 0:_=_[1],t.data.params[C.toLowerCase()]=_},"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(C){t=t||{data:{}},t.data=parseInt(C.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(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(C){t=t||{data:{}},t.data.event=C.toLowerCase()},function(){t=t||{data:{}};var C=t.data.tag;t.data=new wr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"tag",g("tag",!0),function(C){t=t||{data:{}},t.data.tag=C},function(C){t=t||{data:{}},t.data=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(){t=t||{data:{}},t.data=new wr(t.data.uri,t.data.displayName,t.data.params)},"digest",g("Digest",!0),"realm",g("realm",!0),function(C){t=t||{data:{}},t.data.realm=C},"domain",g("domain",!0),"nonce",g("nonce",!0),function(C){t=t||{data:{}},t.data.nonce=C},"opaque",g("opaque",!0),function(C){t=t||{data:{}},t.data.opaque=C},"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(C){t=t||{data:{}},t.data.algorithm=C.toUpperCase()},"qop",g("qop",!0),"auth-int",g("auth-int",!0),"auth",g("auth",!0),function(C){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(C.toLowerCase())},function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(){var C,_;for(t=t||{data:{}},_=t.data.multi_header.length,C=0;C<_;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new wr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:C})},function(){t=t||{data:{}},t.data=new wr(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(C){t=t||{data:{}},t.data.replaces_from_tag=C},"to-tag",g("to-tag",!0),function(C){t=t||{data:{}},t.data.replaces_to_tag=C},"early-only",g("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(C,_){return _},function(C,_){return q(C,_)},function(C){t=t||{data:{}},t.startRule==="Require"&&(t.data=C||[])},function(C){t=t||{data:{}},t.data.value=parseInt(C.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(C){t=t||{data:{}},typeof C<"u"&&(t.data.reason=C)},function(C){t=t||{data:{}},typeof C<"u"&&(t.data.expires=C)},"retry_after",g("retry_after",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.retry_after=C)},"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(C){t=t||{data:{}},t.startRule==="Supported"&&(t.data=C||[])},function(){t=t||{data:{}};var C=t.data.tag;t.data=new wr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"ttl",g("ttl",!0),function(C){t=t||{data:{}},t.data.ttl=C},"maddr",g("maddr",!0),function(C){t=t||{data:{}},t.data.maddr=C},"received",g("received",!0),function(C){t=t||{data:{}},t.data.received=C},"branch",g("branch",!0),function(C){t=t||{data:{}},t.data.branch=C},"rport",g("rport",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.rport=C.join(""))},function(C){t=t||{data:{}},t.data.protocol=C},g("UDP",!0),g("TCP",!0),g("TLS",!0),g("SCTP",!0),function(C){t=t||{data:{}},t.data.transport=C},function(){t=t||{data:{}},t.data.host=w()},function(C){t=t||{data:{}},t.data.port=parseInt(C.join(""))},function(C){return parseInt(C.join(""))},function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=C)},"refresher",g("refresher",!1),"uas",g("uas",!1),"uac",g("uac",!1),function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=C)},function(C){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=C)},"stuns",g("stuns",!0),"stun",g("stun",!0),function(C){t=t||{data:{}},t.data.scheme=C},function(C){t=t||{data:{}},t.data.host=C},"?transport=",g("?transport=",!1),"turns",g("turns",!0),"turn",g("turn",!0),function(C){t=t||{data:{}},t.data.transport=C},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#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),v(';.." &"'),v(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),v(`%%$;2/&#0#*;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!7œ0)*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ž""6ž7Ÿ/¤#;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2ž""6ž7Ÿ/Œ#;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2ž""6ž7Ÿ/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2ž""6ž7Ÿ/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2ž""6ž7Ÿ/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2ž""6ž7Ÿ/,#;[/#$+")("'#&'#.ծ &%2ž""6ž7Ÿ/,#;Z/#$+")("'#&'#.Տ &%;Z/›#2ž""6ž7Ÿ/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/ƒ$2ž""6ž7Ÿ/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/’$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2ž""6ž7Ÿ/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2ž""6ž7Ÿ/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/€$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2ž""6ž7Ÿ/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 8!: ! )`),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/&#0#*;j&&&#/"!&,)'),v('%$;j/&#0#*;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$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$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("%$;!/&#0#*;!&&&#/' 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("%$;!/&#0#*;!&&&#/' 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("%$;!/&#0#*;!&&&#/' 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("%$;!/&#0#*;!&&&#/' 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/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;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("%$;!/&#0#*;!&&&#/' 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("%$;!/&#0#*;!&&&#/' 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 x(){return T(u,l)}function g(C,_){return{type:"literal",text:C,ignoreCase:_}}function S(C,_,E){return{type:"class",parts:C,inverted:_,ignoreCase:E}}function b(){return{type:"end"}}function y(C){let _=c[C],E;if(_)return _;for(E=C-1;!c[E];)E--;for(_=c[E],_={line:_.line,column:_.column};E<C;)e.charCodeAt(E)===10?(_.line++,_.column=1):_.column++,E++;return c[C]=_,_}function T(C,_){const E=y(C),P=y(_);return{source:n,start:{offset:C,line:E.line,column:E.column},end:{offset:_,line:P.line,column:P.column}}}function k(C){l<d||(l>d&&(d=l,p=[]),p.push(C))}function N(C,_,E){return new op(op.buildMessage(C,_),C,_,E)}function v(C){return C.split("").map(_=>_.charCodeAt(0)-32)}function B(C){const _=a[C];let E=0;const P=[];let R=_.length;const D=[],J=[];let W;for(;;){for(;E<R;)switch(_[E]){case 0:J.push(o[_[E+1]]),E+=2;break;case 1:J.push(void 0),E++;break;case 2:J.push(null),E++;break;case 3:J.push(r),E++;break;case 4:J.push([]),E++;break;case 5:J.push(l),E++;break;case 6:J.pop(),E++;break;case 7:l=J.pop(),E++;break;case 8:J.length-=_[E+1],E+=2;break;case 9:J.splice(-2,1),E++;break;case 10:J[J.length-2].push(J.pop()),E++;break;case 11:J.push(J.splice(J.length-_[E+1],_[E+1])),E+=2;break;case 12:J.push(e.substring(J.pop(),l)),E++;break;case 13:D.push(R),P.push(E+3+_[E+1]+_[E+2]),J[J.length-1]?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 14:D.push(R),P.push(E+3+_[E+1]+_[E+2]),J[J.length-1]===r?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 15:D.push(R),P.push(E+3+_[E+1]+_[E+2]),J[J.length-1]!==r?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 16:J[J.length-1]!==r?(D.push(R),P.push(E),R=E+2+_[E+1],E+=2):E+=2+_[E+1];break;case 17:D.push(R),P.push(E+3+_[E+1]+_[E+2]),e.length>l?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 18:D.push(R),P.push(E+4+_[E+2]+_[E+3]),e.substr(l,o[_[E+1]].length)===o[_[E+1]]?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 19:D.push(R),P.push(E+4+_[E+2]+_[E+3]),e.substr(l,o[_[E+1]].length).toLowerCase()===o[_[E+1]]?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 20:D.push(R),P.push(E+4+_[E+2]+_[E+3]),o[_[E+1]].test(e.charAt(l))?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 21:J.push(e.substr(l,_[E+1])),l+=_[E+1],E+=2;break;case 22:J.push(o[_[E+1]]),l+=o[_[E+1]].length,E+=2;break;case 23:J.push(r),h===0&&k(o[_[E+1]]),E+=2;break;case 24:u=J[J.length-1-_[E+1]],E+=2;break;case 25:u=l,E++;break;case 26:W=_.slice(E+4,E+4+_[E+3]).map(function(ae){return J[J.length-1-ae]}),J.splice(J.length-_[E+2],_[E+2],o[_[E+1]].apply(null,W)),E+=4+_[E+3];break;case 27:J.push(B(_[E+1])),E+=2;break;case 28:h++,E++;break;case 29:h--,E++;break;default:throw new Error("Invalid opcode: "+_[E]+".")}if(D.length>0)R=D.pop(),E=P.pop();else break}return J[0]}t.data={};function q(C,_){return[C].concat(_)}if(m=B(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&k(b()),N(p,d<e.length?e.charAt(d):null,d<e.length?T(d,d+1):T(d,d))}const nw=rw;var xt;(function(e){function t(s,i){const o={startRule:i};try{nw(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})(xt=xt||(xt={}));var sw={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 os(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 jo(e){return sw[e]||""}function Uo(){return os(10)}function Lr(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 Pi(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var ap=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=Lr(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[Lr(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[Lr(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[Lr(e)]}parseHeader(e,t=0){if(e=Lr(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=xt.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[Lr(e)]=[{raw:t}]}toString(){return this.data}},Bs=class extends ap{constructor(){super()}},Rn=class extends ap{constructor(){super()}},Vl=class ka{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=ka.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:Uo(),this.from=ka.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=ka.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+os(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 wr(t,r,s)}getHeader(t){const r=this.headers[Lr(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[Lr(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[Lr(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[Lr(t)]=r instanceof Array?r:[r]}setViaHeader(t,r){this.options.hackViaTcp&&(r="TCP");let n="SIP/2.0/"+r;n+=" "+this.options.viaHost+";branch="+t,this.options.forceRport&&(n+=";rport"),this.setHeader("via",n),this.branch=t}toString(){let t="";t+=this.method+" "+this.ruri.toRaw()+` SIP/2.0\r
12
+ `,!1),/^[0-9]/,S([["0","9"]],!1,!1),/^[a-zA-Z]/,S([["a","z"],["A","Z"]],!1,!1),/^[0-9a-fA-F]/,S([["0","9"],["a","f"],["A","F"]],!1,!1),/^[\0-\xFF]/,S([["\0","ÿ"]],!1,!1),/^["]/,S(['"'],!1,!1)," ",g(" ",!1)," ",g(" ",!1),/^[a-zA-Z0-9]/,S([["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":"},/^[!-~]/,S([["!","~"]],!1,!1),/^[\x80-\uFFFF]/,S([["€","￿"]],!1,!1),/^[\x80-\xBF]/,S([["€","¿"]],!1,!1),/^[a-f]/,S([["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'"'},/^[!-']/,S([["!","'"]],!1,!1),/^[*-[]/,S([["*","["]],!1,!1),/^[\]-~]/,S([["]","~"]],!1,!1),function(C){return C},/^[#-[]/,S([["#","["]],!1,!1),/^[\0-\t]/,S([["\0"," "]],!1,!1),/^[\v-\f]/,S([["\v","\f"]],!1,!1),/^[\x0E-\x7F]/,S([["",""]],!1,!1),function(){t=t||{data:{}},t.data.uri=new In(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 In(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(C){t=t||{data:{}},t.data.scheme=C},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_\-]/,S([["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),/^[a-zA-Z0-9\-]/,S([["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]/,S([["0","5"]],!1,!1),"2",g("2",!1),/^[0-4]/,S([["0","4"]],!1,!1),"1",g("1",!1),/^[1-9]/,S([["1","9"]],!1,!1),function(C){return t=t||{data:{}},C=parseInt(C.join("")),t.data.port=C,C},"transport=",g("transport=",!0),"udp",g("udp",!0),"tcp",g("tcp",!0),"sctp",g("sctp",!0),"tls",g("tls",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.transport=C.toLowerCase()},"user=",g("user=",!0),"phone",g("phone",!0),"ip",g("ip",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.user=C.toLowerCase()},"method=",g("method=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.method=C},"ttl=",g("ttl=",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.ttl=C},"maddr=",g("maddr=",!0),function(C){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.maddr=C},"lr",g("lr",!0),function(){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),t.data.uri_params.lr=void 0},function(C,_){t=t||{data:{}},t.data.uri_params||(t.data.uri_params={}),_===null?_=void 0:_=_[1],t.data.uri_params[C.toLowerCase()]=_},function(C,_){C=C.join("").toLowerCase(),_=_.join(""),t=t||{data:{}},t.data.uri_headers||(t.data.uri_headers={}),t.data.uri_headers[C]?t.data.uri_headers[C].push(_):t.data.uri_headers[C]=[_]},function(){t=t||{data:{}},t.startRule==="Refer_To"&&(t.data.uri=new In(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(C){t=t||{data:{}},t.data.status_code=parseInt(C.join(""))},function(){t=t||{data:{}},t.data.reason_phrase=w()},function(){t=t||{data:{}},t.data=w()},function(){var C,_;for(t=t||{data:{}},_=t.data.multi_header.length,C=0;C<_;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new yr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:C})},function(C){C=w().trim(),C[0]==='"'&&(C=C.substring(1,C.length-1)),t=t||{data:{}},t.data.displayName=C},"q",g("q",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.q=C},"expires",g("expires",!0),function(C){t=t||{data:{}},t.data.params||(t.data.params={}),t.data.params.expires=C},function(C){return parseInt(C.join(""))},"0",g("0",!1),function(){return parseFloat(w())},function(C,_){t=t||{data:{}},t.data.params||(t.data.params={}),_===null?_=void 0:_=_[1],t.data.params[C.toLowerCase()]=_},"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(C){t=t||{data:{}},t.data=parseInt(C.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(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(C){t=t||{data:{}},t.data.event=C.toLowerCase()},function(){t=t||{data:{}};var C=t.data.tag;t.data=new yr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"tag",g("tag",!0),function(C){t=t||{data:{}},t.data.tag=C},function(C){t=t||{data:{}},t.data=parseInt(C.join(""))},function(C){t=t||{data:{}},t.data=C},function(){t=t||{data:{}},t.data=new yr(t.data.uri,t.data.displayName,t.data.params)},"digest",g("Digest",!0),"realm",g("realm",!0),function(C){t=t||{data:{}},t.data.realm=C},"domain",g("domain",!0),"nonce",g("nonce",!0),function(C){t=t||{data:{}},t.data.nonce=C},"opaque",g("opaque",!0),function(C){t=t||{data:{}},t.data.opaque=C},"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(C){t=t||{data:{}},t.data.algorithm=C.toUpperCase()},"qop",g("qop",!0),"auth-int",g("auth-int",!0),"auth",g("auth",!0),function(C){t=t||{data:{}},t.data.qop||(t.data.qop=[]),t.data.qop.push(C.toLowerCase())},function(C){t=t||{data:{}},t.data.value=parseInt(C.join(""))},function(){var C,_;for(t=t||{data:{}},_=t.data.multi_header.length,C=0;C<_;C++)if(t.data.multi_header[C].parsed===null){t.data=null;break}t.data!==null?t.data=t.data.multi_header:t.data=-1},function(){var C;t=t||{data:{}},t.data.multi_header||(t.data.multi_header=[]);try{C=new yr(t.data.uri,t.data.displayName,t.data.params),delete t.data.uri,delete t.data.displayName,delete t.data.params}catch{C=null}t.data.multi_header.push({position:l,offset:x().start.offset,parsed:C})},function(){t=t||{data:{}},t.data=new yr(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(C){t=t||{data:{}},t.data.replaces_from_tag=C},"to-tag",g("to-tag",!0),function(C){t=t||{data:{}},t.data.replaces_to_tag=C},"early-only",g("early-only",!0),function(){t=t||{data:{}},t.data.early_only=!0},function(C,_){return _},function(C,_){return q(C,_)},function(C){t=t||{data:{}},t.startRule==="Require"&&(t.data=C||[])},function(C){t=t||{data:{}},t.data.value=parseInt(C.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(C){t=t||{data:{}},typeof C<"u"&&(t.data.reason=C)},function(C){t=t||{data:{}},typeof C<"u"&&(t.data.expires=C)},"retry_after",g("retry_after",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.retry_after=C)},"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(C){t=t||{data:{}},t.startRule==="Supported"&&(t.data=C||[])},function(){t=t||{data:{}};var C=t.data.tag;t.data=new yr(t.data.uri,t.data.displayName,t.data.params),C&&t.data.setParam("tag",C)},"ttl",g("ttl",!0),function(C){t=t||{data:{}},t.data.ttl=C},"maddr",g("maddr",!0),function(C){t=t||{data:{}},t.data.maddr=C},"received",g("received",!0),function(C){t=t||{data:{}},t.data.received=C},"branch",g("branch",!0),function(C){t=t||{data:{}},t.data.branch=C},"rport",g("rport",!0),function(C){t=t||{data:{}},typeof C<"u"&&(t.data.rport=C.join(""))},function(C){t=t||{data:{}},t.data.protocol=C},g("UDP",!0),g("TCP",!0),g("TLS",!0),g("SCTP",!0),function(C){t=t||{data:{}},t.data.transport=C},function(){t=t||{data:{}},t.data.host=w()},function(C){t=t||{data:{}},t.data.port=parseInt(C.join(""))},function(C){return parseInt(C.join(""))},function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.deltaSeconds=C)},"refresher",g("refresher",!1),"uas",g("uas",!1),"uac",g("uac",!1),function(C){t=t||{data:{}},t.startRule==="Session_Expires"&&(t.data.refresher=C)},function(C){t=t||{data:{}},t.startRule==="Min_SE"&&(t.data=C)},"stuns",g("stuns",!0),"stun",g("stun",!0),function(C){t=t||{data:{}},t.data.scheme=C},function(C){t=t||{data:{}},t.data.host=C},"?transport=",g("?transport=",!1),"turns",g("turns",!0),"turn",g("turn",!0),function(C){t=t||{data:{}},t.data.transport=C},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#*;$&/,#; /#$+")("'#&'#." &"/=#$;$/&#0#*;$&&&#/'$8":Z" )("'#&'#`),v(';.." &"'),v(`%$;'.# &;(0)*;'.# &;(&/?#28""6879/0$;//'$8#:[# )(#'#("'#&'#`),v(`%%$;2/&#0#*;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!7œ0)*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ž""6ž7Ÿ/¤#;Z/›$28""6879/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+,)(,'#(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.۹ &%2ž""6ž7Ÿ/Œ#;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.ٺ &%2ž""6ž7Ÿ/t#;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.ؓ &%2ž""6ž7Ÿ/\\#;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+&)(&'#(%'#($'#(#'#("'#&'#.ׄ &%2ž""6ž7Ÿ/D#;Z/;$28""6879/,$;[/#$+$)($'#(#'#("'#&'#.֍ &%2ž""6ž7Ÿ/,#;[/#$+")("'#&'#.ծ &%2ž""6ž7Ÿ/,#;Z/#$+")("'#&'#.Տ &%;Z/›#2ž""6ž7Ÿ/Œ$;Z/ƒ$28""6879/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$++)(+'#(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ӈ &%;Z/ª#%28""6879/,#;Z/#$+")("'#&'#." &"/ƒ$2ž""6ž7Ÿ/t$;Z/k$28""6879/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+*)(*'#()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.а &%;Z/¹#%28""6879/,#;Z/#$+")("'#&'#." &"/’$%28""6879/,#;Z/#$+")("'#&'#." &"/k$2ž""6ž7Ÿ/\\$;Z/S$28""6879/D$;Z/;$28""6879/,$;[/#$+))()'#(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ί &%;Z/È#%28""6879/,#;Z/#$+")("'#&'#." &"/¡$%28""6879/,#;Z/#$+")("'#&'#." &"/z$%28""6879/,#;Z/#$+")("'#&'#." &"/S$2ž""6ž7Ÿ/D$;Z/;$28""6879/,$;[/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.˕ &%;Z/×#%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;[/#$+')(''#(&'#(%'#($'#(#'#("'#&'#.ȑ &%;Z/þ#%28""6879/,#;Z/#$+")("'#&'#." &"/×$%28""6879/,#;Z/#$+")("'#&'#." &"/°$%28""6879/,#;Z/#$+")("'#&'#." &"/‰$%28""6879/,#;Z/#$+")("'#&'#." &"/b$%28""6879/,#;Z/#$+")("'#&'#." &"/;$2ž""6ž7Ÿ/,$;Z/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#.Ħ &%;Z/Ĝ#%28""6879/,#;Z/#$+")("'#&'#." &"/õ$%28""6879/,#;Z/#$+")("'#&'#." &"/Î$%28""6879/,#;Z/#$+")("'#&'#." &"/§$%28""6879/,#;Z/#$+")("'#&'#." &"/€$%28""6879/,#;Z/#$+")("'#&'#." &"/Y$%28""6879/,#;Z/#$+")("'#&'#." &"/2$2ž""6ž7Ÿ/#$+()(('#(''#(&'#(%'#($'#(#'#("'#&'#/& 8!: ! )`),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/&#0#*;j&&&#/"!&,)'),v('%$;j/&#0#*;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$$;!/&#0#*;!&&&#/L$2J""6J7K/=$$;!/&#0#*;!&&&#/'$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("%$;!/&#0#*;!&&&#/' 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("%$;!/&#0#*;!&&&#/' 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("%$;!/&#0#*;!&&&#/' 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("%$;!/&#0#*;!&&&#/' 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/…$;Å/|$$%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#0C*%$;'/&#0#*;'&&&#/,#;Å/#$+")("'#&'#&/,$;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("%$;!/&#0#*;!&&&#/' 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("%$;!/&#0#*;!&&&#/' 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 x(){return T(u,l)}function g(C,_){return{type:"literal",text:C,ignoreCase:_}}function S(C,_,E){return{type:"class",parts:C,inverted:_,ignoreCase:E}}function b(){return{type:"end"}}function y(C){let _=c[C],E;if(_)return _;for(E=C-1;!c[E];)E--;for(_=c[E],_={line:_.line,column:_.column};E<C;)e.charCodeAt(E)===10?(_.line++,_.column=1):_.column++,E++;return c[C]=_,_}function T(C,_){const E=y(C),P=y(_);return{source:n,start:{offset:C,line:E.line,column:E.column},end:{offset:_,line:P.line,column:P.column}}}function k(C){l<d||(l>d&&(d=l,p=[]),p.push(C))}function N(C,_,E){return new cp(cp.buildMessage(C,_),C,_,E)}function v(C){return C.split("").map(_=>_.charCodeAt(0)-32)}function B(C){const _=a[C];let E=0;const P=[];let R=_.length;const D=[],G=[];let W;for(;;){for(;E<R;)switch(_[E]){case 0:G.push(o[_[E+1]]),E+=2;break;case 1:G.push(void 0),E++;break;case 2:G.push(null),E++;break;case 3:G.push(r),E++;break;case 4:G.push([]),E++;break;case 5:G.push(l),E++;break;case 6:G.pop(),E++;break;case 7:l=G.pop(),E++;break;case 8:G.length-=_[E+1],E+=2;break;case 9:G.splice(-2,1),E++;break;case 10:G[G.length-2].push(G.pop()),E++;break;case 11:G.push(G.splice(G.length-_[E+1],_[E+1])),E+=2;break;case 12:G.push(e.substring(G.pop(),l)),E++;break;case 13:D.push(R),P.push(E+3+_[E+1]+_[E+2]),G[G.length-1]?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 14:D.push(R),P.push(E+3+_[E+1]+_[E+2]),G[G.length-1]===r?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 15:D.push(R),P.push(E+3+_[E+1]+_[E+2]),G[G.length-1]!==r?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 16:G[G.length-1]!==r?(D.push(R),P.push(E),R=E+2+_[E+1],E+=2):E+=2+_[E+1];break;case 17:D.push(R),P.push(E+3+_[E+1]+_[E+2]),e.length>l?(R=E+3+_[E+1],E+=3):(R=E+3+_[E+1]+_[E+2],E+=3+_[E+1]);break;case 18:D.push(R),P.push(E+4+_[E+2]+_[E+3]),e.substr(l,o[_[E+1]].length)===o[_[E+1]]?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 19:D.push(R),P.push(E+4+_[E+2]+_[E+3]),e.substr(l,o[_[E+1]].length).toLowerCase()===o[_[E+1]]?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 20:D.push(R),P.push(E+4+_[E+2]+_[E+3]),o[_[E+1]].test(e.charAt(l))?(R=E+4+_[E+2],E+=4):(R=E+4+_[E+2]+_[E+3],E+=4+_[E+2]);break;case 21:G.push(e.substr(l,_[E+1])),l+=_[E+1],E+=2;break;case 22:G.push(o[_[E+1]]),l+=o[_[E+1]].length,E+=2;break;case 23:G.push(r),h===0&&k(o[_[E+1]]),E+=2;break;case 24:u=G[G.length-1-_[E+1]],E+=2;break;case 25:u=l,E++;break;case 26:W=_.slice(E+4,E+4+_[E+3]).map(function(ae){return G[G.length-1-ae]}),G.splice(G.length-_[E+2],_[E+2],o[_[E+1]].apply(null,W)),E+=4+_[E+3];break;case 27:G.push(B(_[E+1])),E+=2;break;case 28:h++,E++;break;case 29:h--,E++;break;default:throw new Error("Invalid opcode: "+_[E]+".")}if(D.length>0)R=D.pop(),E=P.pop();else break}return G[0]}t.data={};function q(C,_){return[C].concat(_)}if(m=B(i),m!==r&&l===e.length)return m;throw m!==r&&l<e.length&&k(b()),N(p,d<e.length?e.charAt(d):null,d<e.length?T(d,d+1):T(d,d))}const ow=iw;var Ct;(function(e){function t(s,i){const o={startRule:i};try{ow(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})(Ct=Ct||(Ct={}));var aw={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 os(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 jo(e){return aw[e]||""}function Uo(){return os(10)}function Fr(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 $i(e){return encodeURIComponent(e).replace(/%[A-F\d]{2}/g,"U").length}var up=class{constructor(){this.headers={}}addHeader(e,t){const r={raw:t};e=Fr(e),this.headers[e]?this.headers[e].push(r):this.headers[e]=[r]}getHeader(e){const t=this.headers[Fr(e)];if(t){if(t[0])return t[0].raw}else return}getHeaders(e){const t=this.headers[Fr(e)],r=[];if(!t)return[];for(const n of t)r.push(n.raw);return r}hasHeader(e){return!!this.headers[Fr(e)]}parseHeader(e,t=0){if(e=Fr(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=Ct.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[Fr(e)]=[{raw:t}]}toString(){return this.data}},qs=class extends up{constructor(){super()}},Rn=class extends up{constructor(){super()}},Ul=class Ra{constructor(t,r,n,s,i,o,a){this.headers={},this.extraHeaders=[],this.options=Ra.getDefaultOptions(),i&&(this.options=Object.assign(Object.assign({},this.options),i),this.options.optionTags&&this.options.optionTags.length&&(this.options.optionTags=this.options.optionTags.slice()),this.options.routeSet&&this.options.routeSet.length&&(this.options.routeSet=this.options.routeSet.slice())),o&&o.length&&(this.extraHeaders=o.slice()),a&&(this.body={body:a.content,contentType:a.contentType}),this.method=t,this.ruri=r.clone(),this.fromURI=n.clone(),this.fromTag=this.options.fromTag?this.options.fromTag:Uo(),this.from=Ra.makeNameAddrHeader(this.fromURI,this.options.fromDisplayName,this.fromTag),this.toURI=s.clone(),this.toTag=this.options.toTag,this.to=Ra.makeNameAddrHeader(this.toURI,this.options.toDisplayName,this.toTag),this.callId=this.options.callId?this.options.callId:this.options.callIdPrefix+os(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 yr(t,r,s)}getHeader(t){const r=this.headers[Fr(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[Fr(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[Fr(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[Fr(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
16
16
  `,t+="User-Agent: "+this.options.userAgentString+`\r
17
- `,this.body?typeof this.body=="string"?(t+="Content-Length: "+Pi(this.body)+`\r
17
+ `,this.body?typeof this.body=="string"?(t+="Content-Length: "+$i(this.body)+`\r
18
18
  \r
19
19
  `,t+=this.body):this.body.body&&this.body.contentType?(t+="Content-Type: "+this.body.contentType+`\r
20
- `,t+="Content-Length: "+Pi(this.body.body)+`\r
20
+ `,t+="Content-Length: "+$i(this.body.body)+`\r
21
21
  \r
22
22
  `,t+=this.body.body):t+=`Content-Length: 0\r
23
23
  \r
24
24
  `:t+=`Content-Length: 0\r
25
25
  \r
26
- `,t}};function lp(e){return e==="application/sdp"?"session":"render"}function zo(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:lp(r),contentType:r,content:t}}function cp(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function Di(e){let t,r,n;if(e instanceof Bs&&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 Rn&&e.body){const s=e.parseHeader("Content-Disposition");t=s?s.type:void 0,r=e.parseHeader("Content-Type"),n=e.body}if(e instanceof Vl&&e.body)if(t=e.getHeader("Content-Disposition"),r=e.getHeader("Content-Type"),typeof e.body=="string"){if(!r)throw new Error("Header content type header does not equal body content type.");n=e.body}else{if(r&&r!==e.body.contentType)throw new Error("Header content type header does not equal body content type.");r=e.body.contentType,n=e.body.body}if(cp(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=lp(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var yr;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(yr=yr||(yr={}));var ve;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(ve=ve||(ve={}));var un=500,iw=4e3,jl=5e3;const At={T1:un,T2:iw,T4:jl,TIMER_B:64*un,TIMER_D:0*un,TIMER_F:64*un,TIMER_H:64*un,TIMER_I:0*jl,TIMER_J:0*un,TIMER_K:0*jl,TIMER_L:64*un,TIMER_M:64*un,TIMER_N:64*un,PROVISIONAL_RESPONSE_INTERVAL:6e4};var $n=class extends is{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 Pn=[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 up=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()}},Ul=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()}},ow=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof wr))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}},G;(function(e){e.Initial="Initial",e.Establishing="Establishing",e.Established="Established",e.Terminating="Terminating",e.Terminated="Terminated"})(G=G||(G={}));var zl=class $g{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=G.Initial,this.delegate=r.delegate,this._stateEventEmitter=new qs,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 G.Initial:break;case G.Establishing:break;case G.Established:return new Promise(t=>{this._bye({onAccept:()=>t(),onRedirect:()=>t(),onReject:()=>t()})});case G.Terminating:break;case G.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 G.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 G.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 G.Established:{const n=t.requestDelegate,s=this.copyRequestOptions(t.requestOptions);return this._bye(n,s)}case G.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 G.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!==G.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!==G.Established)return Promise.reject(new Error(`Invalid session state ${this.state}`));if(this.pendingReinvite)return Promise.reject(new Bl("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=Di(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(G.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===G.Terminated?i.ack():(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(G.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!==G.Terminated?(this.ackAndBye(i,488,"Bad Media Description"),this.stateTransition(G.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!==G.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(G.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: "+Pn.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!==G.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!==G.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 $g&&!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 yr.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case yr.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case yr.AckWait:return this.stateTransition(G.Terminating),new Promise(s=>{n.delegate={onAck:()=>{const i=n.bye(t,r);return this.stateTransition(G.Terminated),s(i),Promise.resolve()},onAckTimeout:()=>{const i=n.bye(t,r);this.stateTransition(G.Terminated),s(i)}}});case yr.Confirmed:{const s=n.bye(t,r);return this.stateTransition(G.Terminated),Promise.resolve(s)}case yr.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!==G.Established&&this.state!==G.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 X0(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case ve.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(G.Terminated),Promise.resolve()}case ve.Stable:{const s=Di(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(G.Terminated)}):Promise.resolve()}case ve.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(G.Terminated),Promise.resolve()}case ve.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(G.Terminated),Promise.resolve()}case ve.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!==G.Established){this.logger.error(`BYE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onBye){const r=new Q0(t);this.delegate.onBye(r)}else t.accept();this.stateTransition(G.Terminated)}onInfoRequest(t){if(this.logger.log("Session.onInfoRequest"),this.state!==G.Established){this.logger.error(`INFO received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onInfo){const r=new tw(t);this.delegate.onInfo(r)}else t.accept()}onInviteRequest(t){if(this.logger.log("Session.onInviteRequest"),this.state!==G.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=xt.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===ve.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!==G.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(G.Terminated)}this.delegate&&this.delegate.onInvite&&this.delegate.onInvite(t.message,o.message,488)})})}onMessageRequest(t){if(this.logger.log("Session.onMessageRequest"),this.state!==G.Established){this.logger.error(`MESSAGE received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onMessage){const r=new up(t);this.delegate.onMessage(r)}else t.accept()}onNotifyRequest(t){if(this.logger.log("Session.onNotifyRequest"),this.state!==G.Established){this.logger.error(`NOTIFY received while in state ${this.state}, dropping request`);return}if(this.onNotify){const r=new Ul(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new Ul(t);this.delegate.onNotify(r)}else t.accept()}onPrackRequest(t){if(this.logger.log("Session.onPrackRequest"),this.state!==G.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!==G.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 ow(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=Di(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 ve.Initial:return this.getOffer(t);case ve.HaveLocalOffer:return Promise.resolve(void 0);case ve.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 ve.Stable:return this.state!==G.Established?Promise.resolve(void 0):this.getOffer(t);case ve.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=>zo(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 ql)}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 ql)}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=>zo(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 G.Initial:t!==G.Establishing&&t!==G.Established&&t!==G.Terminating&&t!==G.Terminated&&r();break;case G.Establishing:t!==G.Established&&t!==G.Terminating&&t!==G.Terminated&&r();break;case G.Established:t!==G.Terminating&&t!==G.Terminated&&r();break;case G.Terminating:t!==G.Terminated&&r();break;case G.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===G.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=jo(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 In)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}},$r;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})($r=$r||($r={}));const aw={"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 Ls=class extends zl{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(G.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===G.Initial&&(t.reject({statusCode:487}),this.stateTransition(G.Terminated))},a)}const i=this.request.getHeader("P-Asserted-Identity");i&&(this._assertedIdentity=xt.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 G.Initial:return this.reject().then(()=>super.dispose());case G.Establishing:return this.reject().then(()=>super.dispose());case G.Established:return super.dispose();case G.Terminating:return super.dispose();case G.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!==G.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(G.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(G.Established),this._replacee&&this._replacee._bye()}).catch(t=>this.handleResponseError(t))}progress(e={}){if(this.logger.log("Invitation.progress"),this.state!==G.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===$r.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!==G.Initial&&this.state!==G.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:jo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?zo(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(G.Terminated),Promise.resolve()}_onCancel(e){if(this.logger.log("Invitation._onCancel"),this.state!==G.Initial&&this.state!==G.Establishing){this.logger.error(`CANCEL received while in state ${this.state}, dropping request`);return}if(this.delegate&&this.delegate.onCancel){const t=new ew(e);this.delegate.onCancel(t)}this.isCanceled=!0,this.incomingInviteRequest.reject({statusCode:487}),this.stateTransition(G.Terminated)}handlePrackOfferAnswer(e){if(!this.dialog)throw new Error("Dialog undefined.");const t=Di(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 ve.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ve.Stable:return this.setAnswer(t,r).then(()=>{});case ve.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case ve.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case ve.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 ql?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof Z0?this.logger.error("A session description handler occurred while sending response"):e instanceof Ll?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):e instanceof $n&&this.logger.error("Session changed state before response could be formulated and sent"),this.state===G.Initial||this.state===G.Establishing)try{this.incomingInviteRequest.reject({statusCode:t}),this.stateTransition(G.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(G.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?zo(e.body):void 0;if(t===183&&!s)return this.sendProgressWithSDP(e);try{const i=this.incomingInviteRequest.progress({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s});return this._dialog=i.session,Promise.resolve(i)}catch(i){return Promise.reject(i)}}sendProgressWithSDP(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();return this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(i=>this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})).then(i=>(this._dialog=i.session,i))}sendProgressReliable(e={}){return e.extraHeaders=(e.extraHeaders||[]).slice(),e.extraHeaders.push("Require: 100rel"),e.extraHeaders.push("RSeq: "+Math.floor(Math.random()*1e4)),this.sendProgressWithSDP(e)}sendProgressReliableWaitForPrack(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();s.push("Require: 100rel"),s.push("RSeq: "+this.rseq++);let i;return new Promise((o,a)=>{this.waitingForPrack=!0,this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(l=>(i=l,this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i}))).then(l=>{this._dialog=l.session;let u,c;l.session.delegate={onPrack:x=>{u=x,clearTimeout(p),clearTimeout(w),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(u).then(g=>{try{c=u.accept({statusCode:200,body:g}),this.prackArrived(),o({prackRequest:u,prackResponse:c,progressResponse:l})}catch(S){a(S)}}).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 Ll)).catch(x=>a(x)))},At.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(x){this.waitingForPrack=!1,a(x);return}w=setTimeout(h,m*=2)};let m=At.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 Ll),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},Ko=class extends zl{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=Uo(),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"?xt.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"?xt.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===$r.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===$r.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 G.Initial:return this.cancel().then(()=>super.dispose());case G.Establishing:return this.cancel().then(()=>super.dispose());case G.Established:return super.dispose();case G.Terminating:return super.dispose();case G.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!==G.Initial&&this.state!==G.Establishing){const r=new Error(`Invalid session state ${this.state}`);return this.logger.error(r.message),Promise.reject(r)}this.isCanceled=!0,this.stateTransition(G.Terminating);function t(r,n){if(r&&r<200||r>699)throw new TypeError("Invalid statusCode: "+r);if(r){const s=r,i=jo(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(G.Terminated);return Promise.resolve()}invite(e={}){if(this.logger.log("Inviter.invite"),this.state!==G.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(G.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(G.Establishing),this.sendInvite(e))).catch(r=>{throw this.logger.log(r.message),this.state!==G.Terminated&&this.stateTransition(G.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(G.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 zl))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!==G.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=xt.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 ve.Initial:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(G.Terminated),Promise.reject(new Error("Bad Media Description"));case ve.HaveLocalOffer:return this.logger.error("Received 2xx response to INVITE without a session description"),this.ackAndBye(e,400,"Missing session description"),this.stateTransition(G.Terminated),Promise.reject(new Error("Bad Media Description"));case ve.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(G.Established)}).catch(s=>{throw this.ackAndBye(e,488,"Invalid session description"),this.stateTransition(G.Terminated),s})}case ve.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(G.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(G.Terminated),Promise.reject(i)}return e.ack(),this.stateTransition(G.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(G.Established)}).catch(i=>{throw this.logger.error(i.message),this.ackAndBye(e,488,"Not Acceptable Here"),this.stateTransition(G.Terminated),i})}case ve.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!==G.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=xt.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 ve.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 ve.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case ve.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(G.Terminated),u})}case ve.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(G.Terminated),c})}return Promise.resolve();case ve.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!==G.Establishing&&this.state!==G.Terminating){this.logger.error(`Redirect received while in state ${this.state}, dropping response`);return}this.stateTransition(G.Terminated)}onReject(e){if(this.logger.log("Inviter.onReject"),this.state!==G.Establishing&&this.state!==G.Terminating){this.logger.error(`Reject received while in state ${this.state}, dropping response`);return}this.stateTransition(G.Terminated)}onTrying(e){if(this.logger.log("Inviter.onTrying"),this.state!==G.Establishing){this.logger.error(`Trying received while in state ${this.state}, dropping response`);return}}},rt;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(rt=rt||(rt={}));var Wo=class ms{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=rt.Initial,this._waiting=!1,this._stateEventEmitter=new qs,this._waitingEventEmitter=new qs,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},ms.defaultOptions()),{registrar:n}),ms.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&&xt.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||ms.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||ms.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:ms.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new In("sip","anonymous","anonymous.invalid"),refreshFrequency:ms.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===rt.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===rt.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 Bl("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&&ip(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(ip(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=xt.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=xt.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===rt.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==rt.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new Bl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==rt.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!==rt.Registered&&this.stateTransition(rt.Registered)}unregistered(){this.clearTimers(),this._state!==rt.Unregistered&&this.stateTransition(rt.Unregistered)}terminated(){this.clearTimers(),this._state!==rt.Terminated&&this.stateTransition(rt.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case rt.Initial:t!==rt.Registered&&t!==rt.Unregistered&&t!==rt.Terminated&&r();break;case rt.Registered:t!==rt.Unregistered&&t!==rt.Terminated&&r();break;case rt.Unregistered:t!==rt.Registered&&t!==rt.Terminated&&r();break;case rt.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===rt.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===rt.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)}};Wo.defaultExpires=600,Wo.defaultRefreshFrequency=99;var Je;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Je=Je||(Je={}));var Ae;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(Ae=Ae||(Ae={}));var $t;(function(e){e.Started="Started",e.Stopped="Stopped"})($t=$t||($t={}));var Dn=class xr{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=xr.hexChars,n=xr.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(xr.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,xr._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,xr._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,xr._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(xr.buffer32Identity.subarray(i),i),r>55&&(xr._md5cycle(this._state,s),s.set(xr.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 xr._md5cycle(this._state,s),t?this._state:xr._hex(this._state)}};Dn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),Dn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Dn.hexChars="0123456789abcdef",Dn.hexOut=[],Dn.onePassHasher=new Dn,Dn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function On(e){return Dn.hashStr(e)}var lw=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=os(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=On(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=On(this.method+":"+this.uri),this.response=On(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=On(this.method+":"+this.uri+":"+On(e||"")),this.response=On(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=On(this.method+":"+this.uri),this.response=On(t+":"+this.nonce+":"+r))}},kt;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(kt=kt||(kt={}));var dp=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(kt.error,e)}warn(e){this.genericLog(kt.warn,e)}log(e){this.genericLog(kt.log,e)}debug(e){this.genericLog(kt.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}},cw=class{constructor(){this.builtinEnabled=!0,this._level=kt.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:kt.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 dp(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new dp(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(kt[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 kt.error:console.error(n);break;case kt.warn:console.warn(n);break;case kt.log:console.log(n);break;case kt.debug:console.debug(n);break;default:break}}},Go;(function(e){function t(s,i){let o=i,a=0,l=0;if(s.substring(o,o+2).match(/(^\r\n)/))return-2;for(;a===0;){if(l=s.indexOf(`\r
27
- `,o),l===-1)return l;!s.substring(l+2,l+4).match(/(^\r\n)/)&&s.charAt(l+2).match(/(^\s+)/)?o=l+2:a=l}return a}e.getHeader=t;function r(s,i,o,a){const l=i.indexOf(":",o),u=i.substring(o,l).trim(),c=i.substring(l+1,a).trim();let d;switch(u.toLowerCase()){case"via":case"v":s.addHeader("via",c),s.getHeaders("via").length===1?(d=s.parseHeader("Via"),d&&(s.via=d,s.viaBranch=d.branch)):d=0;break;case"from":case"f":s.setHeader("from",c),d=s.parseHeader("from"),d&&(s.from=d,s.fromTag=d.getParam("tag"));break;case"to":case"t":s.setHeader("to",c),d=s.parseHeader("to"),d&&(s.to=d,s.toTag=d.getParam("tag"));break;case"record-route":if(d=xt.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=xt.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 Rn&&(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=xt.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 Rn,c.statusCode=u.status_code,c.reasonPhrase=u.reason_phrase):(c=new Bs,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})(Go=Go||(Go={}));function fp(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:jo(t.statusCode);let s="SIP/2.0 "+t.statusCode+" "+n+`\r
26
+ `,t}};function dp(e){return e==="application/sdp"?"session":"render"}function zo(e){const t=typeof e=="string"?e:e.body,r=typeof e=="string"?"application/sdp":e.contentType;return{contentDisposition:dp(r),contentType:r,content:t}}function fp(e){return e&&typeof e.content=="string"&&typeof e.contentType=="string"&&e.contentDisposition===void 0?!0:typeof e.contentDisposition=="string"}function Pi(e){let t,r,n;if(e instanceof qs&&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 Rn&&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 Ul&&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(fp(e)&&(t=e.contentDisposition,r=e.contentType,n=e.content),!!n){if(r&&!t&&(t=dp(r)),!t)throw new Error("Content disposition undefined.");if(!r)throw new Error("Content type undefined.");return{contentDisposition:t,contentType:r,content:n}}}var br;(function(e){e.Initial="Initial",e.Early="Early",e.AckWait="AckWait",e.Confirmed="Confirmed",e.Terminated="Terminated"})(br=br||(br={}));var me;(function(e){e.Initial="Initial",e.HaveLocalOffer="HaveLocalOffer",e.HaveRemoteOffer="HaveRemoteOffer",e.Stable="Stable",e.Closed="Closed"})(me=me||(me={}));var dn=500,lw=4e3,zl=5e3;const At={T1:dn,T2:lw,T4:zl,TIMER_B:64*dn,TIMER_D:0*dn,TIMER_F:64*dn,TIMER_H:64*dn,TIMER_I:0*zl,TIMER_J:0*dn,TIMER_K:0*zl,TIMER_L:64*dn,TIMER_M:64*dn,TIMER_N:64*dn,PROVISIONAL_RESPONSE_INTERVAL:6e4};var $n=class extends is{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 Pn=[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 pp=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()}},Kl=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()}},cw=class{constructor(e,t){this.incomingReferRequest=e,this.session=t}get referTo(){const e=this.incomingReferRequest.message.parseHeader("refer-to");if(!(e instanceof yr))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 Wl=class Og{constructor(t,r={}){this.pendingReinvite=!1,this.pendingReinviteAck=!1,this._state=z.Initial,this.delegate=r.delegate,this._stateEventEmitter=new Ns,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 Fl("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=Pi(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: "+Pn.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 Og&&!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 br.Initial:throw new Error(`Invalid dialog state ${n.sessionState}`);case br.Early:throw new Error(`Invalid dialog state ${n.sessionState}`);case br.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 br.Confirmed:{const s=n.bye(t,r);return this.stateTransition(z.Terminated),Promise.resolve(s)}case br.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 tw(t);this.delegate.onAck(s)}switch(this.pendingReinviteAck=!1,r.signalingState){case me.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 me.Stable:{const s=Pi(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 me.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 me.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 me.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 rw(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 sw(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=Ct.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===me.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 pp(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 Kl(t);this.onNotify(r);return}if(this.delegate&&this.delegate.onNotify){const r=new Kl(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 cw(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=Pi(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 me.Initial:return this.getOffer(t);case me.HaveLocalOffer:return Promise.resolve(void 0);case me.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 me.Stable:return this.state!==z.Established?Promise.resolve(void 0):this.getOffer(t);case me.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=>zo(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 Ll)}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 Ll)}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=>zo(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=jo(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 In)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}},Pr;(function(e){e.Required="Required",e.Supported="Supported",e.Unsupported="Unsupported"})(Pr=Pr||(Pr={}));const uw={"100rel":!0,199:!0,answermode:!0,"early-session":!0,eventlist:!0,explicitsub:!0,"from-change":!0,"geolocation-http":!0,"geolocation-sip":!0,gin:!0,gruu:!0,histinfo:!0,ice:!0,join:!0,"multiple-refer":!0,norefersub:!0,nosub:!0,outbound:!0,path:!0,policy:!0,precondition:!0,pref:!0,privacy:!0,"recipient-list-invite":!0,"recipient-list-message":!0,"recipient-list-subscribe":!0,replaces:!0,"resource-priority":!0,"sdp-anat":!0,"sec-agree":!0,tdialog:!0,timer:!0,uui:!0};var Bs=class extends Wl{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=Ct.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===Pr.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:jo(t),n=e.extraHeaders||[];if(t<300||t>699)throw new TypeError("Invalid statusCode: "+t);const s=e.body?zo(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 nw(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=Pi(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 me.Initial:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case me.Stable:return this.setAnswer(t,r).then(()=>{});case me.HaveLocalOffer:throw new Error(`Invalid signaling state ${this.dialog.signalingState}.`);case me.HaveRemoteOffer:return this.setOfferAndGetAnswer(t,r);case me.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 Ll?(this.logger.error("A session description handler occurred while sending response (content type unsupported"),t=415):e instanceof ew?this.logger.error("A session description handler occurred while sending response"):e instanceof Vl?this.logger.error("Session ended before response could be formulated and sent (while waiting for PRACK)"):e instanceof $n&&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?zo(e.body):void 0;if(t===183&&!s)return this.sendProgressWithSDP(e);try{const i=this.incomingInviteRequest.progress({statusCode:t,reasonPhrase:r,extraHeaders:n,body:s});return this._dialog=i.session,Promise.resolve(i)}catch(i){return Promise.reject(i)}}sendProgressWithSDP(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();return this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(i=>this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})).then(i=>(this._dialog=i.session,i))}sendProgressReliable(e={}){return e.extraHeaders=(e.extraHeaders||[]).slice(),e.extraHeaders.push("Require: 100rel"),e.extraHeaders.push("RSeq: "+Math.floor(Math.random()*1e4)),this.sendProgressWithSDP(e)}sendProgressReliableWaitForPrack(e={}){const t={sessionDescriptionHandlerOptions:this.sessionDescriptionHandlerOptions,sessionDescriptionHandlerModifiers:this.sessionDescriptionHandlerModifiers},r=e.statusCode||183,n=e.reasonPhrase,s=(e.extraHeaders||[]).slice();s.push("Require: 100rel"),s.push("RSeq: "+this.rseq++);let i;return new Promise((o,a)=>{this.waitingForPrack=!0,this.generateResponseOfferAnswer(this.incomingInviteRequest,t).then(l=>(i=l,this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i}))).then(l=>{this._dialog=l.session;let u,c;l.session.delegate={onPrack:x=>{u=x,clearTimeout(p),clearTimeout(w),this.waitingForPrack&&(this.waitingForPrack=!1,this.handlePrackOfferAnswer(u).then(g=>{try{c=u.accept({statusCode:200,body:g}),this.prackArrived(),o({prackRequest:u,prackResponse:c,progressResponse:l})}catch(S){a(S)}}).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 Vl)).catch(x=>a(x)))},At.T1*64),h=()=>{try{this.incomingInviteRequest.progress({statusCode:r,reasonPhrase:n,extraHeaders:s,body:i})}catch(x){this.waitingForPrack=!1,a(x);return}w=setTimeout(h,m*=2)};let m=At.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 Vl),this.waitingForPrackPromise=void 0,this.waitingForPrackResolve=void 0,this.waitingForPrackReject=void 0}},Ko=class extends Wl{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=Uo(),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"?Ct.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"?Ct.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===Pr.Required&&u.push("Require: 100rel"),e.configuration.sipExtensionReplaces===Pr.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=jo(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 Wl))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=Ct.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 me.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 me.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 me.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 me.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 me.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=Ct.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 me.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 me.HaveLocalOffer:return o&&e.prack({extraHeaders:a}),Promise.resolve();case me.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 me.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 me.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}}},nt;(function(e){e.Initial="Initial",e.Registered="Registered",e.Unregistered="Unregistered",e.Terminated="Terminated"})(nt=nt||(nt={}));var Wo=class vs{constructor(t,r={}){this.disposed=!1,this._contacts=[],this._retryAfter=void 0,this._state=nt.Initial,this._waiting=!1,this._stateEventEmitter=new Ns,this._waitingEventEmitter=new Ns,this.userAgent=t;const n=t.configuration.uri.clone();if(n.user=void 0,this.options=Object.assign(Object.assign(Object.assign({},vs.defaultOptions()),{registrar:n}),vs.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&&Ct.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||vs.defaultExpires,this.expires<0)throw new Error("Invalid expires.");if(this.refreshFrequency=this.options.refreshFrequency||vs.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:vs.defaultExpires,extraContactHeaderParams:[],extraHeaders:[],logConfiguration:!0,instanceId:"",params:{},regId:0,registrar:new In("sip","anonymous","anonymous.invalid"),refreshFrequency:vs.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===nt.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===nt.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 Fl("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&&lp(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(lp(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=Ct.URIParse(l.replace(/"/g,"")))}if(a.hasParam("pub-gruu")){const l=a.getParam("pub-gruu");l&&(this.userAgent.contact.pubGruu=Ct.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===nt.Terminated)throw this.stateError(),new Error("Registerer terminated. Unable to register.");if(this.disposed&&this.state!==nt.Registered)throw this.stateError(),new Error("Registerer disposed. Unable to register.");if(this.waiting){this.waitingWarning();const s=new Fl("REGISTER request already in progress, waiting for final response");return Promise.reject(s)}this._state!==nt.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!==nt.Registered&&this.stateTransition(nt.Registered)}unregistered(){this.clearTimers(),this._state!==nt.Unregistered&&this.stateTransition(nt.Unregistered)}terminated(){this.clearTimers(),this._state!==nt.Terminated&&this.stateTransition(nt.Terminated)}stateTransition(t){const r=()=>{throw new Error(`Invalid state transition from ${this._state} to ${t}`)};switch(this._state){case nt.Initial:t!==nt.Registered&&t!==nt.Unregistered&&t!==nt.Terminated&&r();break;case nt.Registered:t!==nt.Unregistered&&t!==nt.Terminated&&r();break;case nt.Unregistered:t!==nt.Registered&&t!==nt.Terminated&&r();break;case nt.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===nt.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===nt.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)}};Wo.defaultExpires=600,Wo.defaultRefreshFrequency=99;var Je;(function(e){e.Initial="Initial",e.NotifyWait="NotifyWait",e.Pending="Pending",e.Active="Active",e.Terminated="Terminated"})(Je=Je||(Je={}));var Ee;(function(e){e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Disconnected="Disconnected"})(Ee=Ee||(Ee={}));var $t;(function(e){e.Started="Started",e.Stopped="Stopped"})($t=$t||($t={}));var Dn=class Tr{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=Tr.hexChars,n=Tr.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(Tr.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,Tr._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,Tr._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,Tr._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(Tr.buffer32Identity.subarray(i),i),r>55&&(Tr._md5cycle(this._state,s),s.set(Tr.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 Tr._md5cycle(this._state,s),t?this._state:Tr._hex(this._state)}};Dn.stateIdentity=new Int32Array([1732584193,-271733879,-1732584194,271733878]),Dn.buffer32Identity=new Int32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Dn.hexChars="0123456789abcdef",Dn.hexOut=[],Dn.onePassHasher=new Dn,Dn.hashStr("hello")!=="5d41402abc4b2a76b9719d911017c592"&&console.error("Md5 self test failed.");function On(e){return Dn.hashStr(e)}var dw=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=os(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=On(this.username+":"+this.realm+":"+this.password)),this.qop==="auth"?(r=On(this.method+":"+this.uri),this.response=On(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth:"+r)):this.qop==="auth-int"?(r=On(this.method+":"+this.uri+":"+On(e||"")),this.response=On(t+":"+this.nonce+":"+this.ncHex+":"+this.cnonce+":auth-int:"+r)):this.qop===void 0&&(r=On(this.method+":"+this.uri),this.response=On(t+":"+this.nonce+":"+r))}},kt;(function(e){e[e.error=0]="error",e[e.warn=1]="warn",e[e.log=2]="log",e[e.debug=3]="debug"})(kt=kt||(kt={}));var hp=class{constructor(e,t,r){this.logger=e,this.category=t,this.label=r}error(e){this.genericLog(kt.error,e)}warn(e){this.genericLog(kt.warn,e)}log(e){this.genericLog(kt.log,e)}debug(e){this.genericLog(kt.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}},fw=class{constructor(){this.builtinEnabled=!0,this._level=kt.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:kt.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 hp(this,e,t);if(this.loggers[e])return this.loggers[e];{const r=new hp(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(kt[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 kt.error:console.error(n);break;case kt.warn:console.warn(n);break;case kt.log:console.log(n);break;case kt.debug:console.debug(n);break;default:break}}},Go;(function(e){function t(s,i){let o=i,a=0,l=0;if(s.substring(o,o+2).match(/(^\r\n)/))return-2;for(;a===0;){if(l=s.indexOf(`\r
27
+ `,o),l===-1)return l;!s.substring(l+2,l+4).match(/(^\r\n)/)&&s.charAt(l+2).match(/(^\s+)/)?o=l+2:a=l}return a}e.getHeader=t;function r(s,i,o,a){const l=i.indexOf(":",o),u=i.substring(o,l).trim(),c=i.substring(l+1,a).trim();let d;switch(u.toLowerCase()){case"via":case"v":s.addHeader("via",c),s.getHeaders("via").length===1?(d=s.parseHeader("Via"),d&&(s.via=d,s.viaBranch=d.branch)):d=0;break;case"from":case"f":s.setHeader("from",c),d=s.parseHeader("from"),d&&(s.from=d,s.fromTag=d.getParam("tag"));break;case"to":case"t":s.setHeader("to",c),d=s.parseHeader("to"),d&&(s.to=d,s.toTag=d.getParam("tag"));break;case"record-route":if(d=Ct.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=Ct.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 Rn&&(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=Ct.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 Rn,c.statusCode=u.status_code,c.reasonPhrase=u.reason_phrase):(c=new qs,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})(Go=Go||(Go={}));function gp(e,t){if(t.statusCode<100||t.statusCode>699)throw new TypeError("Invalid statusCode: "+t.statusCode);const n=t.reasonPhrase?t.reasonPhrase:jo(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
@@ -35,11 +35,11 @@
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
37
37
  `,"")),s+=l,s+=i,s+=u,s+=a,s+=o,s+=c,s+=d,s+=p,t.body?(s+="Content-Type: "+t.body.contentType+`\r
38
- `,s+="Content-Length: "+Pi(t.body.content)+`\r
38
+ `,s+="Content-Length: "+$i(t.body.content)+`\r
39
39
  \r
40
40
  `,s+=t.body.content):s+=`Content-Length: 0\r
41
41
  \r
42
- `,{message:s}}var Kl=class extends is{constructor(e){super(e||"Unspecified transport error.")}},pp=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 Kl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Kl(t.message):r=new Kl,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"}},hp=class extends pp{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},j;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(j=j||(j={}));var Qt=class extends hp{constructor(e,t,r){super(e,t,r,j.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 j.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 j.Accepted:if(e.method===be.INVITE)return;break;case j.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(j.Confirmed);return}break;case j.Confirmed:if(e.method===be.INVITE||e.method===be.ACK)return;break;case j.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 j.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(j.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(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case j.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case j.Completed:break;case j.Confirmed:break;case j.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===j.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 j.Proceeding:t();break;case j.Accepted:case j.Completed:this.state!==j.Proceeding&&t();break;case j.Confirmed:this.state!==j.Completed&&t();break;case j.Terminated:this.state!==j.Accepted&&this.state!==j.Completed&&this.state!==j.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===j.Accepted&&(this.L=setTimeout(()=>this.timerL(),At.TIMER_L)),e===j.Completed&&(this.H=setTimeout(()=>this.timerH(),At.TIMER_H)),e===j.Confirmed&&(this.I=setTimeout(()=>this.timerI(),At.TIMER_I)),e===j.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.")})},At.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===j.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(j.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(j.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===j.Accepted&&this.stateTransition(j.Terminated)}},gp=class Pg extends pp{constructor(t,r,n,s,i){super(r,n,Pg.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()}},nr=class extends gp{constructor(e,t,r){super(e,t,r,j.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),At.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 j.Trying:if(t>=100&&t<=199){this.stateTransition(j.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(j.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(j.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Completed:return;case j.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(j.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 j.Trying:r();break;case j.Proceeding:this.state!==j.Trying&&r();break;case j.Completed:this.state!==j.Trying&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Trying&&this.state!==j.Proceeding&&this.state!==j.Completed&&(t||r());break;default:r()}e===j.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),At.TIMER_K)),e===j.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===j.Trying||this.state===j.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(j.Terminated))}timerK(){this.state===j.Completed&&this.stateTransition(j.Terminated)}},Fs=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 wr))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 wr))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}},Hn=class extends gp{constructor(e,t,r){super(e,t,r,j.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),At.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 j.Calling:if(t>=100&&t<=199){this.stateTransition(j.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(j.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(j.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.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(j.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(j.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.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 j.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case j.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(j.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 Gl=class extends is{constructor(e){super(e||"Unspecified transport error.")}},vp=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 Gl)throw this.onTransportError(t),t;let r;throw t&&typeof t.message=="string"?r=new Gl(t.message):r=new Gl,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"}},mp=class extends vp{constructor(e,t,r,n,s){super(t,r,e.viaBranch,n,s),this._request=e,this.user=r}get request(){return this._request}},j;(function(e){e.Accepted="Accepted",e.Calling="Calling",e.Completed="Completed",e.Confirmed="Confirmed",e.Proceeding="Proceeding",e.Terminated="Terminated",e.Trying="Trying"})(j=j||(j={}));var Qt=class extends mp{constructor(e,t,r){super(e,t,r,j.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 j.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 j.Accepted:if(e.method===be.INVITE)return;break;case j.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(j.Confirmed);return}break;case j.Confirmed:if(e.method===be.INVITE||e.method===be.ACK)return;break;case j.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 j.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(j.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(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send non-2xx final response.")});return}break;case j.Accepted:if(e>=200&&e<=299){this.send(t).catch(n=>{this.logTransportError(n,"Failed to send 2xx response.")});return}break;case j.Completed:break;case j.Confirmed:break;case j.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===j.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 j.Proceeding:t();break;case j.Accepted:case j.Completed:this.state!==j.Proceeding&&t();break;case j.Confirmed:this.state!==j.Completed&&t();break;case j.Terminated:this.state!==j.Accepted&&this.state!==j.Completed&&this.state!==j.Confirmed&&t();break;default:t()}this.stopProgressExtensionTimer(),e===j.Accepted&&(this.L=setTimeout(()=>this.timerL(),At.TIMER_L)),e===j.Completed&&(this.H=setTimeout(()=>this.timerH(),At.TIMER_H)),e===j.Confirmed&&(this.I=setTimeout(()=>this.timerI(),At.TIMER_I)),e===j.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.")})},At.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===j.Completed&&(this.logger.warn("ACK to negative final response was never received, terminating transaction."),this.stateTransition(j.Terminated))}timerI(){this.logger.debug(`Timer I expired for INVITE server transaction ${this.id}.`),this.stateTransition(j.Terminated)}timerL(){this.logger.debug(`Timer L expired for INVITE server transaction ${this.id}.`),this.state===j.Accepted&&this.stateTransition(j.Terminated)}},wp=class Hg extends vp{constructor(t,r,n,s,i){super(r,n,Hg.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()}},nr=class extends wp{constructor(e,t,r){super(e,t,r,j.Trying,"sip.transaction.nict"),this.F=setTimeout(()=>this.timerF(),At.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 j.Trying:if(t>=100&&t<=199){this.stateTransition(j.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=699){if(this.stateTransition(j.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Proceeding:if(t>=100&&t<=199&&this.user.receiveResponse)return this.user.receiveResponse(e);if(t>=200&&t<=699){if(this.stateTransition(j.Completed),t===408){this.onRequestTimeout();return}this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.Completed:return;case j.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(j.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 j.Trying:r();break;case j.Proceeding:this.state!==j.Trying&&r();break;case j.Completed:this.state!==j.Trying&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Trying&&this.state!==j.Proceeding&&this.state!==j.Completed&&(t||r());break;default:r()}e===j.Completed&&(this.F&&(clearTimeout(this.F),this.F=void 0),this.K=setTimeout(()=>this.timerK(),At.TIMER_K)),e===j.Terminated&&this.dispose(),this.setState(e)}timerF(){this.logger.debug(`Timer F expired for non-INVITE client transaction ${this.id}.`),(this.state===j.Trying||this.state===j.Proceeding)&&(this.onRequestTimeout(),this.stateTransition(j.Terminated))}timerK(){this.state===j.Completed&&this.stateTransition(j.Terminated)}},Ls=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 yr))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 yr))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}},Hn=class extends wp{constructor(e,t,r){super(e,t,r,j.Calling,"sip.transaction.ict"),this.ackRetransmissionCache=new Map,this.B=setTimeout(()=>this.timerB(),At.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 j.Calling:if(t>=100&&t<=199){this.stateTransition(j.Proceeding),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=200&&t<=299){this.ackRetransmissionCache.set(e.toTag,void 0),this.stateTransition(j.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(j.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.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(j.Accepted),this.user.receiveResponse&&this.user.receiveResponse(e);return}if(t>=300&&t<=699){this.stateTransition(j.Completed),this.ack(e),this.user.receiveResponse&&this.user.receiveResponse(e);return}break;case j.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 j.Completed:if(t>=300&&t<=699){this.ack(e);return}break;case j.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(j.Terminated,!0)}typeToString(){return"INVITE client transaction"}ack(e){const t=this.request.ruri,r=this.request.callId,n=this.request.cseq,s=this.request.getHeader("from"),i=e.getHeader("to"),o=this.request.getHeader("via"),a=this.request.getHeader("route");if(!s)throw new Error("From undefined.");if(!i)throw new Error("To undefined.");if(!o)throw new Error("Via undefined.");let l=`ACK ${t} SIP/2.0\r
43
43
  `;a&&(l+=`Route: ${a}\r
44
44
  `),l+=`Via: ${o}\r
45
45
  `,l+=`To: ${i}\r
@@ -49,31 +49,31 @@
49
49
  `,l+=`Max-Forwards: 70\r
50
50
  `,l+=`Content-Length: 0\r
51
51
  \r
52
- `,this.send(l).catch(u=>{this.logTransportError(u,"Failed to send ACK to non-2xx response.")})}stateTransition(e,t=!1){const r=()=>{throw new Error(`Invalid state transition from ${this.state} to ${e}`)};switch(e){case j.Calling:r();break;case j.Proceeding:this.state!==j.Calling&&r();break;case j.Accepted:case j.Completed:this.state!==j.Calling&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Calling&&this.state!==j.Accepted&&this.state!==j.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),j.Proceeding,e===j.Completed&&(this.D=setTimeout(()=>this.timerD(),At.TIMER_D)),e===j.Accepted&&(this.M=setTimeout(()=>this.timerM(),At.TIMER_M)),e===j.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===j.Calling&&(this.onRequestTimeout(),this.stateTransition(j.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===j.Completed&&this.stateTransition(j.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===j.Accepted&&this.stateTransition(j.Terminated)}},sr=class lu{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===j.Proceeding?new lu(nr,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===j.Proceeding&&new lu(nr,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 Rn;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 Rn;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===j.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)}},uw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.BYE,r);super(nr,e.userAgentCore,n,t),e.dispose()}},ir=class extends hp{constructor(e,t,r){super(e,t,r,j.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 j.Trying:break;case j.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 j.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 j.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 j.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(j.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case j.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case j.Completed:return;case j.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(j.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 j.Trying:r();break;case j.Proceeding:this.state!==j.Trying&&r();break;case j.Completed:this.state!==j.Trying&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Proceeding&&this.state!==j.Completed&&(t||r());break;default:r()}e===j.Completed&&(this.J=setTimeout(()=>this.timerJ(),At.TIMER_J)),e===j.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===j.Completed&&this.stateTransition(j.Terminated)}},Fr=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:Uo(),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 $n(`${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 $n(`${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 $n(`${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 $n(`${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 $n(`${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 Qt)return this.transaction.state===j.Proceeding||this.transaction.state===j.Accepted;if(this.transaction instanceof ir)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return this.transaction.state===j.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=fp(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===j.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)}},dw=class extends Fr{constructor(e,t,r){super(ir,e.userAgentCore,t,r)}},fw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INFO,r);super(nr,e.userAgentCore,n,t)}},pw=class extends Fr{constructor(e,t,r){super(ir,e.userAgentCore,t,r)}},vp=class extends sr{constructor(e,t,r){super(nr,e,t,r)}},mp=class extends Fr{constructor(e,t,r){super(ir,e,t,r)}},hw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.NOTIFY,r);super(nr,e.userAgentCore,n,t)}};function gw(e){return e.userAgentCore!==void 0}var Jo=class extends Fr{constructor(e,t,r){const n=gw(e)?e.userAgentCore:e;super(ir,n,t,r)}},vw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.PRACK,r);super(nr,e.userAgentCore,n,t),e.signalingStateTransition(n)}},mw=class extends Fr{constructor(e,t,r){super(ir,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)}},ww=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INVITE,r);super(Hn,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}`)}}},yw=class extends Fr{constructor(e,t,r){super(Qt,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)}},bw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.REFER,r);super(nr,e.userAgentCore,n,t)}};function _w(e){return e.userAgentCore!==void 0}var wp=class extends Fr{constructor(e,t,r){const n=_w(e)?e.userAgentCore:e;super(ir,n,t,r)}},Yo=class extends Fs{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=ve.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof Qt&&(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=ve.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?yr.Early:this.ackWait?yr.AckWait:this._signalingState===ve.Closed?yr.Terminated:yr.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 Hn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof Hn))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 Qt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==j.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 uw(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 fw(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 ww(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 vp(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 hw(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new vw(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 bw(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 Hn){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!==ve.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 wr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case be.BYE:{const t=new dw(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case be.INFO:{const t=new pw(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 yw(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 mp(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Jo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case be.PRACK:{const t=new mw(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case be.REFER:{const t=new wp(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===ve.HaveLocalOffer||this.signalingState===ve.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=ve.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=Di(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===ve.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof Bs)switch(this._signalingState){case ve.Initial:case ve.Stable:this._signalingState=ve.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ve.HaveLocalOffer:this._signalingState=ve.Stable,this._answer=t;break;case ve.HaveRemoteOffer:break;case ve.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Rn)switch(this._signalingState){case ve.Initial:case ve.Stable:this._signalingState=ve.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case ve.HaveLocalOffer:this._signalingState=ve.Stable,this._answer=t;break;case ve.HaveRemoteOffer:break;case ve.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Vl)switch(this._signalingState){case ve.Initial:case ve.Stable:this._signalingState=ve.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ve.HaveLocalOffer:break;case ve.HaveRemoteOffer:this._signalingState=ve.Stable,this._answer=t;break;case ve.Closed:break;default:throw new Error("Unexpected signaling state.")}if(cp(e))switch(this._signalingState){case ve.Initial:case ve.Stable:this._signalingState=ve.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case ve.HaveLocalOffer:break;case ve.HaveRemoteOffer:this._signalingState=ve.Stable,this._answer=t;break;case ve.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof Qt){const e=this.initialTransaction;let t=At.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,At.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===j.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 Qt){const e=this.reinviteUserAgentServer.transaction;let t=At.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,At.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===j.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},Sw=class extends sr{constructor(e,t,r){super(Hn,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===j.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=Fs.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof Hn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Yo(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===ve.Initial||n.signalingState===ve.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=Fs.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 Hn))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 Hn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Yo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===ve.Initial||n.signalingState===ve.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.`)}},Wl=class extends Fr{constructor(e,t,r){super(Qt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new $n(`${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 Qt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Fs.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Yo(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: "+Pn.toString();if(!e.body){if(this.confirmedDialog.signalingState===ve.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===ve.Initial||this.confirmedDialog.signalingState===ve.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!==ve.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new $n(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof Qt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Fs.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Yo(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!==ve.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)}},Cw=class extends sr{constructor(e,t,r){super(nr,e,t,r)}},xw=class extends sr{constructor(e,t,r){super(nr,e,t,r)}},Tw=class extends Fr{constructor(e,t,r){super(ir,e,t,r),this.core=e}},Ew=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.SUBSCRIBE,r);super(nr,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)}},yp=class extends Fs{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 wr))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: "+Pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}subscribe(e,t={}){var r;if(this.subscriptionState!==Je.Pending&&this.subscriptionState!==Je.Active)throw new Error(`Invalid state ${this.subscriptionState}. May only re-subscribe while in state "pending" or "active".`);this.logger.log(`SUBSCRIBE dialog ${this.id} sending SUBSCRIBE request`);const n=new Ew(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(),At.TIMER_N)),n}terminate(){this.stateTransition(Je.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+Pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}onNotify(e){const t=e.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.core.replyStateless(e,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const r=e.parseHeader("Subscription-State");if(!r||!r.state){this.core.replyStateless(e,{statusCode:489});return}const n=r.state,s=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(Je.Pending,s);break;case"active":this.stateTransition(Je.Active,s);break;case"terminated":this.stateTransition(Je.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new Jo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(i):i.accept()}onRefresh(e){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(e)}onTerminated(){this.delegate&&this.delegate.onTerminated&&this.delegate.onTerminated()}refreshTimerClear(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}refreshTimerSet(){if(this.refreshTimerClear(),this.autoRefresh&&this.subscriptionExpires>0){const e=this.subscriptionExpires*900;this._subscriptionRefresh=Math.floor(e/1e3),this._subscriptionRefreshLastSet=Math.floor(Date.now()/1e3),this.refreshTimer=setTimeout(()=>{this.refreshTimer=void 0,this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this.onRefresh(this.refresh())},e)}}stateTransition(e,t){const r=()=>{this.logger.warn(`Invalid subscription state transition from ${this.subscriptionState} to ${e}`)};switch(e){case Je.Initial:r();return;case Je.NotifyWait:r();return;case Je.Pending:if(this.subscriptionState!==Je.NotifyWait&&this.subscriptionState!==Je.Pending){r();return}break;case Je.Active:if(this.subscriptionState!==Je.NotifyWait&&this.subscriptionState!==Je.Pending&&this.subscriptionState!==Je.Active){r();return}break;case Je.Terminated:if(this.subscriptionState!==Je.NotifyWait&&this.subscriptionState!==Je.Pending&&this.subscriptionState!==Je.Active){r();return}break;default:r();return}e===Je.Pending&&t&&(this.subscriptionExpires=t),e===Je.Active&&t&&(this.subscriptionExpires=t),e===Je.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Je.Terminated&&(this.stateTransition(Je.Terminated),this.onTerminated())}},Aw=class extends sr{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(nr,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Je.NotifyWait,this.waitNotifyStart()}dispose(){super.dispose()}onNotify(e){const t=e.message.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.logger.warn("Failed to parse event."),e.reject({statusCode:489});return}const r=e.message.parseHeader("Subscription-State");if(!r||!r.state){this.logger.warn("Failed to parse subscription state."),e.reject({statusCode:489});return}const n=r.state;switch(n){case"pending":break;case"active":break;case"terminated":break;default:this.logger.warn(`Invalid subscription state ${n}`),e.reject({statusCode:489});return}if(n!=="terminated"&&!e.message.parseHeader("contact")){this.logger.warn("Failed to parse contact."),e.reject({statusCode:489});return}if(this.dialog)throw new Error("Dialog already created. This implementation only supports install of single subscriptions.");switch(this.waitNotifyStop(),this.subscriptionExpires=r.expires?Math.min(this.subscriptionExpires,Math.max(r.expires,0)):this.subscriptionExpires,n){case"pending":this.subscriptionState=Je.Pending;break;case"active":this.subscriptionState=Je.Active;break;case"terminated":this.subscriptionState=Je.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Je.Terminated){const s=yp.initialDialogStateForSubscription(this.message,e.message);this.dialog=new yp(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(),At.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()}},kw=class extends Fr{constructor(e,t,r){super(ir,e,t,r),this.core=e}},bp=["application/sdp","application/dtmf-relay"],Iw=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 Sw(this,e,t)}message(e,t){return new vp(this,e,t)}publish(e,t){return new Cw(this,e,t)}register(e,t){return new xw(this,e,t)}subscribe(e,t){return new Aw(this,e,t)}request(e,t){return new sr(nr,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 Vl(e,t,r,n,Object.assign(Object.assign({},p),s),i,o)}receiveIncomingRequestFromTransport(e){this.receiveRequestFromTransport(e)}receiveIncomingResponseFromTransport(e){this.receiveResponseFromTransport(e)}replyStateless(e,t){const r=this.configuration.userAgentHeaderFieldValue,n=this.configuration.supportedOptionTagsResponse;t=Object.assign(Object.assign({},t),{userAgent:r,supported:n});const s=fp(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===j.Accepted&&r instanceof Wl){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 Qt&&r.transaction.state===j.Proceeding&&r instanceof Wl&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!Pn.includes(e.method)){const n="Allow: "+Pn.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 Jo(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: "+Pn.toString(),s="Accept: "+bp.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 Wl(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case be.MESSAGE:{const t=new mp(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Jo(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case be.OPTIONS:{const t="Allow: "+Pn.toString(),r="Accept: "+bp.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case be.REFER:{const t=new wp(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case be.REGISTER:{const t=new Tw(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case be.SUBSCRIBE:{const t=new kw(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 Rw(){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 $w(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var Pw=class Wn{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),Wn.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),Wn.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),Wn.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),Wn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Wn.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),Wn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Wn.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 j.Calling:r();break;case j.Proceeding:this.state!==j.Calling&&r();break;case j.Accepted:case j.Completed:this.state!==j.Calling&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Calling&&this.state!==j.Accepted&&this.state!==j.Completed&&(t||r());break;default:r()}this.B&&(clearTimeout(this.B),this.B=void 0),j.Proceeding,e===j.Completed&&(this.D=setTimeout(()=>this.timerD(),At.TIMER_D)),e===j.Accepted&&(this.M=setTimeout(()=>this.timerM(),At.TIMER_M)),e===j.Terminated&&this.dispose(),this.setState(e)}timerA(){}timerB(){this.logger.debug(`Timer B expired for INVITE client transaction ${this.id}.`),this.state===j.Calling&&(this.onRequestTimeout(),this.stateTransition(j.Terminated))}timerD(){this.logger.debug(`Timer D expired for INVITE client transaction ${this.id}.`),this.state===j.Completed&&this.stateTransition(j.Terminated)}timerM(){this.logger.debug(`Timer M expired for INVITE client transaction ${this.id}.`),this.state===j.Accepted&&this.stateTransition(j.Terminated)}},sr=class du{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===j.Proceeding?new du(nr,this.core,n):this.transaction.addStateChangeListener(()=>{this.transaction&&this.transaction.state===j.Proceeding&&new du(nr,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 Rn;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 Rn;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===j.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)}},pw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.BYE,r);super(nr,e.userAgentCore,n,t),e.dispose()}},ir=class extends mp{constructor(e,t,r){super(e,t,r,j.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 j.Trying:break;case j.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 j.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 j.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 j.Trying:if(this.lastResponse=t,e>=100&&e<200){this.stateTransition(j.Proceeding),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send provisional response.")});return}if(e>=200&&e<=699){this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case j.Proceeding:if(this.lastResponse=t,e>=200&&e<=699){this.stateTransition(j.Completed),this.send(t).catch(n=>{this.logTransportError(n,"Failed to send final response.")});return}break;case j.Completed:return;case j.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(j.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 j.Trying:r();break;case j.Proceeding:this.state!==j.Trying&&r();break;case j.Completed:this.state!==j.Trying&&this.state!==j.Proceeding&&r();break;case j.Terminated:this.state!==j.Proceeding&&this.state!==j.Completed&&(t||r());break;default:r()}e===j.Completed&&(this.J=setTimeout(()=>this.timerJ(),At.TIMER_J)),e===j.Terminated&&this.dispose(),this.setState(e)}timerJ(){this.logger.debug(`Timer J expired for NON-INVITE server transaction ${this.id}.`),this.state===j.Completed&&this.stateTransition(j.Terminated)}},Vr=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:Uo(),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 $n(`${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 $n(`${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 $n(`${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 $n(`${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 $n(`${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 Qt)return this.transaction.state===j.Proceeding||this.transaction.state===j.Accepted;if(this.transaction instanceof ir)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get progressable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return!1;throw new Error("Unknown transaction type.")}get redirectable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get rejectable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return this.transaction.state===j.Trying||this.transaction.state===j.Proceeding;throw new Error("Unknown transaction type.")}get tryingable(){if(this.transaction instanceof Qt)return this.transaction.state===j.Proceeding;if(this.transaction instanceof ir)return this.transaction.state===j.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=gp(this.message,e);return this.transaction.receiveResponse(e.statusCode,t.message),t}init(){const e={loggerFactory:this.loggerFactory,onStateChange:n=>{n===j.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)}},hw=class extends Vr{constructor(e,t,r){super(ir,e.userAgentCore,t,r)}},gw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INFO,r);super(nr,e.userAgentCore,n,t)}},vw=class extends Vr{constructor(e,t,r){super(ir,e.userAgentCore,t,r)}},yp=class extends sr{constructor(e,t,r){super(nr,e,t,r)}},bp=class extends Vr{constructor(e,t,r){super(ir,e,t,r)}},mw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.NOTIFY,r);super(nr,e.userAgentCore,n,t)}};function ww(e){return e.userAgentCore!==void 0}var Jo=class extends Vr{constructor(e,t,r){const n=ww(e)?e.userAgentCore:e;super(ir,n,t,r)}},yw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.PRACK,r);super(nr,e.userAgentCore,n,t),e.signalingStateTransition(n)}},bw=class extends Vr{constructor(e,t,r){super(ir,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)}},_w=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.INVITE,r);super(Hn,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}`)}}},Sw=class extends Vr{constructor(e,t,r){super(Qt,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)}},Cw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.REFER,r);super(nr,e.userAgentCore,n,t)}};function xw(e){return e.userAgentCore!==void 0}var _p=class extends Vr{constructor(e,t,r){const n=xw(e)?e.userAgentCore:e;super(ir,n,t,r)}},Yo=class extends Ls{constructor(e,t,r,n){super(t,r),this.initialTransaction=e,this._signalingState=me.Initial,this.ackWait=!1,this.ackProcessing=!1,this.delegate=n,e instanceof Qt&&(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=me.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?br.Early:this.ackWait?br.AckWait:this._signalingState===me.Closed?br.Terminated:br.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 Hn))throw new Error("Transaction not instance of InviteClientTransaction.");t=this.reinviteUserAgentClient.transaction,this.reinviteUserAgentClient=void 0}else{if(!(this.initialTransaction instanceof Hn))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 Qt){if(this.early)throw new Error("UAS MUST NOT send a BYE on early dialogs.");if(this.ackWait&&this.initialTransaction.state!==j.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 pw(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 gw(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 _w(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 yp(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 mw(this,e,t)}prack(e,t){return this.logger.log(`INVITE dialog ${this.id} sending PRACK request`),new yw(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 Cw(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 Hn){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!==me.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 yr))throw new Error("Contact not instance of NameAddrHeader.");this.dialogState.remoteTarget=t.uri}switch(e.method){case be.BYE:{const t=new hw(this,e);this.delegate&&this.delegate.onBye?this.delegate.onBye(t):t.accept(),this.dispose()}break;case be.INFO:{const t=new vw(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 Sw(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 bp(this.core,e);this.delegate&&this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Jo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(t):t.accept()}break;case be.PRACK:{const t=new bw(this,e);this.delegate&&this.delegate.onPrack?this.delegate.onPrack(t):t.accept()}break;case be.REFER:{const t=new _p(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===me.HaveLocalOffer||this.signalingState===me.HaveRemoteOffer)&&this._rollbackOffer&&this._rollbackAnswer&&(this._signalingState=me.Stable,this._offer=this._rollbackOffer,this._answer=this._rollbackAnswer)}signalingStateTransition(e){const t=Pi(e);if(!(!t||t.contentDisposition!=="session")){if(this._signalingState===me.Stable&&(this._rollbackOffer=this._offer,this._rollbackAnswer=this._answer),e instanceof qs)switch(this._signalingState){case me.Initial:case me.Stable:this._signalingState=me.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case me.HaveLocalOffer:this._signalingState=me.Stable,this._answer=t;break;case me.HaveRemoteOffer:break;case me.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Rn)switch(this._signalingState){case me.Initial:case me.Stable:this._signalingState=me.HaveRemoteOffer,this._offer=t,this._answer=void 0;break;case me.HaveLocalOffer:this._signalingState=me.Stable,this._answer=t;break;case me.HaveRemoteOffer:break;case me.Closed:break;default:throw new Error("Unexpected signaling state.")}if(e instanceof Ul)switch(this._signalingState){case me.Initial:case me.Stable:this._signalingState=me.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case me.HaveLocalOffer:break;case me.HaveRemoteOffer:this._signalingState=me.Stable,this._answer=t;break;case me.Closed:break;default:throw new Error("Unexpected signaling state.")}if(fp(e))switch(this._signalingState){case me.Initial:case me.Stable:this._signalingState=me.HaveLocalOffer,this._offer=t,this._answer=void 0;break;case me.HaveLocalOffer:break;case me.HaveRemoteOffer:this._signalingState=me.Stable,this._answer=t;break;case me.Closed:break;default:throw new Error("Unexpected signaling state.")}}}start2xxRetransmissionTimer(){if(this.initialTransaction instanceof Qt){const e=this.initialTransaction;let t=At.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,At.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===j.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 Qt){const e=this.reinviteUserAgentServer.transaction;let t=At.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,At.T2),this.invite2xxTimer=setTimeout(r,t)};this.invite2xxTimer=setTimeout(r,t);const n=()=>{e.state===j.Terminated&&(e.removeStateChangeListener(n),this.invite2xxTimer&&(clearTimeout(this.invite2xxTimer),this.invite2xxTimer=void 0),this.reinviteUserAgentServer)};e.addStateChangeListener(n)}}},Tw=class extends sr{constructor(e,t,r){super(Hn,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===j.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=Ls.initialDialogStateForUserAgentClient(this.message,e);let n=this.earlyDialogs.get(r.id);if(!n){const i=this.transaction;if(!(i instanceof Hn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Yo(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===me.Initial||n.signalingState===me.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=Ls.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 Hn))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 Hn))throw new Error("Transaction not instance of InviteClientTransaction.");n=new Yo(i,this.core,r),this.confirmedDialogs.set(n.id,n)}(n.signalingState===me.Initial||n.signalingState===me.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.`)}},Jl=class extends Vr{constructor(e,t,r){super(Qt,e,t,r),this.core=e}dispose(){this.earlyDialog&&this.earlyDialog.dispose(),super.dispose()}accept(e={statusCode:200}){if(!this.acceptable)throw new $n(`${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 Qt))throw new Error("Transaction not instance of InviteClientTransaction.");const l=Ls.initialDialogStateForUserAgentServer(this.message,this.toTag);this.confirmedDialog=new Yo(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: "+Pn.toString();if(!e.body){if(this.confirmedDialog.signalingState===me.Stable)e.body=this.confirmedDialog.answer;else if(this.confirmedDialog.signalingState===me.Initial||this.confirmedDialog.signalingState===me.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!==me.Stable&&this.confirmedDialog.signalingStateTransition(e.body),o}progress(e={statusCode:180}){if(!this.progressable)throw new $n(`${this.message.method} not progressable in state ${this.transaction.state}.`);if(!this.earlyDialog){const o=this.transaction;if(!(o instanceof Qt))throw new Error("Transaction not instance of InviteClientTransaction.");const a=Ls.initialDialogStateForUserAgentServer(this.message,this.toTag,!0);this.earlyDialog=new Yo(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!==me.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)}},Ew=class extends sr{constructor(e,t,r){super(nr,e,t,r)}},Aw=class extends sr{constructor(e,t,r){super(nr,e,t,r)}},kw=class extends Vr{constructor(e,t,r){super(ir,e,t,r),this.core=e}},Iw=class extends sr{constructor(e,t,r){const n=e.createOutgoingRequestMessage(be.SUBSCRIBE,r);super(nr,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)}},Sp=class extends Ls{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 yr))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: "+Pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: "+this.subscriptionExpiresInitial),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}subscribe(e,t={}){var r;if(this.subscriptionState!==Je.Pending&&this.subscriptionState!==Je.Active)throw new Error(`Invalid state ${this.subscriptionState}. May only re-subscribe while in state "pending" or "active".`);this.logger.log(`SUBSCRIBE dialog ${this.id} sending SUBSCRIBE request`);const n=new Iw(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(),At.TIMER_N)),n}terminate(){this.stateTransition(Je.Terminated),this.onTerminated()}unsubscribe(){const e="Allow: "+Pn.toString(),t={};return t.extraHeaders=(t.extraHeaders||[]).slice(),t.extraHeaders.push(e),t.extraHeaders.push("Event: "+this.subscriptionEvent),t.extraHeaders.push("Expires: 0"),t.extraHeaders.push("Contact: "+this.core.configuration.contact.toString()),this.subscribe(void 0,t)}onNotify(e){const t=e.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.core.replyStateless(e,{statusCode:489});return}this.N&&(clearTimeout(this.N),this.N=void 0);const r=e.parseHeader("Subscription-State");if(!r||!r.state){this.core.replyStateless(e,{statusCode:489});return}const n=r.state,s=r.expires?Math.max(r.expires,0):void 0;switch(n){case"pending":this.stateTransition(Je.Pending,s);break;case"active":this.stateTransition(Je.Active,s);break;case"terminated":this.stateTransition(Je.Terminated,s);break;default:this.logger.warn("Unrecognized subscription state.");break}const i=new Jo(this,e);this.delegate&&this.delegate.onNotify?this.delegate.onNotify(i):i.accept()}onRefresh(e){this.delegate&&this.delegate.onRefresh&&this.delegate.onRefresh(e)}onTerminated(){this.delegate&&this.delegate.onTerminated&&this.delegate.onTerminated()}refreshTimerClear(){this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=void 0)}refreshTimerSet(){if(this.refreshTimerClear(),this.autoRefresh&&this.subscriptionExpires>0){const e=this.subscriptionExpires*900;this._subscriptionRefresh=Math.floor(e/1e3),this._subscriptionRefreshLastSet=Math.floor(Date.now()/1e3),this.refreshTimer=setTimeout(()=>{this.refreshTimer=void 0,this._subscriptionRefresh=void 0,this._subscriptionRefreshLastSet=void 0,this.onRefresh(this.refresh())},e)}}stateTransition(e,t){const r=()=>{this.logger.warn(`Invalid subscription state transition from ${this.subscriptionState} to ${e}`)};switch(e){case Je.Initial:r();return;case Je.NotifyWait:r();return;case Je.Pending:if(this.subscriptionState!==Je.NotifyWait&&this.subscriptionState!==Je.Pending){r();return}break;case Je.Active:if(this.subscriptionState!==Je.NotifyWait&&this.subscriptionState!==Je.Pending&&this.subscriptionState!==Je.Active){r();return}break;case Je.Terminated:if(this.subscriptionState!==Je.NotifyWait&&this.subscriptionState!==Je.Pending&&this.subscriptionState!==Je.Active){r();return}break;default:r();return}e===Je.Pending&&t&&(this.subscriptionExpires=t),e===Je.Active&&t&&(this.subscriptionExpires=t),e===Je.Terminated&&this.dispose(),this._subscriptionState=e}timerN(){this.logger.warn("Timer N expired for SUBSCRIBE dialog. Timed out waiting for NOTIFY."),this.subscriptionState!==Je.Terminated&&(this.stateTransition(Je.Terminated),this.onTerminated())}},Rw=class extends sr{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(nr,e,t,r),this.delegate=r,this.subscriberId=t.callId+t.fromTag+n,this.subscriptionExpiresRequested=this.subscriptionExpires=Number(s),this.subscriptionEvent=n,this.subscriptionState=Je.NotifyWait,this.waitNotifyStart()}dispose(){super.dispose()}onNotify(e){const t=e.message.parseHeader("Event").event;if(!t||t!==this.subscriptionEvent){this.logger.warn("Failed to parse event."),e.reject({statusCode:489});return}const r=e.message.parseHeader("Subscription-State");if(!r||!r.state){this.logger.warn("Failed to parse subscription state."),e.reject({statusCode:489});return}const n=r.state;switch(n){case"pending":break;case"active":break;case"terminated":break;default:this.logger.warn(`Invalid subscription state ${n}`),e.reject({statusCode:489});return}if(n!=="terminated"&&!e.message.parseHeader("contact")){this.logger.warn("Failed to parse contact."),e.reject({statusCode:489});return}if(this.dialog)throw new Error("Dialog already created. This implementation only supports install of single subscriptions.");switch(this.waitNotifyStop(),this.subscriptionExpires=r.expires?Math.min(this.subscriptionExpires,Math.max(r.expires,0)):this.subscriptionExpires,n){case"pending":this.subscriptionState=Je.Pending;break;case"active":this.subscriptionState=Je.Active;break;case"terminated":this.subscriptionState=Je.Terminated;break;default:throw new Error(`Unrecognized state ${n}.`)}if(this.subscriptionState!==Je.Terminated){const s=Sp.initialDialogStateForSubscription(this.message,e.message);this.dialog=new Sp(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(),At.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()}},$w=class extends Vr{constructor(e,t,r){super(ir,e,t,r),this.core=e}},Cp=["application/sdp","application/dtmf-relay"],Pw=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 Tw(this,e,t)}message(e,t){return new yp(this,e,t)}publish(e,t){return new Ew(this,e,t)}register(e,t){return new Aw(this,e,t)}subscribe(e,t){return new Rw(this,e,t)}request(e,t){return new sr(nr,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 Ul(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=gp(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===j.Accepted&&r instanceof Jl){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 Qt&&r.transaction.state===j.Proceeding&&r instanceof Jl&&r.receiveCancel(e)):this.replyStateless(e,{statusCode:481});return}if(r){r.transaction.receiveRequest(e);return}this.receiveRequest(e)}receiveRequest(e){if(!Pn.includes(e.method)){const n="Allow: "+Pn.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 Jo(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: "+Pn.toString(),s="Accept: "+Cp.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 Jl(this,e);this.delegate.onInvite?this.delegate.onInvite(t):t.reject()}break;case be.MESSAGE:{const t=new bp(this,e);this.delegate.onMessage?this.delegate.onMessage(t):t.accept()}break;case be.NOTIFY:{const t=new Jo(this,e);this.delegate.onNotify?this.delegate.onNotify(t):t.reject({statusCode:405})}break;case be.OPTIONS:{const t="Allow: "+Pn.toString(),r="Accept: "+Cp.toString();this.replyStateless(e,{statusCode:200,extraHeaders:[t,r]})}break;case be.REFER:{const t=new _p(this,e);this.delegate.onRefer?this.delegate.onRefer(t):t.reject({statusCode:405})}break;case be.REGISTER:{const t=new kw(this,e);this.delegate.onRegister?this.delegate.onRegister(t):t.reject({statusCode:405})}break;case be.SUBSCRIBE:{const t=new $w(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 Dw(){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 Ow(){return{bundlePolicy:"balanced",certificates:void 0,iceCandidatePoolSize:0,iceServers:[{urls:"stun:stun.l.google.com:19302"}],iceTransportPolicy:"all",rtcpMuxPolicy:"require"}}var Hw=class Wn{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),Wn.dispatchRemoveTrackEvent(n,d)),n.addTrack(l),Wn.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),Wn.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),Wn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Wn.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),Wn.dispatchRemoveTrackEvent(r,n)}),r.addTrack(t),Wn.dispatchAddTrackEvent(r,t))}updateDirection(t){if(this._peerConnection===void 0)return Promise.reject(new Error("Peer connection closed."));switch(this._peerConnection.signalingState){case"stable":this.logger.debug("SessionDescriptionHandler.updateDirection - setting offer direction");{const r=n=>{switch(n){case"inactive":return t?.hold?"inactive":"recvonly";case"recvonly":return t?.hold?"inactive":"recvonly";case"sendonly":return t?.hold?"sendonly":"sendrecv";case"sendrecv":return t?.hold?"sendonly":"sendrecv";case"stopped":return"stopped";default:throw new Error("Should never happen")}};this._peerConnection.getTransceivers().forEach(n=>{if(n.direction){const s=r(n.direction);n.direction!==s&&(n.direction=s)}})}break;case"have-remote-offer":this.logger.debug("SessionDescriptionHandler.updateDirection - setting answer direction");{const r=(()=>{const s=this._peerConnection.remoteDescription;if(!s)throw new Error("Failed to read remote offer");const i=/a=sendrecv\r\n|a=sendonly\r\n|a=recvonly\r\n|a=inactive\r\n/.exec(s.sdp);if(i)switch(i[0]){case`a=inactive\r
53
53
  `:return"inactive";case`a=recvonly\r
54
54
  `:return"recvonly";case`a=sendonly\r
55
55
  `:return"sendonly";case`a=sendrecv\r
56
- `:return"sendrecv";default:throw new Error("Should never happen")}return"sendrecv"})(),n=(()=>{switch(r){case"inactive":return"inactive";case"recvonly":return"sendonly";case"sendonly":return t?.hold?"inactive":"recvonly";case"sendrecv":return t?.hold?"sendonly":"sendrecv";default:throw new Error("Should never happen")}})();this._peerConnection.getTransceivers().forEach(s=>{s.direction&&s.direction!=="stopped"&&s.direction!==n&&(s.direction=n)})}break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return Promise.resolve()}waitForIceGatheringComplete(t=!1,r=0){return this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete"),this._peerConnection===void 0?Promise.reject("Peer connection closed."):!t&&this._peerConnection.iceGatheringState==="complete"?(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - already complete"),Promise.resolve()):(this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - rejecting prior waiting promise"),this.iceGatheringCompleteReject&&this.iceGatheringCompleteReject(new Error("Promise superseded.")),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0),this.iceGatheringCompletePromise=new Promise((n,s)=>{this.iceGatheringCompleteResolve=n,this.iceGatheringCompleteReject=s,r>0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout in "+r),this.iceGatheringCompleteTimeoutId=setTimeout(()=>{this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout"),this.iceGatheringComplete()},r))}),this.iceGatheringCompletePromise)}initPeerConnectionEventHandlers(){if(this.logger.debug("SessionDescriptionHandler.initPeerConnectionEventHandlers"),!this._peerConnection)throw new Error("Peer connection undefined.");const t=this._peerConnection;t.onconnectionstatechange=r=>{var n;const s=t.connectionState;this.logger.debug(`SessionDescriptionHandler.onconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onconnectionstatechange&&this._peerConnectionDelegate.onconnectionstatechange(r)},t.ondatachannel=r=>{var n;this.logger.debug("SessionDescriptionHandler.ondatachannel"),this._dataChannel=r.channel,this.onDataChannel&&this.onDataChannel(this._dataChannel),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ondatachannel&&this._peerConnectionDelegate.ondatachannel(r)},t.onicecandidate=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidate"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidate&&this._peerConnectionDelegate.onicecandidate(r)},t.onicecandidateerror=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidateerror"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidateerror&&this._peerConnectionDelegate.onicecandidateerror(r)},t.oniceconnectionstatechange=r=>{var n;const s=t.iceConnectionState;this.logger.debug(`SessionDescriptionHandler.oniceconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.oniceconnectionstatechange&&this._peerConnectionDelegate.oniceconnectionstatechange(r)},t.onicegatheringstatechange=r=>{var n;const s=t.iceGatheringState;this.logger.debug(`SessionDescriptionHandler.onicegatheringstatechange ${s}`),s==="complete"&&this.iceGatheringComplete(),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicegatheringstatechange&&this._peerConnectionDelegate.onicegatheringstatechange(r)},t.onnegotiationneeded=r=>{var n;this.logger.debug("SessionDescriptionHandler.onnegotiationneeded"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onnegotiationneeded&&this._peerConnectionDelegate.onnegotiationneeded(r)},t.onsignalingstatechange=r=>{var n;const s=t.signalingState;this.logger.debug(`SessionDescriptionHandler.onsignalingstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onsignalingstatechange&&this._peerConnectionDelegate.onsignalingstatechange(r)},t.ontrack=r=>{var n;const s=r.track.kind,i=r.track.enabled?"enabled":"disabled";this.logger.debug(`SessionDescriptionHandler.ontrack ${s} ${i}`),this.setRemoteTrack(r.track),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ontrack&&this._peerConnectionDelegate.ontrack(r)}}};function Dw(e){return(t,r)=>{e===void 0&&(e=Rw());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},$w()),r?.peerConnectionConfiguration)};return new Pw(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var _p=class Dg{constructor(t,r){if(this._state=Ae.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new qs,this.logger=t,r){const i=r,o=i?.wsServers,a=i?.maxReconnectionAttempts;o!==void 0&&this.logger.warn('The transport option "wsServers" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),a!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),o&&!r.server&&(typeof o=="string"&&(r.server=o),o instanceof Array&&(r.server=o[0]))}this.configuration=Object.assign(Object.assign({},Dg.defaultOptions),r);const n=this.configuration.server,s=xt.parse(n,"absoluteURI");if(s===-1)throw this.logger.error(`Invalid WebSocket Server URL "${n}"`),new Error("Invalid WebSocket Server URL");if(!["wss","ws","udp"].includes(s.scheme))throw this.logger.error(`Invalid scheme in WebSocket Server URL "${n}"`),new Error("Invalid scheme in WebSocket Server URL");this._protocol=s.scheme.toUpperCase()}dispose(){return this.disconnect()}get protocol(){return this._protocol}get server(){return this.configuration.server}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get ws(){return this._ws}connect(){return this._connect()}disconnect(){return this._disconnect()}isConnected(){return this.state===Ae.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case Ae.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ae.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case Ae.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ae.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case Ae.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ae.Connecting)}catch(r){if(r instanceof $i)return Promise.reject(r);throw r}break;case Ae.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ae.Connecting)}catch(r){if(r instanceof $i)return Promise.reject(r);throw r}break;default:throw new Error("Unknown state")}let t;try{t=new WebSocket(this.server,"sip"),t.binaryType="arraybuffer",t.addEventListener("close",r=>this.onWebSocketClose(r,t)),t.addEventListener("error",r=>this.onWebSocketError(r,t)),t.addEventListener("open",r=>this.onWebSocketOpen(r,t)),t.addEventListener("message",r=>this.onWebSocketMessage(r,t)),this._ws=t}catch(r){return this._ws=void 0,this.logger.error("WebSocket construction failed."),this.logger.error(r.toString()),new Promise((n,s)=>{this.connectResolve=n,this.connectReject=s,this.transitionState(Ae.Disconnected,r)})}return this.connectPromise=new Promise((r,n)=>{this.connectResolve=r,this.connectReject=n,this.connectTimeout=setTimeout(()=>{this.logger.warn("Connect timed out. Exceeded time set in configuration.connectionTimeout: "+this.configuration.connectionTimeout+"s."),t.close(1e3)},this.configuration.connectionTimeout*1e3)}),this.connectPromise}_disconnect(){switch(this.logger.log(`Disconnecting ${this.server}`),this.state){case Ae.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ae.Disconnecting)}catch(r){if(r instanceof $i)return Promise.reject(r);throw r}break;case Ae.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ae.Disconnecting)}catch(r){if(r instanceof $i)return Promise.reject(r);throw r}break;case Ae.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ae.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case Ae.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ae.Disconnecting));if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");return Promise.resolve();default:throw new Error("Unknown state")}if(!this._ws)throw new Error("WebSocket must be defined.");const t=this._ws;return this.disconnectPromise=new Promise((r,n)=>{this.disconnectResolve=r,this.disconnectReject=n;try{t.close(1e3)}catch(s){throw this.logger.error("WebSocket close failed."),this.logger.error(s.toString()),s}}),this.disconnectPromise}_send(t){if(this.configuration.traceSip===!0&&this.logger.log(`Sending WebSocket message:
56
+ `:return"sendrecv";default:throw new Error("Should never happen")}return"sendrecv"})(),n=(()=>{switch(r){case"inactive":return"inactive";case"recvonly":return"sendonly";case"sendonly":return t?.hold?"inactive":"recvonly";case"sendrecv":return t?.hold?"sendonly":"sendrecv";default:throw new Error("Should never happen")}})();this._peerConnection.getTransceivers().forEach(s=>{s.direction&&s.direction!=="stopped"&&s.direction!==n&&(s.direction=n)})}break;default:return Promise.reject(new Error("Invalid signaling state "+this._peerConnection.signalingState))}return Promise.resolve()}waitForIceGatheringComplete(t=!1,r=0){return this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete"),this._peerConnection===void 0?Promise.reject("Peer connection closed."):!t&&this._peerConnection.iceGatheringState==="complete"?(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - already complete"),Promise.resolve()):(this.iceGatheringCompletePromise!==void 0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - rejecting prior waiting promise"),this.iceGatheringCompleteReject&&this.iceGatheringCompleteReject(new Error("Promise superseded.")),this.iceGatheringCompletePromise=void 0,this.iceGatheringCompleteResolve=void 0,this.iceGatheringCompleteReject=void 0),this.iceGatheringCompletePromise=new Promise((n,s)=>{this.iceGatheringCompleteResolve=n,this.iceGatheringCompleteReject=s,r>0&&(this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout in "+r),this.iceGatheringCompleteTimeoutId=setTimeout(()=>{this.logger.debug("SessionDescriptionHandler.waitForIceGatheringToComplete - timeout"),this.iceGatheringComplete()},r))}),this.iceGatheringCompletePromise)}initPeerConnectionEventHandlers(){if(this.logger.debug("SessionDescriptionHandler.initPeerConnectionEventHandlers"),!this._peerConnection)throw new Error("Peer connection undefined.");const t=this._peerConnection;t.onconnectionstatechange=r=>{var n;const s=t.connectionState;this.logger.debug(`SessionDescriptionHandler.onconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onconnectionstatechange&&this._peerConnectionDelegate.onconnectionstatechange(r)},t.ondatachannel=r=>{var n;this.logger.debug("SessionDescriptionHandler.ondatachannel"),this._dataChannel=r.channel,this.onDataChannel&&this.onDataChannel(this._dataChannel),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ondatachannel&&this._peerConnectionDelegate.ondatachannel(r)},t.onicecandidate=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidate"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidate&&this._peerConnectionDelegate.onicecandidate(r)},t.onicecandidateerror=r=>{var n;this.logger.debug("SessionDescriptionHandler.onicecandidateerror"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicecandidateerror&&this._peerConnectionDelegate.onicecandidateerror(r)},t.oniceconnectionstatechange=r=>{var n;const s=t.iceConnectionState;this.logger.debug(`SessionDescriptionHandler.oniceconnectionstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.oniceconnectionstatechange&&this._peerConnectionDelegate.oniceconnectionstatechange(r)},t.onicegatheringstatechange=r=>{var n;const s=t.iceGatheringState;this.logger.debug(`SessionDescriptionHandler.onicegatheringstatechange ${s}`),s==="complete"&&this.iceGatheringComplete(),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onicegatheringstatechange&&this._peerConnectionDelegate.onicegatheringstatechange(r)},t.onnegotiationneeded=r=>{var n;this.logger.debug("SessionDescriptionHandler.onnegotiationneeded"),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onnegotiationneeded&&this._peerConnectionDelegate.onnegotiationneeded(r)},t.onsignalingstatechange=r=>{var n;const s=t.signalingState;this.logger.debug(`SessionDescriptionHandler.onsignalingstatechange ${s}`),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.onsignalingstatechange&&this._peerConnectionDelegate.onsignalingstatechange(r)},t.ontrack=r=>{var n;const s=r.track.kind,i=r.track.enabled?"enabled":"disabled";this.logger.debug(`SessionDescriptionHandler.ontrack ${s} ${i}`),this.setRemoteTrack(r.track),!((n=this._peerConnectionDelegate)===null||n===void 0)&&n.ontrack&&this._peerConnectionDelegate.ontrack(r)}}};function Mw(e){return(t,r)=>{e===void 0&&(e=Dw());const n={iceGatheringTimeout:r?.iceGatheringTimeout!==void 0?r?.iceGatheringTimeout:5e3,peerConnectionConfiguration:Object.assign(Object.assign({},Ow()),r?.peerConnectionConfiguration)};return new Hw(t.userAgent.getLogger("sip.SessionDescriptionHandler"),e,n)}}var xp=class Mg{constructor(t,r){if(this._state=Ee.Disconnected,this.transitioningState=!1,this._stateEventEmitter=new Ns,this.logger=t,r){const i=r,o=i?.wsServers,a=i?.maxReconnectionAttempts;o!==void 0&&this.logger.warn('The transport option "wsServers" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),a!==void 0&&this.logger.warn('The transport option "maxReconnectionAttempts" as has apparently been specified and has been deprecated. It will no longer be available starting with SIP.js release 0.16.0. Please update accordingly.'),o&&!r.server&&(typeof o=="string"&&(r.server=o),o instanceof Array&&(r.server=o[0]))}this.configuration=Object.assign(Object.assign({},Mg.defaultOptions),r);const n=this.configuration.server,s=Ct.parse(n,"absoluteURI");if(s===-1)throw this.logger.error(`Invalid WebSocket Server URL "${n}"`),new Error("Invalid WebSocket Server URL");if(!["wss","ws","udp"].includes(s.scheme))throw this.logger.error(`Invalid scheme in WebSocket Server URL "${n}"`),new Error("Invalid scheme in WebSocket Server URL");this._protocol=s.scheme.toUpperCase()}dispose(){return this.disconnect()}get protocol(){return this._protocol}get server(){return this.configuration.server}get state(){return this._state}get stateChange(){return this._stateEventEmitter}get ws(){return this._ws}connect(){return this._connect()}disconnect(){return this._disconnect()}isConnected(){return this.state===Ee.Connected}send(t){return this._send(t)}_connect(){switch(this.logger.log(`Connecting ${this.server}`),this.state){case Ee.Connecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Connecting));if(!this.connectPromise)throw new Error("Connect promise must be defined.");return this.connectPromise;case Ee.Connected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Connecting));if(this.connectPromise)throw new Error("Connect promise must not be defined.");return Promise.resolve();case Ee.Disconnecting:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ee.Connecting)}catch(r){if(r instanceof Ri)return Promise.reject(r);throw r}break;case Ee.Disconnected:if(this.connectPromise)throw new Error("Connect promise must not be defined.");try{this.transitionState(Ee.Connecting)}catch(r){if(r instanceof Ri)return Promise.reject(r);throw r}break;default:throw new Error("Unknown state")}let t;try{t=new WebSocket(this.server,"sip"),t.binaryType="arraybuffer",t.addEventListener("close",r=>this.onWebSocketClose(r,t)),t.addEventListener("error",r=>this.onWebSocketError(r,t)),t.addEventListener("open",r=>this.onWebSocketOpen(r,t)),t.addEventListener("message",r=>this.onWebSocketMessage(r,t)),this._ws=t}catch(r){return this._ws=void 0,this.logger.error("WebSocket construction failed."),this.logger.error(r.toString()),new Promise((n,s)=>{this.connectResolve=n,this.connectReject=s,this.transitionState(Ee.Disconnected,r)})}return this.connectPromise=new Promise((r,n)=>{this.connectResolve=r,this.connectReject=n,this.connectTimeout=setTimeout(()=>{this.logger.warn("Connect timed out. Exceeded time set in configuration.connectionTimeout: "+this.configuration.connectionTimeout+"s."),t.close(1e3)},this.configuration.connectionTimeout*1e3)}),this.connectPromise}_disconnect(){switch(this.logger.log(`Disconnecting ${this.server}`),this.state){case Ee.Connecting:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ee.Disconnecting)}catch(r){if(r instanceof Ri)return Promise.reject(r);throw r}break;case Ee.Connected:if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");try{this.transitionState(Ee.Disconnecting)}catch(r){if(r instanceof Ri)return Promise.reject(r);throw r}break;case Ee.Disconnecting:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Disconnecting));if(!this.disconnectPromise)throw new Error("Disconnect promise must be defined.");return this.disconnectPromise;case Ee.Disconnected:if(this.transitioningState)return Promise.reject(this.transitionLoopDetectedError(Ee.Disconnecting));if(this.disconnectPromise)throw new Error("Disconnect promise must not be defined.");return Promise.resolve();default:throw new Error("Unknown state")}if(!this._ws)throw new Error("WebSocket must be defined.");const t=this._ws;return this.disconnectPromise=new Promise((r,n)=>{this.disconnectResolve=r,this.disconnectReject=n;try{t.close(1e3)}catch(s){throw this.logger.error("WebSocket close failed."),this.logger.error(s.toString()),s}}),this.disconnectPromise}_send(t){if(this.configuration.traceSip===!0&&this.logger.log(`Sending WebSocket message:
57
57
 
58
58
  `+t+`
59
- `),this._state!==Ae.Connected)return Promise.reject(new Error("Not connected."));if(!this._ws)throw new Error("WebSocket undefined.");try{this._ws.send(t)}catch(r){return r instanceof Error?Promise.reject(r):Promise.reject(new Error("WebSocket send failed."))}return Promise.resolve()}onWebSocketClose(t,r){if(r!==this._ws)return;const n=`WebSocket closed ${this.server} (code: ${t.code})`,s=this.disconnectPromise?void 0:new Error(n);s&&this.logger.warn("WebSocket closed unexpectedly"),this.logger.log(n),this._ws=void 0,this.transitionState(Ae.Disconnected,s)}onWebSocketError(t,r){r===this._ws&&this.logger.error("WebSocket error occurred.")}onWebSocketMessage(t,r){if(r!==this._ws)return;const n=t.data;let s;if(/^(\r\n)+$/.test(n)){this.clearKeepAliveTimeout(),this.configuration.traceSip===!0&&this.logger.log("Received WebSocket message with CRLF Keep Alive response");return}if(!n){this.logger.warn("Received empty message, discarding...");return}if(typeof n!="string"){try{s=new TextDecoder().decode(new Uint8Array(n))}catch(i){this.logger.error(i.toString()),this.logger.error("Received WebSocket binary message failed to be converted into string, message discarded");return}this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket binary message:
59
+ `),this._state!==Ee.Connected)return Promise.reject(new Error("Not connected."));if(!this._ws)throw new Error("WebSocket undefined.");try{this._ws.send(t)}catch(r){return r instanceof Error?Promise.reject(r):Promise.reject(new Error("WebSocket send failed."))}return Promise.resolve()}onWebSocketClose(t,r){if(r!==this._ws)return;const n=`WebSocket closed ${this.server} (code: ${t.code})`,s=this.disconnectPromise?void 0:new Error(n);s&&this.logger.warn("WebSocket closed unexpectedly"),this.logger.log(n),this._ws=void 0,this.transitionState(Ee.Disconnected,s)}onWebSocketError(t,r){r===this._ws&&this.logger.error("WebSocket error occurred.")}onWebSocketMessage(t,r){if(r!==this._ws)return;const n=t.data;let s;if(/^(\r\n)+$/.test(n)){this.clearKeepAliveTimeout(),this.configuration.traceSip===!0&&this.logger.log("Received WebSocket message with CRLF Keep Alive response");return}if(!n){this.logger.warn("Received empty message, discarding...");return}if(typeof n!="string"){try{s=new TextDecoder().decode(new Uint8Array(n))}catch(i){this.logger.error(i.toString()),this.logger.error("Received WebSocket binary message failed to be converted into string, message discarded");return}this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket binary message:
60
60
 
61
61
  `+s+`
62
62
  `)}else s=n,this.configuration.traceSip===!0&&this.logger.log(`Received WebSocket text message:
63
63
 
64
64
  `+s+`
65
- `);if(this.state!==Ae.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===Ae.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(Ae.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 $i("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 Ae.Connecting:t!==Ae.Connected&&t!==Ae.Disconnecting&&t!==Ae.Disconnected&&n();break;case Ae.Connected:t!==Ae.Disconnecting&&t!==Ae.Disconnected&&n();break;case Ae.Disconnecting:t!==Ae.Connecting&&t!==Ae.Disconnected&&n();break;case Ae.Disconnected:t!==Ae.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===Ae.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===Ae.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===Ae.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===Ae.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===Ae.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===Ae.Connected?i():o(r||new Error("Connect aborted."))}if(s===Ae.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===Ae.Disconnected?a():l(r||new Error("Disconnect aborted."))}this.transitioningState=!1}clearKeepAliveTimeout(){this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveDebounceTimeout=void 0}sendKeepAlive(){return this.keepAliveDebounceTimeout?Promise.resolve():(this.keepAliveDebounceTimeout=setTimeout(()=>{this.clearKeepAliveTimeout()},this.configuration.keepAliveDebounce*1e3),this.send(`\r
65
+ `);if(this.state!==Ee.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===Ee.Connecting&&(this.logger.log(`WebSocket opened ${this.server}`),this.transitionState(Ee.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 Ri("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 Ee.Connecting:t!==Ee.Connected&&t!==Ee.Disconnecting&&t!==Ee.Disconnected&&n();break;case Ee.Connected:t!==Ee.Disconnecting&&t!==Ee.Disconnected&&n();break;case Ee.Disconnecting:t!==Ee.Connecting&&t!==Ee.Disconnected&&n();break;case Ee.Disconnected:t!==Ee.Connecting&&n();break;default:throw new Error("Unknown state.")}const s=this._state;this._state=t;const i=this.connectResolve,o=this.connectReject;s===Ee.Connecting&&(this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0);const a=this.disconnectResolve,l=this.disconnectReject;if(s===Ee.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===Ee.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===Ee.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===Ee.Connecting){if(!i)throw new Error("Connect resolve undefined.");if(!o)throw new Error("Connect reject undefined.");t===Ee.Connected?i():o(r||new Error("Connect aborted."))}if(s===Ee.Disconnecting){if(!a)throw new Error("Disconnect resolve undefined.");if(!l)throw new Error("Disconnect reject undefined.");t===Ee.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}};_p.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var Vr=class Ia{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=$t.Stopped,this._stateEventEmitter=new qs,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ia.defaultOptions()),{sipjsId:os(5)}),{uri:new In("sip","anonymous."+os(6),"anonymous.invalid")}),{viaHost:os(12)+".invalid"}),Ia.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 cw,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=kt.error;break;case"warn":this.loggerFactory.level=kt.warn;break;case"log":this.loggerFactory.level=kt.log;break;case"debug":this.loggerFactory.level=kt.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:Ia.newUUID(),xt.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return xt.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:Dw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:$r.Unsupported,sipExtensionReplaces:$r.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:_p,transportOptions:{},uri:new In("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+Y0,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 Ko(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:os(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new In("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===$r.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===$r.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>aw[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new Iw({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 lw(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new Ls(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!==$r.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 up(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new Ul(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=Go.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 Bs){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 Bs){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=Pi(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof Rn){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=Pi(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 Bs){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof Rn){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)}},ut=new window.AudioContext,Ow={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]},Zo=F(null),Xo=F(null),Oi=F(null),Hi=F(.5),Qo=F(1),Gl=F("original"),ea=F(!1),Mi={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 Sp=()=>{const e={classic:"original","original-loud":"aurora","original-intense":"resonancia"},t=d=>{Hi.value=Math.max(0,Math.min(1,d/100))},r=d=>{Qo.value=Math.max(0,Math.min(1,d/100))},n=()=>{ea.value&&(l(),a())},s=d=>{const p=e[d]??d;Gl.value=Mi[p]?p:"original",n()},i=(d,p=150)=>{ut.state==="suspended"&&ut.resume();const h=Ow[d.toUpperCase()];if(!h)return;const m=ut.createOscillator(),w=ut.createOscillator(),x=ut.createGain();m.frequency.value=h[0],w.frequency.value=h[1],m.type="sine",w.type="sine",x.gain.value=.1*Hi.value,m.connect(x),w.connect(x),x.connect(ut.destination),m.start(),w.start(),setTimeout(()=>{m.stop(),w.stop(),m.disconnect(),w.disconnect(),x.disconnect()},p)},o=async(d=500)=>{if(ut.state==="suspended")try{await ut.resume()}catch{}const p=ut.createOscillator(),h=ut.createGain(),m=ut.currentTime;p.type="sine",p.frequency.value=600;const w=.02,x=.1,g=.75*Hi.value;h.gain.setValueAtTime(0,m),h.gain.linearRampToValueAtTime(g,m+w),h.gain.setValueAtTime(g,m+d/1e3-x),h.gain.linearRampToValueAtTime(0,m+d/1e3),p.connect(h),h.connect(ut.destination),p.start(m),p.stop(m+d/1e3),await new Promise(S=>window.setTimeout(S,d))},a=()=>{if(ea.value)return;ea.value=!0,ut.state==="suspended"&&ut.resume();const d=()=>{const h=ut.currentTime,m=Mi[Gl.value]||Mi.original,w=ut.createGain(),x=m.duration,g=(m.originalMelody?[m.frequencies[0]]:m.frequencies).map(S=>{const b=ut.createOscillator();return b.type=m.type,b.frequency.setValueAtTime(S,h),m.originalMelody&&m.frequencies.slice(1).forEach((y,T)=>{b.frequency.setValueAtTime(y,h+(T+1)*.1)}),b.connect(w),b});m.originalMelody?(w.gain.setValueAtTime(m.gain*Qo.value,h),w.gain.exponentialRampToValueAtTime(.001,h+x)):(w.gain.setValueAtTime(0,h),w.gain.linearRampToValueAtTime(.7*Qo.value,h+.02),w.gain.setValueAtTime(.7*Qo.value,h+1.05),w.gain.linearRampToValueAtTime(0,h+x)),w.connect(ut.destination),g.forEach(S=>{S.start(h),S.stop(h+x)})},p=()=>{const h=Mi[Gl.value]||Mi.original;Xo.value=window.setTimeout(d,h.repeatDelay)};d(),p(),Zo.value=window.setInterval(()=>{d(),p()},3e3)},l=()=>{Zo.value&&(clearInterval(Zo.value),Zo.value=null),Xo.value&&(clearTimeout(Xo.value),Xo.value=null),ea.value=!1};return{playDtmf:i,playAutoAnswerBeep:o,startRingtone:a,stopRingtone:l,startRingback:()=>{if(Oi.value)return;ut.state==="suspended"&&ut.resume();const d=()=>{const p=ut.currentTime,h=ut.createOscillator(),m=ut.createGain();h.type="sine",h.frequency.value=425,m.gain.setValueAtTime(.1*Hi.value,p),m.gain.linearRampToValueAtTime(.1*Hi.value,p+1),m.gain.linearRampToValueAtTime(0,p+1.1),h.connect(m),m.connect(ut.destination),h.start(p),h.stop(p+1.1)};d(),Oi.value=window.setInterval(()=>{d()},4e3)},stopRingback:()=>{Oi.value&&(clearInterval(Oi.value),Oi.value=null)},setNotificationVolume:t,setRingtoneVolume:r,setRingtoneTone:s}};function Cp(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=Cp(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function xp(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Cp(e))&&(n&&(n+=" "),n+=t);return n}var Hw=(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},Mw=(e,t)=>({classGroupId:e,validator:t}),Tp=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ta="-",Ep=[],Nw="arbitrary..",qw=e=>{const t=Lw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Bw(o);const a=o.split(ta);return Ap(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?Hw(u,l):l:u||Ep}return r[o]||Ep}}},Ap=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=Ap(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(ta):e.slice(t).join(ta),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(o))return u.classGroupId}},Bw=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?Nw+n:void 0})(),Lw=e=>{const{theme:t,classGroups:r}=e;return Fw(r,t)},Fw=(e,t)=>{const r=Tp();for(const n in e){const s=e[n];Jl(s,r,n,t)}return r},Jl=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];Vw(o,t,r,n)}},Vw=(e,t,r,n)=>{if(typeof e=="string"){jw(e,t,r);return}if(typeof e=="function"){Uw(e,t,r,n);return}zw(e,t,r,n)},jw=(e,t,r)=>{const n=e===""?t:kp(t,e);n.classGroupId=r},Uw=(e,t,r,n)=>{if(Kw(e)){Jl(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Mw(r,e))},zw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Jl(l,kp(t,a),r,n)}},kp=(e,t)=>{let r=e;const n=t.split(ta),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=Tp(),r.nextPart.set(o,a)),r=a}return r},Kw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ww=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)}}},Yl="!",Ip=":",Gw=[],Rp=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Jw=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,u;const c=s.length;for(let w=0;w<c;w++){const x=s[w];if(o===0&&a===0){if(x===Ip){i.push(s.slice(l,w)),l=w+1;continue}if(x==="/"){u=w;continue}}x==="["?o++:x==="]"?o--:x==="("?a++:x===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(Yl)?(p=d.slice(0,-1),h=!0):d.startsWith(Yl)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return Rp(i,h,p,m)};if(t){const s=t+Ip,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):Rp(Gw,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},Yw=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}},Zw=e=>({cache:Ww(e.cacheSize),parseClassName:Jw(e),sortModifiers:Yw(e),...qw(e)}),Xw=/\s+/,Qw=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(Xw);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let x=!!w,g=n(x?m.substring(0,w):m);if(!g){if(!x){l=c+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=c+(l.length>0?" "+l:l);continue}x=!1}const S=p.length===0?"":p.length===1?p[0]:i(p).join(":"),b=h?S+Yl:S,y=b+g;if(o.indexOf(y)>-1)continue;o.push(y);const T=s(g,x);for(let k=0;k<T.length;++k){const N=T[k];o.push(b+N)}l=c+(l.length>0?" "+l:l)}return l},ey=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=$p(r))&&(s&&(s+=" "),s+=n);return s},$p=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=$p(e[n]))&&(r&&(r+=" "),r+=t);return r},ty=(e,...t)=>{let r,n,s,i;const o=l=>(r=Zw(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=Qw(l,r);return s(l,c),c};return i=o,(...l)=>i(ey(...l))},ry=[],Tt=e=>{const t=r=>r[e]||ry;return t.isThemeGetter=!0,t},Pp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Dp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ny=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,sy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iy=/\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$/,oy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ay=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ly=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mn=e=>ny.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),Nn=e=>!!e&&Number.isInteger(Number(e)),Zl=e=>e.endsWith("%")&&Le(e.slice(0,-1)),dn=e=>sy.test(e),Op=()=>!0,cy=e=>iy.test(e)&&!oy.test(e),Xl=()=>!1,uy=e=>ay.test(e),dy=e=>ly.test(e),fy=e=>!Ce(e)&&!xe(e),py=e=>qn(e,Lp,Xl),Ce=e=>Pp.test(e),as=e=>qn(e,Fp,cy),Hp=e=>qn(e,_y,Le),hy=e=>qn(e,jp,Op),gy=e=>qn(e,Vp,Xl),Mp=e=>qn(e,qp,Xl),vy=e=>qn(e,Bp,dy),ra=e=>qn(e,Up,uy),xe=e=>Dp.test(e),Ni=e=>ls(e,Fp),my=e=>ls(e,Vp),Np=e=>ls(e,qp),wy=e=>ls(e,Lp),yy=e=>ls(e,Bp),na=e=>ls(e,Up,!0),by=e=>ls(e,jp,!0),qn=(e,t,r)=>{const n=Pp.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ls=(e,t,r=!1)=>{const n=Dp.exec(e);return n?n[1]?t(n[1]):r:!1},qp=e=>e==="position"||e==="percentage",Bp=e=>e==="image"||e==="url",Lp=e=>e==="length"||e==="size"||e==="bg-size",Fp=e=>e==="length",_y=e=>e==="number",Vp=e=>e==="family-name",jp=e=>e==="number"||e==="weight",Up=e=>e==="shadow",Sy=()=>{const e=Tt("color"),t=Tt("font"),r=Tt("text"),n=Tt("font-weight"),s=Tt("tracking"),i=Tt("leading"),o=Tt("breakpoint"),a=Tt("container"),l=Tt("spacing"),u=Tt("radius"),c=Tt("shadow"),d=Tt("inset-shadow"),p=Tt("text-shadow"),h=Tt("drop-shadow"),m=Tt("blur"),w=Tt("perspective"),x=Tt("aspect"),g=Tt("ease"),S=Tt("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...y(),xe,Ce],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],v=()=>[xe,Ce,l],B=()=>[Mn,"full","auto",...v()],q=()=>[Nn,"none","subgrid",xe,Ce],C=()=>["auto",{span:["full",Nn,xe,Ce]},Nn,xe,Ce],_=()=>[Nn,"auto",xe,Ce],E=()=>["auto","min","max","fr",xe,Ce],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...v()],J=()=>[Mn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],W=()=>[Mn,"screen","full","dvw","lvw","svw","min","max","fit",...v()],ae=()=>[Mn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...v()],z=()=>[e,xe,Ce],ce=()=>[...y(),Np,Mp,{position:[xe,Ce]}],pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Pe=()=>["auto","cover","contain",wy,py,{size:[xe,Ce]}],Fe=()=>[Zl,Ni,as],Ee=()=>["","none","full",u,xe,Ce],He=()=>["",Le,Ni,as],nt=()=>["solid","dashed","dotted","double"],bt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],We=()=>[Le,Zl,Np,Mp],ot=()=>["","none",m,xe,Ce],_t=()=>["none",Le,xe,Ce],lt=()=>["none",Le,xe,Ce],A=()=>[Le,xe,Ce],O=()=>[Mn,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[dn],breakpoint:[dn],color:[Op],container:[dn],"drop-shadow":[dn],ease:["in","out","in-out"],font:[fy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[dn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[dn],shadow:[dn],spacing:["px",Le],text:[dn],"text-shadow":[dn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mn,Ce,xe,x]}],container:["container"],columns:[{columns:[Le,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:T()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Nn,"auto",xe,Ce]}],basis:[{basis:[Mn,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,Mn,"auto","initial","none",Ce]}],grow:[{grow:["",Le,xe,Ce]}],shrink:[{shrink:["",Le,xe,Ce]}],order:[{order:[Nn,"first","last","none",xe,Ce]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],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:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[a,"screen",...J()]}],"min-w":[{"min-w":[a,"screen","none",...J()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,Ni,as]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,by,hy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zl,Ce]}],"font-family":[{font:[my,gy,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":[Le,"none",xe,Hp]}],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:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...nt(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",xe,as]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Le,"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:ce()}],"bg-repeat":[{bg:pe()}],"bg-size":[{bg:Pe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nn,xe,Ce],radial:["",xe,Ce],conic:[Nn,xe,Ce]},yy,vy]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:Fe()}],"gradient-via-pos":[{via:Fe()}],"gradient-to-pos":[{to:Fe()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:Ee()}],"rounded-s":[{"rounded-s":Ee()}],"rounded-e":[{"rounded-e":Ee()}],"rounded-t":[{"rounded-t":Ee()}],"rounded-r":[{"rounded-r":Ee()}],"rounded-b":[{"rounded-b":Ee()}],"rounded-l":[{"rounded-l":Ee()}],"rounded-ss":[{"rounded-ss":Ee()}],"rounded-se":[{"rounded-se":Ee()}],"rounded-ee":[{"rounded-ee":Ee()}],"rounded-es":[{"rounded-es":Ee()}],"rounded-tl":[{"rounded-tl":Ee()}],"rounded-tr":[{"rounded-tr":Ee()}],"rounded-br":[{"rounded-br":Ee()}],"rounded-bl":[{"rounded-bl":Ee()}],"border-w":[{border:He()}],"border-w-x":[{"border-x":He()}],"border-w-y":[{"border-y":He()}],"border-w-s":[{"border-s":He()}],"border-w-e":[{"border-e":He()}],"border-w-bs":[{"border-bs":He()}],"border-w-be":[{"border-be":He()}],"border-w-t":[{"border-t":He()}],"border-w-r":[{"border-r":He()}],"border-w-b":[{"border-b":He()}],"border-w-l":[{"border-l":He()}],"divide-x":[{"divide-x":He()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":He()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...nt(),"hidden","none"]}],"divide-style":[{divide:[...nt(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...nt(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,xe,Ce]}],"outline-w":[{outline:["",Le,Ni,as]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",c,na,ra]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",d,na,ra]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:He()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Le,as]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":He()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",p,na,ra]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Le,xe,Ce]}],"mix-blend":[{"mix-blend":[...bt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":bt()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":We()}],"mask-image-linear-to-pos":[{"mask-linear-to":We()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":We()}],"mask-image-t-to-pos":[{"mask-t-to":We()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":We()}],"mask-image-r-to-pos":[{"mask-r-to":We()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":We()}],"mask-image-b-to-pos":[{"mask-b-to":We()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":We()}],"mask-image-l-to-pos":[{"mask-l-to":We()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":We()}],"mask-image-x-to-pos":[{"mask-x-to":We()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":We()}],"mask-image-y-to-pos":[{"mask-y-to":We()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[xe,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":We()}],"mask-image-radial-to-pos":[{"mask-radial-to":We()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":We()}],"mask-image-conic-to-pos":[{"mask-conic-to":We()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:Pe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,Ce]}],filter:[{filter:["","none",xe,Ce]}],blur:[{blur:ot()}],brightness:[{brightness:[Le,xe,Ce]}],contrast:[{contrast:[Le,xe,Ce]}],"drop-shadow":[{"drop-shadow":["","none",h,na,ra]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Le,xe,Ce]}],"hue-rotate":[{"hue-rotate":[Le,xe,Ce]}],invert:[{invert:["",Le,xe,Ce]}],saturate:[{saturate:[Le,xe,Ce]}],sepia:[{sepia:["",Le,xe,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,Ce]}],"backdrop-blur":[{"backdrop-blur":ot()}],"backdrop-brightness":[{"backdrop-brightness":[Le,xe,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[Le,xe,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,xe,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,xe,Ce]}],"backdrop-invert":[{"backdrop-invert":["",Le,xe,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[Le,xe,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[Le,xe,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,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:[Le,"initial",xe,Ce]}],ease:[{ease:["linear","initial",g,xe,Ce]}],delay:[{delay:[Le,xe,Ce]}],animate:[{animate:["none",S,xe,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,xe,Ce]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:_t()}],"rotate-x":[{"rotate-x":_t()}],"rotate-y":[{"rotate-y":_t()}],"rotate-z":[{"rotate-z":_t()}],scale:[{scale:lt()}],"scale-x":[{"scale-x":lt()}],"scale-y":[{"scale-y":lt()}],"scale-z":[{"scale-z":lt()}],"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:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:O()}],"translate-x":[{"translate-x":O()}],"translate-y":[{"translate-y":O()}],"translate-z":[{"translate-z":O()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"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",...z()]}],"stroke-w":[{stroke:[Le,Ni,as,Hp]}],stroke:[{stroke:["none",...z()]}],"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"]}},Cy=ty(Sy);const dt=(...e)=>Cy(xp(e)),rT=4;var zp=e=>e.replace(/\D/g,"");const Ql=(e,t=[])=>{const r=zp(e??"");return r!==""&&t.some(n=>zp(n)===r)},br=(e,t=[])=>e.length<=4||Ql(e,t)?e:`${"*".repeat(e.length-4)}${e.slice(-4)}`,xy=(e,t)=>{if(e){const r=ec(e);if(r&&Kp(r))return r;if(e.trim())return e.trim()}if(t){const r=ec(t);if(r&&Kp(r))return r;const n=Ty(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var ec=e=>e.replace(/[^\d+*#]/g,""),Kp=e=>/^\+?[\d*#]{2,}$/.test(e),Ty=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]?ec(t[1]):null)};const Wp="webphone-auto-answer",tc=()=>{try{return localStorage.getItem(Wp)==="true"}catch{return!1}};var Ey="/assets/sipSharedWorker-Bk0APY9t.js";function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function Ay(e,t){if(qi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ky(e){var t=Ay(e,"string");return qi(t)=="symbol"?t:t+""}function er(e,t,r){return(t=ky(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Iy=class{constructor(e,t){er(this,"serverUrl",void 0),er(this,"keepAliveInterval",void 0),er(this,"clientId",void 0),er(this,"connectionId",void 0),er(this,"stateEventEmitter",new qs),er(this,"port",void 0),er(this,"currentState",Ae.Disconnected),er(this,"connectPromise",void 0),er(this,"connectResolve",void 0),er(this,"connectReject",void 0),er(this,"connectTimeout",void 0),er(this,"onConnect",void 0),er(this,"onDisconnect",void 0),er(this,"onMessage",void 0),this.serverUrl=t.server,this.keepAliveInterval=t.keepAliveInterval??30,this.clientId=t.clientId,this.connectionId=t.connectionId;const r=new SharedWorker(Ey,{name:`webphone-sip-${this.connectionId}`});this.port=r.port,r.addEventListener("error",n=>{this.handle({type:"error",error:n.message||"SharedWorker failed to load"})}),this.port.addEventListener("message",n=>this.handle(n.data)),this.port.start()}get protocol(){return new URL(this.serverUrl).protocol.replace(":","").toUpperCase()}get server(){return this.serverUrl}get state(){return this.currentState}get stateChange(){return this.stateEventEmitter}isConnected(){return this.currentState===Ae.Connected}connect(){return this.isConnected()?Promise.resolve():this.connectPromise?this.connectPromise:(this.transition(Ae.Connecting),this.connectPromise=new Promise((e,t)=>{this.connectResolve=e,this.connectReject=t}),this.connectTimeout=setTimeout(()=>{if(this.currentState!==Ae.Connecting)return;const e=new Error(`SharedWorker did not connect to ${this.serverUrl}`);this.transition(Ae.Disconnected),this.connectReject?.(e),this.clearPromise()},1e4),this.post({type:"connect",clientId:this.clientId,connectionId:this.connectionId,server:this.serverUrl,keepAliveInterval:this.keepAliveInterval}),this.connectPromise)}async disconnect(){this.currentState!==Ae.Disconnected&&(this.transition(Ae.Disconnecting),this.connectReject?.(new Error("SharedWorker WebSocket disconnected")),this.clearPromise(),this.post({type:"disconnect",clientId:this.clientId,connectionId:this.connectionId}),this.transition(Ae.Disconnected))}async dispose(){await this.disconnect(),this.port.close()}send(e){return this.isConnected()?(this.post({type:"send",clientId:this.clientId,connectionId:this.connectionId,data:e}),Promise.resolve()):Promise.reject(new Error("SharedWorker WebSocket is not connected"))}post(e){this.port.postMessage(e)}handle(e){switch(e.type){case"connected":this.transition(Ae.Connected),this.connectResolve?.(),this.clearPromise(),this.onConnect?.();break;case"message":this.isConnected()&&this.onMessage?.(e.data);break;case"error":if(this.currentState===Ae.Connecting){const t=new Error(e.error);this.transition(Ae.Disconnected),this.connectReject?.(t),this.clearPromise()}break;case"disconnected":{const t=this.isConnected(),r=e.error?new Error(e.error):void 0;this.transition(Ae.Disconnected),this.connectReject&&(this.connectReject(r??new Error("SharedWorker WebSocket disconnected")),this.clearPromise()),t&&this.onDisconnect?.(r);break}}}clearPromise(){this.connectTimeout&&clearTimeout(this.connectTimeout),this.connectTimeout=void 0,this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0}transition(e){this.currentState!==e&&(this.currentState=e,this.stateEventEmitter.emit(e))}},Ry="X-Nebula-Queue",$y="X-Nebula-Queue-Id";const nT=30,Gp=[1e3,2e3,5e3,1e4,2e4,3e4],Py=3e4,Dy=(e,t={})=>{const r=pt(null),n=pt(null),s=pt(new Map),i=new Audio;i.autoplay=!0;const o=pt(void 0),a=pt(null),l=pt(null),u=new Map,c=new Map,d=new Set,p=new Map,h=5e3;let m=!1,w=null,x=null,g=null,S=null,b=null,y=null,T=0,k=null;const N=V(()=>r.value?.configuration.uri?.user||""),{startRingtone:v,stopRingtone:B,startRingback:q,stopRingback:C,playAutoAnswerBeep:_,setNotificationVolume:E,setRingtoneVolume:P,setRingtoneTone:R}=Sp(),D=M=>M instanceof Ko||M instanceof Ls?M.request?.callId||M.dialog?.callId||M.id||crypto.randomUUID():M.dialog?.callId||M.id||crypto.randomUUID(),J=M=>{if(!(M instanceof Ls))return;const K=M.request;if(!K)return;const L=K.getHeader(Ry)?.trim(),oe=K.getHeader($y)?.trim();if(!(!L&&!oe))return{...oe?{id:oe}:{},...L?{name:L}:{}}},W=(M,K,L,oe)=>{const ie=J(M),me={channelId:K,sipCallId:D(M),direction:L,remoteNumber:oe,...ie?{queue:ie}:{}};return u.set(K,me),t.onCallContext?.(me),me},ae=(M,K)=>{const L=u.get(M);L&&t.onCallState?.({...L,state:K,timestamp:Date.now()})},z=(M,K)=>{if(s.value.get(K)!==M||M.state!==G.Established)return;const L=u.get(K),oe=M.sessionDescriptionHandler,ie=oe?.localMediaStream??l.value,me=oe?.remoteMediaStream??a.value,ge=ie?.getAudioTracks()??[],De=me?.getAudioTracks()??[];if(!L||!ie||!me||ge.length===0||De.length===0)return;const at=[L.sipCallId,...ge.map(et=>`local:${et.id}`),...De.map(et=>`remote:${et.id}`)].join("|");c.get(K)!==at&&(c.set(K,at),t.onMediaReady?.({...L,localStream:ie,remoteStream:me}))},ce=M=>{u.delete(M),c.delete(M),d.delete(M)},pe=(M,K)=>{if(s.value.get(M)!==K)return;const L=p.get(K);L&&clearTimeout(L),p.delete(K);const oe=e.channels.value.find(De=>De.id===M),ie=u.get(M),me=d.has(M)||oe?.status==="connected";ce(M),s.value.delete(M),e.updateChannelState(M,{status:"idle",remoteNumber:"",remoteDisplayName:void 0,isMuted:!1,isHeld:!1,startTime:void 0,keypadValue:"",hasVideo:!1,hasEarlyMedia:!1});const ge=e.transferInProgress.value;if(ge&&(ge.originalChannelId===M||ge.consultationChannelId===M)&&e.setTransferInProgress(null),e.activeChannelId.value===M&&Xs(),Ee(),ie){try{e.addCallLog({number:ie.remoteNumber,direction:ie.direction,status:me?"answered":ie.direction==="incoming"?"missed":"cancelled",startTime:me?oe?.startTime??Date.now():Date.now(),duration:me?Math.floor((Date.now()-(oe?.startTime??Date.now()))/1e3):0})}catch(De){console.warn("[SipJs] Call ended, but saving its history failed:",De)}try{t.onCallState?.({...ie,state:me?"ended":"failed",timestamp:Date.now()})}catch(De){console.warn("[SipJs] Call ended, but the state callback failed:",De)}}},Pe=(M,K)=>{p.has(K)||p.set(K,setTimeout(()=>{console.warn("[SipJs] Hangup did not terminate; releasing local call state"),Fe(K),pe(M,K)},h))},Fe=M=>{if(M.state!==G.Terminated)try{M.dispose().catch(K=>{console.warn("[SipJs] Session disposal failed:",K)})}catch(K){console.warn("[SipJs] Session disposal failed:",K)}},Ee=()=>{e.channels.value.some(M=>M.status==="incoming")&&!tc()?v():B(),e.activeChannel.value?.status==="calling"?q():C()},He=async(M,K,L)=>{await _(),tc()&&s.value.get(M)===K&&K.state===G.Initial&&await Te(L)},nt=M=>{i.volume=M/100},bt=async M=>{typeof i.setSinkId=="function"&&await i.setSinkId(M)},We=async M=>{if(!M)return;const K=[...s.value.entries()].flatMap(([ie,me])=>{const ge=me.sessionDescriptionHandler,De=ge?.peerConnection?.getSenders().find(at=>at.track?.kind==="audio");return De?[{channelId:ie,session:me,sdh:ge,sender:De}]:[]});if(K.length===0){o.value=M;return}const L=[],oe=[];try{for(const{sender:me}of K){const ge=await navigator.mediaDevices.getUserMedia(Y(!1,M));L.push(ge);const[De]=ge.getAudioTracks(),at=me.track;if(!De||!at)throw new Error("Could not acquire an audio track for the selected microphone");De.enabled=at.enabled,await me.replaceTrack(De),oe.push({sender:me,previousTrack:at})}o.value=M,K.forEach(({channelId:me,session:ge,sdh:De,sender:at},et)=>{const wt=L[et]?.getAudioTracks()[0];if(!wt)return;const Kn=e.channels.value.find(_n=>_n.id===me),Gi=!(Kn?.isHeld||Kn?.isMuted);at.track.enabled=Gi;const Cr=De.localMediaStream;Cr&&(Cr.getAudioTracks().forEach(_n=>{_n!==wt&&Cr.removeTrack(_n)}),Cr.getTracks().includes(wt)||Cr.addTrack(wt)),e.activeChannelId.value===me&&(Cr?l.value=Cr:l.value&&(l.value.getAudioTracks().forEach(_n=>{_n!==wt&&l.value?.removeTrack(_n)}),l.value.getTracks().includes(wt)||l.value.addTrack(wt)));try{z(ge,me)}catch(_n){console.error("[SipJs] Media-ready callback failed after microphone switch:",_n)}});const ie=new Set([...s.value.values()].flatMap(me=>me.sessionDescriptionHandler?.peerConnection?.getSenders().map(ge=>ge.track).filter(ge=>ge?.kind==="audio")??[]));oe.forEach(({previousTrack:me})=>{ie.has(me)||me.stop()}),L.forEach((me,ge)=>{me.getTracks().forEach(De=>{De!==K[ge]?.sender.track&&De.stop()})})}catch(ie){await Promise.allSettled(oe.map(({sender:me,previousTrack:ge})=>me.replaceTrack(ge))),L.forEach(me=>me.getTracks().forEach(ge=>ge.stop())),console.warn("[SipJs] Failed to switch microphone:",ie)}},ot=(M,K)=>{let L=!1;const oe=M.sessionDescriptionHandler;return oe?.peerConnection&&oe.peerConnection.getSenders().forEach(ie=>{ie.track&&ie.track.kind==="audio"&&(ie.track.enabled=K,L=!0)}),L},_t=M=>{let K=!1;return l.value&&l.value.getAudioTracks().forEach(L=>{L.enabled=M,K=!0}),K},lt=(M,K)=>{const L=!(K?.isHeld||K?.isMuted),oe=ot(M,L),ie=_t(L);!oe&&!ie&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},A=M=>{for(const[K,L]of s.value.entries())if(L===M)return e.channels.value.find(oe=>oe.id===K)||null;return e.activeChannel.value||null},O=async M=>{const K=M.sessionDescriptionHandler?.peerConnection;if(!K)return;const L=A(M),oe=!(L?.isHeld||L?.isMuted),ie=K.getSenders().find(me=>me.track?.kind==="audio");if(ie?.track){ie.track.enabled=oe,L&&z(M,L.id);return}try{const me=await navigator.mediaDevices.getUserMedia(Y(!1));if(![...s.value.values()].includes(M)){me.getTracks().forEach(et=>et.stop());return}const[ge]=me.getAudioTracks();if(!ge)return;ge.enabled=oe;const De=new MediaStream([ge]);l.value=De;const at=K.getSenders().find(et=>et.track===null);at?await at.replaceTrack(ge):K.addTrack(ge,De),lt(M,L),L&&z(M,L.id)}catch(me){console.warn("[SipJs] Failed to recover outbound audio track:",me)}},Y=(M=!1,K=o.value)=>{const L={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return K&&(L.deviceId={exact:K}),{audio:L,video:M}},se=async()=>{const M=n.value;M&&await M.register({requestDelegate:{onAccept:()=>{e.setConnected(!0),T=0},onReject:K=>{e.setConnected(!1);const L=K?.message?.statusCode;L===401||L===403||L===404||de()}}})},re=async M=>{if(!r.value){try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(K=>K.stop())}catch(K){console.error("Microphone permission denied",K);return}try{const K=Vr.makeURI(M.uri);if(!K)throw new Error("Invalid URI");m=M.earlyMedia??!1;const L={server:M.transportOptions.server,keepAliveInterval:M.transportOptions.keepAliveInterval??30},oe={uri:K,logLevel:"error",transportOptions:L,authorizationUsername:M.authorizationUsername,authorizationPassword:M.authorizationPassword,reconnectionAttempts:0,delegate:{onConnect:()=>{},onDisconnect:()=>{e.setConnected(!1),de()},onInvite:ge=>ke(ge)}},ie=typeof SharedWorker<"u";let me=ie;ie&&(oe.transportConstructor=Iy,oe.transportOptions={...L,clientId:crypto.randomUUID(),connectionId:`${M.transportOptions.server}|${M.uri}|${crypto.randomUUID()}`});try{r.value=new Vr(oe)}catch(ge){if(!ie)throw ge;me=!1,console.warn("[SipJs] SharedWorker unavailable, using native WebSocket transport",ge),delete oe.transportConstructor,oe.transportOptions=L,r.value=new Vr(oe)}try{await r.value.start(),n.value=new Wo(r.value),await se()}catch(ge){if(!me)throw ge;console.warn("[SipJs] SharedWorker connection failed, retrying with native WebSocket",ge);const De=r.value;r.value=null,n.value=null;try{await De?.stop()}catch(at){console.warn("[SipJs] Failed to clean up SharedWorker transport",at)}delete oe.transportConstructor,oe.transportOptions=L,r.value=new Vr(oe),await r.value.start(),n.value=new Wo(r.value),await se()}ee()}catch(K){console.error("[SipJs] Failed to initialize WSS/SIP connection",K);const L=r.value;if(r.value=null,n.value=null,L!==null)try{await L.stop()}catch(oe){console.warn("[SipJs] Failed to clean up after connection error",oe)}}}},ee=()=>{g=new AbortController;const{signal:M}=g;let K=Date.now();const L=5e3,oe=(wt=1e3)=>{S&&clearTimeout(S),S=setTimeout(async()=>{S=null,await ue()},wt)},ie=()=>{if(document.visibilityState==="visible"){const wt=Date.now()-K;wt>L?(console.log(`[SipJs] Device was suspended for ${Math.round(wt/1e3)}s, reconnecting...`),oe(1500)):oe(500)}K=Date.now()},me=()=>{console.log("[SipJs] Network online, reconnecting..."),oe(1e3)},ge=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),S&&(clearTimeout(S),S=null)},De=()=>{b=setInterval(()=>{const wt=Date.now(),Kn=wt-K;Kn>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(Kn/1e3)}s), device may have woken from sleep`),oe(1500)),K=wt},1e3)},at=()=>{console.log("[SipJs] Page frozen"),b&&(clearInterval(b),b=null)},et=()=>{console.log("[SipJs] Page resumed"),K=Date.now(),De(),oe(1e3)};document.addEventListener("visibilitychange",ie,{signal:M}),window.addEventListener("online",me,{signal:M}),window.addEventListener("offline",ge,{signal:M}),document.addEventListener("freeze",at,{signal:M}),document.addEventListener("resume",et,{signal:M}),De(),fe()},de=()=>{if(y||!r.value)return;const M=Gp[Math.min(T,Gp.length-1)];y=setTimeout(async()=>{if(y=null,!r.value||e.isConnected.value){T=0;return}T++,await ue(),e.isConnected.value||de()},M)},fe=()=>{k&&clearInterval(k),k=setInterval(()=>{r.value&&!e.isConnected.value&&de()},Py)},ue=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 se()}catch{}}catch(M){console.error("[SipJs] Reconnection failed:",M)}}},ne=async()=>{g?.abort(),g=null,S&&(clearTimeout(S),S=null),b&&(clearInterval(b),b=null),k&&(clearInterval(k),k=null),y&&(clearTimeout(y),y=null),T=0;for(const[L,oe]of s.value.entries()){let ie;try{await Promise.race([Ie(L,oe),new Promise(me=>{ie=setTimeout(me,1500)})])}finally{ie&&clearTimeout(ie)}}Xs();const M=n.value,K=r.value;if(n.value=null,r.value=null,M)try{await M.unregister()}catch(L){console.warn("[SipJs] Unregister failed:",L)}if(K)try{await K.stop()}catch(L){console.warn("[SipJs] UserAgent stop failed:",L)}},ke=M=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",M.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",M.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",M.remoteIdentity.displayName);const K=e.channels.value.find(me=>me.status==="idle"&&!s.value.has(me.id));if(!K){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),M.reject();return}const L=K.id;s.value.set(L,M);const oe=M.body?M.body.includes("m=video"):!1,ie=xy(M.remoteIdentity.uri.user,M.remoteIdentity.displayName);console.log("[SipJs] 📋 Caller number extraído:",ie),console.log("[SipJs] 🎥 Video:",oe?"Sí":"No"),e.updateChannelState(L,{status:"incoming",remoteNumber:ie,remoteDisplayName:M.remoteIdentity.displayName||void 0,hasVideo:oe}),W(M,L,"incoming",ie),ae(L,"ringing"),Ee(),e.setActiveChannelId(L),tc()&&He(L,M,oe),M.stateChange.addListener(me=>{switch(me){case G.Terminated:pe(L,M);break;case G.Established:if(s.value.get(L)!==M)break;d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),ae(L,"connected"),e.activeChannelId.value===L&&(bn(M),O(M).then(()=>z(M,L))),Ee();break}})},we=async(M,K=!1)=>{if(!r.value)return;const L=e.activeChannelId.value;if(s.value.has(L))return;let oe=Vr.makeURI(M);if(!oe&&r.value.configuration.uri){const ge=r.value.configuration.uri.host;oe=Vr.makeURI(`sip:${M}@${ge}`)}if(!oe)return;const ie=new Ko(r.value,oe,{earlyMedia:m});s.value.set(L,ie),W(ie,L,"outgoing",M),ae(L,"dialing"),e.updateChannelState(L,{status:"calling",remoteNumber:M,hasVideo:K}),e.setLastDialedNumber(M),Ee(),ie.stateChange.addListener(ge=>{switch(ge){case G.Established:if(s.value.get(L)!==ie)break;d.add(L),e.channels.value.find(De=>De.id===L)?.status!=="connected"&&(e.updateChannelState(L,{status:"connected",startTime:Date.now()}),ae(L,"connected"),bn(ie),O(ie).then(()=>z(ie,L)),Ee());break;case G.Terminated:pe(L,ie);break}});const me={sessionDescriptionHandlerOptions:{constraints:Y(K)},requestDelegate:{onProgress:ge=>{s.value.get(L)===ie&&(ge.message.statusCode===180||ge.message.statusCode===183)&&(ge.message.body&&(e.updateChannelState(L,{hasEarlyMedia:!0}),bn(ie)),Ee())},onAccept:ge=>{s.value.get(L)===ie&&e.channels.value.find(De=>De.id===L)?.status!=="connected"&&(d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),ae(L,"connected"),bn(ie),O(ie).then(()=>z(ie,L)),Ee())}}};try{await ie.invite(me)}catch(ge){throw pe(L,ie),ge}},Te=async(M=!1)=>{const K=e.activeChannelId.value,L=s.value.get(K);if(L instanceof Ls&&L.state===G.Initial){B(),e.updateChannelState(K,{status:"connected",startTime:Date.now()}),Ee();for(const[ie,me]of s.value.entries())if(ie!==e.activeChannelId.value&&me.state===G.Established&&!e.channels.value.find(ge=>ge.id===ie)?.isHeld)try{await le(me,!0),e.updateChannelState(ie,{isHeld:!0})}catch(ge){console.error(`[SipJs] Failed to hold channel ${ie}:`,ge)}const oe={sessionDescriptionHandlerOptions:{constraints:Y(M),iceGatheringTimeout:1e3}};try{await L.accept(oe),Ee()}catch(ie){const me=s.value.get(K);throw me instanceof Ls&&me.state===G.Initial&&(e.updateChannelState(K,{status:"incoming",startTime:void 0}),Ee()),ie}}},Ie=async(M,K)=>{Pe(M,K);try{switch(K.state){case G.Initial:case G.Establishing:K instanceof Ko?await K.cancel():K instanceof Ls&&await K.reject();break;case G.Established:await K.bye();break}}catch(L){console.warn("[SipJs] Hangup signaling failed:",L)}finally{Fe(K),pe(M,K)}},Ve=async()=>{const M=e.activeChannelId.value,K=s.value.get(M);K&&await Ie(M,K)},Z=()=>{const M=s.value.get(e.activeChannelId.value);if(!M)return;const K=!e.isMuted.value;e.setMuted(K),lt(M,e.channels.value.find(L=>L.id===e.activeChannelId.value))},le=async(M,K)=>{const L={sessionDescriptionHandlerOptions:{hold:K}};await M.invite(L)},he=async()=>{const M=s.value.get(e.activeChannelId.value);if(M?.state!==G.Established)return;const K=!e.isHeld.value;try{await le(M,K),e.setHeld(K),lt(M,e.channels.value.find(L=>L.id===e.activeChannelId.value))}catch{}},ft=async M=>{const K=e.activeChannelId.value;if(K===M)return;const L=s.value.get(K),oe=s.value.get(M),ie=e.channels.value.find(ge=>ge.id===K),me=e.channels.value.find(ge=>ge.id===M);if(L&&L.state===G.Established&&!ie?.isHeld)try{await le(L,!0),e.updateChannelState(K,{isHeld:!0}),lt(L,e.channels.value.find(ge=>ge.id===K))}catch{}if(e.setActiveChannelId(M),Ee(),oe&&oe.state===G.Established){if(me?.isHeld)try{await le(oe,!1),e.updateChannelState(M,{isHeld:!1})}catch{}lt(oe,e.channels.value.find(ge=>ge.id===M)),bn(oe)}else Xs()},ur=M=>{if(!/^[0-9*#]$/.test(M))return;const K=s.value.get(e.activeChannelId.value);if(K?.state!==G.Established)return;const L=K.sessionDescriptionHandler?.peerConnection?.getSenders().find(ie=>ie.track?.kind==="audio")?.dtmf;if(L?.canInsertDTMF){L.insertDTMF(M,160,70);return}const oe={requestOptions:{body:{content:`Signal=${M}\r
68
- Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};K.info(oe)},Bt=(M,K)=>{const L=e.channels.value.find(oe=>oe.id===M);!L||L.status!=="connected"||(bn(K),lt(K,L),O(K),i.play().catch(()=>{}))},vs=async M=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",M);const K=e.activeChannelId.value,L=s.value.get(K);if(!L)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",K),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!==G.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=Vr.makeURI(M);if(!oe&&r.value?.configuration.uri){const ie=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",ie),oe=Vr.makeURI(`sip:${M}@${ie}`)}if(!oe)throw console.error("[SipJs] ❌ URI de destino inválida:",M),new Error(`Invalid transfer target: ${M}`);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:ie=>{console.log("[SipJs] ✅ Transfer REFER aceptado por el servidor (202 Accepted)"),console.log("[SipJs] Response:",ie.message)},onReject:ie=>{const me=ie.message.statusCode;console.error("[SipJs] ❌ Transfer REFER rechazado:",me),console.error("[SipJs] Response completo:",ie.message),Bt(K,L)}},onNotify:ie=>{console.log("[SipJs] 📬 NOTIFY recibido para transferencia"),console.log("[SipJs] NOTIFY request:",ie.request),ie.accept();const me=ie.request.body;if(console.log("[SipJs] NOTIFY body:",me),me){const ge=me.match(/SIP\/2\.0\s+(\d{3})(.*)/);if(ge&&ge[1]){const De=parseInt(ge[1],10),at=ge[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",De),console.log("[SipJs] 📊 Status text:",at),De>=200&&De<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{L.bye().catch(et=>{console.warn("[SipJs] Error hanging up after successful transfer:",et)})},500);else if(De>=400){console.error("[SipJs] ❌ Transfer falló con status:",De,at),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const et={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[De]||`Error en transferencia (código ${De})`;console.warn("[SipJs] 💬",et),Bt(K,L)}else De>=100&&De<200&&console.log("[SipJs] 📞 Transferencia en progreso:",De,at)}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(ie){throw console.error("[SipJs] ❌ Error en transferCall:",ie),console.error("[SipJs] Error type:",ie?.constructor?.name),console.error("[SipJs] Error message:",ie instanceof Error?ie.message:String(ie)),console.error("[SipJs] Error stack:",ie instanceof Error?ie.stack:"N/A"),ie}},Ea=async M=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",M);const K=e.activeChannelId.value,L=s.value.get(K);if(console.log("[SipJs] Canal original:",K),console.log("[SipJs] Sesión original:",L?.state),!L||L.state!==G.Established)throw console.error("[SipJs] ❌ No hay llamada establecida para transferir"),new Error("No established call to transfer");const oe=e.channels.value.find(ie=>ie.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 le(L,!0),e.updateChannelState(K,{isHeld:!0}),console.log("[SipJs] ✅ Llamada original en hold")}catch(ie){throw console.error("[SipJs] ❌ Failed to hold original call:",ie),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:",M),await we(M,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:K,consultationChannelId:oe.id,targetNumber:M}),console.log("[SipJs] 📋 Transferencia en progreso registrada")}catch(ie){throw console.error("[SipJs] ❌ Failed to start consultation call:",ie),console.log("[SipJs] 🔄 Volviendo al canal original y quitando hold..."),e.setActiveChannelId(K),await le(L,!1).catch(()=>{}),e.updateChannelState(K,{isHeld:!1}),new Error("Failed to initiate consultation call")}},Wt=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const M=e.transferInProgress.value;if(!M)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",M);const K=s.value.get(M.originalChannelId),L=s.value.get(M.consultationChannelId);if(console.log("[SipJs] Sesión original:",K?.state),console.log("[SipJs] Sesión de consulta:",L?.state),!K||!L)throw console.error("[SipJs] ❌ Falta una o ambas sesiones"),new Error("Missing session for transfer");if(L.state!==G.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 ie=oe.callId,me=oe.remoteTag,ge=oe.localTag;let De=Vr.makeURI(M.targetNumber);if(!De&&r.value?.configuration.uri){const et=r.value.configuration.uri.host;De=Vr.makeURI(`sip:${M.targetNumber}@${et}`)}if(!De)throw new Error("Invalid transfer target URI");const at=`${encodeURIComponent(ie)}%3Bto-tag%3D${encodeURIComponent(me)}%3Bfrom-tag%3D${encodeURIComponent(ge)}`;De.setHeader("Replaces",at);try{await K.refer(De,{onNotify:et=>{et.accept();const wt=et.request.body,Kn=typeof wt=="string"?wt:wt&&typeof wt=="object"&&"content"in wt?wt.content:void 0;if(Kn){const Gi=Kn.match(/SIP\/2\.0\s+(\d+)/);if(Gi&&Gi[1]){const Cr=parseInt(Gi[1]);Cr>=200&&Cr<300?setTimeout(()=>{Ie(M.originalChannelId,K),Ie(M.consultationChannelId,L),e.setTransferInProgress(null)},500):Cr>=400&&(console.error("[SipJs] Attended transfer failed with status:",Cr),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:et=>{console.error("[SipJs] Attended transfer REFER rejected:",et.message.statusCode),e.setTransferInProgress(null)}}})}catch(et){throw console.error("[SipJs] Attended transfer failed:",et),et}},Sr=async()=>{const M=e.transferInProgress.value;if(!M)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const K=s.value.get(M.originalChannelId),L=s.value.get(M.consultationChannelId);if(L)try{await Ie(M.consultationChannelId,L),console.log("[SipJs] Consultation call ended")}catch(oe){console.warn("[SipJs] Error ending consultation:",oe)}if(K)try{e.setActiveChannelId(M.originalChannelId),await le(K,!1),e.updateChannelState(M.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(oe){console.warn("[SipJs] Error resuming original call:",oe)}e.setTransferInProgress(null)},bn=M=>{const K=M.sessionDescriptionHandler;if(!K){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const L=K.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=K.localMediaStream??null;const oe=A(M);lt(M,oe),oe&&z(M,oe.id);const ie=ge=>{x?.abort(),x=new AbortController;const{signal:De}=x,at=()=>{i.play().catch(et=>{et.name!=="AbortError"&&console.error("[SipJs] play() failed:",et.name,et.message)})};ge.addEventListener("unmute",()=>{at()},{signal:De}),at()};L.addEventListener("addtrack",ge=>{ge.track.kind==="audio"&&(i.srcObject=null,i.srcObject=L,ie(ge.track),oe&&z(M,oe.id))},{signal:w.signal});const[me]=L.getTracks();me&&(i.srcObject=L,ie(me),oe&&z(M,oe.id))},Xs=()=>{x?.abort(),x=null,w?.abort(),w=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:re,stop:ne,makeCall:we,answerCall:Te,hangupCall:Ve,toggleMute:Z,toggleHold:he,sendDTMF:ur,transferCall:vs,startAttendedTransfer:Ea,completeAttendedTransfer:Wt,cancelAttendedTransfer:Sr,switchChannel:ft,extension:N,setVolume:nt,setNotificationVolume:E,setRingtoneVolume:P,setRingtoneTone:R,setOutputDevice:bt,setInputDevice:We,remoteStream:a,localStream:l}};var Jp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const Yp=xp,Zp=(e,t)=>r=>{var n;if(t?.variants==null)return Yp(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=Jp(u)||Jp(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 Yp(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 Oy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hy(e,t,r){Oy(e,t),t.set(e,r)}function My(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 sa(e,t){return e.get(My(e,t))}function Xp(e){return typeof e=="string"?`'${e}'`:new Ny().serialize(e)}var Ny=(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=sa(e,this).get(n);return s===void 0&&(sa(e,this).set(n,`#${sa(e,this).size}`),s=this.serializeObject(n),sa(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 qy(e,t){return e===t||Xp(e)===Xp(t)}function Bi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function Pt(e,t){const r=typeof e=="string"&&!t?`${e}Context`:t,n=Symbol(r);return[o=>{const a=Vt(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=>(Xn(n,o),o)]}function or(){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 rc(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 nc(e){return e==null}function sc(e){return e?e.flatMap(t=>t.type===ze?sc(t.children):[t]):[]}var[ia,iT]=Pt("ConfigProvider");function By(e,t){var r;const n=pt();return ct(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),Ht(n)}function Bn(e,t){return ro()?(Ma(e,t),!0):!1}function Ly(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Bn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function Fy(e){let t=!1,r;const n=Ha(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var qt=typeof window<"u"&&typeof document<"u",oT=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Vy=e=>typeof e<"u",jy=Object.prototype.toString,Uy=e=>jy.call(e)==="[object Object]",fn=()=>{},ic=zy();function zy(){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 Ky(...e){if(e.length!==1)return Ga(...e);const t=e[0];return typeof t=="function"?Ht(ci(()=>({get:t,set:fn}))):F(t)}function Qp(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 eh=e=>e();function Wy(e,t={}){let r,n,s=fn;const i=l=>{clearTimeout(l),s(),s=fn};let o;return l=>{const u=Re(e),c=Re(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 Gy(e=eh,t={}){const{initialState:r="active"}=t,n=Ky(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:Ht(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function oc(e){return Array.isArray(e)?e:[e]}function th(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var Jy=/\B([A-Z])/g,aT=th(e=>e.replace(Jy,"-$1").toLowerCase()),Yy=/-(\w)/g,lT=th(e=>e.replace(Yy,(t,r)=>r?r.toUpperCase():""));function rh(e){return e||vt()}function Zy(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=Ha(!0),r=n.run(()=>e(...i))),Bn(s),r))}function Xy(e){return Xr(tt(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return tt(e.value[r])&&!tt(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 Qy(e){return Xy(V(e))}function zt(e,...t){const r=t.flat(),n=r[0];return Qy(()=>Object.fromEntries(typeof n=="function"?Object.entries(Mt(e)).filter(([s,i])=>!n(Re(i),s)):Object.entries(Mt(e)).filter(s=>!r.includes(s[0]))))}function nh(e,t=1e4){return ci((r,n)=>{let s=Re(e),i;const o=()=>setTimeout(()=>{s=Re(e),n()},Re(t));return Bn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function ac(e,t=200,r={}){return Qp(Wy(t,r),e)}function eb(e,t,r={}){const{eventFilter:n=eh,...s}=r;return Me(e,Qp(n,t),s)}function tb(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=Gy(n,{initialState:s});return{stop:eb(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function rb(e,t={}){if(!tt(e))return Mt(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=ci(()=>({get(){return e.value[n]},set(s){var i;if(!((i=Re(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 nb(e,t){rh(t)&&Ds(e,t)}function sb(e,t=!0,r){rh(r)?Qe(e,r):t?e():Et(e)}function ib(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=pt(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=Re(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&qt&&u(),(tt(t)||typeof t=="function")&&Bn(Me(t,()=>{o.value&&qt&&u()})),Bn(l),{isActive:Qr(o),pause:l,resume:u}}function sh(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=pt(!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)},Re(t))}return n&&(i.value=!0,qt&&u()),Bn(l),{isPending:Qr(i),start:u,stop:l}}function ob(e,t,r){return Me(e,t,{...r,immediate:!0})}function ab(e,t,r){return Me(e,t,{...r,once:!0})}var Pr=qt?window:void 0,cT=qt?window.document:void 0,uT=qt?window.navigator:void 0,dT=qt?window.location:void 0;function tr(e){var t;const r=Re(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function Kt(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=V(()=>{const n=oc(Re(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return ob(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>tr(i)))!==null&&n!==void 0?n:[Pr].filter(i=>i!=null),oc(Re(r.value?e[1]:e[0])),oc(f(r.value?e[2]:e[1])),Re(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const u=Uy(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 ih=!1;function lb(e,t,r={}){const{window:n=Pr,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:fn,cancel:fn,trigger:fn}:fn;if(ic&&!ih){ih=!0;const x={passive:!0};Array.from(n.document.body.children).forEach(g=>g.addEventListener("click",fn,x)),n.document.documentElement.addEventListener("click",fn,x)}let l=!0;const u=x=>Re(s).some(g=>{if(typeof g=="string")return Array.from(n.document.querySelectorAll(g)).some(S=>S===x.target||x.composedPath().includes(S));{const S=tr(g);return S&&(x.target===S||x.composedPath().includes(S))}});function c(x){const g=Re(x);return g&&g.$.subTree.shapeFlag===16}function d(x,g){const S=Re(x),b=S.$.subTree&&S.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(y=>y.el===g.target||g.composedPath().includes(y.el))}const p=x=>{const g=tr(e);if(x.target!=null&&!(!(g instanceof Element)&&c(e)&&d(e,x))&&!(!g||g===x.target||x.composedPath().includes(g))){if("detail"in x&&x.detail===0&&(l=!u(x)),!l){l=!0;return}t(x)}};let h=!1;const m=[Kt(n,"click",x=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(x))},{passive:!0,capture:i}),Kt(n,"pointerdown",x=>{const g=tr(e);l=!u(x)&&!!(g&&!x.composedPath().includes(g))},{passive:!0}),o&&Kt(n,"blur",x=>{setTimeout(()=>{var g;const S=tr(e);((g=n.document.activeElement)===null||g===void 0?void 0:g.tagName)==="IFRAME"&&!S?.contains(n.document.activeElement)&&t(x)},0)},{passive:!0})].filter(Boolean),w=()=>m.forEach(x=>x());return a?{stop:w,cancel:()=>{l=!1},trigger:x=>{l=!0,p(x),l=!1}}:w}function lc(){const e=pt(!1),t=vt();return t&&Qe(()=>{e.value=!0},t),e}function oh(e){const t=lc();return V(()=>(t.value,!!e()))}function cb(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function ub(...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=Pr,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=cb(t);return Kt(s,i,c=>{c.repeat&&Re(a)||l(c)&&r(c)},o)}function db(e){return JSON.parse(JSON.stringify(e))}var oa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},aa="__vueuse_ssr_handlers__",fb=pb();function pb(){return aa in oa||(oa[aa]=oa[aa]||{}),oa[aa]}function hb(e,t){return fb[e]||t}function gb(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 vb={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()}},ah="vueuse-storage";function cs(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=Pr,eventFilter:p,onError:h=P=>{console.error(P)},initOnMounted:m}=n,w=(c?pt:F)(typeof t=="function"?t():t),x=V(()=>Re(e));if(!r)try{r=hb("getDefaultStorage",()=>Pr?.localStorage)()}catch(P){h(P)}if(!r)return w;const g=Re(t),S=gb(g),b=(s=n.serializer)!==null&&s!==void 0?s:vb[S],{pause:y,resume:T}=tb(w,P=>q(P),{flush:i,deep:o,eventFilter:p});Me(x,()=>_(),{flush:i});let k=!1;const N=P=>{m&&!k||_(P)},v=P=>{m&&!k||E(P)};d&&a&&(r instanceof Storage?Kt(d,"storage",N,{passive:!0}):Kt(d,ah,v)),m?sb(()=>{k=!0,_()}):_();function B(P,R){if(d){const D={key:x.value,oldValue:P,newValue:R,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",D):new CustomEvent(ah,{detail:D}))}}function q(P){try{const R=r.getItem(x.value);if(P==null)B(R,null),r.removeItem(x.value);else{const D=b.write(P);R!==D&&(r.setItem(x.value,D),B(R,D))}}catch(R){h(R)}}function C(P){const R=P?P.newValue:r.getItem(x.value);if(R==null)return l&&g!=null&&r.setItem(x.value,b.write(g)),g;if(!P&&u){const D=b.read(R);return typeof u=="function"?u(D,g):S==="object"&&!Array.isArray(D)?{...g,...D}:D}else return typeof R!="string"?R:b.read(R)}function _(P){if(!(P&&P.storageArea!==r)){if(P&&P.key==null){w.value=g;return}if(!(P&&P.key!==x.value)){y();try{const R=b.write(w.value);(P===void 0||P?.newValue!==R)&&(w.value=C(P))}catch(R){h(R)}finally{P?Et(T):T()}}}}function E(P){_(P.detail)}return w}var la={speed:2,margin:30,direction:"both"};function mb(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 wb(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=Pr,containerElement:x,handle:g=e,buttons:S=[0],restrictInView:b,autoScroll:y=!1}=t,T=F((r=Re(h))!==null&&r!==void 0?r:{x:0,y:0}),k=F(),N=ce=>o?o.includes(ce.pointerType):!0,v=ce=>{Re(a)&&ce.preventDefault(),Re(l)&&ce.stopPropagation()},B=Re(y),q=typeof B=="object"?{speed:(n=Re(B.speed))!==null&&n!==void 0?n:la.speed,margin:(s=Re(B.margin))!==null&&s!==void 0?s:la.margin,direction:(i=B.direction)!==null&&i!==void 0?i:la.direction}:la,C=ce=>typeof ce=="number"?[ce,ce]:[ce.x,ce.y],_=(ce,pe,Pe)=>{const{clientWidth:Fe,clientHeight:Ee,scrollLeft:He,scrollTop:nt,scrollWidth:bt,scrollHeight:We}=ce,[ot,_t]=C(q.margin),[lt,A]=C(q.speed);let O=0,Y=0;(q.direction==="x"||q.direction==="both")&&(Pe.x<ot&&He>0?O=-lt:Pe.x+pe.width>Fe-ot&&He<bt-Fe&&(O=lt)),(q.direction==="y"||q.direction==="both")&&(Pe.y<_t&&nt>0?Y=-A:Pe.y+pe.height>Ee-_t&&nt<We-Ee&&(Y=A)),(O||Y)&&ce.scrollBy({left:O,top:Y,behavior:"auto"})};let E=null;const P=()=>{const ce=Re(x);ce&&!E&&(E=setInterval(()=>{const pe=Re(e).getBoundingClientRect(),{x:Pe,y:Fe}=T.value,Ee={x:Pe-ce.scrollLeft,y:Fe-ce.scrollTop};Ee.x>=0&&Ee.y>=0&&(_(ce,pe,Ee),Ee.x+=ce.scrollLeft,Ee.y+=ce.scrollTop,T.value=Ee)},1e3/60))},R=()=>{E&&(clearInterval(E),E=null)},D=(ce,pe,Pe,Fe)=>{const[Ee,He]=typeof Pe=="number"?[Pe,Pe]:[Pe.x,Pe.y],{clientWidth:nt,clientHeight:bt}=pe;return ce.x<Ee||ce.x+Fe.width>nt-Ee||ce.y<He||ce.y+Fe.height>bt-He},J=()=>{if(Re(t.disabled)||!k.value)return;const ce=Re(x);if(!ce)return;const pe=Re(e).getBoundingClientRect(),{x:Pe,y:Fe}=T.value;D({x:Pe-ce.scrollLeft,y:Fe-ce.scrollTop},ce,q.margin,pe)?P():R()};Re(y)&&Me(T,J);const W=ce=>{var pe;if(!Re(S).includes(ce.button)||Re(t.disabled)||!N(ce)||Re(u)&&ce.target!==Re(e))return;const Pe=Re(x),Fe=Pe==null||(pe=Pe.getBoundingClientRect)===null||pe===void 0?void 0:pe.call(Pe),Ee=Re(e).getBoundingClientRect(),He={x:ce.clientX-(Pe?Ee.left-Fe.left+(y?0:Pe.scrollLeft):Ee.left),y:ce.clientY-(Pe?Ee.top-Fe.top+(y?0:Pe.scrollTop):Ee.top)};p?.(He,ce)!==!1&&(k.value=He,v(ce))},ae=ce=>{if(Re(t.disabled)||!N(ce)||!k.value)return;const pe=Re(x);pe instanceof HTMLElement&&mb(pe);const Pe=Re(e).getBoundingClientRect();let{x:Fe,y:Ee}=T.value;if((m==="x"||m==="both")&&(Fe=ce.clientX-k.value.x,pe&&(Fe=Math.min(Math.max(0,Fe),pe.scrollWidth-Pe.width))),(m==="y"||m==="both")&&(Ee=ce.clientY-k.value.y,pe&&(Ee=Math.min(Math.max(0,Ee),pe.scrollHeight-Pe.height))),Re(y)&&pe&&(E===null&&_(pe,Pe,{x:Fe,y:Ee}),Fe+=pe.scrollLeft,Ee+=pe.scrollTop),pe&&(b||y)){if(m!=="y"){const He=Fe-pe.scrollLeft;He<0?Fe=pe.scrollLeft:He>pe.clientWidth-Pe.width&&(Fe=pe.clientWidth-Pe.width+pe.scrollLeft)}if(m!=="x"){const He=Ee-pe.scrollTop;He<0?Ee=pe.scrollTop:He>pe.clientHeight-Pe.height&&(Ee=pe.clientHeight-Pe.height+pe.scrollTop)}}T.value={x:Fe,y:Ee},c?.(T.value,ce),v(ce)},z=ce=>{Re(t.disabled)||!N(ce)||k.value&&(k.value=void 0,y&&R(),d?.(T.value,ce),v(ce))};if(qt){const ce=()=>{var pe;return{capture:(pe=t.capture)!==null&&pe!==void 0?pe:!0,passive:!Re(a)}};Kt(g,"pointerdown",W,ce),Kt(w,"pointermove",ae,ce),Kt(w,"pointerup",z,ce)}return{...rb(T),position:T,isDragging:V(()=>!!k.value),style:V(()=>`
67
+ `))}startSendingKeepAlives(){const t=r=>{const n=r*.8;return 1e3*(Math.random()*(r-n)+n)};this.configuration.keepAliveInterval&&!this.keepAliveInterval&&(this.keepAliveInterval=setInterval(()=>{this.sendKeepAlive(),this.startSendingKeepAlives()},t(this.configuration.keepAliveInterval)))}stopSendingKeepAlives(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval),this.keepAliveDebounceTimeout&&clearTimeout(this.keepAliveDebounceTimeout),this.keepAliveInterval=void 0,this.keepAliveDebounceTimeout=void 0}};xp.defaultOptions={server:"",connectionTimeout:5,keepAliveInterval:0,keepAliveDebounce:10,traceSip:!0};var jr=class $a{constructor(t={}){if(this._publishers={},this._registerers={},this._sessions={},this._subscriptions={},this._state=$t.Stopped,this._stateEventEmitter=new Ns,this.delegate=t.delegate,this.options=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$a.defaultOptions()),{sipjsId:os(5)}),{uri:new In("sip","anonymous."+os(6),"anonymous.invalid")}),{viaHost:os(12)+".invalid"}),$a.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 fw,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=kt.error;break;case"warn":this.loggerFactory.level=kt.warn;break;case"log":this.loggerFactory.level=kt.log;break;case"debug":this.loggerFactory.level=kt.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:$a.newUUID(),Ct.parse(this._instanceId,"uuid")===-1)throw new Error("Invalid instanceId.");this._userAgentCore=this.initCore()}static makeURI(t){return Ct.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:Mw(),sessionDescriptionHandlerFactoryOptions:{},sipExtension100rel:Pr.Unsupported,sipExtensionReplaces:Pr.Unsupported,sipExtensionExtraSupported:[],sipjsId:"",transportConstructor:xp,transportOptions:{},uri:new In("sip","anonymous","anonymous.invalid"),userAgentString:"SIP.js/"+Q0,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 Ko(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:os(8),r=this.options.contactParams;return{pubGruu:void 0,tempGruu:void 0,uri:new In("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===Pr.Supported&&t.push("100rel"),this.options.sipExtensionReplaces===Pr.Supported&&t.push("replaces"),this.options.sipExtensionExtraSupported&&t.push(...this.options.sipExtensionExtraSupported),this.options.hackAllowUnregisteredOptionTags||(t=t.filter(n=>uw[n])),t=Array.from(new Set(t));const r=t.slice();return(this.contact.pubGruu||this.contact.tempGruu)&&r.push("gruu"),new Pw({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 dw(this.getLoggerFactory(),i,n,s)},transportAccessor:()=>this.transport},{onInvite:n=>{var s;const i=new Bs(this,n);if(n.delegate={onCancel:o=>{i._onCancel(o)},onTransportError:o=>{this.logger.error("A transport error has occurred while handling an incoming INVITE request.")}},n.trying(),this.options.sipExtensionReplaces!==Pr.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 pp(n);this.delegate.onMessage(s)}else n.accept()},onNotify:n=>{if(this.delegate&&this.delegate.onNotify){const s=new Kl(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=Go.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 qs){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 qs){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=$i(r.body),i=r.getHeader("content-length");if(i&&s<Number(i)){this.userAgentCore.replyStateless(r,{statusCode:400});return}}if(r instanceof Rn){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=$i(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 qs){this.userAgentCore.receiveIncomingRequestFromTransport(r);return}if(r instanceof Rn){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)}},ut=new window.AudioContext,Nw={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]},Zo=F(null),Xo=F(null),Di=F(null),Oi=F(.5),Qo=F(1),Yl=F("original"),ea=F(!1),Hi={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 Tp=()=>{const e={classic:"original","original-loud":"aurora","original-intense":"resonancia"},t=d=>{Oi.value=Math.max(0,Math.min(1,d/100))},r=d=>{Qo.value=Math.max(0,Math.min(1,d/100))},n=()=>{ea.value&&(l(),a())},s=d=>{const p=e[d]??d;Yl.value=Hi[p]?p:"original",n()},i=(d,p=150)=>{ut.state==="suspended"&&ut.resume();const h=Nw[d.toUpperCase()];if(!h)return;const m=ut.createOscillator(),w=ut.createOscillator(),x=ut.createGain();m.frequency.value=h[0],w.frequency.value=h[1],m.type="sine",w.type="sine",x.gain.value=.1*Oi.value,m.connect(x),w.connect(x),x.connect(ut.destination),m.start(),w.start(),setTimeout(()=>{m.stop(),w.stop(),m.disconnect(),w.disconnect(),x.disconnect()},p)},o=async(d=500)=>{if(ut.state==="suspended")try{await ut.resume()}catch{}const p=ut.createOscillator(),h=ut.createGain(),m=ut.currentTime;p.type="sine",p.frequency.value=600;const w=.02,x=.1,g=.75*Oi.value;h.gain.setValueAtTime(0,m),h.gain.linearRampToValueAtTime(g,m+w),h.gain.setValueAtTime(g,m+d/1e3-x),h.gain.linearRampToValueAtTime(0,m+d/1e3),p.connect(h),h.connect(ut.destination),p.start(m),p.stop(m+d/1e3),await new Promise(S=>window.setTimeout(S,d))},a=()=>{if(ea.value)return;ea.value=!0,ut.state==="suspended"&&ut.resume();const d=()=>{const h=ut.currentTime,m=Hi[Yl.value]||Hi.original,w=ut.createGain(),x=m.duration,g=(m.originalMelody?[m.frequencies[0]]:m.frequencies).map(S=>{const b=ut.createOscillator();return b.type=m.type,b.frequency.setValueAtTime(S,h),m.originalMelody&&m.frequencies.slice(1).forEach((y,T)=>{b.frequency.setValueAtTime(y,h+(T+1)*.1)}),b.connect(w),b});m.originalMelody?(w.gain.setValueAtTime(m.gain*Qo.value,h),w.gain.exponentialRampToValueAtTime(.001,h+x)):(w.gain.setValueAtTime(0,h),w.gain.linearRampToValueAtTime(.7*Qo.value,h+.02),w.gain.setValueAtTime(.7*Qo.value,h+1.05),w.gain.linearRampToValueAtTime(0,h+x)),w.connect(ut.destination),g.forEach(S=>{S.start(h),S.stop(h+x)})},p=()=>{const h=Hi[Yl.value]||Hi.original;Xo.value=window.setTimeout(d,h.repeatDelay)};d(),p(),Zo.value=window.setInterval(()=>{d(),p()},3e3)},l=()=>{Zo.value&&(clearInterval(Zo.value),Zo.value=null),Xo.value&&(clearTimeout(Xo.value),Xo.value=null),ea.value=!1};return{playDtmf:i,playAutoAnswerBeep:o,startRingtone:a,stopRingtone:l,startRingback:()=>{if(Di.value)return;ut.state==="suspended"&&ut.resume();const d=()=>{const p=ut.currentTime,h=ut.createOscillator(),m=ut.createGain();h.type="sine",h.frequency.value=425,m.gain.setValueAtTime(.1*Oi.value,p),m.gain.linearRampToValueAtTime(.1*Oi.value,p+1),m.gain.linearRampToValueAtTime(0,p+1.1),h.connect(m),m.connect(ut.destination),h.start(p),h.stop(p+1.1)};d(),Di.value=window.setInterval(()=>{d()},4e3)},stopRingback:()=>{Di.value&&(clearInterval(Di.value),Di.value=null)},setNotificationVolume:t,setRingtoneVolume:r,setRingtoneTone:s}};function Ep(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=Ep(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ap(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Ep(e))&&(n&&(n+=" "),n+=t);return n}var qw=(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},Bw=(e,t)=>({classGroupId:e,validator:t}),kp=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),ta="-",Ip=[],Lw="arbitrary..",Fw=e=>{const t=jw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return Vw(o);const a=o.split(ta);return Rp(a,a[0]===""&&a.length>1?1:0,t)},getConflictingClassGroupIds:(o,a)=>{if(a){const l=n[o],u=r[o];return l?u?qw(u,l):l:u||Ip}return r[o]||Ip}}},Rp=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],s=r.nextPart.get(n);if(s){const l=Rp(e,t+1,s);if(l)return l}const i=r.validators;if(i===null)return;const o=t===0?e.join(ta):e.slice(t).join(ta),a=i.length;for(let l=0;l<a;l++){const u=i[l];if(u.validator(o))return u.classGroupId}},Vw=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?Lw+n:void 0})(),jw=e=>{const{theme:t,classGroups:r}=e;return Uw(r,t)},Uw=(e,t)=>{const r=kp();for(const n in e){const s=e[n];Zl(s,r,n,t)}return r},Zl=(e,t,r,n)=>{const s=e.length;for(let i=0;i<s;i++){const o=e[i];zw(o,t,r,n)}},zw=(e,t,r,n)=>{if(typeof e=="string"){Kw(e,t,r);return}if(typeof e=="function"){Ww(e,t,r,n);return}Gw(e,t,r,n)},Kw=(e,t,r)=>{const n=e===""?t:$p(t,e);n.classGroupId=r},Ww=(e,t,r,n)=>{if(Jw(e)){Zl(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Bw(r,e))},Gw=(e,t,r,n)=>{const s=Object.entries(e),i=s.length;for(let o=0;o<i;o++){const[a,l]=s[o];Zl(l,$p(t,a),r,n)}},$p=(e,t)=>{let r=e;const n=t.split(ta),s=n.length;for(let i=0;i<s;i++){const o=n[i];let a=r.nextPart.get(o);a||(a=kp(),r.nextPart.set(o,a)),r=a}return r},Jw=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Yw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const s=(i,o)=>{r[i]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let o=r[i];if(o!==void 0)return o;if((o=n[i])!==void 0)return s(i,o),o},set(i,o){i in r?r[i]=o:s(i,o)}}},Xl="!",Pp=":",Zw=[],Dp=(e,t,r,n,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:s}),Xw=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const i=[];let o=0,a=0,l=0,u;const c=s.length;for(let w=0;w<c;w++){const x=s[w];if(o===0&&a===0){if(x===Pp){i.push(s.slice(l,w)),l=w+1;continue}if(x==="/"){u=w;continue}}x==="["?o++:x==="]"?o--:x==="("?a++:x===")"&&a--}const d=i.length===0?s:s.slice(l);let p=d,h=!1;d.endsWith(Xl)?(p=d.slice(0,-1),h=!0):d.startsWith(Xl)&&(p=d.slice(1),h=!0);const m=u&&u>l?u-l:void 0;return Dp(i,h,p,m)};if(t){const s=t+Pp,i=n;n=o=>o.startsWith(s)?i(o.slice(s.length)):Dp(Zw,!1,o,void 0,!0)}if(r){const s=n;n=i=>r({className:i,parseClassName:s})}return n},Qw=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}},ey=e=>({cache:Yw(e.cacheSize),parseClassName:Xw(e),sortModifiers:Qw(e),...Fw(e)}),ty=/\s+/,ry=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:i}=t,o=[],a=e.trim().split(ty);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:w}=r(c);if(d){l=c+(l.length>0?" "+l:l);continue}let x=!!w,g=n(x?m.substring(0,w):m);if(!g){if(!x){l=c+(l.length>0?" "+l:l);continue}if(g=n(m),!g){l=c+(l.length>0?" "+l:l);continue}x=!1}const S=p.length===0?"":p.length===1?p[0]:i(p).join(":"),b=h?S+Xl:S,y=b+g;if(o.indexOf(y)>-1)continue;o.push(y);const T=s(g,x);for(let k=0;k<T.length;++k){const N=T[k];o.push(b+N)}l=c+(l.length>0?" "+l:l)}return l},ny=(...e)=>{let t=0,r,n,s="";for(;t<e.length;)(r=e[t++])&&(n=Op(r))&&(s&&(s+=" "),s+=n);return s},Op=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Op(e[n]))&&(r&&(r+=" "),r+=t);return r},sy=(e,...t)=>{let r,n,s,i;const o=l=>(r=ey(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=ry(l,r);return s(l,c),c};return i=o,(...l)=>i(ny(...l))},iy=[],xt=e=>{const t=r=>r[e]||iy;return t.isThemeGetter=!0,t},Hp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,oy=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ay=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ly=/\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$/,cy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,uy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mn=e=>oy.test(e),Fe=e=>!!e&&!Number.isNaN(Number(e)),Nn=e=>!!e&&Number.isInteger(Number(e)),Ql=e=>e.endsWith("%")&&Fe(e.slice(0,-1)),fn=e=>ay.test(e),Np=()=>!0,fy=e=>ly.test(e)&&!cy.test(e),ec=()=>!1,py=e=>uy.test(e),hy=e=>dy.test(e),gy=e=>!Ce(e)&&!xe(e),vy=e=>qn(e,jp,ec),Ce=e=>Hp.test(e),as=e=>qn(e,Up,fy),qp=e=>qn(e,xy,Fe),my=e=>qn(e,Kp,Np),wy=e=>qn(e,zp,ec),Bp=e=>qn(e,Fp,ec),yy=e=>qn(e,Vp,hy),ra=e=>qn(e,Wp,py),xe=e=>Mp.test(e),Mi=e=>ls(e,Up),by=e=>ls(e,zp),Lp=e=>ls(e,Fp),_y=e=>ls(e,jp),Sy=e=>ls(e,Vp),na=e=>ls(e,Wp,!0),Cy=e=>ls(e,Kp,!0),qn=(e,t,r)=>{const n=Hp.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ls=(e,t,r=!1)=>{const n=Mp.exec(e);return n?n[1]?t(n[1]):r:!1},Fp=e=>e==="position"||e==="percentage",Vp=e=>e==="image"||e==="url",jp=e=>e==="length"||e==="size"||e==="bg-size",Up=e=>e==="length",xy=e=>e==="number",zp=e=>e==="family-name",Kp=e=>e==="number"||e==="weight",Wp=e=>e==="shadow",Ty=()=>{const e=xt("color"),t=xt("font"),r=xt("text"),n=xt("font-weight"),s=xt("tracking"),i=xt("leading"),o=xt("breakpoint"),a=xt("container"),l=xt("spacing"),u=xt("radius"),c=xt("shadow"),d=xt("inset-shadow"),p=xt("text-shadow"),h=xt("drop-shadow"),m=xt("blur"),w=xt("perspective"),x=xt("aspect"),g=xt("ease"),S=xt("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...y(),xe,Ce],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],v=()=>[xe,Ce,l],B=()=>[Mn,"full","auto",...v()],q=()=>[Nn,"none","subgrid",xe,Ce],C=()=>["auto",{span:["full",Nn,xe,Ce]},Nn,xe,Ce],_=()=>[Nn,"auto",xe,Ce],E=()=>["auto","min","max","fr",xe,Ce],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...v()],G=()=>[Mn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],W=()=>[Mn,"screen","full","dvw","lvw","svw","min","max","fit",...v()],ae=()=>[Mn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...v()],Y=()=>[e,xe,Ce],le=()=>[...y(),Lp,Bp,{position:[xe,Ce]}],pe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ae=()=>["auto","cover","contain",_y,vy,{size:[xe,Ce]}],je=()=>[Ql,Mi,as],Ie=()=>["","none","full",u,xe,Ce],Oe=()=>["",Fe,Mi,as],Xe=()=>["solid","dashed","dotted","double"],yt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ne=()=>[Fe,Ql,Lp,Bp],at=()=>["","none",m,xe,Ce],bt=()=>["none",Fe,xe,Ce],Tt=()=>["none",Fe,xe,Ce],A=()=>[Fe,xe,Ce],H=()=>[Mn,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[fn],breakpoint:[fn],color:[Np],container:[fn],"drop-shadow":[fn],ease:["in","out","in-out"],font:[gy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[fn],shadow:[fn],spacing:["px",Fe],text:[fn],"text-shadow":[fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mn,Ce,xe,x]}],container:["container"],columns:[{columns:[Fe,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:T()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Nn,"auto",xe,Ce]}],basis:[{basis:[Mn,"full","auto",a,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,Mn,"auto","initial","none",Ce]}],grow:[{grow:["",Fe,xe,Ce]}],shrink:[{shrink:["",Fe,xe,Ce]}],order:[{order:[Nn,"first","last","none",xe,Ce]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:C()}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:C()}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":E()}],"auto-rows":[{"auto-rows":E()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],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:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[a,"screen",...G()]}],"min-w":[{"min-w":[a,"screen","none",...G()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[o]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",r,Mi,as]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Cy,my]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ql,Ce]}],"font-family":[{font:[by,wy,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":[Fe,"none",xe,qp]}],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:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",xe,as]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Fe,"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:le()}],"bg-repeat":[{bg:pe()}],"bg-size":[{bg:Ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nn,xe,Ce],radial:["",xe,Ce],conic:[Nn,xe,Ce]},Sy,yy]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:je()}],"gradient-via-pos":[{via:je()}],"gradient-to-pos":[{to:je()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:Ie()}],"rounded-s":[{"rounded-s":Ie()}],"rounded-e":[{"rounded-e":Ie()}],"rounded-t":[{"rounded-t":Ie()}],"rounded-r":[{"rounded-r":Ie()}],"rounded-b":[{"rounded-b":Ie()}],"rounded-l":[{"rounded-l":Ie()}],"rounded-ss":[{"rounded-ss":Ie()}],"rounded-se":[{"rounded-se":Ie()}],"rounded-ee":[{"rounded-ee":Ie()}],"rounded-es":[{"rounded-es":Ie()}],"rounded-tl":[{"rounded-tl":Ie()}],"rounded-tr":[{"rounded-tr":Ie()}],"rounded-br":[{"rounded-br":Ie()}],"rounded-bl":[{"rounded-bl":Ie()}],"border-w":[{border:Oe()}],"border-w-x":[{"border-x":Oe()}],"border-w-y":[{"border-y":Oe()}],"border-w-s":[{"border-s":Oe()}],"border-w-e":[{"border-e":Oe()}],"border-w-bs":[{"border-bs":Oe()}],"border-w-be":[{"border-be":Oe()}],"border-w-t":[{"border-t":Oe()}],"border-w-r":[{"border-r":Oe()}],"border-w-b":[{"border-b":Oe()}],"border-w-l":[{"border-l":Oe()}],"divide-x":[{"divide-x":Oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Xe(),"hidden","none"]}],"divide-style":[{divide:[...Xe(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...Xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,xe,Ce]}],"outline-w":[{outline:["",Fe,Mi,as]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",c,na,ra]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",d,na,ra]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:Oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Fe,as]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":Oe()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",p,na,ra]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Fe,xe,Ce]}],"mix-blend":[{"mix-blend":[...yt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":yt()}],"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":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ne()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":Ne()}],"mask-image-t-to-pos":[{"mask-t-to":Ne()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":Ne()}],"mask-image-r-to-pos":[{"mask-r-to":Ne()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":Ne()}],"mask-image-b-to-pos":[{"mask-b-to":Ne()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":Ne()}],"mask-image-l-to-pos":[{"mask-l-to":Ne()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":Ne()}],"mask-image-x-to-pos":[{"mask-x-to":Ne()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":Ne()}],"mask-image-y-to-pos":[{"mask-y-to":Ne()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[xe,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ne()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ne()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:le()}],"mask-repeat":[{mask:pe()}],"mask-size":[{mask:Ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,Ce]}],filter:[{filter:["","none",xe,Ce]}],blur:[{blur:at()}],brightness:[{brightness:[Fe,xe,Ce]}],contrast:[{contrast:[Fe,xe,Ce]}],"drop-shadow":[{"drop-shadow":["","none",h,na,ra]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Fe,xe,Ce]}],"hue-rotate":[{"hue-rotate":[Fe,xe,Ce]}],invert:[{invert:["",Fe,xe,Ce]}],saturate:[{saturate:[Fe,xe,Ce]}],sepia:[{sepia:["",Fe,xe,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,Ce]}],"backdrop-blur":[{"backdrop-blur":at()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,xe,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,xe,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,xe,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,xe,Ce]}],"backdrop-invert":[{"backdrop-invert":["",Fe,xe,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,xe,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,xe,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,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:[Fe,"initial",xe,Ce]}],ease:[{ease:["linear","initial",g,xe,Ce]}],delay:[{delay:[Fe,xe,Ce]}],animate:[{animate:["none",S,xe,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,xe,Ce]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:bt()}],"rotate-x":[{"rotate-x":bt()}],"rotate-y":[{"rotate-y":bt()}],"rotate-z":[{"rotate-z":bt()}],scale:[{scale:Tt()}],"scale-x":[{"scale-x":Tt()}],"scale-y":[{"scale-y":Tt()}],"scale-z":[{"scale-z":Tt()}],"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:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",...Y()]}],"stroke-w":[{stroke:[Fe,Mi,as,qp]}],stroke:[{stroke:["none",...Y()]}],"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"]}},Ey=sy(Ty);const dt=(...e)=>Ey(Ap(e)),lT=4;var Gp=e=>e.replace(/\D/g,"");const tc=(e,t=[])=>{const r=Gp(e??"");return r!==""&&t.some(n=>Gp(n)===r)},_r=(e,t=[])=>e.length<=4||tc(e,t)?e:`${"*".repeat(e.length-4)}${e.slice(-4)}`,Ay=(e,t)=>{if(e){const r=rc(e);if(r&&Jp(r))return r;if(e.trim())return e.trim()}if(t){const r=rc(t);if(r&&Jp(r))return r;const n=ky(t);if(n)return n;if(t.trim()&&!t.includes("@"))return t.trim()}return"Unknown"};var rc=e=>e.replace(/[^\d+*#]/g,""),Jp=e=>/^\+?[\d*#]{2,}$/.test(e),ky=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]?rc(t[1]):null)};const Yp="webphone-auto-answer",nc=()=>{try{return localStorage.getItem(Yp)==="true"}catch{return!1}};var Iy="/assets/sipSharedWorker-Bk0APY9t.js";function Ni(e){"@babel/helpers - typeof";return Ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ni(e)}function Ry(e,t){if(Ni(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Ni(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $y(e){var t=Ry(e,"string");return Ni(t)=="symbol"?t:t+""}function er(e,t,r){return(t=$y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Py=class{constructor(e,t){er(this,"serverUrl",void 0),er(this,"keepAliveInterval",void 0),er(this,"clientId",void 0),er(this,"connectionId",void 0),er(this,"stateEventEmitter",new Ns),er(this,"port",void 0),er(this,"currentState",Ee.Disconnected),er(this,"connectPromise",void 0),er(this,"connectResolve",void 0),er(this,"connectReject",void 0),er(this,"connectTimeout",void 0),er(this,"onConnect",void 0),er(this,"onDisconnect",void 0),er(this,"onMessage",void 0),this.serverUrl=t.server,this.keepAliveInterval=t.keepAliveInterval??30,this.clientId=t.clientId,this.connectionId=t.connectionId;const r=new SharedWorker(Iy,{name:`webphone-sip-${this.connectionId}`});this.port=r.port,r.addEventListener("error",n=>{this.handle({type:"error",error:n.message||"SharedWorker failed to load"})}),this.port.addEventListener("message",n=>this.handle(n.data)),this.port.start()}get protocol(){return new URL(this.serverUrl).protocol.replace(":","").toUpperCase()}get server(){return this.serverUrl}get state(){return this.currentState}get stateChange(){return this.stateEventEmitter}isConnected(){return this.currentState===Ee.Connected}connect(){return this.isConnected()?Promise.resolve():this.connectPromise?this.connectPromise:(this.transition(Ee.Connecting),this.connectPromise=new Promise((e,t)=>{this.connectResolve=e,this.connectReject=t}),this.connectTimeout=setTimeout(()=>{if(this.currentState!==Ee.Connecting)return;const e=new Error(`SharedWorker did not connect to ${this.serverUrl}`);this.transition(Ee.Disconnected),this.connectReject?.(e),this.clearPromise()},1e4),this.post({type:"connect",clientId:this.clientId,connectionId:this.connectionId,server:this.serverUrl,keepAliveInterval:this.keepAliveInterval}),this.connectPromise)}async disconnect(){this.currentState!==Ee.Disconnected&&(this.transition(Ee.Disconnecting),this.connectReject?.(new Error("SharedWorker WebSocket disconnected")),this.clearPromise(),this.post({type:"disconnect",clientId:this.clientId,connectionId:this.connectionId}),this.transition(Ee.Disconnected))}async dispose(){await this.disconnect(),this.port.close()}send(e){return this.isConnected()?(this.post({type:"send",clientId:this.clientId,connectionId:this.connectionId,data:e}),Promise.resolve()):Promise.reject(new Error("SharedWorker WebSocket is not connected"))}post(e){this.port.postMessage(e)}handle(e){switch(e.type){case"connected":this.transition(Ee.Connected),this.connectResolve?.(),this.clearPromise(),this.onConnect?.();break;case"message":this.isConnected()&&this.onMessage?.(e.data);break;case"error":if(this.currentState===Ee.Connecting){const t=new Error(e.error);this.transition(Ee.Disconnected),this.connectReject?.(t),this.clearPromise()}break;case"disconnected":{const t=this.isConnected(),r=e.error?new Error(e.error):void 0;this.transition(Ee.Disconnected),this.connectReject&&(this.connectReject(r??new Error("SharedWorker WebSocket disconnected")),this.clearPromise()),t&&this.onDisconnect?.(r);break}}}clearPromise(){this.connectTimeout&&clearTimeout(this.connectTimeout),this.connectTimeout=void 0,this.connectPromise=void 0,this.connectResolve=void 0,this.connectReject=void 0}transition(e){this.currentState!==e&&(this.currentState=e,this.stateEventEmitter.emit(e))}},Dy="X-Nebula-Queue",Oy="X-Nebula-Queue-Id";const cT=30,sa=[1e3,2e3,5e3,1e4,2e4,3e4],Hy=3e4;var Zp=class extends Error{constructor(){super("Invalid URI")}};const My=(e,t={})=>{const r=ft(null),n=ft(null),s=ft(new Map),i=new Audio;i.autoplay=!0;const o=ft(void 0),a=ft(null),l=ft(null),u=new Map,c=new Map,d=new Set,p=new Map,h=5e3;let m=!1,w=null,x=null,g=null,S=null,b=null,y=null,T=0,k=null,N=null,v=0,B=0;const q=V(()=>r.value?.configuration.uri?.user||""),{startRingtone:C,stopRingtone:_,startRingback:E,stopRingback:P,playAutoAnswerBeep:R,setNotificationVolume:D,setRingtoneVolume:G,setRingtoneTone:W}=Tp(),ae=M=>M instanceof Ko||M instanceof Bs?M.request?.callId||M.dialog?.callId||M.id||crypto.randomUUID():M.dialog?.callId||M.id||crypto.randomUUID(),Y=M=>{if(!(M instanceof Bs))return;const K=M.request;if(!K)return;const L=K.getHeader(Dy)?.trim(),oe=K.getHeader(Oy)?.trim();if(!(!L&&!oe))return{...oe?{id:oe}:{},...L?{name:L}:{}}},le=(M,K,L,oe)=>{const te=Y(M),ve={channelId:K,sipCallId:ae(M),direction:L,remoteNumber:oe,...te?{queue:te}:{}};return u.set(K,ve),t.onCallContext?.(ve),ve},pe=(M,K)=>{const L=u.get(M);L&&t.onCallState?.({...L,state:K,timestamp:Date.now()})},Ae=(M,K)=>{if(s.value.get(K)!==M||M.state!==z.Established)return;const L=u.get(K),oe=M.sessionDescriptionHandler,te=oe?.localMediaStream??l.value,ve=oe?.remoteMediaStream??a.value,ye=te?.getAudioTracks()??[],ke=ve?.getAudioTracks()??[];if(!L||!te||!ve||ye.length===0||ke.length===0)return;const lt=[L.sipCallId,...ye.map(Ze=>`local:${Ze.id}`),...ke.map(Ze=>`remote:${Ze.id}`)].join("|");c.get(K)!==lt&&(c.set(K,lt),t.onMediaReady?.({...L,localStream:te,remoteStream:ve}))},je=M=>{u.delete(M),c.delete(M),d.delete(M)},Ie=(M,K)=>{if(s.value.get(M)!==K)return;const L=p.get(K);L&&clearTimeout(L),p.delete(K);const oe=e.channels.value.find(ke=>ke.id===M),te=u.get(M),ve=d.has(M)||oe?.status==="connected";je(M),s.value.delete(M),e.updateChannelState(M,{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===M||ye.consultationChannelId===M)&&e.setTransferInProgress(null),e.activeChannelId.value===M&&uu(),Ne(),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(ke){console.warn("[SipJs] Call ended, but saving its history failed:",ke)}try{t.onCallState?.({...te,state:ve?"ended":"failed",timestamp:Date.now()})}catch(ke){console.warn("[SipJs] Call ended, but the state callback failed:",ke)}}},Oe=(M,K)=>{p.has(K)||p.set(K,setTimeout(()=>{console.warn("[SipJs] Hangup did not terminate; releasing local call state"),Xe(K),Ie(M,K)},h))},Xe=M=>{if(M.state!==z.Terminated)try{M.dispose().catch(K=>{console.warn("[SipJs] Session disposal failed:",K)})}catch(K){console.warn("[SipJs] Session disposal failed:",K)}},yt=()=>{for(const[M,K]of s.value)K.state===z.Initial&&u.get(M)?.direction==="incoming"&&(console.warn("[SipJs] Transport lost while ringing; releasing the incoming call"),Ie(M,K),Xe(K))},Ne=()=>{e.channels.value.some(M=>M.status==="incoming")&&!nc()?C():_(),e.activeChannel.value?.status==="calling"?E():P()},at=async(M,K,L)=>{await R(),nc()&&s.value.get(M)===K&&K.state===z.Initial&&await he(L)},bt=M=>{i.volume=M/100},Tt=async M=>{typeof i.setSinkId=="function"&&await i.setSinkId(M)},A=async M=>{if(!M)return;const K=[...s.value.entries()].flatMap(([te,ve])=>{const ye=ve.sessionDescriptionHandler,ke=ye?.peerConnection?.getSenders().find(lt=>lt.track?.kind==="audio");return ke?[{channelId:te,session:ve,sdh:ye,sender:ke}]:[]});if(K.length===0){o.value=M;return}const L=[],oe=[];try{for(const{sender:ve}of K){const ye=await navigator.mediaDevices.getUserMedia(fe(!1,M));L.push(ye);const[ke]=ye.getAudioTracks(),lt=ve.track;if(!ke||!lt)throw new Error("Could not acquire an audio track for the selected microphone");ke.enabled=lt.enabled,await ve.replaceTrack(ke),oe.push({sender:ve,previousTrack:lt})}o.value=M,K.forEach(({channelId:ve,session:ye,sdh:ke,sender:lt},Ze)=>{const mt=L[Ze]?.getAudioTracks()[0];if(!mt)return;const Kn=e.channels.value.find(_n=>_n.id===ve),Gi=!(Kn?.isHeld||Kn?.isMuted);lt.track.enabled=Gi;const xr=ke.localMediaStream;xr&&(xr.getAudioTracks().forEach(_n=>{_n!==mt&&xr.removeTrack(_n)}),xr.getTracks().includes(mt)||xr.addTrack(mt)),e.activeChannelId.value===ve&&(xr?l.value=xr:l.value&&(l.value.getAudioTracks().forEach(_n=>{_n!==mt&&l.value?.removeTrack(_n)}),l.value.getTracks().includes(mt)||l.value.addTrack(mt)));try{Ae(ye,ve)}catch(_n){console.error("[SipJs] Media-ready callback failed after microphone switch:",_n)}});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(ke=>{ke!==K[ye]?.sender.track&&ke.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)}},H=(M,K)=>{let L=!1;const oe=M.sessionDescriptionHandler;return oe?.peerConnection&&oe.peerConnection.getSenders().forEach(te=>{te.track&&te.track.kind==="audio"&&(te.track.enabled=K,L=!0)}),L},J=M=>{let K=!1;return l.value&&l.value.getAudioTracks().forEach(L=>{L.enabled=M,K=!0}),K},se=(M,K)=>{const L=!(K?.isHeld||K?.isMuted),oe=H(M,L),te=J(L);!oe&&!te&&console.warn("[SipJs] No audio tracks found to apply channel audio state")},re=M=>{for(const[K,L]of s.value.entries())if(L===M)return e.channels.value.find(oe=>oe.id===K)||null;return e.activeChannel.value||null},ee=async M=>{const K=M.sessionDescriptionHandler?.peerConnection;if(!K)return;const L=re(M),oe=!(L?.isHeld||L?.isMuted),te=K.getSenders().find(ve=>ve.track?.kind==="audio");if(te?.track){te.track.enabled=oe,L&&Ae(M,L.id);return}try{const ve=await navigator.mediaDevices.getUserMedia(fe(!1));if(![...s.value.values()].includes(M)){ve.getTracks().forEach(Ze=>Ze.stop());return}const[ye]=ve.getAudioTracks();if(!ye)return;ye.enabled=oe;const ke=new MediaStream([ye]);l.value=ke;const lt=K.getSenders().find(Ze=>Ze.track===null);lt?await lt.replaceTrack(ye):K.addTrack(ye,ke),se(M,L),L&&Ae(M,L.id)}catch(ve){console.warn("[SipJs] Failed to recover outbound audio track:",ve)}},fe=(M=!1,K=o.value)=>{const L={echoCancellation:{ideal:!0},noiseSuppression:{ideal:!1},autoGainControl:{ideal:!1},channelCount:1};return K&&(L.deviceId={exact:K}),{audio:L,video:M}},de=async()=>{const M=n.value;M&&await M.register({requestDelegate:{onAccept:()=>{e.setConnected(!0),T=0},onReject:K=>{e.setConnected(!1);const L=K?.message?.statusCode;L===401||L===403||L===404||ge()}}})},ue=async M=>{if(r.value)return;N&&(clearTimeout(N),N=null);const K=B;try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(L=>L.stop())}catch(L){console.error("Microphone permission denied",L);return}try{const L=jr.makeURI(M.uri);if(!L)throw new Zp;m=M.earlyMedia??!1;const oe={server:M.transportOptions.server,keepAliveInterval:M.transportOptions.keepAliveInterval??30},te={uri:L,logLevel:"error",transportOptions:oe,authorizationUsername:M.authorizationUsername,authorizationPassword:M.authorizationPassword,reconnectionAttempts:0,delegate:{onConnect:()=>{},onDisconnect:()=>{e.setConnected(!1),yt(),ge()},onInvite:ke=>Z(ke)}},ve=typeof SharedWorker<"u";let ye=ve;ve&&(te.transportConstructor=Py,te.transportOptions={...oe,clientId:crypto.randomUUID(),connectionId:`${M.transportOptions.server}|${M.uri}|${crypto.randomUUID()}`});try{r.value=new jr(te)}catch(ke){if(!ve)throw ke;ye=!1,console.warn("[SipJs] SharedWorker unavailable, using native WebSocket transport",ke),delete te.transportConstructor,te.transportOptions=oe,r.value=new jr(te)}try{await r.value.start(),n.value=new Wo(r.value),await de()}catch(ke){if(!ye)throw ke;console.warn("[SipJs] SharedWorker connection failed, retrying with native WebSocket",ke);const lt=r.value;r.value=null,n.value=null;try{await lt?.stop()}catch(Ze){console.warn("[SipJs] Failed to clean up SharedWorker transport",Ze)}delete te.transportConstructor,te.transportOptions=oe,r.value=new jr(te),await r.value.start(),n.value=new Wo(r.value),await de()}Re(),v=0}catch(L){console.error("[SipJs] Failed to initialize WSS/SIP connection",L);const oe=r.value;if(r.value=null,n.value=null,oe!==null)try{await oe.stop()}catch(te){console.warn("[SipJs] Failed to clean up after connection error",te)}!(L instanceof Zp)&&K===B&&ie(M)}},ie=M=>{if(N)return;const K=sa[Math.min(v,sa.length-1)];v++,N=setTimeout(async()=>{if(N=null,!navigator.onLine){console.log("[SipJs] Skipping initial connection retry, device is offline"),ie(M);return}console.log("[SipJs] Retrying initial connection..."),await ue(M)},K)},Re=()=>{g=new AbortController;const{signal:M}=g;let K=Date.now();const L=5e3,oe=(mt=1e3)=>{S&&clearTimeout(S),S=setTimeout(async()=>{S=null,await He()},mt)},te=()=>{if(document.visibilityState==="visible"){Ne();const mt=Date.now()-K;mt>L?(console.log(`[SipJs] Device was suspended for ${Math.round(mt/1e3)}s, reconnecting...`),oe(1500)):oe(500)}K=Date.now()},ve=()=>{console.log("[SipJs] Network online, reconnecting..."),oe(1e3)},ye=()=>{console.log("[SipJs] Network offline"),e.setConnected(!1),S&&(clearTimeout(S),S=null)},ke=()=>{b=setInterval(()=>{const mt=Date.now(),Kn=mt-K;Kn>3e4&&(console.log(`[SipJs] Heartbeat drift detected (${Math.round(Kn/1e3)}s), device may have woken from sleep`),oe(1500)),K=mt},1e3)},lt=()=>{console.log("[SipJs] Page frozen"),b&&(clearInterval(b),b=null)},Ze=()=>{console.log("[SipJs] Page resumed"),Ne(),K=Date.now(),ke(),oe(1e3)};document.addEventListener("visibilitychange",te,{signal:M}),window.addEventListener("online",ve,{signal:M}),window.addEventListener("offline",ye,{signal:M}),document.addEventListener("freeze",lt,{signal:M}),document.addEventListener("resume",Ze,{signal:M}),ke(),Te()},ge=()=>{if(y||!r.value)return;const M=sa[Math.min(T,sa.length-1)];y=setTimeout(async()=>{if(y=null,!r.value||e.isConnected.value){T=0;return}T++,await He(),e.isConnected.value||ge()},M)},Te=()=>{k&&clearInterval(k),k=setInterval(()=>{r.value&&!e.isConnected.value&&ge()},Hy)},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 de()}catch{}}catch(M){console.error("[SipJs] Reconnection failed:",M)}}},Ve=async()=>{g?.abort(),g=null,S&&(clearTimeout(S),S=null),b&&(clearInterval(b),b=null),k&&(clearInterval(k),k=null),y&&(clearTimeout(y),y=null),T=0,N&&(clearTimeout(N),N=null),v=0,B++;for(const[L,oe]of s.value.entries()){let te;try{await Promise.race([st(L,oe),new Promise(ve=>{te=setTimeout(ve,1500)})])}finally{te&&clearTimeout(te)}}uu();const M=n.value,K=r.value;if(n.value=null,r.value=null,M)try{await M.unregister()}catch(L){console.warn("[SipJs] Unregister failed:",L)}if(K)try{await K.stop()}catch(L){console.warn("[SipJs] UserAgent stop failed:",L)}},Z=M=>{console.log("[SipJs] 📞 Llamada entrante recibida"),console.log("[SipJs] Remote Identity URI:",M.remoteIdentity.uri.toString()),console.log("[SipJs] Remote Identity URI user:",M.remoteIdentity.uri.user),console.log("[SipJs] Remote Identity displayName:",M.remoteIdentity.displayName);const K=e.channels.value.find(ve=>ve.status==="idle"&&!s.value.has(ve.id));if(!K){console.warn("[SipJs] ⚠️ No hay canales disponibles, rechazando llamada"),M.reject();return}const L=K.id;s.value.set(L,M);const oe=M.body?M.body.includes("m=video"):!1,te=Ay(M.remoteIdentity.uri.user,M.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:M.remoteIdentity.displayName||void 0,hasVideo:oe}),le(M,L,"incoming",te),pe(L,"ringing"),Ne(),e.setActiveChannelId(L),nc()&&at(L,M,oe),M.stateChange.addListener(ve=>{switch(ve){case z.Terminated:Ie(L,M);break;case z.Established:if(s.value.get(L)!==M)break;d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),pe(L,"connected"),e.activeChannelId.value===L&&(Zs(M),ee(M).then(()=>Ae(M,L))),Ne();break}})},ce=async(M,K=!1)=>{if(!r.value)return;const L=e.activeChannelId.value;if(s.value.has(L))return;let oe=jr.makeURI(M);if(!oe&&r.value.configuration.uri){const ye=r.value.configuration.uri.host;oe=jr.makeURI(`sip:${M}@${ye}`)}if(!oe)return;const te=new Ko(r.value,oe,{earlyMedia:m});s.value.set(L,te),le(te,L,"outgoing",M),pe(L,"dialing"),e.updateChannelState(L,{status:"calling",remoteNumber:M,hasVideo:K}),e.setLastDialedNumber(M),Ne(),te.stateChange.addListener(ye=>{switch(ye){case z.Established:if(s.value.get(L)!==te)break;d.add(L),e.channels.value.find(ke=>ke.id===L)?.status!=="connected"&&(e.updateChannelState(L,{status:"connected",startTime:Date.now()}),pe(L,"connected"),Zs(te),ee(te).then(()=>Ae(te,L)),Ne());break;case z.Terminated:Ie(L,te);break}});const ve={sessionDescriptionHandlerOptions:{constraints:fe(K)},requestDelegate:{onProgress:ye=>{s.value.get(L)===te&&(ye.message.statusCode===180||ye.message.statusCode===183)&&(ye.message.body&&(e.updateChannelState(L,{hasEarlyMedia:!0}),Zs(te)),Ne())},onAccept:ye=>{s.value.get(L)===te&&e.channels.value.find(ke=>ke.id===L)?.status!=="connected"&&(d.add(L),e.updateChannelState(L,{status:"connected",startTime:Date.now()}),pe(L,"connected"),Zs(te),ee(te).then(()=>Ae(te,L)),Ne())}}};try{await te.invite(ve)}catch(ye){throw Ie(L,te),ye}},he=async(M=!1)=>{const K=e.activeChannelId.value,L=s.value.get(K);if(L instanceof Bs&&L.state===z.Initial){_(),e.updateChannelState(K,{status:"connected",startTime:Date.now()}),Ne();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 dr(ve,!0),e.updateChannelState(te,{isHeld:!0})}catch(ye){console.error(`[SipJs] Failed to hold channel ${te}:`,ye)}const oe={sessionDescriptionHandlerOptions:{constraints:fe(M),iceGatheringTimeout:1e3}};try{await L.accept(oe),Ne()}catch(te){const ve=s.value.get(K);throw ve instanceof Bs&&ve.state===z.Initial&&(e.updateChannelState(K,{status:"incoming",startTime:void 0}),Ne()),te}}},st=async(M,K)=>{Oe(M,K);try{switch(K.state){case z.Initial:case z.Establishing:K instanceof Ko?await K.cancel():K instanceof Bs&&await K.reject();break;case z.Established:await K.bye();break}}catch(L){console.warn("[SipJs] Hangup signaling failed:",L)}finally{Xe(K),Ie(M,K)}},ur=async()=>{const M=e.activeChannelId.value,K=s.value.get(M);K&&await st(M,K)},Kt=()=>{const M=s.value.get(e.activeChannelId.value);if(!M)return;const K=!e.isMuted.value;e.setMuted(K),se(M,e.channels.value.find(L=>L.id===e.activeChannelId.value))},dr=async(M,K)=>{const L={sessionDescriptionHandlerOptions:{hold:K}};await M.invite(L)},Aa=async()=>{const M=s.value.get(e.activeChannelId.value);if(M?.state!==z.Established)return;const K=!e.isHeld.value;try{await dr(M,K),e.setHeld(K),se(M,e.channels.value.find(L=>L.id===e.activeChannelId.value))}catch{}},Wt=async M=>{const K=e.activeChannelId.value;if(K===M)return;const L=s.value.get(K),oe=s.value.get(M),te=e.channels.value.find(ye=>ye.id===K),ve=e.channels.value.find(ye=>ye.id===M);if(L&&L.state===z.Established&&!te?.isHeld)try{await dr(L,!0),e.updateChannelState(K,{isHeld:!0}),se(L,e.channels.value.find(ye=>ye.id===K))}catch{}if(e.setActiveChannelId(M),Ne(),oe&&oe.state===z.Established){if(ve?.isHeld)try{await dr(oe,!1),e.updateChannelState(M,{isHeld:!1})}catch{}se(oe,e.channels.value.find(ye=>ye.id===M)),Zs(oe)}else uu()},Cr=M=>{if(!/^[0-9*#]$/.test(M))return;const K=s.value.get(e.activeChannelId.value);if(K?.state!==z.Established)return;const L=K.sessionDescriptionHandler?.peerConnection?.getSenders().find(te=>te.track?.kind==="audio")?.dtmf;if(L?.canInsertDTMF){L.insertDTMF(M,160,70);return}const oe={requestOptions:{body:{content:`Signal=${M}\r
68
+ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}};K.info(oe)},Wi=(M,K)=>{const L=e.channels.value.find(oe=>oe.id===M);!L||L.status!=="connected"||(Zs(K),se(K,L),ee(K),i.play().catch(()=>{}))},ka=async M=>{console.log("[SipJs] 🔄 transferCall iniciado"),console.log("[SipJs] Target:",M);const K=e.activeChannelId.value,L=s.value.get(K);if(!L)throw console.error("[SipJs] ❌ No hay sesión activa en el canal",K),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=jr.makeURI(M);if(!oe&&r.value?.configuration.uri){const te=r.value.configuration.uri.host;console.log("[SipJs] Construyendo URI con dominio:",te),oe=jr.makeURI(`sip:${M}@${te}`)}if(!oe)throw console.error("[SipJs] ❌ URI de destino inválida:",M),new Error(`Invalid transfer target: ${M}`);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),Wi(K,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 ke=parseInt(ye[1],10),lt=ye[2]?.trim()||"";if(console.log("[SipJs] 📊 Status code:",ke),console.log("[SipJs] 📊 Status text:",lt),ke>=200&&ke<300)console.log("[SipJs] ✅ Transferencia exitosa! Terminando sesión..."),setTimeout(()=>{L.bye().catch(Ze=>{console.warn("[SipJs] Error hanging up after successful transfer:",Ze)})},500);else if(ke>=400){console.error("[SipJs] ❌ Transfer falló con status:",ke,lt),console.log("[SipJs] 🔄 Manteniendo la sesión activa para el usuario");const Ze={404:"Número no encontrado",486:"Número ocupado",487:"Transferencia cancelada",503:"Servicio no disponible - el destino puede estar fuera de línea"}[ke]||`Error en transferencia (código ${ke})`;console.warn("[SipJs] 💬",Ze),Wi(K,L)}else ke>=100&&ke<200&&console.log("[SipJs] 📞 Transferencia en progreso:",ke,lt)}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}},eT=async M=>{console.log("[SipJs] 🔄 startAttendedTransfer iniciado"),console.log("[SipJs] Target:",M);const K=e.activeChannelId.value,L=s.value.get(K);if(console.log("[SipJs] Canal original:",K),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 dr(L,!0),e.updateChannelState(K,{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:",M),await ce(M,!1),console.log("[SipJs] ✅ Llamada de consulta iniciada"),e.setTransferInProgress({originalChannelId:K,consultationChannelId:oe.id,targetNumber:M}),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(K),await dr(L,!1).catch(()=>{}),e.updateChannelState(K,{isHeld:!1}),new Error("Failed to initiate consultation call")}},tT=async()=>{console.log("[SipJs] 🔄 completeAttendedTransfer iniciado");const M=e.transferInProgress.value;if(!M)throw console.error("[SipJs] ❌ No hay transferencia en progreso"),new Error("No transfer in progress");console.log("[SipJs] Estado de transferencia:",M);const K=s.value.get(M.originalChannelId),L=s.value.get(M.consultationChannelId);if(console.log("[SipJs] Sesión original:",K?.state),console.log("[SipJs] Sesión de consulta:",L?.state),!K||!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 ke=jr.makeURI(M.targetNumber);if(!ke&&r.value?.configuration.uri){const Ze=r.value.configuration.uri.host;ke=jr.makeURI(`sip:${M.targetNumber}@${Ze}`)}if(!ke)throw new Error("Invalid transfer target URI");const lt=`${encodeURIComponent(te)}%3Bto-tag%3D${encodeURIComponent(ve)}%3Bfrom-tag%3D${encodeURIComponent(ye)}`;ke.setHeader("Replaces",lt);try{await K.refer(ke,{onNotify:Ze=>{Ze.accept();const mt=Ze.request.body,Kn=typeof mt=="string"?mt:mt&&typeof mt=="object"&&"content"in mt?mt.content:void 0;if(Kn){const Gi=Kn.match(/SIP\/2\.0\s+(\d+)/);if(Gi&&Gi[1]){const xr=parseInt(Gi[1]);xr>=200&&xr<300?setTimeout(()=>{st(M.originalChannelId,K),st(M.consultationChannelId,L),e.setTransferInProgress(null)},500):xr>=400&&(console.error("[SipJs] Attended transfer failed with status:",xr),e.setTransferInProgress(null))}}},requestDelegate:{onAccept:()=>{},onReject:Ze=>{console.error("[SipJs] Attended transfer REFER rejected:",Ze.message.statusCode),e.setTransferInProgress(null)}}})}catch(Ze){throw console.error("[SipJs] Attended transfer failed:",Ze),Ze}},rT=async()=>{const M=e.transferInProgress.value;if(!M)throw new Error("No transfer in progress");console.log("[SipJs] Canceling attended transfer...");const K=s.value.get(M.originalChannelId),L=s.value.get(M.consultationChannelId);if(L)try{await st(M.consultationChannelId,L),console.log("[SipJs] Consultation call ended")}catch(oe){console.warn("[SipJs] Error ending consultation:",oe)}if(K)try{e.setActiveChannelId(M.originalChannelId),await dr(K,!1),e.updateChannelState(M.originalChannelId,{isHeld:!1}),console.log("[SipJs] Returned to original call")}catch(oe){console.warn("[SipJs] Error resuming original call:",oe)}e.setTransferInProgress(null)},Zs=M=>{const K=M.sessionDescriptionHandler;if(!K){console.error("[SipJs] setupRemoteMedia: no sessionDescriptionHandler");return}const L=K.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=K.localMediaStream??null;const oe=re(M);se(M,oe),oe&&Ae(M,oe.id);const te=ye=>{x?.abort(),x=new AbortController;const{signal:ke}=x,lt=()=>{i.play().catch(Ze=>{Ze.name!=="AbortError"&&console.error("[SipJs] play() failed:",Ze.name,Ze.message)})};ye.addEventListener("unmute",()=>{lt()},{signal:ke}),lt()};L.addEventListener("addtrack",ye=>{ye.track.kind==="audio"&&(i.srcObject=null,i.srcObject=L,te(ye.track),oe&&Ae(M,oe.id))},{signal:w.signal});const[ve]=L.getTracks();ve&&(i.srcObject=L,te(ve),oe&&Ae(M,oe.id))},uu=()=>{x?.abort(),x=null,w?.abort(),w=null,i.pause(),i.srcObject=null,a.value=null,l.value=null};return{initUserAgent:ue,stop:Ve,makeCall:ce,answerCall:he,hangupCall:ur,toggleMute:Kt,toggleHold:Aa,sendDTMF:Cr,transferCall:ka,startAttendedTransfer:eT,completeAttendedTransfer:tT,cancelAttendedTransfer:rT,switchChannel:Wt,extension:q,setVolume:bt,setNotificationVolume:D,setRingtoneVolume:G,setRingtoneTone:W,setOutputDevice:Tt,setInputDevice:A,remoteStream:a,localStream:l}};var Xp=e=>typeof e=="boolean"?`${e}`:e===0?"0":e;const Qp=Ap,eh=(e,t)=>r=>{var n;if(t?.variants==null)return Qp(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=Xp(u)||Xp(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 Qp(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 Ny(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qy(e,t,r){Ny(e,t),t.set(e,r)}function By(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 ia(e,t){return e.get(By(e,t))}function th(e){return typeof e=="string"?`'${e}'`:new Ly().serialize(e)}var Ly=(function(){var e=new WeakMap;class t{constructor(){qy(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=ia(e,this).get(n);return s===void 0&&(ia(e,this).set(n,`#${ia(e,this).size}`),s=this.serializeObject(n),ia(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 Fy(e,t){return e===t||th(e)===th(t)}function qi(e,t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY){return Math.min(r,Math.max(t,e))}function Pt(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=>(Xn(n,o),o)]}function or(){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 sc(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 ic(e){return e==null}function oc(e){return e?e.flatMap(t=>t.type===Ke?oc(t.children):[t]):[]}var[oa,dT]=Pt("ConfigProvider");function Vy(e,t){var r;const n=ft();return ct(()=>{n.value=e()},{...t,flush:(r=t?.flush)!==null&&r!==void 0?r:"sync"}),Ht(n)}function Bn(e,t){return ro()?(qa(e,t),!0):!1}function jy(){const e=new Set,t=i=>{e.delete(i)};return{on:i=>{e.add(i);const o=()=>t(i);return Bn(o),{off:o}},off:t,trigger:(...i)=>Promise.all(Array.from(e).map(o=>o(...i))),clear:()=>{e.clear()}}}function Uy(e){let t=!1,r;const n=Na(!0);return((...s)=>(t||(r=n.run(()=>e(...s)),t=!0),r))}var qt=typeof window<"u"&&typeof document<"u",fT=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,zy=e=>typeof e<"u",Ky=Object.prototype.toString,Wy=e=>Ky.call(e)==="[object Object]",pn=()=>{},ac=Gy();function Gy(){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 Jy(...e){if(e.length!==1)return Ya(...e);const t=e[0];return typeof t=="function"?Ht(li(()=>({get:t,set:pn}))):F(t)}function rh(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 nh=e=>e();function Yy(e,t={}){let r,n,s=pn;const i=l=>{clearTimeout(l),s(),s=pn};let o;return l=>{const u=$e(e),c=$e(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 Zy(e=nh,t={}){const{initialState:r="active"}=t,n=Jy(r==="active");function s(){n.value=!1}function i(){n.value=!0}return{isActive:Ht(n),pause:s,resume:i,eventFilter:(...a)=>{n.value&&e(...a)}}}function lc(e){return Array.isArray(e)?e:[e]}function sh(e){const t=Object.create(null);return(r=>t[r]||(t[r]=e(r)))}var Xy=/\B([A-Z])/g,pT=sh(e=>e.replace(Xy,"-$1").toLowerCase()),Qy=/-(\w)/g,hT=sh(e=>e.replace(Qy,(t,r)=>r?r.toUpperCase():""));function ih(e){return e||gt()}function eb(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=Na(!0),r=n.run(()=>e(...i))),Bn(s),r))}function tb(e){return Qr(rt(e)?new Proxy({},{get(t,r,n){return f(Reflect.get(e.value,r,n))},set(t,r,n){return rt(e.value[r])&&!rt(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 rb(e){return tb(V(e))}function Ut(e,...t){const r=t.flat(),n=r[0];return rb(()=>Object.fromEntries(typeof n=="function"?Object.entries(Mt(e)).filter(([s,i])=>!n($e(i),s)):Object.entries(Mt(e)).filter(s=>!r.includes(s[0]))))}function oh(e,t=1e4){return li((r,n)=>{let s=$e(e),i;const o=()=>setTimeout(()=>{s=$e(e),n()},$e(t));return Bn(()=>{clearTimeout(i)}),{get(){return r(),s},set(a){s=a,n(),clearTimeout(i),i=o()}}})}function cc(e,t=200,r={}){return rh(Yy(t,r),e)}function nb(e,t,r={}){const{eventFilter:n=nh,...s}=r;return Me(e,rh(n,t),s)}function sb(e,t,r={}){const{eventFilter:n,initialState:s="active",...i}=r,{eventFilter:o,pause:a,resume:l,isActive:u}=Zy(n,{initialState:s});return{stop:nb(e,t,{...i,eventFilter:o}),pause:a,resume:l,isActive:u}}function ib(e,t={}){if(!rt(e))return Mt(e);const r=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const n in e.value)r[n]=li(()=>({get(){return e.value[n]},set(s){var i;if(!((i=$e(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 ob(e,t){ih(t)&&Ps(e,t)}function ab(e,t=!0,r){ih(r)?tt(e,r):t?e():Et(e)}function lb(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let i=null;const o=ft(!1);function a(){i&&(clearInterval(i),i=null)}function l(){o.value=!1,a()}function u(){const c=$e(t);c<=0||(o.value=!0,s&&e(),a(),o.value&&(i=setInterval(e,c)))}return n&&qt&&u(),(rt(t)||typeof t=="function")&&Bn(Me(t,()=>{o.value&&qt&&u()})),Bn(l),{isActive:en(o),pause:l,resume:u}}function ah(e,t,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r,i=ft(!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)},$e(t))}return n&&(i.value=!0,qt&&u()),Bn(l),{isPending:en(i),start:u,stop:l}}function cb(e,t,r){return Me(e,t,{...r,immediate:!0})}function ub(e,t,r){return Me(e,t,{...r,once:!0})}var Dr=qt?window:void 0,gT=qt?window.document:void 0,vT=qt?window.navigator:void 0,mT=qt?window.location:void 0;function tr(e){var t;const r=$e(e);return(t=r?.$el)!==null&&t!==void 0?t:r}function zt(...e){const t=(n,s,i,o)=>(n.addEventListener(s,i,o),()=>n.removeEventListener(s,i,o)),r=V(()=>{const n=lc($e(e[0])).filter(s=>s!=null);return n.every(s=>typeof s!="string")?n:void 0});return cb(()=>{var n,s;return[(n=(s=r.value)===null||s===void 0?void 0:s.map(i=>tr(i)))!==null&&n!==void 0?n:[Dr].filter(i=>i!=null),lc($e(r.value?e[1]:e[0])),lc(f(r.value?e[2]:e[1])),$e(r.value?e[3]:e[2])]},([n,s,i,o],a,l)=>{if(!n?.length||!s?.length||!i?.length)return;const u=Wy(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 lh=!1;function db(e,t,r={}){const{window:n=Dr,ignore:s=[],capture:i=!0,detectIframe:o=!1,controls:a=!1}=r;if(!n)return a?{stop:pn,cancel:pn,trigger:pn}:pn;if(ac&&!lh){lh=!0;const x={passive:!0};Array.from(n.document.body.children).forEach(g=>g.addEventListener("click",pn,x)),n.document.documentElement.addEventListener("click",pn,x)}let l=!0;const u=x=>$e(s).some(g=>{if(typeof g=="string")return Array.from(n.document.querySelectorAll(g)).some(S=>S===x.target||x.composedPath().includes(S));{const S=tr(g);return S&&(x.target===S||x.composedPath().includes(S))}});function c(x){const g=$e(x);return g&&g.$.subTree.shapeFlag===16}function d(x,g){const S=$e(x),b=S.$.subTree&&S.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(y=>y.el===g.target||g.composedPath().includes(y.el))}const p=x=>{const g=tr(e);if(x.target!=null&&!(!(g instanceof Element)&&c(e)&&d(e,x))&&!(!g||g===x.target||x.composedPath().includes(g))){if("detail"in x&&x.detail===0&&(l=!u(x)),!l){l=!0;return}t(x)}};let h=!1;const m=[zt(n,"click",x=>{h||(h=!0,setTimeout(()=>{h=!1},0),p(x))},{passive:!0,capture:i}),zt(n,"pointerdown",x=>{const g=tr(e);l=!u(x)&&!!(g&&!x.composedPath().includes(g))},{passive:!0}),o&&zt(n,"blur",x=>{setTimeout(()=>{var g;const S=tr(e);((g=n.document.activeElement)===null||g===void 0?void 0:g.tagName)==="IFRAME"&&!S?.contains(n.document.activeElement)&&t(x)},0)},{passive:!0})].filter(Boolean),w=()=>m.forEach(x=>x());return a?{stop:w,cancel:()=>{l=!1},trigger:x=>{l=!0,p(x),l=!1}}:w}function uc(){const e=ft(!1),t=gt();return t&&tt(()=>{e.value=!0},t),e}function ch(e){const t=uc();return V(()=>(t.value,!!e()))}function fb(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function pb(...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=Dr,eventName:i="keydown",passive:o=!1,dedupe:a=!1}=n,l=fb(t);return zt(s,i,c=>{c.repeat&&$e(a)||l(c)&&r(c)},o)}function hb(e){return JSON.parse(JSON.stringify(e))}var aa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},la="__vueuse_ssr_handlers__",gb=vb();function vb(){return la in aa||(aa[la]=aa[la]||{}),aa[la]}function mb(e,t){return gb[e]||t}function wb(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 yb={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()}},uh="vueuse-storage";function cs(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=Dr,eventFilter:p,onError:h=P=>{console.error(P)},initOnMounted:m}=n,w=(c?ft:F)(typeof t=="function"?t():t),x=V(()=>$e(e));if(!r)try{r=mb("getDefaultStorage",()=>Dr?.localStorage)()}catch(P){h(P)}if(!r)return w;const g=$e(t),S=wb(g),b=(s=n.serializer)!==null&&s!==void 0?s:yb[S],{pause:y,resume:T}=sb(w,P=>q(P),{flush:i,deep:o,eventFilter:p});Me(x,()=>_(),{flush:i});let k=!1;const N=P=>{m&&!k||_(P)},v=P=>{m&&!k||E(P)};d&&a&&(r instanceof Storage?zt(d,"storage",N,{passive:!0}):zt(d,uh,v)),m?ab(()=>{k=!0,_()}):_();function B(P,R){if(d){const D={key:x.value,oldValue:P,newValue:R,storageArea:r};d.dispatchEvent(r instanceof Storage?new StorageEvent("storage",D):new CustomEvent(uh,{detail:D}))}}function q(P){try{const R=r.getItem(x.value);if(P==null)B(R,null),r.removeItem(x.value);else{const D=b.write(P);R!==D&&(r.setItem(x.value,D),B(R,D))}}catch(R){h(R)}}function C(P){const R=P?P.newValue:r.getItem(x.value);if(R==null)return l&&g!=null&&r.setItem(x.value,b.write(g)),g;if(!P&&u){const D=b.read(R);return typeof u=="function"?u(D,g):S==="object"&&!Array.isArray(D)?{...g,...D}:D}else return typeof R!="string"?R:b.read(R)}function _(P){if(!(P&&P.storageArea!==r)){if(P&&P.key==null){w.value=g;return}if(!(P&&P.key!==x.value)){y();try{const R=b.write(w.value);(P===void 0||P?.newValue!==R)&&(w.value=C(P))}catch(R){h(R)}finally{P?Et(T):T()}}}}function E(P){_(P.detail)}return w}var ca={speed:2,margin:30,direction:"both"};function bb(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 _b(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=Dr,containerElement:x,handle:g=e,buttons:S=[0],restrictInView:b,autoScroll:y=!1}=t,T=F((r=$e(h))!==null&&r!==void 0?r:{x:0,y:0}),k=F(),N=le=>o?o.includes(le.pointerType):!0,v=le=>{$e(a)&&le.preventDefault(),$e(l)&&le.stopPropagation()},B=$e(y),q=typeof B=="object"?{speed:(n=$e(B.speed))!==null&&n!==void 0?n:ca.speed,margin:(s=$e(B.margin))!==null&&s!==void 0?s:ca.margin,direction:(i=B.direction)!==null&&i!==void 0?i:ca.direction}:ca,C=le=>typeof le=="number"?[le,le]:[le.x,le.y],_=(le,pe,Ae)=>{const{clientWidth:je,clientHeight:Ie,scrollLeft:Oe,scrollTop:Xe,scrollWidth:yt,scrollHeight:Ne}=le,[at,bt]=C(q.margin),[Tt,A]=C(q.speed);let H=0,J=0;(q.direction==="x"||q.direction==="both")&&(Ae.x<at&&Oe>0?H=-Tt:Ae.x+pe.width>je-at&&Oe<yt-je&&(H=Tt)),(q.direction==="y"||q.direction==="both")&&(Ae.y<bt&&Xe>0?J=-A:Ae.y+pe.height>Ie-bt&&Xe<Ne-Ie&&(J=A)),(H||J)&&le.scrollBy({left:H,top:J,behavior:"auto"})};let E=null;const P=()=>{const le=$e(x);le&&!E&&(E=setInterval(()=>{const pe=$e(e).getBoundingClientRect(),{x:Ae,y:je}=T.value,Ie={x:Ae-le.scrollLeft,y:je-le.scrollTop};Ie.x>=0&&Ie.y>=0&&(_(le,pe,Ie),Ie.x+=le.scrollLeft,Ie.y+=le.scrollTop,T.value=Ie)},1e3/60))},R=()=>{E&&(clearInterval(E),E=null)},D=(le,pe,Ae,je)=>{const[Ie,Oe]=typeof Ae=="number"?[Ae,Ae]:[Ae.x,Ae.y],{clientWidth:Xe,clientHeight:yt}=pe;return le.x<Ie||le.x+je.width>Xe-Ie||le.y<Oe||le.y+je.height>yt-Oe},G=()=>{if($e(t.disabled)||!k.value)return;const le=$e(x);if(!le)return;const pe=$e(e).getBoundingClientRect(),{x:Ae,y:je}=T.value;D({x:Ae-le.scrollLeft,y:je-le.scrollTop},le,q.margin,pe)?P():R()};$e(y)&&Me(T,G);const W=le=>{var pe;if(!$e(S).includes(le.button)||$e(t.disabled)||!N(le)||$e(u)&&le.target!==$e(e))return;const Ae=$e(x),je=Ae==null||(pe=Ae.getBoundingClientRect)===null||pe===void 0?void 0:pe.call(Ae),Ie=$e(e).getBoundingClientRect(),Oe={x:le.clientX-(Ae?Ie.left-je.left+(y?0:Ae.scrollLeft):Ie.left),y:le.clientY-(Ae?Ie.top-je.top+(y?0:Ae.scrollTop):Ie.top)};p?.(Oe,le)!==!1&&(k.value=Oe,v(le))},ae=le=>{if($e(t.disabled)||!N(le)||!k.value)return;const pe=$e(x);pe instanceof HTMLElement&&bb(pe);const Ae=$e(e).getBoundingClientRect();let{x:je,y:Ie}=T.value;if((m==="x"||m==="both")&&(je=le.clientX-k.value.x,pe&&(je=Math.min(Math.max(0,je),pe.scrollWidth-Ae.width))),(m==="y"||m==="both")&&(Ie=le.clientY-k.value.y,pe&&(Ie=Math.min(Math.max(0,Ie),pe.scrollHeight-Ae.height))),$e(y)&&pe&&(E===null&&_(pe,Ae,{x:je,y:Ie}),je+=pe.scrollLeft,Ie+=pe.scrollTop),pe&&(b||y)){if(m!=="y"){const Oe=je-pe.scrollLeft;Oe<0?je=pe.scrollLeft:Oe>pe.clientWidth-Ae.width&&(je=pe.clientWidth-Ae.width+pe.scrollLeft)}if(m!=="x"){const Oe=Ie-pe.scrollTop;Oe<0?Ie=pe.scrollTop:Oe>pe.clientHeight-Ae.height&&(Ie=pe.clientHeight-Ae.height+pe.scrollTop)}}T.value={x:je,y:Ie},c?.(T.value,le),v(le)},Y=le=>{$e(t.disabled)||!N(le)||k.value&&(k.value=void 0,y&&R(),d?.(T.value,le),v(le))};if(qt){const le=()=>{var pe;return{capture:(pe=t.capture)!==null&&pe!==void 0?pe:!0,passive:!$e(a)}};zt(g,"pointerdown",W,le),zt(w,"pointermove",ae,le),zt(w,"pointerup",Y,le)}return{...ib(T),position:T,isDragging:V(()=>!!k.value),style:V(()=>`
69
69
  left: ${T.value.x}px;
70
70
  top: ${T.value.y}px;
71
71
  ${y?"text-wrap: nowrap;":""}
72
- `)}}function us(e,t,r={}){const{window:n=Pr,...s}=r;let i;const o=oh(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Me(V(()=>{const c=Re(e);return Array.isArray(c)?c.map(d=>tr(d)):[tr(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 Bn(u),{isSupported:o,stop:u}}function yb(e={}){const{window:t=Pr}=e,r=t?.navigator,n=oh(()=>r&&"connection"in r),s=pt(!0),i=pt(!1),o=pt(void 0),a=pt(void 0),l=pt(void 0),u=pt(void 0),c=pt(void 0),d=pt(void 0),p=pt("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&&(Kt(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),Kt(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&Kt(h,"change",m,w),m(),{isSupported:n,isOnline:Ht(s),saveData:Ht(i),offlineAt:Ht(o),onlineAt:Ht(a),downlink:Ht(l),downlinkMax:Ht(u),effectiveType:Ht(d),rtt:Ht(c),type:Ht(p)}}var fT=[{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 ds(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=vt(),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=S=>o?typeof o=="function"?o(S):db(S):S,x=()=>Vy(e[t])?w(e[t]):c,g=S=>{d?d(S)&&h(m,S):h(m,S)};if(a){const S=F(x());let b=!1;return Me(()=>e[t],y=>{b||(b=!0,S.value=w(y),Et(()=>b=!1))}),Me(S,y=>{!b&&(y!==e[t]||u)&&g(y)},{deep:u}),S}else return V({get(){return x()},set(S){g(S)}})}function cc(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 uc(e,t,r=".",n){if(!cc(t))return uc(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]]:cc(o)&&cc(s[i])?s[i]=uc(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function dc(e){return(...t)=>t.reduce((r,n)=>uc(r,n,"",e),{})}var lh=dc(),pT=dc((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),hT=dc((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),bb=Zy(()=>{const e=F(new Map),t=F(),r=V(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=ia({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??"",ic&&s?.(),t.value=void 0};return Me(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"?lh({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"),ic&&(s=Kt(document,"touchmove",d=>_b(d),{passive:!1})),Et(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function ch(e){const t=Math.random().toString(36).substring(2,7),r=bb();r.value.set(t,e??!1);const n=V({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return nb(()=>{r.value.delete(t)}),n}function uh(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:uh(r)}}function _b(e){const t=e||window.event,r=t.target;return r instanceof Element&&uh(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function fc(e){const t=ia({dir:F("ltr")});return V(()=>e?.value||t.dir?.value||"ltr")}function ca(e){const t=vt(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[_s(St(s))]=(...i)=>e(s,...i)}),n}var pc=0;function Sb(){ct(e=>{if(!qt)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??dh()),document.body.insertAdjacentElement("beforeend",t[1]??dh()),pc++,e(()=>{pc===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),pc--})})}function dh(){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 hc(e){return V(()=>Re(e)?!!tr(e)?.closest("form"):!0)}function $e(){const e=vt(),t=F(),r=V(()=>n());wi(()=>{r.value!==n()&&qu(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:tr(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 pn(e){const t=vt(),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=Ga(e);return V(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[St(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function jr(e,t){const r=pn(e),n=t?ca(t):{};return V(()=>({...r.value,...n}))}function Cb(e,t){const r=nh(!1,300);Bn(()=>{r.value=!1});const n=F(null),s=Ly();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=Tb(c,xb(c,u.getBoundingClientRect()),1),p=Eb(l.getBoundingClientRect());n.value=kb([...d,...p]),r.value=!0}return ct(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)})}}),ct(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=!Ab(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 xb(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 Tb(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 Eb(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 Ab(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 kb(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),Ib(t)}function Ib(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 Rb=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Vs=new WeakMap,ua=new WeakMap,da={},gc=0,fh=function(e){return e&&(e.host||fh(e.parentNode))},$b=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=fh(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})},Pb=function(e,t,r,n){var s=$b(t,Array.isArray(e)?e:[e]);da[r]||(da[r]=new WeakMap);var i=da[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=(Vs.get(p)||0)+1,x=(i.get(p)||0)+1;Vs.set(p,w),i.set(p,x),o.push(p),w===1&&m&&ua.set(p,!0),x===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(),gc++,function(){o.forEach(function(d){var p=Vs.get(d)-1,h=i.get(d)-1;Vs.set(d,p),i.set(d,h),p||(ua.has(d)||d.removeAttribute(n),ua.delete(d)),h||d.removeAttribute(r)}),gc--,gc||(Vs=new WeakMap,Vs=new WeakMap,ua=new WeakMap,da={})}},Db=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||Rb(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Pb(n,s,r,"aria-hidden")):function(){return null}};function ph(e){let t;Me(()=>tr(e),r=>{r?t=Db(r):t&&t()}),jt(()=>{t&&t()})}var Ob=0;function js(e,t="reka"){if(e)return e;let r;return"useId"in z0?r=ld?.():r=ia({useId:void 0}).useId?.()??`${++Ob}`,t?`${t}-${r}`:r}function hh(e){const t=F(),r=V(()=>t.value?.width??0),n=V(()=>t.value?.height??0);return Qe(()=>{const s=tr(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 vc(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 gh(e){const t=nh("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=or(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=Mb(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 Mb(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 Nb(e,t){const r=F({}),n=F("none"),s=F(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??Pr,{state:l,dispatch:u}=vc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=w=>{if(qt){const x=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(x)}};Me(e,async(w,x)=>{const g=x!==w;if(await Et(),g){const S=n.value,b=fa(t.value);w?(u("MOUNT"),c("enter"),b==="none"&&c("after-enter")):b==="none"||b==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):x&&S!==b?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=w=>{const x=fa(t.value),g=x.includes(CSS.escape(w.animationName)),S=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&g&&(c(`after-${S}`),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)})}w.target===t.value&&x==="none"&&u("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=fa(t.value))},h=Me(t,(w,x)=>{w?(r.value=getComputedStyle(w),w.addEventListener("animationstart",p),w.addEventListener("animationcancel",d),w.addEventListener("animationend",d)):(u("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),x?.removeEventListener("animationstart",p),x?.removeEventListener("animationcancel",d),x?.removeEventListener("animationend",d))},{immediate:!0}),m=Me(l,()=>{const w=fa(t.value);n.value=l.value==="mounted"?w:"none"});return jt(()=>{h(),m()}),{isPresent:V(()=>["mounted","unmountSuspended"].includes(l.value))}}function fa(e){return e&&getComputedStyle(e).animationName||"none"}var Ln=X({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=Mt(e),i=F(),{isPresent:o}=Nb(n,i);r({present:o});let a=t.default({present:o.value});a=sc(a||[]);const l=vt();if(a&&a?.length>1){const u=l?.parent?.type.name?`<${l.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${u}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(c=>` - ${c}`).join(`
72
+ `)}}function us(e,t,r={}){const{window:n=Dr,...s}=r;let i;const o=ch(()=>n&&"ResizeObserver"in n),a=()=>{i&&(i.disconnect(),i=void 0)},l=Me(V(()=>{const c=$e(e);return Array.isArray(c)?c.map(d=>tr(d)):[tr(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 Bn(u),{isSupported:o,stop:u}}function Sb(e={}){const{window:t=Dr}=e,r=t?.navigator,n=ch(()=>r&&"connection"in r),s=ft(!0),i=ft(!1),o=ft(void 0),a=ft(void 0),l=ft(void 0),u=ft(void 0),c=ft(void 0),d=ft(void 0),p=ft("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&&(zt(t,"offline",()=>{s.value=!1,o.value=Date.now()},w),zt(t,"online",()=>{s.value=!0,a.value=Date.now()},w)),h&&zt(h,"change",m,w),m(),{isSupported:n,isOnline:Ht(s),saveData:Ht(i),offlineAt:Ht(o),onlineAt:Ht(a),downlink:Ht(l),downlinkMax:Ht(u),effectiveType:Ht(d),rtt:Ht(c),type:Ht(p)}}var wT=[{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 ds(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=gt(),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=S=>o?typeof o=="function"?o(S):hb(S):S,x=()=>zy(e[t])?w(e[t]):c,g=S=>{d?d(S)&&h(m,S):h(m,S)};if(a){const S=F(x());let b=!1;return Me(()=>e[t],y=>{b||(b=!0,S.value=w(y),Et(()=>b=!1))}),Me(S,y=>{!b&&(y!==e[t]||u)&&g(y)},{deep:u}),S}else return V({get(){return x()},set(S){g(S)}})}function dc(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 fc(e,t,r=".",n){if(!dc(t))return fc(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]]:dc(o)&&dc(s[i])?s[i]=fc(o,s[i],(r?`${r}.`:"")+i.toString(),n):s[i]=o))}return s}function pc(e){return(...t)=>t.reduce((r,n)=>fc(r,n,"",e),{})}var dh=pc(),yT=pc((e,t,r)=>{if(e[t]!==void 0&&typeof r=="function")return e[t]=r(e[t]),!0}),bT=pc((e,t,r)=>{if(Array.isArray(e[t])&&typeof r=="function")return e[t]=r(e[t]),!0}),Cb=eb(()=>{const e=F(new Map),t=F(),r=V(()=>{for(const o of e.value.values())if(o)return!0;return!1}),n=oa({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??"",ac&&s?.(),t.value=void 0};return Me(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"?dh({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"),ac&&(s=zt(document,"touchmove",d=>xb(d),{passive:!1})),Et(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function fh(e){const t=Math.random().toString(36).substring(2,7),r=Cb();r.value.set(t,e??!1);const n=V({get:()=>r.value.get(t)??!1,set:s=>r.value.set(t,s)});return ob(()=>{r.value.delete(t)}),n}function ph(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:ph(r)}}function xb(e){const t=e||window.event,r=t.target;return r instanceof Element&&ph(r)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function hc(e){const t=oa({dir:F("ltr")});return V(()=>e?.value||t.dir?.value||"ltr")}function ua(e){const t=gt(),r=t?.type.emits,n={};return r?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),r?.forEach(s=>{n[bs(_t(s))]=(...i)=>e(s,...i)}),n}var gc=0;function Tb(){ct(e=>{if(!qt)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??hh()),document.body.insertAdjacentElement("beforeend",t[1]??hh()),gc++,e(()=>{gc===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(r=>r.remove()),gc--})})}function hh(){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 vc(e){return V(()=>$e(e)?!!tr(e)?.closest("form"):!0)}function Pe(){const e=gt(),t=F(),r=V(()=>n());mi(()=>{r.value!==n()&&Fu(t)});function n(){return t.value&&"$el"in t.value&&["#text","#comment"].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:tr(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 hn(e){const t=gt(),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=Ya(e);return V(()=>{const s={},i=t?.vnode.props??{};return Object.keys(i).forEach(o=>{s[_t(o)]=i[o]}),Object.keys({...r,...s}).reduce((o,a)=>(n.value[a]!==void 0&&(o[a]=n.value[a]),o),{})})}function Ur(e,t){const r=hn(e),n=t?ua(t):{};return V(()=>({...r.value,...n}))}function Eb(e,t){const r=oh(!1,300);Bn(()=>{r.value=!1});const n=F(null),s=jy();function i(){n.value=null,r.value=!1}function o(a,l){const u=a.currentTarget,c={x:a.clientX,y:a.clientY},d=kb(c,Ab(c,u.getBoundingClientRect()),1),p=Ib(l.getBoundingClientRect());n.value=$b([...d,...p]),r.value=!0}return ct(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)})}}),ct(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=!Rb(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 Ab(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 kb(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 Rb(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 $b(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),Pb(t)}function Pb(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 Db=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Fs=new WeakMap,da=new WeakMap,fa={},mc=0,gh=function(e){return e&&(e.host||gh(e.parentNode))},Ob=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=gh(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})},Hb=function(e,t,r,n){var s=Ob(t,Array.isArray(e)?e:[e]);fa[r]||(fa[r]=new WeakMap);var i=fa[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=(Fs.get(p)||0)+1,x=(i.get(p)||0)+1;Fs.set(p,w),i.set(p,x),o.push(p),w===1&&m&&da.set(p,!0),x===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(),mc++,function(){o.forEach(function(d){var p=Fs.get(d)-1,h=i.get(d)-1;Fs.set(d,p),i.set(d,h),p||(da.has(d)||d.removeAttribute(n),da.delete(d)),h||d.removeAttribute(r)}),mc--,mc||(Fs=new WeakMap,Fs=new WeakMap,da=new WeakMap,fa={})}},Mb=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=t||Db(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),Hb(n,s,r,"aria-hidden")):function(){return null}};function vh(e){let t;Me(()=>tr(e),r=>{r?t=Mb(r):t&&t()}),Vt(()=>{t&&t()})}var Nb=0;function Vs(e,t="reka"){if(e)return e;let r;return"useId"in G0?r=dd?.():r=oa({useId:void 0}).useId?.()??`${++Nb}`,t?`${t}-${r}`:r}function mh(e){const t=F(),r=V(()=>t.value?.width??0),n=V(()=>t.value?.height??0);return tt(()=>{const s=tr(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 wc(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 wh(e){const t=oh("",1e3);return{search:t,handleTypeaheadSearch:(s,i)=>{if(t.value=t.value+s,e)e(s);else{const o=or(),a=i.map(d=>({...d,textValue:d.value?.textValue??d.ref.textContent?.trim()??""})),l=a.find(d=>d.ref===o),u=Bb(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 qb(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function Bb(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=qb(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 Lb(e,t){const r=F({}),n=F("none"),s=F(e),i=e.value?"mounted":"unmounted";let o;const a=t.value?.ownerDocument.defaultView??Dr,{state:l,dispatch:u}=wc(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),c=w=>{if(qt){const x=new CustomEvent(w,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(x)}};Me(e,async(w,x)=>{const g=x!==w;if(await Et(),g){const S=n.value,b=pa(t.value);w?(u("MOUNT"),c("enter"),b==="none"&&c("after-enter")):b==="none"||b==="undefined"||r.value?.display==="none"?(u("UNMOUNT"),c("leave"),c("after-leave")):x&&S!==b?(u("ANIMATION_OUT"),c("leave")):(u("UNMOUNT"),c("after-leave"))}},{immediate:!0});const d=w=>{const x=pa(t.value),g=x.includes(CSS.escape(w.animationName)),S=l.value==="mounted"?"enter":"leave";if(w.target===t.value&&g&&(c(`after-${S}`),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)})}w.target===t.value&&x==="none"&&u("ANIMATION_END")},p=w=>{w.target===t.value&&(n.value=pa(t.value))},h=Me(t,(w,x)=>{w?(r.value=getComputedStyle(w),w.addEventListener("animationstart",p),w.addEventListener("animationcancel",d),w.addEventListener("animationend",d)):(u("ANIMATION_END"),o!==void 0&&a?.clearTimeout(o),x?.removeEventListener("animationstart",p),x?.removeEventListener("animationcancel",d),x?.removeEventListener("animationend",d))},{immediate:!0}),m=Me(l,()=>{const w=pa(t.value);n.value=l.value==="mounted"?w:"none"});return Vt(()=>{h(),m()}),{isPresent:V(()=>["mounted","unmountSuspended"].includes(l.value))}}function pa(e){return e&&getComputedStyle(e).animationName||"none"}var Ln=X({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:r}){const{present:n,forceMount:s}=Mt(e),i=F(),{isPresent:o}=Lb(n,i);r({present:o});let a=t.default({present:o.value});a=oc(a||[]);const l=gt();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?vr(t.default({present:o.value})[0],{ref:u=>{const c=tr(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),mc=X({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=sc(r.default()),s=n.findIndex(l=>l.type!==gt);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?ye(t,i.props):t,a=Ir({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),qb=["area","img","input"],Ke=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"&&qb.includes(n)?()=>vr(n,t):n!=="template"?()=>vr(e.as,t,{default:r.default}):()=>vr(mc,t,{default:r.default})}});function wc(){const e=F();return{primitiveElement:e,currentElement:V(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:tr(e))}}var[Fn,Bb]=Pt("DialogRoot"),Lb=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=ds(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=F(),i=F(),{modal:o}=Mt(r);return Bb({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)=>te(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),Fb=X({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;$e();const r=Fn();return(n,s)=>($(),U(f(Ke),ye(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:I(()=>[te(n.$slots,"default")]),_:3},16,["type"]))}}),Vb="dismissableLayer.pointerDownOutside",jb="dismissableLayer.focusOutside";function vh(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 Ub(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1),i=F(()=>{});return ct(o=>{if(!qt||!Re(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(vh(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){rc(Vb,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:()=>{Re(r)&&(s.value=!0)}}}function zb(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1);return ct(i=>{if(!qt||!Re(r))return;const o=async a=>{if(!t?.value)return;await Et(),await Et();const l=a.target;!t.value||!l||vh(t.value,l)||a.target&&!s.value&&rc(jb,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{Re(r)&&(s.value=!0)},onBlurCapture:()=>{Re(r)&&(s.value=!1)}}}var _r=Xr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),yc=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=V(()=>i.value?.ownerDocument??globalThis.document),a=V(()=>_r.layersRoot),l=V(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=V(()=>_r.layersWithOutsidePointerEventsDisabled.size>0),c=V(()=>{const h=Array.from(a.value),[m]=[..._r.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(m);return l.value>=w}),d=Ub(async h=>{const m=[..._r.branches].some(w=>w?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await Et(),h.defaultPrevented||n("dismiss"))},i),p=zb(h=>{[..._r.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return ub("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),ct(h=>{i.value&&(r.disableOutsidePointerEvents&&(_r.layersWithOutsidePointerEventsDisabled.size===0&&(_r.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),_r.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&_r.layersWithOutsidePointerEventsDisabled.size===1&&!nc(_r.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=_r.originalBodyPointerEvents)}))}),ct(h=>{h(()=>{i.value&&(a.value.delete(i.value),_r.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>($(),U(f(Ke),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:Ct({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:I(()=>[te(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Kb=Fy(()=>F([]));function Wb(){const e=Kb();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=mh(e.value,t),e.value.unshift(t)},remove(t){e.value=mh(e.value,t),e.value[0]?.resume()}}}function mh(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var bc="focusScope.autoFocusOnMount",_c="focusScope.autoFocusOnUnmount",wh={bubbles:!1,cancelable:!0};function Gb(e,{select:t=!1}={}){const r=or();for(const n of e)if(Vn(n,{select:t}),or()!==r)return!0}function Jb(e){const t=yh(e);return[bh(t,e),bh(t.reverse(),e)]}function yh(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 bh(e,t){for(const r of e)if(!Yb(r,{upTo:t}))return r}function Yb(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 Zb(e){return e instanceof HTMLInputElement&&"select"in e}function Vn(e,{select:t=!1}={}){if(e&&e.focus){const r=or();e.focus({preventScroll:!0}),e!==r&&Zb(e)&&t&&e.select()}}var _h=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=Wb(),l=Xr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});ct(c=>{if(!qt)return;const d=i.value;if(!r.trapped)return;function p(x){if(l.paused||!d)return;const g=x.target;d.contains(g)?o.value=g:Vn(o.value,{select:!0})}function h(x){if(l.paused||!d)return;const g=x.relatedTarget;g!==null&&(d.contains(g)||Vn(o.value,{select:!0}))}function m(x){d.contains(o.value)||Vn(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()})}),ct(async c=>{const d=i.value;if(await Et(),!d)return;a.add(l);const p=or();if(!d.contains(p)){const h=new CustomEvent(bc,wh);d.addEventListener(bc,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(Gb(yh(d),{select:!0}),or()===p&&Vn(d))}c(()=>{d.removeEventListener(bc,w=>n("mountAutoFocus",w));const h=new CustomEvent(_c,wh),m=w=>{n("unmountAutoFocus",w)};d.addEventListener(_c,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Vn(p??document.body,{select:!0}),d.removeEventListener(_c,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=or();if(d&&p){const h=c.currentTarget,[m,w]=Jb(h);m&&w?!c.shiftKey&&p===w?(c.preventDefault(),r.loop&&Vn(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&Vn(w,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>($(),U(f(Ke),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:I(()=>[te(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),Sh=["Enter"," "],Xb=["ArrowDown","PageUp","Home"],Qb=["ArrowUp","PageDown","End"],gT=[...Xb,...Qb],vT={ltr:[...Sh,"ArrowRight"],rtl:[...Sh,"ArrowLeft"]};function e1(e){return e?"open":"closed"}function Ch(e){const t=or();for(const r of e)if(r===t||(r.focus(),or()!==t))return}var xh=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=Fn(),{forwardRef:i,currentElement:o}=$e();return s.titleId||(s.titleId=js(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=js(void 0,"reka-dialog-description")),Qe(()=>{s.contentElement=o,or()!==document.body&&(s.triggerElement.value=or())}),(a,l)=>($(),U(f(_h),{"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:I(()=>[H(f(yc),ye({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(e1)(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:I(()=>[te(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),t1=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=Fn(),i=ca(n),{forwardRef:o,currentElement:a}=$e();return ph(a),(l,u)=>($(),U(xh,ye({...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:I(()=>[te(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),r1=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=ca(t);$e();const s=Fn(),i=F(!1),o=F(!1);return(a,l)=>($(),U(xh,ye({...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:I(()=>[te(a.$slots,"default")]),_:3},16))}}),n1=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=Fn(),i=ca(n),{forwardRef:o}=$e();return(a,l)=>($(),U(f(Ln),{present:a.forceMount||f(s).open.value},{default:I(()=>[f(s).modal.value?($(),U(t1,ye({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:I(()=>[te(a.$slots,"default")]),_:3},16)):($(),U(r1,ye({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:I(()=>[te(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),s1=X({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Fn();return ch(!0),$e(),(r,n)=>($(),U(f(Ke),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:I(()=>[te(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),i1=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Fn(),{forwardRef:r}=$e();return(n,s)=>f(t)?.modal.value?($(),U(f(Ln),{key:0,present:n.forceMount||f(t).open.value},{default:I(()=>[H(s1,ye(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:I(()=>[te(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):qe("v-if",!0)}}),Sc=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=lc();return(r,n)=>f(t)||r.forceMount?($(),U(Xa,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[te(r.$slots,"default")],8,["to","disabled","defer"])):qe("v-if",!0)}}),o1=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)=>($(),U(f(Sc),fr(rr(t)),{default:I(()=>[te(r.$slots,"default")]),_:3},16))}}),a1=X({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=Fn();return $e(),(n,s)=>($(),U(f(Ke),ye(t,{id:f(r).titleId}),{default:I(()=>[te(n.$slots,"default")]),_:3},16,["id"]))}}),Th="data-reka-collection-item";function hn(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:F(),itemMap:F(new Map)},Xn(n,s)):s=Vt(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${Th}]`)),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}=wc();return Me(p,()=>{s.collectionRef.value=p.value}),()=>vr(mc,{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}=wc();return ct(h=>{if(p.value){const m=Ka(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>vr(mc,{...c,[Th]:"",ref:d},u)}});return{getItems:i,reactiveItems:V(()=>Array.from(s.itemMap.value.values())),itemMapSize:V(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var Cc=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)=>($(),U(f(Ke),{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:I(()=>[te(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Eh=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}=wc();return Me(V(()=>t.checked??t.value),(s,i)=>{if(!n.value)return;const o=n.value,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(l&&s!==i){const u=new Event("input",{bubbles:!0}),c=new Event("change",{bubbles:!0});l.call(o,s),o.dispatchEvent(u),o.dispatchEvent(c)}}),(s,i)=>($(),U(Cc,ye({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),Ah=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=V(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=V(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((s,i)=>typeof s=="object"?Object.entries(s).map(([o,a])=>({name:`${t.name}[${i}][${o}]`,value:a})):{name:`${t.name}[${i}]`,value:s}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([s,i])=>({name:`${t.name}[${s}]`,value:i})):[]);return(s,i)=>($(),Se(ze,null,[qe(" We render single input if it's required "),r.value?($(),U(Eh,ye({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):($(!0),Se(ze,{key:1},gr(n.value,o=>($(),U(Eh,ye({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[kh,l1]=Pt("PopperRoot"),Ih=X({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=F();return l1({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>te(r.$slots,"default")}}),Rh=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=kh();return Ya(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>($(),U(f(Ke),{ref:f(r),as:i.as,"as-child":i.asChild},{default:I(()=>[te(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),c1={key:0,d:"M0 0L6 6L12 0"},u1={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},d1=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)=>($(),U(f(Ke),ye(t,{width:r.width,height:r.height,viewBox:r.asChild?void 0:"0 0 12 6",preserveAspectRatio:r.asChild?void 0:"none"}),{default:I(()=>[te(r.$slots,"default",{},()=>[r.rounded?($(),Se("path",u1)):($(),Se("path",c1))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function f1(e){return e!==null}function p1(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]=xc(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 xc(e){const[t,r="center"]=e.split("-");return[t,r]}var h1=["top","right","bottom","left"],jn=Math.min,ar=Math.max,pa=Math.round,ha=Math.floor,Ur=e=>({x:e,y:e}),g1={left:"right",right:"left",bottom:"top",top:"bottom"};function Tc(e,t,r){return ar(e,jn(t,r))}function gn(e,t){return typeof e=="function"?e(t):e}function vn(e){return e.split("-")[0]}function Us(e){return e.split("-")[1]}function Ec(e){return e==="x"?"y":"x"}function Ac(e){return e==="y"?"height":"width"}function zr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function kc(e){return Ec(zr(e))}function v1(e,t,r){r===void 0&&(r=!1);const n=Us(e),s=kc(e),i=Ac(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=ga(o)),[o,ga(o)]}function m1(e){const t=ga(e);return[Ic(e),t,Ic(t)]}function Ic(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var $h=["left","right"],Ph=["right","left"],w1=["top","bottom"],y1=["bottom","top"];function b1(e,t,r){switch(e){case"top":case"bottom":return r?t?Ph:$h:t?$h:Ph;case"left":case"right":return t?w1:y1;default:return[]}}function _1(e,t,r,n){const s=Us(e);let i=b1(vn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(Ic)))),i}function ga(e){const t=vn(e);return g1[t]+e.slice(t.length)}function S1(e){return{top:0,right:0,bottom:0,left:0,...e}}function Dh(e){return typeof e!="number"?S1(e):{top:e,right:e,bottom:e,left:e}}function va(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 Oh(e,t,r){let{reference:n,floating:s}=e;const i=zr(t),o=kc(t),a=Ac(o),l=vn(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(Us(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 C1(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}=gn(t,e),m=Dh(h),w=a[p?d==="floating"?"reference":"floating":d],x=va(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,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},y=va(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:S,strategy:l}):g);return{top:(x.top-y.top+m.top)/b.y,bottom:(y.bottom-x.bottom+m.bottom)/b.y,left:(x.left-y.left+m.left)/b.x,right:(y.right-x.right+m.right)/b.x}}var x1=50,T1=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:C1},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}=Oh(u,n,l),p=n,h=0;const m={};for(let w=0;w<i.length;w++){const x=i[w];if(!x)continue;const{name:g,fn:S}=x,{x:b,y,data:T,reset:k}=await S({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=y??d,m[g]={...m[g],...T},k&&h<x1&&(h++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:c,y:d}=Oh(u,p,l)),w=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},E1=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}=gn(e,t)||{};if(u==null)return{};const d=Dh(c),p={x:r,y:n},h=kc(s),m=Ac(h),w=await o.getDimensions(u),x=h==="y",g=x?"top":"left",S=x?"bottom":"right",b=x?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[h]-p[h]-i.floating[m],T=p[h]-i.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let N=k?k[b]:0;(!N||!await(o.isElement==null?void 0:o.isElement(k)))&&(N=a.floating[b]||i.floating[m]);const v=y/2-T/2,B=N/2-w[m]/2-1,q=jn(d[g],B),C=jn(d[S],B),_=q,E=N-w[m]-C,P=N/2-w[m]/2+v,R=Tc(_,P,E),D=!l.arrow&&Us(s)!=null&&P!==R&&i.reference[m]/2-(P<_?q:C)-w[m]/2<0,J=D?P<_?P-_:P-E:0;return{[h]:p[h]+J,data:{[h]:R,centerOffset:P-R-J,...D&&{alignmentOffset:J}},reset:D}}}),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,...x}=gn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=vn(s),S=zr(a),b=vn(a)===a,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=p||(b||!w?[ga(a)]:m1(a)),k=m!=="none";!p&&k&&T.push(..._1(a,w,m,y));const N=[a,...T],v=await l.detectOverflow(t,x),B=[];let q=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&B.push(v[g]),d){const P=v1(s,o,y);B.push(v[P[0]],v[P[1]])}if(q=[...q,{placement:s,overflows:B}],!B.every(P=>P<=0)){var C,_;const P=(((C=i.flip)==null?void 0:C.index)||0)+1,R=N[P];if(R&&(!(d==="alignment"&&S!==zr(R))||q.every(J=>zr(J.placement)===S?J.overflows[0]>0:!0)))return{data:{index:P,overflows:q},reset:{placement:R}};let D=(_=q.filter(J=>J.overflows[0]<=0).sort((J,W)=>J.overflows[1]-W.overflows[1])[0])==null?void 0:_.placement;if(!D)switch(h){case"bestFit":{var E;const J=(E=q.filter(W=>{if(k){const ae=zr(W.placement);return ae===S||ae==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ae=>ae>0).reduce((ae,z)=>ae+z,0)]).sort((W,ae)=>W[1]-ae[1])[0])==null?void 0:E[0];J&&(D=J);break}case"initialPlacement":D=a;break}if(s!==D)return{reset:{placement:D}}}return{}}}};function Hh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mh(e){return h1.some(t=>e[t]>=0)}var k1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=gn(e,t);switch(s){case"referenceHidden":{const o=Hh(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Mh(o)}}}case"escaped":{const o=Hh(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Mh(o)}}}default:return{}}}}},Nh=new Set(["left","top"]);async function I1(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=vn(r),a=Us(r),l=zr(r)==="y",u=Nh.has(o)?-1:1,c=i&&l?-1:1,d=gn(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 R1=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 I1(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}}}}},$1=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:S,y:b}=g;return{x:S,y:b}}},...u}=gn(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=zr(vn(s)),h=Ec(p);let m=c[h],w=c[p];if(o){const g=h==="y"?"top":"left",S=h==="y"?"bottom":"right",b=m+d[g],y=m-d[S];m=Tc(b,m,y)}if(a){const g=p==="y"?"top":"left",S=p==="y"?"bottom":"right",b=w+d[g],y=w-d[S];w=Tc(b,w,y)}const x=l.fn({...t,[h]:m,[p]:w});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[h]:o,[p]:a}}}}}},P1=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}=gn(e,t),c={x:r,y:n},d=zr(s),p=Ec(d);let h=c[p],m=c[d];const w=gn(a,t),x=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const b=p==="y"?"height":"width",y=i.reference[p]-i.floating[b]+x.mainAxis,T=i.reference[p]+i.reference[b]-x.mainAxis;h<y?h=y:h>T&&(h=T)}if(u){var g,S;const b=p==="y"?"width":"height",y=Nh.has(vn(s)),T=i.reference[d]-i.floating[b]+(y&&((g=o.offset)==null?void 0:g[d])||0)+(y?0:x.crossAxis),k=i.reference[d]+i.reference[b]+(y?0:((S=o.offset)==null?void 0:S[d])||0)-(y?x.crossAxis:0);m<T?m=T:m>k&&(m=k)}return{[p]:h,[d]:m}}}},D1=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}=gn(e,t),c=await o.detectOverflow(t,u),d=vn(s),p=Us(s),h=zr(s)==="y",{width:m,height:w}=i.floating;let x,g;d==="top"||d==="bottom"?(x=d,g=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,x=p==="end"?"top":"bottom");const S=w-c.top-c.bottom,b=m-c.left-c.right,y=jn(w-c[x],S),T=jn(m-c[g],b),k=!t.middlewareData.shift;let N=y,v=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(v=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=S),k&&!p){const q=ar(c.left,0),C=ar(c.right,0),_=ar(c.top,0),E=ar(c.bottom,0);h?v=m-2*(q!==0||C!==0?q+C:ar(c.left,c.right)):N=w-2*(_!==0||E!==0?_+E:ar(c.top,c.bottom))}await l({...t,availableWidth:v,availableHeight:N});const B=await o.getDimensions(a.floating);return m!==B.width||w!==B.height?{reset:{rects:!0}}:{}}}};function ma(){return typeof window<"u"}function fs(e){return Rc(e)?(e.nodeName||"").toLowerCase():"#document"}function lr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kr(e){var t;return(t=(Rc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rc(e){return ma()?e instanceof Node||e instanceof lr(e).Node:!1}function Dr(e){return ma()?e instanceof Element||e instanceof lr(e).Element:!1}function mn(e){return ma()?e instanceof HTMLElement||e instanceof lr(e).HTMLElement:!1}function qh(e){return!ma()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lr(e).ShadowRoot}function Li(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Or(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function O1(e){return/^(table|td|th)$/.test(fs(e))}function wa(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var H1=/transform|translate|scale|rotate|perspective|filter/,M1=/paint|layout|strict|content/,ps=e=>!!e&&e!=="none",$c;function Pc(e){const t=Dr(e)?Or(e):e;return ps(t.transform)||ps(t.translate)||ps(t.scale)||ps(t.rotate)||ps(t.perspective)||!Dc()&&(ps(t.backdropFilter)||ps(t.filter))||H1.test(t.willChange||"")||M1.test(t.contain||"")}function N1(e){let t=Un(e);for(;mn(t)&&!zs(t);){if(Pc(t))return t;if(wa(t))return null;t=Un(t)}return null}function Dc(){return $c==null&&($c=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$c}function zs(e){return/^(html|body|#document)$/.test(fs(e))}function Or(e){return lr(e).getComputedStyle(e)}function ya(e){return Dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(fs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qh(e)&&e.host||Kr(e);return qh(t)?t.host:t}function Bh(e){const t=Un(e);return zs(t)?e.ownerDocument?e.ownerDocument.body:e.body:mn(t)&&Li(t)?t:Bh(t)}function Fi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Bh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=lr(s);if(i){const a=Oc(o);return t.concat(o,o.visualViewport||[],Li(s)?s:[],a&&r?Fi(a):[])}else return t.concat(s,Fi(s,[],r))}function Oc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lh(e){const t=Or(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=mn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=pa(r)!==i||pa(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Hc(e){return Dr(e)?e:e.contextElement}function Ks(e){const t=Hc(e);if(!mn(t))return Ur(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=Lh(t);let o=(i?pa(r.width):r.width)/n,a=(i?pa(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var q1=Ur(0);function Fh(e){const t=lr(e);return!Dc()||!t.visualViewport?q1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function B1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==lr(e)?!1:t}function hs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Hc(e);let o=Ur(1);t&&(n?Dr(n)&&(o=Ks(n)):o=Ks(e));const a=B1(i,r,n)?Fh(i):Ur(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=lr(i),h=n&&Dr(n)?lr(n):n;let m=p,w=Oc(m);for(;w&&n&&h!==m;){const x=Ks(w),g=w.getBoundingClientRect(),S=Or(w),b=g.left+(w.clientLeft+parseFloat(S.paddingLeft))*x.x,y=g.top+(w.clientTop+parseFloat(S.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=b,u+=y,m=lr(w),w=Oc(m)}}return va({width:c,height:d,x:l,y:u})}function ba(e,t){const r=ya(e).scrollLeft;return t?t.left+r:hs(Kr(e)).left+r}function Vh(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-ba(e,r),y:r.top+t.scrollTop}}function L1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Kr(n),a=t?wa(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=Ur(1);const c=Ur(0),d=mn(n);if((d||!d&&!i)&&((fs(n)!=="body"||Li(o))&&(l=ya(n)),d)){const h=hs(n);u=Ks(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?Vh(o,l):Ur(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 F1(e){return Array.from(e.getClientRects())}function V1(e){const t=Kr(e),r=ya(e),n=e.ownerDocument.body,s=ar(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ar(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+ba(e);const a=-r.scrollTop;return Or(n).direction==="rtl"&&(o+=ar(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var jh=25;function j1(e,t){const r=lr(e),n=Kr(e),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Dc();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=ba(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<=jh&&(i-=m)}else u<=jh&&(i+=u);return{width:i,height:o,x:a,y:l}}function U1(e,t){const r=hs(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=mn(e)?Ks(e):Ur(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function Uh(e,t,r){let n;if(t==="viewport")n=j1(e,r);else if(t==="document")n=V1(Kr(e));else if(Dr(t))n=U1(t,r);else{const s=Fh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return va(n)}function zh(e,t){const r=Un(e);return r===t||!Dr(r)||zs(r)?!1:Or(r).position==="fixed"||zh(r,t)}function z1(e,t){const r=t.get(e);if(r)return r;let n=Fi(e,[],!1).filter(a=>Dr(a)&&fs(a)!=="body"),s=null;const i=Or(e).position==="fixed";let o=i?Un(e):e;for(;Dr(o)&&!zs(o);){const a=Or(o),l=Pc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||Li(o)&&!l&&zh(e,o))?n=n.filter(u=>u!==o):s=a,o=Un(o)}return t.set(e,n),n}function K1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?wa(t)?[]:z1(t,this._c):[].concat(r),n],o=Uh(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=Uh(t,i[d],s);a=ar(p.top,a),l=jn(p.right,l),u=jn(p.bottom,u),c=ar(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function W1(e){const{width:t,height:r}=Lh(e);return{width:t,height:r}}function G1(e,t,r){const n=mn(t),s=Kr(t),i=r==="fixed",o=hs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ur(0);function u(){l.x=ba(s)}if(n||!n&&!i)if((fs(t)!=="body"||Li(s))&&(a=ya(t)),n){const d=hs(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?Vh(s,a):Ur(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 Mc(e){return Or(e).position==="static"}function Kh(e,t){if(!mn(e)||Or(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Kr(e)===r&&(r=r.ownerDocument.body),r}function Wh(e,t){const r=lr(e);if(wa(e))return r;if(!mn(e)){let s=Un(e);for(;s&&!zs(s);){if(Dr(s)&&!Mc(s))return s;s=Un(s)}return r}let n=Kh(e,t);for(;n&&O1(n)&&Mc(n);)n=Kh(n,t);return n&&zs(n)&&Mc(n)&&!Pc(n)?r:n||N1(e)||r}var J1=async function(e){const t=this.getOffsetParent||Wh,r=this.getDimensions,n=await r(e.floating);return{reference:G1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Y1(e){return Or(e).direction==="rtl"}var Z1={convertOffsetParentRelativeRectToViewportRelativeRect:L1,getDocumentElement:Kr,getClippingRect:K1,getOffsetParent:Wh,getElementRects:J1,getClientRects:F1,getDimensions:W1,getScale:Ks,isElement:Dr,isRTL:Y1};function Gh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function X1(e,t){let r=null,n;const s=Kr(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:p,height:h}=u;if(a||t(),!p||!h)return;const m=ha(d),w=ha(s.clientWidth-(c+p)),x=ha(s.clientHeight-(d+h)),g=ha(c),S={rootMargin:-m+"px "+-w+"px "+-x+"px "+-g+"px",threshold:ar(0,jn(1,l))||1};let b=!0;function y(T){const k=T[0].intersectionRatio;if(k!==l){if(!b)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!Gh(u,e.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(y,{...S,root:s.ownerDocument})}catch{r=new IntersectionObserver(y,S)}r.observe(e)}return o(!0),i}function Q1(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=Hc(e),c=s||i?[...u?Fi(u):[],...t?Fi(t):[]]:[];c.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=u&&a?X1(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(g=>{let[S]=g;S&&S.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,w=l?hs(e):null;l&&x();function x(){const g=hs(e);w&&!Gh(w,g)&&r(),w=g,m=requestAnimationFrame(x)}return r(),()=>{var g;c.forEach(S=>{s&&S.removeEventListener("scroll",r),i&&S.removeEventListener("resize",r)}),d?.(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var e2=R1,t2=$1,Jh=A1,r2=D1,n2=k1,s2=E1,i2=P1,o2=(e,t,r)=>{const n=new Map,s={platform:Z1,...r},i={...s.platform,_c:n};return T1(e,t,{...s,platform:i})};function a2(e){return e!=null&&typeof e=="object"&&"$el"in e}function Nc(e){if(a2(e)){const t=e.$el;return Rc(t)&&fs(t)==="#comment"?null:t}return e}function Ws(e){return typeof e=="function"?e():f(e)}function l2(e){return{name:"arrow",options:e,fn(t){const r=Nc(Ws(e.element));return r==null?{}:s2({element:r,padding:e.padding}).fn(t)}}}function Yh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zh(e,t){const r=Yh(e);return Math.round(t*r)/r}function c2(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=V(()=>{var N;return(N=Ws(r.open))!=null?N:!0}),i=V(()=>Ws(r.middleware)),o=V(()=>{var N;return(N=Ws(r.placement))!=null?N:"bottom"}),a=V(()=>{var N;return(N=Ws(r.strategy))!=null?N:"absolute"}),l=V(()=>{var N;return(N=Ws(r.transform))!=null?N:!0}),u=V(()=>Nc(e.value)),c=V(()=>Nc(t.value)),d=F(0),p=F(0),h=F(a.value),m=F(o.value),w=pt({}),x=F(!1),g=V(()=>{const N={position:h.value,left:"0",top:"0"};if(!c.value)return N;const v=Zh(c.value,d.value),B=Zh(c.value,p.value);return l.value?{...N,transform:"translate("+v+"px, "+B+"px)",...Yh(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:v+"px",top:B+"px"}});let S;function b(){if(u.value==null||c.value==null)return;const N=s.value;o2(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,x.value=N!==!1})}function y(){typeof S=="function"&&(S(),S=void 0)}function T(){if(y(),n===void 0){b();return}if(u.value!=null&&c.value!=null){S=n(u.value,c.value,b);return}}function k(){s.value||(x.value=!1)}return Me([i,o,a,s],b,{flush:"sync"}),Me([u,c],T,{flush:"sync"}),Me(s,k,{flush:"sync"}),ro()&&Ma(y),{x:Qr(d),y:Qr(p),strategy:Qr(h),placement:Qr(m),middlewareData:Qr(w),isPositioned:Qr(x),floatingStyles:g,update:b}}var u2={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},[d2,f2]=Pt("PopperContent"),Xh=X({inheritAttrs:!1,__name:"PopperContent",props:Td({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}},{...u2}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=kh(),{forwardRef:i,currentElement:o}=$e(),a=F(),l=F(),{width:u,height:c}=hh(l),d=V(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=V(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=V(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),m=V(()=>({padding:p.value,boundary:h.value.filter(f1),altBoundary:h.value.length>0})),w=V(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),x=By(()=>[e2({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&Jh({...m.value,...w.value}),r.avoidCollisions&&t2({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?i2():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&Jh({...m.value,...w.value}),r2({...m.value,apply:({elements:q,rects:C,availableWidth:_,availableHeight:E})=>{const{width:P,height:R}=C.reference,D=q.floating.style;D.setProperty("--reka-popper-available-width",`${_}px`),D.setProperty("--reka-popper-available-height",`${E}px`),D.setProperty("--reka-popper-anchor-width",`${P}px`),D.setProperty("--reka-popper-anchor-height",`${R}px`)}}),l.value&&l2({element:l.value,padding:r.arrowPadding}),p1({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&n2({strategy:"referenceHidden",...m.value})]),{floatingStyles:g,placement:S,isPositioned:b,middlewareData:y,update:T}=c2(V(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...q)=>Q1(...q,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:x}),k=V(()=>xc(S.value)[0]),N=V(()=>xc(S.value)[1]);Ya(()=>{b.value&&n("placed")});const v=V(()=>{const q=y.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&q}),B=F("");return ct(()=>{o.value&&(B.value=window.getComputedStyle(o.value).zIndex)}),f2({placedSide:k,onArrowChange:q=>l.value=q,arrowX:V(()=>y.value.arrow?.x??0),arrowY:V(()=>y.value.arrow?.y??0),shouldHideArrow:v}),(q,C)=>($(),Se("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:Ct({...f(g),transform:f(b)?f(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B.value,"--reka-popper-transform-origin":[f(y).transformOrigin?.x,f(y).transformOrigin?.y].join(" "),...f(y).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[H(f(Ke),ye({ref:f(i)},q.$attrs,{"as-child":r.asChild,as:q.as,"data-side":k.value,"data-align":N.value,style:{animation:f(b)?void 0:"none"}}),{default:I(()=>[te(q.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),p2={top:"bottom",right:"left",bottom:"top",left:"right"},h2=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=d2(),n=V(()=>p2[r.placedSide.value]);return(s,i)=>($(),Se("span",{ref:o=>{f(r).onArrowChange(o)},style:Ct({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})},[H(d1,ye(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:I(()=>[te(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function Qh(e){const t=ia({nonce:F()});return V(()=>e?.value||t.nonce?.value)}function g2(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function eg(e,t,r){return Bi(100/(r-t)*(e-t),0,100)}function v2(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function m2(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 w2(e,t,r){const n=e/2;return(n-qc([0,50],[0,n])(t)*r)*r}function y2(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function b2(e,t){if(t>0){const r=y2(e);return Math.min(...r)>=t}return!0}function qc(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 _2(e){return(String(e).split(".")[1]||"").length}function S2(e,t){const r=10**t;return Math.round(e*r)/r}var tg=["PageUp","PageDown"],rg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ng={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[sg,ig]=Pt(["SliderVertical","SliderHorizontal"]),C2=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}=Mt(r),{forwardRef:l,currentElement:u}=$e(),c=Gs(),d=F(),p=F(),h=V(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(w,x){const g=p.value||u.value.getBoundingClientRect(),S=[...c.thumbElements.value][c.valueIndexToChangeRef.value],b=c.thumbAlignment.value==="contain"?S.clientWidth:0;!d.value&&!x&&c.thumbAlignment.value==="contain"&&(d.value=w.clientX-S.getBoundingClientRect().left);const y=qc([0,g.width-b],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=g,y(x?w.clientX-g.left-b/2:w.clientX-g.left-(d.value??0))}return ig({startEdge:V(()=>h.value?"left":"right"),endEdge:V(()=>h.value?"right":"left"),direction:V(()=>h.value?1:-1),size:"width"}),(w,x)=>($(),U(og,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:Ct({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:x[0]||(x[0]=g=>{n("slideStart",m(g,!0))}),onSlideMove:x[1]||(x[1]=g=>{n("slideMove",m(g))}),onSlideEnd:x[2]||(x[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:x[3]||(x[3]=g=>{const S=h.value?"from-left":"from-right";n("stepKeyDown",g,f(ng)[S].includes(g.key)?-1:1)}),onEndKeyDown:x[4]||(x[4]=g=>n("endKeyDown",g)),onHomeKeyDown:x[5]||(x[5]=g=>n("homeKeyDown",g))},{default:I(()=>[te(w.$slots,"default")]),_:3},8,["dir","style"]))}}),x2=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}=Mt(r),a=Gs(),{forwardRef:l,currentElement:u}=$e(),c=F(),d=F(),p=V(()=>!o.value);function h(m,w){const x=d.value||u.value.getBoundingClientRect(),g=[...a.thumbElements.value][a.valueIndexToChangeRef.value],S=a.thumbAlignment.value==="contain"?g.clientHeight:0;!c.value&&!w&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-g.getBoundingClientRect().top);const b=qc([0,x.height-S],p.value?[s.value,i.value]:[i.value,s.value]),y=w?m.clientY-x.top-S/2:m.clientY-x.top-(c.value??0);return d.value=x,b(y)}return ig({startEdge:V(()=>p.value?"bottom":"top"),endEdge:V(()=>p.value?"top":"bottom"),direction:V(()=>p.value?1:-1),size:"height"}),(m,w)=>($(),U(og,{ref:f(l),"data-orientation":"vertical",style:Ct({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:w[0]||(w[0]=x=>{n("slideStart",h(x,!0))}),onSlideMove:w[1]||(w[1]=x=>{n("slideMove",h(x))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=x=>{const g=p.value?"from-bottom":"from-top";n("stepKeyDown",x,f(ng)[g].includes(x.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=x=>n("endKeyDown",x)),onHomeKeyDown:w[5]||(w[5]=x=>n("homeKeyDown",x))},{default:I(()=>[te(m.$slots,"default")]),_:3},8,["style"]))}}),[Gs,T2]=Pt("SliderRoot"),E2=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}=Mt(r),p=fc(d),{forwardRef:h,currentElement:m}=$e(),w=hc(m),{CollectionSlot:x}=hn({isProvider:!0}),g=ds(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),S=V(()=>Array.isArray(g.value)?[...g.value]:[]),b=F(0),y=F(S.value);function T(q){v(q,m2(S.value,q))}function k(q){v(q,b.value)}function N(){const q=y.value[b.value];S.value[b.value]!==q&&n("valueCommit",Ue(S.value))}function v(q,C,{commit:_}={commit:!1}){const E=_2(o.value),P=Bi(S2(Math.round((q-s.value)/o.value)*o.value+s.value,E),s.value,i.value),R=g2(S.value,P,C);if(b2(R,a.value*o.value)){b.value=R.indexOf(P);const D=String(R)!==String(g.value);D&&_&&n("valueCommit",R),D&&(B.value[b.value]?.focus(),g.value=R)}}const B=F([]);return T2({modelValue:g,currentModelValue:S,valueIndexToChangeRef:b,thumbElements:B,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(q,C)=>($(),U(f(x),null,{default:I(()=>[($(),U(yi(f(l)==="horizontal"?C2:x2),ye(q.$attrs,{ref:f(h),"as-child":q.asChild,as:q.as,min:f(s),max:f(i),dir:f(p),inverted:q.inverted,"aria-disabled":f(u),"data-disabled":f(u)?"":void 0,onPointerdown:C[0]||(C[0]=()=>{f(u)||(y.value=S.value)}),onSlideStart:C[1]||(C[1]=_=>!f(u)&&T(_)),onSlideMove:C[2]||(C[2]=_=>!f(u)&&k(_)),onSlideEnd:C[3]||(C[3]=_=>!f(u)&&N()),onHomeKeyDown:C[4]||(C[4]=_=>!f(u)&&v(f(s),0,{commit:!0})),onEndKeyDown:C[5]||(C[5]=_=>!f(u)&&v(f(i),S.value.length-1,{commit:!0})),onStepKeyDown:C[6]||(C[6]=(_,E)=>{if(!f(u)){const P=f(tg).includes(_.key)||_.shiftKey&&f(rg).includes(_.key)?10:1,R=b.value,D=S.value[R];v(D+f(o)*P*E,R,{commit:!0})}})}),{default:I(()=>[te(q.$slots,"default",{modelValue:f(g)}),f(w)&&q.name?($(),U(f(Ah),{key:0,type:"number",value:f(g),name:q.name,required:q.required,disabled:f(u),step:f(o)},null,8,["value","name","required","disabled","step"])):qe("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),og=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=Gs();return(i,o)=>($(),U(f(Ke),ye({"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(tg).concat(f(rg)).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:I(()=>[te(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=Gs(),r=sg();$e();const n=V(()=>t.currentModelValue.value.map(o=>eg(o,t.min.value,t.max.value))),s=V(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=V(()=>100-Math.max(...n.value,0));return(o,a)=>($(),U(f(Ke),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:Ct({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:I(()=>[te(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),k2=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=Gs(),n=sg(),{forwardRef:s,currentElement:i}=$e(),{CollectionItem:o}=hn(),a=V(()=>r.modelValue?.value?.[t.index]),l=V(()=>a.value===void 0?0:eg(a.value,r.min.value??0,r.max.value??100)),u=V(()=>v2(t.index,r.modelValue?.value?.length??0)),c=hh(i),d=V(()=>c[n.size].value),p=V(()=>r.thumbAlignment.value==="overflow"||!d.value?0:w2(d.value,l.value,n.direction.value)),h=lc();return Qe(()=>{r.thumbElements.value.push(i.value)}),jt(()=>{const m=r.thumbElements.value.findIndex(w=>w===i.value)??-1;r.thumbElements.value.splice(m,1)}),(m,w)=>($(),U(f(o),null,{default:I(()=>[H(f(Ke),ye(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:I(()=>[te(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}))}}),I2=X({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=hn(),{forwardRef:n,currentElement:s}=$e(),i=V(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>($(),U(k2,ye({ref:f(n)},t,{index:i.value}),{default:I(()=>[te(o.$slots,"default")]),_:3},16,["index"]))}}),R2=X({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Gs();return $e(),(r,n)=>($(),U(f(Ke),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:I(()=>[te(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),$2=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)=>($(),U(f(Ke),ye(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:I(()=>[te(r.$slots,"default")]),_:3},16))}}),[cr,P2]=Pt("ScrollAreaRoot"),D2=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}=Mt(r),m=fc(p);function w(){i.value?.scrollTo({top:0})}function x(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:x});const{forwardRef:g,currentElement:S}=$e();return P2({type:d,dir:m,scrollHideDelay:h,scrollArea:S,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,y)=>($(),U(f(Ke),{ref:f(g),"as-child":r.asChild,as:b.as,dir:f(m),style:Ct({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:I(()=>[te(b.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),O2=X({__name:"ScrollAreaCornerImpl",setup(e){const t=cr(),r=F(0),n=F(0),s=V(()=>!!r.value&&!!n.value);function i(){const a=t.scrollbarX.value?.offsetHeight||0;t.onCornerHeightChange(a),n.value=a}function o(){const a=t.scrollbarY.value?.offsetWidth||0;t.onCornerWidthChange(a),r.value=a}return us(t.scrollbarX.value,i),us(t.scrollbarY.value,o),Me(()=>t.scrollbarX.value,i),Me(()=>t.scrollbarY.value,o),(a,l)=>s.value?($(),U(f(Ke),ye({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:I(()=>[te(a.$slots,"default")]),_:3},16,["style"])):qe("v-if",!0)}}),H2=X({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=$e(),n=cr(),s=V(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=V(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?($(),U(O2,ye({key:0},t,{ref:f(r)}),{default:I(()=>[te(o.$slots,"default")]),_:3},16)):qe("v-if",!0)}});function ag(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 _a(e){const t=lg(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function lg(e,t){const r=e/t;return Number.isNaN(r)?0:r}function M2(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 cg(e,t,r="ltr"){const n=_a(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=Bi(e,l[0],l[1]);return ag([0,o],[0,a])(u)}function Sa(e){return e?Number.parseInt(e,10):0}function N2(e,t,r,n="ltr"){const s=_a(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 ag([l,u],d)(e)}function ug(e,t){return e>0&&e<t}var q2=X({__name:"ScrollAreaScrollbarX",setup(e){const t=cr(),r=Ca(),{forwardRef:n,currentElement:s}=$e();Qe(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>($(),U(dg,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:Ct({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(_a)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:I(()=>[te(o.$slots,"default")]),_:3},8,["style"]))}}),B2=X({__name:"ScrollAreaScrollbarY",setup(e){const t=cr(),r=Ca(),{forwardRef:n,currentElement:s}=$e();Qe(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>($(),U(dg,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:Ct({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(_a)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:I(()=>[te(o.$slots,"default")]),_:3},8,["style"]))}}),Bc=X({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),r=Vi(),{forwardRef:n}=$e(),s=F(!1),i=ac(()=>{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()),us(t.viewport,i),us(t.content,i),(o,a)=>($(),U(f(Ln),{present:o.forceMount||s.value},{default:I(()=>[H(Lc,ye(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:I(()=>[te(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),L2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),r=Vi(),{forwardRef:n}=$e(),{state:s,dispatch:i}=vc("hidden",{hidden:{POINTER_ENTER:"glimpse",SCROLL:"scrolling"},glimpse:{HIDE:"hidden",POINTER_LEAVE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"glimpse"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");function a(){i("POINTER_ENTER")}function l(){i("POINTER_LEAVE")}const u=ac(()=>i("SCROLL_END"),100);return ct(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),ct(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),ct(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))}),jt(()=>{const c=t.scrollArea.value;c&&(c.removeEventListener("pointerenter",a),c.removeEventListener("pointerleave",l))}),(c,d)=>($(),U(f(Ln),{present:c.forceMount||o.value},{default:I(()=>[H(Bc,ye(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:I(()=>[te(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),F2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),{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))}),jt(()=>{const a=t.scrollArea.value;a&&(window.clearTimeout(n),a.removeEventListener("pointerenter",i),a.removeEventListener("pointerleave",o))}),(a,l)=>($(),U(f(Ln),{present:a.forceMount||s.value},{default:I(()=>[H(Bc,ye(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:I(()=>[te(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),V2=X({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),r=Vi(),{forwardRef:n}=$e(),{state:s,dispatch:i}=vc("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");ct(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=ac(()=>i("SCROLL_END"),100);return ct(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)=>($(),U(f(Ln),{present:l.forceMount||o.value},{default:I(()=>[H(Lc,ye(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:I(()=>[te(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Vi,j2]=Pt("ScrollAreaScrollbar"),U2=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=cr(),s=V(()=>t.orientation==="horizontal");Me(s,()=>{s.value?n.onScrollbarXEnabledChange(!0):n.onScrollbarYEnabledChange(!0)},{immediate:!0}),jt(()=>{n.onScrollbarXEnabledChange(!1),n.onScrollbarYEnabledChange(!1)});const{orientation:i,forceMount:o,asChild:a,as:l}=Mt(t);return j2({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?($(),U(F2,ye({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[te(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?($(),U(V2,ye({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[te(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?($(),U(L2,ye({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[te(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?($(),U(Bc,ye({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[te(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?($(),U(Lc,ye({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:I(()=>[te(u.$slots,"default")]),_:3},16)):qe("v-if",!0)}}),[Ca,z2]=Pt("ScrollAreaScrollbarVisible"),Lc=X({__name:"ScrollAreaScrollbarVisible",setup(e){const t=cr(),r=Vi(),{forwardRef:n}=$e(),s=F({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=V(()=>{const g=lg(s.value.viewport,s.value.content);return g>0&&g<1}),o=F(),a=F(0);function l(g,S){if(h.value){const b=t.viewport.value.scrollLeft+g.deltaY;t.viewport.value.scrollLeft=b,ug(b,S)&&g.preventDefault()}else{const b=t.viewport.value.scrollTop+g.deltaY;t.viewport.value.scrollTop=b,ug(b,S)&&g.preventDefault()}}function u(g,S){h.value?a.value=S.x:a.value=S.y}function c(g){a.value=0}function d(g){s.value=g}function p(g,S){return N2(g,a.value,s.value,S)}const h=V(()=>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,S=cg(g,s.value,t.dir.value);o.value.style.transform=`translate3d(${S}px, 0, 0)`}}else if(t.viewport.value&&o.value){const g=t.viewport.value.scrollTop,S=cg(g,s.value);o.value.style.transform=`translate3d(0, ${S}px, 0)`}}function x(g){o.value=g}return z2({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:x,onDragScroll:m}),(g,S)=>h.value?($(),U(q2,ye({key:0},g.$attrs,{ref:f(n)}),{default:I(()=>[te(g.$slots,"default")]),_:3},16)):($(),U(B2,ye({key:1},g.$attrs,{ref:f(n)}),{default:I(()=>[te(g.$slots,"default")]),_:3},16))}}),dg=X({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=cr(),i=Ca(),o=Vi(),{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 S=g.target;S.hasPointerCapture(g.pointerId)&&S.releasePointerCapture(g.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function w(g){const S=g.target,b=l.value?.contains(S),y=i.sizes.value.content-i.sizes.value.viewport;b&&i.handleWheelScroll(g,y)}Qe(()=>{document.addEventListener("wheel",w,{passive:!1})}),jt(()=>{document.removeEventListener("wheel",w)});function x(){l.value&&(r.isHorizontal?i.handleSizeChange({content:s.viewport.value?.scrollWidth??0,viewport:s.viewport.value?.offsetWidth??0,scrollbar:{size:l.value.clientWidth??0,paddingStart:Sa(getComputedStyle(l.value).paddingLeft),paddingEnd:Sa(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:Sa(getComputedStyle(l.value).paddingTop),paddingEnd:Sa(getComputedStyle(l.value).paddingBottom)}}),i.onThumbPositionChange())}return us(l,x),us(s.content,x),(g,S)=>($(),U(f(Ke),{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:I(()=>[te(g.$slots,"default")]),_:3},8,["as","as-child"]))}}),K2=X({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=cr(),n=Ca();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=V(()=>r.viewport.value);function c(){l.value||(l.value=M2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return ab(V(()=>n.sizes.value),()=>{n.onThumbChange(a.value),u.value&&(n.onThumbPositionChange(),u.value.addEventListener("scroll",c))}),jt(()=>{u.value.removeEventListener("scroll",c),r.viewport.value?.removeEventListener("scroll",c)}),(d,p)=>($(),U(f(Ke),{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:I(()=>[te(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),W2=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}=Mt(r),s=Qh(n),i=cr(),o=F();Qe(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=$e();return(u,c)=>($(),Se(ze,null,[Q("div",ye({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}),[H(f(Ke),{ref:f(a),style:Ct({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:I(()=>[te(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),H(f(Ke),{as:"style",nonce:f(s)},{default:I(()=>c[0]||(c[0]=[Ne(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-reka-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),G2=[" ","Enter","ArrowUp","ArrowDown"],J2=[" ","Enter"],mT=10;function ji(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>Fc(n,t,r)):Fc(e,t,r)}function Fc(e,t,r){return e===void 0||t===void 0?!1:typeof e=="string"?e===t:typeof r=="function"?r(e,t):typeof r=="string"?e?.[r]===t?.[r]:qy(e,t)}function Y2(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var Z2={key:0,value:""},[zn,fg]=Pt("SelectRoot"),X2=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}=Mt(r),l=ds(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=ds(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=F(),d=F(),p=F({x:0,y:0}),h=V(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:nc(l.value));hn({isProvider:!0});const m=fc(a),w=hc(c),x=F(new Set),g=V(()=>Array.from(x.value).map(y=>y.value).join(";"));function S(y){if(o.value){const T=Array.isArray(l.value)?[...l.value]:[],k=T.findIndex(N=>Fc(N,y,r.by));k===-1?T.push(y):T.splice(k,1),l.value=[...T]}else l.value=y}function b(y){return Array.from(x.value).find(T=>ji(y,T.value,r.by))}return fg({triggerElement:c,onTriggerChange:y=>{c.value=y},valueElement:d,onValueElementChange:y=>{d.value=y},contentId:"",modelValue:l,onValueChange:S,by:r.by,open:u,multiple:o,required:s,onOpenChange:y=>{u.value=y},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:x,onOptionAdd:y=>{const T=b(y.value);T&&x.value.delete(T),x.value.add(y)},onOptionRemove:y=>{const T=b(y.value);T&&x.value.delete(T)}}),(y,T)=>($(),U(f(Ih),null,{default:I(()=>[te(y.$slots,"default",{modelValue:f(l),open:f(u)}),f(w)?($(),U(Q2,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:y.name,autocomplete:y.autocomplete,disabled:f(i),value:f(l)},{default:I(()=>[f(nc)(f(l))?($(),Se("option",Z2)):qe("v-if",!0),($(!0),Se(ze,null,gr(Array.from(x.value),k=>($(),Se("option",ye({key:k.value??""},{ref_for:!0},k),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):qe("v-if",!0)]),_:3}))}}),Q2=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=zn();Me(()=>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)=>($(),U(f(Cc),{"as-child":""},{default:I(()=>[Q("select",ye({ref_key:"selectElement",ref:r},t,{onInput:s}),[te(i.$slots,"default")],16)]),_:3}))}}),e_=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=pn(e);return(r,n)=>($(),U(f(Xh),ye(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:I(()=>[te(r.$slots,"default")]),_:3},16))}}),t_={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[gs,pg]=Pt("SelectContent"),r_=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=zn();Sb(),ch(r.bodyLock);const{CollectionSlot:i,getItems:o}=hn(),a=F();ph(a);const{search:l,handleTypeaheadSearch:u}=gh(),c=F(),d=F(),p=F(),h=F(!1),m=F(!1),w=F(!1);function x(){d.value&&a.value&&Ch([d.value,a.value])}Me(h,()=>{x()});const{onOpenChange:g,triggerPointerDownPosRef:S}=s;ct(T=>{if(!a.value)return;let k={x:0,y:0};const N=B=>{k={x:Math.abs(Math.round(B.pageX)-(S.value?.x??0)),y:Math.abs(Math.round(B.pageY)-(S.value?.y??0))}},v=B=>{B.pointerType!=="touch"&&(k.x<=10&&k.y<=10?B.preventDefault():a.value?.contains(B.target)||g(!1),document.removeEventListener("pointermove",N),S.value=null)};S.value!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",v,{capture:!0,once:!0})),T(()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",v,{capture:!0})})});function b(T){const k=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!k&&T.key.length===1&&u(T.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let N=[...o().map(v=>v.ref)];if(["ArrowUp","End"].includes(T.key)&&(N=N.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const v=T.target,B=N.indexOf(v);N=N.slice(B+1)}setTimeout(()=>Ch(N)),T.preventDefault()}}const y=pn(V(()=>r.position==="popper"?r:{}).value);return pg({content:a,viewport:c,onViewportChange:T=>{c.value=T},itemRefCallback:(T,k,N)=>{const v=!m.value&&!N,B=ji(s.modelValue.value,k,s.by);if(s.multiple.value){if(w.value)return;(B||v)&&(d.value=T,B&&(w.value=!0))}else(B||v)&&(d.value=T);v&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(T,k,N)=>{const v=!m.value&&!N;(ji(s.modelValue.value,k,s.by)||v)&&(p.value=T)},focusSelectedItem:x,position:r.position,isPositioned:h,searchRef:l}),(T,k)=>($(),U(f(i),null,{default:I(()=>[H(f(_h),{"as-child":"",onMountAutoFocus:k[6]||(k[6]=Xt(()=>{},["prevent"])),onUnmountAutoFocus:k[7]||(k[7]=N=>{n("closeAutoFocus",N),!N.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),N.preventDefault())})},{default:I(()=>[H(f(yc),{"as-child":"","disable-outside-pointer-events":T.disableOutsidePointerEvents,onFocusOutside:k[2]||(k[2]=Xt(()=>{},["prevent"])),onDismiss:k[3]||(k[3]=N=>f(s).onOpenChange(!1)),onEscapeKeyDown:k[4]||(k[4]=N=>n("escapeKeyDown",N)),onPointerDownOutside:k[5]||(k[5]=N=>n("pointerDownOutside",N))},{default:I(()=>[($(),U(yi(T.position==="popper"?e_:s_),ye({...T.$attrs,...f(y)},{id:f(s).contentId,ref:N=>{const v=f(tr)(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:k[0]||(k[0]=Xt(()=>{},["prevent"])),onPlaced:k[1]||(k[1]=N=>h.value=!0),onKeydown:b}),{default:I(()=>[te(T.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[Vc,n_]=Pt("SelectItemAlignedPosition"),s_=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}=hn(),i=zn(),o=gs(),a=F(!1),l=F(!0),u=F(),{forwardRef:c,currentElement:d}=$e(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:w}=o;function x(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const b=i.triggerElement.value.getBoundingClientRect(),y=d.value.getBoundingClientRect(),T=i.valueElement.value.getBoundingClientRect(),k=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const He=k.left-y.left,nt=T.left-He,bt=b.left-nt,We=b.width+bt,ot=Math.max(We,y.width),_t=window.innerWidth-10,lt=Bi(nt,10,Math.max(10,_t-ot));u.value.style.minWidth=`${We}px`,u.value.style.left=`${lt}px`}else{const He=y.right-k.right,nt=window.innerWidth-T.right-He,bt=window.innerWidth-b.right-nt,We=b.width+bt,ot=Math.max(We,y.width),_t=window.innerWidth-10,lt=Bi(nt,10,Math.max(10,_t-ot));u.value.style.minWidth=`${We}px`,u.value.style.right=`${lt}px`}const N=s().map(He=>He.ref),v=window.innerHeight-20,B=p.value.scrollHeight,q=window.getComputedStyle(d.value),C=Number.parseInt(q.borderTopWidth,10),_=Number.parseInt(q.paddingTop,10),E=Number.parseInt(q.borderBottomWidth,10),P=Number.parseInt(q.paddingBottom,10),R=C+_+B+P+E,D=Math.min(h.value.offsetHeight*5,R),J=window.getComputedStyle(p.value),W=Number.parseInt(J.paddingTop,10),ae=Number.parseInt(J.paddingBottom,10),z=b.top+b.height/2-10,ce=v-z,pe=h.value.offsetHeight/2,Pe=h.value.offsetTop+pe,Fe=C+_+Pe,Ee=R-Fe;if(Fe<=z){const He=h.value===N[N.length-1];u.value.style.bottom="0px";const nt=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,bt=Fe+Math.max(ce,pe+(He?ae:0)+nt+E);u.value.style.height=`${bt}px`}else{const He=h.value===N[0];u.value.style.top="0px";const nt=Math.max(z,C+p.value.offsetTop+(He?W:0)+pe)+Ee;u.value.style.height=`${nt}px`,p.value.scrollTop=Fe-z+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${D}px`,u.value.style.maxHeight=`${v}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=F("");Qe(async()=>{await Et(),x(),d.value&&(g.value=window.getComputedStyle(d.value).zIndex)});function S(b){b&&l.value===!0&&(x(),w?.(),l.value=!1)}return us(i.triggerElement,()=>{x()}),n_({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:S}),(b,y)=>($(),Se("div",{ref_key:"contentWrapperElement",ref:u,style:Ct({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[H(f(Ke),ye({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...b.$attrs,...r}),{default:I(()=>[te(b.$slots,"default")]),_:3},16)],4))}}),i_=X({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return fg(e.context),pg(t_),(t,r)=>te(t.$slots,"default")}}),o_={key:1},a_=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=jr(r,t),s=zn(),i=F();Qe(()=>{i.value=new DocumentFragment});const o=F(),a=V(()=>r.forceMount||s.open.value),l=F(a.value);return Me(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?($(),U(f(Ln),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:I(()=>[H(r_,fr(rr({...f(n),...u.$attrs})),{default:I(()=>[te(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?($(),Se("div",o_,[($(),U(Xa,{to:i.value},[H(i_,{context:f(s)},{default:I(()=>[te(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):qe("v-if",!0)}}),[wT,l_]=Pt("SelectGroup"),c_=X({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=js(void 0,"reka-select-group");return l_({id:r}),(n,s)=>($(),U(f(Ke),ye({role:"group"},t,{"aria-labelledby":f(r)}),{default:I(()=>[te(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),u_=X({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>($(),U(f(Ke),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:I(()=>[te(t.$slots,"default",{},()=>[r[0]||(r[0]=Ne("▼"))])]),_:3},8,["as","as-child"]))}}),[hg,d_]=Pt("SelectItem"),f_=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}=Mt(r),i=zn(),o=gs(),{forwardRef:a,currentElement:l}=$e(),{CollectionItem:u}=hn(),c=V(()=>ji(i.modelValue?.value,r.value,i.by)),d=F(!1),p=F(r.textValue??""),h=js(void 0,"reka-select-item-text"),m="select.select";async function w(y){y.defaultPrevented||rc(m,x,{originalEvent:y,value:r.value})}async function x(y){await Et(),n("select",y),!y.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function g(y){await Et(),!y.defaultPrevented&&(s.value?o.onItemLeave?.():y.currentTarget?.focus({preventScroll:!0}))}async function S(y){await Et(),!y.defaultPrevented&&y.currentTarget===or()&&o.onItemLeave?.()}async function b(y){await Et(),!y.defaultPrevented&&(o.searchRef?.value!==""&&y.key===" "||(J2.includes(y.key)&&w(y),y.key===" "&&y.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)}),d_({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:y=>{p.value=((p.value||y?.textContent)??"").trim()}}),(y,T)=>($(),U(f(u),{value:{textValue:p.value}},{default:I(()=>[H(f(Ke),{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:y.as,"as-child":y.asChild,onFocus:T[0]||(T[0]=k=>d.value=!0),onBlur:T[1]||(T[1]=k=>d.value=!1),onPointerup:w,onPointerdown:T[2]||(T[2]=k=>{k.currentTarget.focus({preventScroll:!0})}),onTouchend:T[3]||(T[3]=Xt(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:S,onKeydown:b},{default:I(()=>[te(y.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),p_=X({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=hg();return(n,s)=>f(r).isSelected.value?($(),U(f(Ke),ye({key:0,"aria-hidden":"true"},t),{default:I(()=>[te(n.$slots,"default")]),_:3},16)):qe("v-if",!0)}}),h_=X({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=zn(),n=gs(),s=hg(),{forwardRef:i,currentElement:o}=$e(),a=V(()=>({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))}),jt(()=>{r.onOptionRemove(a.value)}),(l,u)=>($(),U(f(Ke),ye({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:I(()=>[te(l.$slots,"default")]),_:3},16,["id"]))}}),g_=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)=>($(),U(f(Sc),fr(rr(t)),{default:I(()=>[te(r.$slots,"default")]),_:3},16))}}),gg=X({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=hn(),s=gs(),i=F(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}ct(()=>{n().map(u=>u.ref).find(u=>u===or())?.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 Ds(()=>o()),(u,c)=>($(),U(f(Ke),ye({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:I(()=>[te(u.$slots,"default")]),_:3},16))}}),v_=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=gs(),r=t.position==="item-aligned"?Vc():void 0,{forwardRef:n,currentElement:s}=$e(),i=F(!1);return ct(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))}}),Me(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?($(),U(gg,{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:I(()=>[te(o.$slots,"default")]),_:3},512)):qe("v-if",!0)}}),m_=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=gs(),r=t.position==="item-aligned"?Vc():void 0,{forwardRef:n,currentElement:s}=$e(),i=F(!1);return ct(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))}}),Me(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?($(),U(gg,{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:I(()=>[te(o.$slots,"default")]),_:3},512)):qe("v-if",!0)}}),w_=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=zn(),{forwardRef:n,currentElement:s}=$e(),i=V(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=js(void 0,"reka-select-content")),Qe(()=>{r.onTriggerChange(s.value)});const{getItems:o}=hn(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=gh();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)=>($(),U(f(Rh),{"as-child":"",reference:p.reference},{default:I(()=>[H(f(Ke),{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(Y2)(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]=Xt(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(G2).includes(m.key)&&(c(),m.preventDefault()))})},{default:I(()=>[te(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"]))}}),y_=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=zn();Qe(()=>{s.valueElement=n});const i=V(()=>{let a=[];const l=Array.from(s.optionsSet.value),u=c=>l.find(d=>ji(c,d.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(c=>u(c)?.textContent??""):a=[u(s.modelValue.value)?.textContent??""],a.filter(Boolean)}),o=V(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>($(),U(f(Ke),{ref:f(r),as:a.as,"as-child":a.asChild,style:{pointerEvents:"none"},"data-placeholder":i.value.length?void 0:t.placeholder},{default:I(()=>[te(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[Ne(Be(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),b_=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}=Mt(t),n=Qh(r),s=gs(),i=s.position==="item-aligned"?Vc():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,x=Number.parseFloat(h.value.style.minHeight),g=Number.parseFloat(h.value.style.height),S=Math.max(x,g);if(S<w){const b=S+m,y=Math.min(w,b),T=b-y;h.value.style.height=`${y}px`,h.value.style.bottom==="0px"&&(d.scrollTop=T>0?T:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>($(),Se(ze,null,[H(f(Ke),ye({ref:f(o),"data-reka-select-viewport":"",role:"presentation"},{...c.$attrs,...t},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:u}),{default:I(()=>[te(c.$slots,"default")]),_:3},16),H(f(Ke),{as:"style",nonce:f(n)},{default:I(()=>d[0]||(d[0]=[Ne(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } ")])),_:1,__:[0]},8,["nonce"])],64))}}),__=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=V(()=>n(t.orientation)?t.orientation:"horizontal"),i=V(()=>s.value==="vertical"?t.orientation:void 0),o=V(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>($(),U(f(Ke),ye({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:I(()=>[te(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),S_=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)=>($(),U(__,fr(rr(t)),{default:I(()=>[te(r.$slots,"default")]),_:3},16))}}),[C_,yT]=Pt("ToggleGroupRoot"),x_=X({__name:"Toggle",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=$e(),o=C_(null),a=ds(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0});function l(){a.value=!a.value}const u=V(()=>a.value?"on":"off"),c=hc(i);return(d,p)=>($(),U(f(Ke),{ref:f(s),type:d.as==="button"?"button":void 0,"as-child":r.asChild,as:d.as,"aria-pressed":f(a),"data-state":u.value,"data-disabled":d.disabled?"":void 0,disabled:d.disabled,onClick:l},{default:I(()=>[te(d.$slots,"default",{modelValue:f(a),disabled:d.disabled,pressed:f(a),state:u.value}),f(c)&&d.name&&!f(o)?($(),U(Ah,{key:0,type:"checkbox",name:d.name,value:f(a),required:d.required},null,8,["name","value","required"])):qe("v-if",!0)]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),T_=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)=>($(),U(f(h2),fr(rr(t)),{default:I(()=>[te(r.$slots,"default")]),_:3},16))}}),[xa,E_]=Pt("TooltipProvider"),A_=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}=Mt(e);$e();const l=F(!0),u=F(!1),{start:c,stop:d}=sh(()=>{l.value=!0},r,{immediate:!1});return E_({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)=>te(p.$slots,"default")}}),vg="tooltip.open",[Ta,k_]=Pt("TooltipRoot"),I_=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=xa(),i=V(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=V(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=V(()=>r.disabled??s.disabled.value),l=V(()=>r.delayDuration??s.delayDuration.value),u=V(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),c=ds(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Me(c,b=>{s.onClose&&(b?(s.onOpen(),document.dispatchEvent(new CustomEvent(vg))):s.onClose())});const d=F(!1),p=F(),h=V(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:w}=sh(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function x(){w(),d.value=!1,c.value=!0}function g(){w(),c.value=!1}function S(){m()}return k_({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){s.isOpenDelayed.value?S():x()},onTriggerLeave(){i.value?g():w()},onOpen:x,onClose:g,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(b,y)=>($(),U(f(Ih),null,{default:I(()=>[te(b.$slots,"default",{open:f(c)})]),_:3}))}}),mg=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=Ta(),i=xa(),{forwardRef:o,currentElement:a}=$e(),l=V(()=>r.ariaLabel||a.value?.textContent),u=V(()=>{const{ariaLabel:c,...d}=r;return lh(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return Qe(()=>{Kt(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),Kt(window,vg,s.onClose)}),(c,d)=>($(),U(f(yc),{"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]=Xt(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:I(()=>[H(f(Xh),ye({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:I(()=>[te(c.$slots,"default"),H(f(Cc),{id:f(s).contentId,role:"tooltip"},{default:I(()=>[Ne(Be(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),R_=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=pn(e),{forwardRef:r,currentElement:n}=$e(),{trigger:s,onClose:i}=Ta(),o=xa(),{isPointerInTransit:a,onPointerExit:l}=Cb(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>($(),U(mg,ye({ref:f(r)},f(t)),{default:I(()=>[te(u.$slots,"default")]),_:3},16))}}),$_=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=Ta(),i=jr(r,n),{forwardRef:o}=$e();return(a,l)=>($(),U(f(Ln),{present:a.forceMount||f(s).open.value},{default:I(()=>[($(),U(yi(f(s).disableHoverableContent.value?mg:R_),ye({ref:f(o)},f(i)),{default:I(()=>[te(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),P_=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)=>($(),U(f(Sc),fr(rr(t)),{default:I(()=>[te(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=Ta(),n=xa();r.contentId||(r.contentId=js(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=$e(),o=F(!1),a=F(!1),l=V(()=>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(x){x.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(x){o.value||r.ignoreNonKeyboardFocus.value&&!x.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(x,g)=>($(),U(f(Rh),{"as-child":"",reference:x.reference},{default:I(()=>[H(f(Ke),ye({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:x.as,"as-child":t.asChild,"data-grace-area-trigger":""},Cd(l.value)),{default:I(()=>[te(x.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),O_=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)=>($(),U(f(Ke),{"data-slot":"button",as:e.as,"as-child":e.asChild,type:e.as==="button"?e.type:void 0,class:Xe(f(dt)(f(H_)({variant:e.variant,size:e.size}),t.class))},{default:I(()=>[te(r.$slots,"default")]),_:3},8,["as","as-child","type","class"]))}}),ht=O_;const H_=Zp("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 M_={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"},N_=X({__name:"KeyPad",setup(e){const t=Vt("webphone"),{sendDTMF:r}=Vt("sip"),{playDtmf:n}=Sp(),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)=>($(),Se("div",M_,[($(),Se(ze,null,gr(s,l=>H(f(ht),{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:I(()=>[Ne(Be(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),jc=N_;var wg=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),q_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),B_=e=>{const t=q_(e);return t.charAt(0).toUpperCase()+t.slice(1)},L_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),yg=e=>e==="";var Ui={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 F_=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=Ui.width,color:a=Ui.stroke,...l},{slots:u})=>vr("svg",{...Ui,...l,width:o,height:o,stroke:a,"stroke-width":yg(r)||yg(n)||r===!0||n===!0?Number(s||i||Ui["stroke-width"])*24/Number(o):s||i||Ui["stroke-width"],class:L_("lucide",l.class,...e?[`lucide-${wg(B_(e))}-icon`,`lucide-${wg(e)}`]:["lucide-icon"])},[...t.map(c=>vr(...c)),...u.default?[u.default()]:[]]);var mt=(e,t)=>(r,{slots:n,attrs:s})=>vr(F_,{...s,...r,iconNode:t,name:e},n);var bg=mt("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 Uc=mt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var _g=mt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var V_=mt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var zc=mt("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 j_=mt("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var U_=mt("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 z_=mt("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 K_=mt("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 W_=mt("phone-call",[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["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 G_=mt("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 J_=mt("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 Y_=mt("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 Sg=mt("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 Z_=mt("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 X_=mt("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 Q_=mt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var eS=mt("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 tS=mt("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 Cg=mt("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 xg=mt("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 Kc=mt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),rS=X({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=ds(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>mo(($(),Se("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>tt(n)?n.value=o:null),"data-slot":"input",class:Xe(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)),[[Ii,f(n)]])}}),zi=rS,nS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function sS(e,t){return $(),Se("svg",nS,[...t[0]||(t[0]=[_l('<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 Wc={render:sS},iS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function oS(e,t){return $(),Se("svg",iS,[...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 aS={render:oS},lS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function cS(e,t){return $(),Se("svg",lS,[...t[0]||(t[0]=[_l('<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 uS={render:cS},dS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function fS(e,t){return $(),Se("svg",dS,[...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 pS={render:fS},hS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function gS(e,t){return $(),Se("svg",hS,[...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 Gc={render:gS},vS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function mS(e,t){return $(),Se("svg",vS,[...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 Jc={render:mS},wS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function yS(e,t){return $(),Se("svg",wS,[...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 Yc={render:yS},bS=["data-call-status"],_S={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},SS={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},CS={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},xS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},TS=["data-visible"],ES={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},AS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},kS=["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"},RS=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=Vt("webphone"),{makeCall:n,hangupCall:s,answerCall:i,toggleMute:o,toggleHold:a,sendDTMF:l}=Vt("sip"),u=/^[0-9*#]+$/,c=C=>{if(u.test(C)){for(const _ of C)l(_);for(const _ of C)r.appendKeypad(_)}},d=C=>{C.ctrlKey||C.metaKey||C.altKey||C.key.length!==1||(C.preventDefault(),C.stopPropagation(),c(C.key))},p=C=>{C.data&&(C.preventDefault(),C.stopPropagation(),c(C.data))},h=C=>{C.preventDefault(),C.stopPropagation(),c(C.clipboardData?.getData("text").replace(/\s/g,"")||"")};Me(()=>r.callStatus,(C,_)=>{C==="connected"&&_!=="connected"&&r.clearKeypad()});const m=e,w=t,x=V(()=>!!r.transferInProgress),g=V(()=>m.destination||r.keypadValue||r.lastDialedNumber||""),S=V(()=>!!m.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),b=V(()=>S.value||!!r.lastDialedNumber),y=V(()=>!m.isVideo||!S.value?!1:g.value?/^[0-9*#]{1,5}$/.test(g.value):!0),T=async C=>{try{m.destination?await n(m.destination,C):r.keypadValue?await n(r.keypadValue,C):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(_){if(console.error("Error initiating call:",_),C){let E="No se pudo acceder a la cámara.";const P=_ instanceof Error?_.name:String(_);P==="NotReadableError"?E="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":P==="NotAllowedError"||P==="PermissionDeniedError"?E="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":P==="NotFoundError"?E="No se detectó ninguna cámara en el sistema.":E+=" "+(_ instanceof Error?_.message:String(_)),confirm(`${E}
74
+ `))}return()=>s.value||n.value||o.value?mr(t.default({present:o.value})[0],{ref:u=>{const c=tr(u);return typeof c?.hasAttribute>"u"||(c?.hasAttribute("data-reka-popper-content-wrapper")?i.value=c.firstElementChild:i.value=c),c}}):null}}),yc=X({name:"PrimitiveSlot",inheritAttrs:!1,setup(e,{attrs:t,slots:r}){return()=>{if(!r.default)return null;const n=oc(r.default()),s=n.findIndex(l=>l.type!==ht);if(s===-1)return n;const i=n[s];delete i.props?.ref;const o=i.props?we(t,i.props):t,a=Rr({...i,props:{}},o);return n.length===1?a:(n[s]=a,n)}}}),Fb=["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"&&Fb.includes(n)?()=>mr(n,t):n!=="template"?()=>mr(e.as,t,{default:r.default}):()=>mr(yc,t,{default:r.default})}});function bc(){const e=F();return{primitiveElement:e,currentElement:V(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:tr(e))}}var[Fn,Vb]=Pt("DialogRoot"),jb=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=ds(r,"open",t,{defaultValue:r.defaultOpen,passive:r.open===void 0}),s=F(),i=F(),{modal:o}=Mt(r);return Vb({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)=>ne(a.$slots,"default",{open:f(n),close:()=>n.value=!1})}}),Ub=X({__name:"DialogClose",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e;Pe();const r=Fn();return(n,s)=>($(),U(f(We),we(t,{type:n.as==="button"?"button":void 0,onClick:s[0]||(s[0]=i=>f(r).onOpenChange(!1))}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["type"]))}}),zb="dismissableLayer.pointerDownOutside",Kb="dismissableLayer.focusOutside";function yh(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 Wb(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1),i=F(()=>{});return ct(o=>{if(!qt||!$e(r))return;const a=async u=>{const c=u.target;if(!(!t?.value||!c)){if(yh(t.value,c)){s.value=!1;return}if(u.target&&!s.value){let h=function(){sc(zb,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:()=>{$e(r)&&(s.value=!0)}}}function Gb(e,t,r=!0){const n=t?.value?.ownerDocument??globalThis?.document,s=F(!1);return ct(i=>{if(!qt||!$e(r))return;const o=async a=>{if(!t?.value)return;await Et(),await Et();const l=a.target;!t.value||!l||yh(t.value,l)||a.target&&!s.value&&sc(Kb,e,{originalEvent:a})};n.addEventListener("focusin",o),i(()=>n.removeEventListener("focusin",o))}),{onFocusCapture:()=>{$e(r)&&(s.value=!0)},onBlurCapture:()=>{$e(r)&&(s.value=!1)}}}var Sr=Qr({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),_c=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}=Pe(),o=V(()=>i.value?.ownerDocument??globalThis.document),a=V(()=>Sr.layersRoot),l=V(()=>i.value?Array.from(a.value).indexOf(i.value):-1),u=V(()=>Sr.layersWithOutsidePointerEventsDisabled.size>0),c=V(()=>{const h=Array.from(a.value),[m]=[...Sr.layersWithOutsidePointerEventsDisabled].slice(-1),w=h.indexOf(m);return l.value>=w}),d=Wb(async h=>{const m=[...Sr.branches].some(w=>w?.contains(h.target));!c.value||m||(n("pointerDownOutside",h),n("interactOutside",h),await Et(),h.defaultPrevented||n("dismiss"))},i),p=Gb(h=>{[...Sr.branches].some(m=>m?.contains(h.target))||(n("focusOutside",h),n("interactOutside",h),h.defaultPrevented||n("dismiss"))},i);return pb("Escape",h=>{l.value===a.value.size-1&&(n("escapeKeyDown",h),h.defaultPrevented||n("dismiss"))}),ct(h=>{i.value&&(r.disableOutsidePointerEvents&&(Sr.layersWithOutsidePointerEventsDisabled.size===0&&(Sr.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents="none"),Sr.layersWithOutsidePointerEventsDisabled.add(i.value)),a.value.add(i.value),h(()=>{r.disableOutsidePointerEvents&&Sr.layersWithOutsidePointerEventsDisabled.size===1&&!ic(Sr.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=Sr.originalBodyPointerEvents)}))}),ct(h=>{h(()=>{i.value&&(a.value.delete(i.value),Sr.layersWithOutsidePointerEventsDisabled.delete(i.value))})}),(h,m)=>($(),U(f(We),{ref:f(s),"as-child":h.asChild,as:h.as,"data-dismissable-layer":"",style:St({pointerEvents:u.value?c.value?"auto":"none":void 0}),onFocusCapture:f(p).onFocusCapture,onBlurCapture:f(p).onBlurCapture,onPointerdownCapture:f(d).onPointerDownCapture},{default:I(()=>[ne(h.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),Jb=Uy(()=>F([]));function Yb(){const e=Jb();return{add(t){const r=e.value[0];t!==r&&r?.pause(),e.value=bh(e.value,t),e.value.unshift(t)},remove(t){e.value=bh(e.value,t),e.value[0]?.resume()}}}function bh(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}var Sc="focusScope.autoFocusOnMount",Cc="focusScope.autoFocusOnUnmount",_h={bubbles:!1,cancelable:!0};function Zb(e,{select:t=!1}={}){const r=or();for(const n of e)if(Vn(n,{select:t}),or()!==r)return!0}function Xb(e){const t=Sh(e);return[Ch(t,e),Ch(t.reverse(),e)]}function Sh(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 Ch(e,t){for(const r of e)if(!Qb(r,{upTo:t}))return r}function Qb(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 e1(e){return e instanceof HTMLInputElement&&"select"in e}function Vn(e,{select:t=!1}={}){if(e&&e.focus){const r=or();e.focus({preventScroll:!0}),e!==r&&e1(e)&&t&&e.select()}}var xh=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}=Pe(),o=F(null),a=Yb(),l=Qr({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});ct(c=>{if(!qt)return;const d=i.value;if(!r.trapped)return;function p(x){if(l.paused||!d)return;const g=x.target;d.contains(g)?o.value=g:Vn(o.value,{select:!0})}function h(x){if(l.paused||!d)return;const g=x.relatedTarget;g!==null&&(d.contains(g)||Vn(o.value,{select:!0}))}function m(x){d.contains(o.value)||Vn(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()})}),ct(async c=>{const d=i.value;if(await Et(),!d)return;a.add(l);const p=or();if(!d.contains(p)){const h=new CustomEvent(Sc,_h);d.addEventListener(Sc,m=>n("mountAutoFocus",m)),d.dispatchEvent(h),h.defaultPrevented||(Zb(Sh(d),{select:!0}),or()===p&&Vn(d))}c(()=>{d.removeEventListener(Sc,w=>n("mountAutoFocus",w));const h=new CustomEvent(Cc,_h),m=w=>{n("unmountAutoFocus",w)};d.addEventListener(Cc,m),d.dispatchEvent(h),setTimeout(()=>{h.defaultPrevented||Vn(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=or();if(d&&p){const h=c.currentTarget,[m,w]=Xb(h);m&&w?!c.shiftKey&&p===w?(c.preventDefault(),r.loop&&Vn(m,{select:!0})):c.shiftKey&&p===m&&(c.preventDefault(),r.loop&&Vn(w,{select:!0})):p===h&&c.preventDefault()}}return(c,d)=>($(),U(f(We),{ref_key:"currentRef",ref:s,tabindex:"-1","as-child":c.asChild,as:c.as,onKeydown:u},{default:I(()=>[ne(c.$slots,"default")]),_:3},8,["as-child","as"]))}}),Th=["Enter"," "],t1=["ArrowDown","PageUp","Home"],r1=["ArrowUp","PageDown","End"],_T=[...t1,...r1],ST={ltr:[...Th,"ArrowRight"],rtl:[...Th,"ArrowLeft"]};function n1(e){return e?"open":"closed"}function Eh(e){const t=or();for(const r of e)if(r===t||(r.focus(),or()!==t))return}var Ah=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=Fn(),{forwardRef:i,currentElement:o}=Pe();return s.titleId||(s.titleId=Vs(void 0,"reka-dialog-title")),s.descriptionId||(s.descriptionId=Vs(void 0,"reka-dialog-description")),tt(()=>{s.contentElement=o,or()!==document.body&&(s.triggerElement.value=or())}),(a,l)=>($(),U(f(xh),{"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:I(()=>[O(f(_c),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(n1)(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:I(()=>[ne(a.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),s1=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=Fn(),i=ua(n),{forwardRef:o,currentElement:a}=Pe();return vh(a),(l,u)=>($(),U(Ah,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:I(()=>[ne(l.$slots,"default")]),_:3},16,["trap-focus"]))}}),i1=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=ua(t);Pe();const s=Fn(),i=F(!1),o=F(!1);return(a,l)=>($(),U(Ah,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:I(()=>[ne(a.$slots,"default")]),_:3},16))}}),o1=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=Fn(),i=ua(n),{forwardRef:o}=Pe();return(a,l)=>($(),U(f(Ln),{present:a.forceMount||f(s).open.value},{default:I(()=>[f(s).modal.value?($(),U(s1,we({key:0,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:I(()=>[ne(a.$slots,"default")]),_:3},16)):($(),U(i1,we({key:1,ref:f(o)},{...r,...f(i),...a.$attrs}),{default:I(()=>[ne(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),a1=X({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Fn();return fh(!0),Pe(),(r,n)=>($(),U(f(We),{as:r.as,"as-child":r.asChild,"data-state":f(t).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:I(()=>[ne(r.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),l1=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=Fn(),{forwardRef:r}=Pe();return(n,s)=>f(t)?.modal.value?($(),U(f(Ln),{key:0,present:n.forceMount||f(t).open.value},{default:I(()=>[O(a1,we(n.$attrs,{ref:f(r),as:n.as,"as-child":n.asChild}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):Be("v-if",!0)}}),xc=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=uc();return(r,n)=>f(t)||r.forceMount?($(),U(el,{key:0,to:r.to,disabled:r.disabled,defer:r.defer},[ne(r.$slots,"default")],8,["to","disabled","defer"])):Be("v-if",!0)}}),c1=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)=>($(),U(f(xc),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),u1=X({__name:"DialogTitle",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"h2"}},setup(e){const t=e,r=Fn();return Pe(),(n,s)=>($(),U(f(We),we(t,{id:f(r).titleId}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["id"]))}}),kh="data-reka-collection-item";function gn(e={}){const{key:t="",isProvider:r=!1}=e,n=`${t}CollectionProvider`;let s;r?(s={collectionRef:F(),itemMap:F(new Map)},Xn(n,s)):s=Ft(n);const i=(l=!1)=>{const u=s.collectionRef.value;if(!u)return[];const c=Array.from(u.querySelectorAll(`[${kh}]`)),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}=bc();return Me(p,()=>{s.collectionRef.value=p.value}),()=>mr(yc,{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}=bc();return ct(h=>{if(p.value){const m=Ga(p.value);s.itemMap.value.set(m,{ref:p.value,value:l.value}),h(()=>s.itemMap.value.delete(m))}}),()=>mr(yc,{...c,[kh]:"",ref:d},u)}});return{getItems:i,reactiveItems:V(()=>Array.from(s.itemMap.value.values())),itemMapSize:V(()=>s.itemMap.value.size),CollectionSlot:o,CollectionItem:a}}var Tc=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)=>($(),U(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:I(()=>[ne(t.$slots,"default")]),_:3},8,["as","as-child","aria-hidden","data-hidden","tabindex"]))}}),Ih=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}=bc();return Me(V(()=>t.checked??t.value),(s,i)=>{if(!n.value)return;const o=n.value,a=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(a,"value").set;if(l&&s!==i){const u=new Event("input",{bubbles:!0}),c=new Event("change",{bubbles:!0});l.call(o,s),o.dispatchEvent(u),o.dispatchEvent(c)}}),(s,i)=>($(),U(Tc,we({ref_key:"primitiveElement",ref:r},{...t,...s.$attrs},{as:"input"}),null,16))}}),Rh=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=V(()=>typeof t.value=="object"&&Array.isArray(t.value)&&t.value.length===0&&t.required),n=V(()=>typeof t.value=="string"||typeof t.value=="number"||typeof t.value=="boolean"||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value=="object"&&Array.isArray(t.value)?t.value.flatMap((s,i)=>typeof s=="object"?Object.entries(s).map(([o,a])=>({name:`${t.name}[${i}][${o}]`,value:a})):{name:`${t.name}[${i}]`,value:s}):t.value!==null&&typeof t.value=="object"&&!Array.isArray(t.value)?Object.entries(t.value).map(([s,i])=>({name:`${t.name}[${s}]`,value:i})):[]);return(s,i)=>($(),Se(Ke,null,[Be(" We render single input if it's required "),r.value?($(),U(Ih,we({key:s.name},{...t,...s.$attrs},{name:s.name,value:s.value}),null,16,["name","value"])):($(!0),Se(Ke,{key:1},vr(n.value,o=>($(),U(Ih,we({key:o.name},{ref_for:!0},{...t,...s.$attrs},{name:o.name,value:o.value}),null,16,["name","value"]))),128))],2112))}}),[$h,d1]=Pt("PopperRoot"),Ph=X({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=F();return d1({anchor:t,onAnchorChange:r=>t.value=r}),(r,n)=>ne(r.$slots,"default")}}),Dh=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}=Pe(),s=$h();return Xa(()=>{s.onAnchorChange(t.reference??n.value)}),(i,o)=>($(),U(f(We),{ref:f(r),as:i.as,"as-child":i.asChild},{default:I(()=>[ne(i.$slots,"default")]),_:3},8,["as","as-child"]))}}),f1={key:0,d:"M0 0L6 6L12 0"},p1={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"},h1=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 Pe(),(r,n)=>($(),U(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:I(()=>[ne(r.$slots,"default",{},()=>[r.rounded?($(),Se("path",p1)):($(),Se("path",f1))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}});function g1(e){return e!==null}function v1(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]=Ec(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 Ec(e){const[t,r="center"]=e.split("-");return[t,r]}var m1=["top","right","bottom","left"],jn=Math.min,ar=Math.max,ha=Math.round,ga=Math.floor,zr=e=>({x:e,y:e}),w1={left:"right",right:"left",bottom:"top",top:"bottom"};function Ac(e,t,r){return ar(e,jn(t,r))}function vn(e,t){return typeof e=="function"?e(t):e}function mn(e){return e.split("-")[0]}function js(e){return e.split("-")[1]}function kc(e){return e==="x"?"y":"x"}function Ic(e){return e==="y"?"height":"width"}function Kr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Rc(e){return kc(Kr(e))}function y1(e,t,r){r===void 0&&(r=!1);const n=js(e),s=Rc(e),i=Ic(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=va(o)),[o,va(o)]}function b1(e){const t=va(e);return[$c(e),t,$c(t)]}function $c(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Oh=["left","right"],Hh=["right","left"],_1=["top","bottom"],S1=["bottom","top"];function C1(e,t,r){switch(e){case"top":case"bottom":return r?t?Hh:Oh:t?Oh:Hh;case"left":case"right":return t?_1:S1;default:return[]}}function x1(e,t,r,n){const s=js(e);let i=C1(mn(e),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map($c)))),i}function va(e){const t=mn(e);return w1[t]+e.slice(t.length)}function T1(e){return{top:0,right:0,bottom:0,left:0,...e}}function Mh(e){return typeof e!="number"?T1(e):{top:e,right:e,bottom:e,left:e}}function ma(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 Nh(e,t,r){let{reference:n,floating:s}=e;const i=Kr(t),o=Rc(t),a=Ic(o),l=mn(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(js(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 E1(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}=vn(t,e),m=Mh(h),w=a[p?d==="floating"?"reference":"floating":d],x=ma(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,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},y=ma(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:S,strategy:l}):g);return{top:(x.top-y.top+m.top)/b.y,bottom:(y.bottom-x.bottom+m.bottom)/b.y,left:(x.left-y.left+m.left)/b.x,right:(y.right-x.right+m.right)/b.x}}var A1=50,k1=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}=r,a=o.detectOverflow?o:{...o,detectOverflow:E1},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}=Nh(u,n,l),p=n,h=0;const m={};for(let w=0;w<i.length;w++){const x=i[w];if(!x)continue;const{name:g,fn:S}=x,{x:b,y,data:T,reset:k}=await S({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=y??d,m[g]={...m[g],...T},k&&h<A1&&(h++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:c,y:d}=Nh(u,p,l)),w=-1)}return{x:c,y:d,placement:p,strategy:s,middlewareData:m}},I1=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}=vn(e,t)||{};if(u==null)return{};const d=Mh(c),p={x:r,y:n},h=Rc(s),m=Ic(h),w=await o.getDimensions(u),x=h==="y",g=x?"top":"left",S=x?"bottom":"right",b=x?"clientHeight":"clientWidth",y=i.reference[m]+i.reference[h]-p[h]-i.floating[m],T=p[h]-i.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let N=k?k[b]:0;(!N||!await(o.isElement==null?void 0:o.isElement(k)))&&(N=a.floating[b]||i.floating[m]);const v=y/2-T/2,B=N/2-w[m]/2-1,q=jn(d[g],B),C=jn(d[S],B),_=q,E=N-w[m]-C,P=N/2-w[m]/2+v,R=Ac(_,P,E),D=!l.arrow&&js(s)!=null&&P!==R&&i.reference[m]/2-(P<_?q:C)-w[m]/2<0,G=D?P<_?P-_:P-E:0;return{[h]:p[h]+G,data:{[h]:R,centerOffset:P-R-G,...D&&{alignmentOffset:G}},reset:D}}}),R1=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:w=!0,...x}=vn(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const g=mn(s),S=Kr(a),b=mn(a)===a,y=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=p||(b||!w?[va(a)]:b1(a)),k=m!=="none";!p&&k&&T.push(...x1(a,w,m,y));const N=[a,...T],v=await l.detectOverflow(t,x),B=[];let q=((n=i.flip)==null?void 0:n.overflows)||[];if(c&&B.push(v[g]),d){const P=y1(s,o,y);B.push(v[P[0]],v[P[1]])}if(q=[...q,{placement:s,overflows:B}],!B.every(P=>P<=0)){var C,_;const P=(((C=i.flip)==null?void 0:C.index)||0)+1,R=N[P];if(R&&(!(d==="alignment"&&S!==Kr(R))||q.every(G=>Kr(G.placement)===S?G.overflows[0]>0:!0)))return{data:{index:P,overflows:q},reset:{placement:R}};let D=(_=q.filter(G=>G.overflows[0]<=0).sort((G,W)=>G.overflows[1]-W.overflows[1])[0])==null?void 0:_.placement;if(!D)switch(h){case"bestFit":{var E;const G=(E=q.filter(W=>{if(k){const ae=Kr(W.placement);return ae===S||ae==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(ae=>ae>0).reduce((ae,Y)=>ae+Y,0)]).sort((W,ae)=>W[1]-ae[1])[0])==null?void 0:E[0];G&&(D=G);break}case"initialPlacement":D=a;break}if(s!==D)return{reset:{placement:D}}}return{}}}};function qh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Bh(e){return m1.some(t=>e[t]>=0)}var $1=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:s="referenceHidden",...i}=vn(e,t);switch(s){case"referenceHidden":{const o=qh(await n.detectOverflow(t,{...i,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Bh(o)}}}case"escaped":{const o=qh(await n.detectOverflow(t,{...i,altBoundary:!0}),r.floating);return{data:{escapedOffsets:o,escaped:Bh(o)}}}default:return{}}}}},Lh=new Set(["left","top"]);async function P1(e,t){const{placement:r,platform:n,elements:s}=e,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=mn(r),a=js(r),l=Kr(r)==="y",u=Lh.has(o)?-1:1,c=i&&l?-1:1,d=vn(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 D1=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 P1(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}}}}},O1=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:S,y:b}=g;return{x:S,y:b}}},...u}=vn(e,t),c={x:r,y:n},d=await i.detectOverflow(t,u),p=Kr(mn(s)),h=kc(p);let m=c[h],w=c[p];if(o){const g=h==="y"?"top":"left",S=h==="y"?"bottom":"right",b=m+d[g],y=m-d[S];m=Ac(b,m,y)}if(a){const g=p==="y"?"top":"left",S=p==="y"?"bottom":"right",b=w+d[g],y=w-d[S];w=Ac(b,w,y)}const x=l.fn({...t,[h]:m,[p]:w});return{...x,data:{x:x.x-r,y:x.y-n,enabled:{[h]:o,[p]:a}}}}}},H1=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}=vn(e,t),c={x:r,y:n},d=Kr(s),p=kc(d);let h=c[p],m=c[d];const w=vn(a,t),x=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(l){const b=p==="y"?"height":"width",y=i.reference[p]-i.floating[b]+x.mainAxis,T=i.reference[p]+i.reference[b]-x.mainAxis;h<y?h=y:h>T&&(h=T)}if(u){var g,S;const b=p==="y"?"width":"height",y=Lh.has(mn(s)),T=i.reference[d]-i.floating[b]+(y&&((g=o.offset)==null?void 0:g[d])||0)+(y?0:x.crossAxis),k=i.reference[d]+i.reference[b]+(y?0:((S=o.offset)==null?void 0:S[d])||0)-(y?x.crossAxis:0);m<T?m=T:m>k&&(m=k)}return{[p]:h,[d]:m}}}},M1=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}=vn(e,t),c=await o.detectOverflow(t,u),d=mn(s),p=js(s),h=Kr(s)==="y",{width:m,height:w}=i.floating;let x,g;d==="top"||d==="bottom"?(x=d,g=p===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,x=p==="end"?"top":"bottom");const S=w-c.top-c.bottom,b=m-c.left-c.right,y=jn(w-c[x],S),T=jn(m-c[g],b),k=!t.middlewareData.shift;let N=y,v=T;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(v=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=S),k&&!p){const q=ar(c.left,0),C=ar(c.right,0),_=ar(c.top,0),E=ar(c.bottom,0);h?v=m-2*(q!==0||C!==0?q+C:ar(c.left,c.right)):N=w-2*(_!==0||E!==0?_+E:ar(c.top,c.bottom))}await l({...t,availableWidth:v,availableHeight:N});const B=await o.getDimensions(a.floating);return m!==B.width||w!==B.height?{reset:{rects:!0}}:{}}}};function wa(){return typeof window<"u"}function fs(e){return Pc(e)?(e.nodeName||"").toLowerCase():"#document"}function lr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wr(e){var t;return(t=(Pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Pc(e){return wa()?e instanceof Node||e instanceof lr(e).Node:!1}function Or(e){return wa()?e instanceof Element||e instanceof lr(e).Element:!1}function wn(e){return wa()?e instanceof HTMLElement||e instanceof lr(e).HTMLElement:!1}function Fh(e){return!wa()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof lr(e).ShadowRoot}function Bi(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=Hr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&s!=="inline"&&s!=="contents"}function N1(e){return/^(table|td|th)$/.test(fs(e))}function ya(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var q1=/transform|translate|scale|rotate|perspective|filter/,B1=/paint|layout|strict|content/,ps=e=>!!e&&e!=="none",Dc;function Oc(e){const t=Or(e)?Hr(e):e;return ps(t.transform)||ps(t.translate)||ps(t.scale)||ps(t.rotate)||ps(t.perspective)||!Hc()&&(ps(t.backdropFilter)||ps(t.filter))||q1.test(t.willChange||"")||B1.test(t.contain||"")}function L1(e){let t=Un(e);for(;wn(t)&&!Us(t);){if(Oc(t))return t;if(ya(t))return null;t=Un(t)}return null}function Hc(){return Dc==null&&(Dc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dc}function Us(e){return/^(html|body|#document)$/.test(fs(e))}function Hr(e){return lr(e).getComputedStyle(e)}function ba(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if(fs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Fh(e)&&e.host||Wr(e);return Fh(t)?t.host:t}function Vh(e){const t=Un(e);return Us(t)?e.ownerDocument?e.ownerDocument.body:e.body:wn(t)&&Bi(t)?t:Vh(t)}function Li(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Vh(e),i=s===((n=e.ownerDocument)==null?void 0:n.body),o=lr(s);if(i){const a=Mc(o);return t.concat(o,o.visualViewport||[],Bi(s)?s:[],a&&r?Li(a):[])}else return t.concat(s,Li(s,[],r))}function Mc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jh(e){const t=Hr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=wn(e),i=s?e.offsetWidth:r,o=s?e.offsetHeight:n,a=ha(r)!==i||ha(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Nc(e){return Or(e)?e:e.contextElement}function zs(e){const t=Nc(e);if(!wn(t))return zr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:i}=jh(t);let o=(i?ha(r.width):r.width)/n,a=(i?ha(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}var F1=zr(0);function Uh(e){const t=lr(e);return!Hc()||!t.visualViewport?F1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function V1(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==lr(e)?!1:t}function hs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),i=Nc(e);let o=zr(1);t&&(n?Or(n)&&(o=zs(n)):o=zs(e));const a=V1(i,r,n)?Uh(i):zr(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=lr(i),h=n&&Or(n)?lr(n):n;let m=p,w=Mc(m);for(;w&&n&&h!==m;){const x=zs(w),g=w.getBoundingClientRect(),S=Hr(w),b=g.left+(w.clientLeft+parseFloat(S.paddingLeft))*x.x,y=g.top+(w.clientTop+parseFloat(S.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=b,u+=y,m=lr(w),w=Mc(m)}}return ma({width:c,height:d,x:l,y:u})}function _a(e,t){const r=ba(e).scrollLeft;return t?t.left+r:hs(Wr(e)).left+r}function zh(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-_a(e,r),y:r.top+t.scrollTop}}function j1(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const i=s==="fixed",o=Wr(n),a=t?ya(t.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},u=zr(1);const c=zr(0),d=wn(n);if((d||!d&&!i)&&((fs(n)!=="body"||Bi(o))&&(l=ba(n)),d)){const h=hs(n);u=zs(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const p=o&&!d&&!i?zh(o,l):zr(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 U1(e){return Array.from(e.getClientRects())}function z1(e){const t=Wr(e),r=ba(e),n=e.ownerDocument.body,s=ar(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ar(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+_a(e);const a=-r.scrollTop;return Hr(n).direction==="rtl"&&(o+=ar(t.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}var Kh=25;function K1(e,t){const r=lr(e),n=Wr(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=Hc();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const u=_a(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<=Kh&&(i-=m)}else u<=Kh&&(i+=u);return{width:i,height:o,x:a,y:l}}function W1(e,t){const r=hs(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,i=wn(e)?zs(e):zr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:s*i.x,y:n*i.y}}function Wh(e,t,r){let n;if(t==="viewport")n=K1(e,r);else if(t==="document")n=z1(Wr(e));else if(Or(t))n=W1(t,r);else{const s=Uh(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ma(n)}function Gh(e,t){const r=Un(e);return r===t||!Or(r)||Us(r)?!1:Hr(r).position==="fixed"||Gh(r,t)}function G1(e,t){const r=t.get(e);if(r)return r;let n=Li(e,[],!1).filter(a=>Or(a)&&fs(a)!=="body"),s=null;const i=Hr(e).position==="fixed";let o=i?Un(e):e;for(;Or(o)&&!Us(o);){const a=Hr(o),l=Oc(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&s&&(s.position==="absolute"||s.position==="fixed")||Bi(o)&&!l&&Gh(e,o))?n=n.filter(u=>u!==o):s=a,o=Un(o)}return t.set(e,n),n}function J1(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?ya(t)?[]:G1(t,this._c):[].concat(r),n],o=Wh(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=Wh(t,i[d],s);a=ar(p.top,a),l=jn(p.right,l),u=jn(p.bottom,u),c=ar(p.left,c)}return{width:l-c,height:u-a,x:c,y:a}}function Y1(e){const{width:t,height:r}=jh(e);return{width:t,height:r}}function Z1(e,t,r){const n=wn(t),s=Wr(t),i=r==="fixed",o=hs(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=zr(0);function u(){l.x=_a(s)}if(n||!n&&!i)if((fs(t)!=="body"||Bi(s))&&(a=ba(t)),n){const d=hs(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?zh(s,a):zr(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 qc(e){return Hr(e).position==="static"}function Jh(e,t){if(!wn(e)||Hr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Wr(e)===r&&(r=r.ownerDocument.body),r}function Yh(e,t){const r=lr(e);if(ya(e))return r;if(!wn(e)){let s=Un(e);for(;s&&!Us(s);){if(Or(s)&&!qc(s))return s;s=Un(s)}return r}let n=Jh(e,t);for(;n&&N1(n)&&qc(n);)n=Jh(n,t);return n&&Us(n)&&qc(n)&&!Oc(n)?r:n||L1(e)||r}var X1=async function(e){const t=this.getOffsetParent||Yh,r=this.getDimensions,n=await r(e.floating);return{reference:Z1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Q1(e){return Hr(e).direction==="rtl"}var e2={convertOffsetParentRelativeRectToViewportRelativeRect:j1,getDocumentElement:Wr,getClippingRect:J1,getOffsetParent:Yh,getElementRects:X1,getClientRects:U1,getDimensions:Y1,getScale:zs,isElement:Or,isRTL:Q1};function Zh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function t2(e,t){let r=null,n;const s=Wr(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=ga(d),w=ga(s.clientWidth-(c+p)),x=ga(s.clientHeight-(d+h)),g=ga(c),S={rootMargin:-m+"px "+-w+"px "+-x+"px "+-g+"px",threshold:ar(0,jn(1,l))||1};let b=!0;function y(T){const k=T[0].intersectionRatio;if(k!==l){if(!b)return o();k?o(!1,k):n=setTimeout(()=>{o(!1,1e-7)},1e3)}k===1&&!Zh(u,e.getBoundingClientRect())&&o(),b=!1}try{r=new IntersectionObserver(y,{...S,root:s.ownerDocument})}catch{r=new IntersectionObserver(y,S)}r.observe(e)}return o(!0),i}function r2(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=Nc(e),c=s||i?[...u?Li(u):[],...t?Li(t):[]]:[];c.forEach(g=>{s&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=u&&a?t2(u,r):null;let p=-1,h=null;o&&(h=new ResizeObserver(g=>{let[S]=g;S&&S.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,w=l?hs(e):null;l&&x();function x(){const g=hs(e);w&&!Zh(w,g)&&r(),w=g,m=requestAnimationFrame(x)}return r(),()=>{var g;c.forEach(S=>{s&&S.removeEventListener("scroll",r),i&&S.removeEventListener("resize",r)}),d?.(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(m)}}var n2=D1,s2=O1,Xh=R1,i2=M1,o2=$1,a2=I1,l2=H1,c2=(e,t,r)=>{const n=new Map,s={platform:e2,...r},i={...s.platform,_c:n};return k1(e,t,{...s,platform:i})};function u2(e){return e!=null&&typeof e=="object"&&"$el"in e}function Bc(e){if(u2(e)){const t=e.$el;return Pc(t)&&fs(t)==="#comment"?null:t}return e}function Ks(e){return typeof e=="function"?e():f(e)}function d2(e){return{name:"arrow",options:e,fn(t){const r=Bc(Ks(e.element));return r==null?{}:a2({element:r,padding:e.padding}).fn(t)}}}function Qh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eg(e,t){const r=Qh(e);return Math.round(t*r)/r}function f2(e,t,r){r===void 0&&(r={});const n=r.whileElementsMounted,s=V(()=>{var N;return(N=Ks(r.open))!=null?N:!0}),i=V(()=>Ks(r.middleware)),o=V(()=>{var N;return(N=Ks(r.placement))!=null?N:"bottom"}),a=V(()=>{var N;return(N=Ks(r.strategy))!=null?N:"absolute"}),l=V(()=>{var N;return(N=Ks(r.transform))!=null?N:!0}),u=V(()=>Bc(e.value)),c=V(()=>Bc(t.value)),d=F(0),p=F(0),h=F(a.value),m=F(o.value),w=ft({}),x=F(!1),g=V(()=>{const N={position:h.value,left:"0",top:"0"};if(!c.value)return N;const v=eg(c.value,d.value),B=eg(c.value,p.value);return l.value?{...N,transform:"translate("+v+"px, "+B+"px)",...Qh(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:v+"px",top:B+"px"}});let S;function b(){if(u.value==null||c.value==null)return;const N=s.value;c2(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,x.value=N!==!1})}function y(){typeof S=="function"&&(S(),S=void 0)}function T(){if(y(),n===void 0){b();return}if(u.value!=null&&c.value!=null){S=n(u.value,c.value,b);return}}function k(){s.value||(x.value=!1)}return Me([i,o,a,s],b,{flush:"sync"}),Me([u,c],T,{flush:"sync"}),Me(s,k,{flush:"sync"}),ro()&&qa(y),{x:en(d),y:en(p),strategy:en(h),placement:en(m),middlewareData:en(w),isPositioned:en(x),floatingStyles:g,update:b}}var p2={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},[h2,g2]=Pt("PopperContent"),tg=X({inheritAttrs:!1,__name:"PopperContent",props:kd({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}},{...p2}),emits:["placed"],setup(e,{emit:t}){const r=e,n=t,s=$h(),{forwardRef:i,currentElement:o}=Pe(),a=F(),l=F(),{width:u,height:c}=mh(l),d=V(()=>r.side+(r.align!=="center"?`-${r.align}`:"")),p=V(()=>typeof r.collisionPadding=="number"?r.collisionPadding:{top:0,right:0,bottom:0,left:0,...r.collisionPadding}),h=V(()=>Array.isArray(r.collisionBoundary)?r.collisionBoundary:[r.collisionBoundary]),m=V(()=>({padding:p.value,boundary:h.value.filter(g1),altBoundary:h.value.length>0})),w=V(()=>({mainAxis:r.sideFlip,crossAxis:r.alignFlip})),x=Vy(()=>[n2({mainAxis:r.sideOffset+c.value,alignmentAxis:r.alignOffset}),r.prioritizePosition&&r.avoidCollisions&&Xh({...m.value,...w.value}),r.avoidCollisions&&s2({mainAxis:!0,crossAxis:!!r.prioritizePosition,limiter:r.sticky==="partial"?l2():void 0,...m.value}),!r.prioritizePosition&&r.avoidCollisions&&Xh({...m.value,...w.value}),i2({...m.value,apply:({elements:q,rects:C,availableWidth:_,availableHeight:E})=>{const{width:P,height:R}=C.reference,D=q.floating.style;D.setProperty("--reka-popper-available-width",`${_}px`),D.setProperty("--reka-popper-available-height",`${E}px`),D.setProperty("--reka-popper-anchor-width",`${P}px`),D.setProperty("--reka-popper-anchor-height",`${R}px`)}}),l.value&&d2({element:l.value,padding:r.arrowPadding}),v1({arrowWidth:u.value,arrowHeight:c.value}),r.hideWhenDetached&&o2({strategy:"referenceHidden",...m.value})]),{floatingStyles:g,placement:S,isPositioned:b,middlewareData:y,update:T}=f2(V(()=>r.reference??s.anchor.value),a,{strategy:r.positionStrategy,placement:d,whileElementsMounted:(...q)=>r2(...q,{layoutShift:!r.disableUpdateOnLayoutShift,animationFrame:r.updatePositionStrategy==="always"}),middleware:x}),k=V(()=>Ec(S.value)[0]),N=V(()=>Ec(S.value)[1]);Xa(()=>{b.value&&n("placed")});const v=V(()=>{const q=y.value.arrow?.centerOffset!==0;return r.hideShiftedArrow&&q}),B=F("");return ct(()=>{o.value&&(B.value=window.getComputedStyle(o.value).zIndex)}),g2({placedSide:k,onArrowChange:q=>l.value=q,arrowX:V(()=>y.value.arrow?.x??0),arrowY:V(()=>y.value.arrow?.y??0),shouldHideArrow:v}),(q,C)=>($(),Se("div",{ref_key:"floatingRef",ref:a,"data-reka-popper-content-wrapper":"",style:St({...f(g),transform:f(b)?f(g).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:B.value,"--reka-popper-transform-origin":[f(y).transformOrigin?.x,f(y).transformOrigin?.y].join(" "),...f(y).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[O(f(We),we({ref:f(i)},q.$attrs,{"as-child":r.asChild,as:q.as,"data-side":k.value,"data-align":N.value,style:{animation:f(b)?void 0:"none"}}),{default:I(()=>[ne(q.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),v2={top:"bottom",right:"left",bottom:"top",left:"right"},m2=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}=Pe(),r=h2(),n=V(()=>v2[r.placedSide.value]);return(s,i)=>($(),Se("span",{ref:o=>{f(r).onArrowChange(o)},style:St({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})},[O(h1,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:I(()=>[ne(s.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}});function rg(e){const t=oa({nonce:F()});return V(()=>e?.value||t.nonce?.value)}function w2(e=[],t,r){const n=[...e];return n[r]=t,n.sort((s,i)=>s-i)}function ng(e,t,r){return qi(100/(r-t)*(e-t),0,100)}function y2(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function b2(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 _2(e,t,r){const n=e/2;return(n-Lc([0,50],[0,n])(t)*r)*r}function S2(e){return e.slice(0,-1).map((t,r)=>e[r+1]-t)}function C2(e,t){if(t>0){const r=S2(e);return Math.min(...r)>=t}return!0}function Lc(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 x2(e){return(String(e).split(".")[1]||"").length}function T2(e,t){const r=10**t;return Math.round(e*r)/r}var sg=["PageUp","PageDown"],ig=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],og={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageUp","ArrowUp","ArrowLeft"]},[ag,lg]=Pt(["SliderVertical","SliderHorizontal"]),E2=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}=Mt(r),{forwardRef:l,currentElement:u}=Pe(),c=Ws(),d=F(),p=F(),h=V(()=>o?.value!=="rtl"&&!a.value||o?.value!=="ltr"&&a.value);function m(w,x){const g=p.value||u.value.getBoundingClientRect(),S=[...c.thumbElements.value][c.valueIndexToChangeRef.value],b=c.thumbAlignment.value==="contain"?S.clientWidth:0;!d.value&&!x&&c.thumbAlignment.value==="contain"&&(d.value=w.clientX-S.getBoundingClientRect().left);const y=Lc([0,g.width-b],h.value?[i.value,s.value]:[s.value,i.value]);return p.value=g,y(x?w.clientX-g.left-b/2:w.clientX-g.left-(d.value??0))}return lg({startEdge:V(()=>h.value?"left":"right"),endEdge:V(()=>h.value?"right":"left"),direction:V(()=>h.value?1:-1),size:"width"}),(w,x)=>($(),U(cg,{ref:f(l),dir:f(o),"data-orientation":"horizontal",style:St({"--reka-slider-thumb-transform":!h.value&&f(c).thumbAlignment.value==="overflow"?"translateX(50%)":"translateX(-50%)"}),onSlideStart:x[0]||(x[0]=g=>{n("slideStart",m(g,!0))}),onSlideMove:x[1]||(x[1]=g=>{n("slideMove",m(g))}),onSlideEnd:x[2]||(x[2]=()=>{p.value=void 0,d.value=void 0,n("slideEnd")}),onStepKeyDown:x[3]||(x[3]=g=>{const S=h.value?"from-left":"from-right";n("stepKeyDown",g,f(og)[S].includes(g.key)?-1:1)}),onEndKeyDown:x[4]||(x[4]=g=>n("endKeyDown",g)),onHomeKeyDown:x[5]||(x[5]=g=>n("homeKeyDown",g))},{default:I(()=>[ne(w.$slots,"default")]),_:3},8,["dir","style"]))}}),A2=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}=Mt(r),a=Ws(),{forwardRef:l,currentElement:u}=Pe(),c=F(),d=F(),p=V(()=>!o.value);function h(m,w){const x=d.value||u.value.getBoundingClientRect(),g=[...a.thumbElements.value][a.valueIndexToChangeRef.value],S=a.thumbAlignment.value==="contain"?g.clientHeight:0;!c.value&&!w&&a.thumbAlignment.value==="contain"&&(c.value=m.clientY-g.getBoundingClientRect().top);const b=Lc([0,x.height-S],p.value?[s.value,i.value]:[i.value,s.value]),y=w?m.clientY-x.top-S/2:m.clientY-x.top-(c.value??0);return d.value=x,b(y)}return lg({startEdge:V(()=>p.value?"bottom":"top"),endEdge:V(()=>p.value?"top":"bottom"),direction:V(()=>p.value?1:-1),size:"height"}),(m,w)=>($(),U(cg,{ref:f(l),"data-orientation":"vertical",style:St({"--reka-slider-thumb-transform":!p.value&&f(a).thumbAlignment.value==="overflow"?"translateY(-50%)":"translateY(50%)"}),onSlideStart:w[0]||(w[0]=x=>{n("slideStart",h(x,!0))}),onSlideMove:w[1]||(w[1]=x=>{n("slideMove",h(x))}),onSlideEnd:w[2]||(w[2]=()=>{d.value=void 0,c.value=void 0,n("slideEnd")}),onStepKeyDown:w[3]||(w[3]=x=>{const g=p.value?"from-bottom":"from-top";n("stepKeyDown",x,f(og)[g].includes(x.key)?-1:1)}),onEndKeyDown:w[4]||(w[4]=x=>n("endKeyDown",x)),onHomeKeyDown:w[5]||(w[5]=x=>n("homeKeyDown",x))},{default:I(()=>[ne(m.$slots,"default")]),_:3},8,["style"]))}}),[Ws,k2]=Pt("SliderRoot"),I2=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}=Mt(r),p=hc(d),{forwardRef:h,currentElement:m}=Pe(),w=vc(m),{CollectionSlot:x}=gn({isProvider:!0}),g=ds(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),S=V(()=>Array.isArray(g.value)?[...g.value]:[]),b=F(0),y=F(S.value);function T(q){v(q,b2(S.value,q))}function k(q){v(q,b.value)}function N(){const q=y.value[b.value];S.value[b.value]!==q&&n("valueCommit",ze(S.value))}function v(q,C,{commit:_}={commit:!1}){const E=x2(o.value),P=qi(T2(Math.round((q-s.value)/o.value)*o.value+s.value,E),s.value,i.value),R=w2(S.value,P,C);if(C2(R,a.value*o.value)){b.value=R.indexOf(P);const D=String(R)!==String(g.value);D&&_&&n("valueCommit",R),D&&(B.value[b.value]?.focus(),g.value=R)}}const B=F([]);return k2({modelValue:g,currentModelValue:S,valueIndexToChangeRef:b,thumbElements:B,orientation:l,min:s,max:i,disabled:u,thumbAlignment:c}),(q,C)=>($(),U(f(x),null,{default:I(()=>[($(),U(wi(f(l)==="horizontal"?E2:A2),we(q.$attrs,{ref:f(h),"as-child":q.asChild,as:q.as,min:f(s),max:f(i),dir:f(p),inverted:q.inverted,"aria-disabled":f(u),"data-disabled":f(u)?"":void 0,onPointerdown:C[0]||(C[0]=()=>{f(u)||(y.value=S.value)}),onSlideStart:C[1]||(C[1]=_=>!f(u)&&T(_)),onSlideMove:C[2]||(C[2]=_=>!f(u)&&k(_)),onSlideEnd:C[3]||(C[3]=_=>!f(u)&&N()),onHomeKeyDown:C[4]||(C[4]=_=>!f(u)&&v(f(s),0,{commit:!0})),onEndKeyDown:C[5]||(C[5]=_=>!f(u)&&v(f(i),S.value.length-1,{commit:!0})),onStepKeyDown:C[6]||(C[6]=(_,E)=>{if(!f(u)){const P=f(sg).includes(_.key)||_.shiftKey&&f(ig).includes(_.key)?10:1,R=b.value,D=S.value[R];v(D+f(o)*P*E,R,{commit:!0})}})}),{default:I(()=>[ne(q.$slots,"default",{modelValue:f(g)}),f(w)&&q.name?($(),U(f(Rh),{key:0,type:"number",value:f(g),name:q.name,required:q.required,disabled:f(u),step:f(o)},null,8,["value","name","required","disabled","step"])):Be("v-if",!0)]),_:3},16,["as-child","as","min","max","dir","inverted","aria-disabled","data-disabled"]))]),_:3}))}}),cg=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=Ws();return(i,o)=>($(),U(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(sg).concat(f(ig)).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:I(()=>[ne(i.$slots,"default")]),_:3},16))}}),R2=X({__name:"SliderRange",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Ws(),r=ag();Pe();const n=V(()=>t.currentModelValue.value.map(o=>ng(o,t.min.value,t.max.value))),s=V(()=>t.currentModelValue.value.length>1?Math.min(...n.value):0),i=V(()=>100-Math.max(...n.value,0));return(o,a)=>($(),U(f(We),{"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value,"as-child":o.asChild,as:o.as,style:St({[f(r).startEdge.value]:`${s.value}%`,[f(r).endEdge.value]:`${i.value}%`})},{default:I(()=>[ne(o.$slots,"default")]),_:3},8,["data-disabled","data-orientation","as-child","as","style"]))}}),$2=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=Ws(),n=ag(),{forwardRef:s,currentElement:i}=Pe(),{CollectionItem:o}=gn(),a=V(()=>r.modelValue?.value?.[t.index]),l=V(()=>a.value===void 0?0:ng(a.value,r.min.value??0,r.max.value??100)),u=V(()=>y2(t.index,r.modelValue?.value?.length??0)),c=mh(i),d=V(()=>c[n.size].value),p=V(()=>r.thumbAlignment.value==="overflow"||!d.value?0:_2(d.value,l.value,n.direction.value)),h=uc();return tt(()=>{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)=>($(),U(f(o),null,{default:I(()=>[O(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:I(()=>[ne(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}))}}),P2=X({__name:"SliderThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,{getItems:r}=gn(),{forwardRef:n,currentElement:s}=Pe(),i=V(()=>s.value?r(!0).findIndex(o=>o.ref===s.value):-1);return(o,a)=>($(),U($2,we({ref:f(n)},t,{index:i.value}),{default:I(()=>[ne(o.$slots,"default")]),_:3},16,["index"]))}}),D2=X({__name:"SliderTrack",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=Ws();return Pe(),(r,n)=>($(),U(f(We),{"as-child":r.asChild,as:r.as,"data-disabled":f(t).disabled.value?"":void 0,"data-orientation":f(t).orientation.value},{default:I(()=>[ne(r.$slots,"default")]),_:3},8,["as-child","as","data-disabled","data-orientation"]))}}),O2=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 Pe(),(r,n)=>($(),U(f(We),we(t,{onMousedown:n[0]||(n[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),[cr,H2]=Pt("ScrollAreaRoot"),M2=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}=Mt(r),m=hc(p);function w(){i.value?.scrollTo({top:0})}function x(){i.value?.scrollTo({top:0,left:0})}t({viewport:i,scrollTop:w,scrollTopLeft:x});const{forwardRef:g,currentElement:S}=Pe();return H2({type:d,dir:m,scrollHideDelay:h,scrollArea:S,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,y)=>($(),U(f(We),{ref:f(g),"as-child":r.asChild,as:b.as,dir:f(m),style:St({position:"relative","--reka-scroll-area-corner-width":`${n.value}px`,"--reka-scroll-area-corner-height":`${s.value}px`})},{default:I(()=>[ne(b.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),N2=X({__name:"ScrollAreaCornerImpl",setup(e){const t=cr(),r=F(0),n=F(0),s=V(()=>!!r.value&&!!n.value);function i(){const a=t.scrollbarX.value?.offsetHeight||0;t.onCornerHeightChange(a),n.value=a}function o(){const a=t.scrollbarY.value?.offsetWidth||0;t.onCornerWidthChange(a),r.value=a}return us(t.scrollbarX.value,i),us(t.scrollbarY.value,o),Me(()=>t.scrollbarX.value,i),Me(()=>t.scrollbarY.value,o),(a,l)=>s.value?($(),U(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:I(()=>[ne(a.$slots,"default")]),_:3},16,["style"])):Be("v-if",!0)}}),q2=X({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:r}=Pe(),n=cr(),s=V(()=>!!n.scrollbarX.value&&!!n.scrollbarY.value),i=V(()=>n.type.value!=="scroll"&&s.value);return(o,a)=>i.value?($(),U(N2,we({key:0},t,{ref:f(r)}),{default:I(()=>[ne(o.$slots,"default")]),_:3},16)):Be("v-if",!0)}});function ug(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 Sa(e){const t=dg(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function dg(e,t){const r=e/t;return Number.isNaN(r)?0:r}function B2(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 fg(e,t,r="ltr"){const n=Sa(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=qi(e,l[0],l[1]);return ug([0,o],[0,a])(u)}function Ca(e){return e?Number.parseInt(e,10):0}function L2(e,t,r,n="ltr"){const s=Sa(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 ug([l,u],d)(e)}function pg(e,t){return e>0&&e<t}var F2=X({__name:"ScrollAreaScrollbarX",setup(e){const t=cr(),r=xa(),{forwardRef:n,currentElement:s}=Pe();tt(()=>{s.value&&t.onScrollbarXChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>($(),U(hg,{ref:f(n),"is-horizontal":!0,"data-orientation":"horizontal",style:St({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(Sa)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.x))},{default:I(()=>[ne(o.$slots,"default")]),_:3},8,["style"]))}}),V2=X({__name:"ScrollAreaScrollbarY",setup(e){const t=cr(),r=xa(),{forwardRef:n,currentElement:s}=Pe();tt(()=>{s.value&&t.onScrollbarYChange(s.value)});const i=V(()=>r.sizes.value);return(o,a)=>($(),U(hg,{ref:f(n),"is-horizontal":!1,"data-orientation":"vertical",style:St({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(Sa)(i.value)}px`:void 0}),onOnDragScroll:a[0]||(a[0]=l=>f(r).onDragScroll(l.y))},{default:I(()=>[ne(o.$slots,"default")]),_:3},8,["style"]))}}),Fc=X({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),r=Fi(),{forwardRef:n}=Pe(),s=F(!1),i=cc(()=>{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 tt(()=>i()),us(t.viewport,i),us(t.content,i),(o,a)=>($(),U(f(Ln),{present:o.forceMount||s.value},{default:I(()=>[O(Vc,we(o.$attrs,{ref:f(n),"data-state":s.value?"visible":"hidden"}),{default:I(()=>[ne(o.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),j2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarGlimpse",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),r=Fi(),{forwardRef:n}=Pe(),{state:s,dispatch:i}=wc("hidden",{hidden:{POINTER_ENTER:"glimpse",SCROLL:"scrolling"},glimpse:{HIDE:"hidden",POINTER_LEAVE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"glimpse"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");function a(){i("POINTER_ENTER")}function l(){i("POINTER_LEAVE")}const u=cc(()=>i("SCROLL_END"),100);return ct(c=>{if(s.value==="glimpse"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),ct(c=>{if(s.value==="idle"){const d=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);c(()=>{window.clearTimeout(d)})}}),ct(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)})}}),tt(()=>{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)=>($(),U(f(Ln),{present:c.forceMount||o.value},{default:I(()=>[O(Fc,we(c.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:I(()=>[ne(c.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),U2=X({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),{forwardRef:r}=Pe();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 tt(()=>{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)=>($(),U(f(Ln),{present:a.forceMount||s.value},{default:I(()=>[O(Fc,we(a.$attrs,{ref:f(r),"data-state":s.value?"visible":"hidden"}),{default:I(()=>[ne(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),z2=X({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean,required:!1}},setup(e){const t=cr(),r=Fi(),{forwardRef:n}=Pe(),{state:s,dispatch:i}=wc("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}}),o=V(()=>s.value!=="hidden");ct(l=>{if(s.value==="idle"){const u=window.setTimeout(()=>i("HIDE"),t.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=cc(()=>i("SCROLL_END"),100);return ct(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)=>($(),U(f(Ln),{present:l.forceMount||o.value},{default:I(()=>[O(Vc,we(l.$attrs,{ref:f(n),"data-state":o.value?"visible":"hidden"}),{default:I(()=>[ne(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),[Fi,K2]=Pt("ScrollAreaScrollbar"),W2=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}=Pe(),n=cr(),s=V(()=>t.orientation==="horizontal");Me(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}=Mt(t);return K2({orientation:i,forceMount:o,isHorizontal:s,as:l,asChild:a}),(u,c)=>f(n).type.value==="hover"?($(),U(U2,we({key:0},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="scroll"?($(),U(z2,we({key:1},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="glimpse"?($(),U(j2,we({key:2},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="auto"?($(),U(Fc,we({key:3},u.$attrs,{ref:f(r),"force-mount":f(o)}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16,["force-mount"])):f(n).type.value==="always"?($(),U(Vc,we({key:4},u.$attrs,{ref:f(r),"data-state":"visible"}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16)):Be("v-if",!0)}}),[xa,G2]=Pt("ScrollAreaScrollbarVisible"),Vc=X({__name:"ScrollAreaScrollbarVisible",setup(e){const t=cr(),r=Fi(),{forwardRef:n}=Pe(),s=F({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),i=V(()=>{const g=dg(s.value.viewport,s.value.content);return g>0&&g<1}),o=F(),a=F(0);function l(g,S){if(h.value){const b=t.viewport.value.scrollLeft+g.deltaY;t.viewport.value.scrollLeft=b,pg(b,S)&&g.preventDefault()}else{const b=t.viewport.value.scrollTop+g.deltaY;t.viewport.value.scrollTop=b,pg(b,S)&&g.preventDefault()}}function u(g,S){h.value?a.value=S.x:a.value=S.y}function c(g){a.value=0}function d(g){s.value=g}function p(g,S){return L2(g,a.value,s.value,S)}const h=V(()=>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,S=fg(g,s.value,t.dir.value);o.value.style.transform=`translate3d(${S}px, 0, 0)`}}else if(t.viewport.value&&o.value){const g=t.viewport.value.scrollTop,S=fg(g,s.value);o.value.style.transform=`translate3d(0, ${S}px, 0)`}}function x(g){o.value=g}return G2({sizes:s,hasThumb:i,handleWheelScroll:l,handleThumbDown:u,handleThumbUp:c,handleSizeChange:d,onThumbPositionChange:w,onThumbChange:x,onDragScroll:m}),(g,S)=>h.value?($(),U(F2,we({key:0},g.$attrs,{ref:f(n)}),{default:I(()=>[ne(g.$slots,"default")]),_:3},16)):($(),U(V2,we({key:1},g.$attrs,{ref:f(n)}),{default:I(()=>[ne(g.$slots,"default")]),_:3},16))}}),hg=X({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean,required:!0}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(e,{emit:t}){const r=e,n=t,s=cr(),i=xa(),o=Fi(),{forwardRef:a,currentElement:l}=Pe(),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 S=g.target;S.hasPointerCapture(g.pointerId)&&S.releasePointerCapture(g.pointerId),document.body.style.webkitUserSelect=u.value,s.viewport&&(s.viewport.value.style.scrollBehavior=""),c.value=void 0}function w(g){const S=g.target,b=l.value?.contains(S),y=i.sizes.value.content-i.sizes.value.viewport;b&&i.handleWheelScroll(g,y)}tt(()=>{document.addEventListener("wheel",w,{passive:!1})}),Vt(()=>{document.removeEventListener("wheel",w)});function x(){l.value&&(r.isHorizontal?i.handleSizeChange({content:s.viewport.value?.scrollWidth??0,viewport:s.viewport.value?.offsetWidth??0,scrollbar:{size:l.value.clientWidth??0,paddingStart: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 us(l,x),us(s.content,x),(g,S)=>($(),U(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:I(()=>[ne(g.$slots,"default")]),_:3},8,["as","as-child"]))}}),J2=X({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=cr(),n=xa();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}=Pe(),l=F(),u=V(()=>r.viewport.value);function c(){l.value||(l.value=B2(u.value,n.onThumbPositionChange),n.onThumbPositionChange())}return ub(V(()=>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)=>($(),U(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:I(()=>[ne(d.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),Y2=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}=Mt(r),s=rg(n),i=cr(),o=F();tt(()=>{i.onViewportChange(o.value),i.onContentChange(l.value)}),t({viewportElement:o});const{forwardRef:a,currentElement:l}=Pe();return(u,c)=>($(),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}),[O(f(We),{ref:f(a),style:St({minWidth:f(i).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":r.asChild,as:u.as},{default:I(()=>[ne(u.$slots,"default")]),_:3},8,["style","as-child","as"])],16),O(f(We),{as:"style",nonce:f(s)},{default:I(()=>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))}}),Z2=[" ","Enter","ArrowUp","ArrowDown"],X2=[" ","Enter"],CT=10;function Vi(e,t,r){return e===void 0?!1:Array.isArray(e)?e.some(n=>jc(n,t,r)):jc(e,t,r)}function jc(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]:Fy(e,t)}function Q2(e){return e==null||e===""||Array.isArray(e)&&e.length===0}var e_={key:0,value:""},[zn,gg]=Pt("SelectRoot"),t_=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}=Mt(r),l=ds(r,"modelValue",n,{defaultValue:r.defaultValue??(o.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),u=ds(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0}),c=F(),d=F(),p=F({x:0,y:0}),h=V(()=>o.value&&Array.isArray(l.value)?l.value?.length===0:ic(l.value));gn({isProvider:!0});const m=hc(a),w=vc(c),x=F(new Set),g=V(()=>Array.from(x.value).map(y=>y.value).join(";"));function S(y){if(o.value){const T=Array.isArray(l.value)?[...l.value]:[],k=T.findIndex(N=>jc(N,y,r.by));k===-1?T.push(y):T.splice(k,1),l.value=[...T]}else l.value=y}function b(y){return Array.from(x.value).find(T=>Vi(y,T.value,r.by))}return gg({triggerElement:c,onTriggerChange:y=>{c.value=y},valueElement:d,onValueElementChange:y=>{d.value=y},contentId:"",modelValue:l,onValueChange:S,by:r.by,open:u,multiple:o,required:s,onOpenChange:y=>{u.value=y},dir:m,triggerPointerDownPosRef:p,disabled:i,isEmptyModelValue:h,optionsSet:x,onOptionAdd:y=>{const T=b(y.value);T&&x.value.delete(T),x.value.add(y)},onOptionRemove:y=>{const T=b(y.value);T&&x.value.delete(T)}}),(y,T)=>($(),U(f(Ph),null,{default:I(()=>[ne(y.$slots,"default",{modelValue:f(l),open:f(u)}),f(w)?($(),U(r_,{key:g.value,"aria-hidden":"true",tabindex:"-1",multiple:f(o),required:f(s),name:y.name,autocomplete:y.autocomplete,disabled:f(i),value:f(l)},{default:I(()=>[f(ic)(f(l))?($(),Se("option",e_)):Be("v-if",!0),($(!0),Se(Ke,null,vr(Array.from(x.value),k=>($(),Se("option",we({key:k.value??""},{ref_for:!0},k),null,16))),128))]),_:1},8,["multiple","required","name","autocomplete","disabled","value"])):Be("v-if",!0)]),_:3}))}}),r_=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=zn();Me(()=>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)=>($(),U(f(Tc),{"as-child":""},{default:I(()=>[Q("select",we({ref_key:"selectElement",ref:r},t,{onInput:s}),[ne(i.$slots,"default")],16)]),_:3}))}}),n_=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=hn(e);return(r,n)=>($(),U(f(tg),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:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),s_={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[gs,vg]=Pt("SelectContent"),i_=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=zn();Tb(),fh(r.bodyLock);const{CollectionSlot:i,getItems:o}=gn(),a=F();vh(a);const{search:l,handleTypeaheadSearch:u}=wh(),c=F(),d=F(),p=F(),h=F(!1),m=F(!1),w=F(!1);function x(){d.value&&a.value&&Eh([d.value,a.value])}Me(h,()=>{x()});const{onOpenChange:g,triggerPointerDownPosRef:S}=s;ct(T=>{if(!a.value)return;let k={x:0,y:0};const N=B=>{k={x:Math.abs(Math.round(B.pageX)-(S.value?.x??0)),y:Math.abs(Math.round(B.pageY)-(S.value?.y??0))}},v=B=>{B.pointerType!=="touch"&&(k.x<=10&&k.y<=10?B.preventDefault():a.value?.contains(B.target)||g(!1),document.removeEventListener("pointermove",N),S.value=null)};S.value!==null&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",v,{capture:!0,once:!0})),T(()=>{document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",v,{capture:!0})})});function b(T){const k=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!k&&T.key.length===1&&u(T.key,o()),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let N=[...o().map(v=>v.ref)];if(["ArrowUp","End"].includes(T.key)&&(N=N.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const v=T.target,B=N.indexOf(v);N=N.slice(B+1)}setTimeout(()=>Eh(N)),T.preventDefault()}}const y=hn(V(()=>r.position==="popper"?r:{}).value);return vg({content:a,viewport:c,onViewportChange:T=>{c.value=T},itemRefCallback:(T,k,N)=>{const v=!m.value&&!N,B=Vi(s.modelValue.value,k,s.by);if(s.multiple.value){if(w.value)return;(B||v)&&(d.value=T,B&&(w.value=!0))}else(B||v)&&(d.value=T);v&&(m.value=!0)},selectedItem:d,selectedItemText:p,onItemLeave:()=>{a.value?.focus()},itemTextRefCallback:(T,k,N)=>{const v=!m.value&&!N;(Vi(s.modelValue.value,k,s.by)||v)&&(p.value=T)},focusSelectedItem:x,position:r.position,isPositioned:h,searchRef:l}),(T,k)=>($(),U(f(i),null,{default:I(()=>[O(f(xh),{"as-child":"",onMountAutoFocus:k[6]||(k[6]=Xt(()=>{},["prevent"])),onUnmountAutoFocus:k[7]||(k[7]=N=>{n("closeAutoFocus",N),!N.defaultPrevented&&(f(s).triggerElement.value?.focus({preventScroll:!0}),N.preventDefault())})},{default:I(()=>[O(f(_c),{"as-child":"","disable-outside-pointer-events":T.disableOutsidePointerEvents,onFocusOutside:k[2]||(k[2]=Xt(()=>{},["prevent"])),onDismiss:k[3]||(k[3]=N=>f(s).onOpenChange(!1)),onEscapeKeyDown:k[4]||(k[4]=N=>n("escapeKeyDown",N)),onPointerDownOutside:k[5]||(k[5]=N=>n("pointerDownOutside",N))},{default:I(()=>[($(),U(wi(T.position==="popper"?n_:a_),we({...T.$attrs,...f(y)},{id:f(s).contentId,ref:N=>{const v=f(tr)(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:k[0]||(k[0]=Xt(()=>{},["prevent"])),onPlaced:k[1]||(k[1]=N=>h.value=!0),onKeydown:b}),{default:I(()=>[ne(T.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3})]),_:3}))}}),[Uc,o_]=Pt("SelectItemAlignedPosition"),a_=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}=gn(),i=zn(),o=gs(),a=F(!1),l=F(!0),u=F(),{forwardRef:c,currentElement:d}=Pe(),{viewport:p,selectedItem:h,selectedItemText:m,focusSelectedItem:w}=o;function x(){if(i.triggerElement.value&&i.valueElement.value&&u.value&&d.value&&p?.value&&h?.value&&m?.value){const b=i.triggerElement.value.getBoundingClientRect(),y=d.value.getBoundingClientRect(),T=i.valueElement.value.getBoundingClientRect(),k=m.value.getBoundingClientRect();if(i.dir.value!=="rtl"){const Oe=k.left-y.left,Xe=T.left-Oe,yt=b.left-Xe,Ne=b.width+yt,at=Math.max(Ne,y.width),bt=window.innerWidth-10,Tt=qi(Xe,10,Math.max(10,bt-at));u.value.style.minWidth=`${Ne}px`,u.value.style.left=`${Tt}px`}else{const Oe=y.right-k.right,Xe=window.innerWidth-T.right-Oe,yt=window.innerWidth-b.right-Xe,Ne=b.width+yt,at=Math.max(Ne,y.width),bt=window.innerWidth-10,Tt=qi(Xe,10,Math.max(10,bt-at));u.value.style.minWidth=`${Ne}px`,u.value.style.right=`${Tt}px`}const N=s().map(Oe=>Oe.ref),v=window.innerHeight-20,B=p.value.scrollHeight,q=window.getComputedStyle(d.value),C=Number.parseInt(q.borderTopWidth,10),_=Number.parseInt(q.paddingTop,10),E=Number.parseInt(q.borderBottomWidth,10),P=Number.parseInt(q.paddingBottom,10),R=C+_+B+P+E,D=Math.min(h.value.offsetHeight*5,R),G=window.getComputedStyle(p.value),W=Number.parseInt(G.paddingTop,10),ae=Number.parseInt(G.paddingBottom,10),Y=b.top+b.height/2-10,le=v-Y,pe=h.value.offsetHeight/2,Ae=h.value.offsetTop+pe,je=C+_+Ae,Ie=R-je;if(je<=Y){const Oe=h.value===N[N.length-1];u.value.style.bottom="0px";const Xe=d.value.clientHeight-p.value.offsetTop-p.value.offsetHeight,yt=je+Math.max(le,pe+(Oe?ae:0)+Xe+E);u.value.style.height=`${yt}px`}else{const Oe=h.value===N[0];u.value.style.top="0px";const Xe=Math.max(Y,C+p.value.offsetTop+(Oe?W:0)+pe)+Ie;u.value.style.height=`${Xe}px`,p.value.scrollTop=je-Y+p.value.offsetTop}u.value.style.margin="10px 0",u.value.style.minHeight=`${D}px`,u.value.style.maxHeight=`${v}px`,n("placed"),requestAnimationFrame(()=>a.value=!0)}}const g=F("");tt(async()=>{await Et(),x(),d.value&&(g.value=window.getComputedStyle(d.value).zIndex)});function S(b){b&&l.value===!0&&(x(),w?.(),l.value=!1)}return us(i.triggerElement,()=>{x()}),o_({contentWrapper:u,shouldExpandOnScrollRef:a,onScrollButtonChange:S}),(b,y)=>($(),Se("div",{ref_key:"contentWrapperElement",ref:u,style:St({display:"flex",flexDirection:"column",position:"fixed",zIndex:g.value})},[O(f(We),we({ref:f(c),style:{boxSizing:"border-box",maxHeight:"100%"}},{...b.$attrs,...r}),{default:I(()=>[ne(b.$slots,"default")]),_:3},16)],4))}}),l_=X({inheritAttrs:!1,__name:"SelectProvider",props:{context:{type:Object,required:!0}},setup(e){return gg(e.context),vg(s_),(t,r)=>ne(t.$slots,"default")}}),c_={key:1},u_=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=Ur(r,t),s=zn(),i=F();tt(()=>{i.value=new DocumentFragment});const o=F(),a=V(()=>r.forceMount||s.open.value),l=F(a.value);return Me(a,()=>{setTimeout(()=>l.value=a.value)}),(u,c)=>a.value||l.value||o.value?.present?($(),U(f(Ln),{key:0,ref_key:"presenceRef",ref:o,present:a.value},{default:I(()=>[O(i_,pr(rr({...f(n),...u.$attrs})),{default:I(()=>[ne(u.$slots,"default")]),_:3},16)]),_:3},8,["present"])):i.value?($(),Se("div",c_,[($(),U(el,{to:i.value},[O(l_,{context:f(s)},{default:I(()=>[ne(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):Be("v-if",!0)}}),[xT,d_]=Pt("SelectGroup"),f_=X({__name:"SelectGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,r=Vs(void 0,"reka-select-group");return d_({id:r}),(n,s)=>($(),U(f(We),we({role:"group"},t,{"aria-labelledby":f(r)}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),p_=X({__name:"SelectIcon",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){return(t,r)=>($(),U(f(We),{"aria-hidden":"true",as:t.as,"as-child":t.asChild},{default:I(()=>[ne(t.$slots,"default",{},()=>[r[0]||(r[0]=qe("▼"))])]),_:3},8,["as","as-child"]))}}),[mg,h_]=Pt("SelectItem"),g_=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}=Mt(r),i=zn(),o=gs(),{forwardRef:a,currentElement:l}=Pe(),{CollectionItem:u}=gn(),c=V(()=>Vi(i.modelValue?.value,r.value,i.by)),d=F(!1),p=F(r.textValue??""),h=Vs(void 0,"reka-select-item-text"),m="select.select";async function w(y){y.defaultPrevented||sc(m,x,{originalEvent:y,value:r.value})}async function x(y){await Et(),n("select",y),!y.defaultPrevented&&(s.value||(i.onValueChange(r.value),i.multiple.value||i.onOpenChange(!1)))}async function g(y){await Et(),!y.defaultPrevented&&(s.value?o.onItemLeave?.():y.currentTarget?.focus({preventScroll:!0}))}async function S(y){await Et(),!y.defaultPrevented&&y.currentTarget===or()&&o.onItemLeave?.()}async function b(y){await Et(),!y.defaultPrevented&&(o.searchRef?.value!==""&&y.key===" "||(X2.includes(y.key)&&w(y),y.key===" "&&y.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 tt(()=>{l.value&&o.itemRefCallback(l.value,r.value,r.disabled)}),h_({value:r.value,disabled:s,textId:h,isSelected:c,onItemTextChange:y=>{p.value=((p.value||y?.textContent)??"").trim()}}),(y,T)=>($(),U(f(u),{value:{textValue:p.value}},{default:I(()=>[O(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:y.as,"as-child":y.asChild,onFocus:T[0]||(T[0]=k=>d.value=!0),onBlur:T[1]||(T[1]=k=>d.value=!1),onPointerup:w,onPointerdown:T[2]||(T[2]=k=>{k.currentTarget.focus({preventScroll:!0})}),onTouchend:T[3]||(T[3]=Xt(()=>{},["prevent","stop"])),onPointermove:g,onPointerleave:S,onKeydown:b},{default:I(()=>[ne(y.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"])]),_:3},8,["value"]))}}),v_=X({__name:"SelectItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=mg();return(n,s)=>f(r).isSelected.value?($(),U(f(We),we({key:0,"aria-hidden":"true"},t),{default:I(()=>[ne(n.$slots,"default")]),_:3},16)):Be("v-if",!0)}}),m_=X({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=e,r=zn(),n=gs(),s=mg(),{forwardRef:i,currentElement:o}=Pe(),a=V(()=>({value:s.value,disabled:s.disabled.value,textContent:o.value?.textContent??s.value?.toString()??""}));return tt(()=>{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)=>($(),U(f(We),we({id:f(s).textId,ref:f(i)},{...t,...l.$attrs}),{default:I(()=>[ne(l.$slots,"default")]),_:3},16,["id"]))}}),w_=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)=>($(),U(f(xc),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),wg=X({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(e,{emit:t}){const r=t,{getItems:n}=gn(),s=gs(),i=F(null);function o(){i.value!==null&&(window.clearInterval(i.value),i.value=null)}ct(()=>{n().map(u=>u.ref).find(u=>u===or())?.scrollIntoView({block:"nearest"})});function a(){i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}function l(){s.onItemLeave?.(),i.value===null&&(i.value=window.setInterval(()=>{r("autoScroll")},50))}return Ps(()=>o()),(u,c)=>($(),U(f(We),we({"aria-hidden":"true",style:{flexShrink:0}},u.$parent?.$props,{onPointerdown:a,onPointermove:l,onPointerleave:c[0]||(c[0]=()=>{o()})}),{default:I(()=>[ne(u.$slots,"default")]),_:3},16))}}),y_=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=gs(),r=t.position==="item-aligned"?Uc():void 0,{forwardRef:n,currentElement:s}=Pe(),i=F(!1);return ct(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))}}),Me(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?($(),U(wg,{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:I(()=>[ne(o.$slots,"default")]),_:3},512)):Be("v-if",!0)}}),b_=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=gs(),r=t.position==="item-aligned"?Uc():void 0,{forwardRef:n,currentElement:s}=Pe(),i=F(!1);return ct(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))}}),Me(s,()=>{s.value&&r?.onScrollButtonChange(s.value)}),(o,a)=>i.value?($(),U(wg,{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:I(()=>[ne(o.$slots,"default")]),_:3},512)):Be("v-if",!0)}}),__=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=zn(),{forwardRef:n,currentElement:s}=Pe(),i=V(()=>r.disabled?.value||t.disabled);r.contentId||(r.contentId=Vs(void 0,"reka-select-content")),tt(()=>{r.onTriggerChange(s.value)});const{getItems:o}=gn(),{search:a,handleTypeaheadSearch:l,resetTypeahead:u}=wh();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)=>($(),U(f(Dh),{"as-child":"",reference:p.reference},{default:I(()=>[O(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(Q2)(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]=Xt(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(Z2).includes(m.key)&&(c(),m.preventDefault()))})},{default:I(()=>[ne(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"]))}}),S_=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}=Pe(),s=zn();tt(()=>{s.valueElement=n});const i=V(()=>{let a=[];const l=Array.from(s.optionsSet.value),u=c=>l.find(d=>Vi(c,d.value,s.by));return Array.isArray(s.modelValue.value)?a=s.modelValue.value.map(c=>u(c)?.textContent??""):a=[u(s.modelValue.value)?.textContent??""],a.filter(Boolean)}),o=V(()=>i.value.length?i.value.join(", "):t.placeholder);return(a,l)=>($(),U(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:I(()=>[ne(a.$slots,"default",{selectedLabel:i.value,modelValue:f(s).modelValue.value},()=>[qe(Le(o.value),1)])]),_:3},8,["as","as-child","data-placeholder"]))}}),C_=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}=Mt(t),n=rg(r),s=gs(),i=s.position==="item-aligned"?Uc():void 0,{forwardRef:o,currentElement:a}=Pe();tt(()=>{s?.onViewportChange(a.value)});const l=F(0);function u(c){const d=c.currentTarget,{shouldExpandOnScrollRef:p,contentWrapper:h}=i??{};if(p?.value&&h?.value){const m=Math.abs(l.value-d.scrollTop);if(m>0){const w=window.innerHeight-20,x=Number.parseFloat(h.value.style.minHeight),g=Number.parseFloat(h.value.style.height),S=Math.max(x,g);if(S<w){const b=S+m,y=Math.min(w,b),T=b-y;h.value.style.height=`${y}px`,h.value.style.bottom==="0px"&&(d.scrollTop=T>0?T:0,h.value.style.justifyContent="flex-end")}}}l.value=d.scrollTop}return(c,d)=>($(),Se(Ke,null,[O(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:I(()=>[ne(c.$slots,"default")]),_:3},16),O(f(We),{as:"style",nonce:f(n)},{default:I(()=>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))}}),x_=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=V(()=>n(t.orientation)?t.orientation:"horizontal"),i=V(()=>s.value==="vertical"?t.orientation:void 0),o=V(()=>t.decorative?{role:"none"}:{"aria-orientation":i.value,role:"separator"});return(a,l)=>($(),U(f(We),we({as:a.as,"as-child":a.asChild,"data-orientation":s.value},o.value),{default:I(()=>[ne(a.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),T_=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)=>($(),U(x_,pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),[E_,TT]=Pt("ToggleGroupRoot"),A_=X({__name:"Toggle",props:{defaultValue:{type:Boolean,required:!1},modelValue:{type:[Boolean,null],required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,{forwardRef:s,currentElement:i}=Pe(),o=E_(null),a=ds(r,"modelValue",n,{defaultValue:r.defaultValue,passive:r.modelValue===void 0});function l(){a.value=!a.value}const u=V(()=>a.value?"on":"off"),c=vc(i);return(d,p)=>($(),U(f(We),{ref:f(s),type:d.as==="button"?"button":void 0,"as-child":r.asChild,as:d.as,"aria-pressed":f(a),"data-state":u.value,"data-disabled":d.disabled?"":void 0,disabled:d.disabled,onClick:l},{default:I(()=>[ne(d.$slots,"default",{modelValue:f(a),disabled:d.disabled,pressed:f(a),state:u.value}),f(c)&&d.name&&!f(o)?($(),U(Rh,{key:0,type:"checkbox",name:d.name,value:f(a),required:d.required},null,8,["name","value","required"])):Be("v-if",!0)]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),k_=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 Pe(),(r,n)=>($(),U(f(m2),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),[Ta,I_]=Pt("TooltipProvider"),R_=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}=Mt(e);Pe();const l=F(!0),u=F(!1),{start:c,stop:d}=ah(()=>{l.value=!0},r,{immediate:!1});return I_({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)=>ne(p.$slots,"default")}}),yg="tooltip.open",[Ea,$_]=Pt("TooltipRoot"),P_=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;Pe();const s=Ta(),i=V(()=>r.disableHoverableContent??s.disableHoverableContent.value),o=V(()=>r.disableClosingTrigger??s.disableClosingTrigger.value),a=V(()=>r.disabled??s.disabled.value),l=V(()=>r.delayDuration??s.delayDuration.value),u=V(()=>r.ignoreNonKeyboardFocus??s.ignoreNonKeyboardFocus.value),c=ds(r,"open",n,{defaultValue:r.defaultOpen,passive:r.open===void 0});Me(c,b=>{s.onClose&&(b?(s.onOpen(),document.dispatchEvent(new CustomEvent(yg))):s.onClose())});const d=F(!1),p=F(),h=V(()=>c.value?d.value?"delayed-open":"instant-open":"closed"),{start:m,stop:w}=ah(()=>{d.value=!0,c.value=!0},l,{immediate:!1});function x(){w(),d.value=!1,c.value=!0}function g(){w(),c.value=!1}function S(){m()}return $_({contentId:"",open:c,stateAttribute:h,trigger:p,onTriggerChange(b){p.value=b},onTriggerEnter(){s.isOpenDelayed.value?S():x()},onTriggerLeave(){i.value?g():w()},onOpen:x,onClose:g,disableHoverableContent:i,disableClosingTrigger:o,disabled:a,ignoreNonKeyboardFocus:u}),(b,y)=>($(),U(f(Ph),null,{default:I(()=>[ne(b.$slots,"default",{open:f(c)})]),_:3}))}}),bg=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=Ea(),i=Ta(),{forwardRef:o,currentElement:a}=Pe(),l=V(()=>r.ariaLabel||a.value?.textContent),u=V(()=>{const{ariaLabel:c,...d}=r;return dh(d,i.content.value??{},{side:"top",sideOffset:0,align:"center",avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:"partial",hideWhenDetached:!1})});return tt(()=>{zt(window,"scroll",c=>{c.target?.contains(s.trigger.value)&&s.onClose()}),zt(window,yg,s.onClose)}),(c,d)=>($(),U(f(_c),{"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]=Xt(()=>{},["prevent"])),onDismiss:d[3]||(d[3]=p=>f(s).onClose())},{default:I(()=>[O(f(tg),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:I(()=>[ne(c.$slots,"default"),O(f(Tc),{id:f(s).contentId,role:"tooltip"},{default:I(()=>[qe(Le(l.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),D_=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=hn(e),{forwardRef:r,currentElement:n}=Pe(),{trigger:s,onClose:i}=Ea(),o=Ta(),{isPointerInTransit:a,onPointerExit:l}=Eb(s,n);return o.isPointerInTransitRef=a,l(()=>{i()}),(u,c)=>($(),U(bg,we({ref:f(r)},f(t)),{default:I(()=>[ne(u.$slots,"default")]),_:3},16))}}),O_=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=Ea(),i=Ur(r,n),{forwardRef:o}=Pe();return(a,l)=>($(),U(f(Ln),{present:a.forceMount||f(s).open.value},{default:I(()=>[($(),U(wi(f(s).disableHoverableContent.value?bg:D_),we({ref:f(o)},f(i)),{default:I(()=>[ne(a.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),H_=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)=>($(),U(f(xc),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),M_=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=Ea(),n=Ta();r.contentId||(r.contentId=Vs(void 0,"reka-tooltip-content"));const{forwardRef:s,currentElement:i}=Pe(),o=F(!1),a=F(!1),l=V(()=>r.disabled.value?{}:{click:w,focus:h,pointermove:d,pointerleave:p,pointerdown:c,blur:m});tt(()=>{r.onTriggerChange(i.value)});function u(){setTimeout(()=>{o.value=!1},1)}function c(){r.open&&!r.disableClosingTrigger.value&&r.onClose(),o.value=!0,document.addEventListener("pointerup",u,{once:!0})}function d(x){x.pointerType!=="touch"&&!a.value&&!n.isPointerInTransitRef.value&&(r.onTriggerEnter(),a.value=!0)}function p(){r.onTriggerLeave(),a.value=!1}function h(x){o.value||r.ignoreNonKeyboardFocus.value&&!x.target.matches?.(":focus-visible")||r.onOpen()}function m(){r.onClose()}function w(){r.disableClosingTrigger.value||r.onClose()}return(x,g)=>($(),U(f(Dh),{"as-child":"",reference:x.reference},{default:I(()=>[O(f(We),we({ref:f(s),"aria-describedby":f(r).open.value?f(r).contentId:void 0,"data-state":f(r).stateAttribute.value,as:x.as,"as-child":t.asChild,"data-grace-area-trigger":""},Ed(l.value)),{default:I(()=>[ne(x.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3},8,["reference"]))}}),N_=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)=>($(),U(f(We),{"data-slot":"button",as:e.as,"as-child":e.asChild,type:e.as==="button"?e.type:void 0,class:et(f(dt)(f(q_)({variant:e.variant,size:e.size}),t.class))},{default:I(()=>[ne(r.$slots,"default")]),_:3},8,["as","as-child","type","class"]))}}),pt=N_;const q_=eh("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 B_={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"},L_=X({__name:"KeyPad",setup(e){const t=Ft("webphone"),{sendDTMF:r}=Ft("sip"),{playDtmf:n}=Tp(),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)=>($(),Se("div",B_,[($(),Se(Ke,null,vr(s,l=>O(f(pt),{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:I(()=>[qe(Le(l),1)]),_:2},1032,["onClick","data-key"])),64))]))}}),zc=L_;var _g=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),F_=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),V_=e=>{const t=F_(e);return t.charAt(0).toUpperCase()+t.slice(1)},j_=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Sg=e=>e==="";var ji={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 U_=({name:e,iconNode:t,absoluteStrokeWidth:r,"absolute-stroke-width":n,strokeWidth:s,"stroke-width":i,size:o=ji.width,color:a=ji.stroke,...l},{slots:u})=>mr("svg",{...ji,...l,width:o,height:o,stroke:a,"stroke-width":Sg(r)||Sg(n)||r===!0||n===!0?Number(s||i||ji["stroke-width"])*24/Number(o):s||i||ji["stroke-width"],class:j_("lucide",l.class,...e?[`lucide-${_g(V_(e))}-icon`,`lucide-${_g(e)}`]:["lucide-icon"])},[...t.map(c=>mr(...c)),...u.default?[u.default()]:[]]);var vt=(e,t)=>(r,{slots:n,attrs:s})=>mr(U_,{...s,...r,iconNode:t,name:e},n);var Cg=vt("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 Kc=vt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var xg=vt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var z_=vt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var Wc=vt("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 K_=vt("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);var W_=vt("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 G_=vt("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 J_=vt("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 Y_=vt("phone-call",[["path",{d:"M13 2a9 9 0 0 1 9 9",key:"1itnx2"}],["path",{d:"M13 6a5 5 0 0 1 5 5",key:"11nki7"}],["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 Z_=vt("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 X_=vt("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 Q_=vt("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 Tg=vt("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 eS=vt("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 tS=vt("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 rS=vt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);var nS=vt("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 sS=vt("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 Eg=vt("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 Ag=vt("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 Gc=vt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),iS=X({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=ds(r,"modelValue",t,{passive:!0,defaultValue:r.defaultValue});return(s,i)=>mo(($(),Se("input",{"onUpdate:modelValue":i[0]||(i[0]=o=>rt(n)?n.value=o:null),"data-slot":"input",class:et(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)),[[ki,f(n)]])}}),Ui=iS,oS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14"};function aS(e,t){return $(),Se("svg",oS,[...t[0]||(t[0]=[Cl('<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 Jc={render:aS},lS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 9 9"};function cS(e,t){return $(),Se("svg",lS,[...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 uS={render:cS},dS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20"};function fS(e,t){return $(),Se("svg",dS,[...t[0]||(t[0]=[Cl('<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 pS={render:fS},hS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"2.8 2.8 14.2 14.2"};function gS(e,t){return $(),Se("svg",hS,[...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 vS={render:gS},mS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function wS(e,t){return $(),Se("svg",mS,[...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 Yc={render:wS},yS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 19 19"};function bS(e,t){return $(),Se("svg",yS,[...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 Zc={render:bS},_S={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 12 12"};function SS(e,t){return $(),Se("svg",_S,[...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 Xc={render:SS},CS=["data-call-status"],xS={key:0,class:"webphone-actions__idle wp:!w-full wp:flex wp:flex-col wp:items-center wp:space-y-2 wp:mb-4"},TS={key:2,class:"webphone-actions__connected wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},ES={class:"webphone-actions__row wp:flex wp:items-center wp:gap-6"},AS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},kS=["data-visible"],IS={key:3,class:"webphone-actions__calling wp:w-full wp:flex wp:flex-col wp:items-center wp:gap-3"},RS={class:"webphone-actions__dialer wp:w-full wp:max-w-80 wp:relative"},$S=["data-visible"],PS={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"},DS=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=C=>{if(u.test(C)){for(const _ of C)l(_);for(const _ of C)r.appendKeypad(_)}},d=C=>{C.ctrlKey||C.metaKey||C.altKey||C.key.length!==1||(C.preventDefault(),C.stopPropagation(),c(C.key))},p=C=>{C.data&&(C.preventDefault(),C.stopPropagation(),c(C.data))},h=C=>{C.preventDefault(),C.stopPropagation(),c(C.clipboardData?.getData("text").replace(/\s/g,"")||"")};Me(()=>r.callStatus,(C,_)=>{C==="connected"&&_!=="connected"&&r.clearKeypad()});const m=e,w=t,x=V(()=>!!r.transferInProgress),g=V(()=>m.destination||r.keypadValue||r.lastDialedNumber||""),S=V(()=>!!m.destination||/^[+]?[0-9*#]+$/.test(r.keypadValue)),b=V(()=>S.value||!!r.lastDialedNumber),y=V(()=>!m.isVideo||!S.value?!1:g.value?/^[0-9*#]{1,5}$/.test(g.value):!0),T=async C=>{try{m.destination?await n(m.destination,C):r.keypadValue?await n(r.keypadValue,C):r.lastDialedNumber&&(r.keypadValue=r.lastDialedNumber)}catch(_){if(console.error("Error initiating call:",_),C){let E="No se pudo acceder a la cámara.";const P=_ instanceof Error?_.name:String(_);P==="NotReadableError"?E="La cámara parece estar en uso por otra aplicación (ej: Zoom, Meet) o no se puede acceder al hardware.":P==="NotAllowedError"||P==="PermissionDeniedError"?E="Permiso de cámara denegado. Por favor, permita el acceso a la cámara.":P==="NotFoundError"?E="No se detectó ninguna cámara en el sistema.":E+=" "+(_ instanceof Error?_.message:String(_)),confirm(`${E}
75
75
 
76
- ¿Desea realizar la llamada solo con AUDIO?`)&&T(!1)}else alert("Error al iniciar la llamada: "+(_ instanceof Error?_.message:String(_)))}},k=(C=!1)=>{if(m.onAnswer){m.onAnswer(C);return}i(C)},N=async()=>{await s(),await m.onHangup?.()},v=()=>{if(m.onReject){m.onReject();return}s()},B=V(()=>{const C={};return r.channels.forEach(_=>{const E=_.status==="connected"||_.status==="calling"||_.status==="incoming";C[_.id]=E?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),C}),q=V(()=>B.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(C,_)=>($(),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"?($(),Se("div",_S,[b.value?($(),U(f(ht),{key:0,variant:"default",size:"icon",onClick:_[0]||(_[0]=E=>T(!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:I(()=>[H(f(uS),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),_[12]||(_[12]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):qe("",!0),y.value?($(),U(f(ht),{key:1,variant:"outline",size:"icon",onClick:_[1]||(_[1]=E=>T(!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:I(()=>[H(f(pS),{class:Xe(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",q.value])},null,8,["class"]),_[13]||(_[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})):qe("",!0)])):qe("",!0),f(r).callStatus==="incoming"?($(),Se(ze,{key:1},[f(r).activeChannel?.hasVideo?($(),U(f(ht),{key:0,variant:"default",size:"icon",onClick:_[2]||(_[2]=E=>k(!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:I(()=>[H(f(tS),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):qe("",!0),H(f(ht),{variant:"default",size:"icon",onClick:_[3]||(_[3]=E=>k(!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:I(()=>[H(f(Sg),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),H(f(ht),{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:I(()=>[H(f(Wc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):qe("",!0),f(r).callStatus==="connected"?($(),Se("div",SS,[Q("div",CS,[H(f(ht),{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:I(()=>[f(r).isMuted?($(),U(f(U_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):($(),U(f(z_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),H(f(ht),{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:I(()=>[f(r).isHeld?($(),U(f(X_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):($(),U(f(K_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),x.value?qe("",!0):($(),U(f(ht),{key:0,variant:"secondary",size:"icon",onClick:_[4]||(_[4]=E=>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:I(()=>[H(f(aS),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),Q("div",xS,[H(f(ht),{variant:"ghost",size:"icon",onClick:_[5]||(_[5]=E=>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:I(()=>[f(r).isKeypadVisible?($(),U(f(Jc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):($(),U(f(Gc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),H(f(zi),{"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:_[6]||(_[6]=Xt(E=>f(r).backspaceKeypad(),["stop"]))},[H(f(Yc),{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:Xe(["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"},[H(jc)],10,TS),H(f(ht),{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:I(()=>[H(f(Wc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[14]||(_[14]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):qe("",!0),f(r).callStatus==="calling"?($(),Se("div",ES,[Q("div",AS,[H(f(ht),{variant:"ghost",size:"icon",onClick:_[7]||(_[7]=E=>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:I(()=>[f(r).isKeypadVisible?($(),U(f(Jc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):($(),U(f(Gc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),H(f(zi),{modelValue:f(r).keypadValue,"onUpdate:modelValue":_[8]||(_[8]=E=>f(r).keypadValue=E),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:_[9]||(_[9]=Xt(E=>f(r).backspaceKeypad(),["stop"]))},[H(f(Yc),{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:Xe(["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"},[H(jc)],10,kS),H(f(ht),{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:I(()=>[H(f(Wc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[15]||(_[15]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):qe("",!0),x.value&&f(r).callStatus==="connected"?($(),Se("div",IS,[H(f(ht),{variant:"default",size:"sm",onClick:_[10]||(_[10]=E=>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:I(()=>[H(f(Uc),{class:"wp:w-4 wp:h-4"}),_[16]||(_[16]=Ne(" Completar Transferencia ",-1))]),_:1}),H(f(ht),{variant:"destructive",size:"sm",onClick:_[11]||(_[11]=E=>w("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:I(()=>[H(f(Kc),{class:"wp:w-4 wp:h-4"}),_[17]||(_[17]=Ne(" Cancelar ",-1))]),_:1})])):qe("",!0)],8,bS))}}),$S=RS,PS=X({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Se("kbd",{class:Xe(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))},[te(r.$slots,"default")],2))}}),wn=PS,DS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function OS(e,t){return $(),Se("svg",DS,[...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 Zc={render:OS},HS=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=jr(e,t);return(n,s)=>($(),U(f(I_),ye({"data-slot":"tooltip"},f(r)),{default:I(i=>[te(n.$slots,"default",fr(rr(i)))]),_:3},16))}}),Js=HS,MS=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=jr(zt(r,"class"),n);return(i,o)=>($(),U(f(P_),null,{default:I(()=>[H(f($_),ye({"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:I(()=>[te(i.$slots,"default"),H(f(T_),{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}))}}),Ys=MS,NS=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)=>($(),U(f(A_),fr(rr(t)),{default:I(()=>[te(r.$slots,"default")]),_:3},16))}}),Ki=NS,qS=X({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(D_),ye({"data-slot":"tooltip-trigger"},t),{default:I(()=>[te(r.$slots,"default")]),_:3},16))}}),Zs=qS,BS=["data-call-status"],LS={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},FS={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},VS={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},jS={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},US={class:"webphone-display__dialer-field wp:relative"},zS={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"},KS=["onPointerdown"],WS={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},GS={class:"webphone-display__contact-name wp:truncate"},JS={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},YS={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},ZS={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},XS={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},QS={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},eC={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},tC={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},rC={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},nC={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},sC={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},iC=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},extensions:{default:()=>[]}},setup(e){const t=Vt("webphone"),r=Vt("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=V(()=>s.channelId!==void 0?t.channels.find(P=>P.id===s.channelId):t.activeChannel),o=V(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const P=i.value;return P&&P.status!=="idle"?P.isHeld||P.status==="held"?"wp:text-status-hold":P.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=F(!1),l=F(null),u=F(null),c=P=>P.replace(/[^0-9*#]/g,""),d=P=>{P.ctrlKey||P.metaKey||P.altKey||P.key.length!==1||/[0-9*#]/.test(P.key)||P.preventDefault()},p=P=>{P.data&&c(P.data)!==P.data&&P.preventDefault()};lb(l,()=>{a.value=!1});const h=V({get:()=>i.value?.keypadValue||"",set:P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(P)})}}),m=V(()=>/^[0-9*#]+$/.test(h.value)),w=P=>s.maskNumber?br(P.number,s.extensions):P.number,x=V(()=>{if(!h.value)return s.contacts.slice(0,10);const P=h.value.toLowerCase(),R=[];for(const D of s.contacts)if((D.name.toLowerCase().includes(P)||w(D).includes(P))&&(R.push(D),R.length>=10))break;return R}),g=P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(P.number)}),a.value=!1},S=()=>{!h.value||!m.value||(a.value=!1,r.makeCall(h.value))};Me(h,()=>{a.value=!0});const b=()=>{h.value&&m.value&&S()},y=()=>{a.value=!1},T=()=>{a.value=!0},k=()=>{setTimeout(()=>{a.value=!1},150)},N=F(Date.now());ib(()=>{N.value=Date.now()},1e3);const v=V(()=>{const P=i.value?.startTime,R=i.value?.status||"idle";if(!P||R!=="connected")return"00:00:00";const D=Math.floor((N.value-P)/1e3);return D<0?"00:00:00":`${Math.floor(D/3600).toString().padStart(2,"0")}:${Math.floor(D%3600/60).toString().padStart(2,"0")}:${(D%60).toString().padStart(2,"0")}`}),B=V(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const P=i.value,R=P?.status||"idle";if(R==="idle")return"Disponible";if(R==="calling")return"Llamando...";if(P?.isHeld){const D=P.remoteNumber||P.keypadValue||"Unknown";return`En espera - ${s.maskNumber?br(D,s.extensions):D}`}return R==="connected"?"Conectado":R.charAt(0).toUpperCase()+R.slice(1)}),q=P=>{if(!P)return"";const R=P.trim(),D=R.startsWith("+"),J=R.replace(/[^\d]/g,"");return D?`+${J}`:J},C=P=>/\d/.test(P)&&/^[+\d\s().*#-]+$/.test(P.trim()),_=V(()=>{const P=i.value,R=P?.remoteNumber||P?.keypadValue,D=P?.remoteDisplayName;if(!R)return"Unknown";const J=q(R),W=s.contacts?.find(ae=>q(ae.number)===J);return W?s.maskNumber&&C(W.name)?br(W.name,s.extensions):W.name:D&&D!==R?s.maskNumber&&C(D)?q(D)===J?br(R,s.extensions):br(D,s.extensions):D:s.maskNumber?br(R,s.extensions):R}),E=V(()=>{const P=i.value,R=P?.remoteNumber||P?.keypadValue||"";return s.maskNumber?br(R,s.extensions):R});return(P,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"?($(),Se("div",{key:0,class:Xe([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",LS,[H(f(Zc),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),R[3]||(R[3]=Q("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),Q("span",FS,Be(v.value),1)],2)):qe("",!0),s.user?($(),Se("span",{key:1,class:Xe([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",VS,[H(f(Zc),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),Ne(" "+Be(s.user),1)]),Q("div",{class:Xe(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},Be(B.value),3)],2)):qe("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?($(),Se("div",jS,[Q("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[Q("div",US,[H(f(Ki),null,{default:I(()=>[H(f(Js),null,{default:I(()=>[H(f(Zs),{"as-child":""},{default:I(()=>[H(f(ht),{onClick:R[0]||(R[0]=D=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:Xe(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:I(()=>[f(t).isKeypadVisible?($(),U(f(Jc),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):($(),U(f(Gc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),H(f(Ys),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[Q("span",null,Be(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),H(f(wn),null,{default:I(()=>[Ne(Be(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),H(f(zi),{ref_key:"inputRef",ref:u,modelValue:h.value,"onUpdate:modelValue":R[1]||(R[1]=D=>h.value=D),type:"text",inputmode:"tel",pattern:"[0-9*#]*",onFocus:T,onBlur:k,onKeydown:[d,Ml(b,["enter"]),Ml(y,["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:R[2]||(R[2]=Xt(D=>f(t).backspaceKeypad(),["stop"]))},[H(f(Yc),{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"})])]),mo(Q("div",zS,[m.value?($(),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:Xt(S,["prevent"])},[H(f(Sg),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),Q("span",null,"Marcar "+Be(h.value),1)],32)):qe("",!0),($(!0),Se(ze,null,gr(x.value,D=>($(),Se("div",{key:D.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:Xt(J=>g(D),["prevent"])},[Q("div",{class:Xe(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",D.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":D.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":D.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":D.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"))},[D.type==="extension"?($(),U(f(bg),{key:0,class:"wp:w-3 wp:h-3"})):D.type==="contact"?($(),U(f(zc),{key:1,class:"wp:w-3 wp:h-3"})):D.type==="voicemail"?($(),U(f(Cg),{key:2,class:"wp:w-3 wp:h-3"})):D.type==="tool"?($(),U(f(xg),{key:3,class:"wp:w-3 wp:h-3"})):($(),U(f(zc),{key:4,class:"wp:w-3 wp:h-3"}))],2),Q("div",WS,[Q("span",GS,Be(D.name),1),Q("span",JS,Be(w(D)),1)])],40,KS))),128))],512),[[qo,a.value&&h.value&&(x.value.length>0||m.value)]])],512)])):(i.value?.status||"idle")==="connected"?($(),Se("div",YS,[Q("div",ZS,[Q("div",XS," En llamada con "+Be(_.value),1),_.value!==E.value?($(),Se("div",QS,Be(E.value),1)):qe("",!0)])])):(i.value?.status||"idle")!=="idle"?($(),Se("div",eC,[Q("div",tC,[Q("div",rC,[Q("div",nC,Be(_.value),1),_.value!==E.value?($(),Se("div",sC,Be(E.value),1)):qe("",!0)]),H(f(Ki),null,{default:I(()=>[H(f(Js),null,{default:I(()=>[H(f(Zs),{"as-child":""}),H(f(Ys),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[Q("span",null,Be(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),H(f(wn),null,{default:I(()=>[Ne(Be(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):qe("",!0)],8,BS))}}),oC=iC,aC=X({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=jr(e,t);return(n,s)=>($(),U(f(Lb),ye({"data-slot":"dialog"},f(r)),{default:I(i=>[te(n.$slots,"default",fr(rr(i)))]),_:3},16))}}),Xc=aC,lC=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)=>($(),U(f(i1),ye({"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:I(()=>[te(n.$slots,"default")]),_:3},16,["class"]))}}),cC=lC,uC=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=jr(zt(r,"class"),n);return(i,o)=>($(),U(f(o1),null,{default:I(()=>[H(cC),H(f(n1),ye({"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:I(()=>[te(i.$slots,"default"),e.showCloseButton?($(),U(f(Fb),{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:I(()=>[H(f(Kc)),o[0]||(o[0]=Q("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):qe("",!0)]),_:3},16,["class"])]),_:3}))}}),Qc=uC,dC=X({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Se("div",{"data-slot":"dialog-footer",class:Xe(f(dt)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[te(r.$slots,"default")],2))}}),Tg=dC,fC=X({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Se("div",{"data-slot":"dialog-header",class:Xe(f(dt)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[te(r.$slots,"default")],2))}}),eu=fC,pC=X({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=pn(zt(t,"class"));return(n,s)=>($(),U(f(a1),ye({"data-slot":"dialog-title"},f(r),{class:f(dt)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:I(()=>[te(n.$slots,"default")]),_:3},16,["class"]))}}),tu=pC,hC=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=jr(e,t);return(n,s)=>($(),U(f(X2),ye({"data-slot":"select"},f(r)),{default:I(i=>[te(n.$slots,"default",fr(rr(i)))]),_:3},16))}}),ru=hC,gC=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=jr(zt(r,"class"),n);return(i,o)=>($(),U(f(g_),null,{default:I(()=>[H(f(a_),ye({"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:I(()=>[H(f(SC)),H(f(b_),{class:Xe(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:I(()=>[te(i.$slots,"default")]),_:3},8,["class"]),H(f(bC))]),_:3},16,["class"])]),_:3}))}}),nu=gC,vC=X({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(c_),ye({"data-slot":"select-group"},t),{default:I(()=>[te(r.$slots,"default")]),_:3},16))}}),su=vC,mC={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},wC=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=pn(zt(t,"class"));return(n,s)=>($(),U(f(f_),ye({"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:I(()=>[Q("span",mC,[H(f(p_),null,{default:I(()=>[te(n.$slots,"indicator-icon",{},()=>[H(f(Uc),{class:"wp:size-4"})])]),_:3})]),H(f(h_),null,{default:I(()=>[te(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),Wi=wC,yC=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=pn(zt(t,"class"));return(n,s)=>($(),U(f(v_),ye({"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:I(()=>[te(n.$slots,"default",{},()=>[H(f(_g),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),bC=yC,_C=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=pn(zt(t,"class"));return(n,s)=>($(),U(f(m_),ye({"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:I(()=>[te(n.$slots,"default",{},()=>[H(f(V_),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),SC=_C,CC=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=pn(zt(t,"class","size"));return(n,s)=>($(),U(f(w_),ye({"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:I(()=>[te(n.$slots,"default"),H(f(u_),{"as-child":""},{default:I(()=>[H(f(_g),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),iu=CC,xC=X({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(y_),ye({"data-slot":"select-value"},t),{default:I(()=>[te(r.$slots,"default")]),_:3},16))}}),ou=xC,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=jr(zt(r,"class"),n);return(i,o)=>($(),U(f(E2),ye({"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:I(({modelValue:a})=>[H(f(R2),{"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:I(()=>[H(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}),($(!0),Se(ze,null,gr(a,(l,u)=>($(),U(f(I2),{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"]))}}),au=TC,EC=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)=>($(),U(f($2),ye({"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:I(()=>[te(n.$slots,"default")]),_:3},16,["class"]))}}),yn=EC,AC=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)=>($(),U(f(S_),ye({"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"]))}}),Eg=AC,kC=X({__name:"Toggle",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]},variant:{default:"default"},size:{default:"default"}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,s=jr(zt(r,"class","size","variant"),n);return(i,o)=>($(),U(f(x_),ye({"data-slot":"toggle"},f(s),{class:f(dt)(f(RC)({variant:e.variant,size:e.size}),r.class)}),{default:I(a=>[te(i.$slots,"default",fr(rr(a)))]),_:3},16,["class"]))}}),IC=kC;const RC=Zp("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:rounded-md wp:text-sm wp:font-medium wp:hover:bg-muted wp:hover:text-muted-foreground wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:data-[state=on]:bg-accent wp:data-[state=on]:text-accent-foreground wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:[&_svg]:shrink-0 wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:outline-none wp:transition-[color,box-shadow] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:whitespace-nowrap",{variants:{variant:{default:"wp:bg-transparent",outline:"wp:border wp:border-input wp:bg-transparent wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground"},size:{default:"wp:h-9 wp:px-2 wp:min-w-9",sm:"wp:h-8 wp:px-1.5 wp:min-w-8",lg:"wp:h-10 wp:px-2.5 wp:min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var $C={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},PC={class:"wp:flex wp:flex-col wp:gap-2"},DC={class:"wp:flex wp:flex-col wp:gap-2"},OC={class:"wp:flex wp:flex-col wp:gap-4"},HC={class:"wp:flex wp:justify-between"},MC={class:"wp:text-sm wp:text-muted-foreground"},NC={class:"wp:flex wp:flex-col wp:gap-4"},qC={class:"wp:flex wp:justify-between"},BC={class:"wp:text-sm wp:text-muted-foreground"},LC={class:"wp:flex wp:flex-col wp:gap-2"},FC={class:"wp:flex wp:justify-between"},VC={class:"wp:text-sm wp:text-muted-foreground"},jC={class:"wp:flex wp:flex-col wp:gap-2"},UC={class:"wp:flex wp:items-center wp:justify-between wp:gap-4"},zC={class:"wp:flex wp:flex-col wp:gap-1"},KC={class:"wp:flex wp:flex-col wp:gap-3"},WC={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},GC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},JC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},YC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},ZC={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"},QC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},ex=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=Vt("sip"),{setVolume:i,setOutputDevice:o,setInputDevice:a,setNotificationVolume:l}=s,u=s.setRingtoneVolume??(()=>{}),c=s.setRingtoneTone??(()=>{}),d=F([]),p=F([]),h=cs("webphone-input-device",""),m=cs("webphone-output-device",""),w=cs("webphone-volume",100),x=cs("webphone-notification-volume",100),g=cs("webphone-ringtone-volume",100),S=cs("webphone-ringtone-tone","original"),b=cs(Wp,!1),y={classic:"original","original-loud":"aurora","original-intense":"resonancia"},T=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const P=await navigator.mediaDevices.enumerateDevices();d.value=P.filter(J=>J.kind==="audioinput").map((J,W)=>({deviceId:J.deviceId,label:J.label||`Microphone ${W+1}`})),p.value=P.filter(J=>J.kind==="audiooutput").map((J,W)=>({deviceId:J.deviceId,label:J.label||`Speaker ${W+1}`}));const R=d.value.some(J=>J.deviceId===h.value);(!h.value||!R)&&d.value.length>0&&(h.value=d.value[0]?.deviceId??"");const D=p.value.some(J=>J.deviceId===m.value);(!m.value||!D)&&p.value.length>0&&(m.value=p.value[0]?.deviceId??""),h.value&&a(h.value),m.value&&o(m.value)}catch(P){console.error("Error loading devices",P)}},k=P=>{const R=String(P);h.value=R,a(R)},N=P=>{const R=String(P);m.value=R,o(R)},v=(P,R=35)=>P.length<=R?P:P.substring(0,R)+"...",B=V({get:()=>[w.value],set:P=>{w.value=P[0],i(w.value)}}),q=V({get:()=>[x.value],set:P=>{x.value=P[0],l(x.value)}}),C=V({get:()=>[g.value],set:P=>{g.value=P[0]??100,u(g.value)}}),_=P=>{S.value=String(P),c(S.value)},E=P=>{b.value=P};return Qe(()=>{T(),i(w.value),l(x.value),u(g.value),localStorage.removeItem("webphone-custom-ringtone");const P=y[S.value]??S.value;S.value=["original","aurora","resonancia"].includes(P)?P:"original",c(S.value)}),(P,R)=>e.visible?($(),U(f(Xc),{key:0,open:e.visible,"onUpdate:open":R[6]||(R[6]=D=>r("update:visible",D))},{default:I(()=>[H(f(Qc),{class:"wp:sm:max-w-sm"},{default:I(()=>[H(f(eu),null,{default:I(()=>[H(f(tu),null,{default:I(()=>[...R[7]||(R[7]=[Ne("Audio Settings",-1)])]),_:1})]),_:1}),Q("div",$C,[Q("div",PC,[H(f(yn),null,{default:I(()=>[...R[8]||(R[8]=[Ne("Microphone",-1)])]),_:1}),H(f(ru),{modelValue:f(h),"onUpdate:modelValue":[R[0]||(R[0]=D=>tt(h)?h.value=D:null),k]},{default:I(()=>[H(f(iu),{class:"wp:w-full"},{default:I(()=>[H(f(ou),{placeholder:"Select Microphone"})]),_:1}),H(f(nu),null,{default:I(()=>[H(f(su),null,{default:I(()=>[($(!0),Se(ze,null,gr(d.value,D=>($(),U(f(Wi),{key:D.deviceId,value:D.deviceId,title:D.label},{default:I(()=>[Ne(Be(v(D.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",DC,[H(f(yn),null,{default:I(()=>[...R[9]||(R[9]=[Ne("Speaker",-1)])]),_:1}),H(f(ru),{modelValue:f(m),"onUpdate:modelValue":[R[1]||(R[1]=D=>tt(m)?m.value=D:null),N]},{default:I(()=>[H(f(iu),{class:"wp:w-full"},{default:I(()=>[H(f(ou),{placeholder:"Select Speaker"})]),_:1}),H(f(nu),null,{default:I(()=>[H(f(su),null,{default:I(()=>[($(!0),Se(ze,null,gr(p.value,D=>($(),U(f(Wi),{key:D.deviceId,value:D.deviceId,title:D.label},{default:I(()=>[Ne(Be(v(D.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",OC,[Q("div",HC,[H(f(yn),null,{default:I(()=>[...R[10]||(R[10]=[Ne("Media Volume",-1)])]),_:1}),Q("span",MC,Be(f(w))+"%",1)]),H(f(au),{modelValue:B.value,"onUpdate:modelValue":R[2]||(R[2]=D=>B.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",NC,[Q("div",qC,[H(f(yn),null,{default:I(()=>[...R[11]||(R[11]=[Ne("Notification Volume",-1)])]),_:1}),Q("span",BC,Be(f(x))+"%",1)]),H(f(au),{modelValue:q.value,"onUpdate:modelValue":R[3]||(R[3]=D=>q.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",LC,[Q("div",FC,[H(f(yn),null,{default:I(()=>[...R[12]||(R[12]=[Ne("Volumen del tono",-1)])]),_:1}),Q("span",VC,Be(f(g))+"%",1)]),H(f(au),{modelValue:C.value,"onUpdate:modelValue":R[4]||(R[4]=D=>C.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",jC,[H(f(yn),null,{default:I(()=>[...R[13]||(R[13]=[Ne("Tono de llamada",-1)])]),_:1}),H(f(ru),{"model-value":f(S),"onUpdate:modelValue":_},{default:I(()=>[H(f(iu),{class:"wp:w-full"},{default:I(()=>[H(f(ou),{placeholder:"Seleccionar tono"})]),_:1}),H(f(nu),null,{default:I(()=>[H(f(su),null,{default:I(()=>[H(f(Wi),{value:"original"},{default:I(()=>[...R[14]||(R[14]=[Ne("Original",-1)])]),_:1}),H(f(Wi),{value:"aurora"},{default:I(()=>[...R[15]||(R[15]=[Ne("Aurora",-1)])]),_:1}),H(f(Wi),{value:"resonancia"},{default:I(()=>[...R[16]||(R[16]=[Ne("Resonancia",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])]),H(f(Eg)),Q("div",UC,[Q("div",zC,[H(f(yn),{for:"auto-answer-toggle"},{default:I(()=>[...R[17]||(R[17]=[Ne("Respuesta automática",-1)])]),_:1})]),H(f(IC),{id:"auto-answer-toggle","model-value":f(b),role:"switch","aria-checked":f(b),"aria-label":f(b)?"Desactivar respuesta automática":"Activar respuesta automática",class:Xe(["wp:flex wp:h-7 wp:w-12 wp:shrink-0 wp:cursor-pointer wp:items-center wp:justify-start wp:rounded-full wp:border-0 wp:p-0.5 wp:transition-colors wp:focus-visible:ring-2 wp:focus-visible:ring-primary/50"]),style:Ct({backgroundColor:f(b)?"var(--color-primary-500)":"var(--muted)"}),"onUpdate:modelValue":E},{default:I(()=>[Q("span",{class:Xe(["wp:pointer-events-none wp:block wp:h-6 wp:w-6 wp:shrink-0 wp:rounded-full wp:bg-white wp:shadow-sm wp:transition-transform",f(b)?"wp:translate-x-5":"wp:translate-x-0"])},null,2)]),_:1},8,["model-value","aria-checked","aria-label","style"])]),H(f(Eg)),Q("div",KC,[H(f(yn),{class:"wp:text-base"},{default:I(()=>[...R[18]||(R[18]=[Ne("Atajos de teclado",-1)])]),_:1}),Q("div",WC,[Q("div",GC,[R[19]||(R[19]=Q("span",{class:"wp:text-muted-foreground"},"Historial",-1)),H(f(wn),null,{default:I(()=>[Ne(Be(f(n))+"H",1)]),_:1})]),Q("div",JC,[R[20]||(R[20]=Q("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),H(f(wn),null,{default:I(()=>[Ne(Be(f(n))+",",1)]),_:1})]),Q("div",YC,[R[21]||(R[21]=Q("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),H(f(wn),null,{default:I(()=>[Ne(Be(f(n))+"K",1)]),_:1})]),Q("div",ZC,[R[22]||(R[22]=Q("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),H(f(wn),null,{default:I(()=>[Ne(Be(f(n))+"1",1)]),_:1})]),Q("div",XC,[R[23]||(R[23]=Q("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),H(f(wn),null,{default:I(()=>[Ne(Be(f(n))+"2",1)]),_:1})]),Q("div",QC,[R[24]||(R[24]=Q("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),H(f(wn),null,{default:I(()=>[Ne(Be(f(n))+"3",1)]),_:1})])])])]),H(f(Tg),null,{default:I(()=>[H(f(ht),{variant:"secondary",onClick:R[5]||(R[5]=D=>r("update:visible",!1))},{default:I(()=>[...R[25]||(R[25]=[Ne("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):qe("",!0)}}),tx=ex,rx=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)=>($(),U(f(U2),ye({"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:I(()=>[H(f(K2),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),nx=rx,sx=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)=>($(),U(f(D2),ye({"data-slot":"scroll-area"},f(r),{class:f(dt)("wp:relative",t.class)}),{default:I(()=>[H(f(W2),{"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:I(()=>[te(n.$slots,"default")]),_:3}),H(nx),H(f(H2))]),_:3},16,["class"]))}}),Ag=sx,ix={class:"wp:relative wp:my-2"},ox={class:"wp:flex wp:flex-col wp:gap-2"},ax=["onClick"],lx={class:"wp:flex wp:min-w-0 wp:items-center wp:gap-3"},cx={class:"wp:flex wp:min-w-0 wp:flex-col"},ux={class:"wp:truncate wp:text-sm wp:font-medium"},dx={class:"wp:text-[10px] wp:text-muted-foreground"},fx={class:"wp:flex wp:shrink-0 wp:items-center wp:gap-1"},px={class:"wp:flex wp:flex-col wp:items-end"},hx={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},gx={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},vx=["aria-label","onClick"],mx=["aria-label","onClick"],wx={key:0,class:"wp:py-8 wp:text-center wp:text-muted-foreground"},yx={key:1,class:"wp:py-8 wp:text-center wp:text-muted-foreground"},bx=X({__name:"CallHistoryDialog",props:{visible:{type:Boolean},maskNumber:{type:Boolean},extensions:{},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Vt("webphone"),i=F(""),o=F(null);let a=null;const l=y=>{if(!r.contacts)return y;const T=r.contacts.find(k=>k.number===y);return T?T.name:y},u=y=>{const T=l(y);return r.maskNumber&&T===y?br(y,r.extensions):T},c=y=>!!r.maskNumber&&!Ql(y,r.extensions),d=y=>r.maskNumber?br(y,r.extensions):y,p=V(()=>{if(!i.value)return s.callHistory;const y=i.value.toLowerCase();return s.callHistory.filter(T=>{const k=l(T.number).toLowerCase(),N=d(T.number).toLowerCase();return k.includes(y)||N.includes(y)})}),h=y=>y===0?"":`${Math.floor(y/60)}:${(y%60).toString().padStart(2,"0")}`,m=y=>y.direction==="incoming"?y.status==="missed"?J_:G_:Y_,w=y=>({answered:"Contestada",missed:"Perdida",cancelled:"Cancelada"})[y],x=y=>y.status==="missed"?"wp:text-red-500":y.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",g=y=>{n("update:visible",!1),n("call",y)},S=async y=>{if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(y);return}const T=document.createElement("textarea");T.value=y,T.setAttribute("readonly",""),T.style.position="fixed",T.style.opacity="0",document.body.appendChild(T),T.select();const k=document.execCommand("copy");if(T.remove(),!k)throw new Error("Clipboard is not available")},b=async y=>{if(!c(y.number))try{await S(y.number),o.value=y.id,a!==null&&window.clearTimeout(a),a=window.setTimeout(()=>{o.value===y.id&&(o.value=null),a=null},1600)}catch(T){console.warn("Could not copy call history number:",T)}};return(y,T)=>e.visible?($(),U(f(Xc),{key:0,open:e.visible,"onUpdate:open":T[1]||(T[1]=k=>n("update:visible",k))},{default:I(()=>[H(f(Qc),{class:"wp:sm:max-w-sm"},{default:I(()=>[H(f(eu),null,{default:I(()=>[H(f(tu),null,{default:I(()=>[...T[2]||(T[2]=[Ne("Historial de llamadas",-1)])]),_:1})]),_:1}),Q("div",ix,[H(f(Q_),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),H(f(zi),{modelValue:i.value,"onUpdate:modelValue":T[0]||(T[0]=k=>i.value=k),placeholder:"Buscar en el historial...",class:"wp:pl-8"},null,8,["modelValue"])]),H(f(Ag),{class:"wp:h-[60vh] wp:pr-4"},{default:I(()=>[H(f(Ki),null,{default:I(()=>[Q("div",ox,[($(!0),Se(ze,null,gr(p.value,k=>($(),Se("div",{key:k.id,class:"wp:flex wp:items-center wp:justify-between wp:gap-2 wp:rounded-lg wp:p-2 wp:hover:bg-accent wp:cursor-pointer wp:transition-colors",onClick:N=>g(k.number)},[Q("div",lx,[($(),U(yi(m(k)),{class:Xe([x(k),"wp:h-4 wp:w-4"])},null,8,["class"])),Q("div",cx,[Q("span",ux,Be(u(k.number)),1),Q("span",dx,Be(new Date(k.startTime).toLocaleString("es-CO")),1)])]),Q("div",fx,[Q("div",px,[k.duration>0?($(),Se("span",hx,Be(h(k.duration)),1)):qe("",!0),Q("span",gx,Be(w(k.status)),1)]),c(k.number)?qe("",!0):($(),U(f(Js),{key:0},{default:I(()=>[H(f(Zs),{"as-child":""},{default:I(()=>[Q("button",{type:"button",class:"wp:inline-flex wp:h-8 wp:w-8 wp:items-center wp:justify-center wp:rounded-md wp:text-muted-foreground wp:transition-colors wp:hover:bg-muted wp:hover:text-foreground","aria-label":o.value===k.id?"Número copiado":"Copiar número",onClick:Xt(N=>b(k),["stop"])},[o.value===k.id?($(),U(f(Uc),{key:0,class:"wp:h-4 wp:w-4"})):($(),U(f(j_),{key:1,class:"wp:h-4 wp:w-4"}))],8,vx)]),_:2},1024),H(f(Ys),null,{default:I(()=>[Ne(Be(o.value===k.id?"Número copiado":"Copiar número"),1)]),_:2},1024)]),_:2},1024)),H(f(Js),null,{default:I(()=>[H(f(Zs),{"as-child":""},{default:I(()=>[Q("button",{type:"button",class:"wp:inline-flex wp:h-8 wp:w-8 wp:items-center wp:justify-center wp:rounded-md wp:text-primary wp:transition-colors wp:hover:bg-primary/10","aria-label":"Llamar a "+u(k.number),onClick:Xt(N=>g(k.number),["stop"])},[H(f(W_),{class:"wp:h-4 wp:w-4"})],8,mx)]),_:2},1024),H(f(Ys),null,{default:I(()=>[...T[3]||(T[3]=[Ne("Llamar",-1)])]),_:1})]),_:2},1024)])],8,ax))),128)),f(s).callHistory.length===0?($(),Se("div",wx," No hay historial de llamadas ")):p.value.length===0?($(),Se("div",yx," No se encontraron resultados ")):qe("",!0)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):qe("",!0)}}),_x=bx,Sx={class:"wp:grid wp:gap-4 wp:py-4"},Cx={class:"wp:grid wp:gap-2 wp:relative"},xx={class:"wp:relative"},Tx={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"},Ex={class:"wp:p-1"},Ax=["onClick"],kx={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},Ix={class:"wp:font-medium wp:text-sm wp:truncate"},Rx={class:"wp:text-xs wp:text-muted-foreground"},$x=X({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]},maskNumber:{type:Boolean,default:!1},extensions:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=F(""),i=F(!1),o=F(null);Me(()=>r.visible,h=>{h&&(s.value="",i.value=!1)}),Me(s,h=>{i.value=h.length>0&&l.value.length>0});const a=V(()=>r.maskNumber?r.contacts.filter(h=>Ql(h.number,r.extensions)):r.contacts),l=V(()=>{if(!s.value)return a.value;const h=s.value.toLowerCase();return a.value.filter(m=>m.name.toLowerCase().includes(h)||m.number.includes(h))}),u=h=>{s.value=h.number,i.value=!1},c=()=>{s.value="",i.value=!1,o.value?.focus()},d=h=>{const m=s.value.trim();m&&(n("transfer",m,h),n("update:visible",!1),s.value="",i.value=!1)},p=h=>{h.key==="Enter"&&s.value.trim()?(h.preventDefault(),d("blind")):h.key==="Escape"&&(i.value=!1)};return(h,m)=>e.visible?($(),U(f(Xc),{key:0,open:e.visible,"onUpdate:open":m[5]||(m[5]=w=>n("update:visible",w))},{default:I(()=>[H(f(Qc),{class:"wp:sm:max-w-md"},{default:I(()=>[H(f(eu),null,{default:I(()=>[H(f(tu),null,{default:I(()=>[...m[6]||(m[6]=[Ne("Transferir Llamada",-1)])]),_:1})]),_:1}),Q("div",Sx,[Q("div",Cx,[H(f(yn),{for:"transfer-input"},{default:I(()=>[...m[7]||(m[7]=[Ne("Número o Contacto",-1)])]),_:1}),Q("div",xx,[H(f(zi),{id:"transfer-input",ref_key:"inputRef",ref:o,modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=w=>s.value=w),type:"text",placeholder:"Escribe un número o busca un contacto...",class:"wp:pr-8",onKeydown:p,onFocus:m[1]||(m[1]=w=>i.value=s.value.length>0&&l.value.length>0),autocomplete:"off"},null,8,["modelValue"]),s.value?($(),U(f(ht),{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:c},{default:I(()=>[H(f(Kc),{class:"wp:h-4 wp:w-4"})]),_:1})):qe("",!0)]),i.value&&l.value.length>0?($(),Se("div",Tx,[H(f(Ag),{class:"wp:max-h-60"},{default:I(()=>[Q("div",Ex,[($(!0),Se(ze,null,gr(l.value,w=>($(),Se("div",{key:w.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:x=>u(w)},[w.type?($(),Se("div",{key:0,class:Xe(f(dt)("wp:flex wp:items-center wp:justify-center wp:w-8 wp:h-8 wp:rounded-full wp:shrink-0",w.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":w.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":w.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"))},[w.type==="extension"?($(),U(f(bg),{key:0,class:"wp:w-4 wp:h-4"})):w.type==="contact"?($(),U(f(zc),{key:1,class:"wp:w-4 wp:h-4"})):w.type==="voicemail"?($(),U(f(Cg),{key:2,class:"wp:w-4 wp:h-4"})):($(),U(f(xg),{key:3,class:"wp:w-4 wp:h-4"}))],2)):qe("",!0),Q("div",kx,[Q("span",Ix,Be(w.name),1),Q("span",Rx,Be(w.number),1)])],8,Ax))),128))])]),_:1})])):qe("",!0),m[8]||(m[8]=Q("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),H(f(Tg),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:I(()=>[H(f(ht),{variant:"secondary",onClick:m[2]||(m[2]=w=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:I(()=>[...m[9]||(m[9]=[Ne(" Cancelar ",-1)])]),_:1}),H(f(ht),{onClick:m[3]||(m[3]=w=>d("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:I(()=>[...m[10]||(m[10]=[Ne(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),H(f(ht),{onClick:m[4]||(m[4]=w=>d("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:I(()=>[...m[11]||(m[11]=[Ne(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):qe("",!0)}}),Px=$x,Dx=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",x)}),jt(()=>{document.removeEventListener("visibilitychange",w),window.removeEventListener("blur",x),p&&(clearTimeout(p),p=null),S(),D()});const h=()=>{const W=n.callStatus!=="idle",ae=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&W&&i.value&&ae&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&R()},120))},w=()=>{m()},x=()=>{m()},g=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},S=()=>{c.value&&(clearInterval(c.value),c.value=null)},b=W=>{const ae=Math.floor(W/60),z=W%60;return`${ae.toString().padStart(2,"0")}:${z.toString().padStart(2,"0")}`};Me(()=>n.callStatus,(W,ae)=>{W==="connected"&&ae!=="connected"?g():W==="idle"&&ae!=="idle"&&(S(),o.value&&D())},{immediate:!0}),Me(()=>n.isConnected,W=>{!W&&o.value&&(S(),D())}),Me(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(C(l.value.document),B(l.value.document))});const y=V(()=>i.value&&n.isConnected),T={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>'},k=W=>{const ae=W.createElement("style");ae.textContent=`
76
+ ¿Desea realizar la llamada solo con AUDIO?`)&&T(!1)}else alert("Error al iniciar la llamada: "+(_ instanceof Error?_.message:String(_)))}},k=(C=!1)=>{if(m.onAnswer){m.onAnswer(C);return}i(C)},N=async()=>{await s(),await m.onHangup?.()},v=()=>{if(m.onReject){m.onReject();return}s()},B=V(()=>{const C={};return r.channels.forEach(_=>{const E=_.status==="connected"||_.status==="calling"||_.status==="incoming";C[_.id]=E?"wp:text-[var(--color-red)]":"wp:text-[var(--color-avaible)]"}),C}),q=V(()=>B.value[r.activeChannelId]??"wp:text-[var(--p-primary-color)]");return(C,_)=>($(),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"?($(),Se("div",xS,[b.value?($(),U(f(pt),{key:0,variant:"default",size:"icon",onClick:_[0]||(_[0]=E=>T(!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:I(()=>[O(f(pS),{class:"webphone-actions__button-icon wp:size-7 wp:text-white"}),_[12]||(_[12]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Llamar",-1))]),_:1})):Be("",!0),y.value?($(),U(f(pt),{key:1,variant:"outline",size:"icon",onClick:_[1]||(_[1]=E=>T(!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:I(()=>[O(f(vS),{class:et(["webphone-actions__button-icon wp:size-6 wp:text-primary wp:dark:text-white",q.value])},null,8,["class"]),_[13]||(_[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})):Be("",!0)])):Be("",!0),f(r).callStatus==="incoming"?($(),Se(Ke,{key:1},[f(r).activeChannel?.hasVideo?($(),U(f(pt),{key:0,variant:"default",size:"icon",onClick:_[2]||(_[2]=E=>k(!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:I(()=>[O(f(sS),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-[var(--p-primary-color)]"})]),_:1})):Be("",!0),O(f(pt),{variant:"default",size:"icon",onClick:_[3]||(_[3]=E=>k(!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:I(()=>[O(f(Tg),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1}),O(f(pt),{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:I(()=>[O(f(Jc),{class:"webphone-actions__button-icon wp:w-5 wp:h-5 wp:text-white"})]),_:1})],64)):Be("",!0),f(r).callStatus==="connected"?($(),Se("div",TS,[Q("div",ES,[O(f(pt),{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:I(()=>[f(r).isMuted?($(),U(f(W_),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-disconnected"})):($(),U(f(G_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),O(f(pt),{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:I(()=>[f(r).isHeld?($(),U(f(tS),{key:0,class:"webphone-actions__button-icon wp:size-5 wp:text-status-hold"})):($(),U(f(J_),{key:1,class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"}))]),_:1},8,["variant","onClick"]),x.value?Be("",!0):($(),U(f(pt),{key:0,variant:"secondary",size:"icon",onClick:_[4]||(_[4]=E=>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:I(()=>[O(f(uS),{class:"webphone-actions__button-icon wp:size-5 wp:text-[var(--p-primary-color)]"})]),_:1}))]),Q("div",AS,[O(f(pt),{variant:"ghost",size:"icon",onClick:_[5]||(_[5]=E=>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:I(()=>[f(r).isKeypadVisible?($(),U(f(Zc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):($(),U(f(Yc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),O(f(Ui),{"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:_[6]||(_[6]=Xt(E=>f(r).backspaceKeypad(),["stop"]))},[O(f(Xc),{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:et(["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"},[O(zc)],10,kS),O(f(pt),{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:I(()=>[O(f(Jc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[14]||(_[14]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white wp:text-xs"},"Colgar",-1))]),_:1})])):Be("",!0),f(r).callStatus==="calling"?($(),Se("div",IS,[Q("div",RS,[O(f(pt),{variant:"ghost",size:"icon",onClick:_[7]||(_[7]=E=>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:I(()=>[f(r).isKeypadVisible?($(),U(f(Zc),{key:0,class:"webphone-actions__keypad-toggle-icon wp:size-6"})):($(),U(f(Yc),{key:1,class:"webphone-actions__keypad-toggle-icon wp:size-6"}))]),_:1},8,["aria-label"]),O(f(Ui),{modelValue:f(r).keypadValue,"onUpdate:modelValue":_[8]||(_[8]=E=>f(r).keypadValue=E),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:_[9]||(_[9]=Xt(E=>f(r).backspaceKeypad(),["stop"]))},[O(f(Xc),{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:et(["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"},[O(zc)],10,$S),O(f(pt),{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:I(()=>[O(f(Jc),{class:"webphone-actions__button-icon wp:size-6 wp:text-white"}),_[15]||(_[15]=Q("span",{class:"webphone-actions__button-label wp:w-full wp:text-white"},"Colgar",-1))]),_:1})])):Be("",!0),x.value&&f(r).callStatus==="connected"?($(),Se("div",PS,[O(f(pt),{variant:"default",size:"sm",onClick:_[10]||(_[10]=E=>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:I(()=>[O(f(Kc),{class:"wp:w-4 wp:h-4"}),_[16]||(_[16]=qe(" Completar Transferencia ",-1))]),_:1}),O(f(pt),{variant:"destructive",size:"sm",onClick:_[11]||(_[11]=E=>w("cancelTransfer")),class:"webphone-actions__button webphone-actions__button--cancel-transfer wp:gap-2"},{default:I(()=>[O(f(Gc),{class:"wp:w-4 wp:h-4"}),_[17]||(_[17]=qe(" Cancelar ",-1))]),_:1})])):Be("",!0)],8,CS))}}),OS=DS,HS=X({__name:"Kbd",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Se("kbd",{class:et(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))},[ne(r.$slots,"default")],2))}}),yn=HS,MS={xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 30 23"};function NS(e,t){return $(),Se("svg",MS,[...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:NS},qS=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=Ur(e,t);return(n,s)=>($(),U(f(P_),we({"data-slot":"tooltip"},f(r)),{default:I(i=>[ne(n.$slots,"default",pr(rr(i)))]),_:3},16))}}),Gs=qS,BS=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=Ur(Ut(r,"class"),n);return(i,o)=>($(),U(f(H_),null,{default:I(()=>[O(f(O_),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:I(()=>[ne(i.$slots,"default"),O(f(k_),{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}))}}),Js=BS,LS=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)=>($(),U(f(R_),pr(rr(t)),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),zi=LS,FS=X({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(M_),we({"data-slot":"tooltip-trigger"},t),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),Ys=FS,VS=["data-call-status"],jS={class:"webphone-display__connected-status-label wp:flex wp:gap-2 wp:items-center"},US={class:"webphone-display__duration wp:ibrad wp:font-medium wp:text-sm"},zS={class:"webphone-display__user-row wp:flex wp:items-center wp:gap-2 wp:text-sm font-semibold"},KS={key:2,class:"webphone-display__dialer wp:w-full wp:flex wp:items-center wp:justify-center wp:min-h-10"},WS={class:"webphone-display__dialer-field wp:relative"},GS={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"},JS=["onPointerdown"],YS={class:"webphone-display__contact-content wp:flex wp:flex-col wp:min-w-0"},ZS={class:"webphone-display__contact-name wp:truncate"},XS={class:"webphone-display__contact-number wp:text-xs wp:text-muted-foreground wp:truncate"},QS={key:3,class:"webphone-display__connected-summary wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2 wp:w-full"},eC={class:"webphone-display__caller wp:flex wp:flex-col wp:items-center wp:gap-1"},tC={class:"webphone-display__caller-name wp:text-sm wp:font-semibold wp:text-neutral-800 wp:dark:text-white"},rC={key:0,class:"webphone-display__caller-number wp:text-[10px] wp:text-muted-foreground"},nC={key:4,class:"webphone-display__non-idle wp:flex wp:flex-col wp:items-center wp:justify-center wp:gap-2"},sC={class:"webphone-display__non-idle-row wp:flex wp:items-center wp:gap-4"},iC={class:"webphone-display__non-idle-caller wp:flex wp:flex-col wp:items-center"},oC={class:"webphone-display__non-idle-name wp:text-sm wp:font-medium wp:text-neutral-800 wp:dark:text-white"},aC={key:0,class:"webphone-display__non-idle-number wp:text-sm wp:text-muted-foreground"},lC=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},extensions:{default:()=>[]}},setup(e){const t=Ft("webphone"),r=Ft("sip"),n=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd+":"Ctrl+",s=e,i=V(()=>s.channelId!==void 0?t.channels.find(P=>P.id===s.channelId):t.activeChannel),o=V(()=>{if(!t.isConnected)return"wp:text-status-disconnected";const P=i.value;return P&&P.status!=="idle"?P.isHeld||P.status==="held"?"wp:text-status-hold":P.status==="incoming"?"wp:text-status-incoming":"wp:text-primary":"wp:text-primary"}),a=F(!1),l=F(null),u=F(null),c=P=>P.replace(/[^0-9*#]/g,""),d=P=>{P.ctrlKey||P.metaKey||P.altKey||P.key.length!==1||/[0-9*#]/.test(P.key)||P.preventDefault()},p=P=>{P.data&&c(P.data)!==P.data&&P.preventDefault()};db(l,()=>{a.value=!1});const h=V({get:()=>i.value?.keypadValue||"",set:P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(P)})}}),m=V(()=>/^[0-9*#]+$/.test(h.value)),w=P=>s.maskNumber?_r(P.number,s.extensions):P.number,x=V(()=>{if(!h.value)return s.contacts.slice(0,10);const P=h.value.toLowerCase(),R=[];for(const D of s.contacts)if((D.name.toLowerCase().includes(P)||w(D).includes(P))&&(R.push(D),R.length>=10))break;return R}),g=P=>{i.value&&t.updateChannelState(i.value.id,{keypadValue:c(P.number)}),a.value=!1},S=()=>{!h.value||!m.value||(a.value=!1,r.makeCall(h.value))};Me(h,()=>{a.value=!0});const b=()=>{h.value&&m.value&&S()},y=()=>{a.value=!1},T=()=>{a.value=!0},k=()=>{setTimeout(()=>{a.value=!1},150)},N=F(Date.now());lb(()=>{N.value=Date.now()},1e3);const v=V(()=>{const P=i.value?.startTime,R=i.value?.status||"idle";if(!P||R!=="connected")return"00:00:00";const D=Math.floor((N.value-P)/1e3);return D<0?"00:00:00":`${Math.floor(D/3600).toString().padStart(2,"0")}:${Math.floor(D%3600/60).toString().padStart(2,"0")}:${(D%60).toString().padStart(2,"0")}`}),B=V(()=>{if(!s.isOnline)return"Sin internet";if(!t.isConnected)return"Sin conexión";const P=i.value,R=P?.status||"idle";if(R==="idle")return"Disponible";if(R==="calling")return"Llamando...";if(P?.isHeld){const D=P.remoteNumber||P.keypadValue||"Unknown";return`En espera - ${s.maskNumber?_r(D,s.extensions):D}`}return R==="connected"?"Conectado":R.charAt(0).toUpperCase()+R.slice(1)}),q=P=>{if(!P)return"";const R=P.trim(),D=R.startsWith("+"),G=R.replace(/[^\d]/g,"");return D?`+${G}`:G},C=P=>/\d/.test(P)&&/^[+\d\s().*#-]+$/.test(P.trim()),_=V(()=>{const P=i.value,R=P?.remoteNumber||P?.keypadValue,D=P?.remoteDisplayName;if(!R)return"Unknown";const G=q(R),W=s.contacts?.find(ae=>q(ae.number)===G);return W?s.maskNumber&&C(W.name)?_r(W.name,s.extensions):W.name:D&&D!==R?s.maskNumber&&C(D)?q(D)===G?_r(R,s.extensions):_r(D,s.extensions):D:s.maskNumber?_r(R,s.extensions):R}),E=V(()=>{const P=i.value,R=P?.remoteNumber||P?.keypadValue||"";return s.maskNumber?_r(R,s.extensions):R});return(P,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"?($(),Se("div",{key:0,class:et([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",jS,[O(f(Qc),{class:"webphone-display__connected-status-icon wp:w-4 wp:h-4"}),R[3]||(R[3]=Q("span",{class:"webphone-display__connected-status-text wp:text-sm wp:montserrat wp:font-medium"},"En llamada",-1))]),Q("span",US,Le(v.value),1)],2)):Be("",!0),s.user?($(),Se("span",{key:1,class:et([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",zS,[O(f(Qc),{class:"webphone-display__user-icon wp:size-6 wp:shrink-0 montserrat"}),qe(" "+Le(s.user),1)]),Q("div",{class:et(["webphone-display__status-text wp:font-semibold wp:tracking-wider wp:text-sm wp:text-[var(--color-primary)] montserrat",o.value])},Le(B.value),3)],2)):Be("",!0),(i.value?.status||"idle")==="idle"&&s.allowInput?($(),Se("div",KS,[Q("div",{class:"webphone-display__dialer-container wp:relative wp:w-full wp:max-w-80",ref_key:"containerRef",ref:l},[Q("div",WS,[O(f(zi),null,{default:I(()=>[O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[O(f(pt),{onClick:R[0]||(R[0]=D=>f(t).toggleKeypad()),variant:"ghost",size:"icon",class:et(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:I(()=>[f(t).isKeypadVisible?($(),U(f(Zc),{key:0,class:"webphone-display__keypad-toggle-icon wp:size-5"})):($(),U(f(Yc),{key:1,class:"webphone-display__keypad-toggle-icon wp:size-5"}))]),_:1},8,["class"])]),_:1}),O(f(Js),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1}),O(f(Ui),{ref_key:"inputRef",ref:u,modelValue:h.value,"onUpdate:modelValue":R[1]||(R[1]=D=>h.value=D),type:"text",inputmode:"tel",pattern:"[0-9*#]*",onFocus:T,onBlur:k,onKeydown:[d,ql(b,["enter"]),ql(y,["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:R[2]||(R[2]=Xt(D=>f(t).backspaceKeypad(),["stop"]))},[O(f(Xc),{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"})])]),mo(Q("div",GS,[m.value?($(),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:Xt(S,["prevent"])},[O(f(Tg),{class:"webphone-display__suggestion-icon wp:w-4 wp:h-4 wp:shrink-0"}),Q("span",null,"Marcar "+Le(h.value),1)],32)):Be("",!0),($(!0),Se(Ke,null,vr(x.value,D=>($(),Se("div",{key:D.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:Xt(G=>g(D),["prevent"])},[Q("div",{class:et(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",D.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":D.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":D.type==="voicemail"?"wp:bg-purple-100 wp:text-purple-600 wp:dark:bg-purple-900/30 wp:dark:text-purple-400":D.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"))},[D.type==="extension"?($(),U(f(Cg),{key:0,class:"wp:w-3 wp:h-3"})):D.type==="contact"?($(),U(f(Wc),{key:1,class:"wp:w-3 wp:h-3"})):D.type==="voicemail"?($(),U(f(Eg),{key:2,class:"wp:w-3 wp:h-3"})):D.type==="tool"?($(),U(f(Ag),{key:3,class:"wp:w-3 wp:h-3"})):($(),U(f(Wc),{key:4,class:"wp:w-3 wp:h-3"}))],2),Q("div",YS,[Q("span",ZS,Le(D.name),1),Q("span",XS,Le(w(D)),1)])],40,JS))),128))],512),[[qo,a.value&&h.value&&(x.value.length>0||m.value)]])],512)])):(i.value?.status||"idle")==="connected"?($(),Se("div",QS,[Q("div",eC,[Q("div",tC," En llamada con "+Le(_.value),1),_.value!==E.value?($(),Se("div",rC,Le(E.value),1)):Be("",!0)])])):(i.value?.status||"idle")!=="idle"?($(),Se("div",nC,[Q("div",sC,[Q("div",iC,[Q("div",oC,Le(_.value),1),_.value!==E.value?($(),Se("div",aC,Le(E.value),1)):Be("",!0)]),O(f(zi),null,{default:I(()=>[O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""}),O(f(Js),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[Q("span",null,Le(f(t).isKeypadVisible?"Ocultar":"Mostrar")+" teclado",1),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"K",1)]),_:1})]),_:1})]),_:1})]),_:1})])])):Be("",!0)],8,VS))}}),cC=lC,uC=X({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const r=Ur(e,t);return(n,s)=>($(),U(f(jb),we({"data-slot":"dialog"},f(r)),{default:I(i=>[ne(n.$slots,"default",pr(rr(i)))]),_:3},16))}}),eu=uC,dC=X({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>($(),U(f(l1),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:I(()=>[ne(n.$slots,"default")]),_:3},16,["class"]))}}),fC=dC,pC=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=Ur(Ut(r,"class"),n);return(i,o)=>($(),U(f(c1),null,{default:I(()=>[O(fC),O(f(o1),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:I(()=>[ne(i.$slots,"default"),e.showCloseButton?($(),U(f(Ub),{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:I(()=>[O(f(Gc)),o[0]||(o[0]=Q("span",{class:"wp:sr-only"},"Close",-1))]),_:1})):Be("",!0)]),_:3},16,["class"])]),_:3}))}}),tu=pC,hC=X({__name:"DialogFooter",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Se("div",{"data-slot":"dialog-footer",class:et(f(dt)("wp:flex wp:flex-col-reverse wp:gap-2 wp:sm:flex-row wp:sm:justify-end",t.class))},[ne(r.$slots,"default")],2))}}),kg=hC,gC=X({__name:"DialogHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e;return(r,n)=>($(),Se("div",{"data-slot":"dialog-header",class:et(f(dt)("wp:flex wp:flex-col wp:gap-2 wp:text-center wp:sm:text-left",t.class))},[ne(r.$slots,"default")],2))}}),ru=gC,vC=X({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(Ut(t,"class"));return(n,s)=>($(),U(f(u1),we({"data-slot":"dialog-title"},f(r),{class:f(dt)("wp:text-lg wp:leading-none wp:font-semibold",t.class)}),{default:I(()=>[ne(n.$slots,"default")]),_:3},16,["class"]))}}),nu=vC,mC=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=Ur(e,t);return(n,s)=>($(),U(f(t_),we({"data-slot":"select"},f(r)),{default:I(i=>[ne(n.$slots,"default",pr(rr(i)))]),_:3},16))}}),su=mC,wC=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=Ur(Ut(r,"class"),n);return(i,o)=>($(),U(f(w_),null,{default:I(()=>[O(f(u_),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:I(()=>[O(f(TC)),O(f(C_),{class:et(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:I(()=>[ne(i.$slots,"default")]),_:3},8,["class"]),O(f(CC))]),_:3},16,["class"])]),_:3}))}}),iu=wC,yC=X({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(f_),we({"data-slot":"select-group"},t),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),ou=yC,bC={class:"wp:absolute wp:right-2 wp:flex wp:size-3.5 wp:items-center wp:justify-center"},_C=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=hn(Ut(t,"class"));return(n,s)=>($(),U(f(g_),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:I(()=>[Q("span",bC,[O(f(v_),null,{default:I(()=>[ne(n.$slots,"indicator-icon",{},()=>[O(f(Kc),{class:"wp:size-4"})])]),_:3})]),O(f(m_),null,{default:I(()=>[ne(n.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),Ki=_C,SC=X({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(Ut(t,"class"));return(n,s)=>($(),U(f(y_),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:I(()=>[ne(n.$slots,"default",{},()=>[O(f(xg),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),CC=SC,xC=X({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=hn(Ut(t,"class"));return(n,s)=>($(),U(f(b_),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:I(()=>[ne(n.$slots,"default",{},()=>[O(f(z_),{class:"wp:size-4"})])]),_:3},16,["class"]))}}),TC=xC,EC=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=hn(Ut(t,"class","size"));return(n,s)=>($(),U(f(__),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:I(()=>[ne(n.$slots,"default"),O(f(p_),{"as-child":""},{default:I(()=>[O(f(xg),{class:"wp:size-4 wp:opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),au=EC,AC=X({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(r,n)=>($(),U(f(S_),we({"data-slot":"select-value"},t),{default:I(()=>[ne(r.$slots,"default")]),_:3},16))}}),lu=AC,kC=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=Ur(Ut(r,"class"),n);return(i,o)=>($(),U(f(I2),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:I(({modelValue:a})=>[O(f(D2),{"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:I(()=>[O(f(R2),{"data-slot":"slider-range",class:"wp:bg-primary wp:absolute wp:data-[orientation=horizontal]:h-full wp:data-[orientation=vertical]:w-full"})]),_:1}),($(!0),Se(Ke,null,vr(a,(l,u)=>($(),U(f(P2),{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"]))}}),cu=kC,IC=X({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>($(),U(f(O2),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:I(()=>[ne(n.$slots,"default")]),_:3},16,["class"]))}}),bn=IC,RC=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=Ut(t,"class");return(n,s)=>($(),U(f(T_),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"]))}}),Ig=RC,$C=X({__name:"Toggle",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]},variant:{default:"default"},size:{default:"default"}},emits:["update:modelValue"],setup(e,{emit:t}){const r=e,n=t,s=Ur(Ut(r,"class","size","variant"),n);return(i,o)=>($(),U(f(A_),we({"data-slot":"toggle"},f(s),{class:f(dt)(f(DC)({variant:e.variant,size:e.size}),r.class)}),{default:I(a=>[ne(i.$slots,"default",pr(rr(a)))]),_:3},16,["class"]))}}),PC=$C;const DC=eh("wp:inline-flex wp:items-center wp:justify-center wp:gap-2 wp:rounded-md wp:text-sm wp:font-medium wp:hover:bg-muted wp:hover:text-muted-foreground wp:disabled:pointer-events-none wp:disabled:opacity-50 wp:data-[state=on]:bg-accent wp:data-[state=on]:text-accent-foreground wp:[&_svg]:pointer-events-none wp:[&_svg:not([class*='size-'])]:size-4 wp:[&_svg]:shrink-0 wp:focus-visible:border-ring wp:focus-visible:ring-ring/50 wp:focus-visible:ring-[3px] wp:outline-none wp:transition-[color,box-shadow] wp:aria-invalid:ring-destructive/20 wp:dark:aria-invalid:ring-destructive/40 wp:aria-invalid:border-destructive wp:whitespace-nowrap",{variants:{variant:{default:"wp:bg-transparent",outline:"wp:border wp:border-input wp:bg-transparent wp:shadow-xs wp:hover:bg-accent wp:hover:text-accent-foreground"},size:{default:"wp:h-9 wp:px-2 wp:min-w-9",sm:"wp:h-8 wp:px-1.5 wp:min-w-8",lg:"wp:h-10 wp:px-2.5 wp:min-w-10"}},defaultVariants:{variant:"default",size:"default"}});var OC={class:"wp:flex wp:flex-col wp:gap-6 wp:py-4"},HC={class:"wp:flex wp:flex-col wp:gap-2"},MC={class:"wp:flex wp:flex-col wp:gap-2"},NC={class:"wp:flex wp:flex-col wp:gap-4"},qC={class:"wp:flex wp:justify-between"},BC={class:"wp:text-sm wp:text-muted-foreground"},LC={class:"wp:flex wp:flex-col wp:gap-4"},FC={class:"wp:flex wp:justify-between"},VC={class:"wp:text-sm wp:text-muted-foreground"},jC={class:"wp:flex wp:flex-col wp:gap-2"},UC={class:"wp:flex wp:justify-between"},zC={class:"wp:text-sm wp:text-muted-foreground"},KC={class:"wp:flex wp:flex-col wp:gap-2"},WC={class:"wp:flex wp:items-center wp:justify-between wp:gap-4"},GC={class:"wp:flex wp:flex-col wp:gap-1"},JC={class:"wp:flex wp:flex-col wp:gap-3"},YC={class:"wp:grid wp:grid-cols-2 wp:gap-2 wp:text-sm"},ZC={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"},QC={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},ex={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},tx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},rx={class:"wp:flex wp:items-center wp:justify-between wp:gap-2"},nx=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=cs("webphone-input-device",""),m=cs("webphone-output-device",""),w=cs("webphone-volume",100),x=cs("webphone-notification-volume",100),g=cs("webphone-ringtone-volume",100),S=cs("webphone-ringtone-tone","original"),b=cs(Yp,!1),y={classic:"original","original-loud":"aurora","original-intense":"resonancia"},T=async()=>{try{await navigator.mediaDevices.getUserMedia({audio:!0});const P=await navigator.mediaDevices.enumerateDevices();d.value=P.filter(G=>G.kind==="audioinput").map((G,W)=>({deviceId:G.deviceId,label:G.label||`Microphone ${W+1}`})),p.value=P.filter(G=>G.kind==="audiooutput").map((G,W)=>({deviceId:G.deviceId,label:G.label||`Speaker ${W+1}`}));const R=d.value.some(G=>G.deviceId===h.value);(!h.value||!R)&&d.value.length>0&&(h.value=d.value[0]?.deviceId??"");const D=p.value.some(G=>G.deviceId===m.value);(!m.value||!D)&&p.value.length>0&&(m.value=p.value[0]?.deviceId??""),h.value&&a(h.value),m.value&&o(m.value)}catch(P){console.error("Error loading devices",P)}},k=P=>{const R=String(P);h.value=R,a(R)},N=P=>{const R=String(P);m.value=R,o(R)},v=(P,R=35)=>P.length<=R?P:P.substring(0,R)+"...",B=V({get:()=>[w.value],set:P=>{w.value=P[0],i(w.value)}}),q=V({get:()=>[x.value],set:P=>{x.value=P[0],l(x.value)}}),C=V({get:()=>[g.value],set:P=>{g.value=P[0]??100,u(g.value)}}),_=P=>{S.value=String(P),c(S.value)},E=P=>{b.value=P};return tt(()=>{T(),i(w.value),l(x.value),u(g.value),localStorage.removeItem("webphone-custom-ringtone");const P=y[S.value]??S.value;S.value=["original","aurora","resonancia"].includes(P)?P:"original",c(S.value)}),(P,R)=>e.visible?($(),U(f(eu),{key:0,open:e.visible,"onUpdate:open":R[6]||(R[6]=D=>r("update:visible",D))},{default:I(()=>[O(f(tu),{class:"wp:sm:max-w-sm"},{default:I(()=>[O(f(ru),null,{default:I(()=>[O(f(nu),null,{default:I(()=>[...R[7]||(R[7]=[qe("Audio Settings",-1)])]),_:1})]),_:1}),Q("div",OC,[Q("div",HC,[O(f(bn),null,{default:I(()=>[...R[8]||(R[8]=[qe("Microphone",-1)])]),_:1}),O(f(su),{modelValue:f(h),"onUpdate:modelValue":[R[0]||(R[0]=D=>rt(h)?h.value=D:null),k]},{default:I(()=>[O(f(au),{class:"wp:w-full"},{default:I(()=>[O(f(lu),{placeholder:"Select Microphone"})]),_:1}),O(f(iu),null,{default:I(()=>[O(f(ou),null,{default:I(()=>[($(!0),Se(Ke,null,vr(d.value,D=>($(),U(f(Ki),{key:D.deviceId,value:D.deviceId,title:D.label},{default:I(()=>[qe(Le(v(D.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",MC,[O(f(bn),null,{default:I(()=>[...R[9]||(R[9]=[qe("Speaker",-1)])]),_:1}),O(f(su),{modelValue:f(m),"onUpdate:modelValue":[R[1]||(R[1]=D=>rt(m)?m.value=D:null),N]},{default:I(()=>[O(f(au),{class:"wp:w-full"},{default:I(()=>[O(f(lu),{placeholder:"Select Speaker"})]),_:1}),O(f(iu),null,{default:I(()=>[O(f(ou),null,{default:I(()=>[($(!0),Se(Ke,null,vr(p.value,D=>($(),U(f(Ki),{key:D.deviceId,value:D.deviceId,title:D.label},{default:I(()=>[qe(Le(v(D.label)),1)]),_:2},1032,["value","title"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"])]),Q("div",NC,[Q("div",qC,[O(f(bn),null,{default:I(()=>[...R[10]||(R[10]=[qe("Media Volume",-1)])]),_:1}),Q("span",BC,Le(f(w))+"%",1)]),O(f(cu),{modelValue:B.value,"onUpdate:modelValue":R[2]||(R[2]=D=>B.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",LC,[Q("div",FC,[O(f(bn),null,{default:I(()=>[...R[11]||(R[11]=[qe("Notification Volume",-1)])]),_:1}),Q("span",VC,Le(f(x))+"%",1)]),O(f(cu),{modelValue:q.value,"onUpdate:modelValue":R[3]||(R[3]=D=>q.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",jC,[Q("div",UC,[O(f(bn),null,{default:I(()=>[...R[12]||(R[12]=[qe("Volumen del tono",-1)])]),_:1}),Q("span",zC,Le(f(g))+"%",1)]),O(f(cu),{modelValue:C.value,"onUpdate:modelValue":R[4]||(R[4]=D=>C.value=D),max:100,step:1},null,8,["modelValue"])]),Q("div",KC,[O(f(bn),null,{default:I(()=>[...R[13]||(R[13]=[qe("Tono de llamada",-1)])]),_:1}),O(f(su),{"model-value":f(S),"onUpdate:modelValue":_},{default:I(()=>[O(f(au),{class:"wp:w-full"},{default:I(()=>[O(f(lu),{placeholder:"Seleccionar tono"})]),_:1}),O(f(iu),null,{default:I(()=>[O(f(ou),null,{default:I(()=>[O(f(Ki),{value:"original"},{default:I(()=>[...R[14]||(R[14]=[qe("Original",-1)])]),_:1}),O(f(Ki),{value:"aurora"},{default:I(()=>[...R[15]||(R[15]=[qe("Aurora",-1)])]),_:1}),O(f(Ki),{value:"resonancia"},{default:I(()=>[...R[16]||(R[16]=[qe("Resonancia",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["model-value"])]),O(f(Ig)),Q("div",WC,[Q("div",GC,[O(f(bn),{for:"auto-answer-toggle"},{default:I(()=>[...R[17]||(R[17]=[qe("Respuesta automática",-1)])]),_:1})]),O(f(PC),{id:"auto-answer-toggle","model-value":f(b),role:"switch","aria-checked":f(b),"aria-label":f(b)?"Desactivar respuesta automática":"Activar respuesta automática",class:et(["wp:flex wp:h-7 wp:w-12 wp:shrink-0 wp:cursor-pointer wp:items-center wp:justify-start wp:rounded-full wp:border-0 wp:p-0.5 wp:transition-colors wp:focus-visible:ring-2 wp:focus-visible:ring-primary/50"]),style:St({backgroundColor:f(b)?"var(--color-primary-500)":"var(--muted)"}),"onUpdate:modelValue":E},{default:I(()=>[Q("span",{class:et(["wp:pointer-events-none wp:block wp:h-6 wp:w-6 wp:shrink-0 wp:rounded-full wp:bg-white wp:shadow-sm wp:transition-transform",f(b)?"wp:translate-x-5":"wp:translate-x-0"])},null,2)]),_:1},8,["model-value","aria-checked","aria-label","style"])]),O(f(Ig)),Q("div",JC,[O(f(bn),{class:"wp:text-base"},{default:I(()=>[...R[18]||(R[18]=[qe("Atajos de teclado",-1)])]),_:1}),Q("div",YC,[Q("div",ZC,[R[19]||(R[19]=Q("span",{class:"wp:text-muted-foreground"},"Historial",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"H",1)]),_:1})]),Q("div",XC,[R[20]||(R[20]=Q("span",{class:"wp:text-muted-foreground"},"Configuración",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+",",1)]),_:1})]),Q("div",QC,[R[21]||(R[21]=Q("span",{class:"wp:text-muted-foreground"},"Teclado",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"K",1)]),_:1})]),Q("div",ex,[R[22]||(R[22]=Q("span",{class:"wp:text-muted-foreground"},"Línea 1",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"1",1)]),_:1})]),Q("div",tx,[R[23]||(R[23]=Q("span",{class:"wp:text-muted-foreground"},"Línea 2",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"2",1)]),_:1})]),Q("div",rx,[R[24]||(R[24]=Q("span",{class:"wp:text-muted-foreground"},"Línea 3",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(n))+"3",1)]),_:1})])])])]),O(f(kg),null,{default:I(()=>[O(f(pt),{variant:"secondary",onClick:R[5]||(R[5]=D=>r("update:visible",!1))},{default:I(()=>[...R[25]||(R[25]=[qe("Close",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Be("",!0)}}),sx=nx,ix=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=Ut(t,"class");return(n,s)=>($(),U(f(W2),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:I(()=>[O(f(J2),{"data-slot":"scroll-area-thumb",class:"wp:bg-border wp:relative wp:flex-1 wp:rounded-full"})]),_:1},16,["class"]))}}),ox=ix,ax=X({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const t=e,r=Ut(t,"class");return(n,s)=>($(),U(f(M2),we({"data-slot":"scroll-area"},f(r),{class:f(dt)("wp:relative",t.class)}),{default:I(()=>[O(f(Y2),{"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:I(()=>[ne(n.$slots,"default")]),_:3}),O(ox),O(f(q2))]),_:3},16,["class"]))}}),Rg=ax,lx={class:"wp:relative wp:my-2"},cx={class:"wp:flex wp:flex-col wp:gap-2"},ux=["onClick"],dx={class:"wp:flex wp:min-w-0 wp:items-center wp:gap-3"},fx={class:"wp:flex wp:min-w-0 wp:flex-col"},px={class:"wp:truncate wp:text-sm wp:font-medium"},hx={class:"wp:text-[10px] wp:text-muted-foreground"},gx={class:"wp:flex wp:shrink-0 wp:items-center wp:gap-1"},vx={class:"wp:flex wp:flex-col wp:items-end"},mx={key:0,class:"wp:text-xs wp:font-mono wp:text-muted-foreground"},wx={class:"wp:text-[10px] wp:text-muted-foreground wp:capitalize"},yx=["aria-label","onClick"],bx=["aria-label","onClick"],_x={key:0,class:"wp:py-8 wp:text-center wp:text-muted-foreground"},Sx={key:1,class:"wp:py-8 wp:text-center wp:text-muted-foreground"},Cx=X({__name:"CallHistoryDialog",props:{visible:{type:Boolean},maskNumber:{type:Boolean},extensions:{},contacts:{}},emits:["update:visible","call"],setup(e,{emit:t}){const r=e,n=t,s=Ft("webphone"),i=F(""),o=F(null);let a=null;const l=y=>{if(!r.contacts)return y;const T=r.contacts.find(k=>k.number===y);return T?T.name:y},u=y=>{const T=l(y);return r.maskNumber&&T===y?_r(y,r.extensions):T},c=y=>!!r.maskNumber&&!tc(y,r.extensions),d=y=>r.maskNumber?_r(y,r.extensions):y,p=V(()=>{if(!i.value)return s.callHistory;const y=i.value.toLowerCase();return s.callHistory.filter(T=>{const k=l(T.number).toLowerCase(),N=d(T.number).toLowerCase();return k.includes(y)||N.includes(y)})}),h=y=>y===0?"":`${Math.floor(y/60)}:${(y%60).toString().padStart(2,"0")}`,m=y=>y.direction==="incoming"?y.status==="missed"?X_:Z_:Q_,w=y=>({answered:"Contestada",missed:"Perdida",cancelled:"Cancelada"})[y],x=y=>y.status==="missed"?"wp:text-red-500":y.direction==="incoming"?"wp:text-green-500":"wp:text-blue-500",g=y=>{n("update:visible",!1),n("call",y)},S=async y=>{if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(y);return}const T=document.createElement("textarea");T.value=y,T.setAttribute("readonly",""),T.style.position="fixed",T.style.opacity="0",document.body.appendChild(T),T.select();const k=document.execCommand("copy");if(T.remove(),!k)throw new Error("Clipboard is not available")},b=async y=>{if(!c(y.number))try{await S(y.number),o.value=y.id,a!==null&&window.clearTimeout(a),a=window.setTimeout(()=>{o.value===y.id&&(o.value=null),a=null},1600)}catch(T){console.warn("Could not copy call history number:",T)}};return(y,T)=>e.visible?($(),U(f(eu),{key:0,open:e.visible,"onUpdate:open":T[1]||(T[1]=k=>n("update:visible",k))},{default:I(()=>[O(f(tu),{class:"wp:sm:max-w-sm"},{default:I(()=>[O(f(ru),null,{default:I(()=>[O(f(nu),null,{default:I(()=>[...T[2]||(T[2]=[qe("Historial de llamadas",-1)])]),_:1})]),_:1}),Q("div",lx,[O(f(rS),{class:"wp:absolute wp:left-2 wp:top-2.5 wp:h-4 wp:w-4 wp:text-muted-foreground"}),O(f(Ui),{modelValue:i.value,"onUpdate:modelValue":T[0]||(T[0]=k=>i.value=k),placeholder:"Buscar en el historial...",class:"wp:pl-8"},null,8,["modelValue"])]),O(f(Rg),{class:"wp:h-[60vh] wp:pr-4"},{default:I(()=>[O(f(zi),null,{default:I(()=>[Q("div",cx,[($(!0),Se(Ke,null,vr(p.value,k=>($(),Se("div",{key:k.id,class:"wp:flex wp:items-center wp:justify-between wp:gap-2 wp:rounded-lg wp:p-2 wp:hover:bg-accent wp:cursor-pointer wp:transition-colors",onClick:N=>g(k.number)},[Q("div",dx,[($(),U(wi(m(k)),{class:et([x(k),"wp:h-4 wp:w-4"])},null,8,["class"])),Q("div",fx,[Q("span",px,Le(u(k.number)),1),Q("span",hx,Le(new Date(k.startTime).toLocaleString("es-CO")),1)])]),Q("div",gx,[Q("div",vx,[k.duration>0?($(),Se("span",mx,Le(h(k.duration)),1)):Be("",!0),Q("span",wx,Le(w(k.status)),1)]),c(k.number)?Be("",!0):($(),U(f(Gs),{key:0},{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[Q("button",{type:"button",class:"wp:inline-flex wp:h-8 wp:w-8 wp:items-center wp:justify-center wp:rounded-md wp:text-muted-foreground wp:transition-colors wp:hover:bg-muted wp:hover:text-foreground","aria-label":o.value===k.id?"Número copiado":"Copiar número",onClick:Xt(N=>b(k),["stop"])},[o.value===k.id?($(),U(f(Kc),{key:0,class:"wp:h-4 wp:w-4"})):($(),U(f(K_),{key:1,class:"wp:h-4 wp:w-4"}))],8,yx)]),_:2},1024),O(f(Js),null,{default:I(()=>[qe(Le(o.value===k.id?"Número copiado":"Copiar número"),1)]),_:2},1024)]),_:2},1024)),O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[Q("button",{type:"button",class:"wp:inline-flex wp:h-8 wp:w-8 wp:items-center wp:justify-center wp:rounded-md wp:text-primary wp:transition-colors wp:hover:bg-primary/10","aria-label":"Llamar a "+u(k.number),onClick:Xt(N=>g(k.number),["stop"])},[O(f(Y_),{class:"wp:h-4 wp:w-4"})],8,bx)]),_:2},1024),O(f(Js),null,{default:I(()=>[...T[3]||(T[3]=[qe("Llamar",-1)])]),_:1})]),_:2},1024)])],8,ux))),128)),f(s).callHistory.length===0?($(),Se("div",_x," No hay historial de llamadas ")):p.value.length===0?($(),Se("div",Sx," No se encontraron resultados ")):Be("",!0)])]),_:1})]),_:1})]),_:1})]),_:1},8,["open"])):Be("",!0)}}),xx=Cx,Tx={class:"wp:grid wp:gap-4 wp:py-4"},Ex={class:"wp:grid wp:gap-2 wp:relative"},Ax={class:"wp:relative"},kx={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"},Ix={class:"wp:p-1"},Rx=["onClick"],$x={class:"wp:flex wp:flex-col wp:min-w-0 wp:flex-1"},Px={class:"wp:font-medium wp:text-sm wp:truncate"},Dx={class:"wp:text-xs wp:text-muted-foreground"},Ox=X({__name:"TransferDialog",props:{visible:{type:Boolean},contacts:{default:()=>[]},maskNumber:{type:Boolean,default:!1},extensions:{default:()=>[]}},emits:["update:visible","transfer"],setup(e,{emit:t}){const r=e,n=t,s=F(""),i=F(!1),o=F(null);Me(()=>r.visible,h=>{h&&(s.value="",i.value=!1)}),Me(s,h=>{i.value=h.length>0&&l.value.length>0});const a=V(()=>r.maskNumber?r.contacts.filter(h=>tc(h.number,r.extensions)):r.contacts),l=V(()=>{if(!s.value)return a.value;const h=s.value.toLowerCase();return a.value.filter(m=>m.name.toLowerCase().includes(h)||m.number.includes(h))}),u=h=>{s.value=h.number,i.value=!1},c=()=>{s.value="",i.value=!1,o.value?.focus()},d=h=>{const m=s.value.trim();m&&(n("transfer",m,h),n("update:visible",!1),s.value="",i.value=!1)},p=h=>{h.key==="Enter"&&s.value.trim()?(h.preventDefault(),d("blind")):h.key==="Escape"&&(i.value=!1)};return(h,m)=>e.visible?($(),U(f(eu),{key:0,open:e.visible,"onUpdate:open":m[5]||(m[5]=w=>n("update:visible",w))},{default:I(()=>[O(f(tu),{class:"wp:sm:max-w-md"},{default:I(()=>[O(f(ru),null,{default:I(()=>[O(f(nu),null,{default:I(()=>[...m[6]||(m[6]=[qe("Transferir Llamada",-1)])]),_:1})]),_:1}),Q("div",Tx,[Q("div",Ex,[O(f(bn),{for:"transfer-input"},{default:I(()=>[...m[7]||(m[7]=[qe("Número o Contacto",-1)])]),_:1}),Q("div",Ax,[O(f(Ui),{id:"transfer-input",ref_key:"inputRef",ref:o,modelValue:s.value,"onUpdate:modelValue":m[0]||(m[0]=w=>s.value=w),type:"text",placeholder:"Escribe un número o busca un contacto...",class:"wp:pr-8",onKeydown:p,onFocus:m[1]||(m[1]=w=>i.value=s.value.length>0&&l.value.length>0),autocomplete:"off"},null,8,["modelValue"]),s.value?($(),U(f(pt),{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:c},{default:I(()=>[O(f(Gc),{class:"wp:h-4 wp:w-4"})]),_:1})):Be("",!0)]),i.value&&l.value.length>0?($(),Se("div",kx,[O(f(Rg),{class:"wp:max-h-60"},{default:I(()=>[Q("div",Ix,[($(!0),Se(Ke,null,vr(l.value,w=>($(),Se("div",{key:w.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:x=>u(w)},[w.type?($(),Se("div",{key:0,class:et(f(dt)("wp:flex wp:items-center wp:justify-center wp:w-8 wp:h-8 wp:rounded-full wp:shrink-0",w.type==="extension"?"wp:bg-blue-100 wp:text-blue-600 wp:dark:bg-blue-900/30 wp:dark:text-blue-400":w.type==="contact"?"wp:bg-emerald-100 wp:text-emerald-600 wp:dark:bg-emerald-900/30 wp:dark:text-emerald-400":w.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"))},[w.type==="extension"?($(),U(f(Cg),{key:0,class:"wp:w-4 wp:h-4"})):w.type==="contact"?($(),U(f(Wc),{key:1,class:"wp:w-4 wp:h-4"})):w.type==="voicemail"?($(),U(f(Eg),{key:2,class:"wp:w-4 wp:h-4"})):($(),U(f(Ag),{key:3,class:"wp:w-4 wp:h-4"}))],2)):Be("",!0),Q("div",$x,[Q("span",Px,Le(w.name),1),Q("span",Dx,Le(w.number),1)])],8,Rx))),128))])]),_:1})])):Be("",!0),m[8]||(m[8]=Q("p",{class:"wp:text-xs wp:text-muted-foreground"}," Presiona Enter para transferir directamente ",-1))])]),O(f(kg),{class:"wp:flex-col wp:gap-2 sm:wp:flex-row"},{default:I(()=>[O(f(pt),{variant:"secondary",onClick:m[2]||(m[2]=w=>n("update:visible",!1)),class:"wp:w-full sm:wp:w-auto"},{default:I(()=>[...m[9]||(m[9]=[qe(" Cancelar ",-1)])]),_:1}),O(f(pt),{onClick:m[3]||(m[3]=w=>d("blind")),disabled:!s.value.trim(),variant:"outline",class:"wp:w-full sm:wp:flex-1"},{default:I(()=>[...m[10]||(m[10]=[qe(" Transferencia Ciega ",-1)])]),_:1},8,["disabled"]),O(f(pt),{onClick:m[4]||(m[4]=w=>d("attended")),disabled:!s.value.trim(),class:"wp:w-full sm:wp:flex-1"},{default:I(()=>[...m[11]||(m[11]=[qe(" Con Consulta ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])):Be("",!0)}}),Hx=Ox,Mx=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;tt(()=>{i.value="documentPictureInPicture"in window,document.addEventListener("visibilitychange",w),window.addEventListener("blur",x)}),Vt(()=>{document.removeEventListener("visibilitychange",w),window.removeEventListener("blur",x),p&&(clearTimeout(p),p=null),S(),D()});const h=()=>{const W=n.callStatus!=="idle",ae=document.hidden||!document.hasFocus();return n.autoOpenOnBlur!==!1&&W&&i.value&&ae&&!o.value&&!a.value},m=()=>{h()&&(p&&clearTimeout(p),p=setTimeout(()=>{h()&&R()},120))},w=()=>{m()},x=()=>{m()},g=()=>{c.value||(u.value=0,c.value=setInterval(()=>{u.value++},1e3))},S=()=>{c.value&&(clearInterval(c.value),c.value=null)},b=W=>{const ae=Math.floor(W/60),Y=W%60;return`${ae.toString().padStart(2,"0")}:${Y.toString().padStart(2,"0")}`};Me(()=>n.callStatus,(W,ae)=>{W==="connected"&&ae!=="connected"?g():W==="idle"&&ae!=="idle"&&(S(),o.value&&D())},{immediate:!0}),Me(()=>n.isConnected,W=>{!W&&o.value&&(S(),D())}),Me(()=>[n.callStatus,n.isMuted,n.isHeld],()=>{l.value&&(C(l.value.document),B(l.value.document))});const y=V(()=>i.value&&n.isConnected),T={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>'},k=W=>{const ae=W.createElement("style");ae.textContent=`
77
77
  * { box-sizing: border-box; margin: 0; padding: 0; }
78
78
 
79
79
  body {
@@ -298,4 +298,4 @@ Duration=160`,contentType:"application/dtmf-relay",contentDisposition:"signal"}}
298
298
  <div class="pip-duration" id="pip-timer">${b(u.value)}</div>
299
299
  </div>
300
300
  <div class="pip-actions" id="pip-actions"></div>
301
- `,ae},C=W=>{const ae=W.getElementById("pip-actions");if(ae){if(ae.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const pe=W.createElement("button");pe.className="pip-btn pip-btn-video",pe.title="Contestar con Video",pe.innerHTML=T.video,pe.onclick=()=>s("answer",!0),ae.appendChild(pe)}const z=W.createElement("button");z.className="pip-btn pip-btn-answer",z.title="Contestar",z.innerHTML=T.phone,z.onclick=()=>s("answer",!1),ae.appendChild(z);const ce=W.createElement("button");ce.className="pip-btn pip-btn-hangup",ce.title="Rechazar",ce.innerHTML=T.phoneOff,ce.onclick=()=>{s("hangup"),D()},ae.appendChild(ce)}else if(n.callStatus==="connected"){const z=W.createElement("button");z.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,z.title=n.isMuted?"Activar micrófono":"Silenciar",z.innerHTML=n.isMuted?T.micOff:T.mic,z.onclick=()=>s("toggleMute"),ae.appendChild(z);const ce=W.createElement("button");ce.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,ce.title=n.isHeld?"Reanudar":"Pausar",ce.innerHTML=n.isHeld?T.play:T.pause,ce.onclick=()=>s("toggleHold"),ae.appendChild(ce);const pe=W.createElement("button");pe.className="pip-btn pip-btn-transfer",pe.title="Transferir",pe.innerHTML=T.transfer,pe.onclick=()=>s("transfer"),ae.appendChild(pe);const Pe=W.createElement("button");Pe.className="pip-btn pip-btn-hangup",Pe.title="Colgar",Pe.innerHTML=T.phoneOff,Pe.onclick=()=>{s("hangup"),D()},ae.appendChild(Pe)}else if(n.callStatus==="calling"){const z=W.createElement("button");z.className="pip-btn pip-btn-hangup",z.title="Cancelar",z.innerHTML=T.phoneOff,z.onclick=()=>{s("hangup"),D()},ae.appendChild(z)}}},_=W=>{setTimeout(()=>{const ae=W.getElementById("pip-remote-video"),z=W.getElementById("pip-local-video");ae&&n.remoteStream&&(ae.srcObject=n.remoteStream,ae.play().catch(()=>{})),z&&n.localStream&&(z.srcObject=n.localStream,z.play().catch(()=>{}))},50)},E=W=>{const ae=W.getElementById("pip-timer");ae&&(d=setInterval(()=>{ae.textContent=b(u.value)},1e3))},P=()=>{d&&(clearInterval(d),d=null)},R=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const W=n.hasVideo?340:280,ae=n.hasVideo?280:200,z=await window.documentPictureInPicture.requestWindow({width:W,height:ae,preferInitialWindowPlacement:!0});l.value=z,o.value=!0,s("update:active",!0),k(z.document);const ce=q(z.document);z.document.body.appendChild(ce),n.hasVideo&&_(z.document),C(z.document),E(z.document),z.addEventListener("pagehide",()=>{P(),o.value=!1,l.value=null,s("update:active",!1)})}catch(W){console.error("[DocumentPip] Error:",W)}finally{a.value=!1}}},D=()=>{P(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:R,close:D,toggle:()=>{o.value?D():R()},isActive:o,isSupported:i,canUsePip:y}),(W,ae)=>te(W.$slots,"default")}}),Ox=Dx,Hx=["data-mode","data-call-status","data-network-status"],Mx={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},Nx={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"},qx={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},Bx={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"},Lx={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"},Fx={class:"wp:flex"},Vx=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],jx={class:"webphone__display wp:py-1"},Ux=["data-visible"],zx={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"},Kx={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},Wx=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},extensions:{default:()=>[]},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=V(()=>{if(s.wsUrl)return s.wsUrl;if(s.host)return`wss://${s.host}/ws`}),a=V(()=>!o.value||!s.extension?"":`${o.value}::${s.extension}`),l=a.value?n.get(a.value):void 0,u=J0({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=Xr(u),d=Dy(u,{onCallContext:Z=>i("call-context",Z),onCallState:Z=>i("call-state",Z),onMediaReady:Z=>i("media-ready",Z)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:w}=d;Xn("webphone",c),Xn("sip",d),t({stop:d.stop}),ct(()=>{s.mode==="webcall"&&(s.to||console.error('WebPhone: "to" prop is required when mode is "webcall"'),s.logo||console.error('WebPhone: "logo" prop is required when mode is "webcall"'))});const x=F(!1),g=F(!1),S=F(!1),b=F(null),y=F(null),T=F(null),k=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",N=V(()=>s.mode==="webcall"),v=F(0),B=Z=>!!Z&&Z.getVideoTracks().length>0;Me(()=>c.callStatus,Z=>{if(Z==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}Z!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const q=V(()=>c.channels.find(Z=>Z.id===c.activeChannelId)??null),C=Z=>{if(!Z)return"";const le=Z.trim(),he=le.startsWith("+"),ft=le.replace(/[^\d]/g,"");return he?`+${ft}`:ft},_=V(()=>{const Z=q.value?.remoteNumber||c.remoteNumber,le=C(Z),he=s.contacts.find(ft=>C(ft.number)===le);return he?.name?s.maskNumber&&/^[+\d\s().*#-]+$/.test(he.name.trim())?br(he.name,s.extensions):he.name:s.maskNumber&&Z?br(Z,s.extensions):Z||"Llamada"}),E=V(()=>{const Z=q.value?.remoteNumber||c.remoteNumber;return s.maskNumber?br(Z,s.extensions):Z}),P=V(()=>(v.value,!!q.value?.hasVideo||B(m.value)||B(w.value))),{isOnline:R}=yb(),D=V(()=>!R.value),J=F(null),W=F(!1),ae=V(()=>s.enablePictureInPicture),z=()=>{ae.value&&J.value?.toggle()},ce=async(Z,le)=>{try{le==="blind"?await d.transferCall(Z):await d.startAttendedTransfer(Z)}catch(he){console.error("[WebPhone] Transfer error:",he),alert(he instanceof Error?he.message:"Transfer failed. Please try again.")}},pe=async()=>{try{await d.completeAttendedTransfer()}catch(Z){console.error("[WebPhone] Complete transfer error:",Z),alert(Z instanceof Error?Z.message:"Failed to complete transfer.")}},Pe=async()=>{try{await d.cancelAttendedTransfer()}catch(Z){console.error("[WebPhone] Cancel transfer error:",Z),alert(Z instanceof Error?Z.message:"Failed to cancel transfer.")}},Fe=Z=>{c.keypadValue=Z,d.makeCall(Z)},Ee=Z=>{if(s.onAnswer){s.onAnswer(Z);return}d.answerCall(Z)},He=async()=>{await d.hangupCall(),await s.onHangup?.()},nt=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},bt=()=>{S.value=!0,J.value?.close(),window.focus()},We=()=>{if(!ae.value)return!1;const Z=c.callStatus!=="idle",le=document.hidden||!document.hasFocus();return Z&&le&&!W.value},ot=()=>{window.setTimeout(()=>{We()&&J.value?.open()},150)};ct(()=>{y.value&&(W.value||!m.value?y.value.srcObject=null:y.value.srcObject=m.value),T.value&&(W.value||!w.value?T.value.srcObject=null:T.value.srcObject=w.value)});const _t=Z=>{if(!Z||typeof Z.addEventListener!="function"||typeof Z.removeEventListener!="function")return()=>{};const le=()=>{v.value+=1};return Z.addEventListener("addtrack",le),Z.addEventListener("removetrack",le),()=>{Z.removeEventListener("addtrack",le),Z.removeEventListener("removetrack",le)}};Me(m,(Z,le,he)=>{v.value+=1,he(_t(Z))},{immediate:!0}),Me(w,(Z,le,he)=>{v.value+=1,he(_t(Z))},{immediate:!0});const lt=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),A=()=>{const Z=window.innerWidth<640,le=window.innerWidth<1024;let he=360;return Z?he=window.innerWidth*.9:le&&(he=340),{x:Math.max(0,(window.innerWidth-he)/2),y:Z?30:80}},{x:O,y:Y,style:se}=wb(b,{initialValue:V(()=>{const Z=A();return{x:s.position.x??Z.x,y:s.position.y??Z.y}}).value,preventDefault:!0,onStart:(Z,le)=>{const he=le.target;if(he instanceof HTMLElement&&he.closest(lt))return!1}});Me(()=>s.position,Z=>{const le=A();O.value=Z.x??le.x,Y.value=Z.y??le.y},{deep:!0});const re=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],ee=F(!1),de=V({get:()=>c.activeChannelId.toString(),set:async Z=>{if(!D.value&&Z&&!ee.value){ee.value=!0;try{await h(parseInt(Z))}finally{ee.value=!1}}}}),fe=Z=>{const le=c.channels.find(he=>he.id===Z);return le?le.status==="connected"||le.status==="calling"||le.status==="incoming":!1},ue=Z=>{const le=c.channels.find(he=>he.id===Z);return le?le.isHeld||le.status==="held":!1},ne=Z=>{D.value||(de.value=Z.toString())},ke=Z=>{if(!D.value&&((Z.metaKey||Z.ctrlKey)&&Z.key.toLowerCase()==="h"&&(Z.preventDefault(),g.value=!0),(Z.metaKey||Z.ctrlKey)&&Z.key===","&&(Z.preventDefault(),x.value=!0),(Z.metaKey||Z.ctrlKey)&&Z.key.toLowerCase()==="k"&&(Z.preventDefault(),c.toggleKeypad()),(Z.metaKey||Z.ctrlKey)&&["1","2","3"].includes(Z.key))){Z.preventDefault();const le=parseInt(Z.key)-1;ee.value||(ee.value=!0,h(le).finally(()=>{ee.value=!1}))}};Me(()=>c.callStatus,()=>{We()&&ot()}),Me(()=>c.isConnected,Z=>{a.value&&n.set(a.value,Z)},{immediate:!0}),Me(ae,Z=>{!Z&&W.value&&J.value?.close()});const we=F(!1),Te=async()=>{we.value||D.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&&(we.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},Ie=()=>Te(),Ve=async()=>{await d.stop(),we.value=!1};return Xn("webphoneRegistration",{isConnected:V(()=>c.isConnected),register:Ie,unregister:Ve}),Qe(async()=>{window.addEventListener("keydown",ke),document.addEventListener("visibilitychange",ot),window.addEventListener("blur",ot),window.addEventListener("pagehide",ot),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await Te()}),Me(()=>R.value,async Z=>{Z&&await Te()}),jt(()=>{d.stop(),window.removeEventListener("keydown",ke),document.removeEventListener("visibilitychange",ot),window.removeEventListener("blur",ot),window.removeEventListener("pagehide",ot)}),(Z,le)=>($(),Se(ze,null,[Q("div",{ref_key:"phoneRef",ref:b,style:Ct(f(se)),class:Xe(["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",D.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":D.value?"offline":"online"},[P.value&&!W.value?($(),Se("div",Mx,[Q("video",{ref_key:"remoteVideoRef",ref:y,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),Q("div",Nx,[Q("video",{ref_key:"localVideoRef",ref:T,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):qe("",!0),Q("div",qx,[N.value?qe("",!0):($(),Se("div",Bx,[Q("div",Lx,[Q("div",Fx,[($(),Se(ze,null,gr(re,he=>Q("button",{key:he.value,type:"button",role:"radio","aria-checked":de.value===he.value.toString(),disabled:D.value,title:`${he.label} (${f(k)}${he.value+1})`,class:Xe(["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(he.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":fe(he.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":de.value===he.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":he.value,"data-state":de.value===he.value.toString()?"active":"idle","data-call-state":ue(he.value)?"held":fe(he.value)?"busy":"available",onClick:ft=>ne(he.value)},[H(f(Zc),{class:Xe(["webphone__channel-icon wp:size-3 wp:shrink-0",ue(he.value)?"wp:text-status-hold":fe(he.value)?"wp:text-[var(--color-red)]":de.value===he.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),Q("span",{class:Xe(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",ue(he.value)?"wp:text-status-hold":fe(he.value)?"wp:text-[var(--color-red)]":de.value===he.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},Be(he.label),3)],10,Vx)),64))]),H(f(Ki),null,{default:I(()=>[H(f(Js),null,{default:I(()=>[H(f(Zs),{"as-child":""},{default:I(()=>[H(f(ht),{variant:"ghost",size:"icon",class:Xe(["wp:h-8 wp:w-8 wp:rounded-full",W.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:z},{default:I(()=>[H(f(Z_),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),H(f(Ys),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[...le[8]||(le[8]=[Q("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),H(f(Ki),null,{default:I(()=>[H(f(Js),null,{default:I(()=>[H(f(Zs),{"as-child":""},{default:I(()=>[H(f(ht),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:le[0]||(le[0]=he=>x.value=!0)},{default:I(()=>[H(f(eS),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),H(f(Ys),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[le[9]||(le[9]=Q("span",null,"Configuración",-1)),H(f(wn),null,{default:I(()=>[Ne(Be(f(k))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),Q("div",jx,[($(!0),Se(ze,null,gr(c.channels,he=>mo(($(),U(oC,{key:he.id,"channel-id":he.id,"allow-input":!N.value,"is-web-call":N.value,"is-online":f(R),contacts:s.contacts,user:s.extension,"mask-number":s.maskNumber,extensions:s.extensions},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user","mask-number","extensions"])),[[qo,he.id===c.activeChannelId]])),128))]),Q("div",{class:Xe(["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"},[H(jc)],10,Ux),H($S,{class:"webphone__actions",style:Ct(D.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:le[1]||(le[1]=he=>S.value=!0),onCompleteTransfer:pe,onCancelTransfer:Pe},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),D.value?($(),Se("div",zx,[...le[10]||(le[10]=[Q("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):qe("",!0),N.value?($(),Se("div",Kx,[...le[11]||(le[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)])])):qe("",!0)],14,Hx),H(tx,{visible:x.value,"onUpdate:visible":le[2]||(le[2]=he=>x.value=he)},null,8,["visible"]),H(_x,{visible:g.value,"onUpdate:visible":le[3]||(le[3]=he=>g.value=he),contacts:s.contacts,"mask-number":s.maskNumber,extensions:s.extensions,onCall:Fe},null,8,["visible","contacts","mask-number","extensions"]),H(Px,{visible:S.value,"onUpdate:visible":le[4]||(le[4]=he=>S.value=he),contacts:s.contacts,"mask-number":s.maskNumber,extensions:s.extensions,onTransfer:ce},null,8,["visible","contacts","mask-number","extensions"]),H(Ox,{ref_key:"documentPipRef",ref:J,active:W.value,"onUpdate:active":le[5]||(le[5]=he=>W.value=he),"auto-open-on-blur":ae.value,"is-connected":c.isConnected,"remote-number":E.value,"caller-name":_.value,"has-video":P.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:bt,onTransferRequest:ce,onHangup:He,onReject:nt,onAnswer:Ee,onToggleMute:le[6]||(le[6]=he=>f(d).toggleMute()),onToggleHold:le[7]||(le[7]=he=>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))}}),Gx=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},Jx=Gx(Wx,[["__scopeId","data-v-be5461fa"]]),Yx=Dl({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 vr(Jx,{...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
+ `,ae},C=W=>{const ae=W.getElementById("pip-actions");if(ae){if(ae.innerHTML="",n.callStatus==="incoming"){if(n.hasVideo){const pe=W.createElement("button");pe.className="pip-btn pip-btn-video",pe.title="Contestar con Video",pe.innerHTML=T.video,pe.onclick=()=>s("answer",!0),ae.appendChild(pe)}const Y=W.createElement("button");Y.className="pip-btn pip-btn-answer",Y.title="Contestar",Y.innerHTML=T.phone,Y.onclick=()=>s("answer",!1),ae.appendChild(Y);const le=W.createElement("button");le.className="pip-btn pip-btn-hangup",le.title="Rechazar",le.innerHTML=T.phoneOff,le.onclick=()=>{s("hangup"),D()},ae.appendChild(le)}else if(n.callStatus==="connected"){const Y=W.createElement("button");Y.className=`pip-btn pip-btn-mute ${n.isMuted?"active":""}`,Y.title=n.isMuted?"Activar micrófono":"Silenciar",Y.innerHTML=n.isMuted?T.micOff:T.mic,Y.onclick=()=>s("toggleMute"),ae.appendChild(Y);const le=W.createElement("button");le.className=`pip-btn pip-btn-hold ${n.isHeld?"active":""}`,le.title=n.isHeld?"Reanudar":"Pausar",le.innerHTML=n.isHeld?T.play:T.pause,le.onclick=()=>s("toggleHold"),ae.appendChild(le);const pe=W.createElement("button");pe.className="pip-btn pip-btn-transfer",pe.title="Transferir",pe.innerHTML=T.transfer,pe.onclick=()=>s("transfer"),ae.appendChild(pe);const Ae=W.createElement("button");Ae.className="pip-btn pip-btn-hangup",Ae.title="Colgar",Ae.innerHTML=T.phoneOff,Ae.onclick=()=>{s("hangup"),D()},ae.appendChild(Ae)}else if(n.callStatus==="calling"){const Y=W.createElement("button");Y.className="pip-btn pip-btn-hangup",Y.title="Cancelar",Y.innerHTML=T.phoneOff,Y.onclick=()=>{s("hangup"),D()},ae.appendChild(Y)}}},_=W=>{setTimeout(()=>{const ae=W.getElementById("pip-remote-video"),Y=W.getElementById("pip-local-video");ae&&n.remoteStream&&(ae.srcObject=n.remoteStream,ae.play().catch(()=>{})),Y&&n.localStream&&(Y.srcObject=n.localStream,Y.play().catch(()=>{}))},50)},E=W=>{const ae=W.getElementById("pip-timer");ae&&(d=setInterval(()=>{ae.textContent=b(u.value)},1e3))},P=()=>{d&&(clearInterval(d),d=null)},R=async()=>{if(!(!i.value||o.value||a.value)){a.value=!0;try{const W=n.hasVideo?340:280,ae=n.hasVideo?280:200,Y=await window.documentPictureInPicture.requestWindow({width:W,height:ae,preferInitialWindowPlacement:!0});l.value=Y,o.value=!0,s("update:active",!0),k(Y.document);const le=q(Y.document);Y.document.body.appendChild(le),n.hasVideo&&_(Y.document),C(Y.document),E(Y.document),Y.addEventListener("pagehide",()=>{P(),o.value=!1,l.value=null,s("update:active",!1)})}catch(W){console.error("[DocumentPip] Error:",W)}finally{a.value=!1}}},D=()=>{P(),l.value&&(l.value.close(),l.value=null,o.value=!1,s("update:active",!1))};return t({open:R,close:D,toggle:()=>{o.value?D():R()},isActive:o,isSupported:i,canUsePip:y}),(W,ae)=>ne(W.$slots,"default")}}),Nx=Mx,qx=["data-mode","data-call-status","data-network-status"],Bx={key:0,class:"webphone__video-area wp:relative wp:w-full wp:aspect-video wp:bg-black"},Lx={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"},Fx={class:"webphone__body wp:flex wp:flex-col wp:gap-1 wp:space-y-2"},Vx={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"},jx={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"},zx=["aria-checked","disabled","title","data-channel-id","data-state","data-call-state","onClick"],Kx={class:"webphone__display wp:py-1"},Wx=["data-visible"],Gx={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"},Jx={key:2,class:"webphone__footer wp:flex wp:flex-col wp:items-center wp:p-2 wp:gap-0"},Yx=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},extensions:{default:()=>[]},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=V(()=>{if(s.wsUrl)return s.wsUrl;if(s.host)return`wss://${s.host}/ws`}),a=V(()=>!o.value||!s.extension?"":`${o.value}::${s.extension}`),l=a.value?n.get(a.value):void 0,u=X0({server:o.value,extension:s.extension,initialConnected:l,initialKeypadVisible:s.initialKeypadVisible}),c=Qr(u),d=My(u,{onCallContext:Z=>i("call-context",Z),onCallState:Z=>i("call-state",Z),onMediaReady:Z=>i("media-ready",Z)}),{initUserAgent:p,switchChannel:h,remoteStream:m,localStream:w}=d;Xn("webphone",c),Xn("sip",d),t({stop:d.stop}),ct(()=>{s.mode==="webcall"&&(s.to||console.error('WebPhone: "to" prop is required when mode is "webcall"'),s.logo||console.error('WebPhone: "logo" prop is required when mode is "webcall"'))});const x=F(!1),g=F(!1),S=F(!1),b=F(null),y=F(null),T=F(null),k=navigator.platform.toUpperCase().indexOf("MAC")>=0?"⌘":"Ctrl+",N=V(()=>s.mode==="webcall"),v=F(0),B=Z=>!!Z&&Z.getVideoTracks().length>0;Me(()=>c.callStatus,Z=>{if(Z==="idle"&&!c.isKeypadVisible){c.toggleKeypad();return}Z!=="idle"&&c.isKeypadVisible&&c.toggleKeypad()});const q=V(()=>c.channels.find(Z=>Z.id===c.activeChannelId)??null),C=Z=>{if(!Z)return"";const ce=Z.trim(),he=ce.startsWith("+"),st=ce.replace(/[^\d]/g,"");return he?`+${st}`:st},_=V(()=>{const Z=q.value?.remoteNumber||c.remoteNumber,ce=C(Z),he=s.contacts.find(st=>C(st.number)===ce);return he?.name?s.maskNumber&&/^[+\d\s().*#-]+$/.test(he.name.trim())?_r(he.name,s.extensions):he.name:s.maskNumber&&Z?_r(Z,s.extensions):Z||"Llamada"}),E=V(()=>{const Z=q.value?.remoteNumber||c.remoteNumber;return s.maskNumber?_r(Z,s.extensions):Z}),P=V(()=>(v.value,!!q.value?.hasVideo||B(m.value)||B(w.value))),{isOnline:R}=Sb(),D=V(()=>!R.value),G=F(null),W=F(!1),ae=V(()=>s.enablePictureInPicture),Y=()=>{ae.value&&G.value?.toggle()},le=async(Z,ce)=>{try{ce==="blind"?await d.transferCall(Z):await d.startAttendedTransfer(Z)}catch(he){console.error("[WebPhone] Transfer error:",he),alert(he instanceof Error?he.message:"Transfer failed. Please try again.")}},pe=async()=>{try{await d.completeAttendedTransfer()}catch(Z){console.error("[WebPhone] Complete transfer error:",Z),alert(Z instanceof Error?Z.message:"Failed to complete transfer.")}},Ae=async()=>{try{await d.cancelAttendedTransfer()}catch(Z){console.error("[WebPhone] Cancel transfer error:",Z),alert(Z instanceof Error?Z.message:"Failed to cancel transfer.")}},je=Z=>{c.keypadValue=Z,d.makeCall(Z)},Ie=Z=>{if(s.onAnswer){s.onAnswer(Z);return}d.answerCall(Z)},Oe=async()=>{await d.hangupCall(),await s.onHangup?.()},Xe=()=>{if(s.onReject){s.onReject();return}d.hangupCall()},yt=()=>{S.value=!0,G.value?.close(),window.focus()},Ne=()=>{if(!ae.value)return!1;const Z=c.callStatus!=="idle",ce=document.hidden||!document.hasFocus();return Z&&ce&&!W.value},at=()=>{window.setTimeout(()=>{Ne()&&G.value?.open()},150)};ct(()=>{y.value&&(W.value||!m.value?y.value.srcObject=null:y.value.srcObject=m.value),T.value&&(W.value||!w.value?T.value.srcObject=null:T.value.srcObject=w.value)});const bt=Z=>{if(!Z||typeof Z.addEventListener!="function"||typeof Z.removeEventListener!="function")return()=>{};const ce=()=>{v.value+=1};return Z.addEventListener("addtrack",ce),Z.addEventListener("removetrack",ce),()=>{Z.removeEventListener("addtrack",ce),Z.removeEventListener("removetrack",ce)}};Me(m,(Z,ce,he)=>{v.value+=1,he(bt(Z))},{immediate:!0}),Me(w,(Z,ce,he)=>{v.value+=1,he(bt(Z))},{immediate:!0});const Tt=["button","a","input","textarea","select","label","video",'[role="button"]','[role="radio"]',"[data-no-drag]"].join(", "),A=()=>{const Z=window.innerWidth<640,ce=window.innerWidth<1024;let he=360;return Z?he=window.innerWidth*.9:ce&&(he=340),{x:Math.max(0,(window.innerWidth-he)/2),y:Z?30:80}},{x:H,y:J,style:se}=_b(b,{initialValue:V(()=>{const Z=A();return{x:s.position.x??Z.x,y:s.position.y??Z.y}}).value,preventDefault:!0,onStart:(Z,ce)=>{const he=ce.target;if(he instanceof HTMLElement&&he.closest(Tt))return!1}});Me(()=>s.position,Z=>{const ce=A();H.value=Z.x??ce.x,J.value=Z.y??ce.y},{deep:!0});const re=[{label:"Canal 1",value:0},{label:"Canal 2",value:1},{label:"Canal 3",value:2}],ee=F(!1),fe=V({get:()=>c.activeChannelId.toString(),set:async Z=>{if(!D.value&&Z&&!ee.value){ee.value=!0;try{await h(parseInt(Z))}finally{ee.value=!1}}}}),de=Z=>{const ce=c.channels.find(he=>he.id===Z);return ce?ce.status==="connected"||ce.status==="calling"||ce.status==="incoming":!1},ue=Z=>{const ce=c.channels.find(he=>he.id===Z);return ce?ce.isHeld||ce.status==="held":!1},ie=Z=>{D.value||(fe.value=Z.toString())},Re=Z=>{if(!D.value&&((Z.metaKey||Z.ctrlKey)&&Z.key.toLowerCase()==="h"&&(Z.preventDefault(),g.value=!0),(Z.metaKey||Z.ctrlKey)&&Z.key===","&&(Z.preventDefault(),x.value=!0),(Z.metaKey||Z.ctrlKey)&&Z.key.toLowerCase()==="k"&&(Z.preventDefault(),c.toggleKeypad()),(Z.metaKey||Z.ctrlKey)&&["1","2","3"].includes(Z.key))){Z.preventDefault();const ce=parseInt(Z.key)-1;ee.value||(ee.value=!0,h(ce).finally(()=>{ee.value=!1}))}};Me(()=>c.callStatus,()=>{Ne()&&at()}),Me(()=>c.isConnected,Z=>{a.value&&n.set(a.value,Z)},{immediate:!0}),Me(ae,Z=>{!Z&&W.value&&G.value?.close()});const ge=F(!1),Te=async()=>{ge.value||D.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&&(ge.value=!0,s.mode==="webcall"&&s.to&&d.makeCall(s.to)))},He=()=>Te(),Ve=async()=>{await d.stop(),ge.value=!1};return Xn("webphoneRegistration",{isConnected:V(()=>c.isConnected),register:He,unregister:Ve}),tt(async()=>{window.addEventListener("keydown",Re),document.addEventListener("visibilitychange",at),window.addEventListener("blur",at),window.addEventListener("pagehide",at),!(s.mode==="webcall"&&(!s.to||!s.logo))&&await Te()}),Me(()=>R.value,async Z=>{Z&&await Te()}),Vt(()=>{d.stop(),window.removeEventListener("keydown",Re),document.removeEventListener("visibilitychange",at),window.removeEventListener("blur",at),window.removeEventListener("pagehide",at)}),(Z,ce)=>($(),Se(Ke,null,[Q("div",{ref_key:"phoneRef",ref:b,style:St(f(se)),class:et(["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",D.value?"wp:opacity-70":""]),"data-mode":s.mode,"data-call-status":c.callStatus,"data-network-status":D.value?"offline":"online"},[P.value&&!W.value?($(),Se("div",Bx,[Q("video",{ref_key:"remoteVideoRef",ref:y,autoplay:"",playsinline:"",class:"webphone__video-remote wp:w-full wp:h-full wp:object-cover"},null,512),Q("div",Lx,[Q("video",{ref_key:"localVideoRef",ref:T,autoplay:"",playsinline:"",muted:"",class:"webphone__video-local wp:w-full wp:h-full wp:object-cover"},null,512)])])):Be("",!0),Q("div",Fx,[N.value?Be("",!0):($(),Se("div",Vx,[Q("div",jx,[Q("div",Ux,[($(),Se(Ke,null,vr(re,he=>Q("button",{key:he.value,type:"button",role:"radio","aria-checked":fe.value===he.value.toString(),disabled:D.value,title:`${he.label} (${f(k)}${he.value+1})`,class:et(["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(he.value)?"wp:bg-status-hold/12 hover:wp:bg-status-hold/18":de(he.value)?"wp:bg-[var(--color-red)]/12 hover:wp:bg-[var(--color-red)]/18":fe.value===he.value.toString()?"wp:bg-[var(--p-primary-color)]/12":"wp:hover:bg-neutral-100 wp:dark:hover:bg-neutral-800/80"]),"data-channel-id":he.value,"data-state":fe.value===he.value.toString()?"active":"idle","data-call-state":ue(he.value)?"held":de(he.value)?"busy":"available",onClick:st=>ie(he.value)},[O(f(Qc),{class:et(["webphone__channel-icon wp:size-3 wp:shrink-0",ue(he.value)?"wp:text-status-hold":de(he.value)?"wp:text-[var(--color-red)]":fe.value===he.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-400"]),"stroke-width":1.8},null,8,["class"]),Q("span",{class:et(["webphone__channel-label wp:text-[11px] wp:leading-none manrope wp:font-bold",ue(he.value)?"wp:text-status-hold":de(he.value)?"wp:text-[var(--color-red)]":fe.value===he.value.toString()?"wp:text-[var(--p-primary-color)]":"wp:text-neutral-500 wp:dark:text-neutral-400"])},Le(he.label),3)],10,zx)),64))]),O(f(zi),null,{default:I(()=>[O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[O(f(pt),{variant:"ghost",size:"icon",class:et(["wp:h-8 wp:w-8 wp:rounded-full",W.value?"wp:text-primary":""]),title:"Picture-in-Picture",onClick:Y},{default:I(()=>[O(f(eS),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1},8,["class"])]),_:1}),O(f(Js),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[...ce[8]||(ce[8]=[Q("span",null,"Picture-in-Picture",-1)])]),_:1})]),_:1})]),_:1}),O(f(zi),null,{default:I(()=>[O(f(Gs),null,{default:I(()=>[O(f(Ys),{"as-child":""},{default:I(()=>[O(f(pt),{variant:"ghost",size:"icon",class:"wp:h-8 wp:w-8 wp:rounded-full",onClick:ce[0]||(ce[0]=he=>x.value=!0)},{default:I(()=>[O(f(nS),{class:"wp:w-4 wp:h-4 wp:text-[var(--color-settings)]"})]),_:1})]),_:1}),O(f(Js),{class:"wp:flex wp:items-center wp:gap-2"},{default:I(()=>[ce[9]||(ce[9]=Q("span",null,"Configuración",-1)),O(f(yn),null,{default:I(()=>[qe(Le(f(k))+",",1)]),_:1})]),_:1})]),_:1})]),_:1})])])),Q("div",Kx,[($(!0),Se(Ke,null,vr(c.channels,he=>mo(($(),U(cC,{key:he.id,"channel-id":he.id,"allow-input":!N.value,"is-web-call":N.value,"is-online":f(R),contacts:s.contacts,user:s.extension,"mask-number":s.maskNumber,extensions:s.extensions},null,8,["channel-id","allow-input","is-web-call","is-online","contacts","user","mask-number","extensions"])),[[qo,he.id===c.activeChannelId]])),128))]),Q("div",{class:et(["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"},[O(zc)],10,Wx),O(OS,{class:"webphone__actions",style:St(D.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]=he=>S.value=!0),onCompleteTransfer:pe,onCancelTransfer:Ae},null,8,["style","destination","is-video","on-answer","on-hangup","on-reject"])]),D.value?($(),Se("div",Gx,[...ce[10]||(ce[10]=[Q("span",{class:"wp:text-sm wp:font-semibold wp:text-status-disconnected"},"Sin internet",-1)])])):Be("",!0),N.value?($(),Se("div",Jx,[...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)])])):Be("",!0)],14,qx),O(sx,{visible:x.value,"onUpdate:visible":ce[2]||(ce[2]=he=>x.value=he)},null,8,["visible"]),O(xx,{visible:g.value,"onUpdate:visible":ce[3]||(ce[3]=he=>g.value=he),contacts:s.contacts,"mask-number":s.maskNumber,extensions:s.extensions,onCall:je},null,8,["visible","contacts","mask-number","extensions"]),O(Hx,{visible:S.value,"onUpdate:visible":ce[4]||(ce[4]=he=>S.value=he),contacts:s.contacts,"mask-number":s.maskNumber,extensions:s.extensions,onTransfer:le},null,8,["visible","contacts","mask-number","extensions"]),O(Nx,{ref_key:"documentPipRef",ref:G,active:W.value,"onUpdate:active":ce[5]||(ce[5]=he=>W.value=he),"auto-open-on-blur":ae.value,"is-connected":c.isConnected,"remote-number":E.value,"caller-name":_.value,"has-video":P.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:yt,onTransferRequest:le,onHangup:Oe,onReject:Xe,onAnswer:Ie,onToggleMute:ce[6]||(ce[6]=he=>f(d).toggleMute()),onToggleHold:ce[7]||(ce[7]=he=>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))}}),Zx=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},Xx=Zx(Yx,[["__scopeId","data-v-be5461fa"]]),Qx=Hl({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 mr(Xx,{...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",Qx)})();