diff --git a/docs/assets/index-4e4d7186.css b/docs/assets/index-4e4d7186.css deleted file mode 100644 index 1f7660b..0000000 --- a/docs/assets/index-4e4d7186.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Montserrat:wght@200&family=Oswald:wght@300&display=swap";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pointer-events-none{pointer-events:none}.\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.left-10{left:2.5rem}.top-0{top:0}.\!-m-px{margin:-1px!important}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.mb-3{margin-bottom:.75rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.\!h-px{height:1px!important}.h-4{height:1rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[58px\]{height:58px}.min-h-screen{min-height:100vh}.\!w-px{width:1px!important}.w-11{width:2.75rem}.w-4{width:1rem}.w-8{width:2rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.origin-\[0_0\]{transform-origin:0 0}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.list-disc{list-style-type:disc}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.items-center{align-items:center}.justify-between{justify-content:space-between}.\!overflow-hidden{overflow:hidden!important}.\!whitespace-nowrap{white-space:nowrap!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:.75rem}.\!border-0{border-width:0px!important}.border{border-width:1px}.border-4{border-width:4px}.border-solid{border-style:solid}.border-current{border-color:currentColor}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.border-neutral-300{--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-r-transparent{border-right-color:transparent}.bg-\[\#FBFBFB\]{--tw-bg-opacity: 1;background-color:rgb(251 251 251 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-clip-padding{background-clip:padding-box}.\!p-0{padding:0!important}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.align-\[-0\.125em\]{vertical-align:-.125em}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-tight{line-height:1.25}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-700{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,_transform\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear{transition-timing-function:linear}.\!\[clip\:rect\(0\,0\,0\,0\)\]{clip:rect(0,0,0,0)!important}.placeholder\:text-transparent::-moz-placeholder{color:transparent}.placeholder\:text-transparent::placeholder{color:transparent}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:pb-\[0\.625rem\]:focus{padding-bottom:.625rem}.focus\:pt-\[1\.625rem\]:focus{padding-top:1.625rem}.focus\:text-neutral-700:focus{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.peer:focus~.peer-focus\:-translate-y-2{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:translate-x-\[0\.15rem\]{--tw-translate-x: .15rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:scale-\[0\.85\]{--tw-scale-x: .85;--tw-scale-y: .85;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:-moz-placeholder-shown)~.peer-\[\:not\(\:-moz-placeholder-shown\)\]\:-translate-y-2{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:placeholder-shown)~.peer-\[\:not\(\:placeholder-shown\)\]\:-translate-y-2{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:-moz-placeholder-shown)~.peer-\[\:not\(\:-moz-placeholder-shown\)\]\:translate-x-\[0\.15rem\]{--tw-translate-x: .15rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:placeholder-shown)~.peer-\[\:not\(\:placeholder-shown\)\]\:translate-x-\[0\.15rem\]{--tw-translate-x: .15rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:-moz-placeholder-shown)~.peer-\[\:not\(\:-moz-placeholder-shown\)\]\:scale-\[0\.85\]{--tw-scale-x: .85;--tw-scale-y: .85;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:placeholder-shown)~.peer-\[\:not\(\:placeholder-shown\)\]\:scale-\[0\.85\]{--tw-scale-x: .85;--tw-scale-y: .85;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (prefers-reduced-motion: reduce){@keyframes spin{to{transform:rotate(360deg)}}.motion-reduce\:animate-\[spin_1\.5s_linear_infinite\]{animation:spin 1.5s linear infinite}.motion-reduce\:transition-none{transition-property:none}}:is(.dark .dark\:border-neutral-600){--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity))}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-sky-800){--tw-bg-opacity: 1;background-color:rgb(7 89 133 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-sky-950){--tw-bg-opacity: 1;background-color:rgb(8 47 73 / var(--tw-bg-opacity))}:is(.dark .dark\:text-neutral-200){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (min-width: 1024px){.lg\:py-4{padding-top:1rem;padding-bottom:1rem}}.\[\&\:not\(\:-moz-placeholder-shown\)\]\:pb-\[0\.625rem\]:not(:-moz-placeholder-shown){padding-bottom:.625rem}.\[\&\:not\(\:placeholder-shown\)\]\:pb-\[0\.625rem\]:not(:placeholder-shown){padding-bottom:.625rem}.\[\&\:not\(\:-moz-placeholder-shown\)\]\:pt-\[1\.625rem\]:not(:-moz-placeholder-shown){padding-top:1.625rem}.\[\&\:not\(\:placeholder-shown\)\]\:pt-\[1\.625rem\]:not(:placeholder-shown){padding-top:1.625rem}.message-enter-active[data-v-e583e2cf]{animation:modal .3s ease-out}.message-leave-active[data-v-e583e2cf]{animation:modal .3s ease-in reverse}@keyframes message-e583e2cf{0%{opacity:0;transform:translateY(-50px) scale(.9)}to{opacity:1;transform:translateY(0) scale(1)}}input[data-v-c198f371]{border:.25px solid;border-radius:7px;width:400px}*{font-family:Montserrat,sans-serif;text-align:center} diff --git a/docs/assets/index-57932b2f.css b/docs/assets/index-57932b2f.css new file mode 100644 index 0000000..ce16519 --- /dev/null +++ b/docs/assets/index-57932b2f.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Montserrat:wght@200&family=Oswald:wght@300&display=swap";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.left-10{left:2.5rem}.top-0{top:0}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.my-4{margin-top:1rem;margin-bottom:1rem}.mb-3{margin-bottom:.75rem}.ml-2{margin-left:.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-32{height:8rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-\[58px\]{height:58px}.min-h-screen{min-height:100vh}.w-11{width:2.75rem}.w-4{width:1rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-md{max-width:28rem}.origin-\[0_0\]{transform-origin:0 0}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.list-disc{list-style-type:disc}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-solid{border-style:solid}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity))}.border-neutral-300{--tw-border-opacity: 1;border-color:rgb(212 212 212 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.bg-\[\#FBFBFB\]{--tw-bg-opacity: 1;background-color:rgb(251 251 251 / var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-clip-padding{background-clip:padding-box}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0{padding-top:0;padding-bottom:0}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-tight{line-height:1.25}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-700{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,_transform\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-linear{transition-timing-function:linear}.placeholder\:text-transparent::-moz-placeholder{color:transparent}.placeholder\:text-transparent::placeholder{color:transparent}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\:pb-\[0\.625rem\]:focus{padding-bottom:.625rem}.focus\:pt-\[1\.625rem\]:focus{padding-top:1.625rem}.focus\:text-neutral-700:focus{--tw-text-opacity: 1;color:rgb(64 64 64 / var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.peer:focus~.peer-focus\:-translate-y-2{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:translate-x-\[0\.15rem\]{--tw-translate-x: .15rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:scale-\[0\.85\]{--tw-scale-x: .85;--tw-scale-y: .85;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:-moz-placeholder-shown)~.peer-\[\:not\(\:-moz-placeholder-shown\)\]\:-translate-y-2{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:placeholder-shown)~.peer-\[\:not\(\:placeholder-shown\)\]\:-translate-y-2{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:-moz-placeholder-shown)~.peer-\[\:not\(\:-moz-placeholder-shown\)\]\:translate-x-\[0\.15rem\]{--tw-translate-x: .15rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:placeholder-shown)~.peer-\[\:not\(\:placeholder-shown\)\]\:translate-x-\[0\.15rem\]{--tw-translate-x: .15rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:-moz-placeholder-shown)~.peer-\[\:not\(\:-moz-placeholder-shown\)\]\:scale-\[0\.85\]{--tw-scale-x: .85;--tw-scale-y: .85;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:not(:placeholder-shown)~.peer-\[\:not\(\:placeholder-shown\)\]\:scale-\[0\.85\]{--tw-scale-x: .85;--tw-scale-y: .85;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (prefers-reduced-motion: reduce){.motion-reduce\:transition-none{transition-property:none}}:is(.dark .dark\:border-neutral-600){--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity))}:is(.dark .dark\:bg-gray-900){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-sky-800){--tw-bg-opacity: 1;background-color:rgb(7 89 133 / var(--tw-bg-opacity))}:is(.dark .dark\:bg-sky-950){--tw-bg-opacity: 1;background-color:rgb(8 47 73 / var(--tw-bg-opacity))}:is(.dark .dark\:text-neutral-200){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}:is(.dark .dark\:text-white){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (min-width: 1024px){.lg\:py-4{padding-top:1rem;padding-bottom:1rem}}.\[\&\:not\(\:-moz-placeholder-shown\)\]\:pb-\[0\.625rem\]:not(:-moz-placeholder-shown){padding-bottom:.625rem}.\[\&\:not\(\:placeholder-shown\)\]\:pb-\[0\.625rem\]:not(:placeholder-shown){padding-bottom:.625rem}.\[\&\:not\(\:-moz-placeholder-shown\)\]\:pt-\[1\.625rem\]:not(:-moz-placeholder-shown){padding-top:1.625rem}.\[\&\:not\(\:placeholder-shown\)\]\:pt-\[1\.625rem\]:not(:placeholder-shown){padding-top:1.625rem}.message-enter-active[data-v-e583e2cf]{animation:modal .3s ease-out}.message-leave-active[data-v-e583e2cf]{animation:modal .3s ease-in reverse}@keyframes message-e583e2cf{0%{opacity:0;transform:translateY(-50px) scale(.9)}to{opacity:1;transform:translateY(0) scale(1)}}input[data-v-c198f371]{border:.25px solid;border-radius:7px;width:400px}.spinner[data-v-cd32d199]{width:32px;height:32px;border:4px solid rgba(0,0,0,.1);border-left-color:#000;border-radius:50%;animation:spin-cd32d199 1s linear infinite}@keyframes spin-cd32d199{to{transform:rotate(360deg)}}*{font-family:Montserrat,sans-serif;text-align:center} diff --git a/docs/assets/index-37ca234f.js b/docs/assets/index-9a80ee1f.js similarity index 75% rename from docs/assets/index-37ca234f.js rename to docs/assets/index-9a80ee1f.js index 4eb4268..a8bfd1e 100644 --- a/docs/assets/index-37ca234f.js +++ b/docs/assets/index-9a80ee1f.js @@ -1,8 +1,8 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function l0(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}const gt={},Au=[],ai=()=>{},bB=()=>!1,EB=/^on[^a-z]/,Sv=e=>EB.test(e),f0=e=>e.startsWith("onUpdate:"),Ut=Object.assign,h0=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},TB=Object.prototype.hasOwnProperty,He=(e,t)=>TB.call(e,t),ge=Array.isArray,ku=e=>Xf(e)==="[object Map]",yc=e=>Xf(e)==="[object Set]",uk=e=>Xf(e)==="[object Date]",ke=e=>typeof e=="function",jt=e=>typeof e=="string",lf=e=>typeof e=="symbol",at=e=>e!==null&&typeof e=="object",kx=e=>at(e)&&ke(e.then)&&ke(e.catch),Rx=Object.prototype.toString,Xf=e=>Rx.call(e),IB=e=>Xf(e).slice(8,-1),Nx=e=>Xf(e)==="[object Object]",d0=e=>jt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ip=l0(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Cv=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},SB=/-(\w)/g,Mi=Cv(e=>e.replace(SB,(t,n)=>n?n.toUpperCase():"")),CB=/\B([A-Z])/g,Ca=Cv(e=>e.replace(CB,"-$1").toLowerCase()),Av=Cv(e=>e.charAt(0).toUpperCase()+e.slice(1)),R_=Cv(e=>e?`on${Av(e)}`:""),ff=(e,t)=>!Object.is(e,t),op=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},wp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},AB=e=>{const t=jt(e)?Number(e):NaN;return isNaN(t)?e:t};let ck;const Aw=()=>ck||(ck=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function p0(e){if(ge(e)){const t={};for(let n=0;n{if(n){const r=n.split(RB);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function hf(e){let t="";if(jt(e))t=e;else if(ge(e))for(let n=0;nca(n,t))}const bp=e=>jt(e)?e:e==null?"":ge(e)||at(e)&&(e.toString===Rx||!ke(e.toString))?JSON.stringify(e,Ox,2):String(e),Ox=(e,t)=>t&&t.__v_isRef?Ox(e,t.value):ku(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:yc(t)?{[`Set(${t.size})`]:[...t.values()]}:at(t)&&!ge(t)&&!Nx(t)?String(t):t;let _r;class Px{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=_r,!t&&_r&&(this.index=(_r.scopes||(_r.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=_r;try{return _r=this,t()}finally{_r=n}}}on(){_r=this}off(){_r=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},Mx=e=>(e.w&es)>0,Lx=e=>(e.n&es)>0,UB=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(d==="length"||d>=l)&&c.push(h)})}else switch(n!==void 0&&c.push(a.get(n)),t){case"add":ge(e)?d0(n)&&c.push(a.get("length")):(c.push(a.get(ta)),ku(e)&&c.push(a.get(Rw)));break;case"delete":ge(e)||(c.push(a.get(ta)),ku(e)&&c.push(a.get(Rw)));break;case"set":ku(e)&&c.push(a.get(ta));break}if(c.length===1)c[0]&&Nw(c[0]);else{const l=[];for(const h of c)h&&l.push(...h);Nw(g0(l))}}function Nw(e,t){const n=ge(e)?e:[...e];for(const r of n)r.computed&&fk(r);for(const r of n)r.computed||fk(r)}function fk(e,t){(e!==ii||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function VB(e,t){var n;return(n=Ep.get(e))==null?void 0:n.get(t)}const BB=l0("__proto__,__v_isRef,__isVue"),jx=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(lf)),qB=y0(),$B=y0(!1,!0),HB=y0(!0),hk=KB();function KB(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=Ke(this);for(let s=0,a=this.length;s{e[t]=function(...n){_c();const r=Ke(this)[t].apply(this,n);return wc(),r}}),e}function WB(e){const t=Ke(this);return hr(t,"has",e),t.hasOwnProperty(e)}function y0(e=!1,t=!1){return function(r,i,s){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&s===(e?t?u3:Hx:t?$x:qx).get(r))return r;const a=ge(r);if(!e){if(a&&He(hk,i))return Reflect.get(hk,i,s);if(i==="hasOwnProperty")return WB}const c=Reflect.get(r,i,s);return(lf(i)?jx.has(i):BB(i))||(e||hr(r,"get",i),t)?c:Wt(c)?a&&d0(i)?c:c.value:at(c)?e?Rv(c):bc(c):c}}const GB=Vx(),zB=Vx(!0);function Vx(e=!1){return function(n,r,i,s){let a=n[r];if(ju(a)&&Wt(a)&&!Wt(i))return!1;if(!e&&(!Tp(i)&&!ju(i)&&(a=Ke(a),i=Ke(i)),!ge(n)&&Wt(a)&&!Wt(i)))return a.value=i,!0;const c=ge(n)&&d0(r)?Number(r)e,kv=e=>Reflect.getPrototypeOf(e);function xd(e,t,n=!1,r=!1){e=e.__v_raw;const i=Ke(e),s=Ke(t);n||(t!==s&&hr(i,"get",t),hr(i,"get",s));const{has:a}=kv(i),c=r?_0:n?E0:df;if(a.call(i,t))return c(e.get(t));if(a.call(i,s))return c(e.get(s));e!==i&&e.get(t)}function Od(e,t=!1){const n=this.__v_raw,r=Ke(n),i=Ke(e);return t||(e!==i&&hr(r,"has",e),hr(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Pd(e,t=!1){return e=e.__v_raw,!t&&hr(Ke(e),"iterate",ta),Reflect.get(e,"size",e)}function dk(e){e=Ke(e);const t=Ke(this);return kv(t).has.call(t,e)||(t.add(e),uo(t,"add",e,e)),this}function pk(e,t){t=Ke(t);const n=Ke(this),{has:r,get:i}=kv(n);let s=r.call(n,e);s||(e=Ke(e),s=r.call(n,e));const a=i.call(n,e);return n.set(e,t),s?ff(t,a)&&uo(n,"set",e,t):uo(n,"add",e,t),this}function vk(e){const t=Ke(this),{has:n,get:r}=kv(t);let i=n.call(t,e);i||(e=Ke(e),i=n.call(t,e)),r&&r.call(t,e);const s=t.delete(e);return i&&uo(t,"delete",e,void 0),s}function gk(){const e=Ke(this),t=e.size!==0,n=e.clear();return t&&uo(e,"clear",void 0,void 0),n}function Dd(e,t){return function(r,i){const s=this,a=s.__v_raw,c=Ke(a),l=t?_0:e?E0:df;return!e&&hr(c,"iterate",ta),a.forEach((h,d)=>r.call(i,l(h),l(d),s))}}function Md(e,t,n){return function(...r){const i=this.__v_raw,s=Ke(i),a=ku(s),c=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,h=i[e](...r),d=n?_0:t?E0:df;return!t&&hr(s,"iterate",l?Rw:ta),{next(){const{value:v,done:g}=h.next();return g?{value:v,done:g}:{value:c?[d(v[0]),d(v[1])]:d(v),done:g}},[Symbol.iterator](){return this}}}}function No(e){return function(...t){return e==="delete"?!1:this}}function e3(){const e={get(s){return xd(this,s)},get size(){return Pd(this)},has:Od,add:dk,set:pk,delete:vk,clear:gk,forEach:Dd(!1,!1)},t={get(s){return xd(this,s,!1,!0)},get size(){return Pd(this)},has:Od,add:dk,set:pk,delete:vk,clear:gk,forEach:Dd(!1,!0)},n={get(s){return xd(this,s,!0)},get size(){return Pd(this,!0)},has(s){return Od.call(this,s,!0)},add:No("add"),set:No("set"),delete:No("delete"),clear:No("clear"),forEach:Dd(!0,!1)},r={get(s){return xd(this,s,!0,!0)},get size(){return Pd(this,!0)},has(s){return Od.call(this,s,!0)},add:No("add"),set:No("set"),delete:No("delete"),clear:No("clear"),forEach:Dd(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Md(s,!1,!1),n[s]=Md(s,!0,!1),t[s]=Md(s,!1,!0),r[s]=Md(s,!0,!0)}),[e,n,t,r]}const[t3,n3,r3,i3]=e3();function w0(e,t){const n=t?e?i3:r3:e?n3:t3;return(r,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(He(n,i)&&i in r?n:r,i,s)}const o3={get:w0(!1,!1)},s3={get:w0(!1,!0)},a3={get:w0(!0,!1)},qx=new WeakMap,$x=new WeakMap,Hx=new WeakMap,u3=new WeakMap;function c3(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function l3(e){return e.__v_skip||!Object.isExtensible(e)?0:c3(IB(e))}function bc(e){return ju(e)?e:b0(e,!1,Bx,o3,qx)}function f3(e){return b0(e,!1,ZB,s3,$x)}function Rv(e){return b0(e,!0,JB,a3,Hx)}function b0(e,t,n,r,i){if(!at(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=i.get(e);if(s)return s;const a=l3(e);if(a===0)return e;const c=new Proxy(e,a===2?r:n);return i.set(e,c),c}function Ru(e){return ju(e)?Ru(e.__v_raw):!!(e&&e.__v_isReactive)}function ju(e){return!!(e&&e.__v_isReadonly)}function Tp(e){return!!(e&&e.__v_isShallow)}function Kx(e){return Ru(e)||ju(e)}function Ke(e){const t=e&&e.__v_raw;return t?Ke(t):e}function Wx(e){return _p(e,"__v_skip",!0),e}const df=e=>at(e)?bc(e):e,E0=e=>at(e)?Rv(e):e;function T0(e){Go&&ii&&(e=Ke(e),Ux(e.dep||(e.dep=g0())))}function I0(e,t){e=Ke(e);const n=e.dep;n&&Nw(n)}function Wt(e){return!!(e&&e.__v_isRef===!0)}function Ue(e){return zx(e,!1)}function Gx(e){return zx(e,!0)}function zx(e,t){return Wt(e)?e:new h3(e,t)}class h3{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:Ke(t),this._value=n?t:df(t)}get value(){return T0(this),this._value}set value(t){const n=this.__v_isShallow||Tp(t)||ju(t);t=n?t:Ke(t),ff(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:df(t),I0(this))}}function Nu(e){return Wt(e)?e.value:e}const d3={get:(e,t,n)=>Nu(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return Wt(i)&&!Wt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Qx(e){return Ru(e)?e:new Proxy(e,d3)}class p3{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>T0(this),()=>I0(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function v3(e){return new p3(e)}class g3{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return VB(Ke(this._object),this._key)}}class m3{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function y3(e,t,n){return Wt(e)?e:ke(e)?new m3(e):at(e)&&arguments.length>1?_3(e,t,n):Ue(e)}function _3(e,t,n){const r=e[t];return Wt(r)?r:new g3(e,t,n)}class w3{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new m0(t,()=>{this._dirty||(this._dirty=!0,I0(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=Ke(this);return T0(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function b3(e,t,n=!1){let r,i;const s=ke(e);return s?(r=e,i=ai):(r=e.get,i=e.set),new w3(r,i,s||!i,n)}function zo(e,t,n,r){let i;try{i=r?e(...r):e()}catch(s){Nv(s,t,n)}return i}function Vr(e,t,n,r){if(ke(e)){const s=zo(e,t,n,r);return s&&kx(s)&&s.catch(a=>{Nv(a,t,n)}),s}const i=[];for(let s=0;s>>1;vf(An[r])Ai&&An.splice(t,1)}function S3(e){ge(e)?xu.push(...e):(!Xi||!Xi.includes(e,e.allowRecurse?qs+1:qs))&&xu.push(e),Xx()}function mk(e,t=pf?Ai+1:0){for(;tvf(n)-vf(r)),qs=0;qse.id==null?1/0:e.id,C3=(e,t)=>{const n=vf(e)-vf(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Zx(e){xw=!1,pf=!0,An.sort(C3);const t=ai;try{for(Ai=0;Aijt(y)?y.trim():y)),v&&(i=n.map(wp))}let c,l=r[c=R_(t)]||r[c=R_(Mi(t))];!l&&s&&(l=r[c=R_(Ca(t))]),l&&Vr(l,e,6,i);const h=r[c+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Vr(h,e,6,i)}}function eO(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const s=e.emits;let a={},c=!1;if(!ke(e)){const l=h=>{const d=eO(h,t,!0);d&&(c=!0,Ut(a,d))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!c?(at(e)&&r.set(e,null),null):(ge(s)?s.forEach(l=>a[l]=null):Ut(a,s),at(e)&&r.set(e,a),a)}function xv(e,t){return!e||!Sv(t)?!1:(t=t.slice(2).replace(/Once$/,""),He(e,t[0].toLowerCase()+t.slice(1))||He(e,Ca(t))||He(e,t))}let vn=null,Ov=null;function Ip(e){const t=vn;return vn=e,Ov=e&&e.type.__scopeId||null,t}function k3(e){Ov=e}function R3(){Ov=null}function or(e,t=vn,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&Rk(-1);const s=Ip(t);let a;try{a=e(...i)}finally{Ip(s),r._d&&Rk(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function N_(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:s,propsOptions:[a],slots:c,attrs:l,emit:h,render:d,renderCache:v,data:g,setupState:y,ctx:_,inheritAttrs:b}=e;let T,C;const x=Ip(e);try{if(n.shapeFlag&4){const L=i||r;T=Ci(d.call(L,L,v,s,y,g,_)),C=l}else{const L=t;T=Ci(L.length>1?L(s,{attrs:l,slots:c,emit:h}):L(s,null)),C=t.props?l:N3(l)}}catch(L){Kl.length=0,Nv(L,e,1),T=Ye(Br)}let O=T;if(C&&b!==!1){const L=Object.keys(C),{shapeFlag:$}=O;L.length&&$&7&&(a&&L.some(f0)&&(C=x3(C,a)),O=co(O,C))}return n.dirs&&(O=co(O),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition&&(O.transition=n.transition),T=O,Ip(x),T}const N3=e=>{let t;for(const n in e)(n==="class"||n==="style"||Sv(n))&&((t||(t={}))[n]=e[n]);return t},x3=(e,t)=>{const n={};for(const r in e)(!f0(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function O3(e,t,n){const{props:r,children:i,component:s}=e,{props:a,children:c,patchFlag:l}=t,h=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?yk(r,a,h):!!a;if(l&8){const d=t.dynamicProps;for(let v=0;ve.__isSuspense;function M3(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):S3(e)}function Ec(e,t){return A0(e,null,t)}const Ld={};function Ri(e,t,n){return A0(e,t,n)}function A0(e,t,{immediate:n,deep:r,flush:i,onTrack:s,onTrigger:a}=gt){var c;const l=Dx()===((c=rn)==null?void 0:c.scope)?rn:null;let h,d=!1,v=!1;if(Wt(e)?(h=()=>e.value,d=Tp(e)):Ru(e)?(h=()=>e,r=!0):ge(e)?(v=!0,d=e.some(L=>Ru(L)||Tp(L)),h=()=>e.map(L=>{if(Wt(L))return L.value;if(Ru(L))return Gs(L);if(ke(L))return zo(L,l,2)})):ke(e)?t?h=()=>zo(e,l,2):h=()=>{if(!(l&&l.isUnmounted))return g&&g(),Vr(e,l,3,[y])}:h=ai,t&&r){const L=h;h=()=>Gs(L())}let g,y=L=>{g=x.onStop=()=>{zo(L,l,4)}},_;if(mf)if(y=ai,t?n&&Vr(t,l,3,[h(),v?[]:void 0,y]):h(),i==="sync"){const L=Oq();_=L.__watcherHandles||(L.__watcherHandles=[])}else return ai;let b=v?new Array(e.length).fill(Ld):Ld;const T=()=>{if(x.active)if(t){const L=x.run();(r||d||(v?L.some(($,P)=>ff($,b[P])):ff(L,b)))&&(g&&g(),Vr(t,l,3,[L,b===Ld?void 0:v&&b[0]===Ld?[]:b,y]),b=L)}else x.run()};T.allowRecurse=!!t;let C;i==="sync"?C=T:i==="post"?C=()=>ir(T,l&&l.suspense):(T.pre=!0,l&&(T.id=l.uid),C=()=>C0(T));const x=new m0(h,C);t?n?T():b=x.run():i==="post"?ir(x.run.bind(x),l&&l.suspense):x.run();const O=()=>{x.stop(),l&&l.scope&&h0(l.scope.effects,x)};return _&&_.push(O),O}function L3(e,t,n){const r=this.proxy,i=jt(e)?e.includes(".")?tO(r,e):()=>r[e]:e.bind(r,r);let s;ke(t)?s=t:(s=t.handler,n=t);const a=rn;Vu(this);const c=A0(i,s.bind(r),n);return a?Vu(a):na(),c}function tO(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i{Gs(n,t)});else if(Nx(e))for(const n in e)Gs(e[n],t);return e}function Sp(e,t){const n=vn;if(n===null)return e;const r=Uv(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let s=0;s{e.isMounted=!0}),k0(()=>{e.isUnmounting=!0}),e}const Dr=[Function,Array],nO={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Dr,onEnter:Dr,onAfterEnter:Dr,onEnterCancelled:Dr,onBeforeLeave:Dr,onLeave:Dr,onAfterLeave:Dr,onLeaveCancelled:Dr,onBeforeAppear:Dr,onAppear:Dr,onAfterAppear:Dr,onAppearCancelled:Dr},U3={name:"BaseTransition",props:nO,setup(e,{slots:t}){const n=D0(),r=F3();let i;return()=>{const s=t.default&&iO(t.default(),!0);if(!s||!s.length)return;let a=s[0];if(s.length>1){for(const b of s)if(b.type!==Br){a=b;break}}const c=Ke(e),{mode:l}=c;if(r.isLeaving)return x_(a);const h=_k(a);if(!h)return x_(a);const d=Ow(h,c,r,n);Pw(h,d);const v=n.subTree,g=v&&_k(v);let y=!1;const{getTransitionKey:_}=h.type;if(_){const b=_();i===void 0?i=b:b!==i&&(i=b,y=!0)}if(g&&g.type!==Br&&(!$s(h,g)||y)){const b=Ow(g,c,r,n);if(Pw(g,b),l==="out-in")return r.isLeaving=!0,b.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},x_(a);l==="in-out"&&h.type!==Br&&(b.delayLeave=(T,C,x)=>{const O=rO(r,g);O[String(g.key)]=g,T._leaveCb=()=>{C(),T._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=x})}return a}}},j3=U3;function rO(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Ow(e,t,n,r){const{appear:i,mode:s,persisted:a=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:h,onEnterCancelled:d,onBeforeLeave:v,onLeave:g,onAfterLeave:y,onLeaveCancelled:_,onBeforeAppear:b,onAppear:T,onAfterAppear:C,onAppearCancelled:x}=t,O=String(e.key),L=rO(n,e),$=(F,oe)=>{F&&Vr(F,r,9,oe)},P=(F,oe)=>{const k=oe[1];$(F,oe),ge(F)?F.every(dt=>dt.length<=1)&&k():F.length<=1&&k()},re={mode:s,persisted:a,beforeEnter(F){let oe=c;if(!n.isMounted)if(i)oe=b||c;else return;F._leaveCb&&F._leaveCb(!0);const k=L[O];k&&$s(e,k)&&k.el._leaveCb&&k.el._leaveCb(),$(oe,[F])},enter(F){let oe=l,k=h,dt=d;if(!n.isMounted)if(i)oe=T||l,k=C||h,dt=x||d;else return;let ue=!1;const ut=F._enterCb=Rt=>{ue||(ue=!0,Rt?$(dt,[F]):$(k,[F]),re.delayedLeave&&re.delayedLeave(),F._enterCb=void 0)};oe?P(oe,[F,ut]):ut()},leave(F,oe){const k=String(e.key);if(F._enterCb&&F._enterCb(!0),n.isUnmounting)return oe();$(v,[F]);let dt=!1;const ue=F._leaveCb=ut=>{dt||(dt=!0,oe(),ut?$(_,[F]):$(y,[F]),F._leaveCb=void 0,L[k]===e&&delete L[k])};L[k]=e,g?P(g,[F,ue]):ue()},clone(F){return Ow(F,t,n,r)}};return re}function x_(e){if(Pv(e))return e=co(e),e.children=null,e}function _k(e){return Pv(e)?e.children?e.children[0]:void 0:e}function Pw(e,t){e.shapeFlag&6&&e.component?Pw(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 iO(e,t=!1,n){let r=[],i=0;for(let s=0;s1)for(let s=0;sUt({name:e.name},t,{setup:e}))():e}const $l=e=>!!e.type.__asyncLoader,Pv=e=>e.type.__isKeepAlive;function V3(e,t){oO(e,"a",t)}function B3(e,t){oO(e,"da",t)}function oO(e,t,n=rn){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Dv(t,r,n),n){let i=n.parent;for(;i&&i.parent;)Pv(i.parent.vnode)&&q3(r,t,n,i),i=i.parent}}function q3(e,t,n,r){const i=Dv(t,e,r,!0);R0(()=>{h0(r[t],i)},n)}function Dv(e,t,n=rn,r=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...a)=>{if(n.isUnmounted)return;_c(),Vu(n);const c=Vr(t,n,e,a);return na(),wc(),c});return r?i.unshift(s):i.push(s),s}}const go=e=>(t,n=rn)=>(!mf||e==="sp")&&Dv(e,(...r)=>t(...r),n),$3=go("bm"),Aa=go("m"),H3=go("bu"),K3=go("u"),k0=go("bum"),R0=go("um"),W3=go("sp"),G3=go("rtg"),z3=go("rtc");function Q3(e,t=rn){Dv("ec",e,t)}const sO="components",Y3="directives";function Sn(e,t){return aO(sO,e,!0,t)||e}const X3=Symbol.for("v-ndc");function J3(e){return aO(Y3,e)}function aO(e,t,n=!0,r=!1){const i=vn||rn;if(i){const s=i.type;if(e===sO){const c=Rq(s,!1);if(c&&(c===t||c===Mi(t)||c===Av(Mi(t))))return s}const a=wk(i[e]||s[e],t)||wk(i.appContext[e],t);return!a&&r?s:a}}function wk(e,t){return e&&(e[t]||e[Mi(t)]||e[Av(Mi(t))])}function Z3(e,t,n,r){let i;const s=n&&n[r];if(ge(e)||jt(e)){i=new Array(e.length);for(let a=0,c=e.length;at(a,c,void 0,s&&s[c]));else{const a=Object.keys(e);i=new Array(a.length);for(let c=0,l=a.length;ckp(t)?!(t.type===Br||t.type===Zt&&!uO(t.children)):!0)?e:null}const Dw=e=>e?_O(e)?Uv(e)||e.proxy:Dw(e.parent):null,Hl=Ut(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=>Dw(e.parent),$root:e=>Dw(e.root),$emit:e=>e.emit,$options:e=>N0(e),$forceUpdate:e=>e.f||(e.f=()=>C0(e.update)),$nextTick:e=>e.n||(e.n=ui.bind(e.proxy)),$watch:e=>L3.bind(e)}),O_=(e,t)=>e!==gt&&!e.__isScriptSetup&&He(e,t),eq={get({_:e},t){const{ctx:n,setupState:r,data:i,props:s,accessCache:a,type:c,appContext:l}=e;let h;if(t[0]!=="$"){const y=a[t];if(y!==void 0)switch(y){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(O_(r,t))return a[t]=1,r[t];if(i!==gt&&He(i,t))return a[t]=2,i[t];if((h=e.propsOptions[0])&&He(h,t))return a[t]=3,s[t];if(n!==gt&&He(n,t))return a[t]=4,n[t];Mw&&(a[t]=0)}}const d=Hl[t];let v,g;if(d)return t==="$attrs"&&hr(e,"get",t),d(e);if((v=c.__cssModules)&&(v=v[t]))return v;if(n!==gt&&He(n,t))return a[t]=4,n[t];if(g=l.config.globalProperties,He(g,t))return g[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:s}=e;return O_(i,t)?(i[t]=n,!0):r!==gt&&He(r,t)?(r[t]=n,!0):He(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:s}},a){let c;return!!n[a]||e!==gt&&He(e,a)||O_(t,a)||(c=s[0])&&He(c,a)||He(r,a)||He(Hl,a)||He(i.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:He(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function bk(e){return ge(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Mw=!0;function tq(e){const t=N0(e),n=e.proxy,r=e.ctx;Mw=!1,t.beforeCreate&&Ek(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:a,watch:c,provide:l,inject:h,created:d,beforeMount:v,mounted:g,beforeUpdate:y,updated:_,activated:b,deactivated:T,beforeDestroy:C,beforeUnmount:x,destroyed:O,unmounted:L,render:$,renderTracked:P,renderTriggered:re,errorCaptured:F,serverPrefetch:oe,expose:k,inheritAttrs:dt,components:ue,directives:ut,filters:Rt}=t;if(h&&nq(h,r,null),a)for(const nt in a){const Ce=a[nt];ke(Ce)&&(r[nt]=Ce.bind(n))}if(i){const nt=i.call(n,n);at(nt)&&(e.data=bc(nt))}if(Mw=!0,s)for(const nt in s){const Ce=s[nt],Mn=ke(Ce)?Ce.bind(n,n):ke(Ce.get)?Ce.get.bind(n,n):ai,Jn=!ke(Ce)&&ke(Ce.set)?Ce.set.bind(n):ai,Ln=Ze({get:Mn,set:Jn});Object.defineProperty(r,nt,{enumerable:!0,configurable:!0,get:()=>Ln.value,set:cn=>Ln.value=cn})}if(c)for(const nt in c)cO(c[nt],r,n,nt);if(l){const nt=ke(l)?l.call(n):l;Reflect.ownKeys(nt).forEach(Ce=>{Ou(Ce,nt[Ce])})}d&&Ek(d,e,"c");function tt(nt,Ce){ge(Ce)?Ce.forEach(Mn=>nt(Mn.bind(n))):Ce&&nt(Ce.bind(n))}if(tt($3,v),tt(Aa,g),tt(H3,y),tt(K3,_),tt(V3,b),tt(B3,T),tt(Q3,F),tt(z3,P),tt(G3,re),tt(k0,x),tt(R0,L),tt(W3,oe),ge(k))if(k.length){const nt=e.exposed||(e.exposed={});k.forEach(Ce=>{Object.defineProperty(nt,Ce,{get:()=>n[Ce],set:Mn=>n[Ce]=Mn})})}else e.exposed||(e.exposed={});$&&e.render===ai&&(e.render=$),dt!=null&&(e.inheritAttrs=dt),ue&&(e.components=ue),ut&&(e.directives=ut)}function nq(e,t,n=ai){ge(e)&&(e=Lw(e));for(const r in e){const i=e[r];let s;at(i)?"default"in i?s=ar(i.from||r,i.default,!0):s=ar(i.from||r):s=ar(i),Wt(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:a=>s.value=a}):t[r]=s}}function Ek(e,t,n){Vr(ge(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function cO(e,t,n,r){const i=r.includes(".")?tO(n,r):()=>n[r];if(jt(e)){const s=t[e];ke(s)&&Ri(i,s)}else if(ke(e))Ri(i,e.bind(n));else if(at(e))if(ge(e))e.forEach(s=>cO(s,t,n,r));else{const s=ke(e.handler)?e.handler.bind(n):t[e.handler];ke(s)&&Ri(i,s,e)}}function N0(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:a}}=e.appContext,c=s.get(t);let l;return c?l=c:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(h=>Cp(l,h,a,!0)),Cp(l,t,a)),at(t)&&s.set(t,l),l}function Cp(e,t,n,r=!1){const{mixins:i,extends:s}=t;s&&Cp(e,s,n,!0),i&&i.forEach(a=>Cp(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const c=rq[a]||n&&n[a];e[a]=c?c(e[a],t[a]):t[a]}return e}const rq={data:Tk,props:Ik,emits:Ik,methods:jl,computed:jl,beforeCreate:Bn,created:Bn,beforeMount:Bn,mounted:Bn,beforeUpdate:Bn,updated:Bn,beforeDestroy:Bn,beforeUnmount:Bn,destroyed:Bn,unmounted:Bn,activated:Bn,deactivated:Bn,errorCaptured:Bn,serverPrefetch:Bn,components:jl,directives:jl,watch:oq,provide:Tk,inject:iq};function Tk(e,t){return t?e?function(){return Ut(ke(e)?e.call(this,this):e,ke(t)?t.call(this,this):t)}:t:e}function iq(e,t){return jl(Lw(e),Lw(t))}function Lw(e){if(ge(e)){const t={};for(let n=0;n1)return n&&ke(t)?t.call(r&&r.proxy):t}}function uq(e,t,n,r=!1){const i={},s={};_p(s,Fv,1),e.propsDefaults=Object.create(null),fO(e,t,i,s);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=r?i:f3(i):e.type.props?e.props=i:e.props=s,e.attrs=s}function cq(e,t,n,r){const{props:i,attrs:s,vnode:{patchFlag:a}}=e,c=Ke(i),[l]=e.propsOptions;let h=!1;if((r||a>0)&&!(a&16)){if(a&8){const d=e.vnode.dynamicProps;for(let v=0;v{l=!0;const[g,y]=hO(v,t,!0);Ut(a,g),y&&c.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!s&&!l)return at(e)&&r.set(e,Au),Au;if(ge(s))for(let d=0;d-1,y[1]=b<0||_-1||He(y,"default"))&&c.push(v)}}}const h=[a,c];return at(e)&&r.set(e,h),h}function Sk(e){return e[0]!=="$"}function Ck(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Ak(e,t){return Ck(e)===Ck(t)}function kk(e,t){return ge(t)?t.findIndex(n=>Ak(n,e)):ke(t)&&Ak(t,e)?0:-1}const dO=e=>e[0]==="_"||e==="$stable",x0=e=>ge(e)?e.map(Ci):[Ci(e)],lq=(e,t,n)=>{if(t._n)return t;const r=or((...i)=>x0(t(...i)),n);return r._c=!1,r},pO=(e,t,n)=>{const r=e._ctx;for(const i in e){if(dO(i))continue;const s=e[i];if(ke(s))t[i]=lq(i,s,r);else if(s!=null){const a=x0(s);t[i]=()=>a}}},vO=(e,t)=>{const n=x0(t);e.slots.default=()=>n},fq=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=Ke(t),_p(t,"_",n)):pO(t,e.slots={})}else e.slots={},t&&vO(e,t);_p(e.slots,Fv,1)},hq=(e,t,n)=>{const{vnode:r,slots:i}=e;let s=!0,a=gt;if(r.shapeFlag&32){const c=t._;c?n&&c===1?s=!1:(Ut(i,t),!n&&c===1&&delete i._):(s=!t.$stable,pO(t,i)),a=t}else t&&(vO(e,t),a={default:1});if(s)for(const c in i)!dO(c)&&!(c in a)&&delete i[c]};function Uw(e,t,n,r,i=!1){if(ge(e)){e.forEach((g,y)=>Uw(g,t&&(ge(t)?t[y]:t),n,r,i));return}if($l(r)&&!i)return;const s=r.shapeFlag&4?Uv(r.component)||r.component.proxy:r.el,a=i?null:s,{i:c,r:l}=e,h=t&&t.r,d=c.refs===gt?c.refs={}:c.refs,v=c.setupState;if(h!=null&&h!==l&&(jt(h)?(d[h]=null,He(v,h)&&(v[h]=null)):Wt(h)&&(h.value=null)),ke(l))zo(l,c,12,[a,d]);else{const g=jt(l),y=Wt(l);if(g||y){const _=()=>{if(e.f){const b=g?He(v,l)?v[l]:d[l]:l.value;i?ge(b)&&h0(b,s):ge(b)?b.includes(s)||b.push(s):g?(d[l]=[s],He(v,l)&&(v[l]=d[l])):(l.value=[s],e.k&&(d[e.k]=l.value))}else g?(d[l]=a,He(v,l)&&(v[l]=a)):y&&(l.value=a,e.k&&(d[e.k]=a))};a?(_.id=-1,ir(_,n)):_()}}}const ir=M3;function dq(e){return pq(e)}function pq(e,t){const n=Aw();n.__VUE__=!0;const{insert:r,remove:i,patchProp:s,createElement:a,createText:c,createComment:l,setText:h,setElementText:d,parentNode:v,nextSibling:g,setScopeId:y=ai,insertStaticContent:_}=e,b=(I,N,M,j=null,V=null,Q=null,J=!1,z=null,X=!!N.dynamicChildren)=>{if(I===N)return;I&&!$s(I,N)&&(j=ne(I),cn(I,V,Q,!0),I=null),N.patchFlag===-2&&(X=!1,N.dynamicChildren=null);const{type:K,ref:pe,shapeFlag:fe}=N;switch(K){case Lv:T(I,N,M,j);break;case Br:C(I,N,M,j);break;case P_:I==null&&x(N,M,j,J);break;case Zt:ue(I,N,M,j,V,Q,J,z,X);break;default:fe&1?$(I,N,M,j,V,Q,J,z,X):fe&6?ut(I,N,M,j,V,Q,J,z,X):(fe&64||fe&128)&&K.process(I,N,M,j,V,Q,J,z,X,$e)}pe!=null&&V&&Uw(pe,I&&I.ref,Q,N||I,!N)},T=(I,N,M,j)=>{if(I==null)r(N.el=c(N.children),M,j);else{const V=N.el=I.el;N.children!==I.children&&h(V,N.children)}},C=(I,N,M,j)=>{I==null?r(N.el=l(N.children||""),M,j):N.el=I.el},x=(I,N,M,j)=>{[I.el,I.anchor]=_(I.children,N,M,j,I.el,I.anchor)},O=({el:I,anchor:N},M,j)=>{let V;for(;I&&I!==N;)V=g(I),r(I,M,j),I=V;r(N,M,j)},L=({el:I,anchor:N})=>{let M;for(;I&&I!==N;)M=g(I),i(I),I=M;i(N)},$=(I,N,M,j,V,Q,J,z,X)=>{J=J||N.type==="svg",I==null?P(N,M,j,V,Q,J,z,X):oe(I,N,V,Q,J,z,X)},P=(I,N,M,j,V,Q,J,z)=>{let X,K;const{type:pe,props:fe,shapeFlag:ve,transition:Ee,dirs:Me}=I;if(X=I.el=a(I.type,Q,fe&&fe.is,fe),ve&8?d(X,I.children):ve&16&&F(I.children,X,null,j,V,Q&&pe!=="foreignObject",J,z),Me&&Ds(I,null,j,"created"),re(X,I,I.scopeId,J,j),fe){for(const We in fe)We!=="value"&&!ip(We)&&s(X,We,null,fe[We],Q,I.children,j,V,ie);"value"in fe&&s(X,"value",null,fe.value),(K=fe.onVnodeBeforeMount)&&Ti(K,j,I)}Me&&Ds(I,null,j,"beforeMount");const ye=(!V||V&&!V.pendingBranch)&&Ee&&!Ee.persisted;ye&&Ee.beforeEnter(X),r(X,N,M),((K=fe&&fe.onVnodeMounted)||ye||Me)&&ir(()=>{K&&Ti(K,j,I),ye&&Ee.enter(X),Me&&Ds(I,null,j,"mounted")},V)},re=(I,N,M,j,V)=>{if(M&&y(I,M),j)for(let Q=0;Q{for(let K=X;K{const z=N.el=I.el;let{patchFlag:X,dynamicChildren:K,dirs:pe}=N;X|=I.patchFlag&16;const fe=I.props||gt,ve=N.props||gt;let Ee;M&&Ms(M,!1),(Ee=ve.onVnodeBeforeUpdate)&&Ti(Ee,M,N,I),pe&&Ds(N,I,M,"beforeUpdate"),M&&Ms(M,!0);const Me=V&&N.type!=="foreignObject";if(K?k(I.dynamicChildren,K,z,M,j,Me,Q):J||Ce(I,N,z,null,M,j,Me,Q,!1),X>0){if(X&16)dt(z,N,fe,ve,M,j,V);else if(X&2&&fe.class!==ve.class&&s(z,"class",null,ve.class,V),X&4&&s(z,"style",fe.style,ve.style,V),X&8){const ye=N.dynamicProps;for(let We=0;We{Ee&&Ti(Ee,M,N,I),pe&&Ds(N,I,M,"updated")},j)},k=(I,N,M,j,V,Q,J)=>{for(let z=0;z{if(M!==j){if(M!==gt)for(const z in M)!ip(z)&&!(z in j)&&s(I,z,M[z],null,J,N.children,V,Q,ie);for(const z in j){if(ip(z))continue;const X=j[z],K=M[z];X!==K&&z!=="value"&&s(I,z,K,X,J,N.children,V,Q,ie)}"value"in j&&s(I,"value",M.value,j.value)}},ue=(I,N,M,j,V,Q,J,z,X)=>{const K=N.el=I?I.el:c(""),pe=N.anchor=I?I.anchor:c("");let{patchFlag:fe,dynamicChildren:ve,slotScopeIds:Ee}=N;Ee&&(z=z?z.concat(Ee):Ee),I==null?(r(K,M,j),r(pe,M,j),F(N.children,M,pe,V,Q,J,z,X)):fe>0&&fe&64&&ve&&I.dynamicChildren?(k(I.dynamicChildren,ve,M,V,Q,J,z),(N.key!=null||V&&N===V.subTree)&&gO(I,N,!0)):Ce(I,N,M,pe,V,Q,J,z,X)},ut=(I,N,M,j,V,Q,J,z,X)=>{N.slotScopeIds=z,I==null?N.shapeFlag&512?V.ctx.activate(N,M,j,J,X):Rt(N,M,j,V,Q,J,X):Xn(I,N,X)},Rt=(I,N,M,j,V,Q,J)=>{const z=I.component=Iq(I,j,V);if(Pv(I)&&(z.ctx.renderer=$e),Sq(z),z.asyncDep){if(V&&V.registerDep(z,tt),!I.el){const X=z.subTree=Ye(Br);C(null,X,N,M)}return}tt(z,I,N,M,V,Q,J)},Xn=(I,N,M)=>{const j=N.component=I.component;if(O3(I,N,M))if(j.asyncDep&&!j.asyncResolved){nt(j,N,M);return}else j.next=N,I3(j.update),j.update();else N.el=I.el,j.vnode=N},tt=(I,N,M,j,V,Q,J)=>{const z=()=>{if(I.isMounted){let{next:pe,bu:fe,u:ve,parent:Ee,vnode:Me}=I,ye=pe,We;Ms(I,!1),pe?(pe.el=Me.el,nt(I,pe,J)):pe=Me,fe&&op(fe),(We=pe.props&&pe.props.onVnodeBeforeUpdate)&&Ti(We,Ee,pe,Me),Ms(I,!0);const ct=N_(I),Zn=I.subTree;I.subTree=ct,b(Zn,ct,v(Zn.el),ne(Zn),I,V,Q),pe.el=ct.el,ye===null&&P3(I,ct.el),ve&&ir(ve,V),(We=pe.props&&pe.props.onVnodeUpdated)&&ir(()=>Ti(We,Ee,pe,Me),V)}else{let pe;const{el:fe,props:ve}=N,{bm:Ee,m:Me,parent:ye}=I,We=$l(N);if(Ms(I,!1),Ee&&op(Ee),!We&&(pe=ve&&ve.onVnodeBeforeMount)&&Ti(pe,ye,N),Ms(I,!0),fe&&Ae){const ct=()=>{I.subTree=N_(I),Ae(fe,I.subTree,I,V,null)};We?N.type.__asyncLoader().then(()=>!I.isUnmounted&&ct()):ct()}else{const ct=I.subTree=N_(I);b(null,ct,M,j,I,V,Q),N.el=ct.el}if(Me&&ir(Me,V),!We&&(pe=ve&&ve.onVnodeMounted)){const ct=N;ir(()=>Ti(pe,ye,ct),V)}(N.shapeFlag&256||ye&&$l(ye.vnode)&&ye.vnode.shapeFlag&256)&&I.a&&ir(I.a,V),I.isMounted=!0,N=M=j=null}},X=I.effect=new m0(z,()=>C0(K),I.scope),K=I.update=()=>X.run();K.id=I.uid,Ms(I,!0),K()},nt=(I,N,M)=>{N.component=I;const j=I.vnode.props;I.vnode=N,I.next=null,cq(I,N.props,j,M),hq(I,N.children,M),_c(),mk(),wc()},Ce=(I,N,M,j,V,Q,J,z,X=!1)=>{const K=I&&I.children,pe=I?I.shapeFlag:0,fe=N.children,{patchFlag:ve,shapeFlag:Ee}=N;if(ve>0){if(ve&128){Jn(K,fe,M,j,V,Q,J,z,X);return}else if(ve&256){Mn(K,fe,M,j,V,Q,J,z,X);return}}Ee&8?(pe&16&&ie(K,V,Q),fe!==K&&d(M,fe)):pe&16?Ee&16?Jn(K,fe,M,j,V,Q,J,z,X):ie(K,V,Q,!0):(pe&8&&d(M,""),Ee&16&&F(fe,M,j,V,Q,J,z,X))},Mn=(I,N,M,j,V,Q,J,z,X)=>{I=I||Au,N=N||Au;const K=I.length,pe=N.length,fe=Math.min(K,pe);let ve;for(ve=0;vepe?ie(I,V,Q,!0,!1,fe):F(N,M,j,V,Q,J,z,X,fe)},Jn=(I,N,M,j,V,Q,J,z,X)=>{let K=0;const pe=N.length;let fe=I.length-1,ve=pe-1;for(;K<=fe&&K<=ve;){const Ee=I[K],Me=N[K]=X?jo(N[K]):Ci(N[K]);if($s(Ee,Me))b(Ee,Me,M,null,V,Q,J,z,X);else break;K++}for(;K<=fe&&K<=ve;){const Ee=I[fe],Me=N[ve]=X?jo(N[ve]):Ci(N[ve]);if($s(Ee,Me))b(Ee,Me,M,null,V,Q,J,z,X);else break;fe--,ve--}if(K>fe){if(K<=ve){const Ee=ve+1,Me=Eeve)for(;K<=fe;)cn(I[K],V,Q,!0),K++;else{const Ee=K,Me=K,ye=new Map;for(K=Me;K<=ve;K++){const St=N[K]=X?jo(N[K]):Ci(N[K]);St.key!=null&&ye.set(St.key,K)}let We,ct=0;const Zn=ve-Me+1;let Hi=!1,It=0;const bo=new Array(Zn);for(K=0;K=Zn){cn(St,V,Q,!0);continue}let vr;if(St.key!=null)vr=ye.get(St.key);else for(We=Me;We<=ve;We++)if(bo[We-Me]===0&&$s(St,N[We])){vr=We;break}vr===void 0?cn(St,V,Q,!0):(bo[vr-Me]=K+1,vr>=It?It=vr:Hi=!0,b(St,N[vr],M,null,V,Q,J,z,X),ct++)}const pi=Hi?vq(bo):Au;for(We=pi.length-1,K=Zn-1;K>=0;K--){const St=Me+K,vr=N[St],ln=St+1{const{el:Q,type:J,transition:z,children:X,shapeFlag:K}=I;if(K&6){Ln(I.component.subTree,N,M,j);return}if(K&128){I.suspense.move(N,M,j);return}if(K&64){J.move(I,N,M,$e);return}if(J===Zt){r(Q,N,M);for(let fe=0;fez.enter(Q),V);else{const{leave:fe,delayLeave:ve,afterLeave:Ee}=z,Me=()=>r(Q,N,M),ye=()=>{fe(Q,()=>{Me(),Ee&&Ee()})};ve?ve(Q,Me,ye):ye()}else r(Q,N,M)},cn=(I,N,M,j=!1,V=!1)=>{const{type:Q,props:J,ref:z,children:X,dynamicChildren:K,shapeFlag:pe,patchFlag:fe,dirs:ve}=I;if(z!=null&&Uw(z,null,M,I,!0),pe&256){N.ctx.deactivate(I);return}const Ee=pe&1&&ve,Me=!$l(I);let ye;if(Me&&(ye=J&&J.onVnodeBeforeUnmount)&&Ti(ye,N,I),pe&6)B(I.component,M,j);else{if(pe&128){I.suspense.unmount(M,j);return}Ee&&Ds(I,null,N,"beforeUnmount"),pe&64?I.type.remove(I,N,M,V,$e,j):K&&(Q!==Zt||fe>0&&fe&64)?ie(K,N,M,!1,!0):(Q===Zt&&fe&384||!V&&pe&16)&&ie(X,N,M),j&&$i(I)}(Me&&(ye=J&&J.onVnodeUnmounted)||Ee)&&ir(()=>{ye&&Ti(ye,N,I),Ee&&Ds(I,null,N,"unmounted")},M)},$i=I=>{const{type:N,el:M,anchor:j,transition:V}=I;if(N===Zt){Kc(M,j);return}if(N===P_){L(I);return}const Q=()=>{i(M),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(I.shapeFlag&1&&V&&!V.persisted){const{leave:J,delayLeave:z}=V,X=()=>J(M,Q);z?z(I.el,Q,X):X()}else Q()},Kc=(I,N)=>{let M;for(;I!==N;)M=g(I),i(I),I=M;i(N)},B=(I,N,M)=>{const{bum:j,scope:V,update:Q,subTree:J,um:z}=I;j&&op(j),V.stop(),Q&&(Q.active=!1,cn(J,I,N,M)),z&&ir(z,N),ir(()=>{I.isUnmounted=!0},N),N&&N.pendingBranch&&!N.isUnmounted&&I.asyncDep&&!I.asyncResolved&&I.suspenseId===N.pendingId&&(N.deps--,N.deps===0&&N.resolve())},ie=(I,N,M,j=!1,V=!1,Q=0)=>{for(let J=Q;JI.shapeFlag&6?ne(I.component.subTree):I.shapeFlag&128?I.suspense.next():g(I.anchor||I.el),Z=(I,N,M)=>{I==null?N._vnode&&cn(N._vnode,null,null,!0):b(N._vnode||null,I,N,null,null,null,M),mk(),Jx(),N._vnode=I},$e={p:b,um:cn,m:Ln,r:$i,mt:Rt,mc:F,pc:Ce,pbc:k,n:ne,o:e};let pt,Ae;return t&&([pt,Ae]=t($e)),{render:Z,hydrate:pt,createApp:aq(Z,pt)}}function Ms({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function gO(e,t,n=!1){const r=e.children,i=t.children;if(ge(r)&&ge(i))for(let s=0;s>1,e[n[c]]0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,a=n[s-1];s-- >0;)n[s]=a,a=t[a];return n}const gq=e=>e.__isTeleport,Zt=Symbol.for("v-fgt"),Lv=Symbol.for("v-txt"),Br=Symbol.for("v-cmt"),P_=Symbol.for("v-stc"),Kl=[];let oi=null;function en(e=!1){Kl.push(oi=e?null:[])}function mq(){Kl.pop(),oi=Kl[Kl.length-1]||null}let gf=1;function Rk(e){gf+=e}function mO(e){return e.dynamicChildren=gf>0?oi||Au:null,mq(),gf>0&&oi&&oi.push(e),e}function Hn(e,t,n,r,i,s){return mO(ze(e,t,n,r,i,s,!0))}function O0(e,t,n,r,i){return mO(Ye(e,t,n,r,i,!0))}function kp(e){return e?e.__v_isVNode===!0:!1}function $s(e,t){return e.type===t.type&&e.key===t.key}const Fv="__vInternal",yO=({key:e})=>e??null,sp=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?jt(e)||Wt(e)||ke(e)?{i:vn,r:e,k:t,f:!!n}:e:null);function ze(e,t=null,n=null,r=0,i=null,s=e===Zt?0:1,a=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&yO(t),ref:t&&sp(t),scopeId:Ov,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:vn};return c?(P0(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=jt(n)?8:16),gf>0&&!a&&oi&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&oi.push(l),l}const Ye=yq;function yq(e,t=null,n=null,r=0,i=null,s=!1){if((!e||e===X3)&&(e=Br),kp(e)){const c=co(e,t,!0);return n&&P0(c,n),gf>0&&!s&&oi&&(c.shapeFlag&6?oi[oi.indexOf(e)]=c:oi.push(c)),c.patchFlag|=-2,c}if(Nq(e)&&(e=e.__vccOpts),t){t=_q(t);let{class:c,style:l}=t;c&&!jt(c)&&(t.class=hf(c)),at(l)&&(Kx(l)&&!ge(l)&&(l=Ut({},l)),t.style=p0(l))}const a=jt(e)?1:D3(e)?128:gq(e)?64:at(e)?4:ke(e)?2:0;return ze(e,t,n,r,i,a,s,!0)}function _q(e){return e?Kx(e)||Fv in e?Ut({},e):e:null}function co(e,t,n=!1){const{props:r,ref:i,patchFlag:s,children:a}=e,c=t?bq(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&yO(c),ref:t&&t.ref?n&&i?ge(i)?i.concat(sp(t)):[i,sp(t)]:sp(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Zt?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&co(e.ssContent),ssFallback:e.ssFallback&&co(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function io(e=" ",t=0){return Ye(Lv,null,e,t)}function wq(e="",t=!1){return t?(en(),O0(Br,null,e)):Ye(Br,null,e)}function Ci(e){return e==null||typeof e=="boolean"?Ye(Br):ge(e)?Ye(Zt,null,e.slice()):typeof e=="object"?jo(e):Ye(Lv,null,String(e))}function jo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:co(e)}function P0(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ge(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),P0(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(Fv in t)?t._ctx=vn:i===3&&vn&&(vn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ke(t)?(t={default:t,_ctx:vn},n=32):(t=String(t),r&64?(n=16,t=[io(t)]):n=8);e.children=t,e.shapeFlag|=n}function bq(...e){const t={};for(let n=0;nrn||vn;let M0,hu,Nk="__VUE_INSTANCE_SETTERS__";(hu=Aw()[Nk])||(hu=Aw()[Nk]=[]),hu.push(e=>rn=e),M0=e=>{hu.length>1?hu.forEach(t=>t(e)):hu[0](e)};const Vu=e=>{M0(e),e.scope.on()},na=()=>{rn&&rn.scope.off(),M0(null)};function _O(e){return e.vnode.shapeFlag&4}let mf=!1;function Sq(e,t=!1){mf=t;const{props:n,children:r}=e.vnode,i=_O(e);uq(e,n,i,t),fq(e,r);const s=i?Cq(e,t):void 0;return mf=!1,s}function Cq(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Wx(new Proxy(e.ctx,eq));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?kq(e):null;Vu(e),_c();const s=zo(r,e,0,[e.props,i]);if(wc(),na(),kx(s)){if(s.then(na,na),t)return s.then(a=>{xk(e,a,t)}).catch(a=>{Nv(a,e,0)});e.asyncDep=s}else xk(e,s,t)}else wO(e,t)}function xk(e,t,n){ke(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:at(t)&&(e.setupState=Qx(t)),wO(e,n)}let Ok;function wO(e,t,n){const r=e.type;if(!e.render){if(!t&&Ok&&!r.render){const i=r.template||N0(e).template;if(i){const{isCustomElement:s,compilerOptions:a}=e.appContext.config,{delimiters:c,compilerOptions:l}=r,h=Ut(Ut({isCustomElement:s,delimiters:c},a),l);r.render=Ok(i,h)}}e.render=r.render||ai}Vu(e),_c(),tq(e),wc(),na()}function Aq(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return hr(e,"get","$attrs"),t[n]}}))}function kq(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return Aq(e)},slots:e.slots,emit:e.emit,expose:t}}function Uv(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Qx(Wx(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Hl)return Hl[n](e)},has(t,n){return n in t||n in Hl}}))}function Rq(e,t=!0){return ke(e)?e.displayName||e.name:e.name||t&&e.__name}function Nq(e){return ke(e)&&"__vccOpts"in e}const Ze=(e,t)=>b3(e,t,mf);function ts(e,t,n){const r=arguments.length;return r===2?at(t)&&!ge(t)?kp(t)?Ye(e,null,[t]):Ye(e,t):Ye(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&kp(n)&&(n=[n]),Ye(e,t,n))}const xq=Symbol.for("v-scx"),Oq=()=>ar(xq),Pq="3.3.4",Dq="http://www.w3.org/2000/svg",Hs=typeof document<"u"?document:null,Pk=Hs&&Hs.createElement("template"),Mq={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?Hs.createElementNS(Dq,e):Hs.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Hs.createTextNode(e),createComment:e=>Hs.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Hs.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,s){const a=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{Pk.innerHTML=r?`${e}`:e;const c=Pk.content;if(r){const l=c.firstChild;for(;l.firstChild;)c.appendChild(l.firstChild);c.removeChild(l)}t.insertBefore(c,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Lq(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Fq(e,t,n){const r=e.style,i=jt(n);if(n&&!i){if(t&&!jt(t))for(const s in t)n[s]==null&&jw(r,s,"");for(const s in n)jw(r,s,n[s])}else{const s=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}const Dk=/\s*!important$/;function jw(e,t,n){if(ge(n))n.forEach(r=>jw(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Uq(e,t);Dk.test(n)?e.setProperty(Ca(r),n.replace(Dk,""),"important"):e[r]=n}}const Mk=["Webkit","Moz","ms"],D_={};function Uq(e,t){const n=D_[t];if(n)return n;let r=Mi(t);if(r!=="filter"&&r in e)return D_[t]=r;r=Av(r);for(let i=0;iM_||(Hq.then(()=>M_=0),M_=Date.now());function Wq(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Vr(Gq(r,n.value),t,5,[r])};return n.value=e,n.attached=Kq(),n}function Gq(e,t){if(ge(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Uk=/^on[a-z]/,zq=(e,t,n,r,i=!1,s,a,c,l)=>{t==="class"?Lq(e,r,i):t==="style"?Fq(e,n,r):Sv(t)?f0(t)||qq(e,t,n,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Qq(e,t,r,i))?Vq(e,t,r,s,a,c,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),jq(e,t,r,i))};function Qq(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Uk.test(t)&&ke(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Uk.test(t)&&jt(n)?!1:t in e}const xo="transition",kl="animation",L0=(e,{slots:t})=>ts(j3,Yq(e),t);L0.displayName="Transition";const bO={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};L0.props=Ut({},nO,bO);const Ls=(e,t=[])=>{ge(e)?e.forEach(n=>n(...t)):e&&e(...t)},jk=e=>e?ge(e)?e.some(t=>t.length>1):e.length>1:!1;function Yq(e){const t={};for(const ue in e)ue in bO||(t[ue]=e[ue]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:s=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:h=a,appearToClass:d=c,leaveFromClass:v=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,_=Xq(i),b=_&&_[0],T=_&&_[1],{onBeforeEnter:C,onEnter:x,onEnterCancelled:O,onLeave:L,onLeaveCancelled:$,onBeforeAppear:P=C,onAppear:re=x,onAppearCancelled:F=O}=t,oe=(ue,ut,Rt)=>{Fs(ue,ut?d:c),Fs(ue,ut?h:a),Rt&&Rt()},k=(ue,ut)=>{ue._isLeaving=!1,Fs(ue,v),Fs(ue,y),Fs(ue,g),ut&&ut()},dt=ue=>(ut,Rt)=>{const Xn=ue?re:x,tt=()=>oe(ut,ue,Rt);Ls(Xn,[ut,tt]),Vk(()=>{Fs(ut,ue?l:s),Oo(ut,ue?d:c),jk(Xn)||Bk(ut,r,b,tt)})};return Ut(t,{onBeforeEnter(ue){Ls(C,[ue]),Oo(ue,s),Oo(ue,a)},onBeforeAppear(ue){Ls(P,[ue]),Oo(ue,l),Oo(ue,h)},onEnter:dt(!1),onAppear:dt(!0),onLeave(ue,ut){ue._isLeaving=!0;const Rt=()=>k(ue,ut);Oo(ue,v),e$(),Oo(ue,g),Vk(()=>{ue._isLeaving&&(Fs(ue,v),Oo(ue,y),jk(L)||Bk(ue,r,T,Rt))}),Ls(L,[ue,Rt])},onEnterCancelled(ue){oe(ue,!1),Ls(O,[ue])},onAppearCancelled(ue){oe(ue,!0),Ls(F,[ue])},onLeaveCancelled(ue){k(ue),Ls($,[ue])}})}function Xq(e){if(e==null)return null;if(at(e))return[L_(e.enter),L_(e.leave)];{const t=L_(e);return[t,t]}}function L_(e){return AB(e)}function Oo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function Fs(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Vk(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Jq=0;function Bk(e,t,n,r){const i=e._endId=++Jq,s=()=>{i===e._endId&&r()};if(n)return setTimeout(s,n);const{type:a,timeout:c,propCount:l}=Zq(e,t);if(!a)return r();const h=a+"end";let d=0;const v=()=>{e.removeEventListener(h,g),s()},g=y=>{y.target===e&&++d>=l&&v()};setTimeout(()=>{d(n[_]||"").split(", "),i=r(`${xo}Delay`),s=r(`${xo}Duration`),a=qk(i,s),c=r(`${kl}Delay`),l=r(`${kl}Duration`),h=qk(c,l);let d=null,v=0,g=0;t===xo?a>0&&(d=xo,v=a,g=s.length):t===kl?h>0&&(d=kl,v=h,g=l.length):(v=Math.max(a,h),d=v>0?a>h?xo:kl:null,g=d?d===xo?s.length:l.length:0);const y=d===xo&&/\b(transform|all)(,|$)/.test(r(`${xo}Property`).toString());return{type:d,timeout:v,propCount:g,hasTransform:y}}function qk(e,t){for(;e.length$k(n)+$k(e[r])))}function $k(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function e$(){return document.body.offsetHeight}const ns=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ge(t)?n=>op(t,n):t};function t$(e){e.target.composing=!0}function Hk(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Rp={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=ns(i);const s=r||i.props&&i.props.type==="number";Zi(e,t?"change":"input",a=>{if(a.target.composing)return;let c=e.value;n&&(c=c.trim()),s&&(c=wp(c)),e._assign(c)}),n&&Zi(e,"change",()=>{e.value=e.value.trim()}),t||(Zi(e,"compositionstart",t$),Zi(e,"compositionend",Hk),Zi(e,"change",Hk))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},s){if(e._assign=ns(s),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&wp(e.value)===t))return;const a=t??"";e.value!==a&&(e.value=a)}},n$={deep:!0,created(e,t,n){e._assign=ns(n),Zi(e,"change",()=>{const r=e._modelValue,i=Bu(e),s=e.checked,a=e._assign;if(ge(r)){const c=v0(r,i),l=c!==-1;if(s&&!l)a(r.concat(i));else if(!s&&l){const h=[...r];h.splice(c,1),a(h)}}else if(yc(r)){const c=new Set(r);s?c.add(i):c.delete(i),a(c)}else a(EO(e,s))})},mounted:Kk,beforeUpdate(e,t,n){e._assign=ns(n),Kk(e,t,n)}};function Kk(e,{value:t,oldValue:n},r){e._modelValue=t,ge(t)?e.checked=v0(t,r.props.value)>-1:yc(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=ca(t,EO(e,!0)))}const r$={created(e,{value:t},n){e.checked=ca(t,n.props.value),e._assign=ns(n),Zi(e,"change",()=>{e._assign(Bu(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=ns(r),t!==n&&(e.checked=ca(t,r.props.value))}},i$={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=yc(t);Zi(e,"change",()=>{const s=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?wp(Bu(a)):Bu(a));e._assign(e.multiple?i?new Set(s):s:s[0])}),e._assign=ns(r)},mounted(e,{value:t}){Wk(e,t)},beforeUpdate(e,t,n){e._assign=ns(n)},updated(e,{value:t}){Wk(e,t)}};function Wk(e,t){const n=e.multiple;if(!(n&&!ge(t)&&!yc(t))){for(let r=0,i=e.options.length;r-1:s.selected=t.has(a);else if(ca(Bu(s),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Bu(e){return"_value"in e?e._value:e.value}function EO(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const o$={created(e,t,n){Fd(e,t,n,null,"created")},mounted(e,t,n){Fd(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Fd(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Fd(e,t,n,r,"updated")}};function s$(e,t){switch(e){case"SELECT":return i$;case"TEXTAREA":return Rp;default:switch(t){case"checkbox":return n$;case"radio":return r$;default:return Rp}}}function Fd(e,t,n,r,i){const a=s$(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}const a$=["ctrl","shift","alt","meta"],u$={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)=>a$.some(n=>e[`${n}Key`]&&!t.includes(n))},Gk=(e,t)=>(n,...r)=>{for(let i=0;in=>{if(!("key"in n))return;const r=Ca(n.key);if(t.some(i=>i===r||c$[i]===r))return e(n)},l$=Ut({patchProp:zq},Mq);let zk;function f$(){return zk||(zk=dq(l$))}const h$=(...e)=>{const t=f$().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=d$(r);if(!i)return;const s=t._component;!ke(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t};function d$(e){return jt(e)?document.querySelector(e):e}const IO=new Set,ur=new WeakMap,Pu=new WeakMap,la=new WeakMap,Vw=new WeakMap,p$=new WeakMap,qu=new WeakMap,Np=new WeakMap,Vl=new WeakSet;let fa;const eo="__aa_tgt",Bw="__aa_del",v$=e=>{const t=w$(e);t&&t.forEach(n=>b$(n))},g$=e=>{e.forEach(t=>{t.target===fa&&y$(),ur.has(t.target)&&ka(t.target)})};function m$(e){const t=Vw.get(e);t==null||t.disconnect();let n=ur.get(e),r=0;const i=5;n||(n=$u(e),ur.set(e,n));const{offsetWidth:s,offsetHeight:a}=fa,l=[n.top-i,s-(n.left+i+n.width),a-(n.top+i+n.height),n.left-i].map(d=>`${-1*Math.floor(d)}px`).join(" "),h=new IntersectionObserver(()=>{++r>1&&ka(e)},{root:fa,threshold:1,rootMargin:l});h.observe(e),Vw.set(e,h)}function ka(e){clearTimeout(Np.get(e));const t=jv(e),n=typeof t=="function"?500:t.duration;Np.set(e,setTimeout(async()=>{const r=la.get(e);try{await(r==null?void 0:r.finished),ur.set(e,$u(e)),m$(e)}catch{}},n))}function y$(){clearTimeout(Np.get(fa)),Np.set(fa,setTimeout(()=>{IO.forEach(e=>kO(e,t=>SO(()=>ka(t))))},100))}function _$(e){setTimeout(()=>{p$.set(e,setInterval(()=>SO(ka.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function SO(e){typeof requestIdleCallback=="function"?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let qw,Iu;typeof window<"u"&&(fa=document.documentElement,qw=new MutationObserver(v$),Iu=new ResizeObserver(g$),Iu.observe(fa));function w$(e){return e.reduce((r,i)=>[...r,...Array.from(i.addedNodes),...Array.from(i.removedNodes)],[]).every(r=>r.nodeName==="#comment")?!1:e.reduce((r,i)=>{if(r===!1)return!1;if(i.target instanceof Element){if(F_(i.target),!r.has(i.target)){r.add(i.target);for(let s=0;sn(e,qu.has(e)));for(let n=0;ni(r,qu.has(r)))}}function T$(e){const t=ur.get(e),n=$u(e);if(!F0(e))return ur.set(e,n);let r;if(!t)return;const i=jv(e);if(typeof i!="function"){const s=t.left-n.left,a=t.top-n.top,[c,l,h,d]=CO(e,t,n),v={transform:`translate(${s}px, ${a}px)`},g={transform:"translate(0, 0)"};c!==l&&(v.width=`${c}px`,g.width=`${l}px`),h!==d&&(v.height=`${h}px`,g.height=`${d}px`),r=e.animate([v,g],{duration:i.duration,easing:i.easing})}else r=new Animation(i(e,"remain",t,n)),r.play();la.set(e,r),ur.set(e,n),r.addEventListener("finish",ka.bind(null,e))}function I$(e){const t=$u(e);ur.set(e,t);const n=jv(e);if(!F0(e))return;let r;typeof n!="function"?r=e.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:n.duration*1.5,easing:"ease-in"}):(r=new Animation(n(e,"add",t)),r.play()),la.set(e,r),r.addEventListener("finish",ka.bind(null,e))}function S$(e){var t;if(!Pu.has(e)||!ur.has(e))return;const[n,r]=Pu.get(e);Object.defineProperty(e,Bw,{value:!0}),r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):n&&n.parentNode?n.parentNode.appendChild(e):(t=AO(e))===null||t===void 0||t.appendChild(e);function i(){var g;e.remove(),ur.delete(e),Pu.delete(e),la.delete(e),(g=Vw.get(e))===null||g===void 0||g.disconnect()}if(!F0(e))return i();const[s,a,c,l]=C$(e),h=jv(e),d=ur.get(e);let v;Object.assign(e.style,{position:"absolute",top:`${s}px`,left:`${a}px`,width:`${c}px`,height:`${l}px`,margin:0,pointerEvents:"none",transformOrigin:"center",zIndex:100}),typeof h!="function"?v=e.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:h.duration,easing:"ease-out"}):(v=new Animation(h(e,"remove",d)),v.play()),la.set(e,v),v.addEventListener("finish",i)}function C$(e){const t=ur.get(e),[n,,r]=CO(e,t,$u(e));let i=e.parentElement;for(;i&&(getComputedStyle(i).position==="static"||i instanceof HTMLBodyElement);)i=i.parentElement;i||(i=document.body);const s=getComputedStyle(i),a=ur.get(i)||$u(i),c=Math.round(t.top-a.top)-Ii(s.borderTopWidth),l=Math.round(t.left-a.left)-Ii(s.borderLeftWidth);return[c,l,n,r]}function A$(e,t={}){return qw&&Iu&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&typeof t!="function"&&!t.disrespectUserMotionPreference||(Vl.add(e),getComputedStyle(e).position==="static"&&Object.assign(e.style,{position:"relative"}),kO(e,ka,_$,i=>Iu==null?void 0:Iu.observe(i)),typeof t=="function"?qu.set(e,t):qu.set(e,{duration:250,easing:"ease-in-out",...t}),qw.observe(e,{childList:!0}),IO.add(e))),Object.freeze({parent:e,enable:()=>{Vl.add(e)},disable:()=>{Vl.delete(e)},isEnabled:()=>Vl.has(e)})}const k$={mounted:(e,t)=>{A$(e,t.value||{})}},R$={install(e){e.directive("auto-animate",k$)}};function N$(){return RO().__VUE_DEVTOOLS_GLOBAL_HOOK__}function RO(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const x$=typeof Proxy=="function",O$="devtools-plugin:setup",P$="plugin:settings:set";let du,$w;function D$(){var e;return du!==void 0||(typeof window<"u"&&window.performance?(du=!0,$w=window.performance):typeof global<"u"&&(!((e=global.perf_hooks)===null||e===void 0)&&e.performance)?(du=!0,$w=global.perf_hooks.performance):du=!1),du}function M$(){return D$()?$w.now():Date.now()}class L${constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const a in t.settings){const c=t.settings[a];r[a]=c.defaultValue}const i=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const a=localStorage.getItem(i),c=JSON.parse(a);Object.assign(s,c)}catch{}this.fallbacks={getSettings(){return s},setSettings(a){try{localStorage.setItem(i,JSON.stringify(a))}catch{}s=a},now(){return M$()}},n&&n.on(P$,(a,c)=>{a===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(a,c)=>this.target?this.target.on[c]:(...l)=>{this.onQueue.push({method:c,args:l})}}),this.proxiedTarget=new Proxy({},{get:(a,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...l)=>(this.targetQueue.push({method:c,args:l,resolve:()=>{}}),this.fallbacks[c](...l)):(...l)=>new Promise(h=>{this.targetQueue.push({method:c,args:l,resolve:h})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function F$(e,t){const n=e,r=RO(),i=N$(),s=x$&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))i.emit(O$,e,t);else{const a=s?new L$(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:a}),a&&t(a.proxiedTarget)}}/*! +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function l0(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}const gt={},Au=[],ai=()=>{},wB=()=>!1,bB=/^on[^a-z]/,Sv=e=>bB.test(e),f0=e=>e.startsWith("onUpdate:"),Ut=Object.assign,h0=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},EB=Object.prototype.hasOwnProperty,Ke=(e,t)=>EB.call(e,t),ge=Array.isArray,ku=e=>Jf(e)==="[object Map]",yc=e=>Jf(e)==="[object Set]",uk=e=>Jf(e)==="[object Date]",ke=e=>typeof e=="function",jt=e=>typeof e=="string",lf=e=>typeof e=="symbol",at=e=>e!==null&&typeof e=="object",kx=e=>at(e)&&ke(e.then)&&ke(e.catch),Rx=Object.prototype.toString,Jf=e=>Rx.call(e),TB=e=>Jf(e).slice(8,-1),Nx=e=>Jf(e)==="[object Object]",d0=e=>jt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,op=l0(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Cv=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},IB=/-(\w)/g,Mi=Cv(e=>e.replace(IB,(t,n)=>n?n.toUpperCase():"")),SB=/\B([A-Z])/g,Ca=Cv(e=>e.replace(SB,"-$1").toLowerCase()),Av=Cv(e=>e.charAt(0).toUpperCase()+e.slice(1)),R_=Cv(e=>e?`on${Av(e)}`:""),ff=(e,t)=>!Object.is(e,t),sp=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},bp=e=>{const t=parseFloat(e);return isNaN(t)?e:t},CB=e=>{const t=jt(e)?Number(e):NaN;return isNaN(t)?e:t};let ck;const Aw=()=>ck||(ck=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function p0(e){if(ge(e)){const t={};for(let n=0;n{if(n){const r=n.split(kB);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function hf(e){let t="";if(jt(e))t=e;else if(ge(e))for(let n=0;nca(n,t))}const Ep=e=>jt(e)?e:e==null?"":ge(e)||at(e)&&(e.toString===Rx||!ke(e.toString))?JSON.stringify(e,Ox,2):String(e),Ox=(e,t)=>t&&t.__v_isRef?Ox(e,t.value):ku(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:yc(t)?{[`Set(${t.size})`]:[...t.values()]}:at(t)&&!ge(t)&&!Nx(t)?String(t):t;let yr;class Px{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=yr,!t&&yr&&(this.index=(yr.scopes||(yr.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=yr;try{return yr=this,t()}finally{yr=n}}}on(){yr=this}off(){yr=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},Mx=e=>(e.w&es)>0,Lx=e=>(e.n&es)>0,FB=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(d==="length"||d>=l)&&c.push(h)})}else switch(n!==void 0&&c.push(a.get(n)),t){case"add":ge(e)?d0(n)&&c.push(a.get("length")):(c.push(a.get(ta)),ku(e)&&c.push(a.get(Rw)));break;case"delete":ge(e)||(c.push(a.get(ta)),ku(e)&&c.push(a.get(Rw)));break;case"set":ku(e)&&c.push(a.get(ta));break}if(c.length===1)c[0]&&Nw(c[0]);else{const l=[];for(const h of c)h&&l.push(...h);Nw(g0(l))}}function Nw(e,t){const n=ge(e)?e:[...e];for(const r of n)r.computed&&fk(r);for(const r of n)r.computed||fk(r)}function fk(e,t){(e!==ii||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}function jB(e,t){var n;return(n=Tp.get(e))==null?void 0:n.get(t)}const VB=l0("__proto__,__v_isRef,__isVue"),jx=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(lf)),BB=y0(),qB=y0(!1,!0),$B=y0(!0),hk=HB();function HB(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=We(this);for(let s=0,a=this.length;s{e[t]=function(...n){_c();const r=We(this)[t].apply(this,n);return wc(),r}}),e}function KB(e){const t=We(this);return fr(t,"has",e),t.hasOwnProperty(e)}function y0(e=!1,t=!1){return function(r,i,s){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&s===(e?t?a3:Hx:t?$x:qx).get(r))return r;const a=ge(r);if(!e){if(a&&Ke(hk,i))return Reflect.get(hk,i,s);if(i==="hasOwnProperty")return KB}const c=Reflect.get(r,i,s);return(lf(i)?jx.has(i):VB(i))||(e||fr(r,"get",i),t)?c:Wt(c)?a&&d0(i)?c:c.value:at(c)?e?Rv(c):bc(c):c}}const WB=Vx(),GB=Vx(!0);function Vx(e=!1){return function(n,r,i,s){let a=n[r];if(ju(a)&&Wt(a)&&!Wt(i))return!1;if(!e&&(!Ip(i)&&!ju(i)&&(a=We(a),i=We(i)),!ge(n)&&Wt(a)&&!Wt(i)))return a.value=i,!0;const c=ge(n)&&d0(r)?Number(r)e,kv=e=>Reflect.getPrototypeOf(e);function Od(e,t,n=!1,r=!1){e=e.__v_raw;const i=We(e),s=We(t);n||(t!==s&&fr(i,"get",t),fr(i,"get",s));const{has:a}=kv(i),c=r?_0:n?E0:df;if(a.call(i,t))return c(e.get(t));if(a.call(i,s))return c(e.get(s));e!==i&&e.get(t)}function Pd(e,t=!1){const n=this.__v_raw,r=We(n),i=We(e);return t||(e!==i&&fr(r,"has",e),fr(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Dd(e,t=!1){return e=e.__v_raw,!t&&fr(We(e),"iterate",ta),Reflect.get(e,"size",e)}function dk(e){e=We(e);const t=We(this);return kv(t).has.call(t,e)||(t.add(e),ao(t,"add",e,e)),this}function pk(e,t){t=We(t);const n=We(this),{has:r,get:i}=kv(n);let s=r.call(n,e);s||(e=We(e),s=r.call(n,e));const a=i.call(n,e);return n.set(e,t),s?ff(t,a)&&ao(n,"set",e,t):ao(n,"add",e,t),this}function vk(e){const t=We(this),{has:n,get:r}=kv(t);let i=n.call(t,e);i||(e=We(e),i=n.call(t,e)),r&&r.call(t,e);const s=t.delete(e);return i&&ao(t,"delete",e,void 0),s}function gk(){const e=We(this),t=e.size!==0,n=e.clear();return t&&ao(e,"clear",void 0,void 0),n}function Md(e,t){return function(r,i){const s=this,a=s.__v_raw,c=We(a),l=t?_0:e?E0:df;return!e&&fr(c,"iterate",ta),a.forEach((h,d)=>r.call(i,l(h),l(d),s))}}function Ld(e,t,n){return function(...r){const i=this.__v_raw,s=We(i),a=ku(s),c=e==="entries"||e===Symbol.iterator&&a,l=e==="keys"&&a,h=i[e](...r),d=n?_0:t?E0:df;return!t&&fr(s,"iterate",l?Rw:ta),{next(){const{value:v,done:g}=h.next();return g?{value:v,done:g}:{value:c?[d(v[0]),d(v[1])]:d(v),done:g}},[Symbol.iterator](){return this}}}}function Ro(e){return function(...t){return e==="delete"?!1:this}}function ZB(){const e={get(s){return Od(this,s)},get size(){return Dd(this)},has:Pd,add:dk,set:pk,delete:vk,clear:gk,forEach:Md(!1,!1)},t={get(s){return Od(this,s,!1,!0)},get size(){return Dd(this)},has:Pd,add:dk,set:pk,delete:vk,clear:gk,forEach:Md(!1,!0)},n={get(s){return Od(this,s,!0)},get size(){return Dd(this,!0)},has(s){return Pd.call(this,s,!0)},add:Ro("add"),set:Ro("set"),delete:Ro("delete"),clear:Ro("clear"),forEach:Md(!0,!1)},r={get(s){return Od(this,s,!0,!0)},get size(){return Dd(this,!0)},has(s){return Pd.call(this,s,!0)},add:Ro("add"),set:Ro("set"),delete:Ro("delete"),clear:Ro("clear"),forEach:Md(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{e[s]=Ld(s,!1,!1),n[s]=Ld(s,!0,!1),t[s]=Ld(s,!1,!0),r[s]=Ld(s,!0,!0)}),[e,n,t,r]}const[e3,t3,n3,r3]=ZB();function w0(e,t){const n=t?e?r3:n3:e?t3:e3;return(r,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(Ke(n,i)&&i in r?n:r,i,s)}const i3={get:w0(!1,!1)},o3={get:w0(!1,!0)},s3={get:w0(!0,!1)},qx=new WeakMap,$x=new WeakMap,Hx=new WeakMap,a3=new WeakMap;function u3(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function c3(e){return e.__v_skip||!Object.isExtensible(e)?0:u3(TB(e))}function bc(e){return ju(e)?e:b0(e,!1,Bx,i3,qx)}function l3(e){return b0(e,!1,JB,o3,$x)}function Rv(e){return b0(e,!0,XB,s3,Hx)}function b0(e,t,n,r,i){if(!at(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=i.get(e);if(s)return s;const a=c3(e);if(a===0)return e;const c=new Proxy(e,a===2?r:n);return i.set(e,c),c}function Ru(e){return ju(e)?Ru(e.__v_raw):!!(e&&e.__v_isReactive)}function ju(e){return!!(e&&e.__v_isReadonly)}function Ip(e){return!!(e&&e.__v_isShallow)}function Kx(e){return Ru(e)||ju(e)}function We(e){const t=e&&e.__v_raw;return t?We(t):e}function Wx(e){return wp(e,"__v_skip",!0),e}const df=e=>at(e)?bc(e):e,E0=e=>at(e)?Rv(e):e;function T0(e){Wo&&ii&&(e=We(e),Ux(e.dep||(e.dep=g0())))}function I0(e,t){e=We(e);const n=e.dep;n&&Nw(n)}function Wt(e){return!!(e&&e.__v_isRef===!0)}function Fe(e){return zx(e,!1)}function Gx(e){return zx(e,!0)}function zx(e,t){return Wt(e)?e:new f3(e,t)}class f3{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:We(t),this._value=n?t:df(t)}get value(){return T0(this),this._value}set value(t){const n=this.__v_isShallow||Ip(t)||ju(t);t=n?t:We(t),ff(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:df(t),I0(this))}}function Nu(e){return Wt(e)?e.value:e}const h3={get:(e,t,n)=>Nu(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return Wt(i)&&!Wt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Qx(e){return Ru(e)?e:new Proxy(e,h3)}class d3{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=t(()=>T0(this),()=>I0(this));this._get=n,this._set=r}get value(){return this._get()}set value(t){this._set(t)}}function p3(e){return new d3(e)}class v3{constructor(t,n,r){this._object=t,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return jB(We(this._object),this._key)}}class g3{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function m3(e,t,n){return Wt(e)?e:ke(e)?new g3(e):at(e)&&arguments.length>1?y3(e,t,n):Fe(e)}function y3(e,t,n){const r=e[t];return Wt(r)?r:new v3(e,t,n)}class _3{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new m0(t,()=>{this._dirty||(this._dirty=!0,I0(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=We(this);return T0(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function w3(e,t,n=!1){let r,i;const s=ke(e);return s?(r=e,i=ai):(r=e.get,i=e.set),new _3(r,i,s||!i,n)}function Go(e,t,n,r){let i;try{i=r?e(...r):e()}catch(s){Nv(s,t,n)}return i}function Vr(e,t,n,r){if(ke(e)){const s=Go(e,t,n,r);return s&&kx(s)&&s.catch(a=>{Nv(a,t,n)}),s}const i=[];for(let s=0;s>>1;vf(Cn[r])Ai&&Cn.splice(t,1)}function I3(e){ge(e)?xu.push(...e):(!Xi||!Xi.includes(e,e.allowRecurse?qs+1:qs))&&xu.push(e),Xx()}function mk(e,t=pf?Ai+1:0){for(;tvf(n)-vf(r)),qs=0;qse.id==null?1/0:e.id,S3=(e,t)=>{const n=vf(e)-vf(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Zx(e){xw=!1,pf=!0,Cn.sort(S3);const t=ai;try{for(Ai=0;Aijt(y)?y.trim():y)),v&&(i=n.map(bp))}let c,l=r[c=R_(t)]||r[c=R_(Mi(t))];!l&&s&&(l=r[c=R_(Ca(t))]),l&&Vr(l,e,6,i);const h=r[c+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Vr(h,e,6,i)}}function eO(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const s=e.emits;let a={},c=!1;if(!ke(e)){const l=h=>{const d=eO(h,t,!0);d&&(c=!0,Ut(a,d))};!n&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!s&&!c?(at(e)&&r.set(e,null),null):(ge(s)?s.forEach(l=>a[l]=null):Ut(a,s),at(e)&&r.set(e,a),a)}function xv(e,t){return!e||!Sv(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ke(e,t[0].toLowerCase()+t.slice(1))||Ke(e,Ca(t))||Ke(e,t))}let vn=null,Ov=null;function Sp(e){const t=vn;return vn=e,Ov=e&&e.type.__scopeId||null,t}function tO(e){Ov=e}function nO(){Ov=null}function Er(e,t=vn,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&Rk(-1);const s=Sp(t);let a;try{a=e(...i)}finally{Sp(s),r._d&&Rk(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function N_(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:s,propsOptions:[a],slots:c,attrs:l,emit:h,render:d,renderCache:v,data:g,setupState:y,ctx:_,inheritAttrs:b}=e;let T,C;const x=Sp(e);try{if(n.shapeFlag&4){const L=i||r;T=Ci(d.call(L,L,v,s,y,g,_)),C=l}else{const L=t;T=Ci(L.length>1?L(s,{attrs:l,slots:c,emit:h}):L(s,null)),C=t.props?l:A3(l)}}catch(L){Kl.length=0,Nv(L,e,1),T=Je(Br)}let O=T;if(C&&b!==!1){const L=Object.keys(C),{shapeFlag:$}=O;L.length&&$&7&&(a&&L.some(f0)&&(C=k3(C,a)),O=uo(O,C))}return n.dirs&&(O=uo(O),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition&&(O.transition=n.transition),T=O,Sp(x),T}const A3=e=>{let t;for(const n in e)(n==="class"||n==="style"||Sv(n))&&((t||(t={}))[n]=e[n]);return t},k3=(e,t)=>{const n={};for(const r in e)(!f0(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function R3(e,t,n){const{props:r,children:i,component:s}=e,{props:a,children:c,patchFlag:l}=t,h=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?yk(r,a,h):!!a;if(l&8){const d=t.dynamicProps;for(let v=0;ve.__isSuspense;function O3(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):I3(e)}function Ec(e,t){return A0(e,null,t)}const Fd={};function Ri(e,t,n){return A0(e,t,n)}function A0(e,t,{immediate:n,deep:r,flush:i,onTrack:s,onTrigger:a}=gt){var c;const l=Dx()===((c=nn)==null?void 0:c.scope)?nn:null;let h,d=!1,v=!1;if(Wt(e)?(h=()=>e.value,d=Ip(e)):Ru(e)?(h=()=>e,r=!0):ge(e)?(v=!0,d=e.some(L=>Ru(L)||Ip(L)),h=()=>e.map(L=>{if(Wt(L))return L.value;if(Ru(L))return Gs(L);if(ke(L))return Go(L,l,2)})):ke(e)?t?h=()=>Go(e,l,2):h=()=>{if(!(l&&l.isUnmounted))return g&&g(),Vr(e,l,3,[y])}:h=ai,t&&r){const L=h;h=()=>Gs(L())}let g,y=L=>{g=x.onStop=()=>{Go(L,l,4)}},_;if(mf)if(y=ai,t?n&&Vr(t,l,3,[h(),v?[]:void 0,y]):h(),i==="sync"){const L=kq();_=L.__watcherHandles||(L.__watcherHandles=[])}else return ai;let b=v?new Array(e.length).fill(Fd):Fd;const T=()=>{if(x.active)if(t){const L=x.run();(r||d||(v?L.some(($,P)=>ff($,b[P])):ff(L,b)))&&(g&&g(),Vr(t,l,3,[L,b===Fd?void 0:v&&b[0]===Fd?[]:b,y]),b=L)}else x.run()};T.allowRecurse=!!t;let C;i==="sync"?C=T:i==="post"?C=()=>rr(T,l&&l.suspense):(T.pre=!0,l&&(T.id=l.uid),C=()=>C0(T));const x=new m0(h,C);t?n?T():b=x.run():i==="post"?rr(x.run.bind(x),l&&l.suspense):x.run();const O=()=>{x.stop(),l&&l.scope&&h0(l.scope.effects,x)};return _&&_.push(O),O}function P3(e,t,n){const r=this.proxy,i=jt(e)?e.includes(".")?rO(r,e):()=>r[e]:e.bind(r,r);let s;ke(t)?s=t:(s=t.handler,n=t);const a=nn;Vu(this);const c=A0(i,s.bind(r),n);return a?Vu(a):na(),c}function rO(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i{Gs(n,t)});else if(Nx(e))for(const n in e)Gs(e[n],t);return e}function Cp(e,t){const n=vn;if(n===null)return e;const r=Uv(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let s=0;s{e.isMounted=!0}),k0(()=>{e.isUnmounting=!0}),e}const Dr=[Function,Array],iO={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Dr,onEnter:Dr,onAfterEnter:Dr,onEnterCancelled:Dr,onBeforeLeave:Dr,onLeave:Dr,onAfterLeave:Dr,onLeaveCancelled:Dr,onBeforeAppear:Dr,onAppear:Dr,onAfterAppear:Dr,onAppearCancelled:Dr},M3={name:"BaseTransition",props:iO,setup(e,{slots:t}){const n=D0(),r=D3();let i;return()=>{const s=t.default&&sO(t.default(),!0);if(!s||!s.length)return;let a=s[0];if(s.length>1){for(const b of s)if(b.type!==Br){a=b;break}}const c=We(e),{mode:l}=c;if(r.isLeaving)return x_(a);const h=_k(a);if(!h)return x_(a);const d=Ow(h,c,r,n);Pw(h,d);const v=n.subTree,g=v&&_k(v);let y=!1;const{getTransitionKey:_}=h.type;if(_){const b=_();i===void 0?i=b:b!==i&&(i=b,y=!0)}if(g&&g.type!==Br&&(!$s(h,g)||y)){const b=Ow(g,c,r,n);if(Pw(g,b),l==="out-in")return r.isLeaving=!0,b.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},x_(a);l==="in-out"&&h.type!==Br&&(b.delayLeave=(T,C,x)=>{const O=oO(r,g);O[String(g.key)]=g,T._leaveCb=()=>{C(),T._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=x})}return a}}},L3=M3;function oO(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Ow(e,t,n,r){const{appear:i,mode:s,persisted:a=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:h,onEnterCancelled:d,onBeforeLeave:v,onLeave:g,onAfterLeave:y,onLeaveCancelled:_,onBeforeAppear:b,onAppear:T,onAfterAppear:C,onAppearCancelled:x}=t,O=String(e.key),L=oO(n,e),$=(F,se)=>{F&&Vr(F,r,9,se)},P=(F,se)=>{const k=se[1];$(F,se),ge(F)?F.every(dt=>dt.length<=1)&&k():F.length<=1&&k()},re={mode:s,persisted:a,beforeEnter(F){let se=c;if(!n.isMounted)if(i)se=b||c;else return;F._leaveCb&&F._leaveCb(!0);const k=L[O];k&&$s(e,k)&&k.el._leaveCb&&k.el._leaveCb(),$(se,[F])},enter(F){let se=l,k=h,dt=d;if(!n.isMounted)if(i)se=T||l,k=C||h,dt=x||d;else return;let ue=!1;const ut=F._enterCb=Rt=>{ue||(ue=!0,Rt?$(dt,[F]):$(k,[F]),re.delayedLeave&&re.delayedLeave(),F._enterCb=void 0)};se?P(se,[F,ut]):ut()},leave(F,se){const k=String(e.key);if(F._enterCb&&F._enterCb(!0),n.isUnmounting)return se();$(v,[F]);let dt=!1;const ue=F._leaveCb=ut=>{dt||(dt=!0,se(),ut?$(_,[F]):$(y,[F]),F._leaveCb=void 0,L[k]===e&&delete L[k])};L[k]=e,g?P(g,[F,ue]):ue()},clone(F){return Ow(F,t,n,r)}};return re}function x_(e){if(Pv(e))return e=uo(e),e.children=null,e}function _k(e){return Pv(e)?e.children?e.children[0]:void 0:e}function Pw(e,t){e.shapeFlag&6&&e.component?Pw(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function sO(e,t=!1,n){let r=[],i=0;for(let s=0;s1)for(let s=0;sUt({name:e.name},t,{setup:e}))():e}const $l=e=>!!e.type.__asyncLoader,Pv=e=>e.type.__isKeepAlive;function F3(e,t){aO(e,"a",t)}function U3(e,t){aO(e,"da",t)}function aO(e,t,n=nn){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Dv(t,r,n),n){let i=n.parent;for(;i&&i.parent;)Pv(i.parent.vnode)&&j3(r,t,n,i),i=i.parent}}function j3(e,t,n,r){const i=Dv(t,e,r,!0);R0(()=>{h0(r[t],i)},n)}function Dv(e,t,n=nn,r=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...a)=>{if(n.isUnmounted)return;_c(),Vu(n);const c=Vr(t,n,e,a);return na(),wc(),c});return r?i.unshift(s):i.push(s),s}}const vo=e=>(t,n=nn)=>(!mf||e==="sp")&&Dv(e,(...r)=>t(...r),n),V3=vo("bm"),Aa=vo("m"),B3=vo("bu"),q3=vo("u"),k0=vo("bum"),R0=vo("um"),$3=vo("sp"),H3=vo("rtg"),K3=vo("rtc");function W3(e,t=nn){Dv("ec",e,t)}const uO="components";function $n(e,t){return z3(uO,e,!0,t)||e}const G3=Symbol.for("v-ndc");function z3(e,t,n=!0,r=!1){const i=vn||nn;if(i){const s=i.type;if(e===uO){const c=Sq(s,!1);if(c&&(c===t||c===Mi(t)||c===Av(Mi(t))))return s}const a=wk(i[e]||s[e],t)||wk(i.appContext[e],t);return!a&&r?s:a}}function wk(e,t){return e&&(e[t]||e[Mi(t)]||e[Av(Mi(t))])}function Q3(e,t,n,r){let i;const s=n&&n[r];if(ge(e)||jt(e)){i=new Array(e.length);for(let a=0,c=e.length;at(a,c,void 0,s&&s[c]));else{const a=Object.keys(e);i=new Array(a.length);for(let c=0,l=a.length;cRp(t)?!(t.type===Br||t.type===Zt&&!cO(t.children)):!0)?e:null}const Dw=e=>e?wO(e)?Uv(e)||e.proxy:Dw(e.parent):null,Hl=Ut(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=>Dw(e.parent),$root:e=>Dw(e.root),$emit:e=>e.emit,$options:e=>N0(e),$forceUpdate:e=>e.f||(e.f=()=>C0(e.update)),$nextTick:e=>e.n||(e.n=ui.bind(e.proxy)),$watch:e=>P3.bind(e)}),O_=(e,t)=>e!==gt&&!e.__isScriptSetup&&Ke(e,t),Y3={get({_:e},t){const{ctx:n,setupState:r,data:i,props:s,accessCache:a,type:c,appContext:l}=e;let h;if(t[0]!=="$"){const y=a[t];if(y!==void 0)switch(y){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(O_(r,t))return a[t]=1,r[t];if(i!==gt&&Ke(i,t))return a[t]=2,i[t];if((h=e.propsOptions[0])&&Ke(h,t))return a[t]=3,s[t];if(n!==gt&&Ke(n,t))return a[t]=4,n[t];Mw&&(a[t]=0)}}const d=Hl[t];let v,g;if(d)return t==="$attrs"&&fr(e,"get",t),d(e);if((v=c.__cssModules)&&(v=v[t]))return v;if(n!==gt&&Ke(n,t))return a[t]=4,n[t];if(g=l.config.globalProperties,Ke(g,t))return g[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:s}=e;return O_(i,t)?(i[t]=n,!0):r!==gt&&Ke(r,t)?(r[t]=n,!0):Ke(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:s}},a){let c;return!!n[a]||e!==gt&&Ke(e,a)||O_(t,a)||(c=s[0])&&Ke(c,a)||Ke(r,a)||Ke(Hl,a)||Ke(i.config.globalProperties,a)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ke(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function bk(e){return ge(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Mw=!0;function X3(e){const t=N0(e),n=e.proxy,r=e.ctx;Mw=!1,t.beforeCreate&&Ek(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:a,watch:c,provide:l,inject:h,created:d,beforeMount:v,mounted:g,beforeUpdate:y,updated:_,activated:b,deactivated:T,beforeDestroy:C,beforeUnmount:x,destroyed:O,unmounted:L,render:$,renderTracked:P,renderTriggered:re,errorCaptured:F,serverPrefetch:se,expose:k,inheritAttrs:dt,components:ue,directives:ut,filters:Rt}=t;if(h&&J3(h,r,null),a)for(const nt in a){const Ce=a[nt];ke(Ce)&&(r[nt]=Ce.bind(n))}if(i){const nt=i.call(n,n);at(nt)&&(e.data=bc(nt))}if(Mw=!0,s)for(const nt in s){const Ce=s[nt],Dn=ke(Ce)?Ce.bind(n,n):ke(Ce.get)?Ce.get.bind(n,n):ai,Xn=!ke(Ce)&&ke(Ce.set)?Ce.set.bind(n):ai,Mn=Ze({get:Dn,set:Xn});Object.defineProperty(r,nt,{enumerable:!0,configurable:!0,get:()=>Mn.value,set:un=>Mn.value=un})}if(c)for(const nt in c)lO(c[nt],r,n,nt);if(l){const nt=ke(l)?l.call(n):l;Reflect.ownKeys(nt).forEach(Ce=>{Ou(Ce,nt[Ce])})}d&&Ek(d,e,"c");function tt(nt,Ce){ge(Ce)?Ce.forEach(Dn=>nt(Dn.bind(n))):Ce&&nt(Ce.bind(n))}if(tt(V3,v),tt(Aa,g),tt(B3,y),tt(q3,_),tt(F3,b),tt(U3,T),tt(W3,F),tt(K3,P),tt(H3,re),tt(k0,x),tt(R0,L),tt($3,se),ge(k))if(k.length){const nt=e.exposed||(e.exposed={});k.forEach(Ce=>{Object.defineProperty(nt,Ce,{get:()=>n[Ce],set:Dn=>n[Ce]=Dn})})}else e.exposed||(e.exposed={});$&&e.render===ai&&(e.render=$),dt!=null&&(e.inheritAttrs=dt),ue&&(e.components=ue),ut&&(e.directives=ut)}function J3(e,t,n=ai){ge(e)&&(e=Lw(e));for(const r in e){const i=e[r];let s;at(i)?"default"in i?s=sr(i.from||r,i.default,!0):s=sr(i.from||r):s=sr(i),Wt(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:a=>s.value=a}):t[r]=s}}function Ek(e,t,n){Vr(ge(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function lO(e,t,n,r){const i=r.includes(".")?rO(n,r):()=>n[r];if(jt(e)){const s=t[e];ke(s)&&Ri(i,s)}else if(ke(e))Ri(i,e.bind(n));else if(at(e))if(ge(e))e.forEach(s=>lO(s,t,n,r));else{const s=ke(e.handler)?e.handler.bind(n):t[e.handler];ke(s)&&Ri(i,s,e)}}function N0(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:a}}=e.appContext,c=s.get(t);let l;return c?l=c:!i.length&&!n&&!r?l=t:(l={},i.length&&i.forEach(h=>Ap(l,h,a,!0)),Ap(l,t,a)),at(t)&&s.set(t,l),l}function Ap(e,t,n,r=!1){const{mixins:i,extends:s}=t;s&&Ap(e,s,n,!0),i&&i.forEach(a=>Ap(e,a,n,!0));for(const a in t)if(!(r&&a==="expose")){const c=Z3[a]||n&&n[a];e[a]=c?c(e[a],t[a]):t[a]}return e}const Z3={data:Tk,props:Ik,emits:Ik,methods:jl,computed:jl,beforeCreate:Vn,created:Vn,beforeMount:Vn,mounted:Vn,beforeUpdate:Vn,updated:Vn,beforeDestroy:Vn,beforeUnmount:Vn,destroyed:Vn,unmounted:Vn,activated:Vn,deactivated:Vn,errorCaptured:Vn,serverPrefetch:Vn,components:jl,directives:jl,watch:tq,provide:Tk,inject:eq};function Tk(e,t){return t?e?function(){return Ut(ke(e)?e.call(this,this):e,ke(t)?t.call(this,this):t)}:t:e}function eq(e,t){return jl(Lw(e),Lw(t))}function Lw(e){if(ge(e)){const t={};for(let n=0;n1)return n&&ke(t)?t.call(r&&r.proxy):t}}function iq(e,t,n,r=!1){const i={},s={};wp(s,Fv,1),e.propsDefaults=Object.create(null),hO(e,t,i,s);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);n?e.props=r?i:l3(i):e.type.props?e.props=i:e.props=s,e.attrs=s}function oq(e,t,n,r){const{props:i,attrs:s,vnode:{patchFlag:a}}=e,c=We(i),[l]=e.propsOptions;let h=!1;if((r||a>0)&&!(a&16)){if(a&8){const d=e.vnode.dynamicProps;for(let v=0;v{l=!0;const[g,y]=dO(v,t,!0);Ut(a,g),y&&c.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!s&&!l)return at(e)&&r.set(e,Au),Au;if(ge(s))for(let d=0;d-1,y[1]=b<0||_-1||Ke(y,"default"))&&c.push(v)}}}const h=[a,c];return at(e)&&r.set(e,h),h}function Sk(e){return e[0]!=="$"}function Ck(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Ak(e,t){return Ck(e)===Ck(t)}function kk(e,t){return ge(t)?t.findIndex(n=>Ak(n,e)):ke(t)&&Ak(t,e)?0:-1}const pO=e=>e[0]==="_"||e==="$stable",x0=e=>ge(e)?e.map(Ci):[Ci(e)],sq=(e,t,n)=>{if(t._n)return t;const r=Er((...i)=>x0(t(...i)),n);return r._c=!1,r},vO=(e,t,n)=>{const r=e._ctx;for(const i in e){if(pO(i))continue;const s=e[i];if(ke(s))t[i]=sq(i,s,r);else if(s!=null){const a=x0(s);t[i]=()=>a}}},gO=(e,t)=>{const n=x0(t);e.slots.default=()=>n},aq=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=We(t),wp(t,"_",n)):vO(t,e.slots={})}else e.slots={},t&&gO(e,t);wp(e.slots,Fv,1)},uq=(e,t,n)=>{const{vnode:r,slots:i}=e;let s=!0,a=gt;if(r.shapeFlag&32){const c=t._;c?n&&c===1?s=!1:(Ut(i,t),!n&&c===1&&delete i._):(s=!t.$stable,vO(t,i)),a=t}else t&&(gO(e,t),a={default:1});if(s)for(const c in i)!pO(c)&&!(c in a)&&delete i[c]};function Uw(e,t,n,r,i=!1){if(ge(e)){e.forEach((g,y)=>Uw(g,t&&(ge(t)?t[y]:t),n,r,i));return}if($l(r)&&!i)return;const s=r.shapeFlag&4?Uv(r.component)||r.component.proxy:r.el,a=i?null:s,{i:c,r:l}=e,h=t&&t.r,d=c.refs===gt?c.refs={}:c.refs,v=c.setupState;if(h!=null&&h!==l&&(jt(h)?(d[h]=null,Ke(v,h)&&(v[h]=null)):Wt(h)&&(h.value=null)),ke(l))Go(l,c,12,[a,d]);else{const g=jt(l),y=Wt(l);if(g||y){const _=()=>{if(e.f){const b=g?Ke(v,l)?v[l]:d[l]:l.value;i?ge(b)&&h0(b,s):ge(b)?b.includes(s)||b.push(s):g?(d[l]=[s],Ke(v,l)&&(v[l]=d[l])):(l.value=[s],e.k&&(d[e.k]=l.value))}else g?(d[l]=a,Ke(v,l)&&(v[l]=a)):y&&(l.value=a,e.k&&(d[e.k]=a))};a?(_.id=-1,rr(_,n)):_()}}}const rr=O3;function cq(e){return lq(e)}function lq(e,t){const n=Aw();n.__VUE__=!0;const{insert:r,remove:i,patchProp:s,createElement:a,createText:c,createComment:l,setText:h,setElementText:d,parentNode:v,nextSibling:g,setScopeId:y=ai,insertStaticContent:_}=e,b=(I,N,M,j=null,V=null,Q=null,J=!1,z=null,X=!!N.dynamicChildren)=>{if(I===N)return;I&&!$s(I,N)&&(j=ne(I),un(I,V,Q,!0),I=null),N.patchFlag===-2&&(X=!1,N.dynamicChildren=null);const{type:K,ref:pe,shapeFlag:fe}=N;switch(K){case Lv:T(I,N,M,j);break;case Br:C(I,N,M,j);break;case P_:I==null&&x(N,M,j,J);break;case Zt:ue(I,N,M,j,V,Q,J,z,X);break;default:fe&1?$(I,N,M,j,V,Q,J,z,X):fe&6?ut(I,N,M,j,V,Q,J,z,X):(fe&64||fe&128)&&K.process(I,N,M,j,V,Q,J,z,X,He)}pe!=null&&V&&Uw(pe,I&&I.ref,Q,N||I,!N)},T=(I,N,M,j)=>{if(I==null)r(N.el=c(N.children),M,j);else{const V=N.el=I.el;N.children!==I.children&&h(V,N.children)}},C=(I,N,M,j)=>{I==null?r(N.el=l(N.children||""),M,j):N.el=I.el},x=(I,N,M,j)=>{[I.el,I.anchor]=_(I.children,N,M,j,I.el,I.anchor)},O=({el:I,anchor:N},M,j)=>{let V;for(;I&&I!==N;)V=g(I),r(I,M,j),I=V;r(N,M,j)},L=({el:I,anchor:N})=>{let M;for(;I&&I!==N;)M=g(I),i(I),I=M;i(N)},$=(I,N,M,j,V,Q,J,z,X)=>{J=J||N.type==="svg",I==null?P(N,M,j,V,Q,J,z,X):se(I,N,V,Q,J,z,X)},P=(I,N,M,j,V,Q,J,z)=>{let X,K;const{type:pe,props:fe,shapeFlag:ve,transition:Ee,dirs:Me}=I;if(X=I.el=a(I.type,Q,fe&&fe.is,fe),ve&8?d(X,I.children):ve&16&&F(I.children,X,null,j,V,Q&&pe!=="foreignObject",J,z),Me&&Ds(I,null,j,"created"),re(X,I,I.scopeId,J,j),fe){for(const Ge in fe)Ge!=="value"&&!op(Ge)&&s(X,Ge,null,fe[Ge],Q,I.children,j,V,ie);"value"in fe&&s(X,"value",null,fe.value),(K=fe.onVnodeBeforeMount)&&Ti(K,j,I)}Me&&Ds(I,null,j,"beforeMount");const ye=(!V||V&&!V.pendingBranch)&&Ee&&!Ee.persisted;ye&&Ee.beforeEnter(X),r(X,N,M),((K=fe&&fe.onVnodeMounted)||ye||Me)&&rr(()=>{K&&Ti(K,j,I),ye&&Ee.enter(X),Me&&Ds(I,null,j,"mounted")},V)},re=(I,N,M,j,V)=>{if(M&&y(I,M),j)for(let Q=0;Q{for(let K=X;K{const z=N.el=I.el;let{patchFlag:X,dynamicChildren:K,dirs:pe}=N;X|=I.patchFlag&16;const fe=I.props||gt,ve=N.props||gt;let Ee;M&&Ms(M,!1),(Ee=ve.onVnodeBeforeUpdate)&&Ti(Ee,M,N,I),pe&&Ds(N,I,M,"beforeUpdate"),M&&Ms(M,!0);const Me=V&&N.type!=="foreignObject";if(K?k(I.dynamicChildren,K,z,M,j,Me,Q):J||Ce(I,N,z,null,M,j,Me,Q,!1),X>0){if(X&16)dt(z,N,fe,ve,M,j,V);else if(X&2&&fe.class!==ve.class&&s(z,"class",null,ve.class,V),X&4&&s(z,"style",fe.style,ve.style,V),X&8){const ye=N.dynamicProps;for(let Ge=0;Ge{Ee&&Ti(Ee,M,N,I),pe&&Ds(N,I,M,"updated")},j)},k=(I,N,M,j,V,Q,J)=>{for(let z=0;z{if(M!==j){if(M!==gt)for(const z in M)!op(z)&&!(z in j)&&s(I,z,M[z],null,J,N.children,V,Q,ie);for(const z in j){if(op(z))continue;const X=j[z],K=M[z];X!==K&&z!=="value"&&s(I,z,K,X,J,N.children,V,Q,ie)}"value"in j&&s(I,"value",M.value,j.value)}},ue=(I,N,M,j,V,Q,J,z,X)=>{const K=N.el=I?I.el:c(""),pe=N.anchor=I?I.anchor:c("");let{patchFlag:fe,dynamicChildren:ve,slotScopeIds:Ee}=N;Ee&&(z=z?z.concat(Ee):Ee),I==null?(r(K,M,j),r(pe,M,j),F(N.children,M,pe,V,Q,J,z,X)):fe>0&&fe&64&&ve&&I.dynamicChildren?(k(I.dynamicChildren,ve,M,V,Q,J,z),(N.key!=null||V&&N===V.subTree)&&mO(I,N,!0)):Ce(I,N,M,pe,V,Q,J,z,X)},ut=(I,N,M,j,V,Q,J,z,X)=>{N.slotScopeIds=z,I==null?N.shapeFlag&512?V.ctx.activate(N,M,j,J,X):Rt(N,M,j,V,Q,J,X):Yn(I,N,X)},Rt=(I,N,M,j,V,Q,J)=>{const z=I.component=wq(I,j,V);if(Pv(I)&&(z.ctx.renderer=He),bq(z),z.asyncDep){if(V&&V.registerDep(z,tt),!I.el){const X=z.subTree=Je(Br);C(null,X,N,M)}return}tt(z,I,N,M,V,Q,J)},Yn=(I,N,M)=>{const j=N.component=I.component;if(R3(I,N,M))if(j.asyncDep&&!j.asyncResolved){nt(j,N,M);return}else j.next=N,T3(j.update),j.update();else N.el=I.el,j.vnode=N},tt=(I,N,M,j,V,Q,J)=>{const z=()=>{if(I.isMounted){let{next:pe,bu:fe,u:ve,parent:Ee,vnode:Me}=I,ye=pe,Ge;Ms(I,!1),pe?(pe.el=Me.el,nt(I,pe,J)):pe=Me,fe&&sp(fe),(Ge=pe.props&&pe.props.onVnodeBeforeUpdate)&&Ti(Ge,Ee,pe,Me),Ms(I,!0);const ct=N_(I),Jn=I.subTree;I.subTree=ct,b(Jn,ct,v(Jn.el),ne(Jn),I,V,Q),pe.el=ct.el,ye===null&&N3(I,ct.el),ve&&rr(ve,V),(Ge=pe.props&&pe.props.onVnodeUpdated)&&rr(()=>Ti(Ge,Ee,pe,Me),V)}else{let pe;const{el:fe,props:ve}=N,{bm:Ee,m:Me,parent:ye}=I,Ge=$l(N);if(Ms(I,!1),Ee&&sp(Ee),!Ge&&(pe=ve&&ve.onVnodeBeforeMount)&&Ti(pe,ye,N),Ms(I,!0),fe&&Ae){const ct=()=>{I.subTree=N_(I),Ae(fe,I.subTree,I,V,null)};Ge?N.type.__asyncLoader().then(()=>!I.isUnmounted&&ct()):ct()}else{const ct=I.subTree=N_(I);b(null,ct,M,j,I,V,Q),N.el=ct.el}if(Me&&rr(Me,V),!Ge&&(pe=ve&&ve.onVnodeMounted)){const ct=N;rr(()=>Ti(pe,ye,ct),V)}(N.shapeFlag&256||ye&&$l(ye.vnode)&&ye.vnode.shapeFlag&256)&&I.a&&rr(I.a,V),I.isMounted=!0,N=M=j=null}},X=I.effect=new m0(z,()=>C0(K),I.scope),K=I.update=()=>X.run();K.id=I.uid,Ms(I,!0),K()},nt=(I,N,M)=>{N.component=I;const j=I.vnode.props;I.vnode=N,I.next=null,oq(I,N.props,j,M),uq(I,N.children,M),_c(),mk(),wc()},Ce=(I,N,M,j,V,Q,J,z,X=!1)=>{const K=I&&I.children,pe=I?I.shapeFlag:0,fe=N.children,{patchFlag:ve,shapeFlag:Ee}=N;if(ve>0){if(ve&128){Xn(K,fe,M,j,V,Q,J,z,X);return}else if(ve&256){Dn(K,fe,M,j,V,Q,J,z,X);return}}Ee&8?(pe&16&&ie(K,V,Q),fe!==K&&d(M,fe)):pe&16?Ee&16?Xn(K,fe,M,j,V,Q,J,z,X):ie(K,V,Q,!0):(pe&8&&d(M,""),Ee&16&&F(fe,M,j,V,Q,J,z,X))},Dn=(I,N,M,j,V,Q,J,z,X)=>{I=I||Au,N=N||Au;const K=I.length,pe=N.length,fe=Math.min(K,pe);let ve;for(ve=0;vepe?ie(I,V,Q,!0,!1,fe):F(N,M,j,V,Q,J,z,X,fe)},Xn=(I,N,M,j,V,Q,J,z,X)=>{let K=0;const pe=N.length;let fe=I.length-1,ve=pe-1;for(;K<=fe&&K<=ve;){const Ee=I[K],Me=N[K]=X?Uo(N[K]):Ci(N[K]);if($s(Ee,Me))b(Ee,Me,M,null,V,Q,J,z,X);else break;K++}for(;K<=fe&&K<=ve;){const Ee=I[fe],Me=N[ve]=X?Uo(N[ve]):Ci(N[ve]);if($s(Ee,Me))b(Ee,Me,M,null,V,Q,J,z,X);else break;fe--,ve--}if(K>fe){if(K<=ve){const Ee=ve+1,Me=Eeve)for(;K<=fe;)un(I[K],V,Q,!0),K++;else{const Ee=K,Me=K,ye=new Map;for(K=Me;K<=ve;K++){const St=N[K]=X?Uo(N[K]):Ci(N[K]);St.key!=null&&ye.set(St.key,K)}let Ge,ct=0;const Jn=ve-Me+1;let Hi=!1,It=0;const wo=new Array(Jn);for(K=0;K=Jn){un(St,V,Q,!0);continue}let pr;if(St.key!=null)pr=ye.get(St.key);else for(Ge=Me;Ge<=ve;Ge++)if(wo[Ge-Me]===0&&$s(St,N[Ge])){pr=Ge;break}pr===void 0?un(St,V,Q,!0):(wo[pr-Me]=K+1,pr>=It?It=pr:Hi=!0,b(St,N[pr],M,null,V,Q,J,z,X),ct++)}const pi=Hi?fq(wo):Au;for(Ge=pi.length-1,K=Jn-1;K>=0;K--){const St=Me+K,pr=N[St],cn=St+1{const{el:Q,type:J,transition:z,children:X,shapeFlag:K}=I;if(K&6){Mn(I.component.subTree,N,M,j);return}if(K&128){I.suspense.move(N,M,j);return}if(K&64){J.move(I,N,M,He);return}if(J===Zt){r(Q,N,M);for(let fe=0;fez.enter(Q),V);else{const{leave:fe,delayLeave:ve,afterLeave:Ee}=z,Me=()=>r(Q,N,M),ye=()=>{fe(Q,()=>{Me(),Ee&&Ee()})};ve?ve(Q,Me,ye):ye()}else r(Q,N,M)},un=(I,N,M,j=!1,V=!1)=>{const{type:Q,props:J,ref:z,children:X,dynamicChildren:K,shapeFlag:pe,patchFlag:fe,dirs:ve}=I;if(z!=null&&Uw(z,null,M,I,!0),pe&256){N.ctx.deactivate(I);return}const Ee=pe&1&&ve,Me=!$l(I);let ye;if(Me&&(ye=J&&J.onVnodeBeforeUnmount)&&Ti(ye,N,I),pe&6)B(I.component,M,j);else{if(pe&128){I.suspense.unmount(M,j);return}Ee&&Ds(I,null,N,"beforeUnmount"),pe&64?I.type.remove(I,N,M,V,He,j):K&&(Q!==Zt||fe>0&&fe&64)?ie(K,N,M,!1,!0):(Q===Zt&&fe&384||!V&&pe&16)&&ie(X,N,M),j&&$i(I)}(Me&&(ye=J&&J.onVnodeUnmounted)||Ee)&&rr(()=>{ye&&Ti(ye,N,I),Ee&&Ds(I,null,N,"unmounted")},M)},$i=I=>{const{type:N,el:M,anchor:j,transition:V}=I;if(N===Zt){Kc(M,j);return}if(N===P_){L(I);return}const Q=()=>{i(M),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(I.shapeFlag&1&&V&&!V.persisted){const{leave:J,delayLeave:z}=V,X=()=>J(M,Q);z?z(I.el,Q,X):X()}else Q()},Kc=(I,N)=>{let M;for(;I!==N;)M=g(I),i(I),I=M;i(N)},B=(I,N,M)=>{const{bum:j,scope:V,update:Q,subTree:J,um:z}=I;j&&sp(j),V.stop(),Q&&(Q.active=!1,un(J,I,N,M)),z&&rr(z,N),rr(()=>{I.isUnmounted=!0},N),N&&N.pendingBranch&&!N.isUnmounted&&I.asyncDep&&!I.asyncResolved&&I.suspenseId===N.pendingId&&(N.deps--,N.deps===0&&N.resolve())},ie=(I,N,M,j=!1,V=!1,Q=0)=>{for(let J=Q;JI.shapeFlag&6?ne(I.component.subTree):I.shapeFlag&128?I.suspense.next():g(I.anchor||I.el),Z=(I,N,M)=>{I==null?N._vnode&&un(N._vnode,null,null,!0):b(N._vnode||null,I,N,null,null,null,M),mk(),Jx(),N._vnode=I},He={p:b,um:un,m:Mn,r:$i,mt:Rt,mc:F,pc:Ce,pbc:k,n:ne,o:e};let pt,Ae;return t&&([pt,Ae]=t(He)),{render:Z,hydrate:pt,createApp:rq(Z,pt)}}function Ms({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function mO(e,t,n=!1){const r=e.children,i=t.children;if(ge(r)&&ge(i))for(let s=0;s>1,e[n[c]]0&&(t[r]=n[s-1]),n[s]=r)}}for(s=n.length,a=n[s-1];s-- >0;)n[s]=a,a=t[a];return n}const hq=e=>e.__isTeleport,Zt=Symbol.for("v-fgt"),Lv=Symbol.for("v-txt"),Br=Symbol.for("v-cmt"),P_=Symbol.for("v-stc"),Kl=[];let oi=null;function pn(e=!1){Kl.push(oi=e?null:[])}function dq(){Kl.pop(),oi=Kl[Kl.length-1]||null}let gf=1;function Rk(e){gf+=e}function yO(e){return e.dynamicChildren=gf>0?oi||Au:null,dq(),gf>0&&oi&&oi.push(e),e}function ir(e,t,n,r,i,s){return yO(Be(e,t,n,r,i,s,!0))}function O0(e,t,n,r,i){return yO(Je(e,t,n,r,i,!0))}function Rp(e){return e?e.__v_isVNode===!0:!1}function $s(e,t){return e.type===t.type&&e.key===t.key}const Fv="__vInternal",_O=({key:e})=>e??null,ap=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?jt(e)||Wt(e)||ke(e)?{i:vn,r:e,k:t,f:!!n}:e:null);function Be(e,t=null,n=null,r=0,i=null,s=e===Zt?0:1,a=!1,c=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&_O(t),ref:t&&ap(t),scopeId:Ov,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:vn};return c?(P0(l,n),s&128&&e.normalize(l)):n&&(l.shapeFlag|=jt(n)?8:16),gf>0&&!a&&oi&&(l.patchFlag>0||s&6)&&l.patchFlag!==32&&oi.push(l),l}const Je=pq;function pq(e,t=null,n=null,r=0,i=null,s=!1){if((!e||e===G3)&&(e=Br),Rp(e)){const c=uo(e,t,!0);return n&&P0(c,n),gf>0&&!s&&oi&&(c.shapeFlag&6?oi[oi.indexOf(e)]=c:oi.push(c)),c.patchFlag|=-2,c}if(Cq(e)&&(e=e.__vccOpts),t){t=vq(t);let{class:c,style:l}=t;c&&!jt(c)&&(t.class=hf(c)),at(l)&&(Kx(l)&&!ge(l)&&(l=Ut({},l)),t.style=p0(l))}const a=jt(e)?1:x3(e)?128:hq(e)?64:at(e)?4:ke(e)?2:0;return Be(e,t,n,r,i,a,s,!0)}function vq(e){return e?Kx(e)||Fv in e?Ut({},e):e:null}function uo(e,t,n=!1){const{props:r,ref:i,patchFlag:s,children:a}=e,c=t?mq(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&_O(c),ref:t&&t.ref?n&&i?ge(i)?i.concat(ap(t)):[i,ap(t)]:ap(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Zt?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&uo(e.ssContent),ssFallback:e.ssFallback&&uo(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function zo(e=" ",t=0){return Je(Lv,null,e,t)}function gq(e="",t=!1){return t?(pn(),O0(Br,null,e)):Je(Br,null,e)}function Ci(e){return e==null||typeof e=="boolean"?Je(Br):ge(e)?Je(Zt,null,e.slice()):typeof e=="object"?Uo(e):Je(Lv,null,String(e))}function Uo(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:uo(e)}function P0(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(ge(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),P0(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(Fv in t)?t._ctx=vn:i===3&&vn&&(vn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ke(t)?(t={default:t,_ctx:vn},n=32):(t=String(t),r&64?(n=16,t=[zo(t)]):n=8);e.children=t,e.shapeFlag|=n}function mq(...e){const t={};for(let n=0;nnn||vn;let M0,hu,Nk="__VUE_INSTANCE_SETTERS__";(hu=Aw()[Nk])||(hu=Aw()[Nk]=[]),hu.push(e=>nn=e),M0=e=>{hu.length>1?hu.forEach(t=>t(e)):hu[0](e)};const Vu=e=>{M0(e),e.scope.on()},na=()=>{nn&&nn.scope.off(),M0(null)};function wO(e){return e.vnode.shapeFlag&4}let mf=!1;function bq(e,t=!1){mf=t;const{props:n,children:r}=e.vnode,i=wO(e);iq(e,n,i,t),aq(e,r);const s=i?Eq(e,t):void 0;return mf=!1,s}function Eq(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Wx(new Proxy(e.ctx,Y3));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?Iq(e):null;Vu(e),_c();const s=Go(r,e,0,[e.props,i]);if(wc(),na(),kx(s)){if(s.then(na,na),t)return s.then(a=>{xk(e,a,t)}).catch(a=>{Nv(a,e,0)});e.asyncDep=s}else xk(e,s,t)}else bO(e,t)}function xk(e,t,n){ke(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:at(t)&&(e.setupState=Qx(t)),bO(e,n)}let Ok;function bO(e,t,n){const r=e.type;if(!e.render){if(!t&&Ok&&!r.render){const i=r.template||N0(e).template;if(i){const{isCustomElement:s,compilerOptions:a}=e.appContext.config,{delimiters:c,compilerOptions:l}=r,h=Ut(Ut({isCustomElement:s,delimiters:c},a),l);r.render=Ok(i,h)}}e.render=r.render||ai}Vu(e),_c(),X3(e),wc(),na()}function Tq(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get(t,n){return fr(e,"get","$attrs"),t[n]}}))}function Iq(e){const t=n=>{e.exposed=n||{}};return{get attrs(){return Tq(e)},slots:e.slots,emit:e.emit,expose:t}}function Uv(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Qx(Wx(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Hl)return Hl[n](e)},has(t,n){return n in t||n in Hl}}))}function Sq(e,t=!0){return ke(e)?e.displayName||e.name:e.name||t&&e.__name}function Cq(e){return ke(e)&&"__vccOpts"in e}const Ze=(e,t)=>w3(e,t,mf);function ts(e,t,n){const r=arguments.length;return r===2?at(t)&&!ge(t)?Rp(t)?Je(e,null,[t]):Je(e,t):Je(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Rp(n)&&(n=[n]),Je(e,t,n))}const Aq=Symbol.for("v-scx"),kq=()=>sr(Aq),Rq="3.3.4",Nq="http://www.w3.org/2000/svg",Hs=typeof document<"u"?document:null,Pk=Hs&&Hs.createElement("template"),xq={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?Hs.createElementNS(Nq,e):Hs.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Hs.createTextNode(e),createComment:e=>Hs.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Hs.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,s){const a=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{Pk.innerHTML=r?`${e}`:e;const c=Pk.content;if(r){const l=c.firstChild;for(;l.firstChild;)c.appendChild(l.firstChild);c.removeChild(l)}t.insertBefore(c,n)}return[a?a.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Oq(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Pq(e,t,n){const r=e.style,i=jt(n);if(n&&!i){if(t&&!jt(t))for(const s in t)n[s]==null&&jw(r,s,"");for(const s in n)jw(r,s,n[s])}else{const s=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=s)}}const Dk=/\s*!important$/;function jw(e,t,n){if(ge(n))n.forEach(r=>jw(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=Dq(e,t);Dk.test(n)?e.setProperty(Ca(r),n.replace(Dk,""),"important"):e[r]=n}}const Mk=["Webkit","Moz","ms"],D_={};function Dq(e,t){const n=D_[t];if(n)return n;let r=Mi(t);if(r!=="filter"&&r in e)return D_[t]=r;r=Av(r);for(let i=0;iM_||(Vq.then(()=>M_=0),M_=Date.now());function qq(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;Vr($q(r,n.value),t,5,[r])};return n.value=e,n.attached=Bq(),n}function $q(e,t){if(ge(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Uk=/^on[a-z]/,Hq=(e,t,n,r,i=!1,s,a,c,l)=>{t==="class"?Oq(e,r,i):t==="style"?Pq(e,n,r):Sv(t)?f0(t)||Uq(e,t,n,r,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Kq(e,t,r,i))?Lq(e,t,r,s,a,c,l):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Mq(e,t,r,i))};function Kq(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Uk.test(t)&&ke(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Uk.test(t)&&jt(n)?!1:t in e}const No="transition",kl="animation",L0=(e,{slots:t})=>ts(L3,Wq(e),t);L0.displayName="Transition";const EO={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};L0.props=Ut({},iO,EO);const Ls=(e,t=[])=>{ge(e)?e.forEach(n=>n(...t)):e&&e(...t)},jk=e=>e?ge(e)?e.some(t=>t.length>1):e.length>1:!1;function Wq(e){const t={};for(const ue in e)ue in EO||(t[ue]=e[ue]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:s=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=s,appearActiveClass:h=a,appearToClass:d=c,leaveFromClass:v=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,_=Gq(i),b=_&&_[0],T=_&&_[1],{onBeforeEnter:C,onEnter:x,onEnterCancelled:O,onLeave:L,onLeaveCancelled:$,onBeforeAppear:P=C,onAppear:re=x,onAppearCancelled:F=O}=t,se=(ue,ut,Rt)=>{Fs(ue,ut?d:c),Fs(ue,ut?h:a),Rt&&Rt()},k=(ue,ut)=>{ue._isLeaving=!1,Fs(ue,v),Fs(ue,y),Fs(ue,g),ut&&ut()},dt=ue=>(ut,Rt)=>{const Yn=ue?re:x,tt=()=>se(ut,ue,Rt);Ls(Yn,[ut,tt]),Vk(()=>{Fs(ut,ue?l:s),xo(ut,ue?d:c),jk(Yn)||Bk(ut,r,b,tt)})};return Ut(t,{onBeforeEnter(ue){Ls(C,[ue]),xo(ue,s),xo(ue,a)},onBeforeAppear(ue){Ls(P,[ue]),xo(ue,l),xo(ue,h)},onEnter:dt(!1),onAppear:dt(!0),onLeave(ue,ut){ue._isLeaving=!0;const Rt=()=>k(ue,ut);xo(ue,v),Yq(),xo(ue,g),Vk(()=>{ue._isLeaving&&(Fs(ue,v),xo(ue,y),jk(L)||Bk(ue,r,T,Rt))}),Ls(L,[ue,Rt])},onEnterCancelled(ue){se(ue,!1),Ls(O,[ue])},onAppearCancelled(ue){se(ue,!0),Ls(F,[ue])},onLeaveCancelled(ue){k(ue),Ls($,[ue])}})}function Gq(e){if(e==null)return null;if(at(e))return[L_(e.enter),L_(e.leave)];{const t=L_(e);return[t,t]}}function L_(e){return CB(e)}function xo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function Fs(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Vk(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let zq=0;function Bk(e,t,n,r){const i=e._endId=++zq,s=()=>{i===e._endId&&r()};if(n)return setTimeout(s,n);const{type:a,timeout:c,propCount:l}=Qq(e,t);if(!a)return r();const h=a+"end";let d=0;const v=()=>{e.removeEventListener(h,g),s()},g=y=>{y.target===e&&++d>=l&&v()};setTimeout(()=>{d(n[_]||"").split(", "),i=r(`${No}Delay`),s=r(`${No}Duration`),a=qk(i,s),c=r(`${kl}Delay`),l=r(`${kl}Duration`),h=qk(c,l);let d=null,v=0,g=0;t===No?a>0&&(d=No,v=a,g=s.length):t===kl?h>0&&(d=kl,v=h,g=l.length):(v=Math.max(a,h),d=v>0?a>h?No:kl:null,g=d?d===No?s.length:l.length:0);const y=d===No&&/\b(transform|all)(,|$)/.test(r(`${No}Property`).toString());return{type:d,timeout:v,propCount:g,hasTransform:y}}function qk(e,t){for(;e.length$k(n)+$k(e[r])))}function $k(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function Yq(){return document.body.offsetHeight}const ns=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ge(t)?n=>sp(t,n):t};function Xq(e){e.target.composing=!0}function Hk(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const yf={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=ns(i);const s=r||i.props&&i.props.type==="number";Zi(e,t?"change":"input",a=>{if(a.target.composing)return;let c=e.value;n&&(c=c.trim()),s&&(c=bp(c)),e._assign(c)}),n&&Zi(e,"change",()=>{e.value=e.value.trim()}),t||(Zi(e,"compositionstart",Xq),Zi(e,"compositionend",Hk),Zi(e,"change",Hk))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},s){if(e._assign=ns(s),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&bp(e.value)===t))return;const a=t??"";e.value!==a&&(e.value=a)}},Jq={deep:!0,created(e,t,n){e._assign=ns(n),Zi(e,"change",()=>{const r=e._modelValue,i=Bu(e),s=e.checked,a=e._assign;if(ge(r)){const c=v0(r,i),l=c!==-1;if(s&&!l)a(r.concat(i));else if(!s&&l){const h=[...r];h.splice(c,1),a(h)}}else if(yc(r)){const c=new Set(r);s?c.add(i):c.delete(i),a(c)}else a(TO(e,s))})},mounted:Kk,beforeUpdate(e,t,n){e._assign=ns(n),Kk(e,t,n)}};function Kk(e,{value:t,oldValue:n},r){e._modelValue=t,ge(t)?e.checked=v0(t,r.props.value)>-1:yc(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=ca(t,TO(e,!0)))}const Zq={created(e,{value:t},n){e.checked=ca(t,n.props.value),e._assign=ns(n),Zi(e,"change",()=>{e._assign(Bu(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e._assign=ns(r),t!==n&&(e.checked=ca(t,r.props.value))}},e$={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=yc(t);Zi(e,"change",()=>{const s=Array.prototype.filter.call(e.options,a=>a.selected).map(a=>n?bp(Bu(a)):Bu(a));e._assign(e.multiple?i?new Set(s):s:s[0])}),e._assign=ns(r)},mounted(e,{value:t}){Wk(e,t)},beforeUpdate(e,t,n){e._assign=ns(n)},updated(e,{value:t}){Wk(e,t)}};function Wk(e,t){const n=e.multiple;if(!(n&&!ge(t)&&!yc(t))){for(let r=0,i=e.options.length;r-1:s.selected=t.has(a);else if(ca(Bu(s),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Bu(e){return"_value"in e?e._value:e.value}function TO(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const t$={created(e,t,n){Ud(e,t,n,null,"created")},mounted(e,t,n){Ud(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){Ud(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){Ud(e,t,n,r,"updated")}};function n$(e,t){switch(e){case"SELECT":return e$;case"TEXTAREA":return yf;default:switch(t){case"checkbox":return Jq;case"radio":return Zq;default:return yf}}}function Ud(e,t,n,r,i){const a=n$(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}const r$=["ctrl","shift","alt","meta"],i$={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)=>r$.some(n=>e[`${n}Key`]&&!t.includes(n))},Gk=(e,t)=>(n,...r)=>{for(let i=0;in=>{if(!("key"in n))return;const r=Ca(n.key);if(t.some(i=>i===r||o$[i]===r))return e(n)},a$=Ut({patchProp:Hq},xq);let zk;function u$(){return zk||(zk=cq(a$))}const c$=(...e)=>{const t=u$().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=l$(r);if(!i)return;const s=t._component;!ke(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t};function l$(e){return jt(e)?document.querySelector(e):e}const IO=new Set,ar=new WeakMap,Pu=new WeakMap,la=new WeakMap,Vw=new WeakMap,f$=new WeakMap,qu=new WeakMap,Np=new WeakMap,Vl=new WeakSet;let fa;const eo="__aa_tgt",Bw="__aa_del",h$=e=>{const t=m$(e);t&&t.forEach(n=>y$(n))},d$=e=>{e.forEach(t=>{t.target===fa&&v$(),ar.has(t.target)&&ka(t.target)})};function p$(e){const t=Vw.get(e);t==null||t.disconnect();let n=ar.get(e),r=0;const i=5;n||(n=$u(e),ar.set(e,n));const{offsetWidth:s,offsetHeight:a}=fa,l=[n.top-i,s-(n.left+i+n.width),a-(n.top+i+n.height),n.left-i].map(d=>`${-1*Math.floor(d)}px`).join(" "),h=new IntersectionObserver(()=>{++r>1&&ka(e)},{root:fa,threshold:1,rootMargin:l});h.observe(e),Vw.set(e,h)}function ka(e){clearTimeout(Np.get(e));const t=jv(e),n=typeof t=="function"?500:t.duration;Np.set(e,setTimeout(async()=>{const r=la.get(e);try{await(r==null?void 0:r.finished),ar.set(e,$u(e)),p$(e)}catch{}},n))}function v$(){clearTimeout(Np.get(fa)),Np.set(fa,setTimeout(()=>{IO.forEach(e=>kO(e,t=>SO(()=>ka(t))))},100))}function g$(e){setTimeout(()=>{f$.set(e,setInterval(()=>SO(ka.bind(null,e)),2e3))},Math.round(2e3*Math.random()))}function SO(e){typeof requestIdleCallback=="function"?requestIdleCallback(()=>e()):requestAnimationFrame(()=>e())}let qw,Iu;typeof window<"u"&&(fa=document.documentElement,qw=new MutationObserver(h$),Iu=new ResizeObserver(d$),Iu.observe(fa));function m$(e){return e.reduce((r,i)=>[...r,...Array.from(i.addedNodes),...Array.from(i.removedNodes)],[]).every(r=>r.nodeName==="#comment")?!1:e.reduce((r,i)=>{if(r===!1)return!1;if(i.target instanceof Element){if(F_(i.target),!r.has(i.target)){r.add(i.target);for(let s=0;sn(e,qu.has(e)));for(let n=0;ni(r,qu.has(r)))}}function w$(e){const t=ar.get(e),n=$u(e);if(!F0(e))return ar.set(e,n);let r;if(!t)return;const i=jv(e);if(typeof i!="function"){const s=t.left-n.left,a=t.top-n.top,[c,l,h,d]=CO(e,t,n),v={transform:`translate(${s}px, ${a}px)`},g={transform:"translate(0, 0)"};c!==l&&(v.width=`${c}px`,g.width=`${l}px`),h!==d&&(v.height=`${h}px`,g.height=`${d}px`),r=e.animate([v,g],{duration:i.duration,easing:i.easing})}else r=new Animation(i(e,"remain",t,n)),r.play();la.set(e,r),ar.set(e,n),r.addEventListener("finish",ka.bind(null,e))}function b$(e){const t=$u(e);ar.set(e,t);const n=jv(e);if(!F0(e))return;let r;typeof n!="function"?r=e.animate([{transform:"scale(.98)",opacity:0},{transform:"scale(0.98)",opacity:0,offset:.5},{transform:"scale(1)",opacity:1}],{duration:n.duration*1.5,easing:"ease-in"}):(r=new Animation(n(e,"add",t)),r.play()),la.set(e,r),r.addEventListener("finish",ka.bind(null,e))}function E$(e){var t;if(!Pu.has(e)||!ar.has(e))return;const[n,r]=Pu.get(e);Object.defineProperty(e,Bw,{value:!0}),r&&r.parentNode&&r.parentNode instanceof Element?r.parentNode.insertBefore(e,r):n&&n.parentNode?n.parentNode.appendChild(e):(t=AO(e))===null||t===void 0||t.appendChild(e);function i(){var g;e.remove(),ar.delete(e),Pu.delete(e),la.delete(e),(g=Vw.get(e))===null||g===void 0||g.disconnect()}if(!F0(e))return i();const[s,a,c,l]=T$(e),h=jv(e),d=ar.get(e);let v;Object.assign(e.style,{position:"absolute",top:`${s}px`,left:`${a}px`,width:`${c}px`,height:`${l}px`,margin:0,pointerEvents:"none",transformOrigin:"center",zIndex:100}),typeof h!="function"?v=e.animate([{transform:"scale(1)",opacity:1},{transform:"scale(.98)",opacity:0}],{duration:h.duration,easing:"ease-out"}):(v=new Animation(h(e,"remove",d)),v.play()),la.set(e,v),v.addEventListener("finish",i)}function T$(e){const t=ar.get(e),[n,,r]=CO(e,t,$u(e));let i=e.parentElement;for(;i&&(getComputedStyle(i).position==="static"||i instanceof HTMLBodyElement);)i=i.parentElement;i||(i=document.body);const s=getComputedStyle(i),a=ar.get(i)||$u(i),c=Math.round(t.top-a.top)-Ii(s.borderTopWidth),l=Math.round(t.left-a.left)-Ii(s.borderLeftWidth);return[c,l,n,r]}function I$(e,t={}){return qw&&Iu&&(window.matchMedia("(prefers-reduced-motion: reduce)").matches&&typeof t!="function"&&!t.disrespectUserMotionPreference||(Vl.add(e),getComputedStyle(e).position==="static"&&Object.assign(e.style,{position:"relative"}),kO(e,ka,g$,i=>Iu==null?void 0:Iu.observe(i)),typeof t=="function"?qu.set(e,t):qu.set(e,{duration:250,easing:"ease-in-out",...t}),qw.observe(e,{childList:!0}),IO.add(e))),Object.freeze({parent:e,enable:()=>{Vl.add(e)},disable:()=>{Vl.delete(e)},isEnabled:()=>Vl.has(e)})}const S$={mounted:(e,t)=>{I$(e,t.value||{})}},C$={install(e){e.directive("auto-animate",S$)}};function A$(){return RO().__VUE_DEVTOOLS_GLOBAL_HOOK__}function RO(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const k$=typeof Proxy=="function",R$="devtools-plugin:setup",N$="plugin:settings:set";let du,$w;function x$(){var e;return du!==void 0||(typeof window<"u"&&window.performance?(du=!0,$w=window.performance):typeof global<"u"&&(!((e=global.perf_hooks)===null||e===void 0)&&e.performance)?(du=!0,$w=global.perf_hooks.performance):du=!1),du}function O$(){return x$()?$w.now():Date.now()}class P${constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const a in t.settings){const c=t.settings[a];r[a]=c.defaultValue}const i=`__vue-devtools-plugin-settings__${t.id}`;let s=Object.assign({},r);try{const a=localStorage.getItem(i),c=JSON.parse(a);Object.assign(s,c)}catch{}this.fallbacks={getSettings(){return s},setSettings(a){try{localStorage.setItem(i,JSON.stringify(a))}catch{}s=a},now(){return O$()}},n&&n.on(N$,(a,c)=>{a===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(a,c)=>this.target?this.target.on[c]:(...l)=>{this.onQueue.push({method:c,args:l})}}),this.proxiedTarget=new Proxy({},{get:(a,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...l)=>(this.targetQueue.push({method:c,args:l,resolve:()=>{}}),this.fallbacks[c](...l)):(...l)=>new Promise(h=>{this.targetQueue.push({method:c,args:l,resolve:h})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function D$(e,t){const n=e,r=RO(),i=A$(),s=k$&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))i.emit(R$,e,t);else{const a=s?new P$(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:a}),a&&t(a.proxiedTarget)}}/*! * vue-router v4.0.13 * (c) 2022 Eduardo San Martin Morote * @license MIT - */const NO=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Tc=e=>NO?Symbol(e):"_vr_"+e,U$=Tc("rvlm"),Qk=Tc("rvd"),Vv=Tc("r"),xO=Tc("rl"),Hw=Tc("rvl"),wu=typeof window<"u";function j$(e){return e.__esModule||NO&&e[Symbol.toStringTag]==="Module"}const lt=Object.assign;function U_(e,t){const n={};for(const r in t){const i=t[r];n[r]=Array.isArray(i)?i.map(e):e(i)}return n}const Wl=()=>{},V$=/\/$/,B$=e=>e.replace(V$,"");function j_(e,t,n="/"){let r,i={},s="",a="";const c=t.indexOf("?"),l=t.indexOf("#",c>-1?c:0);return c>-1&&(r=t.slice(0,c),s=t.slice(c+1,l>-1?l:t.length),i=e(s)),l>-1&&(r=r||t.slice(0,l),a=t.slice(l,t.length)),r=K$(r??t,n),{fullPath:r+(s&&"?")+s+a,path:r,query:i,hash:a}}function q$(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Yk(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function $$(e,t,n){const r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&Hu(t.matched[r],n.matched[i])&&OO(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function OO(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!H$(e[n],t[n]))return!1;return!0}function H$(e,t){return Array.isArray(e)?Xk(e,t):Array.isArray(t)?Xk(t,e):e===t}function Xk(e,t){return Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function K$(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let i=n.length-1,s,a;for(s=0;s({left:window.pageXOffset,top:window.pageYOffset});function Y$(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Q$(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Jk(e,t){return(history.state?history.state.position-t:-1)+e}const Kw=new Map;function X$(e,t){Kw.set(e,t)}function J$(e){const t=Kw.get(e);return Kw.delete(e),t}let Z$=()=>location.protocol+"//"+location.host;function PO(e,t){const{pathname:n,search:r,hash:i}=t,s=e.indexOf("#");if(s>-1){let c=i.includes(e.slice(s))?e.slice(s).length:1,l=i.slice(c);return l[0]!=="/"&&(l="/"+l),Yk(l,"")}return Yk(n,e)+r+i}function eH(e,t,n,r){let i=[],s=[],a=null;const c=({state:g})=>{const y=PO(e,location),_=n.value,b=t.value;let T=0;if(g){if(n.value=y,t.value=g,a&&a===_){a=null;return}T=b?g.position-b.position:0}else r(y);i.forEach(C=>{C(n.value,_,{delta:T,type:yf.pop,direction:T?T>0?Gl.forward:Gl.back:Gl.unknown})})};function l(){a=n.value}function h(g){i.push(g);const y=()=>{const _=i.indexOf(g);_>-1&&i.splice(_,1)};return s.push(y),y}function d(){const{history:g}=window;g.state&&g.replaceState(lt({},g.state,{scroll:Bv()}),"")}function v(){for(const g of s)g();s=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",d),{pauseListeners:l,listen:h,destroy:v}}function Zk(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Bv():null}}function tH(e){const{history:t,location:n}=window,r={value:PO(e,n)},i={value:t.state};i.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,h,d){const v=e.indexOf("#"),g=v>-1?(n.host&&document.querySelector("base")?e:e.slice(v))+l:Z$()+e+l;try{t[d?"replaceState":"pushState"](h,"",g),i.value=h}catch(y){console.error(y),n[d?"replace":"assign"](g)}}function a(l,h){const d=lt({},t.state,Zk(i.value.back,l,i.value.forward,!0),h,{position:i.value.position});s(l,d,!0),r.value=l}function c(l,h){const d=lt({},i.value,t.state,{forward:l,scroll:Bv()});s(d.current,d,!0);const v=lt({},Zk(r.value,l,null),{position:d.position+1},h);s(l,v,!1),r.value=l}return{location:r,state:i,push:c,replace:a}}function nH(e){e=W$(e);const t=tH(e),n=eH(e,t.state,t.location,t.replace);function r(s,a=!0){a||n.pauseListeners(),history.go(s)}const i=lt({location:"",base:e,go:r,createHref:z$.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function rH(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),nH(e)}function iH(e){return typeof e=="string"||e&&typeof e=="object"}function DO(e){return typeof e=="string"||typeof e=="symbol"}const Po={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},MO=Tc("nf");var e1;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(e1||(e1={}));function Ku(e,t){return lt(new Error,{type:e,[MO]:!0},t)}function Do(e,t){return e instanceof Error&&MO in e&&(t==null||!!(e.type&t))}const t1="[^/]+?",oH={sensitive:!1,strict:!1,start:!0,end:!0},sH=/[.+*?^${}()[\]/\\]/g;function aH(e,t){const n=lt({},oH,t),r=[];let i=n.start?"^":"";const s=[];for(const h of e){const d=h.length?[]:[90];n.strict&&!h.length&&(i+="/");for(let v=0;vt.length?t.length===1&&t[0]===40+40?1:-1:0}function cH(e,t){let n=0;const r=e.score,i=t.score;for(;n1&&(l==="*"||l==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:h,regexp:d,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),h="")}function g(){h+=l}for(;c{a(x)}:Wl}function a(d){if(DO(d)){const v=r.get(d);v&&(r.delete(d),n.splice(n.indexOf(v),1),v.children.forEach(a),v.alias.forEach(a))}else{const v=n.indexOf(d);v>-1&&(n.splice(v,1),d.record.name&&r.delete(d.record.name),d.children.forEach(a),d.alias.forEach(a))}}function c(){return n}function l(d){let v=0;for(;v=0&&(d.record.path!==n[v].record.path||!LO(d,n[v]));)v++;n.splice(v,0,d),d.record.name&&!n1(d)&&r.set(d.record.name,d)}function h(d,v){let g,y={},_,b;if("name"in d&&d.name){if(g=r.get(d.name),!g)throw Ku(1,{location:d});b=g.record.name,y=lt(vH(v.params,g.keys.filter(x=>!x.optional).map(x=>x.name)),d.params),_=g.stringify(y)}else if("path"in d)_=d.path,g=n.find(x=>x.re.test(_)),g&&(y=g.parse(_),b=g.record.name);else{if(g=v.name?r.get(v.name):n.find(x=>x.re.test(v.path)),!g)throw Ku(1,{location:d,currentLocation:v});b=g.record.name,y=lt({},v.params,d.params),_=g.stringify(y)}const T=[];let C=g;for(;C;)T.unshift(C.record),C=C.parent;return{name:b,path:_,params:y,matched:T,meta:yH(T)}}return e.forEach(d=>s(d)),{addRoute:s,resolve:h,removeRoute:a,getRoutes:c,getRecordMatcher:i}}function vH(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function gH(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:mH(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||{}:{default:e.component}}}function mH(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function n1(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function yH(e){return e.reduce((t,n)=>lt(t,n.meta),{})}function r1(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function LO(e,t){return t.children.some(n=>n===e||LO(e,n))}const FO=/#/g,_H=/&/g,wH=/\//g,bH=/=/g,EH=/\?/g,UO=/\+/g,TH=/%5B/g,IH=/%5D/g,jO=/%5E/g,SH=/%60/g,VO=/%7B/g,CH=/%7C/g,BO=/%7D/g,AH=/%20/g;function U0(e){return encodeURI(""+e).replace(CH,"|").replace(TH,"[").replace(IH,"]")}function kH(e){return U0(e).replace(VO,"{").replace(BO,"}").replace(jO,"^")}function Ww(e){return U0(e).replace(UO,"%2B").replace(AH,"+").replace(FO,"%23").replace(_H,"%26").replace(SH,"`").replace(VO,"{").replace(BO,"}").replace(jO,"^")}function RH(e){return Ww(e).replace(bH,"%3D")}function NH(e){return U0(e).replace(FO,"%23").replace(EH,"%3F")}function xH(e){return e==null?"":NH(e).replace(wH,"%2F")}function xp(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function OH(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;is&&Ww(s)):[r&&Ww(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function PH(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Array.isArray(r)?r.map(i=>i==null?null:""+i):r==null?r:""+r)}return t}function Rl(){let e=[];function t(r){return e.push(r),()=>{const i=e.indexOf(r);i>-1&&e.splice(i,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function Vo(e,t,n,r,i){const s=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((a,c)=>{const l=v=>{v===!1?c(Ku(4,{from:n,to:t})):v instanceof Error?c(v):iH(v)?c(Ku(2,{from:t,to:v})):(s&&r.enterCallbacks[i]===s&&typeof v=="function"&&s.push(v),a())},h=e.call(r&&r.instances[i],t,n,l);let d=Promise.resolve(h);e.length<3&&(d=d.then(l)),d.catch(v=>c(v))})}function V_(e,t,n,r){const i=[];for(const s of e)for(const a in s.components){let c=s.components[a];if(!(t!=="beforeRouteEnter"&&!s.instances[a]))if(DH(c)){const h=(c.__vccOpts||c)[t];h&&i.push(Vo(h,n,r,s,a))}else{let l=c();i.push(()=>l.then(h=>{if(!h)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${s.path}"`));const d=j$(h)?h.default:h;s.components[a]=d;const g=(d.__vccOpts||d)[t];return g&&Vo(g,n,r,s,a)()}))}}return i}function DH(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function o1(e){const t=ar(Vv),n=ar(xO),r=Ze(()=>t.resolve(Nu(e.to))),i=Ze(()=>{const{matched:l}=r.value,{length:h}=l,d=l[h-1],v=n.matched;if(!d||!v.length)return-1;const g=v.findIndex(Hu.bind(null,d));if(g>-1)return g;const y=s1(l[h-2]);return h>1&&s1(d)===y&&v[v.length-1].path!==y?v.findIndex(Hu.bind(null,l[h-2])):g}),s=Ze(()=>i.value>-1&&UH(n.params,r.value.params)),a=Ze(()=>i.value>-1&&i.value===n.matched.length-1&&OO(n.params,r.value.params));function c(l={}){return FH(l)?t[Nu(e.replace)?"replace":"push"](Nu(e.to)).catch(Wl):Promise.resolve()}return{route:r,href:Ze(()=>r.value.href),isActive:s,isExactActive:a,navigate:c}}const MH=vo({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:o1,setup(e,{slots:t}){const n=bc(o1(e)),{options:r}=ar(Vv),i=Ze(()=>({[a1(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[a1(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:ts("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},s)}}}),LH=MH;function FH(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function UH(e,t){for(const n in t){const r=t[n],i=e[n];if(typeof r=="string"){if(r!==i)return!1}else if(!Array.isArray(i)||i.length!==r.length||r.some((s,a)=>s!==i[a]))return!1}return!0}function s1(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const a1=(e,t,n)=>e??t??n,jH=vo({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:n}){const r=ar(Hw),i=Ze(()=>e.route||r.value),s=ar(Qk,0),a=Ze(()=>i.value.matched[s]);Ou(Qk,s+1),Ou(U$,a),Ou(Hw,i);const c=Ue();return Ri(()=>[c.value,a.value,e.name],([l,h,d],[v,g,y])=>{h&&(h.instances[d]=l,g&&g!==h&&l&&l===v&&(h.leaveGuards.size||(h.leaveGuards=g.leaveGuards),h.updateGuards.size||(h.updateGuards=g.updateGuards))),l&&h&&(!g||!Hu(h,g)||!v)&&(h.enterCallbacks[d]||[]).forEach(_=>_(l))},{flush:"post"}),()=>{const l=i.value,h=a.value,d=h&&h.components[e.name],v=e.name;if(!d)return u1(n.default,{Component:d,route:l});const g=h.props[e.name],y=g?g===!0?l.params:typeof g=="function"?g(l):g:null,b=ts(d,lt({},y,t,{onVnodeUnmounted:T=>{T.component.isUnmounted&&(h.instances[v]=null)},ref:c}));return u1(n.default,{Component:b,route:l})||b}}});function u1(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const VH=jH;function BH(e){const t=pH(e.routes,e),n=e.parseQuery||OH,r=e.stringifyQuery||i1,i=e.history,s=Rl(),a=Rl(),c=Rl(),l=Gx(Po);let h=Po;wu&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=U_.bind(null,B=>""+B),v=U_.bind(null,xH),g=U_.bind(null,xp);function y(B,ie){let ne,Z;return DO(B)?(ne=t.getRecordMatcher(B),Z=ie):Z=B,t.addRoute(Z,ne)}function _(B){const ie=t.getRecordMatcher(B);ie&&t.removeRoute(ie)}function b(){return t.getRoutes().map(B=>B.record)}function T(B){return!!t.getRecordMatcher(B)}function C(B,ie){if(ie=lt({},ie||l.value),typeof B=="string"){const I=j_(n,B,ie.path),N=t.resolve({path:I.path},ie),M=i.createHref(I.fullPath);return lt(I,N,{params:g(N.params),hash:xp(I.hash),redirectedFrom:void 0,href:M})}let ne;if("path"in B)ne=lt({},B,{path:j_(n,B.path,ie.path).path});else{const I=lt({},B.params);for(const N in I)I[N]==null&&delete I[N];ne=lt({},B,{params:v(B.params)}),ie.params=v(ie.params)}const Z=t.resolve(ne,ie),$e=B.hash||"";Z.params=d(g(Z.params));const pt=q$(r,lt({},B,{hash:kH($e),path:Z.path})),Ae=i.createHref(pt);return lt({fullPath:pt,hash:$e,query:r===i1?PH(B.query):B.query||{}},Z,{redirectedFrom:void 0,href:Ae})}function x(B){return typeof B=="string"?j_(n,B,l.value.path):lt({},B)}function O(B,ie){if(h!==B)return Ku(8,{from:ie,to:B})}function L(B){return re(B)}function $(B){return L(lt(x(B),{replace:!0}))}function P(B){const ie=B.matched[B.matched.length-1];if(ie&&ie.redirect){const{redirect:ne}=ie;let Z=typeof ne=="function"?ne(B):ne;return typeof Z=="string"&&(Z=Z.includes("?")||Z.includes("#")?Z=x(Z):{path:Z},Z.params={}),lt({query:B.query,hash:B.hash,params:B.params},Z)}}function re(B,ie){const ne=h=C(B),Z=l.value,$e=B.state,pt=B.force,Ae=B.replace===!0,I=P(ne);if(I)return re(lt(x(I),{state:$e,force:pt,replace:Ae}),ie||ne);const N=ne;N.redirectedFrom=ie;let M;return!pt&&$$(r,Z,ne)&&(M=Ku(16,{to:N,from:Z}),Jn(Z,Z,!0,!1)),(M?Promise.resolve(M):oe(N,Z)).catch(j=>Do(j)?Do(j,2)?j:Mn(j):nt(j,N,Z)).then(j=>{if(j){if(Do(j,2))return re(lt(x(j.to),{state:$e,force:pt,replace:Ae}),ie||N)}else j=dt(N,Z,!0,Ae,$e);return k(N,Z,j),j})}function F(B,ie){const ne=O(B,ie);return ne?Promise.reject(ne):Promise.resolve()}function oe(B,ie){let ne;const[Z,$e,pt]=qH(B,ie);ne=V_(Z.reverse(),"beforeRouteLeave",B,ie);for(const I of Z)I.leaveGuards.forEach(N=>{ne.push(Vo(N,B,ie))});const Ae=F.bind(null,B,ie);return ne.push(Ae),pu(ne).then(()=>{ne=[];for(const I of s.list())ne.push(Vo(I,B,ie));return ne.push(Ae),pu(ne)}).then(()=>{ne=V_($e,"beforeRouteUpdate",B,ie);for(const I of $e)I.updateGuards.forEach(N=>{ne.push(Vo(N,B,ie))});return ne.push(Ae),pu(ne)}).then(()=>{ne=[];for(const I of B.matched)if(I.beforeEnter&&!ie.matched.includes(I))if(Array.isArray(I.beforeEnter))for(const N of I.beforeEnter)ne.push(Vo(N,B,ie));else ne.push(Vo(I.beforeEnter,B,ie));return ne.push(Ae),pu(ne)}).then(()=>(B.matched.forEach(I=>I.enterCallbacks={}),ne=V_(pt,"beforeRouteEnter",B,ie),ne.push(Ae),pu(ne))).then(()=>{ne=[];for(const I of a.list())ne.push(Vo(I,B,ie));return ne.push(Ae),pu(ne)}).catch(I=>Do(I,8)?I:Promise.reject(I))}function k(B,ie,ne){for(const Z of c.list())Z(B,ie,ne)}function dt(B,ie,ne,Z,$e){const pt=O(B,ie);if(pt)return pt;const Ae=ie===Po,I=wu?history.state:{};ne&&(Z||Ae?i.replace(B.fullPath,lt({scroll:Ae&&I&&I.scroll},$e)):i.push(B.fullPath,$e)),l.value=B,Jn(B,ie,ne,Ae),Mn()}let ue;function ut(){ue=i.listen((B,ie,ne)=>{const Z=C(B),$e=P(Z);if($e){re(lt($e,{replace:!0}),Z).catch(Wl);return}h=Z;const pt=l.value;wu&&X$(Jk(pt.fullPath,ne.delta),Bv()),oe(Z,pt).catch(Ae=>Do(Ae,12)?Ae:Do(Ae,2)?(re(Ae.to,Z).then(I=>{Do(I,20)&&!ne.delta&&ne.type===yf.pop&&i.go(-1,!1)}).catch(Wl),Promise.reject()):(ne.delta&&i.go(-ne.delta,!1),nt(Ae,Z,pt))).then(Ae=>{Ae=Ae||dt(Z,pt,!1),Ae&&(ne.delta?i.go(-ne.delta,!1):ne.type===yf.pop&&Do(Ae,20)&&i.go(-1,!1)),k(Z,pt,Ae)}).catch(Wl)})}let Rt=Rl(),Xn=Rl(),tt;function nt(B,ie,ne){Mn(B);const Z=Xn.list();return Z.length?Z.forEach($e=>$e(B,ie,ne)):console.error(B),Promise.reject(B)}function Ce(){return tt&&l.value!==Po?Promise.resolve():new Promise((B,ie)=>{Rt.add([B,ie])})}function Mn(B){return tt||(tt=!B,ut(),Rt.list().forEach(([ie,ne])=>B?ne(B):ie()),Rt.reset()),B}function Jn(B,ie,ne,Z){const{scrollBehavior:$e}=e;if(!wu||!$e)return Promise.resolve();const pt=!ne&&J$(Jk(B.fullPath,0))||(Z||!ne)&&history.state&&history.state.scroll||null;return ui().then(()=>$e(B,ie,pt)).then(Ae=>Ae&&Y$(Ae)).catch(Ae=>nt(Ae,B,ie))}const Ln=B=>i.go(B);let cn;const $i=new Set;return{currentRoute:l,addRoute:y,removeRoute:_,hasRoute:T,getRoutes:b,resolve:C,options:e,push:L,replace:$,go:Ln,back:()=>Ln(-1),forward:()=>Ln(1),beforeEach:s.add,beforeResolve:a.add,afterEach:c.add,onError:Xn.add,isReady:Ce,install(B){const ie=this;B.component("RouterLink",LH),B.component("RouterView",VH),B.config.globalProperties.$router=ie,Object.defineProperty(B.config.globalProperties,"$route",{enumerable:!0,get:()=>Nu(l)}),wu&&!cn&&l.value===Po&&(cn=!0,L(i.location).catch($e=>{}));const ne={};for(const $e in Po)ne[$e]=Ze(()=>l.value[$e]);B.provide(Vv,ie),B.provide(xO,bc(ne)),B.provide(Hw,l);const Z=B.unmount;$i.add(B),B.unmount=function(){$i.delete(B),$i.size<1&&(h=Po,ue&&ue(),l.value=Po,cn=!1,tt=!1),Z()}}}}function pu(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function qH(e,t){const n=[],r=[],i=[],s=Math.max(t.matched.length,e.matched.length);for(let a=0;aHu(h,c))?r.push(c):n.push(c));const l=e.matched[a];l&&(t.matched.find(h=>Hu(h,l))||i.push(l))}return[n,r,i]}function qO(){return ar(Vv)}const zl=/^[a-z0-9]+(-[a-z0-9]+)*$/,qv=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),l=i.pop(),h={provider:i.length>0?i[0]:r,prefix:l,name:c};return t&&!ap(h)?null:h}const s=i[0],a=s.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!ap(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!ap(c,n)?null:c}return null},ap=(e,t)=>e?!!((e.provider===""||e.provider.match(zl))&&(t&&e.prefix===""||e.prefix.match(zl))&&e.name.match(zl)):!1,$O=Object.freeze({left:0,top:0,width:16,height:16}),Op=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),$v=Object.freeze({...$O,...Op}),Gw=Object.freeze({...$v,body:"",hidden:!1});function $H(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function c1(e,t){const n=$H(e,t);for(const r in Gw)r in Op?r in e&&!(r in n)&&(n[r]=Op[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function HH(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const c=r[a]&&r[a].parent,l=c&&s(c);l&&(i[a]=[c].concat(l))}return i[a]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(s),i}function KH(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function a(c){s=c1(r[c]||i[c],s)}return a(t),n.forEach(a),c1(e,s)}function HO(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=HH(e);for(const i in r){const s=r[i];s&&(t(i,KH(e,i,s)),n.push(i))}return n}const WH={provider:"",aliases:{},not_found:{},...$O};function B_(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function KO(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!B_(e,WH))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i.match(zl)||typeof s.body!="string"||!B_(s,Gw))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i.match(zl)||typeof a!="string"||!n[a]&&!r[a]||!B_(s,Gw))return null}return t}const l1=Object.create(null);function GH(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ha(e,t){const n=l1[e]||(l1[e]=Object.create(null));return n[t]||(n[t]=GH(e,t))}function j0(e,t){return KO(t)?HO(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function zH(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let _f=!1;function WO(e){return typeof e=="boolean"&&(_f=e),_f}function QH(e){const t=typeof e=="string"?qv(e,!0,_f):e;if(t){const n=ha(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function YH(e,t){const n=qv(e,!0,_f);if(!n)return!1;const r=ha(n.provider,n.prefix);return zH(r,n.name,t)}function XH(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),_f&&!t&&!e.prefix){let i=!1;return KO(e)&&(e.prefix="",HO(e,(s,a)=>{a&&YH(s,a)&&(i=!0)})),i}const n=e.prefix;if(!ap({provider:t,prefix:n,name:"a"}))return!1;const r=ha(t,n);return!!j0(r,e)}const GO=Object.freeze({width:null,height:null}),zO=Object.freeze({...GO,...Op}),JH=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ZH=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function f1(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(JH);if(r===null||!r.length)return e;const i=[];let s=r.shift(),a=ZH.test(s);for(;;){if(a){const c=parseFloat(s);isNaN(c)?i.push(s):i.push(Math.ceil(c*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}const eK=e=>e==="unset"||e==="undefined"||e==="none";function tK(e,t){const n={...$v,...e},r={...zO,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(_=>{const b=[],T=_.hFlip,C=_.vFlip;let x=_.rotate;T?C?x+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):C&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let O;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:O=i.height/2+i.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}x%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),b.length&&(s=''+s+"")});const a=r.width,c=r.height,l=i.width,h=i.height;let d,v;a===null?(v=c===null?"1em":c==="auto"?h:c,d=f1(v,l/h)):(d=a==="auto"?l:a,v=c===null?f1(d,h/l):c==="auto"?h:c);const g={},y=(_,b)=>{eK(b)||(g[_]=b.toString())};return y("width",d),y("height",v),g.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+h.toString(),{attributes:g,body:s}}const nK=/\sid="(\S+)"/g,rK="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let iK=0;function oK(e,t=rK){const n=[];let r;for(;r=nK.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(iK++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const zw=Object.create(null);function sK(e,t){zw[e]=t}function Qw(e){return zw[e]||zw[""]}function V0(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const B0=Object.create(null),Nl=["https://api.simplesvg.com","https://api.unisvg.com"],up=[];for(;Nl.length>0;)Nl.length===1||Math.random()>.5?up.push(Nl.shift()):up.push(Nl.pop());B0[""]=V0({resources:["https://api.iconify.design"].concat(up)});function aK(e,t){const n=V0(t);return n===null?!1:(B0[e]=n,!0)}function q0(e){return B0[e]}const uK=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let h1=uK();function cK(e,t){const n=q0(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function lK(e){return e===404}const fK=(e,t,n)=>{const r=[],i=cK(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,h)=>{c+=l.length+1,c>=i&&h>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},c=l.length),a.icons.push(l)}),r.push(a),r};function hK(e){if(typeof e=="string"){const t=q0(e);if(t)return t.path}return"/"}const dK=(e,t,n)=>{if(!h1){n("abort",424);return}let r=hK(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;h1(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(lK(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},pK={prepare:fK,send:dK};function vK(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,c=i.name,l=n[s]||(n[s]=Object.create(null)),h=l[a]||(l[a]=ha(s,a));let d;c in h.icons?d=t.loaded:a===""||h.missing.has(c)?d=t.missing:d=t.pending;const v={provider:s,prefix:a,name:c};d.push(v)}),t}function QO(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function gK(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const a=s.icons,c=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const h=l.name;if(e.icons[h])a.loaded.push({provider:r,prefix:i,name:h});else if(e.missing.has(h))a.missing.push({provider:r,prefix:i,name:h});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||QO([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let mK=0;function yK(e,t,n){const r=mK++,i=QO.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function _K(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?qv(i,t,n):i;s&&r.push(s)}),r}var wK={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function bK(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let P=e.resources.slice(0);for(a=[];P.length>1;){const re=Math.floor(Math.random()*P.length);a.push(P[re]),P=P.slice(0,re).concat(P.slice(re+1))}a=a.concat(P)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",h=0,d,v=null,g=[],y=[];typeof r=="function"&&y.push(r);function _(){v&&(clearTimeout(v),v=null)}function b(){l==="pending"&&(l="aborted"),_(),g.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),g=[]}function T(P,re){re&&(y=[]),typeof P=="function"&&y.push(P)}function C(){return{startTime:c,payload:t,status:l,queriesSent:h,queriesPending:g.length,subscribe:T,abort:b}}function x(){l="failed",y.forEach(P=>{P(void 0,d)})}function O(){g.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),g=[]}function L(P,re,F){const oe=re!=="success";switch(g=g.filter(k=>k!==P),l){case"pending":break;case"failed":if(oe||!e.dataAfterTimeout)return;break;default:return}if(re==="abort"){d=F,x();return}if(oe){d=F,g.length||(a.length?$():x());return}if(_(),O(),!e.random){const k=e.resources.indexOf(P.resource);k!==-1&&k!==e.index&&(e.index=k)}l="completed",y.forEach(k=>{k(F)})}function $(){if(l!=="pending")return;_();const P=a.shift();if(P===void 0){if(g.length){v=setTimeout(()=>{_(),l==="pending"&&(O(),x())},e.timeout);return}x();return}const re={status:"pending",resource:P,callback:(F,oe)=>{L(re,F,oe)}};g.push(re),h++,v=setTimeout($,e.rotate),n(P,t,re.callback)}return setTimeout($),C}function YO(e){const t={...wK,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,l,h){const d=bK(t,c,l,(v,g)=>{r(),h&&h(v,g)});return n.push(d),d}function s(c){return n.find(l=>c(l))||null}return{query:i,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function d1(){}const q_=Object.create(null);function EK(e){if(!q_[e]){const t=q0(e);if(!t)return;const n=YO(t),r={config:t,redundancy:n};q_[e]=r}return q_[e]}function TK(e,t,n){let r,i;if(typeof e=="string"){const s=Qw(e);if(!s)return n(void 0,424),d1;i=s.send;const a=EK(e);a&&(r=a.redundancy)}else{const s=V0(e);if(s){r=YO(s);const a=e.resources?e.resources[0]:"",c=Qw(a);c&&(i=c.send)}}return!r||!i?(n(void 0,424),d1):r.query(t,i,n)().abort}const p1="iconify2",wf="iconify",XO=wf+"-count",v1=wf+"-version",JO=36e5,IK=168;function Yw(e,t){try{return e.getItem(t)}catch{}}function $0(e,t,n){try{return e.setItem(t,n),!0}catch{}}function g1(e,t){try{e.removeItem(t)}catch{}}function Xw(e,t){return $0(e,XO,t.toString())}function Jw(e){return parseInt(Yw(e,XO))||0}const Hv={local:!0,session:!0},ZO={local:new Set,session:new Set};let H0=!1;function SK(e){H0=e}let Ud=typeof window>"u"?{}:window;function eP(e){const t=e+"Storage";try{if(Ud&&Ud[t]&&typeof Ud[t].length=="number")return Ud[t]}catch{}Hv[e]=!1}function tP(e,t){const n=eP(e);if(!n)return;const r=Yw(n,v1);if(r!==p1){if(r){const c=Jw(n);for(let l=0;l{const l=wf+c.toString(),h=Yw(n,l);if(typeof h=="string"){try{const d=JSON.parse(h);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>i&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}g1(n,l)}};let a=Jw(n);for(let c=a-1;c>=0;c--)s(c)||(c===a-1?(a--,Xw(n,a)):ZO[e].add(c))}function nP(){if(!H0){SK(!0);for(const e in Hv)tP(e,t=>{const n=t.data,r=t.provider,i=n.prefix,s=ha(r,i);if(!j0(s,n).length)return!1;const a=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function CK(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in Hv)tP(r,i=>{const s=i.data;return i.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function AK(e,t){H0||nP();function n(r){let i;if(!Hv[r]||!(i=eP(r)))return;const s=ZO[r];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=Jw(i),!Xw(i,a+1))return;const c={cached:Math.floor(Date.now()/JO),provider:e.provider,data:t};return $0(i,wf+a.toString(),JSON.stringify(c))}t.lastModified&&!CK(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function m1(){}function kK(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,gK(e)}))}function RK(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;delete e.iconsToLoad;let s;if(!i||!(s=Qw(n)))return;s.prepare(n,r,i).forEach(c=>{TK(n,c,l=>{if(typeof l!="object")c.icons.forEach(h=>{e.missing.add(h)});else try{const h=j0(e,l);if(!h.length)return;const d=e.pendingIcons;d&&h.forEach(v=>{d.delete(v)}),AK(e,l)}catch(h){console.error(h)}kK(e)})})}))}const NK=(e,t)=>{const n=_K(e,!0,WO()),r=vK(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,m1)}),()=>{l=!1}}const i=Object.create(null),s=[];let a,c;return r.pending.forEach(l=>{const{provider:h,prefix:d}=l;if(d===c&&h===a)return;a=h,c=d,s.push(ha(h,d));const v=i[h]||(i[h]=Object.create(null));v[d]||(v[d]=[])}),r.pending.forEach(l=>{const{provider:h,prefix:d,name:v}=l,g=ha(h,d),y=g.pendingIcons||(g.pendingIcons=new Set);y.has(v)||(y.add(v),i[h][d].push(v))}),s.forEach(l=>{const{provider:h,prefix:d}=l;i[h][d].length&&RK(l,i[h][d])}),t?yK(t,r,s):m1};function xK(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in GO?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const OK=/[\s,]+/;function PK(e,t){t.split(OK).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function DK(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function MK(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function LK(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function FK(e){return"data:image/svg+xml,"+LK(e)}function UK(e){return'url("'+FK(e)+'")'}const y1={...zO,inline:!1},jK={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},VK={display:"inline-block"},Zw={backgroundColor:"currentColor"},rP={backgroundColor:"transparent"},_1={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},w1={webkitMask:Zw,mask:Zw,background:rP};for(const e in w1){const t=w1[e];for(const n in _1)t[e+n]=_1[n]}const cp={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";cp[e+"-flip"]=t,cp[e.slice(0,1)+"-flip"]=t,cp[e+"Flip"]=t});function b1(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const E1=(e,t)=>{const n=xK(y1,t),r={...jK},i=t.mode||"svg",s={},a=t.style,c=typeof a=="object"&&!(a instanceof Array)?a:{};for(let b in t){const T=t[b];if(T!==void 0)switch(b){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[b]=T===!0||T==="true"||T===1;break;case"flip":typeof T=="string"&&PK(n,T);break;case"color":s.color=T;break;case"rotate":typeof T=="string"?n[b]=DK(T):typeof T=="number"&&(n[b]=T);break;case"ariaHidden":case"aria-hidden":T!==!0&&T!=="true"&&delete r["aria-hidden"];break;default:{const C=cp[b];C?(T===!0||T==="true"||T===1)&&(n[C]=!0):y1[b]===void 0&&(r[b]=T)}}}const l=tK(e,n),h=l.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),i==="svg"){r.style={...s,...c},Object.assign(r,h);let b=0,T=t.id;return typeof T=="string"&&(T=T.replace(/-/g,"_")),r.innerHTML=oK(l.body,T?()=>T+"ID"+b++:"iconifyVue"),ts("svg",r)}const{body:d,width:v,height:g}=e,y=i==="mask"||(i==="bg"?!1:d.indexOf("currentColor")!==-1),_=MK(d,{...h,width:v+"",height:g+""});return r.style={...s,"--svg":UK(_),width:b1(h.width),height:b1(h.height),...VK,...y?Zw:rP,...c},ts("span",r)};WO(!0);sK("",pK);if(typeof document<"u"&&typeof window<"u"){nP();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!XH(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;aK(n,i)||console.error(r)}catch{console.error(r)}}}}const BK={...$v,body:""},K0=vo({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let n;if(typeof e!="string"||(n=qv(e,!1,!0))===null)return this.abortLoading(),null;const r=QH(n);if(!r)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",r!==null&&(this._loadingIcon={name:e,abort:NK([n],()=>{this.counter++})})),null;this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e));const i=["iconify"];return n.prefix!==""&&i.push("iconify--"+n.prefix),n.provider!==""&&i.push("iconify--"+n.provider),{data:r,classes:i}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted?this.getIcon(e.icon,e.onLoad):null;if(!t)return E1(BK,e);let n=e;return t.classes&&(n={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),E1({...$v,...t.data},n)}}),Vi=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},qK={components:{Icon:K0},setup(e,t){const n=Ue("Login"),r=Ue("Signup Instead"),i=Ue(""),s=Ue(""),a=Ue(!1);function c(){n.value==="Login"?(n.value="Signup",r.value="Login Instead"):(n.value="Login",r.value="Signup Instead")}function l(){t.emit("emit-user",[i.value,s.value,n.value]),i.value="",s.value=""}function h(){a.value===!1?a.value=!0:a.value===!0&&(a.value=!1)}return{buttonPrimary:n,buttonSecondary:r,switchText:c,emitUser:l,username:i,password:s,showHide:a,showHidePassword:h}}},$K={class:"relative mb-3"},HK=ze("label",{for:"email",class:"pointer-events-none absolute left-0 top-0 origin-[0_0] border border-solid border-transparent px-3 py-4 text-neutral-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none dark:text-neutral-200 dark:peer-focus:text-primary"},"Email address",-1),KK={class:"relative mb-3"},WK=["type"],GK={class:"py-1"},zK=ze("label",{for:"showPassword",class:"p-1 dark:text-white"},"Show Password",-1),QK=ze("label",{for:"password",class:"pointer-events-none absolute left-0 top-0 origin-[0_0] border border-solid border-transparent px-3 py-4 text-neutral-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none dark:text-neutral-200 dark:peer-focus:text-primary"},"Password",-1),YK={class:"p-0.5"},XK={class:"p-0.5"};function JK(e,t,n,r,i,s){const a=Sn("base-button");return en(),Hn("form",null,[ze("div",$K,[Sp(ze("input",{type:"text",class:"peer m-0 block h-[58px] w-full rounded border border-solid border-neutral-300 bg-transparent bg-clip-padding px-3 py-4 text-base font-normal leading-tight text-neutral-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-primary focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary dark:border-neutral-600 dark:text-neutral-200 dark:focus:border-primary dark:peer-focus:text-primary [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",id:"email",placeholder:"name@example.com","onUpdate:modelValue":t[0]||(t[0]=c=>r.username=c)},null,512),[[Rp,r.username]]),HK]),ze("div",KK,[Sp(ze("input",{type:r.showHide?"text":"password",class:"peer m-0 block h-[58px] w-full rounded border border-solid border-neutral-300 bg-transparent bg-clip-padding px-3 py-4 text-base font-normal leading-tight text-neutral-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-primary focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:shadow-te-primary focus:outline-none peer-focus:text-primary dark:border-neutral-600 dark:text-neutral-200 dark:focus:border-primary dark:peer-focus:text-primary [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem] bg-",id:"password",placeholder:"Password","onUpdate:modelValue":t[1]||(t[1]=c=>r.password=c)},null,8,WK),[[o$,r.password]]),ze("div",GK,[ze("input",{type:"checkbox",id:"showPassword",onChange:t[2]||(t[2]=(...c)=>r.showHidePassword&&r.showHidePassword(...c))},null,32),zK]),QK]),ze("span",YK,[Ye(a,{onClick:Gk(r.emitUser,["prevent"]),class:"font-semibold"},{default:or(()=>[io(bp(r.buttonPrimary),1)]),_:1},8,["onClick"])]),ze("span",XK,[Ye(a,{onClick:Gk(r.switchText,["prevent"]),class:"font-semibold"},{default:or(()=>[io(bp(r.buttonSecondary),1)]),_:1},8,["onClick"])])])}const ZK=Vi(qK,[["render",JK]]);const eW={},tW={class:"text-base text-red-600"};function nW(e,t){return en(),Hn("div",null,[Ye(L0,{name:"message"},{default:or(()=>[ze("p",tW,[Mv(e.$slots,"default",{},void 0,!0)])]),_:3})])}const rW=Vi(eW,[["render",nW],["__scopeId","data-v-e583e2cf"]]);var eb=function(e,t){return eb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},eb(e,t)};function te(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");eb(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _e=function(){return _e=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&s[s.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function gn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(c){a={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}function xe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;rNO?Symbol(e):"_vr_"+e,M$=Tc("rvlm"),Qk=Tc("rvd"),Vv=Tc("r"),xO=Tc("rl"),Hw=Tc("rvl"),wu=typeof window<"u";function L$(e){return e.__esModule||NO&&e[Symbol.toStringTag]==="Module"}const lt=Object.assign;function U_(e,t){const n={};for(const r in t){const i=t[r];n[r]=Array.isArray(i)?i.map(e):e(i)}return n}const Wl=()=>{},F$=/\/$/,U$=e=>e.replace(F$,"");function j_(e,t,n="/"){let r,i={},s="",a="";const c=t.indexOf("?"),l=t.indexOf("#",c>-1?c:0);return c>-1&&(r=t.slice(0,c),s=t.slice(c+1,l>-1?l:t.length),i=e(s)),l>-1&&(r=r||t.slice(0,l),a=t.slice(l,t.length)),r=q$(r??t,n),{fullPath:r+(s&&"?")+s+a,path:r,query:i,hash:a}}function j$(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Yk(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function V$(e,t,n){const r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&Hu(t.matched[r],n.matched[i])&&OO(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Hu(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function OO(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!B$(e[n],t[n]))return!1;return!0}function B$(e,t){return Array.isArray(e)?Xk(e,t):Array.isArray(t)?Xk(t,e):e===t}function Xk(e,t){return Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function q$(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/");let i=n.length-1,s,a;for(s=0;s({left:window.pageXOffset,top:window.pageYOffset});function G$(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=W$(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Jk(e,t){return(history.state?history.state.position-t:-1)+e}const Kw=new Map;function z$(e,t){Kw.set(e,t)}function Q$(e){const t=Kw.get(e);return Kw.delete(e),t}let Y$=()=>location.protocol+"//"+location.host;function PO(e,t){const{pathname:n,search:r,hash:i}=t,s=e.indexOf("#");if(s>-1){let c=i.includes(e.slice(s))?e.slice(s).length:1,l=i.slice(c);return l[0]!=="/"&&(l="/"+l),Yk(l,"")}return Yk(n,e)+r+i}function X$(e,t,n,r){let i=[],s=[],a=null;const c=({state:g})=>{const y=PO(e,location),_=n.value,b=t.value;let T=0;if(g){if(n.value=y,t.value=g,a&&a===_){a=null;return}T=b?g.position-b.position:0}else r(y);i.forEach(C=>{C(n.value,_,{delta:T,type:_f.pop,direction:T?T>0?Gl.forward:Gl.back:Gl.unknown})})};function l(){a=n.value}function h(g){i.push(g);const y=()=>{const _=i.indexOf(g);_>-1&&i.splice(_,1)};return s.push(y),y}function d(){const{history:g}=window;g.state&&g.replaceState(lt({},g.state,{scroll:Bv()}),"")}function v(){for(const g of s)g();s=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",d),{pauseListeners:l,listen:h,destroy:v}}function Zk(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Bv():null}}function J$(e){const{history:t,location:n}=window,r={value:PO(e,n)},i={value:t.state};i.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(l,h,d){const v=e.indexOf("#"),g=v>-1?(n.host&&document.querySelector("base")?e:e.slice(v))+l:Y$()+e+l;try{t[d?"replaceState":"pushState"](h,"",g),i.value=h}catch(y){console.error(y),n[d?"replace":"assign"](g)}}function a(l,h){const d=lt({},t.state,Zk(i.value.back,l,i.value.forward,!0),h,{position:i.value.position});s(l,d,!0),r.value=l}function c(l,h){const d=lt({},i.value,t.state,{forward:l,scroll:Bv()});s(d.current,d,!0);const v=lt({},Zk(r.value,l,null),{position:d.position+1},h);s(l,v,!1),r.value=l}return{location:r,state:i,push:c,replace:a}}function Z$(e){e=$$(e);const t=J$(e),n=X$(e,t.state,t.location,t.replace);function r(s,a=!0){a||n.pauseListeners(),history.go(s)}const i=lt({location:"",base:e,go:r,createHref:K$.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function eH(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Z$(e)}function tH(e){return typeof e=="string"||e&&typeof e=="object"}function DO(e){return typeof e=="string"||typeof e=="symbol"}const Oo={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},MO=Tc("nf");var e1;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(e1||(e1={}));function Ku(e,t){return lt(new Error,{type:e,[MO]:!0},t)}function Po(e,t){return e instanceof Error&&MO in e&&(t==null||!!(e.type&t))}const t1="[^/]+?",nH={sensitive:!1,strict:!1,start:!0,end:!0},rH=/[.+*?^${}()[\]/\\]/g;function iH(e,t){const n=lt({},nH,t),r=[];let i=n.start?"^":"";const s=[];for(const h of e){const d=h.length?[]:[90];n.strict&&!h.length&&(i+="/");for(let v=0;vt.length?t.length===1&&t[0]===40+40?1:-1:0}function sH(e,t){let n=0;const r=e.score,i=t.score;for(;n1&&(l==="*"||l==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:h,regexp:d,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),h="")}function g(){h+=l}for(;c{a(x)}:Wl}function a(d){if(DO(d)){const v=r.get(d);v&&(r.delete(d),n.splice(n.indexOf(v),1),v.children.forEach(a),v.alias.forEach(a))}else{const v=n.indexOf(d);v>-1&&(n.splice(v,1),d.record.name&&r.delete(d.record.name),d.children.forEach(a),d.alias.forEach(a))}}function c(){return n}function l(d){let v=0;for(;v=0&&(d.record.path!==n[v].record.path||!LO(d,n[v]));)v++;n.splice(v,0,d),d.record.name&&!n1(d)&&r.set(d.record.name,d)}function h(d,v){let g,y={},_,b;if("name"in d&&d.name){if(g=r.get(d.name),!g)throw Ku(1,{location:d});b=g.record.name,y=lt(hH(v.params,g.keys.filter(x=>!x.optional).map(x=>x.name)),d.params),_=g.stringify(y)}else if("path"in d)_=d.path,g=n.find(x=>x.re.test(_)),g&&(y=g.parse(_),b=g.record.name);else{if(g=v.name?r.get(v.name):n.find(x=>x.re.test(v.path)),!g)throw Ku(1,{location:d,currentLocation:v});b=g.record.name,y=lt({},v.params,d.params),_=g.stringify(y)}const T=[];let C=g;for(;C;)T.unshift(C.record),C=C.parent;return{name:b,path:_,params:y,matched:T,meta:vH(T)}}return e.forEach(d=>s(d)),{addRoute:s,resolve:h,removeRoute:a,getRoutes:c,getRecordMatcher:i}}function hH(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function dH(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:pH(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||{}:{default:e.component}}}function pH(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="boolean"?n:n[r];return t}function n1(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function vH(e){return e.reduce((t,n)=>lt(t,n.meta),{})}function r1(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function LO(e,t){return t.children.some(n=>n===e||LO(e,n))}const FO=/#/g,gH=/&/g,mH=/\//g,yH=/=/g,_H=/\?/g,UO=/\+/g,wH=/%5B/g,bH=/%5D/g,jO=/%5E/g,EH=/%60/g,VO=/%7B/g,TH=/%7C/g,BO=/%7D/g,IH=/%20/g;function U0(e){return encodeURI(""+e).replace(TH,"|").replace(wH,"[").replace(bH,"]")}function SH(e){return U0(e).replace(VO,"{").replace(BO,"}").replace(jO,"^")}function Ww(e){return U0(e).replace(UO,"%2B").replace(IH,"+").replace(FO,"%23").replace(gH,"%26").replace(EH,"`").replace(VO,"{").replace(BO,"}").replace(jO,"^")}function CH(e){return Ww(e).replace(yH,"%3D")}function AH(e){return U0(e).replace(FO,"%23").replace(_H,"%3F")}function kH(e){return e==null?"":AH(e).replace(mH,"%2F")}function xp(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function RH(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let i=0;is&&Ww(s)):[r&&Ww(r)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+n,s!=null&&(t+="="+s))})}return t}function NH(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Array.isArray(r)?r.map(i=>i==null?null:""+i):r==null?r:""+r)}return t}function Rl(){let e=[];function t(r){return e.push(r),()=>{const i=e.indexOf(r);i>-1&&e.splice(i,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function jo(e,t,n,r,i){const s=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((a,c)=>{const l=v=>{v===!1?c(Ku(4,{from:n,to:t})):v instanceof Error?c(v):tH(v)?c(Ku(2,{from:t,to:v})):(s&&r.enterCallbacks[i]===s&&typeof v=="function"&&s.push(v),a())},h=e.call(r&&r.instances[i],t,n,l);let d=Promise.resolve(h);e.length<3&&(d=d.then(l)),d.catch(v=>c(v))})}function V_(e,t,n,r){const i=[];for(const s of e)for(const a in s.components){let c=s.components[a];if(!(t!=="beforeRouteEnter"&&!s.instances[a]))if(xH(c)){const h=(c.__vccOpts||c)[t];h&&i.push(jo(h,n,r,s,a))}else{let l=c();i.push(()=>l.then(h=>{if(!h)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${s.path}"`));const d=L$(h)?h.default:h;s.components[a]=d;const g=(d.__vccOpts||d)[t];return g&&jo(g,n,r,s,a)()}))}}return i}function xH(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function o1(e){const t=sr(Vv),n=sr(xO),r=Ze(()=>t.resolve(Nu(e.to))),i=Ze(()=>{const{matched:l}=r.value,{length:h}=l,d=l[h-1],v=n.matched;if(!d||!v.length)return-1;const g=v.findIndex(Hu.bind(null,d));if(g>-1)return g;const y=s1(l[h-2]);return h>1&&s1(d)===y&&v[v.length-1].path!==y?v.findIndex(Hu.bind(null,l[h-2])):g}),s=Ze(()=>i.value>-1&&MH(n.params,r.value.params)),a=Ze(()=>i.value>-1&&i.value===n.matched.length-1&&OO(n.params,r.value.params));function c(l={}){return DH(l)?t[Nu(e.replace)?"replace":"push"](Nu(e.to)).catch(Wl):Promise.resolve()}return{route:r,href:Ze(()=>r.value.href),isActive:s,isExactActive:a,navigate:c}}const OH=po({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:o1,setup(e,{slots:t}){const n=bc(o1(e)),{options:r}=sr(Vv),i=Ze(()=>({[a1(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[a1(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const s=t.default&&t.default(n);return e.custom?s:ts("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},s)}}}),PH=OH;function DH(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function MH(e,t){for(const n in t){const r=t[n],i=e[n];if(typeof r=="string"){if(r!==i)return!1}else if(!Array.isArray(i)||i.length!==r.length||r.some((s,a)=>s!==i[a]))return!1}return!0}function s1(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const a1=(e,t,n)=>e??t??n,LH=po({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:n}){const r=sr(Hw),i=Ze(()=>e.route||r.value),s=sr(Qk,0),a=Ze(()=>i.value.matched[s]);Ou(Qk,s+1),Ou(M$,a),Ou(Hw,i);const c=Fe();return Ri(()=>[c.value,a.value,e.name],([l,h,d],[v,g,y])=>{h&&(h.instances[d]=l,g&&g!==h&&l&&l===v&&(h.leaveGuards.size||(h.leaveGuards=g.leaveGuards),h.updateGuards.size||(h.updateGuards=g.updateGuards))),l&&h&&(!g||!Hu(h,g)||!v)&&(h.enterCallbacks[d]||[]).forEach(_=>_(l))},{flush:"post"}),()=>{const l=i.value,h=a.value,d=h&&h.components[e.name],v=e.name;if(!d)return u1(n.default,{Component:d,route:l});const g=h.props[e.name],y=g?g===!0?l.params:typeof g=="function"?g(l):g:null,b=ts(d,lt({},y,t,{onVnodeUnmounted:T=>{T.component.isUnmounted&&(h.instances[v]=null)},ref:c}));return u1(n.default,{Component:b,route:l})||b}}});function u1(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const FH=LH;function UH(e){const t=fH(e.routes,e),n=e.parseQuery||RH,r=e.stringifyQuery||i1,i=e.history,s=Rl(),a=Rl(),c=Rl(),l=Gx(Oo);let h=Oo;wu&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=U_.bind(null,B=>""+B),v=U_.bind(null,kH),g=U_.bind(null,xp);function y(B,ie){let ne,Z;return DO(B)?(ne=t.getRecordMatcher(B),Z=ie):Z=B,t.addRoute(Z,ne)}function _(B){const ie=t.getRecordMatcher(B);ie&&t.removeRoute(ie)}function b(){return t.getRoutes().map(B=>B.record)}function T(B){return!!t.getRecordMatcher(B)}function C(B,ie){if(ie=lt({},ie||l.value),typeof B=="string"){const I=j_(n,B,ie.path),N=t.resolve({path:I.path},ie),M=i.createHref(I.fullPath);return lt(I,N,{params:g(N.params),hash:xp(I.hash),redirectedFrom:void 0,href:M})}let ne;if("path"in B)ne=lt({},B,{path:j_(n,B.path,ie.path).path});else{const I=lt({},B.params);for(const N in I)I[N]==null&&delete I[N];ne=lt({},B,{params:v(B.params)}),ie.params=v(ie.params)}const Z=t.resolve(ne,ie),He=B.hash||"";Z.params=d(g(Z.params));const pt=j$(r,lt({},B,{hash:SH(He),path:Z.path})),Ae=i.createHref(pt);return lt({fullPath:pt,hash:He,query:r===i1?NH(B.query):B.query||{}},Z,{redirectedFrom:void 0,href:Ae})}function x(B){return typeof B=="string"?j_(n,B,l.value.path):lt({},B)}function O(B,ie){if(h!==B)return Ku(8,{from:ie,to:B})}function L(B){return re(B)}function $(B){return L(lt(x(B),{replace:!0}))}function P(B){const ie=B.matched[B.matched.length-1];if(ie&&ie.redirect){const{redirect:ne}=ie;let Z=typeof ne=="function"?ne(B):ne;return typeof Z=="string"&&(Z=Z.includes("?")||Z.includes("#")?Z=x(Z):{path:Z},Z.params={}),lt({query:B.query,hash:B.hash,params:B.params},Z)}}function re(B,ie){const ne=h=C(B),Z=l.value,He=B.state,pt=B.force,Ae=B.replace===!0,I=P(ne);if(I)return re(lt(x(I),{state:He,force:pt,replace:Ae}),ie||ne);const N=ne;N.redirectedFrom=ie;let M;return!pt&&V$(r,Z,ne)&&(M=Ku(16,{to:N,from:Z}),Xn(Z,Z,!0,!1)),(M?Promise.resolve(M):se(N,Z)).catch(j=>Po(j)?Po(j,2)?j:Dn(j):nt(j,N,Z)).then(j=>{if(j){if(Po(j,2))return re(lt(x(j.to),{state:He,force:pt,replace:Ae}),ie||N)}else j=dt(N,Z,!0,Ae,He);return k(N,Z,j),j})}function F(B,ie){const ne=O(B,ie);return ne?Promise.reject(ne):Promise.resolve()}function se(B,ie){let ne;const[Z,He,pt]=jH(B,ie);ne=V_(Z.reverse(),"beforeRouteLeave",B,ie);for(const I of Z)I.leaveGuards.forEach(N=>{ne.push(jo(N,B,ie))});const Ae=F.bind(null,B,ie);return ne.push(Ae),pu(ne).then(()=>{ne=[];for(const I of s.list())ne.push(jo(I,B,ie));return ne.push(Ae),pu(ne)}).then(()=>{ne=V_(He,"beforeRouteUpdate",B,ie);for(const I of He)I.updateGuards.forEach(N=>{ne.push(jo(N,B,ie))});return ne.push(Ae),pu(ne)}).then(()=>{ne=[];for(const I of B.matched)if(I.beforeEnter&&!ie.matched.includes(I))if(Array.isArray(I.beforeEnter))for(const N of I.beforeEnter)ne.push(jo(N,B,ie));else ne.push(jo(I.beforeEnter,B,ie));return ne.push(Ae),pu(ne)}).then(()=>(B.matched.forEach(I=>I.enterCallbacks={}),ne=V_(pt,"beforeRouteEnter",B,ie),ne.push(Ae),pu(ne))).then(()=>{ne=[];for(const I of a.list())ne.push(jo(I,B,ie));return ne.push(Ae),pu(ne)}).catch(I=>Po(I,8)?I:Promise.reject(I))}function k(B,ie,ne){for(const Z of c.list())Z(B,ie,ne)}function dt(B,ie,ne,Z,He){const pt=O(B,ie);if(pt)return pt;const Ae=ie===Oo,I=wu?history.state:{};ne&&(Z||Ae?i.replace(B.fullPath,lt({scroll:Ae&&I&&I.scroll},He)):i.push(B.fullPath,He)),l.value=B,Xn(B,ie,ne,Ae),Dn()}let ue;function ut(){ue=i.listen((B,ie,ne)=>{const Z=C(B),He=P(Z);if(He){re(lt(He,{replace:!0}),Z).catch(Wl);return}h=Z;const pt=l.value;wu&&z$(Jk(pt.fullPath,ne.delta),Bv()),se(Z,pt).catch(Ae=>Po(Ae,12)?Ae:Po(Ae,2)?(re(Ae.to,Z).then(I=>{Po(I,20)&&!ne.delta&&ne.type===_f.pop&&i.go(-1,!1)}).catch(Wl),Promise.reject()):(ne.delta&&i.go(-ne.delta,!1),nt(Ae,Z,pt))).then(Ae=>{Ae=Ae||dt(Z,pt,!1),Ae&&(ne.delta?i.go(-ne.delta,!1):ne.type===_f.pop&&Po(Ae,20)&&i.go(-1,!1)),k(Z,pt,Ae)}).catch(Wl)})}let Rt=Rl(),Yn=Rl(),tt;function nt(B,ie,ne){Dn(B);const Z=Yn.list();return Z.length?Z.forEach(He=>He(B,ie,ne)):console.error(B),Promise.reject(B)}function Ce(){return tt&&l.value!==Oo?Promise.resolve():new Promise((B,ie)=>{Rt.add([B,ie])})}function Dn(B){return tt||(tt=!B,ut(),Rt.list().forEach(([ie,ne])=>B?ne(B):ie()),Rt.reset()),B}function Xn(B,ie,ne,Z){const{scrollBehavior:He}=e;if(!wu||!He)return Promise.resolve();const pt=!ne&&Q$(Jk(B.fullPath,0))||(Z||!ne)&&history.state&&history.state.scroll||null;return ui().then(()=>He(B,ie,pt)).then(Ae=>Ae&&G$(Ae)).catch(Ae=>nt(Ae,B,ie))}const Mn=B=>i.go(B);let un;const $i=new Set;return{currentRoute:l,addRoute:y,removeRoute:_,hasRoute:T,getRoutes:b,resolve:C,options:e,push:L,replace:$,go:Mn,back:()=>Mn(-1),forward:()=>Mn(1),beforeEach:s.add,beforeResolve:a.add,afterEach:c.add,onError:Yn.add,isReady:Ce,install(B){const ie=this;B.component("RouterLink",PH),B.component("RouterView",FH),B.config.globalProperties.$router=ie,Object.defineProperty(B.config.globalProperties,"$route",{enumerable:!0,get:()=>Nu(l)}),wu&&!un&&l.value===Oo&&(un=!0,L(i.location).catch(He=>{}));const ne={};for(const He in Oo)ne[He]=Ze(()=>l.value[He]);B.provide(Vv,ie),B.provide(xO,bc(ne)),B.provide(Hw,l);const Z=B.unmount;$i.add(B),B.unmount=function(){$i.delete(B),$i.size<1&&(h=Oo,ue&&ue(),l.value=Oo,un=!1,tt=!1),Z()}}}}function pu(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function jH(e,t){const n=[],r=[],i=[],s=Math.max(t.matched.length,e.matched.length);for(let a=0;aHu(h,c))?r.push(c):n.push(c));const l=e.matched[a];l&&(t.matched.find(h=>Hu(h,l))||i.push(l))}return[n,r,i]}function qO(){return sr(Vv)}const zl=/^[a-z0-9]+(-[a-z0-9]+)*$/,qv=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const c=i.pop(),l=i.pop(),h={provider:i.length>0?i[0]:r,prefix:l,name:c};return t&&!up(h)?null:h}const s=i[0],a=s.split("-");if(a.length>1){const c={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!up(c)?null:c}if(n&&r===""){const c={provider:r,prefix:"",name:s};return t&&!up(c,n)?null:c}return null},up=(e,t)=>e?!!((e.provider===""||e.provider.match(zl))&&(t&&e.prefix===""||e.prefix.match(zl))&&e.name.match(zl)):!1,$O=Object.freeze({left:0,top:0,width:16,height:16}),Op=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),$v=Object.freeze({...$O,...Op}),Gw=Object.freeze({...$v,body:"",hidden:!1});function VH(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function c1(e,t){const n=VH(e,t);for(const r in Gw)r in Op?r in e&&!(r in n)&&(n[r]=Op[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function BH(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function s(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const c=r[a]&&r[a].parent,l=c&&s(c);l&&(i[a]=[c].concat(l))}return i[a]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(s),i}function qH(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let s={};function a(c){s=c1(r[c]||i[c],s)}return a(t),n.forEach(a),c1(e,s)}function HO(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=BH(e);for(const i in r){const s=r[i];s&&(t(i,qH(e,i,s)),n.push(i))}return n}const $H={provider:"",aliases:{},not_found:{},...$O};function B_(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function KO(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!B_(e,$H))return null;const n=t.icons;for(const i in n){const s=n[i];if(!i.match(zl)||typeof s.body!="string"||!B_(s,Gw))return null}const r=t.aliases||Object.create(null);for(const i in r){const s=r[i],a=s.parent;if(!i.match(zl)||typeof a!="string"||!n[a]&&!r[a]||!B_(s,Gw))return null}return t}const l1=Object.create(null);function HH(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function ha(e,t){const n=l1[e]||(l1[e]=Object.create(null));return n[t]||(n[t]=HH(e,t))}function j0(e,t){return KO(t)?HO(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function KH(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let wf=!1;function WO(e){return typeof e=="boolean"&&(wf=e),wf}function WH(e){const t=typeof e=="string"?qv(e,!0,wf):e;if(t){const n=ha(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function GH(e,t){const n=qv(e,!0,wf);if(!n)return!1;const r=ha(n.provider,n.prefix);return KH(r,n.name,t)}function zH(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),wf&&!t&&!e.prefix){let i=!1;return KO(e)&&(e.prefix="",HO(e,(s,a)=>{a&&GH(s,a)&&(i=!0)})),i}const n=e.prefix;if(!up({provider:t,prefix:n,name:"a"}))return!1;const r=ha(t,n);return!!j0(r,e)}const GO=Object.freeze({width:null,height:null}),zO=Object.freeze({...GO,...Op}),QH=/(-?[0-9.]*[0-9]+[0-9.]*)/g,YH=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function f1(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(QH);if(r===null||!r.length)return e;const i=[];let s=r.shift(),a=YH.test(s);for(;;){if(a){const c=parseFloat(s);isNaN(c)?i.push(s):i.push(Math.ceil(c*t*n)/n)}else i.push(s);if(s=r.shift(),s===void 0)return i.join("");a=!a}}const XH=e=>e==="unset"||e==="undefined"||e==="none";function JH(e,t){const n={...$v,...e},r={...zO,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(_=>{const b=[],T=_.hFlip,C=_.vFlip;let x=_.rotate;T?C?x+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):C&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let O;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:O=i.height/2+i.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}x%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),b.length&&(s=''+s+"")});const a=r.width,c=r.height,l=i.width,h=i.height;let d,v;a===null?(v=c===null?"1em":c==="auto"?h:c,d=f1(v,l/h)):(d=a==="auto"?l:a,v=c===null?f1(d,h/l):c==="auto"?h:c);const g={},y=(_,b)=>{XH(b)||(g[_]=b.toString())};return y("width",d),y("height",v),g.viewBox=i.left.toString()+" "+i.top.toString()+" "+l.toString()+" "+h.toString(),{attributes:g,body:s}}const ZH=/\sid="(\S+)"/g,eK="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let tK=0;function nK(e,t=eK){const n=[];let r;for(;r=ZH.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const a=typeof t=="function"?t(s):t+(tK++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const zw=Object.create(null);function rK(e,t){zw[e]=t}function Qw(e){return zw[e]||zw[""]}function V0(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const B0=Object.create(null),Nl=["https://api.simplesvg.com","https://api.unisvg.com"],cp=[];for(;Nl.length>0;)Nl.length===1||Math.random()>.5?cp.push(Nl.shift()):cp.push(Nl.pop());B0[""]=V0({resources:["https://api.iconify.design"].concat(cp)});function iK(e,t){const n=V0(t);return n===null?!1:(B0[e]=n,!0)}function q0(e){return B0[e]}const oK=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let h1=oK();function sK(e,t){const n=q0(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const s=t+".json?icons=";r=n.maxURL-i-n.path.length-s.length}return r}function aK(e){return e===404}const uK=(e,t,n)=>{const r=[],i=sK(e,t),s="icons";let a={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,h)=>{c+=l.length+1,c>=i&&h>0&&(r.push(a),a={type:s,provider:e,prefix:t,icons:[]},c=l.length),a.icons.push(l)}),r.push(a),r};function cK(e){if(typeof e=="string"){const t=q0(e);if(t)return t.path}return"/"}const lK=(e,t,n)=>{if(!h1){n("abort",424);return}let r=cK(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});r+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let i=503;h1(e+r).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{n(aK(a)?"abort":"next",a)});return}return i=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",i)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",i)})},fK={prepare:uK,send:lK};function hK(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,s)=>i.provider!==s.provider?i.provider.localeCompare(s.provider):i.prefix!==s.prefix?i.prefix.localeCompare(s.prefix):i.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const s=i.provider,a=i.prefix,c=i.name,l=n[s]||(n[s]=Object.create(null)),h=l[a]||(l[a]=ha(s,a));let d;c in h.icons?d=t.loaded:a===""||h.missing.has(c)?d=t.missing:d=t.pending;const v={provider:s,prefix:a,name:c};d.push(v)}),t}function QO(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function dK(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(s=>{const a=s.icons,c=a.pending.length;a.pending=a.pending.filter(l=>{if(l.prefix!==i)return!0;const h=l.name;if(e.icons[h])a.loaded.push({provider:r,prefix:i,name:h});else if(e.missing.has(h))a.missing.push({provider:r,prefix:i,name:h});else return n=!0,!0;return!1}),a.pending.length!==c&&(n||QO([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let pK=0;function vK(e,t,n){const r=pK++,i=QO.bind(null,n,r);if(!t.pending.length)return i;const s={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),i}function gK(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const s=typeof i=="string"?qv(i,t,n):i;s&&r.push(s)}),r}var mK={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function yK(e,t,n,r){const i=e.resources.length,s=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let P=e.resources.slice(0);for(a=[];P.length>1;){const re=Math.floor(Math.random()*P.length);a.push(P[re]),P=P.slice(0,re).concat(P.slice(re+1))}a=a.concat(P)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",h=0,d,v=null,g=[],y=[];typeof r=="function"&&y.push(r);function _(){v&&(clearTimeout(v),v=null)}function b(){l==="pending"&&(l="aborted"),_(),g.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),g=[]}function T(P,re){re&&(y=[]),typeof P=="function"&&y.push(P)}function C(){return{startTime:c,payload:t,status:l,queriesSent:h,queriesPending:g.length,subscribe:T,abort:b}}function x(){l="failed",y.forEach(P=>{P(void 0,d)})}function O(){g.forEach(P=>{P.status==="pending"&&(P.status="aborted")}),g=[]}function L(P,re,F){const se=re!=="success";switch(g=g.filter(k=>k!==P),l){case"pending":break;case"failed":if(se||!e.dataAfterTimeout)return;break;default:return}if(re==="abort"){d=F,x();return}if(se){d=F,g.length||(a.length?$():x());return}if(_(),O(),!e.random){const k=e.resources.indexOf(P.resource);k!==-1&&k!==e.index&&(e.index=k)}l="completed",y.forEach(k=>{k(F)})}function $(){if(l!=="pending")return;_();const P=a.shift();if(P===void 0){if(g.length){v=setTimeout(()=>{_(),l==="pending"&&(O(),x())},e.timeout);return}x();return}const re={status:"pending",resource:P,callback:(F,se)=>{L(re,F,se)}};g.push(re),h++,v=setTimeout($,e.rotate),n(P,t,re.callback)}return setTimeout($),C}function YO(e){const t={...mK,...e};let n=[];function r(){n=n.filter(c=>c().status==="pending")}function i(c,l,h){const d=yK(t,c,l,(v,g)=>{r(),h&&h(v,g)});return n.push(d),d}function s(c){return n.find(l=>c(l))||null}return{query:i,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:r}}function d1(){}const q_=Object.create(null);function _K(e){if(!q_[e]){const t=q0(e);if(!t)return;const n=YO(t),r={config:t,redundancy:n};q_[e]=r}return q_[e]}function wK(e,t,n){let r,i;if(typeof e=="string"){const s=Qw(e);if(!s)return n(void 0,424),d1;i=s.send;const a=_K(e);a&&(r=a.redundancy)}else{const s=V0(e);if(s){r=YO(s);const a=e.resources?e.resources[0]:"",c=Qw(a);c&&(i=c.send)}}return!r||!i?(n(void 0,424),d1):r.query(t,i,n)().abort}const p1="iconify2",bf="iconify",XO=bf+"-count",v1=bf+"-version",JO=36e5,bK=168;function Yw(e,t){try{return e.getItem(t)}catch{}}function $0(e,t,n){try{return e.setItem(t,n),!0}catch{}}function g1(e,t){try{e.removeItem(t)}catch{}}function Xw(e,t){return $0(e,XO,t.toString())}function Jw(e){return parseInt(Yw(e,XO))||0}const Hv={local:!0,session:!0},ZO={local:new Set,session:new Set};let H0=!1;function EK(e){H0=e}let jd=typeof window>"u"?{}:window;function eP(e){const t=e+"Storage";try{if(jd&&jd[t]&&typeof jd[t].length=="number")return jd[t]}catch{}Hv[e]=!1}function tP(e,t){const n=eP(e);if(!n)return;const r=Yw(n,v1);if(r!==p1){if(r){const c=Jw(n);for(let l=0;l{const l=bf+c.toString(),h=Yw(n,l);if(typeof h=="string"){try{const d=JSON.parse(h);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>i&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}g1(n,l)}};let a=Jw(n);for(let c=a-1;c>=0;c--)s(c)||(c===a-1?(a--,Xw(n,a)):ZO[e].add(c))}function nP(){if(!H0){EK(!0);for(const e in Hv)tP(e,t=>{const n=t.data,r=t.provider,i=n.prefix,s=ha(r,i);if(!j0(s,n).length)return!1;const a=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,a):a,!0})}}function TK(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in Hv)tP(r,i=>{const s=i.data;return i.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function IK(e,t){H0||nP();function n(r){let i;if(!Hv[r]||!(i=eP(r)))return;const s=ZO[r];let a;if(s.size)s.delete(a=Array.from(s).shift());else if(a=Jw(i),!Xw(i,a+1))return;const c={cached:Math.floor(Date.now()/JO),provider:e.provider,data:t};return $0(i,bf+a.toString(),JSON.stringify(c))}t.lastModified&&!TK(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function m1(){}function SK(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,dK(e)}))}function CK(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;delete e.iconsToLoad;let s;if(!i||!(s=Qw(n)))return;s.prepare(n,r,i).forEach(c=>{wK(n,c,l=>{if(typeof l!="object")c.icons.forEach(h=>{e.missing.add(h)});else try{const h=j0(e,l);if(!h.length)return;const d=e.pendingIcons;d&&h.forEach(v=>{d.delete(v)}),IK(e,l)}catch(h){console.error(h)}SK(e)})})}))}const AK=(e,t)=>{const n=gK(e,!0,WO()),r=hK(n);if(!r.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(r.loaded,r.missing,r.pending,m1)}),()=>{l=!1}}const i=Object.create(null),s=[];let a,c;return r.pending.forEach(l=>{const{provider:h,prefix:d}=l;if(d===c&&h===a)return;a=h,c=d,s.push(ha(h,d));const v=i[h]||(i[h]=Object.create(null));v[d]||(v[d]=[])}),r.pending.forEach(l=>{const{provider:h,prefix:d,name:v}=l,g=ha(h,d),y=g.pendingIcons||(g.pendingIcons=new Set);y.has(v)||(y.add(v),i[h][d].push(v))}),s.forEach(l=>{const{provider:h,prefix:d}=l;i[h][d].length&&CK(l,i[h][d])}),t?vK(t,r,s):m1};function kK(e,t){const n={...e};for(const r in t){const i=t[r],s=typeof i;r in GO?(i===null||i&&(s==="string"||s==="number"))&&(n[r]=i):s===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const RK=/[\s,]+/;function NK(e,t){t.split(RK).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function xK(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/i,s%1===0?r(s):0)}}return t}function OK(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function PK(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function DK(e){return"data:image/svg+xml,"+PK(e)}function MK(e){return'url("'+DK(e)+'")'}const y1={...zO,inline:!1},LK={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},FK={display:"inline-block"},Zw={backgroundColor:"currentColor"},rP={backgroundColor:"transparent"},_1={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},w1={webkitMask:Zw,mask:Zw,background:rP};for(const e in w1){const t=w1[e];for(const n in _1)t[e+n]=_1[n]}const lp={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";lp[e+"-flip"]=t,lp[e.slice(0,1)+"-flip"]=t,lp[e+"Flip"]=t});function b1(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const E1=(e,t)=>{const n=kK(y1,t),r={...LK},i=t.mode||"svg",s={},a=t.style,c=typeof a=="object"&&!(a instanceof Array)?a:{};for(let b in t){const T=t[b];if(T!==void 0)switch(b){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[b]=T===!0||T==="true"||T===1;break;case"flip":typeof T=="string"&&NK(n,T);break;case"color":s.color=T;break;case"rotate":typeof T=="string"?n[b]=xK(T):typeof T=="number"&&(n[b]=T);break;case"ariaHidden":case"aria-hidden":T!==!0&&T!=="true"&&delete r["aria-hidden"];break;default:{const C=lp[b];C?(T===!0||T==="true"||T===1)&&(n[C]=!0):y1[b]===void 0&&(r[b]=T)}}}const l=JH(e,n),h=l.attributes;if(n.inline&&(s.verticalAlign="-0.125em"),i==="svg"){r.style={...s,...c},Object.assign(r,h);let b=0,T=t.id;return typeof T=="string"&&(T=T.replace(/-/g,"_")),r.innerHTML=nK(l.body,T?()=>T+"ID"+b++:"iconifyVue"),ts("svg",r)}const{body:d,width:v,height:g}=e,y=i==="mask"||(i==="bg"?!1:d.indexOf("currentColor")!==-1),_=OK(d,{...h,width:v+"",height:g+""});return r.style={...s,"--svg":MK(_),width:b1(h.width),height:b1(h.height),...FK,...y?Zw:rP,...c},ts("span",r)};WO(!0);rK("",fK);if(typeof document<"u"&&typeof window<"u"){nP();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!zH(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;iK(n,i)||console.error(r)}catch{console.error(r)}}}}const UK={...$v,body:""},K0=po({inheritAttrs:!1,data(){return{iconMounted:!1,counter:0}},mounted(){this._name="",this._loadingIcon=null,this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let n;if(typeof e!="string"||(n=qv(e,!1,!0))===null)return this.abortLoading(),null;const r=WH(n);if(!r)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",r!==null&&(this._loadingIcon={name:e,abort:AK([n],()=>{this.counter++})})),null;this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e));const i=["iconify"];return n.prefix!==""&&i.push("iconify--"+n.prefix),n.provider!==""&&i.push("iconify--"+n.provider),{data:r,classes:i}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted?this.getIcon(e.icon,e.onLoad):null;if(!t)return E1(UK,e);let n=e;return t.classes&&(n={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),E1({...$v,...t.data},n)}}),Vi=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},jK={components:{Icon:K0},setup(e,t){const n=Fe("Login"),r=Fe("Signup Instead"),i=Fe(""),s=Fe(""),a=Fe(!1);function c(){n.value==="Login"?(n.value="Signup",r.value="Login Instead"):(n.value="Login",r.value="Signup Instead")}function l(){t.emit("emit-user",[i.value,s.value,n.value]),i.value="",s.value=""}function h(){a.value===!1?a.value=!0:a.value===!0&&(a.value=!1)}return{buttonPrimary:n,buttonSecondary:r,switchText:c,emitUser:l,username:i,password:s,showHide:a,showHidePassword:h}}},VK={class:"relative mb-3"},BK=Be("label",{for:"email",class:"pointer-events-none absolute left-0 top-0 origin-[0_0] border border-solid border-transparent px-3 py-4 text-neutral-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none dark:text-neutral-200 dark:peer-focus:text-primary"},"Email address",-1),qK={class:"relative mb-3"},$K=["type"],HK={class:"py-1"},KK=Be("label",{for:"showPassword",class:"p-1 dark:text-white"},"Show Password",-1),WK=Be("label",{for:"password",class:"pointer-events-none absolute left-0 top-0 origin-[0_0] border border-solid border-transparent px-3 py-4 text-neutral-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none dark:text-neutral-200 dark:peer-focus:text-primary"},"Password",-1),GK={class:"p-0.5"},zK={class:"p-0.5"};function QK(e,t,n,r,i,s){const a=$n("base-button");return pn(),ir("form",null,[Be("div",VK,[Cp(Be("input",{type:"text",class:"peer m-0 block h-[58px] w-full rounded border border-solid border-neutral-300 bg-transparent bg-clip-padding px-3 py-4 text-base font-normal leading-tight text-neutral-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-primary focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary dark:border-neutral-600 dark:text-neutral-200 dark:focus:border-primary dark:peer-focus:text-primary [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",id:"email",placeholder:"name@example.com","onUpdate:modelValue":t[0]||(t[0]=c=>r.username=c)},null,512),[[yf,r.username]]),BK]),Be("div",qK,[Cp(Be("input",{type:r.showHide?"text":"password",class:"peer m-0 block h-[58px] w-full rounded border border-solid border-neutral-300 bg-transparent bg-clip-padding px-3 py-4 text-base font-normal leading-tight text-neutral-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-primary focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:shadow-te-primary focus:outline-none peer-focus:text-primary dark:border-neutral-600 dark:text-neutral-200 dark:focus:border-primary dark:peer-focus:text-primary [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem] bg-",id:"password",placeholder:"Password","onUpdate:modelValue":t[1]||(t[1]=c=>r.password=c)},null,8,$K),[[t$,r.password]]),Be("div",HK,[Be("input",{type:"checkbox",id:"showPassword",onChange:t[2]||(t[2]=(...c)=>r.showHidePassword&&r.showHidePassword(...c))},null,32),KK]),WK]),Be("span",GK,[Je(a,{onClick:Gk(r.emitUser,["prevent"]),class:"font-semibold"},{default:Er(()=>[zo(Ep(r.buttonPrimary),1)]),_:1},8,["onClick"])]),Be("span",zK,[Je(a,{onClick:Gk(r.switchText,["prevent"]),class:"font-semibold"},{default:Er(()=>[zo(Ep(r.buttonSecondary),1)]),_:1},8,["onClick"])])])}const YK=Vi(jK,[["render",QK]]);const XK={},JK={class:"text-base text-red-600"};function ZK(e,t){return pn(),ir("div",null,[Je(L0,{name:"message"},{default:Er(()=>[Be("p",JK,[Mv(e.$slots,"default",{},void 0,!0)])]),_:3})])}const eW=Vi(XK,[["render",ZK],["__scopeId","data-v-e583e2cf"]]);var eb=function(e,t){return eb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},eb(e,t)};function te(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");eb(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _e=function(){return _e=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0&&s[s.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function gn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(c){a={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s}function xe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r>6|192,t[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},iW=function(e){for(var t=[],n=0,r=0;n191&&i<224){var s=e[n++];t[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){var s=e[n++],a=e[n++],c=e[n++],l=((i&7)<<18|(s&63)<<12|(a&63)<<6|c&63)-65536;t[r++]=String.fromCharCode(55296+(l>>10)),t[r++]=String.fromCharCode(56320+(l&1023))}else{var s=e[n++],a=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|a&63)}}return t.join("")},Kv={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i>2,v=(s&3)<<4|c>>4,g=(c&15)<<2|h>>6,y=h&63;l||(y=64,a||(g=64)),r.push(n[d],n[v],n[g],n[y])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(oP(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):iW(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i>4;if(r.push(g),h!==64){var y=c<<4&240|h>>2;if(r.push(y),v!==64){var _=h<<6&192|v;r.push(_)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},sP=function(e){var t=oP(e);return Kv.encodeByteArray(t,!0)},T1=function(e){return sP(e).replace(/\./g,"")},I1=function(e){try{return Kv.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/** + */var oP=function(e){for(var t=[],n=0,r=0;r>6|192,t[n++]=i&63|128):(i&64512)===55296&&r+1>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},tW=function(e){for(var t=[],n=0,r=0;n191&&i<224){var s=e[n++];t[r++]=String.fromCharCode((i&31)<<6|s&63)}else if(i>239&&i<365){var s=e[n++],a=e[n++],c=e[n++],l=((i&7)<<18|(s&63)<<12|(a&63)<<6|c&63)-65536;t[r++]=String.fromCharCode(55296+(l>>10)),t[r++]=String.fromCharCode(56320+(l&1023))}else{var s=e[n++],a=e[n++];t[r++]=String.fromCharCode((i&15)<<12|(s&63)<<6|a&63)}}return t.join("")},Kv={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray:function(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();for(var n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[],i=0;i>2,v=(s&3)<<4|c>>4,g=(c&15)<<2|h>>6,y=h&63;l||(y=64,a||(g=64)),r.push(n[d],n[v],n[g],n[y])}return r.join("")},encodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(oP(e),t)},decodeString:function(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):tW(this.decodeStringToByteArray(e,t))},decodeStringToByteArray:function(e,t){this.init_();for(var n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[],i=0;i>4;if(r.push(g),h!==64){var y=c<<4&240|h>>2;if(r.push(y),v!==64){var _=h<<6&192|v;r.push(_)}}}return r},init_:function(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(var e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}},sP=function(e){var t=oP(e);return Kv.encodeByteArray(t,!0)},T1=function(e){return sP(e).replace(/\./g,"")},I1=function(e){try{return Kv.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};/** * @license * Copyright 2017 Google LLC * @@ -62,7 +62,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function aP(e){return bf(void 0,e)}function bf(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:var n=t;return new Date(n.getTime());case Object:e===void 0&&(e={});break;case Array:e=[];break;default:return t}for(var r in t)!t.hasOwnProperty(r)||!oW(r)||(e[r]=bf(e[r],t[r]));return e}function oW(e){return e!=="__proto__"}/** + */function aP(e){return Ef(void 0,e)}function Ef(e,t){if(!(t instanceof Object))return t;switch(t.constructor){case Date:var n=t;return new Date(n.getTime());case Object:e===void 0&&(e={});break;case Array:e=[];break;default:return t}for(var r in t)!t.hasOwnProperty(r)||!nW(r)||(e[r]=Ef(e[r],t[r]));return e}function nW(e){return e!=="__proto__"}/** * @license * Copyright 2017 Google LLC * @@ -77,7 +77,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var on=function(){function e(){var t=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(n,r){t.resolve=n,t.reject=r})}return e.prototype.wrapCallback=function(t){var n=this;return function(r,i){r?n.reject(r):n.resolve(i),typeof t=="function"&&(n.promise.catch(function(){}),t.length===1?t(r):t(r,i))}},e}();/** + */var rn=function(){function e(){var t=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(n,r){t.resolve=n,t.reject=r})}return e.prototype.wrapCallback=function(t){var n=this;return function(r,i){r?n.reject(r):n.resolve(i),typeof t=="function"&&(n.promise.catch(function(){}),t.length===1?t(r):t(r,i))}},e}();/** * @license * Copyright 2021 Google LLC * @@ -107,7 +107,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function da(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function G0(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(da())}function uP(){try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function sW(){return typeof self=="object"&&self.self===self}function z0(){var e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function cP(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function aW(){return da().indexOf("Electron/")>=0}function uW(){var e=da();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function cW(){return da().indexOf("MSAppHost/")>=0}function lP(){return iP.NODE_ADMIN===!0}function lW(){return!uP()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function Jf(){return"indexedDB"in self&&indexedDB!=null}function Q0(){return new Promise(function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var s;t(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(s){t(s)}})}function fP(){return!(!navigator||!navigator.cookieEnabled)}function fW(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** + */function da(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function G0(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(da())}function uP(){try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function rW(){return typeof self=="object"&&self.self===self}function z0(){var e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function cP(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function iW(){return da().indexOf("Electron/")>=0}function oW(){var e=da();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function sW(){return da().indexOf("MSAppHost/")>=0}function lP(){return iP.NODE_ADMIN===!0}function aW(){return!uP()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function Zf(){return"indexedDB"in self&&indexedDB!=null}function Q0(){return new Promise(function(e,t){try{var n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=function(){i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=function(){n=!1},i.onerror=function(){var s;t(((s=i.error)===null||s===void 0?void 0:s.message)||"")}}catch(s){t(s)}})}function fP(){return!(!navigator||!navigator.cookieEnabled)}function uW(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/** * @license * Copyright 2017 Google LLC * @@ -122,7 +122,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var hW="FirebaseError",Sc=function(e){te(t,e);function t(n,r,i){var s=e.call(this,r)||this;return s.code=n,s.customData=i,s.name=hW,Object.setPrototypeOf(s,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,mo.prototype.create),s}return t}(Error),mo=function(){function e(t,n,r){this.service=t,this.serviceName=n,this.errors=r}return e.prototype.create=function(t){for(var n=[],r=1;r"})}var pW=/\{\$([^}]+)}/g;/** + */var cW="FirebaseError",Sc=function(e){te(t,e);function t(n,r,i){var s=e.call(this,r)||this;return s.code=n,s.customData=i,s.name=cW,Object.setPrototypeOf(s,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,go.prototype.create),s}return t}(Error),go=function(){function e(t,n,r){this.service=t,this.serviceName=n,this.errors=r}return e.prototype.create=function(t){for(var n=[],r=1;r"})}var fW=/\{\$([^}]+)}/g;/** * @license * Copyright 2017 Google LLC * @@ -137,7 +137,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Ef(e){return JSON.parse(e)}function Kt(e){return JSON.stringify(e)}/** + */function Tf(e){return JSON.parse(e)}function Kt(e){return JSON.stringify(e)}/** * @license * Copyright 2017 Google LLC * @@ -152,7 +152,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Y0=function(e){var t={},n={},r={},i="";try{var s=e.split(".");t=Ef(I1(s[0])||""),n=Ef(I1(s[1])||""),i=s[2],r=n.d||{},delete n.d}catch{}return{header:t,claims:n,data:r,signature:i}},vW=function(e){var t=Y0(e).claims;return typeof t=="object"&&t.hasOwnProperty("iat")?t.iat:null},gW=function(e){var t=Y0(e),n=t.claims;return!!n&&typeof n=="object"&&n.hasOwnProperty("iat")},mW=function(e){var t=Y0(e).claims;return typeof t=="object"&&t.admin===!0};/** + */var Y0=function(e){var t={},n={},r={},i="";try{var s=e.split(".");t=Tf(I1(s[0])||""),n=Tf(I1(s[1])||""),i=s[2],r=n.d||{},delete n.d}catch{}return{header:t,claims:n,data:r,signature:i}},hW=function(e){var t=Y0(e).claims;return typeof t=="object"&&t.hasOwnProperty("iat")?t.iat:null},dW=function(e){var t=Y0(e),n=t.claims;return!!n&&typeof n=="object"&&n.hasOwnProperty("iat")},pW=function(e){var t=Y0(e).claims;return typeof t=="object"&&t.admin===!0};/** * @license * Copyright 2017 Google LLC * @@ -182,7 +182,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function yW(e){for(var t=[],n=function(l,h){Array.isArray(h)?h.forEach(function(d){t.push(encodeURIComponent(l)+"="+encodeURIComponent(d))}):t.push(encodeURIComponent(l)+"="+encodeURIComponent(h))},r=0,i=Object.entries(e);r>>31)&4294967295}for(var a=this.chain_[0],c=this.chain_[1],l=this.chain_[2],h=this.chain_[3],d=this.chain_[4],v,g,i=0;i<80;i++){i<40?i<20?(v=h^c&(l^h),g=1518500249):(v=c^l^h,g=1859775393):i<60?(v=c&l|h&(c|l),g=2400959708):(v=c^l^h,g=3395469782);var s=(a<<5|a>>>27)+v+d+g+r[i]&4294967295;d=h,h=l,l=(c<<30|c>>>2)&4294967295,c=a,a=s}this.chain_[0]=this.chain_[0]+a&4294967295,this.chain_[1]=this.chain_[1]+c&4294967295,this.chain_[2]=this.chain_[2]+l&4294967295,this.chain_[3]=this.chain_[3]+h&4294967295,this.chain_[4]=this.chain_[4]+d&4294967295},e.prototype.update=function(t,n){if(t!=null){n===void 0&&(n=t.length);for(var r=n-this.blockSize,i=0,s=this.buf_,a=this.inbuf_;i=56;r--)this.buf_[r]=n&255,n/=256;this.compress_(this.buf_);for(var i=0,r=0;r<5;r++)for(var s=24;s>=0;s-=8)t[i]=this.chain_[r]>>s&255,++i;return t},e}();function wW(e,t){var n=new bW(e,t);return n.subscribe.bind(n)}var bW=function(){function e(t,n){var r=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(function(){t(r)}).catch(function(i){r.error(i)})}return e.prototype.next=function(t){this.forEachObserver(function(n){n.next(t)})},e.prototype.error=function(t){this.forEachObserver(function(n){n.error(t)}),this.close(t)},e.prototype.complete=function(){this.forEachObserver(function(t){t.complete()}),this.close()},e.prototype.subscribe=function(t,n,r){var i=this,s;if(t===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");EW(t,["next","error","complete"])?s=t:s={next:t,error:n,complete:r},s.next===void 0&&(s.next=$_),s.error===void 0&&(s.error=$_),s.complete===void 0&&(s.complete=$_);var a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?s.error(i.finalError):s.complete()}catch{}}),this.observers.push(s),a},e.prototype.unsubscribeOne=function(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))},e.prototype.forEachObserver=function(t){if(!this.finalized)for(var n=0;n>>31)&4294967295}for(var a=this.chain_[0],c=this.chain_[1],l=this.chain_[2],h=this.chain_[3],d=this.chain_[4],v,g,i=0;i<80;i++){i<40?i<20?(v=h^c&(l^h),g=1518500249):(v=c^l^h,g=1859775393):i<60?(v=c&l|h&(c|l),g=2400959708):(v=c^l^h,g=3395469782);var s=(a<<5|a>>>27)+v+d+g+r[i]&4294967295;d=h,h=l,l=(c<<30|c>>>2)&4294967295,c=a,a=s}this.chain_[0]=this.chain_[0]+a&4294967295,this.chain_[1]=this.chain_[1]+c&4294967295,this.chain_[2]=this.chain_[2]+l&4294967295,this.chain_[3]=this.chain_[3]+h&4294967295,this.chain_[4]=this.chain_[4]+d&4294967295},e.prototype.update=function(t,n){if(t!=null){n===void 0&&(n=t.length);for(var r=n-this.blockSize,i=0,s=this.buf_,a=this.inbuf_;i=56;r--)this.buf_[r]=n&255,n/=256;this.compress_(this.buf_);for(var i=0,r=0;r<5;r++)for(var s=24;s>=0;s-=8)t[i]=this.chain_[r]>>s&255,++i;return t},e}();function mW(e,t){var n=new yW(e,t);return n.subscribe.bind(n)}var yW=function(){function e(t,n){var r=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(function(){t(r)}).catch(function(i){r.error(i)})}return e.prototype.next=function(t){this.forEachObserver(function(n){n.next(t)})},e.prototype.error=function(t){this.forEachObserver(function(n){n.error(t)}),this.close(t)},e.prototype.complete=function(){this.forEachObserver(function(t){t.complete()}),this.close()},e.prototype.subscribe=function(t,n,r){var i=this,s;if(t===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");_W(t,["next","error","complete"])?s=t:s={next:t,error:n,complete:r},s.next===void 0&&(s.next=$_),s.error===void 0&&(s.error=$_),s.complete===void 0&&(s.complete=$_);var a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?s.error(i.finalError):s.complete()}catch{}}),this.observers.push(s),a},e.prototype.unsubscribeOne=function(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))},e.prototype.forEachObserver=function(t){if(!this.finalized)for(var n=0;nn&&(i=n===0?"none":"no more than "+n),i){var s=e+" failed: Was called with "+r+(r===1?" argument.":" arguments.")+" Expects "+i+".";throw new Error(s)}};function cr(e,t){return e+" failed: "+t+" argument "}function Jt(e,t,n,r){if(!(r&&!n)&&typeof n!="function")throw new Error(cr(e,t)+"must be a valid function.")}function S1(e,t,n,r){if(!(r&&!n)&&(typeof n!="object"||n===null))throw new Error(cr(e,t)+"must be a valid context object.")}/** + */var we=function(e,t,n,r){var i;if(rn&&(i=n===0?"none":"no more than "+n),i){var s=e+" failed: Was called with "+r+(r===1?" argument.":" arguments.")+" Expects "+i+".";throw new Error(s)}};function ur(e,t){return e+" failed: "+t+" argument "}function Jt(e,t,n,r){if(!(r&&!n)&&typeof n!="function")throw new Error(ur(e,t)+"must be a valid function.")}function S1(e,t,n,r){if(!(r&&!n)&&(typeof n!="object"||n===null))throw new Error(ur(e,t)+"must be a valid context object.")}/** * @license * Copyright 2017 Google LLC * @@ -227,7 +227,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var TW=function(e){for(var t=[],n=0,r=0;r=55296&&i<=56319){var s=i-55296;r++,G(r>6|192,t[n++]=i&63|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},Wv=function(e){for(var t=0,n=0;n=55296&&r<=56319?(t+=4,n++):t+=3}return t};/** + */var wW=function(e){for(var t=[],n=0,r=0;r=55296&&i<=56319){var s=i-55296;r++,G(r>6|192,t[n++]=i&63|128):i<65536?(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=i&63|128):(t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=i&63|128)}return t},Wv=function(e){for(var t=0,n=0;n=55296&&r<=56319?(t+=4,n++):t+=3}return t};/** * @license * Copyright 2019 Google LLC * @@ -242,7 +242,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var IW=1e3,SW=2,CW=4*60*60*1e3,AW=.5;function nb(e,t,n){t===void 0&&(t=IW),n===void 0&&(n=SW);var r=t*Math.pow(n,e),i=Math.round(AW*r*(Math.random()-.5)*2);return Math.min(CW,r+i)}/** + */var bW=1e3,EW=2,TW=4*60*60*1e3,IW=.5;function nb(e,t,n){t===void 0&&(t=bW),n===void 0&&(n=EW);var r=t*Math.pow(n,e),i=Math.round(IW*r*(Math.random()-.5)*2);return Math.min(TW,r+i)}/** * @license * Copyright 2021 Google LLC * @@ -257,7 +257,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Ne(e){return e&&e._delegate?e._delegate:e}var On=function(){function e(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},e.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},e.prototype.setServiceProps=function(t){return this.serviceProps=t,this},e.prototype.setInstanceCreatedCallback=function(t){return this.onInstanceCreated=t,this},e}();/** + */function Ne(e){return e&&e._delegate?e._delegate:e}var xn=function(){function e(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(t){return this.instantiationMode=t,this},e.prototype.setMultipleInstances=function(t){return this.multipleInstances=t,this},e.prototype.setServiceProps=function(t){return this.serviceProps=t,this},e.prototype.setInstanceCreatedCallback=function(t){return this.onInstanceCreated=t,this},e}();/** * @license * Copyright 2019 Google LLC * @@ -287,7 +287,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var hP=function(){function e(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return e.prototype.get=function(t){var n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){var r=new on;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{var i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise},e.prototype.getImmediate=function(t){var n,r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error("Service "+this.name+" is not available")}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(t){var n,r;if(t.name!==this.name)throw Error("Mismatching Component "+t.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=t,!!this.shouldAutoInitialize()){if(RW(t))try{this.getOrInitializeService({instanceIdentifier:js})}catch{}try{for(var i=an(this.instancesDeferred.entries()),s=i.next();!s.done;s=i.next()){var a=gn(s.value,2),c=a[0],l=a[1],h=this.normalizeInstanceIdentifier(c);try{var d=this.getOrInitializeService({instanceIdentifier:h});l.resolve(d)}catch{}}}catch(v){n={error:v}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},e.prototype.clearInstance=function(t){t===void 0&&(t=js),this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)},e.prototype.delete=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(xe(xe([],gn(t.filter(function(r){return"INTERNAL"in r}).map(function(r){return r.INTERNAL.delete()}))),gn(t.filter(function(r){return"_delete"in r}).map(function(r){return r._delete()}))))];case 1:return n.sent(),[2]}})})},e.prototype.isComponentSet=function(){return this.component!=null},e.prototype.isInitialized=function(t){return t===void 0&&(t=js),this.instances.has(t)},e.prototype.getOptions=function(t){return t===void 0&&(t=js),this.instancesOptions.get(t)||{}},e.prototype.initialize=function(t){var n,r;t===void 0&&(t={});var i=t.options,s=i===void 0?{}:i,a=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(a))throw Error(this.name+"("+a+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var c=this.getOrInitializeService({instanceIdentifier:a,options:s});try{for(var l=an(this.instancesDeferred.entries()),h=l.next();!h.done;h=l.next()){var d=gn(h.value,2),v=d[0],g=d[1],y=this.normalizeInstanceIdentifier(v);a===y&&g.resolve(c)}}catch(_){n={error:_}}finally{try{h&&!h.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return c},e.prototype.onInit=function(t,n){var r,i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(t),this.onInitCallbacks.set(i,s);var a=this.instances.get(i);return a&&t(a,i),function(){s.delete(t)}},e.prototype.invokeOnInitCallbacks=function(t,n){var r,i,s=this.onInitCallbacks.get(n);if(s)try{for(var a=an(s),c=a.next();!c.done;c=a.next()){var l=c.value;try{l(t,n)}catch{}}}catch(h){r={error:h}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},e.prototype.getOrInitializeService=function(t){var n=t.instanceIdentifier,r=t.options,i=r===void 0?{}:r,s=this.instances.get(n);if(!s&&this.component&&(s=this.component.instanceFactory(this.container,{instanceIdentifier:kW(n),options:i}),this.instances.set(n,s),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(s,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,s)}catch{}return s||null},e.prototype.normalizeInstanceIdentifier=function(t){return t===void 0&&(t=js),this.component?this.component.multipleInstances?t:js:t},e.prototype.shouldAutoInitialize=function(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"},e}();function kW(e){return e===js?void 0:e}function RW(e){return e.instantiationMode==="EAGER"}/** + */var hP=function(){function e(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}return e.prototype.get=function(t){var n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){var r=new rn;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{var i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise},e.prototype.getImmediate=function(t){var n,r=this.normalizeInstanceIdentifier(t==null?void 0:t.identifier),i=(n=t==null?void 0:t.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(s){if(i)return null;throw s}else{if(i)return null;throw Error("Service "+this.name+" is not available")}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(t){var n,r;if(t.name!==this.name)throw Error("Mismatching Component "+t.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=t,!!this.shouldAutoInitialize()){if(CW(t))try{this.getOrInitializeService({instanceIdentifier:js})}catch{}try{for(var i=sn(this.instancesDeferred.entries()),s=i.next();!s.done;s=i.next()){var a=gn(s.value,2),c=a[0],l=a[1],h=this.normalizeInstanceIdentifier(c);try{var d=this.getOrInitializeService({instanceIdentifier:h});l.resolve(d)}catch{}}}catch(v){n={error:v}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},e.prototype.clearInstance=function(t){t===void 0&&(t=js),this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)},e.prototype.delete=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return t=Array.from(this.instances.values()),[4,Promise.all(xe(xe([],gn(t.filter(function(r){return"INTERNAL"in r}).map(function(r){return r.INTERNAL.delete()}))),gn(t.filter(function(r){return"_delete"in r}).map(function(r){return r._delete()}))))];case 1:return n.sent(),[2]}})})},e.prototype.isComponentSet=function(){return this.component!=null},e.prototype.isInitialized=function(t){return t===void 0&&(t=js),this.instances.has(t)},e.prototype.getOptions=function(t){return t===void 0&&(t=js),this.instancesOptions.get(t)||{}},e.prototype.initialize=function(t){var n,r;t===void 0&&(t={});var i=t.options,s=i===void 0?{}:i,a=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(a))throw Error(this.name+"("+a+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var c=this.getOrInitializeService({instanceIdentifier:a,options:s});try{for(var l=sn(this.instancesDeferred.entries()),h=l.next();!h.done;h=l.next()){var d=gn(h.value,2),v=d[0],g=d[1],y=this.normalizeInstanceIdentifier(v);a===y&&g.resolve(c)}}catch(_){n={error:_}}finally{try{h&&!h.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return c},e.prototype.onInit=function(t,n){var r,i=this.normalizeInstanceIdentifier(n),s=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;s.add(t),this.onInitCallbacks.set(i,s);var a=this.instances.get(i);return a&&t(a,i),function(){s.delete(t)}},e.prototype.invokeOnInitCallbacks=function(t,n){var r,i,s=this.onInitCallbacks.get(n);if(s)try{for(var a=sn(s),c=a.next();!c.done;c=a.next()){var l=c.value;try{l(t,n)}catch{}}}catch(h){r={error:h}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}},e.prototype.getOrInitializeService=function(t){var n=t.instanceIdentifier,r=t.options,i=r===void 0?{}:r,s=this.instances.get(n);if(!s&&this.component&&(s=this.component.instanceFactory(this.container,{instanceIdentifier:SW(n),options:i}),this.instances.set(n,s),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(s,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,s)}catch{}return s||null},e.prototype.normalizeInstanceIdentifier=function(t){return t===void 0&&(t=js),this.component?this.component.multipleInstances?t:js:t},e.prototype.shouldAutoInitialize=function(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"},e}();function SW(e){return e===js?void 0:e}function CW(e){return e.instantiationMode==="EAGER"}/** * @license * Copyright 2019 Google LLC * @@ -330,7 +330,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Us,X0=[],Le;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Le||(Le={}));var pP={debug:Le.DEBUG,verbose:Le.VERBOSE,info:Le.INFO,warn:Le.WARN,error:Le.ERROR,silent:Le.SILENT},NW=Le.INFO,xW=(Us={},Us[Le.DEBUG]="log",Us[Le.VERBOSE]="log",Us[Le.INFO]="info",Us[Le.WARN]="warn",Us[Le.ERROR]="error",Us),OW=function(e,t){for(var n=[],r=2;r=(c??l.logLevel)&&e({level:Le[h].toLowerCase(),message:g,args:d,type:l.name})}},r=0,i=X0;r=(c??l.logLevel)&&e({level:Le[h].toLowerCase(),message:g,args:d,type:l.name})}},r=0,i=X0;r=0&&Wu.warn(` Warning: You are trying to load Firebase while using Firebase Performance standalone script. You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code. - `)}var tG=J0.initializeApp;J0.initializeApp=function(){for(var e=[],t=0;t>>0),O=0;function L(o,u,f){return o.call.apply(o.bind,arguments)}function $(o,u,f){if(!o)throw Error();if(2o.b&&(o.b++,u.next=o.a,o.a=u)}function $i(){this.b=this.a=null}var Kc=new Ln(function(){return new ie},function(o){o.reset()});$i.prototype.add=function(o,u){var f=Kc.get();f.set(o,u),this.b?this.b.next=f:this.a=f,this.b=f};function B(){var o=GI,u=null;return o.a&&(u=o.a,o.a=o.a.next,o.a||(o.b=null),u.next=null),u}function ie(){this.next=this.b=this.a=null}ie.prototype.set=function(o,u){this.a=o,this.b=u,this.next=null},ie.prototype.reset=function(){this.next=this.b=this.a=null};var ne=Array.prototype.indexOf?function(o,u){return Array.prototype.indexOf.call(o,u,void 0)}:function(o,u){if(typeof o=="string")return typeof u!="string"||u.length!=1?-1:o.indexOf(u,0);for(var f=0;fu?null:typeof o=="string"?o.charAt(u):o[u]}function M(o,u){return 0<=ne(o,u)}function j(o,u){u=ne(o,u);var f;return(f=0<=u)&&Array.prototype.splice.call(o,u,1),f}function V(o,u){var f=0;$e(o,function(p,m){u.call(void 0,p,m,o)&&Array.prototype.splice.call(o,m,1).length==1&&f++})}function Q(o){return Array.prototype.concat.apply([],arguments)}function J(o){var u=o.length;if(0/g,fe=/"/g,ve=/'/g,Ee=/\x00/g,Me=/[\x00&<>"']/;function ye(o,u){return o.indexOf(u)!=-1}function We(o,u){return ou?1:0}var ct;e:{var Zn=l.navigator;if(Zn){var Hi=Zn.userAgent;if(Hi){ct=Hi;break e}}ct=""}function It(o){return ye(ct,o)}function bo(o,u){for(var f in o)u.call(void 0,o[f],f,o)}function pi(o){for(var u in o)return!1;return!0}function St(o){var u={},f;for(f in o)u[f]=o[f];return u}var vr="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function ln(o,u){for(var f,p,m=1;m"}else w=o===void 0?"undefined":o===null?"null":typeof o;Jn("Argument is not a %s (or a non-Element, non-Location mock); got: %s",u,w)}}function vi(o,u){this.a=o===Nh&&u||"",this.b=kI}vi.prototype.ta=!0,vi.prototype.sa=function(){return this.a},vi.prototype.toString=function(){return"Const{"+this.a+"}"};function tm(o){return o instanceof vi&&o.constructor===vi&&o.b===kI?o.a:(Jn("expected object of type Const, got '"+o+"'"),"type_error:Const")}var kI={},Nh={},xh;function RI(){if(xh===void 0){var o=null,u=l.trustedTypes;if(u&&u.createPolicy){try{o=u.createPolicy("goog#html",{createHTML:oe,createScript:oe,createScriptURL:oe})}catch(f){l.console&&l.console.error(f.message)}xh=o}else xh=o}return xh}function $a(o,u){this.a=u===xI?o:""}$a.prototype.ta=!0,$a.prototype.sa=function(){return this.a.toString()},$a.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};function NI(o){return o instanceof $a&&o.constructor===$a?o.a:(Jn("expected object of type TrustedResourceUrl, got '"+o+"' of type "+y(o)),"type_error:TrustedResourceUrl")}function nm(o,u){var f=tm(o);if(!NU.test(f))throw Error("Invalid TrustedResourceUrl format: "+f);return o=f.replace(RU,function(p,m){if(!Object.prototype.hasOwnProperty.call(u,m))throw Error('Found marker, "'+m+'", in format string, "'+f+'", but no valid label mapping found in args: '+JSON.stringify(u));return p=u[m],p instanceof vi?tm(p):encodeURIComponent(String(p))}),xU(o)}var RU=/%{(\w+)}/g,NU=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,xI={};function xU(o){var u=RI();return o=u?u.createScriptURL(o):o,new $a(o,xI)}function er(o,u){this.a=u===Wc?o:""}er.prototype.ta=!0,er.prototype.sa=function(){return this.a.toString()},er.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};function Oh(o){return o instanceof er&&o.constructor===er?o.a:(Jn("expected object of type SafeUrl, got '"+o+"' of type "+y(o)),"type_error:SafeUrl")}var OU=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,PU=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,OI=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function PI(o){if(o instanceof er)return o;if(o=typeof o=="object"&&o.ta?o.sa():String(o),OI.test(o))o=new er(o,Wc);else{o=String(o),o=o.replace(/(%0A|%0D)/g,"");var u=o.match(PU);o=u&&OU.test(u[1])?new er(o,Wc):null}return o}function DI(o){return o instanceof er?o:(o=typeof o=="object"&&o.ta?o.sa():String(o),OI.test(o)||(o="about:invalid#zClosurez"),new er(o,Wc))}var Wc={},MI=new er("about:invalid#zClosurez",Wc);function Ha(o,u,f){this.a=f===LI?o:""}Ha.prototype.ta=!0,Ha.prototype.sa=function(){return this.a.toString()},Ha.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};function DU(o){return o instanceof Ha&&o.constructor===Ha?o.a:(Jn("expected object of type SafeHtml, got '"+o+"' of type "+y(o)),"type_error:SafeHtml")}var LI={};function MU(o,u){AI(o,"HTMLScriptElement"),o.src=NI(u),(u=o.ownerDocument&&o.ownerDocument.defaultView)&&u!=l?u=v(u.document):(d===null&&(d=v(l.document)),u=d),u&&o.setAttribute("nonce",u)}function FI(o,u,f,p){return o=o instanceof er?o:DI(o),u=u||l,f=f instanceof vi?tm(f):f||"",u.open(Oh(o),f,p,void 0)}function UI(o,u){for(var f=o.split("%s"),p="",m=Array.prototype.slice.call(arguments,1);m.length&&1")!=-1&&(o=o.replace(pe,">")),o.indexOf('"')!=-1&&(o=o.replace(fe,""")),o.indexOf("'")!=-1&&(o=o.replace(ve,"'")),o.indexOf("\0")!=-1&&(o=o.replace(Ee,"�"))),o}function im(o){return im[" "](o),o}im[" "]=g;function LU(o,u){var f=VU;return Object.prototype.hasOwnProperty.call(f,o)?f[o]:f[o]=u(o)}var FU=It("Opera"),Gr=It("Trident")||It("MSIE"),jI=It("Edge"),UU=jI||Gr,VI=It("Gecko")&&!(ye(ct.toLowerCase(),"webkit")&&!It("Edge"))&&!(It("Trident")||It("MSIE"))&&!It("Edge"),jU=ye(ct.toLowerCase(),"webkit")&&!It("Edge");function BI(){var o=l.document;return o?o.documentMode:void 0}var Ph;e:{var om="",sm=function(){var o=ct;if(VI)return/rv:([^\);]+)(\)|;)/.exec(o);if(jI)return/Edge\/([\d\.]+)/.exec(o);if(Gr)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(o);if(jU)return/WebKit\/(\S+)/.exec(o);if(FU)return/(?:Version)[ \/]?(\S+)/.exec(o)}();if(sm&&(om=sm?sm[1]:""),Gr){var am=BI();if(am!=null&&am>parseFloat(om)){Ph=String(am);break e}}Ph=om}var VU={};function qI(o){return LU(o,function(){for(var u=0,f=z(String(Ph)).split("."),p=z(String(o)).split("."),m=Math.max(f.length,p.length),w=0;u==0&&w"),w=w.join("")}return w=Dh(m,w),E&&(typeof E=="string"?w.className=E:Array.isArray(E)?w.className=E.join(" "):HI(w,E)),2"u"&&typeof window<"u"&&window.postMessage&&window.addEventListener&&!It("Presto")&&(o=function(){var m=Dh(document,"IFRAME");m.style.display="none",document.documentElement.appendChild(m);var w=m.contentWindow;m=w.document,m.open(),m.close();var E="callImmediate"+Math.random(),S=w.location.protocol=="file:"?"*":w.location.protocol+"//"+w.location.host;m=P(function(U){(S=="*"||U.origin==S)&&U.data==E&&this.port1.onmessage()},this),w.addEventListener("message",m,!1),this.port1={},this.port2={postMessage:function(){w.postMessage(E,S)}}}),typeof o<"u"&&!It("Trident")&&!It("MSIE")){var u=new o,f={},p=f;return u.port1.onmessage=function(){if(f.next!==void 0){f=f.next;var m=f.Hb;f.Hb=null,m()}},function(m){p.next={Hb:m},p=p.next,u.port2.postMessage(0)}}return function(m){l.setTimeout(m,0)}}function Mh(o,u){Lh||KU(),lm||(Lh(),lm=!0),GI.add(o,u)}var Lh;function KU(){if(l.Promise&&l.Promise.resolve){var o=l.Promise.resolve(void 0);Lh=function(){o.then(zI)}}else Lh=function(){var u=zI;!b(l.setImmediate)||l.Window&&l.Window.prototype&&!It("Edge")&&l.Window.prototype.setImmediate==l.setImmediate?(cm||(cm=HU()),cm(u)):l.setImmediate(u)}}var lm=!1,GI=new $i;function zI(){for(var o;o=B();){try{o.a.call(o.b)}catch(u){WI(u)}cn(Kc,o)}lm=!1}function Fe(o,u){if(this.a=vs,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,o!=g)try{var f=this;o.call(u,function(p){gs(f,zc,p)},function(p){if(!(p instanceof Ka))try{throw p instanceof Error?p:Error("Promise rejected.")}catch{}gs(f,Ki,p)})}catch(p){gs(this,Ki,p)}}var vs=0,zc=2,Ki=3;function QI(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}QI.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var YI=new Ln(function(){return new QI},function(o){o.reset()});function fm(o,u,f){var p=YI.get();return p.g=o,p.b=u,p.f=f,p}function me(o){if(o instanceof Fe)return o;var u=new Fe(g);return gs(u,zc,o),u}function mt(o){return new Fe(function(u,f){f(o)})}function XI(o,u,f){tS(o,u,f,null)||Mh(re(u,o))}function WU(o){return new Fe(function(u,f){var p=o.length,m=[];if(p)for(var w=function(q,Te){p--,m[q]=Te,p==0&&u(m)},E=function(q){f(q)},S=0,U;S=o.keyCode)&&(o.keyCode=-1)}catch{}},ms.prototype.g=function(){return this.a};var Qc="closure_listenable_"+(1e6*Math.random()|0),ej=0;function tj(o,u,f,p,m){this.listener=o,this.proxy=null,this.src=u,this.type=f,this.capture=!!p,this.Wa=m,this.key=++ej,this.wa=this.Qa=!1}function Uh(o){o.wa=!0,o.listener=null,o.proxy=null,o.src=null,o.Wa=null}function jh(o){this.src=o,this.a={},this.b=0}jh.prototype.add=function(o,u,f,p,m){var w=o.toString();o=this.a[w],o||(o=this.a[w]=[],this.b++);var E=pm(o,u,p,m);return-1p.keyCode||p.returnValue!=null)){e:{var m=!1;if(p.keyCode==0)try{p.keyCode=-1;break e}catch{m=!0}(m||p.returnValue==null)&&(p.returnValue=!0)}for(p=[],m=u.b;m;m=m.parentNode)p.push(m);for(o=o.type,m=p.length-1;0<=m;m--){u.b=p[m];var w=hS(p[m],o,!0,u);f=f&&w}for(m=0;m>>0);function _m(o){return b(o)?o:(o[ym]||(o[ym]=function(u){return o.handleEvent(u)}),o[ym])}function Fn(){Fh.call(this),this.v=new jh(this),this.bc=this,this.hb=null}F(Fn,Fh),Fn.prototype[Qc]=!0,Fn.prototype.addEventListener=function(o,u,f,p){Nr(this,o,u,f,p)},Fn.prototype.removeEventListener=function(o,u,f,p){gr(this,o,u,f,p)},Fn.prototype.dispatchEvent=function(o){var u,f=this.hb;if(f)for(u=[];f;f=f.hb)u.push(f);f=this.bc;var p=o.type||o;if(typeof o=="string")o=new tr(o,f);else if(o instanceof tr)o.target=o.target||f;else{var m=o;o=new tr(p,f),ln(o,m)}if(m=!0,u)for(var w=u.length-1;0<=w;w--){var E=o.b=u[w];m=Bh(E,p,!0,o)&&m}if(E=o.b=f,m=Bh(E,p,!0,o)&&m,m=Bh(E,p,!1,o)&&m,u)for(w=0;wu)throw Error("Bad port number "+u);o.g=u}else o.g=null}function Tm(o,u,f){u instanceof _s?(o.b=u,fj(o.b,o.i)):(f||(u=Zc(u,cj)),o.b=new _s(u,o.i))}function Nt(o,u,f){o.b.set(u,f)}function xr(o,u){return o.b.get(u)}function nr(o){return o instanceof To?new To(o):new To(o,void 0)}function qh(o,u,f,p){var m=new To(null,void 0);return o&&Yc(m,o),u&&(m.a=u),f&&Xc(m,f),p&&(m.f=p),m}function Jc(o,u){return o?u?decodeURI(o.replace(/%25/g,"%2525")):decodeURIComponent(o):""}function Zc(o,u,f){return typeof o=="string"?(o=encodeURI(o).replace(u,sj),f&&(o=o.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),o):null}function sj(o){return o=o.charCodeAt(0),"%"+(o>>4&15).toString(16)+(o&15).toString(16)}var yS=/[#\/\?@]/g,aj=/[#\?:]/g,uj=/[#\?]/g,cj=/[#\?@]/g,lj=/#/g;function _s(o,u){this.b=this.a=null,this.c=o||null,this.f=!!u}function Io(o){o.a||(o.a=new Ga,o.b=0,o.c&&oj(o.c,function(u,f){o.add(decodeURIComponent(u.replace(/\+/g," ")),f)}))}function _S(o){var u=gS(o);if(typeof u>"u")throw Error("Keys are undefined");var f=new _s(null,void 0);o=vS(o);for(var p=0;p2*o.c&&Em(o)))}e.clear=function(){this.a=this.c=null,this.b=0};function Im(o,u){return Io(o),u=za(o,u),ys(o.a.b,u)}e.forEach=function(o,u){Io(this),this.a.forEach(function(f,p){Z(f,function(m){o.call(u,m,p,this)},this)},this)},e.Y=function(){Io(this);for(var o=this.a.X(),u=this.a.Y(),f=[],p=0;po?!1:!Gr||!Eo||9',o=(p=RI())?p.createHTML(o):o,o=new Ha(o,null,LI),p=E.document)&&(p.write(DU(o)),p.close())):(E=FI(u,p,f,E))&&o.noopener&&(E.opener=null),E)try{E.focus()}catch{}return E}function vj(o){return new Fe(function(u){function f(){Wa(2e3).then(function(){if(!o||o.closed)u();else return f()})}return f()})}var gj=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,mj=/^[^@]+@[^@]+$/;function $h(){var o=null;return new Fe(function(u){l.document.readyState=="complete"?u():(o=function(){u()},mm(window,"load",o))}).o(function(u){throw gr(window,"load",o),u})}function yj(){return Am(void 0)?$h().then(function(){return new Fe(function(o,u){var f=l.document,p=setTimeout(function(){u(Error("Cordova framework is not ready."))},1e3);f.addEventListener("deviceready",function(){clearTimeout(p),o()},!1)})}):mt(Error("Cordova must run in an Android or iOS file scheme."))}function Am(o){return o=o||fn(),!(Xa()!=="file:"&&Xa()!=="ionic:"||!o.toLowerCase().match(/iphone|ipad|ipod|android/))}function km(){var o=l.window;try{return!(!o||o==o.top)}catch{return!1}}function zr(){return typeof l.WorkerGlobalScope<"u"&&typeof l.importScripts=="function"}function mi(){return se.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":se.INTERNAL.hasOwnProperty("node")?"Node":zr()?"Worker":"Browser"}function RS(){var o=mi();return o==="ReactNative"||o==="Node"}function _j(){for(var o=50,u=[];0"u"?null:ES(o)}function OS(o){var u={},f;for(f in o)o.hasOwnProperty(f)&&o[f]!==null&&o[f]!==void 0&&(u[f]=o[f]);return u}function Ja(o){if(o!==null)return JSON.parse(o)}function Es(o){return o||Math.floor(1e9*Math.random()).toString()}function PS(o){return o=o||fn(),!(Qa(o)=="Safari"||o.toLowerCase().match(/iphone|ipad|ipod/))}function DS(){var o=l.___jsl;if(o&&o.H){for(var u in o.H)if(o.H[u].r=o.H[u].r||[],o.H[u].L=o.H[u].L||[],o.H[u].r=o.H[u].L.concat(),o.CP)for(var f=0;fu)throw Error("Short delay should be less than long delay!");this.a=o,this.c=u,o=fn(),u=mi(),this.b=AS(o)||u==="ReactNative"}So.prototype.get=function(){var o=l.navigator;return!(o&&typeof o.onLine=="boolean"&&(Hh()||Xa()==="chrome-extension:"||typeof o.connection<"u"))||o.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};function xm(){var o=l.document;return o&&typeof o.visibilityState<"u"?o.visibilityState=="visible":!0}function wj(){var o=l.document,u=null;return xm()||!o?me():new Fe(function(f){u=function(){xm()&&(o.removeEventListener("visibilitychange",u,!1),f())},o.addEventListener("visibilitychange",u,!1)}).o(function(f){throw o.removeEventListener("visibilitychange",u,!1),f})}function rl(o){try{var u=new Date(parseInt(o,10));if(!isNaN(u.getTime())&&!/[^0-9]/.test(o))return u.toUTCString()}catch{}return null}function MS(){return!(!yt("fireauth.oauthhelper",l)&&!yt("fireauth.iframe",l))}function bj(){var o=l.navigator;return o&&o.serviceWorker&&o.serviceWorker.controller||null}function Ej(){var o=l.navigator;return o&&o.serviceWorker?me().then(function(){return o.serviceWorker.ready}).then(function(u){return u.active||null}).o(function(){return null}):me(null)}var LS={};function Om(o){LS[o]||(LS[o]=!0,typeof console<"u"&&typeof console.warn=="function"&&console.warn(o))}var Pm;try{var Dm={};Object.defineProperty(Dm,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Dm,"abcd",{configurable:!0,enumerable:!0,value:2}),Pm=Dm.abcd==2}catch{Pm=!1}function le(o,u,f){Pm?Object.defineProperty(o,u,{configurable:!0,enumerable:!0,value:f}):o[u]=f}function Un(o,u){if(u)for(var f in u)u.hasOwnProperty(f)&&le(o,f,u[f])}function yi(o){var u={};return Un(u,o),u}function Tj(o){var u={},f;for(f in o)o.hasOwnProperty(f)&&(u[f]=o[f]);return u}function Ij(o,u){if(!u||!u.length)return!0;if(!o)return!1;for(var f=0;f"u")throw new k("missing-continue-uri");if(typeof u!="string"||typeof u=="string"&&!u.length)throw new k("invalid-continue-uri");this.h=u,this.b=this.a=null,this.g=!1;var f=o[KS];if(f&&typeof f=="object"){u=f[YS];var p=f[zS];if(f=f[QS],typeof u=="string"&&u.length){if(this.a=u,typeof p<"u"&&typeof p!="boolean")throw new k("argument-error",zS+" property must be a boolean when specified.");if(this.g=!!p,typeof f<"u"&&(typeof f!="string"||typeof f=="string"&&!f.length))throw new k("argument-error",QS+" property must be a non empty string when specified.");this.b=f||null}else{if(typeof u<"u")throw new k("argument-error",YS+" property must be a non empty string when specified.");if(typeof p<"u"||typeof f<"u")throw new k("missing-android-pkg-name")}}else if(typeof f<"u")throw new k("argument-error",KS+" property must be a non null object when specified.");if(this.f=null,(u=o[GS])&&typeof u=="object"){if(u=u[XS],typeof u=="string"&&u.length)this.f=u;else if(typeof u<"u")throw new k("argument-error",XS+" property must be a non empty string when specified.")}else if(typeof u<"u")throw new k("argument-error",GS+" property must be a non null object when specified.");if(u=o[$m],typeof u<"u"&&typeof u!="boolean")throw new k("argument-error",$m+" property must be a boolean when specified.");if(this.c=!!u,o=o[WS],typeof o<"u"&&(typeof o!="string"||typeof o=="string"&&!o.length))throw new k("argument-error",WS+" property must be a non empty string when specified.");this.i=o||null}var KS="android",WS="dynamicLinkDomain",$m="handleCodeInApp",GS="iOS",Fj="url",zS="installApp",QS="minimumVersion",YS="packageName",XS="bundleId";function Gh(o){var u={};u.continueUrl=o.h,u.canHandleCodeInApp=o.c,(u.androidPackageName=o.a)&&(u.androidMinimumVersion=o.b,u.androidInstallApp=o.g),u.iOSBundleId=o.f,u.dynamicLinkDomain=o.i;for(var f in u)u[f]===null&&delete u[f];return u}function Uj(o){return Ae(o,function(u){return u=u.toString(16),1>4),E!=64&&(u(w<<4&240|E>>2),S!=64&&u(E<<6&192|S))}}function Bj(){if(!sl){sl={};for(var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),u=["+/=","+/","-_=","-_.","-_"],f=0;5>f;f++)for(var p=o.concat(u[f].split("")),m=0;mthis.a?this.a:o),this.b=u.provider_id||u.firebase&&u.firebase.sign_in_provider||null,this.f=u.firebase&&u.firebase.tenant||null,this.c=!!u.is_anonymous||this.b=="anonymous"}zh.prototype.T=function(){return this.f},zh.prototype.l=function(){return this.c},zh.prototype.toString=function(){return this.h};function Qh(o){try{return new zh(o)}catch{return null}}function JS(o){if(!o||(o=o.split("."),o.length!=3))return null;o=o[1];for(var u=(4-o.length%4)%4,f=0;fm)o[f++]=String.fromCharCode(m);else if(191m){var w=p[u++];o[f++]=String.fromCharCode((m&31)<<6|w&63)}else if(239m){w=p[u++];var E=p[u++],S=p[u++],U=((m&7)<<18|(w&63)<<12|(E&63)<<6|S&63)-65536;o[f++]=String.fromCharCode(55296+(U>>10)),o[f++]=String.fromCharCode(56320+(U&1023))}else w=p[u++],E=p[u++],o[f++]=String.fromCharCode((m&15)<<12|(w&63)<<6|E&63)}return JSON.parse(o.join(""))}catch{}return null}var ZS="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Yh=["client_id","response_type","scope","redirect_uri","state"],Hm={nd:{Ja:"locale",va:700,ua:600,fa:"facebook.com",Ya:Yh},pd:{Ja:null,va:500,ua:750,fa:"github.com",Ya:Yh},qd:{Ja:"hl",va:515,ua:680,fa:"google.com",Ya:Yh},wd:{Ja:"lang",va:485,ua:705,fa:"twitter.com",Ya:ZS},kd:{Ja:"locale",va:640,ua:600,fa:"apple.com",Ya:[]}};function Km(o){for(var u in Hm)if(Hm[u].fa==o)return Hm[u];return null}function eC(o){var u={};u["facebook.com"]=nC,u["google.com"]=iC,u["github.com"]=rC,u["twitter.com"]=oC;var f=o&&o[tC];try{if(f)return u[f]?new u[f](o):new _i(o);if(typeof o[Wm]<"u")return new Gm(o)}catch{}return null}var Wm="idToken",tC="providerId";function Gm(o){var u=o[tC];if(!u&&o[Wm]){var f=Qh(o[Wm]);f&&f.b&&(u=f.b)}if(!u)throw Error("Invalid additional user info!");(u=="anonymous"||u=="custom")&&(u=null),f=!1,typeof o.isNewUser<"u"?f=!!o.isNewUser:o.kind==="identitytoolkit#SignupNewUserResponse"&&(f=!0),le(this,"providerId",u),le(this,"isNewUser",f)}function _i(o){Gm.call(this,o),o=Ja(o.rawUserInfo||"{}"),le(this,"profile",Mm(o||{}))}F(_i,Gm);function nC(o){if(_i.call(this,o),this.providerId!="facebook.com")throw Error("Invalid provider ID!")}F(nC,_i);function rC(o){if(_i.call(this,o),this.providerId!="github.com")throw Error("Invalid provider ID!");le(this,"username",this.profile&&this.profile.login||null)}F(rC,_i);function iC(o){if(_i.call(this,o),this.providerId!="google.com")throw Error("Invalid provider ID!")}F(iC,_i);function oC(o){if(_i.call(this,o),this.providerId!="twitter.com")throw Error("Invalid provider ID!");le(this,"username",o.screenName||null)}F(oC,_i);function sC(o){var u=nr(o),f=xr(u,"link"),p=xr(nr(f),"link");return u=xr(u,"deep_link_id"),xr(nr(u),"link")||u||p||f||o}function Xh(o,u){if(!o&&!u)throw new k("internal-error","Internal assert: no raw session string available");if(o&&u)throw new k("internal-error","Internal assert: unable to determine the session type");this.a=o||null,this.b=u||null,this.type=this.a?al:Jh}var al="enroll",Jh="signin";Xh.prototype.Ha=function(){return this.a?me(this.a):me(this.b)},Xh.prototype.w=function(){return this.type==al?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}};function Za(){}Za.prototype.ka=function(){},Za.prototype.b=function(){},Za.prototype.c=function(){},Za.prototype.w=function(){};function eu(o,u){return o.then(function(f){if(f[Xr]){var p=Qh(f[Xr]);if(!p||u!=p.i)throw new k("user-mismatch");return f}throw new k("user-mismatch")}).o(function(f){throw f&&f.code&&f.code==ue+"user-not-found"?new k("user-mismatch"):f})}function Ts(o,u){if(u)this.a=u;else throw new k("internal-error","failed to construct a credential");le(this,"providerId",o),le(this,"signInMethod",o)}Ts.prototype.ka=function(o){return my(o,zm(this))},Ts.prototype.b=function(o,u){var f=zm(this);return f.idToken=u,yy(o,f)},Ts.prototype.c=function(o,u){return eu(_y(o,zm(this)),u)};function zm(o){return{pendingToken:o.a,requestUri:"http://localhost"}}Ts.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}};function qj(o){if(o&&o.providerId&&o.signInMethod&&o.providerId.indexOf("saml.")==0&&o.pendingToken)try{return new Ts(o.providerId,o.pendingToken)}catch{}return null}function Wi(o,u,f){if(this.a=null,u.idToken||u.accessToken)u.idToken&&le(this,"idToken",u.idToken),u.accessToken&&le(this,"accessToken",u.accessToken),u.nonce&&!u.pendingToken&&le(this,"nonce",u.nonce),u.pendingToken&&(this.a=u.pendingToken);else if(u.oauthToken&&u.oauthTokenSecret)le(this,"accessToken",u.oauthToken),le(this,"secret",u.oauthTokenSecret);else throw new k("internal-error","failed to construct a credential");le(this,"providerId",o),le(this,"signInMethod",f)}Wi.prototype.ka=function(o){return my(o,Qm(this))},Wi.prototype.b=function(o,u){var f=Qm(this);return f.idToken=u,yy(o,f)},Wi.prototype.c=function(o,u){var f=Qm(this);return eu(_y(o,f),u)};function Qm(o){var u={};return o.idToken&&(u.id_token=o.idToken),o.accessToken&&(u.access_token=o.accessToken),o.secret&&(u.oauth_token_secret=o.secret),u.providerId=o.providerId,o.nonce&&!o.a&&(u.nonce=o.nonce),u={postBody:_S(u).toString(),requestUri:"http://localhost"},o.a&&(delete u.postBody,u.pendingToken=o.a),u}Wi.prototype.w=function(){var o={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(o.oauthIdToken=this.idToken),this.accessToken&&(o.oauthAccessToken=this.accessToken),this.secret&&(o.oauthTokenSecret=this.secret),this.nonce&&(o.nonce=this.nonce),this.a&&(o.pendingToken=this.a),o};function $j(o){if(o&&o.providerId&&o.signInMethod){var u={idToken:o.oauthIdToken,accessToken:o.oauthTokenSecret?null:o.oauthAccessToken,oauthTokenSecret:o.oauthTokenSecret,oauthToken:o.oauthTokenSecret&&o.oauthAccessToken,nonce:o.nonce,pendingToken:o.pendingToken};try{return new Wi(o.providerId,u,o.signInMethod)}catch{}}return null}function Is(o,u){this.Qc=u||[],Un(this,{providerId:o,isOAuthProvider:!0}),this.Jb={},this.qb=(Km(o)||{}).Ja||null,this.pb=null}Is.prototype.Ka=function(o){return this.Jb=St(o),this};function aC(o){if(typeof o!="string"||o.indexOf("saml.")!=0)throw new k("argument-error",'SAML provider IDs must be prefixed with "saml."');Is.call(this,o,[])}F(aC,Is);function mr(o){Is.call(this,o,Yh),this.a=[]}F(mr,Is),mr.prototype.Ca=function(o){return M(this.a,o)||this.a.push(o),this},mr.prototype.Rb=function(){return J(this.a)},mr.prototype.credential=function(o,u){var f;if(T(o)?f={idToken:o.idToken||null,accessToken:o.accessToken||null,nonce:o.rawNonce||null}:f={idToken:o||null,accessToken:u||null},!f.idToken&&!f.accessToken)throw new k("argument-error","credential failed: must provide the ID token and/or the access token.");return new Wi(this.providerId,f,this.providerId)};function Ss(){mr.call(this,"facebook.com")}F(Ss,mr),le(Ss,"PROVIDER_ID","facebook.com"),le(Ss,"FACEBOOK_SIGN_IN_METHOD","facebook.com");function uC(o){if(!o)throw new k("argument-error","credential failed: expected 1 argument (the OAuth access token).");var u=o;return T(o)&&(u=o.accessToken),new Ss().credential({accessToken:u})}function Cs(){mr.call(this,"github.com")}F(Cs,mr),le(Cs,"PROVIDER_ID","github.com"),le(Cs,"GITHUB_SIGN_IN_METHOD","github.com");function cC(o){if(!o)throw new k("argument-error","credential failed: expected 1 argument (the OAuth access token).");var u=o;return T(o)&&(u=o.accessToken),new Cs().credential({accessToken:u})}function As(){mr.call(this,"google.com"),this.Ca("profile")}F(As,mr),le(As,"PROVIDER_ID","google.com"),le(As,"GOOGLE_SIGN_IN_METHOD","google.com");function lC(o,u){var f=o;return T(o)&&(f=o.idToken,u=o.accessToken),new As().credential({idToken:f,accessToken:u})}function tu(){Is.call(this,"twitter.com",ZS)}F(tu,Is),le(tu,"PROVIDER_ID","twitter.com"),le(tu,"TWITTER_SIGN_IN_METHOD","twitter.com");function fC(o,u){var f=o;if(T(f)||(f={oauthToken:o,oauthTokenSecret:u}),!f.oauthToken||!f.oauthTokenSecret)throw new k("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new Wi("twitter.com",f,"twitter.com")}function Co(o,u,f){this.a=o,this.f=u,le(this,"providerId","password"),le(this,"signInMethod",f===Or.EMAIL_LINK_SIGN_IN_METHOD?Or.EMAIL_LINK_SIGN_IN_METHOD:Or.EMAIL_PASSWORD_SIGN_IN_METHOD)}Co.prototype.ka=function(o){return this.signInMethod==Or.EMAIL_LINK_SIGN_IN_METHOD?je(o,AV,{email:this.a,oobCode:this.f}):je(o,jC,{email:this.a,password:this.f})},Co.prototype.b=function(o,u){return this.signInMethod==Or.EMAIL_LINK_SIGN_IN_METHOD?je(o,kV,{idToken:u,email:this.a,oobCode:this.f}):je(o,UC,{idToken:u,email:this.a,password:this.f})},Co.prototype.c=function(o,u){return eu(this.ka(o),u)},Co.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}};function Hj(o){return o&&o.email&&o.password?new Co(o.email,o.password,o.signInMethod):null}function Or(){Un(this,{providerId:"password",isOAuthProvider:!1})}function hC(o,u){if(u=Ym(u),!u)throw new k("argument-error","Invalid email link!");return new Co(o,u.code,Or.EMAIL_LINK_SIGN_IN_METHOD)}function Ym(o){return o=sC(o),(o=HS(o))&&o.operation===Kh?o:null}Un(Or,{PROVIDER_ID:"password"}),Un(Or,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Un(Or,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"});function Ao(o){if(!(o.fb&&o.eb||o.La&&o.ea))throw new k("internal-error");this.a=o,le(this,"providerId","phone"),this.fa="phone",le(this,"signInMethod","phone")}Ao.prototype.ka=function(o){return o.gb(ul(this))},Ao.prototype.b=function(o,u){var f=ul(this);return f.idToken=u,je(o,zV,f)},Ao.prototype.c=function(o,u){var f=ul(this);return f.operation="REAUTH",o=je(o,QV,f),eu(o,u)},Ao.prototype.w=function(){var o={providerId:"phone"};return this.a.fb&&(o.verificationId=this.a.fb),this.a.eb&&(o.verificationCode=this.a.eb),this.a.La&&(o.temporaryProof=this.a.La),this.a.ea&&(o.phoneNumber=this.a.ea),o};function Kj(o){if(o&&o.providerId==="phone"&&(o.verificationId&&o.verificationCode||o.temporaryProof&&o.phoneNumber)){var u={};return Z(["verificationId","verificationCode","temporaryProof","phoneNumber"],function(f){o[f]&&(u[f]=o[f])}),new Ao(u)}return null}function ul(o){return o.a.La&&o.a.ea?{temporaryProof:o.a.La,phoneNumber:o.a.ea}:{sessionInfo:o.a.fb,code:o.a.eb}}function Gi(o){try{this.a=o||se.auth()}catch{throw new k("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Un(this,{providerId:"phone",isOAuthProvider:!1})}Gi.prototype.gb=function(o,u){var f=this.a.a;return me(u.verify()).then(function(p){if(typeof p!="string")throw new k("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(u.type){case"recaptcha":var m=T(o)?o.session:null,w=T(o)?o.phoneNumber:o,E;return m&&m.type==al?E=m.Ha().then(function(S){return yV(f,{idToken:S,phoneEnrollmentInfo:{phoneNumber:w,recaptchaToken:p}})}):m&&m.type==Jh?E=m.Ha().then(function(S){return _V(f,{mfaPendingCredential:S,mfaEnrollmentId:o.multiFactorHint&&o.multiFactorHint.uid||o.multiFactorUid,phoneSignInInfo:{recaptchaToken:p}})}):E=mV(f,{phoneNumber:w,recaptchaToken:p}),E.then(function(S){return typeof u.reset=="function"&&u.reset(),S},function(S){throw typeof u.reset=="function"&&u.reset(),S});default:throw new k("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})};function dC(o,u){if(!o)throw new k("missing-verification-id");if(!u)throw new k("missing-verification-code");return new Ao({fb:o,eb:u})}Un(Gi,{PROVIDER_ID:"phone"}),Un(Gi,{PHONE_SIGN_IN_METHOD:"phone"});function Xm(o){if(o.temporaryProof&&o.phoneNumber)return new Ao({La:o.temporaryProof,ea:o.phoneNumber});var u=o&&o.providerId;if(!u||u==="password")return null;var f=o&&o.oauthAccessToken,p=o&&o.oauthTokenSecret,m=o&&o.nonce,w=o&&o.oauthIdToken,E=o&&o.pendingToken;try{switch(u){case"google.com":return lC(w,f);case"facebook.com":return uC(f);case"github.com":return cC(f);case"twitter.com":return fC(f,p);default:return f||p||w||E?E?u.indexOf("saml.")==0?new Ts(u,E):new Wi(u,{pendingToken:E,idToken:o.oauthIdToken,accessToken:o.oauthAccessToken},u):new mr(u).credential({idToken:w,accessToken:f,rawNonce:m}):null}}catch{return null}}function Jm(o){if(!o.isOAuthProvider)throw new k("invalid-oauth-provider")}function Qr(o,u,f,p,m,w,E){if(this.c=o,this.b=u||null,this.g=f||null,this.f=p||null,this.i=w||null,this.h=E||null,this.a=m||null,this.g||this.a){if(this.g&&this.a)throw new k("invalid-auth-event");if(this.g&&!this.f)throw new k("invalid-auth-event")}else throw new k("invalid-auth-event")}Qr.prototype.getUid=function(){var o=[];return o.push(this.c),this.b&&o.push(this.b),this.f&&o.push(this.f),this.h&&o.push(this.h),o.join("-")},Qr.prototype.T=function(){return this.h},Qr.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};function pC(o){return o=o||{},o.type?new Qr(o.type,o.eventId,o.urlResponse,o.sessionId,o.error&&dt(o.error),o.postBody,o.tenantId):null}function Wj(){this.b=null,this.a=[]}var Zm=null;function Gj(o){var u=Zm;u.a.push(o),u.b||(u.b=function(f){for(var p=0;p Auth section -> Sign in method tab.",o):p=="http"||p=="https"?f=UI("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",o):u="operation-not-supported-in-this-environment",k.call(this,u,f)}F(ey,k);function cl(o,u,f){k.call(this,o,f),o=u||{},o.Kb&&le(this,"email",o.Kb),o.ea&&le(this,"phoneNumber",o.ea),o.credential&&le(this,"credential",o.credential),o.$b&&le(this,"tenantId",o.$b)}F(cl,k),cl.prototype.w=function(){var o={code:this.code,message:this.message};this.email&&(o.email=this.email),this.phoneNumber&&(o.phoneNumber=this.phoneNumber),this.tenantId&&(o.tenantId=this.tenantId);var u=this.credential&&this.credential.w();return u&&ln(o,u),o},cl.prototype.toJSON=function(){return this.w()};function Zh(o){if(o.code){var u=o.code||"";u.indexOf(ue)==0&&(u=u.substring(ue.length));var f={credential:Xm(o),$b:o.tenantId};if(o.email)f.Kb=o.email;else if(o.phoneNumber)f.ea=o.phoneNumber;else if(!f.credential)return new k(u,o.message||void 0);return new cl(u,f,o.message)}return null}function ll(){}ll.prototype.c=null;function vC(o){return o.c||(o.c=o.b())}var ty;function ed(){}F(ed,ll),ed.prototype.a=function(){var o=gC(this);return o?new ActiveXObject(o):new XMLHttpRequest},ed.prototype.b=function(){var o={};return gC(this)&&(o[0]=!0,o[1]=!0),o};function gC(o){if(!o.f&&typeof XMLHttpRequest>"u"&&typeof ActiveXObject<"u"){for(var u=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],f=0;f=_C(this).value)for(b(u)&&(u=u()),o=new ry(o,String(u),this.f),f&&(o.a=f),f=this;f;)f=f.a};var sy={},nd=null;function ay(o){nd||(nd=new iy(""),sy[""]=nd,nd.c=zj);var u;if(!(u=sy[o])){u=new iy(o);var f=o.lastIndexOf("."),p=o.substr(f+1);f=ay(o.substr(0,f)),f.b||(f.b={}),f.b[p]=u,u.a=f,sy[o]=u}return u}function Pr(o,u){o&&o.log(Qj,u,void 0)}function rd(o){this.f=o}F(rd,ll),rd.prototype.a=function(){return new id(this.f)},rd.prototype.b=function(o){return function(){return o}}({});function id(o){Fn.call(this),this.u=o,this.h=void 0,this.readyState=uy,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=ay("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}F(id,Fn);var uy=0;e=id.prototype,e.open=function(o,u){if(this.readyState!=uy)throw this.abort(),Error("Error reopening a connection");this.s=o,this.f=u,this.readyState=1,dl(this)},e.send=function(o){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.a=!0;var u={headers:this.l,method:this.s,credentials:this.h,cache:void 0};o&&(u.body=o),this.u.fetch(new Request(this.f,u)).then(this.uc.bind(this),this.Va.bind(this))},e.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&this.readyState!=4&&(this.a=!1,hl(this)),this.readyState=uy},e.uc=function(o){this.a&&(this.g=o,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=o.headers,this.readyState=2,dl(this)),this.a&&(this.readyState=3,dl(this),this.a&&(this.responseType==="arraybuffer"?o.arrayBuffer().then(this.sc.bind(this),this.Va.bind(this)):typeof l.ReadableStream<"u"&&"body"in o?(this.response=this.responseText="",this.c=o.body.getReader(),this.m=new TextDecoder,wC(this)):o.text().then(this.tc.bind(this),this.Va.bind(this)))))};function wC(o){o.c.read().then(o.pc.bind(o)).catch(o.Va.bind(o))}e.pc=function(o){if(this.a){var u=this.m.decode(o.value?o.value:new Uint8Array(0),{stream:!o.done});u&&(this.response=this.responseText+=u),o.done?hl(this):dl(this),this.readyState==3&&wC(this)}},e.tc=function(o){this.a&&(this.response=this.responseText=o,hl(this))},e.sc=function(o){this.a&&(this.response=o,hl(this))},e.Va=function(o){var u=this.i;u&&u.log(oy,"Failed to fetch url "+this.f,o instanceof Error?o:Error(o)),this.a&&hl(this)};function hl(o){o.readyState=4,o.g=null,o.c=null,o.m=null,dl(o)}e.setRequestHeader=function(o,u){this.l.append(o,u)},e.getResponseHeader=function(o){return this.b?this.b.get(o.toLowerCase())||"":((o=this.i)&&o.log(oy,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},e.getAllResponseHeaders=function(){if(!this.b){var o=this.i;return o&&o.log(oy,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}o=[];for(var u=this.b.entries(),f=u.next();!f.done;)f=f.value,o.push(f[0]+": "+f[1]),f=u.next();return o.join(`\r -`)};function dl(o){o.onreadystatechange&&o.onreadystatechange.call(o)}Object.defineProperty(id.prototype,"withCredentials",{get:function(){return this.h==="include"},set:function(o){this.h=o?"include":"same-origin"}});function pl(o){Fn.call(this),this.headers=new Ga,this.D=o||null,this.c=!1,this.C=this.a=null,this.h=this.P=this.l="",this.f=this.N=this.i=this.J=!1,this.g=0,this.s=null,this.m=bC,this.u=this.S=!1}F(pl,Fn);var bC="";pl.prototype.b=ay("goog.net.XhrIo");var Yj=/^https?$/i,Xj=["POST","PUT"];function Jj(o,u,f,p,m){if(o.a)throw Error("[goog.net.XhrIo] Object is active with another request="+o.l+"; newUri="+u);f=f?f.toUpperCase():"GET",o.l=u,o.h="",o.P=f,o.J=!1,o.c=!0,o.a=o.D?o.D.a():ty.a(),o.C=o.D?vC(o.D):vC(ty),o.a.onreadystatechange=P(o.Wb,o);try{Pr(o.b,zi(o,"Opening Xhr")),o.N=!0,o.a.open(f,String(u),!0),o.N=!1}catch(E){Pr(o.b,zi(o,"Error opening Xhr: "+E.message)),EC(o,E);return}u=p||"";var w=new Ga(o.headers);m&&ij(m,function(E,S){w.set(S,E)}),m=N(w.Y()),p=l.FormData&&u instanceof l.FormData,!M(Xj,f)||m||p||w.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),w.forEach(function(E,S){this.a.setRequestHeader(S,E)},o),o.m&&(o.a.responseType=o.m),"withCredentials"in o.a&&o.a.withCredentials!==o.S&&(o.a.withCredentials=o.S);try{SC(o),0=u.l&&u.cancel())}this.u?this.u.call(this.s,this):this.v=!0,this.a||(o=new ml,ad(this),gl(this,!1,o))}},ks.prototype.m=function(o,u){this.i=!1,gl(this,o,u)};function gl(o,u,f){o.a=!0,o.c=f,o.f=!u,AC(o)}function ad(o){if(o.a){if(!o.v)throw new ud;o.v=!1}}function nV(o,u){cy(o,null,u,void 0)}function cy(o,u,f,p){o.g.push([u,f,p]),o.a&&AC(o)}ks.prototype.then=function(o,u,f){var p,m,w=new Fe(function(E,S){p=E,m=S});return cy(this,p,function(E){E instanceof ml?w.cancel():m(E)}),w.then(o,u,f)},ks.prototype.$goog_Thenable=!0;function CC(o){return I(o.g,function(u){return b(u[1])})}function AC(o){if(o.h&&o.a&&CC(o)){var u=o.h,f=cd[u];f&&(l.clearTimeout(f.a),delete cd[u]),o.h=0}o.b&&(o.b.l--,delete o.b),u=o.c;for(var p=f=!1;o.g.length&&!o.i;){var m=o.g.shift(),w=m[0],E=m[1];if(m=m[2],w=o.f?E:w)try{var S=w.call(m||o.s,u);S!==void 0&&(o.f=o.f&&(S==u||S instanceof Error),o.c=u=S),(nt(u)||typeof l.Promise=="function"&&u instanceof l.Promise)&&(p=!0,o.i=!0)}catch(U){u=U,o.f=!0,CC(o)||(f=!0)}}o.c=u,p&&(S=P(o.m,o,!0),p=P(o.m,o,!1),u instanceof ks?(cy(u,S,p),u.C=!0):u.then(S,p)),f&&(u=new kC(u),cd[u.a]=u,o.h=u.a)}function ud(){Ce.call(this)}F(ud,Ce),ud.prototype.message="Deferred has already fired",ud.prototype.name="AlreadyCalledError";function ml(){Ce.call(this)}F(ml,Ce),ml.prototype.message="Deferred was canceled",ml.prototype.name="CanceledError";function kC(o){this.a=l.setTimeout(P(this.c,this),0),this.b=o}kC.prototype.c=function(){throw delete cd[this.a],this.b};var cd={};function ly(o){var u={},f=u.document||document,p=NI(o).toString(),m=Dh(document,"SCRIPT"),w={Xb:m,Ma:void 0},E=new ks(w),S=null,U=u.timeout!=null?u.timeout:5e3;return 0"u"||typeof l.Headers>"u"||typeof l.Request>"u"))throw new k("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var E=new pl(this.f);if(w){E.g=Math.max(0,w);var S=setTimeout(function(){E.dispatchEvent("timeout")},w)}pS(E,"complete",function(){S&&clearTimeout(S);var U=null;try{U=JSON.parse(tV(this))||null}catch{U=null}u&&u(U)}),wm(E,"ready",function(){S&&clearTimeout(S),aS(this)}),wm(E,"timeout",function(){S&&clearTimeout(S),aS(this),u&&u(null)}),Jj(E,o,f,p,m)};var fV=new vi(Nh,"https://apis.google.com/js/client.js?onload=%{onload}"),OC="__fcb"+Math.floor(1e6*Math.random()).toString();function hV(o,u){if(((window.gapi||{}).client||{}).request)o();else{l[OC]=function(){((window.gapi||{}).client||{}).request?o():u(Error("CORS_UNSUPPORTED"))};var f=nm(fV,{onload:OC});nV(ly(f),function(){u(Error("CORS_UNSUPPORTED"))})}}Yr.prototype.s=function(o,u,f,p,m){var w=this;hy.then(function(){window.gapi.client.setApiKey(w.c);var E=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:o,method:f,body:p,headers:m,authType:"none",callback:function(S){window.gapi.auth.setToken(E),u&&u(S)}})}).o(function(E){u&&u({error:{message:E&&E.message||"CORS_UNSUPPORTED"}})})};function dV(o,u){return new Fe(function(f,p){u.grant_type=="refresh_token"&&u.refresh_token||u.grant_type=="authorization_code"&&u.code?xC(o,o.l+"?key="+encodeURIComponent(o.c),function(m){m?m.error?p(by(m)):m.access_token&&m.refresh_token?f(m):p(new k("internal-error")):p(new k("network-request-failed"))},"POST",_S(u).toString(),o.g,o.m.get()):p(new k("internal-error"))})}function PC(o,u,f,p,m,w,E){var S=nr(u+f);Nt(S,"key",o.c),E&&Nt(S,"cb",Date.now().toString());var U=p=="GET";if(U)for(var q in m)m.hasOwnProperty(q)&&Nt(S,q,m[q]);return new Fe(function(Te,rt){xC(o,S.toString(),function(Ge){Ge?Ge.error?rt(by(Ge,w||{})):Te(Ge):rt(new k("network-request-failed"))},p,U?void 0:ES(OS(m)),o.a,o.v.get())})}function Rs(o){if(o=o.email,typeof o!="string"||!mj.test(o))throw new k("invalid-email")}function DC(o){"email"in o&&Rs(o)}function pV(o,u){return je(o,IV,{identifier:u,continueUri:Hh()?el():"http://localhost"}).then(function(f){return f.signinMethods||[]})}function vV(o){return je(o,LV,{}).then(function(u){return u.authorizedDomains||[]})}function rr(o){if(!o[Xr])throw o.mfaPendingCredential?new k("multi-factor-auth-required",null,St(o)):new k("internal-error")}function py(o){if(o.phoneNumber||o.temporaryProof){if(!o.phoneNumber||!o.temporaryProof)throw new k("internal-error")}else{if(!o.sessionInfo)throw new k("missing-verification-id");if(!o.code)throw new k("missing-verification-code")}}Yr.prototype.Ab=function(){return je(this,VV,{})},Yr.prototype.Cb=function(o,u){return je(this,FC,{idToken:o,email:u})},Yr.prototype.Db=function(o,u){return je(this,UC,{idToken:o,password:u})};var gV={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};e=Yr.prototype,e.Eb=function(o,u){var f={idToken:o},p=[];return bo(gV,function(m,w){var E=u[w];E===null?p.push(m):w in u&&(f[w]=E)}),p.length&&(f.deleteAttribute=p),je(this,FC,f)},e.wb=function(o,u){return o={requestType:"PASSWORD_RESET",email:o},ln(o,u),je(this,MV,o)},e.xb=function(o,u){return o={requestType:"EMAIL_SIGNIN",email:o},ln(o,u),je(this,OV,o)},e.vb=function(o,u){return o={requestType:"VERIFY_EMAIL",idToken:o},ln(o,u),je(this,PV,o)},e.Fb=function(o,u,f){return o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:o,newEmail:u},ln(o,f),je(this,DV,o)};function mV(o,u){return je(o,jV,u)}e.gb=function(o){return je(this,GV,o)};function yV(o,u){return je(o,BV,u).then(function(f){return f.phoneSessionInfo.sessionInfo})}function MC(o){if(!o.phoneVerificationInfo)throw new k("internal-error");if(!o.phoneVerificationInfo.sessionInfo)throw new k("missing-verification-id");if(!o.phoneVerificationInfo.code)throw new k("missing-verification-code")}function _V(o,u){return je(o,qV,u).then(function(f){return f.phoneResponseInfo.sessionInfo})}function wV(o,u,f){return je(o,CV,{idToken:u,deleteProvider:f})}function vy(o){if(!o.requestUri||!o.sessionId&&!o.postBody&&!o.pendingToken)throw new k("internal-error")}function gy(o,u){return u.oauthIdToken&&u.providerId&&u.providerId.indexOf("oidc.")==0&&!u.pendingToken&&(o.sessionId?u.nonce=o.sessionId:o.postBody&&(o=new _s(o.postBody),Im(o,"nonce")&&(u.nonce=o.get("nonce")))),u}function LC(o){var u=null;if(o.needConfirmation?(o.code="account-exists-with-different-credential",u=Zh(o)):o.errorMessage=="FEDERATED_USER_ID_ALREADY_LINKED"?(o.code="credential-already-in-use",u=Zh(o)):o.errorMessage=="EMAIL_EXISTS"?(o.code="email-already-in-use",u=Zh(o)):o.errorMessage&&(u=VC(o.errorMessage)),u)throw u;rr(o)}function my(o,u){return u.returnIdpCredential=!0,je(o,$V,u)}function yy(o,u){return u.returnIdpCredential=!0,je(o,KV,u)}function _y(o,u){return u.returnIdpCredential=!0,u.autoCreate=!1,je(o,HV,u)}function wy(o){if(!o.oobCode)throw new k("invalid-action-code")}e.ob=function(o,u){return je(this,UV,{oobCode:o,newPassword:u})},e.Sa=function(o){return je(this,EV,{oobCode:o})},e.kb=function(o){return je(this,bV,{oobCode:o})};var bV={endpoint:"setAccountInfo",A:wy,Z:"email",B:!0},EV={endpoint:"resetPassword",A:wy,G:function(o){var u=o.requestType;if(!u||!o.email&&u!="EMAIL_SIGNIN"&&u!="VERIFY_AND_CHANGE_EMAIL")throw new k("internal-error")},B:!0},TV={endpoint:"signupNewUser",A:function(o){if(Rs(o),!o.password)throw new k("weak-password")},G:rr,V:!0,B:!0},IV={endpoint:"createAuthUri",B:!0},SV={endpoint:"deleteAccount",O:["idToken"]},CV={endpoint:"setAccountInfo",O:["idToken","deleteProvider"],A:function(o){if(!Array.isArray(o.deleteProvider))throw new k("internal-error")}},AV={endpoint:"emailLinkSignin",O:["email","oobCode"],A:Rs,G:rr,V:!0,B:!0},kV={endpoint:"emailLinkSignin",O:["idToken","email","oobCode"],A:Rs,G:rr,V:!0},RV={endpoint:"accounts/mfaEnrollment:finalize",O:["idToken","phoneVerificationInfo"],A:MC,G:rr,B:!0,Na:!0},NV={endpoint:"accounts/mfaSignIn:finalize",O:["mfaPendingCredential","phoneVerificationInfo"],A:MC,G:rr,B:!0,Na:!0},xV={endpoint:"getAccountInfo"},OV={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(o){if(o.requestType!="EMAIL_SIGNIN")throw new k("internal-error");Rs(o)},Z:"email",B:!0},PV={endpoint:"getOobConfirmationCode",O:["idToken","requestType"],A:function(o){if(o.requestType!="VERIFY_EMAIL")throw new k("internal-error")},Z:"email",B:!0},DV={endpoint:"getOobConfirmationCode",O:["idToken","newEmail","requestType"],A:function(o){if(o.requestType!="VERIFY_AND_CHANGE_EMAIL")throw new k("internal-error")},Z:"email",B:!0},MV={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(o){if(o.requestType!="PASSWORD_RESET")throw new k("internal-error");Rs(o)},Z:"email",B:!0},LV={mb:!0,endpoint:"getProjectConfig",Vb:"GET"},FV={mb:!0,endpoint:"getRecaptchaParam",Vb:"GET",G:function(o){if(!o.recaptchaSiteKey)throw new k("internal-error")}},UV={endpoint:"resetPassword",A:wy,Z:"email",B:!0},jV={endpoint:"sendVerificationCode",O:["phoneNumber","recaptchaToken"],Z:"sessionInfo",B:!0},FC={endpoint:"setAccountInfo",O:["idToken"],A:DC,V:!0},UC={endpoint:"setAccountInfo",O:["idToken"],A:function(o){if(DC(o),!o.password)throw new k("weak-password")},G:rr,V:!0},VV={endpoint:"signupNewUser",G:rr,V:!0,B:!0},BV={endpoint:"accounts/mfaEnrollment:start",O:["idToken","phoneEnrollmentInfo"],A:function(o){if(!o.phoneEnrollmentInfo)throw new k("internal-error");if(!o.phoneEnrollmentInfo.phoneNumber)throw new k("missing-phone-number");if(!o.phoneEnrollmentInfo.recaptchaToken)throw new k("missing-app-credential")},G:function(o){if(!o.phoneSessionInfo||!o.phoneSessionInfo.sessionInfo)throw new k("internal-error")},B:!0,Na:!0},qV={endpoint:"accounts/mfaSignIn:start",O:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(o){if(!o.phoneSignInInfo||!o.phoneSignInInfo.recaptchaToken)throw new k("missing-app-credential")},G:function(o){if(!o.phoneResponseInfo||!o.phoneResponseInfo.sessionInfo)throw new k("internal-error")},B:!0,Na:!0},$V={endpoint:"verifyAssertion",A:vy,Za:gy,G:LC,V:!0,B:!0},HV={endpoint:"verifyAssertion",A:vy,Za:gy,G:function(o){if(o.errorMessage&&o.errorMessage=="USER_NOT_FOUND")throw new k("user-not-found");if(o.errorMessage)throw VC(o.errorMessage);rr(o)},V:!0,B:!0},KV={endpoint:"verifyAssertion",A:function(o){if(vy(o),!o.idToken)throw new k("internal-error")},Za:gy,G:LC,V:!0},WV={endpoint:"verifyCustomToken",A:function(o){if(!o.token)throw new k("invalid-custom-token")},G:rr,V:!0,B:!0},jC={endpoint:"verifyPassword",A:function(o){if(Rs(o),!o.password)throw new k("wrong-password")},G:rr,V:!0,B:!0},GV={endpoint:"verifyPhoneNumber",A:py,G:rr,B:!0},zV={endpoint:"verifyPhoneNumber",A:function(o){if(!o.idToken)throw new k("internal-error");py(o)},G:function(o){if(o.temporaryProof)throw o.code="credential-already-in-use",Zh(o);rr(o)}},QV={Ib:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:py,G:rr,B:!0},YV={endpoint:"accounts/mfaEnrollment:withdraw",O:["idToken","mfaEnrollmentId"],G:function(o){if(!!o[Xr]^!!o.refreshToken)throw new k("internal-error")},B:!0,Na:!0};function je(o,u,f){if(!Ij(f,u.O))return mt(new k("internal-error"));var p=!!u.Na,m=u.Vb||"POST",w;return me(f).then(u.A).then(function(){return u.V&&(f.returnSecureToken=!0),u.B&&o.b&&typeof f.tenantId>"u"&&(f.tenantId=o.b),p?PC(o,o.i,u.endpoint,m,f,u.Ib,u.mb||!1):PC(o,o.h,u.endpoint,m,f,u.Ib,u.mb||!1)}).then(function(E){return w=E,u.Za?u.Za(f,w):w}).then(u.G).then(function(){if(!u.Z)return w;if(!(u.Z in w))throw new k("internal-error");return w[u.Z]})}function VC(o){return by({error:{errors:[{message:o}],code:400,message:o}})}function by(o,u){var f=(o.error&&o.error.errors&&o.error.errors[0]||{}).reason||"",p={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(f=p[f]?new k(p[f]):null)return f;f=o.error&&o.error.message||"",p={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},ln(p,u||{}),u=(u=f.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1"u"&&delete S[U]}),o.ports[0].postMessage({status:"done",eventId:f,eventType:u,response:E})})}};function QC(o,u,f){pi(o.a)&&o.b.addEventListener("message",o.f),typeof o.a[u]>"u"&&(o.a[u]=[]),o.a[u].push(f)}function YC(o){this.a=o}YC.prototype.postMessage=function(o,u){this.a.postMessage(o,u)};function XC(o){this.c=o,this.b=!1,this.a=[]}function JC(o,u,f,p){var m,w=f||{},E,S,U,q=null;if(o.b)return mt(Error("connection_unavailable"));var Te=p?800:50,rt=typeof MessageChannel<"u"?new MessageChannel:null;return new Fe(function(Ge,Yt){rt?(m=Math.floor(Math.random()*Math.pow(10,20)).toString(),rt.port1.start(),S=setTimeout(function(){Yt(Error("unsupported_event"))},Te),E=function(Qi){Qi.data.eventId===m&&(Qi.data.status==="ack"?(clearTimeout(S),U=setTimeout(function(){Yt(Error("timeout"))},3e3)):Qi.data.status==="done"?(clearTimeout(U),typeof Qi.data.response<"u"?Ge(Qi.data.response):Yt(Error("unknown_error"))):(clearTimeout(S),clearTimeout(U),Yt(Error("invalid_response"))))},q={messageChannel:rt,onMessage:E},o.a.push(q),rt.port1.addEventListener("message",E),o.c.postMessage({eventType:u,eventId:m,data:w},[rt.port2])):Yt(Error("connection_unavailable"))}).then(function(Ge){return Iy(o,q),Ge}).o(function(Ge){throw Iy(o,q),Ge})}function Iy(o,u){if(u){var f=u.messageChannel,p=u.onMessage;f&&(f.port1.removeEventListener("message",p),f.port1.close()),V(o.a,function(m){return m==u})}}XC.prototype.close=function(){for(;0"u"&&(p=null);var m=l.localStorage.getItem(f);m!==p&&(this.b[f]=m,this.nb(f))}else if(u.indexOf("firebase:")==0&&this.a[u]){if(typeof o.a.a<"u"?Ns(this,"local").ia(this.f):Oy(this),this.m){if(f=l.localStorage.getItem(u),p=o.a.newValue,p!==f)p!==null?l.localStorage.setItem(u,p):l.localStorage.removeItem(u);else if(this.b[u]===p&&typeof o.a.a>"u")return}var w=this;f=function(){(typeof o.a.a<"u"||w.b[u]!==l.localStorage.getItem(u))&&(w.b[u]=l.localStorage.getItem(u),w.nb(u))},Gr&&Eo&&Eo==10&&l.localStorage.getItem(u)!==o.a.newValue&&o.a.newValue!==o.a.oldValue?setTimeout(f,10):f()}}else Z(o,P(this.nb,this))},e.nb=function(o){this.a[o]&&Z(this.a[o],function(u){u()})};function w4(o){this.a=o,this.b=El()}var Py={name:"authEvent",F:"local"};function b4(o){return o.b.get(Py,o.a).then(function(u){return pC(u)})}function E4(){this.a=El()}function T4(){this.b=-1}function gd(o,u){this.b=uA,this.f=l.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=o,this.h=u,this.l=l.Int32Array?new Int32Array(64):Array(64),md===void 0&&(l.Int32Array?md=new Int32Array(fA):md=fA),this.reset()}var md;F(gd,T4);for(var uA=64,I4=uA-1,cA=[],Dy=0;Dyu;u++){m=f[u-15]|0,p=f[u-2]|0;var w=(f[u-16]|0)+((m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3)|0,E=(f[u-7]|0)+((p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10)|0;f[u]=w+E|0}p=o.a[0]|0,m=o.a[1]|0;var S=o.a[2]|0,U=o.a[3]|0,q=o.a[4]|0,Te=o.a[5]|0,rt=o.a[6]|0;for(w=o.a[7]|0,u=0;64>u;u++){var Ge=((p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10))+(p&m^p&S^m&S)|0;E=q&Te^~q&rt,w=w+((q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7))|0,E=E+(md[u]|0)|0,E=w+(E+(f[u]|0)|0)|0,w=rt,rt=Te,Te=q,q=U+E|0,U=S,S=m,m=p,p=E+Ge|0}o.a[0]=o.a[0]+p|0,o.a[1]=o.a[1]+m|0,o.a[2]=o.a[2]+S|0,o.a[3]=o.a[3]+U|0,o.a[4]=o.a[4]+q|0,o.a[5]=o.a[5]+Te|0,o.a[6]=o.a[6]+rt|0,o.a[7]=o.a[7]+w|0}function Ly(o,u,f){f===void 0&&(f=u.length);var p=0,m=o.c;if(typeof u=="string")for(;p=w&&w==(w|0)))throw Error("message must be a byte array");o.f[m++]=w,m==o.b&&(My(o),m=0)}else throw Error("message must be string or array");o.c=m,o.g+=f}var fA=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function hA(){gd.call(this,8,S4)}F(hA,gd);var S4=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function dA(o,u,f,p,m,w){this.v=o,this.i=u,this.l=f,this.m=p||null,this.u=m||null,this.s=w,this.h=u+":"+f,this.C=new E4,this.g=new w4(this.h),this.f=null,this.b=[],this.a=this.c=null}function yd(o){return new k("invalid-cordova-configuration",o)}e=dA.prototype,e.ma=function(){return this.Ia?this.Ia:this.Ia=yj().then(function(){if(typeof yt("universalLinks.subscribe",l)!="function")throw yd("cordova-universal-links-plugin-fix is not installed");if(typeof yt("BuildInfo.packageName",l)>"u")throw yd("cordova-plugin-buildinfo is not installed");if(typeof yt("cordova.plugins.browsertab.openUrl",l)!="function")throw yd("cordova-plugin-browsertab is not installed");if(typeof yt("cordova.InAppBrowser.open",l)!="function")throw yd("cordova-plugin-inappbrowser is not installed")},function(){throw new k("cordova-not-ready")})};function C4(){for(var o=20,u=[];0u.c?Ly(u,lA,56-u.c):Ly(u,lA,u.b-(u.c-56));for(var p=63;56<=p;p--)u.f[p]=f&255,f/=256;for(My(u),p=f=0;p>m&255;return Uj(o)}e.Pb=function(o,u){return u(new k("operation-not-supported-in-this-environment")),me()},e.Nb=function(){return mt(new k("operation-not-supported-in-this-environment"))},e.ac=function(){return!1},e.Yb=function(){return!0},e.Ub=function(){return!0},e.Ob=function(o,u,f,p){if(this.c)return mt(new k("redirect-operation-pending"));var m=this,w=l.document,E=null,S=null,U=null,q=null;return this.c=me().then(function(){return Jm(u),vA(m)}).then(function(){return k4(m,o,u,f,p)}).then(function(){return new Fe(function(Te,rt){S=function(){var Ge=yt("cordova.plugins.browsertab.close",l);return Te(),typeof Ge=="function"&&Ge(),m.a&&typeof m.a.close=="function"&&(m.a.close(),m.a=null),!1},m.Ea(S),U=function(){E||(E=Wa(2e3).then(function(){rt(new k("redirect-cancelled-by-user"))}))},q=function(){xm()&&U()},w.addEventListener("resume",U,!1),fn().toLowerCase().match(/android/)||w.addEventListener("visibilitychange",q,!1)}).o(function(Te){return Fy(m).then(function(){throw Te})})}).oa(function(){U&&w.removeEventListener("resume",U,!1),q&&w.removeEventListener("visibilitychange",q,!1),E&&E.cancel(),S&&m.Ta(S),m.c=null})};function k4(o,u,f,p,m){var w=C4(),E=new Qr(u,p,null,w,new k("no-auth-event"),null,m),S=yt("BuildInfo.packageName",l);if(typeof S!="string")throw new k("invalid-cordova-configuration");var U=yt("BuildInfo.displayName",l),q={};if(fn().toLowerCase().match(/iphone|ipad|ipod/))q.ibi=S;else if(fn().toLowerCase().match(/android/))q.apn=S;else return mt(new k("operation-not-supported-in-this-environment"));U&&(q.appDisplayName=U),w=A4(w),q.sessionId=w;var Te=yl(o.v,o.i,o.l,u,f,null,p,o.m,q,o.u,m,o.s);return o.ma().then(function(){var rt=o.h;return o.C.a.set(Py,E.w(),rt)}).then(function(){var rt=yt("cordova.plugins.browsertab.isAvailable",l);if(typeof rt!="function")throw new k("invalid-cordova-configuration");var Ge=null;rt(function(Yt){if(Yt){if(Ge=yt("cordova.plugins.browsertab.openUrl",l),typeof Ge!="function")throw new k("invalid-cordova-configuration");Ge(Te)}else{if(Ge=yt("cordova.InAppBrowser.open",l),typeof Ge!="function")throw new k("invalid-cordova-configuration");Yt=fn(),o.a=Ge(Te,Yt.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||Yt.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}})})}function pA(o,u){for(var f=0;fo.f&&(o.a=o.f),u)}function Xy(o,u){o.stop(),o.b=Wa($4(o,u)).then(function(){return wj()}).then(function(){return o.h()}).then(function(){Xy(o,!0)}).o(function(f){o.i(f)&&Xy(o,!1)})}Yy.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)};function Jy(o){this.f=o,this.b=this.a=null,this.c=Date.now()}Jy.prototype.w=function(){return{apiKey:this.f.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:this.c}};function OA(o,u){typeof u>"u"&&(o.b?(u=o.b,u=u.a-u.g):u=0),o.c=Date.now()+1e3*u}function PA(o,u){o.b=Qh(u[Xr]||""),o.a=u.refreshToken,u=u.expiresIn,OA(o,typeof u<"u"?Number(u):void 0)}function H4(o,u){o.b=u.b,o.a=u.a,o.c=u.c}function K4(o,u){return dV(o.f,u).then(function(f){return o.b=Qh(f.access_token),o.a=f.refresh_token,OA(o,f.expires_in),{accessToken:o.b.toString(),refreshToken:o.a}}).o(function(f){throw f.code=="auth/user-token-expired"&&(o.a=null),f})}Jy.prototype.getToken=function(o){return o=!!o,this.b&&!this.a?mt(new k("user-token-expired")):o||!this.b||Date.now()>this.c-3e4?this.a?K4(this,{grant_type:"refresh_token",refresh_token:this.a}):me(null):me({accessToken:this.b.toString(),refreshToken:this.a})};function Id(o,u){this.a=o||null,this.b=u||null,Un(this,{lastSignInTime:rl(u||null),creationTime:rl(o||null)})}function W4(o){return new Id(o.a,o.b)}Id.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}};function G4(o,u,f,p,m,w){Un(this,{uid:o,displayName:p||null,photoURL:m||null,email:f||null,phoneNumber:w||null,providerId:u})}function yr(o,u,f){this.N=[],this.l=o.apiKey,this.m=o.appName,this.s=o.authDomain||null;var p=se.SDK_VERSION?Ya(se.SDK_VERSION):null;this.a=new Yr(this.l,Xn(tt),p),(this.u=o.emulatorConfig||null)&&hd(this.a,this.u),this.h=new Jy(this.a),o_(this,u[Xr]),PA(this.h,u),le(this,"refreshToken",this.h.a),MA(this,f||{}),Fn.call(this),this.P=!1,this.s&&bs()&&(this.b=$y(this.s,this.l,this.m,this.u)),this.W=[],this.i=null,this.D=z4(this),this.ba=P(this.ib,this);var m=this;this.za=null,this.Pa=function(w){m.xa(w.h)},this.qa=null,this.Ba=function(w){Zy(m,w.c)},this.$=null,this.aa=[],this.Oa=function(w){Tl(m,w.f)},this.ja=null,this.S=new Qy(this,f),le(this,"multiFactor",this.S)}F(yr,Fn),yr.prototype.xa=function(o){this.za=o,RC(this.a,o)};function Zy(o,u){o.u=u,hd(o.a,u),o.b&&(u=o.b,o.b=$y(o.s,o.l,o.m,o.u),o.P&&(Vy(u,o),wd(o.b,o)))}yr.prototype.la=function(){return this.za};function e_(o,u){o.qa&&gr(o.qa,"languageCodeChanged",o.Pa),(o.qa=u)&&Nr(u,"languageCodeChanged",o.Pa)}function t_(o,u){o.$&&gr(o.$,"emulatorConfigChanged",o.Ba),(o.$=u)&&Nr(u,"emulatorConfigChanged",o.Ba)}function Tl(o,u){o.aa=u,NC(o.a,se.SDK_VERSION?Ya(se.SDK_VERSION,o.aa):null)}yr.prototype.Ga=function(){return J(this.aa)};function n_(o,u){o.ja&&gr(o.ja,"frameworkChanged",o.Oa),(o.ja=u)&&Nr(u,"frameworkChanged",o.Oa)}yr.prototype.ib=function(){this.D.b&&(this.D.stop(),this.D.start())};function r_(o){try{return se.app(o.m).auth()}catch{throw new k("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+o.m+"'!")}}function z4(o){return new Yy(function(){return o.I(!0)},function(u){return!!(u&&u.code=="auth/network-request-failed")},function(){var u=o.h.c-Date.now()-3e5;return 0"u"||pi(o)?{}:Gh(new Wh(o))}).then(function(p){return u.a.vb(f,p)}).then(function(p){if(u.email!=p)return u.reload()}).then(function(){}))},e.Fb=function(o,u){var f=this,p=null;return qt(this,this.I().then(function(m){return p=m,typeof u>"u"||pi(u)?{}:Gh(new Wh(u))}).then(function(m){return f.a.Fb(p,o,m)}).then(function(m){if(f.email!=m)return f.reload()}).then(function(){}))};function qt(o,u,f){var p=J4(o,u,f);return o.N.push(p),p.oa(function(){j(o.N,p)}),p.o(function(m){var w=null;throw m&&m.code==="auth/multi-factor-auth-required"&&(w=RA(m.w(),r_(o),P(o.jc,o))),w||m})}e.jc=function(o){var u=null,f=this;return o=eu(me(o),f.uid).then(function(p){return u=Sl(f,p,"reauthenticate"),wi(f,p),f.i=null,f.reload()}).then(function(){return u}),qt(this,o,!0)};function J4(o,u,f){return o.i&&!f?(u.cancel(),mt(o.i)):u.o(function(p){throw!p||p.code!="auth/user-disabled"&&p.code!="auth/user-token-expired"||(o.i||o.dispatchEvent(new su("userInvalidated")),o.i=p),p})}e.toJSON=function(){return this.w()},e.w=function(){var o={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.s,stsTokenManager:this.h.w(),redirectEventId:this.ga||null};return this.metadata&&ln(o,this.metadata.w()),Z(this.providerData,function(u){o.providerData.push(Tj(u))}),ln(o,this.S.w()),o};function qA(o){if(!o.apiKey)return null;var u={apiKey:o.apiKey,authDomain:o.authDomain,appName:o.appName,emulatorConfig:o.emulatorConfig},f={};if(o.stsTokenManager&&o.stsTokenManager.accessToken){f[Xr]=o.stsTokenManager.accessToken,f.refreshToken=o.stsTokenManager.refreshToken||null;var p=o.stsTokenManager.expirationTime;p&&(f.expiresIn=(p-Date.now())/1e3)}else return null;var m=new yr(u,f,o);return o.providerData&&Z(o.providerData,function(w){w&&u_(m,yi(w))}),o.redirectEventId&&(m.ga=o.redirectEventId),m}function Z4(o,u,f,p){var m=new yr(o,u);return f&&(m.ha=f),p&&Tl(m,p),m.reload().then(function(){return m})}function eB(o,u,f,p){var m=o.h,w={};return w[Xr]=m.b&&m.b.toString(),w.refreshToken=m.a,u=new yr(u||{apiKey:o.l,authDomain:o.s,appName:o.m},w),f&&(u.ha=f),p&&Tl(u,p),Sd(u,o),u}function tB(o){this.a=o,this.b=El()}var l_={name:"redirectUser",F:"session"};function $A(o){return ou(o.b,l_,o.a)}function nB(o,u){return o.b.get(l_,o.a).then(function(f){return f&&u&&(f.authDomain=u),qA(f||{})})}function f_(o){this.a=o,this.b=El(),this.c=null,this.f=rB(this),this.b.addListener(bi("local"),this.a,P(this.g,this))}f_.prototype.g=function(){var o=this,u=bi("local");au(this,function(){return me().then(function(){return o.c&&o.c.F!="local"?o.b.get(u,o.a):null}).then(function(f){if(f)return h_(o,"local").then(function(){o.c=u})})})};function h_(o,u){var f=[],p;for(p in ru)ru[p]!==u&&f.push(ou(o.b,bi(ru[p]),o.a));return f.push(ou(o.b,d_,o.a)),WU(f)}function rB(o){var u=bi("local"),f=bi("session"),p=bi("none");return y4(o.b,u,o.a).then(function(){return o.b.get(f,o.a)}).then(function(m){return m?f:o.b.get(p,o.a).then(function(w){return w?p:o.b.get(u,o.a).then(function(E){return E?u:o.b.get(d_,o.a).then(function(S){return S?bi(S):u})})})}).then(function(m){return o.c=m,h_(o,m.F)}).o(function(){o.c||(o.c=u)})}var d_={name:"persistence",F:"session"};function bi(o){return{name:"authUser",F:o}}f_.prototype.yb=function(o){var u=null,f=this;return m4(o),au(this,function(){return o!=f.c.F?f.b.get(f.c,f.a).then(function(p){return u=p,h_(f,o)}).then(function(){if(f.c=bi(o),u)return f.b.set(f.c,u,f.a)}):me()})};function iB(o){return au(o,function(){return o.b.set(d_,o.c.F,o.a)})}function HA(o,u){return au(o,function(){return o.b.set(o.c,u.w(),o.a)})}function KA(o){return au(o,function(){return ou(o.b,o.c,o.a)})}function WA(o,u,f){return au(o,function(){return o.b.get(o.c,o.a).then(function(p){return p&&u&&(p.authDomain=u),p&&f&&(p.emulatorConfig=f),qA(p||{})})})}function au(o,u){return o.f=o.f.then(u,u),o.f}function Jr(o){if(this.l=!1,le(this,"settings",new CA),le(this,"app",o),st(this).options&&st(this).options.apiKey)o=se.SDK_VERSION?Ya(se.SDK_VERSION):null,this.a=new Yr(st(this).options&&st(this).options.apiKey,Xn(tt),o);else throw new k("invalid-api-key");this.P=[],this.s=[],this.N=[],this.Pa=se.INTERNAL.createSubscribe(P(this.zc,this)),this.W=void 0,this.ib=se.INTERNAL.createSubscribe(P(this.Ac,this)),uu(this,null),this.i=new f_(st(this).options.apiKey+":"+st(this).name),this.D=new tB(st(this).options.apiKey+":"+st(this).name),this.$=Ct(this,lB(this)),this.h=Ct(this,fB(this)),this.ba=!1,this.ja=P(this.Zc,this),this.Ba=P(this.da,this),this.qa=P(this.mc,this),this.za=P(this.wc,this),this.Aa=P(this.xc,this),this.b=null,aB(this),this.INTERNAL={},this.INTERNAL.delete=P(this.delete,this),this.INTERNAL.logFramework=P(this.Gc,this),this.u=0,Fn.call(this),sB(this),this.J=[],this.R=null}F(Jr,Fn);function GA(o){tr.call(this,"languageCodeChanged"),this.h=o}F(GA,tr);function zA(o){tr.call(this,"emulatorConfigChanged"),this.c=o}F(zA,tr);function QA(o){tr.call(this,"frameworkChanged"),this.f=o}F(QA,tr),e=Jr.prototype,e.yb=function(o){return o=this.i.yb(o),Ct(this,o)},e.xa=function(o){this.aa===o||this.l||(this.aa=o,RC(this.a,this.aa),this.dispatchEvent(new GA(this.la())))},e.la=function(){return this.aa},e.fd=function(){var o=l.navigator;this.xa(o&&(o.languages&&o.languages[0]||o.language||o.userLanguage)||null)},e.gd=function(o,u){if(!this.R){if(!/^https?:\/\//.test(o))throw new k("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");u=u?!!u.disableWarnings:!1,oB(u),this.R={url:o,ec:u},this.settings.jb=!0,hd(this.a,this.R),this.dispatchEvent(new zA(this.R))}};function oB(o){typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),l.document&&!o&&$h().then(function(){var u=l.document.createElement("div");u.innerText="Running in emulator mode. Do not use with production credentials.",u.style.position="fixed",u.style.width="100%",u.style.backgroundColor="#ffffff",u.style.border=".1em solid #000000",u.style.color="#b50000",u.style.bottom="0px",u.style.left="0px",u.style.margin="0px",u.style.zIndex=1e4,u.style.textAlign="center",u.classList.add("firebase-emulator-warning"),l.document.body.appendChild(u)})}e.Gc=function(o){this.J.push(o),NC(this.a,se.SDK_VERSION?Ya(se.SDK_VERSION,this.J):null),this.dispatchEvent(new QA(this.J))},e.Ga=function(){return J(this.J)},e.zb=function(o){this.S===o||this.l||(this.S=o,this.a.b=this.S)},e.T=function(){return this.S};function sB(o){Object.defineProperty(o,"lc",{get:function(){return this.la()},set:function(u){this.xa(u)},enumerable:!1}),o.aa=null,Object.defineProperty(o,"ti",{get:function(){return this.T()},set:function(u){this.zb(u)},enumerable:!1}),o.S=null,Object.defineProperty(o,"emulatorConfig",{get:function(){if(this.R){var u=nr(this.R.url);u=yi({protocol:u.c,host:u.a,port:u.g,options:yi({disableWarnings:this.R.ec})})}else u=null;return u},enumerable:!1})}e.toJSON=function(){return{apiKey:st(this).options.apiKey,authDomain:st(this).options.authDomain,appName:st(this).name,currentUser:Re(this)&&Re(this).w()}};function p_(o){return o.Oa||mt(new k("auth-domain-config-required"))}function aB(o){var u=st(o).options.authDomain,f=st(o).options.apiKey;u&&bs()&&(o.Oa=o.$.then(function(){if(!o.l){if(o.b=$y(u,f,st(o).name,o.R),wd(o.b,o),Re(o)&&Il(Re(o)),o.m){Il(o.m);var p=o.m;p.xa(o.la()),e_(p,o),p=o.m,Tl(p,o.J),n_(p,o),p=o.m,Zy(p,o.R),t_(p,o),o.m=null}return o.b}}))}e.Gb=function(o,u){switch(o){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==u&&!!this.f;default:return!1}},e.na=function(o,u,f,p){o=="signInViaPopup"&&this.g==p&&(f&&this.C?this.C(f):u&&!f&&this.f&&this.f(u),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},e.Fa=function(o,u){return o=="signInViaRedirect"||o=="signInViaPopup"&&this.g==u&&this.f?P(this.ic,this):null},e.ic=function(o,u,f,p){var m=this,w={requestUri:o,postBody:p,sessionId:u,tenantId:f};return this.c&&(this.c.cancel(),this.c=null),m.$.then(function(){return Ps(m,my(m.a,w))})},e.Xc=function(o){if(!bs())return mt(new k("operation-not-supported-in-this-environment"));var u=this,f=Km(o.providerId),p=Es(),m=null;(!tl()||km())&&st(this).options.authDomain&&o.isOAuthProvider&&(m=yl(st(this).options.authDomain,st(this).options.apiKey,st(this).name,"signInViaPopup",o,null,p,se.SDK_VERSION||null,null,null,this.T(),this.R));var w=kS(m,f&&f.va,f&&f.ua);return f=p_(this).then(function(E){return _A(E,w,"signInViaPopup",o,p,!!m,u.T())}).then(function(){return new Fe(function(E,S){u.na("signInViaPopup",null,new k("cancelled-popup-request"),u.g),u.f=E,u.C=S,u.g=p,u.c=bA(u.b,u,"signInViaPopup",w,p)})}).then(function(E){return w&&ws(w),E?yi(E):null}).o(function(E){throw w&&ws(w),E}),Ct(this,f)},e.Yc=function(o){if(!bs())return mt(new k("operation-not-supported-in-this-environment"));var u=this,f=p_(this).then(function(){return iB(u.i)}).then(function(){return wA(u.b,"signInViaRedirect",o,void 0,u.T())});return Ct(this,f)};function YA(o){if(!bs())return mt(new k("operation-not-supported-in-this-environment"));var u=p_(o).then(function(){return o.b.ra()}).then(function(f){return f?yi(f):null});return Ct(o,u)}e.ra=function(){var o=this;return YA(this).then(function(u){return o.b&&Ed(o.b.b),u}).o(function(u){throw o.b&&Ed(o.b.b),u})},e.dd=function(o){if(!o)return mt(new k("null-user"));if(this.S!=o.tenantId)return mt(new k("tenant-id-mismatch"));var u=this,f={};f.apiKey=st(this).options.apiKey,f.authDomain=st(this).options.authDomain,f.appName=st(this).name;var p=eB(o,f,u.D,u.Ga());return Ct(this,this.h.then(function(){if(st(u).options.apiKey!=o.l)return p.reload()}).then(function(){return Re(u)&&o.uid==Re(u).uid?(Sd(Re(u),o),u.da(o)):(uu(u,p),Il(p),u.da(p))}).then(function(){Cl(u)}))};function uB(o,u){var f={};return f.apiKey=st(o).options.apiKey,f.authDomain=st(o).options.authDomain,f.appName=st(o).name,o.R&&(f.emulatorConfig=o.R),o.$.then(function(){return Z4(f,u,o.D,o.Ga())}).then(function(p){return Re(o)&&p.uid==Re(o).uid?(Sd(Re(o),p),o.da(p)):(uu(o,p),Il(p),o.da(p))}).then(function(){Cl(o)})}function uu(o,u){Re(o)&&(Q4(Re(o),o.Ba),gr(Re(o),"tokenChanged",o.qa),gr(Re(o),"userDeleted",o.za),gr(Re(o),"userInvalidated",o.Aa),i_(Re(o))),u&&(u.W.push(o.Ba),Nr(u,"tokenChanged",o.qa),Nr(u,"userDeleted",o.za),Nr(u,"userInvalidated",o.Aa),0this.u&&(this.u=0),this.u==0&&Re(this)&&i_(Re(this)),this.removeAuthTokenListener(o)},e.addAuthTokenListener=function(o){var u=this;this.s.push(o),Ct(this,this.h.then(function(){u.l||M(u.s,o)&&o(Ad(u))}))},e.removeAuthTokenListener=function(o){V(this.s,function(u){return u==o})};function hB(o,u){o.N.push(u),Ct(o,o.h.then(function(){!o.l&&M(o.N,u)&&o.W!==o.getUid()&&(o.W=o.getUid(),u(Ad(o)))}))}e.delete=function(){this.l=!0;for(var o=0;o"u"||pi(u)?{}:Gh(new Wh(u))}).then(function(p){return f.a.wb(o,p)}).then(function(){}))},e.Wc=function(o,u){return Ct(this,Ky(this,o,u,P(this.ab,this)))},e.Vc=function(o,u){var f=this;return Ct(this,me().then(function(){var p=u||el(),m=hC(o,p);if(p=Ym(p),!p)throw new k("argument-error","Invalid email link!");if(p.tenantId!==f.T())throw new k("tenant-id-mismatch");return f.ab(m)}))};function Al(){}Al.prototype.render=function(){},Al.prototype.reset=function(){},Al.prototype.getResponse=function(){},Al.prototype.execute=function(){};function cu(){this.a={},this.b=1e12}var v_=null;cu.prototype.render=function(o,u){return this.a[this.b.toString()]=new kd(o,u),this.b++},cu.prototype.reset=function(o){var u=g_(this,o);o=XA(o),u&&o&&(u.delete(),delete this.a[o])},cu.prototype.getResponse=function(o){return(o=g_(this,o))?o.getResponse():null},cu.prototype.execute=function(o){(o=g_(this,o))&&o.execute()};function g_(o,u){return(u=XA(u))&&o.a[u]||null}function XA(o){return(o=typeof o>"u"?1e12:o)?o.toString():null}function kd(o,u){this.g=!1,this.c=u,this.a=this.b=null,this.h=this.c.size!=="invisible",this.f=Gc(o);var f=this;this.i=function(){f.execute()},this.h?this.execute():Nr(this.f,"click",this.i)}kd.prototype.getResponse=function(){return m_(this),this.b},kd.prototype.execute=function(){m_(this);var o=this;this.a||(this.a=setTimeout(function(){o.b=_j();var u=o.c.callback,f=o.c["expired-callback"];if(u)try{u(o.b)}catch{}o.a=setTimeout(function(){if(o.a=null,o.b=null,f)try{f()}catch{}o.h&&o.execute()},6e4)},500))},kd.prototype.delete=function(){m_(this),this.g=!0,clearTimeout(this.a),this.a=null,gr(this.f,"click",this.i)};function m_(o){if(o.g)throw Error("reCAPTCHA mock was already deleted!")}function y_(){}le(y_,"FACTOR_ID","phone");function __(){}__.prototype.g=function(){return v_||(v_=new cu),me(v_)},__.prototype.c=function(){};var w_=null;function b_(){this.b=l.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var dB=new vi(Nh,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),pB=new So(3e4,6e4);b_.prototype.g=function(o){var u=this;return new Fe(function(f,p){var m=setTimeout(function(){p(new k("network-request-failed"))},pB.get());if(!l.grecaptcha||o!==u.f&&!u.b){l[u.a]=function(){if(l.grecaptcha){u.f=o;var E=l.grecaptcha.render;l.grecaptcha.render=function(S,U){return S=E(S,U),u.b++,S},clearTimeout(m),f(l.grecaptcha)}else clearTimeout(m),p(new k("internal-error"));delete l[u.a]};var w=nm(dB,{onload:u.a,hl:o||""});me(ly(w)).o(function(){clearTimeout(m),p(new k("internal-error","Unable to load external reCAPTCHA dependencies!"))})}else clearTimeout(m),f(l.grecaptcha)})},b_.prototype.c=function(){this.b--};var E_=null;function T_(o,u,f,p,m,w,E){if(le(this,"type","recaptcha"),this.c=this.f=null,this.J=!1,this.v=u,this.g=null,E?(w_||(w_=new __),E=w_):(E_||(E_=new b_),E=E_),this.m=E,this.a=f||{theme:"light",type:"image"},this.h=[],this.a[ek])throw new k("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i=this.a[vB]==="invisible",!l.document)throw new k("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!Gc(u)||!this.i&&Gc(u).hasChildNodes())throw new k("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new Yr(o,w||null,m||null),this.u=p||function(){return null};var S=this;this.l=[];var U=this.a[JA];this.a[JA]=function(Te){if(tk(S,Te),typeof U=="function")U(Te);else if(typeof U=="string"){var rt=yt(U,l);typeof rt=="function"&&rt(Te)}};var q=this.a[ZA];this.a[ZA]=function(){if(tk(S,null),typeof q=="function")q();else if(typeof q=="string"){var Te=yt(q,l);typeof Te=="function"&&Te()}}}var JA="callback",ZA="expired-callback",ek="sitekey",vB="size";function tk(o,u){for(var f=0;fm||m>=rk.length)throw new k("internal-error","Argument validator received an unsupported number of arguments.");f=rk[m],p=(p?"":f+" argument ")+(u.name?'"'+u.name+'" ':"")+"must be "+u.K+".";break e}p=null}}if(p)throw new k("argument-error",o+" failed: "+p)}var rk="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function ce(o,u){return{name:o||"",K:"a valid string",optional:!!u,M:function(f){return typeof f=="string"}}}function C_(o,u){return{name:o||"",K:"a boolean",optional:!!u,M:function(f){return typeof f=="boolean"}}}function Dt(o,u){return{name:o||"",K:"a valid object",optional:!!u,M:T}}function lu(o,u){return{name:o||"",K:"a function",optional:!!u,M:function(f){return typeof f=="function"}}}function Ei(o,u){return{name:o||"",K:"null",optional:!!u,M:function(f){return f===null}}}function mB(){return{name:"",K:"an HTML element",optional:!1,M:function(o){return!!(o&&o instanceof Element)}}}function yB(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(o){return!!(o&&o instanceof Jr)}}}function _B(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(o){return!!(o&&o instanceof se.app.App)}}}function Ro(o){return{name:o?o+"Credential":"credential",K:o?"a valid "+o+" credential":"a valid credential",optional:!1,M:function(u){if(!u)return!1;var f=!o||u.providerId===o;return!(!u.ka||!f)}}}function ik(){return{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(o){return o?!!o.tb:!1}}}function fu(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(o){return!!(o&&o.providerId&&o.hasOwnProperty&&o.hasOwnProperty("isOAuthProvider"))}}}function A_(o,u){return T(o)&&typeof o.type=="string"&&o.type===u&&typeof o.Ha=="function"}function ok(o){return T(o)&&typeof o.uid=="string"}function Nd(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(o){return!(!o||typeof o.type!="string"||typeof o.verify!="function")}}}function xt(o,u,f,p){return{name:f||"",K:o.K+" or "+u.K,optional:!!p,M:function(m){return o.M(m)||u.M(m)}}}function bt(o,u){for(var f in u){var p=u[f].name;o[p]=ak(p,o[f],u[f].j)}}function sk(o,u){for(var f in u){var p=u[f].name;p!==f&&Object.defineProperty(o,p,{get:re(function(m){return this[m]},f),set:re(function(m,w,E,S){nk(m,[E],[S],!0),this[w]=S},p,f,u[f].lb),enumerable:!0})}}function Ot(o,u,f,p){o[u]=ak(u,f,p)}function ak(o,u,f){function p(){var E=Array.prototype.slice.call(arguments);return nk(m,f,E),u.apply(this,E)}if(!f)return u;var m=wB(o),w;for(w in u)p[w]=u[w];for(w in u.prototype)p.prototype[w]=u.prototype[w];return p}function wB(o){return o=o.split("."),o[o.length-1]}bt(Jr.prototype,{kb:{name:"applyActionCode",j:[ce("code")]},Sa:{name:"checkActionCode",j:[ce("code")]},ob:{name:"confirmPasswordReset",j:[ce("code"),ce("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[ce("email"),ce("password")]},hc:{name:"fetchSignInMethodsForEmail",j:[ce("email")]},ra:{name:"getRedirectResult",j:[]},Bc:{name:"isSignInWithEmailLink",j:[ce("emailLink")]},Hc:{name:"onAuthStateChanged",j:[xt(Dt(),lu(),"nextOrObserver"),lu("opt_error",!0),lu("opt_completed",!0)]},Ic:{name:"onIdTokenChanged",j:[xt(Dt(),lu(),"nextOrObserver"),lu("opt_error",!0),lu("opt_completed",!0)]},wb:{name:"sendPasswordResetEmail",j:[ce("email"),xt(Dt("opt_actionCodeSettings",!0),Ei(null,!0),"opt_actionCodeSettings",!0)]},xb:{name:"sendSignInLinkToEmail",j:[ce("email"),Dt("actionCodeSettings")]},yb:{name:"setPersistence",j:[ce("persistence")]},Sc:{name:"signInAndRetrieveDataWithCredential",j:[Ro()]},Ab:{name:"signInAnonymously",j:[]},ab:{name:"signInWithCredential",j:[Ro()]},Tc:{name:"signInWithCustomToken",j:[ce("token")]},Uc:{name:"signInWithEmailAndPassword",j:[ce("email"),ce("password")]},Vc:{name:"signInWithEmailLink",j:[ce("email"),ce("emailLink",!0)]},Wc:{name:"signInWithPhoneNumber",j:[ce("phoneNumber"),Nd()]},Xc:{name:"signInWithPopup",j:[fu()]},Yc:{name:"signInWithRedirect",j:[fu()]},dd:{name:"updateCurrentUser",j:[xt(function(o){return{name:"user",K:"an instance of Firebase User",optional:!!o,M:function(u){return!!(u&&u instanceof yr)}}}(),Ei(),"user")]},Bb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[ce(null,!0)]},fd:{name:"useDeviceLanguage",j:[]},gd:{name:"useEmulator",j:[ce("url"),Dt("options",!0)]},jd:{name:"verifyPasswordResetCode",j:[ce("code")]}}),sk(Jr.prototype,{lc:{name:"languageCode",lb:xt(ce(),Ei(),"languageCode")},ti:{name:"tenantId",lb:xt(ce(),Ei(),"tenantId")}}),Jr.Persistence=ru,Jr.Persistence.LOCAL="local",Jr.Persistence.SESSION="session",Jr.Persistence.NONE="none",bt(yr.prototype,{delete:{name:"delete",j:[]},oc:{name:"getIdTokenResult",j:[C_("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[C_("opt_forceRefresh",!0)]},Cc:{name:"linkAndRetrieveDataWithCredential",j:[Ro()]},rb:{name:"linkWithCredential",j:[Ro()]},Dc:{name:"linkWithPhoneNumber",j:[ce("phoneNumber"),Nd()]},Ec:{name:"linkWithPopup",j:[fu()]},Fc:{name:"linkWithRedirect",j:[fu()]},Lc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[Ro()]},ub:{name:"reauthenticateWithCredential",j:[Ro()]},Mc:{name:"reauthenticateWithPhoneNumber",j:[ce("phoneNumber"),Nd()]},Nc:{name:"reauthenticateWithPopup",j:[fu()]},Oc:{name:"reauthenticateWithRedirect",j:[fu()]},reload:{name:"reload",j:[]},vb:{name:"sendEmailVerification",j:[xt(Dt("opt_actionCodeSettings",!0),Ei(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[ce(null,!0)]},cd:{name:"unlink",j:[ce("provider")]},Cb:{name:"updateEmail",j:[ce("email")]},Db:{name:"updatePassword",j:[ce("password")]},ed:{name:"updatePhoneNumber",j:[Ro("phone")]},Eb:{name:"updateProfile",j:[Dt("profile")]},Fb:{name:"verifyBeforeUpdateEmail",j:[ce("email"),xt(Dt("opt_actionCodeSettings",!0),Ei(null,!0),"opt_actionCodeSettings",!0)]}}),bt(cu.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),bt(Al.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),bt(Fe.prototype,{oa:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),sk(CA.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",lb:C_("appVerificationDisabledForTesting")}}),bt(Hy.prototype,{confirm:{name:"confirm",j:[ce("verificationCode")]}}),Ot(Za,"fromJSON",function(o){o=typeof o=="string"?JSON.parse(o):o;for(var u,f=[$j,Hj,Kj,qj],p=0;p>>0),O=0;function L(o,u,f){return o.call.apply(o.bind,arguments)}function $(o,u,f){if(!o)throw Error();if(2o.b&&(o.b++,u.next=o.a,o.a=u)}function $i(){this.b=this.a=null}var Kc=new Mn(function(){return new ie},function(o){o.reset()});$i.prototype.add=function(o,u){var f=Kc.get();f.set(o,u),this.b?this.b.next=f:this.a=f,this.b=f};function B(){var o=GI,u=null;return o.a&&(u=o.a,o.a=o.a.next,o.a||(o.b=null),u.next=null),u}function ie(){this.next=this.b=this.a=null}ie.prototype.set=function(o,u){this.a=o,this.b=u,this.next=null},ie.prototype.reset=function(){this.next=this.b=this.a=null};var ne=Array.prototype.indexOf?function(o,u){return Array.prototype.indexOf.call(o,u,void 0)}:function(o,u){if(typeof o=="string")return typeof u!="string"||u.length!=1?-1:o.indexOf(u,0);for(var f=0;fu?null:typeof o=="string"?o.charAt(u):o[u]}function M(o,u){return 0<=ne(o,u)}function j(o,u){u=ne(o,u);var f;return(f=0<=u)&&Array.prototype.splice.call(o,u,1),f}function V(o,u){var f=0;He(o,function(p,m){u.call(void 0,p,m,o)&&Array.prototype.splice.call(o,m,1).length==1&&f++})}function Q(o){return Array.prototype.concat.apply([],arguments)}function J(o){var u=o.length;if(0/g,fe=/"/g,ve=/'/g,Ee=/\x00/g,Me=/[\x00&<>"']/;function ye(o,u){return o.indexOf(u)!=-1}function Ge(o,u){return ou?1:0}var ct;e:{var Jn=l.navigator;if(Jn){var Hi=Jn.userAgent;if(Hi){ct=Hi;break e}}ct=""}function It(o){return ye(ct,o)}function wo(o,u){for(var f in o)u.call(void 0,o[f],f,o)}function pi(o){for(var u in o)return!1;return!0}function St(o){var u={},f;for(f in o)u[f]=o[f];return u}var pr="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function cn(o,u){for(var f,p,m=1;m"}else w=o===void 0?"undefined":o===null?"null":typeof o;Xn("Argument is not a %s (or a non-Element, non-Location mock); got: %s",u,w)}}function vi(o,u){this.a=o===xh&&u||"",this.b=kI}vi.prototype.ta=!0,vi.prototype.sa=function(){return this.a},vi.prototype.toString=function(){return"Const{"+this.a+"}"};function tm(o){return o instanceof vi&&o.constructor===vi&&o.b===kI?o.a:(Xn("expected object of type Const, got '"+o+"'"),"type_error:Const")}var kI={},xh={},Oh;function RI(){if(Oh===void 0){var o=null,u=l.trustedTypes;if(u&&u.createPolicy){try{o=u.createPolicy("goog#html",{createHTML:se,createScript:se,createScriptURL:se})}catch(f){l.console&&l.console.error(f.message)}Oh=o}else Oh=o}return Oh}function $a(o,u){this.a=u===xI?o:""}$a.prototype.ta=!0,$a.prototype.sa=function(){return this.a.toString()},$a.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};function NI(o){return o instanceof $a&&o.constructor===$a?o.a:(Xn("expected object of type TrustedResourceUrl, got '"+o+"' of type "+y(o)),"type_error:TrustedResourceUrl")}function nm(o,u){var f=tm(o);if(!RU.test(f))throw Error("Invalid TrustedResourceUrl format: "+f);return o=f.replace(kU,function(p,m){if(!Object.prototype.hasOwnProperty.call(u,m))throw Error('Found marker, "'+m+'", in format string, "'+f+'", but no valid label mapping found in args: '+JSON.stringify(u));return p=u[m],p instanceof vi?tm(p):encodeURIComponent(String(p))}),NU(o)}var kU=/%{(\w+)}/g,RU=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,xI={};function NU(o){var u=RI();return o=u?u.createScriptURL(o):o,new $a(o,xI)}function Zn(o,u){this.a=u===Wc?o:""}Zn.prototype.ta=!0,Zn.prototype.sa=function(){return this.a.toString()},Zn.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};function Ph(o){return o instanceof Zn&&o.constructor===Zn?o.a:(Xn("expected object of type SafeUrl, got '"+o+"' of type "+y(o)),"type_error:SafeUrl")}var xU=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,OU=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,OI=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function PI(o){if(o instanceof Zn)return o;if(o=typeof o=="object"&&o.ta?o.sa():String(o),OI.test(o))o=new Zn(o,Wc);else{o=String(o),o=o.replace(/(%0A|%0D)/g,"");var u=o.match(OU);o=u&&xU.test(u[1])?new Zn(o,Wc):null}return o}function DI(o){return o instanceof Zn?o:(o=typeof o=="object"&&o.ta?o.sa():String(o),OI.test(o)||(o="about:invalid#zClosurez"),new Zn(o,Wc))}var Wc={},MI=new Zn("about:invalid#zClosurez",Wc);function Ha(o,u,f){this.a=f===LI?o:""}Ha.prototype.ta=!0,Ha.prototype.sa=function(){return this.a.toString()},Ha.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};function PU(o){return o instanceof Ha&&o.constructor===Ha?o.a:(Xn("expected object of type SafeHtml, got '"+o+"' of type "+y(o)),"type_error:SafeHtml")}var LI={};function DU(o,u){AI(o,"HTMLScriptElement"),o.src=NI(u),(u=o.ownerDocument&&o.ownerDocument.defaultView)&&u!=l?u=v(u.document):(d===null&&(d=v(l.document)),u=d),u&&o.setAttribute("nonce",u)}function FI(o,u,f,p){return o=o instanceof Zn?o:DI(o),u=u||l,f=f instanceof vi?tm(f):f||"",u.open(Ph(o),f,p,void 0)}function UI(o,u){for(var f=o.split("%s"),p="",m=Array.prototype.slice.call(arguments,1);m.length&&1")!=-1&&(o=o.replace(pe,">")),o.indexOf('"')!=-1&&(o=o.replace(fe,""")),o.indexOf("'")!=-1&&(o=o.replace(ve,"'")),o.indexOf("\0")!=-1&&(o=o.replace(Ee,"�"))),o}function im(o){return im[" "](o),o}im[" "]=g;function MU(o,u){var f=jU;return Object.prototype.hasOwnProperty.call(f,o)?f[o]:f[o]=u(o)}var LU=It("Opera"),Gr=It("Trident")||It("MSIE"),jI=It("Edge"),FU=jI||Gr,VI=It("Gecko")&&!(ye(ct.toLowerCase(),"webkit")&&!It("Edge"))&&!(It("Trident")||It("MSIE"))&&!It("Edge"),UU=ye(ct.toLowerCase(),"webkit")&&!It("Edge");function BI(){var o=l.document;return o?o.documentMode:void 0}var Dh;e:{var om="",sm=function(){var o=ct;if(VI)return/rv:([^\);]+)(\)|;)/.exec(o);if(jI)return/Edge\/([\d\.]+)/.exec(o);if(Gr)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(o);if(UU)return/WebKit\/(\S+)/.exec(o);if(LU)return/(?:Version)[ \/]?(\S+)/.exec(o)}();if(sm&&(om=sm?sm[1]:""),Gr){var am=BI();if(am!=null&&am>parseFloat(om)){Dh=String(am);break e}}Dh=om}var jU={};function qI(o){return MU(o,function(){for(var u=0,f=z(String(Dh)).split("."),p=z(String(o)).split("."),m=Math.max(f.length,p.length),w=0;u==0&&w"),w=w.join("")}return w=Mh(m,w),E&&(typeof E=="string"?w.className=E:Array.isArray(E)?w.className=E.join(" "):HI(w,E)),2"u"&&typeof window<"u"&&window.postMessage&&window.addEventListener&&!It("Presto")&&(o=function(){var m=Mh(document,"IFRAME");m.style.display="none",document.documentElement.appendChild(m);var w=m.contentWindow;m=w.document,m.open(),m.close();var E="callImmediate"+Math.random(),S=w.location.protocol=="file:"?"*":w.location.protocol+"//"+w.location.host;m=P(function(U){(S=="*"||U.origin==S)&&U.data==E&&this.port1.onmessage()},this),w.addEventListener("message",m,!1),this.port1={},this.port2={postMessage:function(){w.postMessage(E,S)}}}),typeof o<"u"&&!It("Trident")&&!It("MSIE")){var u=new o,f={},p=f;return u.port1.onmessage=function(){if(f.next!==void 0){f=f.next;var m=f.Hb;f.Hb=null,m()}},function(m){p.next={Hb:m},p=p.next,u.port2.postMessage(0)}}return function(m){l.setTimeout(m,0)}}function Lh(o,u){Fh||HU(),lm||(Fh(),lm=!0),GI.add(o,u)}var Fh;function HU(){if(l.Promise&&l.Promise.resolve){var o=l.Promise.resolve(void 0);Fh=function(){o.then(zI)}}else Fh=function(){var u=zI;!b(l.setImmediate)||l.Window&&l.Window.prototype&&!It("Edge")&&l.Window.prototype.setImmediate==l.setImmediate?(cm||(cm=$U()),cm(u)):l.setImmediate(u)}}var lm=!1,GI=new $i;function zI(){for(var o;o=B();){try{o.a.call(o.b)}catch(u){WI(u)}un(Kc,o)}lm=!1}function Ue(o,u){if(this.a=vs,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,o!=g)try{var f=this;o.call(u,function(p){gs(f,zc,p)},function(p){if(!(p instanceof Ka))try{throw p instanceof Error?p:Error("Promise rejected.")}catch{}gs(f,Ki,p)})}catch(p){gs(this,Ki,p)}}var vs=0,zc=2,Ki=3;function QI(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}QI.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var YI=new Mn(function(){return new QI},function(o){o.reset()});function fm(o,u,f){var p=YI.get();return p.g=o,p.b=u,p.f=f,p}function me(o){if(o instanceof Ue)return o;var u=new Ue(g);return gs(u,zc,o),u}function mt(o){return new Ue(function(u,f){f(o)})}function XI(o,u,f){tS(o,u,f,null)||Lh(re(u,o))}function KU(o){return new Ue(function(u,f){var p=o.length,m=[];if(p)for(var w=function(q,Te){p--,m[q]=Te,p==0&&u(m)},E=function(q){f(q)},S=0,U;S=o.keyCode)&&(o.keyCode=-1)}catch{}},ms.prototype.g=function(){return this.a};var Qc="closure_listenable_"+(1e6*Math.random()|0),ZU=0;function ej(o,u,f,p,m){this.listener=o,this.proxy=null,this.src=u,this.type=f,this.capture=!!p,this.Wa=m,this.key=++ZU,this.wa=this.Qa=!1}function jh(o){o.wa=!0,o.listener=null,o.proxy=null,o.src=null,o.Wa=null}function Vh(o){this.src=o,this.a={},this.b=0}Vh.prototype.add=function(o,u,f,p,m){var w=o.toString();o=this.a[w],o||(o=this.a[w]=[],this.b++);var E=pm(o,u,p,m);return-1p.keyCode||p.returnValue!=null)){e:{var m=!1;if(p.keyCode==0)try{p.keyCode=-1;break e}catch{m=!0}(m||p.returnValue==null)&&(p.returnValue=!0)}for(p=[],m=u.b;m;m=m.parentNode)p.push(m);for(o=o.type,m=p.length-1;0<=m;m--){u.b=p[m];var w=hS(p[m],o,!0,u);f=f&&w}for(m=0;m>>0);function _m(o){return b(o)?o:(o[ym]||(o[ym]=function(u){return o.handleEvent(u)}),o[ym])}function Ln(){Uh.call(this),this.v=new Vh(this),this.bc=this,this.hb=null}F(Ln,Uh),Ln.prototype[Qc]=!0,Ln.prototype.addEventListener=function(o,u,f,p){Nr(this,o,u,f,p)},Ln.prototype.removeEventListener=function(o,u,f,p){vr(this,o,u,f,p)},Ln.prototype.dispatchEvent=function(o){var u,f=this.hb;if(f)for(u=[];f;f=f.hb)u.push(f);f=this.bc;var p=o.type||o;if(typeof o=="string")o=new er(o,f);else if(o instanceof er)o.target=o.target||f;else{var m=o;o=new er(p,f),cn(o,m)}if(m=!0,u)for(var w=u.length-1;0<=w;w--){var E=o.b=u[w];m=qh(E,p,!0,o)&&m}if(E=o.b=f,m=qh(E,p,!0,o)&&m,m=qh(E,p,!1,o)&&m,u)for(w=0;wu)throw Error("Bad port number "+u);o.g=u}else o.g=null}function Tm(o,u,f){u instanceof _s?(o.b=u,lj(o.b,o.i)):(f||(u=Zc(u,uj)),o.b=new _s(u,o.i))}function Nt(o,u,f){o.b.set(u,f)}function xr(o,u){return o.b.get(u)}function tr(o){return o instanceof Eo?new Eo(o):new Eo(o,void 0)}function $h(o,u,f,p){var m=new Eo(null,void 0);return o&&Yc(m,o),u&&(m.a=u),f&&Xc(m,f),p&&(m.f=p),m}function Jc(o,u){return o?u?decodeURI(o.replace(/%25/g,"%2525")):decodeURIComponent(o):""}function Zc(o,u,f){return typeof o=="string"?(o=encodeURI(o).replace(u,oj),f&&(o=o.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),o):null}function oj(o){return o=o.charCodeAt(0),"%"+(o>>4&15).toString(16)+(o&15).toString(16)}var yS=/[#\/\?@]/g,sj=/[#\?:]/g,aj=/[#\?]/g,uj=/[#\?@]/g,cj=/#/g;function _s(o,u){this.b=this.a=null,this.c=o||null,this.f=!!u}function To(o){o.a||(o.a=new Ga,o.b=0,o.c&&ij(o.c,function(u,f){o.add(decodeURIComponent(u.replace(/\+/g," ")),f)}))}function _S(o){var u=gS(o);if(typeof u>"u")throw Error("Keys are undefined");var f=new _s(null,void 0);o=vS(o);for(var p=0;p2*o.c&&Em(o)))}e.clear=function(){this.a=this.c=null,this.b=0};function Im(o,u){return To(o),u=za(o,u),ys(o.a.b,u)}e.forEach=function(o,u){To(this),this.a.forEach(function(f,p){Z(f,function(m){o.call(u,m,p,this)},this)},this)},e.Y=function(){To(this);for(var o=this.a.X(),u=this.a.Y(),f=[],p=0;po?!1:!Gr||!bo||9',o=(p=RI())?p.createHTML(o):o,o=new Ha(o,null,LI),p=E.document)&&(p.write(PU(o)),p.close())):(E=FI(u,p,f,E))&&o.noopener&&(E.opener=null),E)try{E.focus()}catch{}return E}function pj(o){return new Ue(function(u){function f(){Wa(2e3).then(function(){if(!o||o.closed)u();else return f()})}return f()})}var vj=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,gj=/^[^@]+@[^@]+$/;function Hh(){var o=null;return new Ue(function(u){l.document.readyState=="complete"?u():(o=function(){u()},mm(window,"load",o))}).o(function(u){throw vr(window,"load",o),u})}function mj(){return Am(void 0)?Hh().then(function(){return new Ue(function(o,u){var f=l.document,p=setTimeout(function(){u(Error("Cordova framework is not ready."))},1e3);f.addEventListener("deviceready",function(){clearTimeout(p),o()},!1)})}):mt(Error("Cordova must run in an Android or iOS file scheme."))}function Am(o){return o=o||ln(),!(Xa()!=="file:"&&Xa()!=="ionic:"||!o.toLowerCase().match(/iphone|ipad|ipod|android/))}function km(){var o=l.window;try{return!(!o||o==o.top)}catch{return!1}}function zr(){return typeof l.WorkerGlobalScope<"u"&&typeof l.importScripts=="function"}function mi(){return oe.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":oe.INTERNAL.hasOwnProperty("node")?"Node":zr()?"Worker":"Browser"}function RS(){var o=mi();return o==="ReactNative"||o==="Node"}function yj(){for(var o=50,u=[];0"u"?null:ES(o)}function OS(o){var u={},f;for(f in o)o.hasOwnProperty(f)&&o[f]!==null&&o[f]!==void 0&&(u[f]=o[f]);return u}function Ja(o){if(o!==null)return JSON.parse(o)}function Es(o){return o||Math.floor(1e9*Math.random()).toString()}function PS(o){return o=o||ln(),!(Qa(o)=="Safari"||o.toLowerCase().match(/iphone|ipad|ipod/))}function DS(){var o=l.___jsl;if(o&&o.H){for(var u in o.H)if(o.H[u].r=o.H[u].r||[],o.H[u].L=o.H[u].L||[],o.H[u].r=o.H[u].L.concat(),o.CP)for(var f=0;fu)throw Error("Short delay should be less than long delay!");this.a=o,this.c=u,o=ln(),u=mi(),this.b=AS(o)||u==="ReactNative"}Io.prototype.get=function(){var o=l.navigator;return!(o&&typeof o.onLine=="boolean"&&(Kh()||Xa()==="chrome-extension:"||typeof o.connection<"u"))||o.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};function xm(){var o=l.document;return o&&typeof o.visibilityState<"u"?o.visibilityState=="visible":!0}function _j(){var o=l.document,u=null;return xm()||!o?me():new Ue(function(f){u=function(){xm()&&(o.removeEventListener("visibilitychange",u,!1),f())},o.addEventListener("visibilitychange",u,!1)}).o(function(f){throw o.removeEventListener("visibilitychange",u,!1),f})}function rl(o){try{var u=new Date(parseInt(o,10));if(!isNaN(u.getTime())&&!/[^0-9]/.test(o))return u.toUTCString()}catch{}return null}function MS(){return!(!yt("fireauth.oauthhelper",l)&&!yt("fireauth.iframe",l))}function wj(){var o=l.navigator;return o&&o.serviceWorker&&o.serviceWorker.controller||null}function bj(){var o=l.navigator;return o&&o.serviceWorker?me().then(function(){return o.serviceWorker.ready}).then(function(u){return u.active||null}).o(function(){return null}):me(null)}var LS={};function Om(o){LS[o]||(LS[o]=!0,typeof console<"u"&&typeof console.warn=="function"&&console.warn(o))}var Pm;try{var Dm={};Object.defineProperty(Dm,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(Dm,"abcd",{configurable:!0,enumerable:!0,value:2}),Pm=Dm.abcd==2}catch{Pm=!1}function le(o,u,f){Pm?Object.defineProperty(o,u,{configurable:!0,enumerable:!0,value:f}):o[u]=f}function Fn(o,u){if(u)for(var f in u)u.hasOwnProperty(f)&&le(o,f,u[f])}function yi(o){var u={};return Fn(u,o),u}function Ej(o){var u={},f;for(f in o)o.hasOwnProperty(f)&&(u[f]=o[f]);return u}function Tj(o,u){if(!u||!u.length)return!0;if(!o)return!1;for(var f=0;f"u")throw new k("missing-continue-uri");if(typeof u!="string"||typeof u=="string"&&!u.length)throw new k("invalid-continue-uri");this.h=u,this.b=this.a=null,this.g=!1;var f=o[KS];if(f&&typeof f=="object"){u=f[YS];var p=f[zS];if(f=f[QS],typeof u=="string"&&u.length){if(this.a=u,typeof p<"u"&&typeof p!="boolean")throw new k("argument-error",zS+" property must be a boolean when specified.");if(this.g=!!p,typeof f<"u"&&(typeof f!="string"||typeof f=="string"&&!f.length))throw new k("argument-error",QS+" property must be a non empty string when specified.");this.b=f||null}else{if(typeof u<"u")throw new k("argument-error",YS+" property must be a non empty string when specified.");if(typeof p<"u"||typeof f<"u")throw new k("missing-android-pkg-name")}}else if(typeof f<"u")throw new k("argument-error",KS+" property must be a non null object when specified.");if(this.f=null,(u=o[GS])&&typeof u=="object"){if(u=u[XS],typeof u=="string"&&u.length)this.f=u;else if(typeof u<"u")throw new k("argument-error",XS+" property must be a non empty string when specified.")}else if(typeof u<"u")throw new k("argument-error",GS+" property must be a non null object when specified.");if(u=o[$m],typeof u<"u"&&typeof u!="boolean")throw new k("argument-error",$m+" property must be a boolean when specified.");if(this.c=!!u,o=o[WS],typeof o<"u"&&(typeof o!="string"||typeof o=="string"&&!o.length))throw new k("argument-error",WS+" property must be a non empty string when specified.");this.i=o||null}var KS="android",WS="dynamicLinkDomain",$m="handleCodeInApp",GS="iOS",Lj="url",zS="installApp",QS="minimumVersion",YS="packageName",XS="bundleId";function zh(o){var u={};u.continueUrl=o.h,u.canHandleCodeInApp=o.c,(u.androidPackageName=o.a)&&(u.androidMinimumVersion=o.b,u.androidInstallApp=o.g),u.iOSBundleId=o.f,u.dynamicLinkDomain=o.i;for(var f in u)u[f]===null&&delete u[f];return u}function Fj(o){return Ae(o,function(u){return u=u.toString(16),1>4),E!=64&&(u(w<<4&240|E>>2),S!=64&&u(E<<6&192|S))}}function Vj(){if(!sl){sl={};for(var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),u=["+/=","+/","-_=","-_.","-_"],f=0;5>f;f++)for(var p=o.concat(u[f].split("")),m=0;mthis.a?this.a:o),this.b=u.provider_id||u.firebase&&u.firebase.sign_in_provider||null,this.f=u.firebase&&u.firebase.tenant||null,this.c=!!u.is_anonymous||this.b=="anonymous"}Qh.prototype.T=function(){return this.f},Qh.prototype.l=function(){return this.c},Qh.prototype.toString=function(){return this.h};function Yh(o){try{return new Qh(o)}catch{return null}}function JS(o){if(!o||(o=o.split("."),o.length!=3))return null;o=o[1];for(var u=(4-o.length%4)%4,f=0;fm)o[f++]=String.fromCharCode(m);else if(191m){var w=p[u++];o[f++]=String.fromCharCode((m&31)<<6|w&63)}else if(239m){w=p[u++];var E=p[u++],S=p[u++],U=((m&7)<<18|(w&63)<<12|(E&63)<<6|S&63)-65536;o[f++]=String.fromCharCode(55296+(U>>10)),o[f++]=String.fromCharCode(56320+(U&1023))}else w=p[u++],E=p[u++],o[f++]=String.fromCharCode((m&15)<<12|(w&63)<<6|E&63)}return JSON.parse(o.join(""))}catch{}return null}var ZS="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),Xh=["client_id","response_type","scope","redirect_uri","state"],Hm={nd:{Ja:"locale",va:700,ua:600,fa:"facebook.com",Ya:Xh},pd:{Ja:null,va:500,ua:750,fa:"github.com",Ya:Xh},qd:{Ja:"hl",va:515,ua:680,fa:"google.com",Ya:Xh},wd:{Ja:"lang",va:485,ua:705,fa:"twitter.com",Ya:ZS},kd:{Ja:"locale",va:640,ua:600,fa:"apple.com",Ya:[]}};function Km(o){for(var u in Hm)if(Hm[u].fa==o)return Hm[u];return null}function eC(o){var u={};u["facebook.com"]=nC,u["google.com"]=iC,u["github.com"]=rC,u["twitter.com"]=oC;var f=o&&o[tC];try{if(f)return u[f]?new u[f](o):new _i(o);if(typeof o[Wm]<"u")return new Gm(o)}catch{}return null}var Wm="idToken",tC="providerId";function Gm(o){var u=o[tC];if(!u&&o[Wm]){var f=Yh(o[Wm]);f&&f.b&&(u=f.b)}if(!u)throw Error("Invalid additional user info!");(u=="anonymous"||u=="custom")&&(u=null),f=!1,typeof o.isNewUser<"u"?f=!!o.isNewUser:o.kind==="identitytoolkit#SignupNewUserResponse"&&(f=!0),le(this,"providerId",u),le(this,"isNewUser",f)}function _i(o){Gm.call(this,o),o=Ja(o.rawUserInfo||"{}"),le(this,"profile",Mm(o||{}))}F(_i,Gm);function nC(o){if(_i.call(this,o),this.providerId!="facebook.com")throw Error("Invalid provider ID!")}F(nC,_i);function rC(o){if(_i.call(this,o),this.providerId!="github.com")throw Error("Invalid provider ID!");le(this,"username",this.profile&&this.profile.login||null)}F(rC,_i);function iC(o){if(_i.call(this,o),this.providerId!="google.com")throw Error("Invalid provider ID!")}F(iC,_i);function oC(o){if(_i.call(this,o),this.providerId!="twitter.com")throw Error("Invalid provider ID!");le(this,"username",o.screenName||null)}F(oC,_i);function sC(o){var u=tr(o),f=xr(u,"link"),p=xr(tr(f),"link");return u=xr(u,"deep_link_id"),xr(tr(u),"link")||u||p||f||o}function Jh(o,u){if(!o&&!u)throw new k("internal-error","Internal assert: no raw session string available");if(o&&u)throw new k("internal-error","Internal assert: unable to determine the session type");this.a=o||null,this.b=u||null,this.type=this.a?al:Zh}var al="enroll",Zh="signin";Jh.prototype.Ha=function(){return this.a?me(this.a):me(this.b)},Jh.prototype.w=function(){return this.type==al?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}};function Za(){}Za.prototype.ka=function(){},Za.prototype.b=function(){},Za.prototype.c=function(){},Za.prototype.w=function(){};function eu(o,u){return o.then(function(f){if(f[Xr]){var p=Yh(f[Xr]);if(!p||u!=p.i)throw new k("user-mismatch");return f}throw new k("user-mismatch")}).o(function(f){throw f&&f.code&&f.code==ue+"user-not-found"?new k("user-mismatch"):f})}function Ts(o,u){if(u)this.a=u;else throw new k("internal-error","failed to construct a credential");le(this,"providerId",o),le(this,"signInMethod",o)}Ts.prototype.ka=function(o){return my(o,zm(this))},Ts.prototype.b=function(o,u){var f=zm(this);return f.idToken=u,yy(o,f)},Ts.prototype.c=function(o,u){return eu(_y(o,zm(this)),u)};function zm(o){return{pendingToken:o.a,requestUri:"http://localhost"}}Ts.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}};function Bj(o){if(o&&o.providerId&&o.signInMethod&&o.providerId.indexOf("saml.")==0&&o.pendingToken)try{return new Ts(o.providerId,o.pendingToken)}catch{}return null}function Wi(o,u,f){if(this.a=null,u.idToken||u.accessToken)u.idToken&&le(this,"idToken",u.idToken),u.accessToken&&le(this,"accessToken",u.accessToken),u.nonce&&!u.pendingToken&&le(this,"nonce",u.nonce),u.pendingToken&&(this.a=u.pendingToken);else if(u.oauthToken&&u.oauthTokenSecret)le(this,"accessToken",u.oauthToken),le(this,"secret",u.oauthTokenSecret);else throw new k("internal-error","failed to construct a credential");le(this,"providerId",o),le(this,"signInMethod",f)}Wi.prototype.ka=function(o){return my(o,Qm(this))},Wi.prototype.b=function(o,u){var f=Qm(this);return f.idToken=u,yy(o,f)},Wi.prototype.c=function(o,u){var f=Qm(this);return eu(_y(o,f),u)};function Qm(o){var u={};return o.idToken&&(u.id_token=o.idToken),o.accessToken&&(u.access_token=o.accessToken),o.secret&&(u.oauth_token_secret=o.secret),u.providerId=o.providerId,o.nonce&&!o.a&&(u.nonce=o.nonce),u={postBody:_S(u).toString(),requestUri:"http://localhost"},o.a&&(delete u.postBody,u.pendingToken=o.a),u}Wi.prototype.w=function(){var o={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(o.oauthIdToken=this.idToken),this.accessToken&&(o.oauthAccessToken=this.accessToken),this.secret&&(o.oauthTokenSecret=this.secret),this.nonce&&(o.nonce=this.nonce),this.a&&(o.pendingToken=this.a),o};function qj(o){if(o&&o.providerId&&o.signInMethod){var u={idToken:o.oauthIdToken,accessToken:o.oauthTokenSecret?null:o.oauthAccessToken,oauthTokenSecret:o.oauthTokenSecret,oauthToken:o.oauthTokenSecret&&o.oauthAccessToken,nonce:o.nonce,pendingToken:o.pendingToken};try{return new Wi(o.providerId,u,o.signInMethod)}catch{}}return null}function Is(o,u){this.Qc=u||[],Fn(this,{providerId:o,isOAuthProvider:!0}),this.Jb={},this.qb=(Km(o)||{}).Ja||null,this.pb=null}Is.prototype.Ka=function(o){return this.Jb=St(o),this};function aC(o){if(typeof o!="string"||o.indexOf("saml.")!=0)throw new k("argument-error",'SAML provider IDs must be prefixed with "saml."');Is.call(this,o,[])}F(aC,Is);function gr(o){Is.call(this,o,Xh),this.a=[]}F(gr,Is),gr.prototype.Ca=function(o){return M(this.a,o)||this.a.push(o),this},gr.prototype.Rb=function(){return J(this.a)},gr.prototype.credential=function(o,u){var f;if(T(o)?f={idToken:o.idToken||null,accessToken:o.accessToken||null,nonce:o.rawNonce||null}:f={idToken:o||null,accessToken:u||null},!f.idToken&&!f.accessToken)throw new k("argument-error","credential failed: must provide the ID token and/or the access token.");return new Wi(this.providerId,f,this.providerId)};function Ss(){gr.call(this,"facebook.com")}F(Ss,gr),le(Ss,"PROVIDER_ID","facebook.com"),le(Ss,"FACEBOOK_SIGN_IN_METHOD","facebook.com");function uC(o){if(!o)throw new k("argument-error","credential failed: expected 1 argument (the OAuth access token).");var u=o;return T(o)&&(u=o.accessToken),new Ss().credential({accessToken:u})}function Cs(){gr.call(this,"github.com")}F(Cs,gr),le(Cs,"PROVIDER_ID","github.com"),le(Cs,"GITHUB_SIGN_IN_METHOD","github.com");function cC(o){if(!o)throw new k("argument-error","credential failed: expected 1 argument (the OAuth access token).");var u=o;return T(o)&&(u=o.accessToken),new Cs().credential({accessToken:u})}function As(){gr.call(this,"google.com"),this.Ca("profile")}F(As,gr),le(As,"PROVIDER_ID","google.com"),le(As,"GOOGLE_SIGN_IN_METHOD","google.com");function lC(o,u){var f=o;return T(o)&&(f=o.idToken,u=o.accessToken),new As().credential({idToken:f,accessToken:u})}function tu(){Is.call(this,"twitter.com",ZS)}F(tu,Is),le(tu,"PROVIDER_ID","twitter.com"),le(tu,"TWITTER_SIGN_IN_METHOD","twitter.com");function fC(o,u){var f=o;if(T(f)||(f={oauthToken:o,oauthTokenSecret:u}),!f.oauthToken||!f.oauthTokenSecret)throw new k("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new Wi("twitter.com",f,"twitter.com")}function So(o,u,f){this.a=o,this.f=u,le(this,"providerId","password"),le(this,"signInMethod",f===Or.EMAIL_LINK_SIGN_IN_METHOD?Or.EMAIL_LINK_SIGN_IN_METHOD:Or.EMAIL_PASSWORD_SIGN_IN_METHOD)}So.prototype.ka=function(o){return this.signInMethod==Or.EMAIL_LINK_SIGN_IN_METHOD?je(o,CV,{email:this.a,oobCode:this.f}):je(o,jC,{email:this.a,password:this.f})},So.prototype.b=function(o,u){return this.signInMethod==Or.EMAIL_LINK_SIGN_IN_METHOD?je(o,AV,{idToken:u,email:this.a,oobCode:this.f}):je(o,UC,{idToken:u,email:this.a,password:this.f})},So.prototype.c=function(o,u){return eu(this.ka(o),u)},So.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}};function $j(o){return o&&o.email&&o.password?new So(o.email,o.password,o.signInMethod):null}function Or(){Fn(this,{providerId:"password",isOAuthProvider:!1})}function hC(o,u){if(u=Ym(u),!u)throw new k("argument-error","Invalid email link!");return new So(o,u.code,Or.EMAIL_LINK_SIGN_IN_METHOD)}function Ym(o){return o=sC(o),(o=HS(o))&&o.operation===Wh?o:null}Fn(Or,{PROVIDER_ID:"password"}),Fn(Or,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),Fn(Or,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"});function Co(o){if(!(o.fb&&o.eb||o.La&&o.ea))throw new k("internal-error");this.a=o,le(this,"providerId","phone"),this.fa="phone",le(this,"signInMethod","phone")}Co.prototype.ka=function(o){return o.gb(ul(this))},Co.prototype.b=function(o,u){var f=ul(this);return f.idToken=u,je(o,GV,f)},Co.prototype.c=function(o,u){var f=ul(this);return f.operation="REAUTH",o=je(o,zV,f),eu(o,u)},Co.prototype.w=function(){var o={providerId:"phone"};return this.a.fb&&(o.verificationId=this.a.fb),this.a.eb&&(o.verificationCode=this.a.eb),this.a.La&&(o.temporaryProof=this.a.La),this.a.ea&&(o.phoneNumber=this.a.ea),o};function Hj(o){if(o&&o.providerId==="phone"&&(o.verificationId&&o.verificationCode||o.temporaryProof&&o.phoneNumber)){var u={};return Z(["verificationId","verificationCode","temporaryProof","phoneNumber"],function(f){o[f]&&(u[f]=o[f])}),new Co(u)}return null}function ul(o){return o.a.La&&o.a.ea?{temporaryProof:o.a.La,phoneNumber:o.a.ea}:{sessionInfo:o.a.fb,code:o.a.eb}}function Gi(o){try{this.a=o||oe.auth()}catch{throw new k("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}Fn(this,{providerId:"phone",isOAuthProvider:!1})}Gi.prototype.gb=function(o,u){var f=this.a.a;return me(u.verify()).then(function(p){if(typeof p!="string")throw new k("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(u.type){case"recaptcha":var m=T(o)?o.session:null,w=T(o)?o.phoneNumber:o,E;return m&&m.type==al?E=m.Ha().then(function(S){return mV(f,{idToken:S,phoneEnrollmentInfo:{phoneNumber:w,recaptchaToken:p}})}):m&&m.type==Zh?E=m.Ha().then(function(S){return yV(f,{mfaPendingCredential:S,mfaEnrollmentId:o.multiFactorHint&&o.multiFactorHint.uid||o.multiFactorUid,phoneSignInInfo:{recaptchaToken:p}})}):E=gV(f,{phoneNumber:w,recaptchaToken:p}),E.then(function(S){return typeof u.reset=="function"&&u.reset(),S},function(S){throw typeof u.reset=="function"&&u.reset(),S});default:throw new k("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}})};function dC(o,u){if(!o)throw new k("missing-verification-id");if(!u)throw new k("missing-verification-code");return new Co({fb:o,eb:u})}Fn(Gi,{PROVIDER_ID:"phone"}),Fn(Gi,{PHONE_SIGN_IN_METHOD:"phone"});function Xm(o){if(o.temporaryProof&&o.phoneNumber)return new Co({La:o.temporaryProof,ea:o.phoneNumber});var u=o&&o.providerId;if(!u||u==="password")return null;var f=o&&o.oauthAccessToken,p=o&&o.oauthTokenSecret,m=o&&o.nonce,w=o&&o.oauthIdToken,E=o&&o.pendingToken;try{switch(u){case"google.com":return lC(w,f);case"facebook.com":return uC(f);case"github.com":return cC(f);case"twitter.com":return fC(f,p);default:return f||p||w||E?E?u.indexOf("saml.")==0?new Ts(u,E):new Wi(u,{pendingToken:E,idToken:o.oauthIdToken,accessToken:o.oauthAccessToken},u):new gr(u).credential({idToken:w,accessToken:f,rawNonce:m}):null}}catch{return null}}function Jm(o){if(!o.isOAuthProvider)throw new k("invalid-oauth-provider")}function Qr(o,u,f,p,m,w,E){if(this.c=o,this.b=u||null,this.g=f||null,this.f=p||null,this.i=w||null,this.h=E||null,this.a=m||null,this.g||this.a){if(this.g&&this.a)throw new k("invalid-auth-event");if(this.g&&!this.f)throw new k("invalid-auth-event")}else throw new k("invalid-auth-event")}Qr.prototype.getUid=function(){var o=[];return o.push(this.c),this.b&&o.push(this.b),this.f&&o.push(this.f),this.h&&o.push(this.h),o.join("-")},Qr.prototype.T=function(){return this.h},Qr.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};function pC(o){return o=o||{},o.type?new Qr(o.type,o.eventId,o.urlResponse,o.sessionId,o.error&&dt(o.error),o.postBody,o.tenantId):null}function Kj(){this.b=null,this.a=[]}var Zm=null;function Wj(o){var u=Zm;u.a.push(o),u.b||(u.b=function(f){for(var p=0;p Auth section -> Sign in method tab.",o):p=="http"||p=="https"?f=UI("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",o):u="operation-not-supported-in-this-environment",k.call(this,u,f)}F(ey,k);function cl(o,u,f){k.call(this,o,f),o=u||{},o.Kb&&le(this,"email",o.Kb),o.ea&&le(this,"phoneNumber",o.ea),o.credential&&le(this,"credential",o.credential),o.$b&&le(this,"tenantId",o.$b)}F(cl,k),cl.prototype.w=function(){var o={code:this.code,message:this.message};this.email&&(o.email=this.email),this.phoneNumber&&(o.phoneNumber=this.phoneNumber),this.tenantId&&(o.tenantId=this.tenantId);var u=this.credential&&this.credential.w();return u&&cn(o,u),o},cl.prototype.toJSON=function(){return this.w()};function ed(o){if(o.code){var u=o.code||"";u.indexOf(ue)==0&&(u=u.substring(ue.length));var f={credential:Xm(o),$b:o.tenantId};if(o.email)f.Kb=o.email;else if(o.phoneNumber)f.ea=o.phoneNumber;else if(!f.credential)return new k(u,o.message||void 0);return new cl(u,f,o.message)}return null}function ll(){}ll.prototype.c=null;function vC(o){return o.c||(o.c=o.b())}var ty;function td(){}F(td,ll),td.prototype.a=function(){var o=gC(this);return o?new ActiveXObject(o):new XMLHttpRequest},td.prototype.b=function(){var o={};return gC(this)&&(o[0]=!0,o[1]=!0),o};function gC(o){if(!o.f&&typeof XMLHttpRequest>"u"&&typeof ActiveXObject<"u"){for(var u=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],f=0;f=_C(this).value)for(b(u)&&(u=u()),o=new ry(o,String(u),this.f),f&&(o.a=f),f=this;f;)f=f.a};var sy={},rd=null;function ay(o){rd||(rd=new iy(""),sy[""]=rd,rd.c=Gj);var u;if(!(u=sy[o])){u=new iy(o);var f=o.lastIndexOf("."),p=o.substr(f+1);f=ay(o.substr(0,f)),f.b||(f.b={}),f.b[p]=u,u.a=f,sy[o]=u}return u}function Pr(o,u){o&&o.log(zj,u,void 0)}function id(o){this.f=o}F(id,ll),id.prototype.a=function(){return new od(this.f)},id.prototype.b=function(o){return function(){return o}}({});function od(o){Ln.call(this),this.u=o,this.h=void 0,this.readyState=uy,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=ay("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}F(od,Ln);var uy=0;e=od.prototype,e.open=function(o,u){if(this.readyState!=uy)throw this.abort(),Error("Error reopening a connection");this.s=o,this.f=u,this.readyState=1,dl(this)},e.send=function(o){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.a=!0;var u={headers:this.l,method:this.s,credentials:this.h,cache:void 0};o&&(u.body=o),this.u.fetch(new Request(this.f,u)).then(this.uc.bind(this),this.Va.bind(this))},e.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&this.readyState!=4&&(this.a=!1,hl(this)),this.readyState=uy},e.uc=function(o){this.a&&(this.g=o,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=o.headers,this.readyState=2,dl(this)),this.a&&(this.readyState=3,dl(this),this.a&&(this.responseType==="arraybuffer"?o.arrayBuffer().then(this.sc.bind(this),this.Va.bind(this)):typeof l.ReadableStream<"u"&&"body"in o?(this.response=this.responseText="",this.c=o.body.getReader(),this.m=new TextDecoder,wC(this)):o.text().then(this.tc.bind(this),this.Va.bind(this)))))};function wC(o){o.c.read().then(o.pc.bind(o)).catch(o.Va.bind(o))}e.pc=function(o){if(this.a){var u=this.m.decode(o.value?o.value:new Uint8Array(0),{stream:!o.done});u&&(this.response=this.responseText+=u),o.done?hl(this):dl(this),this.readyState==3&&wC(this)}},e.tc=function(o){this.a&&(this.response=this.responseText=o,hl(this))},e.sc=function(o){this.a&&(this.response=o,hl(this))},e.Va=function(o){var u=this.i;u&&u.log(oy,"Failed to fetch url "+this.f,o instanceof Error?o:Error(o)),this.a&&hl(this)};function hl(o){o.readyState=4,o.g=null,o.c=null,o.m=null,dl(o)}e.setRequestHeader=function(o,u){this.l.append(o,u)},e.getResponseHeader=function(o){return this.b?this.b.get(o.toLowerCase())||"":((o=this.i)&&o.log(oy,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},e.getAllResponseHeaders=function(){if(!this.b){var o=this.i;return o&&o.log(oy,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}o=[];for(var u=this.b.entries(),f=u.next();!f.done;)f=f.value,o.push(f[0]+": "+f[1]),f=u.next();return o.join(`\r +`)};function dl(o){o.onreadystatechange&&o.onreadystatechange.call(o)}Object.defineProperty(od.prototype,"withCredentials",{get:function(){return this.h==="include"},set:function(o){this.h=o?"include":"same-origin"}});function pl(o){Ln.call(this),this.headers=new Ga,this.D=o||null,this.c=!1,this.C=this.a=null,this.h=this.P=this.l="",this.f=this.N=this.i=this.J=!1,this.g=0,this.s=null,this.m=bC,this.u=this.S=!1}F(pl,Ln);var bC="";pl.prototype.b=ay("goog.net.XhrIo");var Qj=/^https?$/i,Yj=["POST","PUT"];function Xj(o,u,f,p,m){if(o.a)throw Error("[goog.net.XhrIo] Object is active with another request="+o.l+"; newUri="+u);f=f?f.toUpperCase():"GET",o.l=u,o.h="",o.P=f,o.J=!1,o.c=!0,o.a=o.D?o.D.a():ty.a(),o.C=o.D?vC(o.D):vC(ty),o.a.onreadystatechange=P(o.Wb,o);try{Pr(o.b,zi(o,"Opening Xhr")),o.N=!0,o.a.open(f,String(u),!0),o.N=!1}catch(E){Pr(o.b,zi(o,"Error opening Xhr: "+E.message)),EC(o,E);return}u=p||"";var w=new Ga(o.headers);m&&rj(m,function(E,S){w.set(S,E)}),m=N(w.Y()),p=l.FormData&&u instanceof l.FormData,!M(Yj,f)||m||p||w.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),w.forEach(function(E,S){this.a.setRequestHeader(S,E)},o),o.m&&(o.a.responseType=o.m),"withCredentials"in o.a&&o.a.withCredentials!==o.S&&(o.a.withCredentials=o.S);try{SC(o),0=u.l&&u.cancel())}this.u?this.u.call(this.s,this):this.v=!0,this.a||(o=new ml,ud(this),gl(this,!1,o))}},ks.prototype.m=function(o,u){this.i=!1,gl(this,o,u)};function gl(o,u,f){o.a=!0,o.c=f,o.f=!u,AC(o)}function ud(o){if(o.a){if(!o.v)throw new cd;o.v=!1}}function tV(o,u){cy(o,null,u,void 0)}function cy(o,u,f,p){o.g.push([u,f,p]),o.a&&AC(o)}ks.prototype.then=function(o,u,f){var p,m,w=new Ue(function(E,S){p=E,m=S});return cy(this,p,function(E){E instanceof ml?w.cancel():m(E)}),w.then(o,u,f)},ks.prototype.$goog_Thenable=!0;function CC(o){return I(o.g,function(u){return b(u[1])})}function AC(o){if(o.h&&o.a&&CC(o)){var u=o.h,f=ld[u];f&&(l.clearTimeout(f.a),delete ld[u]),o.h=0}o.b&&(o.b.l--,delete o.b),u=o.c;for(var p=f=!1;o.g.length&&!o.i;){var m=o.g.shift(),w=m[0],E=m[1];if(m=m[2],w=o.f?E:w)try{var S=w.call(m||o.s,u);S!==void 0&&(o.f=o.f&&(S==u||S instanceof Error),o.c=u=S),(nt(u)||typeof l.Promise=="function"&&u instanceof l.Promise)&&(p=!0,o.i=!0)}catch(U){u=U,o.f=!0,CC(o)||(f=!0)}}o.c=u,p&&(S=P(o.m,o,!0),p=P(o.m,o,!1),u instanceof ks?(cy(u,S,p),u.C=!0):u.then(S,p)),f&&(u=new kC(u),ld[u.a]=u,o.h=u.a)}function cd(){Ce.call(this)}F(cd,Ce),cd.prototype.message="Deferred has already fired",cd.prototype.name="AlreadyCalledError";function ml(){Ce.call(this)}F(ml,Ce),ml.prototype.message="Deferred was canceled",ml.prototype.name="CanceledError";function kC(o){this.a=l.setTimeout(P(this.c,this),0),this.b=o}kC.prototype.c=function(){throw delete ld[this.a],this.b};var ld={};function ly(o){var u={},f=u.document||document,p=NI(o).toString(),m=Mh(document,"SCRIPT"),w={Xb:m,Ma:void 0},E=new ks(w),S=null,U=u.timeout!=null?u.timeout:5e3;return 0"u"||typeof l.Headers>"u"||typeof l.Request>"u"))throw new k("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var E=new pl(this.f);if(w){E.g=Math.max(0,w);var S=setTimeout(function(){E.dispatchEvent("timeout")},w)}pS(E,"complete",function(){S&&clearTimeout(S);var U=null;try{U=JSON.parse(eV(this))||null}catch{U=null}u&&u(U)}),wm(E,"ready",function(){S&&clearTimeout(S),aS(this)}),wm(E,"timeout",function(){S&&clearTimeout(S),aS(this),u&&u(null)}),Xj(E,o,f,p,m)};var lV=new vi(xh,"https://apis.google.com/js/client.js?onload=%{onload}"),OC="__fcb"+Math.floor(1e6*Math.random()).toString();function fV(o,u){if(((window.gapi||{}).client||{}).request)o();else{l[OC]=function(){((window.gapi||{}).client||{}).request?o():u(Error("CORS_UNSUPPORTED"))};var f=nm(lV,{onload:OC});tV(ly(f),function(){u(Error("CORS_UNSUPPORTED"))})}}Yr.prototype.s=function(o,u,f,p,m){var w=this;hy.then(function(){window.gapi.client.setApiKey(w.c);var E=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:o,method:f,body:p,headers:m,authType:"none",callback:function(S){window.gapi.auth.setToken(E),u&&u(S)}})}).o(function(E){u&&u({error:{message:E&&E.message||"CORS_UNSUPPORTED"}})})};function hV(o,u){return new Ue(function(f,p){u.grant_type=="refresh_token"&&u.refresh_token||u.grant_type=="authorization_code"&&u.code?xC(o,o.l+"?key="+encodeURIComponent(o.c),function(m){m?m.error?p(by(m)):m.access_token&&m.refresh_token?f(m):p(new k("internal-error")):p(new k("network-request-failed"))},"POST",_S(u).toString(),o.g,o.m.get()):p(new k("internal-error"))})}function PC(o,u,f,p,m,w,E){var S=tr(u+f);Nt(S,"key",o.c),E&&Nt(S,"cb",Date.now().toString());var U=p=="GET";if(U)for(var q in m)m.hasOwnProperty(q)&&Nt(S,q,m[q]);return new Ue(function(Te,rt){xC(o,S.toString(),function(ze){ze?ze.error?rt(by(ze,w||{})):Te(ze):rt(new k("network-request-failed"))},p,U?void 0:ES(OS(m)),o.a,o.v.get())})}function Rs(o){if(o=o.email,typeof o!="string"||!gj.test(o))throw new k("invalid-email")}function DC(o){"email"in o&&Rs(o)}function dV(o,u){return je(o,TV,{identifier:u,continueUri:Kh()?el():"http://localhost"}).then(function(f){return f.signinMethods||[]})}function pV(o){return je(o,MV,{}).then(function(u){return u.authorizedDomains||[]})}function nr(o){if(!o[Xr])throw o.mfaPendingCredential?new k("multi-factor-auth-required",null,St(o)):new k("internal-error")}function py(o){if(o.phoneNumber||o.temporaryProof){if(!o.phoneNumber||!o.temporaryProof)throw new k("internal-error")}else{if(!o.sessionInfo)throw new k("missing-verification-id");if(!o.code)throw new k("missing-verification-code")}}Yr.prototype.Ab=function(){return je(this,jV,{})},Yr.prototype.Cb=function(o,u){return je(this,FC,{idToken:o,email:u})},Yr.prototype.Db=function(o,u){return je(this,UC,{idToken:o,password:u})};var vV={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};e=Yr.prototype,e.Eb=function(o,u){var f={idToken:o},p=[];return wo(vV,function(m,w){var E=u[w];E===null?p.push(m):w in u&&(f[w]=E)}),p.length&&(f.deleteAttribute=p),je(this,FC,f)},e.wb=function(o,u){return o={requestType:"PASSWORD_RESET",email:o},cn(o,u),je(this,DV,o)},e.xb=function(o,u){return o={requestType:"EMAIL_SIGNIN",email:o},cn(o,u),je(this,xV,o)},e.vb=function(o,u){return o={requestType:"VERIFY_EMAIL",idToken:o},cn(o,u),je(this,OV,o)},e.Fb=function(o,u,f){return o={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:o,newEmail:u},cn(o,f),je(this,PV,o)};function gV(o,u){return je(o,UV,u)}e.gb=function(o){return je(this,WV,o)};function mV(o,u){return je(o,VV,u).then(function(f){return f.phoneSessionInfo.sessionInfo})}function MC(o){if(!o.phoneVerificationInfo)throw new k("internal-error");if(!o.phoneVerificationInfo.sessionInfo)throw new k("missing-verification-id");if(!o.phoneVerificationInfo.code)throw new k("missing-verification-code")}function yV(o,u){return je(o,BV,u).then(function(f){return f.phoneResponseInfo.sessionInfo})}function _V(o,u,f){return je(o,SV,{idToken:u,deleteProvider:f})}function vy(o){if(!o.requestUri||!o.sessionId&&!o.postBody&&!o.pendingToken)throw new k("internal-error")}function gy(o,u){return u.oauthIdToken&&u.providerId&&u.providerId.indexOf("oidc.")==0&&!u.pendingToken&&(o.sessionId?u.nonce=o.sessionId:o.postBody&&(o=new _s(o.postBody),Im(o,"nonce")&&(u.nonce=o.get("nonce")))),u}function LC(o){var u=null;if(o.needConfirmation?(o.code="account-exists-with-different-credential",u=ed(o)):o.errorMessage=="FEDERATED_USER_ID_ALREADY_LINKED"?(o.code="credential-already-in-use",u=ed(o)):o.errorMessage=="EMAIL_EXISTS"?(o.code="email-already-in-use",u=ed(o)):o.errorMessage&&(u=VC(o.errorMessage)),u)throw u;nr(o)}function my(o,u){return u.returnIdpCredential=!0,je(o,qV,u)}function yy(o,u){return u.returnIdpCredential=!0,je(o,HV,u)}function _y(o,u){return u.returnIdpCredential=!0,u.autoCreate=!1,je(o,$V,u)}function wy(o){if(!o.oobCode)throw new k("invalid-action-code")}e.ob=function(o,u){return je(this,FV,{oobCode:o,newPassword:u})},e.Sa=function(o){return je(this,bV,{oobCode:o})},e.kb=function(o){return je(this,wV,{oobCode:o})};var wV={endpoint:"setAccountInfo",A:wy,Z:"email",B:!0},bV={endpoint:"resetPassword",A:wy,G:function(o){var u=o.requestType;if(!u||!o.email&&u!="EMAIL_SIGNIN"&&u!="VERIFY_AND_CHANGE_EMAIL")throw new k("internal-error")},B:!0},EV={endpoint:"signupNewUser",A:function(o){if(Rs(o),!o.password)throw new k("weak-password")},G:nr,V:!0,B:!0},TV={endpoint:"createAuthUri",B:!0},IV={endpoint:"deleteAccount",O:["idToken"]},SV={endpoint:"setAccountInfo",O:["idToken","deleteProvider"],A:function(o){if(!Array.isArray(o.deleteProvider))throw new k("internal-error")}},CV={endpoint:"emailLinkSignin",O:["email","oobCode"],A:Rs,G:nr,V:!0,B:!0},AV={endpoint:"emailLinkSignin",O:["idToken","email","oobCode"],A:Rs,G:nr,V:!0},kV={endpoint:"accounts/mfaEnrollment:finalize",O:["idToken","phoneVerificationInfo"],A:MC,G:nr,B:!0,Na:!0},RV={endpoint:"accounts/mfaSignIn:finalize",O:["mfaPendingCredential","phoneVerificationInfo"],A:MC,G:nr,B:!0,Na:!0},NV={endpoint:"getAccountInfo"},xV={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(o){if(o.requestType!="EMAIL_SIGNIN")throw new k("internal-error");Rs(o)},Z:"email",B:!0},OV={endpoint:"getOobConfirmationCode",O:["idToken","requestType"],A:function(o){if(o.requestType!="VERIFY_EMAIL")throw new k("internal-error")},Z:"email",B:!0},PV={endpoint:"getOobConfirmationCode",O:["idToken","newEmail","requestType"],A:function(o){if(o.requestType!="VERIFY_AND_CHANGE_EMAIL")throw new k("internal-error")},Z:"email",B:!0},DV={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(o){if(o.requestType!="PASSWORD_RESET")throw new k("internal-error");Rs(o)},Z:"email",B:!0},MV={mb:!0,endpoint:"getProjectConfig",Vb:"GET"},LV={mb:!0,endpoint:"getRecaptchaParam",Vb:"GET",G:function(o){if(!o.recaptchaSiteKey)throw new k("internal-error")}},FV={endpoint:"resetPassword",A:wy,Z:"email",B:!0},UV={endpoint:"sendVerificationCode",O:["phoneNumber","recaptchaToken"],Z:"sessionInfo",B:!0},FC={endpoint:"setAccountInfo",O:["idToken"],A:DC,V:!0},UC={endpoint:"setAccountInfo",O:["idToken"],A:function(o){if(DC(o),!o.password)throw new k("weak-password")},G:nr,V:!0},jV={endpoint:"signupNewUser",G:nr,V:!0,B:!0},VV={endpoint:"accounts/mfaEnrollment:start",O:["idToken","phoneEnrollmentInfo"],A:function(o){if(!o.phoneEnrollmentInfo)throw new k("internal-error");if(!o.phoneEnrollmentInfo.phoneNumber)throw new k("missing-phone-number");if(!o.phoneEnrollmentInfo.recaptchaToken)throw new k("missing-app-credential")},G:function(o){if(!o.phoneSessionInfo||!o.phoneSessionInfo.sessionInfo)throw new k("internal-error")},B:!0,Na:!0},BV={endpoint:"accounts/mfaSignIn:start",O:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(o){if(!o.phoneSignInInfo||!o.phoneSignInInfo.recaptchaToken)throw new k("missing-app-credential")},G:function(o){if(!o.phoneResponseInfo||!o.phoneResponseInfo.sessionInfo)throw new k("internal-error")},B:!0,Na:!0},qV={endpoint:"verifyAssertion",A:vy,Za:gy,G:LC,V:!0,B:!0},$V={endpoint:"verifyAssertion",A:vy,Za:gy,G:function(o){if(o.errorMessage&&o.errorMessage=="USER_NOT_FOUND")throw new k("user-not-found");if(o.errorMessage)throw VC(o.errorMessage);nr(o)},V:!0,B:!0},HV={endpoint:"verifyAssertion",A:function(o){if(vy(o),!o.idToken)throw new k("internal-error")},Za:gy,G:LC,V:!0},KV={endpoint:"verifyCustomToken",A:function(o){if(!o.token)throw new k("invalid-custom-token")},G:nr,V:!0,B:!0},jC={endpoint:"verifyPassword",A:function(o){if(Rs(o),!o.password)throw new k("wrong-password")},G:nr,V:!0,B:!0},WV={endpoint:"verifyPhoneNumber",A:py,G:nr,B:!0},GV={endpoint:"verifyPhoneNumber",A:function(o){if(!o.idToken)throw new k("internal-error");py(o)},G:function(o){if(o.temporaryProof)throw o.code="credential-already-in-use",ed(o);nr(o)}},zV={Ib:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:py,G:nr,B:!0},QV={endpoint:"accounts/mfaEnrollment:withdraw",O:["idToken","mfaEnrollmentId"],G:function(o){if(!!o[Xr]^!!o.refreshToken)throw new k("internal-error")},B:!0,Na:!0};function je(o,u,f){if(!Tj(f,u.O))return mt(new k("internal-error"));var p=!!u.Na,m=u.Vb||"POST",w;return me(f).then(u.A).then(function(){return u.V&&(f.returnSecureToken=!0),u.B&&o.b&&typeof f.tenantId>"u"&&(f.tenantId=o.b),p?PC(o,o.i,u.endpoint,m,f,u.Ib,u.mb||!1):PC(o,o.h,u.endpoint,m,f,u.Ib,u.mb||!1)}).then(function(E){return w=E,u.Za?u.Za(f,w):w}).then(u.G).then(function(){if(!u.Z)return w;if(!(u.Z in w))throw new k("internal-error");return w[u.Z]})}function VC(o){return by({error:{errors:[{message:o}],code:400,message:o}})}function by(o,u){var f=(o.error&&o.error.errors&&o.error.errors[0]||{}).reason||"",p={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(f=p[f]?new k(p[f]):null)return f;f=o.error&&o.error.message||"",p={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},cn(p,u||{}),u=(u=f.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1"u"&&delete S[U]}),o.ports[0].postMessage({status:"done",eventId:f,eventType:u,response:E})})}};function QC(o,u,f){pi(o.a)&&o.b.addEventListener("message",o.f),typeof o.a[u]>"u"&&(o.a[u]=[]),o.a[u].push(f)}function YC(o){this.a=o}YC.prototype.postMessage=function(o,u){this.a.postMessage(o,u)};function XC(o){this.c=o,this.b=!1,this.a=[]}function JC(o,u,f,p){var m,w=f||{},E,S,U,q=null;if(o.b)return mt(Error("connection_unavailable"));var Te=p?800:50,rt=typeof MessageChannel<"u"?new MessageChannel:null;return new Ue(function(ze,Yt){rt?(m=Math.floor(Math.random()*Math.pow(10,20)).toString(),rt.port1.start(),S=setTimeout(function(){Yt(Error("unsupported_event"))},Te),E=function(Qi){Qi.data.eventId===m&&(Qi.data.status==="ack"?(clearTimeout(S),U=setTimeout(function(){Yt(Error("timeout"))},3e3)):Qi.data.status==="done"?(clearTimeout(U),typeof Qi.data.response<"u"?ze(Qi.data.response):Yt(Error("unknown_error"))):(clearTimeout(S),clearTimeout(U),Yt(Error("invalid_response"))))},q={messageChannel:rt,onMessage:E},o.a.push(q),rt.port1.addEventListener("message",E),o.c.postMessage({eventType:u,eventId:m,data:w},[rt.port2])):Yt(Error("connection_unavailable"))}).then(function(ze){return Iy(o,q),ze}).o(function(ze){throw Iy(o,q),ze})}function Iy(o,u){if(u){var f=u.messageChannel,p=u.onMessage;f&&(f.port1.removeEventListener("message",p),f.port1.close()),V(o.a,function(m){return m==u})}}XC.prototype.close=function(){for(;0"u"&&(p=null);var m=l.localStorage.getItem(f);m!==p&&(this.b[f]=m,this.nb(f))}else if(u.indexOf("firebase:")==0&&this.a[u]){if(typeof o.a.a<"u"?Ns(this,"local").ia(this.f):Oy(this),this.m){if(f=l.localStorage.getItem(u),p=o.a.newValue,p!==f)p!==null?l.localStorage.setItem(u,p):l.localStorage.removeItem(u);else if(this.b[u]===p&&typeof o.a.a>"u")return}var w=this;f=function(){(typeof o.a.a<"u"||w.b[u]!==l.localStorage.getItem(u))&&(w.b[u]=l.localStorage.getItem(u),w.nb(u))},Gr&&bo&&bo==10&&l.localStorage.getItem(u)!==o.a.newValue&&o.a.newValue!==o.a.oldValue?setTimeout(f,10):f()}}else Z(o,P(this.nb,this))},e.nb=function(o){this.a[o]&&Z(this.a[o],function(u){u()})};function _4(o){this.a=o,this.b=El()}var Py={name:"authEvent",F:"local"};function w4(o){return o.b.get(Py,o.a).then(function(u){return pC(u)})}function b4(){this.a=El()}function E4(){this.b=-1}function md(o,u){this.b=uA,this.f=l.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=o,this.h=u,this.l=l.Int32Array?new Int32Array(64):Array(64),yd===void 0&&(l.Int32Array?yd=new Int32Array(fA):yd=fA),this.reset()}var yd;F(md,E4);for(var uA=64,T4=uA-1,cA=[],Dy=0;Dyu;u++){m=f[u-15]|0,p=f[u-2]|0;var w=(f[u-16]|0)+((m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3)|0,E=(f[u-7]|0)+((p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10)|0;f[u]=w+E|0}p=o.a[0]|0,m=o.a[1]|0;var S=o.a[2]|0,U=o.a[3]|0,q=o.a[4]|0,Te=o.a[5]|0,rt=o.a[6]|0;for(w=o.a[7]|0,u=0;64>u;u++){var ze=((p>>>2|p<<30)^(p>>>13|p<<19)^(p>>>22|p<<10))+(p&m^p&S^m&S)|0;E=q&Te^~q&rt,w=w+((q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7))|0,E=E+(yd[u]|0)|0,E=w+(E+(f[u]|0)|0)|0,w=rt,rt=Te,Te=q,q=U+E|0,U=S,S=m,m=p,p=E+ze|0}o.a[0]=o.a[0]+p|0,o.a[1]=o.a[1]+m|0,o.a[2]=o.a[2]+S|0,o.a[3]=o.a[3]+U|0,o.a[4]=o.a[4]+q|0,o.a[5]=o.a[5]+Te|0,o.a[6]=o.a[6]+rt|0,o.a[7]=o.a[7]+w|0}function Ly(o,u,f){f===void 0&&(f=u.length);var p=0,m=o.c;if(typeof u=="string")for(;p=w&&w==(w|0)))throw Error("message must be a byte array");o.f[m++]=w,m==o.b&&(My(o),m=0)}else throw Error("message must be string or array");o.c=m,o.g+=f}var fA=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function hA(){md.call(this,8,I4)}F(hA,md);var I4=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function dA(o,u,f,p,m,w){this.v=o,this.i=u,this.l=f,this.m=p||null,this.u=m||null,this.s=w,this.h=u+":"+f,this.C=new b4,this.g=new _4(this.h),this.f=null,this.b=[],this.a=this.c=null}function _d(o){return new k("invalid-cordova-configuration",o)}e=dA.prototype,e.ma=function(){return this.Ia?this.Ia:this.Ia=mj().then(function(){if(typeof yt("universalLinks.subscribe",l)!="function")throw _d("cordova-universal-links-plugin-fix is not installed");if(typeof yt("BuildInfo.packageName",l)>"u")throw _d("cordova-plugin-buildinfo is not installed");if(typeof yt("cordova.plugins.browsertab.openUrl",l)!="function")throw _d("cordova-plugin-browsertab is not installed");if(typeof yt("cordova.InAppBrowser.open",l)!="function")throw _d("cordova-plugin-inappbrowser is not installed")},function(){throw new k("cordova-not-ready")})};function S4(){for(var o=20,u=[];0u.c?Ly(u,lA,56-u.c):Ly(u,lA,u.b-(u.c-56));for(var p=63;56<=p;p--)u.f[p]=f&255,f/=256;for(My(u),p=f=0;p>m&255;return Fj(o)}e.Pb=function(o,u){return u(new k("operation-not-supported-in-this-environment")),me()},e.Nb=function(){return mt(new k("operation-not-supported-in-this-environment"))},e.ac=function(){return!1},e.Yb=function(){return!0},e.Ub=function(){return!0},e.Ob=function(o,u,f,p){if(this.c)return mt(new k("redirect-operation-pending"));var m=this,w=l.document,E=null,S=null,U=null,q=null;return this.c=me().then(function(){return Jm(u),vA(m)}).then(function(){return A4(m,o,u,f,p)}).then(function(){return new Ue(function(Te,rt){S=function(){var ze=yt("cordova.plugins.browsertab.close",l);return Te(),typeof ze=="function"&&ze(),m.a&&typeof m.a.close=="function"&&(m.a.close(),m.a=null),!1},m.Ea(S),U=function(){E||(E=Wa(2e3).then(function(){rt(new k("redirect-cancelled-by-user"))}))},q=function(){xm()&&U()},w.addEventListener("resume",U,!1),ln().toLowerCase().match(/android/)||w.addEventListener("visibilitychange",q,!1)}).o(function(Te){return Fy(m).then(function(){throw Te})})}).oa(function(){U&&w.removeEventListener("resume",U,!1),q&&w.removeEventListener("visibilitychange",q,!1),E&&E.cancel(),S&&m.Ta(S),m.c=null})};function A4(o,u,f,p,m){var w=S4(),E=new Qr(u,p,null,w,new k("no-auth-event"),null,m),S=yt("BuildInfo.packageName",l);if(typeof S!="string")throw new k("invalid-cordova-configuration");var U=yt("BuildInfo.displayName",l),q={};if(ln().toLowerCase().match(/iphone|ipad|ipod/))q.ibi=S;else if(ln().toLowerCase().match(/android/))q.apn=S;else return mt(new k("operation-not-supported-in-this-environment"));U&&(q.appDisplayName=U),w=C4(w),q.sessionId=w;var Te=yl(o.v,o.i,o.l,u,f,null,p,o.m,q,o.u,m,o.s);return o.ma().then(function(){var rt=o.h;return o.C.a.set(Py,E.w(),rt)}).then(function(){var rt=yt("cordova.plugins.browsertab.isAvailable",l);if(typeof rt!="function")throw new k("invalid-cordova-configuration");var ze=null;rt(function(Yt){if(Yt){if(ze=yt("cordova.plugins.browsertab.openUrl",l),typeof ze!="function")throw new k("invalid-cordova-configuration");ze(Te)}else{if(ze=yt("cordova.InAppBrowser.open",l),typeof ze!="function")throw new k("invalid-cordova-configuration");Yt=ln(),o.a=ze(Te,Yt.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||Yt.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}})})}function pA(o,u){for(var f=0;fo.f&&(o.a=o.f),u)}function Xy(o,u){o.stop(),o.b=Wa(q4(o,u)).then(function(){return _j()}).then(function(){return o.h()}).then(function(){Xy(o,!0)}).o(function(f){o.i(f)&&Xy(o,!1)})}Yy.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)};function Jy(o){this.f=o,this.b=this.a=null,this.c=Date.now()}Jy.prototype.w=function(){return{apiKey:this.f.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:this.c}};function OA(o,u){typeof u>"u"&&(o.b?(u=o.b,u=u.a-u.g):u=0),o.c=Date.now()+1e3*u}function PA(o,u){o.b=Yh(u[Xr]||""),o.a=u.refreshToken,u=u.expiresIn,OA(o,typeof u<"u"?Number(u):void 0)}function $4(o,u){o.b=u.b,o.a=u.a,o.c=u.c}function H4(o,u){return hV(o.f,u).then(function(f){return o.b=Yh(f.access_token),o.a=f.refresh_token,OA(o,f.expires_in),{accessToken:o.b.toString(),refreshToken:o.a}}).o(function(f){throw f.code=="auth/user-token-expired"&&(o.a=null),f})}Jy.prototype.getToken=function(o){return o=!!o,this.b&&!this.a?mt(new k("user-token-expired")):o||!this.b||Date.now()>this.c-3e4?this.a?H4(this,{grant_type:"refresh_token",refresh_token:this.a}):me(null):me({accessToken:this.b.toString(),refreshToken:this.a})};function Sd(o,u){this.a=o||null,this.b=u||null,Fn(this,{lastSignInTime:rl(u||null),creationTime:rl(o||null)})}function K4(o){return new Sd(o.a,o.b)}Sd.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}};function W4(o,u,f,p,m,w){Fn(this,{uid:o,displayName:p||null,photoURL:m||null,email:f||null,phoneNumber:w||null,providerId:u})}function mr(o,u,f){this.N=[],this.l=o.apiKey,this.m=o.appName,this.s=o.authDomain||null;var p=oe.SDK_VERSION?Ya(oe.SDK_VERSION):null;this.a=new Yr(this.l,Yn(tt),p),(this.u=o.emulatorConfig||null)&&dd(this.a,this.u),this.h=new Jy(this.a),o_(this,u[Xr]),PA(this.h,u),le(this,"refreshToken",this.h.a),MA(this,f||{}),Ln.call(this),this.P=!1,this.s&&bs()&&(this.b=$y(this.s,this.l,this.m,this.u)),this.W=[],this.i=null,this.D=G4(this),this.ba=P(this.ib,this);var m=this;this.za=null,this.Pa=function(w){m.xa(w.h)},this.qa=null,this.Ba=function(w){Zy(m,w.c)},this.$=null,this.aa=[],this.Oa=function(w){Tl(m,w.f)},this.ja=null,this.S=new Qy(this,f),le(this,"multiFactor",this.S)}F(mr,Ln),mr.prototype.xa=function(o){this.za=o,RC(this.a,o)};function Zy(o,u){o.u=u,dd(o.a,u),o.b&&(u=o.b,o.b=$y(o.s,o.l,o.m,o.u),o.P&&(Vy(u,o),bd(o.b,o)))}mr.prototype.la=function(){return this.za};function e_(o,u){o.qa&&vr(o.qa,"languageCodeChanged",o.Pa),(o.qa=u)&&Nr(u,"languageCodeChanged",o.Pa)}function t_(o,u){o.$&&vr(o.$,"emulatorConfigChanged",o.Ba),(o.$=u)&&Nr(u,"emulatorConfigChanged",o.Ba)}function Tl(o,u){o.aa=u,NC(o.a,oe.SDK_VERSION?Ya(oe.SDK_VERSION,o.aa):null)}mr.prototype.Ga=function(){return J(this.aa)};function n_(o,u){o.ja&&vr(o.ja,"frameworkChanged",o.Oa),(o.ja=u)&&Nr(u,"frameworkChanged",o.Oa)}mr.prototype.ib=function(){this.D.b&&(this.D.stop(),this.D.start())};function r_(o){try{return oe.app(o.m).auth()}catch{throw new k("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+o.m+"'!")}}function G4(o){return new Yy(function(){return o.I(!0)},function(u){return!!(u&&u.code=="auth/network-request-failed")},function(){var u=o.h.c-Date.now()-3e5;return 0"u"||pi(o)?{}:zh(new Gh(o))}).then(function(p){return u.a.vb(f,p)}).then(function(p){if(u.email!=p)return u.reload()}).then(function(){}))},e.Fb=function(o,u){var f=this,p=null;return qt(this,this.I().then(function(m){return p=m,typeof u>"u"||pi(u)?{}:zh(new Gh(u))}).then(function(m){return f.a.Fb(p,o,m)}).then(function(m){if(f.email!=m)return f.reload()}).then(function(){}))};function qt(o,u,f){var p=X4(o,u,f);return o.N.push(p),p.oa(function(){j(o.N,p)}),p.o(function(m){var w=null;throw m&&m.code==="auth/multi-factor-auth-required"&&(w=RA(m.w(),r_(o),P(o.jc,o))),w||m})}e.jc=function(o){var u=null,f=this;return o=eu(me(o),f.uid).then(function(p){return u=Sl(f,p,"reauthenticate"),wi(f,p),f.i=null,f.reload()}).then(function(){return u}),qt(this,o,!0)};function X4(o,u,f){return o.i&&!f?(u.cancel(),mt(o.i)):u.o(function(p){throw!p||p.code!="auth/user-disabled"&&p.code!="auth/user-token-expired"||(o.i||o.dispatchEvent(new su("userInvalidated")),o.i=p),p})}e.toJSON=function(){return this.w()},e.w=function(){var o={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.s,stsTokenManager:this.h.w(),redirectEventId:this.ga||null};return this.metadata&&cn(o,this.metadata.w()),Z(this.providerData,function(u){o.providerData.push(Ej(u))}),cn(o,this.S.w()),o};function qA(o){if(!o.apiKey)return null;var u={apiKey:o.apiKey,authDomain:o.authDomain,appName:o.appName,emulatorConfig:o.emulatorConfig},f={};if(o.stsTokenManager&&o.stsTokenManager.accessToken){f[Xr]=o.stsTokenManager.accessToken,f.refreshToken=o.stsTokenManager.refreshToken||null;var p=o.stsTokenManager.expirationTime;p&&(f.expiresIn=(p-Date.now())/1e3)}else return null;var m=new mr(u,f,o);return o.providerData&&Z(o.providerData,function(w){w&&u_(m,yi(w))}),o.redirectEventId&&(m.ga=o.redirectEventId),m}function J4(o,u,f,p){var m=new mr(o,u);return f&&(m.ha=f),p&&Tl(m,p),m.reload().then(function(){return m})}function Z4(o,u,f,p){var m=o.h,w={};return w[Xr]=m.b&&m.b.toString(),w.refreshToken=m.a,u=new mr(u||{apiKey:o.l,authDomain:o.s,appName:o.m},w),f&&(u.ha=f),p&&Tl(u,p),Cd(u,o),u}function eB(o){this.a=o,this.b=El()}var l_={name:"redirectUser",F:"session"};function $A(o){return ou(o.b,l_,o.a)}function tB(o,u){return o.b.get(l_,o.a).then(function(f){return f&&u&&(f.authDomain=u),qA(f||{})})}function f_(o){this.a=o,this.b=El(),this.c=null,this.f=nB(this),this.b.addListener(bi("local"),this.a,P(this.g,this))}f_.prototype.g=function(){var o=this,u=bi("local");au(this,function(){return me().then(function(){return o.c&&o.c.F!="local"?o.b.get(u,o.a):null}).then(function(f){if(f)return h_(o,"local").then(function(){o.c=u})})})};function h_(o,u){var f=[],p;for(p in ru)ru[p]!==u&&f.push(ou(o.b,bi(ru[p]),o.a));return f.push(ou(o.b,d_,o.a)),KU(f)}function nB(o){var u=bi("local"),f=bi("session"),p=bi("none");return m4(o.b,u,o.a).then(function(){return o.b.get(f,o.a)}).then(function(m){return m?f:o.b.get(p,o.a).then(function(w){return w?p:o.b.get(u,o.a).then(function(E){return E?u:o.b.get(d_,o.a).then(function(S){return S?bi(S):u})})})}).then(function(m){return o.c=m,h_(o,m.F)}).o(function(){o.c||(o.c=u)})}var d_={name:"persistence",F:"session"};function bi(o){return{name:"authUser",F:o}}f_.prototype.yb=function(o){var u=null,f=this;return g4(o),au(this,function(){return o!=f.c.F?f.b.get(f.c,f.a).then(function(p){return u=p,h_(f,o)}).then(function(){if(f.c=bi(o),u)return f.b.set(f.c,u,f.a)}):me()})};function rB(o){return au(o,function(){return o.b.set(d_,o.c.F,o.a)})}function HA(o,u){return au(o,function(){return o.b.set(o.c,u.w(),o.a)})}function KA(o){return au(o,function(){return ou(o.b,o.c,o.a)})}function WA(o,u,f){return au(o,function(){return o.b.get(o.c,o.a).then(function(p){return p&&u&&(p.authDomain=u),p&&f&&(p.emulatorConfig=f),qA(p||{})})})}function au(o,u){return o.f=o.f.then(u,u),o.f}function Jr(o){if(this.l=!1,le(this,"settings",new CA),le(this,"app",o),st(this).options&&st(this).options.apiKey)o=oe.SDK_VERSION?Ya(oe.SDK_VERSION):null,this.a=new Yr(st(this).options&&st(this).options.apiKey,Yn(tt),o);else throw new k("invalid-api-key");this.P=[],this.s=[],this.N=[],this.Pa=oe.INTERNAL.createSubscribe(P(this.zc,this)),this.W=void 0,this.ib=oe.INTERNAL.createSubscribe(P(this.Ac,this)),uu(this,null),this.i=new f_(st(this).options.apiKey+":"+st(this).name),this.D=new eB(st(this).options.apiKey+":"+st(this).name),this.$=Ct(this,cB(this)),this.h=Ct(this,lB(this)),this.ba=!1,this.ja=P(this.Zc,this),this.Ba=P(this.da,this),this.qa=P(this.mc,this),this.za=P(this.wc,this),this.Aa=P(this.xc,this),this.b=null,sB(this),this.INTERNAL={},this.INTERNAL.delete=P(this.delete,this),this.INTERNAL.logFramework=P(this.Gc,this),this.u=0,Ln.call(this),oB(this),this.J=[],this.R=null}F(Jr,Ln);function GA(o){er.call(this,"languageCodeChanged"),this.h=o}F(GA,er);function zA(o){er.call(this,"emulatorConfigChanged"),this.c=o}F(zA,er);function QA(o){er.call(this,"frameworkChanged"),this.f=o}F(QA,er),e=Jr.prototype,e.yb=function(o){return o=this.i.yb(o),Ct(this,o)},e.xa=function(o){this.aa===o||this.l||(this.aa=o,RC(this.a,this.aa),this.dispatchEvent(new GA(this.la())))},e.la=function(){return this.aa},e.fd=function(){var o=l.navigator;this.xa(o&&(o.languages&&o.languages[0]||o.language||o.userLanguage)||null)},e.gd=function(o,u){if(!this.R){if(!/^https?:\/\//.test(o))throw new k("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");u=u?!!u.disableWarnings:!1,iB(u),this.R={url:o,ec:u},this.settings.jb=!0,dd(this.a,this.R),this.dispatchEvent(new zA(this.R))}};function iB(o){typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),l.document&&!o&&Hh().then(function(){var u=l.document.createElement("div");u.innerText="Running in emulator mode. Do not use with production credentials.",u.style.position="fixed",u.style.width="100%",u.style.backgroundColor="#ffffff",u.style.border=".1em solid #000000",u.style.color="#b50000",u.style.bottom="0px",u.style.left="0px",u.style.margin="0px",u.style.zIndex=1e4,u.style.textAlign="center",u.classList.add("firebase-emulator-warning"),l.document.body.appendChild(u)})}e.Gc=function(o){this.J.push(o),NC(this.a,oe.SDK_VERSION?Ya(oe.SDK_VERSION,this.J):null),this.dispatchEvent(new QA(this.J))},e.Ga=function(){return J(this.J)},e.zb=function(o){this.S===o||this.l||(this.S=o,this.a.b=this.S)},e.T=function(){return this.S};function oB(o){Object.defineProperty(o,"lc",{get:function(){return this.la()},set:function(u){this.xa(u)},enumerable:!1}),o.aa=null,Object.defineProperty(o,"ti",{get:function(){return this.T()},set:function(u){this.zb(u)},enumerable:!1}),o.S=null,Object.defineProperty(o,"emulatorConfig",{get:function(){if(this.R){var u=tr(this.R.url);u=yi({protocol:u.c,host:u.a,port:u.g,options:yi({disableWarnings:this.R.ec})})}else u=null;return u},enumerable:!1})}e.toJSON=function(){return{apiKey:st(this).options.apiKey,authDomain:st(this).options.authDomain,appName:st(this).name,currentUser:Re(this)&&Re(this).w()}};function p_(o){return o.Oa||mt(new k("auth-domain-config-required"))}function sB(o){var u=st(o).options.authDomain,f=st(o).options.apiKey;u&&bs()&&(o.Oa=o.$.then(function(){if(!o.l){if(o.b=$y(u,f,st(o).name,o.R),bd(o.b,o),Re(o)&&Il(Re(o)),o.m){Il(o.m);var p=o.m;p.xa(o.la()),e_(p,o),p=o.m,Tl(p,o.J),n_(p,o),p=o.m,Zy(p,o.R),t_(p,o),o.m=null}return o.b}}))}e.Gb=function(o,u){switch(o){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==u&&!!this.f;default:return!1}},e.na=function(o,u,f,p){o=="signInViaPopup"&&this.g==p&&(f&&this.C?this.C(f):u&&!f&&this.f&&this.f(u),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},e.Fa=function(o,u){return o=="signInViaRedirect"||o=="signInViaPopup"&&this.g==u&&this.f?P(this.ic,this):null},e.ic=function(o,u,f,p){var m=this,w={requestUri:o,postBody:p,sessionId:u,tenantId:f};return this.c&&(this.c.cancel(),this.c=null),m.$.then(function(){return Ps(m,my(m.a,w))})},e.Xc=function(o){if(!bs())return mt(new k("operation-not-supported-in-this-environment"));var u=this,f=Km(o.providerId),p=Es(),m=null;(!tl()||km())&&st(this).options.authDomain&&o.isOAuthProvider&&(m=yl(st(this).options.authDomain,st(this).options.apiKey,st(this).name,"signInViaPopup",o,null,p,oe.SDK_VERSION||null,null,null,this.T(),this.R));var w=kS(m,f&&f.va,f&&f.ua);return f=p_(this).then(function(E){return _A(E,w,"signInViaPopup",o,p,!!m,u.T())}).then(function(){return new Ue(function(E,S){u.na("signInViaPopup",null,new k("cancelled-popup-request"),u.g),u.f=E,u.C=S,u.g=p,u.c=bA(u.b,u,"signInViaPopup",w,p)})}).then(function(E){return w&&ws(w),E?yi(E):null}).o(function(E){throw w&&ws(w),E}),Ct(this,f)},e.Yc=function(o){if(!bs())return mt(new k("operation-not-supported-in-this-environment"));var u=this,f=p_(this).then(function(){return rB(u.i)}).then(function(){return wA(u.b,"signInViaRedirect",o,void 0,u.T())});return Ct(this,f)};function YA(o){if(!bs())return mt(new k("operation-not-supported-in-this-environment"));var u=p_(o).then(function(){return o.b.ra()}).then(function(f){return f?yi(f):null});return Ct(o,u)}e.ra=function(){var o=this;return YA(this).then(function(u){return o.b&&Td(o.b.b),u}).o(function(u){throw o.b&&Td(o.b.b),u})},e.dd=function(o){if(!o)return mt(new k("null-user"));if(this.S!=o.tenantId)return mt(new k("tenant-id-mismatch"));var u=this,f={};f.apiKey=st(this).options.apiKey,f.authDomain=st(this).options.authDomain,f.appName=st(this).name;var p=Z4(o,f,u.D,u.Ga());return Ct(this,this.h.then(function(){if(st(u).options.apiKey!=o.l)return p.reload()}).then(function(){return Re(u)&&o.uid==Re(u).uid?(Cd(Re(u),o),u.da(o)):(uu(u,p),Il(p),u.da(p))}).then(function(){Cl(u)}))};function aB(o,u){var f={};return f.apiKey=st(o).options.apiKey,f.authDomain=st(o).options.authDomain,f.appName=st(o).name,o.R&&(f.emulatorConfig=o.R),o.$.then(function(){return J4(f,u,o.D,o.Ga())}).then(function(p){return Re(o)&&p.uid==Re(o).uid?(Cd(Re(o),p),o.da(p)):(uu(o,p),Il(p),o.da(p))}).then(function(){Cl(o)})}function uu(o,u){Re(o)&&(z4(Re(o),o.Ba),vr(Re(o),"tokenChanged",o.qa),vr(Re(o),"userDeleted",o.za),vr(Re(o),"userInvalidated",o.Aa),i_(Re(o))),u&&(u.W.push(o.Ba),Nr(u,"tokenChanged",o.qa),Nr(u,"userDeleted",o.za),Nr(u,"userInvalidated",o.Aa),0this.u&&(this.u=0),this.u==0&&Re(this)&&i_(Re(this)),this.removeAuthTokenListener(o)},e.addAuthTokenListener=function(o){var u=this;this.s.push(o),Ct(this,this.h.then(function(){u.l||M(u.s,o)&&o(kd(u))}))},e.removeAuthTokenListener=function(o){V(this.s,function(u){return u==o})};function fB(o,u){o.N.push(u),Ct(o,o.h.then(function(){!o.l&&M(o.N,u)&&o.W!==o.getUid()&&(o.W=o.getUid(),u(kd(o)))}))}e.delete=function(){this.l=!0;for(var o=0;o"u"||pi(u)?{}:zh(new Gh(u))}).then(function(p){return f.a.wb(o,p)}).then(function(){}))},e.Wc=function(o,u){return Ct(this,Ky(this,o,u,P(this.ab,this)))},e.Vc=function(o,u){var f=this;return Ct(this,me().then(function(){var p=u||el(),m=hC(o,p);if(p=Ym(p),!p)throw new k("argument-error","Invalid email link!");if(p.tenantId!==f.T())throw new k("tenant-id-mismatch");return f.ab(m)}))};function Al(){}Al.prototype.render=function(){},Al.prototype.reset=function(){},Al.prototype.getResponse=function(){},Al.prototype.execute=function(){};function cu(){this.a={},this.b=1e12}var v_=null;cu.prototype.render=function(o,u){return this.a[this.b.toString()]=new Rd(o,u),this.b++},cu.prototype.reset=function(o){var u=g_(this,o);o=XA(o),u&&o&&(u.delete(),delete this.a[o])},cu.prototype.getResponse=function(o){return(o=g_(this,o))?o.getResponse():null},cu.prototype.execute=function(o){(o=g_(this,o))&&o.execute()};function g_(o,u){return(u=XA(u))&&o.a[u]||null}function XA(o){return(o=typeof o>"u"?1e12:o)?o.toString():null}function Rd(o,u){this.g=!1,this.c=u,this.a=this.b=null,this.h=this.c.size!=="invisible",this.f=Gc(o);var f=this;this.i=function(){f.execute()},this.h?this.execute():Nr(this.f,"click",this.i)}Rd.prototype.getResponse=function(){return m_(this),this.b},Rd.prototype.execute=function(){m_(this);var o=this;this.a||(this.a=setTimeout(function(){o.b=yj();var u=o.c.callback,f=o.c["expired-callback"];if(u)try{u(o.b)}catch{}o.a=setTimeout(function(){if(o.a=null,o.b=null,f)try{f()}catch{}o.h&&o.execute()},6e4)},500))},Rd.prototype.delete=function(){m_(this),this.g=!0,clearTimeout(this.a),this.a=null,vr(this.f,"click",this.i)};function m_(o){if(o.g)throw Error("reCAPTCHA mock was already deleted!")}function y_(){}le(y_,"FACTOR_ID","phone");function __(){}__.prototype.g=function(){return v_||(v_=new cu),me(v_)},__.prototype.c=function(){};var w_=null;function b_(){this.b=l.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var hB=new vi(xh,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),dB=new Io(3e4,6e4);b_.prototype.g=function(o){var u=this;return new Ue(function(f,p){var m=setTimeout(function(){p(new k("network-request-failed"))},dB.get());if(!l.grecaptcha||o!==u.f&&!u.b){l[u.a]=function(){if(l.grecaptcha){u.f=o;var E=l.grecaptcha.render;l.grecaptcha.render=function(S,U){return S=E(S,U),u.b++,S},clearTimeout(m),f(l.grecaptcha)}else clearTimeout(m),p(new k("internal-error"));delete l[u.a]};var w=nm(hB,{onload:u.a,hl:o||""});me(ly(w)).o(function(){clearTimeout(m),p(new k("internal-error","Unable to load external reCAPTCHA dependencies!"))})}else clearTimeout(m),f(l.grecaptcha)})},b_.prototype.c=function(){this.b--};var E_=null;function T_(o,u,f,p,m,w,E){if(le(this,"type","recaptcha"),this.c=this.f=null,this.J=!1,this.v=u,this.g=null,E?(w_||(w_=new __),E=w_):(E_||(E_=new b_),E=E_),this.m=E,this.a=f||{theme:"light",type:"image"},this.h=[],this.a[ek])throw new k("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i=this.a[pB]==="invisible",!l.document)throw new k("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!Gc(u)||!this.i&&Gc(u).hasChildNodes())throw new k("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new Yr(o,w||null,m||null),this.u=p||function(){return null};var S=this;this.l=[];var U=this.a[JA];this.a[JA]=function(Te){if(tk(S,Te),typeof U=="function")U(Te);else if(typeof U=="string"){var rt=yt(U,l);typeof rt=="function"&&rt(Te)}};var q=this.a[ZA];this.a[ZA]=function(){if(tk(S,null),typeof q=="function")q();else if(typeof q=="string"){var Te=yt(q,l);typeof Te=="function"&&Te()}}}var JA="callback",ZA="expired-callback",ek="sitekey",pB="size";function tk(o,u){for(var f=0;fm||m>=rk.length)throw new k("internal-error","Argument validator received an unsupported number of arguments.");f=rk[m],p=(p?"":f+" argument ")+(u.name?'"'+u.name+'" ':"")+"must be "+u.K+".";break e}p=null}}if(p)throw new k("argument-error",o+" failed: "+p)}var rk="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function ce(o,u){return{name:o||"",K:"a valid string",optional:!!u,M:function(f){return typeof f=="string"}}}function C_(o,u){return{name:o||"",K:"a boolean",optional:!!u,M:function(f){return typeof f=="boolean"}}}function Dt(o,u){return{name:o||"",K:"a valid object",optional:!!u,M:T}}function lu(o,u){return{name:o||"",K:"a function",optional:!!u,M:function(f){return typeof f=="function"}}}function Ei(o,u){return{name:o||"",K:"null",optional:!!u,M:function(f){return f===null}}}function gB(){return{name:"",K:"an HTML element",optional:!1,M:function(o){return!!(o&&o instanceof Element)}}}function mB(){return{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(o){return!!(o&&o instanceof Jr)}}}function yB(){return{name:"app",K:"an instance of Firebase App",optional:!0,M:function(o){return!!(o&&o instanceof oe.app.App)}}}function ko(o){return{name:o?o+"Credential":"credential",K:o?"a valid "+o+" credential":"a valid credential",optional:!1,M:function(u){if(!u)return!1;var f=!o||u.providerId===o;return!(!u.ka||!f)}}}function ik(){return{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(o){return o?!!o.tb:!1}}}function fu(){return{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(o){return!!(o&&o.providerId&&o.hasOwnProperty&&o.hasOwnProperty("isOAuthProvider"))}}}function A_(o,u){return T(o)&&typeof o.type=="string"&&o.type===u&&typeof o.Ha=="function"}function ok(o){return T(o)&&typeof o.uid=="string"}function xd(){return{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(o){return!(!o||typeof o.type!="string"||typeof o.verify!="function")}}}function xt(o,u,f,p){return{name:f||"",K:o.K+" or "+u.K,optional:!!p,M:function(m){return o.M(m)||u.M(m)}}}function bt(o,u){for(var f in u){var p=u[f].name;o[p]=ak(p,o[f],u[f].j)}}function sk(o,u){for(var f in u){var p=u[f].name;p!==f&&Object.defineProperty(o,p,{get:re(function(m){return this[m]},f),set:re(function(m,w,E,S){nk(m,[E],[S],!0),this[w]=S},p,f,u[f].lb),enumerable:!0})}}function Ot(o,u,f,p){o[u]=ak(u,f,p)}function ak(o,u,f){function p(){var E=Array.prototype.slice.call(arguments);return nk(m,f,E),u.apply(this,E)}if(!f)return u;var m=_B(o),w;for(w in u)p[w]=u[w];for(w in u.prototype)p.prototype[w]=u.prototype[w];return p}function _B(o){return o=o.split("."),o[o.length-1]}bt(Jr.prototype,{kb:{name:"applyActionCode",j:[ce("code")]},Sa:{name:"checkActionCode",j:[ce("code")]},ob:{name:"confirmPasswordReset",j:[ce("code"),ce("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[ce("email"),ce("password")]},hc:{name:"fetchSignInMethodsForEmail",j:[ce("email")]},ra:{name:"getRedirectResult",j:[]},Bc:{name:"isSignInWithEmailLink",j:[ce("emailLink")]},Hc:{name:"onAuthStateChanged",j:[xt(Dt(),lu(),"nextOrObserver"),lu("opt_error",!0),lu("opt_completed",!0)]},Ic:{name:"onIdTokenChanged",j:[xt(Dt(),lu(),"nextOrObserver"),lu("opt_error",!0),lu("opt_completed",!0)]},wb:{name:"sendPasswordResetEmail",j:[ce("email"),xt(Dt("opt_actionCodeSettings",!0),Ei(null,!0),"opt_actionCodeSettings",!0)]},xb:{name:"sendSignInLinkToEmail",j:[ce("email"),Dt("actionCodeSettings")]},yb:{name:"setPersistence",j:[ce("persistence")]},Sc:{name:"signInAndRetrieveDataWithCredential",j:[ko()]},Ab:{name:"signInAnonymously",j:[]},ab:{name:"signInWithCredential",j:[ko()]},Tc:{name:"signInWithCustomToken",j:[ce("token")]},Uc:{name:"signInWithEmailAndPassword",j:[ce("email"),ce("password")]},Vc:{name:"signInWithEmailLink",j:[ce("email"),ce("emailLink",!0)]},Wc:{name:"signInWithPhoneNumber",j:[ce("phoneNumber"),xd()]},Xc:{name:"signInWithPopup",j:[fu()]},Yc:{name:"signInWithRedirect",j:[fu()]},dd:{name:"updateCurrentUser",j:[xt(function(o){return{name:"user",K:"an instance of Firebase User",optional:!!o,M:function(u){return!!(u&&u instanceof mr)}}}(),Ei(),"user")]},Bb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[ce(null,!0)]},fd:{name:"useDeviceLanguage",j:[]},gd:{name:"useEmulator",j:[ce("url"),Dt("options",!0)]},jd:{name:"verifyPasswordResetCode",j:[ce("code")]}}),sk(Jr.prototype,{lc:{name:"languageCode",lb:xt(ce(),Ei(),"languageCode")},ti:{name:"tenantId",lb:xt(ce(),Ei(),"tenantId")}}),Jr.Persistence=ru,Jr.Persistence.LOCAL="local",Jr.Persistence.SESSION="session",Jr.Persistence.NONE="none",bt(mr.prototype,{delete:{name:"delete",j:[]},oc:{name:"getIdTokenResult",j:[C_("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[C_("opt_forceRefresh",!0)]},Cc:{name:"linkAndRetrieveDataWithCredential",j:[ko()]},rb:{name:"linkWithCredential",j:[ko()]},Dc:{name:"linkWithPhoneNumber",j:[ce("phoneNumber"),xd()]},Ec:{name:"linkWithPopup",j:[fu()]},Fc:{name:"linkWithRedirect",j:[fu()]},Lc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[ko()]},ub:{name:"reauthenticateWithCredential",j:[ko()]},Mc:{name:"reauthenticateWithPhoneNumber",j:[ce("phoneNumber"),xd()]},Nc:{name:"reauthenticateWithPopup",j:[fu()]},Oc:{name:"reauthenticateWithRedirect",j:[fu()]},reload:{name:"reload",j:[]},vb:{name:"sendEmailVerification",j:[xt(Dt("opt_actionCodeSettings",!0),Ei(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[ce(null,!0)]},cd:{name:"unlink",j:[ce("provider")]},Cb:{name:"updateEmail",j:[ce("email")]},Db:{name:"updatePassword",j:[ce("password")]},ed:{name:"updatePhoneNumber",j:[ko("phone")]},Eb:{name:"updateProfile",j:[Dt("profile")]},Fb:{name:"verifyBeforeUpdateEmail",j:[ce("email"),xt(Dt("opt_actionCodeSettings",!0),Ei(null,!0),"opt_actionCodeSettings",!0)]}}),bt(cu.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),bt(Al.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),bt(Ue.prototype,{oa:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),sk(CA.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",lb:C_("appVerificationDisabledForTesting")}}),bt(Hy.prototype,{confirm:{name:"confirm",j:[ce("verificationCode")]}}),Ot(Za,"fromJSON",function(o){o=typeof o=="string"?JSON.parse(o):o;for(var u,f=[qj,$j,Hj,Bj],p=0;pn?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function Qt(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])}var IP=function(e){G(!Gv(e),"Invalid JSON number");var t=11,n=52,r=(1<=Math.pow(2,1-r)?(c=Math.min(Math.floor(Math.log(e)/Math.LN2),r),s=c+r,a=Math.round(e*Math.pow(2,n-c)-Math.pow(2,n))):(s=0,a=Math.round(e/Math.pow(2,1-r-n))));var h=[];for(l=n;l;l-=1)h.push(a%2?1:0),a=Math.floor(a/2);for(l=t;l;l-=1)h.push(s%2?1:0),s=Math.floor(s/2);h.push(i?1:0),h.reverse();var d=h.join(""),v="";for(l=0;l<64;l+=8){var g=parseInt(d.substr(l,8),2).toString(16);g.length===1&&(g="0"+g),v=v+g}return v.toLowerCase()},cG=function(){return!!(typeof window=="object"&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))},lG=function(){return typeof Windows=="object"&&typeof Windows.UI=="object"};function fG(e,t){var n="Unknown Error";e==="too_big"?n="The data requested exceeds the maximum size that can be accessed with a single request.":e==="permission_denied"?n="Client doesn't have permission to access the desired data.":e==="unavailable"&&(n="The service is unavailable");var r=new Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}var hG=new RegExp("^-?(0*)\\d{1,10}$"),SP=-2147483648,eE=2147483647,Mp=function(e){if(hG.test(e)){var t=Number(e);if(t>=SP&&t<=eE)return t}return null},Cc=function(e){try{e()}catch(t){setTimeout(function(){var n=t.stack||"";throw yn("Exception was thrown by user callback.",n),t},Math.floor(0))}},dG=function(){var e=typeof window=="object"&&window.navigator&&window.navigator.userAgent||"";return e.search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},Ql=function(e,t){var n=setTimeout(e,t);return typeof n=="object"&&n.unref&&n.unref(),n};/** + */var Du=new Ra("@firebase/database"),wP=function(){var e=1;return function(){return e++}}(),bP=function(e){var t=wW(e),n=new gW;n.update(t);var r=n.digest();return Kv.encodeByteArray(r)},eh=function(){for(var e=[],t=0;tn?r.push(e.substring(i,n)):r.push(e.substring(i,i+t));return r};function Qt(e,t){for(var n in e)e.hasOwnProperty(n)&&t(n,e[n])}var IP=function(e){G(!Gv(e),"Invalid JSON number");var t=11,n=52,r=(1<=Math.pow(2,1-r)?(c=Math.min(Math.floor(Math.log(e)/Math.LN2),r),s=c+r,a=Math.round(e*Math.pow(2,n-c)-Math.pow(2,n))):(s=0,a=Math.round(e/Math.pow(2,1-r-n))));var h=[];for(l=n;l;l-=1)h.push(a%2?1:0),a=Math.floor(a/2);for(l=t;l;l-=1)h.push(s%2?1:0),s=Math.floor(s/2);h.push(i?1:0),h.reverse();var d=h.join(""),v="";for(l=0;l<64;l+=8){var g=parseInt(d.substr(l,8),2).toString(16);g.length===1&&(g="0"+g),v=v+g}return v.toLowerCase()},sG=function(){return!!(typeof window=="object"&&window.chrome&&window.chrome.extension&&!/^chrome/.test(window.location.href))},aG=function(){return typeof Windows=="object"&&typeof Windows.UI=="object"};function uG(e,t){var n="Unknown Error";e==="too_big"?n="The data requested exceeds the maximum size that can be accessed with a single request.":e==="permission_denied"?n="Client doesn't have permission to access the desired data.":e==="unavailable"&&(n="The service is unavailable");var r=new Error(e+" at "+t._path.toString()+": "+n);return r.code=e.toUpperCase(),r}var cG=new RegExp("^-?(0*)\\d{1,10}$"),SP=-2147483648,eE=2147483647,Mp=function(e){if(cG.test(e)){var t=Number(e);if(t>=SP&&t<=eE)return t}return null},Cc=function(e){try{e()}catch(t){setTimeout(function(){var n=t.stack||"";throw yn("Exception was thrown by user callback.",n),t},Math.floor(0))}},lG=function(){var e=typeof window=="object"&&window.navigator&&window.navigator.userAgent||"";return e.search(/googlebot|google webmaster tools|bingbot|yahoo! slurp|baiduspider|yandexbot|duckduckbot/i)>=0},Ql=function(e,t){var n=setTimeout(e,t);return typeof n=="object"&&n.unref&&n.unref(),n};/** * @license * Copyright 2021 Google LLC * @@ -574,7 +574,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var pG=function(){function e(t,n){var r=this;this.appName_=t,this.appCheckProvider=n,this.appCheck=n==null?void 0:n.getImmediate({optional:!0}),this.appCheck||n==null||n.get().then(function(i){return r.appCheck=i})}return e.prototype.getToken=function(t){var n=this;return this.appCheck?this.appCheck.getToken(t):new Promise(function(r,i){setTimeout(function(){n.appCheck?n.getToken(t).then(r,i):r(null)},0)})},e.prototype.addTokenChangeListener=function(t){var n;(n=this.appCheckProvider)===null||n===void 0||n.get().then(function(r){return r.addTokenListener(t)})},e.prototype.notifyForInvalidToken=function(){yn('Provided AppCheck credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly.')},e}();/** + */var fG=function(){function e(t,n){var r=this;this.appName_=t,this.appCheckProvider=n,this.appCheck=n==null?void 0:n.getImmediate({optional:!0}),this.appCheck||n==null||n.get().then(function(i){return r.appCheck=i})}return e.prototype.getToken=function(t){var n=this;return this.appCheck?this.appCheck.getToken(t):new Promise(function(r,i){setTimeout(function(){n.appCheck?n.getToken(t).then(r,i):r(null)},0)})},e.prototype.addTokenChangeListener=function(t){var n;(n=this.appCheckProvider)===null||n===void 0||n.get().then(function(r){return r.addTokenListener(t)})},e.prototype.notifyForInvalidToken=function(){yn('Provided AppCheck credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly.')},e}();/** * @license * Copyright 2017 Google LLC * @@ -589,7 +589,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var vG=function(){function e(t,n,r){var i=this;this.appName_=t,this.firebaseOptions_=n,this.authProvider_=r,this.auth_=null,this.auth_=r.getImmediate({optional:!0}),this.auth_||r.onInit(function(s){return i.auth_=s})}return e.prototype.getToken=function(t){var n=this;return this.auth_?this.auth_.getToken(t).catch(function(r){return r&&r.code==="auth/token-not-initialized"?(tn("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(r)}):new Promise(function(r,i){setTimeout(function(){n.auth_?n.getToken(t).then(r,i):r(null)},0)})},e.prototype.addTokenChangeListener=function(t){this.auth_?this.auth_.addAuthTokenListener(t):this.authProvider_.get().then(function(n){return n.addAuthTokenListener(t)})},e.prototype.removeTokenChangeListener=function(t){this.authProvider_.get().then(function(n){return n.removeAuthTokenListener(t)})},e.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',yn(t)},e}(),Yl=function(){function e(t){this.accessToken=t}return e.prototype.getToken=function(t){return Promise.resolve({accessToken:this.accessToken})},e.prototype.addTokenChangeListener=function(t){t(this.accessToken)},e.prototype.removeTokenChangeListener=function(t){},e.prototype.notifyForInvalidToken=function(){},e.OWNER="owner",e}();/** + */var hG=function(){function e(t,n,r){var i=this;this.appName_=t,this.firebaseOptions_=n,this.authProvider_=r,this.auth_=null,this.auth_=r.getImmediate({optional:!0}),this.auth_||r.onInit(function(s){return i.auth_=s})}return e.prototype.getToken=function(t){var n=this;return this.auth_?this.auth_.getToken(t).catch(function(r){return r&&r.code==="auth/token-not-initialized"?(en("Got auth/token-not-initialized error. Treating as null token."),null):Promise.reject(r)}):new Promise(function(r,i){setTimeout(function(){n.auth_?n.getToken(t).then(r,i):r(null)},0)})},e.prototype.addTokenChangeListener=function(t){this.auth_?this.auth_.addAuthTokenListener(t):this.authProvider_.get().then(function(n){return n.addAuthTokenListener(t)})},e.prototype.removeTokenChangeListener=function(t){this.authProvider_.get().then(function(n){return n.removeAuthTokenListener(t)})},e.prototype.notifyForInvalidToken=function(){var t='Provided authentication credentials for the app named "'+this.appName_+'" are invalid. This usually indicates your app was not initialized correctly. ';"credential"in this.firebaseOptions_?t+='Make sure the "credential" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':"serviceAccount"in this.firebaseOptions_?t+='Make sure the "serviceAccount" property provided to initializeApp() is authorized to access the specified "databaseURL" and is from the correct project.':t+='Make sure the "apiKey" and "databaseURL" properties provided to initializeApp() match the values provided for your app at https://console.firebase.google.com/.',yn(t)},e}(),Yl=function(){function e(t){this.accessToken=t}return e.prototype.getToken=function(t){return Promise.resolve({accessToken:this.accessToken})},e.prototype.addTokenChangeListener=function(t){t(this.accessToken)},e.prototype.removeTokenChangeListener=function(t){},e.prototype.notifyForInvalidToken=function(){},e.OWNER="owner",e}();/** * @license * Copyright 2017 Google LLC * @@ -604,7 +604,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var tE="5",CP="v",AP="s",kP="r",RP="f",NP=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,xP="ls",gG="p",ob="ac",OP="websocket",PP="long_polling";/** + */var tE="5",CP="v",AP="s",kP="r",RP="f",NP=/(console\.firebase|firebase-console-\w+\.corp|firebase\.corp)\.google\.com/,xP="ls",dG="p",ob="ac",OP="websocket",PP="long_polling";/** * @license * Copyright 2017 Google LLC * @@ -619,7 +619,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var nE=function(){function e(t,n,r,i,s,a,c){s===void 0&&(s=!1),a===void 0&&(a=""),c===void 0&&(c=!1),this.secure=n,this.namespace=r,this.webSocketOnly=i,this.nodeAdmin=s,this.persistenceKey=a,this.includeNamespaceInQueryParams=c,this._host=t.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=zs.get("host:"+t)||this._host}return e.prototype.isCacheableHost=function(){return this.internalHost.substr(0,2)==="s-"},e.prototype.isCustomHost=function(){return this._domain!=="firebaseio.com"&&this._domain!=="firebaseio-demo.com"},Object.defineProperty(e.prototype,"host",{get:function(){return this._host},set:function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&zs.set("host:"+this._host,this.internalHost))},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},e.prototype.toURLString=function(){var t=this.secure?"https://":"http://",n=this.includeNamespaceInQueryParams?"?ns="+this.namespace:"";return""+t+this.host+"/"+n},e}();function mG(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams}function DP(e,t,n){G(typeof t=="string","typeof type must == string"),G(typeof n=="object","typeof params must == object");var r;if(t===OP)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else if(t===PP)r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?";else throw new Error("Unknown connection type: "+t);mG(e)&&(n.ns=e.namespace);var i=[];return Qt(n,function(s,a){i.push(s+"="+a)}),r+i.join("&")}/** + */var nE=function(){function e(t,n,r,i,s,a,c){s===void 0&&(s=!1),a===void 0&&(a=""),c===void 0&&(c=!1),this.secure=n,this.namespace=r,this.webSocketOnly=i,this.nodeAdmin=s,this.persistenceKey=a,this.includeNamespaceInQueryParams=c,this._host=t.toLowerCase(),this._domain=this._host.substr(this._host.indexOf(".")+1),this.internalHost=zs.get("host:"+t)||this._host}return e.prototype.isCacheableHost=function(){return this.internalHost.substr(0,2)==="s-"},e.prototype.isCustomHost=function(){return this._domain!=="firebaseio.com"&&this._domain!=="firebaseio-demo.com"},Object.defineProperty(e.prototype,"host",{get:function(){return this._host},set:function(t){t!==this.internalHost&&(this.internalHost=t,this.isCacheableHost()&&zs.set("host:"+this._host,this.internalHost))},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=this.toURLString();return this.persistenceKey&&(t+="<"+this.persistenceKey+">"),t},e.prototype.toURLString=function(){var t=this.secure?"https://":"http://",n=this.includeNamespaceInQueryParams?"?ns="+this.namespace:"";return""+t+this.host+"/"+n},e}();function pG(e){return e.host!==e.internalHost||e.isCustomHost()||e.includeNamespaceInQueryParams}function DP(e,t,n){G(typeof t=="string","typeof type must == string"),G(typeof n=="object","typeof params must == object");var r;if(t===OP)r=(e.secure?"wss://":"ws://")+e.internalHost+"/.ws?";else if(t===PP)r=(e.secure?"https://":"http://")+e.internalHost+"/.lp?";else throw new Error("Unknown connection type: "+t);pG(e)&&(n.ns=e.namespace);var i=[];return Qt(n,function(s,a){i.push(s+"="+a)}),r+i.join("&")}/** * @license * Copyright 2017 Google LLC * @@ -634,7 +634,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var yG=function(){function e(){this.counters_={}}return e.prototype.incrementCounter=function(t,n){n===void 0&&(n=1),Ar(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=n},e.prototype.get=function(){return aP(this.counters_)},e}();/** + */var vG=function(){function e(){this.counters_={}}return e.prototype.incrementCounter=function(t,n){n===void 0&&(n=1),Ar(this.counters_,t)||(this.counters_[t]=0),this.counters_[t]+=n},e.prototype.get=function(){return aP(this.counters_)},e}();/** * @license * Copyright 2017 Google LLC * @@ -649,7 +649,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var H_={},K_={};function rE(e){var t=e.toString();return H_[t]||(H_[t]=new yG),H_[t]}function _G(e,t){var n=e.toString();return K_[n]||(K_[n]=t()),K_[n]}/** + */var H_={},K_={};function rE(e){var t=e.toString();return H_[t]||(H_[t]=new vG),H_[t]}function gG(e,t){var n=e.toString();return K_[n]||(K_[n]=t()),K_[n]}/** * @license * Copyright 2017 Google LLC * @@ -664,7 +664,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var wG=function(){function e(t){this.onMessage_=t,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return e.prototype.closeAfter=function(t,n){this.closeAfterResponse=t,this.onClose=n,this.closeAfterResponsedocument.domain="'+a+'";<\/script>'}var c=""+s+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(c),this.myIFrame.doc.close()}catch(l){tn("frame writing exception"),l.stack&&tn(l.stack),tn(l)}}}return e.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",document.body){document.body.appendChild(t);try{var n=t.contentWindow.document;n||tn("No IE domain setting required")}catch{var r=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+r+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},e.prototype.close=function(){var t=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){t.myIFrame!==null&&(document.body.removeChild(t.myIFrame),t.myIFrame=null)},Math.floor(0)));var n=this.onDisconnect;n&&(this.onDisconnect=null,n())},e.prototype.startLongPoll=function(t,n){for(this.myID=t,this.myPW=n,this.alive=!0;this.newRequest_(););},e.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t[MP]=this.myID,t[LP]=this.myPW,t[FP]=this.currentSerial;for(var n=this.urlFn(t),r="",i=0;this.pendingSegs.length>0;){var s=this.pendingSegs[0];if(s.d.length+jP+r.length<=UP){var a=this.pendingSegs.shift();r=r+"&"+SG+i+"="+a.seg+"&"+CG+i+"="+a.ts+"&"+AG+i+"="+a.d,i++}else break}return n=n+r,this.addLongPollTag_(n,this.currentSerial),!0}else return!1},e.prototype.enqueueSegment=function(t,n,r){this.pendingSegs.push({seg:t,ts:n,d:r}),this.alive&&this.newRequest_()},e.prototype.addLongPollTag_=function(t,n){var r=this;this.outstandingRequests.add(n);var i=function(){r.outstandingRequests.delete(n),r.newRequest_()},s=setTimeout(i,Math.floor(NG)),a=function(){clearTimeout(s),i()};this.addTag(t,a)},e.prototype.addTag=function(t,n){var r=this;setTimeout(function(){try{if(!r.sendNewPolls)return;var i=r.myIFrame.doc.createElement("script");i.type="text/javascript",i.async=!0,i.src=t,i.onload=i.onreadystatechange=function(){var s=i.readyState;(!s||s==="loaded"||s==="complete")&&(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),n())},i.onerror=function(){tn("Long-poll script failed to load: "+t),r.sendNewPolls=!1,r.close()},r.myIFrame.doc.body.appendChild(i)}catch{}},Math.floor(1))},e}();/** + */var k1="start",yG="close",_G="pLPCommand",wG="pRTLPCB",MP="id",LP="pw",FP="ser",bG="cb",EG="seg",TG="ts",IG="d",SG="dframe",UP=1870,jP=30,CG=UP-jP,AG=25e3,kG=3e4,iE=function(){function e(t,n,r,i,s,a,c){var l=this;this.connId=t,this.repoInfo=n,this.applicationId=r,this.appCheckToken=i,this.authToken=s,this.transportSessionId=a,this.lastSessionId=c,this.bytesSent=0,this.bytesReceived=0,this.everConnected_=!1,this.log_=th(t),this.stats_=rE(n),this.urlFn=function(h){return l.appCheckToken&&(h[ob]=l.appCheckToken),DP(n,PP,h)}}return e.prototype.open=function(t,n){var r=this;this.curSegmentNum=0,this.onDisconnect_=n,this.myPacketOrderer=new mG(t),this.isClosed_=!1,this.connectTimeoutTimer_=setTimeout(function(){r.log_("Timed out trying to connect."),r.onClosed_(),r.connectTimeoutTimer_=null},Math.floor(kG)),iG(function(){if(!r.isClosed_){r.scriptTagHolder=new RG(function(){for(var a=[],c=0;cdocument.domain="'+a+'";<\/script>'}var c=""+s+"";try{this.myIFrame.doc.open(),this.myIFrame.doc.write(c),this.myIFrame.doc.close()}catch(l){en("frame writing exception"),l.stack&&en(l.stack),en(l)}}}return e.createIFrame_=function(){var t=document.createElement("iframe");if(t.style.display="none",document.body){document.body.appendChild(t);try{var n=t.contentWindow.document;n||en("No IE domain setting required")}catch{var r=document.domain;t.src="javascript:void((function(){document.open();document.domain='"+r+"';document.close();})())"}}else throw"Document body has not initialized. Wait to initialize Firebase until after the document is ready.";return t.contentDocument?t.doc=t.contentDocument:t.contentWindow?t.doc=t.contentWindow.document:t.document&&(t.doc=t.document),t},e.prototype.close=function(){var t=this;this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML="",setTimeout(function(){t.myIFrame!==null&&(document.body.removeChild(t.myIFrame),t.myIFrame=null)},Math.floor(0)));var n=this.onDisconnect;n&&(this.onDisconnect=null,n())},e.prototype.startLongPoll=function(t,n){for(this.myID=t,this.myPW=n,this.alive=!0;this.newRequest_(););},e.prototype.newRequest_=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.size<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var t={};t[MP]=this.myID,t[LP]=this.myPW,t[FP]=this.currentSerial;for(var n=this.urlFn(t),r="",i=0;this.pendingSegs.length>0;){var s=this.pendingSegs[0];if(s.d.length+jP+r.length<=UP){var a=this.pendingSegs.shift();r=r+"&"+EG+i+"="+a.seg+"&"+TG+i+"="+a.ts+"&"+IG+i+"="+a.d,i++}else break}return n=n+r,this.addLongPollTag_(n,this.currentSerial),!0}else return!1},e.prototype.enqueueSegment=function(t,n,r){this.pendingSegs.push({seg:t,ts:n,d:r}),this.alive&&this.newRequest_()},e.prototype.addLongPollTag_=function(t,n){var r=this;this.outstandingRequests.add(n);var i=function(){r.outstandingRequests.delete(n),r.newRequest_()},s=setTimeout(i,Math.floor(AG)),a=function(){clearTimeout(s),i()};this.addTag(t,a)},e.prototype.addTag=function(t,n){var r=this;setTimeout(function(){try{if(!r.sendNewPolls)return;var i=r.myIFrame.doc.createElement("script");i.type="text/javascript",i.async=!0,i.src=t,i.onload=i.onreadystatechange=function(){var s=i.readyState;(!s||s==="loaded"||s==="complete")&&(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),n())},i.onerror=function(){en("Long-poll script failed to load: "+t),r.sendNewPolls=!1,r.close()},r.myIFrame.doc.body.appendChild(i)}catch{}},Math.floor(1))},e}();/** * @license * Copyright 2017 Google LLC * @@ -694,7 +694,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var PG=16384,DG=45e3,Lp=null;typeof MozWebSocket<"u"?Lp=MozWebSocket:typeof WebSocket<"u"&&(Lp=WebSocket);var Ks=function(){function e(t,n,r,i,s,a,c){this.connId=t,this.applicationId=r,this.appCheckToken=i,this.authToken=s,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.log_=eh(this.connId),this.stats_=rE(n),this.connURL=e.connectionURL_(n,a,c,i),this.nodeAdmin=n.nodeAdmin}return e.connectionURL_=function(t,n,r,i){var s={};return s[CP]=tE,typeof location<"u"&&location.hostname&&NP.test(location.hostname)&&(s[kP]=RP),n&&(s[AP]=n),r&&(s[xP]=r),i&&(s[ob]=i),DP(t,OP,s)},e.prototype.open=function(t,n){var r=this;this.onDisconnect=n,this.onMessage=t,this.log_("Websocket connecting to "+this.connURL),this.everConnected_=!1,zs.set("previous_websocket_failure",!0);try{var i,s,a,c;if(!lP()){var s={headers:{"X-Firebase-GMPID":this.applicationId||"","X-Firebase-AppCheck":this.appCheckToken||""}};this.mySock=new Lp(this.connURL,[],s)}}catch(h){this.log_("Error instantiating WebSocket.");var l=h.message||h.data;l&&this.log_(l),this.onClosed_();return}this.mySock.onopen=function(){r.log_("Websocket connected."),r.everConnected_=!0},this.mySock.onclose=function(){r.log_("Websocket connection was disconnected."),r.mySock=null,r.onClosed_()},this.mySock.onmessage=function(h){r.handleIncomingFrame(h)},this.mySock.onerror=function(h){r.log_("WebSocket error. Closing connection.");var d=h.message||h.data;d&&r.log_(d),r.onClosed_()}},e.prototype.start=function(){},e.forceDisallow=function(){e.forceDisallow_=!0},e.isAvailable=function(){var t=!1;if(typeof navigator<"u"&&navigator.userAgent){var n=/Android ([0-9]{0,}\.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r[1])<4.4&&(t=!0)}return!t&&Lp!==null&&!e.forceDisallow_},e.previouslyFailed=function(){return zs.isInMemoryStorage||zs.get("previous_websocket_failure")===!0},e.prototype.markConnectionHealthy=function(){zs.remove("previous_websocket_failure")},e.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length===this.totalFrames){var n=this.frames.join("");this.frames=null;var r=Ef(n);this.onMessage(r)}},e.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},e.prototype.extractFrameCount_=function(t){if(G(this.frames===null,"We already have a frame buffer"),t.length<=6){var n=Number(t);if(!isNaN(n))return this.handleNewFrameCount_(n),null}return this.handleNewFrameCount_(1),t},e.prototype.handleIncomingFrame=function(t){if(this.mySock!==null){var n=t.data;if(this.bytesReceived+=n.length,this.stats_.incrementCounter("bytes_received",n.length),this.resetKeepAlive(),this.frames!==null)this.appendFrame_(n);else{var r=this.extractFrameCount_(n);r!==null&&this.appendFrame_(r)}}},e.prototype.send=function(t){this.resetKeepAlive();var n=Kt(t);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);var r=TP(n,PG);r.length>1&&this.sendString_(String(r.length));for(var i=0;i1&&parseFloat(r[1])<4.4&&(t=!0)}return!t&&Lp!==null&&!e.forceDisallow_},e.previouslyFailed=function(){return zs.isInMemoryStorage||zs.get("previous_websocket_failure")===!0},e.prototype.markConnectionHealthy=function(){zs.remove("previous_websocket_failure")},e.prototype.appendFrame_=function(t){if(this.frames.push(t),this.frames.length===this.totalFrames){var n=this.frames.join("");this.frames=null;var r=Tf(n);this.onMessage(r)}},e.prototype.handleNewFrameCount_=function(t){this.totalFrames=t,this.frames=[]},e.prototype.extractFrameCount_=function(t){if(G(this.frames===null,"We already have a frame buffer"),t.length<=6){var n=Number(t);if(!isNaN(n))return this.handleNewFrameCount_(n),null}return this.handleNewFrameCount_(1),t},e.prototype.handleIncomingFrame=function(t){if(this.mySock!==null){var n=t.data;if(this.bytesReceived+=n.length,this.stats_.incrementCounter("bytes_received",n.length),this.resetKeepAlive(),this.frames!==null)this.appendFrame_(n);else{var r=this.extractFrameCount_(n);r!==null&&this.appendFrame_(r)}}},e.prototype.send=function(t){this.resetKeepAlive();var n=Kt(t);this.bytesSent+=n.length,this.stats_.incrementCounter("bytes_sent",n.length);var r=TP(n,NG);r.length>1&&this.sendString_(String(r.length));for(var i=0;i0)return this.transports_[0];throw new Error("No transports available")},e.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},e}();/** + */var OG=function(){function e(t){this.initTransports_(t)}return Object.defineProperty(e,"ALL_TRANSPORTS",{get:function(){return[iE,Ks]},enumerable:!1,configurable:!0}),e.prototype.initTransports_=function(t){var n,r,i=Ks&&Ks.isAvailable(),s=i&&!Ks.previouslyFailed();if(t.webSocketOnly&&(i||yn("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),s=!0),s)this.transports_=[Ks];else{var a=this.transports_=[];try{for(var c=sn(e.ALL_TRANSPORTS),l=c.next();!l.done;l=c.next()){var h=l.value;h&&h.isAvailable()&&a.push(h)}}catch(d){n={error:d}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}},e.prototype.initialTransport=function(){if(this.transports_.length>0)return this.transports_[0];throw new Error("No transports available")},e.prototype.upgradeTransport=function(){return this.transports_.length>1?this.transports_[1]:null},e}();/** * @license * Copyright 2017 Google LLC * @@ -724,7 +724,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var LG=6e4,FG=5e3,UG=10*1024,jG=100*1024,W_="t",R1="d",VG="s",N1="r",BG="e",x1="o",O1="a",P1="n",D1="p",qG="h",VP=function(){function e(t,n,r,i,s,a,c,l,h,d){this.id=t,this.repoInfo_=n,this.applicationId_=r,this.appCheckToken_=i,this.authToken_=s,this.onMessage_=a,this.onReady_=c,this.onDisconnect_=l,this.onKill_=h,this.lastSessionId=d,this.connectionCount=0,this.pendingDataMessages=[],this.state_=0,this.log_=eh("c:"+this.id+":"),this.transportManager_=new MG(n),this.log_("Connection created"),this.start_()}return e.prototype.start_=function(){var t=this,n=this.transportManager_.initialTransport();this.conn_=new n(this.nextTransportId_(),this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,null,this.lastSessionId),this.primaryResponsesRequired_=n.responsesRequiredToBeHealthy||0;var r=this.connReceiver_(this.conn_),i=this.disconnReceiver_(this.conn_);this.tx_=this.conn_,this.rx_=this.conn_,this.secondaryConn_=null,this.isHealthy_=!1,setTimeout(function(){t.conn_&&t.conn_.open(r,i)},Math.floor(0));var s=n.healthyTimeout||0;s>0&&(this.healthyTimeout_=Ql(function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>jG?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes. Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>UG?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes. Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))},Math.floor(s)))},e.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},e.prototype.disconnReceiver_=function(t){var n=this;return function(r){t===n.conn_?n.onConnectionLost_(r):t===n.secondaryConn_?(n.log_("Secondary connection lost."),n.onSecondaryConnectionLost_()):n.log_("closing an old connection")}},e.prototype.connReceiver_=function(t){var n=this;return function(r){n.state_!==2&&(t===n.rx_?n.onPrimaryMessageReceived_(r):t===n.secondaryConn_?n.onSecondaryMessageReceived_(r):n.log_("message on old connection"))}},e.prototype.sendRequest=function(t){var n={t:"d",d:t};this.sendData_(n)},e.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},e.prototype.onSecondaryControl_=function(t){if(W_ in t){var n=t[W_];n===O1?this.upgradeIfSecondaryHealthy_():n===N1?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):n===x1&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},e.prototype.onSecondaryMessageReceived_=function(t){var n=xl("t",t),r=xl("d",t);if(n==="c")this.onSecondaryControl_(r);else if(n==="d")this.pendingDataMessages.push(r);else throw new Error("Unknown protocol layer: "+n)},e.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:D1,d:{}}}))},e.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:O1,d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:P1,d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},e.prototype.onPrimaryMessageReceived_=function(t){var n=xl("t",t),r=xl("d",t);n==="c"?this.onControl_(r):n==="d"&&this.onDataMessage_(r)},e.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},e.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},e.prototype.onControl_=function(t){var n=xl(W_,t);if(R1 in t){var r=t[R1];if(n===qG)this.onHandshake_(r);else if(n===P1){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var i=0;i0&&(this.healthyTimeout_=Ql(function(){t.healthyTimeout_=null,t.isHealthy_||(t.conn_&&t.conn_.bytesReceived>LG?(t.log_("Connection exceeded healthy timeout but has received "+t.conn_.bytesReceived+" bytes. Marking connection healthy."),t.isHealthy_=!0,t.conn_.markConnectionHealthy()):t.conn_&&t.conn_.bytesSent>MG?t.log_("Connection exceeded healthy timeout but has sent "+t.conn_.bytesSent+" bytes. Leaving connection alive."):(t.log_("Closing unhealthy connection after timeout."),t.close()))},Math.floor(s)))},e.prototype.nextTransportId_=function(){return"c:"+this.id+":"+this.connectionCount++},e.prototype.disconnReceiver_=function(t){var n=this;return function(r){t===n.conn_?n.onConnectionLost_(r):t===n.secondaryConn_?(n.log_("Secondary connection lost."),n.onSecondaryConnectionLost_()):n.log_("closing an old connection")}},e.prototype.connReceiver_=function(t){var n=this;return function(r){n.state_!==2&&(t===n.rx_?n.onPrimaryMessageReceived_(r):t===n.secondaryConn_?n.onSecondaryMessageReceived_(r):n.log_("message on old connection"))}},e.prototype.sendRequest=function(t){var n={t:"d",d:t};this.sendData_(n)},e.prototype.tryCleanupConnection=function(){this.tx_===this.secondaryConn_&&this.rx_===this.secondaryConn_&&(this.log_("cleaning up and promoting a connection: "+this.secondaryConn_.connId),this.conn_=this.secondaryConn_,this.secondaryConn_=null)},e.prototype.onSecondaryControl_=function(t){if(W_ in t){var n=t[W_];n===O1?this.upgradeIfSecondaryHealthy_():n===N1?(this.log_("Got a reset on secondary, closing it"),this.secondaryConn_.close(),(this.tx_===this.secondaryConn_||this.rx_===this.secondaryConn_)&&this.close()):n===x1&&(this.log_("got pong on secondary."),this.secondaryResponsesRequired_--,this.upgradeIfSecondaryHealthy_())}},e.prototype.onSecondaryMessageReceived_=function(t){var n=xl("t",t),r=xl("d",t);if(n==="c")this.onSecondaryControl_(r);else if(n==="d")this.pendingDataMessages.push(r);else throw new Error("Unknown protocol layer: "+n)},e.prototype.upgradeIfSecondaryHealthy_=function(){this.secondaryResponsesRequired_<=0?(this.log_("Secondary connection is healthy."),this.isHealthy_=!0,this.secondaryConn_.markConnectionHealthy(),this.proceedWithUpgrade_()):(this.log_("sending ping on secondary."),this.secondaryConn_.send({t:"c",d:{t:D1,d:{}}}))},e.prototype.proceedWithUpgrade_=function(){this.secondaryConn_.start(),this.log_("sending client ack on secondary"),this.secondaryConn_.send({t:"c",d:{t:O1,d:{}}}),this.log_("Ending transmission on primary"),this.conn_.send({t:"c",d:{t:P1,d:{}}}),this.tx_=this.secondaryConn_,this.tryCleanupConnection()},e.prototype.onPrimaryMessageReceived_=function(t){var n=xl("t",t),r=xl("d",t);n==="c"?this.onControl_(r):n==="d"&&this.onDataMessage_(r)},e.prototype.onDataMessage_=function(t){this.onPrimaryResponse_(),this.onMessage_(t)},e.prototype.onPrimaryResponse_=function(){this.isHealthy_||(this.primaryResponsesRequired_--,this.primaryResponsesRequired_<=0&&(this.log_("Primary connection is healthy."),this.isHealthy_=!0,this.conn_.markConnectionHealthy()))},e.prototype.onControl_=function(t){var n=xl(W_,t);if(R1 in t){var r=t[R1];if(n===jG)this.onHandshake_(r);else if(n===P1){this.log_("recvd end transmission on primary"),this.rx_=this.secondaryConn_;for(var i=0;i0&&(this.pieces_[r]=this.pieces_[i],r++);this.pieces_.length=r,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=n}return e.prototype.toString=function(){for(var t="",n=this.pieceNum_;n=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function rs(e){return e.pieces_.length-e.pieceNum_}function ft(e){var t=e.pieceNum_;return t=e.pieces_.length)return null;for(var t=[],n=e.pieceNum_;n0&&n.push(i[r]);return new et(n,0)}function Pe(e){return e.pieceNum_>=e.pieces_.length}function Gn(e,t){var n=Oe(e),r=Oe(t);if(n===null)return t;if(n===r)return Gn(ft(e),ft(t));throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function HG(e,t){for(var n=Tf(e,0),r=Tf(t,0),i=0;irs(t))return!1;for(;n0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=Wv(t),HP(e)}function GG(e){var t=e.parts_.pop();e.byteLength_-=Wv(t),e.parts_.length>0&&(e.byteLength_-=1)}function HP(e){if(e.byteLength_>F1)throw new Error(e.errorPrefix_+"has a key path longer than "+F1+" bytes ("+e.byteLength_+").");if(e.parts_.length>L1)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+L1+") or object contains a cycle "+Vs(e))}function Vs(e){return e.parts_.length===0?"":"in property '"+e.parts_.join(".")+"'"}/** + */var L1=32,F1=768,et=function(){function e(t,n){if(n===void 0){this.pieces_=t.split("/");for(var r=0,i=0;i0&&(this.pieces_[r]=this.pieces_[i],r++);this.pieces_.length=r,this.pieceNum_=0}else this.pieces_=t,this.pieceNum_=n}return e.prototype.toString=function(){for(var t="",n=this.pieceNum_;n=e.pieces_.length?null:e.pieces_[e.pieceNum_]}function rs(e){return e.pieces_.length-e.pieceNum_}function ft(e){var t=e.pieceNum_;return t=e.pieces_.length)return null;for(var t=[],n=e.pieceNum_;n0&&n.push(i[r]);return new et(n,0)}function Pe(e){return e.pieceNum_>=e.pieces_.length}function Wn(e,t){var n=Oe(e),r=Oe(t);if(n===null)return t;if(n===r)return Wn(ft(e),ft(t));throw new Error("INTERNAL ERROR: innerPath ("+t+") is not within outerPath ("+e+")")}function BG(e,t){for(var n=If(e,0),r=If(t,0),i=0;irs(t))return!1;for(;n0&&(e.byteLength_+=1),e.parts_.push(t),e.byteLength_+=Wv(t),HP(e)}function HG(e){var t=e.parts_.pop();e.byteLength_-=Wv(t),e.parts_.length>0&&(e.byteLength_-=1)}function HP(e){if(e.byteLength_>F1)throw new Error(e.errorPrefix_+"has a key path longer than "+F1+" bytes ("+e.byteLength_+").");if(e.parts_.length>L1)throw new Error(e.errorPrefix_+"path specified exceeds the maximum depth that can be written ("+L1+") or object contains a cycle "+Vs(e))}function Vs(e){return e.parts_.length===0?"":"in property '"+e.parts_.join(".")+"'"}/** * @license * Copyright 2017 Google LLC * @@ -799,7 +799,7 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var zG=function(e){te(t,e);function t(){var n=e.call(this,["visible"])||this,r,i;return typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(i="visibilitychange",r="hidden"):typeof document.mozHidden<"u"?(i="mozvisibilitychange",r="mozHidden"):typeof document.msHidden<"u"?(i="msvisibilitychange",r="msHidden"):typeof document.webkitHidden<"u"&&(i="webkitvisibilitychange",r="webkitHidden")),n.visible_=!0,i&&document.addEventListener(i,function(){var s=!document[r];s!==n.visible_&&(n.visible_=s,n.trigger("visible",s))},!1),n}return t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(n){return G(n==="visible","Unknown event type: "+n),[this.visible_]},t}(qP);/** + */var KG=function(e){te(t,e);function t(){var n=e.call(this,["visible"])||this,r,i;return typeof document<"u"&&typeof document.addEventListener<"u"&&(typeof document.hidden<"u"?(i="visibilitychange",r="hidden"):typeof document.mozHidden<"u"?(i="mozvisibilitychange",r="mozHidden"):typeof document.msHidden<"u"?(i="msvisibilitychange",r="msHidden"):typeof document.webkitHidden<"u"&&(i="webkitvisibilitychange",r="webkitHidden")),n.visible_=!0,i&&document.addEventListener(i,function(){var s=!document[r];s!==n.visible_&&(n.visible_=s,n.trigger("visible",s))},!1),n}return t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(n){return G(n==="visible","Unknown event type: "+n),[this.visible_]},t}(qP);/** * @license * Copyright 2017 Google LLC * @@ -814,10 +814,10 @@ and limitations under the License. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Ol=1e3,QG=60*5*1e3,YG=3*1e3,U1=30*1e3,XG=1.3,JG=3e4,ZG="server_kill",j1=3,ia=function(e){te(t,e);function t(n,r,i,s,a,c,l,h){var d=e.call(this)||this;if(d.repoInfo_=n,d.applicationId_=r,d.onDataUpdate_=i,d.onConnectStatus_=s,d.onServerInfoUpdate_=a,d.authTokenProvider_=c,d.appCheckTokenProvider_=l,d.authOverride_=h,d.id=t.nextPersistentConnectionId_++,d.log_=eh("p:"+d.id+":"),d.interruptReasons_={},d.listens=new Map,d.outstandingPuts_=[],d.outstandingGets_=[],d.outstandingPutCount_=0,d.outstandingGetCount_=0,d.onDisconnectRequestQueue_=[],d.connected_=!1,d.reconnectDelay_=Ol,d.maxReconnectDelay_=QG,d.securityDebugCallback_=null,d.lastSessionId=null,d.establishConnectionTimer_=null,d.visible_=!1,d.requestCBHash_={},d.requestNumber_=0,d.realtime_=null,d.authToken_=null,d.appCheckToken_=null,d.forceTokenRefresh_=!1,d.invalidAuthTokenCount_=0,d.invalidAppCheckTokenCount_=0,d.firstConnection_=!0,d.lastConnectionAttemptTime_=null,d.lastConnectionEstablishedTime_=null,h&&!lP())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return zG.getInstance().on("visible",d.onVisible_,d),n.host.indexOf("fblocal")===-1&&M1.getInstance().on("online",d.onOnline_,d),d}return t.prototype.sendRequest=function(n,r,i){var s=++this.requestNumber_,a={r:s,a:n,b:r};this.log_(Kt(a)),G(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(a),i&&(this.requestCBHash_[s]=i)},t.prototype.get=function(n){var r=this;this.initConnection_();var i=new on,s={p:n._path.toString(),q:n._queryObject},a={action:"g",request:s,onComplete:function(l){var h=l.d;l.s==="ok"?(r.onDataUpdate_(s.p,h,!1,null),i.resolve(h)):i.reject(h)}};this.outstandingGets_.push(a),this.outstandingGetCount_++;var c=this.outstandingGets_.length-1;return this.connected_||setTimeout(function(){var l=r.outstandingGets_[c];l===void 0||a!==l||(delete r.outstandingGets_[c],r.outstandingGetCount_--,r.outstandingGetCount_===0&&(r.outstandingGets_=[]),r.log_("get "+c+" timed out on connection"),i.reject(new Error("Client is offline.")))},YG),this.connected_&&this.sendGet_(c),i.promise},t.prototype.listen=function(n,r,i,s){this.initConnection_();var a=n._queryIdentifier,c=n._path.toString();this.log_("Listen called for "+c+" "+a),this.listens.has(c)||this.listens.set(c,new Map),G(n._queryParams.isDefault()||!n._queryParams.loadsAllData(),"listen() called for non-default but complete query"),G(!this.listens.get(c).has(a),"listen() called twice for same path/queryId.");var l={onComplete:s,hashFn:r,query:n,tag:i};this.listens.get(c).set(a,l),this.connected_&&this.sendListen_(l)},t.prototype.sendGet_=function(n){var r=this,i=this.outstandingGets_[n];this.sendRequest("g",i.request,function(s){delete r.outstandingGets_[n],r.outstandingGetCount_--,r.outstandingGetCount_===0&&(r.outstandingGets_=[]),i.onComplete&&i.onComplete(s)})},t.prototype.sendListen_=function(n){var r=this,i=n.query,s=i._path.toString(),a=i._queryIdentifier;this.log_("Listen on "+s+" for "+a);var c={p:s},l="q";n.tag&&(c.q=i._queryObject,c.t=n.tag),c.h=n.hashFn(),this.sendRequest(l,c,function(h){var d=h.d,v=h.s;t.warnOnListenWarnings_(d,i);var g=r.listens.get(s)&&r.listens.get(s).get(a);g===n&&(r.log_("listen response",h),v!=="ok"&&r.removeListen_(s,a),n.onComplete&&n.onComplete(v,d))})},t.warnOnListenWarnings_=function(n,r){if(n&&typeof n=="object"&&Ar(n,"w")){var i=pa(n,"w");if(Array.isArray(i)&&~i.indexOf("no_index")){var s='".indexOn": "'+r._queryParams.getIndex().toString()+'"',a=r._path.toString();yn("Using an unspecified index. Your data will be downloaded and "+("filtered on the client. Consider adding "+s+" at ")+(a+" to your security rules for better performance."))}}},t.prototype.refreshAuthToken=function(n){this.authToken_=n,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},function(){}),this.reduceReconnectDelayIfAdminCredential_(n)},t.prototype.reduceReconnectDelayIfAdminCredential_=function(n){var r=n&&n.length===40;(r||mW(n))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=U1)},t.prototype.refreshAppCheckToken=function(n){this.appCheckToken_=n,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},function(){})},t.prototype.tryAuth=function(){var n=this;if(this.connected_&&this.authToken_){var r=this.authToken_,i=gW(r)?"auth":"gauth",s={cred:r};this.authOverride_===null?s.noauth=!0:typeof this.authOverride_=="object"&&(s.authvar=this.authOverride_),this.sendRequest(i,s,function(a){var c=a.s,l=a.d||"error";n.authToken_===r&&(c==="ok"?n.invalidAuthTokenCount_=0:n.onAuthRevoked_(c,l))})}},t.prototype.tryAppCheck=function(){var n=this;this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},function(r){var i=r.s,s=r.d||"error";i==="ok"?n.invalidAppCheckTokenCount_=0:n.onAppCheckRevoked_(i,s)})},t.prototype.unlisten=function(n,r){var i=n._path.toString(),s=n._queryIdentifier;this.log_("Unlisten called for "+i+" "+s),G(n._queryParams.isDefault()||!n._queryParams.loadsAllData(),"unlisten() called for non-default but complete query");var a=this.removeListen_(i,s);a&&this.connected_&&this.sendUnlisten_(i,s,n._queryObject,r)},t.prototype.sendUnlisten_=function(n,r,i,s){this.log_("Unlisten on "+n+" for "+r);var a={p:n},c="n";s&&(a.q=i,a.t=s),this.sendRequest(c,a)},t.prototype.onDisconnectPut=function(n,r,i){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",n,r,i):this.onDisconnectRequestQueue_.push({pathString:n,action:"o",data:r,onComplete:i})},t.prototype.onDisconnectMerge=function(n,r,i){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",n,r,i):this.onDisconnectRequestQueue_.push({pathString:n,action:"om",data:r,onComplete:i})},t.prototype.onDisconnectCancel=function(n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",n,null,r):this.onDisconnectRequestQueue_.push({pathString:n,action:"oc",data:null,onComplete:r})},t.prototype.sendOnDisconnect_=function(n,r,i,s){var a={p:r,d:i};this.log_("onDisconnect "+n,a),this.sendRequest(n,a,function(c){s&&setTimeout(function(){s(c.s,c.d)},Math.floor(0))})},t.prototype.put=function(n,r,i,s){this.putInternal("p",n,r,i,s)},t.prototype.merge=function(n,r,i,s){this.putInternal("m",n,r,i,s)},t.prototype.putInternal=function(n,r,i,s,a){this.initConnection_();var c={p:r,d:i};a!==void 0&&(c.h=a),this.outstandingPuts_.push({action:n,request:c,onComplete:s}),this.outstandingPutCount_++;var l=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(l):this.log_("Buffering put: "+r)},t.prototype.sendPut_=function(n){var r=this,i=this.outstandingPuts_[n].action,s=this.outstandingPuts_[n].request,a=this.outstandingPuts_[n].onComplete;this.outstandingPuts_[n].queued=this.connected_,this.sendRequest(i,s,function(c){r.log_(i+" response",c),delete r.outstandingPuts_[n],r.outstandingPutCount_--,r.outstandingPutCount_===0&&(r.outstandingPuts_=[]),a&&a(c.s,c.d)})},t.prototype.reportStats=function(n){var r=this;if(this.connected_){var i={c:n};this.log_("reportStats",i),this.sendRequest("s",i,function(s){var a=s.s;if(a!=="ok"){var c=s.d;r.log_("reportStats","Error sending stats: "+c)}})}},t.prototype.onDataMessage_=function(n){if("r"in n){this.log_("from server: "+Kt(n));var r=n.r,i=this.requestCBHash_[r];i&&(delete this.requestCBHash_[r],i(n.b))}else{if("error"in n)throw"A server-side error has occurred: "+n.error;"a"in n&&this.onDataPush_(n.a,n.b)}},t.prototype.onDataPush_=function(n,r){this.log_("handleServerMessage",n,r),n==="d"?this.onDataUpdate_(r.p,r.d,!1,r.t):n==="m"?this.onDataUpdate_(r.p,r.d,!0,r.t):n==="c"?this.onListenRevoked_(r.p,r.q):n==="ac"?this.onAuthRevoked_(r.s,r.d):n==="apc"?this.onAppCheckRevoked_(r.s,r.d):n==="sd"?this.onSecurityDebugPacket_(r):ib("Unrecognized action received from server: "+Kt(n)+` -Are you using the latest client?`)},t.prototype.onReady_=function(n,r){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(n),this.lastSessionId=r,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},t.prototype.scheduleConnect_=function(n){var r=this;G(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(function(){r.establishConnectionTimer_=null,r.establishConnection_()},Math.floor(n))},t.prototype.initConnection_=function(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)},t.prototype.onVisible_=function(n){n&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=Ol,this.realtime_||this.scheduleConnect_(0)),this.visible_=n},t.prototype.onOnline_=function(n){n?(this.log_("Browser went online."),this.reconnectDelay_=Ol,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},t.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(!this.visible_)this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime();else if(this.lastConnectionEstablishedTime_){var n=new Date().getTime()-this.lastConnectionEstablishedTime_;n>JG&&(this.reconnectDelay_=Ol),this.lastConnectionEstablishedTime_=null}var r=new Date().getTime()-this.lastConnectionAttemptTime_,i=Math.max(0,this.reconnectDelay_-r);i=Math.random()*i,this.log_("Trying to reconnect in "+i+"ms"),this.scheduleConnect_(i),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,this.reconnectDelay_*XG)}this.onConnectStatus_(!1)},t.prototype.establishConnection_=function(){return R(this,void 0,void 0,function(){var n,r,i,s,a,c,l,h,d,v,g,y,_,b,T=this;return A(this,function(C){switch(C.label){case 0:if(!this.shouldReconnect_())return[3,4];this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null,n=this.onDataMessage_.bind(this),r=this.onReady_.bind(this),i=this.onRealtimeDisconnect_.bind(this),s=this.id+":"+t.nextConnectionId_++,a=this.lastSessionId,c=!1,l=null,h=function(){l?l.close():(c=!0,i())},d=function(x){G(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(x)},this.realtime_={close:h,sendRequest:d},v=this.forceTokenRefresh_,this.forceTokenRefresh_=!1,C.label=1;case 1:return C.trys.push([1,3,,4]),[4,Promise.all([this.authTokenProvider_.getToken(v),this.appCheckTokenProvider_.getToken(v)])];case 2:return g=gn.apply(void 0,[C.sent(),2]),y=g[0],_=g[1],c?tn("getToken() completed but was canceled"):(tn("getToken() completed. Creating connection."),this.authToken_=y&&y.accessToken,this.appCheckToken_=_&&_.token,l=new VP(s,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,n,r,i,function(x){yn(x+" ("+T.repoInfo_.toString()+")"),T.interrupt(ZG)},a)),[3,4];case 3:return b=C.sent(),this.log_("Failed to get token: "+b),c||(this.repoInfo_.nodeAdmin&&yn(b),h()),[3,4];case 4:return[2]}})})},t.prototype.interrupt=function(n){tn("Interrupting connection for reason: "+n),this.interruptReasons_[n]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},t.prototype.resume=function(n){tn("Resuming connection for reason: "+n),delete this.interruptReasons_[n],tb(this.interruptReasons_)&&(this.reconnectDelay_=Ol,this.realtime_||this.scheduleConnect_(0))},t.prototype.handleTimestamp_=function(n){var r=n-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:r})},t.prototype.cancelSentTransactions_=function(){for(var n=0;n=j1&&(this.reconnectDelay_=U1,this.authTokenProvider_.notifyForInvalidToken()))},t.prototype.onAppCheckRevoked_=function(n,r){tn("App check token revoked: "+n+"/"+r),this.appCheckToken_=null,this.forceTokenRefresh_=!0,(n==="invalid_token"||n==="permission_denied")&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=j1&&this.appCheckTokenProvider_.notifyForInvalidToken())},t.prototype.onSecurityDebugPacket_=function(n){this.securityDebugCallback_?this.securityDebugCallback_(n):"msg"in n&&console.log("FIREBASE: "+n.msg.replace(` + */var Ol=1e3,WG=60*5*1e3,GG=3*1e3,U1=30*1e3,zG=1.3,QG=3e4,YG="server_kill",j1=3,ia=function(e){te(t,e);function t(n,r,i,s,a,c,l,h){var d=e.call(this)||this;if(d.repoInfo_=n,d.applicationId_=r,d.onDataUpdate_=i,d.onConnectStatus_=s,d.onServerInfoUpdate_=a,d.authTokenProvider_=c,d.appCheckTokenProvider_=l,d.authOverride_=h,d.id=t.nextPersistentConnectionId_++,d.log_=th("p:"+d.id+":"),d.interruptReasons_={},d.listens=new Map,d.outstandingPuts_=[],d.outstandingGets_=[],d.outstandingPutCount_=0,d.outstandingGetCount_=0,d.onDisconnectRequestQueue_=[],d.connected_=!1,d.reconnectDelay_=Ol,d.maxReconnectDelay_=WG,d.securityDebugCallback_=null,d.lastSessionId=null,d.establishConnectionTimer_=null,d.visible_=!1,d.requestCBHash_={},d.requestNumber_=0,d.realtime_=null,d.authToken_=null,d.appCheckToken_=null,d.forceTokenRefresh_=!1,d.invalidAuthTokenCount_=0,d.invalidAppCheckTokenCount_=0,d.firstConnection_=!0,d.lastConnectionAttemptTime_=null,d.lastConnectionEstablishedTime_=null,h&&!lP())throw new Error("Auth override specified in options, but not supported on non Node.js platforms");return KG.getInstance().on("visible",d.onVisible_,d),n.host.indexOf("fblocal")===-1&&M1.getInstance().on("online",d.onOnline_,d),d}return t.prototype.sendRequest=function(n,r,i){var s=++this.requestNumber_,a={r:s,a:n,b:r};this.log_(Kt(a)),G(this.connected_,"sendRequest call when we're not connected not allowed."),this.realtime_.sendRequest(a),i&&(this.requestCBHash_[s]=i)},t.prototype.get=function(n){var r=this;this.initConnection_();var i=new rn,s={p:n._path.toString(),q:n._queryObject},a={action:"g",request:s,onComplete:function(l){var h=l.d;l.s==="ok"?(r.onDataUpdate_(s.p,h,!1,null),i.resolve(h)):i.reject(h)}};this.outstandingGets_.push(a),this.outstandingGetCount_++;var c=this.outstandingGets_.length-1;return this.connected_||setTimeout(function(){var l=r.outstandingGets_[c];l===void 0||a!==l||(delete r.outstandingGets_[c],r.outstandingGetCount_--,r.outstandingGetCount_===0&&(r.outstandingGets_=[]),r.log_("get "+c+" timed out on connection"),i.reject(new Error("Client is offline.")))},GG),this.connected_&&this.sendGet_(c),i.promise},t.prototype.listen=function(n,r,i,s){this.initConnection_();var a=n._queryIdentifier,c=n._path.toString();this.log_("Listen called for "+c+" "+a),this.listens.has(c)||this.listens.set(c,new Map),G(n._queryParams.isDefault()||!n._queryParams.loadsAllData(),"listen() called for non-default but complete query"),G(!this.listens.get(c).has(a),"listen() called twice for same path/queryId.");var l={onComplete:s,hashFn:r,query:n,tag:i};this.listens.get(c).set(a,l),this.connected_&&this.sendListen_(l)},t.prototype.sendGet_=function(n){var r=this,i=this.outstandingGets_[n];this.sendRequest("g",i.request,function(s){delete r.outstandingGets_[n],r.outstandingGetCount_--,r.outstandingGetCount_===0&&(r.outstandingGets_=[]),i.onComplete&&i.onComplete(s)})},t.prototype.sendListen_=function(n){var r=this,i=n.query,s=i._path.toString(),a=i._queryIdentifier;this.log_("Listen on "+s+" for "+a);var c={p:s},l="q";n.tag&&(c.q=i._queryObject,c.t=n.tag),c.h=n.hashFn(),this.sendRequest(l,c,function(h){var d=h.d,v=h.s;t.warnOnListenWarnings_(d,i);var g=r.listens.get(s)&&r.listens.get(s).get(a);g===n&&(r.log_("listen response",h),v!=="ok"&&r.removeListen_(s,a),n.onComplete&&n.onComplete(v,d))})},t.warnOnListenWarnings_=function(n,r){if(n&&typeof n=="object"&&Ar(n,"w")){var i=pa(n,"w");if(Array.isArray(i)&&~i.indexOf("no_index")){var s='".indexOn": "'+r._queryParams.getIndex().toString()+'"',a=r._path.toString();yn("Using an unspecified index. Your data will be downloaded and "+("filtered on the client. Consider adding "+s+" at ")+(a+" to your security rules for better performance."))}}},t.prototype.refreshAuthToken=function(n){this.authToken_=n,this.log_("Auth token refreshed"),this.authToken_?this.tryAuth():this.connected_&&this.sendRequest("unauth",{},function(){}),this.reduceReconnectDelayIfAdminCredential_(n)},t.prototype.reduceReconnectDelayIfAdminCredential_=function(n){var r=n&&n.length===40;(r||pW(n))&&(this.log_("Admin auth credential detected. Reducing max reconnect time."),this.maxReconnectDelay_=U1)},t.prototype.refreshAppCheckToken=function(n){this.appCheckToken_=n,this.log_("App check token refreshed"),this.appCheckToken_?this.tryAppCheck():this.connected_&&this.sendRequest("unappeck",{},function(){})},t.prototype.tryAuth=function(){var n=this;if(this.connected_&&this.authToken_){var r=this.authToken_,i=dW(r)?"auth":"gauth",s={cred:r};this.authOverride_===null?s.noauth=!0:typeof this.authOverride_=="object"&&(s.authvar=this.authOverride_),this.sendRequest(i,s,function(a){var c=a.s,l=a.d||"error";n.authToken_===r&&(c==="ok"?n.invalidAuthTokenCount_=0:n.onAuthRevoked_(c,l))})}},t.prototype.tryAppCheck=function(){var n=this;this.connected_&&this.appCheckToken_&&this.sendRequest("appcheck",{token:this.appCheckToken_},function(r){var i=r.s,s=r.d||"error";i==="ok"?n.invalidAppCheckTokenCount_=0:n.onAppCheckRevoked_(i,s)})},t.prototype.unlisten=function(n,r){var i=n._path.toString(),s=n._queryIdentifier;this.log_("Unlisten called for "+i+" "+s),G(n._queryParams.isDefault()||!n._queryParams.loadsAllData(),"unlisten() called for non-default but complete query");var a=this.removeListen_(i,s);a&&this.connected_&&this.sendUnlisten_(i,s,n._queryObject,r)},t.prototype.sendUnlisten_=function(n,r,i,s){this.log_("Unlisten on "+n+" for "+r);var a={p:n},c="n";s&&(a.q=i,a.t=s),this.sendRequest(c,a)},t.prototype.onDisconnectPut=function(n,r,i){this.initConnection_(),this.connected_?this.sendOnDisconnect_("o",n,r,i):this.onDisconnectRequestQueue_.push({pathString:n,action:"o",data:r,onComplete:i})},t.prototype.onDisconnectMerge=function(n,r,i){this.initConnection_(),this.connected_?this.sendOnDisconnect_("om",n,r,i):this.onDisconnectRequestQueue_.push({pathString:n,action:"om",data:r,onComplete:i})},t.prototype.onDisconnectCancel=function(n,r){this.initConnection_(),this.connected_?this.sendOnDisconnect_("oc",n,null,r):this.onDisconnectRequestQueue_.push({pathString:n,action:"oc",data:null,onComplete:r})},t.prototype.sendOnDisconnect_=function(n,r,i,s){var a={p:r,d:i};this.log_("onDisconnect "+n,a),this.sendRequest(n,a,function(c){s&&setTimeout(function(){s(c.s,c.d)},Math.floor(0))})},t.prototype.put=function(n,r,i,s){this.putInternal("p",n,r,i,s)},t.prototype.merge=function(n,r,i,s){this.putInternal("m",n,r,i,s)},t.prototype.putInternal=function(n,r,i,s,a){this.initConnection_();var c={p:r,d:i};a!==void 0&&(c.h=a),this.outstandingPuts_.push({action:n,request:c,onComplete:s}),this.outstandingPutCount_++;var l=this.outstandingPuts_.length-1;this.connected_?this.sendPut_(l):this.log_("Buffering put: "+r)},t.prototype.sendPut_=function(n){var r=this,i=this.outstandingPuts_[n].action,s=this.outstandingPuts_[n].request,a=this.outstandingPuts_[n].onComplete;this.outstandingPuts_[n].queued=this.connected_,this.sendRequest(i,s,function(c){r.log_(i+" response",c),delete r.outstandingPuts_[n],r.outstandingPutCount_--,r.outstandingPutCount_===0&&(r.outstandingPuts_=[]),a&&a(c.s,c.d)})},t.prototype.reportStats=function(n){var r=this;if(this.connected_){var i={c:n};this.log_("reportStats",i),this.sendRequest("s",i,function(s){var a=s.s;if(a!=="ok"){var c=s.d;r.log_("reportStats","Error sending stats: "+c)}})}},t.prototype.onDataMessage_=function(n){if("r"in n){this.log_("from server: "+Kt(n));var r=n.r,i=this.requestCBHash_[r];i&&(delete this.requestCBHash_[r],i(n.b))}else{if("error"in n)throw"A server-side error has occurred: "+n.error;"a"in n&&this.onDataPush_(n.a,n.b)}},t.prototype.onDataPush_=function(n,r){this.log_("handleServerMessage",n,r),n==="d"?this.onDataUpdate_(r.p,r.d,!1,r.t):n==="m"?this.onDataUpdate_(r.p,r.d,!0,r.t):n==="c"?this.onListenRevoked_(r.p,r.q):n==="ac"?this.onAuthRevoked_(r.s,r.d):n==="apc"?this.onAppCheckRevoked_(r.s,r.d):n==="sd"?this.onSecurityDebugPacket_(r):ib("Unrecognized action received from server: "+Kt(n)+` +Are you using the latest client?`)},t.prototype.onReady_=function(n,r){this.log_("connection ready"),this.connected_=!0,this.lastConnectionEstablishedTime_=new Date().getTime(),this.handleTimestamp_(n),this.lastSessionId=r,this.firstConnection_&&this.sendConnectStats_(),this.restoreState_(),this.firstConnection_=!1,this.onConnectStatus_(!0)},t.prototype.scheduleConnect_=function(n){var r=this;G(!this.realtime_,"Scheduling a connect when we're already connected/ing?"),this.establishConnectionTimer_&&clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=setTimeout(function(){r.establishConnectionTimer_=null,r.establishConnection_()},Math.floor(n))},t.prototype.initConnection_=function(){!this.realtime_&&this.firstConnection_&&this.scheduleConnect_(0)},t.prototype.onVisible_=function(n){n&&!this.visible_&&this.reconnectDelay_===this.maxReconnectDelay_&&(this.log_("Window became visible. Reducing delay."),this.reconnectDelay_=Ol,this.realtime_||this.scheduleConnect_(0)),this.visible_=n},t.prototype.onOnline_=function(n){n?(this.log_("Browser went online."),this.reconnectDelay_=Ol,this.realtime_||this.scheduleConnect_(0)):(this.log_("Browser went offline. Killing connection."),this.realtime_&&this.realtime_.close())},t.prototype.onRealtimeDisconnect_=function(){if(this.log_("data client disconnected"),this.connected_=!1,this.realtime_=null,this.cancelSentTransactions_(),this.requestCBHash_={},this.shouldReconnect_()){if(!this.visible_)this.log_("Window isn't visible. Delaying reconnect."),this.reconnectDelay_=this.maxReconnectDelay_,this.lastConnectionAttemptTime_=new Date().getTime();else if(this.lastConnectionEstablishedTime_){var n=new Date().getTime()-this.lastConnectionEstablishedTime_;n>QG&&(this.reconnectDelay_=Ol),this.lastConnectionEstablishedTime_=null}var r=new Date().getTime()-this.lastConnectionAttemptTime_,i=Math.max(0,this.reconnectDelay_-r);i=Math.random()*i,this.log_("Trying to reconnect in "+i+"ms"),this.scheduleConnect_(i),this.reconnectDelay_=Math.min(this.maxReconnectDelay_,this.reconnectDelay_*zG)}this.onConnectStatus_(!1)},t.prototype.establishConnection_=function(){return R(this,void 0,void 0,function(){var n,r,i,s,a,c,l,h,d,v,g,y,_,b,T=this;return A(this,function(C){switch(C.label){case 0:if(!this.shouldReconnect_())return[3,4];this.log_("Making a connection attempt"),this.lastConnectionAttemptTime_=new Date().getTime(),this.lastConnectionEstablishedTime_=null,n=this.onDataMessage_.bind(this),r=this.onReady_.bind(this),i=this.onRealtimeDisconnect_.bind(this),s=this.id+":"+t.nextConnectionId_++,a=this.lastSessionId,c=!1,l=null,h=function(){l?l.close():(c=!0,i())},d=function(x){G(l,"sendRequest call when we're not connected not allowed."),l.sendRequest(x)},this.realtime_={close:h,sendRequest:d},v=this.forceTokenRefresh_,this.forceTokenRefresh_=!1,C.label=1;case 1:return C.trys.push([1,3,,4]),[4,Promise.all([this.authTokenProvider_.getToken(v),this.appCheckTokenProvider_.getToken(v)])];case 2:return g=gn.apply(void 0,[C.sent(),2]),y=g[0],_=g[1],c?en("getToken() completed but was canceled"):(en("getToken() completed. Creating connection."),this.authToken_=y&&y.accessToken,this.appCheckToken_=_&&_.token,l=new VP(s,this.repoInfo_,this.applicationId_,this.appCheckToken_,this.authToken_,n,r,i,function(x){yn(x+" ("+T.repoInfo_.toString()+")"),T.interrupt(YG)},a)),[3,4];case 3:return b=C.sent(),this.log_("Failed to get token: "+b),c||(this.repoInfo_.nodeAdmin&&yn(b),h()),[3,4];case 4:return[2]}})})},t.prototype.interrupt=function(n){en("Interrupting connection for reason: "+n),this.interruptReasons_[n]=!0,this.realtime_?this.realtime_.close():(this.establishConnectionTimer_&&(clearTimeout(this.establishConnectionTimer_),this.establishConnectionTimer_=null),this.connected_&&this.onRealtimeDisconnect_())},t.prototype.resume=function(n){en("Resuming connection for reason: "+n),delete this.interruptReasons_[n],tb(this.interruptReasons_)&&(this.reconnectDelay_=Ol,this.realtime_||this.scheduleConnect_(0))},t.prototype.handleTimestamp_=function(n){var r=n-new Date().getTime();this.onServerInfoUpdate_({serverTimeOffset:r})},t.prototype.cancelSentTransactions_=function(){for(var n=0;n=j1&&(this.reconnectDelay_=U1,this.authTokenProvider_.notifyForInvalidToken()))},t.prototype.onAppCheckRevoked_=function(n,r){en("App check token revoked: "+n+"/"+r),this.appCheckToken_=null,this.forceTokenRefresh_=!0,(n==="invalid_token"||n==="permission_denied")&&(this.invalidAppCheckTokenCount_++,this.invalidAppCheckTokenCount_>=j1&&this.appCheckTokenProvider_.notifyForInvalidToken())},t.prototype.onSecurityDebugPacket_=function(n){this.securityDebugCallback_?this.securityDebugCallback_(n):"msg"in n&&console.log("FIREBASE: "+n.msg.replace(` `,` -FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),this.tryAppCheck();try{for(var a=an(this.listens.values()),c=a.next();!c.done;c=a.next()){var l=c.value;try{for(var h=(i=void 0,an(l.values())),d=h.next();!d.done;d=h.next()){var v=d.value;this.sendListen_(v)}}catch(_){i={error:_}}finally{try{d&&!d.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}}}catch(_){n={error:_}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}for(var g=0;g0},e.prototype.peek=function(){if(this.nodeStack_.length===0)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},e}(),ri=function(){function e(t,n,r,i,s){this.key=t,this.value=n,this.color=r??e.RED,this.left=i??to.EMPTY_NODE,this.right=s??to.EMPTY_NODE}return e.prototype.copy=function(t,n,r,i,s){return new e(t??this.key,n??this.value,r??this.color,i??this.left,s??this.right)},e.prototype.count=function(){return this.left.count()+1+this.right.count()},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||!!t(this.key,this.value)||this.right.inorderTraversal(t)},e.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},e.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},e.prototype.minKey=function(){return this.min_().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(t,n,r){var i=this,s=r(t,i.key);return s<0?i=i.copy(null,null,null,i.left.insert(t,n,r),null):s===0?i=i.copy(null,n,null,null,null):i=i.copy(null,null,null,null,i.right.insert(t,n,r)),i.fixUp_()},e.prototype.removeMin_=function(){if(this.left.isEmpty())return to.EMPTY_NODE;var t=this;return!t.left.isRed_()&&!t.left.left.isRed_()&&(t=t.moveRedLeft_()),t=t.copy(null,null,null,t.left.removeMin_(),null),t.fixUp_()},e.prototype.remove=function(t,n){var r,i;if(r=this,n(t,r.key)<0)!r.left.isEmpty()&&!r.left.isRed_()&&!r.left.left.isRed_()&&(r=r.moveRedLeft_()),r=r.copy(null,null,null,r.left.remove(t,n),null);else{if(r.left.isRed_()&&(r=r.rotateRight_()),!r.right.isEmpty()&&!r.right.isRed_()&&!r.right.left.isRed_()&&(r=r.moveRedRight_()),n(t,r.key)===0){if(r.right.isEmpty())return to.EMPTY_NODE;i=r.right.min_(),r=r.copy(i.key,i.value,null,null,r.right.removeMin_())}r=r.copy(null,null,null,null,r.right.remove(t,n))}return r.fixUp_()},e.prototype.isRed_=function(){return this.color},e.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},e.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=t.copy(null,null,null,null,t.right.rotateRight_()),t=t.rotateLeft_(),t=t.colorFlip_()),t},e.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=t.rotateRight_(),t=t.colorFlip_()),t},e.prototype.rotateLeft_=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight_=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,n)},e.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},e.prototype.check_=function(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");var t=this.left.check_();if(t!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},e.RED=!0,e.BLACK=!1,e}(),e6=function(){function e(){}return e.prototype.copy=function(t,n,r,i,s){return this},e.prototype.insert=function(t,n,r){return new ri(t,n,null)},e.prototype.remove=function(t,n){return this},e.prototype.count=function(){return 0},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(t){return!1},e.prototype.reverseTraversal=function(t){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.check_=function(){return 0},e.prototype.isRed_=function(){return!1},e}(),to=function(){function e(t,n){n===void 0&&(n=e.EMPTY_NODE),this.comparator_=t,this.root_=n}return e.prototype.insert=function(t,n){return new e(this.comparator_,this.root_.insert(t,n,this.comparator_).copy(null,null,ri.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,ri.BLACK,null,null))},e.prototype.get=function(t){for(var n,r=this.root_;!r.isEmpty();){if(n=this.comparator_(t,r.key),n===0)return r.value;n<0?r=r.left:n>0&&(r=r.right)}return null},e.prototype.getPredecessorKey=function(t){for(var n,r=this.root_,i=null;!r.isEmpty();)if(n=this.comparator_(t,r.key),n===0){if(r.left.isEmpty())return i?i.key:null;for(r=r.left;!r.right.isEmpty();)r=r.right;return r.key}else n<0?r=r.left:n>0&&(i=r,r=r.right);throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},e.prototype.isEmpty=function(){return this.root_.isEmpty()},e.prototype.count=function(){return this.root_.count()},e.prototype.minKey=function(){return this.root_.minKey()},e.prototype.maxKey=function(){return this.root_.maxKey()},e.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},e.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},e.prototype.getIterator=function(t){return new Vd(this.root_,null,this.comparator_,!1,t)},e.prototype.getIteratorFrom=function(t,n){return new Vd(this.root_,t,this.comparator_,!1,n)},e.prototype.getReverseIteratorFrom=function(t,n){return new Vd(this.root_,t,this.comparator_,!0,n)},e.prototype.getReverseIterator=function(t){return new Vd(this.root_,null,this.comparator_,!0,t)},e.EMPTY_NODE=new e6,e}();/** + */var Bd=function(){function e(t,n,r,i,s){s===void 0&&(s=null),this.isReverse_=i,this.resultGenerator_=s,this.nodeStack_=[];for(var a=1;!t.isEmpty();)if(t=t,a=n?r(t.key,n):1,i&&(a*=-1),a<0)this.isReverse_?t=t.left:t=t.right;else if(a===0){this.nodeStack_.push(t);break}else this.nodeStack_.push(t),this.isReverse_?t=t.right:t=t.left}return e.prototype.getNext=function(){if(this.nodeStack_.length===0)return null;var t=this.nodeStack_.pop(),n;if(this.resultGenerator_?n=this.resultGenerator_(t.key,t.value):n={key:t.key,value:t.value},this.isReverse_)for(t=t.left;!t.isEmpty();)this.nodeStack_.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack_.push(t),t=t.left;return n},e.prototype.hasNext=function(){return this.nodeStack_.length>0},e.prototype.peek=function(){if(this.nodeStack_.length===0)return null;var t=this.nodeStack_[this.nodeStack_.length-1];return this.resultGenerator_?this.resultGenerator_(t.key,t.value):{key:t.key,value:t.value}},e}(),ri=function(){function e(t,n,r,i,s){this.key=t,this.value=n,this.color=r??e.RED,this.left=i??to.EMPTY_NODE,this.right=s??to.EMPTY_NODE}return e.prototype.copy=function(t,n,r,i,s){return new e(t??this.key,n??this.value,r??this.color,i??this.left,s??this.right)},e.prototype.count=function(){return this.left.count()+1+this.right.count()},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||!!t(this.key,this.value)||this.right.inorderTraversal(t)},e.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},e.prototype.min_=function(){return this.left.isEmpty()?this:this.left.min_()},e.prototype.minKey=function(){return this.min_().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(t,n,r){var i=this,s=r(t,i.key);return s<0?i=i.copy(null,null,null,i.left.insert(t,n,r),null):s===0?i=i.copy(null,n,null,null,null):i=i.copy(null,null,null,null,i.right.insert(t,n,r)),i.fixUp_()},e.prototype.removeMin_=function(){if(this.left.isEmpty())return to.EMPTY_NODE;var t=this;return!t.left.isRed_()&&!t.left.left.isRed_()&&(t=t.moveRedLeft_()),t=t.copy(null,null,null,t.left.removeMin_(),null),t.fixUp_()},e.prototype.remove=function(t,n){var r,i;if(r=this,n(t,r.key)<0)!r.left.isEmpty()&&!r.left.isRed_()&&!r.left.left.isRed_()&&(r=r.moveRedLeft_()),r=r.copy(null,null,null,r.left.remove(t,n),null);else{if(r.left.isRed_()&&(r=r.rotateRight_()),!r.right.isEmpty()&&!r.right.isRed_()&&!r.right.left.isRed_()&&(r=r.moveRedRight_()),n(t,r.key)===0){if(r.right.isEmpty())return to.EMPTY_NODE;i=r.right.min_(),r=r.copy(i.key,i.value,null,null,r.right.removeMin_())}r=r.copy(null,null,null,null,r.right.remove(t,n))}return r.fixUp_()},e.prototype.isRed_=function(){return this.color},e.prototype.fixUp_=function(){var t=this;return t.right.isRed_()&&!t.left.isRed_()&&(t=t.rotateLeft_()),t.left.isRed_()&&t.left.left.isRed_()&&(t=t.rotateRight_()),t.left.isRed_()&&t.right.isRed_()&&(t=t.colorFlip_()),t},e.prototype.moveRedLeft_=function(){var t=this.colorFlip_();return t.right.left.isRed_()&&(t=t.copy(null,null,null,null,t.right.rotateRight_()),t=t.rotateLeft_(),t=t.colorFlip_()),t},e.prototype.moveRedRight_=function(){var t=this.colorFlip_();return t.left.left.isRed_()&&(t=t.rotateRight_(),t=t.colorFlip_()),t},e.prototype.rotateLeft_=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight_=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip_=function(){var t=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,n)},e.prototype.checkMaxDepth_=function(){var t=this.check_();return Math.pow(2,t)<=this.count()+1},e.prototype.check_=function(){if(this.isRed_()&&this.left.isRed_())throw new Error("Red node has red child("+this.key+","+this.value+")");if(this.right.isRed_())throw new Error("Right child of ("+this.key+","+this.value+") is red");var t=this.left.check_();if(t!==this.right.check_())throw new Error("Black depths differ");return t+(this.isRed_()?0:1)},e.RED=!0,e.BLACK=!1,e}(),XG=function(){function e(){}return e.prototype.copy=function(t,n,r,i,s){return this},e.prototype.insert=function(t,n,r){return new ri(t,n,null)},e.prototype.remove=function(t,n){return this},e.prototype.count=function(){return 0},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(t){return!1},e.prototype.reverseTraversal=function(t){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.check_=function(){return 0},e.prototype.isRed_=function(){return!1},e}(),to=function(){function e(t,n){n===void 0&&(n=e.EMPTY_NODE),this.comparator_=t,this.root_=n}return e.prototype.insert=function(t,n){return new e(this.comparator_,this.root_.insert(t,n,this.comparator_).copy(null,null,ri.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator_,this.root_.remove(t,this.comparator_).copy(null,null,ri.BLACK,null,null))},e.prototype.get=function(t){for(var n,r=this.root_;!r.isEmpty();){if(n=this.comparator_(t,r.key),n===0)return r.value;n<0?r=r.left:n>0&&(r=r.right)}return null},e.prototype.getPredecessorKey=function(t){for(var n,r=this.root_,i=null;!r.isEmpty();)if(n=this.comparator_(t,r.key),n===0){if(r.left.isEmpty())return i?i.key:null;for(r=r.left;!r.right.isEmpty();)r=r.right;return r.key}else n<0?r=r.left:n>0&&(i=r,r=r.right);throw new Error("Attempted to find predecessor key for a nonexistent key. What gives?")},e.prototype.isEmpty=function(){return this.root_.isEmpty()},e.prototype.count=function(){return this.root_.count()},e.prototype.minKey=function(){return this.root_.minKey()},e.prototype.maxKey=function(){return this.root_.maxKey()},e.prototype.inorderTraversal=function(t){return this.root_.inorderTraversal(t)},e.prototype.reverseTraversal=function(t){return this.root_.reverseTraversal(t)},e.prototype.getIterator=function(t){return new Bd(this.root_,null,this.comparator_,!1,t)},e.prototype.getIteratorFrom=function(t,n){return new Bd(this.root_,t,this.comparator_,!1,n)},e.prototype.getReverseIteratorFrom=function(t,n){return new Bd(this.root_,t,this.comparator_,!0,n)},e.prototype.getReverseIterator=function(t){return new Bd(this.root_,null,this.comparator_,!0,t)},e.EMPTY_NODE=new XG,e}();/** * @license * Copyright 2017 Google LLC * @@ -892,7 +892,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function t6(e,t){return Na(e.name,t.name)}function aE(e,t){return Na(e,t)}/** + */function JG(e,t){return Na(e.name,t.name)}function aE(e,t){return Na(e,t)}/** * @license * Copyright 2017 Google LLC * @@ -907,7 +907,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var sb;function n6(e){sb=e}var WP=function(e){return typeof e=="number"?"number:"+IP(e):"string:"+e},GP=function(e){if(e.isLeafNode()){var t=e.val();G(typeof t=="string"||typeof t=="number"||typeof t=="object"&&Ar(t,".sv"),"Priority must be a string or number.")}else G(e===sb||e.isEmpty(),"priority of unexpected type.");G(e===sb||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};/** + */var sb;function ZG(e){sb=e}var WP=function(e){return typeof e=="number"?"number:"+IP(e):"string:"+e},GP=function(e){if(e.isLeafNode()){var t=e.val();G(typeof t=="string"||typeof t=="number"||typeof t=="object"&&Ar(t,".sv"),"Priority must be a string or number.")}else G(e===sb||e.isEmpty(),"priority of unexpected type.");G(e===sb||e.getPriority().isEmpty(),"Priority nodes can't have a priority of their own.")};/** * @license * Copyright 2017 Google LLC * @@ -937,7 +937,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var zP,QP;function r6(e){zP=e}function i6(e){QP=e}var o6=function(e){te(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.compare=function(n,r){var i=n.node.getPriority(),s=r.node.getPriority(),a=i.compareTo(s);return a===0?Na(n.name,r.name):a},t.prototype.isDefinedOn=function(n){return!n.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(n,r){return!n.getPriority().equals(r.getPriority())},t.prototype.minPost=function(){return Be.MIN},t.prototype.maxPost=function(){return new Be(Fi,new Gu("[PRIORITY-POST]",QP))},t.prototype.makePost=function(n,r){var i=zP(n);return new Be(r,new Gu("[PRIORITY-POST]",i))},t.prototype.toString=function(){return".priority"},t}(zv),ht=new o6;/** + */var zP,QP;function e6(e){zP=e}function t6(e){QP=e}var n6=function(e){te(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.compare=function(n,r){var i=n.node.getPriority(),s=r.node.getPriority(),a=i.compareTo(s);return a===0?Na(n.name,r.name):a},t.prototype.isDefinedOn=function(n){return!n.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(n,r){return!n.getPriority().equals(r.getPriority())},t.prototype.minPost=function(){return qe.MIN},t.prototype.maxPost=function(){return new qe(Fi,new Gu("[PRIORITY-POST]",QP))},t.prototype.makePost=function(n,r){var i=zP(n);return new qe(r,new Gu("[PRIORITY-POST]",i))},t.prototype.toString=function(){return".priority"},t}(zv),ht=new n6;/** * @license * Copyright 2017 Google LLC * @@ -952,7 +952,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var s6=Math.log(2),a6=function(){function e(t){var n=function(s){return parseInt(Math.log(s)/s6,10)},r=function(s){return parseInt(Array(s+1).join("1"),2)};this.count=n(t+1),this.current_=this.count-1;var i=r(this.count);this.bits_=t+1&i}return e.prototype.nextBitIsOne=function(){var t=!(this.bits_&1<0;)i.getNext(),s=i.peek();return i},e.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===th?-1:0},e.prototype.withIndex=function(t){if(t===Ni||this.indexMap_.hasIndex(t))return this;var n=this.indexMap_.addIndex(t,this.children_);return new e(this.children_,this.priorityNode_,n)},e.prototype.isIndexed=function(t){return t===Ni||this.indexMap_.hasIndex(t)},e.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var n=t;if(this.getPriority().equals(n.getPriority()))if(this.children_.count()===n.children_.count()){for(var r=this.getIterator(ht),i=n.getIterator(ht),s=r.getNext(),a=i.getNext();s&&a;){if(s.name!==a.name||!s.node.equals(a.node))return!1;s=r.getNext(),a=i.getNext()}return s===null&&a===null}else return!1;else return!1},e.prototype.resolveIndex_=function(t){return t===Ni?null:this.indexMap_.get(t.toString())},e.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,e}(),u6=function(e){te(t,e);function t(){return e.call(this,new to(aE),Se.EMPTY_NODE,Up.Default)||this}return t.prototype.compareTo=function(n){return n===this?0:1},t.prototype.equals=function(n){return n===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(n){return Se.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(Se),th=new u6;Object.defineProperties(Be,{MIN:{value:new Be(lo,Se.EMPTY_NODE)},MAX:{value:new Be(Fi,th)}});KP.__EMPTY_NODE=Se.EMPTY_NODE;Gu.__childrenNodeConstructor=Se;n6(th);i6(th);/** + */var Pl,Se=function(){function e(t,n,r){this.children_=t,this.priorityNode_=n,this.indexMap_=r,this.lazyHash_=null,this.priorityNode_&&GP(this.priorityNode_),this.children_.isEmpty()&&G(!this.priorityNode_||this.priorityNode_.isEmpty(),"An empty node cannot have a priority")}return Object.defineProperty(e,"EMPTY_NODE",{get:function(){return Pl||(Pl=new e(new to(aE),null,Up.Default))},enumerable:!1,configurable:!0}),e.prototype.isLeafNode=function(){return!1},e.prototype.getPriority=function(){return this.priorityNode_||Pl},e.prototype.updatePriority=function(t){return this.children_.isEmpty()?this:new e(this.children_,t,this.indexMap_)},e.prototype.getImmediateChild=function(t){if(t===".priority")return this.getPriority();var n=this.children_.get(t);return n===null?Pl:n},e.prototype.getChild=function(t){var n=Oe(t);return n===null?this:this.getImmediateChild(n).getChild(ft(t))},e.prototype.hasChild=function(t){return this.children_.get(t)!==null},e.prototype.updateImmediateChild=function(t,n){if(G(n,"We should always be passing snapshot nodes"),t===".priority")return this.updatePriority(n);var r=new qe(t,n),i=void 0,s=void 0;n.isEmpty()?(i=this.children_.remove(t),s=this.indexMap_.removeFromIndexes(r,this.children_)):(i=this.children_.insert(t,n),s=this.indexMap_.addToIndexes(r,this.children_));var a=i.isEmpty()?Pl:this.priorityNode_;return new e(i,a,s)},e.prototype.updateChild=function(t,n){var r=Oe(t);if(r===null)return n;G(Oe(t)!==".priority"||rs(t)===1,".priority must be the last token in a path");var i=this.getImmediateChild(r).updateChild(ft(t),n);return this.updateImmediateChild(r,i)},e.prototype.isEmpty=function(){return this.children_.isEmpty()},e.prototype.numChildren=function(){return this.children_.count()},e.prototype.val=function(t){if(this.isEmpty())return null;var n={},r=0,i=0,s=!0;if(this.forEachChild(ht,function(l,h){n[l]=h.val(t),r++,s&&e.INTEGER_REGEXP_.test(l)?i=Math.max(i,Number(l)):s=!1}),!t&&s&&i<2*r){var a=[];for(var c in n)a[c]=n[c];return a}else return t&&!this.getPriority().isEmpty()&&(n[".priority"]=this.getPriority().val()),n},e.prototype.hash=function(){if(this.lazyHash_===null){var t="";this.getPriority().isEmpty()||(t+="priority:"+WP(this.getPriority().val())+":"),this.forEachChild(ht,function(n,r){var i=r.hash();i!==""&&(t+=":"+n+":"+i)}),this.lazyHash_=t===""?"":bP(t)}return this.lazyHash_},e.prototype.getPredecessorChildName=function(t,n,r){var i=this.resolveIndex_(r);if(i){var s=i.getPredecessorKey(new qe(t,n));return s?s.name:null}else return this.children_.getPredecessorKey(t)},e.prototype.getFirstChildName=function(t){var n=this.resolveIndex_(t);if(n){var r=n.minKey();return r&&r.name}else return this.children_.minKey()},e.prototype.getFirstChild=function(t){var n=this.getFirstChildName(t);return n?new qe(n,this.children_.get(n)):null},e.prototype.getLastChildName=function(t){var n=this.resolveIndex_(t);if(n){var r=n.maxKey();return r&&r.name}else return this.children_.maxKey()},e.prototype.getLastChild=function(t){var n=this.getLastChildName(t);return n?new qe(n,this.children_.get(n)):null},e.prototype.forEachChild=function(t,n){var r=this.resolveIndex_(t);return r?r.inorderTraversal(function(i){return n(i.name,i.node)}):this.children_.inorderTraversal(n)},e.prototype.getIterator=function(t){return this.getIteratorFrom(t.minPost(),t)},e.prototype.getIteratorFrom=function(t,n){var r=this.resolveIndex_(n);if(r)return r.getIteratorFrom(t,function(a){return a});for(var i=this.children_.getIteratorFrom(t.name,qe.Wrap),s=i.peek();s!=null&&n.compare(s,t)<0;)i.getNext(),s=i.peek();return i},e.prototype.getReverseIterator=function(t){return this.getReverseIteratorFrom(t.maxPost(),t)},e.prototype.getReverseIteratorFrom=function(t,n){var r=this.resolveIndex_(n);if(r)return r.getReverseIteratorFrom(t,function(a){return a});for(var i=this.children_.getReverseIteratorFrom(t.name,qe.Wrap),s=i.peek();s!=null&&n.compare(s,t)>0;)i.getNext(),s=i.peek();return i},e.prototype.compareTo=function(t){return this.isEmpty()?t.isEmpty()?0:-1:t.isLeafNode()||t.isEmpty()?1:t===nh?-1:0},e.prototype.withIndex=function(t){if(t===Ni||this.indexMap_.hasIndex(t))return this;var n=this.indexMap_.addIndex(t,this.children_);return new e(this.children_,this.priorityNode_,n)},e.prototype.isIndexed=function(t){return t===Ni||this.indexMap_.hasIndex(t)},e.prototype.equals=function(t){if(t===this)return!0;if(t.isLeafNode())return!1;var n=t;if(this.getPriority().equals(n.getPriority()))if(this.children_.count()===n.children_.count()){for(var r=this.getIterator(ht),i=n.getIterator(ht),s=r.getNext(),a=i.getNext();s&&a;){if(s.name!==a.name||!s.node.equals(a.node))return!1;s=r.getNext(),a=i.getNext()}return s===null&&a===null}else return!1;else return!1},e.prototype.resolveIndex_=function(t){return t===Ni?null:this.indexMap_.get(t.toString())},e.INTEGER_REGEXP_=/^(0|[1-9]\d*)$/,e}(),o6=function(e){te(t,e);function t(){return e.call(this,new to(aE),Se.EMPTY_NODE,Up.Default)||this}return t.prototype.compareTo=function(n){return n===this?0:1},t.prototype.equals=function(n){return n===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(n){return Se.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(Se),nh=new o6;Object.defineProperties(qe,{MIN:{value:new qe(co,Se.EMPTY_NODE)},MAX:{value:new qe(Fi,nh)}});KP.__EMPTY_NODE=Se.EMPTY_NODE;Gu.__childrenNodeConstructor=Se;ZG(nh);t6(nh);/** * @license * Copyright 2017 Google LLC * @@ -997,7 +997,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var c6=!0;function Et(e,t){if(t===void 0&&(t=null),e===null)return Se.EMPTY_NODE;if(typeof e=="object"&&".priority"in e&&(t=e[".priority"]),G(t===null||typeof t=="string"||typeof t=="number"||typeof t=="object"&&".sv"in t,"Invalid priority type found: "+typeof t),typeof e=="object"&&".value"in e&&e[".value"]!==null&&(e=e[".value"]),typeof e!="object"||".sv"in e){var n=e;return new Gu(n,Et(t))}if(!(e instanceof Array)&&c6){var r=[],i=!1,s=e;if(Qt(s,function(h,d){if(h.substring(0,1)!=="."){var v=Et(d);v.isEmpty()||(i=i||!v.getPriority().isEmpty(),r.push(new Be(h,v)))}}),r.length===0)return Se.EMPTY_NODE;var a=Fp(r,t6,function(h){return h.name},aE);if(i){var c=Fp(r,ht.getCompare());return new Se(a,Et(t),new Up({".priority":c},{".priority":ht}))}else return new Se(a,Et(t),Up.Default)}else{var l=Se.EMPTY_NODE;return Qt(e,function(h,d){if(Ar(e,h)&&h.substring(0,1)!=="."){var v=Et(d);(v.isLeafNode()||!v.isEmpty())&&(l=l.updateImmediateChild(h,v))}}),l.updatePriority(Et(t))}}r6(Et);/** + */var s6=!0;function Et(e,t){if(t===void 0&&(t=null),e===null)return Se.EMPTY_NODE;if(typeof e=="object"&&".priority"in e&&(t=e[".priority"]),G(t===null||typeof t=="string"||typeof t=="number"||typeof t=="object"&&".sv"in t,"Invalid priority type found: "+typeof t),typeof e=="object"&&".value"in e&&e[".value"]!==null&&(e=e[".value"]),typeof e!="object"||".sv"in e){var n=e;return new Gu(n,Et(t))}if(!(e instanceof Array)&&s6){var r=[],i=!1,s=e;if(Qt(s,function(h,d){if(h.substring(0,1)!=="."){var v=Et(d);v.isEmpty()||(i=i||!v.getPriority().isEmpty(),r.push(new qe(h,v)))}}),r.length===0)return Se.EMPTY_NODE;var a=Fp(r,JG,function(h){return h.name},aE);if(i){var c=Fp(r,ht.getCompare());return new Se(a,Et(t),new Up({".priority":c},{".priority":ht}))}else return new Se(a,Et(t),Up.Default)}else{var l=Se.EMPTY_NODE;return Qt(e,function(h,d){if(Ar(e,h)&&h.substring(0,1)!=="."){var v=Et(d);(v.isLeafNode()||!v.isEmpty())&&(l=l.updateImmediateChild(h,v))}}),l.updatePriority(Et(t))}}e6(Et);/** * @license * Copyright 2017 Google LLC * @@ -1012,7 +1012,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var uE=function(e){te(t,e);function t(n){var r=e.call(this)||this;return r.indexPath_=n,G(!Pe(n)&&Oe(n)!==".priority","Can't create PathIndex with empty path or .priority key"),r}return t.prototype.extractChild=function(n){return n.getChild(this.indexPath_)},t.prototype.isDefinedOn=function(n){return!n.getChild(this.indexPath_).isEmpty()},t.prototype.compare=function(n,r){var i=this.extractChild(n.node),s=this.extractChild(r.node),a=i.compareTo(s);return a===0?Na(n.name,r.name):a},t.prototype.makePost=function(n,r){var i=Et(n),s=Se.EMPTY_NODE.updateChild(this.indexPath_,i);return new Be(r,s)},t.prototype.maxPost=function(){var n=Se.EMPTY_NODE.updateChild(this.indexPath_,th);return new Be(Fi,n)},t.prototype.toString=function(){return Tf(this.indexPath_,0).join("/")},t}(zv);/** + */var uE=function(e){te(t,e);function t(n){var r=e.call(this)||this;return r.indexPath_=n,G(!Pe(n)&&Oe(n)!==".priority","Can't create PathIndex with empty path or .priority key"),r}return t.prototype.extractChild=function(n){return n.getChild(this.indexPath_)},t.prototype.isDefinedOn=function(n){return!n.getChild(this.indexPath_).isEmpty()},t.prototype.compare=function(n,r){var i=this.extractChild(n.node),s=this.extractChild(r.node),a=i.compareTo(s);return a===0?Na(n.name,r.name):a},t.prototype.makePost=function(n,r){var i=Et(n),s=Se.EMPTY_NODE.updateChild(this.indexPath_,i);return new qe(r,s)},t.prototype.maxPost=function(){var n=Se.EMPTY_NODE.updateChild(this.indexPath_,nh);return new qe(Fi,n)},t.prototype.toString=function(){return If(this.indexPath_,0).join("/")},t}(zv);/** * @license * Copyright 2017 Google LLC * @@ -1027,7 +1027,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var l6=function(e){te(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.compare=function(n,r){var i=n.node.compareTo(r.node);return i===0?Na(n.name,r.name):i},t.prototype.isDefinedOn=function(n){return!0},t.prototype.indexedValueChanged=function(n,r){return!n.equals(r)},t.prototype.minPost=function(){return Be.MIN},t.prototype.maxPost=function(){return Be.MAX},t.prototype.makePost=function(n,r){var i=Et(n);return new Be(r,i)},t.prototype.toString=function(){return".value"},t}(zv),cE=new l6;/** + */var a6=function(e){te(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.compare=function(n,r){var i=n.node.compareTo(r.node);return i===0?Na(n.name,r.name):i},t.prototype.isDefinedOn=function(n){return!0},t.prototype.indexedValueChanged=function(n,r){return!n.equals(r)},t.prototype.minPost=function(){return qe.MIN},t.prototype.maxPost=function(){return qe.MAX},t.prototype.makePost=function(n,r){var i=Et(n);return new qe(r,i)},t.prototype.toString=function(){return".value"},t}(zv),cE=new a6;/** * @license * Copyright 2017 Google LLC * @@ -1042,7 +1042,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var zu="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",ab="-",YP="z",XP=786,f6=function(){var e=0,t=[];return function(n){var r=n===e;e=n;var i,s=new Array(8);for(i=7;i>=0;i--)s[i]=zu.charAt(n%64),n=Math.floor(n/64);G(n===0,"Cannot push at time == 0");var a=s.join("");if(r){for(i=11;i>=0&&t[i]===63;i--)t[i]=0;t[i]++}else for(i=0;i<12;i++)t[i]=Math.floor(Math.random()*64);for(i=0;i<12;i++)a+=zu.charAt(t[i]);return G(a.length===20,"nextPushId: Length should be 20."),a}}(),B1=function(e){if(e===""+eE)return ab;var t=Mp(e);if(t!=null)return""+(t+1);for(var n=new Array(e.length),r=0;r=0&&n[i]===YP;)i--;if(i===-1)return Fi;var s=n[i],a=zu.charAt(zu.indexOf(s)+1);return n[i]=a,n.slice(0,i+1).join("")},q1=function(e){if(e===""+SP)return lo;var t=Mp(e);if(t!=null)return""+(t-1);for(var n=new Array(e.length),r=0;r=0;i--)s[i]=zu.charAt(n%64),n=Math.floor(n/64);G(n===0,"Cannot push at time == 0");var a=s.join("");if(r){for(i=11;i>=0&&t[i]===63;i--)t[i]=0;t[i]++}else for(i=0;i<12;i++)t[i]=Math.floor(Math.random()*64);for(i=0;i<12;i++)a+=zu.charAt(t[i]);return G(a.length===20,"nextPushId: Length should be 20."),a}}(),B1=function(e){if(e===""+eE)return ab;var t=Mp(e);if(t!=null)return""+(t+1);for(var n=new Array(e.length),r=0;r=0&&n[i]===YP;)i--;if(i===-1)return Fi;var s=n[i],a=zu.charAt(zu.indexOf(s)+1);return n[i]=a,n.slice(0,i+1).join("")},q1=function(e){if(e===""+SP)return co;var t=Mp(e);if(t!=null)return""+(t-1);for(var n=new Array(e.length),r=0;r=0;if(b)return s!=null&&s.trackChildChange(Sf(n,r,g)),l.updateImmediateChild(n,r);s!=null&&s.trackChildChange(If(n,g));var T=l.updateImmediateChild(n,Se.EMPTY_NODE),C=y!=null&&this.rangedFilter_.matches(y);return C?(s!=null&&s.trackChildChange(Qu(y.name,y.node)),T.updateImmediateChild(y.name,y.node)):T}else return r.isEmpty()?t:v&&a(d,h)>=0?(s!=null&&(s.trackChildChange(If(d.name,d.node)),s.trackChildChange(Qu(n,r))),l.updateImmediateChild(n,r).updateImmediateChild(d.name,Se.EMPTY_NODE)):t},e}();/** + */var l6=function(){function e(t){this.rangedFilter_=new ZP(t),this.index_=t.getIndex(),this.limit_=t.getLimit(),this.reverse_=!t.isViewFromLeft()}return e.prototype.updateChild=function(t,n,r,i,s,a){return this.rangedFilter_.matches(new qe(n,r))||(r=Se.EMPTY_NODE),t.getImmediateChild(n).equals(r)?t:t.numChildren()=0;if(b)return s!=null&&s.trackChildChange(Cf(n,r,g)),l.updateImmediateChild(n,r);s!=null&&s.trackChildChange(Sf(n,g));var T=l.updateImmediateChild(n,Se.EMPTY_NODE),C=y!=null&&this.rangedFilter_.matches(y);return C?(s!=null&&s.trackChildChange(Qu(y.name,y.node)),T.updateImmediateChild(y.name,y.node)):T}else return r.isEmpty()?t:v&&a(d,h)>=0?(s!=null&&(s.trackChildChange(Sf(d.name,d.node)),s.trackChildChange(Qu(n,r))),l.updateImmediateChild(n,r).updateImmediateChild(d.name,Se.EMPTY_NODE)):t},e}();/** * @license * Copyright 2017 Google LLC * @@ -1117,7 +1117,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var eD=function(){function e(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=ht}return e.prototype.hasStart=function(){return this.startSet_},e.prototype.hasStartAfter=function(){return this.startAfterSet_},e.prototype.hasEndBefore=function(){return this.endBeforeSet_},e.prototype.isViewFromLeft=function(){return this.viewFrom_===""?this.startSet_:this.viewFrom_==="l"},e.prototype.getIndexStartValue=function(){return G(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},e.prototype.getIndexStartName=function(){return G(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:lo},e.prototype.hasEnd=function(){return this.endSet_},e.prototype.getIndexEndValue=function(){return G(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},e.prototype.getIndexEndName=function(){return G(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:Fi},e.prototype.hasLimit=function(){return this.limitSet_},e.prototype.hasAnchoredLimit=function(){return this.limitSet_&&this.viewFrom_!==""},e.prototype.getLimit=function(){return G(this.limitSet_,"Only valid if limit has been set"),this.limit_},e.prototype.getIndex=function(){return this.index_},e.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},e.prototype.isDefault=function(){return this.loadsAllData()&&this.index_===ht},e.prototype.copy=function(){var t=new e;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_=this.index_,t.viewFrom_=this.viewFrom_,t},e}();function p6(e){return e.loadsAllData()?new lE(e.getIndex()):e.hasLimit()?new d6(e):new ZP(e)}function v6(e,t){var n=e.copy();return n.limitSet_=!0,n.limit_=t,n.viewFrom_="l",n}function g6(e,t){var n=e.copy();return n.limitSet_=!0,n.limit_=t,n.viewFrom_="r",n}function ub(e,t,n){var r=e.copy();return r.startSet_=!0,t===void 0&&(t=null),r.indexStartValue_=t,n!=null?(r.startNameSet_=!0,r.indexStartName_=n):(r.startNameSet_=!1,r.indexStartName_=""),r}function m6(e,t,n){var r;if(e.index_===Ni)typeof t=="string"&&(t=B1(t)),r=ub(e,t,n);else{var i=void 0;n==null?i=Fi:i=B1(n),r=ub(e,t,i)}return r.startAfterSet_=!0,r}function cb(e,t,n){var r=e.copy();return r.endSet_=!0,t===void 0&&(t=null),r.indexEndValue_=t,n!==void 0?(r.endNameSet_=!0,r.indexEndName_=n):(r.endNameSet_=!1,r.indexEndName_=""),r}function y6(e,t,n){var r,i;return e.index_===Ni?(typeof t=="string"&&(t=q1(t)),i=cb(e,t,n)):(n==null?r=lo:r=q1(n),i=cb(e,t,r)),i.endBeforeSet_=!0,i}function Qv(e,t){var n=e.copy();return n.index_=t,n}function $1(e){var t={};if(e.isDefault())return t;var n;return e.index_===ht?n="$priority":e.index_===cE?n="$value":e.index_===Ni?n="$key":(G(e.index_ instanceof uE,"Unrecognized index type!"),n=e.index_.toString()),t.orderBy=Kt(n),e.startSet_&&(t.startAt=Kt(e.indexStartValue_),e.startNameSet_&&(t.startAt+=","+Kt(e.indexStartName_))),e.endSet_&&(t.endAt=Kt(e.indexEndValue_),e.endNameSet_&&(t.endAt+=","+Kt(e.indexEndName_))),e.limitSet_&&(e.isViewFromLeft()?t.limitToFirst=e.limit_:t.limitToLast=e.limit_),t}function H1(e){var t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_)),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_)),e.limitSet_){t.l=e.limit_;var n=e.viewFrom_;n===""&&(e.isViewFromLeft()?n="l":n="r"),t.vf=n}return e.index_!==ht&&(t.i=e.index_.toString()),t}/** + */var eD=function(){function e(){this.limitSet_=!1,this.startSet_=!1,this.startNameSet_=!1,this.startAfterSet_=!1,this.endSet_=!1,this.endNameSet_=!1,this.endBeforeSet_=!1,this.limit_=0,this.viewFrom_="",this.indexStartValue_=null,this.indexStartName_="",this.indexEndValue_=null,this.indexEndName_="",this.index_=ht}return e.prototype.hasStart=function(){return this.startSet_},e.prototype.hasStartAfter=function(){return this.startAfterSet_},e.prototype.hasEndBefore=function(){return this.endBeforeSet_},e.prototype.isViewFromLeft=function(){return this.viewFrom_===""?this.startSet_:this.viewFrom_==="l"},e.prototype.getIndexStartValue=function(){return G(this.startSet_,"Only valid if start has been set"),this.indexStartValue_},e.prototype.getIndexStartName=function(){return G(this.startSet_,"Only valid if start has been set"),this.startNameSet_?this.indexStartName_:co},e.prototype.hasEnd=function(){return this.endSet_},e.prototype.getIndexEndValue=function(){return G(this.endSet_,"Only valid if end has been set"),this.indexEndValue_},e.prototype.getIndexEndName=function(){return G(this.endSet_,"Only valid if end has been set"),this.endNameSet_?this.indexEndName_:Fi},e.prototype.hasLimit=function(){return this.limitSet_},e.prototype.hasAnchoredLimit=function(){return this.limitSet_&&this.viewFrom_!==""},e.prototype.getLimit=function(){return G(this.limitSet_,"Only valid if limit has been set"),this.limit_},e.prototype.getIndex=function(){return this.index_},e.prototype.loadsAllData=function(){return!(this.startSet_||this.endSet_||this.limitSet_)},e.prototype.isDefault=function(){return this.loadsAllData()&&this.index_===ht},e.prototype.copy=function(){var t=new e;return t.limitSet_=this.limitSet_,t.limit_=this.limit_,t.startSet_=this.startSet_,t.indexStartValue_=this.indexStartValue_,t.startNameSet_=this.startNameSet_,t.indexStartName_=this.indexStartName_,t.endSet_=this.endSet_,t.indexEndValue_=this.indexEndValue_,t.endNameSet_=this.endNameSet_,t.indexEndName_=this.indexEndName_,t.index_=this.index_,t.viewFrom_=this.viewFrom_,t},e}();function f6(e){return e.loadsAllData()?new lE(e.getIndex()):e.hasLimit()?new l6(e):new ZP(e)}function h6(e,t){var n=e.copy();return n.limitSet_=!0,n.limit_=t,n.viewFrom_="l",n}function d6(e,t){var n=e.copy();return n.limitSet_=!0,n.limit_=t,n.viewFrom_="r",n}function ub(e,t,n){var r=e.copy();return r.startSet_=!0,t===void 0&&(t=null),r.indexStartValue_=t,n!=null?(r.startNameSet_=!0,r.indexStartName_=n):(r.startNameSet_=!1,r.indexStartName_=""),r}function p6(e,t,n){var r;if(e.index_===Ni)typeof t=="string"&&(t=B1(t)),r=ub(e,t,n);else{var i=void 0;n==null?i=Fi:i=B1(n),r=ub(e,t,i)}return r.startAfterSet_=!0,r}function cb(e,t,n){var r=e.copy();return r.endSet_=!0,t===void 0&&(t=null),r.indexEndValue_=t,n!==void 0?(r.endNameSet_=!0,r.indexEndName_=n):(r.endNameSet_=!1,r.indexEndName_=""),r}function v6(e,t,n){var r,i;return e.index_===Ni?(typeof t=="string"&&(t=q1(t)),i=cb(e,t,n)):(n==null?r=co:r=q1(n),i=cb(e,t,r)),i.endBeforeSet_=!0,i}function Qv(e,t){var n=e.copy();return n.index_=t,n}function $1(e){var t={};if(e.isDefault())return t;var n;return e.index_===ht?n="$priority":e.index_===cE?n="$value":e.index_===Ni?n="$key":(G(e.index_ instanceof uE,"Unrecognized index type!"),n=e.index_.toString()),t.orderBy=Kt(n),e.startSet_&&(t.startAt=Kt(e.indexStartValue_),e.startNameSet_&&(t.startAt+=","+Kt(e.indexStartName_))),e.endSet_&&(t.endAt=Kt(e.indexEndValue_),e.endNameSet_&&(t.endAt+=","+Kt(e.indexEndName_))),e.limitSet_&&(e.isViewFromLeft()?t.limitToFirst=e.limit_:t.limitToLast=e.limit_),t}function H1(e){var t={};if(e.startSet_&&(t.sp=e.indexStartValue_,e.startNameSet_&&(t.sn=e.indexStartName_)),e.endSet_&&(t.ep=e.indexEndValue_,e.endNameSet_&&(t.en=e.indexEndName_)),e.limitSet_){t.l=e.limit_;var n=e.viewFrom_;n===""&&(e.isViewFromLeft()?n="l":n="r"),t.vf=n}return e.index_!==ht&&(t.i=e.index_.toString()),t}/** * @license * Copyright 2017 Google LLC * @@ -1132,7 +1132,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var _6=function(e){te(t,e);function t(n,r,i,s){var a=e.call(this)||this;return a.repoInfo_=n,a.onDataUpdate_=r,a.authTokenProvider_=i,a.appCheckTokenProvider_=s,a.log_=eh("p:rest:"),a.listens_={},a}return t.prototype.reportStats=function(n){throw new Error("Method not implemented.")},t.getListenId_=function(n,r){return r!==void 0?"tag$"+r:(G(n._queryParams.isDefault(),"should have a tag if it's not a default query."),n._path.toString())},t.prototype.listen=function(n,r,i,s){var a=this,c=n._path.toString();this.log_("Listen called for "+c+" "+n._queryIdentifier);var l=t.getListenId_(n,i),h={};this.listens_[l]=h;var d=$1(n._queryParams);this.restRequest_(c+".json",d,function(v,g){var y=g;if(v===404&&(y=null,v=null),v===null&&a.onDataUpdate_(c,y,!1,i),pa(a.listens_,l)===h){var _;v?v===401?_="permission_denied":_="rest_error:"+v:_="ok",s(_,null)}})},t.prototype.unlisten=function(n,r){var i=t.getListenId_(n,r);delete this.listens_[i]},t.prototype.get=function(n){var r=this,i=$1(n._queryParams),s=n._path.toString(),a=new on;return this.restRequest_(s+".json",i,function(c,l){var h=l;c===404&&(h=null,c=null),c===null?(r.onDataUpdate_(s,h,!1,null),a.resolve(h)):a.reject(new Error(h))}),a.promise},t.prototype.refreshAuthToken=function(n){},t.prototype.restRequest_=function(n,r,i){var s=this;return r===void 0&&(r={}),r.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(function(a){var c=gn(a,2),l=c[0],h=c[1];l&&l.accessToken&&(r.auth=l.accessToken),h&&h.token&&(r.ac=h.token);var d=(s.repoInfo_.secure?"https://":"http://")+s.repoInfo_.host+n+"?ns="+s.repoInfo_.namespace+yW(r);s.log_("Sending REST request for "+d);var v=new XMLHttpRequest;v.onreadystatechange=function(){if(i&&v.readyState===4){s.log_("REST Response for "+d+" received. status:",v.status,"response:",v.responseText);var g=null;if(v.status>=200&&v.status<300){try{g=Ef(v.responseText)}catch{yn("Failed to parse JSON response for "+d+": "+v.responseText)}i(null,g)}else v.status!==401&&v.status!==404&&yn("Got unsuccessful REST response for "+d+" Status: "+v.status),i(v.status);i=null}},v.open("GET",d,!0),v.send()})},t}(BP);/** + */var g6=function(e){te(t,e);function t(n,r,i,s){var a=e.call(this)||this;return a.repoInfo_=n,a.onDataUpdate_=r,a.authTokenProvider_=i,a.appCheckTokenProvider_=s,a.log_=th("p:rest:"),a.listens_={},a}return t.prototype.reportStats=function(n){throw new Error("Method not implemented.")},t.getListenId_=function(n,r){return r!==void 0?"tag$"+r:(G(n._queryParams.isDefault(),"should have a tag if it's not a default query."),n._path.toString())},t.prototype.listen=function(n,r,i,s){var a=this,c=n._path.toString();this.log_("Listen called for "+c+" "+n._queryIdentifier);var l=t.getListenId_(n,i),h={};this.listens_[l]=h;var d=$1(n._queryParams);this.restRequest_(c+".json",d,function(v,g){var y=g;if(v===404&&(y=null,v=null),v===null&&a.onDataUpdate_(c,y,!1,i),pa(a.listens_,l)===h){var _;v?v===401?_="permission_denied":_="rest_error:"+v:_="ok",s(_,null)}})},t.prototype.unlisten=function(n,r){var i=t.getListenId_(n,r);delete this.listens_[i]},t.prototype.get=function(n){var r=this,i=$1(n._queryParams),s=n._path.toString(),a=new rn;return this.restRequest_(s+".json",i,function(c,l){var h=l;c===404&&(h=null,c=null),c===null?(r.onDataUpdate_(s,h,!1,null),a.resolve(h)):a.reject(new Error(h))}),a.promise},t.prototype.refreshAuthToken=function(n){},t.prototype.restRequest_=function(n,r,i){var s=this;return r===void 0&&(r={}),r.format="export",Promise.all([this.authTokenProvider_.getToken(!1),this.appCheckTokenProvider_.getToken(!1)]).then(function(a){var c=gn(a,2),l=c[0],h=c[1];l&&l.accessToken&&(r.auth=l.accessToken),h&&h.token&&(r.ac=h.token);var d=(s.repoInfo_.secure?"https://":"http://")+s.repoInfo_.host+n+"?ns="+s.repoInfo_.namespace+vW(r);s.log_("Sending REST request for "+d);var v=new XMLHttpRequest;v.onreadystatechange=function(){if(i&&v.readyState===4){s.log_("REST Response for "+d+" received. status:",v.status,"response:",v.responseText);var g=null;if(v.status>=200&&v.status<300){try{g=Tf(v.responseText)}catch{yn("Failed to parse JSON response for "+d+": "+v.responseText)}i(null,g)}else v.status!==401&&v.status!==404&&yn("Got unsuccessful REST response for "+d+" Status: "+v.status),i(v.status);i=null}},v.open("GET",d,!0),v.send()})},t}(BP);/** * @license * Copyright 2017 Google LLC * @@ -1147,7 +1147,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var w6=function(){function e(){this.rootNode_=Se.EMPTY_NODE}return e.prototype.getNode=function(t){return this.rootNode_.getChild(t)},e.prototype.updateSnapshot=function(t,n){this.rootNode_=this.rootNode_.updateChild(t,n)},e}();/** + */var m6=function(){function e(){this.rootNode_=Se.EMPTY_NODE}return e.prototype.getNode=function(t){return this.rootNode_.getChild(t)},e.prototype.updateSnapshot=function(t,n){this.rootNode_=this.rootNode_.updateChild(t,n)},e}();/** * @license * Copyright 2017 Google LLC * @@ -1162,7 +1162,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function jp(){return{value:null,children:new Map}}function Ac(e,t,n){if(Pe(t))e.value=n,e.children.clear();else if(e.value!==null)e.value=e.value.updateChild(t,n);else{var r=Oe(t);e.children.has(r)||e.children.set(r,jp());var i=e.children.get(r);t=ft(t),Ac(i,t,n)}}function lb(e,t){if(Pe(t))return e.value=null,e.children.clear(),!0;if(e.value!==null){if(e.value.isLeafNode())return!1;var n=e.value;return e.value=null,n.forEachChild(ht,function(s,a){Ac(e,new et(s),a)}),lb(e,t)}else if(e.children.size>0){var r=Oe(t);if(t=ft(t),e.children.has(r)){var i=lb(e.children.get(r),t);i&&e.children.delete(r)}return e.children.size===0}else return!0}function fb(e,t,n){e.value!==null?n(t,e.value):b6(e,function(r,i){var s=new et(t.toString()+"/"+r);fb(i,s,n)})}function b6(e,t){e.children.forEach(function(n,r){t(r,n)})}/** + */function jp(){return{value:null,children:new Map}}function Ac(e,t,n){if(Pe(t))e.value=n,e.children.clear();else if(e.value!==null)e.value=e.value.updateChild(t,n);else{var r=Oe(t);e.children.has(r)||e.children.set(r,jp());var i=e.children.get(r);t=ft(t),Ac(i,t,n)}}function lb(e,t){if(Pe(t))return e.value=null,e.children.clear(),!0;if(e.value!==null){if(e.value.isLeafNode())return!1;var n=e.value;return e.value=null,n.forEachChild(ht,function(s,a){Ac(e,new et(s),a)}),lb(e,t)}else if(e.children.size>0){var r=Oe(t);if(t=ft(t),e.children.has(r)){var i=lb(e.children.get(r),t);i&&e.children.delete(r)}return e.children.size===0}else return!0}function fb(e,t,n){e.value!==null?n(t,e.value):y6(e,function(r,i){var s=new et(t.toString()+"/"+r);fb(i,s,n)})}function y6(e,t){e.children.forEach(function(n,r){t(r,n)})}/** * @license * Copyright 2017 Google LLC * @@ -1192,7 +1192,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var K1=10*1e3,E6=30*1e3,T6=5*60*1e3,I6=function(){function e(t,n){this.server_=n,this.statsToReport_={},this.statsListener_=new tD(t);var r=K1+(E6-K1)*Math.random();Ql(this.reportStats_.bind(this),Math.floor(r))}return e.prototype.reportStats_=function(){var t=this,n=this.statsListener_.get(),r={},i=!1;Qt(n,function(s,a){a>0&&Ar(t.statsToReport_,s)&&(r[s]=a,i=!0)}),i&&this.server_.reportStats(r),Ql(this.reportStats_.bind(this),Math.floor(Math.random()*2*T6))},e}();function S6(e,t){e.statsToReport_[t]=!0}/** + */var K1=10*1e3,_6=30*1e3,w6=5*60*1e3,b6=function(){function e(t,n){this.server_=n,this.statsToReport_={},this.statsListener_=new tD(t);var r=K1+(_6-K1)*Math.random();Ql(this.reportStats_.bind(this),Math.floor(r))}return e.prototype.reportStats_=function(){var t=this,n=this.statsListener_.get(),r={},i=!1;Qt(n,function(s,a){a>0&&Ar(t.statsToReport_,s)&&(r[s]=a,i=!0)}),i&&this.server_.reportStats(r),Ql(this.reportStats_.bind(this),Math.floor(Math.random()*2*w6))},e}();function E6(e,t){e.statsToReport_[t]=!0}/** * @license * Copyright 2017 Google LLC * @@ -1222,7 +1222,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var C6=function(){function e(t,n,r){this.path=t,this.affectedTree=n,this.revert=r,this.type=si.ACK_USER_WRITE,this.source=fE()}return e.prototype.operationForChild=function(t){if(Pe(this.path)){if(this.affectedTree.value!=null)return G(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new et(t));return new e(Xe(),n,this.revert)}else return G(Oe(this.path)===t,"operationForChild called for unrelated child."),new e(ft(this.path),this.affectedTree,this.revert)},e}();/** + */var T6=function(){function e(t,n,r){this.path=t,this.affectedTree=n,this.revert=r,this.type=si.ACK_USER_WRITE,this.source=fE()}return e.prototype.operationForChild=function(t){if(Pe(this.path)){if(this.affectedTree.value!=null)return G(this.affectedTree.children.isEmpty(),"affectedTree should not have overlapping affected paths."),this;var n=this.affectedTree.subtree(new et(t));return new e(Ye(),n,this.revert)}else return G(Oe(this.path)===t,"operationForChild called for unrelated child."),new e(ft(this.path),this.affectedTree,this.revert)},e}();/** * @license * Copyright 2017 Google LLC * @@ -1237,7 +1237,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var nD=function(){function e(t,n){this.source=t,this.path=n,this.type=si.LISTEN_COMPLETE}return e.prototype.operationForChild=function(t){return Pe(this.path)?new e(this.source,Xe()):new e(this.source,ft(this.path))},e}();/** + */var nD=function(){function e(t,n){this.source=t,this.path=n,this.type=si.LISTEN_COMPLETE}return e.prototype.operationForChild=function(t){return Pe(this.path)?new e(this.source,Ye()):new e(this.source,ft(this.path))},e}();/** * @license * Copyright 2017 Google LLC * @@ -1252,7 +1252,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Yv=function(){function e(t,n,r){this.source=t,this.path=n,this.snap=r,this.type=si.OVERWRITE}return e.prototype.operationForChild=function(t){return Pe(this.path)?new e(this.source,Xe(),this.snap.getImmediateChild(t)):new e(this.source,ft(this.path),this.snap)},e}();/** + */var Yv=function(){function e(t,n,r){this.source=t,this.path=n,this.snap=r,this.type=si.OVERWRITE}return e.prototype.operationForChild=function(t){return Pe(this.path)?new e(this.source,Ye(),this.snap.getImmediateChild(t)):new e(this.source,ft(this.path),this.snap)},e}();/** * @license * Copyright 2017 Google LLC * @@ -1267,7 +1267,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var pE=function(){function e(t,n,r){this.source=t,this.path=n,this.children=r,this.type=si.MERGE}return e.prototype.operationForChild=function(t){if(Pe(this.path)){var n=this.children.subtree(new et(t));return n.isEmpty()?null:n.value?new Yv(this.source,Xe(),n.value):new e(this.source,Xe(),n)}else return G(Oe(this.path)===t,"Can't get a merge for a child not on the path of the operation"),new e(this.source,ft(this.path),this.children)},e.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},e}();/** + */var pE=function(){function e(t,n,r){this.source=t,this.path=n,this.children=r,this.type=si.MERGE}return e.prototype.operationForChild=function(t){if(Pe(this.path)){var n=this.children.subtree(new et(t));return n.isEmpty()?null:n.value?new Yv(this.source,Ye(),n.value):new e(this.source,Ye(),n)}else return G(Oe(this.path)===t,"Can't get a merge for a child not on the path of the operation"),new e(this.source,ft(this.path),this.children)},e.prototype.toString=function(){return"Operation("+this.path+": "+this.source.toString()+" merge: "+this.children.toString()+")"},e}();/** * @license * Copyright 2017 Google LLC * @@ -1297,7 +1297,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var A6=function(){function e(t){this.query_=t,this.index_=this.query_._queryParams.getIndex()}return e}();function k6(e,t,n,r){var i=[],s=[];return t.forEach(function(a){a.type==="child_changed"&&e.index_.indexedValueChanged(a.oldSnap,a.snapshotNode)&&s.push(h6(a.childName,a.snapshotNode))}),Dl(e,i,"child_removed",t,r,n),Dl(e,i,"child_added",t,r,n),Dl(e,i,"child_moved",s,r,n),Dl(e,i,"child_changed",t,r,n),Dl(e,i,"value",t,r,n),i}function Dl(e,t,n,r,i,s){var a=r.filter(function(c){return c.type===n});a.sort(function(c,l){return N6(e,c,l)}),a.forEach(function(c){var l=R6(e,c,s);i.forEach(function(h){h.respondsTo(c.type)&&t.push(h.createEvent(l,e.query_))})})}function R6(e,t,n){return t.type==="value"||t.type==="child_removed"||(t.prevName=n.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}function N6(e,t,n){if(t.childName==null||n.childName==null)throw Ic("Should only compare child_ events.");var r=new Be(t.childName,t.snapshotNode),i=new Be(n.childName,n.snapshotNode);return e.index_.compare(r,i)}/** + */var I6=function(){function e(t){this.query_=t,this.index_=this.query_._queryParams.getIndex()}return e}();function S6(e,t,n,r){var i=[],s=[];return t.forEach(function(a){a.type==="child_changed"&&e.index_.indexedValueChanged(a.oldSnap,a.snapshotNode)&&s.push(c6(a.childName,a.snapshotNode))}),Dl(e,i,"child_removed",t,r,n),Dl(e,i,"child_added",t,r,n),Dl(e,i,"child_moved",s,r,n),Dl(e,i,"child_changed",t,r,n),Dl(e,i,"value",t,r,n),i}function Dl(e,t,n,r,i,s){var a=r.filter(function(c){return c.type===n});a.sort(function(c,l){return A6(e,c,l)}),a.forEach(function(c){var l=C6(e,c,s);i.forEach(function(h){h.respondsTo(c.type)&&t.push(h.createEvent(l,e.query_))})})}function C6(e,t,n){return t.type==="value"||t.type==="child_removed"||(t.prevName=n.getPredecessorChildName(t.childName,t.snapshotNode,e.index_)),t}function A6(e,t,n){if(t.childName==null||n.childName==null)throw Ic("Should only compare child_ events.");var r=new qe(t.childName,t.snapshotNode),i=new qe(n.childName,n.snapshotNode);return e.index_.compare(r,i)}/** * @license * Copyright 2017 Google LLC * @@ -1327,7 +1327,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var z_,x6=function(){return z_||(z_=new to(uG)),z_},kr=function(){function e(t,n){n===void 0&&(n=x6()),this.value=t,this.children=n}return e.fromObject=function(t){var n=new e(null);return Qt(t,function(r,i){n=n.set(new et(r),i)}),n},e.prototype.isEmpty=function(){return this.value===null&&this.children.isEmpty()},e.prototype.findRootMostMatchingPathAndValue=function(t,n){if(this.value!=null&&n(this.value))return{path:Xe(),value:this.value};if(Pe(t))return null;var r=Oe(t),i=this.children.get(r);if(i!==null){var s=i.findRootMostMatchingPathAndValue(ft(t),n);if(s!=null){var a=wt(new et(r),s.path);return{path:a,value:s.value}}else return null}else return null},e.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,function(){return!0})},e.prototype.subtree=function(t){if(Pe(t))return this;var n=Oe(t),r=this.children.get(n);return r!==null?r.subtree(ft(t)):new e(null)},e.prototype.set=function(t,n){if(Pe(t))return new e(n,this.children);var r=Oe(t),i=this.children.get(r)||new e(null),s=i.set(ft(t),n),a=this.children.insert(r,s);return new e(this.value,a)},e.prototype.remove=function(t){if(Pe(t))return this.children.isEmpty()?new e(null):new e(null,this.children);var n=Oe(t),r=this.children.get(n);if(r){var i=r.remove(ft(t)),s=void 0;return i.isEmpty()?s=this.children.remove(n):s=this.children.insert(n,i),this.value===null&&s.isEmpty()?new e(null):new e(this.value,s)}else return this},e.prototype.get=function(t){if(Pe(t))return this.value;var n=Oe(t),r=this.children.get(n);return r?r.get(ft(t)):null},e.prototype.setTree=function(t,n){if(Pe(t))return n;var r=Oe(t),i=this.children.get(r)||new e(null),s=i.setTree(ft(t),n),a=void 0;return s.isEmpty()?a=this.children.remove(r):a=this.children.insert(r,s),new e(this.value,a)},e.prototype.fold=function(t){return this.fold_(Xe(),t)},e.prototype.fold_=function(t,n){var r={};return this.children.inorderTraversal(function(i,s){r[i]=s.fold_(wt(t,i),n)}),n(t,this.value,r)},e.prototype.findOnPath=function(t,n){return this.findOnPath_(t,Xe(),n)},e.prototype.findOnPath_=function(t,n,r){var i=this.value?r(n,this.value):!1;if(i)return i;if(Pe(t))return null;var s=Oe(t),a=this.children.get(s);return a?a.findOnPath_(ft(t),wt(n,s),r):null},e.prototype.foreachOnPath=function(t,n){return this.foreachOnPath_(t,Xe(),n)},e.prototype.foreachOnPath_=function(t,n,r){if(Pe(t))return this;this.value&&r(n,this.value);var i=Oe(t),s=this.children.get(i);return s?s.foreachOnPath_(ft(t),wt(n,i),r):new e(null)},e.prototype.foreach=function(t){this.foreach_(Xe(),t)},e.prototype.foreach_=function(t,n){this.children.inorderTraversal(function(r,i){i.foreach_(wt(t,r),n)}),this.value&&n(t,this.value)},e.prototype.foreachChild=function(t){this.children.inorderTraversal(function(n,r){r.value&&t(n,r.value)})},e}();/** + */var z_,k6=function(){return z_||(z_=new to(oG)),z_},kr=function(){function e(t,n){n===void 0&&(n=k6()),this.value=t,this.children=n}return e.fromObject=function(t){var n=new e(null);return Qt(t,function(r,i){n=n.set(new et(r),i)}),n},e.prototype.isEmpty=function(){return this.value===null&&this.children.isEmpty()},e.prototype.findRootMostMatchingPathAndValue=function(t,n){if(this.value!=null&&n(this.value))return{path:Ye(),value:this.value};if(Pe(t))return null;var r=Oe(t),i=this.children.get(r);if(i!==null){var s=i.findRootMostMatchingPathAndValue(ft(t),n);if(s!=null){var a=wt(new et(r),s.path);return{path:a,value:s.value}}else return null}else return null},e.prototype.findRootMostValueAndPath=function(t){return this.findRootMostMatchingPathAndValue(t,function(){return!0})},e.prototype.subtree=function(t){if(Pe(t))return this;var n=Oe(t),r=this.children.get(n);return r!==null?r.subtree(ft(t)):new e(null)},e.prototype.set=function(t,n){if(Pe(t))return new e(n,this.children);var r=Oe(t),i=this.children.get(r)||new e(null),s=i.set(ft(t),n),a=this.children.insert(r,s);return new e(this.value,a)},e.prototype.remove=function(t){if(Pe(t))return this.children.isEmpty()?new e(null):new e(null,this.children);var n=Oe(t),r=this.children.get(n);if(r){var i=r.remove(ft(t)),s=void 0;return i.isEmpty()?s=this.children.remove(n):s=this.children.insert(n,i),this.value===null&&s.isEmpty()?new e(null):new e(this.value,s)}else return this},e.prototype.get=function(t){if(Pe(t))return this.value;var n=Oe(t),r=this.children.get(n);return r?r.get(ft(t)):null},e.prototype.setTree=function(t,n){if(Pe(t))return n;var r=Oe(t),i=this.children.get(r)||new e(null),s=i.setTree(ft(t),n),a=void 0;return s.isEmpty()?a=this.children.remove(r):a=this.children.insert(r,s),new e(this.value,a)},e.prototype.fold=function(t){return this.fold_(Ye(),t)},e.prototype.fold_=function(t,n){var r={};return this.children.inorderTraversal(function(i,s){r[i]=s.fold_(wt(t,i),n)}),n(t,this.value,r)},e.prototype.findOnPath=function(t,n){return this.findOnPath_(t,Ye(),n)},e.prototype.findOnPath_=function(t,n,r){var i=this.value?r(n,this.value):!1;if(i)return i;if(Pe(t))return null;var s=Oe(t),a=this.children.get(s);return a?a.findOnPath_(ft(t),wt(n,s),r):null},e.prototype.foreachOnPath=function(t,n){return this.foreachOnPath_(t,Ye(),n)},e.prototype.foreachOnPath_=function(t,n,r){if(Pe(t))return this;this.value&&r(n,this.value);var i=Oe(t),s=this.children.get(i);return s?s.foreachOnPath_(ft(t),wt(n,i),r):new e(null)},e.prototype.foreach=function(t){this.foreach_(Ye(),t)},e.prototype.foreach_=function(t,n){this.children.inorderTraversal(function(r,i){i.foreach_(wt(t,r),n)}),this.value&&n(t,this.value)},e.prototype.foreachChild=function(t){this.children.inorderTraversal(function(n,r){r.value&&t(n,r.value)})},e}();/** * @license * Copyright 2017 Google LLC * @@ -1342,7 +1342,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var oo=function(){function e(t){this.writeTree_=t}return e.empty=function(){return new e(new kr(null))},e}();function Jl(e,t,n){if(Pe(t))return new oo(new kr(n));var r=e.writeTree_.findRootMostValueAndPath(t);if(r!=null){var i=r.path,s=r.value,a=Gn(i,t);return s=s.updateChild(a,n),new oo(e.writeTree_.set(i,s))}else{var c=new kr(n),l=e.writeTree_.setTree(t,c);return new oo(l)}}function hb(e,t,n){var r=e;return Qt(n,function(i,s){r=Jl(r,wt(t,i),s)}),r}function W1(e,t){if(Pe(t))return oo.empty();var n=e.writeTree_.setTree(t,new kr(null));return new oo(n)}function db(e,t){return xa(e,t)!=null}function xa(e,t){var n=e.writeTree_.findRootMostValueAndPath(t);return n!=null?e.writeTree_.get(n.path).getChild(Gn(n.path,t)):null}function G1(e){var t=[],n=e.writeTree_.value;return n!=null?n.isLeafNode()||n.forEachChild(ht,function(r,i){t.push(new Be(r,i))}):e.writeTree_.children.inorderTraversal(function(r,i){i.value!=null&&t.push(new Be(r,i.value))}),t}function Qo(e,t){if(Pe(t))return e;var n=xa(e,t);return n!=null?new oo(new kr(n)):new oo(e.writeTree_.subtree(t))}function pb(e){return e.writeTree_.isEmpty()}function Yu(e,t){return iD(Xe(),e.writeTree_,t)}function iD(e,t,n){if(t.value!=null)return n.updateChild(e,t.value);var r=null;return t.children.inorderTraversal(function(i,s){i===".priority"?(G(s.value!==null,"Priority writes must always be leaf nodes"),r=s.value):n=iD(wt(e,i),s,n)}),!n.getChild(e).isEmpty()&&r!==null&&(n=n.updateChild(wt(e,".priority"),r)),n}/** + */var io=function(){function e(t){this.writeTree_=t}return e.empty=function(){return new e(new kr(null))},e}();function Jl(e,t,n){if(Pe(t))return new io(new kr(n));var r=e.writeTree_.findRootMostValueAndPath(t);if(r!=null){var i=r.path,s=r.value,a=Wn(i,t);return s=s.updateChild(a,n),new io(e.writeTree_.set(i,s))}else{var c=new kr(n),l=e.writeTree_.setTree(t,c);return new io(l)}}function hb(e,t,n){var r=e;return Qt(n,function(i,s){r=Jl(r,wt(t,i),s)}),r}function W1(e,t){if(Pe(t))return io.empty();var n=e.writeTree_.setTree(t,new kr(null));return new io(n)}function db(e,t){return xa(e,t)!=null}function xa(e,t){var n=e.writeTree_.findRootMostValueAndPath(t);return n!=null?e.writeTree_.get(n.path).getChild(Wn(n.path,t)):null}function G1(e){var t=[],n=e.writeTree_.value;return n!=null?n.isLeafNode()||n.forEachChild(ht,function(r,i){t.push(new qe(r,i))}):e.writeTree_.children.inorderTraversal(function(r,i){i.value!=null&&t.push(new qe(r,i.value))}),t}function Qo(e,t){if(Pe(t))return e;var n=xa(e,t);return n!=null?new io(new kr(n)):new io(e.writeTree_.subtree(t))}function pb(e){return e.writeTree_.isEmpty()}function Yu(e,t){return iD(Ye(),e.writeTree_,t)}function iD(e,t,n){if(t.value!=null)return n.updateChild(e,t.value);var r=null;return t.children.inorderTraversal(function(i,s){i===".priority"?(G(s.value!==null,"Priority writes must always be leaf nodes"),r=s.value):n=iD(wt(e,i),s,n)}),!n.getChild(e).isEmpty()&&r!==null&&(n=n.updateChild(wt(e,".priority"),r)),n}/** * @license * Copyright 2017 Google LLC * @@ -1357,7 +1357,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Jv(e,t){return uD(t,e)}function O6(e,t,n,r,i){G(r>e.lastWriteId,"Stacking an older write on top of newer ones"),i===void 0&&(i=!0),e.allWrites.push({path:t,snap:n,writeId:r,visible:i}),i&&(e.visibleWrites=Jl(e.visibleWrites,t,n)),e.lastWriteId=r}function P6(e,t,n,r){G(r>e.lastWriteId,"Stacking an older merge on top of newer ones"),e.allWrites.push({path:t,children:n,writeId:r,visible:!0}),e.visibleWrites=hb(e.visibleWrites,t,n),e.lastWriteId=r}function D6(e,t){for(var n=0;n=0,"removeWrite called with nonexistent writeId.");var r=e.allWrites[n];e.allWrites.splice(n,1);for(var i=r.visible,s=!1,a=e.allWrites.length-1;i&&a>=0;){var c=e.allWrites[a];c.visible&&(a>=n&&L6(c,r.path)?i=!1:Mr(r.path,c.path)&&(s=!0)),a--}if(i){if(s)return F6(e),!0;if(r.snap)e.visibleWrites=W1(e.visibleWrites,r.path);else{var l=r.children;Qt(l,function(h){e.visibleWrites=W1(e.visibleWrites,wt(r.path,h))})}return!0}else return!1}function L6(e,t){if(e.snap)return Mr(e.path,t);for(var n in e.children)if(e.children.hasOwnProperty(n)&&Mr(wt(e.path,n),t))return!0;return!1}function F6(e){e.visibleWrites=oD(e.allWrites,U6,Xe()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}function U6(e){return e.visible}function oD(e,t,n){for(var r=oo.empty(),i=0;ie.lastWriteId,"Stacking an older write on top of newer ones"),i===void 0&&(i=!0),e.allWrites.push({path:t,snap:n,writeId:r,visible:i}),i&&(e.visibleWrites=Jl(e.visibleWrites,t,n)),e.lastWriteId=r}function N6(e,t,n,r){G(r>e.lastWriteId,"Stacking an older merge on top of newer ones"),e.allWrites.push({path:t,children:n,writeId:r,visible:!0}),e.visibleWrites=hb(e.visibleWrites,t,n),e.lastWriteId=r}function x6(e,t){for(var n=0;n=0,"removeWrite called with nonexistent writeId.");var r=e.allWrites[n];e.allWrites.splice(n,1);for(var i=r.visible,s=!1,a=e.allWrites.length-1;i&&a>=0;){var c=e.allWrites[a];c.visible&&(a>=n&&P6(c,r.path)?i=!1:Mr(r.path,c.path)&&(s=!0)),a--}if(i){if(s)return D6(e),!0;if(r.snap)e.visibleWrites=W1(e.visibleWrites,r.path);else{var l=r.children;Qt(l,function(h){e.visibleWrites=W1(e.visibleWrites,wt(r.path,h))})}return!0}else return!1}function P6(e,t){if(e.snap)return Mr(e.path,t);for(var n in e.children)if(e.children.hasOwnProperty(n)&&Mr(wt(e.path,n),t))return!0;return!1}function D6(e){e.visibleWrites=oD(e.allWrites,M6,Ye()),e.allWrites.length>0?e.lastWriteId=e.allWrites[e.allWrites.length-1].writeId:e.lastWriteId=-1}function M6(e){return e.visible}function oD(e,t,n){for(var r=io.empty(),i=0;i0||!e.eventCache.isFullyInitialized()||i&&!r.getNode().equals(s)||!r.getNode().getPriority().equals(s.getPriority()))&&n.push(JP(Vp(t)))}}function lD(e,t,n,r,i,s){var a=t.eventCache;if(qp(r,n)!=null)return t;var c=void 0,l=void 0;if(Pe(n))if(G(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){var h=va(t),d=h instanceof Se?h:Se.EMPTY_NODE,v=vE(r,d);c=e.filter.updateFullNode(t.eventCache.getNode(),v,s)}else{var g=Bp(r,va(t));c=e.filter.updateFullNode(t.eventCache.getNode(),g,s)}else{var y=Oe(n);if(y===".priority"){G(rs(n)===1,"Can't have a priority with additional path components");var _=a.getNode();l=t.serverCache.getNode();var b=z1(r,n,_,l);b!=null?c=e.filter.updatePriority(_,b):c=a.getNode()}else{var T=ft(n),C=void 0;if(a.isCompleteForChild(y)){l=t.serverCache.getNode();var x=z1(r,n,a.getNode(),l);x!=null?C=a.getNode().getImmediateChild(y).updateChild(T,x):C=a.getNode().getImmediateChild(y)}else C=gE(r,y,t.serverCache);C!=null?c=e.filter.updateChild(a.getNode(),y,C,T,i,s):c=a.getNode()}}return Xl(t,c,a.isFullyInitialized()||Pe(n),e.filter.filtersNodes())}function $p(e,t,n,r,i,s,a,c){var l=t.serverCache,h,d=a?e.filter:e.filter.getIndexedFilter();if(Pe(n))h=d.updateFullNode(l.getNode(),r,null);else if(d.filtersNodes()&&!l.isFiltered()){var v=l.getNode().updateChild(n,r);h=d.updateFullNode(l.getNode(),v,null)}else{var g=Oe(n);if(!l.isCompleteForPath(n)&&rs(n)>1)return t;var y=ft(n),_=l.getNode().getImmediateChild(g),b=_.updateChild(y,r);g===".priority"?h=d.updatePriority(l.getNode(),b):h=d.updateChild(l.getNode(),g,b,y,cD,null)}var T=rD(t,h,l.isFullyInitialized()||Pe(n),d.filtersNodes()),C=new mE(i,T,s);return lD(e,T,n,i,C,c)}function vb(e,t,n,r,i,s,a){var c=t.eventCache,l,h,d=new mE(i,t,s);if(Pe(n))h=e.filter.updateFullNode(t.eventCache.getNode(),r,a),l=Xl(t,h,!0,e.filter.filtersNodes());else{var v=Oe(n);if(v===".priority")h=e.filter.updatePriority(t.eventCache.getNode(),r),l=Xl(t,h,c.isFullyInitialized(),c.isFiltered());else{var g=ft(n),y=c.getNode().getImmediateChild(v),_=void 0;if(Pe(g))_=r;else{var b=d.getCompleteChild(v);b!=null?oE(g)===".priority"&&b.getChild($P(g)).isEmpty()?_=b:_=b.updateChild(g,r):_=Se.EMPTY_NODE}if(y.equals(_))l=t;else{var T=e.filter.updateChild(c.getNode(),v,_,g,d,a);l=Xl(t,T,c.isFullyInitialized(),e.filter.filtersNodes())}}}return l}function Q1(e,t){return e.eventCache.isCompleteForChild(t)}function J6(e,t,n,r,i,s,a){var c=t;return r.foreach(function(l,h){var d=wt(n,l);Q1(t,Oe(d))&&(c=vb(e,c,d,h,i,s,a))}),r.foreach(function(l,h){var d=wt(n,l);Q1(t,Oe(d))||(c=vb(e,c,d,h,i,s,a))}),c}function Y1(e,t,n){return n.foreach(function(r,i){t=t.updateChild(r,i)}),t}function gb(e,t,n,r,i,s,a,c){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;var l=t,h;Pe(n)?h=r:h=new kr(null).setTree(n,r);var d=t.serverCache.getNode();return h.children.inorderTraversal(function(v,g){if(d.hasChild(v)){var y=t.serverCache.getNode().getImmediateChild(v),_=Y1(e,y,g);l=$p(e,l,new et(v),_,i,s,a,c)}}),h.children.inorderTraversal(function(v,g){var y=!t.serverCache.isCompleteForChild(v)&&g.value===void 0;if(!d.hasChild(v)&&!y){var _=t.serverCache.getNode().getImmediateChild(v),b=Y1(e,_,g);l=$p(e,l,new et(v),b,i,s,a,c)}}),l}function Z6(e,t,n,r,i,s,a){if(qp(i,n)!=null)return t;var c=t.serverCache.isFiltered(),l=t.serverCache;if(r.value!=null){if(Pe(n)&&l.isFullyInitialized()||l.isCompleteForPath(n))return $p(e,t,n,l.getNode().getChild(n),i,s,c,a);if(Pe(n)){var h=new kr(null);return l.getNode().forEachChild(Ni,function(v,g){h=h.set(new et(v),g)}),gb(e,t,n,h,i,s,c,a)}else return t}else{var d=new kr(null);return r.foreach(function(v,g){var y=wt(n,v);l.isCompleteForPath(y)&&(d=d.set(v,l.getNode().getChild(y)))}),gb(e,t,n,d,i,s,c,a)}}function ez(e,t,n,r,i){var s=t.serverCache,a=rD(t,s.getNode(),s.isFullyInitialized()||Pe(n),s.isFiltered());return lD(e,a,n,r,cD,i)}function tz(e,t,n,r,i,s){var a;if(qp(r,n)!=null)return t;var c=new mE(r,t,i),l=t.eventCache.getNode(),h=void 0;if(Pe(n)||Oe(n)===".priority"){var d=void 0;if(t.serverCache.isFullyInitialized())d=Bp(r,va(t));else{var v=t.serverCache.getNode();G(v instanceof Se,"serverChildren would be complete if leaf node"),d=vE(r,v)}d=d,h=e.filter.updateFullNode(l,d,s)}else{var g=Oe(n),y=gE(r,g,t.serverCache);y==null&&t.serverCache.isCompleteForChild(g)&&(y=l.getImmediateChild(g)),y!=null?h=e.filter.updateChild(l,g,y,ft(n),c,s):t.eventCache.getNode().hasChild(g)?h=e.filter.updateChild(l,g,Se.EMPTY_NODE,ft(n),c,s):h=l,h.isEmpty()&&t.serverCache.isFullyInitialized()&&(a=Bp(r,va(t)),a.isLeafNode()&&(h=e.filter.updateFullNode(h,a,s)))}return a=t.serverCache.isFullyInitialized()||qp(r,Xe())!=null,Xl(t,h,a,e.filter.filtersNodes())}/** + */function K6(e){return{filter:e}}function W6(e,t){G(t.eventCache.getNode().isIndexed(e.filter.getIndex()),"Event snap not indexed"),G(t.serverCache.getNode().isIndexed(e.filter.getIndex()),"Server snap not indexed")}function G6(e,t,n,r,i){var s=new $6,a,c;if(n.type===si.OVERWRITE){var l=n;l.source.fromUser?a=vb(e,t,l.path,l.snap,r,i,s):(G(l.source.fromServer,"Unknown source."),c=l.source.tagged||t.serverCache.isFiltered()&&!Pe(l.path),a=$p(e,t,l.path,l.snap,r,i,c,s))}else if(n.type===si.MERGE){var h=n;h.source.fromUser?a=Q6(e,t,h.path,h.children,r,i,s):(G(h.source.fromServer,"Unknown source."),c=h.source.tagged||t.serverCache.isFiltered(),a=gb(e,t,h.path,h.children,r,i,c,s))}else if(n.type===si.ACK_USER_WRITE){var d=n;d.revert?a=J6(e,t,d.path,r,i,s):a=Y6(e,t,d.path,d.affectedTree,r,i,s)}else if(n.type===si.LISTEN_COMPLETE)a=X6(e,t,n.path,r,s);else throw Ic("Unknown operation type: "+n.type);var v=s.getChanges();return z6(t,a,v),{viewCache:a,changes:v}}function z6(e,t,n){var r=t.eventCache;if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),s=Vp(e);(n.length>0||!e.eventCache.isFullyInitialized()||i&&!r.getNode().equals(s)||!r.getNode().getPriority().equals(s.getPriority()))&&n.push(JP(Vp(t)))}}function lD(e,t,n,r,i,s){var a=t.eventCache;if(qp(r,n)!=null)return t;var c=void 0,l=void 0;if(Pe(n))if(G(t.serverCache.isFullyInitialized(),"If change path is empty, we must have complete server data"),t.serverCache.isFiltered()){var h=va(t),d=h instanceof Se?h:Se.EMPTY_NODE,v=vE(r,d);c=e.filter.updateFullNode(t.eventCache.getNode(),v,s)}else{var g=Bp(r,va(t));c=e.filter.updateFullNode(t.eventCache.getNode(),g,s)}else{var y=Oe(n);if(y===".priority"){G(rs(n)===1,"Can't have a priority with additional path components");var _=a.getNode();l=t.serverCache.getNode();var b=z1(r,n,_,l);b!=null?c=e.filter.updatePriority(_,b):c=a.getNode()}else{var T=ft(n),C=void 0;if(a.isCompleteForChild(y)){l=t.serverCache.getNode();var x=z1(r,n,a.getNode(),l);x!=null?C=a.getNode().getImmediateChild(y).updateChild(T,x):C=a.getNode().getImmediateChild(y)}else C=gE(r,y,t.serverCache);C!=null?c=e.filter.updateChild(a.getNode(),y,C,T,i,s):c=a.getNode()}}return Xl(t,c,a.isFullyInitialized()||Pe(n),e.filter.filtersNodes())}function $p(e,t,n,r,i,s,a,c){var l=t.serverCache,h,d=a?e.filter:e.filter.getIndexedFilter();if(Pe(n))h=d.updateFullNode(l.getNode(),r,null);else if(d.filtersNodes()&&!l.isFiltered()){var v=l.getNode().updateChild(n,r);h=d.updateFullNode(l.getNode(),v,null)}else{var g=Oe(n);if(!l.isCompleteForPath(n)&&rs(n)>1)return t;var y=ft(n),_=l.getNode().getImmediateChild(g),b=_.updateChild(y,r);g===".priority"?h=d.updatePriority(l.getNode(),b):h=d.updateChild(l.getNode(),g,b,y,cD,null)}var T=rD(t,h,l.isFullyInitialized()||Pe(n),d.filtersNodes()),C=new mE(i,T,s);return lD(e,T,n,i,C,c)}function vb(e,t,n,r,i,s,a){var c=t.eventCache,l,h,d=new mE(i,t,s);if(Pe(n))h=e.filter.updateFullNode(t.eventCache.getNode(),r,a),l=Xl(t,h,!0,e.filter.filtersNodes());else{var v=Oe(n);if(v===".priority")h=e.filter.updatePriority(t.eventCache.getNode(),r),l=Xl(t,h,c.isFullyInitialized(),c.isFiltered());else{var g=ft(n),y=c.getNode().getImmediateChild(v),_=void 0;if(Pe(g))_=r;else{var b=d.getCompleteChild(v);b!=null?oE(g)===".priority"&&b.getChild($P(g)).isEmpty()?_=b:_=b.updateChild(g,r):_=Se.EMPTY_NODE}if(y.equals(_))l=t;else{var T=e.filter.updateChild(c.getNode(),v,_,g,d,a);l=Xl(t,T,c.isFullyInitialized(),e.filter.filtersNodes())}}}return l}function Q1(e,t){return e.eventCache.isCompleteForChild(t)}function Q6(e,t,n,r,i,s,a){var c=t;return r.foreach(function(l,h){var d=wt(n,l);Q1(t,Oe(d))&&(c=vb(e,c,d,h,i,s,a))}),r.foreach(function(l,h){var d=wt(n,l);Q1(t,Oe(d))||(c=vb(e,c,d,h,i,s,a))}),c}function Y1(e,t,n){return n.foreach(function(r,i){t=t.updateChild(r,i)}),t}function gb(e,t,n,r,i,s,a,c){if(t.serverCache.getNode().isEmpty()&&!t.serverCache.isFullyInitialized())return t;var l=t,h;Pe(n)?h=r:h=new kr(null).setTree(n,r);var d=t.serverCache.getNode();return h.children.inorderTraversal(function(v,g){if(d.hasChild(v)){var y=t.serverCache.getNode().getImmediateChild(v),_=Y1(e,y,g);l=$p(e,l,new et(v),_,i,s,a,c)}}),h.children.inorderTraversal(function(v,g){var y=!t.serverCache.isCompleteForChild(v)&&g.value===void 0;if(!d.hasChild(v)&&!y){var _=t.serverCache.getNode().getImmediateChild(v),b=Y1(e,_,g);l=$p(e,l,new et(v),b,i,s,a,c)}}),l}function Y6(e,t,n,r,i,s,a){if(qp(i,n)!=null)return t;var c=t.serverCache.isFiltered(),l=t.serverCache;if(r.value!=null){if(Pe(n)&&l.isFullyInitialized()||l.isCompleteForPath(n))return $p(e,t,n,l.getNode().getChild(n),i,s,c,a);if(Pe(n)){var h=new kr(null);return l.getNode().forEachChild(Ni,function(v,g){h=h.set(new et(v),g)}),gb(e,t,n,h,i,s,c,a)}else return t}else{var d=new kr(null);return r.foreach(function(v,g){var y=wt(n,v);l.isCompleteForPath(y)&&(d=d.set(v,l.getNode().getChild(y)))}),gb(e,t,n,d,i,s,c,a)}}function X6(e,t,n,r,i){var s=t.serverCache,a=rD(t,s.getNode(),s.isFullyInitialized()||Pe(n),s.isFiltered());return lD(e,a,n,r,cD,i)}function J6(e,t,n,r,i,s){var a;if(qp(r,n)!=null)return t;var c=new mE(r,t,i),l=t.eventCache.getNode(),h=void 0;if(Pe(n)||Oe(n)===".priority"){var d=void 0;if(t.serverCache.isFullyInitialized())d=Bp(r,va(t));else{var v=t.serverCache.getNode();G(v instanceof Se,"serverChildren would be complete if leaf node"),d=vE(r,v)}d=d,h=e.filter.updateFullNode(l,d,s)}else{var g=Oe(n),y=gE(r,g,t.serverCache);y==null&&t.serverCache.isCompleteForChild(g)&&(y=l.getImmediateChild(g)),y!=null?h=e.filter.updateChild(l,g,y,ft(n),c,s):t.eventCache.getNode().hasChild(g)?h=e.filter.updateChild(l,g,Se.EMPTY_NODE,ft(n),c,s):h=l,h.isEmpty()&&t.serverCache.isFullyInitialized()&&(a=Bp(r,va(t)),a.isLeafNode()&&(h=e.filter.updateFullNode(h,a,s)))}return a=t.serverCache.isFullyInitialized()||qp(r,Ye())!=null,Xl(t,h,a,e.filter.filtersNodes())}/** * @license * Copyright 2017 Google LLC * @@ -1417,7 +1417,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var nz=function(){function e(t,n){this.query_=t,this.eventRegistrations_=[];var r=this.query_._queryParams,i=new lE(r.getIndex()),s=p6(r);this.processor_=z6(s);var a=n.serverCache,c=n.eventCache,l=i.updateFullNode(Se.EMPTY_NODE,a.getNode(),null),h=s.updateFullNode(Se.EMPTY_NODE,c.getNode(),null),d=new is(l,a.isFullyInitialized(),i.filtersNodes()),v=new is(h,c.isFullyInitialized(),s.filtersNodes());this.viewCache_=Xv(v,d),this.eventGenerator_=new A6(this.query_)}return Object.defineProperty(e.prototype,"query",{get:function(){return this.query_},enumerable:!1,configurable:!0}),e}();function rz(e){return e.viewCache_.serverCache.getNode()}function iz(e){return Vp(e.viewCache_)}function oz(e,t){var n=va(e.viewCache_);return n&&(e.query._queryParams.loadsAllData()||!Pe(t)&&!n.getImmediateChild(Oe(t)).isEmpty())?n.getChild(t):null}function X1(e){return e.eventRegistrations_.length===0}function sz(e,t){e.eventRegistrations_.push(t)}function J1(e,t,n){var r=[];if(n){G(t==null,"A cancel should cancel all event registrations.");var i=e.query._path;e.eventRegistrations_.forEach(function(l){var h=l.createCancelEvent(n,i);h&&r.push(h)})}if(t){for(var s=[],a=0;a0&&!r)if(h){var C=null;e.listenProvider_.stopListening(Zl(t),C)}else l.forEach(function(x){var O=e.queryToTagMap.get(tg(x));e.listenProvider_.stopListening(Zl(x),O)});Iz(e,l)}return a}function wz(e,t,n,r){var i=wE(e,r);if(i!=null){var s=bE(i),a=s.path,c=s.queryId,l=Gn(a,t),h=new Yv(dE(c),l,n);return EE(e,a,h)}else return[]}function bz(e,t,n,r){var i=wE(e,r);if(i){var s=bE(i),a=s.path,c=s.queryId,l=Gn(a,t),h=kr.fromObject(n),d=new pE(dE(c),l,h);return EE(e,a,d)}else return[]}function tR(e,t,n){var r=t._path,i=null,s=!1;e.syncPointTree_.foreachOnPath(r,function(b,T){var C=Gn(b,r);i=i||Yo(T,C),s=s||os(T)});var a=e.syncPointTree_.get(r);a?(s=s||os(a),i=i||Yo(a,Xe())):(a=new hD,e.syncPointTree_=e.syncPointTree_.set(r,a));var c;if(i!=null)c=!0;else{c=!1,i=Se.EMPTY_NODE;var l=e.syncPointTree_.subtree(r);l.foreachChild(function(b,T){var C=Yo(T,Xe());C&&(i=i.updateImmediateChild(b,C))})}var h=gD(a,t);if(!h&&!t._queryParams.loadsAllData()){var d=tg(t);G(!e.queryToTagMap.has(d),"View does not exist, but we have a tag");var v=Sz();e.queryToTagMap.set(d,v),e.tagToQueryMap.set(v,d)}var g=Jv(e.pendingWriteTree_,r),y=fz(a,t,n,g,i,c);if(!h&&!s){var _=vD(a,t);y=y.concat(Cz(e,t,_))}return y}function eg(e,t,n){var r=!0,i=e.pendingWriteTree_,s=e.syncPointTree_.findOnPath(t,function(a,c){var l=Gn(a,t),h=Yo(c,l);if(h)return h});return sD(i,t,s,n,r)}function Ez(e,t){var n=t._path,r=null;e.syncPointTree_.foreachOnPath(n,function(h,d){var v=Gn(h,n);r=r||Yo(d,v)});var i=e.syncPointTree_.get(n);i?r=r||Yo(i,Xe()):(i=new hD,e.syncPointTree_=e.syncPointTree_.set(n,i));var s=r!=null,a=s?new is(r,!0,!1):null,c=Jv(e.pendingWriteTree_,t._path),l=dD(i,t,c,s?a.getNode():Se.EMPTY_NODE,s);return iz(l)}function kc(e,t){return mD(t,e.syncPointTree_,null,Jv(e.pendingWriteTree_,Xe()))}function mD(e,t,n,r){if(Pe(e.path))return yD(e,t,n,r);var i=t.get(Xe());n==null&&i!=null&&(n=Yo(i,Xe()));var s=[],a=Oe(e.path),c=e.operationForChild(a),l=t.children.get(a);if(l&&c){var h=n?n.getImmediateChild(a):null,d=aD(r,a);s=s.concat(mD(c,l,h,d))}return i&&(s=s.concat(yE(i,e,r,n))),s}function yD(e,t,n,r){var i=t.get(Xe());n==null&&i!=null&&(n=Yo(i,Xe()));var s=[];return t.children.inorderTraversal(function(a,c){var l=n?n.getImmediateChild(a):null,h=aD(r,a),d=e.operationForChild(a);d&&(s=s.concat(yD(d,c,l,h)))}),i&&(s=s.concat(yE(i,e,r,n))),s}function _D(e,t){var n=t.query,r=Wp(e,n);return{hashFn:function(){var i=rz(t)||Se.EMPTY_NODE;return i.hash()},onComplete:function(i){if(i==="ok")return r?_z(e,n._path,r):yz(e,n._path);var s=fG(i,n);return mb(e,n,null,s)}}}function Wp(e,t){var n=tg(t);return e.queryToTagMap.get(n)}function tg(e){return e._path.toString()+"$"+e._queryIdentifier}function wE(e,t){return e.tagToQueryMap.get(t)}function bE(e){var t=e.indexOf("$");return G(t!==-1&&t0&&!r)if(h){var C=null;e.listenProvider_.stopListening(Zl(t),C)}else l.forEach(function(x){var O=e.queryToTagMap.get(tg(x));e.listenProvider_.stopListening(Zl(x),O)});bz(e,l)}return a}function mz(e,t,n,r){var i=wE(e,r);if(i!=null){var s=bE(i),a=s.path,c=s.queryId,l=Wn(a,t),h=new Yv(dE(c),l,n);return EE(e,a,h)}else return[]}function yz(e,t,n,r){var i=wE(e,r);if(i){var s=bE(i),a=s.path,c=s.queryId,l=Wn(a,t),h=kr.fromObject(n),d=new pE(dE(c),l,h);return EE(e,a,d)}else return[]}function tR(e,t,n){var r=t._path,i=null,s=!1;e.syncPointTree_.foreachOnPath(r,function(b,T){var C=Wn(b,r);i=i||Yo(T,C),s=s||os(T)});var a=e.syncPointTree_.get(r);a?(s=s||os(a),i=i||Yo(a,Ye())):(a=new hD,e.syncPointTree_=e.syncPointTree_.set(r,a));var c;if(i!=null)c=!0;else{c=!1,i=Se.EMPTY_NODE;var l=e.syncPointTree_.subtree(r);l.foreachChild(function(b,T){var C=Yo(T,Ye());C&&(i=i.updateImmediateChild(b,C))})}var h=gD(a,t);if(!h&&!t._queryParams.loadsAllData()){var d=tg(t);G(!e.queryToTagMap.has(d),"View does not exist, but we have a tag");var v=Ez();e.queryToTagMap.set(d,v),e.tagToQueryMap.set(v,d)}var g=Jv(e.pendingWriteTree_,r),y=uz(a,t,n,g,i,c);if(!h&&!s){var _=vD(a,t);y=y.concat(Tz(e,t,_))}return y}function eg(e,t,n){var r=!0,i=e.pendingWriteTree_,s=e.syncPointTree_.findOnPath(t,function(a,c){var l=Wn(a,t),h=Yo(c,l);if(h)return h});return sD(i,t,s,n,r)}function _z(e,t){var n=t._path,r=null;e.syncPointTree_.foreachOnPath(n,function(h,d){var v=Wn(h,n);r=r||Yo(d,v)});var i=e.syncPointTree_.get(n);i?r=r||Yo(i,Ye()):(i=new hD,e.syncPointTree_=e.syncPointTree_.set(n,i));var s=r!=null,a=s?new is(r,!0,!1):null,c=Jv(e.pendingWriteTree_,t._path),l=dD(i,t,c,s?a.getNode():Se.EMPTY_NODE,s);return tz(l)}function kc(e,t){return mD(t,e.syncPointTree_,null,Jv(e.pendingWriteTree_,Ye()))}function mD(e,t,n,r){if(Pe(e.path))return yD(e,t,n,r);var i=t.get(Ye());n==null&&i!=null&&(n=Yo(i,Ye()));var s=[],a=Oe(e.path),c=e.operationForChild(a),l=t.children.get(a);if(l&&c){var h=n?n.getImmediateChild(a):null,d=aD(r,a);s=s.concat(mD(c,l,h,d))}return i&&(s=s.concat(yE(i,e,r,n))),s}function yD(e,t,n,r){var i=t.get(Ye());n==null&&i!=null&&(n=Yo(i,Ye()));var s=[];return t.children.inorderTraversal(function(a,c){var l=n?n.getImmediateChild(a):null,h=aD(r,a),d=e.operationForChild(a);d&&(s=s.concat(yD(d,c,l,h)))}),i&&(s=s.concat(yE(i,e,r,n))),s}function _D(e,t){var n=t.query,r=Wp(e,n);return{hashFn:function(){var i=ez(t)||Se.EMPTY_NODE;return i.hash()},onComplete:function(i){if(i==="ok")return r?gz(e,n._path,r):vz(e,n._path);var s=uG(i,n);return mb(e,n,null,s)}}}function Wp(e,t){var n=tg(t);return e.queryToTagMap.get(n)}function tg(e){return e._path.toString()+"$"+e._queryIdentifier}function wE(e,t){return e.tagToQueryMap.get(t)}function bE(e){var t=e.indexOf("$");return G(t!==-1&&t0}function Oz(e){return Oa(e)===void 0&&!bD(e)}function rg(e,t){Qt(e.node.children,function(n,r){t(new SE(n,e,r))})}function ED(e,t,n,r){n&&!r&&t(e),rg(e,function(i){ED(i,t,!0,r)}),n&&r&&t(e)}function Pz(e,t,n){for(var r=n?e:e.parent;r!==null;){if(t(r))return!0;r=r.parent}return!1}function rh(e){return new et(e.parent===null?e.name:rh(e.parent)+"/"+e.name)}function yb(e){e.parent!==null&&Dz(e.parent,e.name,e)}function Dz(e,t,n){var r=Oz(n),i=Ar(e.node.children,t);r&&i?(delete e.node.children[t],e.node.childCount--,yb(e)):!r&&!i&&(e.node.children[t]=n.node,e.node.childCount++,yb(e))}/** + */var SE=function(){function e(t,n,r){t===void 0&&(t=""),n===void 0&&(n=null),r===void 0&&(r={children:{},childCount:0}),this.name=t,this.parent=n,this.node=r}return e}();function ng(e,t){for(var n=t instanceof et?t:new et(t),r=e,i=Oe(n);i!==null;){var s=pa(r.node.children,i)||{children:{},childCount:0};r=new SE(i,r,s),n=ft(n),i=Oe(n)}return r}function Oa(e){return e.node.value}function CE(e,t){e.node.value=t,yb(e)}function bD(e){return e.node.childCount>0}function Rz(e){return Oa(e)===void 0&&!bD(e)}function rg(e,t){Qt(e.node.children,function(n,r){t(new SE(n,e,r))})}function ED(e,t,n,r){n&&!r&&t(e),rg(e,function(i){ED(i,t,!0,r)}),n&&r&&t(e)}function Nz(e,t,n){for(var r=n?e:e.parent;r!==null;){if(t(r))return!0;r=r.parent}return!1}function ih(e){return new et(e.parent===null?e.name:ih(e.parent)+"/"+e.name)}function yb(e){e.parent!==null&&xz(e.parent,e.name,e)}function xz(e,t,n){var r=Rz(n),i=Ar(e.node.children,t);r&&i?(delete e.node.children[t],e.node.childCount--,yb(e)):!r&&!i&&(e.node.children[t]=n.node,e.node.childCount++,yb(e))}/** * @license * Copyright 2017 Google LLC * @@ -1492,7 +1492,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Mz=/[\[\].#$\/\u0000-\u001F\u007F]/,Lz=/[\[\].#$\u0000-\u001F\u007F]/,Q_=10*1024*1024,ig=function(e){return typeof e=="string"&&e.length!==0&&!Mz.test(e)},TD=function(e){return typeof e=="string"&&e.length!==0&&!Lz.test(e)},Fz=function(e){return e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),TD(e)},Cf=function(e){return e===null||typeof e=="string"||typeof e=="number"&&!Gv(e)||e&&typeof e=="object"&&Ar(e,".sv")},Ui=function(e,t,n,r){r&&t===void 0||ih(cr(e,"value"),t,n)},ih=function(e,t,n){var r=n instanceof et?new KG(n,e):n;if(t===void 0)throw new Error(e+"contains undefined "+Vs(r));if(typeof t=="function")throw new Error(e+"contains a function "+Vs(r)+" with contents = "+t.toString());if(Gv(t))throw new Error(e+"contains "+t.toString()+" "+Vs(r));if(typeof t=="string"&&t.length>Q_/3&&Wv(t)>Q_)throw new Error(e+"contains a string greater than "+Q_+" utf8 bytes "+Vs(r)+" ('"+t.substring(0,50)+"...')");if(t&&typeof t=="object"){var i=!1,s=!1;if(Qt(t,function(a,c){if(a===".value")i=!0;else if(a!==".priority"&&a!==".sv"&&(s=!0,!ig(a)))throw new Error(e+" contains an invalid key ("+a+") "+Vs(r)+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`);WG(r,a),ih(e,c,r),GG(r)}),i&&s)throw new Error(e+' contains ".value" child '+Vs(r)+" in addition to actual children.")}},Uz=function(e,t){var n,r;for(n=0;nQ_/3&&Wv(t)>Q_)throw new Error(e+"contains a string greater than "+Q_+" utf8 bytes "+Vs(r)+" ('"+t.substring(0,50)+"...')");if(t&&typeof t=="object"){var i=!1,s=!1;if(Qt(t,function(a,c){if(a===".value")i=!0;else if(a!==".priority"&&a!==".sv"&&(s=!0,!ig(a)))throw new Error(e+" contains an invalid key ("+a+") "+Vs(r)+`. Keys must be non-empty strings and can't contain ".", "#", "$", "/", "[", or "]"`);$G(r,a),oh(e,c,r),HG(r)}),i&&s)throw new Error(e+' contains ".value" child '+Vs(r)+" in addition to actual children.")}},Mz=function(e,t){var n,r;for(n=0;n0&&(v=Xu(e,s)),Hr(e.eventQueue_,v,a)}function Gz(e,t){e.interceptServerDataCallback_=t}function iR(e,t){RE(e,"connected",t),t===!1&&Xz(e)}function zz(e,t){Qt(t,function(n,r){RE(e,n,r)})}function RE(e,t,n){var r=new et("/.info/"+t),i=Et(n);e.infoData_.updateSnapshot(r,i);var s=nh(e.infoSyncTree_,r,i);Hr(e.eventQueue_,r,s)}function sg(e){return e.nextWriteId_++}function Qz(e,t){var n=Ez(e.serverSyncTree_,t);return n!=null?Promise.resolve(n):e.server_.get(t).then(function(r){var i=Et(r).withIndex(t._queryParams.getIndex()),s=nh(e.serverSyncTree_,t._path,i);return kE(e.eventQueue_,t._path,s),Promise.resolve(i)},function(r){return Rc(e,"get for query "+Kt(t)+" failed: "+r),Promise.reject(new Error(r))})}function NE(e,t,n,r,i){Rc(e,"set",{path:t.toString(),value:n,priority:r});var s=sh(e),a=Et(n,r),c=eg(e.serverSyncTree_,t),l=TE(a,c,s),h=sg(e),d=_E(e.serverSyncTree_,t,l,h,!0);og(e.eventQueue_,d),e.server_.put(t.toString(),a.val(!0),function(g,y){var _=g==="ok";_||yn("set at "+t+" failed: "+g);var b=Wo(e.serverSyncTree_,h,!_);Hr(e.eventQueue_,t,b),ss(e,i,g,y)});var v=OE(e,t);Xu(e,v),Hr(e.eventQueue_,v,[])}function Yz(e,t,n,r){Rc(e,"update",{path:t.toString(),value:n});var i=!0,s=sh(e),a={};if(Qt(n,function(h,d){i=!1,a[h]=wD(wt(t,h),Et(d),e.serverSyncTree_,s)}),i)tn("update() called with empty data. Don't do anything."),ss(e,r,"ok",void 0);else{var c=sg(e),l=gz(e.serverSyncTree_,t,a,c);og(e.eventQueue_,l),e.server_.merge(t.toString(),n,function(h,d){var v=h==="ok";v||yn("update at "+t+" failed: "+h);var g=Wo(e.serverSyncTree_,c,!v),y=g.length>0?Xu(e,t):t;Hr(e.eventQueue_,y,g),ss(e,r,h,d)}),Qt(n,function(h){var d=OE(e,wt(t,h));Xu(e,d)}),Hr(e.eventQueue_,t,[])}}function Xz(e){Rc(e,"onDisconnectEvents");var t=sh(e),n=jp();fb(e.onDisconnect_,Xe(),function(i,s){var a=wD(i,s,e.serverSyncTree_,t);Ac(n,i,a)});var r=[];fb(n,Xe(),function(i,s){r=r.concat(nh(e.serverSyncTree_,i,s));var a=OE(e,i);Xu(e,a)}),e.onDisconnect_=jp(),Hr(e.eventQueue_,Xe(),r)}function Jz(e,t,n){e.server_.onDisconnectCancel(t.toString(),function(r,i){r==="ok"&&lb(e.onDisconnect_,t),ss(e,n,r,i)})}function oR(e,t,n,r){var i=Et(n);e.server_.onDisconnectPut(t.toString(),i.val(!0),function(s,a){s==="ok"&&Ac(e.onDisconnect_,t,i),ss(e,r,s,a)})}function Zz(e,t,n,r,i){var s=Et(n,r);e.server_.onDisconnectPut(t.toString(),s.val(!0),function(a,c){a==="ok"&&Ac(e.onDisconnect_,t,s),ss(e,i,a,c)})}function e5(e,t,n,r){if(tb(n)){tn("onDisconnect().update() called with empty data. Don't do anything."),ss(e,r,"ok",void 0);return}e.server_.onDisconnectMerge(t.toString(),n,function(i,s){i==="ok"&&Qt(n,function(a,c){var l=Et(c);Ac(e.onDisconnect_,wt(t,a),l)}),ss(e,r,i,s)})}function t5(e,t,n){var r;Oe(t._path)===".info"?r=tR(e.infoSyncTree_,t,n):r=tR(e.serverSyncTree_,t,n),kE(e.eventQueue_,t._path,r)}function _b(e,t,n){var r;Oe(t._path)===".info"?r=mb(e.infoSyncTree_,t,n):r=mb(e.serverSyncTree_,t,n),kE(e.eventQueue_,t._path,r)}function RD(e){e.persistentConnection_&&e.persistentConnection_.interrupt(AD)}function n5(e){e.persistentConnection_&&e.persistentConnection_.resume(AD)}function r5(e,t){if(t===void 0&&(t=!1),!(typeof console>"u")){var n;t?(e.statsListener_||(e.statsListener_=new tD(e.stats_)),n=e.statsListener_.get()):n=e.stats_.get();var r=Object.keys(n).reduce(function(i,s){return Math.max(s.length,i)},0);Qt(n,function(i,s){for(var a=i,c=i.length;c0,"Sending zero length transaction queue");var r=n.every(function(i){return i.status===0});r&&s5(e,rh(t),n)}else bD(t)&&rg(t,function(i){ag(e,i)})}function s5(e,t,n){for(var r=n.map(function(g){return g.currentWriteId}),i=xE(e,t,r),s=i,a=i.hash(),c=0;c=Hz)g=!0,y="maxretry",i=i.concat(Wo(e.serverSyncTree_,d.currentWriteId,!0));else{var _=xE(e,d.path,a);d.currentInputSnapshot=_;var b=t[h].update(_.val());if(b!==void 0){ih("transaction failed: Data returned ",b,d.path);var T=Et(b),C=typeof b=="object"&&b!=null&&Ar(b,".priority");C||(T=T.updatePriority(_.getPriority()));var x=d.currentWriteId,O=sh(e),L=TE(T,_,O);d.currentOutputSnapshotRaw=T,d.currentOutputSnapshotResolved=L,d.currentWriteId=sg(e),a.splice(a.indexOf(x),1),i=i.concat(_E(e.serverSyncTree_,d.path,L,d.currentWriteId,d.applyLocally)),i=i.concat(Wo(e.serverSyncTree_,x,!0))}else g=!0,y="nodata",i=i.concat(Wo(e.serverSyncTree_,d.currentWriteId,!0))}Hr(e.eventQueue_,n,i),i=[],g&&(t[h].status=2,function($){setTimeout($,Math.floor(0))}(t[h].unwatcher),t[h].onComplete&&(y==="nodata"?r.push(function(){return t[h].onComplete(null,!1,t[h].currentInputSnapshot)}):r.push(function(){return t[h].onComplete(new Error(y),!1,null)})))},l=0;l0?n:void 0)}rg(t,function(s){ug(e,s)})}function OE(e,t){var n=rh(ND(e,t)),r=ng(e.transactionQueueTree_,t);return Pz(r,function(i){Y_(e,i)}),Y_(e,r),ED(r,function(i){Y_(e,i)}),n}function Y_(e,t){var n=Oa(t);if(n){for(var r=[],i=[],s=-1,a=0;a0&&(v=Xu(e,s)),Hr(e.eventQueue_,v,a)}function Hz(e,t){e.interceptServerDataCallback_=t}function iR(e,t){RE(e,"connected",t),t===!1&&zz(e)}function Kz(e,t){Qt(t,function(n,r){RE(e,n,r)})}function RE(e,t,n){var r=new et("/.info/"+t),i=Et(n);e.infoData_.updateSnapshot(r,i);var s=rh(e.infoSyncTree_,r,i);Hr(e.eventQueue_,r,s)}function sg(e){return e.nextWriteId_++}function Wz(e,t){var n=_z(e.serverSyncTree_,t);return n!=null?Promise.resolve(n):e.server_.get(t).then(function(r){var i=Et(r).withIndex(t._queryParams.getIndex()),s=rh(e.serverSyncTree_,t._path,i);return kE(e.eventQueue_,t._path,s),Promise.resolve(i)},function(r){return Rc(e,"get for query "+Kt(t)+" failed: "+r),Promise.reject(new Error(r))})}function NE(e,t,n,r,i){Rc(e,"set",{path:t.toString(),value:n,priority:r});var s=ah(e),a=Et(n,r),c=eg(e.serverSyncTree_,t),l=TE(a,c,s),h=sg(e),d=_E(e.serverSyncTree_,t,l,h,!0);og(e.eventQueue_,d),e.server_.put(t.toString(),a.val(!0),function(g,y){var _=g==="ok";_||yn("set at "+t+" failed: "+g);var b=Ko(e.serverSyncTree_,h,!_);Hr(e.eventQueue_,t,b),ss(e,i,g,y)});var v=OE(e,t);Xu(e,v),Hr(e.eventQueue_,v,[])}function Gz(e,t,n,r){Rc(e,"update",{path:t.toString(),value:n});var i=!0,s=ah(e),a={};if(Qt(n,function(h,d){i=!1,a[h]=wD(wt(t,h),Et(d),e.serverSyncTree_,s)}),i)en("update() called with empty data. Don't do anything."),ss(e,r,"ok",void 0);else{var c=sg(e),l=dz(e.serverSyncTree_,t,a,c);og(e.eventQueue_,l),e.server_.merge(t.toString(),n,function(h,d){var v=h==="ok";v||yn("update at "+t+" failed: "+h);var g=Ko(e.serverSyncTree_,c,!v),y=g.length>0?Xu(e,t):t;Hr(e.eventQueue_,y,g),ss(e,r,h,d)}),Qt(n,function(h){var d=OE(e,wt(t,h));Xu(e,d)}),Hr(e.eventQueue_,t,[])}}function zz(e){Rc(e,"onDisconnectEvents");var t=ah(e),n=jp();fb(e.onDisconnect_,Ye(),function(i,s){var a=wD(i,s,e.serverSyncTree_,t);Ac(n,i,a)});var r=[];fb(n,Ye(),function(i,s){r=r.concat(rh(e.serverSyncTree_,i,s));var a=OE(e,i);Xu(e,a)}),e.onDisconnect_=jp(),Hr(e.eventQueue_,Ye(),r)}function Qz(e,t,n){e.server_.onDisconnectCancel(t.toString(),function(r,i){r==="ok"&&lb(e.onDisconnect_,t),ss(e,n,r,i)})}function oR(e,t,n,r){var i=Et(n);e.server_.onDisconnectPut(t.toString(),i.val(!0),function(s,a){s==="ok"&&Ac(e.onDisconnect_,t,i),ss(e,r,s,a)})}function Yz(e,t,n,r,i){var s=Et(n,r);e.server_.onDisconnectPut(t.toString(),s.val(!0),function(a,c){a==="ok"&&Ac(e.onDisconnect_,t,s),ss(e,i,a,c)})}function Xz(e,t,n,r){if(tb(n)){en("onDisconnect().update() called with empty data. Don't do anything."),ss(e,r,"ok",void 0);return}e.server_.onDisconnectMerge(t.toString(),n,function(i,s){i==="ok"&&Qt(n,function(a,c){var l=Et(c);Ac(e.onDisconnect_,wt(t,a),l)}),ss(e,r,i,s)})}function Jz(e,t,n){var r;Oe(t._path)===".info"?r=tR(e.infoSyncTree_,t,n):r=tR(e.serverSyncTree_,t,n),kE(e.eventQueue_,t._path,r)}function _b(e,t,n){var r;Oe(t._path)===".info"?r=mb(e.infoSyncTree_,t,n):r=mb(e.serverSyncTree_,t,n),kE(e.eventQueue_,t._path,r)}function RD(e){e.persistentConnection_&&e.persistentConnection_.interrupt(AD)}function Zz(e){e.persistentConnection_&&e.persistentConnection_.resume(AD)}function e5(e,t){if(t===void 0&&(t=!1),!(typeof console>"u")){var n;t?(e.statsListener_||(e.statsListener_=new tD(e.stats_)),n=e.statsListener_.get()):n=e.stats_.get();var r=Object.keys(n).reduce(function(i,s){return Math.max(s.length,i)},0);Qt(n,function(i,s){for(var a=i,c=i.length;c0,"Sending zero length transaction queue");var r=n.every(function(i){return i.status===0});r&&r5(e,ih(t),n)}else bD(t)&&rg(t,function(i){ag(e,i)})}function r5(e,t,n){for(var r=n.map(function(g){return g.currentWriteId}),i=xE(e,t,r),s=i,a=i.hash(),c=0;c=Bz)g=!0,y="maxretry",i=i.concat(Ko(e.serverSyncTree_,d.currentWriteId,!0));else{var _=xE(e,d.path,a);d.currentInputSnapshot=_;var b=t[h].update(_.val());if(b!==void 0){oh("transaction failed: Data returned ",b,d.path);var T=Et(b),C=typeof b=="object"&&b!=null&&Ar(b,".priority");C||(T=T.updatePriority(_.getPriority()));var x=d.currentWriteId,O=ah(e),L=TE(T,_,O);d.currentOutputSnapshotRaw=T,d.currentOutputSnapshotResolved=L,d.currentWriteId=sg(e),a.splice(a.indexOf(x),1),i=i.concat(_E(e.serverSyncTree_,d.path,L,d.currentWriteId,d.applyLocally)),i=i.concat(Ko(e.serverSyncTree_,x,!0))}else g=!0,y="nodata",i=i.concat(Ko(e.serverSyncTree_,d.currentWriteId,!0))}Hr(e.eventQueue_,n,i),i=[],g&&(t[h].status=2,function($){setTimeout($,Math.floor(0))}(t[h].unwatcher),t[h].onComplete&&(y==="nodata"?r.push(function(){return t[h].onComplete(null,!1,t[h].currentInputSnapshot)}):r.push(function(){return t[h].onComplete(new Error(y),!1,null)})))},l=0;l0?n:void 0)}rg(t,function(s){ug(e,s)})}function OE(e,t){var n=ih(ND(e,t)),r=ng(e.transactionQueueTree_,t);return Nz(r,function(i){Y_(e,i)}),Y_(e,r),ED(r,function(i){Y_(e,i)}),n}function Y_(e,t){var n=Oa(t);if(n){for(var r=[],i=[],s=-1,a=0;a0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch{}t+="/"+i}return t}function c5(e){var t,n,r={};e.charAt(0)==="?"&&(e=e.substring(1));try{for(var i=an(e.split("&")),s=i.next();!s.done;s=i.next()){var a=s.value;if(a.length!==0){var c=a.split("=");c.length===2?r[decodeURIComponent(c[0])]=decodeURIComponent(c[1]):yn("Invalid query segment '"+a+"' in query '"+e+"'")}}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var wb=function(e,t){var n=l5(e),r=n.namespace;n.domain==="firebase.com"&&Li(n.host+" is no longer supported. Please use .firebaseio.com instead"),(!r||r==="undefined")&&n.domain!=="localhost"&&Li("Cannot parse Firebase url. Please use https://.firebaseio.com"),n.secure||sG();var i=n.scheme==="ws"||n.scheme==="wss";return{repoInfo:new nE(n.host,n.secure,r,t,i,"",r!==n.subdomain),path:new et(n.pathString)}},l5=function(e){var t="",n="",r="",i="",s="",a=!0,c="https",l=443;if(typeof e=="string"){var h=e.indexOf("//");h>=0&&(c=e.substring(0,h-1),e=e.substring(h+2));var d=e.indexOf("/");d===-1&&(d=e.length);var v=e.indexOf("?");v===-1&&(v=e.length),t=e.substring(0,Math.min(d,v)),d=0?(a=c==="https"||c==="wss",l=parseInt(t.substring(h+1),10)):h=t.length;var y=t.slice(0,h);if(y.toLowerCase()==="localhost")n="localhost";else if(y.split(".").length<=2)n=y;else{var _=t.indexOf(".");r=t.substring(0,_).toLowerCase(),n=t.substring(_+1),s=r}"ns"in g&&(s=g.ns)}return{host:t,port:l,domain:n,subdomain:r,secure:a,scheme:c,pathString:i,namespace:s}};/** + */function o5(e){for(var t="",n=e.split("/"),r=0;r0){var i=n[r];try{i=decodeURIComponent(i.replace(/\+/g," "))}catch{}t+="/"+i}return t}function s5(e){var t,n,r={};e.charAt(0)==="?"&&(e=e.substring(1));try{for(var i=sn(e.split("&")),s=i.next();!s.done;s=i.next()){var a=s.value;if(a.length!==0){var c=a.split("=");c.length===2?r[decodeURIComponent(c[0])]=decodeURIComponent(c[1]):yn("Invalid query segment '"+a+"' in query '"+e+"'")}}}catch(l){t={error:l}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var wb=function(e,t){var n=a5(e),r=n.namespace;n.domain==="firebase.com"&&Li(n.host+" is no longer supported. Please use .firebaseio.com instead"),(!r||r==="undefined")&&n.domain!=="localhost"&&Li("Cannot parse Firebase url. Please use https://.firebaseio.com"),n.secure||rG();var i=n.scheme==="ws"||n.scheme==="wss";return{repoInfo:new nE(n.host,n.secure,r,t,i,"",r!==n.subdomain),path:new et(n.pathString)}},a5=function(e){var t="",n="",r="",i="",s="",a=!0,c="https",l=443;if(typeof e=="string"){var h=e.indexOf("//");h>=0&&(c=e.substring(0,h-1),e=e.substring(h+2));var d=e.indexOf("/");d===-1&&(d=e.length);var v=e.indexOf("?");v===-1&&(v=e.length),t=e.substring(0,Math.min(d,v)),d=0?(a=c==="https"||c==="wss",l=parseInt(t.substring(h+1),10)):h=t.length;var y=t.slice(0,h);if(y.toLowerCase()==="localhost")n="localhost";else if(y.split(".").length<=2)n=y;else{var _=t.indexOf(".");r=t.substring(0,_).toLowerCase(),n=t.substring(_+1),s=r}"ns"in g&&(s=g.ns)}return{host:t,port:l,domain:n,subdomain:r,secure:a,scheme:c,pathString:i,namespace:s}};/** * @license * Copyright 2017 Google LLC * @@ -1582,7 +1582,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var f5=function(){function e(t,n){this._repo=t,this._path=n}return e.prototype.cancel=function(){var t=new on;return Jz(this._repo,this._path,t.wrapCallback(function(){})),t.promise},e.prototype.remove=function(){Lr("OnDisconnect.remove",this._path);var t=new on;return oR(this._repo,this._path,null,t.wrapCallback(function(){})),t.promise},e.prototype.set=function(t){Lr("OnDisconnect.set",this._path),Ui("OnDisconnect.set",t,this._path,!1);var n=new on;return oR(this._repo,this._path,t,n.wrapCallback(function(){})),n.promise},e.prototype.setWithPriority=function(t,n){Lr("OnDisconnect.setWithPriority",this._path),Ui("OnDisconnect.setWithPriority",t,this._path,!1),AE("OnDisconnect.setWithPriority",n,!1);var r=new on;return Zz(this._repo,this._path,t,n,r.wrapCallback(function(){})),r.promise},e.prototype.update=function(t){Lr("OnDisconnect.update",this._path),ID("OnDisconnect.update",t,this._path,!1);var n=new on;return e5(this._repo,this._path,t,n.wrapCallback(function(){})),n.promise},e}();/** + */var u5=function(){function e(t,n){this._repo=t,this._path=n}return e.prototype.cancel=function(){var t=new rn;return Qz(this._repo,this._path,t.wrapCallback(function(){})),t.promise},e.prototype.remove=function(){Lr("OnDisconnect.remove",this._path);var t=new rn;return oR(this._repo,this._path,null,t.wrapCallback(function(){})),t.promise},e.prototype.set=function(t){Lr("OnDisconnect.set",this._path),Ui("OnDisconnect.set",t,this._path,!1);var n=new rn;return oR(this._repo,this._path,t,n.wrapCallback(function(){})),n.promise},e.prototype.setWithPriority=function(t,n){Lr("OnDisconnect.setWithPriority",this._path),Ui("OnDisconnect.setWithPriority",t,this._path,!1),AE("OnDisconnect.setWithPriority",n,!1);var r=new rn;return Yz(this._repo,this._path,t,n,r.wrapCallback(function(){})),r.promise},e.prototype.update=function(t){Lr("OnDisconnect.update",this._path),ID("OnDisconnect.update",t,this._path,!1);var n=new rn;return Xz(this._repo,this._path,t,n.wrapCallback(function(){})),n.promise},e}();/** * @license * Copyright 2020 Google LLC * @@ -1597,7 +1597,7 @@ FIREBASE: `))},t.prototype.restoreState_=function(){var n,r,i,s;this.tryAuth(),t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Wr=function(){function e(t,n,r,i){this._repo=t,this._path=n,this._queryParams=r,this._orderByCalled=i}return Object.defineProperty(e.prototype,"key",{get:function(){return Pe(this._path)?null:oE(this._path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new Bi(this._repo,this._path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_queryIdentifier",{get:function(){var t=H1(this._queryParams),n=Z0(t);return n==="{}"?"default":n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_queryObject",{get:function(){return H1(this._queryParams)},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){if(t=Ne(t),!(t instanceof e))return!1;var n=this._repo===t._repo,r=sE(this._path,t._path),i=this._queryIdentifier===t._queryIdentifier;return n&&r&&i},e.prototype.toJSON=function(){return this.toString()},e.prototype.toString=function(){return this._repo.toString()+$G(this._path)},e}();function cg(e,t){if(e._orderByCalled===!0)throw new Error(t+": You can't combine multiple orderBy calls.")}function cs(e){var t=null,n=null;if(e.hasStart()&&(t=e.getIndexStartValue()),e.hasEnd()&&(n=e.getIndexEndValue()),e.getIndex()===Ni){var r="Query: When ordering by key, you may only pass one argument to startAt(), endAt(), or equalTo().",i="Query: When ordering by key, the argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() must be a string.";if(e.hasStart()){var s=e.getIndexStartName();if(s!==lo)throw new Error(r);if(typeof t!="string")throw new Error(i)}if(e.hasEnd()){var a=e.getIndexEndName();if(a!==Fi)throw new Error(r);if(typeof n!="string")throw new Error(i)}}else if(e.getIndex()===ht){if(t!=null&&!Cf(t)||n!=null&&!Cf(n))throw new Error("Query: When ordering by priority, the first argument passed to startAt(), startAfter() endAt(), endBefore(), or equalTo() must be a valid priority value (null, a number, or a string).")}else if(G(e.getIndex()instanceof uE||e.getIndex()===cE,"unknown index type."),t!=null&&typeof t=="object"||n!=null&&typeof n=="object")throw new Error("Query: First argument passed to startAt(), startAfter(), endAt(), endBefore(), or equalTo() cannot be an object.")}function lg(e){if(e.hasStart()&&e.hasEnd()&&e.hasLimit()&&!e.hasAnchoredLimit())throw new Error("Query: Can't combine startAt(), startAfter(), endAt(), endBefore(), and limit(). Use limitToFirst() or limitToLast() instead.")}var Bi=function(e){te(t,e);function t(n,r){return e.call(this,n,r,new eD,!1)||this}return Object.defineProperty(t.prototype,"parent",{get:function(){var n=$P(this._path);return n===null?null:new t(this._repo,n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){for(var n=this;n.parent!==null;)n=n.parent;return n},enumerable:!1,configurable:!0}),t}(Wr),fg=function(){function e(t,n,r){this._node=t,this.ref=n,this._index=r}return Object.defineProperty(e.prototype,"priority",{get:function(){return this._node.getPriority().val()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"key",{get:function(){return this.ref.key},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._node.numChildren()},enumerable:!1,configurable:!0}),e.prototype.child=function(t){var n=new et(t),r=ga(this.ref,t);return new e(this._node.getChild(n),r,ht)},e.prototype.exists=function(){return!this._node.isEmpty()},e.prototype.exportVal=function(){return this._node.val(!0)},e.prototype.forEach=function(t){var n=this;if(this._node.isLeafNode())return!1;var r=this._node;return!!r.forEachChild(this._index,function(i,s){return t(new e(s,ga(n.ref,i),ht))})},e.prototype.hasChild=function(t){var n=new et(t);return!this._node.getChild(n).isEmpty()},e.prototype.hasChildren=function(){return this._node.isLeafNode()?!1:!this._node.isEmpty()},e.prototype.toJSON=function(){return this.exportVal()},e.prototype.val=function(){return this._node.val()},e}();function LD(e,t){return e=Ne(e),e._checkNotDeleted("ref"),t!==void 0?ga(e._root,t):e._root}function sR(e,t){e=Ne(e),e._checkNotDeleted("refFromURL");var n=wb(t,e._repo.repoInfo_.nodeAdmin);SD("refFromURL",n);var r=n.repoInfo;return!e._repo.repoInfo_.isCustomHost()&&r.host!==e._repo.repoInfo_.host&&Li("refFromURL: Host name does not match the current database: (found "+r.host+" but expected "+e._repo.repoInfo_.host+")"),LD(e,n.path.toString())}function ga(e,t){return e=Ne(e),Oe(e._path)===null?Vz("child","path",t,!1):Af("child","path",t,!1),new Bi(e._repo,wt(e._path,t))}function h5(e,t){e=Ne(e),Lr("push",e._path),Ui("push",t,e._path,!0);var n=kD(e._repo),r=f6(n),i=ga(e,r),s=ga(e,r),a;return t!=null?a=PE(s,t).then(function(){return s}):a=Promise.resolve(s),i.then=a.then.bind(a),i.catch=a.then.bind(a,void 0),i}function d5(e){return Lr("remove",e._path),PE(e,null)}function PE(e,t){e=Ne(e),Lr("set",e._path),Ui("set",t,e._path,!1);var n=new on;return NE(e._repo,e._path,t,null,n.wrapCallback(function(){})),n.promise}function p5(e,t){e=Ne(e),Lr("setPriority",e._path),AE("setPriority",t,!1);var n=new on;return NE(e._repo,wt(e._path,".priority"),t,null,n.wrapCallback(function(){})),n.promise}function v5(e,t,n){if(Lr("setWithPriority",e._path),Ui("setWithPriority",t,e._path,!1),AE("setWithPriority",n,!1),e.key===".length"||e.key===".keys")throw"setWithPriority failed: "+e.key+" is a read-only object.";var r=new on;return NE(e._repo,e._path,t,n,r.wrapCallback(function(){})),r.promise}function g5(e,t){ID("update",t,e._path,!1);var n=new on;return Yz(e._repo,e._path,t,n.wrapCallback(function(){})),n.promise}function m5(e){return e=Ne(e),Qz(e._repo,e).then(function(t){return new fg(t,new Bi(e._repo,e._path),e._queryParams.getIndex())})}var FD=function(){function e(t){this.callbackContext=t}return e.prototype.respondsTo=function(t){return t==="value"},e.prototype.createEvent=function(t,n){var r=n._queryParams.getIndex();return new PD("value",this,new fg(t.snapshotNode,new Bi(n._repo,n._path),r))},e.prototype.getEventRunner=function(t){var n=this;return t.getEventType()==="cancel"?function(){return n.callbackContext.onCancel(t.error)}:function(){return n.callbackContext.onValue(t.snapshot,null)}},e.prototype.createCancelEvent=function(t,n){return this.callbackContext.hasCancelCallback?new DD(this,t,n):null},e.prototype.matches=function(t){return t instanceof e?!t.callbackContext||!this.callbackContext?!0:t.callbackContext.matches(this.callbackContext):!1},e.prototype.hasAnyCallback=function(){return this.callbackContext!==null},e}(),UD=function(){function e(t,n){this.eventType=t,this.callbackContext=n}return e.prototype.respondsTo=function(t){var n=t==="children_added"?"child_added":t;return n=n==="children_removed"?"child_removed":n,this.eventType===n},e.prototype.createCancelEvent=function(t,n){return this.callbackContext.hasCancelCallback?new DD(this,t,n):null},e.prototype.createEvent=function(t,n){G(t.childName!=null,"Child events should have a childName.");var r=ga(new Bi(n._repo,n._path),t.childName),i=n._queryParams.getIndex();return new PD(t.type,this,new fg(t.snapshotNode,r,i),t.prevName)},e.prototype.getEventRunner=function(t){var n=this;return t.getEventType()==="cancel"?function(){return n.callbackContext.onCancel(t.error)}:function(){return n.callbackContext.onValue(t.snapshot,t.prevName)}},e.prototype.matches=function(t){return t instanceof e?this.eventType===t.eventType&&(!this.callbackContext||!t.callbackContext||this.callbackContext.matches(t.callbackContext)):!1},e.prototype.hasAnyCallback=function(){return!!this.callbackContext},e}();function ah(e,t,n,r,i){var s;if(typeof r=="object"&&(s=void 0,i=r),typeof r=="function"&&(s=r),i&&i.onlyOnce){var a=n,c=function(d,v){_b(e._repo,e,h),a(d,v)};c.userCallback=n.userCallback,c.context=n.context,n=c}var l=new MD(n,s||void 0),h=t==="value"?new FD(l):new UD(t,l);return t5(e._repo,e,h),function(){return _b(e._repo,e,h)}}function bb(e,t,n,r){return ah(e,"value",t,n,r)}function aR(e,t,n,r){return ah(e,"child_added",t,n,r)}function uR(e,t,n,r){return ah(e,"child_changed",t,n,r)}function cR(e,t,n,r){return ah(e,"child_moved",t,n,r)}function lR(e,t,n,r){return ah(e,"child_removed",t,n,r)}function fR(e,t,n){var r=null,i=n?new MD(n):null;t==="value"?r=new FD(i):t&&(r=new UD(t,i)),_b(e._repo,e,r)}var hi=function(){function e(){}return e}(),jD=function(e){te(t,e);function t(n,r){var i=e.call(this)||this;return i._value=n,i._key=r,i}return t.prototype._apply=function(n){Ui("endAt",this._value,n._path,!0);var r=cb(n._queryParams,this._value,this._key);if(lg(r),cs(r),n._queryParams.hasEnd())throw new Error("endAt: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new Wr(n._repo,n._path,r,n._orderByCalled)},t}(hi);function y5(e,t){return oh("endAt","key",t,!0),new jD(e,t)}var _5=function(e){te(t,e);function t(n,r){var i=e.call(this)||this;return i._value=n,i._key=r,i}return t.prototype._apply=function(n){Ui("endBefore",this._value,n._path,!1);var r=y6(n._queryParams,this._value,this._key);if(lg(r),cs(r),n._queryParams.hasEnd())throw new Error("endBefore: Starting point was already set (by another call to endAt, endBefore or equalTo).");return new Wr(n._repo,n._path,r,n._orderByCalled)},t}(hi);function w5(e,t){return oh("endBefore","key",t,!0),new _5(e,t)}var VD=function(e){te(t,e);function t(n,r){var i=e.call(this)||this;return i._value=n,i._key=r,i}return t.prototype._apply=function(n){Ui("startAt",this._value,n._path,!0);var r=ub(n._queryParams,this._value,this._key);if(lg(r),cs(r),n._queryParams.hasStart())throw new Error("startAt: Starting point was already set (by another call to startAt, startBefore or equalTo).");return new Wr(n._repo,n._path,r,n._orderByCalled)},t}(hi);function b5(e,t){return e===void 0&&(e=null),oh("startAt","key",t,!0),new VD(e,t)}var E5=function(e){te(t,e);function t(n,r){var i=e.call(this)||this;return i._value=n,i._key=r,i}return t.prototype._apply=function(n){Ui("startAfter",this._value,n._path,!1);var r=m6(n._queryParams,this._value,this._key);if(lg(r),cs(r),n._queryParams.hasStart())throw new Error("startAfter: Starting point was already set (by another call to startAt, startAfter, or equalTo).");return new Wr(n._repo,n._path,r,n._orderByCalled)},t}(hi);function T5(e,t){return oh("startAfter","key",t,!0),new E5(e,t)}var I5=function(e){te(t,e);function t(n){var r=e.call(this)||this;return r._limit=n,r}return t.prototype._apply=function(n){if(n._queryParams.hasLimit())throw new Error("limitToFirst: Limit was already set (by another call to limitToFirst or limitToLast).");return new Wr(n._repo,n._path,v6(n._queryParams,this._limit),n._orderByCalled)},t}(hi);function S5(e){if(typeof e!="number"||Math.floor(e)!==e||e<=0)throw new Error("limitToFirst: First argument must be a positive integer.");return new I5(e)}var C5=function(e){te(t,e);function t(n){var r=e.call(this)||this;return r._limit=n,r}return t.prototype._apply=function(n){if(n._queryParams.hasLimit())throw new Error("limitToLast: Limit was already set (by another call to limitToFirst or limitToLast).");return new Wr(n._repo,n._path,g6(n._queryParams,this._limit),n._orderByCalled)},t}(hi);function A5(e){if(typeof e!="number"||Math.floor(e)!==e||e<=0)throw new Error("limitToLast: First argument must be a positive integer.");return new C5(e)}var k5=function(e){te(t,e);function t(n){var r=e.call(this)||this;return r._path=n,r}return t.prototype._apply=function(n){cg(n,"orderByChild");var r=new et(this._path);if(Pe(r))throw new Error("orderByChild: cannot pass in empty path. Use orderByValue() instead.");var i=new uE(r),s=Qv(n._queryParams,i);return cs(s),new Wr(n._repo,n._path,s,!0)},t}(hi);function R5(e){if(e==="$key")throw new Error('orderByChild: "$key" is invalid. Use orderByKey() instead.');if(e==="$priority")throw new Error('orderByChild: "$priority" is invalid. Use orderByPriority() instead.');if(e==="$value")throw new Error('orderByChild: "$value" is invalid. Use orderByValue() instead.');return Af("orderByChild","path",e,!1),new k5(e)}var N5=function(e){te(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._apply=function(n){cg(n,"orderByKey");var r=Qv(n._queryParams,Ni);return cs(r),new Wr(n._repo,n._path,r,!0)},t}(hi);function x5(){return new N5}var O5=function(e){te(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._apply=function(n){cg(n,"orderByPriority");var r=Qv(n._queryParams,ht);return cs(r),new Wr(n._repo,n._path,r,!0)},t}(hi);function P5(){return new O5}var D5=function(e){te(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._apply=function(n){cg(n,"orderByValue");var r=Qv(n._queryParams,cE);return cs(r),new Wr(n._repo,n._path,r,!0)},t}(hi);function M5(){return new D5}var L5=function(e){te(t,e);function t(n,r){var i=e.call(this)||this;return i._value=n,i._key=r,i}return t.prototype._apply=function(n){if(Ui("equalTo",this._value,n._path,!1),n._queryParams.hasStart())throw new Error("equalTo: Starting point was already set (by another call to startAt/startAfter or equalTo).");if(n._queryParams.hasEnd())throw new Error("equalTo: Ending point was already set (by another call to endAt/endBefore or equalTo).");return new jD(this._value,this._key)._apply(new VD(this._value,this._key)._apply(n))},t}(hi);function F5(e,t){return oh("equalTo","key",t,!0),new L5(e,t)}function Zr(e){for(var t,n,r=[],i=1;i=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var wQ=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ae,DE=DE||{},Ie=wQ||self;function zp(){}function Ib(e){var t=typeof e;return t=t!="object"?t:e?Array.isArray(e)?"array":t:"null",t=="array"||t=="object"&&typeof e.length=="number"}function uh(e){var t=typeof e;return t=="object"&&e!=null||t=="function"}function bQ(e){return Object.prototype.hasOwnProperty.call(e,X_)&&e[X_]||(e[X_]=++EQ)}var X_="closure_uid_"+(1e9*Math.random()>>>0),EQ=0;function TQ(e,t,n){return e.call.apply(e.bind,arguments)}function IQ(e,t,n){if(!e)throw Error();if(2t?null:typeof e=="string"?e.charAt(t):e[t]}function hR(e){return Array.prototype.concat.apply([],arguments)}function ME(e){var t=e.length;if(0t?1:0}var Wn;e:{var pR=Ie.navigator;if(pR){var vR=pR.userAgent;if(vR){Wn=vR;break e}}Wn=""}function LE(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function GD(e){var t={};for(var n in e)t[n]=e[n];return t}var gR="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function zD(e,t){for(var n,r,i=1;iparseFloat(Z_)){Yp=String(tw);break e}}Yp=Z_}var NQ={};function xQ(){return AQ(function(){for(var e=0,t=dR(String(Yp)).split("."),n=dR("9").split("."),r=Math.max(t.length,n.length),i=0;e==0&&i>>0);function BE(e){return typeof e=="function"?e:(e[rw]||(e[rw]=function(t){return e.handleEvent(t)}),e[rw])}function un(){ls.call(this),this.i=new dg(this),this.P=this,this.I=null}En(un,ls);un.prototype[ch]=!0;un.prototype.removeEventListener=function(e,t,n,r){tM(this,e,t,n,r)};function wn(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,typeof t=="string")t=new Rn(t,e);else if(t instanceof Rn)t.target=t.target||e;else{var i=t;t=new Rn(r,e),zD(t,i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var a=t.g=n[s];i=qd(a,r,!0,t)&&i}if(a=t.g=e,i=qd(a,r,!0,t)&&i,i=qd(a,r,!1,t)&&i,n)for(s=0;st.h&&(t.h++,e.next=t.g,t.g=e)}Nb=!1}function pg(e,t){un.call(this),this.h=e||1,this.g=t||Ie,this.j=_n(this.kb,this),this.l=Date.now()}En(pg,un);ae=pg.prototype;ae.da=!1;ae.S=null;ae.kb=function(){if(this.da){var e=Date.now()-this.l;0=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var mQ=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ae,DE=DE||{},Ie=mQ||self;function zp(){}function Ib(e){var t=typeof e;return t=t!="object"?t:e?Array.isArray(e)?"array":t:"null",t=="array"||t=="object"&&typeof e.length=="number"}function ch(e){var t=typeof e;return t=="object"&&e!=null||t=="function"}function yQ(e){return Object.prototype.hasOwnProperty.call(e,X_)&&e[X_]||(e[X_]=++_Q)}var X_="closure_uid_"+(1e9*Math.random()>>>0),_Q=0;function wQ(e,t,n){return e.call.apply(e.bind,arguments)}function bQ(e,t,n){if(!e)throw Error();if(2t?null:typeof e=="string"?e.charAt(t):e[t]}function hR(e){return Array.prototype.concat.apply([],arguments)}function ME(e){var t=e.length;if(0t?1:0}var Kn;e:{var pR=Ie.navigator;if(pR){var vR=pR.userAgent;if(vR){Kn=vR;break e}}Kn=""}function LE(e,t,n){for(var r in e)t.call(n,e[r],r,e)}function GD(e){var t={};for(var n in e)t[n]=e[n];return t}var gR="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function zD(e,t){for(var n,r,i=1;iparseFloat(Z_)){Yp=String(tw);break e}}Yp=Z_}var AQ={};function kQ(){return IQ(function(){for(var e=0,t=dR(String(Yp)).split("."),n=dR("9").split("."),r=Math.max(t.length,n.length),i=0;e==0&&i>>0);function BE(e){return typeof e=="function"?e:(e[rw]||(e[rw]=function(t){return e.handleEvent(t)}),e[rw])}function an(){ls.call(this),this.i=new dg(this),this.P=this,this.I=null}En(an,ls);an.prototype[lh]=!0;an.prototype.removeEventListener=function(e,t,n,r){tM(this,e,t,n,r)};function wn(e,t){var n,r=e.I;if(r)for(n=[];r;r=r.I)n.push(r);if(e=e.P,r=t.type||t,typeof t=="string")t=new kn(t,e);else if(t instanceof kn)t.target=t.target||e;else{var i=t;t=new kn(r,e),zD(t,i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var a=t.g=n[s];i=$d(a,r,!0,t)&&i}if(a=t.g=e,i=$d(a,r,!0,t)&&i,i=$d(a,r,!1,t)&&i,n)for(s=0;st.h&&(t.h++,e.next=t.g,t.g=e)}Nb=!1}function pg(e,t){an.call(this),this.h=e||1,this.g=t||Ie,this.j=_n(this.kb,this),this.l=Date.now()}En(pg,an);ae=pg.prototype;ae.da=!1;ae.S=null;ae.kb=function(){if(this.da){var e=Date.now()-this.l;0r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if(s!="noop"&&s!="stop"&&s!="close")for(var a=1;at)&&(t!=3||Sb||this.g&&(this.h.h||this.g.ga()||IR(this.g)))){this.I||t!=4||n==7||(n==8||0>=r?Nf(3):Nf(2)),_g(this);var i=this.g.ba();this.N=i;t:if(vM(this)){var s=IR(this.g);e="";var a=s.length,c=no(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){Ys(this),tf(this);var l="";break t}this.h.i=new Ie.TextDecoder}for(n=0;nt.length?Xp:(t=t.substr(r,n),e.C=r+n,t)))}ae.cancel=function(){this.I=!0,Ys(this)};function dh(e){e.Y=Date.now()+e.P,mM(e,e.P)}function mM(e,t){if(e.B!=null)throw Error("WatchDog timer not null");e.B=lh(_n(e.eb,e),t)}function _g(e){e.B&&(Ie.clearTimeout(e.B),e.B=null)}ae.eb=function(){this.B=null;var e=Date.now();0<=e-this.Y?(zQ(this.j,this.A),this.K!=2&&(Nf(),zn(17)),Ys(this),this.o=2,tf(this)):mM(this,this.Y-e)};function tf(e){e.l.G==0||e.I||FM(e.l,e)}function Ys(e){_g(e);var t=e.L;t&&typeof t.na=="function"&&t.na(),e.L=null,HE(e.W),aM(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function Db(e,t){try{var n=e.l;if(n.G!=0&&(n.g==e||Mb(n.i,e))){if(n.I=e.N,!e.J&&Mb(n.i,e)&&n.G==3){try{var r=n.Ca.g.parse(t)}catch{r=null}if(Array.isArray(r)&&r.length==3){var i=r;if(i[0]==0){e:if(!n.u){if(n.g)if(n.g.F+3e3i[2]&&n.N&&n.A==0&&!n.v&&(n.v=lh(_n(n.ab,n),6e3));if(1>=IM(n.i)&&n.ka){try{n.ka()}catch{}n.ka=void 0}}else Xs(n,11)}else if((e.J||n.g==e)&&tv(n),!Qp(t))for(i=n.Ca.g.parse(t),t=0;tt)throw Error("Bad port number "+t);e.m=t}else e.m=null}function bR(e,t,n){t instanceof xf?(e.h=t,aY(e.h,e.g)):(n||(t=Bl(t,oY)),e.h=new xf(t,e.g))}function _t(e,t,n){e.h.set(t,n)}function wg(e){return _t(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function eY(e){return e instanceof ya?fo(e):new ya(e,void 0)}function tY(e,t,n,r){var i=new ya(null,void 0);return e&&Jp(i,e),t&&Zp(i,t),n&&ev(i,n),r&&(i.l=r),i}function nf(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Bl(e,t,n){return typeof e=="string"?(e=encodeURI(e).replace(t,nY),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function nY(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var ER=/[#\/\?@]/g,rY=/[#\?:]/g,iY=/[#\?]/g,oY=/[#\?@]/g,sY=/#/g;function xf(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function fs(e){e.g||(e.g=new Nc,e.h=0,e.i&&ZQ(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}ae=xf.prototype;ae.add=function(e,t){fs(this),this.i=null,e=xc(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this};function _M(e,t){fs(e),t=xc(e,t),ma(e.g.h,t)&&(e.i=null,e.h-=e.g.get(t).length,e=e.g,ma(e.h,t)&&(delete e.h[t],e.i--,e.g.length>2*e.i&&YE(e)))}function wM(e,t){return fs(e),t=xc(e,t),ma(e.g.h,t)}ae.forEach=function(e,t){fs(this),this.g.forEach(function(n,r){WD(n,function(i){e.call(t,i,r,this)},this)},this)};ae.T=function(){fs(this);for(var e=this.g.R(),t=this.g.T(),n=[],r=0;r=e.j:!1}function IM(e){return e.h?1:e.g?e.g.size:0}function Mb(e,t){return e.h?e.h==t:e.g?e.g.has(t):!1}function XE(e,t){e.g?e.g.add(t):e.h=t}function SM(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}EM.prototype.cancel=function(){var e,t;if(this.i=CM(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){try{for(var n=HD(this.g.values()),r=n.next();!r.done;r=n.next()){var i=r.value;i.cancel()}}catch(s){e={error:s}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.g.clear()}};function CM(e){var t,n;if(e.h!=null)return e.i.concat(e.h.D);if(e.g!=null&&e.g.size!==0){var r=e.i;try{for(var i=HD(e.g.values()),s=i.next();!s.done;s=i.next()){var a=s.value;r=r.concat(a.D)}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}return ME(e.i)}function JE(){}JE.prototype.stringify=function(e){return Ie.JSON.stringify(e,void 0)};JE.prototype.parse=function(e){return Ie.JSON.parse(e,void 0)};function lY(){this.g=new JE}function fY(e,t,n){var r=n||"";try{QE(e,function(i,s){var a=i;uh(i)&&(a=qE(i)),t.push(r+s+"="+encodeURIComponent(a))})}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function hY(e,t){var n=new vg;if(Ie.Image){var r=new Image;r.onload=Bd($d,n,r,"TestLoadImage: loaded",!0,t),r.onerror=Bd($d,n,r,"TestLoadImage: error",!1,t),r.onabort=Bd($d,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=Bd($d,n,r,"TestLoadImage: timeout",!1,t),Ie.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=e}else t(!1)}function $d(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch{}}function ph(e){this.l=e.$b||null,this.j=e.ib||!1}En(ph,WE);ph.prototype.g=function(){return new bg(this.l,this.j)};ph.prototype.i=function(e){return function(){return e}}({});function bg(e,t){un.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=ZE,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}En(bg,un);var ZE=0;ae=bg.prototype;ae.open=function(e,t){if(this.readyState!=ZE)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,Of(this)};ae.send=function(e){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||Ie).fetch(new Request(this.B,t)).then(this.Va.bind(this),this.ha.bind(this))};ae.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,vh(this)),this.readyState=ZE};ae.Va=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,Of(this)),this.g&&(this.readyState=3,Of(this),this.g)))if(this.responseType==="arraybuffer")e.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if(typeof Ie.ReadableStream<"u"&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;AM(this)}else e.text().then(this.Ua.bind(this),this.ha.bind(this))};function AM(e){e.j.read().then(e.Sa.bind(e)).catch(e.ha.bind(e))}ae.Sa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?vh(this):Of(this),this.readyState==3&&AM(this)}};ae.Ua=function(e){this.g&&(this.response=this.responseText=e,vh(this))};ae.Ta=function(e){this.g&&(this.response=e,vh(this))};ae.ha=function(){this.g&&vh(this)};function vh(e){e.readyState=4,e.l=null,e.j=null,e.A=null,Of(e)}ae.setRequestHeader=function(e,t){this.v.append(e,t)};ae.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""};ae.getAllResponseHeaders=function(){if(!this.h)return"";for(var e=[],t=this.h.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join(`\r -`)};function Of(e){e.onreadystatechange&&e.onreadystatechange.call(e)}Object.defineProperty(bg.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(e){this.m=e?"include":"same-origin"}});var dY=Ie.JSON.parse;function Vt(e){un.call(this),this.headers=new Nc,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=kM,this.K=this.L=!1}En(Vt,un);var kM="",pY=/^https?$/i,vY=["POST","PUT"];ae=Vt.prototype;ae.ea=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():xb.g(),this.C=this.u?wR(this.u):wR(xb),this.g.onreadystatechange=_n(this.Fa,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(s){TR(this,s);return}e=n||"";var i=new Nc(this.headers);r&&QE(r,function(s,a){i.set(a,s)}),r=CQ(i.T()),n=Ie.FormData&&e instanceof Ie.FormData,!(0<=KD(vY,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),i.forEach(function(s,a){this.g.setRequestHeader(a,s)},this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{xM(this),0=e.i.j-(e.m?1:0)?!1:e.m?(e.l=t.D.concat(e.l),!0):e.G==1||e.G==2||e.C>=(e.Xa?0:e.Ya)?!1:(e.m=lh(_n(e.Ha,e,t),UM(e,e.C)),e.C++,!0)}ae.Ha=function(e){if(this.m)if(this.m=null,this.G==1){if(!e){this.V=Math.floor(1e5*Math.random()),e=this.V++;var t=new hh(this,this.h,e,void 0),n=this.s;if(this.P&&(n?(n=GD(n),zD(n,this.P)):n=this.P),this.o===null&&(t.H=n),this.ja)e:{for(var r=0,i=0;ih)s=Math.max(0,i[l].h-100),c=!1;else try{fY(d,a,"req"+h+"_")}catch{r&&r(d)}}if(c){r=a.join("&");break e}}return e=e.l.splice(0,n),t.D=e,r}function MM(e){e.g||e.u||(e.Y=1,$E(e.Ga,e),e.A=0)}function nT(e){return e.g||e.u||3<=e.A?!1:(e.Y++,e.u=lh(_n(e.Ga,e),UM(e,e.A)),e.A++,!0)}ae.Ga=function(){if(this.u=null,LM(this),this.$&&!(this.L||this.g==null||0>=this.O)){var e=2*this.O;this.h.info("BP detection timer enabled: "+e),this.B=lh(_n(this.bb,this),e)}};ae.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,zn(10),Tg(this),LM(this))};function rT(e){e.B!=null&&(Ie.clearTimeout(e.B),e.B=null)}function LM(e){e.g=new hh(e,e.h,"rpc",e.Y),e.o===null&&(e.g.H=e.s),e.g.O=0;var t=fo(e.oa);_t(t,"RID","rpc"),_t(t,"SID",e.J),_t(t,"CI",e.N?"0":"1"),_t(t,"AID",e.U),gh(e,t),_t(t,"TYPE","xmlhttp"),e.o&&e.s&&eT(t,e.o,e.s),e.K&&e.g.setTimeout(e.K);var n=e.g;e=e.la,n.K=1,n.v=wg(fo(t)),n.s=null,n.U=!0,pM(n,e)}ae.ab=function(){this.v!=null&&(this.v=null,Tg(this),nT(this),zn(19))};function tv(e){e.v!=null&&(Ie.clearTimeout(e.v),e.v=null)}function FM(e,t){var n=null;if(e.g==t){tv(e),rT(e),e.g=null;var r=2}else if(Mb(e.i,t))n=t.D,SM(e.i,t),r=1;else return;if(e.I=t.N,e.G!=0){if(t.i)if(r==1){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;r=gg(),wn(r,new lM(r,n)),Ig(e)}else MM(e);else if(i=t.o,i==3||i==0&&0r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if(s!="noop"&&s!="stop"&&s!="close")for(var a=1;at)&&(t!=3||Sb||this.g&&(this.h.h||this.g.ga()||IR(this.g)))){this.I||t!=4||n==7||(n==8||0>=r?xf(3):xf(2)),_g(this);var i=this.g.ba();this.N=i;t:if(vM(this)){var s=IR(this.g);e="";var a=s.length,c=no(this.g)==4;if(!this.h.i){if(typeof TextDecoder>"u"){Ys(this),tf(this);var l="";break t}this.h.i=new Ie.TextDecoder}for(n=0;nt.length?Xp:(t=t.substr(r,n),e.C=r+n,t)))}ae.cancel=function(){this.I=!0,Ys(this)};function ph(e){e.Y=Date.now()+e.P,mM(e,e.P)}function mM(e,t){if(e.B!=null)throw Error("WatchDog timer not null");e.B=fh(_n(e.eb,e),t)}function _g(e){e.B&&(Ie.clearTimeout(e.B),e.B=null)}ae.eb=function(){this.B=null;var e=Date.now();0<=e-this.Y?(KQ(this.j,this.A),this.K!=2&&(xf(),Gn(17)),Ys(this),this.o=2,tf(this)):mM(this,this.Y-e)};function tf(e){e.l.G==0||e.I||FM(e.l,e)}function Ys(e){_g(e);var t=e.L;t&&typeof t.na=="function"&&t.na(),e.L=null,HE(e.W),aM(e.V),e.g&&(t=e.g,e.g=null,t.abort(),t.na())}function Db(e,t){try{var n=e.l;if(n.G!=0&&(n.g==e||Mb(n.i,e))){if(n.I=e.N,!e.J&&Mb(n.i,e)&&n.G==3){try{var r=n.Ca.g.parse(t)}catch{r=null}if(Array.isArray(r)&&r.length==3){var i=r;if(i[0]==0){e:if(!n.u){if(n.g)if(n.g.F+3e3i[2]&&n.N&&n.A==0&&!n.v&&(n.v=fh(_n(n.ab,n),6e3));if(1>=IM(n.i)&&n.ka){try{n.ka()}catch{}n.ka=void 0}}else Xs(n,11)}else if((e.J||n.g==e)&&tv(n),!Qp(t))for(i=n.Ca.g.parse(t),t=0;tt)throw Error("Bad port number "+t);e.m=t}else e.m=null}function bR(e,t,n){t instanceof Of?(e.h=t,iY(e.h,e.g)):(n||(t=Bl(t,nY)),e.h=new Of(t,e.g))}function _t(e,t,n){e.h.set(t,n)}function wg(e){return _t(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function XQ(e){return e instanceof ya?lo(e):new ya(e,void 0)}function JQ(e,t,n,r){var i=new ya(null,void 0);return e&&Jp(i,e),t&&Zp(i,t),n&&ev(i,n),r&&(i.l=r),i}function nf(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function Bl(e,t,n){return typeof e=="string"?(e=encodeURI(e).replace(t,ZQ),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ZQ(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var ER=/[#\/\?@]/g,eY=/[#\?:]/g,tY=/[#\?]/g,nY=/[#\?@]/g,rY=/#/g;function Of(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function fs(e){e.g||(e.g=new Nc,e.h=0,e.i&&YQ(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}ae=Of.prototype;ae.add=function(e,t){fs(this),this.i=null,e=xc(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this};function _M(e,t){fs(e),t=xc(e,t),ma(e.g.h,t)&&(e.i=null,e.h-=e.g.get(t).length,e=e.g,ma(e.h,t)&&(delete e.h[t],e.i--,e.g.length>2*e.i&&YE(e)))}function wM(e,t){return fs(e),t=xc(e,t),ma(e.g.h,t)}ae.forEach=function(e,t){fs(this),this.g.forEach(function(n,r){WD(n,function(i){e.call(t,i,r,this)},this)},this)};ae.T=function(){fs(this);for(var e=this.g.R(),t=this.g.T(),n=[],r=0;r=e.j:!1}function IM(e){return e.h?1:e.g?e.g.size:0}function Mb(e,t){return e.h?e.h==t:e.g?e.g.has(t):!1}function XE(e,t){e.g?e.g.add(t):e.h=t}function SM(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}EM.prototype.cancel=function(){var e,t;if(this.i=CM(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&this.g.size!==0){try{for(var n=HD(this.g.values()),r=n.next();!r.done;r=n.next()){var i=r.value;i.cancel()}}catch(s){e={error:s}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.g.clear()}};function CM(e){var t,n;if(e.h!=null)return e.i.concat(e.h.D);if(e.g!=null&&e.g.size!==0){var r=e.i;try{for(var i=HD(e.g.values()),s=i.next();!s.done;s=i.next()){var a=s.value;r=r.concat(a.D)}}catch(c){t={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}return ME(e.i)}function JE(){}JE.prototype.stringify=function(e){return Ie.JSON.stringify(e,void 0)};JE.prototype.parse=function(e){return Ie.JSON.parse(e,void 0)};function aY(){this.g=new JE}function uY(e,t,n){var r=n||"";try{QE(e,function(i,s){var a=i;ch(i)&&(a=qE(i)),t.push(r+s+"="+encodeURIComponent(a))})}catch(i){throw t.push(r+"type="+encodeURIComponent("_badmap")),i}}function cY(e,t){var n=new vg;if(Ie.Image){var r=new Image;r.onload=qd(Hd,n,r,"TestLoadImage: loaded",!0,t),r.onerror=qd(Hd,n,r,"TestLoadImage: error",!1,t),r.onabort=qd(Hd,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=qd(Hd,n,r,"TestLoadImage: timeout",!1,t),Ie.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=e}else t(!1)}function Hd(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch{}}function vh(e){this.l=e.$b||null,this.j=e.ib||!1}En(vh,WE);vh.prototype.g=function(){return new bg(this.l,this.j)};vh.prototype.i=function(e){return function(){return e}}({});function bg(e,t){an.call(this),this.D=e,this.u=t,this.m=void 0,this.readyState=ZE,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}En(bg,an);var ZE=0;ae=bg.prototype;ae.open=function(e,t){if(this.readyState!=ZE)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,Pf(this)};ae.send=function(e){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");this.g=!0;var t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.D||Ie).fetch(new Request(this.B,t)).then(this.Va.bind(this),this.ha.bind(this))};ae.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted."),1<=this.readyState&&this.g&&this.readyState!=4&&(this.g=!1,gh(this)),this.readyState=ZE};ae.Va=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,Pf(this)),this.g&&(this.readyState=3,Pf(this),this.g)))if(this.responseType==="arraybuffer")e.arrayBuffer().then(this.Ta.bind(this),this.ha.bind(this));else if(typeof Ie.ReadableStream<"u"&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;AM(this)}else e.text().then(this.Ua.bind(this),this.ha.bind(this))};function AM(e){e.j.read().then(e.Sa.bind(e)).catch(e.ha.bind(e))}ae.Sa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?gh(this):Pf(this),this.readyState==3&&AM(this)}};ae.Ua=function(e){this.g&&(this.response=this.responseText=e,gh(this))};ae.Ta=function(e){this.g&&(this.response=e,gh(this))};ae.ha=function(){this.g&&gh(this)};function gh(e){e.readyState=4,e.l=null,e.j=null,e.A=null,Pf(e)}ae.setRequestHeader=function(e,t){this.v.append(e,t)};ae.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""};ae.getAllResponseHeaders=function(){if(!this.h)return"";for(var e=[],t=this.h.entries(),n=t.next();!n.done;)n=n.value,e.push(n[0]+": "+n[1]),n=t.next();return e.join(`\r +`)};function Pf(e){e.onreadystatechange&&e.onreadystatechange.call(e)}Object.defineProperty(bg.prototype,"withCredentials",{get:function(){return this.m==="include"},set:function(e){this.m=e?"include":"same-origin"}});var lY=Ie.JSON.parse;function Vt(e){an.call(this),this.headers=new Nc,this.u=e||null,this.h=!1,this.C=this.g=null,this.H="",this.m=0,this.j="",this.l=this.F=this.v=this.D=!1,this.B=0,this.A=null,this.J=kM,this.K=this.L=!1}En(Vt,an);var kM="",fY=/^https?$/i,hY=["POST","PUT"];ae=Vt.prototype;ae.ea=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.H+"; newUri="+e);t=t?t.toUpperCase():"GET",this.H=e,this.j="",this.m=0,this.D=!1,this.h=!0,this.g=this.u?this.u.g():xb.g(),this.C=this.u?wR(this.u):wR(xb),this.g.onreadystatechange=_n(this.Fa,this);try{this.F=!0,this.g.open(t,String(e),!0),this.F=!1}catch(s){TR(this,s);return}e=n||"";var i=new Nc(this.headers);r&&QE(r,function(s,a){i.set(a,s)}),r=TQ(i.T()),n=Ie.FormData&&e instanceof Ie.FormData,!(0<=KD(hY,t))||r||n||i.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),i.forEach(function(s,a){this.g.setRequestHeader(a,s)},this),this.J&&(this.g.responseType=this.J),"withCredentials"in this.g&&this.g.withCredentials!==this.L&&(this.g.withCredentials=this.L);try{xM(this),0=e.i.j-(e.m?1:0)?!1:e.m?(e.l=t.D.concat(e.l),!0):e.G==1||e.G==2||e.C>=(e.Xa?0:e.Ya)?!1:(e.m=fh(_n(e.Ha,e,t),UM(e,e.C)),e.C++,!0)}ae.Ha=function(e){if(this.m)if(this.m=null,this.G==1){if(!e){this.V=Math.floor(1e5*Math.random()),e=this.V++;var t=new dh(this,this.h,e,void 0),n=this.s;if(this.P&&(n?(n=GD(n),zD(n,this.P)):n=this.P),this.o===null&&(t.H=n),this.ja)e:{for(var r=0,i=0;ih)s=Math.max(0,i[l].h-100),c=!1;else try{uY(d,a,"req"+h+"_")}catch{r&&r(d)}}if(c){r=a.join("&");break e}}return e=e.l.splice(0,n),t.D=e,r}function MM(e){e.g||e.u||(e.Y=1,$E(e.Ga,e),e.A=0)}function nT(e){return e.g||e.u||3<=e.A?!1:(e.Y++,e.u=fh(_n(e.Ga,e),UM(e,e.A)),e.A++,!0)}ae.Ga=function(){if(this.u=null,LM(this),this.$&&!(this.L||this.g==null||0>=this.O)){var e=2*this.O;this.h.info("BP detection timer enabled: "+e),this.B=fh(_n(this.bb,this),e)}};ae.bb=function(){this.B&&(this.B=null,this.h.info("BP detection timeout reached."),this.h.info("Buffering proxy detected and switch to long-polling!"),this.N=!1,this.L=!0,Gn(10),Tg(this),LM(this))};function rT(e){e.B!=null&&(Ie.clearTimeout(e.B),e.B=null)}function LM(e){e.g=new dh(e,e.h,"rpc",e.Y),e.o===null&&(e.g.H=e.s),e.g.O=0;var t=lo(e.oa);_t(t,"RID","rpc"),_t(t,"SID",e.J),_t(t,"CI",e.N?"0":"1"),_t(t,"AID",e.U),mh(e,t),_t(t,"TYPE","xmlhttp"),e.o&&e.s&&eT(t,e.o,e.s),e.K&&e.g.setTimeout(e.K);var n=e.g;e=e.la,n.K=1,n.v=wg(lo(t)),n.s=null,n.U=!0,pM(n,e)}ae.ab=function(){this.v!=null&&(this.v=null,Tg(this),nT(this),Gn(19))};function tv(e){e.v!=null&&(Ie.clearTimeout(e.v),e.v=null)}function FM(e,t){var n=null;if(e.g==t){tv(e),rT(e),e.g=null;var r=2}else if(Mb(e.i,t))n=t.D,SM(e.i,t),r=1;else return;if(e.I=t.N,e.G!=0){if(t.i)if(r==1){n=t.s?t.s.length:0,t=Date.now()-t.F;var i=e.C;r=gg(),wn(r,new lM(r,n)),Ig(e)}else MM(e);else if(i=t.o,i==3||i==0&&0t?1:0}function Zu(e,t,n){return e.length===t.length&&e.every(function(r,i){return n(r,t[i])})}function WM(e){return e+"\0"}/** + */var KM=function(){function e(){}return e.u=function(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=Math.floor(256/t.length)*t.length,r="";r.length<20;)for(var i=TY(40),s=0;st?1:0}function Zu(e,t,n){return e.length===t.length&&e.every(function(r,i){return n(r,t[i])})}function WM(e){return e+"\0"}/** * @license * Copyright 2017 Google LLC * @@ -1857,7 +1857,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var lr=function(){function e(t,n){if(this.seconds=t,this.nanoseconds=n,n<0)throw new H(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new H(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new H(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new H(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype._compareTo=function(t){return this.seconds===t.seconds?Ve(this.nanoseconds,t.nanoseconds):Ve(this.seconds,t.seconds)},e.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},e.prototype.valueOf=function(){var t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},e}(),De=function(){function e(t){this.timestamp=t}return e.fromTimestamp=function(t){return new e(t)},e.min=function(){return new e(new lr(0,0))},e.prototype.compareTo=function(t){return this.timestamp._compareTo(t.timestamp)},e.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},e.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},e.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},e.prototype.toTimestamp=function(){return this.timestamp},e}();/** + */var cr=function(){function e(t,n){if(this.seconds=t,this.nanoseconds=n,n<0)throw new H(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(n>=1e9)throw new H(D.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+n);if(t<-62135596800)throw new H(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t);if(t>=253402300800)throw new H(D.INVALID_ARGUMENT,"Timestamp seconds out of range: "+t)}return e.now=function(){return e.fromMillis(Date.now())},e.fromDate=function(t){return e.fromMillis(t.getTime())},e.fromMillis=function(t){var n=Math.floor(t/1e3);return new e(n,Math.floor(1e6*(t-1e3*n)))},e.prototype.toDate=function(){return new Date(this.toMillis())},e.prototype.toMillis=function(){return 1e3*this.seconds+this.nanoseconds/1e6},e.prototype._compareTo=function(t){return this.seconds===t.seconds?Ve(this.nanoseconds,t.nanoseconds):Ve(this.seconds,t.seconds)},e.prototype.isEqual=function(t){return t.seconds===this.seconds&&t.nanoseconds===this.nanoseconds},e.prototype.toString=function(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"},e.prototype.toJSON=function(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}},e.prototype.valueOf=function(){var t=this.seconds- -62135596800;return String(t).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")},e}(),De=function(){function e(t){this.timestamp=t}return e.fromTimestamp=function(t){return new e(t)},e.min=function(){return new e(new cr(0,0))},e.prototype.compareTo=function(t){return this.timestamp._compareTo(t.timestamp)},e.prototype.isEqual=function(t){return this.timestamp.isEqual(t.timestamp)},e.prototype.toMicroseconds=function(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3},e.prototype.toString=function(){return"SnapshotVersion("+this.timestamp.toString()+")"},e.prototype.toTimestamp=function(){return this.timestamp},e}();/** * @license * Copyright 2017 Google LLC * @@ -1902,7 +1902,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var zM=function(){function e(t,n,r){n===void 0?n=0:n>t.length&&he(),r===void 0?r=t.length-n:r>t.length-n&&he(),this.segments=t,this.offset=n,this.len=r}return Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return e.comparator(this,t)===0},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach(function(r){n.push(r)}):n.push(t),this.construct(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.popFirst=function(t){return t=t===void 0?1:t,this.construct(this.segments,this.offset+t,this.length-t)},e.prototype.popLast=function(){return this.construct(this.segments,this.offset,this.length-1)},e.prototype.firstSegment=function(){return this.segments[this.offset]},e.prototype.lastSegment=function(){return this.get(this.length-1)},e.prototype.get=function(t){return this.segments[this.offset+t]},e.prototype.isEmpty=function(){return this.length===0},e.prototype.isPrefixOf=function(t){if(t.lengtha)return 1}return t.lengthn.length?1:0},e}(),Je=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return te(t,e),t.prototype.construct=function(n,r,i){return new t(n,r,i)},t.prototype.canonicalString=function(){return this.toArray().join("/")},t.prototype.toString=function(){return this.canonicalString()},t.fromString=function(){for(var n=[],r=0;r=0)throw new H(D.INVALID_ARGUMENT,"Invalid segment ("+c+"). Paths must not contain // in them.");i.push.apply(i,c.split("/").filter(function(l){return l.length>0}))}return new t(i)},t.emptyPath=function(){return new t([])},t}(zM),AY=/^[_a-zA-Z][_a-zA-Z0-9]*$/,fi=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return te(t,e),t.prototype.construct=function(n,r,i){return new t(n,r,i)},t.isValidIdentifier=function(n){return AY.test(n)},t.prototype.canonicalString=function(){return this.toArray().map(function(n){return n=n.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),t.isValidIdentifier(n)||(n="`"+n+"`"),n}).join(".")},t.prototype.toString=function(){return this.canonicalString()},t.prototype.isKeyField=function(){return this.length===1&&this.get(0)==="__name__"},t.keyField=function(){return new t(["__name__"])},t.fromServerFormat=function(n){for(var r=[],i="",s=0,a=function(){if(i.length===0)throw new H(D.INVALID_ARGUMENT,"Invalid field path ("+n+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");r.push(i),i=""},c=!1;st.length&&he(),r===void 0?r=t.length-n:r>t.length-n&&he(),this.segments=t,this.offset=n,this.len=r}return Object.defineProperty(e.prototype,"length",{get:function(){return this.len},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return e.comparator(this,t)===0},e.prototype.child=function(t){var n=this.segments.slice(this.offset,this.limit());return t instanceof e?t.forEach(function(r){n.push(r)}):n.push(t),this.construct(n)},e.prototype.limit=function(){return this.offset+this.length},e.prototype.popFirst=function(t){return t=t===void 0?1:t,this.construct(this.segments,this.offset+t,this.length-t)},e.prototype.popLast=function(){return this.construct(this.segments,this.offset,this.length-1)},e.prototype.firstSegment=function(){return this.segments[this.offset]},e.prototype.lastSegment=function(){return this.get(this.length-1)},e.prototype.get=function(t){return this.segments[this.offset+t]},e.prototype.isEmpty=function(){return this.length===0},e.prototype.isPrefixOf=function(t){if(t.lengtha)return 1}return t.lengthn.length?1:0},e}(),Xe=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return te(t,e),t.prototype.construct=function(n,r,i){return new t(n,r,i)},t.prototype.canonicalString=function(){return this.toArray().join("/")},t.prototype.toString=function(){return this.canonicalString()},t.fromString=function(){for(var n=[],r=0;r=0)throw new H(D.INVALID_ARGUMENT,"Invalid segment ("+c+"). Paths must not contain // in them.");i.push.apply(i,c.split("/").filter(function(l){return l.length>0}))}return new t(i)},t.emptyPath=function(){return new t([])},t}(zM),IY=/^[_a-zA-Z][_a-zA-Z0-9]*$/,fi=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return te(t,e),t.prototype.construct=function(n,r,i){return new t(n,r,i)},t.isValidIdentifier=function(n){return IY.test(n)},t.prototype.canonicalString=function(){return this.toArray().map(function(n){return n=n.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),t.isValidIdentifier(n)||(n="`"+n+"`"),n}).join(".")},t.prototype.toString=function(){return this.canonicalString()},t.prototype.isKeyField=function(){return this.length===1&&this.get(0)==="__name__"},t.keyField=function(){return new t(["__name__"])},t.fromServerFormat=function(n){for(var r=[],i="",s=0,a=function(){if(i.length===0)throw new H(D.INVALID_ARGUMENT,"Invalid field path ("+n+"). Paths must not be empty, begin with '.', end with '.', or contain '..'");r.push(i),i=""},c=!1;s=2&&this.path.get(this.path.length-2)===t},e.prototype.isEqual=function(t){return t!==null&&Je.comparator(this.path,t.path)===0},e.prototype.toString=function(){return this.path.toString()},e.comparator=function(t,n){return Je.comparator(t.path,n.path)},e.isDocumentKey=function(t){return t.length%2==0},e.fromSegments=function(t){return new e(new Je(t.slice()))},e}();/** + */var de=function(){function e(t){this.path=t}return e.fromPath=function(t){return new e(Xe.fromString(t))},e.fromName=function(t){return new e(Xe.fromString(t).popFirst(5))},e.prototype.hasCollectionId=function(t){return this.path.length>=2&&this.path.get(this.path.length-2)===t},e.prototype.isEqual=function(t){return t!==null&&Xe.comparator(this.path,t.path)===0},e.prototype.toString=function(){return this.path.toString()},e.comparator=function(t,n){return Xe.comparator(t.path,n.path)},e.isDocumentKey=function(t){return t.length%2==0},e.fromSegments=function(t){return new e(new Xe(t.slice()))},e}();/** * @license * Copyright 2020 Google LLC * @@ -1962,7 +1962,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function _a(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?oT(e)?4:10:he()}function ji(e,t){var n=_a(e);if(n!==_a(t))return!1;switch(n){case 0:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return Df(e).isEqual(Df(t));case 3:return function(r,i){if(typeof r.timestampValue=="string"&&typeof i.timestampValue=="string"&&r.timestampValue.length===i.timestampValue.length)return r.timestampValue===i.timestampValue;var s=as(r.timestampValue),a=as(i.timestampValue);return s.seconds===a.seconds&&s.nanos===a.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return function(r,i){return tc(r.bytesValue).isEqual(tc(i.bytesValue))}(e,t);case 7:return e.referenceValue===t.referenceValue;case 8:return function(r,i){return Lt(r.geoPointValue.latitude)===Lt(i.geoPointValue.latitude)&&Lt(r.geoPointValue.longitude)===Lt(i.geoPointValue.longitude)}(e,t);case 2:return function(r,i){if("integerValue"in r&&"integerValue"in i)return Lt(r.integerValue)===Lt(i.integerValue);if("doubleValue"in r&&"doubleValue"in i){var s=Lt(r.doubleValue),a=Lt(i.doubleValue);return s===a?rv(s)===rv(a):isNaN(s)&&isNaN(a)}return!1}(e,t);case 9:return Zu(e.arrayValue.values||[],t.arrayValue.values||[],ji);case 10:return function(r,i){var s=r.mapValue.fields||{},a=i.mapValue.fields||{};if(AR(s)!==AR(a))return!1;for(var c in s)if(s.hasOwnProperty(c)&&(a[c]===void 0||!ji(s[c],a[c])))return!1;return!0}(e,t);default:return he()}}function Mf(e,t){return(e.values||[]).find(function(n){return ji(n,t)})!==void 0}function nc(e,t){var n=_a(e),r=_a(t);if(n!==r)return Ve(n,r);switch(n){case 0:return 0;case 1:return Ve(e.booleanValue,t.booleanValue);case 2:return function(i,s){var a=Lt(i.integerValue||i.doubleValue),c=Lt(s.integerValue||s.doubleValue);return ac?1:a===c?0:isNaN(a)?isNaN(c)?0:-1:1}(e,t);case 3:return kR(e.timestampValue,t.timestampValue);case 4:return kR(Df(e),Df(t));case 5:return Ve(e.stringValue,t.stringValue);case 6:return function(i,s){var a=tc(i),c=tc(s);return a.compareTo(c)}(e.bytesValue,t.bytesValue);case 7:return function(i,s){for(var a=i.split("/"),c=s.split("/"),l=0;lc?1:a===c?0:isNaN(a)?isNaN(c)?0:-1:1}(e,t);case 3:return kR(e.timestampValue,t.timestampValue);case 4:return kR(Mf(e),Mf(t));case 5:return Ve(e.stringValue,t.stringValue);case 6:return function(i,s){var a=tc(i),c=tc(s);return a.compareTo(c)}(e.bytesValue,t.bytesValue);case 7:return function(i,s){for(var a=i.split("/"),c=s.split("/"),l=0;l":return n>0;case">=":return n>=0;default:return he()}},t.prototype.g=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},t}(function(){}),NY=function(e){function t(n,r,i){var s=this;return(s=e.call(this,n,r,i)||this).key=de.fromName(i.referenceValue),s}return te(t,e),t.prototype.matches=function(n){var r=de.comparator(n.key,this.key);return this.m(r)},t}(Ir),xY=function(e){function t(n,r){var i=this;return(i=e.call(this,n,"in",r)||this).keys=JM("in",r),i}return te(t,e),t.prototype.matches=function(n){return this.keys.some(function(r){return r.isEqual(n.key)})},t}(Ir),OY=function(e){function t(n,r){var i=this;return(i=e.call(this,n,"not-in",r)||this).keys=JM("not-in",r),i}return te(t,e),t.prototype.matches=function(n){return!this.keys.some(function(r){return r.isEqual(n.key)})},t}(Ir);function JM(e,t){var n;return(((n=t.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(function(r){return de.fromName(r.referenceValue)})}var PY=function(e){function t(n,r){return e.call(this,n,"array-contains",r)||this}return te(t,e),t.prototype.matches=function(n){var r=n.data.field(this.field);return aT(r)&&Mf(r.arrayValue,this.value)},t}(Ir),DY=function(e){function t(n,r){return e.call(this,n,"in",r)||this}return te(t,e),t.prototype.matches=function(n){var r=n.data.field(this.field);return r!==null&&Mf(this.value.arrayValue,r)},t}(Ir),MY=function(e){function t(n,r){return e.call(this,n,"not-in",r)||this}return te(t,e),t.prototype.matches=function(n){if(Mf(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var r=n.data.field(this.field);return r!==null&&!Mf(this.value.arrayValue,r)},t}(Ir),LY=function(e){function t(n,r){return e.call(this,n,"array-contains-any",r)||this}return te(t,e),t.prototype.matches=function(n){var r=this,i=n.data.field(this.field);return!(!aT(i)||!i.arrayValue.values)&&i.arrayValue.values.some(function(s){return Mf(r.value.arrayValue,s)})},t}(Ir),Lf=function(e,t){this.position=e,this.before=t};function sv(e){return(e.before?"b":"a")+":"+e.position.map(function(t){return sT(t)}).join(",")}var Mu=function(e,t){t===void 0&&(t="asc"),this.field=e,this.dir=t};function FY(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function OR(e,t,n){for(var r=0,i=0;i":return n>0;case">=":return n>=0;default:return he()}},t.prototype.g=function(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0},t}(function(){}),AY=function(e){function t(n,r,i){var s=this;return(s=e.call(this,n,r,i)||this).key=de.fromName(i.referenceValue),s}return te(t,e),t.prototype.matches=function(n){var r=de.comparator(n.key,this.key);return this.m(r)},t}(Ir),kY=function(e){function t(n,r){var i=this;return(i=e.call(this,n,"in",r)||this).keys=JM("in",r),i}return te(t,e),t.prototype.matches=function(n){return this.keys.some(function(r){return r.isEqual(n.key)})},t}(Ir),RY=function(e){function t(n,r){var i=this;return(i=e.call(this,n,"not-in",r)||this).keys=JM("not-in",r),i}return te(t,e),t.prototype.matches=function(n){return!this.keys.some(function(r){return r.isEqual(n.key)})},t}(Ir);function JM(e,t){var n;return(((n=t.arrayValue)===null||n===void 0?void 0:n.values)||[]).map(function(r){return de.fromName(r.referenceValue)})}var NY=function(e){function t(n,r){return e.call(this,n,"array-contains",r)||this}return te(t,e),t.prototype.matches=function(n){var r=n.data.field(this.field);return aT(r)&&Lf(r.arrayValue,this.value)},t}(Ir),xY=function(e){function t(n,r){return e.call(this,n,"in",r)||this}return te(t,e),t.prototype.matches=function(n){var r=n.data.field(this.field);return r!==null&&Lf(this.value.arrayValue,r)},t}(Ir),OY=function(e){function t(n,r){return e.call(this,n,"not-in",r)||this}return te(t,e),t.prototype.matches=function(n){if(Lf(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;var r=n.data.field(this.field);return r!==null&&!Lf(this.value.arrayValue,r)},t}(Ir),PY=function(e){function t(n,r){return e.call(this,n,"array-contains-any",r)||this}return te(t,e),t.prototype.matches=function(n){var r=this,i=n.data.field(this.field);return!(!aT(i)||!i.arrayValue.values)&&i.arrayValue.values.some(function(s){return Lf(r.value.arrayValue,s)})},t}(Ir),Ff=function(e,t){this.position=e,this.before=t};function sv(e){return(e.before?"b":"a")+":"+e.position.map(function(t){return sT(t)}).join(",")}var Mu=function(e,t){t===void 0&&(t="asc"),this.field=e,this.dir=t};function DY(e,t){return e.dir===t.dir&&e.field.isEqual(t.field)}function OR(e,t,n){for(var r=0,i=0;i0?e.explicitOrderBy[0].field:null}function cT(e){for(var t=0,n=e.filters;t0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.p.push(new Mu(fi.keyField(),l))}}}return t.p}function Kr(e){var t=ee(e);if(!t.T)if(t.limitType==="F")t.T=xR(t.path,t.collectionGroup,rc(t),t.filters,t.limit,t.startAt,t.endAt);else{for(var n=[],r=0,i=rc(t);r0&&(n+=", orderBy: ["+t.orderBy.map(function(r){return function(i){return i.field.canonicalString()+" ("+i.dir+")"}(r)}).join(", ")+"]"),t.startAt&&(n+=", startAt: "+sv(t.startAt)),t.endAt&&(n+=", endAt: "+sv(t.endAt)),"Target("+n+")"}(Kr(e))+"; limitType="+e.limitType+")"}function _h(e,t){return t.isFoundDocument()&&function(n,r){var i=r.key.path;return n.collectionGroup!==null?r.key.hasCollectionId(n.collectionGroup)&&n.path.isPrefixOf(i):de.isDocumentKey(n.path)?n.path.isEqual(i):n.path.isImmediateParentOf(i)}(e,t)&&function(n,r){for(var i=0,s=n.explicitOrderBy;i0?e.explicitOrderBy[0].field:null}function cT(e){for(var t=0,n=e.filters;t0?t.explicitOrderBy[t.explicitOrderBy.length-1].dir:"asc";t.p.push(new Mu(fi.keyField(),l))}}}return t.p}function Kr(e){var t=ee(e);if(!t.T)if(t.limitType==="F")t.T=xR(t.path,t.collectionGroup,rc(t),t.filters,t.limit,t.startAt,t.endAt);else{for(var n=[],r=0,i=rc(t);r0&&(n+=", orderBy: ["+t.orderBy.map(function(r){return function(i){return i.field.canonicalString()+" ("+i.dir+")"}(r)}).join(", ")+"]"),t.startAt&&(n+=", startAt: "+sv(t.startAt)),t.endAt&&(n+=", endAt: "+sv(t.endAt)),"Target("+n+")"}(Kr(e))+"; limitType="+e.limitType+")"}function wh(e,t){return t.isFoundDocument()&&function(n,r){var i=r.key.path;return n.collectionGroup!==null?r.key.hasCollectionId(n.collectionGroup)&&n.path.isPrefixOf(i):de.isDocumentKey(n.path)?n.path.isEqual(i):n.path.isImmediateParentOf(i)}(e,t)&&function(n,r){for(var i=0,s=n.explicitOrderBy;i0&&(n=n.right)}return null},e.prototype.indexOf=function(t){for(var n=0,r=this.root;!r.isEmpty();){var i=this.comparator(t,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1},e.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),e.prototype.minKey=function(){return this.root.minKey()},e.prototype.maxKey=function(){return this.root.maxKey()},e.prototype.inorderTraversal=function(t){return this.root.inorderTraversal(t)},e.prototype.forEach=function(t){this.inorderTraversal(function(n,r){return t(n,r),!1})},e.prototype.toString=function(){var t=[];return this.inorderTraversal(function(n,r){return t.push(n+":"+r),!1}),"{"+t.join(", ")+"}"},e.prototype.reverseTraversal=function(t){return this.root.reverseTraversal(t)},e.prototype.getIterator=function(){return new Kd(this.root,null,this.comparator,!1)},e.prototype.getIteratorFrom=function(t){return new Kd(this.root,t,this.comparator,!1)},e.prototype.getReverseIterator=function(){return new Kd(this.root,null,this.comparator,!0)},e.prototype.getReverseIteratorFrom=function(t){return new Kd(this.root,t,this.comparator,!0)},e}(),Kd=function(){function e(t,n,r,i){this.isReverse=i,this.nodeStack=[];for(var s=1;!t.isEmpty();)if(s=n?r(t.key,n):1,i&&(s*=-1),s<0)t=this.isReverse?t.left:t.right;else{if(s===0){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return e.prototype.getNext=function(){var t=this.nodeStack.pop(),n={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return n},e.prototype.hasNext=function(){return this.nodeStack.length>0},e.prototype.peek=function(){if(this.nodeStack.length===0)return null;var t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}},e}(),qo=function(){function e(t,n,r,i,s){this.key=t,this.value=n,this.color=r??e.RED,this.left=i??e.EMPTY,this.right=s??e.EMPTY,this.size=this.left.size+1+this.right.size}return e.prototype.copy=function(t,n,r,i,s){return new e(t??this.key,n??this.value,r??this.color,i??this.left,s??this.right)},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},e.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},e.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},e.prototype.minKey=function(){return this.min().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(t,n,r){var i=this,s=r(t,i.key);return(i=s<0?i.copy(null,null,null,i.left.insert(t,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(t,n,r))).fixUp()},e.prototype.removeMin=function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),(t=t.copy(null,null,null,t.left.removeMin(),null)).fixUp()},e.prototype.remove=function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(t,i.key)===0){if(i.right.isEmpty())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()},e.prototype.isRed=function(){return this.color},e.prototype.fixUp=function(){var t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t},e.prototype.moveRedLeft=function(){var t=this.colorFlip();return t.right.left.isRed()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight())).rotateLeft()).colorFlip()),t},e.prototype.moveRedRight=function(){var t=this.colorFlip();return t.left.left.isRed()&&(t=(t=t.rotateRight()).colorFlip()),t},e.prototype.rotateLeft=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip=function(){var t=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,n)},e.prototype.checkMaxDepth=function(){var t=this.check();return Math.pow(2,t)<=this.size+1},e.prototype.check=function(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw he();var t=this.left.check();if(t!==this.right.check())throw he();return t+(this.isRed()?0:1)},e}();qo.EMPTY=null,qo.RED=!0,qo.BLACK=!1,qo.EMPTY=new(function(){function e(){this.size=0}return Object.defineProperty(e.prototype,"key",{get:function(){throw he()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){throw he()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){throw he()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){throw he()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){throw he()},enumerable:!1,configurable:!0}),e.prototype.copy=function(t,n,r,i,s){return this},e.prototype.insert=function(t,n,r){return new qo(t,n)},e.prototype.remove=function(t,n){return this},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(t){return!1},e.prototype.reverseTraversal=function(t){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.isRed=function(){return!1},e.prototype.checkMaxDepth=function(){return!0},e.prototype.check=function(){return 0},e}());/** + */var Pn=function(){function e(t,n){this.comparator=t,this.root=n||Bo.EMPTY}return e.prototype.insert=function(t,n){return new e(this.comparator,this.root.insert(t,n,this.comparator).copy(null,null,Bo.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.comparator,this.root.remove(t,this.comparator).copy(null,null,Bo.BLACK,null,null))},e.prototype.get=function(t){for(var n=this.root;!n.isEmpty();){var r=this.comparator(t,n.key);if(r===0)return n.value;r<0?n=n.left:r>0&&(n=n.right)}return null},e.prototype.indexOf=function(t){for(var n=0,r=this.root;!r.isEmpty();){var i=this.comparator(t,r.key);if(i===0)return n+r.left.size;i<0?r=r.left:(n+=r.left.size+1,r=r.right)}return-1},e.prototype.isEmpty=function(){return this.root.isEmpty()},Object.defineProperty(e.prototype,"size",{get:function(){return this.root.size},enumerable:!1,configurable:!0}),e.prototype.minKey=function(){return this.root.minKey()},e.prototype.maxKey=function(){return this.root.maxKey()},e.prototype.inorderTraversal=function(t){return this.root.inorderTraversal(t)},e.prototype.forEach=function(t){this.inorderTraversal(function(n,r){return t(n,r),!1})},e.prototype.toString=function(){var t=[];return this.inorderTraversal(function(n,r){return t.push(n+":"+r),!1}),"{"+t.join(", ")+"}"},e.prototype.reverseTraversal=function(t){return this.root.reverseTraversal(t)},e.prototype.getIterator=function(){return new Wd(this.root,null,this.comparator,!1)},e.prototype.getIteratorFrom=function(t){return new Wd(this.root,t,this.comparator,!1)},e.prototype.getReverseIterator=function(){return new Wd(this.root,null,this.comparator,!0)},e.prototype.getReverseIteratorFrom=function(t){return new Wd(this.root,t,this.comparator,!0)},e}(),Wd=function(){function e(t,n,r,i){this.isReverse=i,this.nodeStack=[];for(var s=1;!t.isEmpty();)if(s=n?r(t.key,n):1,i&&(s*=-1),s<0)t=this.isReverse?t.left:t.right;else{if(s===0){this.nodeStack.push(t);break}this.nodeStack.push(t),t=this.isReverse?t.right:t.left}}return e.prototype.getNext=function(){var t=this.nodeStack.pop(),n={key:t.key,value:t.value};if(this.isReverse)for(t=t.left;!t.isEmpty();)this.nodeStack.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.nodeStack.push(t),t=t.left;return n},e.prototype.hasNext=function(){return this.nodeStack.length>0},e.prototype.peek=function(){if(this.nodeStack.length===0)return null;var t=this.nodeStack[this.nodeStack.length-1];return{key:t.key,value:t.value}},e}(),Bo=function(){function e(t,n,r,i,s){this.key=t,this.value=n,this.color=r??e.RED,this.left=i??e.EMPTY,this.right=s??e.EMPTY,this.size=this.left.size+1+this.right.size}return e.prototype.copy=function(t,n,r,i,s){return new e(t??this.key,n??this.value,r??this.color,i??this.left,s??this.right)},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(t){return this.left.inorderTraversal(t)||t(this.key,this.value)||this.right.inorderTraversal(t)},e.prototype.reverseTraversal=function(t){return this.right.reverseTraversal(t)||t(this.key,this.value)||this.left.reverseTraversal(t)},e.prototype.min=function(){return this.left.isEmpty()?this:this.left.min()},e.prototype.minKey=function(){return this.min().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(t,n,r){var i=this,s=r(t,i.key);return(i=s<0?i.copy(null,null,null,i.left.insert(t,n,r),null):s===0?i.copy(null,n,null,null,null):i.copy(null,null,null,null,i.right.insert(t,n,r))).fixUp()},e.prototype.removeMin=function(){if(this.left.isEmpty())return e.EMPTY;var t=this;return t.left.isRed()||t.left.left.isRed()||(t=t.moveRedLeft()),(t=t.copy(null,null,null,t.left.removeMin(),null)).fixUp()},e.prototype.remove=function(t,n){var r,i=this;if(n(t,i.key)<0)i.left.isEmpty()||i.left.isRed()||i.left.left.isRed()||(i=i.moveRedLeft()),i=i.copy(null,null,null,i.left.remove(t,n),null);else{if(i.left.isRed()&&(i=i.rotateRight()),i.right.isEmpty()||i.right.isRed()||i.right.left.isRed()||(i=i.moveRedRight()),n(t,i.key)===0){if(i.right.isEmpty())return e.EMPTY;r=i.right.min(),i=i.copy(r.key,r.value,null,null,i.right.removeMin())}i=i.copy(null,null,null,null,i.right.remove(t,n))}return i.fixUp()},e.prototype.isRed=function(){return this.color},e.prototype.fixUp=function(){var t=this;return t.right.isRed()&&!t.left.isRed()&&(t=t.rotateLeft()),t.left.isRed()&&t.left.left.isRed()&&(t=t.rotateRight()),t.left.isRed()&&t.right.isRed()&&(t=t.colorFlip()),t},e.prototype.moveRedLeft=function(){var t=this.colorFlip();return t.right.left.isRed()&&(t=(t=(t=t.copy(null,null,null,null,t.right.rotateRight())).rotateLeft()).colorFlip()),t},e.prototype.moveRedRight=function(){var t=this.colorFlip();return t.left.left.isRed()&&(t=(t=t.rotateRight()).colorFlip()),t},e.prototype.rotateLeft=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.rotateRight=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.colorFlip=function(){var t=this.left.copy(null,null,!this.left.color,null,null),n=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,t,n)},e.prototype.checkMaxDepth=function(){var t=this.check();return Math.pow(2,t)<=this.size+1},e.prototype.check=function(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw he();var t=this.left.check();if(t!==this.right.check())throw he();return t+(this.isRed()?0:1)},e}();Bo.EMPTY=null,Bo.RED=!0,Bo.BLACK=!1,Bo.EMPTY=new(function(){function e(){this.size=0}return Object.defineProperty(e.prototype,"key",{get:function(){throw he()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){throw he()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"color",{get:function(){throw he()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){throw he()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){throw he()},enumerable:!1,configurable:!0}),e.prototype.copy=function(t,n,r,i,s){return this},e.prototype.insert=function(t,n,r){return new Bo(t,n)},e.prototype.remove=function(t,n){return this},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(t){return!1},e.prototype.reverseTraversal=function(t){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.isRed=function(){return!1},e.prototype.checkMaxDepth=function(){return!0},e.prototype.check=function(){return 0},e}());/** * @license * Copyright 2017 Google LLC * @@ -2082,7 +2082,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var zt=function(){function e(t){this.comparator=t,this.data=new Dn(this.comparator)}return e.prototype.has=function(t){return this.data.get(t)!==null},e.prototype.first=function(){return this.data.minKey()},e.prototype.last=function(){return this.data.maxKey()},Object.defineProperty(e.prototype,"size",{get:function(){return this.data.size},enumerable:!1,configurable:!0}),e.prototype.indexOf=function(t){return this.data.indexOf(t)},e.prototype.forEach=function(t){this.data.inorderTraversal(function(n,r){return t(n),!1})},e.prototype.forEachInRange=function(t,n){for(var r=this.data.getIteratorFrom(t[0]);r.hasNext();){var i=r.getNext();if(this.comparator(i.key,t[1])>=0)return;n(i.key)}},e.prototype.forEachWhile=function(t,n){var r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!t(r.getNext().key))return},e.prototype.firstAfterOrEqual=function(t){var n=this.data.getIteratorFrom(t);return n.hasNext()?n.getNext().key:null},e.prototype.getIterator=function(){return new jR(this.data.getIterator())},e.prototype.getIteratorFrom=function(t){return new jR(this.data.getIteratorFrom(t))},e.prototype.add=function(t){return this.copy(this.data.remove(t).insert(t,!0))},e.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},e.prototype.isEmpty=function(){return this.data.isEmpty()},e.prototype.unionWith=function(t){var n=this;return n.size=0)return;n(i.key)}},e.prototype.forEachWhile=function(t,n){var r;for(r=n!==void 0?this.data.getIteratorFrom(n):this.data.getIterator();r.hasNext();)if(!t(r.getNext().key))return},e.prototype.firstAfterOrEqual=function(t){var n=this.data.getIteratorFrom(t);return n.hasNext()?n.getNext().key:null},e.prototype.getIterator=function(){return new jR(this.data.getIterator())},e.prototype.getIteratorFrom=function(t){return new jR(this.data.getIteratorFrom(t))},e.prototype.add=function(t){return this.copy(this.data.remove(t).insert(t,!0))},e.prototype.delete=function(t){return this.has(t)?this.copy(this.data.remove(t)):this},e.prototype.isEmpty=function(){return this.data.isEmpty()},e.prototype.unionWith=function(t){var n=this;return n.size0&&(this.k=!0,this.C=t)},e.prototype.M=function(){var t=ot(),n=ot(),r=ot();return this.D.forEach(function(i,s){switch(s){case 0:t=t.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:he()}}),new dT(this.C,this.N,t,n,r)},e.prototype.L=function(){this.k=!1,this.D=qR()},e.prototype.B=function(t,n){this.k=!0,this.D=this.D.insert(t,n)},e.prototype.q=function(t){this.k=!0,this.D=this.D.remove(t)},e.prototype.U=function(){this.S+=1},e.prototype.K=function(){this.S-=1},e.prototype.j=function(){this.k=!0,this.N=!0},e}(),YY=function(){function e(t){this.W=t,this.G=new Map,this.H=qr(),this.J=BR(),this.Y=new zt(Ve)}return e.prototype.X=function(t){for(var n=0,r=t.v;n0?t.targetIds.forEach(n):this.G.forEach(function(i,s){r.st(s)&&n(s)})},e.prototype.rt=function(t){var n=t.targetId,r=t.V.count,i=this.ot(n);if(i){var s=i.target;if(ov(s))if(r===0){var a=new de(s.path);this.tt(n,a,bn.newNoDocument(a,De.min()))}else be(r===1);else this.ct(n)!==r&&(this.it(n),this.Y=this.Y.add(n))}},e.prototype.ut=function(t){var n=this,r=new Map;this.G.forEach(function(a,c){var l=n.ot(c);if(l){if(a.current&&ov(l.target)){var h=new de(l.target.path);n.H.get(h)!==null||n.at(c,h)||n.tt(c,h,bn.newNoDocument(h,t))}a.$&&(r.set(c,a.M()),a.L())}});var i=ot();this.J.forEach(function(a,c){var l=!0;c.forEachWhile(function(h){var d=n.ot(h);return!d||d.purpose===2||(l=!1,!1)}),l&&(i=i.add(a))});var s=new hT(t,r,this.Y,this.H,i);return this.H=qr(),this.J=BR(),this.Y=new zt(Ve),s},e.prototype.Z=function(t,n){if(this.st(t)){var r=this.at(t,n.key)?2:0;this.nt(t).B(n.key,r),this.H=this.H.insert(n.key,n),this.J=this.J.insert(n.key,this.ht(n.key).add(t))}},e.prototype.tt=function(t,n,r){if(this.st(t)){var i=this.nt(t);this.at(t,n)?i.B(n,1):i.q(n),this.J=this.J.insert(n,this.ht(n).delete(t)),r&&(this.H=this.H.insert(n,r))}},e.prototype.removeTarget=function(t){this.G.delete(t)},e.prototype.ct=function(t){var n=this.nt(t).M();return this.W.getRemoteKeysForTarget(t).size+n.addedDocuments.size-n.removedDocuments.size},e.prototype.U=function(t){this.nt(t).U()},e.prototype.nt=function(t){var n=this.G.get(t);return n||(n=new VR,this.G.set(t,n)),n},e.prototype.ht=function(t){var n=this.J.get(t);return n||(n=new zt(Ve),this.J=this.J.insert(t,n)),n},e.prototype.st=function(t){var n=this.ot(t)!==null;return n||Y("WatchChangeAggregator","Detected inactive target",t),n},e.prototype.ot=function(t){var n=this.G.get(t);return n&&n.F?null:this.W.lt(t)},e.prototype.it=function(t){var n=this;this.G.set(t,new VR),this.W.getRemoteKeysForTarget(t).forEach(function(r){n.tt(t,r,null)})},e.prototype.at=function(t,n){return this.W.getRemoteKeysForTarget(t).has(n)},e}();function BR(){return new Dn(de.comparator)}function qR(){return new Dn(de.comparator)}/** + */var hT=function(){function e(t,n,r,i,s){this.snapshotVersion=t,this.targetChanges=n,this.targetMismatches=r,this.documentUpdates=i,this.resolvedLimboDocuments=s}return e.createSynthesizedRemoteEventForCurrentChange=function(t,n){var r=new Map;return r.set(t,dT.createSynthesizedTargetChangeForCurrentChange(t,n)),new e(De.min(),r,kg(),qr(),ot())},e}(),dT=function(){function e(t,n,r,i,s){this.resumeToken=t,this.current=n,this.addedDocuments=r,this.modifiedDocuments=i,this.removedDocuments=s}return e.createSynthesizedTargetChangeForCurrentChange=function(t,n){return new e(zn.EMPTY_BYTE_STRING,n,ot(),ot(),ot())},e}(),vp=function(e,t,n,r){this.v=e,this.removedTargetIds=t,this.key=n,this.P=r},pL=function(e,t){this.targetId=e,this.V=t},vL=function(e,t,n,r){n===void 0&&(n=zn.EMPTY_BYTE_STRING),r===void 0&&(r=null),this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r},VR=function(){function e(){this.S=0,this.D=qR(),this.C=zn.EMPTY_BYTE_STRING,this.N=!1,this.k=!0}return Object.defineProperty(e.prototype,"current",{get:function(){return this.N},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resumeToken",{get:function(){return this.C},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"F",{get:function(){return this.S!==0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"$",{get:function(){return this.k},enumerable:!1,configurable:!0}),e.prototype.O=function(t){t.approximateByteSize()>0&&(this.k=!0,this.C=t)},e.prototype.M=function(){var t=ot(),n=ot(),r=ot();return this.D.forEach(function(i,s){switch(s){case 0:t=t.add(i);break;case 2:n=n.add(i);break;case 1:r=r.add(i);break;default:he()}}),new dT(this.C,this.N,t,n,r)},e.prototype.L=function(){this.k=!1,this.D=qR()},e.prototype.B=function(t,n){this.k=!0,this.D=this.D.insert(t,n)},e.prototype.q=function(t){this.k=!0,this.D=this.D.remove(t)},e.prototype.U=function(){this.S+=1},e.prototype.K=function(){this.S-=1},e.prototype.j=function(){this.k=!0,this.N=!0},e}(),GY=function(){function e(t){this.W=t,this.G=new Map,this.H=qr(),this.J=BR(),this.Y=new zt(Ve)}return e.prototype.X=function(t){for(var n=0,r=t.v;n0?t.targetIds.forEach(n):this.G.forEach(function(i,s){r.st(s)&&n(s)})},e.prototype.rt=function(t){var n=t.targetId,r=t.V.count,i=this.ot(n);if(i){var s=i.target;if(ov(s))if(r===0){var a=new de(s.path);this.tt(n,a,bn.newNoDocument(a,De.min()))}else be(r===1);else this.ct(n)!==r&&(this.it(n),this.Y=this.Y.add(n))}},e.prototype.ut=function(t){var n=this,r=new Map;this.G.forEach(function(a,c){var l=n.ot(c);if(l){if(a.current&&ov(l.target)){var h=new de(l.target.path);n.H.get(h)!==null||n.at(c,h)||n.tt(c,h,bn.newNoDocument(h,t))}a.$&&(r.set(c,a.M()),a.L())}});var i=ot();this.J.forEach(function(a,c){var l=!0;c.forEachWhile(function(h){var d=n.ot(h);return!d||d.purpose===2||(l=!1,!1)}),l&&(i=i.add(a))});var s=new hT(t,r,this.Y,this.H,i);return this.H=qr(),this.J=BR(),this.Y=new zt(Ve),s},e.prototype.Z=function(t,n){if(this.st(t)){var r=this.at(t,n.key)?2:0;this.nt(t).B(n.key,r),this.H=this.H.insert(n.key,n),this.J=this.J.insert(n.key,this.ht(n.key).add(t))}},e.prototype.tt=function(t,n,r){if(this.st(t)){var i=this.nt(t);this.at(t,n)?i.B(n,1):i.q(n),this.J=this.J.insert(n,this.ht(n).delete(t)),r&&(this.H=this.H.insert(n,r))}},e.prototype.removeTarget=function(t){this.G.delete(t)},e.prototype.ct=function(t){var n=this.nt(t).M();return this.W.getRemoteKeysForTarget(t).size+n.addedDocuments.size-n.removedDocuments.size},e.prototype.U=function(t){this.nt(t).U()},e.prototype.nt=function(t){var n=this.G.get(t);return n||(n=new VR,this.G.set(t,n)),n},e.prototype.ht=function(t){var n=this.J.get(t);return n||(n=new zt(Ve),this.J=this.J.insert(t,n)),n},e.prototype.st=function(t){var n=this.ot(t)!==null;return n||Y("WatchChangeAggregator","Detected inactive target",t),n},e.prototype.ot=function(t){var n=this.G.get(t);return n&&n.F?null:this.W.lt(t)},e.prototype.it=function(t){var n=this;this.G.set(t,new VR),this.W.getRemoteKeysForTarget(t).forEach(function(r){n.tt(t,r,null)})},e.prototype.at=function(t,n){return this.W.getRemoteKeysForTarget(t).has(n)},e}();function BR(){return new Pn(de.comparator)}function qR(){return new Pn(de.comparator)}/** * @license * Copyright 2017 Google LLC * @@ -2112,7 +2112,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var XY={asc:"ASCENDING",desc:"DESCENDING"},JY={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},ZY=function(e,t){this.databaseId=e,this.I=t};function Ff(e,t){return e.I?new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+t.nanoseconds).slice(-9)+"Z":{seconds:""+t.seconds,nanos:t.nanoseconds}}function gL(e,t){return e.I?t.toBase64():t.toUint8Array()}function e8(e,t){return Ff(e,t.toTimestamp())}function sn(e){return be(!!e),De.fromTimestamp(function(t){var n=as(t);return new lr(n.seconds,n.nanos)}(e))}function pT(e,t){return function(n){return new Je(["projects",n.projectId,"databases",n.database])}(e).child("documents").child(t).canonicalString()}function mL(e){var t=Je.fromString(e);return be(SL(t)),t}function Uf(e,t){return pT(e.databaseId,t.path)}function xi(e,t){var n=mL(t);if(n.get(1)!==e.databaseId.projectId)throw new H(D.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new H(D.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new de(_L(n))}function qb(e,t){return pT(e.databaseId,t)}function yL(e){var t=mL(e);return t.length===4?Je.emptyPath():_L(t)}function jf(e){return new Je(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function _L(e){return be(e.length>4&&e.get(4)==="documents"),e.popFirst(5)}function $R(e,t,n){return{name:Uf(e,t),fields:n.value.mapValue.fields}}function wL(e,t,n){var r=xi(e,t.name),i=sn(t.updateTime),s=new Er({mapValue:{fields:t.fields}}),a=bn.newFoundDocument(r,i,s);return n&&a.setHasCommittedMutations(),n?a.setHasCommittedMutations():a}function uv(e,t){var n;if(t instanceof bh)n={update:$R(e,t.key,t.value)};else if(t instanceof Eh)n={delete:Uf(e,t.key)};else if(t instanceof hs)n={update:$R(e,t.key,t.data),updateMask:o8(t.fieldMask)};else{if(!(t instanceof fT))return he();n={verify:Uf(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map(function(r){return function(i,s){var a=s.transform;if(a instanceof ic)return{fieldPath:s.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof wa)return{fieldPath:s.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof ba)return{fieldPath:s.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof oc)return{fieldPath:s.field.canonicalString(),increment:a.A};throw he()}(0,r)})),t.precondition.isNone||(n.currentDocument=function(r,i){return i.updateTime!==void 0?{updateTime:e8(r,i.updateTime)}:i.exists!==void 0?{exists:i.exists}:he()}(e,t.precondition)),n}function HR(e,t){var n=t.currentDocument?function(h){return h.updateTime!==void 0?kn.updateTime(sn(h.updateTime)):h.exists!==void 0?kn.exists(h.exists):kn.none()}(t.currentDocument):kn.none(),r=t.updateTransforms?t.updateTransforms.map(function(h){return function(d,v){var g=null;if("setToServerValue"in v)be(v.setToServerValue==="REQUEST_TIME"),g=new ic;else if("appendMissingElements"in v){var y=v.appendMissingElements.values||[];g=new wa(y)}else if("removeAllFromArray"in v){var _=v.removeAllFromArray.values||[];g=new ba(_)}else"increment"in v?g=new oc(d,v.increment):he();var b=fi.fromServerFormat(v.fieldPath);return new wh(b,g)}(e,h)}):[];if(t.update){t.update.name;var i=xi(e,t.update.name),s=new Er({mapValue:{fields:t.update.fields}});if(t.updateMask){var a=function(h){var d=h.fieldPaths||[];return new ec(d.map(function(v){return fi.fromServerFormat(v)}))}(t.updateMask);return new hs(i,s,a,n,r)}return new bh(i,s,n,r)}if(t.delete){var c=xi(e,t.delete);return new Eh(c,n)}if(t.verify){var l=xi(e,t.verify);return new fT(l,n)}return he()}function bL(e,t){return{documents:[qb(e,t.path)]}}function EL(e,t){var n={structuredQuery:{}},r=t.path;t.collectionGroup!==null?(n.parent=qb(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=qb(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(c){if(c.length!==0){var l=c.map(function(h){return function(d){if(d.op==="=="){if(NR(d.value))return{unaryFilter:{field:gu(d.field),op:"IS_NAN"}};if(RR(d.value))return{unaryFilter:{field:gu(d.field),op:"IS_NULL"}}}else if(d.op==="!="){if(NR(d.value))return{unaryFilter:{field:gu(d.field),op:"IS_NOT_NAN"}};if(RR(d.value))return{unaryFilter:{field:gu(d.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:gu(d.field),op:n8(d.op),value:d.value}}}(h)});return l.length===1?l[0]:{compositeFilter:{op:"AND",filters:l}}}}(t.filters);i&&(n.structuredQuery.where=i);var s=function(c){if(c.length!==0)return c.map(function(l){return function(h){return{field:gu(h.field),direction:t8(h.dir)}}(l)})}(t.orderBy);s&&(n.structuredQuery.orderBy=s);var a=function(c,l){return c.I||Ma(l)?l:{value:l}}(e,t.limit);return a!==null&&(n.structuredQuery.limit=a),t.startAt&&(n.structuredQuery.startAt=KR(t.startAt)),t.endAt&&(n.structuredQuery.endAt=KR(t.endAt)),n}function TL(e){var t=yL(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){be(r===1);var s=n.from[0];s.allDescendants?i=s.collectionId:t=t.child(s.collectionId)}var a=[];n.where&&(a=IL(n.where));var c=[];n.orderBy&&(c=n.orderBy.map(function(v){return function(g){return new Mu(Cu(g.field),function(y){switch(y){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(g.direction))}(v)}));var l=null;n.limit&&(l=function(v){var g;return Ma(g=typeof v=="object"?v.value:v)?null:g}(n.limit));var h=null;n.startAt&&(h=WR(n.startAt));var d=null;return n.endAt&&(d=WR(n.endAt)),ZM(t,i,c,a,l,"F",h,d)}function IL(e){return e?e.unaryFilter!==void 0?[i8(e)]:e.fieldFilter!==void 0?[r8(e)]:e.compositeFilter!==void 0?e.compositeFilter.filters.map(function(t){return IL(t)}).reduce(function(t,n){return t.concat(n)}):he():[]}function KR(e){return{before:e.before,values:e.position}}function WR(e){var t=!!e.before,n=e.values||[];return new Lf(n,t)}function t8(e){return XY[e]}function n8(e){return JY[e]}function gu(e){return{fieldPath:e.canonicalString()}}function Cu(e){return fi.fromServerFormat(e.fieldPath)}function r8(e){return Ir.create(Cu(e.fieldFilter.field),function(t){switch(t){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return he()}}(e.fieldFilter.op),e.fieldFilter.value)}function i8(e){switch(e.unaryFilter.op){case"IS_NAN":var t=Cu(e.unaryFilter.field);return Ir.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=Cu(e.unaryFilter.field);return Ir.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Cu(e.unaryFilter.field);return Ir.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Cu(e.unaryFilter.field);return Ir.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return he()}}function o8(e){var t=[];return e.fields.forEach(function(n){return t.push(n.canonicalString())}),{fieldPaths:t}}function SL(e){return e.length>=4&&e.get(0)==="projects"&&e.get(2)==="databases"}/** + */var zY={asc:"ASCENDING",desc:"DESCENDING"},QY={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},YY=function(e,t){this.databaseId=e,this.I=t};function Uf(e,t){return e.I?new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")+"."+("000000000"+t.nanoseconds).slice(-9)+"Z":{seconds:""+t.seconds,nanos:t.nanoseconds}}function gL(e,t){return e.I?t.toBase64():t.toUint8Array()}function XY(e,t){return Uf(e,t.toTimestamp())}function on(e){return be(!!e),De.fromTimestamp(function(t){var n=as(t);return new cr(n.seconds,n.nanos)}(e))}function pT(e,t){return function(n){return new Xe(["projects",n.projectId,"databases",n.database])}(e).child("documents").child(t).canonicalString()}function mL(e){var t=Xe.fromString(e);return be(SL(t)),t}function jf(e,t){return pT(e.databaseId,t.path)}function xi(e,t){var n=mL(t);if(n.get(1)!==e.databaseId.projectId)throw new H(D.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new H(D.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new de(_L(n))}function qb(e,t){return pT(e.databaseId,t)}function yL(e){var t=mL(e);return t.length===4?Xe.emptyPath():_L(t)}function Vf(e){return new Xe(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function _L(e){return be(e.length>4&&e.get(4)==="documents"),e.popFirst(5)}function $R(e,t,n){return{name:jf(e,t),fields:n.value.mapValue.fields}}function wL(e,t,n){var r=xi(e,t.name),i=on(t.updateTime),s=new br({mapValue:{fields:t.fields}}),a=bn.newFoundDocument(r,i,s);return n&&a.setHasCommittedMutations(),n?a.setHasCommittedMutations():a}function uv(e,t){var n;if(t instanceof Eh)n={update:$R(e,t.key,t.value)};else if(t instanceof Th)n={delete:jf(e,t.key)};else if(t instanceof hs)n={update:$R(e,t.key,t.data),updateMask:n8(t.fieldMask)};else{if(!(t instanceof fT))return he();n={verify:jf(e,t.key)}}return t.fieldTransforms.length>0&&(n.updateTransforms=t.fieldTransforms.map(function(r){return function(i,s){var a=s.transform;if(a instanceof ic)return{fieldPath:s.field.canonicalString(),setToServerValue:"REQUEST_TIME"};if(a instanceof wa)return{fieldPath:s.field.canonicalString(),appendMissingElements:{values:a.elements}};if(a instanceof ba)return{fieldPath:s.field.canonicalString(),removeAllFromArray:{values:a.elements}};if(a instanceof oc)return{fieldPath:s.field.canonicalString(),increment:a.A};throw he()}(0,r)})),t.precondition.isNone||(n.currentDocument=function(r,i){return i.updateTime!==void 0?{updateTime:XY(r,i.updateTime)}:i.exists!==void 0?{exists:i.exists}:he()}(e,t.precondition)),n}function HR(e,t){var n=t.currentDocument?function(h){return h.updateTime!==void 0?An.updateTime(on(h.updateTime)):h.exists!==void 0?An.exists(h.exists):An.none()}(t.currentDocument):An.none(),r=t.updateTransforms?t.updateTransforms.map(function(h){return function(d,v){var g=null;if("setToServerValue"in v)be(v.setToServerValue==="REQUEST_TIME"),g=new ic;else if("appendMissingElements"in v){var y=v.appendMissingElements.values||[];g=new wa(y)}else if("removeAllFromArray"in v){var _=v.removeAllFromArray.values||[];g=new ba(_)}else"increment"in v?g=new oc(d,v.increment):he();var b=fi.fromServerFormat(v.fieldPath);return new bh(b,g)}(e,h)}):[];if(t.update){t.update.name;var i=xi(e,t.update.name),s=new br({mapValue:{fields:t.update.fields}});if(t.updateMask){var a=function(h){var d=h.fieldPaths||[];return new ec(d.map(function(v){return fi.fromServerFormat(v)}))}(t.updateMask);return new hs(i,s,a,n,r)}return new Eh(i,s,n,r)}if(t.delete){var c=xi(e,t.delete);return new Th(c,n)}if(t.verify){var l=xi(e,t.verify);return new fT(l,n)}return he()}function bL(e,t){return{documents:[qb(e,t.path)]}}function EL(e,t){var n={structuredQuery:{}},r=t.path;t.collectionGroup!==null?(n.parent=qb(e,r),n.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(n.parent=qb(e,r.popLast()),n.structuredQuery.from=[{collectionId:r.lastSegment()}]);var i=function(c){if(c.length!==0){var l=c.map(function(h){return function(d){if(d.op==="=="){if(NR(d.value))return{unaryFilter:{field:gu(d.field),op:"IS_NAN"}};if(RR(d.value))return{unaryFilter:{field:gu(d.field),op:"IS_NULL"}}}else if(d.op==="!="){if(NR(d.value))return{unaryFilter:{field:gu(d.field),op:"IS_NOT_NAN"}};if(RR(d.value))return{unaryFilter:{field:gu(d.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:gu(d.field),op:ZY(d.op),value:d.value}}}(h)});return l.length===1?l[0]:{compositeFilter:{op:"AND",filters:l}}}}(t.filters);i&&(n.structuredQuery.where=i);var s=function(c){if(c.length!==0)return c.map(function(l){return function(h){return{field:gu(h.field),direction:JY(h.dir)}}(l)})}(t.orderBy);s&&(n.structuredQuery.orderBy=s);var a=function(c,l){return c.I||Ma(l)?l:{value:l}}(e,t.limit);return a!==null&&(n.structuredQuery.limit=a),t.startAt&&(n.structuredQuery.startAt=KR(t.startAt)),t.endAt&&(n.structuredQuery.endAt=KR(t.endAt)),n}function TL(e){var t=yL(e.parent),n=e.structuredQuery,r=n.from?n.from.length:0,i=null;if(r>0){be(r===1);var s=n.from[0];s.allDescendants?i=s.collectionId:t=t.child(s.collectionId)}var a=[];n.where&&(a=IL(n.where));var c=[];n.orderBy&&(c=n.orderBy.map(function(v){return function(g){return new Mu(Cu(g.field),function(y){switch(y){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(g.direction))}(v)}));var l=null;n.limit&&(l=function(v){var g;return Ma(g=typeof v=="object"?v.value:v)?null:g}(n.limit));var h=null;n.startAt&&(h=WR(n.startAt));var d=null;return n.endAt&&(d=WR(n.endAt)),ZM(t,i,c,a,l,"F",h,d)}function IL(e){return e?e.unaryFilter!==void 0?[t8(e)]:e.fieldFilter!==void 0?[e8(e)]:e.compositeFilter!==void 0?e.compositeFilter.filters.map(function(t){return IL(t)}).reduce(function(t,n){return t.concat(n)}):he():[]}function KR(e){return{before:e.before,values:e.position}}function WR(e){var t=!!e.before,n=e.values||[];return new Ff(n,t)}function JY(e){return zY[e]}function ZY(e){return QY[e]}function gu(e){return{fieldPath:e.canonicalString()}}function Cu(e){return fi.fromServerFormat(e.fieldPath)}function e8(e){return Ir.create(Cu(e.fieldFilter.field),function(t){switch(t){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";case"OPERATOR_UNSPECIFIED":default:return he()}}(e.fieldFilter.op),e.fieldFilter.value)}function t8(e){switch(e.unaryFilter.op){case"IS_NAN":var t=Cu(e.unaryFilter.field);return Ir.create(t,"==",{doubleValue:NaN});case"IS_NULL":var n=Cu(e.unaryFilter.field);return Ir.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":var r=Cu(e.unaryFilter.field);return Ir.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":var i=Cu(e.unaryFilter.field);return Ir.create(i,"!=",{nullValue:"NULL_VALUE"});case"OPERATOR_UNSPECIFIED":default:return he()}}function n8(e){var t=[];return e.fields.forEach(function(n){return t.push(n.canonicalString())}),{fieldPaths:t}}function SL(e){return e.length>=4&&e.get(0)==="projects"&&e.get(2)==="databases"}/** * @license * Copyright 2017 Google LLC * @@ -2127,7 +2127,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function li(e){for(var t="",n=0;n0&&(t=GR(t)),t=s8(e.get(n),t);return GR(t)}function s8(e,t){for(var n=t,r=e.length,i=0;i=2),t===2)return be(e.charAt(0)===""&&e.charAt(1)===""),Je.emptyPath();for(var n=t-2,r=[],i="",s=0;sn)&&he(),e.charAt(a+1)){case"":var c=e.substring(s,a),l=void 0;i.length===0?l=c:(l=i+=c,i=""),r.push(l);break;case"":i+=e.substring(s,a),i+="\0";break;case"":i+=e.substring(s,a+1);break;default:he()}s=a+2}return new Je(r)}/** + */function li(e){for(var t="",n=0;n0&&(t=GR(t)),t=r8(e.get(n),t);return GR(t)}function r8(e,t){for(var n=t,r=e.length,i=0;i=2),t===2)return be(e.charAt(0)===""&&e.charAt(1)===""),Xe.emptyPath();for(var n=t-2,r=[],i="",s=0;sn)&&he(),e.charAt(a+1)){case"":var c=e.substring(s,a),l=void 0;i.length===0?l=c:(l=i+=c,i=""),r.push(l);break;case"":i+=e.substring(s,a),i+="\0";break;case"":i+=e.substring(s,a+1);break;default:he()}s=a+2}return new Xe(r)}/** * @license * Copyright 2017 Google LLC * @@ -2142,7 +2142,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var a8=function(e,t){this.seconds=e,this.nanoseconds=t},wr=function(e,t,n){this.ownerId=e,this.allowTabSynchronization=t,this.leaseTimestampMs=n};wr.store="owner",wr.key="owner";var Xo=function(e,t,n){this.userId=e,this.lastAcknowledgedBatchId=t,this.lastStreamToken=n};Xo.store="mutationQueues",Xo.keyPath="userId";var vt=function(e,t,n,r,i){this.userId=e,this.batchId=t,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};vt.store="mutations",vt.keyPath="batchId",vt.userMutationsIndex="userMutationsIndex",vt.userMutationsKeyPath=["userId","batchId"];var Cn=function(){function e(){}return e.prefixForUser=function(t){return[t]},e.prefixForPath=function(t,n){return[t,li(n)]},e.key=function(t,n,r){return[t,li(n),r]},e}();Cn.store="documentMutations",Cn.PLACEHOLDER=new Cn;var u8=function(e,t){this.path=e,this.readTime=t},c8=function(e,t){this.path=e,this.version=t},At=function(e,t,n,r,i,s){this.unknownDocument=e,this.noDocument=t,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=s};At.store="remoteDocuments",At.readTimeIndex="readTimeIndex",At.readTimeIndexPath="readTime",At.collectionReadTimeIndex="collectionReadTimeIndex",At.collectionReadTimeIndexPath=["parentPath","readTime"];var ki=function(e){this.byteSize=e};ki.store="remoteDocumentGlobal",ki.key="remoteDocumentGlobalKey";var sr=function(e,t,n,r,i,s,a){this.targetId=e,this.canonicalId=t,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=s,this.query=a};sr.store="targets",sr.keyPath="targetId",sr.queryTargetsIndexName="queryTargetsIndex",sr.queryTargetsKeyPath=["canonicalId","targetId"];var mn=function(e,t,n){this.targetId=e,this.path=t,this.sequenceNumber=n};mn.store="targetDocuments",mn.keyPath=["targetId","path"],mn.documentTargetsIndex="documentTargetsIndex",mn.documentTargetsKeyPath=["path","targetId"];var br=function(e,t,n,r){this.highestTargetId=e,this.highestListenSequenceNumber=t,this.lastRemoteSnapshotVersion=n,this.targetCount=r};br.key="targetGlobalKey",br.store="targetGlobal";var oa=function(e,t){this.collectionId=e,this.parent=t};oa.store="collectionParents",oa.keyPath=["collectionId","parent"];var so=function(e,t,n,r){this.clientId=e,this.updateTimeMs=t,this.networkEnabled=n,this.inForeground=r};so.store="clientMetadata",so.keyPath="clientId";var sc=function(e,t,n){this.bundleId=e,this.createTime=t,this.version=n};sc.store="bundles",sc.keyPath="bundleId";var ac=function(e,t,n){this.name=e,this.readTime=t,this.bundledQuery=n};ac.store="namedQueries",ac.keyPath="name";var l8=xe(xe([],xe(xe([],xe(xe([],xe(xe([],[Xo.store,vt.store,Cn.store,At.store,sr.store,wr.store,br.store,mn.store]),[so.store])),[ki.store])),[oa.store])),[sc.store,ac.store]),CL="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",AL=function(){function e(){this.onCommittedListeners=[]}return e.prototype.addOnCommittedListener=function(t){this.onCommittedListeners.push(t)},e.prototype.raiseOnCommittedEvent=function(){this.onCommittedListeners.forEach(function(t){return t()})},e}(),Pn=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})},W=function(){function e(t){var n=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(function(r){n.isDone=!0,n.result=r,n.nextCallback&&n.nextCallback(r)},function(r){n.isDone=!0,n.error=r,n.catchCallback&&n.catchCallback(r)})}return e.prototype.catch=function(t){return this.next(void 0,t)},e.prototype.next=function(t,n){var r=this;return this.callbackAttached&&he(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e(function(i,s){r.nextCallback=function(a){r.wrapSuccess(t,a).next(i,s)},r.catchCallback=function(a){r.wrapFailure(n,a).next(i,s)}})},e.prototype.toPromise=function(){var t=this;return new Promise(function(n,r){t.next(n,r)})},e.prototype.wrapUserFunction=function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(r){return e.reject(r)}},e.prototype.wrapSuccess=function(t,n){return t?this.wrapUserFunction(function(){return t(n)}):e.resolve(n)},e.prototype.wrapFailure=function(t,n){return t?this.wrapUserFunction(function(){return t(n)}):e.reject(n)},e.resolve=function(t){return new e(function(n,r){n(t)})},e.reject=function(t){return new e(function(n,r){r(t)})},e.waitFor=function(t){return new e(function(n,r){var i=0,s=0,a=!1;t.forEach(function(c){++i,c.next(function(){++s,a&&s===i&&n()},function(l){return r(l)})}),a=!0,s===i&&n()})},e.or=function(t){for(var n=e.resolve(!1),r=function(a){n=n.next(function(c){return c?e.resolve(c):a()})},i=0,s=t;i"u")return!1;if(e.gt())return!0;var t=da(),n=e._t(t),r=00||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||s)},e.gt=function(){var t;return typeof process<"u"&&((t=process.env)===null||t===void 0?void 0:t.Tt)==="YES"},e.It=function(t,n){return t.store(n)},e._t=function(t){var n=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),r=n?n[1].split("_").slice(0,2).join("."):"-1";return Number(r)},e.Et=function(t){var n=t.match(/Android ([\d.]+)/i),r=n?n[1].split(".").slice(0,2).join("."):"-1";return Number(r)},e.prototype.At=function(t){return R(this,void 0,void 0,function(){var n,r=this;return A(this,function(i){switch(i.label){case 0:return this.db?[3,2]:(Y("SimpleDb","Opening database:",this.name),n=this,[4,new Promise(function(s,a){var c=indexedDB.open(r.name,r.version);c.onsuccess=function(l){var h=l.target.result;s(h)},c.onblocked=function(){a(new of(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},c.onerror=function(l){var h=l.target.error;h.name==="VersionError"?a(new H(D.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):a(new of(t,h))},c.onupgradeneeded=function(l){Y("SimpleDb",'Database "'+r.name+'" requires upgrade from version:',l.oldVersion);var h=l.target.result;r.wt.Rt(h,c.transaction,l.oldVersion,r.version).next(function(){Y("SimpleDb","Database upgrade to version "+r.version+" complete")})}})]);case 1:n.db=i.sent(),i.label=2;case 2:return[2,(this.bt&&(this.db.onversionchange=function(s){return r.bt(s)}),this.db)]}})})},e.prototype.vt=function(t){this.bt=t,this.db&&(this.db.onversionchange=function(n){return t(n)})},e.prototype.runTransaction=function(t,n,r,i){return R(this,void 0,void 0,function(){var s,a,c,l,h;return A(this,function(d){switch(d.label){case 0:s=n==="readonly",a=0,c=function(){var v,g,y,_,b;return A(this,function(T){switch(T.label){case 0:++a,T.label=1;case 1:return T.trys.push([1,4,,5]),[4,l.At(t)];case 2:return l.db=T.sent(),v=kL.open(l.db,t,s?"readonly":"readwrite",r),g=i(v).catch(function(C){return v.abort(C),W.reject(C)}).toPromise(),y={},g.catch(function(){}),[4,v.dt];case 3:return[2,(y.value=(T.sent(),g),y)];case 4:return _=T.sent(),b=_.name!=="FirebaseError"&&a<3,Y("SimpleDb","Transaction failed with error:",_.message,"Retrying:",b),l.close(),b?[3,5]:[2,{value:Promise.reject(_)}];case 5:return[2]}})},l=this,d.label=1;case 1:return[5,c()];case 2:if(typeof(h=d.sent())=="object")return[2,h.value];d.label=3;case 3:return[3,1];case 4:return[2]}})})},e.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},e}(),f8=function(){function e(t){this.Pt=t,this.Vt=!1,this.St=null}return Object.defineProperty(e.prototype,"isDone",{get:function(){return this.Vt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Dt",{get:function(){return this.St},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursor",{set:function(t){this.Pt=t},enumerable:!1,configurable:!0}),e.prototype.done=function(){this.Vt=!0},e.prototype.Ct=function(t){this.St=t},e.prototype.delete=function(){return Ws(this.Pt.delete())},e}(),of=function(e){function t(n,r){var i=this;return(i=e.call(this,D.UNAVAILABLE,"IndexedDB transaction '"+n+"' failed: "+r)||this).name="IndexedDbTransactionError",i}return te(t,e),t}(H);function La(e){return e.name==="IndexedDbTransactionError"}var h8=function(){function e(t){this.store=t}return e.prototype.put=function(t,n){var r;return n!==void 0?(Y("SimpleDb","PUT",this.store.name,t,n),r=this.store.put(n,t)):(Y("SimpleDb","PUT",this.store.name,"",t),r=this.store.put(t)),Ws(r)},e.prototype.add=function(t){return Y("SimpleDb","ADD",this.store.name,t,t),Ws(this.store.add(t))},e.prototype.get=function(t){var n=this;return Ws(this.store.get(t)).next(function(r){return r===void 0&&(r=null),Y("SimpleDb","GET",n.store.name,t,r),r})},e.prototype.delete=function(t){return Y("SimpleDb","DELETE",this.store.name,t),Ws(this.store.delete(t))},e.prototype.count=function(){return Y("SimpleDb","COUNT",this.store.name),Ws(this.store.count())},e.prototype.Nt=function(t,n){var r=this.cursor(this.options(t,n)),i=[];return this.xt(r,function(s,a){i.push(a)}).next(function(){return i})},e.prototype.kt=function(t,n){Y("SimpleDb","DELETE ALL",this.store.name);var r=this.options(t,n);r.Ft=!1;var i=this.cursor(r);return this.xt(i,function(s,a,c){return c.delete()})},e.prototype.$t=function(t,n){var r;n?r=t:(r={},n=t);var i=this.cursor(r);return this.xt(i,n)},e.prototype.Ot=function(t){var n=this.cursor({});return new W(function(r,i){n.onerror=function(s){var a=vT(s.target.error);i(a)},n.onsuccess=function(s){var a=s.target.result;a?t(a.primaryKey,a.value).next(function(c){c?a.continue():r()}):r()}})},e.prototype.xt=function(t,n){var r=[];return new W(function(i,s){t.onerror=function(a){s(a.target.error)},t.onsuccess=function(a){var c=a.target.result;if(c){var l=new f8(c),h=n(c.primaryKey,c.value,l);if(h instanceof W){var d=h.catch(function(v){return l.done(),W.reject(v)});r.push(d)}l.isDone?i():l.Dt===null?c.continue():c.continue(l.Dt)}else i()}}).next(function(){return W.waitFor(r)})},e.prototype.options=function(t,n){var r;return t!==void 0&&(typeof t=="string"?r=t:n=t),{index:r,range:n}},e.prototype.cursor=function(t){var n="next";if(t.reverse&&(n="prev"),t.index){var r=this.store.index(t.index);return t.Ft?r.openKeyCursor(t.range,n):r.openCursor(t.range,n)}return this.store.openCursor(t.range,n)},e}();function Ws(e){return new W(function(t,n){e.onsuccess=function(r){var i=r.target.result;t(i)},e.onerror=function(r){var i=vT(r.target.error);n(i)}})}var zR=!1;function vT(e){var t=uc._t(da());if(t>=12.2&&t<13){var n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){var r=new H("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+n+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return zR||(zR=!0,setTimeout(function(){throw r},0)),r}}return e}/** + */var i8=function(e,t){this.seconds=e,this.nanoseconds=t},_r=function(e,t,n){this.ownerId=e,this.allowTabSynchronization=t,this.leaseTimestampMs=n};_r.store="owner",_r.key="owner";var Xo=function(e,t,n){this.userId=e,this.lastAcknowledgedBatchId=t,this.lastStreamToken=n};Xo.store="mutationQueues",Xo.keyPath="userId";var vt=function(e,t,n,r,i){this.userId=e,this.batchId=t,this.localWriteTimeMs=n,this.baseMutations=r,this.mutations=i};vt.store="mutations",vt.keyPath="batchId",vt.userMutationsIndex="userMutationsIndex",vt.userMutationsKeyPath=["userId","batchId"];var Sn=function(){function e(){}return e.prefixForUser=function(t){return[t]},e.prefixForPath=function(t,n){return[t,li(n)]},e.key=function(t,n,r){return[t,li(n),r]},e}();Sn.store="documentMutations",Sn.PLACEHOLDER=new Sn;var o8=function(e,t){this.path=e,this.readTime=t},s8=function(e,t){this.path=e,this.version=t},At=function(e,t,n,r,i,s){this.unknownDocument=e,this.noDocument=t,this.document=n,this.hasCommittedMutations=r,this.readTime=i,this.parentPath=s};At.store="remoteDocuments",At.readTimeIndex="readTimeIndex",At.readTimeIndexPath="readTime",At.collectionReadTimeIndex="collectionReadTimeIndex",At.collectionReadTimeIndexPath=["parentPath","readTime"];var ki=function(e){this.byteSize=e};ki.store="remoteDocumentGlobal",ki.key="remoteDocumentGlobalKey";var or=function(e,t,n,r,i,s,a){this.targetId=e,this.canonicalId=t,this.readTime=n,this.resumeToken=r,this.lastListenSequenceNumber=i,this.lastLimboFreeSnapshotVersion=s,this.query=a};or.store="targets",or.keyPath="targetId",or.queryTargetsIndexName="queryTargetsIndex",or.queryTargetsKeyPath=["canonicalId","targetId"];var mn=function(e,t,n){this.targetId=e,this.path=t,this.sequenceNumber=n};mn.store="targetDocuments",mn.keyPath=["targetId","path"],mn.documentTargetsIndex="documentTargetsIndex",mn.documentTargetsKeyPath=["path","targetId"];var wr=function(e,t,n,r){this.highestTargetId=e,this.highestListenSequenceNumber=t,this.lastRemoteSnapshotVersion=n,this.targetCount=r};wr.key="targetGlobalKey",wr.store="targetGlobal";var oa=function(e,t){this.collectionId=e,this.parent=t};oa.store="collectionParents",oa.keyPath=["collectionId","parent"];var oo=function(e,t,n,r){this.clientId=e,this.updateTimeMs=t,this.networkEnabled=n,this.inForeground=r};oo.store="clientMetadata",oo.keyPath="clientId";var sc=function(e,t,n){this.bundleId=e,this.createTime=t,this.version=n};sc.store="bundles",sc.keyPath="bundleId";var ac=function(e,t,n){this.name=e,this.readTime=t,this.bundledQuery=n};ac.store="namedQueries",ac.keyPath="name";var a8=xe(xe([],xe(xe([],xe(xe([],xe(xe([],[Xo.store,vt.store,Sn.store,At.store,or.store,_r.store,wr.store,mn.store]),[oo.store])),[ki.store])),[oa.store])),[sc.store,ac.store]),CL="The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.",AL=function(){function e(){this.onCommittedListeners=[]}return e.prototype.addOnCommittedListener=function(t){this.onCommittedListeners.push(t)},e.prototype.raiseOnCommittedEvent=function(){this.onCommittedListeners.forEach(function(t){return t()})},e}(),On=function(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})},W=function(){function e(t){var n=this;this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,t(function(r){n.isDone=!0,n.result=r,n.nextCallback&&n.nextCallback(r)},function(r){n.isDone=!0,n.error=r,n.catchCallback&&n.catchCallback(r)})}return e.prototype.catch=function(t){return this.next(void 0,t)},e.prototype.next=function(t,n){var r=this;return this.callbackAttached&&he(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(n,this.error):this.wrapSuccess(t,this.result):new e(function(i,s){r.nextCallback=function(a){r.wrapSuccess(t,a).next(i,s)},r.catchCallback=function(a){r.wrapFailure(n,a).next(i,s)}})},e.prototype.toPromise=function(){var t=this;return new Promise(function(n,r){t.next(n,r)})},e.prototype.wrapUserFunction=function(t){try{var n=t();return n instanceof e?n:e.resolve(n)}catch(r){return e.reject(r)}},e.prototype.wrapSuccess=function(t,n){return t?this.wrapUserFunction(function(){return t(n)}):e.resolve(n)},e.prototype.wrapFailure=function(t,n){return t?this.wrapUserFunction(function(){return t(n)}):e.reject(n)},e.resolve=function(t){return new e(function(n,r){n(t)})},e.reject=function(t){return new e(function(n,r){r(t)})},e.waitFor=function(t){return new e(function(n,r){var i=0,s=0,a=!1;t.forEach(function(c){++i,c.next(function(){++s,a&&s===i&&n()},function(l){return r(l)})}),a=!0,s===i&&n()})},e.or=function(t){for(var n=e.resolve(!1),r=function(a){n=n.next(function(c){return c?e.resolve(c):a()})},i=0,s=t;i"u")return!1;if(e.gt())return!0;var t=da(),n=e._t(t),r=00||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0||r||s)},e.gt=function(){var t;return typeof process<"u"&&((t=process.env)===null||t===void 0?void 0:t.Tt)==="YES"},e.It=function(t,n){return t.store(n)},e._t=function(t){var n=t.match(/i(?:phone|pad|pod) os ([\d_]+)/i),r=n?n[1].split("_").slice(0,2).join("."):"-1";return Number(r)},e.Et=function(t){var n=t.match(/Android ([\d.]+)/i),r=n?n[1].split(".").slice(0,2).join("."):"-1";return Number(r)},e.prototype.At=function(t){return R(this,void 0,void 0,function(){var n,r=this;return A(this,function(i){switch(i.label){case 0:return this.db?[3,2]:(Y("SimpleDb","Opening database:",this.name),n=this,[4,new Promise(function(s,a){var c=indexedDB.open(r.name,r.version);c.onsuccess=function(l){var h=l.target.result;s(h)},c.onblocked=function(){a(new of(t,"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed."))},c.onerror=function(l){var h=l.target.error;h.name==="VersionError"?a(new H(D.FAILED_PRECONDITION,"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.")):a(new of(t,h))},c.onupgradeneeded=function(l){Y("SimpleDb",'Database "'+r.name+'" requires upgrade from version:',l.oldVersion);var h=l.target.result;r.wt.Rt(h,c.transaction,l.oldVersion,r.version).next(function(){Y("SimpleDb","Database upgrade to version "+r.version+" complete")})}})]);case 1:n.db=i.sent(),i.label=2;case 2:return[2,(this.bt&&(this.db.onversionchange=function(s){return r.bt(s)}),this.db)]}})})},e.prototype.vt=function(t){this.bt=t,this.db&&(this.db.onversionchange=function(n){return t(n)})},e.prototype.runTransaction=function(t,n,r,i){return R(this,void 0,void 0,function(){var s,a,c,l,h;return A(this,function(d){switch(d.label){case 0:s=n==="readonly",a=0,c=function(){var v,g,y,_,b;return A(this,function(T){switch(T.label){case 0:++a,T.label=1;case 1:return T.trys.push([1,4,,5]),[4,l.At(t)];case 2:return l.db=T.sent(),v=kL.open(l.db,t,s?"readonly":"readwrite",r),g=i(v).catch(function(C){return v.abort(C),W.reject(C)}).toPromise(),y={},g.catch(function(){}),[4,v.dt];case 3:return[2,(y.value=(T.sent(),g),y)];case 4:return _=T.sent(),b=_.name!=="FirebaseError"&&a<3,Y("SimpleDb","Transaction failed with error:",_.message,"Retrying:",b),l.close(),b?[3,5]:[2,{value:Promise.reject(_)}];case 5:return[2]}})},l=this,d.label=1;case 1:return[5,c()];case 2:if(typeof(h=d.sent())=="object")return[2,h.value];d.label=3;case 3:return[3,1];case 4:return[2]}})})},e.prototype.close=function(){this.db&&this.db.close(),this.db=void 0},e}(),u8=function(){function e(t){this.Pt=t,this.Vt=!1,this.St=null}return Object.defineProperty(e.prototype,"isDone",{get:function(){return this.Vt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Dt",{get:function(){return this.St},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursor",{set:function(t){this.Pt=t},enumerable:!1,configurable:!0}),e.prototype.done=function(){this.Vt=!0},e.prototype.Ct=function(t){this.St=t},e.prototype.delete=function(){return Ws(this.Pt.delete())},e}(),of=function(e){function t(n,r){var i=this;return(i=e.call(this,D.UNAVAILABLE,"IndexedDB transaction '"+n+"' failed: "+r)||this).name="IndexedDbTransactionError",i}return te(t,e),t}(H);function La(e){return e.name==="IndexedDbTransactionError"}var c8=function(){function e(t){this.store=t}return e.prototype.put=function(t,n){var r;return n!==void 0?(Y("SimpleDb","PUT",this.store.name,t,n),r=this.store.put(n,t)):(Y("SimpleDb","PUT",this.store.name,"",t),r=this.store.put(t)),Ws(r)},e.prototype.add=function(t){return Y("SimpleDb","ADD",this.store.name,t,t),Ws(this.store.add(t))},e.prototype.get=function(t){var n=this;return Ws(this.store.get(t)).next(function(r){return r===void 0&&(r=null),Y("SimpleDb","GET",n.store.name,t,r),r})},e.prototype.delete=function(t){return Y("SimpleDb","DELETE",this.store.name,t),Ws(this.store.delete(t))},e.prototype.count=function(){return Y("SimpleDb","COUNT",this.store.name),Ws(this.store.count())},e.prototype.Nt=function(t,n){var r=this.cursor(this.options(t,n)),i=[];return this.xt(r,function(s,a){i.push(a)}).next(function(){return i})},e.prototype.kt=function(t,n){Y("SimpleDb","DELETE ALL",this.store.name);var r=this.options(t,n);r.Ft=!1;var i=this.cursor(r);return this.xt(i,function(s,a,c){return c.delete()})},e.prototype.$t=function(t,n){var r;n?r=t:(r={},n=t);var i=this.cursor(r);return this.xt(i,n)},e.prototype.Ot=function(t){var n=this.cursor({});return new W(function(r,i){n.onerror=function(s){var a=vT(s.target.error);i(a)},n.onsuccess=function(s){var a=s.target.result;a?t(a.primaryKey,a.value).next(function(c){c?a.continue():r()}):r()}})},e.prototype.xt=function(t,n){var r=[];return new W(function(i,s){t.onerror=function(a){s(a.target.error)},t.onsuccess=function(a){var c=a.target.result;if(c){var l=new u8(c),h=n(c.primaryKey,c.value,l);if(h instanceof W){var d=h.catch(function(v){return l.done(),W.reject(v)});r.push(d)}l.isDone?i():l.Dt===null?c.continue():c.continue(l.Dt)}else i()}}).next(function(){return W.waitFor(r)})},e.prototype.options=function(t,n){var r;return t!==void 0&&(typeof t=="string"?r=t:n=t),{index:r,range:n}},e.prototype.cursor=function(t){var n="next";if(t.reverse&&(n="prev"),t.index){var r=this.store.index(t.index);return t.Ft?r.openKeyCursor(t.range,n):r.openCursor(t.range,n)}return this.store.openCursor(t.range,n)},e}();function Ws(e){return new W(function(t,n){e.onsuccess=function(r){var i=r.target.result;t(i)},e.onerror=function(r){var i=vT(r.target.error);n(i)}})}var zR=!1;function vT(e){var t=uc._t(da());if(t>=12.2&&t<13){var n="An internal error was encountered in the Indexed Database server";if(e.message.indexOf(n)>=0){var r=new H("internal","IOS_INDEXEDDB_BUG1: IndexedDb has thrown '"+n+"'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.");return zR||(zR=!0,setTimeout(function(){throw r},0)),r}}return e}/** * @license * Copyright 2020 Google LLC * @@ -2157,7 +2157,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var QR=function(e){function t(n,r){var i=this;return(i=e.call(this)||this).Mt=n,i.currentSequenceNumber=r,i}return te(t,e),t}(AL);function dr(e,t){var n=ee(e);return uc.It(n.Mt,t)}/** + */var QR=function(e){function t(n,r){var i=this;return(i=e.call(this)||this).Mt=n,i.currentSequenceNumber=r,i}return te(t,e),t}(AL);function hr(e,t){var n=ee(e);return uc.It(n.Mt,t)}/** * @license * Copyright 2017 Google LLC * @@ -2172,7 +2172,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var gT=function(){function e(t,n,r,i){this.batchId=t,this.localWriteTime=n,this.baseMutations=r,this.mutations=i}return e.prototype.applyToRemoteDocument=function(t,n){for(var r=n.mutationResults,i=0;i=i),a=Eu(r.R,l)),h.done()}).next(function(){return a})},e.prototype.getHighestUnacknowledgedBatchId=function(t){var n=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),r=-1;return Lo(t).$t({index:vt.userMutationsIndex,range:n,reverse:!0},function(i,s,a){r=s.batchId,a.done()}).next(function(){return r})},e.prototype.getAllMutationBatches=function(t){var n=this,r=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return Lo(t).Nt(vt.userMutationsIndex,r).next(function(i){return i.map(function(s){return Eu(n.R,s)})})},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,n){var r=this,i=Cn.prefixForPath(this.userId,n.path),s=IDBKeyRange.lowerBound(i),a=[];return Tu(t).$t({range:s},function(c,l,h){var d=c[0],v=c[1],g=c[2],y=ro(v);if(d===r.userId&&n.path.isEqual(y))return Lo(t).get(g).next(function(_){if(!_)throw he();be(_.userId===r.userId),a.push(Eu(r.R,_))});h.done()}).next(function(){return a})},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(t,n){var r=this,i=new zt(Ve),s=[];return n.forEach(function(a){var c=Cn.prefixForPath(r.userId,a.path),l=IDBKeyRange.lowerBound(c),h=Tu(t).$t({range:l},function(d,v,g){var y=d[0],_=d[1],b=d[2],T=ro(_);y===r.userId&&a.path.isEqual(T)?i=i.add(b):g.done()});s.push(h)}),W.waitFor(s).next(function(){return r.Wt(t,i)})},e.prototype.getAllMutationBatchesAffectingQuery=function(t,n){var r=this,i=n.path,s=i.length+1,a=Cn.prefixForPath(this.userId,i),c=IDBKeyRange.lowerBound(a),l=new zt(Ve);return Tu(t).$t({range:c},function(h,d,v){var g=h[0],y=h[1],_=h[2],b=ro(y);g===r.userId&&i.isPrefixOf(b)?b.length===s&&(l=l.add(_)):v.done()}).next(function(){return r.Wt(t,l)})},e.prototype.Wt=function(t,n){var r=this,i=[],s=[];return n.forEach(function(a){s.push(Lo(t).get(a).next(function(c){if(c===null)throw he();be(c.userId===r.userId),i.push(Eu(r.R,c))}))}),W.waitFor(s).next(function(){return i})},e.prototype.removeMutationBatch=function(t,n){var r=this;return OL(t.Mt,this.userId,n).next(function(i){return t.addOnCommittedListener(function(){r.Gt(n.batchId)}),W.forEach(i,function(s){return r.referenceDelegate.markPotentiallyOrphaned(t,s)})})},e.prototype.Gt=function(t){delete this.Kt[t]},e.prototype.performConsistencyCheck=function(t){var n=this;return this.checkEmpty(t).next(function(r){if(!r)return W.resolve();var i=IDBKeyRange.lowerBound(Cn.prefixForUser(n.userId)),s=[];return Tu(t).$t({range:i},function(a,c,l){if(a[0]===n.userId){var h=ro(a[1]);s.push(h)}else l.done()}).next(function(){be(s.length===0)})})},e.prototype.containsKey=function(t,n){return PL(t,this.userId,n)},e.prototype.zt=function(t){var n=this;return DL(t).get(this.userId).next(function(r){return r||new Xo(n.userId,-1,"")})},e}();function PL(e,t,n){var r=Cn.prefixForPath(t,n.path),i=r[1],s=IDBKeyRange.lowerBound(r),a=!1;return Tu(e).$t({range:s,Ft:!0},function(c,l,h){var d=c[0],v=c[1];c[2],d===t&&v===i&&(a=!0),h.done()}).next(function(){return a})}function Lo(e){return dr(e,vt.store)}function Tu(e){return dr(e,Cn.store)}function DL(e){return dr(e,Xo.store)}/** + */Si.DEFAULT_COLLECTION_PERCENTILE=10,Si.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,Si.DEFAULT=new Si(41943040,Si.DEFAULT_COLLECTION_PERCENTILE,Si.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),Si.DISABLED=new Si(-1,0,0);var p8=function(){function e(t,n,r,i){this.userId=t,this.R=n,this.Ut=r,this.referenceDelegate=i,this.Kt={}}return e.Qt=function(t,n,r,i){return be(t.uid!==""),new e(t.isAuthenticated()?t.uid:"",n,r,i)},e.prototype.checkEmpty=function(t){var n=!0,r=IDBKeyRange.bound([this.userId,Number.NEGATIVE_INFINITY],[this.userId,Number.POSITIVE_INFINITY]);return Mo(t).$t({index:vt.userMutationsIndex,range:r},function(i,s,a){n=!1,a.done()}).next(function(){return n})},e.prototype.addMutationBatch=function(t,n,r,i){var s=this,a=Tu(t),c=Mo(t);return c.add({}).next(function(l){be(typeof l=="number");for(var h=new gT(l,n,r,i),d=function(C,x,O){var L=O.baseMutations.map(function(P){return uv(C.Lt,P)}),$=O.mutations.map(function(P){return uv(C.Lt,P)});return new vt(x,O.batchId,O.localWriteTime.toMillis(),L,$)}(s.R,s.userId,h),v=[],g=new zt(function(C,x){return Ve(C.canonicalString(),x.canonicalString())}),y=0,_=i;y<_.length;y++){var b=_[y],T=Sn.key(s.userId,b.key.path,l);g=g.add(b.key.path.popLast()),v.push(c.put(d)),v.push(a.put(T,Sn.PLACEHOLDER))}return g.forEach(function(C){v.push(s.Ut.addToCollectionParentIndex(t,C))}),t.addOnCommittedListener(function(){s.Kt[l]=h.keys()}),W.waitFor(v).next(function(){return h})})},e.prototype.lookupMutationBatch=function(t,n){var r=this;return Mo(t).get(n).next(function(i){return i?(be(i.userId===r.userId),Eu(r.R,i)):null})},e.prototype.jt=function(t,n){var r=this;return this.Kt[n]?W.resolve(this.Kt[n]):this.lookupMutationBatch(t,n).next(function(i){if(i){var s=i.keys();return r.Kt[n]=s,s}return null})},e.prototype.getNextMutationBatchAfterBatchId=function(t,n){var r=this,i=n+1,s=IDBKeyRange.lowerBound([this.userId,i]),a=null;return Mo(t).$t({index:vt.userMutationsIndex,range:s},function(c,l,h){l.userId===r.userId&&(be(l.batchId>=i),a=Eu(r.R,l)),h.done()}).next(function(){return a})},e.prototype.getHighestUnacknowledgedBatchId=function(t){var n=IDBKeyRange.upperBound([this.userId,Number.POSITIVE_INFINITY]),r=-1;return Mo(t).$t({index:vt.userMutationsIndex,range:n,reverse:!0},function(i,s,a){r=s.batchId,a.done()}).next(function(){return r})},e.prototype.getAllMutationBatches=function(t){var n=this,r=IDBKeyRange.bound([this.userId,-1],[this.userId,Number.POSITIVE_INFINITY]);return Mo(t).Nt(vt.userMutationsIndex,r).next(function(i){return i.map(function(s){return Eu(n.R,s)})})},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,n){var r=this,i=Sn.prefixForPath(this.userId,n.path),s=IDBKeyRange.lowerBound(i),a=[];return Tu(t).$t({range:s},function(c,l,h){var d=c[0],v=c[1],g=c[2],y=ro(v);if(d===r.userId&&n.path.isEqual(y))return Mo(t).get(g).next(function(_){if(!_)throw he();be(_.userId===r.userId),a.push(Eu(r.R,_))});h.done()}).next(function(){return a})},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(t,n){var r=this,i=new zt(Ve),s=[];return n.forEach(function(a){var c=Sn.prefixForPath(r.userId,a.path),l=IDBKeyRange.lowerBound(c),h=Tu(t).$t({range:l},function(d,v,g){var y=d[0],_=d[1],b=d[2],T=ro(_);y===r.userId&&a.path.isEqual(T)?i=i.add(b):g.done()});s.push(h)}),W.waitFor(s).next(function(){return r.Wt(t,i)})},e.prototype.getAllMutationBatchesAffectingQuery=function(t,n){var r=this,i=n.path,s=i.length+1,a=Sn.prefixForPath(this.userId,i),c=IDBKeyRange.lowerBound(a),l=new zt(Ve);return Tu(t).$t({range:c},function(h,d,v){var g=h[0],y=h[1],_=h[2],b=ro(y);g===r.userId&&i.isPrefixOf(b)?b.length===s&&(l=l.add(_)):v.done()}).next(function(){return r.Wt(t,l)})},e.prototype.Wt=function(t,n){var r=this,i=[],s=[];return n.forEach(function(a){s.push(Mo(t).get(a).next(function(c){if(c===null)throw he();be(c.userId===r.userId),i.push(Eu(r.R,c))}))}),W.waitFor(s).next(function(){return i})},e.prototype.removeMutationBatch=function(t,n){var r=this;return OL(t.Mt,this.userId,n).next(function(i){return t.addOnCommittedListener(function(){r.Gt(n.batchId)}),W.forEach(i,function(s){return r.referenceDelegate.markPotentiallyOrphaned(t,s)})})},e.prototype.Gt=function(t){delete this.Kt[t]},e.prototype.performConsistencyCheck=function(t){var n=this;return this.checkEmpty(t).next(function(r){if(!r)return W.resolve();var i=IDBKeyRange.lowerBound(Sn.prefixForUser(n.userId)),s=[];return Tu(t).$t({range:i},function(a,c,l){if(a[0]===n.userId){var h=ro(a[1]);s.push(h)}else l.done()}).next(function(){be(s.length===0)})})},e.prototype.containsKey=function(t,n){return PL(t,this.userId,n)},e.prototype.zt=function(t){var n=this;return DL(t).get(this.userId).next(function(r){return r||new Xo(n.userId,-1,"")})},e}();function PL(e,t,n){var r=Sn.prefixForPath(t,n.path),i=r[1],s=IDBKeyRange.lowerBound(r),a=!1;return Tu(e).$t({range:s,Ft:!0},function(c,l,h){var d=c[0],v=c[1];c[2],d===t&&v===i&&(a=!0),h.done()}).next(function(){return a})}function Mo(e){return hr(e,vt.store)}function Tu(e){return hr(e,Sn.store)}function DL(e){return hr(e,Xo.store)}/** * @license * Copyright 2017 Google LLC * @@ -2262,7 +2262,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var lv=function(){function e(t){this.Ht=t}return e.prototype.next=function(){return this.Ht+=2,this.Ht},e.Jt=function(){return new e(0)},e.Yt=function(){return new e(-1)},e}(),y8=function(){function e(t,n){this.referenceDelegate=t,this.R=n}return e.prototype.allocateTargetId=function(t){var n=this;return this.Xt(t).next(function(r){var i=new lv(r.highestTargetId);return r.highestTargetId=i.next(),n.Zt(t,r).next(function(){return r.highestTargetId})})},e.prototype.getLastRemoteSnapshotVersion=function(t){return this.Xt(t).next(function(n){return De.fromTimestamp(new lr(n.lastRemoteSnapshotVersion.seconds,n.lastRemoteSnapshotVersion.nanoseconds))})},e.prototype.getHighestSequenceNumber=function(t){return this.Xt(t).next(function(n){return n.highestListenSequenceNumber})},e.prototype.setTargetsMetadata=function(t,n,r){var i=this;return this.Xt(t).next(function(s){return s.highestListenSequenceNumber=n,r&&(s.lastRemoteSnapshotVersion=r.toTimestamp()),n>s.highestListenSequenceNumber&&(s.highestListenSequenceNumber=n),i.Zt(t,s)})},e.prototype.addTargetData=function(t,n){var r=this;return this.te(t,n).next(function(){return r.Xt(t).next(function(i){return i.targetCount+=1,r.ee(n,i),r.Zt(t,i)})})},e.prototype.updateTargetData=function(t,n){return this.te(t,n)},e.prototype.removeTargetData=function(t,n){var r=this;return this.removeMatchingKeysForTargetId(t,n.targetId).next(function(){return mu(t).delete(n.targetId)}).next(function(){return r.Xt(t)}).next(function(i){return be(i.targetCount>0),i.targetCount-=1,r.Zt(t,i)})},e.prototype.removeTargets=function(t,n,r){var i=this,s=0,a=[];return mu(t).$t(function(c,l){var h=ql(l);h.sequenceNumber<=n&&r.get(h.targetId)===null&&(s++,a.push(i.removeTargetData(t,h)))}).next(function(){return W.waitFor(a)}).next(function(){return s})},e.prototype.forEachTarget=function(t,n){return mu(t).$t(function(r,i){var s=ql(i);n(s)})},e.prototype.Xt=function(t){return tN(t).get(br.key).next(function(n){return be(n!==null),n})},e.prototype.Zt=function(t,n){return tN(t).put(br.key,n)},e.prototype.te=function(t,n){return mu(t).put(xL(this.R,n))},e.prototype.ee=function(t,n){var r=!1;return t.targetId>n.highestTargetId&&(n.highestTargetId=t.targetId,r=!0),t.sequenceNumber>n.highestListenSequenceNumber&&(n.highestListenSequenceNumber=t.sequenceNumber,r=!0),r},e.prototype.getTargetCount=function(t){return this.Xt(t).next(function(n){return n.targetCount})},e.prototype.getTargetData=function(t,n){var r=mh(n),i=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,Number.POSITIVE_INFINITY]),s=null;return mu(t).$t({range:i,index:sr.queryTargetsIndexName},function(a,c,l){var h=ql(c);Sg(n,h.target)&&(s=h,l.done())}).next(function(){return s})},e.prototype.addMatchingKeys=function(t,n,r){var i=this,s=[],a=$o(t);return n.forEach(function(c){var l=li(c.path);s.push(a.put(new mn(r,l))),s.push(i.referenceDelegate.addReference(t,r,c))}),W.waitFor(s)},e.prototype.removeMatchingKeys=function(t,n,r){var i=this,s=$o(t);return W.forEach(n,function(a){var c=li(a.path);return W.waitFor([s.delete([r,c]),i.referenceDelegate.removeReference(t,r,a)])})},e.prototype.removeMatchingKeysForTargetId=function(t,n){var r=$o(t),i=IDBKeyRange.bound([n],[n+1],!1,!0);return r.delete(i)},e.prototype.getMatchingKeysForTargetId=function(t,n){var r=IDBKeyRange.bound([n],[n+1],!1,!0),i=$o(t),s=ot();return i.$t({range:r,Ft:!0},function(a,c,l){var h=ro(a[1]),d=new de(h);s=s.add(d)}).next(function(){return s})},e.prototype.containsKey=function(t,n){var r=li(n.path),i=IDBKeyRange.bound([r],[WM(r)],!1,!0),s=0;return $o(t).$t({index:mn.documentTargetsIndex,Ft:!0,range:i},function(a,c,l){var h=a[0];a[1],h!==0&&(s++,l.done())}).next(function(){return s>0})},e.prototype.lt=function(t,n){return mu(t).get(n).next(function(r){return r?ql(r):null})},e}();/** + */var lv=function(){function e(t){this.Ht=t}return e.prototype.next=function(){return this.Ht+=2,this.Ht},e.Jt=function(){return new e(0)},e.Yt=function(){return new e(-1)},e}(),v8=function(){function e(t,n){this.referenceDelegate=t,this.R=n}return e.prototype.allocateTargetId=function(t){var n=this;return this.Xt(t).next(function(r){var i=new lv(r.highestTargetId);return r.highestTargetId=i.next(),n.Zt(t,r).next(function(){return r.highestTargetId})})},e.prototype.getLastRemoteSnapshotVersion=function(t){return this.Xt(t).next(function(n){return De.fromTimestamp(new cr(n.lastRemoteSnapshotVersion.seconds,n.lastRemoteSnapshotVersion.nanoseconds))})},e.prototype.getHighestSequenceNumber=function(t){return this.Xt(t).next(function(n){return n.highestListenSequenceNumber})},e.prototype.setTargetsMetadata=function(t,n,r){var i=this;return this.Xt(t).next(function(s){return s.highestListenSequenceNumber=n,r&&(s.lastRemoteSnapshotVersion=r.toTimestamp()),n>s.highestListenSequenceNumber&&(s.highestListenSequenceNumber=n),i.Zt(t,s)})},e.prototype.addTargetData=function(t,n){var r=this;return this.te(t,n).next(function(){return r.Xt(t).next(function(i){return i.targetCount+=1,r.ee(n,i),r.Zt(t,i)})})},e.prototype.updateTargetData=function(t,n){return this.te(t,n)},e.prototype.removeTargetData=function(t,n){var r=this;return this.removeMatchingKeysForTargetId(t,n.targetId).next(function(){return mu(t).delete(n.targetId)}).next(function(){return r.Xt(t)}).next(function(i){return be(i.targetCount>0),i.targetCount-=1,r.Zt(t,i)})},e.prototype.removeTargets=function(t,n,r){var i=this,s=0,a=[];return mu(t).$t(function(c,l){var h=ql(l);h.sequenceNumber<=n&&r.get(h.targetId)===null&&(s++,a.push(i.removeTargetData(t,h)))}).next(function(){return W.waitFor(a)}).next(function(){return s})},e.prototype.forEachTarget=function(t,n){return mu(t).$t(function(r,i){var s=ql(i);n(s)})},e.prototype.Xt=function(t){return tN(t).get(wr.key).next(function(n){return be(n!==null),n})},e.prototype.Zt=function(t,n){return tN(t).put(wr.key,n)},e.prototype.te=function(t,n){return mu(t).put(xL(this.R,n))},e.prototype.ee=function(t,n){var r=!1;return t.targetId>n.highestTargetId&&(n.highestTargetId=t.targetId,r=!0),t.sequenceNumber>n.highestListenSequenceNumber&&(n.highestListenSequenceNumber=t.sequenceNumber,r=!0),r},e.prototype.getTargetCount=function(t){return this.Xt(t).next(function(n){return n.targetCount})},e.prototype.getTargetData=function(t,n){var r=yh(n),i=IDBKeyRange.bound([r,Number.NEGATIVE_INFINITY],[r,Number.POSITIVE_INFINITY]),s=null;return mu(t).$t({range:i,index:or.queryTargetsIndexName},function(a,c,l){var h=ql(c);Sg(n,h.target)&&(s=h,l.done())}).next(function(){return s})},e.prototype.addMatchingKeys=function(t,n,r){var i=this,s=[],a=qo(t);return n.forEach(function(c){var l=li(c.path);s.push(a.put(new mn(r,l))),s.push(i.referenceDelegate.addReference(t,r,c))}),W.waitFor(s)},e.prototype.removeMatchingKeys=function(t,n,r){var i=this,s=qo(t);return W.forEach(n,function(a){var c=li(a.path);return W.waitFor([s.delete([r,c]),i.referenceDelegate.removeReference(t,r,a)])})},e.prototype.removeMatchingKeysForTargetId=function(t,n){var r=qo(t),i=IDBKeyRange.bound([n],[n+1],!1,!0);return r.delete(i)},e.prototype.getMatchingKeysForTargetId=function(t,n){var r=IDBKeyRange.bound([n],[n+1],!1,!0),i=qo(t),s=ot();return i.$t({range:r,Ft:!0},function(a,c,l){var h=ro(a[1]),d=new de(h);s=s.add(d)}).next(function(){return s})},e.prototype.containsKey=function(t,n){var r=li(n.path),i=IDBKeyRange.bound([r],[WM(r)],!1,!0),s=0;return qo(t).$t({index:mn.documentTargetsIndex,Ft:!0,range:i},function(a,c,l){var h=a[0];a[1],h!==0&&(s++,l.done())}).next(function(){return s>0})},e.prototype.lt=function(t,n){return mu(t).get(n).next(function(r){return r?ql(r):null})},e}();/** * @license * Copyright 2017 Google LLC * @@ -2277,7 +2277,7 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function mu(e){return dr(e,sr.store)}function tN(e){return dr(e,br.store)}function $o(e){return dr(e,mn.store)}/** + */function mu(e){return hr(e,or.store)}function tN(e){return hr(e,wr.store)}function qo(e){return hr(e,mn.store)}/** * @license * Copyright 2017 Google LLC * @@ -2307,12 +2307,12 @@ PERFORMANCE OF THIS SOFTWARE. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function nN(e,t){var n=e[0],r=e[1],i=t[0],s=t[1],a=Ve(n,i);return a===0?Ve(r,s):a}var _8=function(){function e(t){this.ne=t,this.buffer=new zt(nN),this.se=0}return e.prototype.ie=function(){return++this.se},e.prototype.re=function(t){var n=[t,this.ie()];if(this.buffer.sized.params.maximumSequenceNumbersToCollect?(Y("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+d.params.maximumSequenceNumbersToCollect+" from "+g),i=d.params.maximumSequenceNumbersToCollect):i=g,a=Date.now(),d.nthSequenceNumber(t,i)}).next(function(g){return r=g,c=Date.now(),d.removeTargets(t,r,n)}).next(function(g){return s=g,l=Date.now(),d.removeOrphanedDocuments(t,r)}).next(function(g){return h=Date.now(),Lb()<=Le.DEBUG&&Y("LruGarbageCollector",`LRU Garbage Collection + */function nN(e,t){var n=e[0],r=e[1],i=t[0],s=t[1],a=Ve(n,i);return a===0?Ve(r,s):a}var g8=function(){function e(t){this.ne=t,this.buffer=new zt(nN),this.se=0}return e.prototype.ie=function(){return++this.se},e.prototype.re=function(t){var n=[t,this.ie()];if(this.buffer.sized.params.maximumSequenceNumbersToCollect?(Y("LruGarbageCollector","Capping sequence numbers to collect down to the maximum of "+d.params.maximumSequenceNumbersToCollect+" from "+g),i=d.params.maximumSequenceNumbersToCollect):i=g,a=Date.now(),d.nthSequenceNumber(t,i)}).next(function(g){return r=g,c=Date.now(),d.removeTargets(t,r,n)}).next(function(g){return s=g,l=Date.now(),d.removeOrphanedDocuments(t,r)}).next(function(g){return h=Date.now(),Lb()<=Le.DEBUG&&Y("LruGarbageCollector",`LRU Garbage Collection Counted targets in `+(a-v)+`ms Determined least recently used `+i+" in "+(c-a)+`ms Removed `+s+" targets in "+(l-c)+`ms Removed `+g+" documents in "+(h-l)+`ms -Total Duration: `+(h-v)+"ms"),W.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:s,documentsRemoved:g})})},e}(),E8=function(){function e(t,n){this.db=t,this.garbageCollector=function(r,i){return new b8(r,i)}(this,n)}return e.prototype.he=function(t){var n=this.de(t);return this.db.getTargetCache().getTargetCount(t).next(function(r){return n.next(function(i){return r+i})})},e.prototype.de=function(t){var n=0;return this.le(t,function(r){n++}).next(function(){return n})},e.prototype.forEachTarget=function(t,n){return this.db.getTargetCache().forEachTarget(t,n)},e.prototype.le=function(t,n){return this.we(t,function(r,i){return n(i)})},e.prototype.addReference=function(t,n,r){return Wd(t,r)},e.prototype.removeReference=function(t,n,r){return Wd(t,r)},e.prototype.removeTargets=function(t,n,r){return this.db.getTargetCache().removeTargets(t,n,r)},e.prototype.markPotentiallyOrphaned=function(t,n){return Wd(t,n)},e.prototype._e=function(t,n){return function(r,i){var s=!1;return DL(r).Ot(function(a){return PL(r,a,i).next(function(c){return c&&(s=!0),W.resolve(!c)})}).next(function(){return s})}(t,n)},e.prototype.removeOrphanedDocuments=function(t,n){var r=this,i=this.db.getRemoteDocumentCache().newChangeBuffer(),s=[],a=0;return this.we(t,function(c,l){if(l<=n){var h=r._e(t,c).next(function(d){if(!d)return a++,i.getEntry(t,c).next(function(){return i.removeEntry(c),$o(t).delete([0,li(c.path)])})});s.push(h)}}).next(function(){return W.waitFor(s)}).next(function(){return i.apply(t)}).next(function(){return a})},e.prototype.removeTarget=function(t,n){var r=n.withSequenceNumber(t.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(t,r)},e.prototype.updateLimboDocument=function(t,n){return Wd(t,n)},e.prototype.we=function(t,n){var r,i=$o(t),s=Tr.o;return i.$t({index:mn.documentTargetsIndex},function(a,c){var l=a[0];a[1];var h=c.path,d=c.sequenceNumber;l===0?(s!==Tr.o&&n(new de(ro(r)),s),s=d,r=h):s=Tr.o}).next(function(){s!==Tr.o&&n(new de(ro(r)),s)})},e.prototype.getCacheSize=function(t){return this.db.getRemoteDocumentCache().getSize(t)},e}();function Wd(e,t){return $o(e).put(function(n,r){return new mn(0,li(n.path),r)}(t,e.currentSequenceNumber))}/** +Total Duration: `+(h-v)+"ms"),W.resolve({didRun:!0,sequenceNumbersCollected:i,targetsRemoved:s,documentsRemoved:g})})},e}(),_8=function(){function e(t,n){this.db=t,this.garbageCollector=function(r,i){return new y8(r,i)}(this,n)}return e.prototype.he=function(t){var n=this.de(t);return this.db.getTargetCache().getTargetCount(t).next(function(r){return n.next(function(i){return r+i})})},e.prototype.de=function(t){var n=0;return this.le(t,function(r){n++}).next(function(){return n})},e.prototype.forEachTarget=function(t,n){return this.db.getTargetCache().forEachTarget(t,n)},e.prototype.le=function(t,n){return this.we(t,function(r,i){return n(i)})},e.prototype.addReference=function(t,n,r){return Gd(t,r)},e.prototype.removeReference=function(t,n,r){return Gd(t,r)},e.prototype.removeTargets=function(t,n,r){return this.db.getTargetCache().removeTargets(t,n,r)},e.prototype.markPotentiallyOrphaned=function(t,n){return Gd(t,n)},e.prototype._e=function(t,n){return function(r,i){var s=!1;return DL(r).Ot(function(a){return PL(r,a,i).next(function(c){return c&&(s=!0),W.resolve(!c)})}).next(function(){return s})}(t,n)},e.prototype.removeOrphanedDocuments=function(t,n){var r=this,i=this.db.getRemoteDocumentCache().newChangeBuffer(),s=[],a=0;return this.we(t,function(c,l){if(l<=n){var h=r._e(t,c).next(function(d){if(!d)return a++,i.getEntry(t,c).next(function(){return i.removeEntry(c),qo(t).delete([0,li(c.path)])})});s.push(h)}}).next(function(){return W.waitFor(s)}).next(function(){return i.apply(t)}).next(function(){return a})},e.prototype.removeTarget=function(t,n){var r=n.withSequenceNumber(t.currentSequenceNumber);return this.db.getTargetCache().updateTargetData(t,r)},e.prototype.updateLimboDocument=function(t,n){return Gd(t,n)},e.prototype.we=function(t,n){var r,i=qo(t),s=Tr.o;return i.$t({index:mn.documentTargetsIndex},function(a,c){var l=a[0];a[1];var h=c.path,d=c.sequenceNumber;l===0?(s!==Tr.o&&n(new de(ro(r)),s),s=d,r=h):s=Tr.o}).next(function(){s!==Tr.o&&n(new de(ro(r)),s)})},e.prototype.getCacheSize=function(t){return this.db.getRemoteDocumentCache().getSize(t)},e}();function Gd(e,t){return qo(e).put(function(n,r){return new mn(0,li(n.path),r)}(t,e.currentSequenceNumber))}/** * @license * Copyright 2017 Google LLC * @@ -2327,7 +2327,7 @@ Total Duration: `+(h-v)+"ms"),W.resolve({didRun:!0,sequenceNumbersCollected:i,ta * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Dc=function(){function e(t,n){this.mapKeyFn=t,this.equalsFn=n,this.inner={}}return e.prototype.get=function(t){var n=this.mapKeyFn(t),r=this.inner[n];if(r!==void 0)for(var i=0,s=r;i=0&&i<=11);var a=new kL("createOrUpgrade",n);r<1&&i>=1&&(function(l){l.createObjectStore(wr.store)}(t),function(l){l.createObjectStore(Xo.store,{keyPath:Xo.keyPath}),l.createObjectStore(vt.store,{keyPath:vt.keyPath,autoIncrement:!0}).createIndex(vt.userMutationsIndex,vt.userMutationsKeyPath,{unique:!0}),l.createObjectStore(Cn.store)}(t),iN(t),function(l){l.createObjectStore(At.store)}(t));var c=W.resolve();return r<3&&i>=3&&(r!==0&&(function(l){l.deleteObjectStore(mn.store),l.deleteObjectStore(sr.store),l.deleteObjectStore(br.store)}(t),iN(t)),c=c.next(function(){return function(l){var h=l.store(br.store),d=new br(0,0,De.min().toTimestamp(),0);return h.put(br.key,d)}(a)})),r<4&&i>=4&&(r!==0&&(c=c.next(function(){return function(l,h){return h.store(vt.store).Nt().next(function(d){l.deleteObjectStore(vt.store),l.createObjectStore(vt.store,{keyPath:vt.keyPath,autoIncrement:!0}).createIndex(vt.userMutationsIndex,vt.userMutationsKeyPath,{unique:!0});var v=h.store(vt.store),g=d.map(function(y){return v.put(y)});return W.waitFor(g)})}(t,a)})),c=c.next(function(){(function(l){l.createObjectStore(so.store,{keyPath:so.keyPath})})(t)})),r<5&&i>=5&&(c=c.next(function(){return s.Re(a)})),r<6&&i>=6&&(c=c.next(function(){return function(l){l.createObjectStore(ki.store)}(t),s.be(a)})),r<7&&i>=7&&(c=c.next(function(){return s.ve(a)})),r<8&&i>=8&&(c=c.next(function(){return s.Pe(t,a)})),r<9&&i>=9&&(c=c.next(function(){(function(l){l.objectStoreNames.contains("remoteDocumentChanges")&&l.deleteObjectStore("remoteDocumentChanges")})(t),function(l){var h=l.objectStore(At.store);h.createIndex(At.readTimeIndex,At.readTimeIndexPath,{unique:!1}),h.createIndex(At.collectionReadTimeIndex,At.collectionReadTimeIndexPath,{unique:!1})}(n)})),r<10&&i>=10&&(c=c.next(function(){return s.Ve(a)})),r<11&&i>=11&&(c=c.next(function(){(function(l){l.createObjectStore(sc.store,{keyPath:sc.keyPath})})(t),function(l){l.createObjectStore(ac.store,{keyPath:ac.keyPath})}(t)})),c},e.prototype.be=function(t){var n=0;return t.store(At.store).$t(function(r,i){n+=cv(i)}).next(function(){var r=new ki(n);return t.store(ki.store).put(ki.key,r)})},e.prototype.Re=function(t){var n=this,r=t.store(Xo.store),i=t.store(vt.store);return r.Nt().next(function(s){return W.forEach(s,function(a){var c=IDBKeyRange.bound([a.userId,-1],[a.userId,a.lastAcknowledgedBatchId]);return i.Nt(vt.userMutationsIndex,c).next(function(l){return W.forEach(l,function(h){be(h.userId===a.userId);var d=Eu(n.R,h);return OL(t,a.userId,d).next(function(){})})})})})},e.prototype.ve=function(t){var n=t.store(mn.store),r=t.store(At.store);return t.store(br.store).get(br.key).next(function(i){var s=[];return r.$t(function(a,c){var l=new Je(a),h=function(d){return[0,li(d)]}(l);s.push(n.get(h).next(function(d){return d?W.resolve():function(v){return n.put(new mn(0,li(v),i.highestListenSequenceNumber))}(l)}))}).next(function(){return W.waitFor(s)})})},e.prototype.Pe=function(t,n){t.createObjectStore(oa.store,{keyPath:oa.keyPath});var r=n.store(oa.store),i=new _T,s=function(a){if(i.add(a)){var c=a.lastSegment(),l=a.popLast();return r.put({collectionId:c,parent:li(l)})}};return n.store(At.store).$t({Ft:!0},function(a,c){var l=new Je(a);return s(l.popLast())}).next(function(){return n.store(Cn.store).$t({Ft:!0},function(a,c){a[0];var l=a[1];a[2];var h=ro(l);return s(h.popLast())})})},e.prototype.Ve=function(t){var n=this,r=t.store(sr.store);return r.$t(function(i,s){var a=ql(s),c=xL(n.R,a);return r.put(c)})},e}();function iN(e){e.createObjectStore(mn.store,{keyPath:mn.keyPath}).createIndex(mn.documentTargetsIndex,mn.documentTargetsKeyPath,{unique:!0}),e.createObjectStore(sr.store,{keyPath:sr.keyPath}).createIndex(sr.queryTargetsIndexName,sr.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(br.store)}var sw="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",C8=function(){function e(t,n,r,i,s,a,c,l,h,d){if(this.allowTabSynchronization=t,this.persistenceKey=n,this.clientId=r,this.Se=s,this.window=a,this.document=c,this.De=h,this.Ce=d,this.Ne=null,this.xe=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ke=null,this.inForeground=!1,this.Fe=null,this.$e=null,this.Oe=Number.NEGATIVE_INFINITY,this.Me=function(v){return Promise.resolve()},!e.yt())throw new H(D.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new E8(this,i),this.Le=n+"main",this.R=new RL(l),this.Be=new uc(this.Le,11,new S8(this.R)),this.qe=new y8(this.referenceDelegate,this.R),this.Ut=new g8,this.Ue=function(v,g){return new T8(v,g)}(this.R,this.Ut),this.Ke=new p8,this.window&&this.window.localStorage?this.Qe=this.window.localStorage:(this.Qe=null,d===!1&&Ft("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return e.prototype.start=function(){var t=this;return this.je().then(function(){if(!t.isPrimary&&!t.allowTabSynchronization)throw new H(D.FAILED_PRECONDITION,sw);return t.We(),t.Ge(),t.ze(),t.runTransaction("getHighestListenSequenceNumber","readonly",function(n){return t.qe.getHighestSequenceNumber(n)})}).then(function(n){t.Ne=new Tr(n,t.De)}).then(function(){t.xe=!0}).catch(function(n){return t.Be&&t.Be.close(),Promise.reject(n)})},e.prototype.He=function(t){var n=this;return this.Me=function(r){return R(n,void 0,void 0,function(){return A(this,function(i){return this.started?[2,t(r)]:[2]})})},t(this.isPrimary)},e.prototype.setDatabaseDeletedListener=function(t){var n=this;this.Be.vt(function(r){return R(n,void 0,void 0,function(){return A(this,function(i){switch(i.label){case 0:return r.newVersion===null?[4,t()]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})})},e.prototype.setNetworkEnabled=function(t){var n=this;this.networkEnabled!==t&&(this.networkEnabled=t,this.Se.enqueueAndForget(function(){return R(n,void 0,void 0,function(){return A(this,function(r){switch(r.label){case 0:return this.started?[4,this.je()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})}))},e.prototype.je=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",function(n){return zd(n).put(new so(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next(function(){if(t.isPrimary)return t.Je(n).next(function(r){r||(t.isPrimary=!1,t.Se.enqueueRetryable(function(){return t.Me(!1)}))})}).next(function(){return t.Ye(n)}).next(function(r){return t.isPrimary&&!r?t.Xe(n).next(function(){return!1}):!!r&&t.Ze(n).next(function(){return!0})})}).catch(function(n){if(La(n))return Y("IndexedDbPersistence","Failed to extend owner lease: ",n),t.isPrimary;if(!t.allowTabSynchronization)throw n;return Y("IndexedDbPersistence","Releasing owner lease after error during lease refresh",n),!1}).then(function(n){t.isPrimary!==n&&t.Se.enqueueRetryable(function(){return t.Me(n)}),t.isPrimary=n})},e.prototype.Je=function(t){var n=this;return Ll(t).get(wr.key).next(function(r){return W.resolve(n.tn(r))})},e.prototype.en=function(t){return zd(t).delete(this.clientId)},e.prototype.nn=function(){return R(this,void 0,void 0,function(){var t,n,r,i,s=this;return A(this,function(a){switch(a.label){case 0:return!this.isPrimary||this.sn(this.Oe,18e5)?[3,2]:(this.Oe=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",function(c){var l=dr(c,so.store);return l.Nt().next(function(h){var d=s.rn(h,18e5),v=h.filter(function(g){return d.indexOf(g)===-1});return W.forEach(v,function(g){return l.delete(g.clientId)}).next(function(){return v})})}).catch(function(){return[]})]);case 1:if(t=a.sent(),this.Qe)for(n=0,r=t;nr&&(Ft("Detected an update time that is in the future: "+t+" > "+r),1))},e.prototype.We=function(){var t=this;this.document!==null&&typeof this.document.addEventListener=="function"&&(this.Fe=function(){t.Se.enqueueAndForget(function(){return t.inForeground=t.document.visibilityState==="visible",t.je()})},this.document.addEventListener("visibilitychange",this.Fe),this.inForeground=this.document.visibilityState==="visible")},e.prototype.an=function(){this.Fe&&(this.document.removeEventListener("visibilitychange",this.Fe),this.Fe=null)},e.prototype.Ge=function(){var t,n=this;typeof((t=this.window)===null||t===void 0?void 0:t.addEventListener)=="function"&&(this.ke=function(){n.un(),lW()&&navigator.appVersion.match("Version/14")&&n.Se.enterRestrictedMode(!0),n.Se.enqueueAndForget(function(){return n.shutdown()})},this.window.addEventListener("pagehide",this.ke))},e.prototype.hn=function(){this.ke&&(this.window.removeEventListener("pagehide",this.ke),this.ke=null)},e.prototype.cn=function(t){var n;try{var r=((n=this.Qe)===null||n===void 0?void 0:n.getItem(this.on(t)))!==null;return Y("IndexedDbPersistence","Client '"+t+"' "+(r?"is":"is not")+" zombied in LocalStorage"),r}catch(i){return Ft("IndexedDbPersistence","Failed to get zombied client id.",i),!1}},e.prototype.un=function(){if(this.Qe)try{this.Qe.setItem(this.on(this.clientId),String(Date.now()))}catch(t){Ft("Failed to set zombie client id.",t)}},e.prototype.ln=function(){if(this.Qe)try{this.Qe.removeItem(this.on(this.clientId))}catch{}},e.prototype.on=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},e}();function Ll(e){return dr(e,wr.store)}function zd(e){return dr(e,so.store)}function wT(e,t){var n=e.projectId;return e.isDefaultDatabase||(n+="."+e.database),"firestore/"+t+"/"+n+"/"}var A8=function(e,t){this.progress=e,this.wn=t},LL=function(){function e(t,n,r){this.Ue=t,this._n=n,this.Ut=r}return e.prototype.mn=function(t,n){var r=this;return this._n.getAllMutationBatchesAffectingDocumentKey(t,n).next(function(i){return r.yn(t,n,i)})},e.prototype.yn=function(t,n,r){return this.Ue.getEntry(t,n).next(function(i){for(var s=0,a=r;s0)},e.prototype.Dn=function(t,n){return Lb()<=Le.DEBUG&&Y("QueryEngine","Using full collection scan to execute query:",jb(n)),this.Sn.getDocumentsMatchingQuery(t,n,De.min())},e}(),R8=function(){function e(t,n,r,i){this.persistence=t,this.xn=n,this.R=i,this.kn=new Dn(Ve),this.Fn=new Dc(function(s){return mh(s)},Sg),this.$n=De.min(),this._n=t.getMutationQueue(r),this.On=t.getRemoteDocumentCache(),this.qe=t.getTargetCache(),this.Mn=new LL(this.On,this._n,this.persistence.getIndexManager()),this.Ke=t.getBundleCache(),this.xn.Vn(this.Mn)}return e.prototype.collectGarbage=function(t){var n=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",function(r){return t.collect(r,n.kn)})},e}();/** + */var E8=function(){function e(t){this.R=t}return e.prototype.Rt=function(t,n,r,i){var s=this;be(r=0&&i<=11);var a=new kL("createOrUpgrade",n);r<1&&i>=1&&(function(l){l.createObjectStore(_r.store)}(t),function(l){l.createObjectStore(Xo.store,{keyPath:Xo.keyPath}),l.createObjectStore(vt.store,{keyPath:vt.keyPath,autoIncrement:!0}).createIndex(vt.userMutationsIndex,vt.userMutationsKeyPath,{unique:!0}),l.createObjectStore(Sn.store)}(t),iN(t),function(l){l.createObjectStore(At.store)}(t));var c=W.resolve();return r<3&&i>=3&&(r!==0&&(function(l){l.deleteObjectStore(mn.store),l.deleteObjectStore(or.store),l.deleteObjectStore(wr.store)}(t),iN(t)),c=c.next(function(){return function(l){var h=l.store(wr.store),d=new wr(0,0,De.min().toTimestamp(),0);return h.put(wr.key,d)}(a)})),r<4&&i>=4&&(r!==0&&(c=c.next(function(){return function(l,h){return h.store(vt.store).Nt().next(function(d){l.deleteObjectStore(vt.store),l.createObjectStore(vt.store,{keyPath:vt.keyPath,autoIncrement:!0}).createIndex(vt.userMutationsIndex,vt.userMutationsKeyPath,{unique:!0});var v=h.store(vt.store),g=d.map(function(y){return v.put(y)});return W.waitFor(g)})}(t,a)})),c=c.next(function(){(function(l){l.createObjectStore(oo.store,{keyPath:oo.keyPath})})(t)})),r<5&&i>=5&&(c=c.next(function(){return s.Re(a)})),r<6&&i>=6&&(c=c.next(function(){return function(l){l.createObjectStore(ki.store)}(t),s.be(a)})),r<7&&i>=7&&(c=c.next(function(){return s.ve(a)})),r<8&&i>=8&&(c=c.next(function(){return s.Pe(t,a)})),r<9&&i>=9&&(c=c.next(function(){(function(l){l.objectStoreNames.contains("remoteDocumentChanges")&&l.deleteObjectStore("remoteDocumentChanges")})(t),function(l){var h=l.objectStore(At.store);h.createIndex(At.readTimeIndex,At.readTimeIndexPath,{unique:!1}),h.createIndex(At.collectionReadTimeIndex,At.collectionReadTimeIndexPath,{unique:!1})}(n)})),r<10&&i>=10&&(c=c.next(function(){return s.Ve(a)})),r<11&&i>=11&&(c=c.next(function(){(function(l){l.createObjectStore(sc.store,{keyPath:sc.keyPath})})(t),function(l){l.createObjectStore(ac.store,{keyPath:ac.keyPath})}(t)})),c},e.prototype.be=function(t){var n=0;return t.store(At.store).$t(function(r,i){n+=cv(i)}).next(function(){var r=new ki(n);return t.store(ki.store).put(ki.key,r)})},e.prototype.Re=function(t){var n=this,r=t.store(Xo.store),i=t.store(vt.store);return r.Nt().next(function(s){return W.forEach(s,function(a){var c=IDBKeyRange.bound([a.userId,-1],[a.userId,a.lastAcknowledgedBatchId]);return i.Nt(vt.userMutationsIndex,c).next(function(l){return W.forEach(l,function(h){be(h.userId===a.userId);var d=Eu(n.R,h);return OL(t,a.userId,d).next(function(){})})})})})},e.prototype.ve=function(t){var n=t.store(mn.store),r=t.store(At.store);return t.store(wr.store).get(wr.key).next(function(i){var s=[];return r.$t(function(a,c){var l=new Xe(a),h=function(d){return[0,li(d)]}(l);s.push(n.get(h).next(function(d){return d?W.resolve():function(v){return n.put(new mn(0,li(v),i.highestListenSequenceNumber))}(l)}))}).next(function(){return W.waitFor(s)})})},e.prototype.Pe=function(t,n){t.createObjectStore(oa.store,{keyPath:oa.keyPath});var r=n.store(oa.store),i=new _T,s=function(a){if(i.add(a)){var c=a.lastSegment(),l=a.popLast();return r.put({collectionId:c,parent:li(l)})}};return n.store(At.store).$t({Ft:!0},function(a,c){var l=new Xe(a);return s(l.popLast())}).next(function(){return n.store(Sn.store).$t({Ft:!0},function(a,c){a[0];var l=a[1];a[2];var h=ro(l);return s(h.popLast())})})},e.prototype.Ve=function(t){var n=this,r=t.store(or.store);return r.$t(function(i,s){var a=ql(s),c=xL(n.R,a);return r.put(c)})},e}();function iN(e){e.createObjectStore(mn.store,{keyPath:mn.keyPath}).createIndex(mn.documentTargetsIndex,mn.documentTargetsKeyPath,{unique:!0}),e.createObjectStore(or.store,{keyPath:or.keyPath}).createIndex(or.queryTargetsIndexName,or.queryTargetsKeyPath,{unique:!0}),e.createObjectStore(wr.store)}var sw="Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.",T8=function(){function e(t,n,r,i,s,a,c,l,h,d){if(this.allowTabSynchronization=t,this.persistenceKey=n,this.clientId=r,this.Se=s,this.window=a,this.document=c,this.De=h,this.Ce=d,this.Ne=null,this.xe=!1,this.isPrimary=!1,this.networkEnabled=!0,this.ke=null,this.inForeground=!1,this.Fe=null,this.$e=null,this.Oe=Number.NEGATIVE_INFINITY,this.Me=function(v){return Promise.resolve()},!e.yt())throw new H(D.UNIMPLEMENTED,"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.");this.referenceDelegate=new _8(this,i),this.Le=n+"main",this.R=new RL(l),this.Be=new uc(this.Le,11,new E8(this.R)),this.qe=new v8(this.referenceDelegate,this.R),this.Ut=new d8,this.Ue=function(v,g){return new w8(v,g)}(this.R,this.Ut),this.Ke=new f8,this.window&&this.window.localStorage?this.Qe=this.window.localStorage:(this.Qe=null,d===!1&&Ft("IndexedDbPersistence","LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page."))}return e.prototype.start=function(){var t=this;return this.je().then(function(){if(!t.isPrimary&&!t.allowTabSynchronization)throw new H(D.FAILED_PRECONDITION,sw);return t.We(),t.Ge(),t.ze(),t.runTransaction("getHighestListenSequenceNumber","readonly",function(n){return t.qe.getHighestSequenceNumber(n)})}).then(function(n){t.Ne=new Tr(n,t.De)}).then(function(){t.xe=!0}).catch(function(n){return t.Be&&t.Be.close(),Promise.reject(n)})},e.prototype.He=function(t){var n=this;return this.Me=function(r){return R(n,void 0,void 0,function(){return A(this,function(i){return this.started?[2,t(r)]:[2]})})},t(this.isPrimary)},e.prototype.setDatabaseDeletedListener=function(t){var n=this;this.Be.vt(function(r){return R(n,void 0,void 0,function(){return A(this,function(i){switch(i.label){case 0:return r.newVersion===null?[4,t()]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})})},e.prototype.setNetworkEnabled=function(t){var n=this;this.networkEnabled!==t&&(this.networkEnabled=t,this.Se.enqueueAndForget(function(){return R(n,void 0,void 0,function(){return A(this,function(r){switch(r.label){case 0:return this.started?[4,this.je()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})}))},e.prototype.je=function(){var t=this;return this.runTransaction("updateClientMetadataAndTryBecomePrimary","readwrite",function(n){return Qd(n).put(new oo(t.clientId,Date.now(),t.networkEnabled,t.inForeground)).next(function(){if(t.isPrimary)return t.Je(n).next(function(r){r||(t.isPrimary=!1,t.Se.enqueueRetryable(function(){return t.Me(!1)}))})}).next(function(){return t.Ye(n)}).next(function(r){return t.isPrimary&&!r?t.Xe(n).next(function(){return!1}):!!r&&t.Ze(n).next(function(){return!0})})}).catch(function(n){if(La(n))return Y("IndexedDbPersistence","Failed to extend owner lease: ",n),t.isPrimary;if(!t.allowTabSynchronization)throw n;return Y("IndexedDbPersistence","Releasing owner lease after error during lease refresh",n),!1}).then(function(n){t.isPrimary!==n&&t.Se.enqueueRetryable(function(){return t.Me(n)}),t.isPrimary=n})},e.prototype.Je=function(t){var n=this;return Ll(t).get(_r.key).next(function(r){return W.resolve(n.tn(r))})},e.prototype.en=function(t){return Qd(t).delete(this.clientId)},e.prototype.nn=function(){return R(this,void 0,void 0,function(){var t,n,r,i,s=this;return A(this,function(a){switch(a.label){case 0:return!this.isPrimary||this.sn(this.Oe,18e5)?[3,2]:(this.Oe=Date.now(),[4,this.runTransaction("maybeGarbageCollectMultiClientState","readwrite-primary",function(c){var l=hr(c,oo.store);return l.Nt().next(function(h){var d=s.rn(h,18e5),v=h.filter(function(g){return d.indexOf(g)===-1});return W.forEach(v,function(g){return l.delete(g.clientId)}).next(function(){return v})})}).catch(function(){return[]})]);case 1:if(t=a.sent(),this.Qe)for(n=0,r=t;nr&&(Ft("Detected an update time that is in the future: "+t+" > "+r),1))},e.prototype.We=function(){var t=this;this.document!==null&&typeof this.document.addEventListener=="function"&&(this.Fe=function(){t.Se.enqueueAndForget(function(){return t.inForeground=t.document.visibilityState==="visible",t.je()})},this.document.addEventListener("visibilitychange",this.Fe),this.inForeground=this.document.visibilityState==="visible")},e.prototype.an=function(){this.Fe&&(this.document.removeEventListener("visibilitychange",this.Fe),this.Fe=null)},e.prototype.Ge=function(){var t,n=this;typeof((t=this.window)===null||t===void 0?void 0:t.addEventListener)=="function"&&(this.ke=function(){n.un(),aW()&&navigator.appVersion.match("Version/14")&&n.Se.enterRestrictedMode(!0),n.Se.enqueueAndForget(function(){return n.shutdown()})},this.window.addEventListener("pagehide",this.ke))},e.prototype.hn=function(){this.ke&&(this.window.removeEventListener("pagehide",this.ke),this.ke=null)},e.prototype.cn=function(t){var n;try{var r=((n=this.Qe)===null||n===void 0?void 0:n.getItem(this.on(t)))!==null;return Y("IndexedDbPersistence","Client '"+t+"' "+(r?"is":"is not")+" zombied in LocalStorage"),r}catch(i){return Ft("IndexedDbPersistence","Failed to get zombied client id.",i),!1}},e.prototype.un=function(){if(this.Qe)try{this.Qe.setItem(this.on(this.clientId),String(Date.now()))}catch(t){Ft("Failed to set zombie client id.",t)}},e.prototype.ln=function(){if(this.Qe)try{this.Qe.removeItem(this.on(this.clientId))}catch{}},e.prototype.on=function(t){return"firestore_zombie_"+this.persistenceKey+"_"+t},e}();function Ll(e){return hr(e,_r.store)}function Qd(e){return hr(e,oo.store)}function wT(e,t){var n=e.projectId;return e.isDefaultDatabase||(n+="."+e.database),"firestore/"+t+"/"+n+"/"}var I8=function(e,t){this.progress=e,this.wn=t},LL=function(){function e(t,n,r){this.Ue=t,this._n=n,this.Ut=r}return e.prototype.mn=function(t,n){var r=this;return this._n.getAllMutationBatchesAffectingDocumentKey(t,n).next(function(i){return r.yn(t,n,i)})},e.prototype.yn=function(t,n,r){return this.Ue.getEntry(t,n).next(function(i){for(var s=0,a=r;s0)},e.prototype.Dn=function(t,n){return Lb()<=Le.DEBUG&&Y("QueryEngine","Using full collection scan to execute query:",jb(n)),this.Sn.getDocumentsMatchingQuery(t,n,De.min())},e}(),C8=function(){function e(t,n,r,i){this.persistence=t,this.xn=n,this.R=i,this.kn=new Pn(Ve),this.Fn=new Dc(function(s){return yh(s)},Sg),this.$n=De.min(),this._n=t.getMutationQueue(r),this.On=t.getRemoteDocumentCache(),this.qe=t.getTargetCache(),this.Mn=new LL(this.On,this._n,this.persistence.getIndexManager()),this.Ke=t.getBundleCache(),this.xn.Vn(this.Mn)}return e.prototype.collectGarbage=function(t){var n=this;return this.persistence.runTransaction("Collect garbage","readwrite-primary",function(r){return t.collect(r,n.kn)})},e}();/** * @license * Copyright 2017 Google LLC * @@ -2372,7 +2372,7 @@ Total Duration: `+(h-v)+"ms"),W.resolve({didRun:!0,sequenceNumbersCollected:i,ta * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function UL(e,t,n,r){return new R8(e,t,n,r)}function jL(e,t){return R(this,void 0,void 0,function(){var n,r,i,s;return A(this,function(a){switch(a.label){case 0:return n=ee(e),r=n._n,i=n.Mn,[4,n.persistence.runTransaction("Handle user change","readonly",function(c){var l;return n._n.getAllMutationBatches(c).next(function(h){return l=h,r=n.persistence.getMutationQueue(t),i=new LL(n.On,r,n.persistence.getIndexManager()),r.getAllMutationBatches(c)}).next(function(h){for(var d=[],v=[],g=ot(),y=0,_=l;y<_.length;y++){var b=_[y];d.push(b.batchId);for(var T=0,C=b.mutations;T0){var _=g.withResumeToken(y,r).withSequenceNumber(s.currentSequenceNumber);i=i.insert(v,_),function(b,T,C){return be(T.resumeToken.approximateByteSize()>0),b.resumeToken.approximateByteSize()===0||T.snapshotVersion.toMicroseconds()-b.snapshotVersion.toMicroseconds()>=3e8||C.addedDocuments.size+C.modifiedDocuments.size+C.removedDocuments.size>0}(g,_,d)&&c.push(n.qe.updateTargetData(s,_))}}});var l=qr();if(t.documentUpdates.forEach(function(d,v){t.resolvedLimboDocuments.has(d)&&c.push(n.persistence.referenceDelegate.updateLimboDocument(s,d))}),c.push(BL(s,a,t.documentUpdates,r,void 0).next(function(d){l=d})),!r.isEqual(De.min())){var h=n.qe.getLastRemoteSnapshotVersion(s).next(function(d){return n.qe.setTargetsMetadata(s,s.currentSequenceNumber,r)});c.push(h)}return W.waitFor(c).next(function(){return a.apply(s)}).next(function(){return n.Mn.En(s,l)}).next(function(){return l})}).then(function(s){return n.kn=i,s})}function BL(e,t,n,r,i){var s=ot();return n.forEach(function(a){return s=s.add(a)}),t.getEntries(e,s).next(function(a){var c=qr();return n.forEach(function(l,h){var d=a.get(l),v=(i==null?void 0:i.get(l))||r;h.isNoDocument()&&h.version.isEqual(De.min())?(t.removeEntry(l,v),c=c.insert(l,h)):!d.isValidDocument()||h.version.compareTo(d.version)>0||h.version.compareTo(d.version)===0&&d.hasPendingWrites?(t.addEntry(h,v),c=c.insert(l,h)):Y("LocalStore","Ignoring outdated watch update for ",l,". Current version:",d.version," Watch version:",h.version)}),c})}function O8(e,t){var n=ee(e);return n.persistence.runTransaction("Get next mutation batch","readonly",function(r){return t===void 0&&(t=-1),n._n.getNextMutationBatchAfterBatchId(r,t)})}function fc(e,t){var n=ee(e);return n.persistence.runTransaction("Allocate target","readwrite",function(r){var i;return n.qe.getTargetData(r,t).next(function(s){return s?(i=s,W.resolve(i)):n.qe.allocateTargetId(r).next(function(a){return i=new Rg(t,a,0,r.currentSequenceNumber),n.qe.addTargetData(r,i).next(function(){return i})})})}).then(function(r){var i=n.kn.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.kn=n.kn.insert(r.targetId,r),n.Fn.set(t,r.targetId)),r})}function hc(e,t,n){return R(this,void 0,void 0,function(){var r,i,s,a;return A(this,function(c){switch(c.label){case 0:r=ee(e),i=r.kn.get(t),s=n?"readwrite":"readwrite-primary",c.label=1;case 1:return c.trys.push([1,4,,5]),n?[3,3]:[4,r.persistence.runTransaction("Release target",s,function(l){return r.persistence.referenceDelegate.removeTarget(l,i)})];case 2:c.sent(),c.label=3;case 3:return[3,5];case 4:if(!La(a=c.sent()))throw a;return Y("LocalStore","Failed to update sequence numbers for target "+t+": "+a),[3,5];case 5:return r.kn=r.kn.remove(t),r.Fn.delete(i.target),[2]}})})}function fv(e,t,n){var r=ee(e),i=De.min(),s=ot();return r.persistence.runTransaction("Execute query","readonly",function(a){return function(c,l,h){var d=ee(c),v=d.Fn.get(h);return v!==void 0?W.resolve(d.kn.get(v)):d.qe.getTargetData(l,h)}(r,a,Kr(t)).next(function(c){if(c)return i=c.lastLimboFreeSnapshotVersion,r.qe.getMatchingKeysForTargetId(a,c.targetId).next(function(l){s=l})}).next(function(){return r.xn.getDocumentsMatchingQuery(a,t,n?i:De.min(),n?s:ot())}).next(function(c){return{documents:c,Bn:s}})})}function qL(e,t){var n=ee(e),r=ee(n.qe),i=n.kn.get(t);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",function(s){return r.lt(s,t).next(function(a){return a?a.target:null})})}function $L(e){var t=ee(e);return t.persistence.runTransaction("Get new document changes","readonly",function(n){return function(r,i,s){var a=ee(r),c=qr(),l=mT(s),h=Bo(i),d=IDBKeyRange.lowerBound(l,!0);return h.$t({index:At.readTimeIndex,range:d},function(v,g){var y=$b(a.R,g);c=c.insert(y.key,y),l=g.readTime}).next(function(){return{wn:c,readTime:NL(l)}})}(t.On,n,t.$n)}).then(function(n){var r=n.wn,i=n.readTime;return t.$n=i,r})}function P8(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){return[2,(t=ee(e)).persistence.runTransaction("Synchronize last document change read time","readonly",function(r){return function(i){var s=Bo(i),a=De.min();return s.$t({index:At.readTimeIndex,reverse:!0},function(c,l,h){l.readTime&&(a=NL(l.readTime)),h.done()}).next(function(){return a})}(r)}).then(function(r){t.$n=r})]})})}function D8(e,t,n,r){return R(this,void 0,void 0,function(){var i,s,a,c,l,h,d,v,g,y;return A(this,function(_){switch(_.label){case 0:for(i=ee(e),s=ot(),a=qr(),c=dL(),l=0,h=n;l=0)return i.Ke.saveNamedQuery(a,t);var l=r.withResumeToken(Qn.EMPTY_BYTE_STRING,c);return i.kn=i.kn.insert(l.targetId,l),i.qe.updateTargetData(a,l).next(function(){return i.qe.removeMatchingKeysForTargetId(a,r.targetId)}).next(function(){return i.qe.addMatchingKeys(a,n,r.targetId)}).next(function(){return i.Ke.saveNamedQuery(a,t)})})]}})})}/** + */function UL(e,t,n,r){return new C8(e,t,n,r)}function jL(e,t){return R(this,void 0,void 0,function(){var n,r,i,s;return A(this,function(a){switch(a.label){case 0:return n=ee(e),r=n._n,i=n.Mn,[4,n.persistence.runTransaction("Handle user change","readonly",function(c){var l;return n._n.getAllMutationBatches(c).next(function(h){return l=h,r=n.persistence.getMutationQueue(t),i=new LL(n.On,r,n.persistence.getIndexManager()),r.getAllMutationBatches(c)}).next(function(h){for(var d=[],v=[],g=ot(),y=0,_=l;y<_.length;y++){var b=_[y];d.push(b.batchId);for(var T=0,C=b.mutations;T0){var _=g.withResumeToken(y,r).withSequenceNumber(s.currentSequenceNumber);i=i.insert(v,_),function(b,T,C){return be(T.resumeToken.approximateByteSize()>0),b.resumeToken.approximateByteSize()===0||T.snapshotVersion.toMicroseconds()-b.snapshotVersion.toMicroseconds()>=3e8||C.addedDocuments.size+C.modifiedDocuments.size+C.removedDocuments.size>0}(g,_,d)&&c.push(n.qe.updateTargetData(s,_))}}});var l=qr();if(t.documentUpdates.forEach(function(d,v){t.resolvedLimboDocuments.has(d)&&c.push(n.persistence.referenceDelegate.updateLimboDocument(s,d))}),c.push(BL(s,a,t.documentUpdates,r,void 0).next(function(d){l=d})),!r.isEqual(De.min())){var h=n.qe.getLastRemoteSnapshotVersion(s).next(function(d){return n.qe.setTargetsMetadata(s,s.currentSequenceNumber,r)});c.push(h)}return W.waitFor(c).next(function(){return a.apply(s)}).next(function(){return n.Mn.En(s,l)}).next(function(){return l})}).then(function(s){return n.kn=i,s})}function BL(e,t,n,r,i){var s=ot();return n.forEach(function(a){return s=s.add(a)}),t.getEntries(e,s).next(function(a){var c=qr();return n.forEach(function(l,h){var d=a.get(l),v=(i==null?void 0:i.get(l))||r;h.isNoDocument()&&h.version.isEqual(De.min())?(t.removeEntry(l,v),c=c.insert(l,h)):!d.isValidDocument()||h.version.compareTo(d.version)>0||h.version.compareTo(d.version)===0&&d.hasPendingWrites?(t.addEntry(h,v),c=c.insert(l,h)):Y("LocalStore","Ignoring outdated watch update for ",l,". Current version:",d.version," Watch version:",h.version)}),c})}function R8(e,t){var n=ee(e);return n.persistence.runTransaction("Get next mutation batch","readonly",function(r){return t===void 0&&(t=-1),n._n.getNextMutationBatchAfterBatchId(r,t)})}function fc(e,t){var n=ee(e);return n.persistence.runTransaction("Allocate target","readwrite",function(r){var i;return n.qe.getTargetData(r,t).next(function(s){return s?(i=s,W.resolve(i)):n.qe.allocateTargetId(r).next(function(a){return i=new Rg(t,a,0,r.currentSequenceNumber),n.qe.addTargetData(r,i).next(function(){return i})})})}).then(function(r){var i=n.kn.get(r.targetId);return(i===null||r.snapshotVersion.compareTo(i.snapshotVersion)>0)&&(n.kn=n.kn.insert(r.targetId,r),n.Fn.set(t,r.targetId)),r})}function hc(e,t,n){return R(this,void 0,void 0,function(){var r,i,s,a;return A(this,function(c){switch(c.label){case 0:r=ee(e),i=r.kn.get(t),s=n?"readwrite":"readwrite-primary",c.label=1;case 1:return c.trys.push([1,4,,5]),n?[3,3]:[4,r.persistence.runTransaction("Release target",s,function(l){return r.persistence.referenceDelegate.removeTarget(l,i)})];case 2:c.sent(),c.label=3;case 3:return[3,5];case 4:if(!La(a=c.sent()))throw a;return Y("LocalStore","Failed to update sequence numbers for target "+t+": "+a),[3,5];case 5:return r.kn=r.kn.remove(t),r.Fn.delete(i.target),[2]}})})}function fv(e,t,n){var r=ee(e),i=De.min(),s=ot();return r.persistence.runTransaction("Execute query","readonly",function(a){return function(c,l,h){var d=ee(c),v=d.Fn.get(h);return v!==void 0?W.resolve(d.kn.get(v)):d.qe.getTargetData(l,h)}(r,a,Kr(t)).next(function(c){if(c)return i=c.lastLimboFreeSnapshotVersion,r.qe.getMatchingKeysForTargetId(a,c.targetId).next(function(l){s=l})}).next(function(){return r.xn.getDocumentsMatchingQuery(a,t,n?i:De.min(),n?s:ot())}).next(function(c){return{documents:c,Bn:s}})})}function qL(e,t){var n=ee(e),r=ee(n.qe),i=n.kn.get(t);return i?Promise.resolve(i.target):n.persistence.runTransaction("Get target data","readonly",function(s){return r.lt(s,t).next(function(a){return a?a.target:null})})}function $L(e){var t=ee(e);return t.persistence.runTransaction("Get new document changes","readonly",function(n){return function(r,i,s){var a=ee(r),c=qr(),l=mT(s),h=Vo(i),d=IDBKeyRange.lowerBound(l,!0);return h.$t({index:At.readTimeIndex,range:d},function(v,g){var y=$b(a.R,g);c=c.insert(y.key,y),l=g.readTime}).next(function(){return{wn:c,readTime:NL(l)}})}(t.On,n,t.$n)}).then(function(n){var r=n.wn,i=n.readTime;return t.$n=i,r})}function N8(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){return[2,(t=ee(e)).persistence.runTransaction("Synchronize last document change read time","readonly",function(r){return function(i){var s=Vo(i),a=De.min();return s.$t({index:At.readTimeIndex,reverse:!0},function(c,l,h){l.readTime&&(a=NL(l.readTime)),h.done()}).next(function(){return a})}(r)}).then(function(r){t.$n=r})]})})}function x8(e,t,n,r){return R(this,void 0,void 0,function(){var i,s,a,c,l,h,d,v,g,y;return A(this,function(_){switch(_.label){case 0:for(i=ee(e),s=ot(),a=qr(),c=dL(),l=0,h=n;l=0)return i.Ke.saveNamedQuery(a,t);var l=r.withResumeToken(zn.EMPTY_BYTE_STRING,c);return i.kn=i.kn.insert(l.targetId,l),i.qe.updateTargetData(a,l).next(function(){return i.qe.removeMatchingKeysForTargetId(a,r.targetId)}).next(function(){return i.qe.addMatchingKeys(a,n,r.targetId)}).next(function(){return i.Ke.saveNamedQuery(a,t)})})]}})})}/** * @license * Copyright 2020 Google LLC * @@ -2387,7 +2387,7 @@ Total Duration: `+(h-v)+"ms"),W.resolve({didRun:!0,sequenceNumbersCollected:i,ta * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var L8=function(){function e(t){this.R=t,this.Qn=new Map,this.jn=new Map}return e.prototype.getBundleMetadata=function(t,n){return W.resolve(this.Qn.get(n))},e.prototype.saveBundleMetadata=function(t,n){var r;return this.Qn.set(n.id,{id:(r=n).id,version:r.version,createTime:sn(r.createTime)}),W.resolve()},e.prototype.getNamedQuery=function(t,n){return W.resolve(this.jn.get(n))},e.prototype.saveNamedQuery=function(t,n){return this.jn.set(n.name,function(r){return{name:r.name,query:yT(r.bundledQuery),readTime:sn(r.readTime)}}(n)),W.resolve()},e}(),bT=function(){function e(){this.Wn=new zt(Xt.Gn),this.zn=new zt(Xt.Hn)}return e.prototype.isEmpty=function(){return this.Wn.isEmpty()},e.prototype.addReference=function(t,n){var r=new Xt(t,n);this.Wn=this.Wn.add(r),this.zn=this.zn.add(r)},e.prototype.Jn=function(t,n){var r=this;t.forEach(function(i){return r.addReference(i,n)})},e.prototype.removeReference=function(t,n){this.Yn(new Xt(t,n))},e.prototype.Xn=function(t,n){var r=this;t.forEach(function(i){return r.removeReference(i,n)})},e.prototype.Zn=function(t){var n=this,r=new de(new Je([])),i=new Xt(r,t),s=new Xt(r,t+1),a=[];return this.zn.forEachInRange([i,s],function(c){n.Yn(c),a.push(c.key)}),a},e.prototype.ts=function(){var t=this;this.Wn.forEach(function(n){return t.Yn(n)})},e.prototype.Yn=function(t){this.Wn=this.Wn.delete(t),this.zn=this.zn.delete(t)},e.prototype.es=function(t){var n=new de(new Je([])),r=new Xt(n,t),i=new Xt(n,t+1),s=ot();return this.zn.forEachInRange([r,i],function(a){s=s.add(a.key)}),s},e.prototype.containsKey=function(t){var n=new Xt(t,0),r=this.Wn.firstAfterOrEqual(n);return r!==null&&t.isEqual(r.key)},e}(),Xt=function(){function e(t,n){this.key=t,this.ns=n}return e.Gn=function(t,n){return de.comparator(t.key,n.key)||Ve(t.ns,n.ns)},e.Hn=function(t,n){return Ve(t.ns,n.ns)||de.comparator(t.key,n.key)},e}(),F8=function(){function e(t,n){this.Ut=t,this.referenceDelegate=n,this._n=[],this.ss=1,this.rs=new zt(Xt.Gn)}return e.prototype.checkEmpty=function(t){return W.resolve(this._n.length===0)},e.prototype.addMutationBatch=function(t,n,r,i){var s=this.ss;this.ss++,this._n.length>0&&this._n[this._n.length-1];var a=new gT(s,n,r,i);this._n.push(a);for(var c=0,l=i;cs?this._n[s]:null)},e.prototype.getHighestUnacknowledgedBatchId=function(){return W.resolve(this._n.length===0?-1:this.ss-1)},e.prototype.getAllMutationBatches=function(t){return W.resolve(this._n.slice())},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,n){var r=this,i=new Xt(n,0),s=new Xt(n,Number.POSITIVE_INFINITY),a=[];return this.rs.forEachInRange([i,s],function(c){var l=r.os(c.ns);a.push(l)}),W.resolve(a)},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(t,n){var r=this,i=new zt(Ve);return n.forEach(function(s){var a=new Xt(s,0),c=new Xt(s,Number.POSITIVE_INFINITY);r.rs.forEachInRange([a,c],function(l){i=i.add(l.ns)})}),W.resolve(this.us(i))},e.prototype.getAllMutationBatchesAffectingQuery=function(t,n){var r=n.path,i=r.length+1,s=r;de.isDocumentKey(s)||(s=s.child(""));var a=new Xt(new de(s),0),c=new zt(Ve);return this.rs.forEachWhile(function(l){var h=l.key.path;return!!r.isPrefixOf(h)&&(h.length===i&&(c=c.add(l.ns)),!0)},a),W.resolve(this.us(c))},e.prototype.us=function(t){var n=this,r=[];return t.forEach(function(i){var s=n.os(i);s!==null&&r.push(s)}),r},e.prototype.removeMutationBatch=function(t,n){var r=this;be(this.hs(n.batchId,"removed")===0),this._n.shift();var i=this.rs;return W.forEach(n.mutations,function(s){var a=new Xt(s.key,n.batchId);return i=i.delete(a),r.referenceDelegate.markPotentiallyOrphaned(t,s.key)}).next(function(){r.rs=i})},e.prototype.Gt=function(t){},e.prototype.containsKey=function(t,n){var r=new Xt(n,0),i=this.rs.firstAfterOrEqual(r);return W.resolve(n.isEqual(i&&i.key))},e.prototype.performConsistencyCheck=function(t){return this._n.length,W.resolve()},e.prototype.hs=function(t,n){return this.cs(t)},e.prototype.cs=function(t){return this._n.length===0?0:t-this._n[0].batchId},e.prototype.os=function(t){var n=this.cs(t);return n<0||n>=this._n.length?null:this._n[n]},e}(),U8=function(){function e(t,n){this.Ut=t,this.ls=n,this.docs=new Dn(de.comparator),this.size=0}return e.prototype.addEntry=function(t,n,r){var i=n.key,s=this.docs.get(i),a=s?s.size:0,c=this.ls(n);return this.docs=this.docs.insert(i,{document:n.clone(),size:c,readTime:r}),this.size+=c-a,this.Ut.addToCollectionParentIndex(t,i.path.popLast())},e.prototype.removeEntry=function(t){var n=this.docs.get(t);n&&(this.docs=this.docs.remove(t),this.size-=n.size)},e.prototype.getEntry=function(t,n){var r=this.docs.get(n);return W.resolve(r?r.document.clone():bn.newInvalidDocument(n))},e.prototype.getEntries=function(t,n){var r=this,i=qr();return n.forEach(function(s){var a=r.docs.get(s);i=i.insert(s,a?a.document.clone():bn.newInvalidDocument(s))}),W.resolve(i)},e.prototype.getDocumentsMatchingQuery=function(t,n,r){for(var i=qr(),s=new de(n.path.child("")),a=this.docs.getIteratorFrom(s);a.hasNext();){var c=a.getNext(),l=c.key,h=c.value,d=h.document,v=h.readTime;if(!n.path.isPrefixOf(l.path))break;v.compareTo(r)<=0||_h(n,d)&&(i=i.insert(d.key,d.clone()))}return W.resolve(i)},e.prototype.fs=function(t,n){return W.forEach(this.docs,function(r){return n(r)})},e.prototype.newChangeBuffer=function(t){return new j8(this)},e.prototype.getSize=function(t){return W.resolve(this.size)},e}(),j8=function(e){function t(n){var r=this;return(r=e.call(this)||this).Ie=n,r}return te(t,e),t.prototype.applyChanges=function(n){var r=this,i=[];return this.changes.forEach(function(s,a){a.document.isValidDocument()?i.push(r.Ie.addEntry(n,a.document,r.getReadTime(s))):r.Ie.removeEntry(s)}),W.waitFor(i)},t.prototype.getFromCache=function(n,r){return this.Ie.getEntry(n,r)},t.prototype.getAllFromCache=function(n,r){return this.Ie.getEntries(n,r)},t}(ML),V8=function(){function e(t){this.persistence=t,this.ds=new Dc(function(n){return mh(n)},Sg),this.lastRemoteSnapshotVersion=De.min(),this.highestTargetId=0,this.ws=0,this._s=new bT,this.targetCount=0,this.ys=lv.Jt()}return e.prototype.forEachTarget=function(t,n){return this.ds.forEach(function(r,i){return n(i)}),W.resolve()},e.prototype.getLastRemoteSnapshotVersion=function(t){return W.resolve(this.lastRemoteSnapshotVersion)},e.prototype.getHighestSequenceNumber=function(t){return W.resolve(this.ws)},e.prototype.allocateTargetId=function(t){return this.highestTargetId=this.ys.next(),W.resolve(this.highestTargetId)},e.prototype.setTargetsMetadata=function(t,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.ws&&(this.ws=n),W.resolve()},e.prototype.te=function(t){this.ds.set(t.target,t);var n=t.targetId;n>this.highestTargetId&&(this.ys=new lv(n),this.highestTargetId=n),t.sequenceNumber>this.ws&&(this.ws=t.sequenceNumber)},e.prototype.addTargetData=function(t,n){return this.te(n),this.targetCount+=1,W.resolve()},e.prototype.updateTargetData=function(t,n){return this.te(n),W.resolve()},e.prototype.removeTargetData=function(t,n){return this.ds.delete(n.target),this._s.Zn(n.targetId),this.targetCount-=1,W.resolve()},e.prototype.removeTargets=function(t,n,r){var i=this,s=0,a=[];return this.ds.forEach(function(c,l){l.sequenceNumber<=n&&r.get(l.targetId)===null&&(i.ds.delete(c),a.push(i.removeMatchingKeysForTargetId(t,l.targetId)),s++)}),W.waitFor(a).next(function(){return s})},e.prototype.getTargetCount=function(t){return W.resolve(this.targetCount)},e.prototype.getTargetData=function(t,n){var r=this.ds.get(n)||null;return W.resolve(r)},e.prototype.addMatchingKeys=function(t,n,r){return this._s.Jn(n,r),W.resolve()},e.prototype.removeMatchingKeys=function(t,n,r){this._s.Xn(n,r);var i=this.persistence.referenceDelegate,s=[];return i&&n.forEach(function(a){s.push(i.markPotentiallyOrphaned(t,a))}),W.waitFor(s)},e.prototype.removeMatchingKeysForTargetId=function(t,n){return this._s.Zn(n),W.resolve()},e.prototype.getMatchingKeysForTargetId=function(t,n){var r=this._s.es(n);return W.resolve(r)},e.prototype.containsKey=function(t,n){return W.resolve(this._s.containsKey(n))},e}(),B8=function(){function e(t,n){var r=this;this.gs={},this.Ne=new Tr(0),this.xe=!1,this.xe=!0,this.referenceDelegate=t(this),this.qe=new V8(this),this.Ut=new v8,this.Ue=function(i,s){return new U8(i,function(a){return r.referenceDelegate.ps(a)})}(this.Ut),this.R=new RL(n),this.Ke=new L8(this.R)}return e.prototype.start=function(){return Promise.resolve()},e.prototype.shutdown=function(){return this.xe=!1,Promise.resolve()},Object.defineProperty(e.prototype,"started",{get:function(){return this.xe},enumerable:!1,configurable:!0}),e.prototype.setDatabaseDeletedListener=function(){},e.prototype.setNetworkEnabled=function(){},e.prototype.getIndexManager=function(){return this.Ut},e.prototype.getMutationQueue=function(t){var n=this.gs[t.toKey()];return n||(n=new F8(this.Ut,this.referenceDelegate),this.gs[t.toKey()]=n),n},e.prototype.getTargetCache=function(){return this.qe},e.prototype.getRemoteDocumentCache=function(){return this.Ue},e.prototype.getBundleCache=function(){return this.Ke},e.prototype.runTransaction=function(t,n,r){var i=this;Y("MemoryPersistence","Starting transaction:",t);var s=new q8(this.Ne.next());return this.referenceDelegate.Es(),r(s).next(function(a){return i.referenceDelegate.Ts(s).next(function(){return a})}).toPromise().then(function(a){return s.raiseOnCommittedEvent(),a})},e.prototype.Is=function(t,n){return W.or(Object.values(this.gs).map(function(r){return function(){return r.containsKey(t,n)}}))},e}(),q8=function(e){function t(n){var r=this;return(r=e.call(this)||this).currentSequenceNumber=n,r}return te(t,e),t}(AL),$8=function(){function e(t){this.persistence=t,this.As=new bT,this.Rs=null}return e.bs=function(t){return new e(t)},Object.defineProperty(e.prototype,"vs",{get:function(){if(this.Rs)return this.Rs;throw he()},enumerable:!1,configurable:!0}),e.prototype.addReference=function(t,n,r){return this.As.addReference(r,n),this.vs.delete(r.toString()),W.resolve()},e.prototype.removeReference=function(t,n,r){return this.As.removeReference(r,n),this.vs.add(r.toString()),W.resolve()},e.prototype.markPotentiallyOrphaned=function(t,n){return this.vs.add(n.toString()),W.resolve()},e.prototype.removeTarget=function(t,n){var r=this;this.As.Zn(n.targetId).forEach(function(s){return r.vs.add(s.toString())});var i=this.persistence.getTargetCache();return i.getMatchingKeysForTargetId(t,n.targetId).next(function(s){s.forEach(function(a){return r.vs.add(a.toString())})}).next(function(){return i.removeTargetData(t,n)})},e.prototype.Es=function(){this.Rs=new Set},e.prototype.Ts=function(t){var n=this,r=this.persistence.getRemoteDocumentCache().newChangeBuffer();return W.forEach(this.vs,function(i){var s=de.fromPath(i);return n.Ps(t,s).next(function(a){a||r.removeEntry(s)})}).next(function(){return n.Rs=null,r.apply(t)})},e.prototype.updateLimboDocument=function(t,n){var r=this;return this.Ps(t,n).next(function(i){i?r.vs.delete(n.toString()):r.vs.add(n.toString())})},e.prototype.ps=function(t){return 0},e.prototype.Ps=function(t,n){var r=this;return W.or([function(){return W.resolve(r.As.containsKey(n))},function(){return r.persistence.getTargetCache().containsKey(t,n)},function(){return r.persistence.Is(t,n)}])},e}(),dn=function(){function e(t){this.uid=t}return e.prototype.isAuthenticated=function(){return this.uid!=null},e.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},e.prototype.isEqual=function(t){return t.uid===this.uid},e}();/** + */var P8=function(){function e(t){this.R=t,this.Qn=new Map,this.jn=new Map}return e.prototype.getBundleMetadata=function(t,n){return W.resolve(this.Qn.get(n))},e.prototype.saveBundleMetadata=function(t,n){var r;return this.Qn.set(n.id,{id:(r=n).id,version:r.version,createTime:on(r.createTime)}),W.resolve()},e.prototype.getNamedQuery=function(t,n){return W.resolve(this.jn.get(n))},e.prototype.saveNamedQuery=function(t,n){return this.jn.set(n.name,function(r){return{name:r.name,query:yT(r.bundledQuery),readTime:on(r.readTime)}}(n)),W.resolve()},e}(),bT=function(){function e(){this.Wn=new zt(Xt.Gn),this.zn=new zt(Xt.Hn)}return e.prototype.isEmpty=function(){return this.Wn.isEmpty()},e.prototype.addReference=function(t,n){var r=new Xt(t,n);this.Wn=this.Wn.add(r),this.zn=this.zn.add(r)},e.prototype.Jn=function(t,n){var r=this;t.forEach(function(i){return r.addReference(i,n)})},e.prototype.removeReference=function(t,n){this.Yn(new Xt(t,n))},e.prototype.Xn=function(t,n){var r=this;t.forEach(function(i){return r.removeReference(i,n)})},e.prototype.Zn=function(t){var n=this,r=new de(new Xe([])),i=new Xt(r,t),s=new Xt(r,t+1),a=[];return this.zn.forEachInRange([i,s],function(c){n.Yn(c),a.push(c.key)}),a},e.prototype.ts=function(){var t=this;this.Wn.forEach(function(n){return t.Yn(n)})},e.prototype.Yn=function(t){this.Wn=this.Wn.delete(t),this.zn=this.zn.delete(t)},e.prototype.es=function(t){var n=new de(new Xe([])),r=new Xt(n,t),i=new Xt(n,t+1),s=ot();return this.zn.forEachInRange([r,i],function(a){s=s.add(a.key)}),s},e.prototype.containsKey=function(t){var n=new Xt(t,0),r=this.Wn.firstAfterOrEqual(n);return r!==null&&t.isEqual(r.key)},e}(),Xt=function(){function e(t,n){this.key=t,this.ns=n}return e.Gn=function(t,n){return de.comparator(t.key,n.key)||Ve(t.ns,n.ns)},e.Hn=function(t,n){return Ve(t.ns,n.ns)||de.comparator(t.key,n.key)},e}(),D8=function(){function e(t,n){this.Ut=t,this.referenceDelegate=n,this._n=[],this.ss=1,this.rs=new zt(Xt.Gn)}return e.prototype.checkEmpty=function(t){return W.resolve(this._n.length===0)},e.prototype.addMutationBatch=function(t,n,r,i){var s=this.ss;this.ss++,this._n.length>0&&this._n[this._n.length-1];var a=new gT(s,n,r,i);this._n.push(a);for(var c=0,l=i;cs?this._n[s]:null)},e.prototype.getHighestUnacknowledgedBatchId=function(){return W.resolve(this._n.length===0?-1:this.ss-1)},e.prototype.getAllMutationBatches=function(t){return W.resolve(this._n.slice())},e.prototype.getAllMutationBatchesAffectingDocumentKey=function(t,n){var r=this,i=new Xt(n,0),s=new Xt(n,Number.POSITIVE_INFINITY),a=[];return this.rs.forEachInRange([i,s],function(c){var l=r.os(c.ns);a.push(l)}),W.resolve(a)},e.prototype.getAllMutationBatchesAffectingDocumentKeys=function(t,n){var r=this,i=new zt(Ve);return n.forEach(function(s){var a=new Xt(s,0),c=new Xt(s,Number.POSITIVE_INFINITY);r.rs.forEachInRange([a,c],function(l){i=i.add(l.ns)})}),W.resolve(this.us(i))},e.prototype.getAllMutationBatchesAffectingQuery=function(t,n){var r=n.path,i=r.length+1,s=r;de.isDocumentKey(s)||(s=s.child(""));var a=new Xt(new de(s),0),c=new zt(Ve);return this.rs.forEachWhile(function(l){var h=l.key.path;return!!r.isPrefixOf(h)&&(h.length===i&&(c=c.add(l.ns)),!0)},a),W.resolve(this.us(c))},e.prototype.us=function(t){var n=this,r=[];return t.forEach(function(i){var s=n.os(i);s!==null&&r.push(s)}),r},e.prototype.removeMutationBatch=function(t,n){var r=this;be(this.hs(n.batchId,"removed")===0),this._n.shift();var i=this.rs;return W.forEach(n.mutations,function(s){var a=new Xt(s.key,n.batchId);return i=i.delete(a),r.referenceDelegate.markPotentiallyOrphaned(t,s.key)}).next(function(){r.rs=i})},e.prototype.Gt=function(t){},e.prototype.containsKey=function(t,n){var r=new Xt(n,0),i=this.rs.firstAfterOrEqual(r);return W.resolve(n.isEqual(i&&i.key))},e.prototype.performConsistencyCheck=function(t){return this._n.length,W.resolve()},e.prototype.hs=function(t,n){return this.cs(t)},e.prototype.cs=function(t){return this._n.length===0?0:t-this._n[0].batchId},e.prototype.os=function(t){var n=this.cs(t);return n<0||n>=this._n.length?null:this._n[n]},e}(),M8=function(){function e(t,n){this.Ut=t,this.ls=n,this.docs=new Pn(de.comparator),this.size=0}return e.prototype.addEntry=function(t,n,r){var i=n.key,s=this.docs.get(i),a=s?s.size:0,c=this.ls(n);return this.docs=this.docs.insert(i,{document:n.clone(),size:c,readTime:r}),this.size+=c-a,this.Ut.addToCollectionParentIndex(t,i.path.popLast())},e.prototype.removeEntry=function(t){var n=this.docs.get(t);n&&(this.docs=this.docs.remove(t),this.size-=n.size)},e.prototype.getEntry=function(t,n){var r=this.docs.get(n);return W.resolve(r?r.document.clone():bn.newInvalidDocument(n))},e.prototype.getEntries=function(t,n){var r=this,i=qr();return n.forEach(function(s){var a=r.docs.get(s);i=i.insert(s,a?a.document.clone():bn.newInvalidDocument(s))}),W.resolve(i)},e.prototype.getDocumentsMatchingQuery=function(t,n,r){for(var i=qr(),s=new de(n.path.child("")),a=this.docs.getIteratorFrom(s);a.hasNext();){var c=a.getNext(),l=c.key,h=c.value,d=h.document,v=h.readTime;if(!n.path.isPrefixOf(l.path))break;v.compareTo(r)<=0||wh(n,d)&&(i=i.insert(d.key,d.clone()))}return W.resolve(i)},e.prototype.fs=function(t,n){return W.forEach(this.docs,function(r){return n(r)})},e.prototype.newChangeBuffer=function(t){return new L8(this)},e.prototype.getSize=function(t){return W.resolve(this.size)},e}(),L8=function(e){function t(n){var r=this;return(r=e.call(this)||this).Ie=n,r}return te(t,e),t.prototype.applyChanges=function(n){var r=this,i=[];return this.changes.forEach(function(s,a){a.document.isValidDocument()?i.push(r.Ie.addEntry(n,a.document,r.getReadTime(s))):r.Ie.removeEntry(s)}),W.waitFor(i)},t.prototype.getFromCache=function(n,r){return this.Ie.getEntry(n,r)},t.prototype.getAllFromCache=function(n,r){return this.Ie.getEntries(n,r)},t}(ML),F8=function(){function e(t){this.persistence=t,this.ds=new Dc(function(n){return yh(n)},Sg),this.lastRemoteSnapshotVersion=De.min(),this.highestTargetId=0,this.ws=0,this._s=new bT,this.targetCount=0,this.ys=lv.Jt()}return e.prototype.forEachTarget=function(t,n){return this.ds.forEach(function(r,i){return n(i)}),W.resolve()},e.prototype.getLastRemoteSnapshotVersion=function(t){return W.resolve(this.lastRemoteSnapshotVersion)},e.prototype.getHighestSequenceNumber=function(t){return W.resolve(this.ws)},e.prototype.allocateTargetId=function(t){return this.highestTargetId=this.ys.next(),W.resolve(this.highestTargetId)},e.prototype.setTargetsMetadata=function(t,n,r){return r&&(this.lastRemoteSnapshotVersion=r),n>this.ws&&(this.ws=n),W.resolve()},e.prototype.te=function(t){this.ds.set(t.target,t);var n=t.targetId;n>this.highestTargetId&&(this.ys=new lv(n),this.highestTargetId=n),t.sequenceNumber>this.ws&&(this.ws=t.sequenceNumber)},e.prototype.addTargetData=function(t,n){return this.te(n),this.targetCount+=1,W.resolve()},e.prototype.updateTargetData=function(t,n){return this.te(n),W.resolve()},e.prototype.removeTargetData=function(t,n){return this.ds.delete(n.target),this._s.Zn(n.targetId),this.targetCount-=1,W.resolve()},e.prototype.removeTargets=function(t,n,r){var i=this,s=0,a=[];return this.ds.forEach(function(c,l){l.sequenceNumber<=n&&r.get(l.targetId)===null&&(i.ds.delete(c),a.push(i.removeMatchingKeysForTargetId(t,l.targetId)),s++)}),W.waitFor(a).next(function(){return s})},e.prototype.getTargetCount=function(t){return W.resolve(this.targetCount)},e.prototype.getTargetData=function(t,n){var r=this.ds.get(n)||null;return W.resolve(r)},e.prototype.addMatchingKeys=function(t,n,r){return this._s.Jn(n,r),W.resolve()},e.prototype.removeMatchingKeys=function(t,n,r){this._s.Xn(n,r);var i=this.persistence.referenceDelegate,s=[];return i&&n.forEach(function(a){s.push(i.markPotentiallyOrphaned(t,a))}),W.waitFor(s)},e.prototype.removeMatchingKeysForTargetId=function(t,n){return this._s.Zn(n),W.resolve()},e.prototype.getMatchingKeysForTargetId=function(t,n){var r=this._s.es(n);return W.resolve(r)},e.prototype.containsKey=function(t,n){return W.resolve(this._s.containsKey(n))},e}(),U8=function(){function e(t,n){var r=this;this.gs={},this.Ne=new Tr(0),this.xe=!1,this.xe=!0,this.referenceDelegate=t(this),this.qe=new F8(this),this.Ut=new h8,this.Ue=function(i,s){return new M8(i,function(a){return r.referenceDelegate.ps(a)})}(this.Ut),this.R=new RL(n),this.Ke=new P8(this.R)}return e.prototype.start=function(){return Promise.resolve()},e.prototype.shutdown=function(){return this.xe=!1,Promise.resolve()},Object.defineProperty(e.prototype,"started",{get:function(){return this.xe},enumerable:!1,configurable:!0}),e.prototype.setDatabaseDeletedListener=function(){},e.prototype.setNetworkEnabled=function(){},e.prototype.getIndexManager=function(){return this.Ut},e.prototype.getMutationQueue=function(t){var n=this.gs[t.toKey()];return n||(n=new D8(this.Ut,this.referenceDelegate),this.gs[t.toKey()]=n),n},e.prototype.getTargetCache=function(){return this.qe},e.prototype.getRemoteDocumentCache=function(){return this.Ue},e.prototype.getBundleCache=function(){return this.Ke},e.prototype.runTransaction=function(t,n,r){var i=this;Y("MemoryPersistence","Starting transaction:",t);var s=new j8(this.Ne.next());return this.referenceDelegate.Es(),r(s).next(function(a){return i.referenceDelegate.Ts(s).next(function(){return a})}).toPromise().then(function(a){return s.raiseOnCommittedEvent(),a})},e.prototype.Is=function(t,n){return W.or(Object.values(this.gs).map(function(r){return function(){return r.containsKey(t,n)}}))},e}(),j8=function(e){function t(n){var r=this;return(r=e.call(this)||this).currentSequenceNumber=n,r}return te(t,e),t}(AL),V8=function(){function e(t){this.persistence=t,this.As=new bT,this.Rs=null}return e.bs=function(t){return new e(t)},Object.defineProperty(e.prototype,"vs",{get:function(){if(this.Rs)return this.Rs;throw he()},enumerable:!1,configurable:!0}),e.prototype.addReference=function(t,n,r){return this.As.addReference(r,n),this.vs.delete(r.toString()),W.resolve()},e.prototype.removeReference=function(t,n,r){return this.As.removeReference(r,n),this.vs.add(r.toString()),W.resolve()},e.prototype.markPotentiallyOrphaned=function(t,n){return this.vs.add(n.toString()),W.resolve()},e.prototype.removeTarget=function(t,n){var r=this;this.As.Zn(n.targetId).forEach(function(s){return r.vs.add(s.toString())});var i=this.persistence.getTargetCache();return i.getMatchingKeysForTargetId(t,n.targetId).next(function(s){s.forEach(function(a){return r.vs.add(a.toString())})}).next(function(){return i.removeTargetData(t,n)})},e.prototype.Es=function(){this.Rs=new Set},e.prototype.Ts=function(t){var n=this,r=this.persistence.getRemoteDocumentCache().newChangeBuffer();return W.forEach(this.vs,function(i){var s=de.fromPath(i);return n.Ps(t,s).next(function(a){a||r.removeEntry(s)})}).next(function(){return n.Rs=null,r.apply(t)})},e.prototype.updateLimboDocument=function(t,n){var r=this;return this.Ps(t,n).next(function(i){i?r.vs.delete(n.toString()):r.vs.add(n.toString())})},e.prototype.ps=function(t){return 0},e.prototype.Ps=function(t,n){var r=this;return W.or([function(){return W.resolve(r.As.containsKey(n))},function(){return r.persistence.getTargetCache().containsKey(t,n)},function(){return r.persistence.Is(t,n)}])},e}(),hn=function(){function e(t){this.uid=t}return e.prototype.isAuthenticated=function(){return this.uid!=null},e.prototype.toKey=function(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"},e.prototype.isEqual=function(t){return t.uid===this.uid},e}();/** * @license * Copyright 2017 Google LLC * @@ -2402,7 +2402,7 @@ Total Duration: `+(h-v)+"ms"),W.resolve({didRun:!0,sequenceNumbersCollected:i,ta * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function oN(e,t){return"firestore_clients_"+e+"_"+t}function sN(e,t,n){var r="firestore_mutations_"+e+"_"+n;return t.isAuthenticated()&&(r+="_"+t.uid),r}function aw(e,t){return"firestore_targets_"+e+"_"+t}dn.UNAUTHENTICATED=new dn(null),dn.GOOGLE_CREDENTIALS=new dn("google-credentials-uid"),dn.FIRST_PARTY=new dn("first-party-uid"),dn.MOCK_USER=new dn("mock-user");var aN=function(){function e(t,n,r,i){this.user=t,this.batchId=n,this.state=r,this.error=i}return e.Vs=function(t,n,r){var i,s=JSON.parse(r),a=typeof s=="object"&&["pending","acknowledged","rejected"].indexOf(s.state)!==-1&&(s.error===void 0||typeof s.error=="object");return a&&s.error&&(a=typeof s.error.message=="string"&&typeof s.error.code=="string")&&(i=new H(s.error.code,s.error.message)),a?new e(t,n,s.state,i):(Ft("SharedClientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},e.prototype.Ss=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},e}(),uw=function(){function e(t,n,r){this.targetId=t,this.state=n,this.error=r}return e.Vs=function(t,n){var r,i=JSON.parse(n),s=typeof i=="object"&&["not-current","current","rejected"].indexOf(i.state)!==-1&&(i.error===void 0||typeof i.error=="object");return s&&i.error&&(s=typeof i.error.message=="string"&&typeof i.error.code=="string")&&(r=new H(i.error.code,i.error.message)),s?new e(t,i.state,r):(Ft("SharedClientState","Failed to parse target state for ID '"+t+"': "+n),null)},e.prototype.Ss=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},e}(),uN=function(){function e(t,n){this.clientId=t,this.activeTargetIds=n}return e.Vs=function(t,n){for(var r=JSON.parse(n),i=typeof r=="object"&&r.activeTargetIds instanceof Array,s=kg(),a=0;i&&a0){var g=l.getResponseJson().error;if(g&&g.status&&g.message){var y=function(_){var b=_.toLowerCase().replace(/_/g,"-");return Object.values(D).indexOf(b)>=0?b:D.UNKNOWN}(g.status);c(new H(y,g.message))}else c(new H(D.UNKNOWN,"Server responded with status "+l.getStatus()))}else c(new H(D.UNAVAILABLE,"Connection failed."));break;default:he()}}finally{Y("Connection",'RPC "'+n+'" completed.')}});var h=JSON.stringify(s);l.send(r,"POST",h,i,15)})},t.prototype.Oi=function(n,r){var i=[this.Di,"/","google.firestore.v1.Firestore","/",n,"/channel"],s=wY(),a=bY(),c={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(c.xmlHttpFactory=new IY({})),this.ki(c.initMessageHeaders,r),G0()||cP()||aW()||uW()||cW()||z0()||(c.httpHeadersOverwriteParam="$httpHeaders");var l=i.join("");Y("Connection","Creating WebChannel: "+l,c);var h=s.createWebChannel(l,c),d=!1,v=!1,g=new G8({Ei:function(_){v?Y("Connection","Not sending because WebChannel is closed:",_):(d||(Y("Connection","Opening WebChannel transport."),h.open(),d=!0),Y("Connection","WebChannel sending:",_),h.send(_))},Ti:function(){return h.close()}}),y=function(_,b,T){_.listen(b,function(C){try{T(C)}catch(x){setTimeout(function(){throw x},0)}})};return y(h,Hd.EventType.OPEN,function(){v||Y("Connection","WebChannel transport opened.")}),y(h,Hd.EventType.CLOSE,function(){v||(v=!0,Y("Connection","WebChannel transport closed"),g.Vi())}),y(h,Hd.EventType.ERROR,function(_){v||(v=!0,Pf("Connection","WebChannel transport errored:",_),g.Vi(new H(D.UNAVAILABLE,"The operation could not be completed")))}),y(h,Hd.EventType.MESSAGE,function(_){var b;if(!v){var T=_.data[0];be(!!T);var C=T,x=C.error||((b=C[0])===null||b===void 0?void 0:b.error);if(x){Y("Connection","WebChannel received error:",x);var O=x.status,L=function(P){var re=Mt[P];if(re!==void 0)return hL(re)}(O),$=x.message;L===void 0&&(L=D.INTERNAL,$="Unknown error status: "+O+" with message "+x.message),v=!0,g.Vi(new H(L,$)),h.close()}else Y("Connection","WebChannel received:",T),g.Si(T)}}),y(a,TY.STAT_EVENT,function(_){_.stat===CR.PROXY?Y("Connection","Detected buffering proxy"):_.stat===CR.NOPROXY&&Y("Connection","Detected no buffering proxy")}),setTimeout(function(){g.Pi()},0),g},t}(function(){function e(t){this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http";this.Di=n+"://"+t.host,this.Ci="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return e.prototype.Ni=function(t,n,r,i){var s=this.xi(t,n);Y("RestConnection","Sending: ",s,r);var a={};return this.ki(a,i),this.Fi(t,s,a,r).then(function(c){return Y("RestConnection","Received: ",c),c},function(c){throw Pf("RestConnection",t+" failed with error: ",c,"url: ",s,"request:",r),c})},e.prototype.$i=function(t,n,r,i){return this.Ni(t,n,r,i)},e.prototype.ki=function(t,n){if(t["X-Goog-Api-Client"]="gl-js/ fire/8.10.1",t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),n)for(var r in n.authHeaders)n.authHeaders.hasOwnProperty(r)&&(t[r]=n.authHeaders[r])},e.prototype.xi=function(t,n){var r=W8[t];return this.Di+"/v1/"+n+":"+r},e}());/** + */function oN(e,t){return"firestore_clients_"+e+"_"+t}function sN(e,t,n){var r="firestore_mutations_"+e+"_"+n;return t.isAuthenticated()&&(r+="_"+t.uid),r}function aw(e,t){return"firestore_targets_"+e+"_"+t}hn.UNAUTHENTICATED=new hn(null),hn.GOOGLE_CREDENTIALS=new hn("google-credentials-uid"),hn.FIRST_PARTY=new hn("first-party-uid"),hn.MOCK_USER=new hn("mock-user");var aN=function(){function e(t,n,r,i){this.user=t,this.batchId=n,this.state=r,this.error=i}return e.Vs=function(t,n,r){var i,s=JSON.parse(r),a=typeof s=="object"&&["pending","acknowledged","rejected"].indexOf(s.state)!==-1&&(s.error===void 0||typeof s.error=="object");return a&&s.error&&(a=typeof s.error.message=="string"&&typeof s.error.code=="string")&&(i=new H(s.error.code,s.error.message)),a?new e(t,n,s.state,i):(Ft("SharedClientState","Failed to parse mutation state for ID '"+n+"': "+r),null)},e.prototype.Ss=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},e}(),uw=function(){function e(t,n,r){this.targetId=t,this.state=n,this.error=r}return e.Vs=function(t,n){var r,i=JSON.parse(n),s=typeof i=="object"&&["not-current","current","rejected"].indexOf(i.state)!==-1&&(i.error===void 0||typeof i.error=="object");return s&&i.error&&(s=typeof i.error.message=="string"&&typeof i.error.code=="string")&&(r=new H(i.error.code,i.error.message)),s?new e(t,i.state,r):(Ft("SharedClientState","Failed to parse target state for ID '"+t+"': "+n),null)},e.prototype.Ss=function(){var t={state:this.state,updateTimeMs:Date.now()};return this.error&&(t.error={code:this.error.code,message:this.error.message}),JSON.stringify(t)},e}(),uN=function(){function e(t,n){this.clientId=t,this.activeTargetIds=n}return e.Vs=function(t,n){for(var r=JSON.parse(n),i=typeof r=="object"&&r.activeTargetIds instanceof Array,s=kg(),a=0;i&&a0){var g=l.getResponseJson().error;if(g&&g.status&&g.message){var y=function(_){var b=_.toLowerCase().replace(/_/g,"-");return Object.values(D).indexOf(b)>=0?b:D.UNKNOWN}(g.status);c(new H(y,g.message))}else c(new H(D.UNKNOWN,"Server responded with status "+l.getStatus()))}else c(new H(D.UNAVAILABLE,"Connection failed."));break;default:he()}}finally{Y("Connection",'RPC "'+n+'" completed.')}});var h=JSON.stringify(s);l.send(r,"POST",h,i,15)})},t.prototype.Oi=function(n,r){var i=[this.Di,"/","google.firestore.v1.Firestore","/",n,"/channel"],s=mY(),a=yY(),c={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:"projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling};this.useFetchStreams&&(c.xmlHttpFactory=new bY({})),this.ki(c.initMessageHeaders,r),G0()||cP()||iW()||oW()||sW()||z0()||(c.httpHeadersOverwriteParam="$httpHeaders");var l=i.join("");Y("Connection","Creating WebChannel: "+l,c);var h=s.createWebChannel(l,c),d=!1,v=!1,g=new H8({Ei:function(_){v?Y("Connection","Not sending because WebChannel is closed:",_):(d||(Y("Connection","Opening WebChannel transport."),h.open(),d=!0),Y("Connection","WebChannel sending:",_),h.send(_))},Ti:function(){return h.close()}}),y=function(_,b,T){_.listen(b,function(C){try{T(C)}catch(x){setTimeout(function(){throw x},0)}})};return y(h,Kd.EventType.OPEN,function(){v||Y("Connection","WebChannel transport opened.")}),y(h,Kd.EventType.CLOSE,function(){v||(v=!0,Y("Connection","WebChannel transport closed"),g.Vi())}),y(h,Kd.EventType.ERROR,function(_){v||(v=!0,Df("Connection","WebChannel transport errored:",_),g.Vi(new H(D.UNAVAILABLE,"The operation could not be completed")))}),y(h,Kd.EventType.MESSAGE,function(_){var b;if(!v){var T=_.data[0];be(!!T);var C=T,x=C.error||((b=C[0])===null||b===void 0?void 0:b.error);if(x){Y("Connection","WebChannel received error:",x);var O=x.status,L=function(P){var re=Mt[P];if(re!==void 0)return hL(re)}(O),$=x.message;L===void 0&&(L=D.INTERNAL,$="Unknown error status: "+O+" with message "+x.message),v=!0,g.Vi(new H(L,$)),h.close()}else Y("Connection","WebChannel received:",T),g.Si(T)}}),y(a,wY.STAT_EVENT,function(_){_.stat===CR.PROXY?Y("Connection","Detected buffering proxy"):_.stat===CR.NOPROXY&&Y("Connection","Detected no buffering proxy")}),setTimeout(function(){g.Pi()},0),g},t}(function(){function e(t){this.databaseInfo=t,this.databaseId=t.databaseId;var n=t.ssl?"https":"http";this.Di=n+"://"+t.host,this.Ci="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}return e.prototype.Ni=function(t,n,r,i){var s=this.xi(t,n);Y("RestConnection","Sending: ",s,r);var a={};return this.ki(a,i),this.Fi(t,s,a,r).then(function(c){return Y("RestConnection","Received: ",c),c},function(c){throw Df("RestConnection",t+" failed with error: ",c,"url: ",s,"request:",r),c})},e.prototype.$i=function(t,n,r,i){return this.Ni(t,n,r,i)},e.prototype.ki=function(t,n){if(t["X-Goog-Api-Client"]="gl-js/ fire/8.10.1",t["Content-Type"]="text/plain",this.databaseInfo.appId&&(t["X-Firebase-GMPID"]=this.databaseInfo.appId),n)for(var r in n.authHeaders)n.authHeaders.hasOwnProperty(r)&&(t[r]=n.authHeaders[r])},e.prototype.xi=function(t,n){var r=$8[t];return this.Di+"/v1/"+n+":"+r},e}());/** * @license * Copyright 2020 Google LLC * @@ -2432,7 +2432,7 @@ Total Duration: `+(h-v)+"ms"),W.resolve({didRun:!0,sequenceNumbersCollected:i,ta * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function KL(){return typeof window<"u"?window:null}function vp(){return typeof document<"u"?document:null}/** + */function KL(){return typeof window<"u"?window:null}function gp(){return typeof document<"u"?document:null}/** * @license * Copyright 2020 Google LLC * @@ -2447,8 +2447,8 @@ Total Duration: `+(h-v)+"ms"),W.resolve({didRun:!0,sequenceNumbersCollected:i,ta * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Th(e){return new ZY(e,!0)}var ET=function(){function e(t,n,r,i,s){r===void 0&&(r=1e3),i===void 0&&(i=1.5),s===void 0&&(s=6e4),this.Se=t,this.timerId=n,this.Mi=r,this.Li=i,this.Bi=s,this.qi=0,this.Ui=null,this.Ki=Date.now(),this.reset()}return e.prototype.reset=function(){this.qi=0},e.prototype.Qi=function(){this.qi=this.Bi},e.prototype.ji=function(t){var n=this;this.cancel();var r=Math.floor(this.qi+this.Wi()),i=Math.max(0,Date.now()-this.Ki),s=Math.max(0,r-i);s>0&&Y("ExponentialBackoff","Backing off for "+s+" ms (base delay: "+this.qi+" ms, delay with jitter: "+r+" ms, last attempt: "+i+" ms ago)"),this.Ui=this.Se.enqueueAfterDelay(this.timerId,s,function(){return n.Ki=Date.now(),t()}),this.qi*=this.Li,this.qithis.Bi&&(this.qi=this.Bi)},e.prototype.Gi=function(){this.Ui!==null&&(this.Ui.skipDelay(),this.Ui=null)},e.prototype.cancel=function(){this.Ui!==null&&(this.Ui.cancel(),this.Ui=null)},e.prototype.Wi=function(){return(Math.random()-.5)*this.qi},e}(),WL=function(){function e(t,n,r,i,s,a){this.Se=t,this.zi=r,this.Hi=i,this.Ji=s,this.listener=a,this.state=0,this.Yi=0,this.Xi=null,this.stream=null,this.Zi=new ET(t,n)}return e.prototype.tr=function(){return this.state===1||this.state===2||this.state===4},e.prototype.er=function(){return this.state===2},e.prototype.start=function(){this.state!==3?this.auth():this.nr()},e.prototype.stop=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return this.tr()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.sr=function(){this.state=0,this.Zi.reset()},e.prototype.ir=function(){var t=this;this.er()&&this.Xi===null&&(this.Xi=this.Se.enqueueAfterDelay(this.zi,6e4,function(){return t.rr()}))},e.prototype.cr=function(t){this.ur(),this.stream.send(t)},e.prototype.rr=function(){return R(this,void 0,void 0,function(){return A(this,function(t){return this.er()?[2,this.close(0)]:[2]})})},e.prototype.ur=function(){this.Xi&&(this.Xi.cancel(),this.Xi=null)},e.prototype.close=function(t,n){return R(this,void 0,void 0,function(){return A(this,function(r){switch(r.label){case 0:return this.ur(),this.Zi.cancel(),this.Yi++,t!==3?this.Zi.reset():n&&n.code===D.RESOURCE_EXHAUSTED?(Ft(n.toString()),Ft("Using maximum backoff delay to prevent overloading the backend."),this.Zi.Qi()):n&&n.code===D.UNAUTHENTICATED&&this.Ji.invalidateToken(),this.stream!==null&&(this.ar(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.Ri(n)];case 1:return r.sent(),[2]}})})},e.prototype.ar=function(){},e.prototype.auth=function(){var t=this;this.state=1;var n=this.hr(this.Yi),r=this.Yi;this.Ji.getToken().then(function(i){t.Yi===r&&t.lr(i)},function(i){n(function(){var s=new H(D.UNKNOWN,"Fetching auth token failed: "+i.message);return t.dr(s)})})},e.prototype.lr=function(t){var n=this,r=this.hr(this.Yi);this.stream=this.wr(t),this.stream.Ii(function(){r(function(){return n.state=2,n.listener.Ii()})}),this.stream.Ri(function(i){r(function(){return n.dr(i)})}),this.stream.onMessage(function(i){r(function(){return n.onMessage(i)})})},e.prototype.nr=function(){var t=this;this.state=4,this.Zi.ji(function(){return R(t,void 0,void 0,function(){return A(this,function(n){return this.state=0,this.start(),[2]})})})},e.prototype.dr=function(t){return Y("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},e.prototype.hr=function(t){var n=this;return function(r){n.Se.enqueueAndForget(function(){return n.Yi===t?r():(Y("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())})}},e}(),Q8=function(e){function t(n,r,i,s,a){var c=this;return(c=e.call(this,n,"listen_stream_connection_backoff","listen_stream_idle",r,i,a)||this).R=s,c}return te(t,e),t.prototype.wr=function(n){return this.Hi.Oi("Listen",n)},t.prototype.onMessage=function(n){this.Zi.reset();var r=function(s,a){var c;if("targetChange"in a){a.targetChange;var l=function(T){return T==="NO_CHANGE"?0:T==="ADD"?1:T==="REMOVE"?2:T==="CURRENT"?3:T==="RESET"?4:he()}(a.targetChange.targetChangeType||"NO_CHANGE"),h=a.targetChange.targetIds||[],d=function(T,C){return T.I?(be(C===void 0||typeof C=="string"),Qn.fromBase64String(C||"")):(be(C===void 0||C instanceof Uint8Array),Qn.fromUint8Array(C||new Uint8Array))}(s,a.targetChange.resumeToken),v=(g=a.targetChange.cause)&&function(T){var C=T.code===void 0?D.UNKNOWN:hL(T.code);return new H(C,T.message||"")}(g);c=new vL(l,h,d,v||null)}else if("documentChange"in a){a.documentChange,(l=a.documentChange).document,l.document.name,l.document.updateTime,h=xi(s,l.document.name),d=sn(l.document.updateTime);var g=new Er({mapValue:{fields:l.document.fields}}),y=(v=bn.newFoundDocument(h,d,g),l.targetIds||[]),_=l.removedTargetIds||[];c=new pp(y,_,v.key,v)}else if("documentDelete"in a)a.documentDelete,(l=a.documentDelete).document,h=xi(s,l.document),d=l.readTime?sn(l.readTime):De.min(),g=bn.newNoDocument(h,d),v=l.removedTargetIds||[],c=new pp([],v,g.key,g);else if("documentRemove"in a)a.documentRemove,(l=a.documentRemove).document,h=xi(s,l.document),d=l.removedTargetIds||[],c=new pp([],d,h,null);else{if(!("filter"in a))return he();a.filter;var b=a.filter;b.targetId,l=b.count||0,h=new HY(l),d=b.targetId,c=new pL(d,h)}return c}(this.R,n),i=function(s){if(!("targetChange"in s))return De.min();var a=s.targetChange;return a.targetIds&&a.targetIds.length?De.min():a.readTime?sn(a.readTime):De.min()}(n);return this.listener._r(r,i)},t.prototype.mr=function(n){var r={};r.database=jf(this.R),r.addTarget=function(s,a){var c,l=a.target;return(c=ov(l)?{documents:bL(s,l)}:{query:EL(s,l)}).targetId=a.targetId,a.resumeToken.approximateByteSize()>0?c.resumeToken=gL(s,a.resumeToken):a.snapshotVersion.compareTo(De.min())>0&&(c.readTime=Ff(s,a.snapshotVersion.toTimestamp())),c}(this.R,n);var i=function(s,a){var c=function(l,h){switch(h){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return he()}}(0,a.purpose);return c==null?null:{"goog-listen-tags":c}}(this.R,n);i&&(r.labels=i),this.cr(r)},t.prototype.yr=function(n){var r={};r.database=jf(this.R),r.removeTarget=n,this.cr(r)},t}(WL),Y8=function(e){function t(n,r,i,s,a){var c=this;return(c=e.call(this,n,"write_stream_connection_backoff","write_stream_idle",r,i,a)||this).R=s,c.gr=!1,c}return te(t,e),Object.defineProperty(t.prototype,"pr",{get:function(){return this.gr},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.gr=!1,this.lastStreamToken=void 0,e.prototype.start.call(this)},t.prototype.ar=function(){this.gr&&this.Er([])},t.prototype.wr=function(n){return this.Hi.Oi("Write",n)},t.prototype.onMessage=function(n){if(be(!!n.streamToken),this.lastStreamToken=n.streamToken,this.gr){this.Zi.reset();var r=function(s,a){return s&&s.length>0?(be(a!==void 0),s.map(function(c){return function(l,h){var d=l.updateTime?sn(l.updateTime):sn(h);return d.isEqual(De.min())&&(d=sn(h)),new BY(d,l.transformResults||[])}(c,a)})):[]}(n.writeResults,n.commitTime),i=sn(n.commitTime);return this.listener.Tr(i,r)}return be(!n.writeResults||n.writeResults.length===0),this.gr=!0,this.listener.Ir()},t.prototype.Ar=function(){var n={};n.database=jf(this.R),this.cr(n)},t.prototype.Er=function(n){var r=this,i={streamToken:this.lastStreamToken,writes:n.map(function(s){return uv(r.R,s)})};this.cr(i)},t}(WL),X8=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).credentials=n,s.Hi=r,s.R=i,s.Rr=!1,s}return te(t,e),t.prototype.br=function(){if(this.Rr)throw new H(D.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.Ni=function(n,r,i){var s=this;return this.br(),this.credentials.getToken().then(function(a){return s.Hi.Ni(n,r,i,a)}).catch(function(a){throw a.name==="FirebaseError"?(a.code===D.UNAUTHENTICATED&&s.credentials.invalidateToken(),a):new H(D.UNKNOWN,a.toString())})},t.prototype.$i=function(n,r,i){var s=this;return this.br(),this.credentials.getToken().then(function(a){return s.Hi.$i(n,r,i,a)}).catch(function(a){throw a.name==="FirebaseError"?(a.code===D.UNAUTHENTICATED&&s.credentials.invalidateToken(),a):new H(D.UNKNOWN,a.toString())})},t.prototype.terminate=function(){this.Rr=!0},t}(function(){}),J8=function(){function e(t,n){this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.vr=0,this.Pr=null,this.Vr=!0}return e.prototype.Sr=function(){var t=this;this.vr===0&&(this.Dr("Unknown"),this.Pr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,function(){return t.Pr=null,t.Cr("Backend didn't respond within 10 seconds."),t.Dr("Offline"),Promise.resolve()}))},e.prototype.Nr=function(t){this.state==="Online"?this.Dr("Unknown"):(this.vr++,this.vr>=1&&(this.kr(),this.Cr("Connection failed 1 times. Most recent error: "+t.toString()),this.Dr("Offline")))},e.prototype.set=function(t){this.kr(),this.vr=0,t==="Online"&&(this.Vr=!1),this.Dr(t)},e.prototype.Dr=function(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))},e.prototype.Cr=function(t){var n="Could not reach Cloud Firestore backend. "+t+` -This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.Vr?(Ft(n),this.Vr=!1):Y("OnlineStateTracker",n)},e.prototype.kr=function(){this.Pr!==null&&(this.Pr.cancel(),this.Pr=null)},e}(),Z8=function(e,t,n,r,i){var s=this;this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.Fr=[],this.$r=new Map,this.Or=new Set,this.Mr=[],this.Lr=i,this.Lr.di(function(a){n.enqueueAndForget(function(){return R(s,void 0,void 0,function(){return A(this,function(c){switch(c.label){case 0:return ds(this)?(Y("RemoteStore","Restarting streams for network reachability change."),[4,function(l){return R(this,void 0,void 0,function(){var h;return A(this,function(d){switch(d.label){case 0:return(h=ee(l)).Or.add(4),[4,Mc(h)];case 1:return d.sent(),h.Br.set("Unknown"),h.Or.delete(4),[4,Ih(h)];case 2:return d.sent(),[2]}})})}(this)]):[3,2];case 1:c.sent(),c.label=2;case 2:return[2]}})})})}),this.Br=new J8(n,r)};/** + */function Ih(e){return new YY(e,!0)}var ET=function(){function e(t,n,r,i,s){r===void 0&&(r=1e3),i===void 0&&(i=1.5),s===void 0&&(s=6e4),this.Se=t,this.timerId=n,this.Mi=r,this.Li=i,this.Bi=s,this.qi=0,this.Ui=null,this.Ki=Date.now(),this.reset()}return e.prototype.reset=function(){this.qi=0},e.prototype.Qi=function(){this.qi=this.Bi},e.prototype.ji=function(t){var n=this;this.cancel();var r=Math.floor(this.qi+this.Wi()),i=Math.max(0,Date.now()-this.Ki),s=Math.max(0,r-i);s>0&&Y("ExponentialBackoff","Backing off for "+s+" ms (base delay: "+this.qi+" ms, delay with jitter: "+r+" ms, last attempt: "+i+" ms ago)"),this.Ui=this.Se.enqueueAfterDelay(this.timerId,s,function(){return n.Ki=Date.now(),t()}),this.qi*=this.Li,this.qithis.Bi&&(this.qi=this.Bi)},e.prototype.Gi=function(){this.Ui!==null&&(this.Ui.skipDelay(),this.Ui=null)},e.prototype.cancel=function(){this.Ui!==null&&(this.Ui.cancel(),this.Ui=null)},e.prototype.Wi=function(){return(Math.random()-.5)*this.qi},e}(),WL=function(){function e(t,n,r,i,s,a){this.Se=t,this.zi=r,this.Hi=i,this.Ji=s,this.listener=a,this.state=0,this.Yi=0,this.Xi=null,this.stream=null,this.Zi=new ET(t,n)}return e.prototype.tr=function(){return this.state===1||this.state===2||this.state===4},e.prototype.er=function(){return this.state===2},e.prototype.start=function(){this.state!==3?this.auth():this.nr()},e.prototype.stop=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return this.tr()?[4,this.close(0)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}})})},e.prototype.sr=function(){this.state=0,this.Zi.reset()},e.prototype.ir=function(){var t=this;this.er()&&this.Xi===null&&(this.Xi=this.Se.enqueueAfterDelay(this.zi,6e4,function(){return t.rr()}))},e.prototype.cr=function(t){this.ur(),this.stream.send(t)},e.prototype.rr=function(){return R(this,void 0,void 0,function(){return A(this,function(t){return this.er()?[2,this.close(0)]:[2]})})},e.prototype.ur=function(){this.Xi&&(this.Xi.cancel(),this.Xi=null)},e.prototype.close=function(t,n){return R(this,void 0,void 0,function(){return A(this,function(r){switch(r.label){case 0:return this.ur(),this.Zi.cancel(),this.Yi++,t!==3?this.Zi.reset():n&&n.code===D.RESOURCE_EXHAUSTED?(Ft(n.toString()),Ft("Using maximum backoff delay to prevent overloading the backend."),this.Zi.Qi()):n&&n.code===D.UNAUTHENTICATED&&this.Ji.invalidateToken(),this.stream!==null&&(this.ar(),this.stream.close(),this.stream=null),this.state=t,[4,this.listener.Ri(n)];case 1:return r.sent(),[2]}})})},e.prototype.ar=function(){},e.prototype.auth=function(){var t=this;this.state=1;var n=this.hr(this.Yi),r=this.Yi;this.Ji.getToken().then(function(i){t.Yi===r&&t.lr(i)},function(i){n(function(){var s=new H(D.UNKNOWN,"Fetching auth token failed: "+i.message);return t.dr(s)})})},e.prototype.lr=function(t){var n=this,r=this.hr(this.Yi);this.stream=this.wr(t),this.stream.Ii(function(){r(function(){return n.state=2,n.listener.Ii()})}),this.stream.Ri(function(i){r(function(){return n.dr(i)})}),this.stream.onMessage(function(i){r(function(){return n.onMessage(i)})})},e.prototype.nr=function(){var t=this;this.state=4,this.Zi.ji(function(){return R(t,void 0,void 0,function(){return A(this,function(n){return this.state=0,this.start(),[2]})})})},e.prototype.dr=function(t){return Y("PersistentStream","close with error: "+t),this.stream=null,this.close(3,t)},e.prototype.hr=function(t){var n=this;return function(r){n.Se.enqueueAndForget(function(){return n.Yi===t?r():(Y("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve())})}},e}(),W8=function(e){function t(n,r,i,s,a){var c=this;return(c=e.call(this,n,"listen_stream_connection_backoff","listen_stream_idle",r,i,a)||this).R=s,c}return te(t,e),t.prototype.wr=function(n){return this.Hi.Oi("Listen",n)},t.prototype.onMessage=function(n){this.Zi.reset();var r=function(s,a){var c;if("targetChange"in a){a.targetChange;var l=function(T){return T==="NO_CHANGE"?0:T==="ADD"?1:T==="REMOVE"?2:T==="CURRENT"?3:T==="RESET"?4:he()}(a.targetChange.targetChangeType||"NO_CHANGE"),h=a.targetChange.targetIds||[],d=function(T,C){return T.I?(be(C===void 0||typeof C=="string"),zn.fromBase64String(C||"")):(be(C===void 0||C instanceof Uint8Array),zn.fromUint8Array(C||new Uint8Array))}(s,a.targetChange.resumeToken),v=(g=a.targetChange.cause)&&function(T){var C=T.code===void 0?D.UNKNOWN:hL(T.code);return new H(C,T.message||"")}(g);c=new vL(l,h,d,v||null)}else if("documentChange"in a){a.documentChange,(l=a.documentChange).document,l.document.name,l.document.updateTime,h=xi(s,l.document.name),d=on(l.document.updateTime);var g=new br({mapValue:{fields:l.document.fields}}),y=(v=bn.newFoundDocument(h,d,g),l.targetIds||[]),_=l.removedTargetIds||[];c=new vp(y,_,v.key,v)}else if("documentDelete"in a)a.documentDelete,(l=a.documentDelete).document,h=xi(s,l.document),d=l.readTime?on(l.readTime):De.min(),g=bn.newNoDocument(h,d),v=l.removedTargetIds||[],c=new vp([],v,g.key,g);else if("documentRemove"in a)a.documentRemove,(l=a.documentRemove).document,h=xi(s,l.document),d=l.removedTargetIds||[],c=new vp([],d,h,null);else{if(!("filter"in a))return he();a.filter;var b=a.filter;b.targetId,l=b.count||0,h=new BY(l),d=b.targetId,c=new pL(d,h)}return c}(this.R,n),i=function(s){if(!("targetChange"in s))return De.min();var a=s.targetChange;return a.targetIds&&a.targetIds.length?De.min():a.readTime?on(a.readTime):De.min()}(n);return this.listener._r(r,i)},t.prototype.mr=function(n){var r={};r.database=Vf(this.R),r.addTarget=function(s,a){var c,l=a.target;return(c=ov(l)?{documents:bL(s,l)}:{query:EL(s,l)}).targetId=a.targetId,a.resumeToken.approximateByteSize()>0?c.resumeToken=gL(s,a.resumeToken):a.snapshotVersion.compareTo(De.min())>0&&(c.readTime=Uf(s,a.snapshotVersion.toTimestamp())),c}(this.R,n);var i=function(s,a){var c=function(l,h){switch(h){case 0:return null;case 1:return"existence-filter-mismatch";case 2:return"limbo-document";default:return he()}}(0,a.purpose);return c==null?null:{"goog-listen-tags":c}}(this.R,n);i&&(r.labels=i),this.cr(r)},t.prototype.yr=function(n){var r={};r.database=Vf(this.R),r.removeTarget=n,this.cr(r)},t}(WL),G8=function(e){function t(n,r,i,s,a){var c=this;return(c=e.call(this,n,"write_stream_connection_backoff","write_stream_idle",r,i,a)||this).R=s,c.gr=!1,c}return te(t,e),Object.defineProperty(t.prototype,"pr",{get:function(){return this.gr},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.gr=!1,this.lastStreamToken=void 0,e.prototype.start.call(this)},t.prototype.ar=function(){this.gr&&this.Er([])},t.prototype.wr=function(n){return this.Hi.Oi("Write",n)},t.prototype.onMessage=function(n){if(be(!!n.streamToken),this.lastStreamToken=n.streamToken,this.gr){this.Zi.reset();var r=function(s,a){return s&&s.length>0?(be(a!==void 0),s.map(function(c){return function(l,h){var d=l.updateTime?on(l.updateTime):on(h);return d.isEqual(De.min())&&(d=on(h)),new UY(d,l.transformResults||[])}(c,a)})):[]}(n.writeResults,n.commitTime),i=on(n.commitTime);return this.listener.Tr(i,r)}return be(!n.writeResults||n.writeResults.length===0),this.gr=!0,this.listener.Ir()},t.prototype.Ar=function(){var n={};n.database=Vf(this.R),this.cr(n)},t.prototype.Er=function(n){var r=this,i={streamToken:this.lastStreamToken,writes:n.map(function(s){return uv(r.R,s)})};this.cr(i)},t}(WL),z8=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).credentials=n,s.Hi=r,s.R=i,s.Rr=!1,s}return te(t,e),t.prototype.br=function(){if(this.Rr)throw new H(D.FAILED_PRECONDITION,"The client has already been terminated.")},t.prototype.Ni=function(n,r,i){var s=this;return this.br(),this.credentials.getToken().then(function(a){return s.Hi.Ni(n,r,i,a)}).catch(function(a){throw a.name==="FirebaseError"?(a.code===D.UNAUTHENTICATED&&s.credentials.invalidateToken(),a):new H(D.UNKNOWN,a.toString())})},t.prototype.$i=function(n,r,i){var s=this;return this.br(),this.credentials.getToken().then(function(a){return s.Hi.$i(n,r,i,a)}).catch(function(a){throw a.name==="FirebaseError"?(a.code===D.UNAUTHENTICATED&&s.credentials.invalidateToken(),a):new H(D.UNKNOWN,a.toString())})},t.prototype.terminate=function(){this.Rr=!0},t}(function(){}),Q8=function(){function e(t,n){this.asyncQueue=t,this.onlineStateHandler=n,this.state="Unknown",this.vr=0,this.Pr=null,this.Vr=!0}return e.prototype.Sr=function(){var t=this;this.vr===0&&(this.Dr("Unknown"),this.Pr=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,function(){return t.Pr=null,t.Cr("Backend didn't respond within 10 seconds."),t.Dr("Offline"),Promise.resolve()}))},e.prototype.Nr=function(t){this.state==="Online"?this.Dr("Unknown"):(this.vr++,this.vr>=1&&(this.kr(),this.Cr("Connection failed 1 times. Most recent error: "+t.toString()),this.Dr("Offline")))},e.prototype.set=function(t){this.kr(),this.vr=0,t==="Online"&&(this.Vr=!1),this.Dr(t)},e.prototype.Dr=function(t){t!==this.state&&(this.state=t,this.onlineStateHandler(t))},e.prototype.Cr=function(t){var n="Could not reach Cloud Firestore backend. "+t+` +This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.Vr?(Ft(n),this.Vr=!1):Y("OnlineStateTracker",n)},e.prototype.kr=function(){this.Pr!==null&&(this.Pr.cancel(),this.Pr=null)},e}(),Y8=function(e,t,n,r,i){var s=this;this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.Fr=[],this.$r=new Map,this.Or=new Set,this.Mr=[],this.Lr=i,this.Lr.di(function(a){n.enqueueAndForget(function(){return R(s,void 0,void 0,function(){return A(this,function(c){switch(c.label){case 0:return ds(this)?(Y("RemoteStore","Restarting streams for network reachability change."),[4,function(l){return R(this,void 0,void 0,function(){var h;return A(this,function(d){switch(d.label){case 0:return(h=ee(l)).Or.add(4),[4,Mc(h)];case 1:return d.sent(),h.Br.set("Unknown"),h.Or.delete(4),[4,Sh(h)];case 2:return d.sent(),[2]}})})}(this)]):[3,2];case 1:c.sent(),c.label=2;case 2:return[2]}})})})}),this.Br=new Q8(n,r)};/** * @license * Copyright 2017 Google LLC * @@ -2463,7 +2463,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Ih(e){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:if(!ds(e))return[3,4];t=0,n=e.Mr,r.label=1;case 1:return t0}function ds(e){return ee(e).Or.size===0}function zL(e){e.qr=void 0}function eX(e){return R(this,void 0,void 0,function(){return A(this,function(t){return e.$r.forEach(function(n,r){TT(e,n)}),[2]})})}function tX(e,t){return R(this,void 0,void 0,function(){return A(this,function(n){return zL(e),ST(e)?(e.Br.Nr(t),IT(e)):e.Br.set("Unknown"),[2]})})}function nX(e,t,n){return R(this,void 0,void 0,function(){var r,i,s;return A(this,function(a){switch(a.label){case 0:if(e.Br.set("Online"),!(t instanceof vL&&t.state===2&&t.cause))return[3,6];a.label=1;case 1:return a.trys.push([1,3,,5]),[4,function(c,l){return R(this,void 0,void 0,function(){var h,d,v,g;return A(this,function(y){switch(y.label){case 0:h=l.cause,d=0,v=l.targetIds,y.label=1;case 1:return d=0?[4,function(c,l){var h=c.qr.ut(l);return h.targetChanges.forEach(function(d,v){if(d.resumeToken.approximateByteSize()>0){var g=c.$r.get(v);g&&c.$r.set(v,g.withResumeToken(d.resumeToken,l))}}),h.targetMismatches.forEach(function(d){var v=c.$r.get(d);if(v){c.$r.set(d,v.withResumeToken(Qn.EMPTY_BYTE_STRING,v.snapshotVersion)),GL(c,d);var g=new Rg(v.target,d,1,v.sequenceNumber);TT(c,g)}}),c.remoteSyncer.applyRemoteEvent(h)}(e,n)]:[3,10];case 9:a.sent(),a.label=10;case 10:return[3,13];case 11:return Y("RemoteStore","Failed to raise snapshot:",s=a.sent()),[4,hv(e,s)];case 12:return a.sent(),[3,13];case 13:return[2]}})})}function hv(e,t,n){return R(this,void 0,void 0,function(){var r=this;return A(this,function(i){switch(i.label){case 0:if(!La(t))throw t;return e.Or.add(1),[4,Mc(e)];case 1:return i.sent(),e.Br.set("Offline"),n||(n=function(){return VL(e.localStore)}),e.asyncQueue.enqueueRetryable(function(){return R(r,void 0,void 0,function(){return A(this,function(s){switch(s.label){case 0:return Y("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return s.sent(),e.Or.delete(1),[4,Ih(e)];case 2:return s.sent(),[2]}})})}),[2]}})})}function QL(e,t){return t().catch(function(n){return hv(e,n,t)})}function Lc(e){return R(this,void 0,void 0,function(){var t,n,r,i,s;return A(this,function(a){switch(a.label){case 0:t=ee(e),n=us(t),r=t.Fr.length>0?t.Fr[t.Fr.length-1].batchId:-1,a.label=1;case 1:if(!function(c){return ds(c)&&c.Fr.length<10}(t))return[3,7];a.label=2;case 2:return a.trys.push([2,4,,6]),[4,O8(t.localStore,r)];case 3:return(i=a.sent())===null?(t.Fr.length===0&&n.ir(),[3,7]):(r=i.batchId,function(c,l){c.Fr.push(l);var h=us(c);h.er()&&h.pr&&h.Er(l.mutations)}(t,i),[3,6]);case 4:return s=a.sent(),[4,hv(t,s)];case 5:return a.sent(),[3,6];case 6:return[3,1];case 7:return YL(t)&&XL(t),[2]}})})}function YL(e){return ds(e)&&!us(e).tr()&&e.Fr.length>0}function XL(e){us(e).start()}function rX(e){return R(this,void 0,void 0,function(){return A(this,function(t){return us(e).Ar(),[2]})})}function iX(e){return R(this,void 0,void 0,function(){var t,n,r,i;return A(this,function(s){for(t=us(e),n=0,r=e.Fr;n0&&(Y("RemoteStore","Stopping write stream with "+e.Fr.length+" pending writes"),e.Fr=[]),r.label=4;case 4:return[2]}})})})),e.Kr}var aX=function(){function e(t,n,r,i,s){this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new Pn,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(function(a){})}return e.createAndSchedule=function(t,n,r,i,s){var a=new e(t,n,Date.now()+r,i,s);return a.start(r),a},e.prototype.start=function(t){var n=this;this.timerHandle=setTimeout(function(){return n.handleDelayElapsed()},t)},e.prototype.skipDelay=function(){return this.handleDelayElapsed()},e.prototype.cancel=function(t){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new H(D.CANCELLED,"Operation cancelled"+(t?": "+t:""))))},e.prototype.handleDelayElapsed=function(){var t=this;this.asyncQueue.enqueueAndForget(function(){return t.timerHandle!==null?(t.clearTimeout(),t.op().then(function(n){return t.deferred.resolve(n)})):Promise.resolve()})},e.prototype.clearTimeout=function(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},e}();function Uc(e,t){if(Ft("AsyncQueue",t+": "+e),La(e))return new H(D.UNAVAILABLE,t+": "+e);throw e}/** + */function Sh(e){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:if(!ds(e))return[3,4];t=0,n=e.Mr,r.label=1;case 1:return t0}function ds(e){return ee(e).Or.size===0}function zL(e){e.qr=void 0}function X8(e){return R(this,void 0,void 0,function(){return A(this,function(t){return e.$r.forEach(function(n,r){TT(e,n)}),[2]})})}function J8(e,t){return R(this,void 0,void 0,function(){return A(this,function(n){return zL(e),ST(e)?(e.Br.Nr(t),IT(e)):e.Br.set("Unknown"),[2]})})}function Z8(e,t,n){return R(this,void 0,void 0,function(){var r,i,s;return A(this,function(a){switch(a.label){case 0:if(e.Br.set("Online"),!(t instanceof vL&&t.state===2&&t.cause))return[3,6];a.label=1;case 1:return a.trys.push([1,3,,5]),[4,function(c,l){return R(this,void 0,void 0,function(){var h,d,v,g;return A(this,function(y){switch(y.label){case 0:h=l.cause,d=0,v=l.targetIds,y.label=1;case 1:return d=0?[4,function(c,l){var h=c.qr.ut(l);return h.targetChanges.forEach(function(d,v){if(d.resumeToken.approximateByteSize()>0){var g=c.$r.get(v);g&&c.$r.set(v,g.withResumeToken(d.resumeToken,l))}}),h.targetMismatches.forEach(function(d){var v=c.$r.get(d);if(v){c.$r.set(d,v.withResumeToken(zn.EMPTY_BYTE_STRING,v.snapshotVersion)),GL(c,d);var g=new Rg(v.target,d,1,v.sequenceNumber);TT(c,g)}}),c.remoteSyncer.applyRemoteEvent(h)}(e,n)]:[3,10];case 9:a.sent(),a.label=10;case 10:return[3,13];case 11:return Y("RemoteStore","Failed to raise snapshot:",s=a.sent()),[4,hv(e,s)];case 12:return a.sent(),[3,13];case 13:return[2]}})})}function hv(e,t,n){return R(this,void 0,void 0,function(){var r=this;return A(this,function(i){switch(i.label){case 0:if(!La(t))throw t;return e.Or.add(1),[4,Mc(e)];case 1:return i.sent(),e.Br.set("Offline"),n||(n=function(){return VL(e.localStore)}),e.asyncQueue.enqueueRetryable(function(){return R(r,void 0,void 0,function(){return A(this,function(s){switch(s.label){case 0:return Y("RemoteStore","Retrying IndexedDB access"),[4,n()];case 1:return s.sent(),e.Or.delete(1),[4,Sh(e)];case 2:return s.sent(),[2]}})})}),[2]}})})}function QL(e,t){return t().catch(function(n){return hv(e,n,t)})}function Lc(e){return R(this,void 0,void 0,function(){var t,n,r,i,s;return A(this,function(a){switch(a.label){case 0:t=ee(e),n=us(t),r=t.Fr.length>0?t.Fr[t.Fr.length-1].batchId:-1,a.label=1;case 1:if(!function(c){return ds(c)&&c.Fr.length<10}(t))return[3,7];a.label=2;case 2:return a.trys.push([2,4,,6]),[4,R8(t.localStore,r)];case 3:return(i=a.sent())===null?(t.Fr.length===0&&n.ir(),[3,7]):(r=i.batchId,function(c,l){c.Fr.push(l);var h=us(c);h.er()&&h.pr&&h.Er(l.mutations)}(t,i),[3,6]);case 4:return s=a.sent(),[4,hv(t,s)];case 5:return a.sent(),[3,6];case 6:return[3,1];case 7:return YL(t)&&XL(t),[2]}})})}function YL(e){return ds(e)&&!us(e).tr()&&e.Fr.length>0}function XL(e){us(e).start()}function eX(e){return R(this,void 0,void 0,function(){return A(this,function(t){return us(e).Ar(),[2]})})}function tX(e){return R(this,void 0,void 0,function(){var t,n,r,i;return A(this,function(s){for(t=us(e),n=0,r=e.Fr;n0&&(Y("RemoteStore","Stopping write stream with "+e.Fr.length+" pending writes"),e.Fr=[]),r.label=4;case 4:return[2]}})})})),e.Kr}var iX=function(){function e(t,n,r,i,s){this.asyncQueue=t,this.timerId=n,this.targetTimeMs=r,this.op=i,this.removalCallback=s,this.deferred=new On,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(function(a){})}return e.createAndSchedule=function(t,n,r,i,s){var a=new e(t,n,Date.now()+r,i,s);return a.start(r),a},e.prototype.start=function(t){var n=this;this.timerHandle=setTimeout(function(){return n.handleDelayElapsed()},t)},e.prototype.skipDelay=function(){return this.handleDelayElapsed()},e.prototype.cancel=function(t){this.timerHandle!==null&&(this.clearTimeout(),this.deferred.reject(new H(D.CANCELLED,"Operation cancelled"+(t?": "+t:""))))},e.prototype.handleDelayElapsed=function(){var t=this;this.asyncQueue.enqueueAndForget(function(){return t.timerHandle!==null?(t.clearTimeout(),t.op().then(function(n){return t.deferred.resolve(n)})):Promise.resolve()})},e.prototype.clearTimeout=function(){this.timerHandle!==null&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)},e}();function Uc(e,t){if(Ft("AsyncQueue",t+": "+e),La(e))return new H(D.UNAVAILABLE,t+": "+e);throw e}/** * @license * Copyright 2017 Google LLC * @@ -2478,10 +2478,10 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var JL=function(){function e(t){this.comparator=t?function(n,r){return t(n,r)||de.comparator(n.key,r.key)}:function(n,r){return de.comparator(n.key,r.key)},this.keyedMap=Bb(),this.sortedSet=new Dn(this.comparator)}return e.emptySet=function(t){return new e(t.comparator)},e.prototype.has=function(t){return this.keyedMap.get(t)!=null},e.prototype.get=function(t){return this.keyedMap.get(t)},e.prototype.first=function(){return this.sortedSet.minKey()},e.prototype.last=function(){return this.sortedSet.maxKey()},e.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},e.prototype.indexOf=function(t){var n=this.keyedMap.get(t);return n?this.sortedSet.indexOf(n):-1},Object.defineProperty(e.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(t){this.sortedSet.inorderTraversal(function(n,r){return t(n),!1})},e.prototype.add=function(t){var n=this.delete(t.key);return n.copy(n.keyedMap.insert(t.key,t),n.sortedSet.insert(t,null))},e.prototype.delete=function(t){var n=this.get(t);return n?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(n)):this},e.prototype.isEqual=function(t){if(!(t instanceof e)||this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0},e.prototype.toString=function(){var t=[];return this.forEach(function(n){t.push(n.toString())}),t.length===0?"DocumentSet ()":`DocumentSet ( + */var JL=function(){function e(t){this.comparator=t?function(n,r){return t(n,r)||de.comparator(n.key,r.key)}:function(n,r){return de.comparator(n.key,r.key)},this.keyedMap=Bb(),this.sortedSet=new Pn(this.comparator)}return e.emptySet=function(t){return new e(t.comparator)},e.prototype.has=function(t){return this.keyedMap.get(t)!=null},e.prototype.get=function(t){return this.keyedMap.get(t)},e.prototype.first=function(){return this.sortedSet.minKey()},e.prototype.last=function(){return this.sortedSet.maxKey()},e.prototype.isEmpty=function(){return this.sortedSet.isEmpty()},e.prototype.indexOf=function(t){var n=this.keyedMap.get(t);return n?this.sortedSet.indexOf(n):-1},Object.defineProperty(e.prototype,"size",{get:function(){return this.sortedSet.size},enumerable:!1,configurable:!0}),e.prototype.forEach=function(t){this.sortedSet.inorderTraversal(function(n,r){return t(n),!1})},e.prototype.add=function(t){var n=this.delete(t.key);return n.copy(n.keyedMap.insert(t.key,t),n.sortedSet.insert(t,null))},e.prototype.delete=function(t){var n=this.get(t);return n?this.copy(this.keyedMap.remove(t),this.sortedSet.remove(n)):this},e.prototype.isEqual=function(t){if(!(t instanceof e)||this.size!==t.size)return!1;for(var n=this.sortedSet.getIterator(),r=t.sortedSet.getIterator();n.hasNext();){var i=n.getNext().key,s=r.getNext().key;if(!i.isEqual(s))return!1}return!0},e.prototype.toString=function(){var t=[];return this.forEach(function(n){t.push(n.toString())}),t.length===0?"DocumentSet ()":`DocumentSet ( `+t.join(` `)+` -)`},e.prototype.copy=function(t,n){var r=new e;return r.comparator=this.comparator,r.keyedMap=t,r.sortedSet=n,r},e}(),lN=function(){function e(){this.Qr=new Dn(de.comparator)}return e.prototype.track=function(t){var n=t.doc.key,r=this.Qr.get(n);r?t.type!==0&&r.type===3?this.Qr=this.Qr.insert(n,t):t.type===3&&r.type!==1?this.Qr=this.Qr.insert(n,{type:r.type,doc:t.doc}):t.type===2&&r.type===2?this.Qr=this.Qr.insert(n,{type:2,doc:t.doc}):t.type===2&&r.type===0?this.Qr=this.Qr.insert(n,{type:0,doc:t.doc}):t.type===1&&r.type===0?this.Qr=this.Qr.remove(n):t.type===1&&r.type===2?this.Qr=this.Qr.insert(n,{type:1,doc:r.doc}):t.type===0&&r.type===1?this.Qr=this.Qr.insert(n,{type:2,doc:t.doc}):he():this.Qr=this.Qr.insert(n,t)},e.prototype.jr=function(){var t=[];return this.Qr.inorderTraversal(function(n,r){t.push(r)}),t},e}(),dv=function(){function e(t,n,r,i,s,a,c,l){this.query=t,this.docs=n,this.oldDocs=r,this.docChanges=i,this.mutatedKeys=s,this.fromCache=a,this.syncStateChanged=c,this.excludesMetadataChanges=l}return e.fromInitialDocuments=function(t,n,r,i){var s=[];return n.forEach(function(a){s.push({type:0,doc:a})}),new e(t,n,JL.emptySet(n),s,r,i,!0,!1)},Object.defineProperty(e.prototype,"hasPendingWrites",{get:function(){return!this.mutatedKeys.isEmpty()},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){if(!(this.fromCache===t.fromCache&&this.syncStateChanged===t.syncStateChanged&&this.mutatedKeys.isEqual(t.mutatedKeys)&&yh(this.query,t.query)&&this.docs.isEqual(t.docs)&&this.oldDocs.isEqual(t.oldDocs)))return!1;var n=this.docChanges,r=t.docChanges;if(n.length!==r.length)return!1;for(var i=0;i=0&&(s.listeners.splice(a,1),i=s.listeners.length===0),i?[2,(n.queries.delete(r),n.onUnlisten(r))]:[2]})})}function lX(e,t){for(var n=ee(e),r=!1,i=0,s=t;i0)return!0;var n=this.Xr&&this.Xr.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0},e.prototype.no=function(t){t=dv.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache),this.Yr=!0,this.Jr.next(t)},e}(),hX=function(){function e(t,n){this.payload=t,this.byteLength=n}return e.prototype.io=function(){return"metadata"in this.payload},e}(),fN=function(){function e(t){this.R=t}return e.prototype.qn=function(t){return xi(this.R,t)},e.prototype.Un=function(t){return t.metadata.exists?wL(this.R,t.document,!1):bn.newNoDocument(this.qn(t.metadata.name),this.Kn(t.metadata.readTime))},e.prototype.Kn=function(t){return sn(t)},e}(),dX=function(){function e(t,n,r){this.ro=t,this.localStore=n,this.R=r,this.queries=[],this.documents=[],this.progress=ZL(t)}return e.prototype.oo=function(t){this.progress.bytesLoaded+=t.byteLength;var n=this.progress.documentsLoaded;return t.payload.namedQuery?this.queries.push(t.payload.namedQuery):t.payload.documentMetadata?(this.documents.push({metadata:t.payload.documentMetadata}),t.payload.documentMetadata.exists||++n):t.payload.document&&(this.documents[this.documents.length-1].document=t.payload.document,++n),n!==this.progress.documentsLoaded?(this.progress.documentsLoaded=n,Object.assign({},this.progress)):null},e.prototype.co=function(t){for(var n=new Map,r=new fN(this.R),i=0,s=t;i=0&&(s.listeners.splice(a,1),i=s.listeners.length===0),i?[2,(n.queries.delete(r),n.onUnlisten(r))]:[2]})})}function aX(e,t){for(var n=ee(e),r=!1,i=0,s=t;i0)return!0;var n=this.Xr&&this.Xr.hasPendingWrites!==t.hasPendingWrites;return!(!t.syncStateChanged&&!n)&&this.options.includeMetadataChanges===!0},e.prototype.no=function(t){t=dv.fromInitialDocuments(t.query,t.docs,t.mutatedKeys,t.fromCache),this.Yr=!0,this.Jr.next(t)},e}(),cX=function(){function e(t,n){this.payload=t,this.byteLength=n}return e.prototype.io=function(){return"metadata"in this.payload},e}(),fN=function(){function e(t){this.R=t}return e.prototype.qn=function(t){return xi(this.R,t)},e.prototype.Un=function(t){return t.metadata.exists?wL(this.R,t.document,!1):bn.newNoDocument(this.qn(t.metadata.name),this.Kn(t.metadata.readTime))},e.prototype.Kn=function(t){return on(t)},e}(),lX=function(){function e(t,n,r){this.ro=t,this.localStore=n,this.R=r,this.queries=[],this.documents=[],this.progress=ZL(t)}return e.prototype.oo=function(t){this.progress.bytesLoaded+=t.byteLength;var n=this.progress.documentsLoaded;return t.payload.namedQuery?this.queries.push(t.payload.namedQuery):t.payload.documentMetadata?(this.documents.push({metadata:t.payload.documentMetadata}),t.payload.documentMetadata.exists||++n):t.payload.document&&(this.documents[this.documents.length-1].document=t.payload.document,++n),n!==this.progress.documentsLoaded?(this.progress.documentsLoaded=n,Object.assign({},this.progress)):null},e.prototype.co=function(t){for(var n=new Map,r=new fN(this.R),i=0,s=t;i0||d&&r.lo(b,d)<0)&&(l=!0)):!_&&b?(i.track({type:0,doc:b}),x=!0):_&&!b&&(i.track({type:1,doc:_}),x=!0,(h||d)&&(l=!0)),x&&(b?(c=c.add(b),a=C?a.add(g):a.delete(g)):(c=c.delete(g),a=a.delete(g)))}),hp(this.query)||av(this.query))for(;c.size>this.query.limit;){var v=hp(this.query)?c.last():c.first();c=c.delete(v.key),a=a.delete(v.key),i.track({type:1,doc:v})}return{fo:c,mo:i,Nn:l,mutatedKeys:a}},e.prototype.yo=function(t,n){return t.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations},e.prototype.applyChanges=function(t,n,r){var i=this,s=this.fo;this.fo=t.fo,this.mutatedKeys=t.mutatedKeys;var a=t.mo.jr();a.sort(function(d,v){return function(g,y){var _=function(b){switch(b){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return he()}};return _(g)-_(y)}(d.type,v.type)||i.lo(d.doc,v.doc)}),this.po(r);var c=n?this.Eo():[],l=this.ho.size===0&&this.current?1:0,h=l!==this.ao;return this.ao=l,a.length!==0||h?{snapshot:new dv(this.query,t.fo,s,a,t.mutatedKeys,l===0,h,!1),To:c}:{To:c}},e.prototype.zr=function(t){return this.current&&t==="Offline"?(this.current=!1,this.applyChanges({fo:this.fo,mo:new lN,mutatedKeys:this.mutatedKeys,Nn:!1},!1)):{To:[]}},e.prototype.Io=function(t){return!this.uo.has(t)&&!!this.fo.has(t)&&!this.fo.get(t).hasLocalMutations},e.prototype.po=function(t){var n=this;t&&(t.addedDocuments.forEach(function(r){return n.uo=n.uo.add(r)}),t.modifiedDocuments.forEach(function(r){}),t.removedDocuments.forEach(function(r){return n.uo=n.uo.delete(r)}),this.current=t.current)},e.prototype.Eo=function(){var t=this;if(!this.current)return[];var n=this.ho;this.ho=ot(),this.fo.forEach(function(i){t.Io(i.key)&&(t.ho=t.ho.add(i.key))});var r=[];return n.forEach(function(i){t.ho.has(i)||r.push(new tF(i))}),this.ho.forEach(function(i){n.has(i)||r.push(new eF(i))}),r},e.prototype.Ao=function(t){this.uo=t.Bn,this.ho=ot();var n=this._o(t.documents);return this.applyChanges(n,!0)},e.prototype.Ro=function(){return dv.fromInitialDocuments(this.query,this.fo,this.mutatedKeys,this.ao===0)},e}(),pX=function(e,t,n){this.query=e,this.targetId=t,this.view=n},vX=function(e){this.key=e,this.bo=!1},gX=function(){function e(t,n,r,i,s,a){this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=a,this.vo={},this.Po=new Dc(function(c){return tL(c)},yh),this.Vo=new Map,this.So=new Set,this.Do=new Dn(de.comparator),this.Co=new Map,this.No=new bT,this.xo={},this.ko=new Map,this.Fo=lv.Yt(),this.onlineState="Unknown",this.$o=void 0}return Object.defineProperty(e.prototype,"isPrimaryClient",{get:function(){return this.$o===!0},enumerable:!1,configurable:!0}),e}();function mX(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c;return A(this,function(l){switch(l.label){case 0:return n=DT(e),(s=n.Po.get(t))?(r=s.targetId,n.sharedClientState.addLocalQueryTarget(r),i=s.view.Ro(),[3,4]):[3,1];case 1:return[4,fc(n.localStore,Kr(t))];case 2:return a=l.sent(),c=n.sharedClientState.addLocalQueryTarget(a.targetId),r=a.targetId,[4,NT(n,t,r,c==="current")];case 3:i=l.sent(),n.isPrimaryClient&&Ng(n.remoteStore,a),l.label=4;case 4:return[2,i]}})})}function NT(e,t,n,r){return R(this,void 0,void 0,function(){var i,s,a,c,l,h;return A(this,function(d){switch(d.label){case 0:return e.Oo=function(v,g,y){return function(_,b,T,C){return R(this,void 0,void 0,function(){var x,O,L;return A(this,function($){switch($.label){case 0:return x=b.view._o(T),x.Nn?[4,fv(_.localStore,b.query,!1).then(function(P){var re=P.documents;return b.view._o(re,x)})]:[3,2];case 1:x=$.sent(),$.label=2;case 2:return O=C&&C.targetChanges.get(b.targetId),L=b.view.applyChanges(x,_.isPrimaryClient,O),[2,(Wb(_,b.targetId,L.To),L.snapshot)]}})})}(e,v,g,y)},[4,fv(e.localStore,t,!0)];case 1:return i=d.sent(),s=new nF(t,i.Bn),a=s._o(i.documents),c=dT.createSynthesizedTargetChangeForCurrentChange(n,r&&e.onlineState!=="Offline"),l=s.applyChanges(a,e.isPrimaryClient,c),Wb(e,n,l.To),h=new pX(t,n,s),[2,(e.Po.set(t,h),e.Vo.has(n)?e.Vo.get(n).push(t):e.Vo.set(n,[t]),l.snapshot)]}})})}function yX(e,t){return R(this,void 0,void 0,function(){var n,r,i;return A(this,function(s){switch(s.label){case 0:return n=ee(e),r=n.Po.get(t),(i=n.Vo.get(r.targetId)).length>1?[2,(n.Vo.set(r.targetId,i.filter(function(a){return!yh(a,t)})),void n.Po.delete(t))]:n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)?[3,2]:[4,hc(n.localStore,r.targetId,!1).then(function(){n.sharedClientState.clearQueryState(r.targetId),Vf(n.remoteStore,r.targetId),dc(n,r.targetId)}).catch(Fa)]):[3,3];case 1:s.sent(),s.label=2;case 2:return[3,5];case 3:return dc(n,r.targetId),[4,hc(n.localStore,r.targetId,!0)];case 4:s.sent(),s.label=5;case 5:return[2]}})})}function _X(e,t,n){return R(this,void 0,void 0,function(){var r,i,s,a;return A(this,function(c){switch(c.label){case 0:r=MT(e),c.label=1;case 1:return c.trys.push([1,5,,6]),[4,function(l,h){var d,v=ee(l),g=lr.now(),y=h.reduce(function(_,b){return _.add(b.key)},ot());return v.persistence.runTransaction("Locally write mutations","readwrite",function(_){return v.Mn.pn(_,y).next(function(b){d=b;for(var T=[],C=0,x=h;C0?c.bo=!0:s.modifiedDocuments.size>0?be(c.bo):s.removedDocuments.size>0&&(be(c.bo),c.bo=!1))}),[4,_o(n,r,t)];case 3:return i.sent(),[3,6];case 4:return[4,Fa(i.sent())];case 5:return i.sent(),[3,6];case 6:return[2]}})})}function hN(e,t,n){var r=ee(e);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){var i=[];r.Po.forEach(function(s,a){var c=a.view.zr(t);c.snapshot&&i.push(c.snapshot)}),function(s,a){var c=ee(s);c.onlineState=a;var l=!1;c.queries.forEach(function(h,d){for(var v=0,g=d.listeners;v0&&e.Do.size=0})}(i.localStore,c)];case 2:return y.sent()?[4,s.close()]:[3,4];case 3:return[2,(y.sent(),void a._completeWith(function(_){return{taskState:"Success",documentsLoaded:_.totalDocuments,bytesLoaded:_.totalBytes,totalDocuments:_.totalDocuments,totalBytes:_.totalBytes}}(c)))];case 4:return a._updateProgress(ZL(c)),l=new dX(c,i.localStore,s.R),[4,s.Lo()];case 5:h=y.sent(),y.label=6;case 6:return h?[4,l.oo(h)]:[3,10];case 7:return(d=y.sent())&&a._updateProgress(d),[4,s.Lo()];case 8:h=y.sent(),y.label=9;case 9:return[3,6];case 10:return[4,l.complete()];case 11:return v=y.sent(),[4,_o(i,v.wn,void 0)];case 12:return y.sent(),[4,function(_,b){var T=ee(_);return T.persistence.runTransaction("Save bundle","readwrite",function(C){return T.Ke.saveBundleMetadata(C,b)})}(i.localStore,c)];case 13:return y.sent(),a._completeWith(v.progress),[3,15];case 14:return Pf("SyncEngine","Loading bundle failed with "+(g=y.sent())),a._failWith(g),[3,15];case 15:return[2]}})})})(r,t,n).then(function(){r.sharedClientState.notifyBundleLoaded()})}var sF=function(){function e(){this.synchronizeTabs=!1}return e.prototype.initialize=function(t){return R(this,void 0,void 0,function(){return A(this,function(n){switch(n.label){case 0:return this.R=Th(t.databaseInfo.databaseId),this.sharedClientState=this.Bo(t),this.persistence=this.qo(t),[4,this.persistence.start()];case 1:return n.sent(),this.gcScheduler=this.Uo(t),this.localStore=this.Ko(t),[2]}})})},e.prototype.Uo=function(t){return null},e.prototype.Ko=function(t){return UL(this.persistence,new FL,t.initialUser,this.R)},e.prototype.qo=function(t){return new B8($8.bs,this.R)},e.prototype.Bo=function(t){return new HL},e.prototype.terminate=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return this.gcScheduler&&this.gcScheduler.stop(),[4,this.sharedClientState.shutdown()];case 1:return t.sent(),[4,this.persistence.shutdown()];case 2:return t.sent(),[2]}})})},e}(),aF=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).Qo=n,s.cacheSizeBytes=r,s.forceOwnership=i,s.synchronizeTabs=!1,s}return te(t,e),t.prototype.initialize=function(n){return R(this,void 0,void 0,function(){var r=this;return A(this,function(i){switch(i.label){case 0:return[4,e.prototype.initialize.call(this,n)];case 1:return i.sent(),[4,P8(this.localStore)];case 2:return i.sent(),[4,this.Qo.initialize(this,n)];case 3:return i.sent(),[4,MT(this.Qo.syncEngine)];case 4:return i.sent(),[4,Lc(this.Qo.remoteStore)];case 5:return i.sent(),[4,this.persistence.He(function(){return r.gcScheduler&&!r.gcScheduler.started&&r.gcScheduler.start(r.localStore),Promise.resolve()})];case 6:return i.sent(),[2]}})})},t.prototype.Ko=function(n){return UL(this.persistence,new FL,n.initialUser,this.R)},t.prototype.Uo=function(n){var r=this.persistence.referenceDelegate.garbageCollector;return new w8(r,n.asyncQueue)},t.prototype.qo=function(n){var r=wT(n.databaseInfo.databaseId,n.databaseInfo.persistenceKey),i=this.cacheSizeBytes!==void 0?Si.withCacheSize(this.cacheSizeBytes):Si.DEFAULT;return new C8(this.synchronizeTabs,r,n.clientId,i,n.asyncQueue,KL(),vp(),this.R,this.sharedClientState,!!this.forceOwnership)},t.prototype.Bo=function(n){return new HL},t}(sF),MX=function(e){function t(n,r){var i=this;return(i=e.call(this,n,r,!1)||this).Qo=n,i.cacheSizeBytes=r,i.synchronizeTabs=!0,i}return te(t,e),t.prototype.initialize=function(n){return R(this,void 0,void 0,function(){var r,i=this;return A(this,function(s){switch(s.label){case 0:return[4,e.prototype.initialize.call(this,n)];case 1:return s.sent(),r=this.Qo.syncEngine,this.sharedClientState instanceof cw?(this.sharedClientState.syncEngine={ui:RX.bind(null,r),ai:OX.bind(null,r),hi:PX.bind(null,r),fn:xX.bind(null,r),ci:kX.bind(null,r)},[4,this.sharedClientState.start()]):[3,3];case 2:s.sent(),s.label=3;case 3:return[4,this.persistence.He(function(a){return R(i,void 0,void 0,function(){return A(this,function(c){switch(c.label){case 0:return[4,NX(this.Qo.syncEngine,a)];case 1:return c.sent(),this.gcScheduler&&(a&&!this.gcScheduler.started?this.gcScheduler.start(this.localStore):a||this.gcScheduler.stop()),[2]}})})})];case 4:return s.sent(),[2]}})})},t.prototype.Bo=function(n){var r=KL();if(!cw.yt(r))throw new H(D.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var i=wT(n.databaseInfo.databaseId,n.databaseInfo.persistenceKey);return new cw(r,n.asyncQueue,i,n.clientId,n.initialUser)},t}(aF),Gb=function(){function e(){}return e.prototype.initialize=function(t,n){return R(this,void 0,void 0,function(){var r=this;return A(this,function(i){switch(i.label){case 0:return this.localStore?[3,2]:(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(s){return hN(r.syncEngine,s,1)},this.remoteStore.remoteSyncer.handleCredentialChange=SX.bind(null,this.syncEngine),[4,Kb(this.remoteStore,this.syncEngine.isPrimaryClient)]);case 1:i.sent(),i.label=2;case 2:return[2]}})})},e.prototype.createEventManager=function(t){return new cX},e.prototype.createDatastore=function(t){var n,r=Th(t.databaseInfo.databaseId),i=(n=t.databaseInfo,new z8(n));return function(s,a,c){return new X8(s,a,c)}(t.credentials,i,r)},e.prototype.createRemoteStore=function(t){var n,r,i,s,a,c=this;return n=this.localStore,r=this.datastore,i=t.asyncQueue,s=function(l){return hN(c.syncEngine,l,0)},a=cN.yt()?new cN:new K8,new Z8(n,r,i,s,a)},e.prototype.createSyncEngine=function(t,n){return function(r,i,s,a,c,l,h){var d=new gX(r,i,s,a,c,l);return h&&(d.$o=!0),d}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,n)},e.prototype.terminate=function(){return function(t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return n=ee(t),Y("RemoteStore","RemoteStore shutting down."),n.Or.add(5),[4,Mc(n)];case 1:return r.sent(),n.Lr.shutdown(),n.Br.set("Unknown"),[2]}})})}(this.remoteStore)},e}();/** + */var eF=function(e){this.key=e},tF=function(e){this.key=e},nF=function(){function e(t,n){this.query=t,this.uo=n,this.ao=null,this.current=!1,this.ho=ot(),this.mutatedKeys=ot(),this.lo=nL(t),this.fo=new JL(this.lo)}return Object.defineProperty(e.prototype,"wo",{get:function(){return this.uo},enumerable:!1,configurable:!0}),e.prototype._o=function(t,n){var r=this,i=n?n.mo:new lN,s=n?n.fo:this.fo,a=n?n.mutatedKeys:this.mutatedKeys,c=s,l=!1,h=dp(this.query)&&s.size===this.query.limit?s.last():null,d=av(this.query)&&s.size===this.query.limit?s.first():null;if(t.inorderTraversal(function(g,y){var _=s.get(g),b=wh(r.query,y)?y:null,T=!!_&&r.mutatedKeys.has(_.key),C=!!b&&(b.hasLocalMutations||r.mutatedKeys.has(b.key)&&b.hasCommittedMutations),x=!1;_&&b?_.data.isEqual(b.data)?T!==C&&(i.track({type:3,doc:b}),x=!0):r.yo(_,b)||(i.track({type:2,doc:b}),x=!0,(h&&r.lo(b,h)>0||d&&r.lo(b,d)<0)&&(l=!0)):!_&&b?(i.track({type:0,doc:b}),x=!0):_&&!b&&(i.track({type:1,doc:_}),x=!0,(h||d)&&(l=!0)),x&&(b?(c=c.add(b),a=C?a.add(g):a.delete(g)):(c=c.delete(g),a=a.delete(g)))}),dp(this.query)||av(this.query))for(;c.size>this.query.limit;){var v=dp(this.query)?c.last():c.first();c=c.delete(v.key),a=a.delete(v.key),i.track({type:1,doc:v})}return{fo:c,mo:i,Nn:l,mutatedKeys:a}},e.prototype.yo=function(t,n){return t.hasLocalMutations&&n.hasCommittedMutations&&!n.hasLocalMutations},e.prototype.applyChanges=function(t,n,r){var i=this,s=this.fo;this.fo=t.fo,this.mutatedKeys=t.mutatedKeys;var a=t.mo.jr();a.sort(function(d,v){return function(g,y){var _=function(b){switch(b){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return he()}};return _(g)-_(y)}(d.type,v.type)||i.lo(d.doc,v.doc)}),this.po(r);var c=n?this.Eo():[],l=this.ho.size===0&&this.current?1:0,h=l!==this.ao;return this.ao=l,a.length!==0||h?{snapshot:new dv(this.query,t.fo,s,a,t.mutatedKeys,l===0,h,!1),To:c}:{To:c}},e.prototype.zr=function(t){return this.current&&t==="Offline"?(this.current=!1,this.applyChanges({fo:this.fo,mo:new lN,mutatedKeys:this.mutatedKeys,Nn:!1},!1)):{To:[]}},e.prototype.Io=function(t){return!this.uo.has(t)&&!!this.fo.has(t)&&!this.fo.get(t).hasLocalMutations},e.prototype.po=function(t){var n=this;t&&(t.addedDocuments.forEach(function(r){return n.uo=n.uo.add(r)}),t.modifiedDocuments.forEach(function(r){}),t.removedDocuments.forEach(function(r){return n.uo=n.uo.delete(r)}),this.current=t.current)},e.prototype.Eo=function(){var t=this;if(!this.current)return[];var n=this.ho;this.ho=ot(),this.fo.forEach(function(i){t.Io(i.key)&&(t.ho=t.ho.add(i.key))});var r=[];return n.forEach(function(i){t.ho.has(i)||r.push(new tF(i))}),this.ho.forEach(function(i){n.has(i)||r.push(new eF(i))}),r},e.prototype.Ao=function(t){this.uo=t.Bn,this.ho=ot();var n=this._o(t.documents);return this.applyChanges(n,!0)},e.prototype.Ro=function(){return dv.fromInitialDocuments(this.query,this.fo,this.mutatedKeys,this.ao===0)},e}(),fX=function(e,t,n){this.query=e,this.targetId=t,this.view=n},hX=function(e){this.key=e,this.bo=!1},dX=function(){function e(t,n,r,i,s,a){this.localStore=t,this.remoteStore=n,this.eventManager=r,this.sharedClientState=i,this.currentUser=s,this.maxConcurrentLimboResolutions=a,this.vo={},this.Po=new Dc(function(c){return tL(c)},_h),this.Vo=new Map,this.So=new Set,this.Do=new Pn(de.comparator),this.Co=new Map,this.No=new bT,this.xo={},this.ko=new Map,this.Fo=lv.Yt(),this.onlineState="Unknown",this.$o=void 0}return Object.defineProperty(e.prototype,"isPrimaryClient",{get:function(){return this.$o===!0},enumerable:!1,configurable:!0}),e}();function pX(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c;return A(this,function(l){switch(l.label){case 0:return n=DT(e),(s=n.Po.get(t))?(r=s.targetId,n.sharedClientState.addLocalQueryTarget(r),i=s.view.Ro(),[3,4]):[3,1];case 1:return[4,fc(n.localStore,Kr(t))];case 2:return a=l.sent(),c=n.sharedClientState.addLocalQueryTarget(a.targetId),r=a.targetId,[4,NT(n,t,r,c==="current")];case 3:i=l.sent(),n.isPrimaryClient&&Ng(n.remoteStore,a),l.label=4;case 4:return[2,i]}})})}function NT(e,t,n,r){return R(this,void 0,void 0,function(){var i,s,a,c,l,h;return A(this,function(d){switch(d.label){case 0:return e.Oo=function(v,g,y){return function(_,b,T,C){return R(this,void 0,void 0,function(){var x,O,L;return A(this,function($){switch($.label){case 0:return x=b.view._o(T),x.Nn?[4,fv(_.localStore,b.query,!1).then(function(P){var re=P.documents;return b.view._o(re,x)})]:[3,2];case 1:x=$.sent(),$.label=2;case 2:return O=C&&C.targetChanges.get(b.targetId),L=b.view.applyChanges(x,_.isPrimaryClient,O),[2,(Wb(_,b.targetId,L.To),L.snapshot)]}})})}(e,v,g,y)},[4,fv(e.localStore,t,!0)];case 1:return i=d.sent(),s=new nF(t,i.Bn),a=s._o(i.documents),c=dT.createSynthesizedTargetChangeForCurrentChange(n,r&&e.onlineState!=="Offline"),l=s.applyChanges(a,e.isPrimaryClient,c),Wb(e,n,l.To),h=new fX(t,n,s),[2,(e.Po.set(t,h),e.Vo.has(n)?e.Vo.get(n).push(t):e.Vo.set(n,[t]),l.snapshot)]}})})}function vX(e,t){return R(this,void 0,void 0,function(){var n,r,i;return A(this,function(s){switch(s.label){case 0:return n=ee(e),r=n.Po.get(t),(i=n.Vo.get(r.targetId)).length>1?[2,(n.Vo.set(r.targetId,i.filter(function(a){return!_h(a,t)})),void n.Po.delete(t))]:n.isPrimaryClient?(n.sharedClientState.removeLocalQueryTarget(r.targetId),n.sharedClientState.isActiveQueryTarget(r.targetId)?[3,2]:[4,hc(n.localStore,r.targetId,!1).then(function(){n.sharedClientState.clearQueryState(r.targetId),Bf(n.remoteStore,r.targetId),dc(n,r.targetId)}).catch(Fa)]):[3,3];case 1:s.sent(),s.label=2;case 2:return[3,5];case 3:return dc(n,r.targetId),[4,hc(n.localStore,r.targetId,!0)];case 4:s.sent(),s.label=5;case 5:return[2]}})})}function gX(e,t,n){return R(this,void 0,void 0,function(){var r,i,s,a;return A(this,function(c){switch(c.label){case 0:r=MT(e),c.label=1;case 1:return c.trys.push([1,5,,6]),[4,function(l,h){var d,v=ee(l),g=cr.now(),y=h.reduce(function(_,b){return _.add(b.key)},ot());return v.persistence.runTransaction("Locally write mutations","readwrite",function(_){return v.Mn.pn(_,y).next(function(b){d=b;for(var T=[],C=0,x=h;C0?c.bo=!0:s.modifiedDocuments.size>0?be(c.bo):s.removedDocuments.size>0&&(be(c.bo),c.bo=!1))}),[4,yo(n,r,t)];case 3:return i.sent(),[3,6];case 4:return[4,Fa(i.sent())];case 5:return i.sent(),[3,6];case 6:return[2]}})})}function hN(e,t,n){var r=ee(e);if(r.isPrimaryClient&&n===0||!r.isPrimaryClient&&n===1){var i=[];r.Po.forEach(function(s,a){var c=a.view.zr(t);c.snapshot&&i.push(c.snapshot)}),function(s,a){var c=ee(s);c.onlineState=a;var l=!1;c.queries.forEach(function(h,d){for(var v=0,g=d.listeners;v0&&e.Do.size=0})}(i.localStore,c)];case 2:return y.sent()?[4,s.close()]:[3,4];case 3:return[2,(y.sent(),void a._completeWith(function(_){return{taskState:"Success",documentsLoaded:_.totalDocuments,bytesLoaded:_.totalBytes,totalDocuments:_.totalDocuments,totalBytes:_.totalBytes}}(c)))];case 4:return a._updateProgress(ZL(c)),l=new lX(c,i.localStore,s.R),[4,s.Lo()];case 5:h=y.sent(),y.label=6;case 6:return h?[4,l.oo(h)]:[3,10];case 7:return(d=y.sent())&&a._updateProgress(d),[4,s.Lo()];case 8:h=y.sent(),y.label=9;case 9:return[3,6];case 10:return[4,l.complete()];case 11:return v=y.sent(),[4,yo(i,v.wn,void 0)];case 12:return y.sent(),[4,function(_,b){var T=ee(_);return T.persistence.runTransaction("Save bundle","readwrite",function(C){return T.Ke.saveBundleMetadata(C,b)})}(i.localStore,c)];case 13:return y.sent(),a._completeWith(v.progress),[3,15];case 14:return Df("SyncEngine","Loading bundle failed with "+(g=y.sent())),a._failWith(g),[3,15];case 15:return[2]}})})})(r,t,n).then(function(){r.sharedClientState.notifyBundleLoaded()})}var sF=function(){function e(){this.synchronizeTabs=!1}return e.prototype.initialize=function(t){return R(this,void 0,void 0,function(){return A(this,function(n){switch(n.label){case 0:return this.R=Ih(t.databaseInfo.databaseId),this.sharedClientState=this.Bo(t),this.persistence=this.qo(t),[4,this.persistence.start()];case 1:return n.sent(),this.gcScheduler=this.Uo(t),this.localStore=this.Ko(t),[2]}})})},e.prototype.Uo=function(t){return null},e.prototype.Ko=function(t){return UL(this.persistence,new FL,t.initialUser,this.R)},e.prototype.qo=function(t){return new U8(V8.bs,this.R)},e.prototype.Bo=function(t){return new HL},e.prototype.terminate=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return this.gcScheduler&&this.gcScheduler.stop(),[4,this.sharedClientState.shutdown()];case 1:return t.sent(),[4,this.persistence.shutdown()];case 2:return t.sent(),[2]}})})},e}(),aF=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).Qo=n,s.cacheSizeBytes=r,s.forceOwnership=i,s.synchronizeTabs=!1,s}return te(t,e),t.prototype.initialize=function(n){return R(this,void 0,void 0,function(){var r=this;return A(this,function(i){switch(i.label){case 0:return[4,e.prototype.initialize.call(this,n)];case 1:return i.sent(),[4,N8(this.localStore)];case 2:return i.sent(),[4,this.Qo.initialize(this,n)];case 3:return i.sent(),[4,MT(this.Qo.syncEngine)];case 4:return i.sent(),[4,Lc(this.Qo.remoteStore)];case 5:return i.sent(),[4,this.persistence.He(function(){return r.gcScheduler&&!r.gcScheduler.started&&r.gcScheduler.start(r.localStore),Promise.resolve()})];case 6:return i.sent(),[2]}})})},t.prototype.Ko=function(n){return UL(this.persistence,new FL,n.initialUser,this.R)},t.prototype.Uo=function(n){var r=this.persistence.referenceDelegate.garbageCollector;return new m8(r,n.asyncQueue)},t.prototype.qo=function(n){var r=wT(n.databaseInfo.databaseId,n.databaseInfo.persistenceKey),i=this.cacheSizeBytes!==void 0?Si.withCacheSize(this.cacheSizeBytes):Si.DEFAULT;return new T8(this.synchronizeTabs,r,n.clientId,i,n.asyncQueue,KL(),gp(),this.R,this.sharedClientState,!!this.forceOwnership)},t.prototype.Bo=function(n){return new HL},t}(sF),OX=function(e){function t(n,r){var i=this;return(i=e.call(this,n,r,!1)||this).Qo=n,i.cacheSizeBytes=r,i.synchronizeTabs=!0,i}return te(t,e),t.prototype.initialize=function(n){return R(this,void 0,void 0,function(){var r,i=this;return A(this,function(s){switch(s.label){case 0:return[4,e.prototype.initialize.call(this,n)];case 1:return s.sent(),r=this.Qo.syncEngine,this.sharedClientState instanceof cw?(this.sharedClientState.syncEngine={ui:CX.bind(null,r),ai:RX.bind(null,r),hi:NX.bind(null,r),fn:kX.bind(null,r),ci:SX.bind(null,r)},[4,this.sharedClientState.start()]):[3,3];case 2:s.sent(),s.label=3;case 3:return[4,this.persistence.He(function(a){return R(i,void 0,void 0,function(){return A(this,function(c){switch(c.label){case 0:return[4,AX(this.Qo.syncEngine,a)];case 1:return c.sent(),this.gcScheduler&&(a&&!this.gcScheduler.started?this.gcScheduler.start(this.localStore):a||this.gcScheduler.stop()),[2]}})})})];case 4:return s.sent(),[2]}})})},t.prototype.Bo=function(n){var r=KL();if(!cw.yt(r))throw new H(D.UNIMPLEMENTED,"IndexedDB persistence is only available on platforms that support LocalStorage.");var i=wT(n.databaseInfo.databaseId,n.databaseInfo.persistenceKey);return new cw(r,n.asyncQueue,i,n.clientId,n.initialUser)},t}(aF),Gb=function(){function e(){}return e.prototype.initialize=function(t,n){return R(this,void 0,void 0,function(){var r=this;return A(this,function(i){switch(i.label){case 0:return this.localStore?[3,2]:(this.localStore=t.localStore,this.sharedClientState=t.sharedClientState,this.datastore=this.createDatastore(n),this.remoteStore=this.createRemoteStore(n),this.eventManager=this.createEventManager(n),this.syncEngine=this.createSyncEngine(n,!t.synchronizeTabs),this.sharedClientState.onlineStateHandler=function(s){return hN(r.syncEngine,s,1)},this.remoteStore.remoteSyncer.handleCredentialChange=EX.bind(null,this.syncEngine),[4,Kb(this.remoteStore,this.syncEngine.isPrimaryClient)]);case 1:i.sent(),i.label=2;case 2:return[2]}})})},e.prototype.createEventManager=function(t){return new sX},e.prototype.createDatastore=function(t){var n,r=Ih(t.databaseInfo.databaseId),i=(n=t.databaseInfo,new K8(n));return function(s,a,c){return new z8(s,a,c)}(t.credentials,i,r)},e.prototype.createRemoteStore=function(t){var n,r,i,s,a,c=this;return n=this.localStore,r=this.datastore,i=t.asyncQueue,s=function(l){return hN(c.syncEngine,l,0)},a=cN.yt()?new cN:new q8,new Y8(n,r,i,s,a)},e.prototype.createSyncEngine=function(t,n){return function(r,i,s,a,c,l,h){var d=new dX(r,i,s,a,c,l);return h&&(d.$o=!0),d}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,t.initialUser,t.maxConcurrentLimboResolutions,n)},e.prototype.terminate=function(){return function(t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return n=ee(t),Y("RemoteStore","RemoteStore shutting down."),n.Or.add(5),[4,Mc(n)];case 1:return r.sent(),n.Lr.shutdown(),n.Br.set("Unknown"),[2]}})})}(this.remoteStore)},e}();/** * @license * Copyright 2020 Google LLC * @@ -2571,8 +2571,8 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var xg=function(){function e(t){this.observer=t,this.muted=!1}return e.prototype.next=function(t){this.observer.next&&this.jo(this.observer.next,t)},e.prototype.error=function(t){this.observer.error?this.jo(this.observer.error,t):console.error("Uncaught Error in snapshot listener:",t)},e.prototype.Wo=function(){this.muted=!0},e.prototype.jo=function(t,n){var r=this;this.muted||setTimeout(function(){r.muted||t(n)},0)},e}(),LX=function(){function e(t,n){var r=this;this.Go=t,this.R=n,this.metadata=new Pn,this.buffer=new Uint8Array,this.zo=new TextDecoder("utf-8"),this.Ho().then(function(i){i&&i.io()?r.metadata.resolve(i.payload.metadata):r.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is - `+JSON.stringify(i==null?void 0:i.payload)))},function(i){return r.metadata.reject(i)})}return e.prototype.close=function(){return this.Go.cancel()},e.prototype.getMetadata=function(){return R(this,void 0,void 0,function(){return A(this,function(t){return[2,this.metadata.promise]})})},e.prototype.Lo=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return[4,this.getMetadata()];case 1:return[2,(t.sent(),this.Ho())]}})})},e.prototype.Ho=function(){return R(this,void 0,void 0,function(){var t,n,r,i;return A(this,function(s){switch(s.label){case 0:return[4,this.Jo()];case 1:return(t=s.sent())===null?[2,null]:(n=this.zo.decode(t),r=Number(n),isNaN(r)&&this.Yo("length string ("+n+") is not valid number"),[4,this.Xo(r)]);case 2:return i=s.sent(),[2,new hX(JSON.parse(i),t.length+r)]}})})},e.prototype.Zo=function(){return this.buffer.findIndex(function(t){return t==="{".charCodeAt(0)})},e.prototype.Jo=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return this.Zo()<0?[4,this.tc()]:[3,3];case 1:if(r.sent())return[3,3];r.label=2;case 2:return[3,0];case 3:return this.buffer.length===0?[2,null]:((t=this.Zo())<0&&this.Yo("Reached the end of bundle when a length string is expected."),n=this.buffer.slice(0,t),[2,(this.buffer=this.buffer.slice(t),n)])}})})},e.prototype.Xo=function(t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return this.buffer.length0)throw new H(D.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(s,a){return R(this,void 0,void 0,function(){var c,l,h,d,v,g;return A(this,function(y){switch(y.label){case 0:return c=ee(s),l=jf(c.R)+"/documents",h={documents:a.map(function(_){return Uf(c.R,_)})},[4,c.$i("BatchGetDocuments",l,h)];case 1:return d=y.sent(),v=new Map,d.forEach(function(_){var b=function(T,C){return"found"in C?function(x,O){be(!!O.found),O.found.name,O.found.updateTime;var L=xi(x,O.found.name),$=sn(O.found.updateTime),P=new Er({mapValue:{fields:O.found.fields}});return bn.newFoundDocument(L,$,P)}(T,C):"missing"in C?function(x,O){be(!!O.missing),be(!!O.readTime);var L=xi(x,O.missing),$=sn(O.readTime);return bn.newNoDocument(L,$)}(T,C):he()}(c.R,_);v.set(b.key.toString(),b)}),g=[],[2,(a.forEach(function(_){var b=v.get(_.toString());be(!!b),g.push(b)}),g)]}})})}(this.datastore,t)];case 1:return[2,((n=i.sent()).forEach(function(s){return r.recordVersion(s)}),n)]}})})},e.prototype.set=function(t,n){this.write(n.toMutation(t,this.precondition(t))),this.writtenDocs.add(t.toString())},e.prototype.update=function(t,n){try{this.write(n.toMutation(t,this.preconditionForUpdate(t)))}catch(r){this.lastWriteError=r}this.writtenDocs.add(t.toString())},e.prototype.delete=function(t){this.write(new Eh(t,this.precondition(t))),this.writtenDocs.add(t.toString())},e.prototype.commit=function(){return R(this,void 0,void 0,function(){var t,n=this;return A(this,function(r){switch(r.label){case 0:if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;return t=this.readVersions,this.mutations.forEach(function(i){t.delete(i.key.toString())}),t.forEach(function(i,s){var a=de.fromPath(s);n.mutations.push(new fT(a,n.precondition(a)))}),[4,function(i,s){return R(this,void 0,void 0,function(){var a,c,l;return A(this,function(h){switch(h.label){case 0:return a=ee(i),c=jf(a.R)+"/documents",l={writes:s.map(function(d){return uv(a.R,d)})},[4,a.Ni("Commit",c,l)];case 1:return h.sent(),[2]}})})}(this.datastore,this.mutations)];case 1:return r.sent(),this.committed=!0,[2]}})})},e.prototype.recordVersion=function(t){var n;if(t.isFoundDocument())n=t.version;else{if(!t.isNoDocument())throw he();n=De.min()}var r=this.readVersions.get(t.key.toString());if(r){if(!n.isEqual(r))throw new H(D.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(t.key.toString(),n)},e.prototype.precondition=function(t){var n=this.readVersions.get(t.toString());return!this.writtenDocs.has(t.toString())&&n?kn.updateTime(n):kn.none()},e.prototype.preconditionForUpdate=function(t){var n=this.readVersions.get(t.toString());if(!this.writtenDocs.has(t.toString())&&n){if(n.isEqual(De.min()))throw new H(D.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return kn.updateTime(n)}return kn.exists(!0)},e.prototype.write=function(t){this.ensureCommitNotCalled(),this.mutations.push(t)},e.prototype.ensureCommitNotCalled=function(){},e}(),UX=function(){function e(t,n,r,i){this.asyncQueue=t,this.datastore=n,this.updateFunction=r,this.deferred=i,this.ec=5,this.Zi=new ET(this.asyncQueue,"transaction_retry")}return e.prototype.run=function(){this.ec-=1,this.nc()},e.prototype.nc=function(){var t=this;this.Zi.ji(function(){return R(t,void 0,void 0,function(){var n,r,i=this;return A(this,function(s){return n=new FX(this.datastore),(r=this.sc(n))&&r.then(function(a){i.asyncQueue.enqueueAndForget(function(){return n.commit().then(function(){i.deferred.resolve(a)}).catch(function(c){i.ic(c)})})}).catch(function(a){i.ic(a)}),[2]})})})},e.prototype.sc=function(t){try{var n=this.updateFunction(t);return!Ma(n)&&n.catch&&n.then?n:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(r){return this.deferred.reject(r),null}},e.prototype.ic=function(t){var n=this;this.ec>0&&this.rc(t)?(this.ec-=1,this.asyncQueue.enqueueAndForget(function(){return n.nc(),Promise.resolve()})):this.deferred.reject(t)},e.prototype.rc=function(t){if(t.name==="FirebaseError"){var n=t.code;return n==="aborted"||n==="failed-precondition"||!fL(n)}return!1},e}(),jX=function(){function e(t,n,r){var i=this;this.credentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=dn.UNAUTHENTICATED,this.clientId=KM.u(),this.credentialListener=function(){return Promise.resolve()},this.credentials.setChangeListener(n,function(s){return R(i,void 0,void 0,function(){return A(this,function(a){switch(a.label){case 0:return Y("FirestoreClient","Received user=",s.uid),[4,this.credentialListener(s)];case 1:return a.sent(),this.user=s,[2]}})})})}return e.prototype.getConfiguration=function(){return R(this,void 0,void 0,function(){return A(this,function(t){return[2,{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100}]})})},e.prototype.setCredentialChangeListener=function(t){this.credentialListener=t},e.prototype.verifyNotTerminated=function(){if(this.asyncQueue.isShuttingDown)throw new H(D.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.terminate=function(){var t=this;this.asyncQueue.enterRestrictedMode();var n=new Pn;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(function(){return R(t,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),this.onlineComponents?[4,this.onlineComponents.terminate()]:[3,2];case 1:s.sent(),s.label=2;case 2:return this.offlineComponents?[4,this.offlineComponents.terminate()]:[3,4];case 3:s.sent(),s.label=4;case 4:return this.credentials.removeChangeListener(),n.resolve(),[3,6];case 5:return r=s.sent(),i=Uc(r,"Failed to shutdown persistence"),n.reject(i),[3,6];case 6:return[2]}})})}),n.promise},e}();/** + */var xg=function(){function e(t){this.observer=t,this.muted=!1}return e.prototype.next=function(t){this.observer.next&&this.jo(this.observer.next,t)},e.prototype.error=function(t){this.observer.error?this.jo(this.observer.error,t):console.error("Uncaught Error in snapshot listener:",t)},e.prototype.Wo=function(){this.muted=!0},e.prototype.jo=function(t,n){var r=this;this.muted||setTimeout(function(){r.muted||t(n)},0)},e}(),PX=function(){function e(t,n){var r=this;this.Go=t,this.R=n,this.metadata=new On,this.buffer=new Uint8Array,this.zo=new TextDecoder("utf-8"),this.Ho().then(function(i){i&&i.io()?r.metadata.resolve(i.payload.metadata):r.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is + `+JSON.stringify(i==null?void 0:i.payload)))},function(i){return r.metadata.reject(i)})}return e.prototype.close=function(){return this.Go.cancel()},e.prototype.getMetadata=function(){return R(this,void 0,void 0,function(){return A(this,function(t){return[2,this.metadata.promise]})})},e.prototype.Lo=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return[4,this.getMetadata()];case 1:return[2,(t.sent(),this.Ho())]}})})},e.prototype.Ho=function(){return R(this,void 0,void 0,function(){var t,n,r,i;return A(this,function(s){switch(s.label){case 0:return[4,this.Jo()];case 1:return(t=s.sent())===null?[2,null]:(n=this.zo.decode(t),r=Number(n),isNaN(r)&&this.Yo("length string ("+n+") is not valid number"),[4,this.Xo(r)]);case 2:return i=s.sent(),[2,new cX(JSON.parse(i),t.length+r)]}})})},e.prototype.Zo=function(){return this.buffer.findIndex(function(t){return t==="{".charCodeAt(0)})},e.prototype.Jo=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return this.Zo()<0?[4,this.tc()]:[3,3];case 1:if(r.sent())return[3,3];r.label=2;case 2:return[3,0];case 3:return this.buffer.length===0?[2,null]:((t=this.Zo())<0&&this.Yo("Reached the end of bundle when a length string is expected."),n=this.buffer.slice(0,t),[2,(this.buffer=this.buffer.slice(t),n)])}})})},e.prototype.Xo=function(t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return this.buffer.length0)throw new H(D.INVALID_ARGUMENT,"Firestore transactions require all reads to be executed before all writes.");return[4,function(s,a){return R(this,void 0,void 0,function(){var c,l,h,d,v,g;return A(this,function(y){switch(y.label){case 0:return c=ee(s),l=Vf(c.R)+"/documents",h={documents:a.map(function(_){return jf(c.R,_)})},[4,c.$i("BatchGetDocuments",l,h)];case 1:return d=y.sent(),v=new Map,d.forEach(function(_){var b=function(T,C){return"found"in C?function(x,O){be(!!O.found),O.found.name,O.found.updateTime;var L=xi(x,O.found.name),$=on(O.found.updateTime),P=new br({mapValue:{fields:O.found.fields}});return bn.newFoundDocument(L,$,P)}(T,C):"missing"in C?function(x,O){be(!!O.missing),be(!!O.readTime);var L=xi(x,O.missing),$=on(O.readTime);return bn.newNoDocument(L,$)}(T,C):he()}(c.R,_);v.set(b.key.toString(),b)}),g=[],[2,(a.forEach(function(_){var b=v.get(_.toString());be(!!b),g.push(b)}),g)]}})})}(this.datastore,t)];case 1:return[2,((n=i.sent()).forEach(function(s){return r.recordVersion(s)}),n)]}})})},e.prototype.set=function(t,n){this.write(n.toMutation(t,this.precondition(t))),this.writtenDocs.add(t.toString())},e.prototype.update=function(t,n){try{this.write(n.toMutation(t,this.preconditionForUpdate(t)))}catch(r){this.lastWriteError=r}this.writtenDocs.add(t.toString())},e.prototype.delete=function(t){this.write(new Th(t,this.precondition(t))),this.writtenDocs.add(t.toString())},e.prototype.commit=function(){return R(this,void 0,void 0,function(){var t,n=this;return A(this,function(r){switch(r.label){case 0:if(this.ensureCommitNotCalled(),this.lastWriteError)throw this.lastWriteError;return t=this.readVersions,this.mutations.forEach(function(i){t.delete(i.key.toString())}),t.forEach(function(i,s){var a=de.fromPath(s);n.mutations.push(new fT(a,n.precondition(a)))}),[4,function(i,s){return R(this,void 0,void 0,function(){var a,c,l;return A(this,function(h){switch(h.label){case 0:return a=ee(i),c=Vf(a.R)+"/documents",l={writes:s.map(function(d){return uv(a.R,d)})},[4,a.Ni("Commit",c,l)];case 1:return h.sent(),[2]}})})}(this.datastore,this.mutations)];case 1:return r.sent(),this.committed=!0,[2]}})})},e.prototype.recordVersion=function(t){var n;if(t.isFoundDocument())n=t.version;else{if(!t.isNoDocument())throw he();n=De.min()}var r=this.readVersions.get(t.key.toString());if(r){if(!n.isEqual(r))throw new H(D.ABORTED,"Document version changed between two reads.")}else this.readVersions.set(t.key.toString(),n)},e.prototype.precondition=function(t){var n=this.readVersions.get(t.toString());return!this.writtenDocs.has(t.toString())&&n?An.updateTime(n):An.none()},e.prototype.preconditionForUpdate=function(t){var n=this.readVersions.get(t.toString());if(!this.writtenDocs.has(t.toString())&&n){if(n.isEqual(De.min()))throw new H(D.INVALID_ARGUMENT,"Can't update a document that doesn't exist.");return An.updateTime(n)}return An.exists(!0)},e.prototype.write=function(t){this.ensureCommitNotCalled(),this.mutations.push(t)},e.prototype.ensureCommitNotCalled=function(){},e}(),MX=function(){function e(t,n,r,i){this.asyncQueue=t,this.datastore=n,this.updateFunction=r,this.deferred=i,this.ec=5,this.Zi=new ET(this.asyncQueue,"transaction_retry")}return e.prototype.run=function(){this.ec-=1,this.nc()},e.prototype.nc=function(){var t=this;this.Zi.ji(function(){return R(t,void 0,void 0,function(){var n,r,i=this;return A(this,function(s){return n=new DX(this.datastore),(r=this.sc(n))&&r.then(function(a){i.asyncQueue.enqueueAndForget(function(){return n.commit().then(function(){i.deferred.resolve(a)}).catch(function(c){i.ic(c)})})}).catch(function(a){i.ic(a)}),[2]})})})},e.prototype.sc=function(t){try{var n=this.updateFunction(t);return!Ma(n)&&n.catch&&n.then?n:(this.deferred.reject(Error("Transaction callback must return a Promise")),null)}catch(r){return this.deferred.reject(r),null}},e.prototype.ic=function(t){var n=this;this.ec>0&&this.rc(t)?(this.ec-=1,this.asyncQueue.enqueueAndForget(function(){return n.nc(),Promise.resolve()})):this.deferred.reject(t)},e.prototype.rc=function(t){if(t.name==="FirebaseError"){var n=t.code;return n==="aborted"||n==="failed-precondition"||!fL(n)}return!1},e}(),LX=function(){function e(t,n,r){var i=this;this.credentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=hn.UNAUTHENTICATED,this.clientId=KM.u(),this.credentialListener=function(){return Promise.resolve()},this.credentials.setChangeListener(n,function(s){return R(i,void 0,void 0,function(){return A(this,function(a){switch(a.label){case 0:return Y("FirestoreClient","Received user=",s.uid),[4,this.credentialListener(s)];case 1:return a.sent(),this.user=s,[2]}})})})}return e.prototype.getConfiguration=function(){return R(this,void 0,void 0,function(){return A(this,function(t){return[2,{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,credentials:this.credentials,initialUser:this.user,maxConcurrentLimboResolutions:100}]})})},e.prototype.setCredentialChangeListener=function(t){this.credentialListener=t},e.prototype.verifyNotTerminated=function(){if(this.asyncQueue.isShuttingDown)throw new H(D.FAILED_PRECONDITION,"The client has already been terminated.")},e.prototype.terminate=function(){var t=this;this.asyncQueue.enterRestrictedMode();var n=new On;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(function(){return R(t,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return s.trys.push([0,5,,6]),this.onlineComponents?[4,this.onlineComponents.terminate()]:[3,2];case 1:s.sent(),s.label=2;case 2:return this.offlineComponents?[4,this.offlineComponents.terminate()]:[3,4];case 3:s.sent(),s.label=4;case 4:return this.credentials.removeChangeListener(),n.resolve(),[3,6];case 5:return r=s.sent(),i=Uc(r,"Failed to shutdown persistence"),n.reject(i),[3,6];case 6:return[2]}})})}),n.promise},e}();/** * @license * Copyright 2020 Google LLC * @@ -2587,7 +2587,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function uF(e,t){return R(this,void 0,void 0,function(){var n,r,i=this;return A(this,function(s){switch(s.label){case 0:return e.asyncQueue.verifyOperationInProgress(),Y("FirestoreClient","Initializing OfflineComponentProvider"),[4,e.getConfiguration()];case 1:return n=s.sent(),[4,t.initialize(n)];case 2:return s.sent(),r=n.initialUser,e.setCredentialChangeListener(function(a){return R(i,void 0,void 0,function(){return A(this,function(c){switch(c.label){case 0:return r.isEqual(a)?[3,2]:[4,jL(t.localStore,a)];case 1:c.sent(),r=a,c.label=2;case 2:return[2]}})})}),t.persistence.setDatabaseDeletedListener(function(){return e.terminate()}),e.offlineComponents=t,[2]}})})}function cF(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return e.asyncQueue.verifyOperationInProgress(),[4,LT(e)];case 1:return n=i.sent(),Y("FirestoreClient","Initializing OnlineComponentProvider"),[4,e.getConfiguration()];case 2:return r=i.sent(),[4,t.initialize(n,r)];case 3:return i.sent(),e.setCredentialChangeListener(function(s){return function(a,c){return R(this,void 0,void 0,function(){var l,h;return A(this,function(d){switch(d.label){case 0:return(l=ee(a)).asyncQueue.verifyOperationInProgress(),Y("RemoteStore","RemoteStore received new credentials"),h=ds(l),l.Or.add(3),[4,Mc(l)];case 1:return d.sent(),h&&l.Br.set("Unknown"),[4,l.remoteSyncer.handleCredentialChange(c)];case 2:return d.sent(),l.Or.delete(3),[4,Ih(l)];case 3:return d.sent(),[2]}})})}(t.remoteStore,s)}),e.onlineComponents=t,[2]}})})}function LT(e){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return e.offlineComponents?[3,2]:(Y("FirestoreClient","Using default OfflineComponentProvider"),[4,uF(e,new sF)]);case 1:t.sent(),t.label=2;case 2:return[2,e.offlineComponents]}})})}function Og(e){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return e.onlineComponents?[3,2]:(Y("FirestoreClient","Using default OnlineComponentProvider"),[4,cF(e,new Gb)]);case 1:t.sent(),t.label=2;case 2:return[2,e.onlineComponents]}})})}function vN(e){return LT(e).then(function(t){return t.persistence})}function FT(e){return LT(e).then(function(t){return t.localStore})}function gN(e){return Og(e).then(function(t){return t.remoteStore})}function UT(e){return Og(e).then(function(t){return t.syncEngine})}function pc(e){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return[4,Og(e)];case 1:return t=r.sent(),[2,((n=t.eventManager).onListen=mX.bind(null,t.syncEngine),n.onUnlisten=yX.bind(null,t.syncEngine),n)]}})})}function mN(e,t,n){var r=this;n===void 0&&(n={});var i=new Pn;return e.asyncQueue.enqueueAndForget(function(){return R(r,void 0,void 0,function(){var s;return A(this,function(a){switch(a.label){case 0:return s=function(c,l,h,d,v){var g=new xg({next:function(_){l.enqueueAndForget(function(){return AT(c,y)});var b=_.docs.has(h);!b&&_.fromCache?v.reject(new H(D.UNAVAILABLE,"Failed to get document because the client is offline.")):b&&_.fromCache&&d&&d.source==="server"?v.reject(new H(D.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):v.resolve(_)},error:function(_){return v.reject(_)}}),y=new RT(Pc(h.path),g,{includeMetadataChanges:!0,so:!0});return CT(c,y)},[4,pc(e)];case 1:return[2,s.apply(void 0,[a.sent(),e.asyncQueue,t,n,i])]}})})}),i.promise}function yN(e,t,n){var r=this;n===void 0&&(n={});var i=new Pn;return e.asyncQueue.enqueueAndForget(function(){return R(r,void 0,void 0,function(){var s;return A(this,function(a){switch(a.label){case 0:return s=function(c,l,h,d,v){var g=new xg({next:function(_){l.enqueueAndForget(function(){return AT(c,y)}),_.fromCache&&d.source==="server"?v.reject(new H(D.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):v.resolve(_)},error:function(_){return v.reject(_)}}),y=new RT(h,g,{includeMetadataChanges:!0,so:!0});return CT(c,y)},[4,pc(e)];case 1:return[2,s.apply(void 0,[a.sent(),e.asyncQueue,t,n,i])]}})})}),i.promise}var VX=function(e,t,n,r,i,s,a,c){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=a,this.useFetchStreams=c},pv=function(){function e(t,n){this.projectId=t,this.database=n||"(default)"}return Object.defineProperty(e.prototype,"isDefaultDatabase",{get:function(){return this.database==="(default)"},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e}(),_N=new Map,lF=function(e,t){this.user=t,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization="Bearer "+e},wN=function(){function e(){this.changeListener=null}return e.prototype.getToken=function(){return Promise.resolve(null)},e.prototype.invalidateToken=function(){},e.prototype.setChangeListener=function(t,n){this.changeListener=n,t.enqueueRetryable(function(){return n(dn.UNAUTHENTICATED)})},e.prototype.removeChangeListener=function(){this.changeListener=null},e}(),BX=function(){function e(t){this.token=t,this.changeListener=null}return e.prototype.getToken=function(){return Promise.resolve(this.token)},e.prototype.invalidateToken=function(){},e.prototype.setChangeListener=function(t,n){var r=this;this.changeListener=n,t.enqueueRetryable(function(){return n(r.token.user)})},e.prototype.removeChangeListener=function(){this.changeListener=null},e}(),qX=function(){function e(t){var n=this;this.currentUser=dn.UNAUTHENTICATED,this.oc=new Pn,this.cc=0,this.forceRefresh=!1,this.auth=null,this.asyncQueue=null,this.uc=function(){n.cc++,n.currentUser=n.ac(),n.oc.resolve(),n.changeListener&&n.asyncQueue.enqueueRetryable(function(){return n.changeListener(n.currentUser)})};var r=function(i){Y("FirebaseCredentialsProvider","Auth detected"),n.auth=i,n.auth.addAuthTokenListener(n.uc)};t.onInit(function(i){return r(i)}),setTimeout(function(){if(!n.auth){var i=t.getImmediate({optional:!0});i?r(i):(Y("FirebaseCredentialsProvider","Auth not yet detected"),n.oc.resolve())}},0)}return e.prototype.getToken=function(){var t=this,n=this.cc,r=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(r).then(function(i){return t.cc!==n?(Y("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):i?(be(typeof i.accessToken=="string"),new lF(i.accessToken,t.currentUser)):null}):Promise.resolve(null)},e.prototype.invalidateToken=function(){this.forceRefresh=!0},e.prototype.setChangeListener=function(t,n){var r=this;this.asyncQueue=t,this.asyncQueue.enqueueRetryable(function(){return R(r,void 0,void 0,function(){return A(this,function(i){switch(i.label){case 0:return[4,this.oc.promise];case 1:return i.sent(),[4,n(this.currentUser)];case 2:return i.sent(),this.changeListener=n,[2]}})})})},e.prototype.removeChangeListener=function(){this.auth&&this.auth.removeAuthTokenListener(this.uc),this.changeListener=function(){return Promise.resolve()}},e.prototype.ac=function(){var t=this.auth&&this.auth.getUid();return be(t===null||typeof t=="string"),new dn(t)},e}(),$X=function(){function e(t,n,r){this.hc=t,this.lc=n,this.fc=r,this.type="FirstParty",this.user=dn.FIRST_PARTY}return Object.defineProperty(e.prototype,"authHeaders",{get:function(){var t={"X-Goog-AuthUser":this.lc},n=this.hc.auth.getAuthHeaderValueForFirstParty([]);return n&&(t.Authorization=n),this.fc&&(t["X-Goog-Iam-Authorization-Token"]=this.fc),t},enumerable:!1,configurable:!0}),e}(),HX=function(){function e(t,n,r){this.hc=t,this.lc=n,this.fc=r}return e.prototype.getToken=function(){return Promise.resolve(new $X(this.hc,this.lc,this.fc))},e.prototype.setChangeListener=function(t,n){t.enqueueRetryable(function(){return n(dn.FIRST_PARTY)})},e.prototype.removeChangeListener=function(){},e.prototype.invalidateToken=function(){},e}();/** + */function uF(e,t){return R(this,void 0,void 0,function(){var n,r,i=this;return A(this,function(s){switch(s.label){case 0:return e.asyncQueue.verifyOperationInProgress(),Y("FirestoreClient","Initializing OfflineComponentProvider"),[4,e.getConfiguration()];case 1:return n=s.sent(),[4,t.initialize(n)];case 2:return s.sent(),r=n.initialUser,e.setCredentialChangeListener(function(a){return R(i,void 0,void 0,function(){return A(this,function(c){switch(c.label){case 0:return r.isEqual(a)?[3,2]:[4,jL(t.localStore,a)];case 1:c.sent(),r=a,c.label=2;case 2:return[2]}})})}),t.persistence.setDatabaseDeletedListener(function(){return e.terminate()}),e.offlineComponents=t,[2]}})})}function cF(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return e.asyncQueue.verifyOperationInProgress(),[4,LT(e)];case 1:return n=i.sent(),Y("FirestoreClient","Initializing OnlineComponentProvider"),[4,e.getConfiguration()];case 2:return r=i.sent(),[4,t.initialize(n,r)];case 3:return i.sent(),e.setCredentialChangeListener(function(s){return function(a,c){return R(this,void 0,void 0,function(){var l,h;return A(this,function(d){switch(d.label){case 0:return(l=ee(a)).asyncQueue.verifyOperationInProgress(),Y("RemoteStore","RemoteStore received new credentials"),h=ds(l),l.Or.add(3),[4,Mc(l)];case 1:return d.sent(),h&&l.Br.set("Unknown"),[4,l.remoteSyncer.handleCredentialChange(c)];case 2:return d.sent(),l.Or.delete(3),[4,Sh(l)];case 3:return d.sent(),[2]}})})}(t.remoteStore,s)}),e.onlineComponents=t,[2]}})})}function LT(e){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return e.offlineComponents?[3,2]:(Y("FirestoreClient","Using default OfflineComponentProvider"),[4,uF(e,new sF)]);case 1:t.sent(),t.label=2;case 2:return[2,e.offlineComponents]}})})}function Og(e){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return e.onlineComponents?[3,2]:(Y("FirestoreClient","Using default OnlineComponentProvider"),[4,cF(e,new Gb)]);case 1:t.sent(),t.label=2;case 2:return[2,e.onlineComponents]}})})}function vN(e){return LT(e).then(function(t){return t.persistence})}function FT(e){return LT(e).then(function(t){return t.localStore})}function gN(e){return Og(e).then(function(t){return t.remoteStore})}function UT(e){return Og(e).then(function(t){return t.syncEngine})}function pc(e){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return[4,Og(e)];case 1:return t=r.sent(),[2,((n=t.eventManager).onListen=pX.bind(null,t.syncEngine),n.onUnlisten=vX.bind(null,t.syncEngine),n)]}})})}function mN(e,t,n){var r=this;n===void 0&&(n={});var i=new On;return e.asyncQueue.enqueueAndForget(function(){return R(r,void 0,void 0,function(){var s;return A(this,function(a){switch(a.label){case 0:return s=function(c,l,h,d,v){var g=new xg({next:function(_){l.enqueueAndForget(function(){return AT(c,y)});var b=_.docs.has(h);!b&&_.fromCache?v.reject(new H(D.UNAVAILABLE,"Failed to get document because the client is offline.")):b&&_.fromCache&&d&&d.source==="server"?v.reject(new H(D.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):v.resolve(_)},error:function(_){return v.reject(_)}}),y=new RT(Pc(h.path),g,{includeMetadataChanges:!0,so:!0});return CT(c,y)},[4,pc(e)];case 1:return[2,s.apply(void 0,[a.sent(),e.asyncQueue,t,n,i])]}})})}),i.promise}function yN(e,t,n){var r=this;n===void 0&&(n={});var i=new On;return e.asyncQueue.enqueueAndForget(function(){return R(r,void 0,void 0,function(){var s;return A(this,function(a){switch(a.label){case 0:return s=function(c,l,h,d,v){var g=new xg({next:function(_){l.enqueueAndForget(function(){return AT(c,y)}),_.fromCache&&d.source==="server"?v.reject(new H(D.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):v.resolve(_)},error:function(_){return v.reject(_)}}),y=new RT(h,g,{includeMetadataChanges:!0,so:!0});return CT(c,y)},[4,pc(e)];case 1:return[2,s.apply(void 0,[a.sent(),e.asyncQueue,t,n,i])]}})})}),i.promise}var FX=function(e,t,n,r,i,s,a,c){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=a,this.useFetchStreams=c},pv=function(){function e(t,n){this.projectId=t,this.database=n||"(default)"}return Object.defineProperty(e.prototype,"isDefaultDatabase",{get:function(){return this.database==="(default)"},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return t instanceof e&&t.projectId===this.projectId&&t.database===this.database},e}(),_N=new Map,lF=function(e,t){this.user=t,this.type="OAuth",this.authHeaders={},this.authHeaders.Authorization="Bearer "+e},wN=function(){function e(){this.changeListener=null}return e.prototype.getToken=function(){return Promise.resolve(null)},e.prototype.invalidateToken=function(){},e.prototype.setChangeListener=function(t,n){this.changeListener=n,t.enqueueRetryable(function(){return n(hn.UNAUTHENTICATED)})},e.prototype.removeChangeListener=function(){this.changeListener=null},e}(),UX=function(){function e(t){this.token=t,this.changeListener=null}return e.prototype.getToken=function(){return Promise.resolve(this.token)},e.prototype.invalidateToken=function(){},e.prototype.setChangeListener=function(t,n){var r=this;this.changeListener=n,t.enqueueRetryable(function(){return n(r.token.user)})},e.prototype.removeChangeListener=function(){this.changeListener=null},e}(),jX=function(){function e(t){var n=this;this.currentUser=hn.UNAUTHENTICATED,this.oc=new On,this.cc=0,this.forceRefresh=!1,this.auth=null,this.asyncQueue=null,this.uc=function(){n.cc++,n.currentUser=n.ac(),n.oc.resolve(),n.changeListener&&n.asyncQueue.enqueueRetryable(function(){return n.changeListener(n.currentUser)})};var r=function(i){Y("FirebaseCredentialsProvider","Auth detected"),n.auth=i,n.auth.addAuthTokenListener(n.uc)};t.onInit(function(i){return r(i)}),setTimeout(function(){if(!n.auth){var i=t.getImmediate({optional:!0});i?r(i):(Y("FirebaseCredentialsProvider","Auth not yet detected"),n.oc.resolve())}},0)}return e.prototype.getToken=function(){var t=this,n=this.cc,r=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(r).then(function(i){return t.cc!==n?(Y("FirebaseCredentialsProvider","getToken aborted due to token change."),t.getToken()):i?(be(typeof i.accessToken=="string"),new lF(i.accessToken,t.currentUser)):null}):Promise.resolve(null)},e.prototype.invalidateToken=function(){this.forceRefresh=!0},e.prototype.setChangeListener=function(t,n){var r=this;this.asyncQueue=t,this.asyncQueue.enqueueRetryable(function(){return R(r,void 0,void 0,function(){return A(this,function(i){switch(i.label){case 0:return[4,this.oc.promise];case 1:return i.sent(),[4,n(this.currentUser)];case 2:return i.sent(),this.changeListener=n,[2]}})})})},e.prototype.removeChangeListener=function(){this.auth&&this.auth.removeAuthTokenListener(this.uc),this.changeListener=function(){return Promise.resolve()}},e.prototype.ac=function(){var t=this.auth&&this.auth.getUid();return be(t===null||typeof t=="string"),new hn(t)},e}(),VX=function(){function e(t,n,r){this.hc=t,this.lc=n,this.fc=r,this.type="FirstParty",this.user=hn.FIRST_PARTY}return Object.defineProperty(e.prototype,"authHeaders",{get:function(){var t={"X-Goog-AuthUser":this.lc},n=this.hc.auth.getAuthHeaderValueForFirstParty([]);return n&&(t.Authorization=n),this.fc&&(t["X-Goog-Iam-Authorization-Token"]=this.fc),t},enumerable:!1,configurable:!0}),e}(),BX=function(){function e(t,n,r){this.hc=t,this.lc=n,this.fc=r}return e.prototype.getToken=function(){return Promise.resolve(new VX(this.hc,this.lc,this.fc))},e.prototype.setChangeListener=function(t,n){t.enqueueRetryable(function(){return n(hn.FIRST_PARTY)})},e.prototype.removeChangeListener=function(){},e.prototype.invalidateToken=function(){},e}();/** * @license * Copyright 2017 Google LLC * @@ -2617,7 +2617,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var IN=function(){function e(t){var n;if(t.host===void 0){if(t.ssl!==void 0)throw new H(D.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=(n=t.ssl)===null||n===void 0||n;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,t.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(t.cacheSizeBytes!==-1&&t.cacheSizeBytes<1048576)throw new H(D.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,fF("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return e.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams},e}(),Bf=function(){function e(t,n){this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new IN({}),this._settingsFrozen=!1,t instanceof pv?(this._databaseId=t,this._credentials=new wN):(this._app=t,this._databaseId=function(r){if(!Object.prototype.hasOwnProperty.apply(r.options,["projectId"]))throw new H(D.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new pv(r.options.projectId)}(t),this._credentials=new qX(n))}return Object.defineProperty(e.prototype,"app",{get:function(){if(!this._app)throw new H(D.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_initialized",{get:function(){return this._settingsFrozen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_terminated",{get:function(){return this._terminateTask!==void 0},enumerable:!1,configurable:!0}),e.prototype._setSettings=function(t){if(this._settingsFrozen)throw new H(D.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new IN(t),t.credentials!==void 0&&(this._credentials=function(n){if(!n)return new wN;switch(n.type){case"gapi":var r=n.client;return be(!(typeof r!="object"||r===null||!r.auth||!r.auth.getAuthHeaderValueForFirstParty)),new HX(r,n.sessionIndex||"0",n.iamToken||null);case"provider":return n.client;default:throw new H(D.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))},e.prototype._getSettings=function(){return this._settings},e.prototype._freezeSettings=function(){return this._settingsFrozen=!0,this._settings},e.prototype._delete=function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask},e.prototype.toJSON=function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}},e.prototype._terminate=function(){return t=this,(n=_N.get(t))&&(Y("ComponentProvider","Removing Datastore"),_N.delete(t),n.terminate()),Promise.resolve();var t,n},e}(),Tt=function(){function e(t,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=t}return Object.defineProperty(e.prototype,"_path",{get:function(){return this._key.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new Jo(this.firestore,this.converter,this._key.path.popLast())},enumerable:!1,configurable:!0}),e.prototype.withConverter=function(t){return new e(this.firestore,t,this._key)},e}(),fr=function(){function e(t,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=t}return e.prototype.withConverter=function(t){return new e(this.firestore,t,this._query)},e}(),Jo=function(e){function t(n,r,i){var s=this;return(s=e.call(this,n,r,Pc(i))||this)._path=i,s.type="collection",s}return te(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var n=this._path.popLast();return n.isEmpty()?null:new Tt(this.firestore,null,new de(n))},enumerable:!1,configurable:!0}),t.prototype.withConverter=function(n){return new t(this.firestore,n,this._path)},t}(fr);/** + */var IN=function(){function e(t){var n;if(t.host===void 0){if(t.ssl!==void 0)throw new H(D.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=t.host,this.ssl=(n=t.ssl)===null||n===void 0||n;if(this.credentials=t.credentials,this.ignoreUndefinedProperties=!!t.ignoreUndefinedProperties,t.cacheSizeBytes===void 0)this.cacheSizeBytes=41943040;else{if(t.cacheSizeBytes!==-1&&t.cacheSizeBytes<1048576)throw new H(D.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=t.cacheSizeBytes}this.experimentalForceLongPolling=!!t.experimentalForceLongPolling,this.experimentalAutoDetectLongPolling=!!t.experimentalAutoDetectLongPolling,this.useFetchStreams=!!t.useFetchStreams,fF("experimentalForceLongPolling",t.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",t.experimentalAutoDetectLongPolling)}return e.prototype.isEqual=function(t){return this.host===t.host&&this.ssl===t.ssl&&this.credentials===t.credentials&&this.cacheSizeBytes===t.cacheSizeBytes&&this.experimentalForceLongPolling===t.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===t.experimentalAutoDetectLongPolling&&this.ignoreUndefinedProperties===t.ignoreUndefinedProperties&&this.useFetchStreams===t.useFetchStreams},e}(),qf=function(){function e(t,n){this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new IN({}),this._settingsFrozen=!1,t instanceof pv?(this._databaseId=t,this._credentials=new wN):(this._app=t,this._databaseId=function(r){if(!Object.prototype.hasOwnProperty.apply(r.options,["projectId"]))throw new H(D.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new pv(r.options.projectId)}(t),this._credentials=new jX(n))}return Object.defineProperty(e.prototype,"app",{get:function(){if(!this._app)throw new H(D.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_initialized",{get:function(){return this._settingsFrozen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_terminated",{get:function(){return this._terminateTask!==void 0},enumerable:!1,configurable:!0}),e.prototype._setSettings=function(t){if(this._settingsFrozen)throw new H(D.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new IN(t),t.credentials!==void 0&&(this._credentials=function(n){if(!n)return new wN;switch(n.type){case"gapi":var r=n.client;return be(!(typeof r!="object"||r===null||!r.auth||!r.auth.getAuthHeaderValueForFirstParty)),new BX(r,n.sessionIndex||"0",n.iamToken||null);case"provider":return n.client;default:throw new H(D.INVALID_ARGUMENT,"makeCredentialsProvider failed due to invalid credential type")}}(t.credentials))},e.prototype._getSettings=function(){return this._settings},e.prototype._freezeSettings=function(){return this._settingsFrozen=!0,this._settings},e.prototype._delete=function(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask},e.prototype.toJSON=function(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}},e.prototype._terminate=function(){return t=this,(n=_N.get(t))&&(Y("ComponentProvider","Removing Datastore"),_N.delete(t),n.terminate()),Promise.resolve();var t,n},e}(),Tt=function(){function e(t,n,r){this.converter=n,this._key=r,this.type="document",this.firestore=t}return Object.defineProperty(e.prototype,"_path",{get:function(){return this._key.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return this._key.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return new Jo(this.firestore,this.converter,this._key.path.popLast())},enumerable:!1,configurable:!0}),e.prototype.withConverter=function(t){return new e(this.firestore,t,this._key)},e}(),lr=function(){function e(t,n,r){this.converter=n,this._query=r,this.type="query",this.firestore=t}return e.prototype.withConverter=function(t){return new e(this.firestore,t,this._query)},e}(),Jo=function(e){function t(n,r,i){var s=this;return(s=e.call(this,n,r,Pc(i))||this)._path=i,s.type="collection",s}return te(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._query.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return this._query.path.canonicalString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){var n=this._path.popLast();return n.isEmpty()?null:new Tt(this.firestore,null,new de(n))},enumerable:!1,configurable:!0}),t.prototype.withConverter=function(n){return new t(this.firestore,n,this._path)},t}(lr);/** * @license * Copyright 2020 Google LLC * @@ -2632,8 +2632,8 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function hF(e,t){for(var n,r=[],i=2;i0&&this.Zi.ji(function(){return n.bc()}),r.label=5;case 5:return[2]}})})},e.prototype.Rc=function(t){var n=this,r=this.dc.then(function(){return n.gc=!0,t().catch(function(i){throw n.yc=i,n.gc=!1,Ft("INTERNAL UNHANDLED ERROR: ",function(s){var a=s.message||"";return s.stack&&(a=s.stack.includes(s.message)?s.stack:s.message+` -`+s.stack),a}(i)),i}).then(function(i){return n.gc=!1,i})});return this.dc=r,r},e.prototype.enqueueAfterDelay=function(t,n,r){var i=this;this.Ac(),this.Tc.indexOf(t)>-1&&(n=0);var s=aX.createAndSchedule(this,t,n,r,function(a){return i.vc(a)});return this.mc.push(s),s},e.prototype.Ac=function(){this.yc&&he()},e.prototype.verifyOperationInProgress=function(){},e.prototype.Pc=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return[4,t=this.dc];case 1:n.sent(),n.label=2;case 2:if(t!==this.dc)return[3,0];n.label=3;case 3:return[2]}})})},e.prototype.Vc=function(t){for(var n=0,r=this.mc;n0&&this.Zi.ji(function(){return n.bc()}),r.label=5;case 5:return[2]}})})},e.prototype.Rc=function(t){var n=this,r=this.dc.then(function(){return n.gc=!0,t().catch(function(i){throw n.yc=i,n.gc=!1,Ft("INTERNAL UNHANDLED ERROR: ",function(s){var a=s.message||"";return s.stack&&(a=s.stack.includes(s.message)?s.stack:s.message+` +`+s.stack),a}(i)),i}).then(function(i){return n.gc=!1,i})});return this.dc=r,r},e.prototype.enqueueAfterDelay=function(t,n,r){var i=this;this.Ac(),this.Tc.indexOf(t)>-1&&(n=0);var s=iX.createAndSchedule(this,t,n,r,function(a){return i.vc(a)});return this.mc.push(s),s},e.prototype.Ac=function(){this.yc&&he()},e.prototype.verifyOperationInProgress=function(){},e.prototype.Pc=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return[4,t=this.dc];case 1:n.sent(),n.label=2;case 2:if(t!==this.dc)return[3,0];n.label=3;case 3:return[2]}})})},e.prototype.Vc=function(t){for(var n=0,r=this.mc;n90)throw new H(D.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new H(D.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return Object.defineProperty(e.prototype,"latitude",{get:function(){return this._lat},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"longitude",{get:function(){return this._long},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return this._lat===t._lat&&this._long===t._long},e.prototype.toJSON=function(){return{latitude:this._lat,longitude:this._long}},e.prototype._compareTo=function(t){return Ve(this._lat,t._lat)||Ve(this._long,t._long)},e}(),zX=/^__.*__$/,QX=function(){function e(t,n,r){this.data=t,this.fieldMask=n,this.fieldTransforms=r}return e.prototype.toMutation=function(t,n){return this.fieldMask!==null?new hs(t,this.data,this.fieldMask,n,this.fieldTransforms):new bh(t,this.data,n,this.fieldTransforms)},e}(),gF=function(){function e(t,n,r){this.data=t,this.fieldMask=n,this.fieldTransforms=r}return e.prototype.toMutation=function(t,n){return new hs(t,this.data,this.fieldMask,n,this.fieldTransforms)},e}();/** + */var Oi=function(){function e(){for(var t=[],n=0;n90)throw new H(D.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+t);if(!isFinite(n)||n<-180||n>180)throw new H(D.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+n);this._lat=t,this._long=n}return Object.defineProperty(e.prototype,"latitude",{get:function(){return this._lat},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"longitude",{get:function(){return this._long},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(t){return this._lat===t._lat&&this._long===t._long},e.prototype.toJSON=function(){return{latitude:this._lat,longitude:this._long}},e.prototype._compareTo=function(t){return Ve(this._lat,t._lat)||Ve(this._long,t._long)},e}(),KX=/^__.*__$/,WX=function(){function e(t,n,r){this.data=t,this.fieldMask=n,this.fieldTransforms=r}return e.prototype.toMutation=function(t,n){return this.fieldMask!==null?new hs(t,this.data,this.fieldMask,n,this.fieldTransforms):new Eh(t,this.data,n,this.fieldTransforms)},e}(),gF=function(){function e(t,n,r){this.data=t,this.fieldMask=n,this.fieldTransforms=r}return e.prototype.toMutation=function(t,n){return new hs(t,this.data,this.fieldMask,n,this.fieldTransforms)},e}();/** * @license * Copyright 2020 Google LLC * @@ -2678,7 +2678,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function mF(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw he()}}var yF=function(){function e(t,n,r,i,s,a){this.settings=t,this.databaseId=n,this.R=r,this.ignoreUndefinedProperties=i,s===void 0&&this.Cc(),this.fieldTransforms=s||[],this.fieldMask=a||[]}return Object.defineProperty(e.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Nc",{get:function(){return this.settings.Nc},enumerable:!1,configurable:!0}),e.prototype.xc=function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.R,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)},e.prototype.kc=function(t){var n,r=(n=this.path)===null||n===void 0?void 0:n.child(t),i=this.xc({path:r,Fc:!1});return i.$c(t),i},e.prototype.Oc=function(t){var n,r=(n=this.path)===null||n===void 0?void 0:n.child(t),i=this.xc({path:r,Fc:!1});return i.Cc(),i},e.prototype.Mc=function(t){return this.xc({path:void 0,Fc:!0})},e.prototype.Lc=function(t){return vv(t,this.settings.methodName,this.settings.Bc||!1,this.path,this.settings.qc)},e.prototype.contains=function(t){return this.fieldMask.find(function(n){return t.isPrefixOf(n)})!==void 0||this.fieldTransforms.find(function(n){return t.isPrefixOf(n.field)})!==void 0},e.prototype.Cc=function(){if(this.path)for(var t=0;t=0;--g)if(!TF(d,c[g])){var y=c[g],_=l[g];_=Ne(_);var b=a.Oc(y);if(_ instanceof BT)d.push(y);else{var T=Va(_,b);T!=null&&(d.push(y),v.set(y,T))}}var C=new ec(d);return new gF(v,C,a.fieldTransforms)}function wF(e,t,n,r){return r===void 0&&(r=!1),Va(n,e.Uc(r?4:3,t))}function Va(e,t){if(EF(e=Ne(e)))return HT("Unsupported field value:",t,e),bF(e,t);if(e instanceof Ua)return function(n,r){if(!mF(r.Nc))throw r.Lc(n._methodName+"() can only be used with update() and set()");if(!r.path)throw r.Lc(n._methodName+"() is not currently supported inside arrays");var i=n._toFieldTransform(r);i&&r.fieldTransforms.push(i)}(e,t),null;if(e===void 0&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.Fc&&t.Nc!==4)throw t.Lc("Nested arrays are not supported");return function(n,r){for(var i=[],s=0,a=0,c=n;a0&&t.fieldMask.push(t.path):Da(e,function(r,i){var s=Va(i,t.kc(r));s!=null&&(n[r]=s)}),{mapValue:{fields:n}}}function EF(e){return!(typeof e!="object"||e===null||e instanceof Array||e instanceof Date||e instanceof lr||e instanceof Dg||e instanceof Ea||e instanceof Tt||e instanceof Ua)}function HT(e,t,n){if(!EF(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){var r=Pg(n);throw r==="an object"?t.Lc(e+" a custom object"):t.Lc(e+" "+r)}}function zb(e,t,n){if((t=Ne(t))instanceof Oi)return t._internalPath;if(typeof t=="string")return KT(e,t);throw vv("Field path arguments must be of type string or FieldPath.",e,!1,void 0,n)}var tJ=new RegExp("[~\\*/\\[\\]]");function KT(e,t,n){if(t.search(tJ)>=0)throw vv("Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'",e,!1,void 0,n);try{return new(Oi.bind.apply(Oi,xe([void 0],t.split("."))))()._internalPath}catch{throw vv("Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",e,!1,void 0,n)}}function vv(e,t,n,r,i){var s=r&&!r.isEmpty(),a=i!==void 0,c="Function "+t+"() called with invalid data";n&&(c+=" (via `toFirestore()`)");var l="";return(s||a)&&(l+=" (found",s&&(l+=" in field "+r),a&&(l+=" in document "+i),l+=")"),new H(D.INVALID_ARGUMENT,(c+=". ")+e+l)}function TF(e,t){return e.some(function(n){return n.isEqual(t)})}/** + */function mF(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw he()}}var yF=function(){function e(t,n,r,i,s,a){this.settings=t,this.databaseId=n,this.R=r,this.ignoreUndefinedProperties=i,s===void 0&&this.Cc(),this.fieldTransforms=s||[],this.fieldMask=a||[]}return Object.defineProperty(e.prototype,"path",{get:function(){return this.settings.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Nc",{get:function(){return this.settings.Nc},enumerable:!1,configurable:!0}),e.prototype.xc=function(t){return new e(Object.assign(Object.assign({},this.settings),t),this.databaseId,this.R,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)},e.prototype.kc=function(t){var n,r=(n=this.path)===null||n===void 0?void 0:n.child(t),i=this.xc({path:r,Fc:!1});return i.$c(t),i},e.prototype.Oc=function(t){var n,r=(n=this.path)===null||n===void 0?void 0:n.child(t),i=this.xc({path:r,Fc:!1});return i.Cc(),i},e.prototype.Mc=function(t){return this.xc({path:void 0,Fc:!0})},e.prototype.Lc=function(t){return vv(t,this.settings.methodName,this.settings.Bc||!1,this.path,this.settings.qc)},e.prototype.contains=function(t){return this.fieldMask.find(function(n){return t.isPrefixOf(n)})!==void 0||this.fieldTransforms.find(function(n){return t.isPrefixOf(n.field)})!==void 0},e.prototype.Cc=function(){if(this.path)for(var t=0;t=0;--g)if(!TF(d,c[g])){var y=c[g],_=l[g];_=Ne(_);var b=a.Oc(y);if(_ instanceof BT)d.push(y);else{var T=Va(_,b);T!=null&&(d.push(y),v.set(y,T))}}var C=new ec(d);return new gF(v,C,a.fieldTransforms)}function wF(e,t,n,r){return r===void 0&&(r=!1),Va(n,e.Uc(r?4:3,t))}function Va(e,t){if(EF(e=Ne(e)))return HT("Unsupported field value:",t,e),bF(e,t);if(e instanceof Ua)return function(n,r){if(!mF(r.Nc))throw r.Lc(n._methodName+"() can only be used with update() and set()");if(!r.path)throw r.Lc(n._methodName+"() is not currently supported inside arrays");var i=n._toFieldTransform(r);i&&r.fieldTransforms.push(i)}(e,t),null;if(e===void 0&&t.ignoreUndefinedProperties)return null;if(t.path&&t.fieldMask.push(t.path),e instanceof Array){if(t.settings.Fc&&t.Nc!==4)throw t.Lc("Nested arrays are not supported");return function(n,r){for(var i=[],s=0,a=0,c=n;a0&&t.fieldMask.push(t.path):Da(e,function(r,i){var s=Va(i,t.kc(r));s!=null&&(n[r]=s)}),{mapValue:{fields:n}}}function EF(e){return!(typeof e!="object"||e===null||e instanceof Array||e instanceof Date||e instanceof cr||e instanceof Dg||e instanceof Ea||e instanceof Tt||e instanceof Ua)}function HT(e,t,n){if(!EF(n)||!function(i){return typeof i=="object"&&i!==null&&(Object.getPrototypeOf(i)===Object.prototype||Object.getPrototypeOf(i)===null)}(n)){var r=Pg(n);throw r==="an object"?t.Lc(e+" a custom object"):t.Lc(e+" "+r)}}function zb(e,t,n){if((t=Ne(t))instanceof Oi)return t._internalPath;if(typeof t=="string")return KT(e,t);throw vv("Field path arguments must be of type string or FieldPath.",e,!1,void 0,n)}var JX=new RegExp("[~\\*/\\[\\]]");function KT(e,t,n){if(t.search(JX)>=0)throw vv("Invalid field path ("+t+"). Paths must not contain '~', '*', '/', '[', or ']'",e,!1,void 0,n);try{return new(Oi.bind.apply(Oi,xe([void 0],t.split("."))))()._internalPath}catch{throw vv("Invalid field path ("+t+"). Paths must not be empty, begin with '.', end with '.', or contain '..'",e,!1,void 0,n)}}function vv(e,t,n,r,i){var s=r&&!r.isEmpty(),a=i!==void 0,c="Function "+t+"() called with invalid data";n&&(c+=" (via `toFirestore()`)");var l="";return(s||a)&&(l+=" (found",s&&(l+=" in field "+r),a&&(l+=" in document "+i),l+=")"),new H(D.INVALID_ARGUMENT,(c+=". ")+e+l)}function TF(e,t){return e.some(function(n){return n.isEqual(t)})}/** * @license * Copyright 2020 Google LLC * @@ -2693,7 +2693,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var qf=function(){function e(t,n,r,i,s){this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}return Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new Tt(this._firestore,this._converter,this._key)},enumerable:!1,configurable:!0}),e.prototype.exists=function(){return this._document!==null},e.prototype.data=function(){if(this._document){if(this._converter){var t=new nJ(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}},e.prototype.get=function(t){if(this._document){var n=this._document.data.field(gv("DocumentSnapshot.get",t));if(n!==null)return this._userDataWriter.convertValue(n)}},e}(),nJ=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return te(t,e),t.prototype.data=function(){return e.prototype.data.call(this)},t}(qf);function gv(e,t){return typeof t=="string"?KT(e,t):t instanceof Oi?t._internalPath:t._delegate._internalPath}/** + */var $f=function(){function e(t,n,r,i,s){this._firestore=t,this._userDataWriter=n,this._key=r,this._document=i,this._converter=s}return Object.defineProperty(e.prototype,"id",{get:function(){return this._key.path.lastSegment()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return new Tt(this._firestore,this._converter,this._key)},enumerable:!1,configurable:!0}),e.prototype.exists=function(){return this._document!==null},e.prototype.data=function(){if(this._document){if(this._converter){var t=new ZX(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(t)}return this._userDataWriter.convertValue(this._document.data.value)}},e.prototype.get=function(t){if(this._document){var n=this._document.data.field(gv("DocumentSnapshot.get",t));if(n!==null)return this._userDataWriter.convertValue(n)}},e}(),ZX=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return te(t,e),t.prototype.data=function(){return e.prototype.data.call(this)},t}($f);function gv(e,t){return typeof t=="string"?KT(e,t):t instanceof Oi?t._internalPath:t._delegate._internalPath}/** * @license * Copyright 2020 Google LLC * @@ -2708,7 +2708,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Js=function(){function e(t,n){this.hasPendingWrites=t,this.fromCache=n}return e.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},e}(),ao=function(e){function t(n,r,i,s,a,c){var l=this;return(l=e.call(this,n,r,i,s,c)||this)._firestore=n,l._firestoreImpl=n,l.metadata=a,l}return te(t,e),t.prototype.exists=function(){return e.prototype.exists.call(this)},t.prototype.data=function(n){if(n===void 0&&(n={}),this._document){if(this._converter){var r=new sf(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(r,n)}return this._userDataWriter.convertValue(this._document.data.value,n.serverTimestamps)}},t.prototype.get=function(n,r){if(r===void 0&&(r={}),this._document){var i=this._document.data.field(gv("DocumentSnapshot.get",n));if(i!==null)return this._userDataWriter.convertValue(i,r.serverTimestamps)}},t}(qf),sf=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return te(t,e),t.prototype.data=function(n){return n===void 0&&(n={}),e.prototype.data.call(this,n)},t}(ao),Ho=function(){function e(t,n,r,i){this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new Js(i.hasPendingWrites,i.fromCache),this.query=r}return Object.defineProperty(e.prototype,"docs",{get:function(){var t=[];return this.forEach(function(n){return t.push(n)}),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this.size===0},enumerable:!1,configurable:!0}),e.prototype.forEach=function(t,n){var r=this;this._snapshot.docs.forEach(function(i){t.call(n,new sf(r._firestore,r._userDataWriter,i.key,i,new Js(r._snapshot.mutatedKeys.has(i.key),r._snapshot.fromCache),r.query.converter))})},e.prototype.docChanges=function(t){t===void 0&&(t={});var n=!!t.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new H(D.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(r,i){if(r._snapshot.oldDocs.isEmpty()){var s=0;return r._snapshot.docChanges.map(function(c){return{type:"added",doc:new sf(r._firestore,r._userDataWriter,c.doc.key,c.doc,new Js(r._snapshot.mutatedKeys.has(c.doc.key),r._snapshot.fromCache),r.query.converter),oldIndex:-1,newIndex:s++}})}var a=r._snapshot.oldDocs;return r._snapshot.docChanges.filter(function(c){return i||c.type!==3}).map(function(c){var l=new sf(r._firestore,r._userDataWriter,c.doc.key,c.doc,new Js(r._snapshot.mutatedKeys.has(c.doc.key),r._snapshot.fromCache),r.query.converter),h=-1,d=-1;return c.type!==0&&(h=a.indexOf(c.doc.key),a=a.delete(c.doc.key)),c.type!==1&&(d=(a=a.add(c.doc)).indexOf(c.doc.key)),{type:rJ(c.type),doc:l,oldIndex:h,newIndex:d}})}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges},e}();function rJ(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return he()}}function IF(e,t){return e instanceof ao&&t instanceof ao?e._firestore===t._firestore&&e._key.isEqual(t._key)&&(e._document===null?t._document===null:e._document.isEqual(t._document))&&e._converter===t._converter:e instanceof Ho&&t instanceof Ho&&e._firestore===t._firestore&&pF(e.query,t.query)&&e.metadata.isEqual(t.metadata)&&e._snapshot.isEqual(t._snapshot)}/** + */var Js=function(){function e(t,n){this.hasPendingWrites=t,this.fromCache=n}return e.prototype.isEqual=function(t){return this.hasPendingWrites===t.hasPendingWrites&&this.fromCache===t.fromCache},e}(),so=function(e){function t(n,r,i,s,a,c){var l=this;return(l=e.call(this,n,r,i,s,c)||this)._firestore=n,l._firestoreImpl=n,l.metadata=a,l}return te(t,e),t.prototype.exists=function(){return e.prototype.exists.call(this)},t.prototype.data=function(n){if(n===void 0&&(n={}),this._document){if(this._converter){var r=new sf(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(r,n)}return this._userDataWriter.convertValue(this._document.data.value,n.serverTimestamps)}},t.prototype.get=function(n,r){if(r===void 0&&(r={}),this._document){var i=this._document.data.field(gv("DocumentSnapshot.get",n));if(i!==null)return this._userDataWriter.convertValue(i,r.serverTimestamps)}},t}($f),sf=function(e){function t(){return e!==null&&e.apply(this,arguments)||this}return te(t,e),t.prototype.data=function(n){return n===void 0&&(n={}),e.prototype.data.call(this,n)},t}(so),$o=function(){function e(t,n,r,i){this._firestore=t,this._userDataWriter=n,this._snapshot=i,this.metadata=new Js(i.hasPendingWrites,i.fromCache),this.query=r}return Object.defineProperty(e.prototype,"docs",{get:function(){var t=[];return this.forEach(function(n){return t.push(n)}),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._snapshot.docs.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return this.size===0},enumerable:!1,configurable:!0}),e.prototype.forEach=function(t,n){var r=this;this._snapshot.docs.forEach(function(i){t.call(n,new sf(r._firestore,r._userDataWriter,i.key,i,new Js(r._snapshot.mutatedKeys.has(i.key),r._snapshot.fromCache),r.query.converter))})},e.prototype.docChanges=function(t){t===void 0&&(t={});var n=!!t.includeMetadataChanges;if(n&&this._snapshot.excludesMetadataChanges)throw new H(D.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===n||(this._cachedChanges=function(r,i){if(r._snapshot.oldDocs.isEmpty()){var s=0;return r._snapshot.docChanges.map(function(c){return{type:"added",doc:new sf(r._firestore,r._userDataWriter,c.doc.key,c.doc,new Js(r._snapshot.mutatedKeys.has(c.doc.key),r._snapshot.fromCache),r.query.converter),oldIndex:-1,newIndex:s++}})}var a=r._snapshot.oldDocs;return r._snapshot.docChanges.filter(function(c){return i||c.type!==3}).map(function(c){var l=new sf(r._firestore,r._userDataWriter,c.doc.key,c.doc,new Js(r._snapshot.mutatedKeys.has(c.doc.key),r._snapshot.fromCache),r.query.converter),h=-1,d=-1;return c.type!==0&&(h=a.indexOf(c.doc.key),a=a.delete(c.doc.key)),c.type!==1&&(d=(a=a.add(c.doc)).indexOf(c.doc.key)),{type:eJ(c.type),doc:l,oldIndex:h,newIndex:d}})}(this,n),this._cachedChangesIncludeMetadataChanges=n),this._cachedChanges},e}();function eJ(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return he()}}function IF(e,t){return e instanceof so&&t instanceof so?e._firestore===t._firestore&&e._key.isEqual(t._key)&&(e._document===null?t._document===null:e._document.isEqual(t._document))&&e._converter===t._converter:e instanceof $o&&t instanceof $o&&e._firestore===t._firestore&&pF(e.query,t.query)&&e.metadata.isEqual(t.metadata)&&e._snapshot.isEqual(t._snapshot)}/** * @license * Copyright 2020 Google LLC * @@ -2723,7 +2723,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function SF(e){if(av(e)&&e.explicitOrderBy.length===0)throw new H(D.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Sh=function(){};function Fo(e){for(var t=[],n=1;n, or >=) must be on the same field. But you have inequality filters on '"+L.toString()+"' and '"+O.field.toString()+"'");var $=uT(x);$!==null&&AF(x,O.field,$)}var P=function(re,F){for(var oe=0,k=re.filters;oe=0)return dt.op}return null}(x,function(re){switch(re){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(O.op));if(P!==null)throw P===O.op?new H(D.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+O.op.toString()+"' filter."):new H(D.INVALID_ARGUMENT,"Invalid query. You cannot use '"+O.op.toString()+"' filters with '"+P.toString()+"' filters.")}(s,C),C}(n._query,0,r,n.firestore._databaseId,this.jc,this.Wc,this.Gc);return new fr(n.firestore,n.converter,function(s,a){var c=s.filters.concat([a]);return new yo(s.path,s.collectionGroup,s.explicitOrderBy.slice(),c,s.limit,s.limitType,s.startAt,s.endAt)}(n._query,i))},t}(Sh),oJ=function(e){function t(n,r){var i=this;return(i=e.call(this)||this).jc=n,i.zc=r,i.type="orderBy",i}return te(t,e),t.prototype._apply=function(n){var r=function(i,s,a){if(i.startAt!==null)throw new H(D.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(i.endAt!==null)throw new H(D.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var c=new Mu(s,a);return function(l,h){if(uT(l)===null){var d=cT(l);d!==null&&AF(l,d,h.field)}}(i,c),c}(n._query,this.jc,this.zc);return new fr(n.firestore,n.converter,function(i,s){var a=i.explicitOrderBy.concat([s]);return new yo(i.path,i.collectionGroup,a,i.filters.slice(),i.limit,i.limitType,i.startAt,i.endAt)}(n._query,r))},t}(Sh),AN=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).type=n,s.Hc=r,s.Jc=i,s}return te(t,e),t.prototype._apply=function(n){return new fr(n.firestore,n.converter,eL(n._query,this.Hc,this.Jc))},t}(Sh),kN=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).type=n,s.Yc=r,s.Xc=i,s}return te(t,e),t.prototype._apply=function(n){var r=CF(n,this.type,this.Yc,this.Xc);return new fr(n.firestore,n.converter,function(i,s){return new yo(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),i.limit,i.limitType,s,i.endAt)}(n._query,r))},t}(Sh),RN=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).type=n,s.Yc=r,s.Xc=i,s}return te(t,e),t.prototype._apply=function(n){var r=CF(n,this.type,this.Yc,this.Xc);return new fr(n.firestore,n.converter,function(i,s){return new yo(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),i.limit,i.limitType,i.startAt,s)}(n._query,r))},t}(Sh);function CF(e,t,n,r){if(n[0]=Ne(n[0]),n[0]instanceof qf)return function(s,a,c,l,h){if(!l)throw new H(D.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+c+"().");for(var d=[],v=0,g=rc(s);vv.length)throw new H(D.INVALID_ARGUMENT,"Too many arguments provided to "+l+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var g=[],y=0;y10)throw new H(D.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters support a maximum of 10 elements in the value array.")}function AF(e,t,n){if(!n.isEqual(t))throw new H(D.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first argument to orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}/** + */function SF(e){if(av(e)&&e.explicitOrderBy.length===0)throw new H(D.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}var Ch=function(){};function Lo(e){for(var t=[],n=1;n, or >=) must be on the same field. But you have inequality filters on '"+L.toString()+"' and '"+O.field.toString()+"'");var $=uT(x);$!==null&&AF(x,O.field,$)}var P=function(re,F){for(var se=0,k=re.filters;se=0)return dt.op}return null}(x,function(re){switch(re){case"!=":return["!=","not-in"];case"array-contains":return["array-contains","array-contains-any","not-in"];case"in":return["array-contains-any","in","not-in"];case"array-contains-any":return["array-contains","array-contains-any","in","not-in"];case"not-in":return["array-contains","array-contains-any","in","not-in","!="];default:return[]}}(O.op));if(P!==null)throw P===O.op?new H(D.INVALID_ARGUMENT,"Invalid query. You cannot use more than one '"+O.op.toString()+"' filter."):new H(D.INVALID_ARGUMENT,"Invalid query. You cannot use '"+O.op.toString()+"' filters with '"+P.toString()+"' filters.")}(s,C),C}(n._query,0,r,n.firestore._databaseId,this.jc,this.Wc,this.Gc);return new lr(n.firestore,n.converter,function(s,a){var c=s.filters.concat([a]);return new mo(s.path,s.collectionGroup,s.explicitOrderBy.slice(),c,s.limit,s.limitType,s.startAt,s.endAt)}(n._query,i))},t}(Ch),nJ=function(e){function t(n,r){var i=this;return(i=e.call(this)||this).jc=n,i.zc=r,i.type="orderBy",i}return te(t,e),t.prototype._apply=function(n){var r=function(i,s,a){if(i.startAt!==null)throw new H(D.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(i.endAt!==null)throw new H(D.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");var c=new Mu(s,a);return function(l,h){if(uT(l)===null){var d=cT(l);d!==null&&AF(l,d,h.field)}}(i,c),c}(n._query,this.jc,this.zc);return new lr(n.firestore,n.converter,function(i,s){var a=i.explicitOrderBy.concat([s]);return new mo(i.path,i.collectionGroup,a,i.filters.slice(),i.limit,i.limitType,i.startAt,i.endAt)}(n._query,r))},t}(Ch),AN=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).type=n,s.Hc=r,s.Jc=i,s}return te(t,e),t.prototype._apply=function(n){return new lr(n.firestore,n.converter,eL(n._query,this.Hc,this.Jc))},t}(Ch),kN=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).type=n,s.Yc=r,s.Xc=i,s}return te(t,e),t.prototype._apply=function(n){var r=CF(n,this.type,this.Yc,this.Xc);return new lr(n.firestore,n.converter,function(i,s){return new mo(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),i.limit,i.limitType,s,i.endAt)}(n._query,r))},t}(Ch),RN=function(e){function t(n,r,i){var s=this;return(s=e.call(this)||this).type=n,s.Yc=r,s.Xc=i,s}return te(t,e),t.prototype._apply=function(n){var r=CF(n,this.type,this.Yc,this.Xc);return new lr(n.firestore,n.converter,function(i,s){return new mo(i.path,i.collectionGroup,i.explicitOrderBy.slice(),i.filters.slice(),i.limit,i.limitType,i.startAt,s)}(n._query,r))},t}(Ch);function CF(e,t,n,r){if(n[0]=Ne(n[0]),n[0]instanceof $f)return function(s,a,c,l,h){if(!l)throw new H(D.NOT_FOUND,"Can't use a DocumentSnapshot that doesn't exist for "+c+"().");for(var d=[],v=0,g=rc(s);vv.length)throw new H(D.INVALID_ARGUMENT,"Too many arguments provided to "+l+"(). The number of arguments must be less than or equal to the number of orderBy() clauses");for(var g=[],y=0;y10)throw new H(D.INVALID_ARGUMENT,"Invalid Query. '"+t.toString()+"' filters support a maximum of 10 elements in the value array.")}function AF(e,t,n){if(!n.isEqual(t))throw new H(D.INVALID_ARGUMENT,"Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '"+t.toString()+"' and so you must also use '"+t.toString()+"' as your first argument to orderBy(), but your first orderBy() is on field '"+n.toString()+"' instead.")}/** * @license * Copyright 2020 Google LLC * @@ -2738,7 +2738,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var WT=function(){function e(){}return e.prototype.convertValue=function(t,n){switch(n===void 0&&(n="none"),_a(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Lt(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,n);case 5:return t.stringValue;case 6:return this.convertBytes(tc(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,n);case 10:return this.convertObject(t.mapValue,n);default:throw he()}},e.prototype.convertObject=function(t,n){var r=this,i={};return Da(t.fields,function(s,a){i[s]=r.convertValue(a,n)}),i},e.prototype.convertGeoPoint=function(t){return new Dg(Lt(t.latitude),Lt(t.longitude))},e.prototype.convertArray=function(t,n){var r=this;return(t.values||[]).map(function(i){return r.convertValue(i,n)})},e.prototype.convertServerTimestamp=function(t,n){switch(n){case"previous":var r=QM(t);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Df(t));default:return null}},e.prototype.convertTimestamp=function(t){var n=as(t);return new lr(n.seconds,n.nanos)},e.prototype.convertDocumentKey=function(t,n){var r=Je.fromString(t);be(SL(r));var i=new pv(r.get(1),r.get(3)),s=new de(r.popFirst(5));return i.isEqual(n)||Ft("Document "+s+" contains a document reference within a different database ("+i.projectId+"/"+i.database+") which is not supported. It will be treated as a reference in the current database ("+n.projectId+"/"+n.database+") instead."),s},e}();/** + */var WT=function(){function e(){}return e.prototype.convertValue=function(t,n){switch(n===void 0&&(n="none"),_a(t)){case 0:return null;case 1:return t.booleanValue;case 2:return Lt(t.integerValue||t.doubleValue);case 3:return this.convertTimestamp(t.timestampValue);case 4:return this.convertServerTimestamp(t,n);case 5:return t.stringValue;case 6:return this.convertBytes(tc(t.bytesValue));case 7:return this.convertReference(t.referenceValue);case 8:return this.convertGeoPoint(t.geoPointValue);case 9:return this.convertArray(t.arrayValue,n);case 10:return this.convertObject(t.mapValue,n);default:throw he()}},e.prototype.convertObject=function(t,n){var r=this,i={};return Da(t.fields,function(s,a){i[s]=r.convertValue(a,n)}),i},e.prototype.convertGeoPoint=function(t){return new Dg(Lt(t.latitude),Lt(t.longitude))},e.prototype.convertArray=function(t,n){var r=this;return(t.values||[]).map(function(i){return r.convertValue(i,n)})},e.prototype.convertServerTimestamp=function(t,n){switch(n){case"previous":var r=QM(t);return r==null?null:this.convertValue(r,n);case"estimate":return this.convertTimestamp(Mf(t));default:return null}},e.prototype.convertTimestamp=function(t){var n=as(t);return new cr(n.seconds,n.nanos)},e.prototype.convertDocumentKey=function(t,n){var r=Xe.fromString(t);be(SL(r));var i=new pv(r.get(1),r.get(3)),s=new de(r.popFirst(5));return i.isEqual(n)||Ft("Document "+s+" contains a document reference within a different database ("+i.projectId+"/"+i.database+") which is not supported. It will be treated as a reference in the current database ("+n.projectId+"/"+n.database+") instead."),s},e}();/** * @license * Copyright 2020 Google LLC * @@ -2753,7 +2753,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Lg(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var sJ=function(e){function t(n){var r=this;return(r=e.call(this)||this).firestore=n,r}return te(t,e),t.prototype.convertBytes=function(n){return new Ea(n)},t.prototype.convertReference=function(n){var r=this.convertDocumentKey(n,this.firestore._databaseId);return new Tt(this.firestore,null,r)},t}(WT),aJ=function(){function e(t,n){this._firestore=t,this._commitHandler=n,this._mutations=[],this._committed=!1,this._dataReader=ja(t)}return e.prototype.set=function(t,n,r){this._verifyNotCommitted();var i=Ko(t,this._firestore),s=Lg(i.converter,n,r),a=Mg(this._dataReader,"WriteBatch.set",i._key,s,i.converter!==null,r);return this._mutations.push(a.toMutation(i._key,kn.none())),this},e.prototype.update=function(t,n,r){for(var i=[],s=3;s0?this._commitHandler(this._mutations):Promise.resolve()},e.prototype._verifyNotCommitted=function(){if(this._committed)throw new H(D.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},e}();/** + */function Lg(e,t,n){return e?n&&(n.merge||n.mergeFields)?e.toFirestore(t,n):e.toFirestore(t):t}var rJ=function(e){function t(n){var r=this;return(r=e.call(this)||this).firestore=n,r}return te(t,e),t.prototype.convertBytes=function(n){return new Ea(n)},t.prototype.convertReference=function(n){var r=this.convertDocumentKey(n,this.firestore._databaseId);return new Tt(this.firestore,null,r)},t}(WT),iJ=function(){function e(t,n){this._firestore=t,this._commitHandler=n,this._mutations=[],this._committed=!1,this._dataReader=ja(t)}return e.prototype.set=function(t,n,r){this._verifyNotCommitted();var i=Ho(t,this._firestore),s=Lg(i.converter,n,r),a=Mg(this._dataReader,"WriteBatch.set",i._key,s,i.converter!==null,r);return this._mutations.push(a.toMutation(i._key,An.none())),this},e.prototype.update=function(t,n,r){for(var i=[],s=3;s0?this._commitHandler(this._mutations):Promise.resolve()},e.prototype._verifyNotCommitted=function(){if(this._committed)throw new H(D.FAILED_PRECONDITION,"A write batch can no longer be used after commit() has been called.")},e}();/** * @license * Copyright 2020 Google LLC * @@ -2768,7 +2768,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Ko(e,t){if((e=Ne(e)).firestore!==t)throw new H(D.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}/** + */function Ho(e,t){if((e=Ne(e)).firestore!==t)throw new H(D.INVALID_ARGUMENT,"Provided document reference is from a different Firestore instance.");return e}/** * @license * Copyright 2020 Google LLC * @@ -2783,7 +2783,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var sa=function(e){function t(n){var r=this;return(r=e.call(this)||this).firestore=n,r}return te(t,e),t.prototype.convertBytes=function(n){return new Ea(n)},t.prototype.convertReference=function(n){var r=this.convertDocumentKey(n,this.firestore._databaseId);return new Tt(this.firestore,null,r)},t}(WT);function ON(e,t,n){e=Qe(e,Tt);var r=Qe(e.firestore,Pt),i=Lg(e.converter,t,n);return Ch(r,[Mg(ja(r),"setDoc",e._key,i,e.converter!==null,n).toMutation(e._key,kn.none())])}function PN(e,t,n){for(var r=[],i=3;i"u")throw new H(D.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function MN(){if(typeof atob>"u")throw new H(D.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var RF=function(){function e(t){this._delegate=t}return e.fromBase64String=function(t){return MN(),new e(Ea.fromBase64String(t))},e.fromUint8Array=function(t){return DN(),new e(Ea.fromUint8Array(t))},e.prototype.toBase64=function(){return MN(),this._delegate.toBase64()},e.prototype.toUint8Array=function(){return DN(),this._delegate.toUint8Array()},e.prototype.isEqual=function(t){return this._delegate.isEqual(t._delegate)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}(),cJ=function(){function e(){}return e.prototype.enableIndexedDbPersistence=function(t,n){return function(r,i){CN(r=Qe(r,Pt));var s=nn(r),a=r._freezeSettings(),c=new Gb;return SN(s,c,new aF(c,a.cacheSizeBytes,i==null?void 0:i.forceOwnership))}(t._delegate,{forceOwnership:n})},e.prototype.enableMultiTabIndexedDbPersistence=function(t){return function(n){CN(n=Qe(n,Pt));var r=nn(n),i=n._freezeSettings(),s=new Gb;return SN(r,s,new MX(s,i.cacheSizeBytes))}(t._delegate)},e.prototype.clearIndexedDbPersistence=function(t){return function(n){var r=this;if(n._initialized&&!n._terminated)throw new H(D.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var i=new Pn;return n._queue.enqueueAndForgetEvenWhileRestricted(function(){return R(r,void 0,void 0,function(){var s;return A(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,function(c){return R(this,void 0,void 0,function(){var l;return A(this,function(h){switch(h.label){case 0:return uc.yt()?(l=c+"main",[4,uc.delete(l)]):[2,Promise.resolve()];case 1:return h.sent(),[2]}})})}(wT(n._databaseId,n._persistenceKey))];case 1:return a.sent(),i.resolve(),[3,3];case 2:return s=a.sent(),i.reject(s),[3,3];case 3:return[2]}})})}),i.promise}(t._delegate)},e}(),GT=function(){function e(t,n,r){var i=this;this._delegate=n,this.Zc=r,this.INTERNAL={delete:function(){return i.terminate()}},t instanceof pv||(this.tu=t)}return Object.defineProperty(e.prototype,"_databaseId",{get:function(){return this._delegate._databaseId},enumerable:!1,configurable:!0}),e.prototype.settings=function(t){var n=this._delegate._getSettings();t.merge||n.host===t.host||Pf("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),t.merge&&delete(t=Object.assign(Object.assign({},n),t)).merge,this._delegate._setSettings(t)},e.prototype.useEmulator=function(t,n,r){r===void 0&&(r={}),function(i,s,a,c){var l;c===void 0&&(c={});var h=(i=Qe(i,Bf))._getSettings();if(h.host!=="firestore.googleapis.com"&&h.host!==s&&Pf("Host has been set in both settings() and useEmulator(), emulator host will be used"),i._setSettings(Object.assign(Object.assign({},h),{host:s+":"+a,ssl:!1})),c.mockUserToken){var d,v;if(typeof c.mockUserToken=="string")d=c.mockUserToken,v=dn.MOCK_USER;else{d=W0(c.mockUserToken,(l=i._app)===null||l===void 0?void 0:l.options.projectId);var g=c.mockUserToken.sub||c.mockUserToken.user_id;if(!g)throw new H(D.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");v=new dn(g)}i._credentials=new BX(new lF(d,v))}}(this._delegate,t,n,r)},e.prototype.enableNetwork=function(){return function(t){var n=this;return t.asyncQueue.enqueue(function(){return R(n,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return[4,vN(t)];case 1:return r=s.sent(),[4,gN(t)];case 2:return i=s.sent(),[2,(r.setNetworkEnabled(!0),function(a){var c=ee(a);return c.Or.delete(0),Ih(c)}(i))]}})})})}(nn(Qe(this._delegate,Pt)))},e.prototype.disableNetwork=function(){return function(t){var n=this;return t.asyncQueue.enqueue(function(){return R(n,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return[4,vN(t)];case 1:return r=s.sent(),[4,gN(t)];case 2:return i=s.sent(),[2,(r.setNetworkEnabled(!1),function(a){return R(this,void 0,void 0,function(){var c;return A(this,function(l){switch(l.label){case 0:return(c=ee(a)).Or.add(0),[4,Mc(c)];case 1:return l.sent(),c.Br.set("Offline"),[2]}})})}(i))]}})})})}(nn(Qe(this._delegate,Pt)))},e.prototype.enablePersistence=function(t){var n=!1,r=!1;return t&&fF("synchronizeTabs",n=!!t.synchronizeTabs,"experimentalForceOwningTab",r=!!t.experimentalForceOwningTab),n?this.Zc.enableMultiTabIndexedDbPersistence(this):this.Zc.enableIndexedDbPersistence(this,r)},e.prototype.clearPersistence=function(){return this.Zc.clearIndexedDbPersistence(this)},e.prototype.terminate=function(){return this.tu&&(this.tu._removeServiceInstance("firestore"),this.tu._removeServiceInstance("firestore-exp")),this._delegate._delete()},e.prototype.waitForPendingWrites=function(){return function(t){var n=this,r=new Pn;return t.asyncQueue.enqueueAndForget(function(){return R(n,void 0,void 0,function(){var i;return A(this,function(s){switch(s.label){case 0:return i=TX,[4,UT(t)];case 1:return[2,i.apply(void 0,[s.sent(),r])]}})})}),r.promise}(nn(Qe(this._delegate,Pt)))},e.prototype.onSnapshotsInSync=function(t){return function(n,r){return function(i,s){var a=this,c=new xg(s);return i.asyncQueue.enqueueAndForget(function(){return R(a,void 0,void 0,function(){var l;return A(this,function(h){switch(h.label){case 0:return l=function(d,v){ee(d).Gr.add(v),v.next()},[4,pc(i)];case 1:return[2,l.apply(void 0,[h.sent(),c])]}})})}),function(){c.Wo(),i.asyncQueue.enqueueAndForget(function(){return R(a,void 0,void 0,function(){var l;return A(this,function(h){switch(h.label){case 0:return l=function(d,v){ee(d).Gr.delete(v)},[4,pc(i)];case 1:return[2,l.apply(void 0,[h.sent(),c])]}})})})}}(nn(n=Qe(n,Pt)),vc(r)?r:{next:r})}(this._delegate,t)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.tu)throw new H(D.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.tu},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new mv(this,hF(this._delegate,t))}catch(n){throw qn(n,"collection()","Firestore.collection()")}},e.prototype.doc=function(t){try{return new aa(this,gp(this._delegate,t))}catch(n){throw qn(n,"doc()","Firestore.doc()")}},e.prototype.collectionGroup=function(t){try{return new Ah(this,function(n,r){if(n=Qe(n,Bf),jT("collectionGroup","collection id",r),r.indexOf("/")>=0)throw new H(D.INVALID_ARGUMENT,"Invalid collection ID '"+r+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new fr(n,null,function(i){return new yo(Je.emptyPath(),i)}(r))}(this._delegate,t))}catch(n){throw qn(n,"collectionGroup()","Firestore.collectionGroup()")}},e.prototype.runTransaction=function(t){var n=this;return function(r,i){return function(s,a){var c=this,l=new Pn;return s.asyncQueue.enqueueAndForget(function(){return R(c,void 0,void 0,function(){var h;return A(this,function(d){switch(d.label){case 0:return[4,function(v){return Og(v).then(function(g){return g.datastore})}(s)];case 1:return h=d.sent(),new UX(s.asyncQueue,h,a,l).run(),[2]}})})}),l.promise}(nn(r),function(s){return i(new uJ(r,s))})}(this._delegate,function(r){return t(new NF(n,r))})},e.prototype.batch=function(){var t=this;return nn(this._delegate),new xF(new aJ(this._delegate,function(n){return Ch(t._delegate,n)}))},e.prototype.loadBundle=function(t){throw new H(D.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},e.prototype.namedQuery=function(t){throw new H(D.FAILED_PRECONDITION,'"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?')},e}(),Fg=function(e){function t(n){var r=this;return(r=e.call(this)||this).firestore=n,r}return te(t,e),t.prototype.convertBytes=function(n){return new RF(new Ea(n))},t.prototype.convertReference=function(n){var r=this.convertDocumentKey(n,this.firestore._databaseId);return aa.eu(r,this.firestore,null)},t}(WT);function lJ(e){var t;t=e,ci.setLogLevel(t)}var NF=function(){function e(t,n){this._firestore=t,this._delegate=n,this._userDataWriter=new Fg(t)}return e.prototype.get=function(t){var n=this,r=Zs(t);return this._delegate.get(r).then(function(i){return new $f(n._firestore,new ao(n._firestore._delegate,n._userDataWriter,i._key,i._document,i.metadata,r.converter))})},e.prototype.set=function(t,n,r){var i=Zs(t);return r?(VT("Transaction.set",r),this._delegate.set(i,n,r)):this._delegate.set(i,n),this},e.prototype.update=function(t,n,r){for(var i,s=[],a=3;a"u")throw new H(D.UNIMPLEMENTED,"Uint8Arrays are not available in this environment.")}function MN(){if(typeof atob>"u")throw new H(D.UNIMPLEMENTED,"Blobs are unavailable in Firestore in this environment.")}var RF=function(){function e(t){this._delegate=t}return e.fromBase64String=function(t){return MN(),new e(Ea.fromBase64String(t))},e.fromUint8Array=function(t){return DN(),new e(Ea.fromUint8Array(t))},e.prototype.toBase64=function(){return MN(),this._delegate.toBase64()},e.prototype.toUint8Array=function(){return DN(),this._delegate.toUint8Array()},e.prototype.isEqual=function(t){return this._delegate.isEqual(t._delegate)},e.prototype.toString=function(){return"Blob(base64: "+this.toBase64()+")"},e}(),sJ=function(){function e(){}return e.prototype.enableIndexedDbPersistence=function(t,n){return function(r,i){CN(r=Qe(r,Pt));var s=tn(r),a=r._freezeSettings(),c=new Gb;return SN(s,c,new aF(c,a.cacheSizeBytes,i==null?void 0:i.forceOwnership))}(t._delegate,{forceOwnership:n})},e.prototype.enableMultiTabIndexedDbPersistence=function(t){return function(n){CN(n=Qe(n,Pt));var r=tn(n),i=n._freezeSettings(),s=new Gb;return SN(r,s,new OX(s,i.cacheSizeBytes))}(t._delegate)},e.prototype.clearIndexedDbPersistence=function(t){return function(n){var r=this;if(n._initialized&&!n._terminated)throw new H(D.FAILED_PRECONDITION,"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.");var i=new On;return n._queue.enqueueAndForgetEvenWhileRestricted(function(){return R(r,void 0,void 0,function(){var s;return A(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,function(c){return R(this,void 0,void 0,function(){var l;return A(this,function(h){switch(h.label){case 0:return uc.yt()?(l=c+"main",[4,uc.delete(l)]):[2,Promise.resolve()];case 1:return h.sent(),[2]}})})}(wT(n._databaseId,n._persistenceKey))];case 1:return a.sent(),i.resolve(),[3,3];case 2:return s=a.sent(),i.reject(s),[3,3];case 3:return[2]}})})}),i.promise}(t._delegate)},e}(),GT=function(){function e(t,n,r){var i=this;this._delegate=n,this.Zc=r,this.INTERNAL={delete:function(){return i.terminate()}},t instanceof pv||(this.tu=t)}return Object.defineProperty(e.prototype,"_databaseId",{get:function(){return this._delegate._databaseId},enumerable:!1,configurable:!0}),e.prototype.settings=function(t){var n=this._delegate._getSettings();t.merge||n.host===t.host||Df("You are overriding the original host. If you did not intend to override your settings, use {merge: true}."),t.merge&&delete(t=Object.assign(Object.assign({},n),t)).merge,this._delegate._setSettings(t)},e.prototype.useEmulator=function(t,n,r){r===void 0&&(r={}),function(i,s,a,c){var l;c===void 0&&(c={});var h=(i=Qe(i,qf))._getSettings();if(h.host!=="firestore.googleapis.com"&&h.host!==s&&Df("Host has been set in both settings() and useEmulator(), emulator host will be used"),i._setSettings(Object.assign(Object.assign({},h),{host:s+":"+a,ssl:!1})),c.mockUserToken){var d,v;if(typeof c.mockUserToken=="string")d=c.mockUserToken,v=hn.MOCK_USER;else{d=W0(c.mockUserToken,(l=i._app)===null||l===void 0?void 0:l.options.projectId);var g=c.mockUserToken.sub||c.mockUserToken.user_id;if(!g)throw new H(D.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");v=new hn(g)}i._credentials=new UX(new lF(d,v))}}(this._delegate,t,n,r)},e.prototype.enableNetwork=function(){return function(t){var n=this;return t.asyncQueue.enqueue(function(){return R(n,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return[4,vN(t)];case 1:return r=s.sent(),[4,gN(t)];case 2:return i=s.sent(),[2,(r.setNetworkEnabled(!0),function(a){var c=ee(a);return c.Or.delete(0),Sh(c)}(i))]}})})})}(tn(Qe(this._delegate,Pt)))},e.prototype.disableNetwork=function(){return function(t){var n=this;return t.asyncQueue.enqueue(function(){return R(n,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return[4,vN(t)];case 1:return r=s.sent(),[4,gN(t)];case 2:return i=s.sent(),[2,(r.setNetworkEnabled(!1),function(a){return R(this,void 0,void 0,function(){var c;return A(this,function(l){switch(l.label){case 0:return(c=ee(a)).Or.add(0),[4,Mc(c)];case 1:return l.sent(),c.Br.set("Offline"),[2]}})})}(i))]}})})})}(tn(Qe(this._delegate,Pt)))},e.prototype.enablePersistence=function(t){var n=!1,r=!1;return t&&fF("synchronizeTabs",n=!!t.synchronizeTabs,"experimentalForceOwningTab",r=!!t.experimentalForceOwningTab),n?this.Zc.enableMultiTabIndexedDbPersistence(this):this.Zc.enableIndexedDbPersistence(this,r)},e.prototype.clearPersistence=function(){return this.Zc.clearIndexedDbPersistence(this)},e.prototype.terminate=function(){return this.tu&&(this.tu._removeServiceInstance("firestore"),this.tu._removeServiceInstance("firestore-exp")),this._delegate._delete()},e.prototype.waitForPendingWrites=function(){return function(t){var n=this,r=new On;return t.asyncQueue.enqueueAndForget(function(){return R(n,void 0,void 0,function(){var i;return A(this,function(s){switch(s.label){case 0:return i=wX,[4,UT(t)];case 1:return[2,i.apply(void 0,[s.sent(),r])]}})})}),r.promise}(tn(Qe(this._delegate,Pt)))},e.prototype.onSnapshotsInSync=function(t){return function(n,r){return function(i,s){var a=this,c=new xg(s);return i.asyncQueue.enqueueAndForget(function(){return R(a,void 0,void 0,function(){var l;return A(this,function(h){switch(h.label){case 0:return l=function(d,v){ee(d).Gr.add(v),v.next()},[4,pc(i)];case 1:return[2,l.apply(void 0,[h.sent(),c])]}})})}),function(){c.Wo(),i.asyncQueue.enqueueAndForget(function(){return R(a,void 0,void 0,function(){var l;return A(this,function(h){switch(h.label){case 0:return l=function(d,v){ee(d).Gr.delete(v)},[4,pc(i)];case 1:return[2,l.apply(void 0,[h.sent(),c])]}})})})}}(tn(n=Qe(n,Pt)),vc(r)?r:{next:r})}(this._delegate,t)},Object.defineProperty(e.prototype,"app",{get:function(){if(!this.tu)throw new H(D.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this.tu},enumerable:!1,configurable:!0}),e.prototype.collection=function(t){try{return new mv(this,hF(this._delegate,t))}catch(n){throw Bn(n,"collection()","Firestore.collection()")}},e.prototype.doc=function(t){try{return new aa(this,mp(this._delegate,t))}catch(n){throw Bn(n,"doc()","Firestore.doc()")}},e.prototype.collectionGroup=function(t){try{return new kh(this,function(n,r){if(n=Qe(n,qf),jT("collectionGroup","collection id",r),r.indexOf("/")>=0)throw new H(D.INVALID_ARGUMENT,"Invalid collection ID '"+r+"' passed to function collectionGroup(). Collection IDs must not contain '/'.");return new lr(n,null,function(i){return new mo(Xe.emptyPath(),i)}(r))}(this._delegate,t))}catch(n){throw Bn(n,"collectionGroup()","Firestore.collectionGroup()")}},e.prototype.runTransaction=function(t){var n=this;return function(r,i){return function(s,a){var c=this,l=new On;return s.asyncQueue.enqueueAndForget(function(){return R(c,void 0,void 0,function(){var h;return A(this,function(d){switch(d.label){case 0:return[4,function(v){return Og(v).then(function(g){return g.datastore})}(s)];case 1:return h=d.sent(),new MX(s.asyncQueue,h,a,l).run(),[2]}})})}),l.promise}(tn(r),function(s){return i(new oJ(r,s))})}(this._delegate,function(r){return t(new NF(n,r))})},e.prototype.batch=function(){var t=this;return tn(this._delegate),new xF(new iJ(this._delegate,function(n){return Ah(t._delegate,n)}))},e.prototype.loadBundle=function(t){throw new H(D.FAILED_PRECONDITION,'"loadBundle()" does not exist, have you imported "firebase/firestore/bundle"?')},e.prototype.namedQuery=function(t){throw new H(D.FAILED_PRECONDITION,'"namedQuery()" does not exist, have you imported "firebase/firestore/bundle"?')},e}(),Fg=function(e){function t(n){var r=this;return(r=e.call(this)||this).firestore=n,r}return te(t,e),t.prototype.convertBytes=function(n){return new RF(new Ea(n))},t.prototype.convertReference=function(n){var r=this.convertDocumentKey(n,this.firestore._databaseId);return aa.eu(r,this.firestore,null)},t}(WT);function aJ(e){var t;t=e,ci.setLogLevel(t)}var NF=function(){function e(t,n){this._firestore=t,this._delegate=n,this._userDataWriter=new Fg(t)}return e.prototype.get=function(t){var n=this,r=Zs(t);return this._delegate.get(r).then(function(i){return new Hf(n._firestore,new so(n._firestore._delegate,n._userDataWriter,i._key,i._document,i.metadata,r.converter))})},e.prototype.set=function(t,n,r){var i=Zs(t);return r?(VT("Transaction.set",r),this._delegate.set(i,n,r)):this._delegate.set(i,n),this},e.prototype.update=function(t,n,r){for(var i,s=[],a=3;a=200&&e<300)return"ok";switch(e){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function wJ(e,t,n){var r=_J(e),i=r,s=void 0;try{var a=t&&t.error;if(a){var c=a.status;if(typeof c=="string"){if(!LN[c])return new Lu("internal","internal");r=LN[c],i=c}var l=a.message;typeof l=="string"&&(i=l),s=a.details,s!==void 0&&(s=n.decode(s))}}catch{}return r==="ok"?null:new Lu(r,i,s)}var bJ=function(){function e(t,n){var r=this;this.auth=null,this.messaging=null,this.auth=t.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||t.get().then(function(i){return r.auth=i},function(){}),this.messaging||n.get().then(function(i){return r.messaging=i},function(){})}return e.prototype.getAuthToken=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:if(!this.auth)return[2,void 0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.auth.getToken()];case 2:return t=n.sent(),t?[2,t.accessToken]:[2,void 0];case 3:return n.sent(),[2,void 0];case 4:return[2]}})})},e.prototype.getInstanceIdToken=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:if(!this.messaging||!("Notification"in self)||Notification.permission!=="granted")return[2,void 0];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.messaging.getToken()];case 2:return[2,t.sent()];case 3:return t.sent(),[2,void 0];case 4:return[2]}})})},e.prototype.getContext=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return[4,this.getAuthToken()];case 1:return t=r.sent(),[4,this.getInstanceIdToken()];case 2:return n=r.sent(),[2,{authToken:t,instanceIdToken:n}]}})})},e}();/** + */var LN={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"},Lu=function(e){te(t,e);function t(n,r,i){var s=e.call(this,r)||this;return Object.setPrototypeOf(s,t.prototype),s.code=n,s.details=i,s}return t}(Error);function gJ(e){if(e>=200&&e<300)return"ok";switch(e){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function mJ(e,t,n){var r=gJ(e),i=r,s=void 0;try{var a=t&&t.error;if(a){var c=a.status;if(typeof c=="string"){if(!LN[c])return new Lu("internal","internal");r=LN[c],i=c}var l=a.message;typeof l=="string"&&(i=l),s=a.details,s!==void 0&&(s=n.decode(s))}}catch{}return r==="ok"?null:new Lu(r,i,s)}var yJ=function(){function e(t,n){var r=this;this.auth=null,this.messaging=null,this.auth=t.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||t.get().then(function(i){return r.auth=i},function(){}),this.messaging||n.get().then(function(i){return r.messaging=i},function(){})}return e.prototype.getAuthToken=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:if(!this.auth)return[2,void 0];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.auth.getToken()];case 2:return t=n.sent(),t?[2,t.accessToken]:[2,void 0];case 3:return n.sent(),[2,void 0];case 4:return[2]}})})},e.prototype.getInstanceIdToken=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:if(!this.messaging||!("Notification"in self)||Notification.permission!=="granted")return[2,void 0];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.messaging.getToken()];case 2:return[2,t.sent()];case 3:return t.sent(),[2,void 0];case 4:return[2]}})})},e.prototype.getContext=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return[4,this.getAuthToken()];case 1:return t=r.sent(),[4,this.getInstanceIdToken()];case 2:return n=r.sent(),[2,{authToken:t,instanceIdToken:n}]}})})},e}();/** * @license * Copyright 2017 Google LLC * @@ -2918,7 +2918,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var EJ="type.googleapis.com/google.protobuf.Int64Value",TJ="type.googleapis.com/google.protobuf.UInt64Value";function FN(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}var IJ=function(){function e(){}return e.prototype.encode=function(t){var n=this;if(t==null)return null;if(t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&isFinite(t)||t===!0||t===!1||Object.prototype.toString.call(t)==="[object String]")return t;if(t instanceof Date)return t.toISOString();if(Array.isArray(t))return t.map(function(r){return n.encode(r)});if(typeof t=="function"||typeof t=="object")return FN(t,function(r){return n.encode(r)});throw new Error("Data cannot be encoded in JSON: "+t)},e.prototype.decode=function(t){var n=this;if(t==null)return t;if(t["@type"])switch(t["@type"]){case EJ:case TJ:{var r=Number(t.value);if(isNaN(r))throw new Error("Data cannot be decoded from JSON: "+t);return r}default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(function(i){return n.decode(i)}):typeof t=="function"||typeof t=="object"?FN(t,function(i){return n.decode(i)}):t},e}();/** + */var _J="type.googleapis.com/google.protobuf.Int64Value",wJ="type.googleapis.com/google.protobuf.UInt64Value";function FN(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}var bJ=function(){function e(){}return e.prototype.encode=function(t){var n=this;if(t==null)return null;if(t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&isFinite(t)||t===!0||t===!1||Object.prototype.toString.call(t)==="[object String]")return t;if(t instanceof Date)return t.toISOString();if(Array.isArray(t))return t.map(function(r){return n.encode(r)});if(typeof t=="function"||typeof t=="object")return FN(t,function(r){return n.encode(r)});throw new Error("Data cannot be encoded in JSON: "+t)},e.prototype.decode=function(t){var n=this;if(t==null)return t;if(t["@type"])switch(t["@type"]){case _J:case wJ:{var r=Number(t.value);if(isNaN(r))throw new Error("Data cannot be decoded from JSON: "+t);return r}default:throw new Error("Data cannot be decoded from JSON: "+t)}return Array.isArray(t)?t.map(function(i){return n.decode(i)}):typeof t=="function"||typeof t=="object"?FN(t,function(i){return n.decode(i)}):t},e}();/** * @license * Copyright 2017 Google LLC * @@ -2933,7 +2933,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function SJ(e){var t,n=new Promise(function(r,i){t=setTimeout(function(){i(new Lu("deadline-exceeded","deadline-exceeded"))},e)});return{timer:t,promise:n}}var UN=function(){function e(t,n,r,i,s,a){var c=this;s===void 0&&(s="us-central1"),this.app_=t,this.appCheckProvider=i,this.fetchImpl=a,this.serializer=new IJ,this.emulatorOrigin=null,this.INTERNAL={delete:function(){return Promise.resolve(c.deleteService())}},this.contextProvider=new bJ(n,r),this.cancelAllRequests=new Promise(function(h){c.deleteService=function(){return h()}});try{var l=new URL(s);this.customDomain=l.origin,this.region="us-central1"}catch{this.customDomain=null,this.region=s}}return Object.defineProperty(e.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),e.prototype._url=function(t){var n=this.app_.options.projectId;if(this.emulatorOrigin!==null){var r=this.emulatorOrigin;return r+"/"+n+"/"+this.region+"/"+t}return this.customDomain!==null?this.customDomain+"/"+t:"https://"+this.region+"-"+n+".cloudfunctions.net/"+t},e.prototype.useEmulator=function(t,n){this.emulatorOrigin="http://"+t+":"+n},e.prototype.useFunctionsEmulator=function(t){this.emulatorOrigin=t},e.prototype.httpsCallable=function(t,n){var r=this;return function(i){return r.call(t,i,n||{})}},e.prototype.postJSON=function(t,n,r){return R(this,void 0,void 0,function(){var i,s,a;return A(this,function(c){switch(c.label){case 0:return r["Content-Type"]="application/json",[4,this.getAppCheckToken()];case 1:i=c.sent(),i!==null&&(r["X-Firebase-AppCheck"]=i),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.fetchImpl(t,{method:"POST",body:JSON.stringify(n),headers:r})];case 3:return s=c.sent(),[3,5];case 4:return c.sent(),[2,{status:0,json:null}];case 5:a=null,c.label=6;case 6:return c.trys.push([6,8,,9]),[4,s.json()];case 7:return a=c.sent(),[3,9];case 8:return c.sent(),[3,9];case 9:return[2,{status:s.status,json:a}]}})})},e.prototype.getAppCheckToken=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return t=this.appCheckProvider.getImmediate({optional:!0}),t?[4,t.getToken()]:[3,2];case 1:return n=r.sent(),[2,n.token];case 2:return[2,null]}})})},e.prototype.call=function(t,n,r){return R(this,void 0,void 0,function(){var i,s,a,c,l,h,d,v,g,y,_,b;return A(this,function(T){switch(T.label){case 0:return i=this._url(t),n=this.serializer.encode(n),s={data:n},a={},[4,this.contextProvider.getContext()];case 1:return c=T.sent(),c.authToken&&(a.Authorization="Bearer "+c.authToken),c.instanceIdToken&&(a["Firebase-Instance-ID-Token"]=c.instanceIdToken),l=r.timeout||7e4,h=SJ(l),d=h.timer,v=h.promise,[4,Promise.race([jN(d,this.postJSON(i,s,a)),v,jN(d,this.cancelAllRequests)])];case 2:if(g=T.sent(),!g)throw new Lu("cancelled","Firebase Functions instance was deleted.");if(y=wJ(g.status,g.json,this.serializer),y)throw y;if(!g.json)throw new Lu("internal","Response is not valid JSON object.");if(_=g.json.data,typeof _>"u"&&(_=g.json.result),typeof _>"u")throw new Lu("internal","Response is missing data field.");return b=this.serializer.decode(_),[2,{data:b}]}})})},e}();function jN(e,t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return[4,t];case 1:return n=r.sent(),clearTimeout(e),[2,n]}})})}/** + */function EJ(e){var t,n=new Promise(function(r,i){t=setTimeout(function(){i(new Lu("deadline-exceeded","deadline-exceeded"))},e)});return{timer:t,promise:n}}var UN=function(){function e(t,n,r,i,s,a){var c=this;s===void 0&&(s="us-central1"),this.app_=t,this.appCheckProvider=i,this.fetchImpl=a,this.serializer=new bJ,this.emulatorOrigin=null,this.INTERNAL={delete:function(){return Promise.resolve(c.deleteService())}},this.contextProvider=new yJ(n,r),this.cancelAllRequests=new Promise(function(h){c.deleteService=function(){return h()}});try{var l=new URL(s);this.customDomain=l.origin,this.region="us-central1"}catch{this.customDomain=null,this.region=s}}return Object.defineProperty(e.prototype,"app",{get:function(){return this.app_},enumerable:!1,configurable:!0}),e.prototype._url=function(t){var n=this.app_.options.projectId;if(this.emulatorOrigin!==null){var r=this.emulatorOrigin;return r+"/"+n+"/"+this.region+"/"+t}return this.customDomain!==null?this.customDomain+"/"+t:"https://"+this.region+"-"+n+".cloudfunctions.net/"+t},e.prototype.useEmulator=function(t,n){this.emulatorOrigin="http://"+t+":"+n},e.prototype.useFunctionsEmulator=function(t){this.emulatorOrigin=t},e.prototype.httpsCallable=function(t,n){var r=this;return function(i){return r.call(t,i,n||{})}},e.prototype.postJSON=function(t,n,r){return R(this,void 0,void 0,function(){var i,s,a;return A(this,function(c){switch(c.label){case 0:return r["Content-Type"]="application/json",[4,this.getAppCheckToken()];case 1:i=c.sent(),i!==null&&(r["X-Firebase-AppCheck"]=i),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.fetchImpl(t,{method:"POST",body:JSON.stringify(n),headers:r})];case 3:return s=c.sent(),[3,5];case 4:return c.sent(),[2,{status:0,json:null}];case 5:a=null,c.label=6;case 6:return c.trys.push([6,8,,9]),[4,s.json()];case 7:return a=c.sent(),[3,9];case 8:return c.sent(),[3,9];case 9:return[2,{status:s.status,json:a}]}})})},e.prototype.getAppCheckToken=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return t=this.appCheckProvider.getImmediate({optional:!0}),t?[4,t.getToken()]:[3,2];case 1:return n=r.sent(),[2,n.token];case 2:return[2,null]}})})},e.prototype.call=function(t,n,r){return R(this,void 0,void 0,function(){var i,s,a,c,l,h,d,v,g,y,_,b;return A(this,function(T){switch(T.label){case 0:return i=this._url(t),n=this.serializer.encode(n),s={data:n},a={},[4,this.contextProvider.getContext()];case 1:return c=T.sent(),c.authToken&&(a.Authorization="Bearer "+c.authToken),c.instanceIdToken&&(a["Firebase-Instance-ID-Token"]=c.instanceIdToken),l=r.timeout||7e4,h=EJ(l),d=h.timer,v=h.promise,[4,Promise.race([jN(d,this.postJSON(i,s,a)),v,jN(d,this.cancelAllRequests)])];case 2:if(g=T.sent(),!g)throw new Lu("cancelled","Firebase Functions instance was deleted.");if(y=mJ(g.status,g.json,this.serializer),y)throw y;if(!g.json)throw new Lu("internal","Response is not valid JSON object.");if(_=g.json.data,typeof _>"u"&&(_=g.json.result),typeof _>"u")throw new Lu("internal","Response is missing data field.");return b=this.serializer.decode(_),[2,{data:b}]}})})},e}();function jN(e,t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return[4,t];case 1:return n=r.sent(),clearTimeout(e),[2,n]}})})}/** * @license * Copyright 2019 Google LLC * @@ -2948,7 +2948,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var CJ="functions";function AJ(e,t){var n={Functions:UN};function r(i,s){var a=s.instanceIdentifier,c=i.getProvider("app").getImmediate(),l=i.getProvider("auth-internal"),h=i.getProvider("app-check-internal"),d=i.getProvider("messaging");return new UN(c,l,d,h,a,t)}e.INTERNAL.registerComponent(new On(CJ,r,"PUBLIC").setServiceProps(n).setMultipleInstances(!0))}var kJ="@firebase/functions",RJ="0.6.16";/** + */var TJ="functions";function IJ(e,t){var n={Functions:UN};function r(i,s){var a=s.instanceIdentifier,c=i.getProvider("app").getImmediate(),l=i.getProvider("auth-internal"),h=i.getProvider("app-check-internal"),d=i.getProvider("messaging");return new UN(c,l,d,h,a,t)}e.INTERNAL.registerComponent(new xn(TJ,r,"PUBLIC").setServiceProps(n).setMultipleInstances(!0))}var SJ="@firebase/functions",CJ="0.6.16";/** * @license * Copyright 2017 Google LLC * @@ -2963,7 +2963,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */AJ(se,fetch.bind(self));se.registerVersion(kJ,RJ);function NJ(e){return Array.prototype.slice.call(e)}function DF(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function jg(e,t,n){var r,i=new Promise(function(s,a){r=e[t].apply(e,n),DF(r).then(s,a)});return i.request=r,i}function xJ(e,t,n){var r=jg(e,t,n);return r.then(function(i){if(i)return new Kf(i,r.request)})}function jc(e,t,n){n.forEach(function(r){Object.defineProperty(e.prototype,r,{get:function(){return this[t][r]},set:function(i){this[t][r]=i}})})}function zT(e,t,n,r){r.forEach(function(i){i in n.prototype&&(e.prototype[i]=function(){return jg(this[t],i,arguments)})})}function Vg(e,t,n,r){r.forEach(function(i){i in n.prototype&&(e.prototype[i]=function(){return this[t][i].apply(this[t],arguments)})})}function MF(e,t,n,r){r.forEach(function(i){i in n.prototype&&(e.prototype[i]=function(){return xJ(this[t],i,arguments)})})}function Ba(e){this._index=e}jc(Ba,"_index",["name","keyPath","multiEntry","unique"]);zT(Ba,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]);MF(Ba,"_index",IDBIndex,["openCursor","openKeyCursor"]);function Kf(e,t){this._cursor=e,this._request=t}jc(Kf,"_cursor",["direction","key","primaryKey","value"]);zT(Kf,"_cursor",IDBCursor,["update","delete"]);["advance","continue","continuePrimaryKey"].forEach(function(e){e in IDBCursor.prototype&&(Kf.prototype[e]=function(){var t=this,n=arguments;return Promise.resolve().then(function(){return t._cursor[e].apply(t._cursor,n),DF(t._request).then(function(r){if(r)return new Kf(r,t._request)})})})});function qi(e){this._store=e}qi.prototype.createIndex=function(){return new Ba(this._store.createIndex.apply(this._store,arguments))};qi.prototype.index=function(){return new Ba(this._store.index.apply(this._store,arguments))};jc(qi,"_store",["name","keyPath","indexNames","autoIncrement"]);zT(qi,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]);MF(qi,"_store",IDBObjectStore,["openCursor","openKeyCursor"]);Vg(qi,"_store",IDBObjectStore,["deleteIndex"]);function kh(e){this._tx=e,this.complete=new Promise(function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}})}kh.prototype.objectStore=function(){return new qi(this._tx.objectStore.apply(this._tx,arguments))};jc(kh,"_tx",["objectStoreNames","mode"]);Vg(kh,"_tx",IDBTransaction,["abort"]);function Bg(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new kh(n)}Bg.prototype.createObjectStore=function(){return new qi(this._db.createObjectStore.apply(this._db,arguments))};jc(Bg,"_db",["name","version","objectStoreNames"]);Vg(Bg,"_db",IDBDatabase,["deleteObjectStore","close"]);function qg(e){this._db=e}qg.prototype.transaction=function(){return new kh(this._db.transaction.apply(this._db,arguments))};jc(qg,"_db",["name","version","objectStoreNames"]);Vg(qg,"_db",IDBDatabase,["close"]);["openCursor","openKeyCursor"].forEach(function(e){[qi,Ba].forEach(function(t){e in t.prototype&&(t.prototype[e.replace("open","iterate")]=function(){var n=NJ(arguments),r=n[n.length-1],i=this._store||this._index,s=i[e].apply(i,n.slice(0,-1));s.onsuccess=function(){r(s.result)}})})});[Ba,qi].forEach(function(e){e.prototype.getAll||(e.prototype.getAll=function(t,n){var r=this,i=[];return new Promise(function(s){r.iterateCursor(t,function(a){if(!a){s(i);return}if(i.push(a.value),n!==void 0&&i.length==n){s(i);return}a.continue()})})})});function QT(e,t,n){var r=jg(indexedDB,"open",[e,t]),i=r.request;return i&&(i.onupgradeneeded=function(s){n&&n(new Bg(i.result,s.oldVersion,i.transaction))}),r.then(function(s){return new qg(s)})}function lw(e){return jg(indexedDB,"deleteDatabase",[e])}var OJ="@firebase/installations",LF="0.4.32";/** + */IJ(oe,fetch.bind(self));oe.registerVersion(SJ,CJ);function AJ(e){return Array.prototype.slice.call(e)}function DF(e){return new Promise(function(t,n){e.onsuccess=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function jg(e,t,n){var r,i=new Promise(function(s,a){r=e[t].apply(e,n),DF(r).then(s,a)});return i.request=r,i}function kJ(e,t,n){var r=jg(e,t,n);return r.then(function(i){if(i)return new Wf(i,r.request)})}function jc(e,t,n){n.forEach(function(r){Object.defineProperty(e.prototype,r,{get:function(){return this[t][r]},set:function(i){this[t][r]=i}})})}function zT(e,t,n,r){r.forEach(function(i){i in n.prototype&&(e.prototype[i]=function(){return jg(this[t],i,arguments)})})}function Vg(e,t,n,r){r.forEach(function(i){i in n.prototype&&(e.prototype[i]=function(){return this[t][i].apply(this[t],arguments)})})}function MF(e,t,n,r){r.forEach(function(i){i in n.prototype&&(e.prototype[i]=function(){return kJ(this[t],i,arguments)})})}function Ba(e){this._index=e}jc(Ba,"_index",["name","keyPath","multiEntry","unique"]);zT(Ba,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]);MF(Ba,"_index",IDBIndex,["openCursor","openKeyCursor"]);function Wf(e,t){this._cursor=e,this._request=t}jc(Wf,"_cursor",["direction","key","primaryKey","value"]);zT(Wf,"_cursor",IDBCursor,["update","delete"]);["advance","continue","continuePrimaryKey"].forEach(function(e){e in IDBCursor.prototype&&(Wf.prototype[e]=function(){var t=this,n=arguments;return Promise.resolve().then(function(){return t._cursor[e].apply(t._cursor,n),DF(t._request).then(function(r){if(r)return new Wf(r,t._request)})})})});function qi(e){this._store=e}qi.prototype.createIndex=function(){return new Ba(this._store.createIndex.apply(this._store,arguments))};qi.prototype.index=function(){return new Ba(this._store.index.apply(this._store,arguments))};jc(qi,"_store",["name","keyPath","indexNames","autoIncrement"]);zT(qi,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]);MF(qi,"_store",IDBObjectStore,["openCursor","openKeyCursor"]);Vg(qi,"_store",IDBObjectStore,["deleteIndex"]);function Rh(e){this._tx=e,this.complete=new Promise(function(t,n){e.oncomplete=function(){t()},e.onerror=function(){n(e.error)},e.onabort=function(){n(e.error)}})}Rh.prototype.objectStore=function(){return new qi(this._tx.objectStore.apply(this._tx,arguments))};jc(Rh,"_tx",["objectStoreNames","mode"]);Vg(Rh,"_tx",IDBTransaction,["abort"]);function Bg(e,t,n){this._db=e,this.oldVersion=t,this.transaction=new Rh(n)}Bg.prototype.createObjectStore=function(){return new qi(this._db.createObjectStore.apply(this._db,arguments))};jc(Bg,"_db",["name","version","objectStoreNames"]);Vg(Bg,"_db",IDBDatabase,["deleteObjectStore","close"]);function qg(e){this._db=e}qg.prototype.transaction=function(){return new Rh(this._db.transaction.apply(this._db,arguments))};jc(qg,"_db",["name","version","objectStoreNames"]);Vg(qg,"_db",IDBDatabase,["close"]);["openCursor","openKeyCursor"].forEach(function(e){[qi,Ba].forEach(function(t){e in t.prototype&&(t.prototype[e.replace("open","iterate")]=function(){var n=AJ(arguments),r=n[n.length-1],i=this._store||this._index,s=i[e].apply(i,n.slice(0,-1));s.onsuccess=function(){r(s.result)}})})});[Ba,qi].forEach(function(e){e.prototype.getAll||(e.prototype.getAll=function(t,n){var r=this,i=[];return new Promise(function(s){r.iterateCursor(t,function(a){if(!a){s(i);return}if(i.push(a.value),n!==void 0&&i.length==n){s(i);return}a.continue()})})})});function QT(e,t,n){var r=jg(indexedDB,"open",[e,t]),i=r.request;return i&&(i.onupgradeneeded=function(s){n&&n(new Bg(i.result,s.oldVersion,i.transaction))}),r.then(function(s){return new qg(s)})}function lw(e){return jg(indexedDB,"deleteDatabase",[e])}var RJ="@firebase/installations",LF="0.4.32";/** * @license * Copyright 2019 Google LLC * @@ -2978,7 +2978,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var FF=1e4,UF="w:"+LF,jF="FIS_v2",PJ="https://firebaseinstallations.googleapis.com/v1",DJ=60*60*1e3,MJ="installations",LJ="Installations";/** + */var FF=1e4,UF="w:"+LF,jF="FIS_v2",NJ="https://firebaseinstallations.googleapis.com/v1",xJ=60*60*1e3,OJ="installations",PJ="Installations";/** * @license * Copyright 2019 Google LLC * @@ -2993,7 +2993,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Uo,FJ=(Uo={},Uo["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',Uo["not-registered"]="Firebase Installation is not registered.",Uo["installation-not-found"]="Firebase Installation not found.",Uo["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',Uo["app-offline"]="Could not process request. Application offline.",Uo["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",Uo),ho=new mo(MJ,LJ,FJ);function VF(e){return e instanceof Sc&&e.code.includes("request-failed")}/** + */var Fo,DJ=(Fo={},Fo["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',Fo["not-registered"]="Firebase Installation is not registered.",Fo["installation-not-found"]="Firebase Installation not found.",Fo["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',Fo["app-offline"]="Could not process request. Application offline.",Fo["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",Fo),fo=new go(OJ,PJ,DJ);function VF(e){return e instanceof Sc&&e.code.includes("request-failed")}/** * @license * Copyright 2019 Google LLC * @@ -3008,7 +3008,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function YT(e){var t=e.projectId;return PJ+"/projects/"+t+"/installations"}function BF(e){return{token:e.token,requestStatus:2,expiresIn:UJ(e.expiresIn),creationTime:Date.now()}}function XT(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return[4,t.json()];case 1:return n=i.sent(),r=n.error,[2,ho.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}})})}function qF(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function $F(e,t){var n=t.refreshToken,r=qF(e);return r.append("Authorization",jJ(n)),r}function JT(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return[4,e()];case 1:return t=n.sent(),t.status>=500&&t.status<600?[2,e()]:[2,t]}})})}function UJ(e){return Number(e.replace("s","000"))}function jJ(e){return jF+" "+e}/** + */function YT(e){var t=e.projectId;return NJ+"/projects/"+t+"/installations"}function BF(e){return{token:e.token,requestStatus:2,expiresIn:MJ(e.expiresIn),creationTime:Date.now()}}function XT(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return[4,t.json()];case 1:return n=i.sent(),r=n.error,[2,fo.create("request-failed",{requestName:e,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}})})}function qF(e){var t=e.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function $F(e,t){var n=t.refreshToken,r=qF(e);return r.append("Authorization",LJ(n)),r}function JT(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return[4,e()];case 1:return t=n.sent(),t.status>=500&&t.status<600?[2,e()]:[2,t]}})})}function MJ(e){return Number(e.replace("s","000"))}function LJ(e){return jF+" "+e}/** * @license * Copyright 2019 Google LLC * @@ -3023,7 +3023,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function VJ(e,t){var n=t.fid;return R(this,void 0,void 0,function(){var r,i,s,a,c,l,h;return A(this,function(d){switch(d.label){case 0:return r=YT(e),i=qF(e),s={fid:n,authVersion:jF,appId:e.appId,sdkVersion:UF},a={method:"POST",headers:i,body:JSON.stringify(s)},[4,JT(function(){return fetch(r,a)})];case 1:return c=d.sent(),c.ok?[4,c.json()]:[3,3];case 2:return l=d.sent(),h={fid:l.fid||n,registrationStatus:2,refreshToken:l.refreshToken,authToken:BF(l.authToken)},[2,h];case 3:return[4,XT("Create Installation",c)];case 4:throw d.sent()}})})}/** + */function FJ(e,t){var n=t.fid;return R(this,void 0,void 0,function(){var r,i,s,a,c,l,h;return A(this,function(d){switch(d.label){case 0:return r=YT(e),i=qF(e),s={fid:n,authVersion:jF,appId:e.appId,sdkVersion:UF},a={method:"POST",headers:i,body:JSON.stringify(s)},[4,JT(function(){return fetch(r,a)})];case 1:return c=d.sent(),c.ok?[4,c.json()]:[3,3];case 2:return l=d.sent(),h={fid:l.fid||n,registrationStatus:2,refreshToken:l.refreshToken,authToken:BF(l.authToken)},[2,h];case 3:return[4,XT("Create Installation",c)];case 4:throw d.sent()}})})}/** * @license * Copyright 2020 Google LLC * @@ -3053,7 +3053,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function BJ(e){var t=btoa(String.fromCharCode.apply(String,xe([],gn(e))));return t.replace(/\+/g,"-").replace(/\//g,"_")}/** + */function UJ(e){var t=btoa(String.fromCharCode.apply(String,xe([],gn(e))));return t.replace(/\+/g,"-").replace(/\//g,"_")}/** * @license * Copyright 2019 Google LLC * @@ -3068,7 +3068,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var qJ=/^[cdef][\w-]{21}$/,Xb="";function $J(){try{var e=new Uint8Array(17),t=self.crypto||self.msCrypto;t.getRandomValues(e),e[0]=112+e[0]%16;var n=HJ(e);return qJ.test(n)?n:Xb}catch{return Xb}}function HJ(e){var t=BJ(e);return t.substr(0,22)}/** + */var jJ=/^[cdef][\w-]{21}$/,Xb="";function VJ(){try{var e=new Uint8Array(17),t=self.crypto||self.msCrypto;t.getRandomValues(e),e[0]=112+e[0]%16;var n=BJ(e);return jJ.test(n)?n:Xb}catch{return Xb}}function BJ(e){var t=UJ(e);return t.substr(0,22)}/** * @license * Copyright 2019 Google LLC * @@ -3098,7 +3098,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var gc=new Map;function KF(e,t){var n=Vc(e);WF(n,t),GJ(n,t)}function KJ(e,t){GF();var n=Vc(e),r=gc.get(n);r||(r=new Set,gc.set(n,r)),r.add(t)}function WJ(e,t){var n=Vc(e),r=gc.get(n);r&&(r.delete(t),r.size===0&&gc.delete(n),zF())}function WF(e,t){var n,r,i=gc.get(e);if(i)try{for(var s=an(i),a=s.next();!a.done;a=s.next()){var c=a.value;c(t)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}function GJ(e,t){var n=GF();n&&n.postMessage({key:e,fid:t}),zF()}var ea=null;function GF(){return!ea&&"BroadcastChannel"in self&&(ea=new BroadcastChannel("[Firebase] FID Change"),ea.onmessage=function(e){WF(e.data.key,e.data.fid)}),ea}function zF(){gc.size===0&&ea&&(ea.close(),ea=null)}/** + */var gc=new Map;function KF(e,t){var n=Vc(e);WF(n,t),HJ(n,t)}function qJ(e,t){GF();var n=Vc(e),r=gc.get(n);r||(r=new Set,gc.set(n,r)),r.add(t)}function $J(e,t){var n=Vc(e),r=gc.get(n);r&&(r.delete(t),r.size===0&&gc.delete(n),zF())}function WF(e,t){var n,r,i=gc.get(e);if(i)try{for(var s=sn(i),a=s.next();!a.done;a=s.next()){var c=a.value;c(t)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}function HJ(e,t){var n=GF();n&&n.postMessage({key:e,fid:t}),zF()}var ea=null;function GF(){return!ea&&"BroadcastChannel"in self&&(ea=new BroadcastChannel("[Firebase] FID Change"),ea.onmessage=function(e){WF(e.data.key,e.data.fid)}),ea}function zF(){gc.size===0&&ea&&(ea.close(),ea=null)}/** * @license * Copyright 2019 Google LLC * @@ -3113,7 +3113,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var zJ="firebase-installations-database",QJ=1,Ta="firebase-installations-store",fw=null;function ZT(){return fw||(fw=QT(zJ,QJ,function(e){switch(e.oldVersion){case 0:e.createObjectStore(Ta)}})),fw}function yv(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a;return A(this,function(c){switch(c.label){case 0:return n=Vc(e),[4,ZT()];case 1:return r=c.sent(),i=r.transaction(Ta,"readwrite"),s=i.objectStore(Ta),[4,s.get(n)];case 2:return a=c.sent(),[4,s.put(t,n)];case 3:return c.sent(),[4,i.complete];case 4:return c.sent(),(!a||a.fid!==t.fid)&&KF(e,t.fid),[2,t]}})})}function eI(e){return R(this,void 0,void 0,function(){var t,n,r;return A(this,function(i){switch(i.label){case 0:return t=Vc(e),[4,ZT()];case 1:return n=i.sent(),r=n.transaction(Ta,"readwrite"),[4,r.objectStore(Ta).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}})})}function Rh(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c;return A(this,function(l){switch(l.label){case 0:return n=Vc(e),[4,ZT()];case 1:return r=l.sent(),i=r.transaction(Ta,"readwrite"),s=i.objectStore(Ta),[4,s.get(n)];case 2:return a=l.sent(),c=t(a),c!==void 0?[3,4]:[4,s.delete(n)];case 3:return l.sent(),[3,6];case 4:return[4,s.put(c,n)];case 5:l.sent(),l.label=6;case 6:return[4,i.complete];case 7:return l.sent(),c&&(!a||a.fid!==c.fid)&&KF(e,c.fid),[2,c]}})})}/** + */var KJ="firebase-installations-database",WJ=1,Ta="firebase-installations-store",fw=null;function ZT(){return fw||(fw=QT(KJ,WJ,function(e){switch(e.oldVersion){case 0:e.createObjectStore(Ta)}})),fw}function yv(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a;return A(this,function(c){switch(c.label){case 0:return n=Vc(e),[4,ZT()];case 1:return r=c.sent(),i=r.transaction(Ta,"readwrite"),s=i.objectStore(Ta),[4,s.get(n)];case 2:return a=c.sent(),[4,s.put(t,n)];case 3:return c.sent(),[4,i.complete];case 4:return c.sent(),(!a||a.fid!==t.fid)&&KF(e,t.fid),[2,t]}})})}function eI(e){return R(this,void 0,void 0,function(){var t,n,r;return A(this,function(i){switch(i.label){case 0:return t=Vc(e),[4,ZT()];case 1:return n=i.sent(),r=n.transaction(Ta,"readwrite"),[4,r.objectStore(Ta).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}})})}function Nh(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c;return A(this,function(l){switch(l.label){case 0:return n=Vc(e),[4,ZT()];case 1:return r=l.sent(),i=r.transaction(Ta,"readwrite"),s=i.objectStore(Ta),[4,s.get(n)];case 2:return a=l.sent(),c=t(a),c!==void 0?[3,4]:[4,s.delete(n)];case 3:return l.sent(),[3,6];case 4:return[4,s.put(c,n)];case 5:l.sent(),l.label=6;case 6:return[4,i.complete];case 7:return l.sent(),c&&(!a||a.fid!==c.fid)&&KF(e,c.fid),[2,c]}})})}/** * @license * Copyright 2019 Google LLC * @@ -3128,7 +3128,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function tI(e){return R(this,void 0,void 0,function(){var t,n,r;return A(this,function(i){switch(i.label){case 0:return[4,Rh(e,function(s){var a=YJ(s),c=XJ(e,a);return t=c.registrationPromise,c.installationEntry})];case 1:return n=i.sent(),n.fid!==Xb?[3,3]:(r={},[4,t]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:t}]}})})}function YJ(e){var t=e||{fid:$J(),registrationStatus:0};return QF(t)}function XJ(e,t){if(t.registrationStatus===0){if(!navigator.onLine){var n=Promise.reject(ho.create("app-offline"));return{installationEntry:t,registrationPromise:n}}var r={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},i=JJ(e,r);return{installationEntry:r,registrationPromise:i}}else return t.registrationStatus===1?{installationEntry:t,registrationPromise:ZJ(e)}:{installationEntry:t}}function JJ(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,VJ(e,t)];case 1:return n=i.sent(),[2,yv(e,n)];case 2:return r=i.sent(),VF(r)&&r.customData.serverCode===409?[4,eI(e)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,yv(e,{fid:t.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}})})}function ZJ(e){return R(this,void 0,void 0,function(){var t,n,r,i;return A(this,function(s){switch(s.label){case 0:return[4,VN(e)];case 1:t=s.sent(),s.label=2;case 2:return t.registrationStatus!==1?[3,5]:[4,HF(100)];case 3:return s.sent(),[4,VN(e)];case 4:return t=s.sent(),[3,2];case 5:return t.registrationStatus!==0?[3,7]:[4,tI(e)];case 6:return n=s.sent(),r=n.installationEntry,i=n.registrationPromise,i?[2,i]:[2,r];case 7:return[2,t]}})})}function VN(e){return Rh(e,function(t){if(!t)throw ho.create("installation-not-found");return QF(t)})}function QF(e){return e9(e)?{fid:e.fid,registrationStatus:0}:e}function e9(e){return e.registrationStatus===1&&e.registrationTime+FF0&&typeof e.token=="string"&&e.token.length>0&&typeof t.auth=="string"&&t.auth.length>0&&typeof t.p256dh=="string"&&t.p256dh.length>0&&typeof t.endpoint=="string"&&t.endpoint.length>0&&typeof t.swScope=="string"&&t.swScope.length>0&&typeof t.vapidKey=="string"&&t.vapidKey.length>0}/** + */var dw="fcm_token_details_db",C9=5,qN="fcm_token_object_Store";function A9(e){return R(this,void 0,void 0,function(){var t,n,r,i,s=this;return A(this,function(a){switch(a.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(t=a.sent(),n=t.map(function(c){return c.name}),!n.includes(dw))return[2,null];a.label=2;case 2:return r=null,[4,QT(dw,C9,function(c){return R(s,void 0,void 0,function(){var l,h,d,d,d,v;return A(this,function(g){switch(g.label){case 0:return c.oldVersion<2?[2]:c.objectStoreNames.contains(qN)?(l=c.transaction.objectStore(qN),[4,l.index("fcmSenderId").get(e)]):[2];case 1:return h=g.sent(),[4,l.clear()];case 2:if(g.sent(),!h)return[2];if(c.oldVersion===2){if(d=h,!d.auth||!d.p256dh||!d.endpoint)return[2];r={token:d.fcmToken,createTime:(v=d.createTime)!==null&&v!==void 0?v:Date.now(),subscriptionOptions:{auth:d.auth,p256dh:d.p256dh,endpoint:d.endpoint,swScope:d.swScope,vapidKey:typeof d.vapidKey=="string"?d.vapidKey:Ji(d.vapidKey)}}}else c.oldVersion===3?(d=h,r={token:d.fcmToken,createTime:d.createTime,subscriptionOptions:{auth:Ji(d.auth),p256dh:Ji(d.p256dh),endpoint:d.endpoint,swScope:d.swScope,vapidKey:Ji(d.vapidKey)}}):c.oldVersion===4&&(d=h,r={token:d.fcmToken,createTime:d.createTime,subscriptionOptions:{auth:Ji(d.auth),p256dh:Ji(d.p256dh),endpoint:d.endpoint,swScope:d.swScope,vapidKey:Ji(d.vapidKey)}});return[2]}})})})];case 3:return i=a.sent(),i.close(),[4,lw(dw)];case 4:return a.sent(),[4,lw("fcm_vapid_details_db")];case 5:return a.sent(),[4,lw("undefined")];case 6:return a.sent(),[2,k9(r)?r:null]}})})}function k9(e){if(!e||!e.subscriptionOptions)return!1;var t=e.subscriptionOptions;return typeof e.createTime=="number"&&e.createTime>0&&typeof e.token=="string"&&e.token.length>0&&typeof t.auth=="string"&&t.auth.length>0&&typeof t.p256dh=="string"&&t.p256dh.length>0&&typeof t.endpoint=="string"&&t.endpoint.length>0&&typeof t.swScope=="string"&&t.swScope.length>0&&typeof t.vapidKey=="string"&&t.vapidKey.length>0}/** * @license * Copyright 2019 Google LLC * @@ -3351,7 +3351,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var O9="firebase-messaging-database",P9=1,Sa="firebase-messaging-store",pw=null;function rI(){return pw||(pw=QT(O9,P9,function(e){switch(e.oldVersion){case 0:e.createObjectStore(Sa)}})),pw}function wv(e){return R(this,void 0,void 0,function(){var t,n,r,i;return A(this,function(s){switch(s.label){case 0:return t=oI(e),[4,rI()];case 1:return n=s.sent(),[4,n.transaction(Sa).objectStore(Sa).get(t)];case 2:return r=s.sent(),r?[2,r]:[3,3];case 3:return[4,N9(e.appConfig.senderId)];case 4:return i=s.sent(),i?[4,iI(e,i)]:[3,6];case 5:return s.sent(),[2,i];case 6:return[2]}})})}function iI(e,t){return R(this,void 0,void 0,function(){var n,r,i;return A(this,function(s){switch(s.label){case 0:return n=oI(e),[4,rI()];case 1:return r=s.sent(),i=r.transaction(Sa,"readwrite"),[4,i.objectStore(Sa).put(t,n)];case 2:return s.sent(),[4,i.complete];case 3:return s.sent(),[2,t]}})})}function D9(e){return R(this,void 0,void 0,function(){var t,n,r;return A(this,function(i){switch(i.label){case 0:return t=oI(e),[4,rI()];case 1:return n=i.sent(),r=n.transaction(Sa,"readwrite"),[4,r.objectStore(Sa).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}})})}function oI(e){var t=e.appConfig;return t.appId}/** + */var R9="firebase-messaging-database",N9=1,Sa="firebase-messaging-store",pw=null;function rI(){return pw||(pw=QT(R9,N9,function(e){switch(e.oldVersion){case 0:e.createObjectStore(Sa)}})),pw}function wv(e){return R(this,void 0,void 0,function(){var t,n,r,i;return A(this,function(s){switch(s.label){case 0:return t=oI(e),[4,rI()];case 1:return n=s.sent(),[4,n.transaction(Sa).objectStore(Sa).get(t)];case 2:return r=s.sent(),r?[2,r]:[3,3];case 3:return[4,A9(e.appConfig.senderId)];case 4:return i=s.sent(),i?[4,iI(e,i)]:[3,6];case 5:return s.sent(),[2,i];case 6:return[2]}})})}function iI(e,t){return R(this,void 0,void 0,function(){var n,r,i;return A(this,function(s){switch(s.label){case 0:return n=oI(e),[4,rI()];case 1:return r=s.sent(),i=r.transaction(Sa,"readwrite"),[4,i.objectStore(Sa).put(t,n)];case 2:return s.sent(),[4,i.complete];case 3:return s.sent(),[2,t]}})})}function x9(e){return R(this,void 0,void 0,function(){var t,n,r;return A(this,function(i){switch(i.label){case 0:return t=oI(e),[4,rI()];case 1:return n=i.sent(),r=n.transaction(Sa,"readwrite"),[4,r.objectStore(Sa).delete(t)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}})})}function oI(e){var t=e.appConfig;return t.appId}/** * @license * Copyright 2019 Google LLC * @@ -3366,7 +3366,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function M9(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c,l;return A(this,function(h){switch(h.label){case 0:return[4,aI(e)];case 1:n=h.sent(),r=e2(t),i={method:"POST",headers:n,body:JSON.stringify(r)},h.label=2;case 2:return h.trys.push([2,5,,6]),[4,fetch(sI(e.appConfig),i)];case 3:return a=h.sent(),[4,a.json()];case 4:return s=h.sent(),[3,6];case 5:throw c=h.sent(),it.create("token-subscribe-failed",{errorInfo:c});case 6:if(s.error)throw l=s.error.message,it.create("token-subscribe-failed",{errorInfo:l});if(!s.token)throw it.create("token-subscribe-no-token");return[2,s.token]}})})}function L9(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c,l;return A(this,function(h){switch(h.label){case 0:return[4,aI(e)];case 1:n=h.sent(),r=e2(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},h.label=2;case 2:return h.trys.push([2,5,,6]),[4,fetch(sI(e.appConfig)+"/"+t.token,i)];case 3:return a=h.sent(),[4,a.json()];case 4:return s=h.sent(),[3,6];case 5:throw c=h.sent(),it.create("token-update-failed",{errorInfo:c});case 6:if(s.error)throw l=s.error.message,it.create("token-update-failed",{errorInfo:l});if(!s.token)throw it.create("token-update-no-token");return[2,s.token]}})})}function ZF(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c;return A(this,function(l){switch(l.label){case 0:return[4,aI(e)];case 1:n=l.sent(),r={method:"DELETE",headers:n},l.label=2;case 2:return l.trys.push([2,5,,6]),[4,fetch(sI(e.appConfig)+"/"+t,r)];case 3:return i=l.sent(),[4,i.json()];case 4:if(s=l.sent(),s.error)throw a=s.error.message,it.create("token-unsubscribe-failed",{errorInfo:a});return[3,6];case 5:throw c=l.sent(),it.create("token-unsubscribe-failed",{errorInfo:c});case 6:return[2]}})})}function sI(e){var t=e.projectId;return b9+"/projects/"+t+"/registrations"}function aI(e){var t=e.appConfig,n=e.installations;return R(this,void 0,void 0,function(){var r;return A(this,function(i){switch(i.label){case 0:return[4,n.getToken()];case 1:return r=i.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":"FIS "+r})]}})})}function e2(e){var t=e.p256dh,n=e.auth,r=e.endpoint,i=e.vapidKey,s={web:{endpoint:r,auth:n,p256dh:t}};return i!==_v&&(s.web.applicationPubKey=i),s}/** + */function O9(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c,l;return A(this,function(h){switch(h.label){case 0:return[4,aI(e)];case 1:n=h.sent(),r=e2(t),i={method:"POST",headers:n,body:JSON.stringify(r)},h.label=2;case 2:return h.trys.push([2,5,,6]),[4,fetch(sI(e.appConfig),i)];case 3:return a=h.sent(),[4,a.json()];case 4:return s=h.sent(),[3,6];case 5:throw c=h.sent(),it.create("token-subscribe-failed",{errorInfo:c});case 6:if(s.error)throw l=s.error.message,it.create("token-subscribe-failed",{errorInfo:l});if(!s.token)throw it.create("token-subscribe-no-token");return[2,s.token]}})})}function P9(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c,l;return A(this,function(h){switch(h.label){case 0:return[4,aI(e)];case 1:n=h.sent(),r=e2(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},h.label=2;case 2:return h.trys.push([2,5,,6]),[4,fetch(sI(e.appConfig)+"/"+t.token,i)];case 3:return a=h.sent(),[4,a.json()];case 4:return s=h.sent(),[3,6];case 5:throw c=h.sent(),it.create("token-update-failed",{errorInfo:c});case 6:if(s.error)throw l=s.error.message,it.create("token-update-failed",{errorInfo:l});if(!s.token)throw it.create("token-update-no-token");return[2,s.token]}})})}function ZF(e,t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c;return A(this,function(l){switch(l.label){case 0:return[4,aI(e)];case 1:n=l.sent(),r={method:"DELETE",headers:n},l.label=2;case 2:return l.trys.push([2,5,,6]),[4,fetch(sI(e.appConfig)+"/"+t,r)];case 3:return i=l.sent(),[4,i.json()];case 4:if(s=l.sent(),s.error)throw a=s.error.message,it.create("token-unsubscribe-failed",{errorInfo:a});return[3,6];case 5:throw c=l.sent(),it.create("token-unsubscribe-failed",{errorInfo:c});case 6:return[2]}})})}function sI(e){var t=e.projectId;return y9+"/projects/"+t+"/registrations"}function aI(e){var t=e.appConfig,n=e.installations;return R(this,void 0,void 0,function(){var r;return A(this,function(i){switch(i.label){case 0:return[4,n.getToken()];case 1:return r=i.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t.apiKey,"x-goog-firebase-installations-auth":"FIS "+r})]}})})}function e2(e){var t=e.p256dh,n=e.auth,r=e.endpoint,i=e.vapidKey,s={web:{endpoint:r,auth:n,p256dh:t}};return i!==_v&&(s.web.applicationPubKey=i),s}/** * @license * Copyright 2019 Google LLC * @@ -3381,7 +3381,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var F9=7*24*60*60*1e3;function Jb(e,t,n){return R(this,void 0,void 0,function(){var r,i,s,a;return A(this,function(c){switch(c.label){case 0:if(Notification.permission!=="granted")throw it.create("permission-blocked");return[4,j9(t,n)];case 1:return r=c.sent(),[4,wv(e)];case 2:return i=c.sent(),s={vapidKey:n,swScope:t.scope,endpoint:r.endpoint,auth:Ji(r.getKey("auth")),p256dh:Ji(r.getKey("p256dh"))},i?[3,3]:[2,$N(e,s)];case 3:if(V9(i.subscriptionOptions,s))return[3,8];c.label=4;case 4:return c.trys.push([4,6,,7]),[4,ZF(e,i.token)];case 5:return c.sent(),[3,7];case 6:return a=c.sent(),console.warn(a),[3,7];case 7:return[2,$N(e,s)];case 8:return Date.now()>=i.createTime+F9?[2,U9({token:i.token,createTime:Date.now(),subscriptionOptions:s},e,t)]:[2,i.token];case 9:return[2]}})})}function af(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return[4,wv(e)];case 1:return n=i.sent(),n?[4,ZF(e,n.token)]:[3,4];case 2:return i.sent(),[4,D9(e)];case 3:i.sent(),i.label=4;case 4:return[4,t.pushManager.getSubscription()];case 5:return r=i.sent(),r?[2,r.unsubscribe()]:[2,!0]}})})}function U9(e,t,n){return R(this,void 0,void 0,function(){var r,i,s;return A(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,L9(t,e)];case 1:return r=a.sent(),i=_e(_e({},e),{token:r,createTime:Date.now()}),[4,iI(t,i)];case 2:return a.sent(),[2,r];case 3:return s=a.sent(),[4,af(t,n)];case 4:throw a.sent(),s;case 5:return[2]}})})}function $N(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return[4,M9(e,t)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:t},[4,iI(e,r)];case 2:return i.sent(),[2,r.token]}})})}function j9(e,t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return[4,e.pushManager.getSubscription()];case 1:return n=r.sent(),n?[2,n]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:k9(t)})]}})})}function V9(e,t){var n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,i=t.auth===e.auth,s=t.p256dh===e.p256dh;return n&&r&&i&&s}/** + */var D9=7*24*60*60*1e3;function Jb(e,t,n){return R(this,void 0,void 0,function(){var r,i,s,a;return A(this,function(c){switch(c.label){case 0:if(Notification.permission!=="granted")throw it.create("permission-blocked");return[4,L9(t,n)];case 1:return r=c.sent(),[4,wv(e)];case 2:return i=c.sent(),s={vapidKey:n,swScope:t.scope,endpoint:r.endpoint,auth:Ji(r.getKey("auth")),p256dh:Ji(r.getKey("p256dh"))},i?[3,3]:[2,$N(e,s)];case 3:if(F9(i.subscriptionOptions,s))return[3,8];c.label=4;case 4:return c.trys.push([4,6,,7]),[4,ZF(e,i.token)];case 5:return c.sent(),[3,7];case 6:return a=c.sent(),console.warn(a),[3,7];case 7:return[2,$N(e,s)];case 8:return Date.now()>=i.createTime+D9?[2,M9({token:i.token,createTime:Date.now(),subscriptionOptions:s},e,t)]:[2,i.token];case 9:return[2]}})})}function af(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return[4,wv(e)];case 1:return n=i.sent(),n?[4,ZF(e,n.token)]:[3,4];case 2:return i.sent(),[4,x9(e)];case 3:i.sent(),i.label=4;case 4:return[4,t.pushManager.getSubscription()];case 5:return r=i.sent(),r?[2,r.unsubscribe()]:[2,!0]}})})}function M9(e,t,n){return R(this,void 0,void 0,function(){var r,i,s;return A(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,5]),[4,P9(t,e)];case 1:return r=a.sent(),i=_e(_e({},e),{token:r,createTime:Date.now()}),[4,iI(t,i)];case 2:return a.sent(),[2,r];case 3:return s=a.sent(),[4,af(t,n)];case 4:throw a.sent(),s;case 5:return[2]}})})}function $N(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return[4,O9(e,t)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:t},[4,iI(e,r)];case 2:return i.sent(),[2,r.token]}})})}function L9(e,t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return[4,e.pushManager.getSubscription()];case 1:return n=r.sent(),n?[2,n]:[2,e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:S9(t)})]}})})}function F9(e,t){var n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,i=t.auth===e.auth,s=t.p256dh===e.p256dh;return n&&r&&i&&s}/** * @license * Copyright 2020 Google LLC * @@ -3396,7 +3396,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function B9(e){var t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcm_message_id};return q9(t,e),$9(t,e),H9(t,e),t}function q9(e,t){if(t.notification){e.notification={};var n=t.notification.title;n&&(e.notification.title=n);var r=t.notification.body;r&&(e.notification.body=r);var i=t.notification.image;i&&(e.notification.image=i)}}function $9(e,t){t.data&&(e.data=t.data)}function H9(e,t){if(t.fcmOptions){e.fcmOptions={};var n=t.fcmOptions.link;n&&(e.fcmOptions.link=n);var r=t.fcmOptions.analytics_label;r&&(e.fcmOptions.analyticsLabel=r)}}/** + */function U9(e){var t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcm_message_id};return j9(t,e),V9(t,e),B9(t,e),t}function j9(e,t){if(t.notification){e.notification={};var n=t.notification.title;n&&(e.notification.title=n);var r=t.notification.body;r&&(e.notification.body=r);var i=t.notification.image;i&&(e.notification.image=i)}}function V9(e,t){t.data&&(e.data=t.data)}function B9(e,t){if(t.fcmOptions){e.fcmOptions={};var n=t.fcmOptions.link;n&&(e.fcmOptions.link=n);var r=t.fcmOptions.analytics_label;r&&(e.fcmOptions.analyticsLabel=r)}}/** * @license * Copyright 2019 Google LLC * @@ -3441,7 +3441,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var K9=function(){function e(t){var n=this;this.firebaseDependencies=t,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",function(r){r.waitUntil(n.onPush(r))}),self.addEventListener("pushsubscriptionchange",function(r){r.waitUntil(n.onSubChange(r))}),self.addEventListener("notificationclick",function(r){r.waitUntil(n.onNotificationClick(r))})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.setBackgroundMessageHandler=function(t){if(this.isOnBackgroundMessageUsed=!1,!t||typeof t!="function")throw it.create("invalid-bg-handler");this.bgMessageHandler=t},e.prototype.onBackgroundMessage=function(t){var n=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=t,function(){n.bgMessageHandler=null}},e.prototype.getToken=function(){var t,n;return R(this,void 0,void 0,function(){var r;return A(this,function(i){switch(i.label){case 0:return this.vapidKey?[3,2]:[4,wv(this.firebaseDependencies)];case 1:r=i.sent(),this.vapidKey=(n=(t=r==null?void 0:r.subscriptionOptions)===null||t===void 0?void 0:t.vapidKey)!==null&&n!==void 0?n:_v,i.label=2;case 2:return[2,Jb(this.firebaseDependencies,self.registration,this.vapidKey)]}})})},e.prototype.deleteToken=function(){return af(this.firebaseDependencies,self.registration)},e.prototype.requestPermission=function(){throw it.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(t){if(this.vapidKey!==null)throw it.create("use-vapid-key-after-get-token");if(typeof t!="string"||t.length===0)throw it.create("invalid-vapid-key");this.vapidKey=t},e.prototype.useServiceWorker=function(){throw it.create("only-available-in-window")},e.prototype.onMessage=function(){throw it.create("only-available-in-window")},e.prototype.onTokenRefresh=function(){throw it.create("only-available-in-window")},e.prototype.onPush=function(t){return R(this,void 0,void 0,function(){var n,r,i,s;return A(this,function(a){switch(a.label){case 0:return n=G9(t),n?[4,n2()]:(console.debug(E9+"failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return r=a.sent(),Q9(r)?[2,Y9(r,n)]:(i=!1,n.notification?[4,X9(W9(n))]:[3,3]);case 2:a.sent(),i=!0,a.label=3;case 3:return i===!0&&this.isOnBackgroundMessageUsed===!1?[2]:(this.bgMessageHandler&&(s=B9(n),typeof this.bgMessageHandler=="function"?this.bgMessageHandler(s):this.bgMessageHandler.next(s)),[4,HN(C9)]);case 4:return a.sent(),[2]}})})},e.prototype.onSubChange=function(t){var n,r;return R(this,void 0,void 0,function(){var i,s;return A(this,function(a){switch(a.label){case 0:return i=t.newSubscription,i?[3,2]:[4,af(this.firebaseDependencies,self.registration)];case 1:return a.sent(),[2];case 2:return[4,wv(this.firebaseDependencies)];case 3:return s=a.sent(),[4,af(this.firebaseDependencies,self.registration)];case 4:return a.sent(),[4,Jb(this.firebaseDependencies,self.registration,(r=(n=s==null?void 0:s.subscriptionOptions)===null||n===void 0?void 0:n.vapidKey)!==null&&r!==void 0?r:_v)];case 5:return a.sent(),[2]}})})},e.prototype.onNotificationClick=function(t){var n,r;return R(this,void 0,void 0,function(){var i,s,a,c,l;return A(this,function(h){switch(h.label){case 0:if(i=(r=(n=t.notification)===null||n===void 0?void 0:n.data)===null||r===void 0?void 0:r[XF],i){if(t.action)return[2]}else return[2];return t.stopImmediatePropagation(),t.notification.close(),s=J9(i),s?(a=new URL(s,self.location.href),c=new URL(self.location.origin),a.host!==c.host?[2]:[4,z9(a)]):[2];case 1:return l=h.sent(),l?[3,4]:[4,self.clients.openWindow(s)];case 2:return l=h.sent(),[4,HN(A9)];case 3:return h.sent(),[3,6];case 4:return[4,l.focus()];case 5:l=h.sent(),h.label=6;case 6:return l?(i.messageType=Ia.NOTIFICATION_CLICKED,i.isFirebaseMessaging=!0,[2,l.postMessage(i)]):[2]}})})},e}();function W9(e){var t,n=_e({},e.notification);return n.data=(t={},t[XF]=e,t),n}function G9(e){var t=e.data;if(!t)return null;try{return t.json()}catch{return null}}function z9(e){return R(this,void 0,void 0,function(){var t,n,r,i,s,a,c;return A(this,function(l){switch(l.label){case 0:return[4,n2()];case 1:t=l.sent();try{for(n=an(t),r=n.next();!r.done;r=n.next())if(i=r.value,s=new URL(i.url,self.location.href),e.host===s.host)return[2,i]}catch(h){a={error:h}}finally{try{r&&!r.done&&(c=n.return)&&c.call(n)}finally{if(a)throw a.error}}return[2,null]}})})}function Q9(e){return e.some(function(t){return t.visibilityState==="visible"&&!t.url.startsWith("chrome-extension://")})}function Y9(e,t){var n,r;t.isFirebaseMessaging=!0,t.messageType=Ia.PUSH_RECEIVED;try{for(var i=an(e),s=i.next();!s.done;s=i.next()){var a=s.value;a.postMessage(t)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function n2(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function X9(e){var t,n=e.actions,r=Notification.maxActions;return n&&r&&n.length>r&&console.warn("This browser only supports "+r+" actions. The remaining actions will not be displayed."),self.registration.showNotification((t=e.title)!==null&&t!==void 0?t:"",e)}function J9(e){var t,n,r,i=(n=(t=e.fcmOptions)===null||t===void 0?void 0:t.link)!==null&&n!==void 0?n:(r=e.notification)===null||r===void 0?void 0:r.click_action;return i||(t2(e.data)?self.location.origin:null)}/** + */var q9=function(){function e(t){var n=this;this.firebaseDependencies=t,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",function(r){r.waitUntil(n.onPush(r))}),self.addEventListener("pushsubscriptionchange",function(r){r.waitUntil(n.onSubChange(r))}),self.addEventListener("notificationclick",function(r){r.waitUntil(n.onNotificationClick(r))})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.setBackgroundMessageHandler=function(t){if(this.isOnBackgroundMessageUsed=!1,!t||typeof t!="function")throw it.create("invalid-bg-handler");this.bgMessageHandler=t},e.prototype.onBackgroundMessage=function(t){var n=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=t,function(){n.bgMessageHandler=null}},e.prototype.getToken=function(){var t,n;return R(this,void 0,void 0,function(){var r;return A(this,function(i){switch(i.label){case 0:return this.vapidKey?[3,2]:[4,wv(this.firebaseDependencies)];case 1:r=i.sent(),this.vapidKey=(n=(t=r==null?void 0:r.subscriptionOptions)===null||t===void 0?void 0:t.vapidKey)!==null&&n!==void 0?n:_v,i.label=2;case 2:return[2,Jb(this.firebaseDependencies,self.registration,this.vapidKey)]}})})},e.prototype.deleteToken=function(){return af(this.firebaseDependencies,self.registration)},e.prototype.requestPermission=function(){throw it.create("only-available-in-window")},e.prototype.usePublicVapidKey=function(t){if(this.vapidKey!==null)throw it.create("use-vapid-key-after-get-token");if(typeof t!="string"||t.length===0)throw it.create("invalid-vapid-key");this.vapidKey=t},e.prototype.useServiceWorker=function(){throw it.create("only-available-in-window")},e.prototype.onMessage=function(){throw it.create("only-available-in-window")},e.prototype.onTokenRefresh=function(){throw it.create("only-available-in-window")},e.prototype.onPush=function(t){return R(this,void 0,void 0,function(){var n,r,i,s;return A(this,function(a){switch(a.label){case 0:return n=H9(t),n?[4,n2()]:(console.debug(_9+"failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return r=a.sent(),W9(r)?[2,G9(r,n)]:(i=!1,n.notification?[4,z9($9(n))]:[3,3]);case 2:a.sent(),i=!0,a.label=3;case 3:return i===!0&&this.isOnBackgroundMessageUsed===!1?[2]:(this.bgMessageHandler&&(s=U9(n),typeof this.bgMessageHandler=="function"?this.bgMessageHandler(s):this.bgMessageHandler.next(s)),[4,HN(T9)]);case 4:return a.sent(),[2]}})})},e.prototype.onSubChange=function(t){var n,r;return R(this,void 0,void 0,function(){var i,s;return A(this,function(a){switch(a.label){case 0:return i=t.newSubscription,i?[3,2]:[4,af(this.firebaseDependencies,self.registration)];case 1:return a.sent(),[2];case 2:return[4,wv(this.firebaseDependencies)];case 3:return s=a.sent(),[4,af(this.firebaseDependencies,self.registration)];case 4:return a.sent(),[4,Jb(this.firebaseDependencies,self.registration,(r=(n=s==null?void 0:s.subscriptionOptions)===null||n===void 0?void 0:n.vapidKey)!==null&&r!==void 0?r:_v)];case 5:return a.sent(),[2]}})})},e.prototype.onNotificationClick=function(t){var n,r;return R(this,void 0,void 0,function(){var i,s,a,c,l;return A(this,function(h){switch(h.label){case 0:if(i=(r=(n=t.notification)===null||n===void 0?void 0:n.data)===null||r===void 0?void 0:r[XF],i){if(t.action)return[2]}else return[2];return t.stopImmediatePropagation(),t.notification.close(),s=Q9(i),s?(a=new URL(s,self.location.href),c=new URL(self.location.origin),a.host!==c.host?[2]:[4,K9(a)]):[2];case 1:return l=h.sent(),l?[3,4]:[4,self.clients.openWindow(s)];case 2:return l=h.sent(),[4,HN(I9)];case 3:return h.sent(),[3,6];case 4:return[4,l.focus()];case 5:l=h.sent(),h.label=6;case 6:return l?(i.messageType=Ia.NOTIFICATION_CLICKED,i.isFirebaseMessaging=!0,[2,l.postMessage(i)]):[2]}})})},e}();function $9(e){var t,n=_e({},e.notification);return n.data=(t={},t[XF]=e,t),n}function H9(e){var t=e.data;if(!t)return null;try{return t.json()}catch{return null}}function K9(e){return R(this,void 0,void 0,function(){var t,n,r,i,s,a,c;return A(this,function(l){switch(l.label){case 0:return[4,n2()];case 1:t=l.sent();try{for(n=sn(t),r=n.next();!r.done;r=n.next())if(i=r.value,s=new URL(i.url,self.location.href),e.host===s.host)return[2,i]}catch(h){a={error:h}}finally{try{r&&!r.done&&(c=n.return)&&c.call(n)}finally{if(a)throw a.error}}return[2,null]}})})}function W9(e){return e.some(function(t){return t.visibilityState==="visible"&&!t.url.startsWith("chrome-extension://")})}function G9(e,t){var n,r;t.isFirebaseMessaging=!0,t.messageType=Ia.PUSH_RECEIVED;try{for(var i=sn(e),s=i.next();!s.done;s=i.next()){var a=s.value;a.postMessage(t)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function n2(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function z9(e){var t,n=e.actions,r=Notification.maxActions;return n&&r&&n.length>r&&console.warn("This browser only supports "+r+" actions. The remaining actions will not be displayed."),self.registration.showNotification((t=e.title)!==null&&t!==void 0?t:"",e)}function Q9(e){var t,n,r,i=(n=(t=e.fcmOptions)===null||t===void 0?void 0:t.link)!==null&&n!==void 0?n:(r=e.notification)===null||r===void 0?void 0:r.click_action;return i||(t2(e.data)?self.location.origin:null)}/** * @license * Copyright 2017 Google LLC * @@ -3456,7 +3456,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Z9=function(){function e(t){var n=this;this.firebaseDependencies=t,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",function(r){return n.messageEventListener(r)})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.messageEventListener=function(t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return n=t.data,n.isFirebaseMessaging?(this.onMessageCallback&&n.messageType===Ia.PUSH_RECEIVED&&(typeof this.onMessageCallback=="function"?this.onMessageCallback(t7(Object.assign({},n))):this.onMessageCallback.next(Object.assign({},n))),r=n.data,t2(r)&&r[T9]==="1"?[4,this.logEvent(n.messageType,r)]:[3,2]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},e.prototype.getVapidKey=function(){return this.vapidKey},e.prototype.getSwReg=function(){return this.swRegistration},e.prototype.getToken=function(t){return R(this,void 0,void 0,function(){return A(this,function(n){switch(n.label){case 0:return Notification.permission!=="default"?[3,2]:[4,Notification.requestPermission()];case 1:n.sent(),n.label=2;case 2:if(Notification.permission!=="granted")throw it.create("permission-blocked");return[4,this.updateVapidKey(t==null?void 0:t.vapidKey)];case 3:return n.sent(),[4,this.updateSwReg(t==null?void 0:t.serviceWorkerRegistration)];case 4:return n.sent(),[2,Jb(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}})})},e.prototype.updateVapidKey=function(t){return R(this,void 0,void 0,function(){return A(this,function(n){return t?this.vapidKey=t:this.vapidKey||(this.vapidKey=_v),[2]})})},e.prototype.updateSwReg=function(t){return R(this,void 0,void 0,function(){return A(this,function(n){switch(n.label){case 0:return!t&&!this.swRegistration?[4,this.registerDefaultSw()]:[3,2];case 1:n.sent(),n.label=2;case 2:if(!t&&this.swRegistration)return[2];if(!(t instanceof ServiceWorkerRegistration))throw it.create("invalid-sw-registration");return this.swRegistration=t,[2]}})})},e.prototype.registerDefaultSw=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=this,[4,navigator.serviceWorker.register(_9,{scope:w9})];case 1:return t.swRegistration=r.sent(),this.swRegistration.update().catch(function(){}),[3,3];case 2:throw n=r.sent(),it.create("failed-service-worker-registration",{browserErrorMessage:n.message});case 3:return[2]}})})},e.prototype.deleteToken=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:t.sent(),t.label=2;case 2:return[2,af(this.firebaseDependencies,this.swRegistration)]}})})},e.prototype.requestPermission=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return Notification.permission==="granted"?[2]:[4,Notification.requestPermission()];case 1:if(t=n.sent(),t==="granted")return[2];throw t==="denied"?it.create("permission-blocked"):it.create("permission-default")}})})},e.prototype.usePublicVapidKey=function(t){if(this.vapidKey!==null)throw it.create("use-vapid-key-after-get-token");if(typeof t!="string"||t.length===0)throw it.create("invalid-vapid-key");this.vapidKey=t},e.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw it.create("invalid-sw-registration");if(this.swRegistration)throw it.create("use-sw-after-get-token");this.swRegistration=t},e.prototype.onMessage=function(t){var n=this;return this.onMessageCallback=t,function(){n.onMessageCallback=null}},e.prototype.setBackgroundMessageHandler=function(){throw it.create("only-available-in-sw")},e.prototype.onBackgroundMessage=function(){throw it.create("only-available-in-sw")},e.prototype.onTokenRefresh=function(){return function(){}},e.prototype.logEvent=function(t,n){return R(this,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return r=e7(t),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return i=s.sent(),i.logEvent(r,{message_id:n[JF],message_name:n[S9],message_time:n[I9],message_device_time:Math.floor(Date.now()/1e3)}),[2]}})})},e}();function e7(e){switch(e){case Ia.NOTIFICATION_CLICKED:return"notification_open";case Ia.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}function t7(e){return delete e.messageType,delete e.isFirebaseMessaging,e}/** + */var Y9=function(){function e(t){var n=this;this.firebaseDependencies=t,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",function(r){return n.messageEventListener(r)})}return Object.defineProperty(e.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),e.prototype.messageEventListener=function(t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return n=t.data,n.isFirebaseMessaging?(this.onMessageCallback&&n.messageType===Ia.PUSH_RECEIVED&&(typeof this.onMessageCallback=="function"?this.onMessageCallback(J9(Object.assign({},n))):this.onMessageCallback.next(Object.assign({},n))),r=n.data,t2(r)&&r[w9]==="1"?[4,this.logEvent(n.messageType,r)]:[3,2]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},e.prototype.getVapidKey=function(){return this.vapidKey},e.prototype.getSwReg=function(){return this.swRegistration},e.prototype.getToken=function(t){return R(this,void 0,void 0,function(){return A(this,function(n){switch(n.label){case 0:return Notification.permission!=="default"?[3,2]:[4,Notification.requestPermission()];case 1:n.sent(),n.label=2;case 2:if(Notification.permission!=="granted")throw it.create("permission-blocked");return[4,this.updateVapidKey(t==null?void 0:t.vapidKey)];case 3:return n.sent(),[4,this.updateSwReg(t==null?void 0:t.serviceWorkerRegistration)];case 4:return n.sent(),[2,Jb(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}})})},e.prototype.updateVapidKey=function(t){return R(this,void 0,void 0,function(){return A(this,function(n){return t?this.vapidKey=t:this.vapidKey||(this.vapidKey=_v),[2]})})},e.prototype.updateSwReg=function(t){return R(this,void 0,void 0,function(){return A(this,function(n){switch(n.label){case 0:return!t&&!this.swRegistration?[4,this.registerDefaultSw()]:[3,2];case 1:n.sent(),n.label=2;case 2:if(!t&&this.swRegistration)return[2];if(!(t instanceof ServiceWorkerRegistration))throw it.create("invalid-sw-registration");return this.swRegistration=t,[2]}})})},e.prototype.registerDefaultSw=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),t=this,[4,navigator.serviceWorker.register(g9,{scope:m9})];case 1:return t.swRegistration=r.sent(),this.swRegistration.update().catch(function(){}),[3,3];case 2:throw n=r.sent(),it.create("failed-service-worker-registration",{browserErrorMessage:n.message});case 3:return[2]}})})},e.prototype.deleteToken=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:t.sent(),t.label=2;case 2:return[2,af(this.firebaseDependencies,this.swRegistration)]}})})},e.prototype.requestPermission=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return Notification.permission==="granted"?[2]:[4,Notification.requestPermission()];case 1:if(t=n.sent(),t==="granted")return[2];throw t==="denied"?it.create("permission-blocked"):it.create("permission-default")}})})},e.prototype.usePublicVapidKey=function(t){if(this.vapidKey!==null)throw it.create("use-vapid-key-after-get-token");if(typeof t!="string"||t.length===0)throw it.create("invalid-vapid-key");this.vapidKey=t},e.prototype.useServiceWorker=function(t){if(!(t instanceof ServiceWorkerRegistration))throw it.create("invalid-sw-registration");if(this.swRegistration)throw it.create("use-sw-after-get-token");this.swRegistration=t},e.prototype.onMessage=function(t){var n=this;return this.onMessageCallback=t,function(){n.onMessageCallback=null}},e.prototype.setBackgroundMessageHandler=function(){throw it.create("only-available-in-sw")},e.prototype.onBackgroundMessage=function(){throw it.create("only-available-in-sw")},e.prototype.onTokenRefresh=function(){return function(){}},e.prototype.logEvent=function(t,n){return R(this,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return r=X9(t),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return i=s.sent(),i.logEvent(r,{message_id:n[JF],message_name:n[E9],message_time:n[b9],message_device_time:Math.floor(Date.now()/1e3)}),[2]}})})},e}();function X9(e){switch(e){case Ia.NOTIFICATION_CLICKED:return"notification_open";case Ia.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}function J9(e){return delete e.messageType,delete e.isFirebaseMessaging,e}/** * @license * Copyright 2019 Google LLC * @@ -3471,7 +3471,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function n7(e){var t,n;if(!e||!e.options)throw vw("App Configuration Object");if(!e.name)throw vw("App Name");var r=["projectId","apiKey","appId","messagingSenderId"],i=e.options;try{for(var s=an(r),a=s.next();!a.done;a=s.next()){var c=a.value;if(!i[c])throw vw(c)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return{appName:e.name,projectId:i.projectId,apiKey:i.apiKey,appId:i.appId,senderId:i.messagingSenderId}}function vw(e){return it.create("missing-app-config-values",{valueName:e})}/** + */function Z9(e){var t,n;if(!e||!e.options)throw vw("App Configuration Object");if(!e.name)throw vw("App Name");var r=["projectId","apiKey","appId","messagingSenderId"],i=e.options;try{for(var s=sn(r),a=s.next();!a.done;a=s.next()){var c=a.value;if(!i[c])throw vw(c)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return{appName:e.name,projectId:i.projectId,apiKey:i.apiKey,appId:i.appId,senderId:i.messagingSenderId}}function vw(e){return it.create("missing-app-config-values",{valueName:e})}/** * @license * Copyright 2017 Google LLC * @@ -3486,7 +3486,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var r7="messaging";function i7(e){var t=e.getProvider("app").getImmediate(),n=n7(t),r=e.getProvider("installations").getImmediate(),i=e.getProvider("analytics-internal"),s={app:t,appConfig:n,installations:r,analyticsProvider:i};if(!r2())throw it.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new K9(s):new Z9(s)}var o7={isSupported:r2};se.INTERNAL.registerComponent(new On(r7,i7,"PUBLIC").setServiceProps(o7));function r2(){return self&&"ServiceWorkerGlobalScope"in self?a7():s7()}function s7(){return"indexedDB"in window&&indexedDB!==null&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}function a7(){return"indexedDB"in self&&indexedDB!==null&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}/** + */var e7="messaging";function t7(e){var t=e.getProvider("app").getImmediate(),n=Z9(t),r=e.getProvider("installations").getImmediate(),i=e.getProvider("analytics-internal"),s={app:t,appConfig:n,installations:r,analyticsProvider:i};if(!r2())throw it.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new q9(s):new Y9(s)}var n7={isSupported:r2};oe.INTERNAL.registerComponent(new xn(e7,t7,"PUBLIC").setServiceProps(n7));function r2(){return self&&"ServiceWorkerGlobalScope"in self?i7():r7()}function r7(){return"indexedDB"in window&&indexedDB!==null&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}function i7(){return"indexedDB"in self&&indexedDB!==null&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}/** * @license * Copyright 2017 Google LLC * @@ -3501,8 +3501,8 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var i2="firebasestorage.googleapis.com",o2="storageBucket",u7=2*60*1e3,c7=10*60*1e3,Bt=function(e){te(t,e);function t(n,r){var i=e.call(this,gw(n),"Firebase Storage: "+r+" ("+gw(n)+")")||this;return i.customData={serverResponse:null},i._baseMessage=i.message,Object.setPrototypeOf(i,t.prototype),i}return t.prototype._codeEquals=function(n){return gw(n)===this.code},Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(n){this.customData.serverResponse=n,this.customData.serverResponse?this.message=this._baseMessage+` -`+this.customData.serverResponse:this.message=this._baseMessage},enumerable:!1,configurable:!0}),t}(Sc);function gw(e){return"storage/"+e}function uI(){var e="An unknown error occurred, please check the error payload for server response.";return new Bt("unknown",e)}function l7(e){return new Bt("object-not-found","Object '"+e+"' does not exist.")}function f7(e){return new Bt("quota-exceeded","Quota for bucket '"+e+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function h7(){var e="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new Bt("unauthenticated",e)}function d7(){return new Bt("unauthorized-app","This app does not have permission to access Firebase Storage on this project.")}function p7(e){return new Bt("unauthorized","User does not have permission to access '"+e+"'.")}function v7(){return new Bt("retry-limit-exceeded","Max retry time for operation exceeded, please try again.")}function s2(){return new Bt("canceled","User canceled the upload/download.")}function g7(e){return new Bt("invalid-url","Invalid URL '"+e+"'.")}function m7(e){return new Bt("invalid-default-bucket","Invalid default bucket '"+e+"'.")}function y7(){return new Bt("no-default-bucket","No default bucket found. Did you set the '"+o2+"' property when initializing the app?")}function a2(){return new Bt("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function _7(){return new Bt("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.")}function w7(){return new Bt("no-download-url","The given file does not have any download URLs.")}function Fu(e){return new Bt("invalid-argument",e)}function u2(){return new Bt("app-deleted","The Firebase app was deleted.")}function c2(e){return new Bt("invalid-root-operation","The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function uf(e,t){return new Bt("invalid-format","String does not match format '"+e+"': "+t)}function Qd(e){throw new Bt("internal-error","Internal error: "+e)}/** + */var i2="firebasestorage.googleapis.com",o2="storageBucket",o7=2*60*1e3,s7=10*60*1e3,Bt=function(e){te(t,e);function t(n,r){var i=e.call(this,gw(n),"Firebase Storage: "+r+" ("+gw(n)+")")||this;return i.customData={serverResponse:null},i._baseMessage=i.message,Object.setPrototypeOf(i,t.prototype),i}return t.prototype._codeEquals=function(n){return gw(n)===this.code},Object.defineProperty(t.prototype,"serverResponse",{get:function(){return this.customData.serverResponse},set:function(n){this.customData.serverResponse=n,this.customData.serverResponse?this.message=this._baseMessage+` +`+this.customData.serverResponse:this.message=this._baseMessage},enumerable:!1,configurable:!0}),t}(Sc);function gw(e){return"storage/"+e}function uI(){var e="An unknown error occurred, please check the error payload for server response.";return new Bt("unknown",e)}function a7(e){return new Bt("object-not-found","Object '"+e+"' does not exist.")}function u7(e){return new Bt("quota-exceeded","Quota for bucket '"+e+"' exceeded, please view quota on https://firebase.google.com/pricing/.")}function c7(){var e="User is not authenticated, please authenticate using Firebase Authentication and try again.";return new Bt("unauthenticated",e)}function l7(){return new Bt("unauthorized-app","This app does not have permission to access Firebase Storage on this project.")}function f7(e){return new Bt("unauthorized","User does not have permission to access '"+e+"'.")}function h7(){return new Bt("retry-limit-exceeded","Max retry time for operation exceeded, please try again.")}function s2(){return new Bt("canceled","User canceled the upload/download.")}function d7(e){return new Bt("invalid-url","Invalid URL '"+e+"'.")}function p7(e){return new Bt("invalid-default-bucket","Invalid default bucket '"+e+"'.")}function v7(){return new Bt("no-default-bucket","No default bucket found. Did you set the '"+o2+"' property when initializing the app?")}function a2(){return new Bt("cannot-slice-blob","Cannot slice blob for upload. Please retry the upload.")}function g7(){return new Bt("server-file-wrong-size","Server recorded incorrect upload file size, please retry the upload.")}function m7(){return new Bt("no-download-url","The given file does not have any download URLs.")}function Fu(e){return new Bt("invalid-argument",e)}function u2(){return new Bt("app-deleted","The Firebase app was deleted.")}function c2(e){return new Bt("invalid-root-operation","The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}function uf(e,t){return new Bt("invalid-format","String does not match format '"+e+"': "+t)}function Yd(e){throw new Bt("internal-error","Internal error: "+e)}/** * @license * Copyright 2021 Google LLC * @@ -3517,7 +3517,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function b7(e){return atob(e)}/** + */function y7(e){return atob(e)}/** * @license * Copyright 2017 Google LLC * @@ -3532,7 +3532,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Fr={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},mw=function(){function e(t,n){this.data=t,this.contentType=n||null}return e}();function l2(e,t){switch(e){case Fr.RAW:return new mw(f2(t));case Fr.BASE64:case Fr.BASE64URL:return new mw(h2(e,t));case Fr.DATA_URL:return new mw(T7(t),I7(t))}throw uI()}function f2(e){for(var t=[],n=0;n>6,128|r&63);else if((r&64512)===55296){var i=n>18,128|r>>12&63,128|r>>6&63,128|r&63)}}else(r&64512)===56320?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(t)}function E7(e){var t;try{t=decodeURIComponent(e)}catch{throw uf(Fr.DATA_URL,"Malformed data URL.")}return f2(t)}function h2(e,t){switch(e){case Fr.BASE64:{var n=t.indexOf("-")!==-1,r=t.indexOf("_")!==-1;if(n||r){var i=n?"-":"_";throw uf(e,"Invalid character '"+i+"' found: is it base64url encoded?")}break}case Fr.BASE64URL:{var s=t.indexOf("+")!==-1,a=t.indexOf("/")!==-1;if(s||a){var i=s?"+":"/";throw uf(e,"Invalid character '"+i+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/");break}}var c;try{c=b7(t)}catch{throw uf(e,"Invalid character found")}for(var l=new Uint8Array(c.length),h=0;h][;base64],");var r=n[1]||null;r!=null&&(this.base64=S7(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=t.substring(t.indexOf(",")+1)}return e}();function T7(e){var t=new d2(e);return t.base64?h2(Fr.BASE64,t.rest):E7(t.rest)}function I7(e){var t=new d2(e);return t.contentType}function S7(e,t){var n=e.length>=t.length;return n?e.substring(e.length-t.length)===t:!1}/** + */var Fr={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"},mw=function(){function e(t,n){this.data=t,this.contentType=n||null}return e}();function l2(e,t){switch(e){case Fr.RAW:return new mw(f2(t));case Fr.BASE64:case Fr.BASE64URL:return new mw(h2(e,t));case Fr.DATA_URL:return new mw(w7(t),b7(t))}throw uI()}function f2(e){for(var t=[],n=0;n>6,128|r&63);else if((r&64512)===55296){var i=n>18,128|r>>12&63,128|r>>6&63,128|r&63)}}else(r&64512)===56320?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|r&63)}return new Uint8Array(t)}function _7(e){var t;try{t=decodeURIComponent(e)}catch{throw uf(Fr.DATA_URL,"Malformed data URL.")}return f2(t)}function h2(e,t){switch(e){case Fr.BASE64:{var n=t.indexOf("-")!==-1,r=t.indexOf("_")!==-1;if(n||r){var i=n?"-":"_";throw uf(e,"Invalid character '"+i+"' found: is it base64url encoded?")}break}case Fr.BASE64URL:{var s=t.indexOf("+")!==-1,a=t.indexOf("/")!==-1;if(s||a){var i=s?"+":"/";throw uf(e,"Invalid character '"+i+"' found: is it base64 encoded?")}t=t.replace(/-/g,"+").replace(/_/g,"/");break}}var c;try{c=y7(t)}catch{throw uf(e,"Invalid character found")}for(var l=new Uint8Array(c.length),h=0;h][;base64],");var r=n[1]||null;r!=null&&(this.base64=E7(r,";base64"),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=t.substring(t.indexOf(",")+1)}return e}();function w7(e){var t=new d2(e);return t.base64?h2(Fr.BASE64,t.rest):_7(t.rest)}function b7(e){var t=new d2(e);return t.contentType}function E7(e,t){var n=e.length>=t.length;return n?e.substring(e.length-t.length)===t:!1}/** * @license * Copyright 2017 Google LLC * @@ -3547,7 +3547,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var C7={STATE_CHANGED:"state_changed"},$n={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function yw(e){switch(e){case"running":case"pausing":case"canceling":return $n.RUNNING;case"paused":return $n.PAUSED;case"success":return $n.SUCCESS;case"canceled":return $n.CANCELED;case"error":return $n.ERROR;default:return $n.ERROR}}/** + */var T7={STATE_CHANGED:"state_changed"},qn={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function yw(e){switch(e){case"running":case"pausing":case"canceling":return qn.RUNNING;case"paused":return qn.PAUSED;case"success":return qn.SUCCESS;case"canceled":return qn.CANCELED;case"error":return qn.ERROR;default:return qn.ERROR}}/** * @license * Copyright 2017 Google LLC * @@ -3577,7 +3577,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var A7=function(){function e(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=ua.NO_ERROR,this.sendPromise_=new Promise(function(n){t.xhr_.addEventListener("abort",function(){t.errorCode_=ua.ABORT,n()}),t.xhr_.addEventListener("error",function(){t.errorCode_=ua.NETWORK_ERROR,n()}),t.xhr_.addEventListener("load",function(){n()})})}return e.prototype.send=function(t,n,r,i){if(this.sent_)throw Qd("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,t,!0),i!==void 0)for(var s in i)i.hasOwnProperty(s)&&this.xhr_.setRequestHeader(s,i[s].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_},e.prototype.getErrorCode=function(){if(!this.sent_)throw Qd("cannot .getErrorCode() before sending");return this.errorCode_},e.prototype.getStatus=function(){if(!this.sent_)throw Qd("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}},e.prototype.getResponseText=function(){if(!this.sent_)throw Qd("cannot .getResponseText() before sending");return this.xhr_.responseText},e.prototype.abort=function(){this.xhr_.abort()},e.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},e.prototype.addUploadProgressListener=function(t){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",t)},e.prototype.removeUploadProgressListener=function(t){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",t)},e}();function k7(){return new A7}/** + */var I7=function(){function e(){var t=this;this.sent_=!1,this.xhr_=new XMLHttpRequest,this.errorCode_=ua.NO_ERROR,this.sendPromise_=new Promise(function(n){t.xhr_.addEventListener("abort",function(){t.errorCode_=ua.ABORT,n()}),t.xhr_.addEventListener("error",function(){t.errorCode_=ua.NETWORK_ERROR,n()}),t.xhr_.addEventListener("load",function(){n()})})}return e.prototype.send=function(t,n,r,i){if(this.sent_)throw Yd("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(n,t,!0),i!==void 0)for(var s in i)i.hasOwnProperty(s)&&this.xhr_.setRequestHeader(s,i[s].toString());return r!==void 0?this.xhr_.send(r):this.xhr_.send(),this.sendPromise_},e.prototype.getErrorCode=function(){if(!this.sent_)throw Yd("cannot .getErrorCode() before sending");return this.errorCode_},e.prototype.getStatus=function(){if(!this.sent_)throw Yd("cannot .getStatus() before sending");try{return this.xhr_.status}catch{return-1}},e.prototype.getResponseText=function(){if(!this.sent_)throw Yd("cannot .getResponseText() before sending");return this.xhr_.responseText},e.prototype.abort=function(){this.xhr_.abort()},e.prototype.getResponseHeader=function(t){return this.xhr_.getResponseHeader(t)},e.prototype.addUploadProgressListener=function(t){this.xhr_.upload!=null&&this.xhr_.upload.addEventListener("progress",t)},e.prototype.removeUploadProgressListener=function(t){this.xhr_.upload!=null&&this.xhr_.upload.removeEventListener("progress",t)},e}();function S7(){return new I7}/** * @license * Copyright 2017 Google LLC * @@ -3592,7 +3592,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var R7=function(){function e(){}return e.prototype.createConnection=function(){return k7()},e}();/** + */var C7=function(){function e(){}return e.prototype.createConnection=function(){return S7()},e}();/** * @license * Copyright 2017 Google LLC * @@ -3607,7 +3607,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Ur=function(){function e(t,n){this.bucket=t,this.path_=n}return Object.defineProperty(e.prototype,"path",{get:function(){return this.path_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return this.path.length===0},enumerable:!1,configurable:!0}),e.prototype.fullServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o/"+t(this.path)},e.prototype.bucketOnlyServerUrl=function(){var t=encodeURIComponent;return"/b/"+t(this.bucket)+"/o"},e.makeFromBucketSpec=function(t,n){var r;try{r=e.makeFromUrl(t,n)}catch{return new e(t,"")}if(r.path==="")return r;throw m7(t)},e.makeFromUrl=function(t,n){var r=null,i="([A-Za-z0-9.\\-_]+)";function s(oe){oe.path.charAt(oe.path.length-1)==="/"&&(oe.path_=oe.path_.slice(0,-1))}var a="(/(.*))?$",c=new RegExp("^gs://"+i+a,"i"),l={bucket:1,path:3};function h(oe){oe.path_=decodeURIComponent(oe.path)}for(var d="v[A-Za-z0-9_]+",v=n.replace(/[.]/g,"\\."),g="(/([^?#]*).*)?$",y=new RegExp("^https?://"+v+"/"+d+"/b/"+i+"/o"+g,"i"),_={bucket:1,path:3},b=n===i2?"(?:storage.googleapis.com|storage.cloud.google.com)":n,T="([^?#]*)",C=new RegExp("^https?://"+b+"/"+i+"/"+T,"i"),x={bucket:1,path:2},O=[{regex:c,indices:l,postModify:s},{regex:y,indices:_,postModify:h},{regex:C,indices:x,postModify:h}],L=0;Ln)throw Fu("Invalid value for '"+e+"'. Expected "+n+" or less.")}/** + */function N7(e){return e!==void 0}function x7(e){return typeof e=="function"}function O7(e){return typeof e=="object"&&!Array.isArray(e)}function $g(e){return typeof e=="string"||e instanceof String}function KN(e){return cI()&&e instanceof Blob}function cI(){return typeof Blob<"u"}function Zb(e,t,n,r){if(rn)throw Fu("Invalid value for '"+e+"'. Expected "+n+" or less.")}/** * @license * Copyright 2017 Google LLC * @@ -3667,7 +3667,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var L7=function(){function e(t,n,r,i,s,a,c,l,h,d,v){var g=this;this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=s.slice(),this.additionalRetryCodes_=a.slice(),this.callback_=c,this.errorCallback_=l,this.progressCallback_=d,this.timeout_=h,this.pool_=v,this.promise_=new Promise(function(y,_){g.resolve_=y,g.reject_=_,g.start_()})}return e.prototype.start_=function(){var t=this;function n(i,s){if(s){i(!1,new Yd(!1,null,!0));return}var a=t.pool_.createConnection();t.pendingConnection_=a;function c(l){var h=l.loaded,d=l.lengthComputable?l.total:-1;t.progressCallback_!==null&&t.progressCallback_(h,d)}t.progressCallback_!==null&&a.addUploadProgressListener(c),a.send(t.url_,t.method_,t.body_,t.headers_).then(function(){t.progressCallback_!==null&&a.removeUploadProgressListener(c),t.pendingConnection_=null;var l=a.getErrorCode()===ua.NO_ERROR,h=a.getStatus();if(!l||t.isRetryStatusCode_(h)){var d=a.getErrorCode()===ua.ABORT;i(!1,new Yd(!1,null,d));return}var v=t.successCodes_.indexOf(h)!==-1;i(!0,new Yd(v,a))})}function r(i,s){var a=t.resolve_,c=t.reject_,l=s.connection;if(s.wasSuccessCode)try{var h=t.callback_(l,l.getResponseText());P7(h)?a(h):a()}catch(v){c(v)}else if(l!==null){var d=uI();d.serverResponse=l.getResponseText(),t.errorCallback_?c(t.errorCallback_(l,d)):c(d)}else if(s.canceled){var d=t.appDelete_?u2():s2();c(d)}else{var d=v7();c(d)}}this.canceled_?r(!1,new Yd(!1,null,!0)):this.backoffId_=x7(n,r,this.timeout_)},e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,this.backoffId_!==null&&O7(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()},e.prototype.isRetryStatusCode_=function(t){var n=t>=500&&t<600,r=[408,429],i=r.indexOf(t)!==-1,s=this.additionalRetryCodes_.indexOf(t)!==-1;return n||i||s},e}(),Yd=function(){function e(t,n,r){this.wasSuccessCode=t,this.connection=n,this.canceled=!!r}return e}();function F7(e,t){t!==null&&t.length>0&&(e.Authorization="Firebase "+t)}function U7(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(t??"AppManager")}function j7(e,t){t&&(e["X-Firebase-GMPID"]=t)}function V7(e,t){t!==null&&(e["X-Firebase-AppCheck"]=t)}function B7(e,t,n,r,i,s){var a=p2(e.urlParams),c=e.url+a,l=Object.assign({},e.headers);return j7(l,t),F7(l,n),U7(l,s),V7(l,r),new L7(c,e.method,l,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i)}/** + */var P7=function(){function e(t,n,r,i,s,a,c,l,h,d,v){var g=this;this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.url_=t,this.method_=n,this.headers_=r,this.body_=i,this.successCodes_=s.slice(),this.additionalRetryCodes_=a.slice(),this.callback_=c,this.errorCallback_=l,this.progressCallback_=d,this.timeout_=h,this.pool_=v,this.promise_=new Promise(function(y,_){g.resolve_=y,g.reject_=_,g.start_()})}return e.prototype.start_=function(){var t=this;function n(i,s){if(s){i(!1,new Xd(!1,null,!0));return}var a=t.pool_.createConnection();t.pendingConnection_=a;function c(l){var h=l.loaded,d=l.lengthComputable?l.total:-1;t.progressCallback_!==null&&t.progressCallback_(h,d)}t.progressCallback_!==null&&a.addUploadProgressListener(c),a.send(t.url_,t.method_,t.body_,t.headers_).then(function(){t.progressCallback_!==null&&a.removeUploadProgressListener(c),t.pendingConnection_=null;var l=a.getErrorCode()===ua.NO_ERROR,h=a.getStatus();if(!l||t.isRetryStatusCode_(h)){var d=a.getErrorCode()===ua.ABORT;i(!1,new Xd(!1,null,d));return}var v=t.successCodes_.indexOf(h)!==-1;i(!0,new Xd(v,a))})}function r(i,s){var a=t.resolve_,c=t.reject_,l=s.connection;if(s.wasSuccessCode)try{var h=t.callback_(l,l.getResponseText());N7(h)?a(h):a()}catch(v){c(v)}else if(l!==null){var d=uI();d.serverResponse=l.getResponseText(),t.errorCallback_?c(t.errorCallback_(l,d)):c(d)}else if(s.canceled){var d=t.appDelete_?u2():s2();c(d)}else{var d=h7();c(d)}}this.canceled_?r(!1,new Xd(!1,null,!0)):this.backoffId_=k7(n,r,this.timeout_)},e.prototype.getPromise=function(){return this.promise_},e.prototype.cancel=function(t){this.canceled_=!0,this.appDelete_=t||!1,this.backoffId_!==null&&R7(this.backoffId_),this.pendingConnection_!==null&&this.pendingConnection_.abort()},e.prototype.isRetryStatusCode_=function(t){var n=t>=500&&t<600,r=[408,429],i=r.indexOf(t)!==-1,s=this.additionalRetryCodes_.indexOf(t)!==-1;return n||i||s},e}(),Xd=function(){function e(t,n,r){this.wasSuccessCode=t,this.connection=n,this.canceled=!!r}return e}();function D7(e,t){t!==null&&t.length>0&&(e.Authorization="Firebase "+t)}function M7(e,t){e["X-Firebase-Storage-Version"]="webjs/"+(t??"AppManager")}function L7(e,t){t&&(e["X-Firebase-GMPID"]=t)}function F7(e,t){t!==null&&(e["X-Firebase-AppCheck"]=t)}function U7(e,t,n,r,i,s){var a=p2(e.urlParams),c=e.url+a,l=Object.assign({},e.headers);return L7(l,t),D7(l,n),M7(l,s),F7(l,r),new P7(c,e.method,l,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i)}/** * @license * Copyright 2017 Google LLC * @@ -3682,7 +3682,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function q7(){return typeof BlobBuilder<"u"?BlobBuilder:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:void 0}function $7(){for(var e=[],t=0;t0}).join("/");return e.length===0?n:e+"/"+n}function v2(e){var t=e.lastIndexOf("/",e.length-2);return t===-1?e:e.slice(t+1)}/** + */function q7(e){if(e.length===0)return null;var t=e.lastIndexOf("/");if(t===-1)return"";var n=e.slice(0,t);return n}function $7(e,t){var n=t.split("/").filter(function(r){return r.length>0}).join("/");return e.length===0?n:e+"/"+n}function v2(e){var t=e.lastIndexOf("/",e.length-2);return t===-1?e:e.slice(t+1)}/** * @license * Copyright 2017 Google LLC * @@ -3742,7 +3742,7 @@ This typically indicates that your device does not have a healthy Internet conne * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function G7(e,t){return t}var jn=function(){function e(t,n,r,i){this.server=t,this.local=n||t,this.writable=!!r,this.xform=i||G7}return e}(),Xd=null;function z7(e){return!$g(e)||e.length<2?e:v2(e)}function Hg(){if(Xd)return Xd;var e=[];e.push(new jn("bucket")),e.push(new jn("generation")),e.push(new jn("metageneration")),e.push(new jn("name","fullPath",!0));function t(s,a){return z7(a)}var n=new jn("name");n.xform=t,e.push(n);function r(s,a){return a!==void 0?Number(a):a}var i=new jn("size");return i.xform=r,e.push(i),e.push(new jn("timeCreated")),e.push(new jn("updated")),e.push(new jn("md5Hash",null,!0)),e.push(new jn("cacheControl",null,!0)),e.push(new jn("contentDisposition",null,!0)),e.push(new jn("contentEncoding",null,!0)),e.push(new jn("contentLanguage",null,!0)),e.push(new jn("contentType",null,!0)),e.push(new jn("metadata","customMetadata",!0)),Xd=e,Xd}function Q7(e,t){function n(){var r=e.bucket,i=e.fullPath,s=new Ur(r,i);return t._makeStorageReference(s)}Object.defineProperty(e,"ref",{get:n})}function Y7(e,t,n){var r={};r.type="file";for(var i=n.length,s=0;s0&&(s.delimiter=n),r&&(s.pageToken=r),i&&(s.maxResults=i);var a=t.bucketOnlyServerUrl(),c=ps(a,e.host),l="GET",h=e.maxOperationRetryTime,d=new wo(c,l,eZ(e,t.bucket),h);return d.urlParams=s,d.errorHandler=Bc(t),d}function rZ(e,t,n){var r=t.fullServerUrl(),i=ps(r,e.host),s="GET",a=e.maxOperationRetryTime,c=new wo(i,s,tZ(e,n),a);return c.errorHandler=Wg(t),c}function iZ(e,t,n,r){var i=t.fullServerUrl(),s=ps(i,e.host),a="PATCH",c=hI(n,r),l={"Content-Type":"application/json; charset=utf-8"},h=e.maxOperationRetryTime,d=new wo(s,a,Kg(e,r),h);return d.headers=l,d.body=c,d.errorHandler=Wg(t),d}function oZ(e,t){var n=t.fullServerUrl(),r=ps(n,e.host),i="DELETE",s=e.maxOperationRetryTime;function a(l,h){}var c=new wo(r,i,a,s);return c.successCodes=[200,204],c.errorHandler=Wg(t),c}function sZ(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}function y2(e,t,n){var r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=sZ(null,t)),r}function aZ(e,t,n,r,i){var s=t.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"};function c(){for(var O="",L=0;L<2;L++)O=O+Math.random().toString().slice(2);return O}var l=c();a["Content-Type"]="multipart/related; boundary="+l;var h=y2(t,r,i),d=hI(h,n),v="--"+l+`\r + */function Pi(e){if(!e)throw uI()}function Kg(e,t){function n(r,i){var s=g2(e,i,t);return Pi(s!==null),s}return n}function X7(e,t){function n(r,i){var s=Y7(e,t,i);return Pi(s!==null),s}return n}function J7(e,t){function n(r,i){var s=g2(e,i,t);return Pi(s!==null),z7(s,i,e.host)}return n}function Bc(e){function t(n,r){var i;return n.getStatus()===401?n.getResponseText().includes("Firebase App Check token is invalid")?i=l7():i=c7():n.getStatus()===402?i=u7(e.bucket):n.getStatus()===403?i=f7(e.path):i=r,i.serverResponse=r.serverResponse,i}return t}function Wg(e){var t=Bc(e);function n(r,i){var s=t(r,i);return r.getStatus()===404&&(s=a7(e.path)),s.serverResponse=i.serverResponse,s}return n}function m2(e,t,n){var r=t.fullServerUrl(),i=ps(r,e.host),s="GET",a=e.maxOperationRetryTime,c=new _o(i,s,Kg(e,n),a);return c.errorHandler=Wg(t),c}function Z7(e,t,n,r,i){var s={};t.isRoot?s.prefix="":s.prefix=t.path+"/",n&&n.length>0&&(s.delimiter=n),r&&(s.pageToken=r),i&&(s.maxResults=i);var a=t.bucketOnlyServerUrl(),c=ps(a,e.host),l="GET",h=e.maxOperationRetryTime,d=new _o(c,l,X7(e,t.bucket),h);return d.urlParams=s,d.errorHandler=Bc(t),d}function eZ(e,t,n){var r=t.fullServerUrl(),i=ps(r,e.host),s="GET",a=e.maxOperationRetryTime,c=new _o(i,s,J7(e,n),a);return c.errorHandler=Wg(t),c}function tZ(e,t,n,r){var i=t.fullServerUrl(),s=ps(i,e.host),a="PATCH",c=hI(n,r),l={"Content-Type":"application/json; charset=utf-8"},h=e.maxOperationRetryTime,d=new _o(s,a,Kg(e,r),h);return d.headers=l,d.body=c,d.errorHandler=Wg(t),d}function nZ(e,t){var n=t.fullServerUrl(),r=ps(n,e.host),i="DELETE",s=e.maxOperationRetryTime;function a(l,h){}var c=new _o(r,i,a,s);return c.successCodes=[200,204],c.errorHandler=Wg(t),c}function rZ(e,t){return e&&e.contentType||t&&t.type()||"application/octet-stream"}function y2(e,t,n){var r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),r.contentType||(r.contentType=rZ(null,t)),r}function iZ(e,t,n,r,i){var s=t.bucketOnlyServerUrl(),a={"X-Goog-Upload-Protocol":"multipart"};function c(){for(var O="",L=0;L<2;L++)O=O+Math.random().toString().slice(2);return O}var l=c();a["Content-Type"]="multipart/related; boundary="+l;var h=y2(t,r,i),d=hI(h,n),v="--"+l+`\r Content-Type: application/json; charset=utf-8\r \r `+d+`\r @@ -3780,7 +3780,7 @@ Content-Type: application/json; charset=utf-8\r Content-Type: `+h.contentType+`\r \r `,g=`\r ---`+l+"--",y=lI.getBlob(v,r,g);if(y===null)throw a2();var _={name:h.fullPath},b=ps(s,e.host),T="POST",C=e.maxUploadRetryTime,x=new wo(b,T,Kg(e,n),C);return x.urlParams=_,x.headers=a,x.body=y.uploadData(),x.errorHandler=Bc(t),x}var bv=function(){function e(t,n,r,i){this.current=t,this.total=n,this.finalized=!!r,this.metadata=i||null}return e}();function dI(e,t){var n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch{Pi(!1)}var r=t||["active"];return Pi(!!n&&r.indexOf(n)!==-1),n}function uZ(e,t,n,r,i){var s=t.bucketOnlyServerUrl(),a=y2(t,r,i),c={name:a.fullPath},l=ps(s,e.host),h="POST",d={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":""+r.size(),"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},v=hI(a,n),g=e.maxUploadRetryTime;function y(b){dI(b);var T;try{T=b.getResponseHeader("X-Goog-Upload-URL")}catch{Pi(!1)}return Pi($g(T)),T}var _=new wo(l,h,y,g);return _.urlParams=c,_.headers=d,_.body=v,_.errorHandler=Bc(t),_}function cZ(e,t,n,r){var i={"X-Goog-Upload-Command":"query"};function s(h){var d=dI(h,["active","final"]),v=null;try{v=h.getResponseHeader("X-Goog-Upload-Size-Received")}catch{Pi(!1)}v||Pi(!1);var g=Number(v);return Pi(!isNaN(g)),new bv(g,r.size(),d==="final")}var a="POST",c=e.maxUploadRetryTime,l=new wo(n,a,s,c);return l.headers=i,l.errorHandler=Bc(t),l}var zN=256*1024;function lZ(e,t,n,r,i,s,a,c){var l=new bv(0,0);if(a?(l.current=a.current,l.total=a.total):(l.current=0,l.total=r.size()),r.size()!==l.total)throw _7();var h=l.total-l.current,d=h;i>0&&(d=Math.min(d,i));var v=l.current,g=v+d,y=d===h?"upload, finalize":"upload",_={"X-Goog-Upload-Command":y,"X-Goog-Upload-Offset":""+l.current},b=r.slice(v,g);if(b===null)throw a2();function T(L,$){var P=dI(L,["active","final"]),re=l.current+d,F=r.size(),oe;return P==="final"?oe=Kg(t,s)(L,$):oe=null,new bv(re,F,P==="final",oe)}var C="POST",x=t.maxUploadRetryTime,O=new wo(n,C,T,x);return O.headers=_,O.body=b.uploadData(),O.progressCallback=c||null,O.errorHandler=Bc(e),O}/** +--`+l+"--",y=lI.getBlob(v,r,g);if(y===null)throw a2();var _={name:h.fullPath},b=ps(s,e.host),T="POST",C=e.maxUploadRetryTime,x=new _o(b,T,Kg(e,n),C);return x.urlParams=_,x.headers=a,x.body=y.uploadData(),x.errorHandler=Bc(t),x}var bv=function(){function e(t,n,r,i){this.current=t,this.total=n,this.finalized=!!r,this.metadata=i||null}return e}();function dI(e,t){var n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch{Pi(!1)}var r=t||["active"];return Pi(!!n&&r.indexOf(n)!==-1),n}function oZ(e,t,n,r,i){var s=t.bucketOnlyServerUrl(),a=y2(t,r,i),c={name:a.fullPath},l=ps(s,e.host),h="POST",d={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":""+r.size(),"X-Goog-Upload-Header-Content-Type":a.contentType,"Content-Type":"application/json; charset=utf-8"},v=hI(a,n),g=e.maxUploadRetryTime;function y(b){dI(b);var T;try{T=b.getResponseHeader("X-Goog-Upload-URL")}catch{Pi(!1)}return Pi($g(T)),T}var _=new _o(l,h,y,g);return _.urlParams=c,_.headers=d,_.body=v,_.errorHandler=Bc(t),_}function sZ(e,t,n,r){var i={"X-Goog-Upload-Command":"query"};function s(h){var d=dI(h,["active","final"]),v=null;try{v=h.getResponseHeader("X-Goog-Upload-Size-Received")}catch{Pi(!1)}v||Pi(!1);var g=Number(v);return Pi(!isNaN(g)),new bv(g,r.size(),d==="final")}var a="POST",c=e.maxUploadRetryTime,l=new _o(n,a,s,c);return l.headers=i,l.errorHandler=Bc(t),l}var zN=256*1024;function aZ(e,t,n,r,i,s,a,c){var l=new bv(0,0);if(a?(l.current=a.current,l.total=a.total):(l.current=0,l.total=r.size()),r.size()!==l.total)throw g7();var h=l.total-l.current,d=h;i>0&&(d=Math.min(d,i));var v=l.current,g=v+d,y=d===h?"upload, finalize":"upload",_={"X-Goog-Upload-Command":y,"X-Goog-Upload-Offset":""+l.current},b=r.slice(v,g);if(b===null)throw a2();function T(L,$){var P=dI(L,["active","final"]),re=l.current+d,F=r.size(),se;return P==="final"?se=Kg(t,s)(L,$):se=null,new bv(re,F,P==="final",se)}var C="POST",x=t.maxUploadRetryTime,O=new _o(n,C,T,x);return O.headers=_,O.body=b.uploadData(),O.progressCallback=c||null,O.errorHandler=Bc(e),O}/** * @license * Copyright 2017 Google LLC * @@ -3795,7 +3795,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var fZ=function(){function e(t,n,r){var i=D7(t)||n!=null||r!=null;if(i)this.next=t,this.error=n,this.complete=r;else{var s=t;this.next=s.next,this.error=s.error,this.complete=s.complete}}return e}();/** + */var uZ=function(){function e(t,n,r){var i=x7(t)||n!=null||r!=null;if(i)this.next=t,this.error=n,this.complete=r;else{var s=t;this.next=s.next,this.error=s.error,this.complete=s.complete}}return e}();/** * @license * Copyright 2017 Google LLC * @@ -3825,7 +3825,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var _2=function(){function e(t,n,r){var i=this;r===void 0&&(r=null),this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=t,this._blob=n,this._metadata=r,this._mappings=Hg(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=function(s){i._request=void 0,i._chunkMultiplier=1,s._codeEquals("canceled")?(i._needToFetchStatus=!0,i.completeTransitions_()):(i._error=s,i._transition("error"))},this._metadataErrorHandler=function(s){i._request=void 0,s._codeEquals("canceled")?i.completeTransitions_():(i._error=s,i._transition("error"))},this._promise=new Promise(function(s,a){i._resolve=s,i._reject=a,i._start()}),this._promise.then(null,function(){})}return e.prototype._makeProgressCallback=function(){var t=this,n=this._transferred;return function(r){return t._updateProgress(n+r)}},e.prototype._shouldDoResumable=function(t){return t.size()>256*1024},e.prototype._start=function(){this._state==="running"&&this._request===void 0&&(this._resumable?this._uploadUrl===void 0?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this._continueUpload():this._oneShotUpload())},e.prototype._resolveToken=function(t){var n=this;Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(function(r){var i=r[0],s=r[1];switch(n._state){case"running":t(i,s);break;case"canceling":n._transition("canceled");break;case"pausing":n._transition("paused");break}})},e.prototype._createResumable=function(){var t=this;this._resolveToken(function(n,r){var i=uZ(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),s=t._ref.storage._makeRequest(i,n,r);t._request=s,s.getPromise().then(function(a){t._request=void 0,t._uploadUrl=a,t._needToFetchStatus=!1,t.completeTransitions_()},t._errorHandler)})},e.prototype._fetchStatus=function(){var t=this,n=this._uploadUrl;this._resolveToken(function(r,i){var s=cZ(t._ref.storage,t._ref._location,n,t._blob),a=t._ref.storage._makeRequest(s,r,i);t._request=a,a.getPromise().then(function(c){c=c,t._request=void 0,t._updateProgress(c.current),t._needToFetchStatus=!1,c.finalized&&(t._needToFetchMetadata=!0),t.completeTransitions_()},t._errorHandler)})},e.prototype._continueUpload=function(){var t=this,n=zN*this._chunkMultiplier,r=new bv(this._transferred,this._blob.size()),i=this._uploadUrl;this._resolveToken(function(s,a){var c;try{c=lZ(t._ref._location,t._ref.storage,i,t._blob,n,t._mappings,r,t._makeProgressCallback())}catch(h){t._error=h,t._transition("error");return}var l=t._ref.storage._makeRequest(c,s,a);t._request=l,l.getPromise().then(function(h){t._increaseMultiplier(),t._request=void 0,t._updateProgress(h.current),h.finalized?(t._metadata=h.metadata,t._transition("success")):t.completeTransitions_()},t._errorHandler)})},e.prototype._increaseMultiplier=function(){var t=zN*this._chunkMultiplier;t<32*1024*1024&&(this._chunkMultiplier*=2)},e.prototype._fetchMetadata=function(){var t=this;this._resolveToken(function(n,r){var i=m2(t._ref.storage,t._ref._location,t._mappings),s=t._ref.storage._makeRequest(i,n,r);t._request=s,s.getPromise().then(function(a){t._request=void 0,t._metadata=a,t._transition("success")},t._metadataErrorHandler)})},e.prototype._oneShotUpload=function(){var t=this;this._resolveToken(function(n,r){var i=aZ(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),s=t._ref.storage._makeRequest(i,n,r);t._request=s,s.getPromise().then(function(a){t._request=void 0,t._metadata=a,t._updateProgress(t._blob.size()),t._transition("success")},t._errorHandler)})},e.prototype._updateProgress=function(t){var n=this._transferred;this._transferred=t,this._transferred!==n&&this._notifyObservers()},e.prototype._transition=function(t){if(this._state!==t)switch(t){case"canceling":this._state=t,this._request!==void 0&&this._request.cancel();break;case"pausing":this._state=t,this._request!==void 0&&this._request.cancel();break;case"running":var n=this._state==="paused";this._state=t,n&&(this._notifyObservers(),this._start());break;case"paused":this._state=t,this._notifyObservers();break;case"canceled":this._error=s2(),this._state=t,this._notifyObservers();break;case"error":this._state=t,this._notifyObservers();break;case"success":this._state=t,this._notifyObservers();break}},e.prototype.completeTransitions_=function(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start();break}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var t=yw(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:t,metadata:this._metadata,task:this,ref:this._ref}},enumerable:!1,configurable:!0}),e.prototype.on=function(t,n,r,i){var s=this,a=new fZ(n,r,i);return this._addObserver(a),function(){s._removeObserver(a)}},e.prototype.then=function(t,n){return this._promise.then(t,n)},e.prototype.catch=function(t){return this.then(null,t)},e.prototype._addObserver=function(t){this._observers.push(t),this._notifyObserver(t)},e.prototype._removeObserver=function(t){var n=this._observers.indexOf(t);n!==-1&&this._observers.splice(n,1)},e.prototype._notifyObservers=function(){var t=this;this._finishPromise();var n=this._observers.slice();n.forEach(function(r){t._notifyObserver(r)})},e.prototype._finishPromise=function(){if(this._resolve!==void 0){var t=!0;switch(yw(this._state)){case $n.SUCCESS:yu(this._resolve.bind(null,this.snapshot))();break;case $n.CANCELED:case $n.ERROR:var n=this._reject;yu(n.bind(null,this._error))();break;default:t=!1;break}t&&(this._resolve=void 0,this._reject=void 0)}},e.prototype._notifyObserver=function(t){var n=yw(this._state);switch(n){case $n.RUNNING:case $n.PAUSED:t.next&&yu(t.next.bind(t,this.snapshot))();break;case $n.SUCCESS:t.complete&&yu(t.complete.bind(t))();break;case $n.CANCELED:case $n.ERROR:t.error&&yu(t.error.bind(t,this._error))();break;default:t.error&&yu(t.error.bind(t,this._error))()}},e.prototype.resume=function(){var t=this._state==="paused"||this._state==="pausing";return t&&this._transition("running"),t},e.prototype.pause=function(){var t=this._state==="running";return t&&this._transition("pausing"),t},e.prototype.cancel=function(){var t=this._state==="running"||this._state==="pausing";return t&&this._transition("canceling"),t},e}();/** + */var _2=function(){function e(t,n,r){var i=this;r===void 0&&(r=null),this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=t,this._blob=n,this._metadata=r,this._mappings=Hg(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=function(s){i._request=void 0,i._chunkMultiplier=1,s._codeEquals("canceled")?(i._needToFetchStatus=!0,i.completeTransitions_()):(i._error=s,i._transition("error"))},this._metadataErrorHandler=function(s){i._request=void 0,s._codeEquals("canceled")?i.completeTransitions_():(i._error=s,i._transition("error"))},this._promise=new Promise(function(s,a){i._resolve=s,i._reject=a,i._start()}),this._promise.then(null,function(){})}return e.prototype._makeProgressCallback=function(){var t=this,n=this._transferred;return function(r){return t._updateProgress(n+r)}},e.prototype._shouldDoResumable=function(t){return t.size()>256*1024},e.prototype._start=function(){this._state==="running"&&this._request===void 0&&(this._resumable?this._uploadUrl===void 0?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this._continueUpload():this._oneShotUpload())},e.prototype._resolveToken=function(t){var n=this;Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(function(r){var i=r[0],s=r[1];switch(n._state){case"running":t(i,s);break;case"canceling":n._transition("canceled");break;case"pausing":n._transition("paused");break}})},e.prototype._createResumable=function(){var t=this;this._resolveToken(function(n,r){var i=oZ(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),s=t._ref.storage._makeRequest(i,n,r);t._request=s,s.getPromise().then(function(a){t._request=void 0,t._uploadUrl=a,t._needToFetchStatus=!1,t.completeTransitions_()},t._errorHandler)})},e.prototype._fetchStatus=function(){var t=this,n=this._uploadUrl;this._resolveToken(function(r,i){var s=sZ(t._ref.storage,t._ref._location,n,t._blob),a=t._ref.storage._makeRequest(s,r,i);t._request=a,a.getPromise().then(function(c){c=c,t._request=void 0,t._updateProgress(c.current),t._needToFetchStatus=!1,c.finalized&&(t._needToFetchMetadata=!0),t.completeTransitions_()},t._errorHandler)})},e.prototype._continueUpload=function(){var t=this,n=zN*this._chunkMultiplier,r=new bv(this._transferred,this._blob.size()),i=this._uploadUrl;this._resolveToken(function(s,a){var c;try{c=aZ(t._ref._location,t._ref.storage,i,t._blob,n,t._mappings,r,t._makeProgressCallback())}catch(h){t._error=h,t._transition("error");return}var l=t._ref.storage._makeRequest(c,s,a);t._request=l,l.getPromise().then(function(h){t._increaseMultiplier(),t._request=void 0,t._updateProgress(h.current),h.finalized?(t._metadata=h.metadata,t._transition("success")):t.completeTransitions_()},t._errorHandler)})},e.prototype._increaseMultiplier=function(){var t=zN*this._chunkMultiplier;t<32*1024*1024&&(this._chunkMultiplier*=2)},e.prototype._fetchMetadata=function(){var t=this;this._resolveToken(function(n,r){var i=m2(t._ref.storage,t._ref._location,t._mappings),s=t._ref.storage._makeRequest(i,n,r);t._request=s,s.getPromise().then(function(a){t._request=void 0,t._metadata=a,t._transition("success")},t._metadataErrorHandler)})},e.prototype._oneShotUpload=function(){var t=this;this._resolveToken(function(n,r){var i=iZ(t._ref.storage,t._ref._location,t._mappings,t._blob,t._metadata),s=t._ref.storage._makeRequest(i,n,r);t._request=s,s.getPromise().then(function(a){t._request=void 0,t._metadata=a,t._updateProgress(t._blob.size()),t._transition("success")},t._errorHandler)})},e.prototype._updateProgress=function(t){var n=this._transferred;this._transferred=t,this._transferred!==n&&this._notifyObservers()},e.prototype._transition=function(t){if(this._state!==t)switch(t){case"canceling":this._state=t,this._request!==void 0&&this._request.cancel();break;case"pausing":this._state=t,this._request!==void 0&&this._request.cancel();break;case"running":var n=this._state==="paused";this._state=t,n&&(this._notifyObservers(),this._start());break;case"paused":this._state=t,this._notifyObservers();break;case"canceled":this._error=s2(),this._state=t,this._notifyObservers();break;case"error":this._state=t,this._notifyObservers();break;case"success":this._state=t,this._notifyObservers();break}},e.prototype.completeTransitions_=function(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start();break}},Object.defineProperty(e.prototype,"snapshot",{get:function(){var t=yw(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:t,metadata:this._metadata,task:this,ref:this._ref}},enumerable:!1,configurable:!0}),e.prototype.on=function(t,n,r,i){var s=this,a=new uZ(n,r,i);return this._addObserver(a),function(){s._removeObserver(a)}},e.prototype.then=function(t,n){return this._promise.then(t,n)},e.prototype.catch=function(t){return this.then(null,t)},e.prototype._addObserver=function(t){this._observers.push(t),this._notifyObserver(t)},e.prototype._removeObserver=function(t){var n=this._observers.indexOf(t);n!==-1&&this._observers.splice(n,1)},e.prototype._notifyObservers=function(){var t=this;this._finishPromise();var n=this._observers.slice();n.forEach(function(r){t._notifyObserver(r)})},e.prototype._finishPromise=function(){if(this._resolve!==void 0){var t=!0;switch(yw(this._state)){case qn.SUCCESS:yu(this._resolve.bind(null,this.snapshot))();break;case qn.CANCELED:case qn.ERROR:var n=this._reject;yu(n.bind(null,this._error))();break;default:t=!1;break}t&&(this._resolve=void 0,this._reject=void 0)}},e.prototype._notifyObserver=function(t){var n=yw(this._state);switch(n){case qn.RUNNING:case qn.PAUSED:t.next&&yu(t.next.bind(t,this.snapshot))();break;case qn.SUCCESS:t.complete&&yu(t.complete.bind(t))();break;case qn.CANCELED:case qn.ERROR:t.error&&yu(t.error.bind(t,this._error))();break;default:t.error&&yu(t.error.bind(t,this._error))()}},e.prototype.resume=function(){var t=this._state==="paused"||this._state==="pausing";return t&&this._transition("running"),t},e.prototype.pause=function(){var t=this._state==="running";return t&&this._transition("pausing"),t},e.prototype.cancel=function(){var t=this._state==="running"||this._state==="pausing";return t&&this._transition("canceling"),t},e}();/** * @license * Copyright 2019 Google LLC * @@ -3840,7 +3840,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Gg=function(){function e(t,n){this._service=t,n instanceof Ur?this._location=n:this._location=Ur.makeFromUrl(n,t.host)}return e.prototype.toString=function(){return"gs://"+this._location.bucket+"/"+this._location.path},e.prototype._newRef=function(t,n){return new e(t,n)},Object.defineProperty(e.prototype,"root",{get:function(){var t=new Ur(this._location.bucket,"");return this._newRef(this._service,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this._location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this._location.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return v2(this._location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storage",{get:function(){return this._service},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=K7(this._location.path);if(t===null)return null;var n=new Ur(this._location.bucket,t);return new e(this._service,n)},enumerable:!1,configurable:!0}),e.prototype._throwIfRoot=function(t){if(this._location.path==="")throw c2(t)},e}();function hZ(e,t,n){return e._throwIfRoot("uploadBytesResumable"),new _2(e,new lI(t),n)}function dZ(e){var t={prefixes:[],items:[]};return w2(e,t).then(function(){return t})}function w2(e,t,n){return R(this,void 0,void 0,function(){var r,i,s,a;return A(this,function(c){switch(c.label){case 0:return r={pageToken:n},[4,b2(e,r)];case 1:return i=c.sent(),(s=t.prefixes).push.apply(s,i.prefixes),(a=t.items).push.apply(a,i.items),i.nextPageToken==null?[3,3]:[4,w2(e,t,i.nextPageToken)];case 2:c.sent(),c.label=3;case 3:return[2]}})})}function b2(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return t!=null&&typeof t.maxResults=="number"&&Zb("options.maxResults",1,1e3,t.maxResults),n=t||{},r=nZ(e.storage,e._location,"/",n.pageToken,n.maxResults),[4,e.storage.makeRequestWithTokens(r)];case 1:return[2,i.sent().getPromise()]}})})}function pZ(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return e._throwIfRoot("getMetadata"),t=m2(e.storage,e._location,Hg()),[4,e.storage.makeRequestWithTokens(t)];case 1:return[2,n.sent().getPromise()]}})})}function vZ(e,t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return e._throwIfRoot("updateMetadata"),n=iZ(e.storage,e._location,t,Hg()),[4,e.storage.makeRequestWithTokens(n)];case 1:return[2,r.sent().getPromise()]}})})}function gZ(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return e._throwIfRoot("getDownloadURL"),t=rZ(e.storage,e._location,Hg()),[4,e.storage.makeRequestWithTokens(t)];case 1:return[2,n.sent().getPromise().then(function(r){if(r===null)throw w7();return r})]}})})}function mZ(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return e._throwIfRoot("deleteObject"),t=oZ(e.storage,e._location),[4,e.storage.makeRequestWithTokens(t)];case 1:return[2,n.sent().getPromise()]}})})}function E2(e,t){var n=W7(e._location.path,t),r=new Ur(e._location.bucket,n);return new Gg(e.storage,r)}/** + */var Gg=function(){function e(t,n){this._service=t,n instanceof Ur?this._location=n:this._location=Ur.makeFromUrl(n,t.host)}return e.prototype.toString=function(){return"gs://"+this._location.bucket+"/"+this._location.path},e.prototype._newRef=function(t,n){return new e(t,n)},Object.defineProperty(e.prototype,"root",{get:function(){var t=new Ur(this._location.bucket,"");return this._newRef(this._service,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this._location.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this._location.path},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return v2(this._location.path)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storage",{get:function(){return this._service},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=q7(this._location.path);if(t===null)return null;var n=new Ur(this._location.bucket,t);return new e(this._service,n)},enumerable:!1,configurable:!0}),e.prototype._throwIfRoot=function(t){if(this._location.path==="")throw c2(t)},e}();function cZ(e,t,n){return e._throwIfRoot("uploadBytesResumable"),new _2(e,new lI(t),n)}function lZ(e){var t={prefixes:[],items:[]};return w2(e,t).then(function(){return t})}function w2(e,t,n){return R(this,void 0,void 0,function(){var r,i,s,a;return A(this,function(c){switch(c.label){case 0:return r={pageToken:n},[4,b2(e,r)];case 1:return i=c.sent(),(s=t.prefixes).push.apply(s,i.prefixes),(a=t.items).push.apply(a,i.items),i.nextPageToken==null?[3,3]:[4,w2(e,t,i.nextPageToken)];case 2:c.sent(),c.label=3;case 3:return[2]}})})}function b2(e,t){return R(this,void 0,void 0,function(){var n,r;return A(this,function(i){switch(i.label){case 0:return t!=null&&typeof t.maxResults=="number"&&Zb("options.maxResults",1,1e3,t.maxResults),n=t||{},r=Z7(e.storage,e._location,"/",n.pageToken,n.maxResults),[4,e.storage.makeRequestWithTokens(r)];case 1:return[2,i.sent().getPromise()]}})})}function fZ(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return e._throwIfRoot("getMetadata"),t=m2(e.storage,e._location,Hg()),[4,e.storage.makeRequestWithTokens(t)];case 1:return[2,n.sent().getPromise()]}})})}function hZ(e,t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return e._throwIfRoot("updateMetadata"),n=tZ(e.storage,e._location,t,Hg()),[4,e.storage.makeRequestWithTokens(n)];case 1:return[2,r.sent().getPromise()]}})})}function dZ(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return e._throwIfRoot("getDownloadURL"),t=eZ(e.storage,e._location,Hg()),[4,e.storage.makeRequestWithTokens(t)];case 1:return[2,n.sent().getPromise().then(function(r){if(r===null)throw m7();return r})]}})})}function pZ(e){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:return e._throwIfRoot("deleteObject"),t=nZ(e.storage,e._location),[4,e.storage.makeRequestWithTokens(t)];case 1:return[2,n.sent().getPromise()]}})})}function E2(e,t){var n=$7(e._location.path,t),r=new Ur(e._location.bucket,n);return new Gg(e.storage,r)}/** * @license * Copyright 2017 Google LLC * @@ -3855,7 +3855,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function e0(e){return/^[A-Za-z]+:\/\//.test(e)}function yZ(e,t){return new Gg(e,t)}function T2(e,t){if(e instanceof zg){var n=e;if(n._bucket==null)throw y7();var r=new Gg(n,n._bucket);return t!=null?T2(r,t):r}else return t!==void 0?E2(e,t):e}function _Z(e,t){if(t&&e0(t)){if(e instanceof zg)return yZ(e,t);throw Fu("To use ref(service, url), the first argument must be a Storage instance.")}else return T2(e,t)}function QN(e,t){var n=t==null?void 0:t[o2];return n==null?null:Ur.makeFromBucketSpec(n,e)}function wZ(e,t,n,r){r===void 0&&(r={}),e.host="http://"+t+":"+n;var i=r.mockUserToken;i&&(e._overrideAuthToken=typeof i=="string"?i:W0(i,e.app.options.projectId))}var zg=function(){function e(t,n,r,i,s,a){this.app=t,this._authProvider=n,this._appCheckProvider=r,this._pool=i,this._url=s,this._firebaseVersion=a,this._bucket=null,this._host=i2,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=u7,this._maxUploadRetryTime=c7,this._requests=new Set,s!=null?this._bucket=Ur.makeFromBucketSpec(s,this._host):this._bucket=QN(this._host,this.app.options)}return Object.defineProperty(e.prototype,"host",{get:function(){return this._host},set:function(t){this._host=t,this._url!=null?this._bucket=Ur.makeFromBucketSpec(this._url,t):this._bucket=QN(t,this.app.options)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this._maxUploadRetryTime},set:function(t){Zb("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this._maxOperationRetryTime},set:function(t){Zb("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t},enumerable:!1,configurable:!0}),e.prototype._getAuthToken=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return this._overrideAuthToken?[2,this._overrideAuthToken]:(t=this._authProvider.getImmediate({optional:!0}),t?[4,t.getToken()]:[3,2]);case 1:if(n=r.sent(),n!==null)return[2,n.accessToken];r.label=2;case 2:return[2,null]}})})},e.prototype._getAppCheckToken=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return t=this._appCheckProvider.getImmediate({optional:!0}),t?[4,t.getToken()]:[3,2];case 1:return n=r.sent(),[2,n.token];case 2:return[2,null]}})})},e.prototype._delete=function(){return this._deleted||(this._deleted=!0,this._requests.forEach(function(t){return t.cancel()}),this._requests.clear()),Promise.resolve()},e.prototype._makeStorageReference=function(t){return new Gg(this,t)},e.prototype._makeRequest=function(t,n,r){var i=this;if(this._deleted)return new N7(u2());var s=B7(t,this._appId,n,r,this._pool,this._firebaseVersion);return this._requests.add(s),s.getPromise().then(function(){return i._requests.delete(s)},function(){return i._requests.delete(s)}),s},e.prototype.makeRequestWithTokens=function(t){return R(this,void 0,void 0,function(){var n,r,i;return A(this,function(s){switch(s.label){case 0:return[4,Promise.all([this._getAuthToken(),this._getAppCheckToken()])];case 1:return n=s.sent(),r=n[0],i=n[1],[2,this._makeRequest(t,r,i)]}})})},e}();/** + */function e0(e){return/^[A-Za-z]+:\/\//.test(e)}function vZ(e,t){return new Gg(e,t)}function T2(e,t){if(e instanceof zg){var n=e;if(n._bucket==null)throw v7();var r=new Gg(n,n._bucket);return t!=null?T2(r,t):r}else return t!==void 0?E2(e,t):e}function gZ(e,t){if(t&&e0(t)){if(e instanceof zg)return vZ(e,t);throw Fu("To use ref(service, url), the first argument must be a Storage instance.")}else return T2(e,t)}function QN(e,t){var n=t==null?void 0:t[o2];return n==null?null:Ur.makeFromBucketSpec(n,e)}function mZ(e,t,n,r){r===void 0&&(r={}),e.host="http://"+t+":"+n;var i=r.mockUserToken;i&&(e._overrideAuthToken=typeof i=="string"?i:W0(i,e.app.options.projectId))}var zg=function(){function e(t,n,r,i,s,a){this.app=t,this._authProvider=n,this._appCheckProvider=r,this._pool=i,this._url=s,this._firebaseVersion=a,this._bucket=null,this._host=i2,this._appId=null,this._deleted=!1,this._maxOperationRetryTime=o7,this._maxUploadRetryTime=s7,this._requests=new Set,s!=null?this._bucket=Ur.makeFromBucketSpec(s,this._host):this._bucket=QN(this._host,this.app.options)}return Object.defineProperty(e.prototype,"host",{get:function(){return this._host},set:function(t){this._host=t,this._url!=null?this._bucket=Ur.makeFromBucketSpec(this._url,t):this._bucket=QN(t,this.app.options)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this._maxUploadRetryTime},set:function(t){Zb("time",0,Number.POSITIVE_INFINITY,t),this._maxUploadRetryTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this._maxOperationRetryTime},set:function(t){Zb("time",0,Number.POSITIVE_INFINITY,t),this._maxOperationRetryTime=t},enumerable:!1,configurable:!0}),e.prototype._getAuthToken=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return this._overrideAuthToken?[2,this._overrideAuthToken]:(t=this._authProvider.getImmediate({optional:!0}),t?[4,t.getToken()]:[3,2]);case 1:if(n=r.sent(),n!==null)return[2,n.accessToken];r.label=2;case 2:return[2,null]}})})},e.prototype._getAppCheckToken=function(){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return t=this._appCheckProvider.getImmediate({optional:!0}),t?[4,t.getToken()]:[3,2];case 1:return n=r.sent(),[2,n.token];case 2:return[2,null]}})})},e.prototype._delete=function(){return this._deleted||(this._deleted=!0,this._requests.forEach(function(t){return t.cancel()}),this._requests.clear()),Promise.resolve()},e.prototype._makeStorageReference=function(t){return new Gg(this,t)},e.prototype._makeRequest=function(t,n,r){var i=this;if(this._deleted)return new A7(u2());var s=U7(t,this._appId,n,r,this._pool,this._firebaseVersion);return this._requests.add(s),s.getPromise().then(function(){return i._requests.delete(s)},function(){return i._requests.delete(s)}),s},e.prototype.makeRequestWithTokens=function(t){return R(this,void 0,void 0,function(){var n,r,i;return A(this,function(s){switch(s.label){case 0:return[4,Promise.all([this._getAuthToken(),this._getAppCheckToken()])];case 1:return n=s.sent(),r=n[0],i=n[1],[2,this._makeRequest(t,r,i)]}})})},e}();/** * @license * Copyright 2020 Google LLC * @@ -3870,7 +3870,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function bZ(e,t,n){return e=Ne(e),hZ(e,t,n)}function EZ(e){return e=Ne(e),pZ(e)}function TZ(e,t){return e=Ne(e),vZ(e,t)}function IZ(e,t){return e=Ne(e),b2(e,t)}function SZ(e){return e=Ne(e),dZ(e)}function CZ(e){return e=Ne(e),gZ(e)}function AZ(e){return e=Ne(e),mZ(e)}function YN(e,t){return e=Ne(e),_Z(e,t)}function kZ(e,t){return E2(e,t)}function RZ(e,t,n,r){r===void 0&&(r={}),wZ(e,t,n,r)}/** + */function yZ(e,t,n){return e=Ne(e),cZ(e,t,n)}function _Z(e){return e=Ne(e),fZ(e)}function wZ(e,t){return e=Ne(e),hZ(e,t)}function bZ(e,t){return e=Ne(e),b2(e,t)}function EZ(e){return e=Ne(e),lZ(e)}function TZ(e){return e=Ne(e),dZ(e)}function IZ(e){return e=Ne(e),pZ(e)}function YN(e,t){return e=Ne(e),gZ(e,t)}function SZ(e,t){return E2(e,t)}function CZ(e,t,n,r){r===void 0&&(r={}),mZ(e,t,n,r)}/** * @license * Copyright 2020 Google LLC * @@ -3885,7 +3885,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Jd=function(){function e(t,n,r){this._delegate=t,this.task=n,this.ref=r}return Object.defineProperty(e.prototype,"bytesTransferred",{get:function(){return this._delegate.bytesTransferred},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._delegate.state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalBytes",{get:function(){return this._delegate.totalBytes},enumerable:!1,configurable:!0}),e}();/** + */var Zd=function(){function e(t,n,r){this._delegate=t,this.task=n,this.ref=r}return Object.defineProperty(e.prototype,"bytesTransferred",{get:function(){return this._delegate.bytesTransferred},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"metadata",{get:function(){return this._delegate.metadata},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._delegate.state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"totalBytes",{get:function(){return this._delegate.totalBytes},enumerable:!1,configurable:!0}),e}();/** * @license * Copyright 2020 Google LLC * @@ -3900,7 +3900,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var XN=function(){function e(t,n){this._delegate=t,this._ref=n,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate)}return Object.defineProperty(e.prototype,"snapshot",{get:function(){return new Jd(this._delegate.snapshot,this,this._ref)},enumerable:!1,configurable:!0}),e.prototype.then=function(t,n){var r=this;return this._delegate.then(function(i){if(t)return t(new Jd(i,r,r._ref))},n)},e.prototype.on=function(t,n,r,i){var s=this,a=void 0;return n&&(typeof n=="function"?a=function(c){return n(new Jd(c,s,s._ref))}:a={next:n.next?function(c){return n.next(new Jd(c,s,s._ref))}:void 0,complete:n.complete||void 0,error:n.error||void 0}),this._delegate.on(t,a,r||void 0,i||void 0)},e}(),JN=function(){function e(t,n){this._delegate=t,this._service=n}return Object.defineProperty(e.prototype,"prefixes",{get:function(){var t=this;return this._delegate.prefixes.map(function(n){return new Wf(n,t._service)})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){var t=this;return this._delegate.items.map(function(n){return new Wf(n,t._service)})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextPageToken",{get:function(){return this._delegate.nextPageToken||null},enumerable:!1,configurable:!0}),e}();/** + */var XN=function(){function e(t,n){this._delegate=t,this._ref=n,this.cancel=this._delegate.cancel.bind(this._delegate),this.catch=this._delegate.catch.bind(this._delegate),this.pause=this._delegate.pause.bind(this._delegate),this.resume=this._delegate.resume.bind(this._delegate)}return Object.defineProperty(e.prototype,"snapshot",{get:function(){return new Zd(this._delegate.snapshot,this,this._ref)},enumerable:!1,configurable:!0}),e.prototype.then=function(t,n){var r=this;return this._delegate.then(function(i){if(t)return t(new Zd(i,r,r._ref))},n)},e.prototype.on=function(t,n,r,i){var s=this,a=void 0;return n&&(typeof n=="function"?a=function(c){return n(new Zd(c,s,s._ref))}:a={next:n.next?function(c){return n.next(new Zd(c,s,s._ref))}:void 0,complete:n.complete||void 0,error:n.error||void 0}),this._delegate.on(t,a,r||void 0,i||void 0)},e}(),JN=function(){function e(t,n){this._delegate=t,this._service=n}return Object.defineProperty(e.prototype,"prefixes",{get:function(){var t=this;return this._delegate.prefixes.map(function(n){return new Gf(n,t._service)})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){var t=this;return this._delegate.items.map(function(n){return new Gf(n,t._service)})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextPageToken",{get:function(){return this._delegate.nextPageToken||null},enumerable:!1,configurable:!0}),e}();/** * @license * Copyright 2020 Google LLC * @@ -3915,7 +3915,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Wf=function(){function e(t,n){this._delegate=t,this.storage=n}return Object.defineProperty(e.prototype,"name",{get:function(){return this._delegate.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this._delegate.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this._delegate.fullPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this._delegate.toString()},e.prototype.child=function(t){var n=kZ(this._delegate,t);return new e(n,this.storage)},Object.defineProperty(e.prototype,"root",{get:function(){return new e(this._delegate.root,this.storage)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this._delegate.parent;return t==null?null:new e(t,this.storage)},enumerable:!1,configurable:!0}),e.prototype.put=function(t,n){return this._throwIfRoot("put"),new XN(bZ(this._delegate,t,n),this)},e.prototype.putString=function(t,n,r){n===void 0&&(n=Fr.RAW),this._throwIfRoot("putString");var i=l2(n,t),s=_e({},r);return s.contentType==null&&i.contentType!=null&&(s.contentType=i.contentType),new XN(new _2(this._delegate,new lI(i.data,!0),s),this)},e.prototype.listAll=function(){var t=this;return SZ(this._delegate).then(function(n){return new JN(n,t.storage)})},e.prototype.list=function(t){var n=this;return IZ(this._delegate,t||void 0).then(function(r){return new JN(r,n.storage)})},e.prototype.getMetadata=function(){return EZ(this._delegate)},e.prototype.updateMetadata=function(t){return TZ(this._delegate,t)},e.prototype.getDownloadURL=function(){return CZ(this._delegate)},e.prototype.delete=function(){return this._throwIfRoot("delete"),AZ(this._delegate)},e.prototype._throwIfRoot=function(t){if(this._delegate._location.path==="")throw c2(t)},e}();/** + */var Gf=function(){function e(t,n){this._delegate=t,this.storage=n}return Object.defineProperty(e.prototype,"name",{get:function(){return this._delegate.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bucket",{get:function(){return this._delegate.bucket},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullPath",{get:function(){return this._delegate.fullPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this._delegate.toString()},e.prototype.child=function(t){var n=SZ(this._delegate,t);return new e(n,this.storage)},Object.defineProperty(e.prototype,"root",{get:function(){return new e(this._delegate.root,this.storage)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){var t=this._delegate.parent;return t==null?null:new e(t,this.storage)},enumerable:!1,configurable:!0}),e.prototype.put=function(t,n){return this._throwIfRoot("put"),new XN(yZ(this._delegate,t,n),this)},e.prototype.putString=function(t,n,r){n===void 0&&(n=Fr.RAW),this._throwIfRoot("putString");var i=l2(n,t),s=_e({},r);return s.contentType==null&&i.contentType!=null&&(s.contentType=i.contentType),new XN(new _2(this._delegate,new lI(i.data,!0),s),this)},e.prototype.listAll=function(){var t=this;return EZ(this._delegate).then(function(n){return new JN(n,t.storage)})},e.prototype.list=function(t){var n=this;return bZ(this._delegate,t||void 0).then(function(r){return new JN(r,n.storage)})},e.prototype.getMetadata=function(){return _Z(this._delegate)},e.prototype.updateMetadata=function(t){return wZ(this._delegate,t)},e.prototype.getDownloadURL=function(){return TZ(this._delegate)},e.prototype.delete=function(){return this._throwIfRoot("delete"),IZ(this._delegate)},e.prototype._throwIfRoot=function(t){if(this._delegate._location.path==="")throw c2(t)},e}();/** * @license * Copyright 2020 Google LLC * @@ -3930,7 +3930,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var NZ=function(){function e(t,n){this.app=t,this._delegate=n}return Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this._delegate.maxOperationRetryTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this._delegate.maxUploadRetryTime},enumerable:!1,configurable:!0}),e.prototype.ref=function(t){if(e0(t))throw Fu("ref() expected a child path but got a URL, use refFromURL instead.");return new Wf(YN(this._delegate,t),this)},e.prototype.refFromURL=function(t){if(!e0(t))throw Fu("refFromURL() expected a full URL but got a child path, use ref() instead.");try{Ur.makeFromUrl(t,this._delegate.host)}catch{throw Fu("refFromUrl() expected a valid full URL but got an invalid one.")}return new Wf(YN(this._delegate,t),this)},e.prototype.setMaxUploadRetryTime=function(t){this._delegate.maxUploadRetryTime=t},e.prototype.setMaxOperationRetryTime=function(t){this._delegate.maxOperationRetryTime=t},e.prototype.useEmulator=function(t,n,r){r===void 0&&(r={}),RZ(this._delegate,t,n,r)},e}(),xZ="@firebase/storage",OZ="0.7.1";/** + */var AZ=function(){function e(t,n){this.app=t,this._delegate=n}return Object.defineProperty(e.prototype,"maxOperationRetryTime",{get:function(){return this._delegate.maxOperationRetryTime},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxUploadRetryTime",{get:function(){return this._delegate.maxUploadRetryTime},enumerable:!1,configurable:!0}),e.prototype.ref=function(t){if(e0(t))throw Fu("ref() expected a child path but got a URL, use refFromURL instead.");return new Gf(YN(this._delegate,t),this)},e.prototype.refFromURL=function(t){if(!e0(t))throw Fu("refFromURL() expected a full URL but got a child path, use ref() instead.");try{Ur.makeFromUrl(t,this._delegate.host)}catch{throw Fu("refFromUrl() expected a valid full URL but got an invalid one.")}return new Gf(YN(this._delegate,t),this)},e.prototype.setMaxUploadRetryTime=function(t){this._delegate.maxUploadRetryTime=t},e.prototype.setMaxOperationRetryTime=function(t){this._delegate.maxOperationRetryTime=t},e.prototype.useEmulator=function(t,n,r){r===void 0&&(r={}),CZ(this._delegate,t,n,r)},e}(),kZ="@firebase/storage",RZ="0.7.1";/** * @license * Copyright 2020 Google LLC * @@ -3945,7 +3945,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var PZ="storage";function DZ(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),s=e.getProvider("app-check-internal"),a=new NZ(r,new zg(r,i,s,new R7,n,se.SDK_VERSION));return a}function MZ(e){var t={TaskState:$n,TaskEvent:C7,StringFormat:Fr,Storage:zg,Reference:Wf};e.INTERNAL.registerComponent(new On(PZ,DZ,"PUBLIC").setServiceProps(t).setMultipleInstances(!0)),e.registerVersion(xZ,OZ)}MZ(se);var LZ="@firebase/performance",I2="0.4.18";/** + */var NZ="storage";function xZ(e,t){var n=t.instanceIdentifier,r=e.getProvider("app").getImmediate(),i=e.getProvider("auth-internal"),s=e.getProvider("app-check-internal"),a=new AZ(r,new zg(r,i,s,new C7,n,oe.SDK_VERSION));return a}function OZ(e){var t={TaskState:qn,TaskEvent:T7,StringFormat:Fr,Storage:zg,Reference:Gf};e.INTERNAL.registerComponent(new xn(NZ,xZ,"PUBLIC").setServiceProps(t).setMultipleInstances(!0)),e.registerVersion(kZ,RZ)}OZ(oe);var PZ="@firebase/performance",I2="0.4.18";/** * @license * Copyright 2017 Google LLC * @@ -3960,7 +3960,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var S2=I2,FZ="FB-PERF-TRACE-START",UZ="FB-PERF-TRACE-STOP",t0="FB-PERF-TRACE-MEASURE",C2="_wt_",A2="_fp",k2="_fcp",R2="_fid",N2="@firebase/performance/config",x2="@firebase/performance/configexpire",jZ="performance",O2="Performance";/** + */var S2=I2,DZ="FB-PERF-TRACE-START",MZ="FB-PERF-TRACE-STOP",t0="FB-PERF-TRACE-MEASURE",C2="_wt_",A2="_fp",k2="_fcp",R2="_fid",N2="@firebase/performance/config",x2="@firebase/performance/configexpire",LZ="performance",O2="Performance";/** * @license * Copyright 2019 Google LLC * @@ -3975,7 +3975,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var hn,VZ=(hn={},hn["trace started"]="Trace {$traceName} was started before.",hn["trace stopped"]="Trace {$traceName} is not running.",hn["nonpositive trace startTime"]="Trace {$traceName} startTime should be positive.",hn["nonpositive trace duration"]="Trace {$traceName} duration should be positive.",hn["no window"]="Window is not available.",hn["no app id"]="App id is not available.",hn["no project id"]="Project id is not available.",hn["no api key"]="Api key is not available.",hn["invalid cc log"]="Attempted to queue invalid cc event",hn["FB not default"]="Performance can only start when Firebase app instance is the default one.",hn["RC response not ok"]="RC response is not ok",hn["invalid attribute name"]="Attribute name {$attributeName} is invalid.",hn["invalid attribute value"]="Attribute value {$attributeValue} is invalid.",hn["invalid custom metric name"]="Custom metric name {$customMetricName} is invalid",hn["invalid String merger input"]="Input for String merger is invalid, contact support team to resolve.",hn),In=new mo(jZ,O2,VZ);/** + */var fn,FZ=(fn={},fn["trace started"]="Trace {$traceName} was started before.",fn["trace stopped"]="Trace {$traceName} is not running.",fn["nonpositive trace startTime"]="Trace {$traceName} startTime should be positive.",fn["nonpositive trace duration"]="Trace {$traceName} duration should be positive.",fn["no window"]="Window is not available.",fn["no app id"]="App id is not available.",fn["no project id"]="Project id is not available.",fn["no api key"]="Api key is not available.",fn["invalid cc log"]="Attempted to queue invalid cc event",fn["FB not default"]="Performance can only start when Firebase app instance is the default one.",fn["RC response not ok"]="RC response is not ok",fn["invalid attribute name"]="Attribute name {$attributeName} is invalid.",fn["invalid attribute value"]="Attribute value {$attributeValue} is invalid.",fn["invalid custom metric name"]="Custom metric name {$customMetricName} is invalid",fn["invalid String merger input"]="Input for String merger is invalid, contact support team to resolve.",fn),In=new go(LZ,O2,FZ);/** * @license * Copyright 2019 Google LLC * @@ -3990,7 +3990,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var po=new Ra(O2);po.logLevel=Le.INFO;/** + */var ho=new Ra(O2);ho.logLevel=Le.INFO;/** * @license * Copyright 2019 Google LLC * @@ -4005,7 +4005,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var _w,P2,Nn=function(){function e(t){if(this.window=t,!t)throw In.create("no window");this.performance=t.performance,this.PerformanceObserver=t.PerformanceObserver,this.windowLocation=t.location,this.navigator=t.navigator,this.document=t.document,this.navigator&&this.navigator.cookieEnabled&&(this.localStorage=t.localStorage),t.perfMetrics&&t.perfMetrics.onFirstInputDelay&&(this.onFirstInputDelay=t.perfMetrics.onFirstInputDelay)}return e.prototype.getUrl=function(){return this.windowLocation.href.split("?")[0]},e.prototype.mark=function(t){!this.performance||!this.performance.mark||this.performance.mark(t)},e.prototype.measure=function(t,n,r){!this.performance||!this.performance.measure||this.performance.measure(t,n,r)},e.prototype.getEntriesByType=function(t){return!this.performance||!this.performance.getEntriesByType?[]:this.performance.getEntriesByType(t)},e.prototype.getEntriesByName=function(t){return!this.performance||!this.performance.getEntriesByName?[]:this.performance.getEntriesByName(t)},e.prototype.getTimeOrigin=function(){return this.performance&&(this.performance.timeOrigin||this.performance.timing.navigationStart)},e.prototype.requiredApisAvailable=function(){return!fetch||!Promise||!this.navigator||!this.navigator.cookieEnabled?(po.info("Firebase Performance cannot start if browser does not support fetch and Promise or cookie is disabled."),!1):Jf()?!0:(po.info("IndexedDB is not supported by current browswer"),!1)},e.prototype.setupObserver=function(t,n){if(this.PerformanceObserver){var r=new this.PerformanceObserver(function(i){for(var s=0,a=i.getEntries();sWZ)return!1;var t=HZ.some(function(n){return e.startsWith(n)});return!t&&!!e.match(KZ)}function XZ(e){return e.length!==0&&e.length<=GZ}/** + */var Uu;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.VISIBLE=1]="VISIBLE",e[e.HIDDEN=2]="HIDDEN"})(Uu||(Uu={}));var BZ=["firebase_","google_","ga_"],qZ=new RegExp("^[a-zA-Z]\\w*$"),$Z=40,HZ=100;function KZ(){var e=Rn.getInstance().navigator;return"serviceWorker"in e?e.serviceWorker.controller?2:3:1}function M2(){var e=Rn.getInstance().document,t=e.visibilityState;switch(t){case"visible":return Uu.VISIBLE;case"hidden":return Uu.HIDDEN;default:return Uu.UNKNOWN}}function WZ(){var e=Rn.getInstance().navigator,t=e.connection,n=t&&t.effectiveType;switch(n){case"slow-2g":return 1;case"2g":return 2;case"3g":return 3;case"4g":return 4;default:return 0}}function GZ(e){if(e.length===0||e.length>$Z)return!1;var t=BZ.some(function(n){return e.startsWith(n)});return!t&&!!e.match(qZ)}function zZ(e){return e.length!==0&&e.length<=HZ}/** * @license * Copyright 2019 Google LLC * @@ -4080,7 +4080,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var JZ="0.0.1",ZZ={loggingEnabled:!0},eee="FIREBASE_INSTALLATIONS_AUTH";function tee(e){var t=nee();return t?(ex(t),Promise.resolve()):oee(e).then(ex).then(function(n){return ree(n)},function(){})}function nee(){var e=Nn.getInstance().localStorage;if(e){var t=e.getItem(x2);if(!(!t||!see(t))){var n=e.getItem(N2);if(n)try{var r=JSON.parse(n);return r}catch{return}}}}function ree(e){var t=Nn.getInstance().localStorage;!e||!t||(t.setItem(N2,JSON.stringify(e)),t.setItem(x2,String(Date.now()+Gt.getInstance().configTimeToLive*60*60*1e3)))}var iee="Could not fetch config, will use default configs";function oee(e){return $Z().then(function(t){var n=Gt.getInstance().getProjectId(),r="https://firebaseremoteconfig.googleapis.com/v1/projects/"+n+"/namespaces/fireperf:fetch?key="+Gt.getInstance().getApiKey(),i=new Request(r,{method:"POST",headers:{Authorization:eee+" "+t},body:JSON.stringify({app_instance_id:e,app_instance_id_token:t,app_id:Gt.getInstance().getAppId(),app_version:S2,sdk_version:JZ})});return fetch(i).then(function(s){if(s.ok)return s.json();throw In.create("RC response not ok")})}).catch(function(){po.info(iee)})}function ex(e){if(!e)return e;var t=Gt.getInstance(),n=e.entries||{};return n.fpr_enabled!==void 0?t.loggingEnabled=String(n.fpr_enabled)==="true":t.loggingEnabled=ZZ.loggingEnabled,n.fpr_log_source&&(t.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(t.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(t.transportKey=n.fpr_log_transport_key),n.fpr_vc_network_request_sampling_rate!==void 0&&(t.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),n.fpr_vc_trace_sampling_rate!==void 0&&(t.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),t.logTraceAfterSampling=tx(t.tracesSamplingRate),t.logNetworkAfterSampling=tx(t.networkRequestsSamplingRate),e}function see(e){return Number(e)>Date.now()}function tx(e){return Math.random()<=e}/** + */var QZ="0.0.1",YZ={loggingEnabled:!0},XZ="FIREBASE_INSTALLATIONS_AUTH";function JZ(e){var t=ZZ();return t?(ex(t),Promise.resolve()):nee(e).then(ex).then(function(n){return eee(n)},function(){})}function ZZ(){var e=Rn.getInstance().localStorage;if(e){var t=e.getItem(x2);if(!(!t||!ree(t))){var n=e.getItem(N2);if(n)try{var r=JSON.parse(n);return r}catch{return}}}}function eee(e){var t=Rn.getInstance().localStorage;!e||!t||(t.setItem(N2,JSON.stringify(e)),t.setItem(x2,String(Date.now()+Gt.getInstance().configTimeToLive*60*60*1e3)))}var tee="Could not fetch config, will use default configs";function nee(e){return VZ().then(function(t){var n=Gt.getInstance().getProjectId(),r="https://firebaseremoteconfig.googleapis.com/v1/projects/"+n+"/namespaces/fireperf:fetch?key="+Gt.getInstance().getApiKey(),i=new Request(r,{method:"POST",headers:{Authorization:XZ+" "+t},body:JSON.stringify({app_instance_id:e,app_instance_id_token:t,app_id:Gt.getInstance().getAppId(),app_version:S2,sdk_version:QZ})});return fetch(i).then(function(s){if(s.ok)return s.json();throw In.create("RC response not ok")})}).catch(function(){ho.info(tee)})}function ex(e){if(!e)return e;var t=Gt.getInstance(),n=e.entries||{};return n.fpr_enabled!==void 0?t.loggingEnabled=String(n.fpr_enabled)==="true":t.loggingEnabled=YZ.loggingEnabled,n.fpr_log_source&&(t.logSource=Number(n.fpr_log_source)),n.fpr_log_endpoint_url&&(t.logEndPointUrl=n.fpr_log_endpoint_url),n.fpr_log_transport_key&&(t.transportKey=n.fpr_log_transport_key),n.fpr_vc_network_request_sampling_rate!==void 0&&(t.networkRequestsSamplingRate=Number(n.fpr_vc_network_request_sampling_rate)),n.fpr_vc_trace_sampling_rate!==void 0&&(t.tracesSamplingRate=Number(n.fpr_vc_trace_sampling_rate)),t.logTraceAfterSampling=tx(t.tracesSamplingRate),t.logNetworkAfterSampling=tx(t.networkRequestsSamplingRate),e}function ree(e){return Number(e)>Date.now()}function tx(e){return Math.random()<=e}/** * @license * Copyright 2019 Google LLC * @@ -4095,7 +4095,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var vI=1,bw;function L2(){return vI=2,bw=bw||uee(),bw}function aee(){return vI===3}function uee(){return cee().then(function(){return qZ()}).then(function(e){return tee(e)}).then(function(){return nx()},function(){return nx()})}function cee(){var e=Nn.getInstance().document;return new Promise(function(t){if(e&&e.readyState!=="complete"){var n=function(){e.readyState==="complete"&&(e.removeEventListener("readystatechange",n),t())};e.addEventListener("readystatechange",n)}else t()})}function nx(){vI=3}/** + */var vI=1,bw;function L2(){return vI=2,bw=bw||oee(),bw}function iee(){return vI===3}function oee(){return see().then(function(){return jZ()}).then(function(e){return JZ(e)}).then(function(){return nx()},function(){return nx()})}function see(){var e=Rn.getInstance().document;return new Promise(function(t){if(e&&e.readyState!=="complete"){var n=function(){e.readyState==="complete"&&(e.removeEventListener("readystatechange",n),t())};e.addEventListener("readystatechange",n)}else t()})}function nx(){vI=3}/** * @license * Copyright 2019 Google LLC * @@ -4110,7 +4110,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var gI=10*1e3,lee=5.5*1e3,F2=3,fee=1e3,Ev=F2,Zo=[],rx=!1;function hee(){rx||(Qg(lee),rx=!0)}function Qg(e){setTimeout(function(){if(Ev!==0){if(!Zo.length)return Qg(gI);dee()}},e)}function dee(){var e=Zo.splice(0,fee),t=e.map(function(r){return{source_extension_json_proto3:r.message,event_time_ms:String(r.eventTime)}}),n={request_time_ms:String(Date.now()),client_info:{client_type:1,js_client_info:{}},log_source:Gt.getInstance().logSource,log_event:t};pee(n,e).catch(function(){Zo=xe(xe([],e),Zo),Ev--,po.info("Tries left: "+Ev+"."),Qg(gI)})}function pee(e,t){return vee(e).then(function(n){return n.ok||po.info("Call to Firebase backend failed."),n.json()}).then(function(n){var r=Number(n.nextRequestWaitMillis),i=gI;isNaN(r)||(i=Math.max(r,i));var s=n.logResponseDetails;Array.isArray(s)&&s.length>0&&s[0].responseAction==="RETRY_REQUEST_LATER"&&(Zo=xe(xe([],t),Zo),po.info("Retry transport request later.")),Ev=F2,Qg(i)})}function vee(e){var t=Gt.getInstance().getFlTransportFullUrl();return fetch(t,{method:"POST",body:JSON.stringify(e)})}function gee(e){if(!e.eventTime||!e.message)throw In.create("invalid cc log");Zo=xe(xe([],Zo),[e])}function mee(e){return function(){for(var t=[],n=0;n0&&s[0].responseAction==="RETRY_REQUEST_LATER"&&(Zo=xe(xe([],t),Zo),ho.info("Retry transport request later.")),Ev=F2,Qg(i)})}function hee(e){var t=Gt.getInstance().getFlTransportFullUrl();return fetch(t,{method:"POST",body:JSON.stringify(e)})}function dee(e){if(!e.eventTime||!e.message)throw In.create("invalid cc log");Zo=xe(xe([],Zo),[e])}function pee(e){return function(){for(var t=[],n=0;nEee?!1:t&&t.startsWith(C2)&&Iee.indexOf(e)>-1||!e.startsWith(Tee)}function Cee(e){var t=Math.floor(e);return t_ee?!1:t&&t.startsWith(C2)&&bee.indexOf(e)>-1||!e.startsWith(wee)}function Tee(e){var t=Math.floor(e);return t"u")throw In.create("no window");return BZ(window),Gt.getInstance().firebaseAppInstance=n,Gt.getInstance().installationsService=r,new xee(n)};e.INTERNAL.registerComponent(new On("performance",function(n){var r=n.getProvider("app").getImmediate(),i=n.getProvider("installations").getImmediate();return t(r,i)},"PUBLIC")),e.registerVersion(LZ,I2)}Pee(se);/** + */var Ree="[DEFAULT]";function Nee(e){var t=function(n,r){if(n.name!==Ree)throw In.create("FB not default");if(typeof window>"u")throw In.create("no window");return UZ(window),Gt.getInstance().firebaseAppInstance=n,Gt.getInstance().installationsService=r,new kee(n)};e.INTERNAL.registerComponent(new xn("performance",function(n){var r=n.getProvider("app").getImmediate(),i=n.getProvider("installations").getImmediate();return t(r,i)},"PUBLIC")),e.registerVersion(PZ,I2)}Nee(oe);/** * @license * Copyright 2019 Google LLC * @@ -4230,7 +4230,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Dee="firebase_id",Mee="origin",Lee=60*1e3,Fee="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",V2="https://www.googletagmanager.com/gtag/js",xn;(function(e){e.EVENT="event",e.SET="set",e.CONFIG="config"})(xn||(xn={}));var n0;(function(e){e.ADD_SHIPPING_INFO="add_shipping_info",e.ADD_PAYMENT_INFO="add_payment_info",e.ADD_TO_CART="add_to_cart",e.ADD_TO_WISHLIST="add_to_wishlist",e.BEGIN_CHECKOUT="begin_checkout",e.CHECKOUT_PROGRESS="checkout_progress",e.EXCEPTION="exception",e.GENERATE_LEAD="generate_lead",e.LOGIN="login",e.PAGE_VIEW="page_view",e.PURCHASE="purchase",e.REFUND="refund",e.REMOVE_FROM_CART="remove_from_cart",e.SCREEN_VIEW="screen_view",e.SEARCH="search",e.SELECT_CONTENT="select_content",e.SELECT_ITEM="select_item",e.SELECT_PROMOTION="select_promotion",e.SET_CHECKOUT_OPTION="set_checkout_option",e.SHARE="share",e.SIGN_UP="sign_up",e.TIMING_COMPLETE="timing_complete",e.VIEW_CART="view_cart",e.VIEW_ITEM="view_item",e.VIEW_ITEM_LIST="view_item_list",e.VIEW_PROMOTION="view_promotion",e.VIEW_SEARCH_RESULTS="view_search_results"})(n0||(n0={}));/** + */var xee="firebase_id",Oee="origin",Pee=60*1e3,Dee="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",V2="https://www.googletagmanager.com/gtag/js",Nn;(function(e){e.EVENT="event",e.SET="set",e.CONFIG="config"})(Nn||(Nn={}));var n0;(function(e){e.ADD_SHIPPING_INFO="add_shipping_info",e.ADD_PAYMENT_INFO="add_payment_info",e.ADD_TO_CART="add_to_cart",e.ADD_TO_WISHLIST="add_to_wishlist",e.BEGIN_CHECKOUT="begin_checkout",e.CHECKOUT_PROGRESS="checkout_progress",e.EXCEPTION="exception",e.GENERATE_LEAD="generate_lead",e.LOGIN="login",e.PAGE_VIEW="page_view",e.PURCHASE="purchase",e.REFUND="refund",e.REMOVE_FROM_CART="remove_from_cart",e.SCREEN_VIEW="screen_view",e.SEARCH="search",e.SELECT_CONTENT="select_content",e.SELECT_ITEM="select_item",e.SELECT_PROMOTION="select_promotion",e.SET_CHECKOUT_OPTION="set_checkout_option",e.SHARE="share",e.SIGN_UP="sign_up",e.TIMING_COMPLETE="timing_complete",e.VIEW_CART="view_cart",e.VIEW_ITEM="view_item",e.VIEW_ITEM_LIST="view_item_list",e.VIEW_PROMOTION="view_promotion",e.VIEW_SEARCH_RESULTS="view_search_results"})(n0||(n0={}));/** * @license * Copyright 2019 Google LLC * @@ -4245,7 +4245,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Uee(e,t,n,r,i){return R(this,void 0,void 0,function(){var s,a;return A(this,function(c){switch(c.label){case 0:return i&&i.global?(e(xn.EVENT,n,r),[2]):[3,1];case 1:return[4,t];case 2:s=c.sent(),a=_e(_e({},r),{send_to:s}),e(xn.EVENT,n,a),c.label=3;case 3:return[2]}})})}function jee(e,t,n,r){return R(this,void 0,void 0,function(){var i;return A(this,function(s){switch(s.label){case 0:return r&&r.global?(e(xn.SET,{screen_name:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,t];case 2:i=s.sent(),e(xn.CONFIG,i,{update:!0,screen_name:n}),s.label=3;case 3:return[2]}})})}function Vee(e,t,n,r){return R(this,void 0,void 0,function(){var i;return A(this,function(s){switch(s.label){case 0:return r&&r.global?(e(xn.SET,{user_id:n}),[2,Promise.resolve()]):[3,1];case 1:return[4,t];case 2:i=s.sent(),e(xn.CONFIG,i,{update:!0,user_id:n}),s.label=3;case 3:return[2]}})})}function Bee(e,t,n,r){return R(this,void 0,void 0,function(){var i,s,a,c,l;return A(this,function(h){switch(h.label){case 0:if(!(r&&r.global))return[3,1];for(i={},s=0,a=Object.keys(n);s0){var t=e.map(function(r,i){return"("+(i+1)+") "+r}).join(" "),n=$r.create("invalid-analytics-context",{errorInfo:t});pn.warn(n.message)}}function lte(e,t){cte();var n=e.options.appId;if(!n)throw $r.create("no-app-id");if(!e.options.apiKey)if(e.options.measurementId)pn.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest'+(" measurement ID for this Firebase app. Falling back to the measurement ID "+e.options.measurementId)+' provided in the "measurementId" field in the local Firebase config.');else throw $r.create("no-api-key");if(Yi[n]!=null)throw $r.create("already-exists",{id:n});if(!r0){Hee(mp);var r=zee(Yi,ax,ux,mp,$2),i=r.wrappedGtag,s=r.gtagCore;Fl=i,cx=s,r0=!0}Yi[n]=ate(e,ax,ux,t,cx,mp);var a={app:e,logEvent:function(c,l,h){Uee(Fl,Yi[n],c,l,h).catch(function(d){return pn.error(d)})},setCurrentScreen:function(c,l){jee(Fl,Yi[n],c,l).catch(function(h){return pn.error(h)})},setUserId:function(c,l){Vee(Fl,Yi[n],c,l).catch(function(h){return pn.error(h)})},setUserProperties:function(c,l){Bee(Fl,Yi[n],c,l).catch(function(h){return pn.error(h)})},setAnalyticsCollectionEnabled:function(c){qee(Yi[n],c).catch(function(l){return pn.error(l)})},INTERNAL:{delete:function(){return delete Yi[n],Promise.resolve()}}};return a}var fte="@firebase/analytics",hte="0.6.18",lx="analytics";function dte(e){e.INTERNAL.registerComponent(new On(lx,function(n){var r=n.getProvider("app").getImmediate(),i=n.getProvider("installations").getImmediate();return lte(r,i)},"PUBLIC").setServiceProps({settings:ute,EventName:n0,isSupported:pte})),e.INTERNAL.registerComponent(new On("analytics-internal",t,"PRIVATE")),e.registerVersion(fte,hte);function t(n){try{var r=n.getProvider(lx).getImmediate();return{logEvent:r.logEvent}}catch(i){throw $r.create("interop-component-reg-failed",{reason:i})}}}dte(se);function pte(){return R(this,void 0,void 0,function(){var e;return A(this,function(t){switch(t.label){case 0:if(z0())return[2,!1];if(!fP())return[2,!1];if(!Jf())return[2,!1];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Q0()];case 2:return e=t.sent(),[2,e];case 3:return t.sent(),[2,!1];case 4:return[2]}})})}/** + */var Yi={},ax=[],ux={},yp="dataLayer",$2="gtag",cx,Fl,r0=!1;function ote(e){if(r0)throw $r.create("already-initialized");e.dataLayerName&&(yp=e.dataLayerName),e.gtagName&&($2=e.gtagName)}function ste(){var e=[];if(z0()&&e.push("This is a browser extension environment."),fP()||e.push("Cookies are not available."),e.length>0){var t=e.map(function(r,i){return"("+(i+1)+") "+r}).join(" "),n=$r.create("invalid-analytics-context",{errorInfo:t});dn.warn(n.message)}}function ate(e,t){ste();var n=e.options.appId;if(!n)throw $r.create("no-app-id");if(!e.options.apiKey)if(e.options.measurementId)dn.warn('The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest'+(" measurement ID for this Firebase app. Falling back to the measurement ID "+e.options.measurementId)+' provided in the "measurementId" field in the local Firebase config.');else throw $r.create("no-api-key");if(Yi[n]!=null)throw $r.create("already-exists",{id:n});if(!r0){Bee(yp);var r=Kee(Yi,ax,ux,yp,$2),i=r.wrappedGtag,s=r.gtagCore;Fl=i,cx=s,r0=!0}Yi[n]=ite(e,ax,ux,t,cx,yp);var a={app:e,logEvent:function(c,l,h){Mee(Fl,Yi[n],c,l,h).catch(function(d){return dn.error(d)})},setCurrentScreen:function(c,l){Lee(Fl,Yi[n],c,l).catch(function(h){return dn.error(h)})},setUserId:function(c,l){Fee(Fl,Yi[n],c,l).catch(function(h){return dn.error(h)})},setUserProperties:function(c,l){Uee(Fl,Yi[n],c,l).catch(function(h){return dn.error(h)})},setAnalyticsCollectionEnabled:function(c){jee(Yi[n],c).catch(function(l){return dn.error(l)})},INTERNAL:{delete:function(){return delete Yi[n],Promise.resolve()}}};return a}var ute="@firebase/analytics",cte="0.6.18",lx="analytics";function lte(e){e.INTERNAL.registerComponent(new xn(lx,function(n){var r=n.getProvider("app").getImmediate(),i=n.getProvider("installations").getImmediate();return ate(r,i)},"PUBLIC").setServiceProps({settings:ote,EventName:n0,isSupported:fte})),e.INTERNAL.registerComponent(new xn("analytics-internal",t,"PRIVATE")),e.registerVersion(ute,cte);function t(n){try{var r=n.getProvider(lx).getImmediate();return{logEvent:r.logEvent}}catch(i){throw $r.create("interop-component-reg-failed",{reason:i})}}}lte(oe);function fte(){return R(this,void 0,void 0,function(){var e;return A(this,function(t){switch(t.label){case 0:if(z0())return[2,!1];if(!fP())return[2,!1];if(!Zf())return[2,!1];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,Q0()];case 2:return e=t.sent(),[2,e];case 3:return t.sent(),[2,!1];case 4:return[2]}})})}/** * @license * Copyright 2019 Google LLC * @@ -4350,7 +4350,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var vte=function(){function e(t,n,r,i){this.client=t,this.storage=n,this.storageCache=r,this.logger=i}return e.prototype.isCachedDataFresh=function(t,n){if(!n)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var r=Date.now()-n,i=r<=t;return this.logger.debug("Config fetch cache check."+(" Cache age millis: "+r+".")+(" Cache max age millis (minimumFetchIntervalMillis setting): "+t+".")+(" Is cache hit: "+i+".")),i},e.prototype.fetch=function(t){return R(this,void 0,void 0,function(){var n,r,i,s,a;return A(this,function(c){switch(c.label){case 0:return[4,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()])];case 1:return n=c.sent(),r=n[0],i=n[1],i&&this.isCachedDataFresh(t.cacheMaxAgeMillis,r)?[2,i]:(t.eTag=i&&i.eTag,[4,this.client.fetch(t)]);case 2:return s=c.sent(),a=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())],s.status===200&&a.push(this.storage.setLastSuccessfulFetchResponse(s)),[4,Promise.all(a)];case 3:return c.sent(),[2,s]}})})},e}();/** + */var hte=function(){function e(t,n,r,i){this.client=t,this.storage=n,this.storageCache=r,this.logger=i}return e.prototype.isCachedDataFresh=function(t,n){if(!n)return this.logger.debug("Config fetch cache check. Cache unpopulated."),!1;var r=Date.now()-n,i=r<=t;return this.logger.debug("Config fetch cache check."+(" Cache age millis: "+r+".")+(" Cache max age millis (minimumFetchIntervalMillis setting): "+t+".")+(" Is cache hit: "+i+".")),i},e.prototype.fetch=function(t){return R(this,void 0,void 0,function(){var n,r,i,s,a;return A(this,function(c){switch(c.label){case 0:return[4,Promise.all([this.storage.getLastSuccessfulFetchTimestampMillis(),this.storage.getLastSuccessfulFetchResponse()])];case 1:return n=c.sent(),r=n[0],i=n[1],i&&this.isCachedDataFresh(t.cacheMaxAgeMillis,r)?[2,i]:(t.eTag=i&&i.eTag,[4,this.client.fetch(t)]);case 2:return s=c.sent(),a=[this.storageCache.setLastSuccessfulFetchTimestampMillis(Date.now())],s.status===200&&a.push(this.storage.setLastSuccessfulFetchResponse(s)),[4,Promise.all(a)];case 3:return c.sent(),[2,s]}})})},e}();/** * @license * Copyright 2019 Google LLC * @@ -4365,7 +4365,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Vn,gte=(Vn={},Vn["registration-window"]="Undefined window object. This SDK only supports usage in a browser environment.",Vn["registration-project-id"]="Undefined project identifier. Check Firebase app initialization.",Vn["registration-api-key"]="Undefined API key. Check Firebase app initialization.",Vn["registration-app-id"]="Undefined app identifier. Check Firebase app initialization.",Vn["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",Vn["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",Vn["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",Vn["storage-delete"]="Error thrown when deleting from storage. Original error: {$originalErrorMessage}.",Vn["fetch-client-network"]="Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",Vn["fetch-timeout"]='The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',Vn["fetch-throttle"]='The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',Vn["fetch-client-parse"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",Vn["fetch-status"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",Vn),jr=new mo("remoteconfig","Remote Config",gte);function mte(e,t){return e instanceof Sc&&e.code.indexOf(t)!==-1}/** + */var jn,dte=(jn={},jn["registration-window"]="Undefined window object. This SDK only supports usage in a browser environment.",jn["registration-project-id"]="Undefined project identifier. Check Firebase app initialization.",jn["registration-api-key"]="Undefined API key. Check Firebase app initialization.",jn["registration-app-id"]="Undefined app identifier. Check Firebase app initialization.",jn["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",jn["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",jn["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",jn["storage-delete"]="Error thrown when deleting from storage. Original error: {$originalErrorMessage}.",jn["fetch-client-network"]="Fetch client failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",jn["fetch-timeout"]='The config fetch request timed out. Configure timeout using "fetchTimeoutMillis" SDK setting.',jn["fetch-throttle"]='The config fetch request timed out while in an exponential backoff state. Configure timeout using "fetchTimeoutMillis" SDK setting. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.',jn["fetch-client-parse"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",jn["fetch-status"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",jn),jr=new go("remoteconfig","Remote Config",dte);function pte(e,t){return e instanceof Sc&&e.code.indexOf(t)!==-1}/** * @license * Copyright 2019 Google LLC * @@ -4380,7 +4380,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function yte(e){return e===void 0&&(e=navigator),e.languages&&e.languages[0]||e.language}/** + */function vte(e){return e===void 0&&(e=navigator),e.languages&&e.languages[0]||e.language}/** * @license * Copyright 2019 Google LLC * @@ -4395,7 +4395,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var _te=function(){function e(t,n,r,i,s,a){this.firebaseInstallations=t,this.sdkVersion=n,this.namespace=r,this.projectId=i,this.apiKey=s,this.appId=a}return e.prototype.fetch=function(t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c,l,h,d,v,g,y,_,b,T,C,x,O,L;return A(this,function($){switch($.label){case 0:return[4,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()])];case 1:n=$.sent(),r=n[0],i=n[1],s=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",a=s+"/v1/projects/"+this.projectId+"/namespaces/"+this.namespace+":fetch?key="+this.apiKey,c={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":t.eTag||"*"},l={sdk_version:this.sdkVersion,app_instance_id:r,app_instance_id_token:i,app_id:this.appId,language_code:yte()},h={method:"POST",headers:c,body:JSON.stringify(l)},d=fetch(a,h),v=new Promise(function(P,re){t.signal.addEventListener(function(){var F=new Error("The operation was aborted.");F.name="AbortError",re(F)})}),$.label=2;case 2:return $.trys.push([2,5,,6]),[4,Promise.race([d,v])];case 3:return $.sent(),[4,d];case 4:return g=$.sent(),[3,6];case 5:throw y=$.sent(),_="fetch-client-network",y.name==="AbortError"&&(_="fetch-timeout"),jr.create(_,{originalErrorMessage:y.message});case 6:if(b=g.status,T=g.headers.get("ETag")||void 0,g.status!==200)return[3,11];O=void 0,$.label=7;case 7:return $.trys.push([7,9,,10]),[4,g.json()];case 8:return O=$.sent(),[3,10];case 9:throw L=$.sent(),jr.create("fetch-client-parse",{originalErrorMessage:L.message});case 10:C=O.entries,x=O.state,$.label=11;case 11:if(x==="INSTANCE_STATE_UNSPECIFIED"?b=500:x==="NO_CHANGE"?b=304:(x==="NO_TEMPLATE"||x==="EMPTY_CONFIG")&&(C={}),b!==304&&b!==200)throw jr.create("fetch-status",{httpStatus:b});return[2,{status:b,eTag:T,config:C}]}})})},e}();/** + */var gte=function(){function e(t,n,r,i,s,a){this.firebaseInstallations=t,this.sdkVersion=n,this.namespace=r,this.projectId=i,this.apiKey=s,this.appId=a}return e.prototype.fetch=function(t){return R(this,void 0,void 0,function(){var n,r,i,s,a,c,l,h,d,v,g,y,_,b,T,C,x,O,L;return A(this,function($){switch($.label){case 0:return[4,Promise.all([this.firebaseInstallations.getId(),this.firebaseInstallations.getToken()])];case 1:n=$.sent(),r=n[0],i=n[1],s=window.FIREBASE_REMOTE_CONFIG_URL_BASE||"https://firebaseremoteconfig.googleapis.com",a=s+"/v1/projects/"+this.projectId+"/namespaces/"+this.namespace+":fetch?key="+this.apiKey,c={"Content-Type":"application/json","Content-Encoding":"gzip","If-None-Match":t.eTag||"*"},l={sdk_version:this.sdkVersion,app_instance_id:r,app_instance_id_token:i,app_id:this.appId,language_code:vte()},h={method:"POST",headers:c,body:JSON.stringify(l)},d=fetch(a,h),v=new Promise(function(P,re){t.signal.addEventListener(function(){var F=new Error("The operation was aborted.");F.name="AbortError",re(F)})}),$.label=2;case 2:return $.trys.push([2,5,,6]),[4,Promise.race([d,v])];case 3:return $.sent(),[4,d];case 4:return g=$.sent(),[3,6];case 5:throw y=$.sent(),_="fetch-client-network",y.name==="AbortError"&&(_="fetch-timeout"),jr.create(_,{originalErrorMessage:y.message});case 6:if(b=g.status,T=g.headers.get("ETag")||void 0,g.status!==200)return[3,11];O=void 0,$.label=7;case 7:return $.trys.push([7,9,,10]),[4,g.json()];case 8:return O=$.sent(),[3,10];case 9:throw L=$.sent(),jr.create("fetch-client-parse",{originalErrorMessage:L.message});case 10:C=O.entries,x=O.state,$.label=11;case 11:if(x==="INSTANCE_STATE_UNSPECIFIED"?b=500:x==="NO_CHANGE"?b=304:(x==="NO_TEMPLATE"||x==="EMPTY_CONFIG")&&(C={}),b!==304&&b!==200)throw jr.create("fetch-status",{httpStatus:b});return[2,{status:b,eTag:T,config:C}]}})})},e}();/** * @license * Copyright 2019 Google LLC * @@ -4410,7 +4410,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var wte=function(){function e(){this.listeners=[]}return e.prototype.addEventListener=function(t){this.listeners.push(t)},e.prototype.abort=function(){this.listeners.forEach(function(t){return t()})},e}();/** + */var mte=function(){function e(){this.listeners=[]}return e.prototype.addEventListener=function(t){this.listeners.push(t)},e.prototype.abort=function(){this.listeners.forEach(function(t){return t()})},e}();/** * @license * Copyright 2019 Google LLC * @@ -4425,7 +4425,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var bte=!1,Ete="",fx=0,Tte=["1","true","t","yes","y","on"],Iw=function(){function e(t,n){n===void 0&&(n=Ete),this._source=t,this._value=n}return e.prototype.asString=function(){return this._value},e.prototype.asBoolean=function(){return this._source==="static"?bte:Tte.indexOf(this._value.toLowerCase())>=0},e.prototype.asNumber=function(){if(this._source==="static")return fx;var t=Number(this._value);return isNaN(t)&&(t=fx),t},e.prototype.getSource=function(){return this._source},e}();/** + */var yte=!1,_te="",fx=0,wte=["1","true","t","yes","y","on"],Iw=function(){function e(t,n){n===void 0&&(n=_te),this._source=t,this._value=n}return e.prototype.asString=function(){return this._value},e.prototype.asBoolean=function(){return this._source==="static"?yte:wte.indexOf(this._value.toLowerCase())>=0},e.prototype.asNumber=function(){if(this._source==="static")return fx;var t=Number(this._value);return isNaN(t)&&(t=fx),t},e.prototype.getSource=function(){return this._source},e}();/** * @license * Copyright 2019 Google LLC * @@ -4440,7 +4440,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Ite=60*1e3,Ste=12*60*60*1e3,Cte=function(){function e(t,n,r,i,s){this.app=t,this._client=n,this._storageCache=r,this._storage=i,this._logger=s,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:Ite,minimumFetchIntervalMillis:Ste},this.defaultConfig={}}return e.prototype.setLogLevel=function(t){switch(t){case"debug":this._logger.logLevel=Le.DEBUG;break;case"silent":this._logger.logLevel=Le.SILENT;break;default:this._logger.logLevel=Le.ERROR}},Object.defineProperty(e.prototype,"fetchTimeMillis",{get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastFetchStatus",{get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"},enumerable:!1,configurable:!0}),e.prototype.activate=function(){return R(this,void 0,void 0,function(){var t,n,r;return A(this,function(i){switch(i.label){case 0:return[4,Promise.all([this._storage.getLastSuccessfulFetchResponse(),this._storage.getActiveConfigEtag()])];case 1:return t=i.sent(),n=t[0],r=t[1],!n||!n.config||!n.eTag||n.eTag===r?[2,!1]:[4,Promise.all([this._storageCache.setActiveConfig(n.config),this._storage.setActiveConfigEtag(n.eTag)])];case 2:return i.sent(),[2,!0]}})})},e.prototype.ensureInitialized=function(){var t=this;return this._initializePromise||(this._initializePromise=this._storageCache.loadFromStorage().then(function(){t._isInitializationComplete=!0})),this._initializePromise},e.prototype.fetch=function(){return R(this,void 0,void 0,function(){var t,n,r,i=this;return A(this,function(s){switch(s.label){case 0:t=new wte,setTimeout(function(){return R(i,void 0,void 0,function(){return A(this,function(a){return t.abort(),[2]})})},this.settings.fetchTimeoutMillis),s.label=1;case 1:return s.trys.push([1,4,,6]),[4,this._client.fetch({cacheMaxAgeMillis:this.settings.minimumFetchIntervalMillis,signal:t})];case 2:return s.sent(),[4,this._storageCache.setLastFetchStatus("success")];case 3:return s.sent(),[3,6];case 4:return n=s.sent(),r=mte(n,"fetch-throttle")?"throttle":"failure",[4,this._storageCache.setLastFetchStatus(r)];case 5:throw s.sent(),n;case 6:return[2]}})})},e.prototype.fetchAndActivate=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return[4,this.fetch()];case 1:return t.sent(),[2,this.activate()]}})})},e.prototype.getAll=function(){var t=this;return Ate(this._storageCache.getActiveConfig(),this.defaultConfig).reduce(function(n,r){return n[r]=t.getValue(r),n},{})},e.prototype.getBoolean=function(t){return this.getValue(t).asBoolean()},e.prototype.getNumber=function(t){return this.getValue(t).asNumber()},e.prototype.getString=function(t){return this.getValue(t).asString()},e.prototype.getValue=function(t){this._isInitializationComplete||this._logger.debug('A value was requested for key "'+t+'" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.');var n=this._storageCache.getActiveConfig();return n&&n[t]!==void 0?new Iw("remote",n[t]):this.defaultConfig&&this.defaultConfig[t]!==void 0?new Iw("default",String(this.defaultConfig[t])):(this._logger.debug('Returning static value for key "'+t+'". Define a default or remote value if this is unintentional.'),new Iw("static"))},e}();function Ate(e,t){return e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(_e(_e({},e),t))}/** + */var bte=60*1e3,Ete=12*60*60*1e3,Tte=function(){function e(t,n,r,i,s){this.app=t,this._client=n,this._storageCache=r,this._storage=i,this._logger=s,this._isInitializationComplete=!1,this.settings={fetchTimeoutMillis:bte,minimumFetchIntervalMillis:Ete},this.defaultConfig={}}return e.prototype.setLogLevel=function(t){switch(t){case"debug":this._logger.logLevel=Le.DEBUG;break;case"silent":this._logger.logLevel=Le.SILENT;break;default:this._logger.logLevel=Le.ERROR}},Object.defineProperty(e.prototype,"fetchTimeMillis",{get:function(){return this._storageCache.getLastSuccessfulFetchTimestampMillis()||-1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastFetchStatus",{get:function(){return this._storageCache.getLastFetchStatus()||"no-fetch-yet"},enumerable:!1,configurable:!0}),e.prototype.activate=function(){return R(this,void 0,void 0,function(){var t,n,r;return A(this,function(i){switch(i.label){case 0:return[4,Promise.all([this._storage.getLastSuccessfulFetchResponse(),this._storage.getActiveConfigEtag()])];case 1:return t=i.sent(),n=t[0],r=t[1],!n||!n.config||!n.eTag||n.eTag===r?[2,!1]:[4,Promise.all([this._storageCache.setActiveConfig(n.config),this._storage.setActiveConfigEtag(n.eTag)])];case 2:return i.sent(),[2,!0]}})})},e.prototype.ensureInitialized=function(){var t=this;return this._initializePromise||(this._initializePromise=this._storageCache.loadFromStorage().then(function(){t._isInitializationComplete=!0})),this._initializePromise},e.prototype.fetch=function(){return R(this,void 0,void 0,function(){var t,n,r,i=this;return A(this,function(s){switch(s.label){case 0:t=new mte,setTimeout(function(){return R(i,void 0,void 0,function(){return A(this,function(a){return t.abort(),[2]})})},this.settings.fetchTimeoutMillis),s.label=1;case 1:return s.trys.push([1,4,,6]),[4,this._client.fetch({cacheMaxAgeMillis:this.settings.minimumFetchIntervalMillis,signal:t})];case 2:return s.sent(),[4,this._storageCache.setLastFetchStatus("success")];case 3:return s.sent(),[3,6];case 4:return n=s.sent(),r=pte(n,"fetch-throttle")?"throttle":"failure",[4,this._storageCache.setLastFetchStatus(r)];case 5:throw s.sent(),n;case 6:return[2]}})})},e.prototype.fetchAndActivate=function(){return R(this,void 0,void 0,function(){return A(this,function(t){switch(t.label){case 0:return[4,this.fetch()];case 1:return t.sent(),[2,this.activate()]}})})},e.prototype.getAll=function(){var t=this;return Ite(this._storageCache.getActiveConfig(),this.defaultConfig).reduce(function(n,r){return n[r]=t.getValue(r),n},{})},e.prototype.getBoolean=function(t){return this.getValue(t).asBoolean()},e.prototype.getNumber=function(t){return this.getValue(t).asNumber()},e.prototype.getString=function(t){return this.getValue(t).asString()},e.prototype.getValue=function(t){this._isInitializationComplete||this._logger.debug('A value was requested for key "'+t+'" before SDK initialization completed. Await on ensureInitialized if the intent was to get a previously activated value.');var n=this._storageCache.getActiveConfig();return n&&n[t]!==void 0?new Iw("remote",n[t]):this.defaultConfig&&this.defaultConfig[t]!==void 0?new Iw("default",String(this.defaultConfig[t])):(this._logger.debug('Returning static value for key "'+t+'". Define a default or remote value if this is unintentional.'),new Iw("static"))},e}();function Ite(e,t){return e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(_e(_e({},e),t))}/** * @license * Copyright 2019 Google LLC * @@ -4455,7 +4455,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function yp(e,t){var n=e.target.error||void 0;return jr.create(t,{originalErrorMessage:n&&n.message})}var Bs="app_namespace_store",kte="firebase_remote_config",Rte=1;function Nte(){return new Promise(function(e,t){var n=indexedDB.open(kte,Rte);n.onerror=function(r){t(yp(r,"storage-open"))},n.onsuccess=function(r){e(r.target.result)},n.onupgradeneeded=function(r){var i=r.target.result;switch(r.oldVersion){case 0:i.createObjectStore(Bs,{keyPath:"compositeKey"})}}})}var xte=function(){function e(t,n,r,i){i===void 0&&(i=Nte()),this.appId=t,this.appName=n,this.namespace=r,this.openDbPromise=i}return e.prototype.getLastFetchStatus=function(){return this.get("last_fetch_status")},e.prototype.setLastFetchStatus=function(t){return this.set("last_fetch_status",t)},e.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.get("last_successful_fetch_timestamp_millis")},e.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.set("last_successful_fetch_timestamp_millis",t)},e.prototype.getLastSuccessfulFetchResponse=function(){return this.get("last_successful_fetch_response")},e.prototype.setLastSuccessfulFetchResponse=function(t){return this.set("last_successful_fetch_response",t)},e.prototype.getActiveConfig=function(){return this.get("active_config")},e.prototype.setActiveConfig=function(t){return this.set("active_config",t)},e.prototype.getActiveConfigEtag=function(){return this.get("active_config_etag")},e.prototype.setActiveConfigEtag=function(t){return this.set("active_config_etag",t)},e.prototype.getThrottleMetadata=function(){return this.get("throttle_metadata")},e.prototype.setThrottleMetadata=function(t){return this.set("throttle_metadata",t)},e.prototype.deleteThrottleMetadata=function(){return this.delete("throttle_metadata")},e.prototype.get=function(t){return R(this,void 0,void 0,function(){var n,r=this;return A(this,function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return n=i.sent(),[2,new Promise(function(s,a){var c=n.transaction([Bs],"readonly"),l=c.objectStore(Bs),h=r.createCompositeKey(t);try{var d=l.get(h);d.onerror=function(v){a(yp(v,"storage-get"))},d.onsuccess=function(v){var g=v.target.result;s(g?g.value:void 0)}}catch(v){a(jr.create("storage-get",{originalErrorMessage:v&&v.message}))}})]}})})},e.prototype.set=function(t,n){return R(this,void 0,void 0,function(){var r,i=this;return A(this,function(s){switch(s.label){case 0:return[4,this.openDbPromise];case 1:return r=s.sent(),[2,new Promise(function(a,c){var l=r.transaction([Bs],"readwrite"),h=l.objectStore(Bs),d=i.createCompositeKey(t);try{var v=h.put({compositeKey:d,value:n});v.onerror=function(g){c(yp(g,"storage-set"))},v.onsuccess=function(){a()}}catch(g){c(jr.create("storage-set",{originalErrorMessage:g&&g.message}))}})]}})})},e.prototype.delete=function(t){return R(this,void 0,void 0,function(){var n,r=this;return A(this,function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return n=i.sent(),[2,new Promise(function(s,a){var c=n.transaction([Bs],"readwrite"),l=c.objectStore(Bs),h=r.createCompositeKey(t);try{var d=l.delete(h);d.onerror=function(v){a(yp(v,"storage-delete"))},d.onsuccess=function(){s()}}catch(v){a(jr.create("storage-delete",{originalErrorMessage:v&&v.message}))}})]}})})},e.prototype.createCompositeKey=function(t){return[this.appId,this.appName,this.namespace,t].join()},e}();/** + */function _p(e,t){var n=e.target.error||void 0;return jr.create(t,{originalErrorMessage:n&&n.message})}var Bs="app_namespace_store",Ste="firebase_remote_config",Cte=1;function Ate(){return new Promise(function(e,t){var n=indexedDB.open(Ste,Cte);n.onerror=function(r){t(_p(r,"storage-open"))},n.onsuccess=function(r){e(r.target.result)},n.onupgradeneeded=function(r){var i=r.target.result;switch(r.oldVersion){case 0:i.createObjectStore(Bs,{keyPath:"compositeKey"})}}})}var kte=function(){function e(t,n,r,i){i===void 0&&(i=Ate()),this.appId=t,this.appName=n,this.namespace=r,this.openDbPromise=i}return e.prototype.getLastFetchStatus=function(){return this.get("last_fetch_status")},e.prototype.setLastFetchStatus=function(t){return this.set("last_fetch_status",t)},e.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.get("last_successful_fetch_timestamp_millis")},e.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.set("last_successful_fetch_timestamp_millis",t)},e.prototype.getLastSuccessfulFetchResponse=function(){return this.get("last_successful_fetch_response")},e.prototype.setLastSuccessfulFetchResponse=function(t){return this.set("last_successful_fetch_response",t)},e.prototype.getActiveConfig=function(){return this.get("active_config")},e.prototype.setActiveConfig=function(t){return this.set("active_config",t)},e.prototype.getActiveConfigEtag=function(){return this.get("active_config_etag")},e.prototype.setActiveConfigEtag=function(t){return this.set("active_config_etag",t)},e.prototype.getThrottleMetadata=function(){return this.get("throttle_metadata")},e.prototype.setThrottleMetadata=function(t){return this.set("throttle_metadata",t)},e.prototype.deleteThrottleMetadata=function(){return this.delete("throttle_metadata")},e.prototype.get=function(t){return R(this,void 0,void 0,function(){var n,r=this;return A(this,function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return n=i.sent(),[2,new Promise(function(s,a){var c=n.transaction([Bs],"readonly"),l=c.objectStore(Bs),h=r.createCompositeKey(t);try{var d=l.get(h);d.onerror=function(v){a(_p(v,"storage-get"))},d.onsuccess=function(v){var g=v.target.result;s(g?g.value:void 0)}}catch(v){a(jr.create("storage-get",{originalErrorMessage:v&&v.message}))}})]}})})},e.prototype.set=function(t,n){return R(this,void 0,void 0,function(){var r,i=this;return A(this,function(s){switch(s.label){case 0:return[4,this.openDbPromise];case 1:return r=s.sent(),[2,new Promise(function(a,c){var l=r.transaction([Bs],"readwrite"),h=l.objectStore(Bs),d=i.createCompositeKey(t);try{var v=h.put({compositeKey:d,value:n});v.onerror=function(g){c(_p(g,"storage-set"))},v.onsuccess=function(){a()}}catch(g){c(jr.create("storage-set",{originalErrorMessage:g&&g.message}))}})]}})})},e.prototype.delete=function(t){return R(this,void 0,void 0,function(){var n,r=this;return A(this,function(i){switch(i.label){case 0:return[4,this.openDbPromise];case 1:return n=i.sent(),[2,new Promise(function(s,a){var c=n.transaction([Bs],"readwrite"),l=c.objectStore(Bs),h=r.createCompositeKey(t);try{var d=l.delete(h);d.onerror=function(v){a(_p(v,"storage-delete"))},d.onsuccess=function(){s()}}catch(v){a(jr.create("storage-delete",{originalErrorMessage:v&&v.message}))}})]}})})},e.prototype.createCompositeKey=function(t){return[this.appId,this.appName,this.namespace,t].join()},e}();/** * @license * Copyright 2019 Google LLC * @@ -4470,7 +4470,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Ote=function(){function e(t){this.storage=t}return e.prototype.getLastFetchStatus=function(){return this.lastFetchStatus},e.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.lastSuccessfulFetchTimestampMillis},e.prototype.getActiveConfig=function(){return this.activeConfig},e.prototype.loadFromStorage=function(){return R(this,void 0,void 0,function(){var t,n,r,i,s,a;return A(this,function(c){switch(c.label){case 0:return t=this.storage.getLastFetchStatus(),n=this.storage.getLastSuccessfulFetchTimestampMillis(),r=this.storage.getActiveConfig(),[4,t];case 1:return i=c.sent(),i&&(this.lastFetchStatus=i),[4,n];case 2:return s=c.sent(),s&&(this.lastSuccessfulFetchTimestampMillis=s),[4,r];case 3:return a=c.sent(),a&&(this.activeConfig=a),[2]}})})},e.prototype.setLastFetchStatus=function(t){return this.lastFetchStatus=t,this.storage.setLastFetchStatus(t)},e.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.lastSuccessfulFetchTimestampMillis=t,this.storage.setLastSuccessfulFetchTimestampMillis(t)},e.prototype.setActiveConfig=function(t){return this.activeConfig=t,this.storage.setActiveConfig(t)},e}();/** + */var Rte=function(){function e(t){this.storage=t}return e.prototype.getLastFetchStatus=function(){return this.lastFetchStatus},e.prototype.getLastSuccessfulFetchTimestampMillis=function(){return this.lastSuccessfulFetchTimestampMillis},e.prototype.getActiveConfig=function(){return this.activeConfig},e.prototype.loadFromStorage=function(){return R(this,void 0,void 0,function(){var t,n,r,i,s,a;return A(this,function(c){switch(c.label){case 0:return t=this.storage.getLastFetchStatus(),n=this.storage.getLastSuccessfulFetchTimestampMillis(),r=this.storage.getActiveConfig(),[4,t];case 1:return i=c.sent(),i&&(this.lastFetchStatus=i),[4,n];case 2:return s=c.sent(),s&&(this.lastSuccessfulFetchTimestampMillis=s),[4,r];case 3:return a=c.sent(),a&&(this.activeConfig=a),[2]}})})},e.prototype.setLastFetchStatus=function(t){return this.lastFetchStatus=t,this.storage.setLastFetchStatus(t)},e.prototype.setLastSuccessfulFetchTimestampMillis=function(t){return this.lastSuccessfulFetchTimestampMillis=t,this.storage.setLastSuccessfulFetchTimestampMillis(t)},e.prototype.setActiveConfig=function(t){return this.activeConfig=t,this.storage.setActiveConfig(t)},e}();/** * @license * Copyright 2019 Google LLC * @@ -4485,7 +4485,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Pte(e,t){return new Promise(function(n,r){var i=Math.max(t-Date.now(),0),s=setTimeout(n,i);e.addEventListener(function(){clearTimeout(s),r(jr.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}function Dte(e){if(!(e instanceof Sc)||!e.customData)return!1;var t=Number(e.customData.httpStatus);return t===429||t===500||t===503||t===504}var Mte=function(){function e(t,n){this.client=t,this.storage=n}return e.prototype.fetch=function(t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return[4,this.storage.getThrottleMetadata()];case 1:return n=r.sent()||{backoffCount:0,throttleEndTimeMillis:Date.now()},[2,this.attemptFetch(t,n)]}})})},e.prototype.attemptFetch=function(t,n){var r=n.throttleEndTimeMillis,i=n.backoffCount;return R(this,void 0,void 0,function(){var s,a,c;return A(this,function(l){switch(l.label){case 0:return[4,Pte(t.signal,r)];case 1:l.sent(),l.label=2;case 2:return l.trys.push([2,5,,7]),[4,this.client.fetch(t)];case 3:return s=l.sent(),[4,this.storage.deleteThrottleMetadata()];case 4:return l.sent(),[2,s];case 5:if(a=l.sent(),!Dte(a))throw a;return c={throttleEndTimeMillis:Date.now()+nb(i),backoffCount:i+1},[4,this.storage.setThrottleMetadata(c)];case 6:return l.sent(),[2,this.attemptFetch(t,c)];case 7:return[2]}})})},e}(),hx="@firebase/remote-config",Lte="0.1.43";/** + */function Nte(e,t){return new Promise(function(n,r){var i=Math.max(t-Date.now(),0),s=setTimeout(n,i);e.addEventListener(function(){clearTimeout(s),r(jr.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}function xte(e){if(!(e instanceof Sc)||!e.customData)return!1;var t=Number(e.customData.httpStatus);return t===429||t===500||t===503||t===504}var Ote=function(){function e(t,n){this.client=t,this.storage=n}return e.prototype.fetch=function(t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:return[4,this.storage.getThrottleMetadata()];case 1:return n=r.sent()||{backoffCount:0,throttleEndTimeMillis:Date.now()},[2,this.attemptFetch(t,n)]}})})},e.prototype.attemptFetch=function(t,n){var r=n.throttleEndTimeMillis,i=n.backoffCount;return R(this,void 0,void 0,function(){var s,a,c;return A(this,function(l){switch(l.label){case 0:return[4,Nte(t.signal,r)];case 1:l.sent(),l.label=2;case 2:return l.trys.push([2,5,,7]),[4,this.client.fetch(t)];case 3:return s=l.sent(),[4,this.storage.deleteThrottleMetadata()];case 4:return l.sent(),[2,s];case 5:if(a=l.sent(),!xte(a))throw a;return c={throttleEndTimeMillis:Date.now()+nb(i),backoffCount:i+1},[4,this.storage.setThrottleMetadata(c)];case 6:return l.sent(),[2,this.attemptFetch(t,c)];case 7:return[2]}})})},e}(),hx="@firebase/remote-config",Pte="0.1.43";/** * @license * Copyright 2019 Google LLC * @@ -4500,7 +4500,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function Fte(e){e.INTERNAL.registerComponent(new On("remoteConfig",t,"PUBLIC").setMultipleInstances(!0)),e.registerVersion(hx,Lte);function t(n,r){var i=r.instanceIdentifier,s=n.getProvider("app").getImmediate(),a=n.getProvider("installations").getImmediate();if(typeof window>"u")throw jr.create("registration-window");var c=s.options,l=c.projectId,h=c.apiKey,d=c.appId;if(!l)throw jr.create("registration-project-id");if(!h)throw jr.create("registration-api-key");if(!d)throw jr.create("registration-app-id");i=i||"firebase";var v=new xte(d,s.name,i),g=new Ote(v),y=new Ra(hx);y.logLevel=Le.ERROR;var _=new _te(a,e.SDK_VERSION,i,l,h,d),b=new Mte(_,v),T=new vte(b,v,g,y),C=new Cte(s,T,g,v,y);return C.ensureInitialized(),C}}Fte(se);/** + */function Dte(e){e.INTERNAL.registerComponent(new xn("remoteConfig",t,"PUBLIC").setMultipleInstances(!0)),e.registerVersion(hx,Pte);function t(n,r){var i=r.instanceIdentifier,s=n.getProvider("app").getImmediate(),a=n.getProvider("installations").getImmediate();if(typeof window>"u")throw jr.create("registration-window");var c=s.options,l=c.projectId,h=c.apiKey,d=c.appId;if(!l)throw jr.create("registration-project-id");if(!h)throw jr.create("registration-api-key");if(!d)throw jr.create("registration-app-id");i=i||"firebase";var v=new kte(d,s.name,i),g=new Rte(v),y=new Ra(hx);y.logLevel=Le.ERROR;var _=new gte(a,e.SDK_VERSION,i,l,h,d),b=new Ote(_,v),T=new hte(b,v,g,y),C=new Tte(s,T,g,v,y);return C.ensureInitialized(),C}}Dte(oe);/** * @license * Copyright 2020 Google LLC * @@ -4515,7 +4515,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var ti,Ute=(ti={},ti["already-activated"]="You are trying to activate AppCheck for FirebaseApp {$appName}, while it is already activated. AppCheck can only be activated once.",ti["use-before-activation"]="AppCheck is being used before activate() is called for FirebaseApp {$appName}. Please make sure you call activate() before instantiating other Firebase services.",ti["fetch-network-error"]="Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",ti["fetch-parse-error"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",ti["fetch-status-error"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",ti["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",ti["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",ti["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",ti["recaptcha-error"]="ReCAPTCHA error.",ti),Sr=new mo("appCheck","AppCheck",Ute);/** + */var ti,Mte=(ti={},ti["already-activated"]="You are trying to activate AppCheck for FirebaseApp {$appName}, while it is already activated. AppCheck can only be activated once.",ti["use-before-activation"]="AppCheck is being used before activate() is called for FirebaseApp {$appName}. Please make sure you call activate() before instantiating other Firebase services.",ti["fetch-network-error"]="Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.",ti["fetch-parse-error"]="Fetch client could not parse response. Original error: {$originalErrorMessage}.",ti["fetch-status-error"]="Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.",ti["storage-open"]="Error thrown when opening storage. Original error: {$originalErrorMessage}.",ti["storage-get"]="Error thrown when reading from storage. Original error: {$originalErrorMessage}.",ti["storage-set"]="Error thrown when writing to storage. Original error: {$originalErrorMessage}.",ti["recaptcha-error"]="ReCAPTCHA error.",ti),Sr=new go("appCheck","AppCheck",Mte);/** * @license * Copyright 2020 Google LLC * @@ -4530,7 +4530,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var H2=new Map,jte={activated:!1,tokenObservers:[]},Vte={enabled:!1};function Yn(e){return H2.get(e)||jte}function Di(e,t){H2.set(e,t)}function mI(){return Vte}/** + */var H2=new Map,Lte={activated:!1,tokenObservers:[]},Fte={enabled:!1};function Qn(e){return H2.get(e)||Lte}function Di(e,t){H2.set(e,t)}function mI(){return Fte}/** * @license * Copyright 2020 Google LLC * @@ -4545,7 +4545,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var K2="https://content-firebaseappcheck.googleapis.com/v1beta",Bte="exchangeRecaptchaToken",qte="exchangeDebugToken",dx={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3};/** + */var K2="https://content-firebaseappcheck.googleapis.com/v1beta",Ute="exchangeRecaptchaToken",jte="exchangeDebugToken",dx={OFFSET_DURATION:5*60*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:16*60*1e3};/** * @license * Copyright 2020 Google LLC * @@ -4560,7 +4560,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var $te=function(){function e(t,n,r,i,s){if(this.operation=t,this.retryPolicy=n,this.getWaitDuration=r,this.lowerBound=i,this.upperBound=s,this.pending=null,this.nextErrorWaitInterval=i,i>s)throw new Error("Proactive refresh lower bound greater than upper bound!")}return e.prototype.start=function(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(function(){})},e.prototype.stop=function(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)},e.prototype.isRunning=function(){return!!this.pending},e.prototype.process=function(t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:this.stop(),r.label=1;case 1:return r.trys.push([1,6,,7]),this.pending=new on,[4,Hte(this.getNextRun(t))];case 2:return r.sent(),this.pending.resolve(),[4,this.pending.promise];case 3:return r.sent(),this.pending=new on,[4,this.operation()];case 4:return r.sent(),this.pending.resolve(),[4,this.pending.promise];case 5:return r.sent(),this.process(!0).catch(function(){}),[3,7];case 6:return n=r.sent(),this.retryPolicy(n)?this.process(!1).catch(function(){}):this.stop(),[3,7];case 7:return[2]}})})},e.prototype.getNextRun=function(t){if(t)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();var n=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),n},e}();function Hte(e){return new Promise(function(t){setTimeout(t,e)})}/** + */var Vte=function(){function e(t,n,r,i,s){if(this.operation=t,this.retryPolicy=n,this.getWaitDuration=r,this.lowerBound=i,this.upperBound=s,this.pending=null,this.nextErrorWaitInterval=i,i>s)throw new Error("Proactive refresh lower bound greater than upper bound!")}return e.prototype.start=function(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(function(){})},e.prototype.stop=function(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)},e.prototype.isRunning=function(){return!!this.pending},e.prototype.process=function(t){return R(this,void 0,void 0,function(){var n;return A(this,function(r){switch(r.label){case 0:this.stop(),r.label=1;case 1:return r.trys.push([1,6,,7]),this.pending=new rn,[4,Bte(this.getNextRun(t))];case 2:return r.sent(),this.pending.resolve(),[4,this.pending.promise];case 3:return r.sent(),this.pending=new rn,[4,this.operation()];case 4:return r.sent(),this.pending.resolve(),[4,this.pending.promise];case 5:return r.sent(),this.process(!0).catch(function(){}),[3,7];case 6:return n=r.sent(),this.retryPolicy(n)?this.process(!1).catch(function(){}):this.stop(),[3,7];case 7:return[2]}})})},e.prototype.getNextRun=function(t){if(t)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();var n=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),n},e}();function Bte(e){return new Promise(function(t){setTimeout(t,e)})}/** * @license * Copyright 2020 Google LLC * @@ -4575,7 +4575,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function px(){return self.grecaptcha}function W2(e){if(!Yn(e).activated)throw Sr.create("use-before-activation",{appName:e.name})}function Kte(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e==="x"?t:t&3|8;return n.toString(16)})}function Wte(e){return Kv.encodeString(JSON.stringify(e),!1)}/** + */function px(){return self.grecaptcha}function W2(e){if(!Qn(e).activated)throw Sr.create("use-before-activation",{appName:e.name})}function qte(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e==="x"?t:t&3|8;return n.toString(16)})}function $te(e){return Kv.encodeString(JSON.stringify(e),!1)}/** * @license * Copyright 2020 Google LLC * @@ -4590,7 +4590,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function G2(e,t){var n=e.url,r=e.body;return R(this,void 0,void 0,function(){var i,s,a,c,l,h,d,v,g,y;return A(this,function(_){switch(_.label){case 0:i={"Content-Type":"application/json"},s=t.getImmediate({optional:!0}),s&&(i["X-Firebase-Client"]=s.getPlatformInfoString()),a={method:"POST",body:JSON.stringify(r),headers:i},_.label=1;case 1:return _.trys.push([1,3,,4]),[4,fetch(n,a)];case 2:return c=_.sent(),[3,4];case 3:throw l=_.sent(),Sr.create("fetch-network-error",{originalErrorMessage:l.message});case 4:if(c.status!==200)throw Sr.create("fetch-status-error",{httpStatus:c.status});_.label=5;case 5:return _.trys.push([5,7,,8]),[4,c.json()];case 6:return h=_.sent(),[3,8];case 7:throw d=_.sent(),Sr.create("fetch-parse-error",{originalErrorMessage:d.message});case 8:if(v=h.ttl.match(/^([\d.]+)(s)$/),!v||!v[2]||isNaN(Number(v[1])))throw Sr.create("fetch-parse-error",{originalErrorMessage:"ttl field (timeToLive) is not in standard Protobuf Duration "+("format: "+h.ttl)});return g=Number(v[1])*1e3,y=Date.now(),[2,{token:h.attestationToken,expireTimeMillis:y+g,issuedAtTimeMillis:y}]}})})}function Gte(e,t){var n=e.options,r=n.projectId,i=n.appId,s=n.apiKey;return{url:K2+"/projects/"+r+"/apps/"+i+":"+Bte+"?key="+s,body:{recaptcha_token:t}}}function zte(e,t){var n=e.options,r=n.projectId,i=n.appId,s=n.apiKey;return{url:K2+"/projects/"+r+"/apps/"+i+":"+qte+"?key="+s,body:{debug_token:t}}}/** + */function G2(e,t){var n=e.url,r=e.body;return R(this,void 0,void 0,function(){var i,s,a,c,l,h,d,v,g,y;return A(this,function(_){switch(_.label){case 0:i={"Content-Type":"application/json"},s=t.getImmediate({optional:!0}),s&&(i["X-Firebase-Client"]=s.getPlatformInfoString()),a={method:"POST",body:JSON.stringify(r),headers:i},_.label=1;case 1:return _.trys.push([1,3,,4]),[4,fetch(n,a)];case 2:return c=_.sent(),[3,4];case 3:throw l=_.sent(),Sr.create("fetch-network-error",{originalErrorMessage:l.message});case 4:if(c.status!==200)throw Sr.create("fetch-status-error",{httpStatus:c.status});_.label=5;case 5:return _.trys.push([5,7,,8]),[4,c.json()];case 6:return h=_.sent(),[3,8];case 7:throw d=_.sent(),Sr.create("fetch-parse-error",{originalErrorMessage:d.message});case 8:if(v=h.ttl.match(/^([\d.]+)(s)$/),!v||!v[2]||isNaN(Number(v[1])))throw Sr.create("fetch-parse-error",{originalErrorMessage:"ttl field (timeToLive) is not in standard Protobuf Duration "+("format: "+h.ttl)});return g=Number(v[1])*1e3,y=Date.now(),[2,{token:h.attestationToken,expireTimeMillis:y+g,issuedAtTimeMillis:y}]}})})}function Hte(e,t){var n=e.options,r=n.projectId,i=n.appId,s=n.apiKey;return{url:K2+"/projects/"+r+"/apps/"+i+":"+Ute+"?key="+s,body:{recaptcha_token:t}}}function Kte(e,t){var n=e.options,r=n.projectId,i=n.appId,s=n.apiKey;return{url:K2+"/projects/"+r+"/apps/"+i+":"+jte+"?key="+s,body:{debug_token:t}}}/** * @license * Copyright 2020 Google LLC * @@ -4605,7 +4605,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var Qte="firebase-app-check-database",Yte=1,Gf="firebase-app-check-store",z2="debug-token",ep=null;function Q2(){return ep||(ep=new Promise(function(e,t){try{var n=indexedDB.open(Qte,Yte);n.onsuccess=function(r){e(r.target.result)},n.onerror=function(r){var i;t(Sr.create("storage-open",{originalErrorMessage:(i=r.target.error)===null||i===void 0?void 0:i.message}))},n.onupgradeneeded=function(r){var i=r.target.result;switch(r.oldVersion){case 0:i.createObjectStore(Gf,{keyPath:"compositeKey"})}}}catch(r){t(Sr.create("storage-open",{originalErrorMessage:r.message}))}}),ep)}function Xte(e){return X2(J2(e))}function Jte(e,t){return Y2(J2(e),t)}function Zte(e){return Y2(z2,e)}function ene(){return X2(z2)}function Y2(e,t){return R(this,void 0,void 0,function(){var n,r,i,s;return A(this,function(a){switch(a.label){case 0:return[4,Q2()];case 1:return n=a.sent(),r=n.transaction(Gf,"readwrite"),i=r.objectStore(Gf),s=i.put({compositeKey:e,value:t}),[2,new Promise(function(c,l){s.onsuccess=function(h){c()},r.onerror=function(h){var d;l(Sr.create("storage-set",{originalErrorMessage:(d=h.target.error)===null||d===void 0?void 0:d.message}))}})]}})})}function X2(e){return R(this,void 0,void 0,function(){var t,n,r,i;return A(this,function(s){switch(s.label){case 0:return[4,Q2()];case 1:return t=s.sent(),n=t.transaction(Gf,"readonly"),r=n.objectStore(Gf),i=r.get(e),[2,new Promise(function(a,c){i.onsuccess=function(l){var h=l.target.result;a(h?h.value:void 0)},n.onerror=function(l){var h;c(Sr.create("storage-get",{originalErrorMessage:(h=l.target.error)===null||h===void 0?void 0:h.message}))}})]}})})}function J2(e){return e.options.appId+"-"+e.name}/** + */var Wte="firebase-app-check-database",Gte=1,zf="firebase-app-check-store",z2="debug-token",tp=null;function Q2(){return tp||(tp=new Promise(function(e,t){try{var n=indexedDB.open(Wte,Gte);n.onsuccess=function(r){e(r.target.result)},n.onerror=function(r){var i;t(Sr.create("storage-open",{originalErrorMessage:(i=r.target.error)===null||i===void 0?void 0:i.message}))},n.onupgradeneeded=function(r){var i=r.target.result;switch(r.oldVersion){case 0:i.createObjectStore(zf,{keyPath:"compositeKey"})}}}catch(r){t(Sr.create("storage-open",{originalErrorMessage:r.message}))}}),tp)}function zte(e){return X2(J2(e))}function Qte(e,t){return Y2(J2(e),t)}function Yte(e){return Y2(z2,e)}function Xte(){return X2(z2)}function Y2(e,t){return R(this,void 0,void 0,function(){var n,r,i,s;return A(this,function(a){switch(a.label){case 0:return[4,Q2()];case 1:return n=a.sent(),r=n.transaction(zf,"readwrite"),i=r.objectStore(zf),s=i.put({compositeKey:e,value:t}),[2,new Promise(function(c,l){s.onsuccess=function(h){c()},r.onerror=function(h){var d;l(Sr.create("storage-set",{originalErrorMessage:(d=h.target.error)===null||d===void 0?void 0:d.message}))}})]}})})}function X2(e){return R(this,void 0,void 0,function(){var t,n,r,i;return A(this,function(s){switch(s.label){case 0:return[4,Q2()];case 1:return t=s.sent(),n=t.transaction(zf,"readonly"),r=n.objectStore(zf),i=r.get(e),[2,new Promise(function(a,c){i.onsuccess=function(l){var h=l.target.result;a(h?h.value:void 0)},n.onerror=function(l){var h;c(Sr.create("storage-get",{originalErrorMessage:(h=l.target.error)===null||h===void 0?void 0:h.message}))}})]}})})}function J2(e){return e.options.appId+"-"+e.name}/** * @license * Copyright 2020 Google LLC * @@ -4635,7 +4635,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function tne(e){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:if(!Jf())return[3,5];t=void 0,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,Xte(e)];case 2:return t=r.sent(),[3,4];case 3:return n=r.sent(),Yg.warn("Failed to read token from indexeddb. Error: "+n),[3,4];case 4:return[2,t];case 5:return[2,void 0]}})})}function vx(e,t){return Jf()?Jte(e,t).catch(function(n){Yg.warn("Failed to write token to indexeddb. Error: "+n)}):Promise.resolve()}function nne(){return R(this,void 0,void 0,function(){var e,t;return A(this,function(n){switch(n.label){case 0:e=void 0,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,ene()];case 2:return e=n.sent(),[3,4];case 3:return n.sent(),[3,4];case 4:return e?[2,e]:(t=Kte(),Zte(t).catch(function(r){return Yg.warn("Failed to persist debug token to indexeddb. Error: "+r)}),console.log("AppCheck debug token: "+t+". You will need to whitelist it in the Firebase console for it to work"),[2,t])}})})}/** + */function Jte(e){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:if(!Zf())return[3,5];t=void 0,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,zte(e)];case 2:return t=r.sent(),[3,4];case 3:return n=r.sent(),Yg.warn("Failed to read token from indexeddb. Error: "+n),[3,4];case 4:return[2,t];case 5:return[2,void 0]}})})}function vx(e,t){return Zf()?Qte(e,t).catch(function(n){Yg.warn("Failed to write token to indexeddb. Error: "+n)}):Promise.resolve()}function Zte(){return R(this,void 0,void 0,function(){var e,t;return A(this,function(n){switch(n.label){case 0:e=void 0,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Xte()];case 2:return e=n.sent(),[3,4];case 3:return n.sent(),[3,4];case 4:return e?[2,e]:(t=qte(),Yte(t).catch(function(r){return Yg.warn("Failed to persist debug token to indexeddb. Error: "+r)}),console.log("AppCheck debug token: "+t+". You will need to whitelist it in the Firebase console for it to work"),[2,t])}})})}/** * @license * Copyright 2020 Google LLC * @@ -4650,9 +4650,9 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function rne(){var e=mI();return e.enabled}function ine(){return R(this,void 0,void 0,function(){var e;return A(this,function(t){if(e=mI(),e.enabled&&e.token)return[2,e.token.promise];throw Error(` + */function ene(){var e=mI();return e.enabled}function tne(){return R(this,void 0,void 0,function(){var e;return A(this,function(t){if(e=mI(),e.enabled&&e.token)return[2,e.token.promise];throw Error(` Can't get debug token in production mode. - `)})})}function one(){var e=fW();if(!(typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN!="string"&&e.FIREBASE_APPCHECK_DEBUG_TOKEN!==!0)){var t=mI();t.enabled=!0;var n=new on;t.token=n,typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN=="string"?n.resolve(e.FIREBASE_APPCHECK_DEBUG_TOKEN):n.resolve(nne())}}/** + `)})})}function nne(){var e=uW();if(!(typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN!="string"&&e.FIREBASE_APPCHECK_DEBUG_TOKEN!==!0)){var t=mI();t.enabled=!0;var n=new rn;t.token=n,typeof e.FIREBASE_APPCHECK_DEBUG_TOKEN=="string"?n.resolve(e.FIREBASE_APPCHECK_DEBUG_TOKEN):n.resolve(Zte())}}/** * @license * Copyright 2020 Google LLC * @@ -4667,7 +4667,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var sne={error:"UNKNOWN_ERROR"};function Tv(e,t,n){return n===void 0&&(n=!1),R(this,void 0,void 0,function(){var r,i,s,a,c,l,h,d,v,g;return A(this,function(y){switch(y.label){case 0:return W2(e),r=Yn(e),i=r.token,s=void 0,i?[3,2]:[4,r.cachedTokenPromise];case 1:a=y.sent(),a&&zf(a)&&(i=a,Di(e,_e(_e({},r),{token:i})),gx(e,{token:i.token})),y.label=2;case 2:return!n&&i&&zf(i)?[2,{token:i.token}]:rne()?(l=G2,h=zte,d=[e],[4,ine()]):[3,6];case 3:return[4,l.apply(void 0,[h.apply(void 0,d.concat([y.sent()])),t])];case 4:return c=y.sent(),[4,vx(e,c)];case 5:return y.sent(),Di(e,_e(_e({},r),{token:c})),[2,{token:c.token}];case 6:return y.trys.push([6,8,,9]),[4,r.provider.getToken()];case 7:return i=y.sent(),[3,9];case 8:return v=y.sent(),Yg.error(v),s=v,[3,9];case 9:return i?[3,10]:(g=une(s),[3,12]);case 10:return g={token:i.token},Di(e,_e(_e({},r),{token:i})),[4,vx(e,i)];case 11:y.sent(),y.label=12;case 12:return gx(e,g),[2,g]}})})}function Z2(e,t,n,r,i){var s=Yn(e),a={next:r,error:i,type:n},c=_e(_e({},s),{tokenObservers:xe(xe([],s.tokenObservers),[a])});if(!c.tokenRefresher){var l=ane(e,t);c.tokenRefresher=l}if(!c.tokenRefresher.isRunning()&&s.isTokenAutoRefreshEnabled&&c.tokenRefresher.start(),s.token&&zf(s.token)){var h=s.token;Promise.resolve().then(function(){return r({token:h.token})}).catch(function(){})}else s.token==null&&s.cachedTokenPromise.then(function(d){d&&zf(d)&&r({token:d.token})}).catch(function(){});Di(e,c)}function yI(e,t){var n=Yn(e),r=n.tokenObservers.filter(function(i){return i.next!==t});r.length===0&&n.tokenRefresher&&n.tokenRefresher.isRunning()&&n.tokenRefresher.stop(),Di(e,_e(_e({},n),{tokenObservers:r}))}function ane(e,t){var n=this;return new $te(function(){return R(n,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return r=Yn(e),r.token?[3,2]:[4,Tv(e,t)];case 1:return i=s.sent(),[3,4];case 2:return[4,Tv(e,t,!0)];case 3:i=s.sent(),s.label=4;case 4:if(i.error)throw i.error;return[2]}})})},function(){return!0},function(){var r=Yn(e);if(r.token){var i=r.token.issuedAtTimeMillis+(r.token.expireTimeMillis-r.token.issuedAtTimeMillis)*.5+3e5,s=r.token.expireTimeMillis-5*60*1e3;return i=Math.min(i,s),Math.max(0,i-Date.now())}else return 0},dx.RETRIAL_MIN_WAIT,dx.RETRIAL_MAX_WAIT)}function gx(e,t){for(var n=Yn(e).tokenObservers,r=0,i=n;r0}function une(e){return{token:Wte(sne),error:e}}/** + */var rne={error:"UNKNOWN_ERROR"};function Tv(e,t,n){return n===void 0&&(n=!1),R(this,void 0,void 0,function(){var r,i,s,a,c,l,h,d,v,g;return A(this,function(y){switch(y.label){case 0:return W2(e),r=Qn(e),i=r.token,s=void 0,i?[3,2]:[4,r.cachedTokenPromise];case 1:a=y.sent(),a&&Qf(a)&&(i=a,Di(e,_e(_e({},r),{token:i})),gx(e,{token:i.token})),y.label=2;case 2:return!n&&i&&Qf(i)?[2,{token:i.token}]:ene()?(l=G2,h=Kte,d=[e],[4,tne()]):[3,6];case 3:return[4,l.apply(void 0,[h.apply(void 0,d.concat([y.sent()])),t])];case 4:return c=y.sent(),[4,vx(e,c)];case 5:return y.sent(),Di(e,_e(_e({},r),{token:c})),[2,{token:c.token}];case 6:return y.trys.push([6,8,,9]),[4,r.provider.getToken()];case 7:return i=y.sent(),[3,9];case 8:return v=y.sent(),Yg.error(v),s=v,[3,9];case 9:return i?[3,10]:(g=one(s),[3,12]);case 10:return g={token:i.token},Di(e,_e(_e({},r),{token:i})),[4,vx(e,i)];case 11:y.sent(),y.label=12;case 12:return gx(e,g),[2,g]}})})}function Z2(e,t,n,r,i){var s=Qn(e),a={next:r,error:i,type:n},c=_e(_e({},s),{tokenObservers:xe(xe([],s.tokenObservers),[a])});if(!c.tokenRefresher){var l=ine(e,t);c.tokenRefresher=l}if(!c.tokenRefresher.isRunning()&&s.isTokenAutoRefreshEnabled&&c.tokenRefresher.start(),s.token&&Qf(s.token)){var h=s.token;Promise.resolve().then(function(){return r({token:h.token})}).catch(function(){})}else s.token==null&&s.cachedTokenPromise.then(function(d){d&&Qf(d)&&r({token:d.token})}).catch(function(){});Di(e,c)}function yI(e,t){var n=Qn(e),r=n.tokenObservers.filter(function(i){return i.next!==t});r.length===0&&n.tokenRefresher&&n.tokenRefresher.isRunning()&&n.tokenRefresher.stop(),Di(e,_e(_e({},n),{tokenObservers:r}))}function ine(e,t){var n=this;return new Vte(function(){return R(n,void 0,void 0,function(){var r,i;return A(this,function(s){switch(s.label){case 0:return r=Qn(e),r.token?[3,2]:[4,Tv(e,t)];case 1:return i=s.sent(),[3,4];case 2:return[4,Tv(e,t,!0)];case 3:i=s.sent(),s.label=4;case 4:if(i.error)throw i.error;return[2]}})})},function(){return!0},function(){var r=Qn(e);if(r.token){var i=r.token.issuedAtTimeMillis+(r.token.expireTimeMillis-r.token.issuedAtTimeMillis)*.5+3e5,s=r.token.expireTimeMillis-5*60*1e3;return i=Math.min(i,s),Math.max(0,i-Date.now())}else return 0},dx.RETRIAL_MIN_WAIT,dx.RETRIAL_MAX_WAIT)}function gx(e,t){for(var n=Qn(e).tokenObservers,r=0,i=n;r0}function one(e){return{token:$te(rne),error:e}}/** * @license * Copyright 2020 Google LLC * @@ -4682,7 +4682,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var cne="https://www.google.com/recaptcha/api.js";function lne(e,t){var n=Yn(e),r=new on;Di(e,_e(_e({},n),{reCAPTCHAState:{initialized:r}}));var i="fire_app_check_"+e.name,s=document.createElement("div");s.id=i,s.style.display="none",document.body.appendChild(s);var a=px();return a?a.ready(function(){mx(e,t,a,i),r.resolve(a)}):hne(function(){var c=px();if(!c)throw new Error("no recaptcha");c.ready(function(){mx(e,t,c,i),r.resolve(c)})}),r.promise}function fne(e){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return W2(e),t=Yn(e).reCAPTCHAState,[4,t.initialized.promise];case 1:return n=r.sent(),[2,new Promise(function(i,s){var a=Yn(e).reCAPTCHAState;n.ready(function(){i(n.execute(a.widgetId,{action:"fire_app_check"}))})})]}})})}function mx(e,t,n,r){var i=n.render(r,{sitekey:t,size:"invisible"}),s=Yn(e);Di(e,_e(_e({},s),{reCAPTCHAState:_e(_e({},s.reCAPTCHAState),{widgetId:i})}))}function hne(e){var t=document.createElement("script");t.src=""+cne,t.onload=e,document.head.appendChild(t)}/** + */var sne="https://www.google.com/recaptcha/api.js";function ane(e,t){var n=Qn(e),r=new rn;Di(e,_e(_e({},n),{reCAPTCHAState:{initialized:r}}));var i="fire_app_check_"+e.name,s=document.createElement("div");s.id=i,s.style.display="none",document.body.appendChild(s);var a=px();return a?a.ready(function(){mx(e,t,a,i),r.resolve(a)}):cne(function(){var c=px();if(!c)throw new Error("no recaptcha");c.ready(function(){mx(e,t,c,i),r.resolve(c)})}),r.promise}function une(e){return R(this,void 0,void 0,function(){var t,n;return A(this,function(r){switch(r.label){case 0:return W2(e),t=Qn(e).reCAPTCHAState,[4,t.initialized.promise];case 1:return n=r.sent(),[2,new Promise(function(i,s){var a=Qn(e).reCAPTCHAState;n.ready(function(){i(n.execute(a.widgetId,{action:"fire_app_check"}))})})]}})})}function mx(e,t,n,r){var i=n.render(r,{sitekey:t,size:"invisible"}),s=Qn(e);Di(e,_e(_e({},s),{reCAPTCHAState:_e(_e({},s.reCAPTCHAState),{widgetId:i})}))}function cne(e){var t=document.createElement("script");t.src=""+sne,t.onload=e,document.head.appendChild(t)}/** * @license * Copyright 2021 Google LLC * @@ -4697,7 +4697,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var i0=function(){function e(t){this._siteKey=t}return e.prototype.getToken=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:if(!this._app||!this._platformLoggerProvider)throw Sr.create("use-before-activation",{appName:""});n.label=1;case 1:return n.trys.push([1,3,,4]),[4,fne(this._app)];case 2:return t=n.sent(),[3,4];case 3:throw n.sent(),Sr.create("recaptcha-error");case 4:return[2,G2(Gte(this._app,t),this._platformLoggerProvider)]}})})},e.prototype.initialize=function(t,n){this._app=t,this._platformLoggerProvider=n,lne(t,this._siteKey).catch(function(){})},e}(),o0=function(){function e(t){this._customProviderOptions=t}return e.prototype.getToken=function(){return R(this,void 0,void 0,function(){var t,n,r;return A(this,function(i){switch(i.label){case 0:if(!this._app)throw Sr.create("use-before-activation",{appName:""});return[4,this._customProviderOptions.getToken()];case 1:return t=i.sent(),n=vW(t.token),r=n!==null&&n0?n*1e3:Date.now(),[2,_e(_e({},t),{issuedAtTimeMillis:r})]}})})},e.prototype.initialize=function(t){this._app=t},e}();/** + */var i0=function(){function e(t){this._siteKey=t}return e.prototype.getToken=function(){return R(this,void 0,void 0,function(){var t;return A(this,function(n){switch(n.label){case 0:if(!this._app||!this._platformLoggerProvider)throw Sr.create("use-before-activation",{appName:""});n.label=1;case 1:return n.trys.push([1,3,,4]),[4,une(this._app)];case 2:return t=n.sent(),[3,4];case 3:throw n.sent(),Sr.create("recaptcha-error");case 4:return[2,G2(Hte(this._app,t),this._platformLoggerProvider)]}})})},e.prototype.initialize=function(t,n){this._app=t,this._platformLoggerProvider=n,ane(t,this._siteKey).catch(function(){})},e}(),o0=function(){function e(t){this._customProviderOptions=t}return e.prototype.getToken=function(){return R(this,void 0,void 0,function(){var t,n,r;return A(this,function(i){switch(i.label){case 0:if(!this._app)throw Sr.create("use-before-activation",{appName:""});return[4,this._customProviderOptions.getToken()];case 1:return t=i.sent(),n=hW(t.token),r=n!==null&&n0?n*1e3:Date.now(),[2,_e(_e({},t),{issuedAtTimeMillis:r})]}})})},e.prototype.initialize=function(t){this._app=t},e}();/** * @license * Copyright 2020 Google LLC * @@ -4712,7 +4712,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function dne(e,t,n,r){var i=Yn(e);if(i.activated)throw Sr.create("already-activated",{appName:e.name});var s=_e(_e({},i),{activated:!0});s.cachedTokenPromise=tne(e).then(function(a){return a&&zf(a)&&Di(e,_e(_e({},Yn(e)),{token:a})),a}),typeof t=="string"?s.provider=new i0(t):t instanceof i0||t instanceof o0?s.provider=t:s.provider=new o0({getToken:t.getToken}),s.isTokenAutoRefreshEnabled=r===void 0?e.automaticDataCollectionEnabled:r,Di(e,s),s.provider.initialize(e,n)}function pne(e,t){var n=Yn(e);n.tokenRefresher&&(t===!0?n.tokenRefresher.start():n.tokenRefresher.stop()),Di(e,_e(_e({},n),{isTokenAutoRefreshEnabled:t}))}function vne(e,t,n){return R(this,void 0,void 0,function(){var r;return A(this,function(i){switch(i.label){case 0:return[4,Tv(e,t,n)];case 1:if(r=i.sent(),r.error)throw r.error;return[2,{token:r.token}]}})})}function gne(e,t,n,r,i){var s=function(){},a=function(){};return n.next!=null?s=n.next.bind(n):s=n,n.error!=null?a=n.error.bind(n):r&&(a=r),Z2(e,t,"EXTERNAL",s,a),function(){return yI(e,s)}}/** + */function lne(e,t,n,r){var i=Qn(e);if(i.activated)throw Sr.create("already-activated",{appName:e.name});var s=_e(_e({},i),{activated:!0});s.cachedTokenPromise=Jte(e).then(function(a){return a&&Qf(a)&&Di(e,_e(_e({},Qn(e)),{token:a})),a}),typeof t=="string"?s.provider=new i0(t):t instanceof i0||t instanceof o0?s.provider=t:s.provider=new o0({getToken:t.getToken}),s.isTokenAutoRefreshEnabled=r===void 0?e.automaticDataCollectionEnabled:r,Di(e,s),s.provider.initialize(e,n)}function fne(e,t){var n=Qn(e);n.tokenRefresher&&(t===!0?n.tokenRefresher.start():n.tokenRefresher.stop()),Di(e,_e(_e({},n),{isTokenAutoRefreshEnabled:t}))}function hne(e,t,n){return R(this,void 0,void 0,function(){var r;return A(this,function(i){switch(i.label){case 0:return[4,Tv(e,t,n)];case 1:if(r=i.sent(),r.error)throw r.error;return[2,{token:r.token}]}})})}function dne(e,t,n,r,i){var s=function(){},a=function(){};return n.next!=null?s=n.next.bind(n):s=n,n.error!=null?a=n.error.bind(n):r&&(a=r),Z2(e,t,"EXTERNAL",s,a),function(){return yI(e,s)}}/** * @license * Copyright 2020 Google LLC * @@ -4727,7 +4727,7 @@ Content-Type: `+h.contentType+`\r * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */function mne(e,t){return{app:e,activate:function(n,r){return dne(e,n,t,r)},setTokenAutoRefreshEnabled:function(n){return pne(e,n)},getToken:function(n){return vne(e,t,n)},onTokenChanged:function(n,r,i){return gne(e,t,n,r)},INTERNAL:{delete:function(){for(var n=Yn(e).tokenObservers,r=0,i=n;r'; Typescript: import firebase from 'firebase/app'; import 'firebase/'; -`);se.registerVersion(Ine,Sne);const Cne={},Ane={class:"relative flex w-full flex-wrap items-center justify-between bg-[#FBFBFB] py-2 shadow-lg lg:py-4 dark:bg-sky-950","data-te-navbar-ref":""};function kne(e,t){return en(),Hn("nav",Ane,[Mv(e.$slots,"default")])}const _I=Vi(Cne,[["render",kne]]);function Xg(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Xg),r}var s0=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(s0||{}),Rne=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Rne||{});function qc({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...i}){var s;let a=nU(r,n),c=Object.assign(i,{props:a});if(e||t&2&&a.static)return Sw(c);if(t&1){let l=(s=a.unmount)==null||s?0:1;return Xg(l,{0(){return null},1(){return Sw({...i,props:{...a,hidden:!0,style:{display:"none"}}})}})}return Sw(c)}function Sw({props:e,attrs:t,slots:n,slot:r,name:i}){var s,a;let{as:c,...l}=rU(e,["unmount","static"]),h=(s=n.default)==null?void 0:s.call(n,r),d={};if(r){let v=!1,g=[];for(let[y,_]of Object.entries(r))typeof _=="boolean"&&(v=!0),_===!0&&g.push(y);v&&(d["data-headlessui-state"]=g.join(" "))}if(c==="template"){if(h=tU(h??[]),Object.keys(l).length>0||Object.keys(t).length>0){let[v,...g]=h??[];if(!xne(v)||g.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(l).concat(Object.keys(t)).map(b=>b.trim()).filter((b,T,C)=>C.indexOf(b)===T).sort((b,T)=>b.localeCompare(T)).map(b=>` - ${b}`).join(` +`);oe.registerVersion(bne,Ene);const Tne={},Ine={class:"relative flex w-full flex-wrap items-center justify-between bg-[#FBFBFB] py-2 shadow-lg lg:py-4 dark:bg-sky-950","data-te-navbar-ref":""};function Sne(e,t){return pn(),ir("nav",Ine,[Mv(e.$slots,"default")])}const _I=Vi(Tne,[["render",Sne]]);function Xg(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Xg),r}var s0=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(s0||{}),Cne=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Cne||{});function qc({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...i}){var s;let a=nU(r,n),c=Object.assign(i,{props:a});if(e||t&2&&a.static)return Sw(c);if(t&1){let l=(s=a.unmount)==null||s?0:1;return Xg(l,{0(){return null},1(){return Sw({...i,props:{...a,hidden:!0,style:{display:"none"}}})}})}return Sw(c)}function Sw({props:e,attrs:t,slots:n,slot:r,name:i}){var s,a;let{as:c,...l}=rU(e,["unmount","static"]),h=(s=n.default)==null?void 0:s.call(n,r),d={};if(r){let v=!1,g=[];for(let[y,_]of Object.entries(r))typeof _=="boolean"&&(v=!0),_===!0&&g.push(y);v&&(d["data-headlessui-state"]=g.join(" "))}if(c==="template"){if(h=tU(h??[]),Object.keys(l).length>0||Object.keys(t).length>0){let[v,...g]=h??[];if(!kne(v)||g.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${i} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(l).concat(Object.keys(t)).map(b=>b.trim()).filter((b,T,C)=>C.indexOf(b)===T).sort((b,T)=>b.localeCompare(T)).map(b=>` - ${b}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(b=>` - ${b}`).join(` `)].join(` -`));let y=nU((a=v.props)!=null?a:{},l),_=co(v,y);for(let b in y)b.startsWith("on")&&(_.props||(_.props={}),_.props[b]=y[b]);return _}return Array.isArray(h)&&h.length===1?h[0]:h}return ts(c,Object.assign({},l,d),{default:()=>h})}function tU(e){return e.flatMap(t=>t.type===Zt?tU(t.children):[t])}function nU(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...s){let a=n[r];for(let c of a){if(i instanceof Event&&i.defaultPrevented)return;c(i,...s)}}});return t}function Nne(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function rU(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function xne(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}let One=0;function Pne(){return++One}function Jg(){return Pne()}var Ht=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ht||{});function Dne(e){throw new Error("Unexpected object: "+e)}var Cr=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Cr||{});function Mne(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1,s=(()=>{switch(e.focus){case 0:return n.findIndex(a=>!t.resolveDisabled(a));case 1:{let a=n.slice().reverse().findIndex((c,l,h)=>i!==-1&&h.length-l-1>=i?!1:!t.resolveDisabled(c));return a===-1?a:n.length-1-a}case 2:return n.findIndex((a,c)=>c<=i?!1:!t.resolveDisabled(a));case 3:{let a=n.slice().reverse().findIndex(c=>!t.resolveDisabled(c));return a===-1?a:n.length-1-a}case 4:return n.findIndex(a=>t.resolveId(a)===e.id);case 5:return null;default:Dne(e)}})();return s===-1?r:s}function kt(e){var t;return e==null||e.value==null?null:(t=e.value.$el)!=null?t:e.value}let iU=Symbol("Context");var Qf=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Qf||{});function Lne(){return ar(iU,null)}function Fne(e){Ou(iU,e)}function _x(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function oU(e,t){let n=Ue(_x(e.value.type,e.value.as));return Aa(()=>{n.value=_x(e.value.type,e.value.as)}),Ec(()=>{var r;n.value||kt(t)&&kt(t)instanceof HTMLButtonElement&&!((r=kt(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}var Une=Object.defineProperty,jne=(e,t,n)=>t in e?Une(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wx=(e,t,n)=>(jne(e,typeof t!="symbol"?t+"":t,n),n);class Vne{constructor(){wx(this,"current",this.detect()),wx(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let wI=new Vne;function bI(e){if(wI.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=kt(e);if(t)return t.ownerDocument}return document}function Bne({container:e,accept:t,walk:n,enabled:r}){Ec(()=>{let i=e.value;if(!i||r!==void 0&&!r.value)return;let s=bI(e);if(!s)return;let a=Object.assign(l=>t(l),{acceptNode:t}),c=s.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,a,!1);for(;c.nextNode();)n(c.currentNode)})}let a0=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var u0=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(u0||{}),qne=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(qne||{}),$ne=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))($ne||{});function sU(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(a0)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var EI=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(EI||{});function TI(e,t=0){var n;return e===((n=bI(e))==null?void 0:n.body)?!1:Xg(t,{0(){return e.matches(a0)},1(){let r=e;for(;r!==null;){if(r.matches(a0))return!0;r=r.parentElement}return!1}})}function aU(e){let t=bI(e);ui(()=>{t&&!TI(t.activeElement,0)&&Kne(e)})}var Hne=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Hne||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Kne(e){e==null||e.focus({preventScroll:!0})}let Wne=["textarea","input"].join(",");function Gne(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Wne))!=null?n:!1}function uU(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);if(i===null||s===null)return 0;let a=i.compareDocumentPosition(s);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function zne(e,t){return Qne(sU(),t,{relativeTo:e})}function Qne(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){var s;let a=(s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?s:document,c=Array.isArray(e)?n?uU(e):e:sU(e);i.length>0&&c.length>1&&(c=c.filter(_=>!i.includes(_))),r=r??a.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),h=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,c.indexOf(r))-1;if(t&4)return Math.max(0,c.indexOf(r))+1;if(t&8)return c.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},v=0,g=c.length,y;do{if(v>=g||v+g<=0)return 0;let _=h+v;if(t&16)_=(_+g)%g;else{if(_<0)return 3;if(_>=g)return 1}y=c[_],y==null||y.focus(d),v+=l}while(y!==a.activeElement);return t&6&&Gne(y)&&y.select(),2}function tp(e,t,n){wI.isServer||Ec(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function Yne(e,t,n){wI.isServer||Ec(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function Xne(e,t,n=Ze(()=>!0)){function r(s,a){if(!n.value||s.defaultPrevented)return;let c=a(s);if(c===null||!c.getRootNode().contains(c))return;let l=function h(d){return typeof d=="function"?h(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let h of l){if(h===null)continue;let d=h instanceof HTMLElement?h:kt(h);if(d!=null&&d.contains(c)||s.composed&&s.composedPath().includes(d))return}return!TI(c,EI.Loose)&&c.tabIndex!==-1&&s.preventDefault(),t(s,c)}let i=Ue(null);tp("pointerdown",s=>{var a,c;n.value&&(i.value=((c=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:c[0])||s.target)},!0),tp("mousedown",s=>{var a,c;n.value&&(i.value=((c=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:c[0])||s.target)},!0),tp("click",s=>{i.value&&(r(s,()=>i.value),i.value=null)},!0),tp("touchend",s=>r(s,()=>s.target instanceof HTMLElement?s.target:null),!0),Yne("blur",s=>r(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var cU=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(cU||{});let Jne=vo({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...i}=e,s={"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return qc({ourProps:s,theirProps:i,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function Zne(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let i of r.elements)if(i!==e&&(i.tagName==="INPUT"&&i.type==="submit"||i.tagName==="BUTTON"&&i.type==="submit"||i.nodeName==="INPUT"&&i.type==="image")){i.click();return}(n=r.requestSubmit)==null||n.call(r)}}function ere(e,t,n){let r=Ue(n==null?void 0:n.value),i=Ze(()=>e.value!==void 0);return[Ze(()=>i.value?e.value:r.value),function(s){return i.value||(r.value=s),t==null?void 0:t(s)}]}function bx(e){return[e.screenX,e.screenY]}function tre(){let e=Ue([-1,-1]);return{wasMoved(t){let n=bx(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=bx(t)}}}let Ex=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Tx(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let s=!1;for(let c of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),s=!0;let a=s?(n=i.innerText)!=null?n:"":r;return Ex.test(a)&&(a=a.replace(Ex,"")),a}function nre(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let s=document.getElementById(i);if(s){let a=s.getAttribute("aria-label");return typeof a=="string"?a.trim():Tx(s).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Tx(e).trim()}function rre(e){let t=Ue(""),n=Ue("");return()=>{let r=kt(e);if(!r)return"";let i=r.innerText;if(t.value===i)return n.value;let s=nre(r).trim().toLowerCase();return t.value=i,n.value=s,s}}var ire=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ire||{}),ore=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(ore||{});function sre(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let lU=Symbol("MenuContext");function Zg(e){let t=ar(lU,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Zg),n}return t}let are=vo({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:n}){let r=Ue(1),i=Ue(null),s=Ue(null),a=Ue([]),c=Ue(""),l=Ue(null),h=Ue(1);function d(g=y=>y){let y=l.value!==null?a.value[l.value]:null,_=uU(g(a.value.slice()),T=>kt(T.dataRef.domRef)),b=y?_.indexOf(y):null;return b===-1&&(b=null),{items:_,activeItemIndex:b}}let v={menuState:r,buttonRef:i,itemsRef:s,items:a,searchQuery:c,activeItemIndex:l,activationTrigger:h,closeMenu:()=>{r.value=1,l.value=null},openMenu:()=>r.value=0,goToItem(g,y,_){let b=d(),T=Mne(g===Cr.Specific?{focus:Cr.Specific,id:y}:{focus:g},{resolveItems:()=>b.items,resolveActiveIndex:()=>b.activeItemIndex,resolveId:C=>C.id,resolveDisabled:C=>C.dataRef.disabled});c.value="",l.value=T,h.value=_??1,a.value=b.items},search(g){let y=c.value!==""?0:1;c.value+=g.toLowerCase();let _=(l.value!==null?a.value.slice(l.value+y).concat(a.value.slice(0,l.value+y)):a.value).find(T=>T.dataRef.textValue.startsWith(c.value)&&!T.dataRef.disabled),b=_?a.value.indexOf(_):-1;b===-1||b===l.value||(l.value=b,h.value=1)},clearSearch(){c.value=""},registerItem(g,y){let _=d(b=>[...b,{id:g,dataRef:y}]);a.value=_.items,l.value=_.activeItemIndex,h.value=1},unregisterItem(g){let y=d(_=>{let b=_.findIndex(T=>T.id===g);return b!==-1&&_.splice(b,1),_});a.value=y.items,l.value=y.activeItemIndex,h.value=1}};return Xne([i,s],(g,y)=>{var _;v.closeMenu(),TI(y,EI.Loose)||(g.preventDefault(),(_=kt(i))==null||_.focus())},Ze(()=>r.value===0)),Ou(lU,v),Fne(Ze(()=>Xg(r.value,{0:Qf.Open,1:Qf.Closed}))),()=>{let g={open:r.value===0,close:v.closeMenu};return qc({ourProps:{},theirProps:e,slot:g,slots:t,attrs:n,name:"Menu"})}}}),ure=vo({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:()=>`headlessui-menu-button-${Jg()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=Zg("MenuButton");r({el:i.buttonRef,$el:i.buttonRef});function s(h){switch(h.key){case Ht.Space:case Ht.Enter:case Ht.ArrowDown:h.preventDefault(),h.stopPropagation(),i.openMenu(),ui(()=>{var d;(d=kt(i.itemsRef))==null||d.focus({preventScroll:!0}),i.goToItem(Cr.First)});break;case Ht.ArrowUp:h.preventDefault(),h.stopPropagation(),i.openMenu(),ui(()=>{var d;(d=kt(i.itemsRef))==null||d.focus({preventScroll:!0}),i.goToItem(Cr.Last)});break}}function a(h){switch(h.key){case Ht.Space:h.preventDefault();break}}function c(h){e.disabled||(i.menuState.value===0?(i.closeMenu(),ui(()=>{var d;return(d=kt(i.buttonRef))==null?void 0:d.focus({preventScroll:!0})})):(h.preventDefault(),i.openMenu(),sre(()=>{var d;return(d=kt(i.itemsRef))==null?void 0:d.focus({preventScroll:!0})})))}let l=oU(Ze(()=>({as:e.as,type:t.type})),i.buttonRef);return()=>{var h;let d={open:i.menuState.value===0},{id:v,...g}=e,y={ref:i.buttonRef,id:v,type:l.value,"aria-haspopup":"menu","aria-controls":(h=kt(i.itemsRef))==null?void 0:h.id,"aria-expanded":i.menuState.value===0,onKeydown:s,onKeyup:a,onClick:c};return qc({ourProps:y,theirProps:g,slot:d,attrs:t,slots:n,name:"MenuButton"})}}}),cre=vo({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-menu-items-${Jg()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=Zg("MenuItems"),s=Ue(null);r({el:i.itemsRef,$el:i.itemsRef}),Bne({container:Ze(()=>kt(i.itemsRef)),enabled:Ze(()=>i.menuState.value===0),accept(d){return d.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:d.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(d){d.setAttribute("role","none")}});function a(d){var v;switch(s.value&&clearTimeout(s.value),d.key){case Ht.Space:if(i.searchQuery.value!=="")return d.preventDefault(),d.stopPropagation(),i.search(d.key);case Ht.Enter:if(d.preventDefault(),d.stopPropagation(),i.activeItemIndex.value!==null){let g=i.items.value[i.activeItemIndex.value];(v=kt(g.dataRef.domRef))==null||v.click()}i.closeMenu(),aU(kt(i.buttonRef));break;case Ht.ArrowDown:return d.preventDefault(),d.stopPropagation(),i.goToItem(Cr.Next);case Ht.ArrowUp:return d.preventDefault(),d.stopPropagation(),i.goToItem(Cr.Previous);case Ht.Home:case Ht.PageUp:return d.preventDefault(),d.stopPropagation(),i.goToItem(Cr.First);case Ht.End:case Ht.PageDown:return d.preventDefault(),d.stopPropagation(),i.goToItem(Cr.Last);case Ht.Escape:d.preventDefault(),d.stopPropagation(),i.closeMenu(),ui(()=>{var g;return(g=kt(i.buttonRef))==null?void 0:g.focus({preventScroll:!0})});break;case Ht.Tab:d.preventDefault(),d.stopPropagation(),i.closeMenu(),ui(()=>zne(kt(i.buttonRef),d.shiftKey?u0.Previous:u0.Next));break;default:d.key.length===1&&(i.search(d.key),s.value=setTimeout(()=>i.clearSearch(),350));break}}function c(d){switch(d.key){case Ht.Space:d.preventDefault();break}}let l=Lne(),h=Ze(()=>l!==null?(l.value&Qf.Open)===Qf.Open:i.menuState.value===0);return()=>{var d,v;let g={open:i.menuState.value===0},{id:y,..._}=e,b={"aria-activedescendant":i.activeItemIndex.value===null||(d=i.items.value[i.activeItemIndex.value])==null?void 0:d.id,"aria-labelledby":(v=kt(i.buttonRef))==null?void 0:v.id,id:y,onKeydown:a,onKeyup:c,role:"menu",tabIndex:0,ref:i.itemsRef};return qc({ourProps:b,theirProps:_,slot:g,attrs:t,slots:n,features:s0.RenderStrategy|s0.Static,visible:h.value,name:"MenuItems"})}}}),lre=vo({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-menu-item-${Jg()}`}},setup(e,{slots:t,attrs:n,expose:r}){let i=Zg("MenuItem"),s=Ue(null);r({el:s,$el:s});let a=Ze(()=>i.activeItemIndex.value!==null?i.items.value[i.activeItemIndex.value].id===e.id:!1),c=rre(s),l=Ze(()=>({disabled:e.disabled,get textValue(){return c()},domRef:s}));Aa(()=>i.registerItem(e.id,l)),R0(()=>i.unregisterItem(e.id)),Ec(()=>{i.menuState.value===0&&a.value&&i.activationTrigger.value!==0&&ui(()=>{var b,T;return(T=(b=kt(s))==null?void 0:b.scrollIntoView)==null?void 0:T.call(b,{block:"nearest"})})});function h(b){if(e.disabled)return b.preventDefault();i.closeMenu(),aU(kt(i.buttonRef))}function d(){if(e.disabled)return i.goToItem(Cr.Nothing);i.goToItem(Cr.Specific,e.id)}let v=tre();function g(b){v.update(b)}function y(b){v.wasMoved(b)&&(e.disabled||a.value||i.goToItem(Cr.Specific,e.id,0))}function _(b){v.wasMoved(b)&&(e.disabled||a.value&&i.goToItem(Cr.Nothing))}return()=>{let{disabled:b}=e,T={active:a.value,disabled:b,close:i.closeMenu},{id:C,...x}=e;return qc({ourProps:{id:C,ref:s,role:"menuitem",tabIndex:b===!0?void 0:-1,"aria-disabled":b===!0?!0:void 0,disabled:void 0,onClick:h,onFocus:d,onPointerenter:g,onMouseenter:g,onPointermove:y,onMousemove:y,onPointerleave:_,onMouseleave:_},theirProps:{...n,...x},slot:T,attrs:n,slots:t,name:"MenuItem"})}}}),fre=Symbol("GroupContext"),hre=vo({name:"Switch",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"button"},modelValue:{type:Boolean,default:void 0},defaultChecked:{type:Boolean,optional:!0},form:{type:String,optional:!0},name:{type:String,optional:!0},value:{type:String,optional:!0},id:{type:String,default:()=>`headlessui-switch-${Jg()}`}},inheritAttrs:!1,setup(e,{emit:t,attrs:n,slots:r,expose:i}){let s=ar(fre,null),[a,c]=ere(Ze(()=>e.modelValue),T=>t("update:modelValue",T),Ze(()=>e.defaultChecked));function l(){c(!a.value)}let h=Ue(null),d=s===null?h:s.switchRef,v=oU(Ze(()=>({as:e.as,type:n.type})),d);i({el:d,$el:d});function g(T){T.preventDefault(),l()}function y(T){T.key===Ht.Space?(T.preventDefault(),l()):T.key===Ht.Enter&&Zne(T.currentTarget)}function _(T){T.preventDefault()}let b=Ze(()=>{var T,C;return(C=(T=kt(d))==null?void 0:T.closest)==null?void 0:C.call(T,"form")});return Aa(()=>{Ri([b],()=>{if(!b.value||e.defaultChecked===void 0)return;function T(){c(e.defaultChecked)}return b.value.addEventListener("reset",T),()=>{var C;(C=b.value)==null||C.removeEventListener("reset",T)}},{immediate:!0})}),()=>{let{id:T,name:C,value:x,form:O,...L}=e,$={checked:a.value},P={id:T,ref:d,role:"switch",type:v.value,tabIndex:0,"aria-checked":a.value,"aria-labelledby":s==null?void 0:s.labelledby.value,"aria-describedby":s==null?void 0:s.describedby.value,onClick:g,onKeyup:y,onKeypress:_};return ts(Zt,[C!=null&&a.value!=null?ts(Jne,Nne({features:cU.Hidden,as:"input",type:"checkbox",hidden:!0,readOnly:!0,checked:a.value,form:O,name:C,value:x})):null,qc({ourProps:P,theirProps:{...n,...rU(L,["modelValue","defaultChecked"])},slot:$,attrs:n,slots:r,name:"Switch"})])}}});function fU(e){return Dx()?(FB(e),!0):!1}function mc(e){return typeof e=="function"?e():Nu(e)}const dre=typeof window<"u"&&typeof document<"u",pre=Object.prototype.toString,vre=e=>pre.call(e)==="[object Object]",hU=()=>{};function gre(e,t){function n(...r){return new Promise((i,s)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(s)})}return n}const dU=e=>e();function mre(e=dU){const t=Ue(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...s)=>{t.value&&e(...s)};return{isActive:Rv(t),pause:n,resume:r,eventFilter:i}}function yre(...e){if(e.length!==1)return y3(...e);const t=e[0];return typeof t=="function"?Rv(v3(()=>({get:t,set:hU}))):Ue(t)}function _re(e,t,n={}){const{eventFilter:r=dU,...i}=n;return Ri(e,gre(r,t),i)}function wre(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:s,pause:a,resume:c,isActive:l}=mre(r);return{stop:_re(e,t,{...i,eventFilter:s}),pause:a,resume:c,isActive:l}}function bre(e,t=!0){D0()?Aa(e):t?e():ui(e)}function Ere(e=!1,t={}){const{truthyValue:n=!0,falsyValue:r=!1}=t,i=Wt(e),s=Ue(e);function a(c){if(arguments.length)return s.value=c,s.value;{const l=mc(n);return s.value=s.value===l?mc(r):l,s.value}}return i?a:[s,a]}function pU(e){var t;const n=mc(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Yf=dre?window:void 0;function Ix(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=Yf):[t,n,r,i]=e,!t)return hU;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(d=>d()),s.length=0},c=(d,v,g,y)=>(d.addEventListener(v,g,y),()=>d.removeEventListener(v,g,y)),l=Ri(()=>[pU(t),mc(i)],([d,v])=>{if(a(),!d)return;const g=vre(v)?{...v}:v;s.push(...n.flatMap(y=>r.map(_=>c(d,y,_,g))))},{immediate:!0,flush:"post"}),h=()=>{l(),a()};return fU(h),h}function Tre(){const e=Ue(!1);return D0()&&Aa(()=>{e.value=!0}),e}function Ire(e){const t=Tre();return Ze(()=>(t.value,!!e()))}function Sre(e,t={}){const{window:n=Yf}=t,r=Ire(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let i;const s=Ue(!1),a=h=>{s.value=h.matches},c=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",a):i.removeListener(a))},l=Ec(()=>{r.value&&(c(),i=n.matchMedia(mc(e)),"addEventListener"in i?i.addEventListener("change",a):i.addListener(a),s.value=i.matches)});return fU(()=>{l(),c(),i=void 0}),s}const np=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},rp="__vueuse_ssr_handlers__",Cre=Are();function Are(){return rp in np||(np[rp]=np[rp]||{}),np[rp]}function vU(e,t){return Cre[e]||t}function kre(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"}const Rre={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()}},Sx="vueuse-storage";function Nre(e,t,n,r={}){var i;const{flush:s="pre",deep:a=!0,listenToStorageChanges:c=!0,writeDefaults:l=!0,mergeDefaults:h=!1,shallow:d,window:v=Yf,eventFilter:g,onError:y=F=>{console.error(F)}}=r,_=(d?Gx:Ue)(t);if(!n)try{n=vU("getDefaultStorage",()=>{var F;return(F=Yf)==null?void 0:F.localStorage})()}catch(F){y(F)}if(!n)return _;const b=mc(t),T=kre(b),C=(i=r.serializer)!=null?i:Rre[T],{pause:x,resume:O}=wre(_,()=>L(_.value),{flush:s,deep:a,eventFilter:g});return v&&c&&(Ix(v,"storage",re),Ix(v,Sx,P)),re(),_;function L(F){try{if(F==null)n.removeItem(e);else{const oe=C.write(F),k=n.getItem(e);k!==oe&&(n.setItem(e,oe),v&&v.dispatchEvent(new CustomEvent(Sx,{detail:{key:e,oldValue:k,newValue:oe,storageArea:n}})))}}catch(oe){y(oe)}}function $(F){const oe=F?F.newValue:n.getItem(e);if(oe==null)return l&&b!==null&&n.setItem(e,C.write(b)),b;if(!F&&h){const k=C.read(oe);return typeof h=="function"?h(k,b):T==="object"&&!Array.isArray(k)?{...b,...k}:k}else return typeof oe!="string"?oe:C.read(oe)}function P(F){re(F.detail)}function re(F){if(!(F&&F.storageArea!==n)){if(F&&F.key==null){_.value=b;return}if(!(F&&F.key!==e)){x();try{(F==null?void 0:F.newValue)!==C.write(_.value)&&(_.value=$(F))}catch(oe){y(oe)}finally{F?ui(O):O()}}}}}function xre(e){return Sre("(prefers-color-scheme: dark)",e)}function Ore(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:i=Yf,storage:s,storageKey:a="vueuse-color-scheme",listenToStorageChanges:c=!0,storageRef:l,emitAuto:h,disableTransition:d=!0}=e,v={auto:"",light:"light",dark:"dark",...e.modes||{}},g=xre({window:i}),y=Ze(()=>g.value?"dark":"light"),_=l||(a==null?yre(r):Nre(a,r,s,{window:i,listenToStorageChanges:c})),b=Ze(()=>_.value==="auto"?y.value:_.value),T=vU("updateHTMLAttrs",(L,$,P)=>{const re=typeof L=="string"?i==null?void 0:i.document.querySelector(L):pU(L);if(!re)return;let F;if(d){F=i.document.createElement("style");const oe="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";F.appendChild(document.createTextNode(oe)),i.document.head.appendChild(F)}if($==="class"){const oe=P.split(/\s/g);Object.values(v).flatMap(k=>(k||"").split(/\s/g)).filter(Boolean).forEach(k=>{oe.includes(k)?re.classList.add(k):re.classList.remove(k)})}else re.setAttribute($,P);d&&(i.getComputedStyle(F).opacity,document.head.removeChild(F))});function C(L){var $;T(t,n,($=v[L])!=null?$:L)}function x(L){e.onChanged?e.onChanged(L,C):C(L)}Ri(b,x,{flush:"post",immediate:!0}),bre(()=>x(b.value));const O=Ze({get(){return h?_.value:b.value},set(L){_.value=L}});try{return Object.assign(O,{store:_,system:y,state:b})}catch{return O}}function Pre(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=Ore({...e,onChanged:(s,a)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,s==="dark",a,s):a(s)},modes:{dark:t,light:n}});return Ze({get(){return r.value==="dark"},set(s){const a=s?"dark":"light";r.system.value===a?r.value="auto":r.value=a}})}const Dre={components:{LoginComponent:ZK,ErrorMessage:rW,BaseHeader:_I,Icon:K0,Menu:are,MenuButton:ure,MenuItems:cre,MenuItem:lre,Switch:hre},setup(){const e=qO(),t=Ue(),n=Pre(),r=Ere(n);function i(s){const a=Ue(s[0]),c=Ue(s[1]),l=Ue(s[2]);t.value="",l.value==="Login"?se.auth().signInWithEmailAndPassword(a.value,c.value).then(()=>{e.replace("/tasks")}).catch(h=>{switch(h.code){case"auth/invalid-email":t.value="Invalid email";break;case"auth/user-not-found":t.value="No account with that email was found";break;case"auth/wrong-password":t.value="Incorrect password";break;default:t.value="Email or password was incorrect";break}}):l.value==="Signup"&&se.auth().createUserWithEmailAndPassword(a.value,c.value).then(()=>{alert("User created with success!")}).catch(h=>{console.log(h.code),alert(h.message)})}return{signupOrLogin:i,errMsg:t,isDark:n,toggleDark:r}}},Mre=ze("div",{class:"py-0 px-3 font-semibold dark:text-white"},"Task Project",-1),Lre={class:"flex"},Fre=ze("h1",{class:"font-semibold text-3xl p-4 dark:text-white"},"The Task Project",-1),Ure=ze("h3",{class:"font-medium text-2xl p-2 dark:text-white"}," Please login or signup to start your task list! ",-1);function jre(e,t,n,r,i,s){const a=Sn("Icon"),c=Sn("Switch"),l=Sn("base-header"),h=Sn("login-component"),d=Sn("error-message"),v=Sn("content-box");return en(),Hn(Zt,null,[Ye(l,null,{default:or(()=>[Mre,ze("div",Lre,[Ye(a,{icon:"iconamoon:mode-light",color:"black",width:"26",height:"26"}),Ye(c,{onClick:t[0]||(t[0]=g=>r.toggleDark()),modelValue:r.isDark,"onUpdate:modelValue":t[1]||(t[1]=g=>r.isDark=g),class:hf([r.isDark?"bg-gray-900":"bg-gray-700","relative inline-flex h-6 w-11 items-center rounded-full transition-colors"])},{default:or(()=>[ze("span",{class:hf([r.isDark?"translate-x-6":"translate-x-1","inline-block h-4 w-4 transform rounded-full bg-white transition-transform"])},null,2)]),_:1},8,["modelValue","class"]),Ye(a,{icon:"material-symbols:dark-mode-outline",color:"black",width:"26",height:"26"})])]),_:1}),Ye(v,null,{default:or(()=>[Fre,Ure,Ye(h,{onEmitUser:r.signupOrLogin},null,8,["onEmitUser"]),r.errMsg?(en(),O0(d,{key:0},{default:or(()=>[io(bp(r.errMsg),1)]),_:1})):wq("",!0)]),_:1})],64)}const Vre=Vi(Dre,[["render",jre]]);/*! +`));let y=nU((a=v.props)!=null?a:{},l),_=uo(v,y);for(let b in y)b.startsWith("on")&&(_.props||(_.props={}),_.props[b]=y[b]);return _}return Array.isArray(h)&&h.length===1?h[0]:h}return ts(c,Object.assign({},l,d),{default:()=>h})}function tU(e){return e.flatMap(t=>t.type===Zt?tU(t.children):[t])}function nU(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...s){let a=n[r];for(let c of a){if(i instanceof Event&&i.defaultPrevented)return;c(i,...s)}}});return t}function Ane(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function rU(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function kne(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}let Rne=0;function Nne(){return++Rne}function Jg(){return Nne()}var Ht=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Ht||{});function xne(e){throw new Error("Unexpected object: "+e)}var Cr=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Cr||{});function One(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1,s=(()=>{switch(e.focus){case 0:return n.findIndex(a=>!t.resolveDisabled(a));case 1:{let a=n.slice().reverse().findIndex((c,l,h)=>i!==-1&&h.length-l-1>=i?!1:!t.resolveDisabled(c));return a===-1?a:n.length-1-a}case 2:return n.findIndex((a,c)=>c<=i?!1:!t.resolveDisabled(a));case 3:{let a=n.slice().reverse().findIndex(c=>!t.resolveDisabled(c));return a===-1?a:n.length-1-a}case 4:return n.findIndex(a=>t.resolveId(a)===e.id);case 5:return null;default:xne(e)}})();return s===-1?r:s}function kt(e){var t;return e==null||e.value==null?null:(t=e.value.$el)!=null?t:e.value}let iU=Symbol("Context");var Yf=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Yf||{});function Pne(){return sr(iU,null)}function Dne(e){Ou(iU,e)}function _x(e,t){if(e)return e;let n=t??"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function oU(e,t){let n=Fe(_x(e.value.type,e.value.as));return Aa(()=>{n.value=_x(e.value.type,e.value.as)}),Ec(()=>{var r;n.value||kt(t)&&kt(t)instanceof HTMLButtonElement&&!((r=kt(t))!=null&&r.hasAttribute("type"))&&(n.value="button")}),n}var Mne=Object.defineProperty,Lne=(e,t,n)=>t in e?Mne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wx=(e,t,n)=>(Lne(e,typeof t!="symbol"?t+"":t,n),n);class Fne{constructor(){wx(this,"current",this.detect()),wx(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}}let wI=new Fne;function bI(e){if(wI.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=kt(e);if(t)return t.ownerDocument}return document}function Une({container:e,accept:t,walk:n,enabled:r}){Ec(()=>{let i=e.value;if(!i||r!==void 0&&!r.value)return;let s=bI(e);if(!s)return;let a=Object.assign(l=>t(l),{acceptNode:t}),c=s.createTreeWalker(i,NodeFilter.SHOW_ELEMENT,a,!1);for(;c.nextNode();)n(c.currentNode)})}let a0=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var u0=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(u0||{}),jne=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(jne||{}),Vne=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Vne||{});function sU(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(a0)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var EI=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(EI||{});function TI(e,t=0){var n;return e===((n=bI(e))==null?void 0:n.body)?!1:Xg(t,{0(){return e.matches(a0)},1(){let r=e;for(;r!==null;){if(r.matches(a0))return!0;r=r.parentElement}return!1}})}function aU(e){let t=bI(e);ui(()=>{t&&!TI(t.activeElement,0)&&qne(e)})}var Bne=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Bne||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function qne(e){e==null||e.focus({preventScroll:!0})}let $ne=["textarea","input"].join(",");function Hne(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,$ne))!=null?n:!1}function uU(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),s=t(r);if(i===null||s===null)return 0;let a=i.compareDocumentPosition(s);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Kne(e,t){return Wne(sU(),t,{relativeTo:e})}function Wne(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){var s;let a=(s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?s:document,c=Array.isArray(e)?n?uU(e):e:sU(e);i.length>0&&c.length>1&&(c=c.filter(_=>!i.includes(_))),r=r??a.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),h=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,c.indexOf(r))-1;if(t&4)return Math.max(0,c.indexOf(r))+1;if(t&8)return c.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},v=0,g=c.length,y;do{if(v>=g||v+g<=0)return 0;let _=h+v;if(t&16)_=(_+g)%g;else{if(_<0)return 3;if(_>=g)return 1}y=c[_],y==null||y.focus(d),v+=l}while(y!==a.activeElement);return t&6&&Hne(y)&&y.select(),2}function np(e,t,n){wI.isServer||Ec(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function Gne(e,t,n){wI.isServer||Ec(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function zne(e,t,n=Ze(()=>!0)){function r(s,a){if(!n.value||s.defaultPrevented)return;let c=a(s);if(c===null||!c.getRootNode().contains(c))return;let l=function h(d){return typeof d=="function"?h(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let h of l){if(h===null)continue;let d=h instanceof HTMLElement?h:kt(h);if(d!=null&&d.contains(c)||s.composed&&s.composedPath().includes(d))return}return!TI(c,EI.Loose)&&c.tabIndex!==-1&&s.preventDefault(),t(s,c)}let i=Fe(null);np("pointerdown",s=>{var a,c;n.value&&(i.value=((c=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:c[0])||s.target)},!0),np("mousedown",s=>{var a,c;n.value&&(i.value=((c=(a=s.composedPath)==null?void 0:a.call(s))==null?void 0:c[0])||s.target)},!0),np("click",s=>{i.value&&(r(s,()=>i.value),i.value=null)},!0),np("touchend",s=>r(s,()=>s.target instanceof HTMLElement?s.target:null),!0),Gne("blur",s=>r(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var cU=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(cU||{});let Qne=po({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{let{features:r,...i}=e,s={"aria-hidden":(r&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return qc({ourProps:s,theirProps:i,slot:{},attrs:n,slots:t,name:"Hidden"})}}});function Yne(e){var t,n;let r=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(r){for(let i of r.elements)if(i!==e&&(i.tagName==="INPUT"&&i.type==="submit"||i.tagName==="BUTTON"&&i.type==="submit"||i.nodeName==="INPUT"&&i.type==="image")){i.click();return}(n=r.requestSubmit)==null||n.call(r)}}function Xne(e,t,n){let r=Fe(n==null?void 0:n.value),i=Ze(()=>e.value!==void 0);return[Ze(()=>i.value?e.value:r.value),function(s){return i.value||(r.value=s),t==null?void 0:t(s)}]}function bx(e){return[e.screenX,e.screenY]}function Jne(){let e=Fe([-1,-1]);return{wasMoved(t){let n=bx(t);return e.value[0]===n[0]&&e.value[1]===n[1]?!1:(e.value=n,!0)},update(t){e.value=bx(t)}}}let Ex=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Tx(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let s=!1;for(let c of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),s=!0;let a=s?(n=i.innerText)!=null?n:"":r;return Ex.test(a)&&(a=a.replace(Ex,"")),a}function Zne(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let s=document.getElementById(i);if(s){let a=s.getAttribute("aria-label");return typeof a=="string"?a.trim():Tx(s).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return Tx(e).trim()}function ere(e){let t=Fe(""),n=Fe("");return()=>{let r=kt(e);if(!r)return"";let i=r.innerText;if(t.value===i)return n.value;let s=Zne(r).trim().toLowerCase();return t.value=i,n.value=s,s}}var tre=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(tre||{}),nre=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(nre||{});function rre(e){requestAnimationFrame(()=>requestAnimationFrame(e))}let lU=Symbol("MenuContext");function Zg(e){let t=sr(lU,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Zg),n}return t}let ire=po({name:"Menu",props:{as:{type:[Object,String],default:"template"}},setup(e,{slots:t,attrs:n}){let r=Fe(1),i=Fe(null),s=Fe(null),a=Fe([]),c=Fe(""),l=Fe(null),h=Fe(1);function d(g=y=>y){let y=l.value!==null?a.value[l.value]:null,_=uU(g(a.value.slice()),T=>kt(T.dataRef.domRef)),b=y?_.indexOf(y):null;return b===-1&&(b=null),{items:_,activeItemIndex:b}}let v={menuState:r,buttonRef:i,itemsRef:s,items:a,searchQuery:c,activeItemIndex:l,activationTrigger:h,closeMenu:()=>{r.value=1,l.value=null},openMenu:()=>r.value=0,goToItem(g,y,_){let b=d(),T=One(g===Cr.Specific?{focus:Cr.Specific,id:y}:{focus:g},{resolveItems:()=>b.items,resolveActiveIndex:()=>b.activeItemIndex,resolveId:C=>C.id,resolveDisabled:C=>C.dataRef.disabled});c.value="",l.value=T,h.value=_??1,a.value=b.items},search(g){let y=c.value!==""?0:1;c.value+=g.toLowerCase();let _=(l.value!==null?a.value.slice(l.value+y).concat(a.value.slice(0,l.value+y)):a.value).find(T=>T.dataRef.textValue.startsWith(c.value)&&!T.dataRef.disabled),b=_?a.value.indexOf(_):-1;b===-1||b===l.value||(l.value=b,h.value=1)},clearSearch(){c.value=""},registerItem(g,y){let _=d(b=>[...b,{id:g,dataRef:y}]);a.value=_.items,l.value=_.activeItemIndex,h.value=1},unregisterItem(g){let y=d(_=>{let b=_.findIndex(T=>T.id===g);return b!==-1&&_.splice(b,1),_});a.value=y.items,l.value=y.activeItemIndex,h.value=1}};return zne([i,s],(g,y)=>{var _;v.closeMenu(),TI(y,EI.Loose)||(g.preventDefault(),(_=kt(i))==null||_.focus())},Ze(()=>r.value===0)),Ou(lU,v),Dne(Ze(()=>Xg(r.value,{0:Yf.Open,1:Yf.Closed}))),()=>{let g={open:r.value===0,close:v.closeMenu};return qc({ourProps:{},theirProps:e,slot:g,slots:t,attrs:n,name:"Menu"})}}}),ore=po({name:"MenuButton",props:{disabled:{type:Boolean,default:!1},as:{type:[Object,String],default:"button"},id:{type:String,default:()=>`headlessui-menu-button-${Jg()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=Zg("MenuButton");r({el:i.buttonRef,$el:i.buttonRef});function s(h){switch(h.key){case Ht.Space:case Ht.Enter:case Ht.ArrowDown:h.preventDefault(),h.stopPropagation(),i.openMenu(),ui(()=>{var d;(d=kt(i.itemsRef))==null||d.focus({preventScroll:!0}),i.goToItem(Cr.First)});break;case Ht.ArrowUp:h.preventDefault(),h.stopPropagation(),i.openMenu(),ui(()=>{var d;(d=kt(i.itemsRef))==null||d.focus({preventScroll:!0}),i.goToItem(Cr.Last)});break}}function a(h){switch(h.key){case Ht.Space:h.preventDefault();break}}function c(h){e.disabled||(i.menuState.value===0?(i.closeMenu(),ui(()=>{var d;return(d=kt(i.buttonRef))==null?void 0:d.focus({preventScroll:!0})})):(h.preventDefault(),i.openMenu(),rre(()=>{var d;return(d=kt(i.itemsRef))==null?void 0:d.focus({preventScroll:!0})})))}let l=oU(Ze(()=>({as:e.as,type:t.type})),i.buttonRef);return()=>{var h;let d={open:i.menuState.value===0},{id:v,...g}=e,y={ref:i.buttonRef,id:v,type:l.value,"aria-haspopup":"menu","aria-controls":(h=kt(i.itemsRef))==null?void 0:h.id,"aria-expanded":i.menuState.value===0,onKeydown:s,onKeyup:a,onClick:c};return qc({ourProps:y,theirProps:g,slot:d,attrs:t,slots:n,name:"MenuButton"})}}}),sre=po({name:"MenuItems",props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:()=>`headlessui-menu-items-${Jg()}`}},setup(e,{attrs:t,slots:n,expose:r}){let i=Zg("MenuItems"),s=Fe(null);r({el:i.itemsRef,$el:i.itemsRef}),Une({container:Ze(()=>kt(i.itemsRef)),enabled:Ze(()=>i.menuState.value===0),accept(d){return d.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:d.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(d){d.setAttribute("role","none")}});function a(d){var v;switch(s.value&&clearTimeout(s.value),d.key){case Ht.Space:if(i.searchQuery.value!=="")return d.preventDefault(),d.stopPropagation(),i.search(d.key);case Ht.Enter:if(d.preventDefault(),d.stopPropagation(),i.activeItemIndex.value!==null){let g=i.items.value[i.activeItemIndex.value];(v=kt(g.dataRef.domRef))==null||v.click()}i.closeMenu(),aU(kt(i.buttonRef));break;case Ht.ArrowDown:return d.preventDefault(),d.stopPropagation(),i.goToItem(Cr.Next);case Ht.ArrowUp:return d.preventDefault(),d.stopPropagation(),i.goToItem(Cr.Previous);case Ht.Home:case Ht.PageUp:return d.preventDefault(),d.stopPropagation(),i.goToItem(Cr.First);case Ht.End:case Ht.PageDown:return d.preventDefault(),d.stopPropagation(),i.goToItem(Cr.Last);case Ht.Escape:d.preventDefault(),d.stopPropagation(),i.closeMenu(),ui(()=>{var g;return(g=kt(i.buttonRef))==null?void 0:g.focus({preventScroll:!0})});break;case Ht.Tab:d.preventDefault(),d.stopPropagation(),i.closeMenu(),ui(()=>Kne(kt(i.buttonRef),d.shiftKey?u0.Previous:u0.Next));break;default:d.key.length===1&&(i.search(d.key),s.value=setTimeout(()=>i.clearSearch(),350));break}}function c(d){switch(d.key){case Ht.Space:d.preventDefault();break}}let l=Pne(),h=Ze(()=>l!==null?(l.value&Yf.Open)===Yf.Open:i.menuState.value===0);return()=>{var d,v;let g={open:i.menuState.value===0},{id:y,..._}=e,b={"aria-activedescendant":i.activeItemIndex.value===null||(d=i.items.value[i.activeItemIndex.value])==null?void 0:d.id,"aria-labelledby":(v=kt(i.buttonRef))==null?void 0:v.id,id:y,onKeydown:a,onKeyup:c,role:"menu",tabIndex:0,ref:i.itemsRef};return qc({ourProps:b,theirProps:_,slot:g,attrs:t,slots:n,features:s0.RenderStrategy|s0.Static,visible:h.value,name:"MenuItems"})}}}),are=po({name:"MenuItem",inheritAttrs:!1,props:{as:{type:[Object,String],default:"template"},disabled:{type:Boolean,default:!1},id:{type:String,default:()=>`headlessui-menu-item-${Jg()}`}},setup(e,{slots:t,attrs:n,expose:r}){let i=Zg("MenuItem"),s=Fe(null);r({el:s,$el:s});let a=Ze(()=>i.activeItemIndex.value!==null?i.items.value[i.activeItemIndex.value].id===e.id:!1),c=ere(s),l=Ze(()=>({disabled:e.disabled,get textValue(){return c()},domRef:s}));Aa(()=>i.registerItem(e.id,l)),R0(()=>i.unregisterItem(e.id)),Ec(()=>{i.menuState.value===0&&a.value&&i.activationTrigger.value!==0&&ui(()=>{var b,T;return(T=(b=kt(s))==null?void 0:b.scrollIntoView)==null?void 0:T.call(b,{block:"nearest"})})});function h(b){if(e.disabled)return b.preventDefault();i.closeMenu(),aU(kt(i.buttonRef))}function d(){if(e.disabled)return i.goToItem(Cr.Nothing);i.goToItem(Cr.Specific,e.id)}let v=Jne();function g(b){v.update(b)}function y(b){v.wasMoved(b)&&(e.disabled||a.value||i.goToItem(Cr.Specific,e.id,0))}function _(b){v.wasMoved(b)&&(e.disabled||a.value&&i.goToItem(Cr.Nothing))}return()=>{let{disabled:b}=e,T={active:a.value,disabled:b,close:i.closeMenu},{id:C,...x}=e;return qc({ourProps:{id:C,ref:s,role:"menuitem",tabIndex:b===!0?void 0:-1,"aria-disabled":b===!0?!0:void 0,disabled:void 0,onClick:h,onFocus:d,onPointerenter:g,onMouseenter:g,onPointermove:y,onMousemove:y,onPointerleave:_,onMouseleave:_},theirProps:{...n,...x},slot:T,attrs:n,slots:t,name:"MenuItem"})}}}),ure=Symbol("GroupContext"),cre=po({name:"Switch",emits:{"update:modelValue":e=>!0},props:{as:{type:[Object,String],default:"button"},modelValue:{type:Boolean,default:void 0},defaultChecked:{type:Boolean,optional:!0},form:{type:String,optional:!0},name:{type:String,optional:!0},value:{type:String,optional:!0},id:{type:String,default:()=>`headlessui-switch-${Jg()}`}},inheritAttrs:!1,setup(e,{emit:t,attrs:n,slots:r,expose:i}){let s=sr(ure,null),[a,c]=Xne(Ze(()=>e.modelValue),T=>t("update:modelValue",T),Ze(()=>e.defaultChecked));function l(){c(!a.value)}let h=Fe(null),d=s===null?h:s.switchRef,v=oU(Ze(()=>({as:e.as,type:n.type})),d);i({el:d,$el:d});function g(T){T.preventDefault(),l()}function y(T){T.key===Ht.Space?(T.preventDefault(),l()):T.key===Ht.Enter&&Yne(T.currentTarget)}function _(T){T.preventDefault()}let b=Ze(()=>{var T,C;return(C=(T=kt(d))==null?void 0:T.closest)==null?void 0:C.call(T,"form")});return Aa(()=>{Ri([b],()=>{if(!b.value||e.defaultChecked===void 0)return;function T(){c(e.defaultChecked)}return b.value.addEventListener("reset",T),()=>{var C;(C=b.value)==null||C.removeEventListener("reset",T)}},{immediate:!0})}),()=>{let{id:T,name:C,value:x,form:O,...L}=e,$={checked:a.value},P={id:T,ref:d,role:"switch",type:v.value,tabIndex:0,"aria-checked":a.value,"aria-labelledby":s==null?void 0:s.labelledby.value,"aria-describedby":s==null?void 0:s.describedby.value,onClick:g,onKeyup:y,onKeypress:_};return ts(Zt,[C!=null&&a.value!=null?ts(Qne,Ane({features:cU.Hidden,as:"input",type:"checkbox",hidden:!0,readOnly:!0,checked:a.value,form:O,name:C,value:x})):null,qc({ourProps:P,theirProps:{...n,...rU(L,["modelValue","defaultChecked"])},slot:$,attrs:n,slots:r,name:"Switch"})])}}});function fU(e){return Dx()?(LB(e),!0):!1}function mc(e){return typeof e=="function"?e():Nu(e)}const lre=typeof window<"u"&&typeof document<"u",fre=Object.prototype.toString,hre=e=>fre.call(e)==="[object Object]",hU=()=>{};function dre(e,t){function n(...r){return new Promise((i,s)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(s)})}return n}const dU=e=>e();function pre(e=dU){const t=Fe(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...s)=>{t.value&&e(...s)};return{isActive:Rv(t),pause:n,resume:r,eventFilter:i}}function vre(...e){if(e.length!==1)return m3(...e);const t=e[0];return typeof t=="function"?Rv(p3(()=>({get:t,set:hU}))):Fe(t)}function gre(e,t,n={}){const{eventFilter:r=dU,...i}=n;return Ri(e,dre(r,t),i)}function mre(e,t,n={}){const{eventFilter:r,...i}=n,{eventFilter:s,pause:a,resume:c,isActive:l}=pre(r);return{stop:gre(e,t,{...i,eventFilter:s}),pause:a,resume:c,isActive:l}}function yre(e,t=!0){D0()?Aa(e):t?e():ui(e)}function _re(e=!1,t={}){const{truthyValue:n=!0,falsyValue:r=!1}=t,i=Wt(e),s=Fe(e);function a(c){if(arguments.length)return s.value=c,s.value;{const l=mc(n);return s.value=s.value===l?mc(r):l,s.value}}return i?a:[s,a]}function pU(e){var t;const n=mc(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Xf=lre?window:void 0;function Ix(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=Xf):[t,n,r,i]=e,!t)return hU;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(d=>d()),s.length=0},c=(d,v,g,y)=>(d.addEventListener(v,g,y),()=>d.removeEventListener(v,g,y)),l=Ri(()=>[pU(t),mc(i)],([d,v])=>{if(a(),!d)return;const g=hre(v)?{...v}:v;s.push(...n.flatMap(y=>r.map(_=>c(d,y,_,g))))},{immediate:!0,flush:"post"}),h=()=>{l(),a()};return fU(h),h}function wre(){const e=Fe(!1);return D0()&&Aa(()=>{e.value=!0}),e}function bre(e){const t=wre();return Ze(()=>(t.value,!!e()))}function Ere(e,t={}){const{window:n=Xf}=t,r=bre(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let i;const s=Fe(!1),a=h=>{s.value=h.matches},c=()=>{i&&("removeEventListener"in i?i.removeEventListener("change",a):i.removeListener(a))},l=Ec(()=>{r.value&&(c(),i=n.matchMedia(mc(e)),"addEventListener"in i?i.addEventListener("change",a):i.addListener(a),s.value=i.matches)});return fU(()=>{l(),c(),i=void 0}),s}const rp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ip="__vueuse_ssr_handlers__",Tre=Ire();function Ire(){return ip in rp||(rp[ip]=rp[ip]||{}),rp[ip]}function vU(e,t){return Tre[e]||t}function Sre(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"}const Cre={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()}},Sx="vueuse-storage";function Are(e,t,n,r={}){var i;const{flush:s="pre",deep:a=!0,listenToStorageChanges:c=!0,writeDefaults:l=!0,mergeDefaults:h=!1,shallow:d,window:v=Xf,eventFilter:g,onError:y=F=>{console.error(F)}}=r,_=(d?Gx:Fe)(t);if(!n)try{n=vU("getDefaultStorage",()=>{var F;return(F=Xf)==null?void 0:F.localStorage})()}catch(F){y(F)}if(!n)return _;const b=mc(t),T=Sre(b),C=(i=r.serializer)!=null?i:Cre[T],{pause:x,resume:O}=mre(_,()=>L(_.value),{flush:s,deep:a,eventFilter:g});return v&&c&&(Ix(v,"storage",re),Ix(v,Sx,P)),re(),_;function L(F){try{if(F==null)n.removeItem(e);else{const se=C.write(F),k=n.getItem(e);k!==se&&(n.setItem(e,se),v&&v.dispatchEvent(new CustomEvent(Sx,{detail:{key:e,oldValue:k,newValue:se,storageArea:n}})))}}catch(se){y(se)}}function $(F){const se=F?F.newValue:n.getItem(e);if(se==null)return l&&b!==null&&n.setItem(e,C.write(b)),b;if(!F&&h){const k=C.read(se);return typeof h=="function"?h(k,b):T==="object"&&!Array.isArray(k)?{...b,...k}:k}else return typeof se!="string"?se:C.read(se)}function P(F){re(F.detail)}function re(F){if(!(F&&F.storageArea!==n)){if(F&&F.key==null){_.value=b;return}if(!(F&&F.key!==e)){x();try{(F==null?void 0:F.newValue)!==C.write(_.value)&&(_.value=$(F))}catch(se){y(se)}finally{F?ui(O):O()}}}}}function kre(e){return Ere("(prefers-color-scheme: dark)",e)}function Rre(e={}){const{selector:t="html",attribute:n="class",initialValue:r="auto",window:i=Xf,storage:s,storageKey:a="vueuse-color-scheme",listenToStorageChanges:c=!0,storageRef:l,emitAuto:h,disableTransition:d=!0}=e,v={auto:"",light:"light",dark:"dark",...e.modes||{}},g=kre({window:i}),y=Ze(()=>g.value?"dark":"light"),_=l||(a==null?vre(r):Are(a,r,s,{window:i,listenToStorageChanges:c})),b=Ze(()=>_.value==="auto"?y.value:_.value),T=vU("updateHTMLAttrs",(L,$,P)=>{const re=typeof L=="string"?i==null?void 0:i.document.querySelector(L):pU(L);if(!re)return;let F;if(d){F=i.document.createElement("style");const se="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";F.appendChild(document.createTextNode(se)),i.document.head.appendChild(F)}if($==="class"){const se=P.split(/\s/g);Object.values(v).flatMap(k=>(k||"").split(/\s/g)).filter(Boolean).forEach(k=>{se.includes(k)?re.classList.add(k):re.classList.remove(k)})}else re.setAttribute($,P);d&&(i.getComputedStyle(F).opacity,document.head.removeChild(F))});function C(L){var $;T(t,n,($=v[L])!=null?$:L)}function x(L){e.onChanged?e.onChanged(L,C):C(L)}Ri(b,x,{flush:"post",immediate:!0}),yre(()=>x(b.value));const O=Ze({get(){return h?_.value:b.value},set(L){_.value=L}});try{return Object.assign(O,{store:_,system:y,state:b})}catch{return O}}function Nre(e={}){const{valueDark:t="dark",valueLight:n=""}=e,r=Rre({...e,onChanged:(s,a)=>{var c;e.onChanged?(c=e.onChanged)==null||c.call(e,s==="dark",a,s):a(s)},modes:{dark:t,light:n}});return Ze({get(){return r.value==="dark"},set(s){const a=s?"dark":"light";r.system.value===a?r.value="auto":r.value=a}})}const xre={components:{LoginComponent:YK,ErrorMessage:eW,BaseHeader:_I,Icon:K0,Menu:ire,MenuButton:ore,MenuItems:sre,MenuItem:are,Switch:cre},setup(){const e=qO(),t=Fe(),n=Nre(),r=_re(n);function i(s){const a=Fe(s[0]),c=Fe(s[1]),l=Fe(s[2]);t.value="",l.value==="Login"?oe.auth().signInWithEmailAndPassword(a.value,c.value).then(()=>{e.replace("/tasks")}).catch(h=>{switch(h.code){case"auth/invalid-email":t.value="Invalid email";break;case"auth/user-not-found":t.value="No account with that email was found";break;case"auth/wrong-password":t.value="Incorrect password";break;default:t.value="Email or password was incorrect";break}}):l.value==="Signup"&&oe.auth().createUserWithEmailAndPassword(a.value,c.value).then(()=>{alert("User created with success!")}).catch(h=>{console.log(h.code),alert(h.message)})}return{signupOrLogin:i,errMsg:t,isDark:n,toggleDark:r}}},Ore=Be("div",{class:"py-0 px-3 font-semibold dark:text-white"},"Task Project",-1),Pre={class:"flex"},Dre=Be("h1",{class:"font-semibold text-3xl p-4 dark:text-white"},"The Task Project",-1),Mre=Be("h3",{class:"font-medium text-2xl p-2 dark:text-white"}," Please login or signup to start your task list! ",-1);function Lre(e,t,n,r,i,s){const a=$n("Icon"),c=$n("Switch"),l=$n("base-header"),h=$n("login-component"),d=$n("error-message"),v=$n("content-box");return pn(),ir(Zt,null,[Je(l,null,{default:Er(()=>[Ore,Be("div",Pre,[Je(a,{icon:"iconamoon:mode-light",color:"black",width:"26",height:"26"}),Je(c,{onClick:t[0]||(t[0]=g=>r.toggleDark()),modelValue:r.isDark,"onUpdate:modelValue":t[1]||(t[1]=g=>r.isDark=g),class:hf([r.isDark?"bg-gray-900":"bg-gray-700","relative inline-flex h-6 w-11 items-center rounded-full transition-colors"])},{default:Er(()=>[Be("span",{class:hf([r.isDark?"translate-x-6":"translate-x-1","inline-block h-4 w-4 transform rounded-full bg-white transition-transform"])},null,2)]),_:1},8,["modelValue","class"]),Je(a,{icon:"material-symbols:dark-mode-outline",color:"black",width:"26",height:"26"})])]),_:1}),Je(v,null,{default:Er(()=>[Dre,Mre,Je(h,{onEmitUser:r.signupOrLogin},null,8,["onEmitUser"]),r.errMsg?(pn(),O0(d,{key:0},{default:Er(()=>[zo(Ep(r.errMsg),1)]),_:1})):gq("",!0)]),_:1})],64)}const Fre=Vi(xre,[["render",Lre]]);/*! * vuex v4.1.0 * (c) 2022 Evan You * @license MIT - */var gU="store";function mU(e){return e===void 0&&(e=null),ar(e!==null?e:gU)}function $c(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function Bre(e){return e!==null&&typeof e=="object"}function qre(e){return e&&typeof e.then=="function"}function $re(e,t){return function(){return e(t)}}function yU(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function _U(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;em(e,n,[],e._modules.root,!0),II(e,n,t)}function II(e,t,n){var r=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,a={},c={},l=MB(!0);l.run(function(){$c(s,function(h,d){a[d]=$re(h,e),c[d]=Ze(function(){return a[d]()}),Object.defineProperty(e.getters,d,{get:function(){return c[d].value},enumerable:!0})})}),e._state=bc({data:t}),e._scope=l,e.strict&&zre(e),r&&n&&e._withCommit(function(){r.data=null}),i&&i.stop()}function em(e,t,n,r,i){var s=!n.length,a=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=r),!s&&!i){var c=SI(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit(function(){c[l]=r.state})}var h=r.context=Hre(e,a,n);r.forEachMutation(function(d,v){var g=a+v;Kre(e,g,d,h)}),r.forEachAction(function(d,v){var g=d.root?v:a+v,y=d.handler||d;Wre(e,g,y,h)}),r.forEachGetter(function(d,v){var g=a+v;Gre(e,g,d,h)}),r.forEachChild(function(d,v){em(e,t,n.concat(v),d,i)})}function Hre(e,t,n){var r=t==="",i={dispatch:r?e.dispatch:function(s,a,c){var l=Iv(s,a,c),h=l.payload,d=l.options,v=l.type;return(!d||!d.root)&&(v=t+v),e.dispatch(v,h)},commit:r?e.commit:function(s,a,c){var l=Iv(s,a,c),h=l.payload,d=l.options,v=l.type;(!d||!d.root)&&(v=t+v),e.commit(v,h,d)}};return Object.defineProperties(i,{getters:{get:r?function(){return e.getters}:function(){return wU(e,t)}},state:{get:function(){return SI(e.state,n)}}}),i}function wU(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach(function(i){if(i.slice(0,r)===t){var s=i.slice(r);Object.defineProperty(n,s,{get:function(){return e.getters[i]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function Kre(e,t,n,r){var i=e._mutations[t]||(e._mutations[t]=[]);i.push(function(a){n.call(e,r.state,a)})}function Wre(e,t,n,r){var i=e._actions[t]||(e._actions[t]=[]);i.push(function(a){var c=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},a);return qre(c)||(c=Promise.resolve(c)),e._devtoolHook?c.catch(function(l){throw e._devtoolHook.emit("vuex:error",l),l}):c})}function Gre(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(s){return n(r.state,r.getters,s.state,s.getters)})}function zre(e){Ri(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function SI(e,t){return t.reduce(function(n,r){return n[r]},e)}function Iv(e,t,n){return Bre(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Qre="vuex bindings",Cx="vuex:mutations",Cw="vuex:actions",_u="vuex",Yre=0;function Xre(e,t){F$({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Qre]},function(n){n.addTimelineLayer({id:Cx,label:"Vuex Mutations",color:Ax}),n.addTimelineLayer({id:Cw,label:"Vuex Actions",color:Ax}),n.addInspector({id:_u,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(r){if(r.app===e&&r.inspectorId===_u)if(r.filter){var i=[];IU(i,t._modules.root,r.filter,""),r.rootNodes=i}else r.rootNodes=[TU(t._modules.root,"")]}),n.on.getInspectorState(function(r){if(r.app===e&&r.inspectorId===_u){var i=r.nodeId;wU(t,i),r.state=eie(nie(t._modules,i),i==="root"?t.getters:t._makeLocalGettersCache,i)}}),n.on.editInspectorState(function(r){if(r.app===e&&r.inspectorId===_u){var i=r.nodeId,s=r.path;i!=="root"&&(s=i.split("/").filter(Boolean).concat(s)),t._withCommit(function(){r.set(t._state.data,s,r.state.value)})}}),t.subscribe(function(r,i){var s={};r.payload&&(s.payload=r.payload),s.state=i,n.notifyComponentUpdate(),n.sendInspectorTree(_u),n.sendInspectorState(_u),n.addTimelineEvent({layerId:Cx,event:{time:Date.now(),title:r.type,data:s}})}),t.subscribeAction({before:function(r,i){var s={};r.payload&&(s.payload=r.payload),r._id=Yre++,r._time=Date.now(),s.state=i,n.addTimelineEvent({layerId:Cw,event:{time:r._time,title:r.type,groupId:r._id,subtitle:"start",data:s}})},after:function(r,i){var s={},a=Date.now()-r._time;s.duration={_custom:{type:"duration",display:a+"ms",tooltip:"Action duration",value:a}},r.payload&&(s.payload=r.payload),s.state=i,n.addTimelineEvent({layerId:Cw,event:{time:Date.now(),title:r.type,groupId:r._id,subtitle:"end",data:s}})}})})}var Ax=8702998,Jre=6710886,Zre=16777215,bU={label:"namespaced",textColor:Zre,backgroundColor:Jre};function EU(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function TU(e,t){return{id:t||"root",label:EU(t),tags:e.namespaced?[bU]:[],children:Object.keys(e._children).map(function(n){return TU(e._children[n],t+n+"/")})}}function IU(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[bU]:[]}),Object.keys(t._children).forEach(function(i){IU(e,t._children[i],n,r+i+"/")})}function eie(e,t,n){t=n==="root"?t:t[n];var r=Object.keys(t),i={state:Object.keys(e.state).map(function(a){return{key:a,editable:!0,value:e.state[a]}})};if(r.length){var s=tie(t);i.getters=Object.keys(s).map(function(a){return{key:a.endsWith("/")?EU(a):a,editable:!1,value:c0(function(){return s[a]})}})}return i}function tie(e){var t={};return Object.keys(e).forEach(function(n){var r=n.split("/");if(r.length>1){var i=t,s=r.pop();r.forEach(function(a){i[a]||(i[a]={_custom:{value:{},display:a,tooltip:"Module",abstract:!0}}),i=i[a]._custom.value}),i[s]=c0(function(){return e[n]})}else t[n]=c0(function(){return e[n]})}),t}function nie(e,t){var n=t.split("/").filter(function(r){return r});return n.reduce(function(r,i,s){var a=r[i];if(!a)throw new Error('Missing module "'+i+'" for path "'+t+'".');return s===n.length-1?a:a._children},t==="root"?e:e.root._children)}function c0(e){try{return e()}catch(t){return t}}var di=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=(typeof r=="function"?r():r)||{}},SU={namespaced:{configurable:!0}};SU.namespaced.get=function(){return!!this._rawModule.namespaced};di.prototype.addChild=function(t,n){this._children[t]=n};di.prototype.removeChild=function(t){delete this._children[t]};di.prototype.getChild=function(t){return this._children[t]};di.prototype.hasChild=function(t){return t in this._children};di.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};di.prototype.forEachChild=function(t){$c(this._children,t)};di.prototype.forEachGetter=function(t){this._rawModule.getters&&$c(this._rawModule.getters,t)};di.prototype.forEachAction=function(t){this._rawModule.actions&&$c(this._rawModule.actions,t)};di.prototype.forEachMutation=function(t){this._rawModule.mutations&&$c(this._rawModule.mutations,t)};Object.defineProperties(di.prototype,SU);var qa=function(t){this.register([],t,!1)};qa.prototype.get=function(t){return t.reduce(function(n,r){return n.getChild(r)},this.root)};qa.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(r,i){return n=n.getChild(i),r+(n.namespaced?i+"/":"")},"")};qa.prototype.update=function(t){CU([],this.root,t)};qa.prototype.register=function(t,n,r){var i=this;r===void 0&&(r=!0);var s=new di(n,r);if(t.length===0)this.root=s;else{var a=this.get(t.slice(0,-1));a.addChild(t[t.length-1],s)}n.modules&&$c(n.modules,function(c,l){i.register(t.concat(l),c,r)})};qa.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1],i=n.getChild(r);i&&i.runtime&&n.removeChild(r)};qa.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1];return n?n.hasChild(r):!1};function CU(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return;CU(e.concat(r),t.getChild(r),n.modules[r])}}function rie(e){return new pr(e)}var pr=function(t){var n=this;t===void 0&&(t={});var r=t.plugins;r===void 0&&(r=[]);var i=t.strict;i===void 0&&(i=!1);var s=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new qa(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=s;var a=this,c=this,l=c.dispatch,h=c.commit;this.dispatch=function(g,y){return l.call(a,g,y)},this.commit=function(g,y,_){return h.call(a,g,y,_)},this.strict=i;var d=this._modules.root.state;em(this,d,[],this._modules.root),II(this,d),r.forEach(function(v){return v(n)})},CI={state:{configurable:!0}};pr.prototype.install=function(t,n){t.provide(n||gU,this),t.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:!1;r&&Xre(t,this)};CI.state.get=function(){return this._state.data};CI.state.set=function(e){};pr.prototype.commit=function(t,n,r){var i=this,s=Iv(t,n,r),a=s.type,c=s.payload,l={type:a,payload:c},h=this._mutations[a];h&&(this._withCommit(function(){h.forEach(function(v){v(c)})}),this._subscribers.slice().forEach(function(d){return d(l,i.state)}))};pr.prototype.dispatch=function(t,n){var r=this,i=Iv(t,n),s=i.type,a=i.payload,c={type:s,payload:a},l=this._actions[s];if(l){try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(c,r.state)})}catch{}var h=l.length>1?Promise.all(l.map(function(d){return d(a)})):l[0](a);return new Promise(function(d,v){h.then(function(g){try{r._actionSubscribers.filter(function(y){return y.after}).forEach(function(y){return y.after(c,r.state)})}catch{}d(g)},function(g){try{r._actionSubscribers.filter(function(y){return y.error}).forEach(function(y){return y.error(c,r.state,g)})}catch{}v(g)})})}};pr.prototype.subscribe=function(t,n){return yU(t,this._subscribers,n)};pr.prototype.subscribeAction=function(t,n){var r=typeof t=="function"?{before:t}:t;return yU(r,this._actionSubscribers,n)};pr.prototype.watch=function(t,n,r){var i=this;return Ri(function(){return t(i.state,i.getters)},n,Object.assign({},r))};pr.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})};pr.prototype.registerModule=function(t,n,r){r===void 0&&(r={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),em(this,this.state,t,this._modules.get(t),r.preserveState),II(this,this.state)};pr.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var r=SI(n.state,t.slice(0,-1));delete r[t[t.length-1]]}),_U(this)};pr.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)};pr.prototype.hotUpdate=function(t){this._modules.update(t),_U(this,!0)};pr.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n};Object.defineProperties(pr.prototype,CI);const iie={components:{BaseHeader:_I},setup(){const e=Ue(""),t=mU(),n=qO();function r(){t.dispatch("submitData",e.value),e.value=""}function i(){se.auth().signOut(),n.replace("/login")}function s(){se.auth().onAuthStateChanged(function(a){a||n.replace("/")})}return k0(()=>{s()}),{taskText:e,submitTask:r,logoutUser:i}}},AU=e=>(k3("data-v-c198f371"),e=e(),R3(),e),oie={class:"dark:bg-gray-900"},sie=AU(()=>ze("p",{class:"text-3xl font-semibold p-3 dark:text-white"},"My Tasks",-1)),aie=AU(()=>ze("div",{class:"text-2xl font-normal pb-5 dark:text-white"},"Add a task below (with Enter) and click over the finished tasks",-1));function uie(e,t,n,r,i,s){const a=Sn("base-button"),c=Sn("base-header");return en(),Hn("section",oie,[Ye(c,null,{default:or(()=>[Ye(a,{class:"px-1 text-sm font-semibold left-10",onClick:r.logoutUser},{default:or(()=>[io("Logout User")]),_:1},8,["onClick"])]),_:1}),sie,aie,Sp(ze("input",{id:"insertField",type:"text","onUpdate:modelValue":t[0]||(t[0]=l=>r.taskText=l),onKeydown:t[1]||(t[1]=TO(l=>r.submitTask(r.taskText),["enter"]))},null,544),[[Rp,r.taskText]])])}const cie=Vi(iie,[["render",uie],["__scopeId","data-v-c198f371"]]),lie={components:{MainHeader:cie,Icon:K0},setup(e,t){const n=mU(),r=Ue(),i=Ue(),s=Ue(!1);function a(l){console.log(l),n.dispatch("deleteTask",l)}se.auth().onAuthStateChanged(function(){i.value=se.auth().currentUser.uid.toString(),c()});function c(){s.value=!0,console.log(s);var l=se.database().ref("tasks");l.orderByChild("userUID").equalTo(`${i.value}`).on("value",h=>{r.value=h.val()}),s.value=!1,console.log(s),n.dispatch("refreshTasks")}return{taskArray:r,pushTask:c,deleteData:a,isLoading:s}}},fie={class:"dark:bg-gray-900"},hie={key:0},die=ze("div",{class:"inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite]",role:"status"},[ze("span",{class:"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]"},"Loading...")],-1),pie=[die],vie={key:1},gie={class:"p-3 font-normal text-2xl"};function mie(e,t,n,r,i,s){const a=Sn("main-header"),c=Sn("Icon"),l=Sn("base-button"),h=J3("auto-animate");return en(),Hn("div",fie,[Ye(a),r.isLoading?(en(),Hn("div",hie,pie)):(en(),Hn("div",vie,[Sp((en(),Hn("div",null,[(en(!0),Hn(Zt,null,Z3(r.taskArray,(d,v)=>(en(),Hn("ul",{key:v,onKeydown:t[0]||(t[0]=TO((...g)=>r.pushTask&&r.pushTask(...g),["enter"])),class:"list-disc dark:text-white"},[ze("li",gie,[io(bp(d.taskText),1),Ye(l,null,{default:or(()=>[Ye(c,{icon:"mdi-light:delete",onClick:g=>r.deleteData(v)},null,8,["onClick"])]),_:2},1024)])],32))),128))])),[[h]])]))])}const yie=Vi(lie,[["render",mie]]),_ie={},wie=ze("br",null,null,-1),bie={class:"rounded-xl shadow-md p-10 w-fit mx-auto m-32-auto place-content-center grid place-items-center dark:bg-sky-950"};function Eie(e,t){return en(),Hn(Zt,null,[wie,ze("div",bie,[Mv(e.$slots,"default")])],64)}const kU=Vi(_ie,[["render",Eie]]),Tie={components:{ContentBox:kU,BaseHeader:_I}},Iie=ze("div",{class:"py-0 px-3 font-semibold dark:text-white"},"Task Project",-1),Sie=ze("h2",{class:"font-semibold p-4 dark:text-white"},"Page Not Found",-1),Cie={class:"dark:text-white"};function Aie(e,t,n,r,i,s){const a=Sn("base-header"),c=Sn("router-link"),l=Sn("content-box");return en(),Hn(Zt,null,[Ye(a,null,{default:or(()=>[Iie]),_:1}),ze("section",null,[Ye(l,{class:"dark:bg-sky-950"},{default:or(()=>[Sie,ze("div",Cie,[io(" This page could not be found - do you want to return to "),Ye(c,{to:"/login",class:"underline underline-offset-2"},{default:or(()=>[io("login")]),_:1}),io("? ")])]),_:1})])],64)}const kie=Vi(Tie,[["render",Aie]]),Rie=BH({history:rH(),routes:[{path:"/",redirect:"login"},{path:"/login",component:Vre},{path:"/tasks",component:yie},{path:"/:notFound(.*)",component:kie}]}),Nie={async refreshTasks(e){se.database().ref("tasks").on("value",n=>{const r=n.val();e.commit("setTasks",r)})},async submitData(e,t){const n=t.toString();if(n!==""){const i=se.database().ref("tasks").push(),s=se.auth().currentUser.uid;i.set({taskText:n,userUID:s})}},async deleteTask(e,t){const n=t.toString();se.database().ref("/tasks/").on("value",function(r){se.database().ref("/tasks/"+n).remove().then(function(){console.log("Remove succeeded.")}).catch(function(s){console.log("Remove failed: "+s.message)})})}},xie={taskArray(e){return e.taskArray},taskText(e){return e.taskText}},Oie={setTasks(e,t){e.taskArray=t,console.log(e.taskArray)},registerTasks(e,t){e.taskArray.push(t)}},Pie={namespace:!0,state(){return{taskArray:[],taskText:""}},actions:Nie,getters:xie,mutations:Oie},Die=rie({modules:{task:Pie}});const Mie={},Lie={class:"min-h-screen dark:bg-gray-900"};function Fie(e,t){const n=Sn("router-view");return en(),Hn("div",Lie,[Ye(n)])}const Uie=Vi(Mie,[["render",Fie]]),jie={},Vie={class:"bg-white hover:bg-gray-100 text-gray-800 py-2 px-4 border border-gray-400 rounded shadow dark:bg-sky-800 dark:text-white"};function Bie(e,t){return en(),Hn("div",null,[ze("button",Vie,[Mv(e.$slots,"default")])])}const qie=Vi(jie,[["render",Bie]]),$ie={apiKey:"AIzaSyD6rOiOiFAkse6Y3_hdzvP-Z1zRv20wrJg",authDomain:"taskproject-caf25.firebaseapp.com",projectId:"taskproject-caf25",storageBucket:"taskproject-caf25.firebasestorage.app",messagingSenderId:"1061401138693",appId:"1:1061401138693:web:03fc3339b03b4cb79eee6c"},Hc=h$(Uie);se.initializeApp($ie);se.database();Hc.component("content-box",kU);Hc.component("base-button",qie);Hc.use(R$);Hc.use(Die);Hc.use(Rie);Hc.mount("#app"); + */var gU="store";function Ure(e){return e===void 0&&(e=null),sr(e!==null?e:gU)}function $c(e,t){Object.keys(e).forEach(function(n){return t(e[n],n)})}function jre(e){return e!==null&&typeof e=="object"}function Vre(e){return e&&typeof e.then=="function"}function Bre(e,t){return function(){return e(t)}}function mU(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var r=t.indexOf(e);r>-1&&t.splice(r,1)}}function yU(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;em(e,n,[],e._modules.root,!0),II(e,n,t)}function II(e,t,n){var r=e._state,i=e._scope;e.getters={},e._makeLocalGettersCache=Object.create(null);var s=e._wrappedGetters,a={},c={},l=DB(!0);l.run(function(){$c(s,function(h,d){a[d]=Bre(h,e),c[d]=Ze(function(){return a[d]()}),Object.defineProperty(e.getters,d,{get:function(){return c[d].value},enumerable:!0})})}),e._state=bc({data:t}),e._scope=l,e.strict&&Wre(e),r&&n&&e._withCommit(function(){r.data=null}),i&&i.stop()}function em(e,t,n,r,i){var s=!n.length,a=e._modules.getNamespace(n);if(r.namespaced&&(e._modulesNamespaceMap[a],e._modulesNamespaceMap[a]=r),!s&&!i){var c=SI(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit(function(){c[l]=r.state})}var h=r.context=qre(e,a,n);r.forEachMutation(function(d,v){var g=a+v;$re(e,g,d,h)}),r.forEachAction(function(d,v){var g=d.root?v:a+v,y=d.handler||d;Hre(e,g,y,h)}),r.forEachGetter(function(d,v){var g=a+v;Kre(e,g,d,h)}),r.forEachChild(function(d,v){em(e,t,n.concat(v),d,i)})}function qre(e,t,n){var r=t==="",i={dispatch:r?e.dispatch:function(s,a,c){var l=Iv(s,a,c),h=l.payload,d=l.options,v=l.type;return(!d||!d.root)&&(v=t+v),e.dispatch(v,h)},commit:r?e.commit:function(s,a,c){var l=Iv(s,a,c),h=l.payload,d=l.options,v=l.type;(!d||!d.root)&&(v=t+v),e.commit(v,h,d)}};return Object.defineProperties(i,{getters:{get:r?function(){return e.getters}:function(){return _U(e,t)}},state:{get:function(){return SI(e.state,n)}}}),i}function _U(e,t){if(!e._makeLocalGettersCache[t]){var n={},r=t.length;Object.keys(e.getters).forEach(function(i){if(i.slice(0,r)===t){var s=i.slice(r);Object.defineProperty(n,s,{get:function(){return e.getters[i]},enumerable:!0})}}),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function $re(e,t,n,r){var i=e._mutations[t]||(e._mutations[t]=[]);i.push(function(a){n.call(e,r.state,a)})}function Hre(e,t,n,r){var i=e._actions[t]||(e._actions[t]=[]);i.push(function(a){var c=n.call(e,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:e.getters,rootState:e.state},a);return Vre(c)||(c=Promise.resolve(c)),e._devtoolHook?c.catch(function(l){throw e._devtoolHook.emit("vuex:error",l),l}):c})}function Kre(e,t,n,r){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(s){return n(r.state,r.getters,s.state,s.getters)})}function Wre(e){Ri(function(){return e._state.data},function(){},{deep:!0,flush:"sync"})}function SI(e,t){return t.reduce(function(n,r){return n[r]},e)}function Iv(e,t,n){return jre(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}var Gre="vuex bindings",Cx="vuex:mutations",Cw="vuex:actions",_u="vuex",zre=0;function Qre(e,t){D$({id:"org.vuejs.vuex",app:e,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[Gre]},function(n){n.addTimelineLayer({id:Cx,label:"Vuex Mutations",color:Ax}),n.addTimelineLayer({id:Cw,label:"Vuex Actions",color:Ax}),n.addInspector({id:_u,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(r){if(r.app===e&&r.inspectorId===_u)if(r.filter){var i=[];TU(i,t._modules.root,r.filter,""),r.rootNodes=i}else r.rootNodes=[EU(t._modules.root,"")]}),n.on.getInspectorState(function(r){if(r.app===e&&r.inspectorId===_u){var i=r.nodeId;_U(t,i),r.state=Jre(eie(t._modules,i),i==="root"?t.getters:t._makeLocalGettersCache,i)}}),n.on.editInspectorState(function(r){if(r.app===e&&r.inspectorId===_u){var i=r.nodeId,s=r.path;i!=="root"&&(s=i.split("/").filter(Boolean).concat(s)),t._withCommit(function(){r.set(t._state.data,s,r.state.value)})}}),t.subscribe(function(r,i){var s={};r.payload&&(s.payload=r.payload),s.state=i,n.notifyComponentUpdate(),n.sendInspectorTree(_u),n.sendInspectorState(_u),n.addTimelineEvent({layerId:Cx,event:{time:Date.now(),title:r.type,data:s}})}),t.subscribeAction({before:function(r,i){var s={};r.payload&&(s.payload=r.payload),r._id=zre++,r._time=Date.now(),s.state=i,n.addTimelineEvent({layerId:Cw,event:{time:r._time,title:r.type,groupId:r._id,subtitle:"start",data:s}})},after:function(r,i){var s={},a=Date.now()-r._time;s.duration={_custom:{type:"duration",display:a+"ms",tooltip:"Action duration",value:a}},r.payload&&(s.payload=r.payload),s.state=i,n.addTimelineEvent({layerId:Cw,event:{time:Date.now(),title:r.type,groupId:r._id,subtitle:"end",data:s}})}})})}var Ax=8702998,Yre=6710886,Xre=16777215,wU={label:"namespaced",textColor:Xre,backgroundColor:Yre};function bU(e){return e&&e!=="root"?e.split("/").slice(-2,-1)[0]:"Root"}function EU(e,t){return{id:t||"root",label:bU(t),tags:e.namespaced?[wU]:[],children:Object.keys(e._children).map(function(n){return EU(e._children[n],t+n+"/")})}}function TU(e,t,n,r){r.includes(n)&&e.push({id:r||"root",label:r.endsWith("/")?r.slice(0,r.length-1):r||"Root",tags:t.namespaced?[wU]:[]}),Object.keys(t._children).forEach(function(i){TU(e,t._children[i],n,r+i+"/")})}function Jre(e,t,n){t=n==="root"?t:t[n];var r=Object.keys(t),i={state:Object.keys(e.state).map(function(a){return{key:a,editable:!0,value:e.state[a]}})};if(r.length){var s=Zre(t);i.getters=Object.keys(s).map(function(a){return{key:a.endsWith("/")?bU(a):a,editable:!1,value:c0(function(){return s[a]})}})}return i}function Zre(e){var t={};return Object.keys(e).forEach(function(n){var r=n.split("/");if(r.length>1){var i=t,s=r.pop();r.forEach(function(a){i[a]||(i[a]={_custom:{value:{},display:a,tooltip:"Module",abstract:!0}}),i=i[a]._custom.value}),i[s]=c0(function(){return e[n]})}else t[n]=c0(function(){return e[n]})}),t}function eie(e,t){var n=t.split("/").filter(function(r){return r});return n.reduce(function(r,i,s){var a=r[i];if(!a)throw new Error('Missing module "'+i+'" for path "'+t+'".');return s===n.length-1?a:a._children},t==="root"?e:e.root._children)}function c0(e){try{return e()}catch(t){return t}}var di=function(t,n){this.runtime=n,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=(typeof r=="function"?r():r)||{}},IU={namespaced:{configurable:!0}};IU.namespaced.get=function(){return!!this._rawModule.namespaced};di.prototype.addChild=function(t,n){this._children[t]=n};di.prototype.removeChild=function(t){delete this._children[t]};di.prototype.getChild=function(t){return this._children[t]};di.prototype.hasChild=function(t){return t in this._children};di.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)};di.prototype.forEachChild=function(t){$c(this._children,t)};di.prototype.forEachGetter=function(t){this._rawModule.getters&&$c(this._rawModule.getters,t)};di.prototype.forEachAction=function(t){this._rawModule.actions&&$c(this._rawModule.actions,t)};di.prototype.forEachMutation=function(t){this._rawModule.mutations&&$c(this._rawModule.mutations,t)};Object.defineProperties(di.prototype,IU);var qa=function(t){this.register([],t,!1)};qa.prototype.get=function(t){return t.reduce(function(n,r){return n.getChild(r)},this.root)};qa.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(r,i){return n=n.getChild(i),r+(n.namespaced?i+"/":"")},"")};qa.prototype.update=function(t){SU([],this.root,t)};qa.prototype.register=function(t,n,r){var i=this;r===void 0&&(r=!0);var s=new di(n,r);if(t.length===0)this.root=s;else{var a=this.get(t.slice(0,-1));a.addChild(t[t.length-1],s)}n.modules&&$c(n.modules,function(c,l){i.register(t.concat(l),c,r)})};qa.prototype.unregister=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1],i=n.getChild(r);i&&i.runtime&&n.removeChild(r)};qa.prototype.isRegistered=function(t){var n=this.get(t.slice(0,-1)),r=t[t.length-1];return n?n.hasChild(r):!1};function SU(e,t,n){if(t.update(n),n.modules)for(var r in n.modules){if(!t.getChild(r))return;SU(e.concat(r),t.getChild(r),n.modules[r])}}function tie(e){return new dr(e)}var dr=function(t){var n=this;t===void 0&&(t={});var r=t.plugins;r===void 0&&(r=[]);var i=t.strict;i===void 0&&(i=!1);var s=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new qa(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._scope=null,this._devtools=s;var a=this,c=this,l=c.dispatch,h=c.commit;this.dispatch=function(g,y){return l.call(a,g,y)},this.commit=function(g,y,_){return h.call(a,g,y,_)},this.strict=i;var d=this._modules.root.state;em(this,d,[],this._modules.root),II(this,d),r.forEach(function(v){return v(n)})},CI={state:{configurable:!0}};dr.prototype.install=function(t,n){t.provide(n||gU,this),t.config.globalProperties.$store=this;var r=this._devtools!==void 0?this._devtools:!1;r&&Qre(t,this)};CI.state.get=function(){return this._state.data};CI.state.set=function(e){};dr.prototype.commit=function(t,n,r){var i=this,s=Iv(t,n,r),a=s.type,c=s.payload,l={type:a,payload:c},h=this._mutations[a];h&&(this._withCommit(function(){h.forEach(function(v){v(c)})}),this._subscribers.slice().forEach(function(d){return d(l,i.state)}))};dr.prototype.dispatch=function(t,n){var r=this,i=Iv(t,n),s=i.type,a=i.payload,c={type:s,payload:a},l=this._actions[s];if(l){try{this._actionSubscribers.slice().filter(function(d){return d.before}).forEach(function(d){return d.before(c,r.state)})}catch{}var h=l.length>1?Promise.all(l.map(function(d){return d(a)})):l[0](a);return new Promise(function(d,v){h.then(function(g){try{r._actionSubscribers.filter(function(y){return y.after}).forEach(function(y){return y.after(c,r.state)})}catch{}d(g)},function(g){try{r._actionSubscribers.filter(function(y){return y.error}).forEach(function(y){return y.error(c,r.state,g)})}catch{}v(g)})})}};dr.prototype.subscribe=function(t,n){return mU(t,this._subscribers,n)};dr.prototype.subscribeAction=function(t,n){var r=typeof t=="function"?{before:t}:t;return mU(r,this._actionSubscribers,n)};dr.prototype.watch=function(t,n,r){var i=this;return Ri(function(){return t(i.state,i.getters)},n,Object.assign({},r))};dr.prototype.replaceState=function(t){var n=this;this._withCommit(function(){n._state.data=t})};dr.prototype.registerModule=function(t,n,r){r===void 0&&(r={}),typeof t=="string"&&(t=[t]),this._modules.register(t,n),em(this,this.state,t,this._modules.get(t),r.preserveState),II(this,this.state)};dr.prototype.unregisterModule=function(t){var n=this;typeof t=="string"&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var r=SI(n.state,t.slice(0,-1));delete r[t[t.length-1]]}),yU(this)};dr.prototype.hasModule=function(t){return typeof t=="string"&&(t=[t]),this._modules.isRegistered(t)};dr.prototype.hotUpdate=function(t){this._modules.update(t),yU(this,!0)};dr.prototype._withCommit=function(t){var n=this._committing;this._committing=!0,t(),this._committing=n};Object.defineProperties(dr.prototype,CI);const nie={components:{BaseHeader:_I},setup(){const e=Fe(""),t=Ure(),n=qO();function r(){t.dispatch("submitData",e.value),e.value=""}function i(){oe.auth().signOut(),n.replace("/login")}function s(){oe.auth().onAuthStateChanged(function(a){a||n.replace("/")})}return k0(()=>{s()}),{taskText:e,submitTask:r,logoutUser:i}}},CU=e=>(tO("data-v-c198f371"),e=e(),nO(),e),rie={class:"dark:bg-gray-900"},iie=CU(()=>Be("p",{class:"text-3xl font-semibold p-3 dark:text-white"},"My Tasks",-1)),oie=CU(()=>Be("div",{class:"text-2xl font-normal pb-5 dark:text-white"},"Add a task below (with Enter) and click over the finished tasks",-1));function sie(e,t,n,r,i,s){const a=$n("base-button"),c=$n("base-header");return pn(),ir("section",rie,[Je(c,null,{default:Er(()=>[Je(a,{class:"px-1 text-sm font-semibold left-10",onClick:r.logoutUser},{default:Er(()=>[zo("Logout User")]),_:1},8,["onClick"])]),_:1}),iie,oie,Cp(Be("input",{id:"insertField",type:"text","onUpdate:modelValue":t[0]||(t[0]=l=>r.taskText=l),onKeydown:t[1]||(t[1]=s$(l=>r.submitTask(r.taskText),["enter"]))},null,544),[[yf,r.taskText]])])}const aie=Vi(nie,[["render",sie],["__scopeId","data-v-c198f371"]]);const uie={name:"TaskList",components:{MainHeader:aie,Icon:K0},setup(){const e=Fe({}),t=Fe(!1),n=Fe(""),r=Fe(null);oe.auth().onAuthStateChanged(c=>{c?(r.value=c.uid,i()):(r.value=null,e.value={})});function i(){t.value=!0,oe.database().ref("tasks").orderByChild("userUID").equalTo(r.value).on("value",l=>{e.value=l.val()||{},t.value=!1})}function s(){if(!r.value||!n.value.trim())return;oe.database().ref("tasks").push({taskText:n.value,userUID:r.value}).then(()=>{n.value=""}).catch(l=>{console.error("Erro ao adicionar tarefa:",l)})}function a(c){const l=oe.database().ref("tasks").child(c);l.once("value",h=>{const d=h.val();d&&d.userUID===r.value?l.remove().then(()=>console.log("Tarefa removida com sucesso")).catch(v=>console.error("Erro ao remover tarefa:",v)):console.error("Acesso negado: esta tarefa não pertence ao usuário autenticado.")})}return{taskArray:e,isLoading:t,newTaskText:n,addTask:s,deleteTask:a}}},cie=e=>(tO("data-v-cd32d199"),e=e(),nO(),e),lie={class:"dark:bg-gray-900 min-h-screen p-4"},fie={class:"my-4"},hie={key:0,class:"flex justify-center items-center h-32"},die=cie(()=>Be("div",{class:"spinner"},null,-1)),pie=[die],vie={key:1},gie={class:"list-disc dark:text-white"},mie=["onClick"];function yie(e,t,n,r,i,s){const a=$n("main-header"),c=$n("Icon");return pn(),ir("div",lie,[Je(a),Be("div",fie,[Cp(Be("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>r.newTaskText=l),placeholder:"Digite sua nova tarefa...",class:"border p-2 rounded w-full max-w-md"},null,512),[[yf,r.newTaskText]]),Be("button",{onClick:t[1]||(t[1]=(...l)=>r.addTask&&r.addTask(...l)),class:"bg-blue-500 text-white px-4 py-2 rounded ml-2"}," Adicionar ")]),r.isLoading?(pn(),ir("div",hie,pie)):(pn(),ir("div",vie,[Be("ul",gie,[(pn(!0),ir(Zt,null,Q3(r.taskArray,(l,h)=>(pn(),ir("li",{key:h,class:"p-3 font-normal text-2xl flex items-center justify-between"},[Be("span",null,Ep(l.taskText),1),Be("button",{onClick:d=>r.deleteTask(h),class:"text-red-500"},[Je(c,{icon:"mdi-light:delete"})],8,mie)]))),128))])]))])}const _ie=Vi(uie,[["render",yie],["__scopeId","data-v-cd32d199"]]),wie={},bie=Be("br",null,null,-1),Eie={class:"rounded-xl shadow-md p-10 w-fit mx-auto m-32-auto place-content-center grid place-items-center dark:bg-sky-950"};function Tie(e,t){return pn(),ir(Zt,null,[bie,Be("div",Eie,[Mv(e.$slots,"default")])],64)}const AU=Vi(wie,[["render",Tie]]),Iie={components:{ContentBox:AU,BaseHeader:_I}},Sie=Be("div",{class:"py-0 px-3 font-semibold dark:text-white"},"Task Project",-1),Cie=Be("h2",{class:"font-semibold p-4 dark:text-white"},"Page Not Found",-1),Aie={class:"dark:text-white"};function kie(e,t,n,r,i,s){const a=$n("base-header"),c=$n("router-link"),l=$n("content-box");return pn(),ir(Zt,null,[Je(a,null,{default:Er(()=>[Sie]),_:1}),Be("section",null,[Je(l,{class:"dark:bg-sky-950"},{default:Er(()=>[Cie,Be("div",Aie,[zo(" This page could not be found - do you want to return to "),Je(c,{to:"/login",class:"underline underline-offset-2"},{default:Er(()=>[zo("login")]),_:1}),zo("? ")])]),_:1})])],64)}const Rie=Vi(Iie,[["render",kie]]),Nie=UH({history:eH(),routes:[{path:"/",redirect:"login"},{path:"/login",component:Fre},{path:"/tasks",component:_ie},{path:"/:notFound(.*)",component:Rie}]}),xie={async refreshTasks(e){oe.database().ref("tasks").on("value",n=>{const r=n.val();e.commit("setTasks",r)})},async submitData(e,t){const n=t.toString();if(n!==""){const i=oe.database().ref("tasks").push(),s=oe.auth().currentUser.uid;i.set({taskText:n,userUID:s})}},async deleteTask(e,t){const n=t.toString();oe.database().ref("/tasks/").on("value",function(r){oe.database().ref("/tasks/"+n).remove().then(function(){console.log("Remove succeeded.")}).catch(function(s){console.log("Remove failed: "+s.message)})})}},Oie={taskArray(e){return e.taskArray},taskText(e){return e.taskText}},Pie={setTasks(e,t){e.taskArray=t,console.log(e.taskArray)},registerTasks(e,t){e.taskArray.push(t)}},Die={namespace:!0,state(){return{taskArray:[],taskText:""}},actions:xie,getters:Oie,mutations:Pie},Mie=tie({modules:{task:Die}});const Lie={},Fie={class:"min-h-screen dark:bg-gray-900"};function Uie(e,t){const n=$n("router-view");return pn(),ir("div",Fie,[Je(n)])}const jie=Vi(Lie,[["render",Uie]]),Vie={},Bie={class:"bg-white hover:bg-gray-100 text-gray-800 py-2 px-4 border border-gray-400 rounded shadow dark:bg-sky-800 dark:text-white"};function qie(e,t){return pn(),ir("div",null,[Be("button",Bie,[Mv(e.$slots,"default")])])}const $ie=Vi(Vie,[["render",qie]]),Hie={apiKey:"AIzaSyD6rOiOiFAkse6Y3_hdzvP-Z1zRv20wrJg",authDomain:"taskproject-caf25.firebaseapp.com",projectId:"taskproject-caf25",storageBucket:"taskproject-caf25.firebasestorage.app",messagingSenderId:"1061401138693",appId:"1:1061401138693:web:03fc3339b03b4cb79eee6c"},Hc=c$(jie);oe.initializeApp(Hie);oe.database();Hc.component("content-box",AU);Hc.component("base-button",$ie);Hc.use(C$);Hc.use(Mie);Hc.use(Nie);Hc.mount("#app"); diff --git a/docs/index.html b/docs/index.html index 4396967..a4a7039 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,8 +6,8 @@ Task Project - - + +
diff --git a/src/components/TaskBody.vue b/src/components/TaskBody.vue index 874d2f5..93069ec 100644 --- a/src/components/TaskBody.vue +++ b/src/components/TaskBody.vue @@ -1,71 +1,139 @@ + + \ No newline at end of file diff --git a/src/components/UserLogin.vue b/src/components/UserLogin.vue index 29994b1..4d84ed0 100644 --- a/src/components/UserLogin.vue +++ b/src/components/UserLogin.vue @@ -1,32 +1,3 @@ - - + +