diff --git a/_app/immutable/assets/0.DOZ2siFK.css b/_app/immutable/assets/0.DOZ2siFK.css new file mode 100644 index 0000000000000000000000000000000000000000..6ba2202855f982612e2531a6b38311ef7dce4f69 --- /dev/null +++ b/_app/immutable/assets/0.DOZ2siFK.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;font-style:normal;font-weight:100;font-display:block;src:url(/_app/immutable/assets/Inter-Thin.CSJ_owlW.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Thin.CVMZtQER.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:100;font-display:block;src:url(/_app/immutable/assets/Inter-ThinItalic.B6FKq6qK.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ThinItalic.B2bFwwDp.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:200;font-display:block;src:url(/_app/immutable/assets/Inter-ExtraLight.egkqWonf.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ExtraLight.CbFdmbHh.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:200;font-display:block;src:url(/_app/immutable/assets/Inter-ExtraLightItalic.Bf25KIHs.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ExtraLightItalic.B3gY-m5W.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:300;font-display:block;src:url(/_app/immutable/assets/Inter-Light.CdXm_ABL.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Light.CG9upfZ4.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:300;font-display:block;src:url(/_app/immutable/assets/Inter-LightItalic.COmGGTuG.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-LightItalic.C2ZuFZOC.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:block;src:url(/_app/immutable/assets/Inter-Regular.CKDp9E3C.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Regular.DJOZHnwz.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:400;font-display:block;src:url(/_app/immutable/assets/Inter-Italic._3PMmu0i.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Italic.Ci_5KQU1.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:block;src:url(/_app/immutable/assets/Inter-Medium.P1cOs5ep.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Medium.oHczPpWt.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:500;font-display:block;src:url(/_app/immutable/assets/Inter-MediumItalic.DWiIAHvp.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-MediumItalic.8laNK8GF.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:block;src:url(/_app/immutable/assets/Inter-SemiBold.Ctx7G98q.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-SemiBold.BHlX_6qk.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:600;font-display:block;src:url(/_app/immutable/assets/Inter-SemiBoldItalic.BNz1Al2H.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-SemiBoldItalic.CxeAX7g8.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:block;src:url(/_app/immutable/assets/Inter-Bold.CuhepTt8.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Bold.2PT7Q-hu.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:700;font-display:block;src:url(/_app/immutable/assets/Inter-BoldItalic.R15IsAnq.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-BoldItalic.C906RMVC.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:800;font-display:block;src:url(/_app/immutable/assets/Inter-ExtraBold.B0QOs-T2.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ExtraBold.B8imQN9B.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:800;font-display:block;src:url(/_app/immutable/assets/Inter-ExtraBoldItalic.OErwaGem.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ExtraBoldItalic.Bt8eprh6.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:900;font-display:block;src:url(/_app/immutable/assets/Inter-Black.DgUKMdlB.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Black.DtxVgCT8.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:900;font-display:block;src:url(/_app/immutable/assets/Inter-BlackItalic.ZFcDzO3e.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-BlackItalic.CkZ-ktDH.woff?v=3.19) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:100;font-display:block;src:url(/_app/immutable/assets/Spectral-Light.TIhg4DnI.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Light.DBct1VnS.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:100;font-display:block;src:url(/_app/immutable/assets/Spectral-LightItalic.zW0f9iJS.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-LightItalic.B3o_X74d.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:200;font-display:block;src:url(/_app/immutable/assets/Spectral-ExtraLight.HPQmpGpQ.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-ExtraLight.HAWHIZWB.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:200;font-display:block;src:url(/_app/immutable/assets/Spectral-ExtraLightItalic.xW7ezc0a.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-ExtraLightItalic.C9nFbxmj.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:300;font-display:block;src:url(/_app/immutable/assets/Spectral-Light.TIhg4DnI.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Light.DBct1VnS.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:300;font-display:block;src:url(/_app/immutable/assets/Spectral-LightItalic.zW0f9iJS.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-LightItalic.B3o_X74d.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:400;font-display:block;src:url(/_app/immutable/assets/Spectral-Regular.BE1HJwUh.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Regular.C0aqGnDS.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:400;font-display:block;src:url(/_app/immutable/assets/Spectral-Italic.wSPWDyg7.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Italic.3s0_PsVL.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:500;font-display:block;src:url(/_app/immutable/assets/Spectral-Medium.NsGaEaui.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Medium.BZl4fq6u.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:500;font-display:block;src:url(/_app/immutable/assets/Spectral-MediumItalic.BvSK_s7Y.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-MediumItalic.De40Wj9n.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:600;font-display:block;src:url(/_app/immutable/assets/Spectral-SemiBold.zu1TM2FZ.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-SemiBold.CCUIByHq.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:600;font-display:block;src:url(/_app/immutable/assets/Spectral-SemiBoldItalic.D3fgUf4W.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-SemiBoldItalic.DjbDqXej.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:700;font-display:block;src:url(/_app/immutable/assets/Spectral-Bold.BwJz_A1v.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Bold.C57huwyI.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:700;font-display:block;src:url(/_app/immutable/assets/Spectral-BoldItalic.CQC_WCFZ.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-BoldItalic.CQquRzSI.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:800;font-display:block;src:url(/_app/immutable/assets/Spectral-ExtraBold.DeRaT2m-.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-ExtraBold.Dm6k0JyR.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:800;font-display:block;src:url(/_app/immutable/assets/Spectral-ExtraBoldItalic.MQ9B1Gco.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-ExtraBoldItalic.SZr5i_vZ.woff) format("woff")}*,: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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02";font-variation-settings:normal;-webkit-tap-highlight-color:transparent}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-feature-settings:normal;font-variation-settings:normal;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;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([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]:where(:not([hidden=until-found])){display:none}html{scroll-behavior:smooth}body{-webkit-user-select:none;-moz-user-select:none;user-select:none}*{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.pretty-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1)) transparent}.pretty-scrollbar::-webkit-scrollbar{height:6px;width:6px}.pretty-scrollbar::-webkit-scrollbar-track{background-color:transparent}.pretty-scrollbar::-webkit-scrollbar-thumb{background-color:transparent;border-radius:7px}.pretty-scrollbar:hover::-webkit-scrollbar-thumb{background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, 1))}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}select{appearance:none;-moz-appearance:none;-webkit-appearance:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.markdown{font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02";font-size:1rem;line-height:1.5rem;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img.markdown{margin-left:auto;margin-right:auto;height:auto;max-width:100%;border-radius:.5rem}article.markdown a.markdown{--tw-text-opacity: 1 !important;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)))!important;text-decoration-line:underline!important;text-decoration-color:transparent!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.2s!important}article.markdown a.markdown:hover{text-decoration-color:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1))!important}p.markdown,ul.markdown,ol.markdown{margin-block-end:1.2em;margin-block-start:0em}ol.markdown{list-style-type:decimal;padding-inline-start:1.5rem}ul.markdown{list-style-type:disc;padding-inline-start:1.5rem}ul.markdown ul.markdown,ol.markdown ul.markdown{list-style-type:circle}ul.markdown ol.markdown,ol.markdown ol.markdown{list-style-type:lower-alpha}ul.markdown ul.markdown,ul.markdown ol.markdown,ol.markdown ul.markdown,ol.markdown ol.markdown{margin-top:.25rem;margin-block-end:0em}ul.markdown ul.markdown ul.markdown,ul.markdown ol.markdown ul.markdown,ol.markdown ul.markdown ul.markdown,ol.markdown ol.markdown ul.markdown{list-style-type:square}ul.markdown ul.markdown ol.markdown,ul.markdown ol.markdown ol.markdown,ol.markdown ul.markdown ol.markdown,ol.markdown ol.markdown ol.markdown{list-style-type:lower-roman}ul.markdown li.markdown,ol.markdown li.markdown{display:list-item;text-align:-webkit-match-parent}ul.markdown li.markdown+li.markdown,ol.markdown li.markdown+li.markdown{margin-top:.25rem}h1.markdown,h2.markdown,h3.markdown,h4.markdown,h5.markdown,h6.markdown{scroll-margin-top:3.5rem;-moz-column-break-inside:avoid;break-inside:avoid;font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02";--tw-text-opacity: 1;color:hsl(var(--twc-base-heading) / var(--twc-base-heading-opacity, var(--tw-text-opacity)))}h1.title:first-of-type,h1.markdown:first-of-type{margin-top:.25rem;margin-bottom:.5rem}h1.title,h1.markdown{margin-top:1.25rem;margin-bottom:.25rem;-moz-column-break-inside:avoid;break-inside:avoid;font-size:1.5rem;line-height:2rem;font-weight:700;letter-spacing:.025em}h2.markdown{margin-top:.75rem;margin-bottom:.25rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}h3.markdown{margin-top:.5rem;margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:600}h4.markdown{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:600}h5.markdown{margin-top:.25rem;font-size:.75rem;line-height:1rem;font-weight:600}h6.markdown{margin-top:.25rem;font-size:.75rem;line-height:1rem}hr.markdown{margin-top:2rem;margin-bottom:2rem;margin-left:auto;margin-right:auto;height:1px;max-width:36rem;border-width:0px;--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}code.markdown{-webkit-user-select:all;-moz-user-select:all;user-select:all;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)));padding:.125rem .25rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em}form code{font-size:unset}blockquote.markdown{margin-top:2rem;margin-bottom:2rem;border-left-width:4px;--tw-border-opacity: 1;border-color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)));padding-top:.5rem;padding-bottom:.5rem;padding-left:.75rem}blockquote.markdown>blockquote.markdown{margin:0}blockquote.markdown>:first-child{margin-top:0}blockquote.markdown>:last-child{margin-bottom:0}blockquote.markdown *{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}strong.markdown,em.markdown,del.markdown,a.markdown{font-size:1em;color:inherit}table.markdown{margin-left:auto;margin-right:auto;margin-top:1.25rem;margin-bottom:1.25rem;min-width:100%;border-collapse:collapse;text-align:center}th.markdown{overflow:hidden;text-overflow:ellipsis;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1));padding-top:0;padding-bottom:0;padding-left:.5rem;padding-right:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500}td.markdown{overflow:hidden;text-overflow:ellipsis;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-bottom-14{bottom:-3.5rem}.-right-2\.5{right:-.625rem}.-top-1{top:-.25rem}.-top-\[5\%\]{top:-5%}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-20{bottom:5rem}.bottom-8{bottom:2rem}.bottom-\[-9px\]{bottom:-9px}.left-0{left:0}.left-1\.5{left:.375rem}.left-2{left:.5rem}.left-4{left:1rem}.left-\[-9px\]{left:-9px}.left-\[105\%\]{left:105%}.left-\[115\%\]{left:115%}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.right-6{right:1.5rem}.right-\[-9px\]{right:-9px}.right-\[115\%\]{right:115%}.right-\[18\.5px\]{right:18.5px}.top-0{top:0}.top-12{top:3rem}.top-16{top:4rem}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-8{top:2rem}.top-\[-9px\]{top:-9px}.top-\[50\%\]{top:50%}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[-10\]{z-index:-10}.z-\[1\]{z-index:1}.z-\[401\]{z-index:401}.z-\[405\]{z-index:405}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2 / span 2}.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-8{grid-column:span 8 / span 8}.col-start-4{grid-column-start:4}.m-0{margin:0}.m-4{margin:1rem}.m-auto{margin:auto}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-0{margin-left:0;margin-right:0}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-10{margin-left:2.5rem;margin-right:2.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.my-\[0\.5em\]{margin-top:.5em;margin-bottom:.5em}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-auto{margin-right:auto}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.box-content{box-sizing:content-box}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.h-1{height:.25rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[0\.83em\]{height:.83em}.h-\[10px\]{height:10px}.h-\[1px\]{height:1px}.h-\[38px\]{height:38px}.h-\[80px\]{height:80px}.h-\[8px\]{height:8px}.h-\[calc\(100vh-3rem\)\]{height:calc(100vh - 3rem)}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-56{max-height:14rem}.max-h-96{max-height:24rem}.max-h-\[0px\]{max-height:0px}.max-h-\[200px\]{max-height:200px}.max-h-\[300px\]{max-height:300px}.min-h-\[8rem\]{min-height:8rem}.\!w-5{width:1.25rem!important}.\!w-\[118px\]{width:118px!important}.\!w-\[79px\]{width:79px!important}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[100px\]{width:100px}.w-\[10px\]{width:10px}.w-\[17ch\]{width:17ch}.w-\[1px\]{width:1px}.w-\[2\%\]{width:2%}.w-\[200px\]{width:200px}.w-\[22\%\]{width:22%}.w-\[8px\]{width:8px}.w-\[90vw\]{width:90vw}.w-\[calc\(100\%-0\.6rem\)\]{width:calc(100% - .6rem)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-24{min-width:6rem}.min-w-40{min-width:10rem}.min-w-5{min-width:1.25rem}.min-w-56{min-width:14rem}.min-w-\[120px\]{min-width:120px}.min-w-\[150px\]{min-width:150px}.min-w-\[8rem\]{min-width:8rem}.min-w-full{min-width:100%}.min-w-min{min-width:-moz-min-content;min-width:min-content}.max-w-48{max-width:12rem}.max-w-60{max-width:15rem}.max-w-7xl{max-width:80rem}.max-w-\[100\%\]{max-width:100%}.max-w-\[200px\]{max-width:200px}.max-w-\[400px\]{max-width:400px}.max-w-\[65\%\]{max-width:65%}.max-w-\[70\%\]{max-width:70%}.max-w-\[75\%\]{max-width:75%}.max-w-\[80\%\]{max-width:80%}.max-w-\[90\%\]{max-width:90%}.max-w-\[calc\(100\%-16px\)\]{max-width:calc(100% - 16px)}.max-w-\[unset\]{max-width:unset}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y: -50%;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))}.rotate-180{--tw-rotate: 180deg;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))}.rotate-90{--tw-rotate: 90deg;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))}.rotate-\[270deg\]{--tw-rotate: 270deg;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 pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.list-decimal{list-style-type:decimal}.list-none{list-style-type:none}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-after-page{-moz-column-break-after:page;break-after:page}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[auto\,1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto\,auto\,1fr\,auto\,auto\,1fr\,auto\,auto\]{grid-template-columns:auto auto 1fr auto auto 1fr auto auto}.grid-cols-\[auto\,auto\,1fr\]{grid-template-columns:auto auto 1fr}.grid-rows-auto{grid-template-rows:auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-normal{overflow-wrap:normal;word-break:normal}.rounded{border-radius:.25rem}.rounded-\[unset\]{border-radius:unset}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-\[1px\]{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-b-\[1px\]{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-t{border-top-width:1px}.border-t-8{border-top-width:8px}.border-t-\[1px\]{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[--borderColor\]{border-color:var(--borderColor)}.border-base-200{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-border-opacity)))}.border-base-300{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.border-base-300\/50{border-color:hsl(var(--twc-base-300) / .5)}.border-base-content{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-border-opacity)))}.border-base-content-muted{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-border-opacity)))}.border-info\/20{border-color:hsl(var(--twc-info) / .2)}.border-negative{--tw-border-opacity: 1;border-color:hsl(var(--twc-negative) / var(--twc-negative-opacity, var(--tw-border-opacity)))}.border-negative\/20{border-color:hsl(var(--twc-negative) / .2)}.border-negative\/50{border-color:hsl(var(--twc-negative) / .5)}.border-positive\/20{border-color:hsl(var(--twc-positive) / .2)}.border-transparent{border-color:transparent}.bg-\[--bgColor\]{background-color:var(--bgColor)}.bg-base-100{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)))}.bg-base-100\/50{background-color:hsl(var(--twc-base-100) / .5)}.bg-base-100\/70{background-color:hsl(var(--twc-base-100) / .7)}.bg-base-100\/80{background-color:hsl(var(--twc-base-100) / .8)}.bg-base-100\/90{background-color:hsl(var(--twc-base-100) / .9)}.bg-base-200{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.bg-base-200\/50{background-color:hsl(var(--twc-base-200) / .5)}.bg-base-300{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.bg-base-300\/20{background-color:hsl(var(--twc-base-300) / .2)}.bg-base-300\/40{background-color:hsl(var(--twc-base-300) / .4)}.bg-base-content{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.bg-info{--tw-bg-opacity: 1;background-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-bg-opacity)))}.bg-info\/10{background-color:hsl(var(--twc-info) / .1)}.bg-inherit{background-color:inherit}.bg-negative{--tw-bg-opacity: 1;background-color:hsl(var(--twc-negative) / var(--twc-negative-opacity, var(--tw-bg-opacity)))}.bg-negative\/10{background-color:hsl(var(--twc-negative) / .1)}.bg-negative\/25{background-color:hsl(var(--twc-negative) / .25)}.bg-positive\/10{background-color:hsl(var(--twc-positive) / .1)}.bg-positive\/25{background-color:hsl(var(--twc-positive) / .25)}.bg-primary{--tw-bg-opacity: 1;background-color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-bg-opacity)))}.bg-primary\/20{background-color:hsl(var(--twc-primary) / .2)}.bg-primary\/50{background-color:hsl(var(--twc-primary) / .5)}.bg-transparent{background-color:transparent}.bg-warning{--tw-bg-opacity: 1;background-color:hsl(var(--twc-warning) / var(--twc-warning-opacity, var(--tw-bg-opacity)))}.bg-warning\/25{background-color:hsl(var(--twc-warning) / .25)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/80{background-color:#fffc}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-base-200{--tw-gradient-from: hsl(var(--twc-base-200) / var(--twc-base-200-opacity, 1)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--twc-base-200) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-base-300{--tw-gradient-to: hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1)) var(--tw-gradient-to-position)}.bg-right{background-position:right}.bg-no-repeat{background-repeat:no-repeat}.fill-current{fill:currentColor}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[1px\]{padding-left:1px;padding-right:1px}.px-\[2px\]{padding-left:2px;padding-right:2px}.px-\[4px\]{padding-left:4px;padding-right:4px}.px-\[8px\]{padding-left:8px;padding-right:8px}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\[1\.5px\]{padding-top:1.5px;padding-bottom:1.5px}.py-\[1px\]{padding-top:1px;padding-bottom:1px}.py-\[2px\]{padding-top:2px;padding-bottom:2px}.py-\[3px\]{padding-top:3px;padding-bottom:3px}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-\[2px\]{padding-bottom:2px}.pl-0{padding-left:0}.pl-0\.5{padding-left:.125rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pl-\[1px\]{padding-left:1px}.pl-\[6px\]{padding-left:6px}.pl-\[calc\(0\.5rem\+10px\)\]{padding-left:calc(.5rem + 10px)}.pr-1{padding-right:.25rem}.pr-1\.5{padding-right:.375rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-5{padding-right:1.25rem}.pr-8{padding-right:2rem}.pr-\[12px\]{padding-right:12px}.pr-\[16\.5px\]{padding-right:16.5px}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-\[0\.5px\]{padding-top:.5px}.pt-\[32px\]{padding-top:32px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-\[system-ui\]{font-family:system-ui}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[9\.25pt\]{font-size:9.25pt}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-4{line-height:1rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-\[-1\.5px\]{letter-spacing:-1.5px}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-\[green\]{--tw-text-opacity: 1;color:rgb(0 128 0 / var(--tw-text-opacity, 1))}.text-\[grey\]{--tw-text-opacity: 1;color:rgb(128 128 128 / var(--tw-text-opacity, 1))}.text-base-100{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}.text-base-300{--tw-text-opacity: 1;color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-text-opacity)))}.text-base-content{--tw-text-opacity: 1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}.text-base-content-muted{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.text-base-heading{--tw-text-opacity: 1;color:hsl(var(--twc-base-heading) / var(--twc-base-heading-opacity, var(--tw-text-opacity)))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-info-content{--tw-text-opacity: 1;color:hsl(var(--twc-info-content) / var(--twc-info-content-opacity, var(--tw-text-opacity)))}.text-negative{--tw-text-opacity: 1;color:hsl(var(--twc-negative) / var(--twc-negative-opacity, var(--tw-text-opacity)))}.text-negative-content{--tw-text-opacity: 1;color:hsl(var(--twc-negative-content) / var(--twc-negative-content-opacity, var(--tw-text-opacity)))}.text-positive{--tw-text-opacity: 1;color:hsl(var(--twc-positive) / var(--twc-positive-opacity, var(--tw-text-opacity)))}.text-primary{--tw-text-opacity: 1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)))}.text-primary-content{--tw-text-opacity: 1;color:hsl(var(--twc-primary-content) / var(--twc-primary-content-opacity, var(--tw-text-opacity)))}.text-transparent{color:transparent}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-primary{accent-color:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1))}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.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)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 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-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px 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-base-100{--tw-shadow-color: hsl(var(--twc-base-100) / var(--twc-base-100-opacity, 1));--tw-shadow: var(--tw-shadow-colored)}.shadow-base-200{--tw-shadow-color: hsl(var(--twc-base-200) / var(--twc-base-200-opacity, 1));--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-base-100{--tw-ring-offset-color: hsl(var(--twc-base-100) / var(--twc-base-100-opacity, 1))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,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-\[border-radius\]{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;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-opacity{transition-property:opacity;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}.delay-\[225ms\]{transition-delay:225ms}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[350ms\]{transition-duration:.35s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.light,[data-theme=light]{--twc-primary: 221.20000000000005 83.2% 53.3%;--twc-accent: 17.5 88.3% 40.4%;--twc-base-100: 0 0% 100%;--twc-info: 200.39999999999998 98% 39.4%;--twc-positive: 142.10000000000002 76.2% 36.3%;--twc-warning: 48.60000000000002 100% 48.6%;--twc-negative: 0 72.2% 50.6%;--twc-primary-content: 216 38.5% 97.5%;--twc-accent-content: 12 38.5% 97.5%;--twc-base-200: 0 0% 96.9%;--twc-base-300: 0 0% 83.9%;--twc-base-heading: 0 0% 2.4%;--twc-base-content: 0 0% 17.3%;--twc-base-content-muted: 0 0% 44.3%;--twc-info-content: 200 50% 2.4%;--twc-positive-content: 144 38.5% 2.5%;--twc-negative-content: 0 38.5% 97.5%;--twc-warning-content: 42.89999999999998 53.8% 2.5%}.dark,[data-theme=dark]{--twc-primary: 217.20000000000005 91.2% 59.8%;--twc-accent: 30.69999999999999 97.2% 72.4%;--twc-base-100: 240 10% 3.9%;--twc-info: 198.39999999999998 93.2% 59.6%;--twc-positive: 141.89999999999998 69.2% 58%;--twc-warning: 43.30000000000001 96.4% 56.3%;--twc-negative: 0 90.6% 70.8%;--twc-primary-content: 210 50% 2.4%;--twc-accent-content: 30 50% 2.4%;--twc-base-200: 240 5.6% 7.1%;--twc-base-300: 240 2.4% 16.5%;--twc-base-heading: 240 7.7% 97.5%;--twc-base-content: 240 1% 79.4%;--twc-base-content-muted: 240 .4% 48.4%;--twc-info-content: 190 50% 2.4%;--twc-positive-content: 144 38.5% 2.5%;--twc-negative-content: 0 50% 2.4%;--twc-warning-content: 50 50% 2.4%}html[data-theme=light]{--primary: #2563eb;--accent: #c2410c;--base-100: #ffffff;--info: #0284c7;--positive: #16a34a;--warning: #f8c900;--negative: #dc2626;--primary-content: #f6f8fb;--accent-content: #fbf7f6;--base-200: #f7f7f7;--base-300: #d6d6d6;--base-heading: #060606;--base-content: #2c2c2c;--base-content-muted: #717171;--info-content: #030709;--positive-content: #040906;--negative-content: #fbf6f6;--warning-content: #0a0803}html[data-theme=dark]{--primary: #3b82f6;--accent: #fdba74;--base-100: #09090b;--info: #38bdf8;--positive: #4ade80;--warning: #fbbf24;--negative: #f87171;--primary-content: #030609;--accent-content: #090603;--base-200: #111113;--base-300: #29292b;--base-heading: #f8f8f9;--base-content: #cacacb;--base-content-muted: #7b7b7c;--info-content: #030809;--positive-content: #040906;--negative-content: #090303;--warning-content: #090803}.\[word-wrap\:break-work\]{word-wrap:break-work}:root{--header-height: 3.5rem;--monospace-font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--ui-font-family: Inter, ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--ui-font-family-compact: Inter, ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--blue-50: #eff6ff;--blue-100: #dbeafe;--blue-200: #bfdbfe;--blue-300: #93c5fd;--blue-400: #60a5fa;--blue-500: #3b82f6;--blue-600: #2563eb;--blue-700: #1d4ed8;--blue-800: #1e40af;--blue-900: #1e3a8a;--blue-999: #172554;--blue-link: var(--blue-700);--green-50: #f0fdf4;--green-100: #dcfce7;--green-200: #bbf7d0;--green-300: #86efac;--green-400: #4ade80;--green-500: #22c55e;--green-600: #16a34a;--green-700: #15803d;--green-800: #166534;--green-900: #14532d;--green-999: #052e16;--grey-50: #f9fafb;--grey-100: #f3f4f6;--grey-200: #e5e7eb;--grey-300: #d1d5db;--grey-400: #9ca3af;--grey-500: #6b7280;--grey-600: #4b5563;--grey-700: #374151;--grey-800: #1f2937;--grey-900: #111827;--grey-999: #030712;--red-50: #fef2f2;--red-100: #fee2e2;--red-200: #fecaca;--red-300: #fca5a5;--red-400: #f87171;--red-500: #ef4444;--red-600: #dc2626;--red-700: #b91c1c;--red-800: #991b1b;--red-900: #7f1d1d;--red-999: #450a0a;--yellow-50: #fefce8;--yellow-100: #fef9c3;--yellow-200: #fef08a;--yellow-300: #fde047;--yellow-400: #facc15;--yellow-500: #eab308;--yellow-600: #ca8a04;--yellow-700: #a16207;--yellow-800: #854d0e;--yellow-900: #713f12;--yellow-999: #422006}[data-theme=dark] .__evidence-leaflet-tile-layer__{filter:invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)}@media print{html{-webkit-print-color-adjust:exact;print-color-adjust:exact}h1,h2,h3,h4{-moz-column-break-after:avoid;break-after:avoid-page}article{orphans:2;widows:2}}.\*\:m-0>*{margin:0}.selection\:bg-black\/15 *::-moz-selection{background-color:#00000026}.selection\:bg-black\/15 *::selection{background-color:#00000026}.selection\:bg-black\/15::-moz-selection{background-color:#00000026}.selection\:bg-black\/15::selection{background-color:#00000026}.placeholder\:text-base-content-muted::-moz-placeholder{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.placeholder\:text-base-content-muted::placeholder{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-left-1\.5:before{content:var(--tw-content);left:-.375rem}.before\:-top-4:before{content:var(--tw-content);top:-1rem}.before\:top-0:before{content:var(--tw-content);top:0}.before\:z-0:before{content:var(--tw-content);z-index:0}.before\:block:before{content:var(--tw-content);display:block}.before\:h-1:before{content:var(--tw-content);height:.25rem}.before\:h-9:before{content:var(--tw-content);height:2.25rem}.before\:w-2:before{content:var(--tw-content);width:.5rem}.before\:w-\[calc\(100\%\+0\.6rem\)\]:before{content:var(--tw-content);width:calc(100% + .6rem)}.before\:bg-base-content:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-right-1:after{content:var(--tw-content);right:-.25rem}.after\:top-0:after{content:var(--tw-content);top:0}.after\:-z-10:after{content:var(--tw-content);z-index:-10}.after\:block:after{content:var(--tw-content);display:block}.after\:h-1:after{content:var(--tw-content);height:.25rem}.after\:w-1:after{content:var(--tw-content);width:.25rem}.after\:rounded-r-full:after{content:var(--tw-content);border-top-right-radius:9999px;border-bottom-right-radius:9999px}.after\:bg-base-content\/20:after{content:var(--tw-content);background-color:hsl(var(--twc-base-content) / .2)}.first\:border-none:first-child{border-style:none}.first\:pl-\[3px\]:first-child{padding-left:3px}.last\:border-none:last-child{border-style:none}.odd\:bg-base-200\/40:nth-child(odd){background-color:hsl(var(--twc-base-200) / .4)}.odd\:bg-base-300:nth-child(odd){--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.hover\:cursor-default:hover{cursor:default}.hover\:border-info\/50:hover{border-color:hsl(var(--twc-info) / .5)}.hover\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.hover\:bg-base-200\/80:hover{background-color:hsl(var(--twc-base-200) / .8)}.hover\:bg-base-300:hover{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.hover\:bg-base-300\/80:hover{background-color:hsl(var(--twc-base-300) / .8)}.hover\:bg-base-content\/90:hover{background-color:hsl(var(--twc-base-content) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-info\/20:hover{background-color:hsl(var(--twc-info) / .2)}.hover\:bg-inherit:hover{background-color:inherit}.hover\:bg-negative\/80:hover{background-color:hsl(var(--twc-negative) / .8)}.hover\:bg-negative\/90:hover{background-color:hsl(var(--twc-negative) / .9)}.hover\:text-base-content:hover{--tw-text-opacity: 1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}.hover\:text-base-content-muted:hover{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-100:hover{opacity:1}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\:ease-in:hover{transition-timing-function:cubic-bezier(.4,0,1,1)}.focus\:z-10:focus{z-index:10}.focus\:border-info:focus{--tw-border-opacity: 1;border-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-border-opacity)))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-base-300:focus{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-ring-opacity)))}.focus\:ring-base-content-muted:focus{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-ring-opacity)))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-8:focus-visible{outline-offset:8px}.focus-visible\:outline-black:focus-visible{outline-color:#000}.focus-visible\:ring:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-base-200:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-ring-opacity)))}.focus-visible\:ring-base-300:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-ring-opacity)))}.focus-visible\:ring-base-content-muted:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-ring-opacity)))}.active\:bg-base-200:active{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.active\:bg-base-300:active{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.active\:outline-none:active{outline:2px solid transparent;outline-offset:2px}.active\:ring:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.active\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.active\:brightness-90:active{--tw-brightness: brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:nth-child(odd) .group-odd\:bg-base-300\/60{background-color:hsl(var(--twc-base-300) / .6)}.group:nth-child(odd) .group-odd\:bg-base-300\/80{background-color:hsl(var(--twc-base-300) / .8)}.group:hover .group-hover\:inline-block{display:inline-block}.group:hover .group-hover\:inline{display:inline}.group:hover .group-hover\:bg-base-300{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.group:hover .group-hover\:bg-primary\/30{background-color:hsl(var(--twc-primary) / .3)}.group:hover .group-hover\:opacity-100{opacity:1}.aria-selected\:bg-base-200[aria-selected=true]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.data-\[disabled\]\:pointer-events-none[data-disabled],.data-\[outside-month\]\:pointer-events-none[data-outside-month]{pointer-events:none}.data-\[state\=active\]\:border-base-300[data-state=active]{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.data-\[highlighted\]\:bg-base-200[data-highlighted]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.data-\[selection-end\]\:bg-base-content[data-selection-end],.data-\[selection-start\]\:bg-base-content[data-selection-start]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.data-\[state\=active\]\:bg-base-300[data-state=active]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.data-\[state\=open\]\:bg-accent[data-state=open]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-accent) / var(--twc-accent-opacity, var(--tw-bg-opacity)))}.data-\[state\=open\]\:bg-base-200[data-state=open]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.data-\[disabled\]\:text-base-content-muted[data-disabled]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.data-\[highlighted\]\:text-base-content[data-highlighted]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}.data-\[highlighted\]\:text-base-content-muted[data-highlighted],.data-\[outside-month\]\:text-base-content-muted[data-outside-month]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.data-\[selection-end\]\:text-base-100[data-selection-end],.data-\[selection-start\]\:text-base-100[data-selection-start]{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}.data-\[state\=open\]\:text-base-content-muted[data-state=open]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.data-\[unavailable\]\:text-negative\/20[data-unavailable]{color:hsl(var(--twc-negative) / .2)}.data-\[unavailable\]\:line-through[data-unavailable]{text-decoration-line:line-through}.data-\[disabled\]\:opacity-50[data-disabled],.data-\[outside-month\]\:opacity-50[data-outside-month]{opacity:.5}.data-\[selected\]\:opacity-100[data-selected]{opacity:1}.data-\[selection-end\]\:hover\:bg-base-content:hover[data-selection-end],.data-\[selection-start\]\:hover\:bg-base-content:hover[data-selection-start]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.data-\[selection-end\]\:hover\:text-base-100:hover[data-selection-end],.data-\[selection-start\]\:hover\:text-base-100:hover[data-selection-start]{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}.data-\[selection-end\]\:focus\:bg-base-content:focus[data-selection-end]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.data-\[selection-start\]\:focus\:bg-base-content:focus[data-selection-start]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.data-\[selection-end\]\:focus\:text-base-100:focus[data-selection-end]{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}.data-\[selection-start\]\:focus\:text-base-100:focus[data-selection-start]{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}@media (min-width: 640px){.sm\:inset-14{top:3.5rem;right:3.5rem;bottom:3.5rem;left:3.5rem}.sm\:mb-4{margin-bottom:1rem}.sm\:mt-20{margin-top:5rem}.sm\:mt-8{margin-top:2rem}.sm\:mt-\[26px\]{margin-top:26px}.sm\:mt-\[74px\]{margin-top:74px}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-1\/4{width:25%}.sm\:w-72{width:18rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-20{padding-left:5rem;padding-right:5rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:pb-0{padding-bottom:0}.sm\:text-left{text-align:left}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:px-12{padding-left:3rem;padding-right:3rem}.md\:pl-8{padding-left:2rem}.md\:pr-8{padding-right:2rem}}@media (min-width: 1024px){.lg\:block{display:block}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:p-0{padding:0}}.dark\:block:where([data-theme=dark],[data-theme=dark] *){display:block}.dark\:hidden:where([data-theme=dark],[data-theme=dark] *){display:none}.dark\:bg-primary\/30:where([data-theme=dark],[data-theme=dark] *){background-color:hsl(var(--twc-primary) / .3)}.dark\:bg-primary\/60:where([data-theme=dark],[data-theme=dark] *){background-color:hsl(var(--twc-primary) / .6)}.group:hover .dark\:group-hover\:bg-primary\/40:where([data-theme=dark],[data-theme=dark] *){background-color:hsl(var(--twc-primary) / .4)}@media print{.print\:mt-8{margin-top:2rem}.print\:hidden{display:none}.print\:w-\[650px\]{width:650px}.print\:break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.print\:px-0{padding-left:0;padding-right:0}@media (min-width: 768px){.print\:md\:w-\[841px\]{width:841px}.print\:md\:px-0{padding-left:0;padding-right:0}}}.\[\&\:has\(\[data-selected\]\)\]\:bg-base-200:has([data-selected]){--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.first\:\[\&\:has\(\[data-selected\]\)\]\:rounded-l-md:has([data-selected]):first-child{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.last\:\[\&\:has\(\[data-selected\]\)\]\:rounded-r-md:has([data-selected]):last-child{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.\[\&\:has\(\[data-selected\]\[data-outside-month\]\)\]\:bg-base-100\/50:has([data-selected][data-outside-month]){background-color:hsl(var(--twc-base-100) / .5)}.\[\&\:has\(\[data-selected\]\[data-selection-end\]\)\]\:rounded-r-md:has([data-selected][data-selection-end]){border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.\[\&\:not\(\:checked\)\]\:appearance-none:not(:checked){-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\[data-outside-month\]\[data-selected\]\]\:bg-base-200\/50[data-outside-month][data-selected]{background-color:hsl(var(--twc-base-200) / .5)}.\[\&\[data-outside-month\]\[data-selected\]\]\:text-base-content-muted[data-outside-month][data-selected]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.\[\&\[data-outside-month\]\[data-selected\]\]\:opacity-30[data-outside-month][data-selected]{opacity:.3}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;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))}.\[\&\[data-today\]\:not\(\[data-selected\]\)\]\:border[data-today]:not([data-selected]){border-width:1px}.\[\&\[data-today\]\:not\(\[data-selected\]\)\]\:border-dashed[data-today]:not([data-selected]){border-style:dashed}.\[\&\[data-today\]\:not\(\[data-selected\]\)\]\:border-base-300[data-today]:not([data-selected]){--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.\[\&\[data-today\]\:not\(\[data-selected\]\)\]\:text-base-content[data-today]:not([data-selected]){--tw-text-opacity: 1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}.\[\&_\[data-cmdk-group-heading\]\]\:px-2 [data-cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[data-cmdk-group-heading\]\]\:py-1\.5 [data-cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[data-cmdk-group-heading\]\]\:text-xs [data-cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[data-cmdk-group-heading\]\]\:font-medium [data-cmdk-group-heading]{font-weight:500}.\[\&_\[data-cmdk-group-heading\]\]\:text-base-content-muted [data-cmdk-group-heading]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.\[\&_\[data-cmdk-group\]\:not\(\[hidden\]\)_\~\[data-cmdk-group\]\]\:pt-0 [data-cmdk-group]:not([hidden])~[data-cmdk-group]{padding-top:0}.\[\&_\[data-cmdk-group\]\]\:px-2 [data-cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[data-cmdk-input-wrapper\]_svg\]\:h-5 [data-cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[data-cmdk-input-wrapper\]_svg\]\:w-5 [data-cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[data-cmdk-input\]\]\:h-12 [data-cmdk-input]{height:3rem}.\[\&_\[data-cmdk-item\]\]\:px-2 [data-cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[data-cmdk-item\]\]\:py-3 [data-cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[data-cmdk-item\]_svg\]\:h-5 [data-cmdk-item] svg{height:1.25rem}.\[\&_\[data-cmdk-item\]_svg\]\:w-5 [data-cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:invisible svg{visibility:hidden} diff --git a/_app/immutable/assets/VennDiagram.CxdP6QWN.css b/_app/immutable/assets/VennDiagram.CxdP6QWN.css new file mode 100644 index 0000000000000000000000000000000000000000..9de4905de3ccec9ee296c081e9fea7272d3ebd45 --- /dev/null +++ b/_app/immutable/assets/VennDiagram.CxdP6QWN.css @@ -0,0 +1 @@ +.alert.svelte-1w1ov1c{margin-bottom:1rem;border-radius:.25rem;border-width:1px;border-color:hsl(var(--twc-base-content) / .5);background-color:hsl(var(--twc-base-content) / .1);padding:.5rem .75rem}.alert.info.svelte-1w1ov1c{border-color:hsl(var(--twc-info) / .5);background-color:hsl(var(--twc-info) / .1)}.alert.negative.svelte-1w1ov1c{border-color:hsl(var(--twc-negative) / .5);background-color:hsl(var(--twc-negative) / .1)}.alert.positive.svelte-1w1ov1c{border-color:hsl(var(--twc-positive) / .5);background-color:hsl(var(--twc-positive) / .1)}.alert.warning.svelte-1w1ov1c{border-color:hsl(var(--twc-warning) / .5);background-color:hsl(var(--twc-warning) / .1)}.alert.svelte-1w1ov1c .markdown:last-child{margin-bottom:0}.alert.svelte-1w1ov1c .markdown:first-child{margin-top:0}button.variant-primary.svelte-1c08hho{--bg:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1));--text:hsl(var(--twc-primary-content) / var(--twc-primary-content-opacity, 1))}button.variant-primary.outlined.svelte-1c08hho{--border:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1));--text:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1));--hover-bg:hsl(var(--twc-primary) / .1)}button.variant-secondary.svelte-1c08hho{--bg:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1));--text:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, 1))}button.variant-secondary.outlined.svelte-1c08hho{--border:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1));--text:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1));--hover-bg:hsl(var(--twc-base-300) / .1)}button.variant-accent.svelte-1c08hho{--bg:hsl(var(--twc-accent) / var(--twc-accent-opacity, 1));--text:hsl(var(--twc-accent-content) / var(--twc-accent-content-opacity, 1))}button.variant-accent.outlined.svelte-1c08hho{--border:hsl(var(--twc-accent) / var(--twc-accent-opacity, 1));--text:hsl(var(--twc-accent) / var(--twc-accent-opacity, 1));--hover-bg:hsl(var(--twc-accent) / .1)}button.variant-info.svelte-1c08hho{--bg:hsl(var(--twc-info) / var(--twc-info-opacity, 1));--text:hsl(var(--twc-info-content) / var(--twc-info-content-opacity, 1))}button.variant-info.outlined.svelte-1c08hho{--border:hsl(var(--twc-info) / var(--twc-info-opacity, 1));--text:hsl(var(--twc-info) / var(--twc-info-opacity, 1));--hover-bg:hsl(var(--twc-info) / .1)}button.variant-positive.svelte-1c08hho{--bg:hsl(var(--twc-positive) / var(--twc-positive-opacity, 1));--text:hsl(var(--twc-positive-content) / var(--twc-positive-content-opacity, 1))}button.variant-positive.outlined.svelte-1c08hho{--border:hsl(var(--twc-positive) / var(--twc-positive-opacity, 1));--text:hsl(var(--twc-positive) / var(--twc-positive-opacity, 1));--hover-bg:hsl(var(--twc-positive) / .1)}button.variant-warning.svelte-1c08hho{--bg:hsl(var(--twc-warning) / var(--twc-warning-opacity, 1));--text:hsl(var(--twc-warning-content) / var(--twc-warning-content-opacity, 1))}button.variant-warning.outlined.svelte-1c08hho{--border:hsl(var(--twc-warning) / var(--twc-warning-opacity, 1));--text:hsl(var(--twc-warning) / var(--twc-warning-opacity, 1));--hover-bg:hsl(var(--twc-warning) / .1)}button.variant-negative.svelte-1c08hho{--bg:hsl(var(--twc-negative) / var(--twc-negative-opacity, 1));--text:hsl(var(--twc-negative-content) / var(--twc-negative-content-opacity, 1))}button.variant-negative.outlined.svelte-1c08hho{--border:hsl(var(--twc-negative) / var(--twc-negative-opacity, 1));--text:hsl(var(--twc-negative) / var(--twc-negative-opacity, 1));--hover-bg:hsl(var(--twc-negative) / .1)}button.svelte-1c08hho{border-color:var(--border);background-color:var(--bg);color:var(--text)}button.outlined.svelte-1c08hho{border-width:1px;background-color:transparent}button.outlined.svelte-1c08hho:not(:disabled):hover{background-color:var(--hover-bg)}button.svelte-1c08hho:disabled{cursor:not-allowed;opacity:.5;--tw-saturate:saturate(.5);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}button.svelte-1c08hho:not(:disabled){transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}button.svelte-1c08hho:not(:disabled):hover{--tw-brightness:brightness(1.05);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}button.svelte-1c08hho:not(:disabled):active{--tw-brightness:brightness(.95);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}dialog.svelte-t161xa::backdrop{background-color:hsl(var(--twc-base-100) / .8);--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.slideOut.svelte-t161xa::backdrop{all:unset}@keyframes svelte-t161xa-slideInFromBottom{0%{transform:translateY(70%);opacity:0}90%{opacity:.3}to{transform:translateY(0);opacity:.95}}.slideIn.svelte-t161xa{animation:svelte-t161xa-slideInFromBottom .3s ease-in-out}@keyframes svelte-t161xa-slideOutToBottom{0%{transform:translateY(0);opacity:1}to{transform:translateY(40%);opacity:0}}.slideOut.svelte-t161xa{animation:svelte-t161xa-slideOutToBottom .3s ease-in-out}.viewport.svelte-851usv{position:relative;overflow-y:auto;-webkit-overflow-scrolling:touch;display:block}.contents.svelte-851usv,.row.svelte-851usv{display:block}.row.svelte-851usv{overflow:hidden}.negative.svelte-118njox{border-color:hsl(var(--twc-negative) / .5);background-color:hsl(var(--twc-negative) / .1);--tw-text-opacity:1;color:hsl(var(--twc-negative) / var(--twc-negative-opacity, var(--tw-text-opacity)))}.warning.svelte-118njox{border-color:hsl(var(--twc-warning) / .5);background-color:hsl(var(--twc-warning) / .1);--tw-text-opacity:1;color:hsl(var(--twc-warning) / var(--twc-warning-opacity, var(--tw-text-opacity)))}.positive.svelte-118njox{border-color:hsl(var(--twc-positive) / .5);background-color:hsl(var(--twc-positive) / .1);--tw-text-opacity:1;color:hsl(var(--twc-positive) / var(--twc-positive-opacity, var(--tw-text-opacity)))}.info.svelte-118njox{border-color:hsl(var(--twc-info) / .5);background-color:hsl(var(--twc-info) / .1);--tw-text-opacity:1;color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-text-opacity)))}.search-container.svelte-116nqgn{border-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));width:30%;display:block;align-items:center;border-radius:4px;height:22px;position:relative;margin:25px 3px 10px 0;box-sizing:content-box}.search-icon.svelte-116nqgn{height:16px;width:16px;padding-left:3px;margin:0;position:absolute;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);box-sizing:content-box}.search-bar.svelte-116nqgn{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));margin:0;position:absolute;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);border:none;padding-left:23px;font-size:9pt;width:calc(100% - 10px);font-family:Arial;line-height:normal}input.search-bar.svelte-116nqgn::-moz-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}input.search-bar.svelte-116nqgn::placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.svelte-116nqgn:focus{outline:none}@media (max-width: 600px){.search-container.svelte-116nqgn{width:98%;height:28px}.search-bar.svelte-116nqgn{font-size:16px;width:calc(100% - 20px)}}@media print{.search-container.svelte-116nqgn{display:none}}.string.svelte-1hwgyu4,.date.svelte-1hwgyu4{text-align:left}.number.svelte-1hwgyu4{text-align:right}.boolean.svelte-1hwgyu4{text-align:left}.index.svelte-1hwgyu4{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));text-align:left;max-width:-moz-min-content;max-width:min-content}.svelte-1hwgyu4:focus{outline:none}.row-lines.svelte-174z7k0{border-bottom-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.shaded-row.svelte-174z7k0{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.svelte-174z7k0:focus{outline:none}.row-link.svelte-174z7k0{cursor:pointer}.row-link.svelte-174z7k0:hover{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}th.svelte-1q0vbz4{white-space:nowrap;overflow:hidden}th.svelte-1q0vbz4:first-child{padding-left:3px}.index.svelte-1q0vbz4{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));text-align:left;max-width:-moz-min-content;max-width:min-content}.string.svelte-1q0vbz4,.date.svelte-1q0vbz4{text-align:left}.number.svelte-1q0vbz4{text-align:right}.boolean.svelte-1q0vbz4{text-align:left}@media print{.chevron.svelte-bqpzbr{display:none}}button.svelte-1grvppi svg{stroke:var(--base-content);margin-top:auto;margin-bottom:auto;transition:stroke .2s}button.svelte-1grvppi{display:flex;cursor:pointer;font-family:var(--ui-font-family);font-size:1em;color:var(--base-content);opacity:.5;justify-items:flex-end;align-items:baseline;background-color:transparent;border:none;padding:0;margin:0 5px;gap:3px;transition:all .2s;-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}button.svelte-1grvppi:hover{opacity:1;color:var(--primary);transition:all .2s}button.svelte-1grvppi:hover svg{stroke:var(--primary);transition:all .2s}@media (max-width: 600px){button.svelte-1grvppi{display:none}}@media print{button.svelte-1grvppi{display:none}}.table-container.svelte-ozf09l.svelte-ozf09l{font-size:9.5pt}.scrollbox.svelte-ozf09l.svelte-ozf09l{width:100%;overflow-x:auto;scrollbar-width:thin}table.svelte-ozf09l.svelte-ozf09l{display:table;width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.page-changer.svelte-ozf09l.svelte-ozf09l{padding:0;height:1.1em;width:1.1em}.pagination.svelte-ozf09l.svelte-ozf09l{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));font-size:12px;display:flex;align-items:center;justify-content:flex-end;height:2em;font-family:var(--ui-font-family);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:right;margin-top:.5em;margin-bottom:1.8em;font-variant-numeric:tabular-nums}.page-labels.svelte-ozf09l.svelte-ozf09l{display:flex;justify-content:flex-start;align-items:center;gap:3px}.page-changer.svelte-ozf09l.svelte-ozf09l{font-size:20px;background:none;border:none;cursor:pointer;transition:color .2s}.page-changer.hovering.svelte-ozf09l.svelte-ozf09l{color:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1));transition:color .2s}.page-changer.svelte-ozf09l.svelte-ozf09l:disabled{color:hsl(var(--twc-base-content-muted) / .25);cursor:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:color .2s}.page-icon.svelte-ozf09l.svelte-ozf09l{height:1em;width:1em}.page-input.svelte-ozf09l.svelte-ozf09l{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)));--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));box-sizing:content-box;text-align:center;padding:.25em .5em;margin:0;border:1px solid transparent;border-radius:4px;font-size:12px}.table-footer.svelte-ozf09l.svelte-ozf09l{display:flex;justify-content:flex-end;align-items:center;margin:10px 0;font-size:12px;height:9px}.page-input.svelte-ozf09l.svelte-ozf09l::-webkit-outer-spin-button,.page-input.svelte-ozf09l.svelte-ozf09l::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.page-input[type=number].svelte-ozf09l.svelte-ozf09l{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.page-input.hovering.svelte-ozf09l.svelte-ozf09l{border:1px solid var(--base-300)}.page-input.error.svelte-ozf09l.svelte-ozf09l{border:1px solid var(--negative)}.page-input.svelte-ozf09l.svelte-ozf09l::-moz-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.page-input.svelte-ozf09l.svelte-ozf09l::placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}button.svelte-ozf09l:enabled>.page-icon.svelte-ozf09l:hover{filter:brightness(.8)}.svelte-ozf09l.svelte-ozf09l:focus{outline:none}.svelte-ozf09l.svelte-ozf09l::-moz-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));opacity:1}.svelte-ozf09l.svelte-ozf09l::placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));opacity:1}.svelte-ozf09l.svelte-ozf09l:-ms-input-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.svelte-ozf09l.svelte-ozf09l::-ms-input-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.noresults.svelte-ozf09l.svelte-ozf09l{display:none;--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));text-align:center;margin-top:5px}.shownoresults.svelte-ozf09l.svelte-ozf09l{display:block}.print-page-count.svelte-ozf09l.svelte-ozf09l{display:none}@media (max-width: 600px){.page-changer.svelte-ozf09l.svelte-ozf09l,.page-icon.svelte-ozf09l.svelte-ozf09l{height:1.2em;width:1.2em}.page-count.svelte-ozf09l.svelte-ozf09l,.page-input.svelte-ozf09l.svelte-ozf09l{font-size:1.1em}}@media print{.pagination.svelte-ozf09l.svelte-ozf09l{-moz-column-break-inside:avoid;break-inside:avoid}.page-changer.svelte-ozf09l.svelte-ozf09l,.page-count.svelte-ozf09l.svelte-ozf09l{display:none}.print-page-count.svelte-ozf09l.svelte-ozf09l{display:inline}}section.svelte-1bw0fbe .cm-editor{min-height:8rem;border-radius:.25rem}input.svelte-11j8m88,select.svelte-11j8m88,textarea.svelte-11j8m88{margin-left:auto;width:66.666667%;border-radius:.25rem;border-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));padding:.25rem;vertical-align:middle;font-size:.875rem;line-height:1.25rem}.source-config-table.svelte-2j5e0k{grid-template-columns:auto auto auto 1fr}/*! @docsearch/css Variables 3.8.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}/*! @docsearch/css Modal 3.8.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::-moz-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.DocSearch-Button{display:flex;cursor:pointer;align-items:center;gap:4rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));padding:.25rem 5rem .25rem .5rem;font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02";font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.DocSearch-Button:hover{background-color:hsl(var(--twc-base-200) / .4)}@media (min-width: 640px){.DocSearch-Button{padding-right:.25rem;font-size:.75rem;line-height:1rem}}.DocSearch-Button-Placeholder{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.DocSearch-Search-Icon{display:none}.DocSearch-Button-Keys{display:none;gap:.125rem;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));background-color:hsl(var(--twc-base-200) / .4);padding:.125rem .25rem;font-size:.75rem;line-height:1rem}@media (min-width: 640px){.DocSearch-Button-Keys{display:flex}}.DocSearch-Button-Key,.DocSearch-Control-Key-Icon{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.DocSearch-Button-Key>*,.DocSearch-Control-Key-Icon>*{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}a.svelte-h1u6r0{display:block;padding-top:.25rem;padding-bottom:.25rem;font-size:.75rem;line-height:1rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}a.svelte-h1u6r0:hover{text-decoration-line:underline}a.h1.svelte-h1u6r0{margin-top:.75rem;display:block;--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));font-weight:600;--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);--tw-shadow-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, 1));--tw-shadow:var(--tw-shadow-colored) }a.h2.svelte-h1u6r0{padding-left:0;--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}a.h3.svelte-h1u6r0{padding-left:1rem;--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}body{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));--tw-text-opacity:1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}div.svelte-1ks13uq{border-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-shadow-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, 1));--tw-shadow:var(--tw-shadow-colored)}div.svelte-1ks13uq:hover{--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)}div.svelte-1ks13uq{border-radius:6px;padding:.3em .6em;font-family:var(--ui-font-family);font-size:.8em;margin-top:1em;margin-bottom:1.25em;cursor:pointer;transition:all .4s}a.svelte-1ks13uq{text-decoration:none;color:var(--primary)}a.svelte-1ks13uq:hover{text-decoration:none;filter:brightness(80%)}svg.svelte-c6mrxw.svelte-c6mrxw{display:inline-block;vertical-align:middle;transition:transform .15s ease-in}span.svelte-c6mrxw.svelte-c6mrxw{margin:auto 0}[aria-expanded=true].svelte-c6mrxw svg.svelte-c6mrxw{transform:rotate(.25turn)}.marker.svelte-6m89aj{border-left:5px solid transparent;border-right:5px solid transparent;border-top:9px solid var(--base-content-muted);transform:rotate(-90deg);transition:transform .2s ease}.rotate-marker.svelte-6m89aj{transform:rotate(0)}button.svelte-6m89aj{display:flex;align-items:center;cursor:pointer}div.svelte-yvs8yi{height:1.8em}p.svelte-yvs8yi{font-family:var(--ui-font-family);color:#7d7d7d;font-size:.75em}input.button.svelte-yvs8yi{background-color:transparent;font-family:var(--ui-font-family);color:#7d7d7d;font-weight:700;margin-left:0;border:1px solid lightgrey;border-radius:0 4px 4px 0;height:100%;-webkit-appearance:none;-moz-appearance:none}form.svelte-yvs8yi{display:inline-block;padding:0;height:1.5em}input.svelte-yvs8yi{box-sizing:border-box;border-radius:4px 0 0 4px;border:1px solid lightgrey;border-right:none;padding:.25em;margin-right:0;height:100%;color:#7d7d7d;-webkit-appearance:none;-moz-appearance:none}input.svelte-yvs8yi:required{box-shadow:none}input.svelte-yvs8yi:focus{outline:none}input.svelte-yvs8yi{vertical-align:middle}@media (max-width: 600px){div.svelte-yvs8yi{text-align:center}input.svelte-yvs8yi{padding:.75em .5em;font-size:16px}input.email.svelte-yvs8yi{width:50%}input.button.svelte-yvs8yi{font-weight:400;line-height:0}}.progress-container.svelte-1ya7oje{position:absolute;top:0;left:0;width:100%;height:3px;z-index:999}.progress.svelte-1ya7oje{position:absolute;left:0;top:0;height:100%;background-image:-webkit-linear-gradient(315deg,var(--info) 0%,var(--positive) 75%);transition:width .4s}.fade.svelte-1ya7oje{position:fixed;width:100%;height:100%;background-color:#ffffff4d;pointer-events:none;z-index:998;animation:svelte-1ya7oje-fade .4s}@keyframes svelte-1ya7oje-fade{0%{opacity:0}to{opacity:1}}div.pagination.svelte-nkkkq7.svelte-nkkkq7{padding:0 5px;align-content:center;border-bottom:1px solid var(--base-200);height:1.25em;background-color:var(--base-100);display:flex;flex-direction:row;justify-content:space-between;align-items:center}.slider.svelte-nkkkq7.svelte-nkkkq7{background-color:hsl(var(--twc-info) / .3);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.slider.svelte-nkkkq7.svelte-nkkkq7:hover{background-color:hsl(var(--twc-info) / .4)}.slider.svelte-nkkkq7.svelte-nkkkq7{-webkit-appearance:none;width:75%;height:10px;margin:0;outline:none;border-radius:10px;display:inline-block;cursor:pointer}.slider.svelte-nkkkq7.svelte-nkkkq7::-webkit-slider-thumb{--tw-bg-opacity:1;background-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-bg-opacity)));-webkit-appearance:none;appearance:none;width:10px;height:10px;cursor:pointer;border-radius:10px}.slider.svelte-nkkkq7.svelte-nkkkq7::-moz-range-thumb{--tw-bg-opacity:1;background-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-bg-opacity)));width:10px;height:10px;cursor:pointer}span.svelte-nkkkq7.svelte-nkkkq7{font-size:.75rem;line-height:1rem;font-family:var(--ui-font-family-compact);-webkit-font-smoothing:antialiased;float:right}.scrollbox.svelte-nkkkq7.svelte-nkkkq7{width:100%;overflow-x:auto;border-bottom:1px solid var(--base-300);background-color:var(--base-100)}.results-pane.svelte-nkkkq7 .download-button{margin-top:10px}table.svelte-nkkkq7.svelte-nkkkq7{font-size:.75rem;line-height:1rem;width:100%;border-collapse:collapse;font-family:var(--ui-font-family);font-variant-numeric:tabular-nums}th.svelte-nkkkq7.svelte-nkkkq7{padding-top:0;padding-bottom:0;padding-left:.5rem;padding-right:.5rem;font-weight:500}td.svelte-nkkkq7.svelte-nkkkq7{padding:2px 8px;overflow:hidden;text-overflow:ellipsis}td.svelte-nkkkq7 div.svelte-nkkkq7{width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.other.svelte-nkkkq7.svelte-nkkkq7,.string.svelte-nkkkq7.svelte-nkkkq7,.date.svelte-nkkkq7.svelte-nkkkq7{text-align:left}.number.svelte-nkkkq7.svelte-nkkkq7{text-align:right}.boolean.svelte-nkkkq7.svelte-nkkkq7{text-align:left}.null.svelte-nkkkq7.svelte-nkkkq7{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.index.svelte-nkkkq7.svelte-nkkkq7{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));text-align:left;max-width:-moz-min-content;max-width:min-content}th.type-indicator.svelte-nkkkq7.svelte-nkkkq7{font-weight:400;--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}tr.type-indicator.svelte-nkkkq7.svelte-nkkkq7{border-bottom:1px solid var(--base-300)}.footer.svelte-nkkkq7.svelte-nkkkq7{display:flex;justify-content:flex-end;font-size:12px}code[class*=language-],pre[class*=language-]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5em;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none;background-color:unset;border:unset;border-radius:unset;-webkit-user-select:unset;-moz-user-select:unset;user-select:unset}:not(pre)>code[class*=language-]{white-space:normal;border-radius:.2em}pre[class*=language-]{overflow:auto;position:relative}.language-css>code,.language-sass>code,.language-scss>code{color:#f76d47}[class*=language-] .namespace{opacity:.7}.token.atrule{color:#7c4dff}.token.attr-name{color:#39adb5}.token.attr-value,.token.attribute{color:#f6a434}.token.boolean{color:#7c4dff}.token.builtin,.token.cdata,.token.char,.token.class{color:#39adb5}.token.class-name{color:#6182b8}.token.comment{color:#1d4ed8}.token.constant{color:#7c4dff}.token.deleted{color:#e53935}.token.doctype{color:#aabfc9}.token.entity{color:#e53935}.token.function{color:#046ade;font-weight:700}.token.hexcode{color:#f76d47}.token.id,.token.important{color:#7c4dff;font-weight:700}.token.inserted{color:#39adb5}.token.keyword{color:#08a86d}.token.number{color:#046ade}.token.operator{color:#39adb5}.token.prolog{color:#aabfc9}.token.property{color:#39adb5}.token.pseudo-class,.token.pseudo-element{color:#f6a434}.token.punctuation{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.token.regex{color:#6182b8}.token.selector{color:#e53935}.token.string{color:#e89521}.token.symbol{color:#7c4dff}.token.tag{color:#e53935}.token.unit{color:#f76d47}.token.url,.token.variable{color:#e53935}code.svelte-1v2cb81{display:block}div.toggle.svelte-1mcdez6{background-color:var(--base-200);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);padding:6px 0 10px 12px;font-family:var(--ui-font-family);font-size:10px;user-select:none;-webkit-user-select:none;-moz-user-select:none}button.svelte-1mcdez6{padding:2px 4px;border-radius:3px;cursor:pointer;background-color:transparent;font-size:1em;font-weight:600}button.off.svelte-1mcdez6{border:1px solid var(--base-300);transition:all .4s}button.off.svelte-1mcdez6:hover{background-color:var(--base-300);transition:all .4s}button.on.svelte-1mcdez6{border-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-border-opacity)));background-color:hsl(var(--twc-info) / .1);--tw-text-opacity:1;color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-text-opacity)))}:root{--scrollbar-track-color:transparent;--scrollbar-color:rgba(0, 0, 0, .2);--scrollbar-active-color:rgba(0, 0, 0, .4);--scrollbar-size:.75rem;--scrollbar-minlength:1.5rem}.code-container.svelte-1p12lev{background-color:var(--base-200);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);overflow-x:auto;overflow-y:hidden;padding:0 12px 6px 15px;scrollbar-width:thin;scrollbar-color:var(--scrollbar-color) var(--scrollbar-track-color)}.code-container.svelte-1p12lev::-webkit-scrollbar{height:var(--scrollbar-size);width:var(--scrollbar-size)}.code-container.svelte-1p12lev::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.over-container.svelte-1p12lev{overflow-y:hidden;overflow-x:auto}.code-container.svelte-1p12lev::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color);border-radius:7px;background-clip:padding-box}.code-container.svelte-1p12lev::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-active-color)}.code-container.svelte-1p12lev::-webkit-scrollbar-thumb:vertical{min-height:var(--scrollbar-minlength);border:3px solid transparent}.code-container.svelte-1p12lev::-webkit-scrollbar-thumb:horizontal{min-width:var(--scrollbar-minlength);border:3px solid transparent}.status-bar.svelte-1p12lev{margin-top:0;margin-bottom:0;background-color:var(--base-200);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-bottom:1px solid var(--base-300);overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--scrollbar-color) var(--scrollbar-track-color)}.status-bar.svelte-1p12lev::-webkit-scrollbar{height:var(--scrollbar-size);width:var(--scrollbar-size)}.status-bar.svelte-1p12lev::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.status-bar.svelte-1p12lev::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color);border-radius:7px;background-clip:padding-box}.status-bar.svelte-1p12lev::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-active-color)}.status-bar.svelte-1p12lev::-webkit-scrollbar-thumb:vertical{min-height:var(--scrollbar-minlength);border:3px solid transparent}.status-bar.svelte-1p12lev::-webkit-scrollbar-thumb:horizontal{min-width:var(--scrollbar-minlength);border:3px solid transparent}.closed.svelte-1p12lev{border-bottom-left-radius:6px;border-bottom-right-radius:6px}.open.svelte-1p12lev{border-bottom-left-radius:0;border-bottom-right-radius:0}.status-bar.success.svelte-1p12lev{color:var(--info);cursor:pointer}.status-bar.error.svelte-1p12lev{color:var(--negative);-webkit-user-select:all;-moz-user-select:all;user-select:all;cursor:auto}button.svelte-1p12lev{font-family:var(--ui-font-family-compact);-webkit-font-smoothing:antialiased;font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;text-align:left;width:100%;background-color:var(--base-200);border:none;border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);margin-bottom:0;cursor:pointer;padding:5px}button.title.svelte-1p12lev{border-top:1px solid var(--base-300);border-top-left-radius:6px;border-top-right-radius:6px}.scrollbox.svelte-1p12lev{margin-top:.75rem;margin-bottom:.75rem;display:flex;flex-direction:column}.container-a.svelte-1p12lev{background-color:var(--base-200);border-top-left-radius:6px;border-top-right-radius:6px;box-sizing:border-box;display:flex;flex-direction:column}@media print{.scrollbox.svelte-1p12lev{-moz-column-break-inside:avoid;break-inside:avoid}}h2.svelte-lmhsq3.svelte-lmhsq3{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-lmhsq3.svelte-lmhsq3{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}button.svelte-lmhsq3.svelte-lmhsq3{margin-right:.25em;margin-left:.25em;font-style:normal;text-decoration:none;font-size:14px;cursor:pointer;background-color:var(--primary);color:var(--primary-content);font-weight:700;border-radius:4px;padding:.4em 1.1em;transition-property:background,color;transition-duration:.35s}div.new-format-buttons.svelte-lmhsq3.svelte-lmhsq3{display:flex;justify-content:flex-start;padding-top:.5em}ul.svelte-lmhsq3.svelte-lmhsq3{list-style:none;padding-inline-start:0px}ul.svelte-lmhsq3 li.svelte-lmhsq3:before{content:"•";color:var(--base-content);font-weight:700;display:inline-block;width:.9em;margin-left:1.5em}button.container.svelte-exlw3k{box-sizing:border-box;background-color:var(--base-200);border-radius:4px;border:1px solid var(--base-300);padding:.9em .35em;size:.75em;cursor:pointer;user-select:none;-webkit-user-select:none;-moz-user-select:none;display:flex;flex-direction:row;justify-content:space-between;align-items:center;transition:all .4s;width:100%;font-family:var(--monospace-font-family);line-height:1.6;font-size:inherit}button.container.svelte-exlw3k:hover{--tw-border-opacity:1;border-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-border-opacity)));background-color:hsl(var(--twc-info) / .1);--tw-text-opacity:1;color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-text-opacity)));transition:all .4s}button.container.svelte-exlw3k:active,button.container.copied.svelte-exlw3k{--tw-border-opacity:1;border-color:hsl(var(--twc-positive) / var(--twc-positive-opacity, var(--tw-border-opacity)));background-color:hsl(var(--twc-positive) / .1);--tw-text-opacity:1;color:hsl(var(--twc-positive) / var(--twc-positive-opacity, var(--tw-text-opacity)))}span.var-value.svelte-exlw3k{width:85%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}h2.svelte-uhtp23{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-uhtp23{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}a.svelte-uhtp23{--tw-text-opacity:1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)));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}a.svelte-uhtp23:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}a.svelte-uhtp23:active{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}span.setting.svelte-uhtp23{font-size:.85em;text-transform:uppercase;letter-spacing:.05em}div.setting-row.svelte-uhtp23{margin-top:1.25em}div.setting-row.svelte-uhtp23:first-of-type{margin-top:0}div.setting-value.svelte-uhtp23{margin-top:.25em;width:45%}.separator.svelte-uhtp23{display:flex;align-items:center;text-align:center;margin-block-start:2.5em;color:var(--base-content);font-weight:700}.separator.svelte-uhtp23:after{content:"";flex:1;border-bottom:1px solid var(--base-300)}.separator.svelte-uhtp23:not(:empty):after{margin-left:1.5em;margin-top:.1em}h2.svelte-1ifbe9h{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-1ifbe9h{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}a.svelte-1ifbe9h{--tw-text-opacity:1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)));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}a.svelte-1ifbe9h:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}a.svelte-1ifbe9h:active{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}span.setting.svelte-1ifbe9h{font-size:.85em;text-transform:uppercase;letter-spacing:.05em}div.setting-row.svelte-1ifbe9h{margin-top:1.25em}div.setting-row.svelte-1ifbe9h:first-of-type{margin-top:0}div.setting-value.svelte-1ifbe9h{margin-top:.25em;width:45%}.separator.svelte-1ifbe9h{display:flex;align-items:center;text-align:center;margin-block-start:2.5em;color:var(--base-content);font-weight:700}.separator.svelte-1ifbe9h:after{content:"";flex:1;border-bottom:1px solid var(--base-300)}.separator.svelte-1ifbe9h:not(:empty):after{margin-left:1.5em;margin-top:.1em}h2.svelte-oz5mco{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-oz5mco{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}span.setting.svelte-oz5mco{font-size:.85em;text-transform:uppercase;letter-spacing:.05em}div.setting-row.svelte-oz5mco{margin-top:1.25em}div.setting-row.svelte-oz5mco:first-of-type{margin-top:0}div.setting-value.svelte-oz5mco{margin-top:.25em;width:45%}.separator.svelte-oz5mco{display:flex;align-items:center;text-align:center;margin-block-start:2.5em;font-weight:700}.separator.svelte-oz5mco:after{content:"";flex:1;border-bottom:1px solid var(--base-300)}.separator.svelte-oz5mco:not(:empty):after{margin-left:1.5em;margin-top:.1em}div.environment-variable.svelte-jy9xey{font-family:var(--ui-font-family);font-size:16px;margin-bottom:1.25em;display:flex;flex-direction:row;justify-content:space-between;align-items:center}div.titles.svelte-jy9xey{font-family:var(--ui-font-family);font-size:16px;margin-bottom:.25em;display:flex;flex-direction:row;justify-content:space-between;align-items:center}div.var-value.svelte-jy9xey{margin-left:auto;width:45%}div.var-name.svelte-jy9xey{width:45%}span.title.svelte-jy9xey{width:45%;font-size:.85em;text-transform:uppercase;letter-spacing:.07em}h3.svelte-1ukb5v1{margin-top:1.5rem;margin-bottom:.25rem;font-size:.875rem;line-height:1.25rem;text-transform:uppercase;line-height:2}h2.svelte-1ukb5v1{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-1ukb5v1{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}select.svelte-1ukb5v1{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:.35em;width:100%;border:1px solid var(--base-300);font-family:var(--ui-font-family);background:var(--base-200);margin:.5em 0 0;transition:all .4s;cursor:pointer}select.svelte-1ukb5v1:hover{--tw-border-opacity:1;border-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-border-opacity)));--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:all .4s}select.svelte-1ukb5v1:focus{outline:none}form.svelte-1ukb5v1{scroll-margin-top:3.5rem}.deploy-settings-box.svelte-1ukb5v1{margin-top:2em;border-top:1px solid var(--base-300);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-radius:5px 5px 0 0;font-size:14px;font-family:var(--ui-font-family);min-width:100%}.panel.svelte-1ukb5v1{border-top:1px solid var(--base-300);padding:0 1em 1em}.panel.svelte-1ukb5v1:first-of-type{border-top:none}footer.svelte-1ukb5v1{border:1px solid var(--base-300);border-radius:0 0 5px 5px;background-color:var(--base-200);padding:1em;display:flex;font-size:14px;align-items:center;font-family:var(--ui-font-family)}.docs-link.svelte-1ukb5v1{--tw-text-opacity:1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)));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}.docs-link.svelte-1ukb5v1:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.docs-link.svelte-1ukb5v1:active{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}table.svelte-51mr58{font-size:14px;border-collapse:collapse;margin-left:-8px;width:calc(100% + 16px)}th.svelte-51mr58{max-width:1px;font-weight:600;padding:0 8px;text-overflow:ellipsis;overflow:hidden}td.svelte-51mr58{padding:4px 8px;overflow:hidden;text-overflow:ellipsis}.align_left.svelte-51mr58{text-align:left}.align_right.svelte-51mr58{text-align:right}.wide_column.svelte-51mr58{min-width:120px}.narrow_column.svelte-51mr58{max-width:60px}.input_box.svelte-51mr58{width:100%}input.svelte-51mr58{background:var(--base-200);box-sizing:border-box;border-radius:4px;border:1px solid var(--base-300);margin-left:auto;width:65%;padding:.35em;-webkit-appearance:none;-moz-appearance:none;vertical-align:middle;font-size:12px}input.svelte-51mr58:required{box-shadow:none}input.svelte-51mr58:focus{outline:none}collapsibleHeader.svelte-16b384t{margin:0;padding:0;vertical-align:middle}h3.svelte-16b384t{margin:0;font-style:normal}button.svelte-16b384t{font-size:14px;background-color:var(--base-200);border-radius:4px;display:flex;justify-content:space-between;width:100%;border:none;margin:0;padding:.5em;cursor:pointer}.collapsibleContents.svelte-16b384t{padding:.5em .5em 1.5em}.collapsibleSection.svelte-16b384t{padding:0;margin:.5em 0 0}select.svelte-15kx861{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:.35em;width:100%;border:1px solid var(--base-300);font-family:var(--ui-font-family);background:var(--base-200);margin:.5em 0 0;transition:all .4s;cursor:pointer}select.svelte-15kx861:hover{--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);border:1px solid var(--base-content);transition:all .4s}select.svelte-15kx861:focus{outline:none}table.svelte-15kx861{font-size:14px;border-collapse:collapse;margin-left:-8px;width:calc(100% + 16px)}th.svelte-15kx861{max-width:1px;font-weight:600;padding:0 8px;text-overflow:ellipsis;overflow:hidden}td.svelte-15kx861{padding:4px 8px;overflow:hidden;text-overflow:ellipsis}.align_left.svelte-15kx861{text-align:left}.align_right.svelte-15kx861{text-align:right}.wide_column.svelte-15kx861{min-width:120px}.narrow_column.svelte-15kx861{max-width:60px}.input_box.svelte-15kx861{width:100%}input.svelte-15kx861{box-sizing:border-box;border-radius:4px;border:1px solid var(--base-300);background:var(--base-200);margin-left:auto;width:65%;padding:.35em;-webkit-appearance:none;-moz-appearance:none;vertical-align:middle;font-size:12px}input.svelte-15kx861:required{box-shadow:none}input.svelte-15kx861:focus{outline:none}.deleteIcon.svelte-1dnj419{color:var(--negative);width:16px;cursor:pointer}button.svelte-1dnj419{background:none;border:none;cursor:pointer;vertical-align:middle}.deleteIcon.svelte-1dnj419:hover{color:var(--negative)}table.svelte-1dnj419{font-size:14px;border-collapse:collapse;margin-left:-8px;width:calc(100% + 16px)}th.svelte-1dnj419{max-width:1px;font-weight:600;padding:0 8px;text-overflow:ellipsis;overflow:hidden}td.svelte-1dnj419{padding:4px 8px;overflow:hidden;text-overflow:ellipsis}.align_left.svelte-1dnj419{text-align:left}.align_right.svelte-1dnj419{text-align:right}.wide_column.svelte-1dnj419{min-width:120px}.narrow_column.svelte-1dnj419{max-width:60px}.input_box.svelte-1dnj419{width:100%}input.svelte-1dnj419{box-sizing:border-box;border-radius:4px;border:1px solid var(--base-300);background:var(--base-200);margin-left:auto;width:65%;padding:.35em;-webkit-appearance:none;-moz-appearance:none;vertical-align:middle;font-size:12px}input.svelte-1dnj419:required{box-shadow:none}input.svelte-1dnj419:focus{outline:none}input.svelte-ylbsw4{box-sizing:border-box;border-radius:4px;border:1px solid var(--base-300);background:var(--base-200);margin-left:auto;width:62%;padding:.35em;-webkit-appearance:none;-moz-appearance:none;vertical-align:middle;font-size:14px}input.svelte-ylbsw4:required{box-shadow:none}input.svelte-ylbsw4:focus{outline:none}label.svelte-ylbsw4{width:35%;text-transform:uppercase;font-weight:400;font-size:14px}button.svelte-ylbsw4{padding:.4em .5em;margin-right:.25em;margin-left:.25em;font-style:normal;text-decoration:none;font-size:14px;cursor:pointer}select.svelte-ylbsw4{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--base-300);background:var(--base-200);border-radius:4px;font-family:var(--ui-font-family);transition:all .4s;cursor:pointer;vertical-align:middle;box-sizing:border-box;padding:.35em;margin-left:auto;width:62%;font-size:14px}select.svelte-ylbsw4:hover{--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);border:1px solid var(--base-content);transition:all .4s}select.svelte-ylbsw4:focus{outline:none}div.input-item.svelte-ylbsw4{font-family:var(--ui-font-family);font-size:16px;margin-top:1.1em;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}div.new-format-buttons.svelte-ylbsw4{display:flex;justify-content:flex-end;padding-top:.5em}.error.svelte-ylbsw4{color:var(--negative)}#submitCustomFormatButton.svelte-ylbsw4{background-color:var(--primary);color:var(--primary-content);font-weight:700;border-radius:4px;padding:.4em 1.1em;transition-property:background,color;transition-duration:.35s}#submitCustomFormatButton.svelte-ylbsw4:active{filter:brightness(1.15);font-weight:700;border-radius:4px;padding:.4em 1.1em;transition-property:background,color;transition-duration:.35s}#submitCustomFormatButton.svelte-ylbsw4:disabled,button[disabled].svelte-ylbsw4{opacity:.5;cursor:not-allowed;transition-property:background,color;transition-duration:.35s}form.svelte-q2acau{scroll-margin-top:3.5rem}.formatting-settings-box.svelte-q2acau{margin-top:2em;border-top:1px solid var(--base-300);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-radius:5px 5px 0 0;font-size:14px;font-family:var(--ui-font-family);min-width:100%}.panel.svelte-q2acau{border-top:1px solid var(--base-300);padding:0 1em 1em}.panel.svelte-q2acau:first-of-type{border-top:none}div.code-container.svelte-q2acau{background-color:var(--base-200);border:1px solid var(--base-300);overflow:auto;border-radius:4px}footer.svelte-q2acau{border:1px solid var(--base-300);border-radius:0 0 5px 5px;background-color:var(--base-200);padding:1em;display:flex;font-size:14px;align-items:center;font-family:var(--ui-font-family)}h2.svelte-q2acau{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-q2acau{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}h2.svelte-kgapno.svelte-kgapno{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-kgapno.svelte-kgapno{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}form.svelte-kgapno.svelte-kgapno{scroll-margin-top:3.5rem}.telemetry-settings-box.svelte-kgapno.svelte-kgapno{margin-top:2em;border-top:1px solid var(--base-300);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-radius:5px 5px 0 0;font-size:14px;font-family:var(--ui-font-family);min-width:100%}.panel.svelte-kgapno.svelte-kgapno{border-top:1px solid var(--base-300);padding:0 1em 1em}.panel.svelte-kgapno.svelte-kgapno:first-of-type{border-top:none}footer.svelte-kgapno.svelte-kgapno{border:1px solid var(--base-300);border-radius:0 0 5px 5px;background-color:var(--base-200);padding:1em;display:flex;font-size:14px;align-items:center;font-family:var(--ui-font-family)}.switch.svelte-kgapno.svelte-kgapno{position:relative;display:inline-block;width:2.8rem;height:1.75rem;margin-left:auto;margin-right:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.switch.svelte-kgapno input.svelte-kgapno{opacity:0;width:0;height:0}.slider.svelte-kgapno.svelte-kgapno{position:absolute;cursor:pointer;inset:0;background-color:#ccc;transition:.4s;border-radius:25px}.slider.svelte-kgapno.svelte-kgapno:before{position:absolute;content:"";height:1.25rem;width:1.25rem;left:4px;bottom:4px;background-color:#fff;transition:.4s;border-radius:50%;--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)}input.svelte-kgapno:checked+.slider.svelte-kgapno{background-color:var(--positive)}input.svelte-kgapno:checked+.slider.svelte-kgapno:before{transform:translate(1.1rem)}label.svelte-kgapno.svelte-kgapno{width:30%;text-transform:uppercase;font-weight:400;font-size:14px;white-space:nowrap}div.input-item.svelte-kgapno.svelte-kgapno{font-family:var(--ui-font-family);font-size:16px;margin-top:1.25em;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}form.svelte-1xfec5.svelte-1xfec5{scroll-margin-top:3.5rem}h2.svelte-1xfec5.svelte-1xfec5{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}.version-control-box.svelte-1xfec5.svelte-1xfec5{margin-top:2em;border-top:1px solid var(--base-300);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-radius:5px 5px 0 0;font-size:14px;font-family:var(--ui-font-family);min-width:100%}.panel.svelte-1xfec5.svelte-1xfec5{border-top:1px solid var(--base-300);padding:0 1em 1em}.panel.svelte-1xfec5.svelte-1xfec5:first-of-type{border-top:none}footer.svelte-1xfec5.svelte-1xfec5{border:1px solid var(--base-300);border-radius:0 0 5px 5px;background-color:var(--base-200);padding:1em;display:flex;font-size:14px;align-items:center;font-family:var(--ui-font-family)}.docs-link.svelte-1xfec5.svelte-1xfec5{--tw-text-opacity:1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)));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}.docs-link.svelte-1xfec5.svelte-1xfec5:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.docs-link.svelte-1xfec5.svelte-1xfec5:active{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.gitcheck-icon.svelte-1xfec5.svelte-1xfec5{color:var(--positive);float:right;margin-right:5px}.gitx-icon.svelte-1xfec5.svelte-1xfec5{color:var(--negative);float:right;margin-right:5px}.git-item.svelte-1xfec5.svelte-1xfec5{margin-top:18px;margin-bottom:10px}.result-msg.svelte-1xfec5.svelte-1xfec5{word-break:break-all;margin-top:3px}.repo-location.svelte-1xfec5.svelte-1xfec5{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));font-size:.8rem;text-decoration:unset}.item-label.svelte-1xfec5.svelte-1xfec5{text-transform:uppercase}.help-icon.svelte-1xfec5.svelte-1xfec5{width:18px;color:var(--base-300);display:inline-block;vertical-align:middle;line-height:1em;cursor:help;position:relative;text-transform:none}.help-icon.svelte-1xfec5 .info-msg.svelte-1xfec5{visibility:hidden;display:none;position:absolute;top:-5px;left:105%;padding:2px 5px 1px;font-size:.8em;color:var(--base-content);background-color:var(--base-200);border-radius:6px;z-index:1;max-width:200px;min-width:100px}.help-icon.svelte-1xfec5:hover .info-msg.svelte-1xfec5{visibility:visible;display:inline}@media print{.chart.svelte-19r8f8{-moz-column-break-inside:avoid;break-inside:avoid}.chart-container.svelte-19r8f8{padding:0}}.chart.svelte-19r8f8{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.chart-footer.svelte-19r8f8{display:flex;justify-content:flex-end;align-items:center;margin:3px 12px;font-size:12px;height:9px}.placeholder.svelte-1qvl5jp.svelte-1qvl5jp{display:inline;position:relative;cursor:help;color:var(--base-content-muted)}.placeholder.svelte-1qvl5jp .error-msg.svelte-1qvl5jp{display:none;position:absolute;top:-5px;left:105%;max-width:400px;min-width:150px;padding:2px 5px 1px;font-size:.8em;color:var(--base-content);background-color:var(--base-200);border:1px solid var(--base-300);border-radius:6px;z-index:1;word-wrap:break-word}.placeholder.svelte-1qvl5jp:hover .error-msg.svelte-1qvl5jp{display:inline}@media print{.chart.svelte-1f5stt7{-moz-column-break-inside:avoid;break-inside:avoid}.chart-container.svelte-1f5stt7{padding:0}}@media screen and (max-width: 480px){.chart.svelte-1f5stt7{height:190px}}@media screen and (max-width: 600px) and (min-width: 480px){.chart.svelte-1f5stt7{height:240px}}@media screen and (min-width: 600px){.chart.svelte-1f5stt7{height:330px}}.chart.svelte-1f5stt7{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.chart-footer.svelte-1f5stt7{display:flex;justify-content:flex-end;align-items:center;margin:3px 12px;font-size:12px;height:9px}.chart-container.svelte-1f5stt7{margin-bottom:25px}.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.shadow-bottom.svelte-168cccw{box-shadow:0 3px 3px #0000001a}.shadow-bottom-right.svelte-168cccw{box-shadow:3px 3px 5px #0000001a,2px 2px 4px -1px #0000001a}.shadow-bottom-left.svelte-168cccw{box-shadow:-3px 3px 5px #0000001a,-2px 2px 4px -1px #0000001a}div.svelte-z9gk2f .leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}div.svelte-z9gk2f .leaflet-popup-content-wrapper{background-color:var(--base-100);box-shadow:0 1px 3px #0006;border-radius:4px;font-family:Inter,sans-serif;font-size:11px}div.svelte-z9gk2f .leaflet-popup-content{margin:7px 9px}div.svelte-z9gk2f .leaflet-popup-tip{background-color:var(--base-100);display:none}div.svelte-z9gk2f .leaflet-popup-close-button{width:14px;font:10px/15px sans-serif;display:none}div.svelte-z9gk2f .leaflet-tooltip,div.svelte-z9gk2f .legend-font{font-family:Inter,sans-serif}div.svelte-z9gk2f .leaflet-tooltip:before{background-color:var(--base-100);display:none}svg.main.svelte-aailen{height:16em;width:16em}text.svelte-aailen{font:.7em var(--monospace-font-family);stroke:none}circle.svelte-aailen{pointer-events:all;fill-opacity:.1}.a.svelte-aailen{stroke:var(--info);fill:var(--info)}.b.svelte-aailen{stroke:var(--positive);fill:var(--positive)}.c.svelte-aailen{fill:#8b5cf6;stroke:#8b5cf6}.label-a.svelte-aailen{fill:var(--info)}.label-b.svelte-aailen{fill:var(--positive)}.label-c.svelte-aailen{fill:#8b5cf6}div.venndiagram-container.svelte-aailen{display:flex;margin:1.5em 0;align-items:center;justify-items:flex-end} diff --git a/_app/immutable/assets/VennDiagram.DBCXi1Yl.css b/_app/immutable/assets/VennDiagram.DBCXi1Yl.css new file mode 100644 index 0000000000000000000000000000000000000000..67fa1af640dbceef64ab6ee85fb026f067864a0d --- /dev/null +++ b/_app/immutable/assets/VennDiagram.DBCXi1Yl.css @@ -0,0 +1 @@ +.alert.svelte-1w1ov1c{margin-bottom:1rem;border-radius:.25rem;border-width:1px;border-color:hsl(var(--twc-base-content) / .5);background-color:hsl(var(--twc-base-content) / .1);padding:.5rem .75rem}.alert.info.svelte-1w1ov1c{border-color:hsl(var(--twc-info) / .5);background-color:hsl(var(--twc-info) / .1)}.alert.negative.svelte-1w1ov1c{border-color:hsl(var(--twc-negative) / .5);background-color:hsl(var(--twc-negative) / .1)}.alert.positive.svelte-1w1ov1c{border-color:hsl(var(--twc-positive) / .5);background-color:hsl(var(--twc-positive) / .1)}.alert.warning.svelte-1w1ov1c{border-color:hsl(var(--twc-warning) / .5);background-color:hsl(var(--twc-warning) / .1)}.alert.svelte-1w1ov1c .markdown:last-child{margin-bottom:0}.alert.svelte-1w1ov1c .markdown:first-child{margin-top:0}button.variant-primary.svelte-1c08hho{--bg:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1));--text:hsl(var(--twc-primary-content) / var(--twc-primary-content-opacity, 1))}button.variant-primary.outlined.svelte-1c08hho{--border:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1));--text:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1));--hover-bg:hsl(var(--twc-primary) / .1)}button.variant-secondary.svelte-1c08hho{--bg:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1));--text:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, 1))}button.variant-secondary.outlined.svelte-1c08hho{--border:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1));--text:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1));--hover-bg:hsl(var(--twc-base-300) / .1)}button.variant-accent.svelte-1c08hho{--bg:hsl(var(--twc-accent) / var(--twc-accent-opacity, 1));--text:hsl(var(--twc-accent-content) / var(--twc-accent-content-opacity, 1))}button.variant-accent.outlined.svelte-1c08hho{--border:hsl(var(--twc-accent) / var(--twc-accent-opacity, 1));--text:hsl(var(--twc-accent) / var(--twc-accent-opacity, 1));--hover-bg:hsl(var(--twc-accent) / .1)}button.variant-info.svelte-1c08hho{--bg:hsl(var(--twc-info) / var(--twc-info-opacity, 1));--text:hsl(var(--twc-info-content) / var(--twc-info-content-opacity, 1))}button.variant-info.outlined.svelte-1c08hho{--border:hsl(var(--twc-info) / var(--twc-info-opacity, 1));--text:hsl(var(--twc-info) / var(--twc-info-opacity, 1));--hover-bg:hsl(var(--twc-info) / .1)}button.variant-positive.svelte-1c08hho{--bg:hsl(var(--twc-positive) / var(--twc-positive-opacity, 1));--text:hsl(var(--twc-positive-content) / var(--twc-positive-content-opacity, 1))}button.variant-positive.outlined.svelte-1c08hho{--border:hsl(var(--twc-positive) / var(--twc-positive-opacity, 1));--text:hsl(var(--twc-positive) / var(--twc-positive-opacity, 1));--hover-bg:hsl(var(--twc-positive) / .1)}button.variant-warning.svelte-1c08hho{--bg:hsl(var(--twc-warning) / var(--twc-warning-opacity, 1));--text:hsl(var(--twc-warning-content) / var(--twc-warning-content-opacity, 1))}button.variant-warning.outlined.svelte-1c08hho{--border:hsl(var(--twc-warning) / var(--twc-warning-opacity, 1));--text:hsl(var(--twc-warning) / var(--twc-warning-opacity, 1));--hover-bg:hsl(var(--twc-warning) / .1)}button.variant-negative.svelte-1c08hho{--bg:hsl(var(--twc-negative) / var(--twc-negative-opacity, 1));--text:hsl(var(--twc-negative-content) / var(--twc-negative-content-opacity, 1))}button.variant-negative.outlined.svelte-1c08hho{--border:hsl(var(--twc-negative) / var(--twc-negative-opacity, 1));--text:hsl(var(--twc-negative) / var(--twc-negative-opacity, 1));--hover-bg:hsl(var(--twc-negative) / .1)}button.svelte-1c08hho{border-color:var(--border);background-color:var(--bg);color:var(--text)}button.outlined.svelte-1c08hho{border-width:1px;background-color:transparent}button.outlined.svelte-1c08hho:not(:disabled):hover{background-color:var(--hover-bg)}button.svelte-1c08hho:disabled{cursor:not-allowed;opacity:.5;--tw-saturate:saturate(.5);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}button.svelte-1c08hho:not(:disabled){transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}button.svelte-1c08hho:not(:disabled):hover{--tw-brightness:brightness(1.05);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}button.svelte-1c08hho:not(:disabled):active{--tw-brightness:brightness(.95);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}dialog.svelte-t161xa::backdrop{background-color:hsl(var(--twc-base-100) / .8);--tw-backdrop-blur:blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.slideOut.svelte-t161xa::backdrop{all:unset}@keyframes svelte-t161xa-slideInFromBottom{0%{transform:translateY(70%);opacity:0}90%{opacity:.3}to{transform:translateY(0);opacity:.95}}.slideIn.svelte-t161xa{animation:svelte-t161xa-slideInFromBottom .3s ease-in-out}@keyframes svelte-t161xa-slideOutToBottom{0%{transform:translateY(0);opacity:1}to{transform:translateY(40%);opacity:0}}.slideOut.svelte-t161xa{animation:svelte-t161xa-slideOutToBottom .3s ease-in-out}.viewport.svelte-851usv{position:relative;overflow-y:auto;-webkit-overflow-scrolling:touch;display:block}.contents.svelte-851usv,.row.svelte-851usv{display:block}.row.svelte-851usv{overflow:hidden}.negative.svelte-118njox{border-color:hsl(var(--twc-negative) / .5);background-color:hsl(var(--twc-negative) / .1);--tw-text-opacity:1;color:hsl(var(--twc-negative) / var(--twc-negative-opacity, var(--tw-text-opacity)))}.warning.svelte-118njox{border-color:hsl(var(--twc-warning) / .5);background-color:hsl(var(--twc-warning) / .1);--tw-text-opacity:1;color:hsl(var(--twc-warning) / var(--twc-warning-opacity, var(--tw-text-opacity)))}.positive.svelte-118njox{border-color:hsl(var(--twc-positive) / .5);background-color:hsl(var(--twc-positive) / .1);--tw-text-opacity:1;color:hsl(var(--twc-positive) / var(--twc-positive-opacity, var(--tw-text-opacity)))}.info.svelte-118njox{border-color:hsl(var(--twc-info) / .5);background-color:hsl(var(--twc-info) / .1);--tw-text-opacity:1;color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-text-opacity)))}.search-container.svelte-116nqgn{border-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));width:30%;display:block;align-items:center;border-radius:4px;height:22px;position:relative;margin:25px 3px 10px 0;box-sizing:content-box}.search-icon.svelte-116nqgn{height:16px;width:16px;padding-left:3px;margin:0;position:absolute;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);box-sizing:content-box}.search-bar.svelte-116nqgn{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));margin:0;position:absolute;top:50%;transform:translateY(-50%);-ms-transform:translateY(-50%);border:none;padding-left:23px;font-size:9pt;width:calc(100% - 10px);font-family:Arial;line-height:normal}input.search-bar.svelte-116nqgn::-moz-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}input.search-bar.svelte-116nqgn::placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.svelte-116nqgn:focus{outline:none}@media (max-width: 600px){.search-container.svelte-116nqgn{width:98%;height:28px}.search-bar.svelte-116nqgn{font-size:16px;width:calc(100% - 20px)}}@media print{.search-container.svelte-116nqgn{display:none}}.string.svelte-1hwgyu4,.date.svelte-1hwgyu4{text-align:left}.number.svelte-1hwgyu4{text-align:right}.boolean.svelte-1hwgyu4{text-align:left}.index.svelte-1hwgyu4{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));text-align:left;max-width:-moz-min-content;max-width:min-content}.svelte-1hwgyu4:focus{outline:none}.row-lines.svelte-174z7k0{border-bottom-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.shaded-row.svelte-174z7k0{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.svelte-174z7k0:focus{outline:none}.row-link.svelte-174z7k0{cursor:pointer}.row-link.svelte-174z7k0:hover{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}th.svelte-1q0vbz4{white-space:nowrap;overflow:hidden}th.svelte-1q0vbz4:first-child{padding-left:3px}.index.svelte-1q0vbz4{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));text-align:left;max-width:-moz-min-content;max-width:min-content}.string.svelte-1q0vbz4,.date.svelte-1q0vbz4{text-align:left}.number.svelte-1q0vbz4{text-align:right}.boolean.svelte-1q0vbz4{text-align:left}@media print{.chevron.svelte-bqpzbr{display:none}}button.svelte-1grvppi svg{stroke:var(--base-content);margin-top:auto;margin-bottom:auto;transition:stroke .2s}button.svelte-1grvppi{display:flex;cursor:pointer;font-family:var(--ui-font-family);font-size:1em;color:var(--base-content);opacity:.5;justify-items:flex-end;align-items:baseline;background-color:transparent;border:none;padding:0;margin:0 5px;gap:3px;transition:all .2s;-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}button.svelte-1grvppi:hover{opacity:1;color:var(--primary);transition:all .2s}button.svelte-1grvppi:hover svg{stroke:var(--primary);transition:all .2s}@media (max-width: 600px){button.svelte-1grvppi{display:none}}@media print{button.svelte-1grvppi{display:none}}.table-container.svelte-ozf09l.svelte-ozf09l{font-size:9.5pt}.scrollbox.svelte-ozf09l.svelte-ozf09l{width:100%;overflow-x:auto;scrollbar-width:thin}table.svelte-ozf09l.svelte-ozf09l{display:table;width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.page-changer.svelte-ozf09l.svelte-ozf09l{padding:0;height:1.1em;width:1.1em}.pagination.svelte-ozf09l.svelte-ozf09l{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));font-size:12px;display:flex;align-items:center;justify-content:flex-end;height:2em;font-family:var(--ui-font-family);-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:right;margin-top:.5em;margin-bottom:1.8em;font-variant-numeric:tabular-nums}.page-labels.svelte-ozf09l.svelte-ozf09l{display:flex;justify-content:flex-start;align-items:center;gap:3px}.page-changer.svelte-ozf09l.svelte-ozf09l{font-size:20px;background:none;border:none;cursor:pointer;transition:color .2s}.page-changer.hovering.svelte-ozf09l.svelte-ozf09l{color:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1));transition:color .2s}.page-changer.svelte-ozf09l.svelte-ozf09l:disabled{color:hsl(var(--twc-base-content-muted) / .25);cursor:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:color .2s}.page-icon.svelte-ozf09l.svelte-ozf09l{height:1em;width:1em}.page-input.svelte-ozf09l.svelte-ozf09l{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)));--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));box-sizing:content-box;text-align:center;padding:.25em .5em;margin:0;border:1px solid transparent;border-radius:4px;font-size:12px}.table-footer.svelte-ozf09l.svelte-ozf09l{display:flex;justify-content:flex-end;align-items:center;margin:10px 0;font-size:12px;height:9px}.page-input.svelte-ozf09l.svelte-ozf09l::-webkit-outer-spin-button,.page-input.svelte-ozf09l.svelte-ozf09l::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.page-input[type=number].svelte-ozf09l.svelte-ozf09l{-moz-appearance:textfield;-webkit-appearance:textfield;appearance:textfield}.page-input.hovering.svelte-ozf09l.svelte-ozf09l{border:1px solid var(--base-300)}.page-input.error.svelte-ozf09l.svelte-ozf09l{border:1px solid var(--negative)}.page-input.svelte-ozf09l.svelte-ozf09l::-moz-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.page-input.svelte-ozf09l.svelte-ozf09l::placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}button.svelte-ozf09l:enabled>.page-icon.svelte-ozf09l:hover{filter:brightness(.8)}.svelte-ozf09l.svelte-ozf09l:focus{outline:none}.svelte-ozf09l.svelte-ozf09l::-moz-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));opacity:1}.svelte-ozf09l.svelte-ozf09l::placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));opacity:1}.svelte-ozf09l.svelte-ozf09l:-ms-input-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.svelte-ozf09l.svelte-ozf09l::-ms-input-placeholder{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.noresults.svelte-ozf09l.svelte-ozf09l{display:none;--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));text-align:center;margin-top:5px}.shownoresults.svelte-ozf09l.svelte-ozf09l{display:block}.print-page-count.svelte-ozf09l.svelte-ozf09l{display:none}@media (max-width: 600px){.page-changer.svelte-ozf09l.svelte-ozf09l,.page-icon.svelte-ozf09l.svelte-ozf09l{height:1.2em;width:1.2em}.page-count.svelte-ozf09l.svelte-ozf09l,.page-input.svelte-ozf09l.svelte-ozf09l{font-size:1.1em}}@media print{.pagination.svelte-ozf09l.svelte-ozf09l{-moz-column-break-inside:avoid;break-inside:avoid}.page-changer.svelte-ozf09l.svelte-ozf09l,.page-count.svelte-ozf09l.svelte-ozf09l{display:none}.print-page-count.svelte-ozf09l.svelte-ozf09l{display:inline}}section.svelte-1bw0fbe .cm-editor{min-height:8rem;border-radius:.25rem}input.svelte-11j8m88,select.svelte-11j8m88,textarea.svelte-11j8m88{margin-left:auto;width:66.666667%;border-radius:.25rem;border-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));padding:.25rem;vertical-align:middle;font-size:.875rem;line-height:1.25rem}.source-config-table.svelte-2j5e0k{grid-template-columns:auto auto auto 1fr}/*! @docsearch/css Variables 3.8.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}/*! @docsearch/css Modal 3.8.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::-moz-placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.DocSearch-Button{display:flex;cursor:pointer;align-items:center;gap:4rem;border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));padding:.25rem 5rem .25rem .5rem;font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02";font-weight:500;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.DocSearch-Button:hover{background-color:hsl(var(--twc-base-200) / .4)}@media (min-width: 640px){.DocSearch-Button{padding-right:.25rem;font-size:.75rem;line-height:1rem}}.DocSearch-Button-Placeholder{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.DocSearch-Search-Icon{display:none}.DocSearch-Button-Keys{display:none;gap:.125rem;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));background-color:hsl(var(--twc-base-200) / .4);padding:.125rem .25rem;font-size:.75rem;line-height:1rem}@media (min-width: 640px){.DocSearch-Button-Keys{display:flex}}.DocSearch-Button-Key,.DocSearch-Control-Key-Icon{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.DocSearch-Button-Key>*,.DocSearch-Control-Key-Icon>*{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}a.svelte-h1u6r0{display:block;padding-top:.25rem;padding-bottom:.25rem;font-size:.75rem;line-height:1rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}a.svelte-h1u6r0:hover{text-decoration-line:underline}a.h1.svelte-h1u6r0{margin-top:.75rem;display:block;--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));font-weight:600;--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);--tw-shadow-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, 1));--tw-shadow:var(--tw-shadow-colored) }a.h2.svelte-h1u6r0{padding-left:0;--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}a.h3.svelte-h1u6r0{padding-left:1rem;--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}body{--tw-bg-opacity:1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)));--tw-text-opacity:1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}div.svelte-1ks13uq{border-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-shadow-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, 1));--tw-shadow:var(--tw-shadow-colored)}div.svelte-1ks13uq:hover{--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)}div.svelte-1ks13uq{border-radius:6px;padding:.3em .6em;font-family:var(--ui-font-family);font-size:.8em;margin-top:1em;margin-bottom:1.25em;cursor:pointer;transition:all .4s}a.svelte-1ks13uq{text-decoration:none;color:var(--primary)}a.svelte-1ks13uq:hover{text-decoration:none;filter:brightness(80%)}svg.svelte-c6mrxw.svelte-c6mrxw{display:inline-block;vertical-align:middle;transition:transform .15s ease-in}span.svelte-c6mrxw.svelte-c6mrxw{margin:auto 0}[aria-expanded=true].svelte-c6mrxw svg.svelte-c6mrxw{transform:rotate(.25turn)}.marker.svelte-6m89aj{border-left:5px solid transparent;border-right:5px solid transparent;border-top:9px solid var(--base-content-muted);transform:rotate(-90deg);transition:transform .2s ease}.rotate-marker.svelte-6m89aj{transform:rotate(0)}button.svelte-6m89aj{display:flex;align-items:center;cursor:pointer}div.svelte-yvs8yi{height:1.8em}p.svelte-yvs8yi{font-family:var(--ui-font-family);color:#7d7d7d;font-size:.75em}input.button.svelte-yvs8yi{background-color:transparent;font-family:var(--ui-font-family);color:#7d7d7d;font-weight:700;margin-left:0;border:1px solid lightgrey;border-radius:0 4px 4px 0;height:100%;-webkit-appearance:none;-moz-appearance:none}form.svelte-yvs8yi{display:inline-block;padding:0;height:1.5em}input.svelte-yvs8yi{box-sizing:border-box;border-radius:4px 0 0 4px;border:1px solid lightgrey;border-right:none;padding:.25em;margin-right:0;height:100%;color:#7d7d7d;-webkit-appearance:none;-moz-appearance:none}input.svelte-yvs8yi:required{box-shadow:none}input.svelte-yvs8yi:focus{outline:none}input.svelte-yvs8yi{vertical-align:middle}@media (max-width: 600px){div.svelte-yvs8yi{text-align:center}input.svelte-yvs8yi{padding:.75em .5em;font-size:16px}input.email.svelte-yvs8yi{width:50%}input.button.svelte-yvs8yi{font-weight:400;line-height:0}}.progress-container.svelte-1ya7oje{position:absolute;top:0;left:0;width:100%;height:3px;z-index:999}.progress.svelte-1ya7oje{position:absolute;left:0;top:0;height:100%;background-image:-webkit-linear-gradient(315deg,var(--info) 0%,var(--positive) 75%);transition:width .4s}.fade.svelte-1ya7oje{position:fixed;width:100%;height:100%;background-color:#ffffff4d;pointer-events:none;z-index:998;animation:svelte-1ya7oje-fade .4s}@keyframes svelte-1ya7oje-fade{0%{opacity:0}to{opacity:1}}div.pagination.svelte-nkkkq7.svelte-nkkkq7{padding:0 5px;align-content:center;border-bottom:1px solid var(--base-200);height:1.25em;background-color:var(--base-100);display:flex;flex-direction:row;justify-content:space-between;align-items:center}.slider.svelte-nkkkq7.svelte-nkkkq7{background-color:hsl(var(--twc-info) / .3);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.slider.svelte-nkkkq7.svelte-nkkkq7:hover{background-color:hsl(var(--twc-info) / .4)}.slider.svelte-nkkkq7.svelte-nkkkq7{-webkit-appearance:none;width:75%;height:10px;margin:0;outline:none;border-radius:10px;display:inline-block;cursor:pointer}.slider.svelte-nkkkq7.svelte-nkkkq7::-webkit-slider-thumb{--tw-bg-opacity:1;background-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-bg-opacity)));-webkit-appearance:none;-moz-appearance:none;appearance:none;width:10px;height:10px;cursor:pointer;border-radius:10px}.slider.svelte-nkkkq7.svelte-nkkkq7::-moz-range-thumb{--tw-bg-opacity:1;background-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-bg-opacity)));width:10px;height:10px;cursor:pointer}span.svelte-nkkkq7.svelte-nkkkq7{font-size:.75rem;line-height:1rem;font-family:var(--ui-font-family-compact);-webkit-font-smoothing:antialiased;float:right}.scrollbox.svelte-nkkkq7.svelte-nkkkq7{width:100%;overflow-x:auto;border-bottom:1px solid var(--base-300);background-color:var(--base-100)}.results-pane.svelte-nkkkq7 .download-button{margin-top:10px}table.svelte-nkkkq7.svelte-nkkkq7{font-size:.75rem;line-height:1rem;width:100%;border-collapse:collapse;font-family:var(--ui-font-family);font-variant-numeric:tabular-nums}th.svelte-nkkkq7.svelte-nkkkq7{padding-top:0;padding-bottom:0;padding-left:.5rem;padding-right:.5rem;font-weight:500}td.svelte-nkkkq7.svelte-nkkkq7{padding:2px 8px;overflow:hidden;text-overflow:ellipsis}td.svelte-nkkkq7 div.svelte-nkkkq7{width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.other.svelte-nkkkq7.svelte-nkkkq7,.string.svelte-nkkkq7.svelte-nkkkq7,.date.svelte-nkkkq7.svelte-nkkkq7{text-align:left}.number.svelte-nkkkq7.svelte-nkkkq7{text-align:right}.boolean.svelte-nkkkq7.svelte-nkkkq7{text-align:left}.null.svelte-nkkkq7.svelte-nkkkq7{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.index.svelte-nkkkq7.svelte-nkkkq7{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));text-align:left;max-width:-moz-min-content;max-width:min-content}th.type-indicator.svelte-nkkkq7.svelte-nkkkq7{font-weight:400;--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}tr.type-indicator.svelte-nkkkq7.svelte-nkkkq7{border-bottom:1px solid var(--base-300)}.footer.svelte-nkkkq7.svelte-nkkkq7{display:flex;justify-content:flex-end;font-size:12px}code[class*=language-],pre[class*=language-]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5em;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;hyphens:none;background-color:unset;border:unset;border-radius:unset;-webkit-user-select:unset;-moz-user-select:unset;user-select:unset}:not(pre)>code[class*=language-]{white-space:normal;border-radius:.2em}pre[class*=language-]{overflow:auto;position:relative}.language-css>code,.language-sass>code,.language-scss>code{color:#f76d47}[class*=language-] .namespace{opacity:.7}.token.atrule{color:#7c4dff}.token.attr-name{color:#39adb5}.token.attr-value,.token.attribute{color:#f6a434}.token.boolean{color:#7c4dff}.token.builtin,.token.cdata,.token.char,.token.class{color:#39adb5}.token.class-name{color:#6182b8}.token.comment{color:#1d4ed8}.token.constant{color:#7c4dff}.token.deleted{color:#e53935}.token.doctype{color:#aabfc9}.token.entity{color:#e53935}.token.function{color:#046ade;font-weight:700}.token.hexcode{color:#f76d47}.token.id,.token.important{color:#7c4dff;font-weight:700}.token.inserted{color:#39adb5}.token.keyword{color:#08a86d}.token.number{color:#046ade}.token.operator{color:#39adb5}.token.prolog{color:#aabfc9}.token.property{color:#39adb5}.token.pseudo-class,.token.pseudo-element{color:#f6a434}.token.punctuation{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.token.regex{color:#6182b8}.token.selector{color:#e53935}.token.string{color:#e89521}.token.symbol{color:#7c4dff}.token.tag{color:#e53935}.token.unit{color:#f76d47}.token.url,.token.variable{color:#e53935}code.svelte-1v2cb81{display:block}div.toggle.svelte-1mcdez6{background-color:var(--base-200);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);padding:6px 0 10px 12px;font-family:var(--ui-font-family);font-size:10px;user-select:none;-webkit-user-select:none;-moz-user-select:none}button.svelte-1mcdez6{padding:2px 4px;border-radius:3px;cursor:pointer;background-color:transparent;font-size:1em;font-weight:600}button.off.svelte-1mcdez6{border:1px solid var(--base-300);transition:all .4s}button.off.svelte-1mcdez6:hover{background-color:var(--base-300);transition:all .4s}button.on.svelte-1mcdez6{border-width:1px;--tw-border-opacity:1;border-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-border-opacity)));background-color:hsl(var(--twc-info) / .1);--tw-text-opacity:1;color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-text-opacity)))}:root{--scrollbar-track-color:transparent;--scrollbar-color:rgba(0, 0, 0, .2);--scrollbar-active-color:rgba(0, 0, 0, .4);--scrollbar-size:.75rem;--scrollbar-minlength:1.5rem}.code-container.svelte-1p12lev{background-color:var(--base-200);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);overflow-x:auto;overflow-y:hidden;padding:0 12px 6px 15px;scrollbar-width:thin;scrollbar-color:var(--scrollbar-color) var(--scrollbar-track-color)}.code-container.svelte-1p12lev::-webkit-scrollbar{height:var(--scrollbar-size);width:var(--scrollbar-size)}.code-container.svelte-1p12lev::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.over-container.svelte-1p12lev{overflow-y:hidden;overflow-x:auto}.code-container.svelte-1p12lev::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color);border-radius:7px;background-clip:padding-box}.code-container.svelte-1p12lev::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-active-color)}.code-container.svelte-1p12lev::-webkit-scrollbar-thumb:vertical{min-height:var(--scrollbar-minlength);border:3px solid transparent}.code-container.svelte-1p12lev::-webkit-scrollbar-thumb:horizontal{min-width:var(--scrollbar-minlength);border:3px solid transparent}.status-bar.svelte-1p12lev{margin-top:0;margin-bottom:0;background-color:var(--base-200);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-bottom:1px solid var(--base-300);overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:var(--scrollbar-color) var(--scrollbar-track-color)}.status-bar.svelte-1p12lev::-webkit-scrollbar{height:var(--scrollbar-size);width:var(--scrollbar-size)}.status-bar.svelte-1p12lev::-webkit-scrollbar-track{background-color:var(--scrollbar-track-color)}.status-bar.svelte-1p12lev::-webkit-scrollbar-thumb{background-color:var(--scrollbar-color);border-radius:7px;background-clip:padding-box}.status-bar.svelte-1p12lev::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-active-color)}.status-bar.svelte-1p12lev::-webkit-scrollbar-thumb:vertical{min-height:var(--scrollbar-minlength);border:3px solid transparent}.status-bar.svelte-1p12lev::-webkit-scrollbar-thumb:horizontal{min-width:var(--scrollbar-minlength);border:3px solid transparent}.closed.svelte-1p12lev{border-bottom-left-radius:6px;border-bottom-right-radius:6px}.open.svelte-1p12lev{border-bottom-left-radius:0;border-bottom-right-radius:0}.status-bar.success.svelte-1p12lev{color:var(--info);cursor:pointer}.status-bar.error.svelte-1p12lev{color:var(--negative);-webkit-user-select:all;-moz-user-select:all;user-select:all;cursor:auto}button.svelte-1p12lev{font-family:var(--ui-font-family-compact);-webkit-font-smoothing:antialiased;font-size:12px;-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap;text-align:left;width:100%;background-color:var(--base-200);border:none;border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);margin-bottom:0;cursor:pointer;padding:5px}button.title.svelte-1p12lev{border-top:1px solid var(--base-300);border-top-left-radius:6px;border-top-right-radius:6px}.scrollbox.svelte-1p12lev{margin-top:.75rem;margin-bottom:.75rem;display:flex;flex-direction:column}.container-a.svelte-1p12lev{background-color:var(--base-200);border-top-left-radius:6px;border-top-right-radius:6px;box-sizing:border-box;display:flex;flex-direction:column}@media print{.scrollbox.svelte-1p12lev{-moz-column-break-inside:avoid;break-inside:avoid}}h2.svelte-lmhsq3.svelte-lmhsq3{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-lmhsq3.svelte-lmhsq3{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}button.svelte-lmhsq3.svelte-lmhsq3{margin-right:.25em;margin-left:.25em;font-style:normal;text-decoration:none;font-size:14px;cursor:pointer;background-color:var(--primary);color:var(--primary-content);font-weight:700;border-radius:4px;padding:.4em 1.1em;transition-property:background,color;transition-duration:.35s}div.new-format-buttons.svelte-lmhsq3.svelte-lmhsq3{display:flex;justify-content:flex-start;padding-top:.5em}ul.svelte-lmhsq3.svelte-lmhsq3{list-style:none;padding-inline-start:0px}ul.svelte-lmhsq3 li.svelte-lmhsq3:before{content:"•";color:var(--base-content);font-weight:700;display:inline-block;width:.9em;margin-left:1.5em}button.container.svelte-exlw3k{box-sizing:border-box;background-color:var(--base-200);border-radius:4px;border:1px solid var(--base-300);padding:.9em .35em;size:.75em;cursor:pointer;user-select:none;-webkit-user-select:none;-moz-user-select:none;display:flex;flex-direction:row;justify-content:space-between;align-items:center;transition:all .4s;width:100%;font-family:var(--monospace-font-family);line-height:1.6;font-size:inherit}button.container.svelte-exlw3k:hover{--tw-border-opacity:1;border-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-border-opacity)));background-color:hsl(var(--twc-info) / .1);--tw-text-opacity:1;color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-text-opacity)));transition:all .4s}button.container.svelte-exlw3k:active,button.container.copied.svelte-exlw3k{--tw-border-opacity:1;border-color:hsl(var(--twc-positive) / var(--twc-positive-opacity, var(--tw-border-opacity)));background-color:hsl(var(--twc-positive) / .1);--tw-text-opacity:1;color:hsl(var(--twc-positive) / var(--twc-positive-opacity, var(--tw-text-opacity)))}span.var-value.svelte-exlw3k{width:85%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}h2.svelte-uhtp23{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-uhtp23{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}a.svelte-uhtp23{--tw-text-opacity:1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)));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}a.svelte-uhtp23:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}a.svelte-uhtp23:active{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}span.setting.svelte-uhtp23{font-size:.85em;text-transform:uppercase;letter-spacing:.05em}div.setting-row.svelte-uhtp23{margin-top:1.25em}div.setting-row.svelte-uhtp23:first-of-type{margin-top:0}div.setting-value.svelte-uhtp23{margin-top:.25em;width:45%}.separator.svelte-uhtp23{display:flex;align-items:center;text-align:center;margin-block-start:2.5em;color:var(--base-content);font-weight:700}.separator.svelte-uhtp23:after{content:"";flex:1;border-bottom:1px solid var(--base-300)}.separator.svelte-uhtp23:not(:empty):after{margin-left:1.5em;margin-top:.1em}h2.svelte-1ifbe9h{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-1ifbe9h{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}a.svelte-1ifbe9h{--tw-text-opacity:1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)));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}a.svelte-1ifbe9h:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}a.svelte-1ifbe9h:active{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}span.setting.svelte-1ifbe9h{font-size:.85em;text-transform:uppercase;letter-spacing:.05em}div.setting-row.svelte-1ifbe9h{margin-top:1.25em}div.setting-row.svelte-1ifbe9h:first-of-type{margin-top:0}div.setting-value.svelte-1ifbe9h{margin-top:.25em;width:45%}.separator.svelte-1ifbe9h{display:flex;align-items:center;text-align:center;margin-block-start:2.5em;color:var(--base-content);font-weight:700}.separator.svelte-1ifbe9h:after{content:"";flex:1;border-bottom:1px solid var(--base-300)}.separator.svelte-1ifbe9h:not(:empty):after{margin-left:1.5em;margin-top:.1em}h2.svelte-oz5mco{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-oz5mco{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}span.setting.svelte-oz5mco{font-size:.85em;text-transform:uppercase;letter-spacing:.05em}div.setting-row.svelte-oz5mco{margin-top:1.25em}div.setting-row.svelte-oz5mco:first-of-type{margin-top:0}div.setting-value.svelte-oz5mco{margin-top:.25em;width:45%}.separator.svelte-oz5mco{display:flex;align-items:center;text-align:center;margin-block-start:2.5em;font-weight:700}.separator.svelte-oz5mco:after{content:"";flex:1;border-bottom:1px solid var(--base-300)}.separator.svelte-oz5mco:not(:empty):after{margin-left:1.5em;margin-top:.1em}div.environment-variable.svelte-jy9xey{font-family:var(--ui-font-family);font-size:16px;margin-bottom:1.25em;display:flex;flex-direction:row;justify-content:space-between;align-items:center}div.titles.svelte-jy9xey{font-family:var(--ui-font-family);font-size:16px;margin-bottom:.25em;display:flex;flex-direction:row;justify-content:space-between;align-items:center}div.var-value.svelte-jy9xey{margin-left:auto;width:45%}div.var-name.svelte-jy9xey{width:45%}span.title.svelte-jy9xey{width:45%;font-size:.85em;text-transform:uppercase;letter-spacing:.07em}h3.svelte-1ukb5v1{margin-top:1.5rem;margin-bottom:.25rem;font-size:.875rem;line-height:1.25rem;text-transform:uppercase;line-height:2}h2.svelte-1ukb5v1{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-1ukb5v1{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}select.svelte-1ukb5v1{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:.35em;width:100%;border:1px solid var(--base-300);font-family:var(--ui-font-family);background:var(--base-200);margin:.5em 0 0;transition:all .4s;cursor:pointer}select.svelte-1ukb5v1:hover{--tw-border-opacity:1;border-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-border-opacity)));--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:all .4s}select.svelte-1ukb5v1:focus{outline:none}form.svelte-1ukb5v1{scroll-margin-top:3.5rem}.deploy-settings-box.svelte-1ukb5v1{margin-top:2em;border-top:1px solid var(--base-300);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-radius:5px 5px 0 0;font-size:14px;font-family:var(--ui-font-family);min-width:100%}.panel.svelte-1ukb5v1{border-top:1px solid var(--base-300);padding:0 1em 1em}.panel.svelte-1ukb5v1:first-of-type{border-top:none}footer.svelte-1ukb5v1{border:1px solid var(--base-300);border-radius:0 0 5px 5px;background-color:var(--base-200);padding:1em;display:flex;font-size:14px;align-items:center;font-family:var(--ui-font-family)}.docs-link.svelte-1ukb5v1{--tw-text-opacity:1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)));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}.docs-link.svelte-1ukb5v1:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.docs-link.svelte-1ukb5v1:active{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}table.svelte-51mr58{font-size:14px;border-collapse:collapse;margin-left:-8px;width:calc(100% + 16px)}th.svelte-51mr58{max-width:1px;font-weight:600;padding:0 8px;text-overflow:ellipsis;overflow:hidden}td.svelte-51mr58{padding:4px 8px;overflow:hidden;text-overflow:ellipsis}.align_left.svelte-51mr58{text-align:left}.align_right.svelte-51mr58{text-align:right}.wide_column.svelte-51mr58{min-width:120px}.narrow_column.svelte-51mr58{max-width:60px}.input_box.svelte-51mr58{width:100%}input.svelte-51mr58{background:var(--base-200);box-sizing:border-box;border-radius:4px;border:1px solid var(--base-300);margin-left:auto;width:65%;padding:.35em;-webkit-appearance:none;-moz-appearance:none;vertical-align:middle;font-size:12px}input.svelte-51mr58:required{box-shadow:none}input.svelte-51mr58:focus{outline:none}collapsibleHeader.svelte-16b384t{margin:0;padding:0;vertical-align:middle}h3.svelte-16b384t{margin:0;font-style:normal}button.svelte-16b384t{font-size:14px;background-color:var(--base-200);border-radius:4px;display:flex;justify-content:space-between;width:100%;border:none;margin:0;padding:.5em;cursor:pointer}.collapsibleContents.svelte-16b384t{padding:.5em .5em 1.5em}.collapsibleSection.svelte-16b384t{padding:0;margin:.5em 0 0}select.svelte-15kx861{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:.35em;width:100%;border:1px solid var(--base-300);font-family:var(--ui-font-family);background:var(--base-200);margin:.5em 0 0;transition:all .4s;cursor:pointer}select.svelte-15kx861:hover{--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);border:1px solid var(--base-content);transition:all .4s}select.svelte-15kx861:focus{outline:none}table.svelte-15kx861{font-size:14px;border-collapse:collapse;margin-left:-8px;width:calc(100% + 16px)}th.svelte-15kx861{max-width:1px;font-weight:600;padding:0 8px;text-overflow:ellipsis;overflow:hidden}td.svelte-15kx861{padding:4px 8px;overflow:hidden;text-overflow:ellipsis}.align_left.svelte-15kx861{text-align:left}.align_right.svelte-15kx861{text-align:right}.wide_column.svelte-15kx861{min-width:120px}.narrow_column.svelte-15kx861{max-width:60px}.input_box.svelte-15kx861{width:100%}input.svelte-15kx861{box-sizing:border-box;border-radius:4px;border:1px solid var(--base-300);background:var(--base-200);margin-left:auto;width:65%;padding:.35em;-webkit-appearance:none;-moz-appearance:none;vertical-align:middle;font-size:12px}input.svelte-15kx861:required{box-shadow:none}input.svelte-15kx861:focus{outline:none}.deleteIcon.svelte-1dnj419{color:var(--negative);width:16px;cursor:pointer}button.svelte-1dnj419{background:none;border:none;cursor:pointer;vertical-align:middle}.deleteIcon.svelte-1dnj419:hover{color:var(--negative)}table.svelte-1dnj419{font-size:14px;border-collapse:collapse;margin-left:-8px;width:calc(100% + 16px)}th.svelte-1dnj419{max-width:1px;font-weight:600;padding:0 8px;text-overflow:ellipsis;overflow:hidden}td.svelte-1dnj419{padding:4px 8px;overflow:hidden;text-overflow:ellipsis}.align_left.svelte-1dnj419{text-align:left}.align_right.svelte-1dnj419{text-align:right}.wide_column.svelte-1dnj419{min-width:120px}.narrow_column.svelte-1dnj419{max-width:60px}.input_box.svelte-1dnj419{width:100%}input.svelte-1dnj419{box-sizing:border-box;border-radius:4px;border:1px solid var(--base-300);background:var(--base-200);margin-left:auto;width:65%;padding:.35em;-webkit-appearance:none;-moz-appearance:none;vertical-align:middle;font-size:12px}input.svelte-1dnj419:required{box-shadow:none}input.svelte-1dnj419:focus{outline:none}input.svelte-ylbsw4{box-sizing:border-box;border-radius:4px;border:1px solid var(--base-300);background:var(--base-200);margin-left:auto;width:62%;padding:.35em;-webkit-appearance:none;-moz-appearance:none;vertical-align:middle;font-size:14px}input.svelte-ylbsw4:required{box-shadow:none}input.svelte-ylbsw4:focus{outline:none}label.svelte-ylbsw4{width:35%;text-transform:uppercase;font-weight:400;font-size:14px}button.svelte-ylbsw4{padding:.4em .5em;margin-right:.25em;margin-left:.25em;font-style:normal;text-decoration:none;font-size:14px;cursor:pointer}select.svelte-ylbsw4{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid var(--base-300);background:var(--base-200);border-radius:4px;font-family:var(--ui-font-family);transition:all .4s;cursor:pointer;vertical-align:middle;box-sizing:border-box;padding:.35em;margin-left:auto;width:62%;font-size:14px}select.svelte-ylbsw4:hover{--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);border:1px solid var(--base-content);transition:all .4s}select.svelte-ylbsw4:focus{outline:none}div.input-item.svelte-ylbsw4{font-family:var(--ui-font-family);font-size:16px;margin-top:1.1em;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}div.new-format-buttons.svelte-ylbsw4{display:flex;justify-content:flex-end;padding-top:.5em}.error.svelte-ylbsw4{color:var(--negative)}#submitCustomFormatButton.svelte-ylbsw4{background-color:var(--primary);color:var(--primary-content);font-weight:700;border-radius:4px;padding:.4em 1.1em;transition-property:background,color;transition-duration:.35s}#submitCustomFormatButton.svelte-ylbsw4:active{filter:brightness(1.15);font-weight:700;border-radius:4px;padding:.4em 1.1em;transition-property:background,color;transition-duration:.35s}#submitCustomFormatButton.svelte-ylbsw4:disabled,button[disabled].svelte-ylbsw4{opacity:.5;cursor:not-allowed;transition-property:background,color;transition-duration:.35s}form.svelte-q2acau{scroll-margin-top:3.5rem}.formatting-settings-box.svelte-q2acau{margin-top:2em;border-top:1px solid var(--base-300);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-radius:5px 5px 0 0;font-size:14px;font-family:var(--ui-font-family);min-width:100%}.panel.svelte-q2acau{border-top:1px solid var(--base-300);padding:0 1em 1em}.panel.svelte-q2acau:first-of-type{border-top:none}div.code-container.svelte-q2acau{background-color:var(--base-200);border:1px solid var(--base-300);overflow:auto;border-radius:4px}footer.svelte-q2acau{border:1px solid var(--base-300);border-radius:0 0 5px 5px;background-color:var(--base-200);padding:1em;display:flex;font-size:14px;align-items:center;font-family:var(--ui-font-family)}h2.svelte-q2acau{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-q2acau{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}h2.svelte-kgapno.svelte-kgapno{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}p.svelte-kgapno.svelte-kgapno{padding-top:.5rem;padding-bottom:.5rem;font-size:.875rem;line-height:1.25rem}form.svelte-kgapno.svelte-kgapno{scroll-margin-top:3.5rem}.telemetry-settings-box.svelte-kgapno.svelte-kgapno{margin-top:2em;border-top:1px solid var(--base-300);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-radius:5px 5px 0 0;font-size:14px;font-family:var(--ui-font-family);min-width:100%}.panel.svelte-kgapno.svelte-kgapno{border-top:1px solid var(--base-300);padding:0 1em 1em}.panel.svelte-kgapno.svelte-kgapno:first-of-type{border-top:none}footer.svelte-kgapno.svelte-kgapno{border:1px solid var(--base-300);border-radius:0 0 5px 5px;background-color:var(--base-200);padding:1em;display:flex;font-size:14px;align-items:center;font-family:var(--ui-font-family)}.switch.svelte-kgapno.svelte-kgapno{position:relative;display:inline-block;width:2.8rem;height:1.75rem;margin-left:auto;margin-right:2px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.switch.svelte-kgapno input.svelte-kgapno{opacity:0;width:0;height:0}.slider.svelte-kgapno.svelte-kgapno{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;transition:.4s;border-radius:25px}.slider.svelte-kgapno.svelte-kgapno:before{position:absolute;content:"";height:1.25rem;width:1.25rem;left:4px;bottom:4px;background-color:#fff;transition:.4s;border-radius:50%;--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)}input.svelte-kgapno:checked+.slider.svelte-kgapno{background-color:var(--positive)}input.svelte-kgapno:checked+.slider.svelte-kgapno:before{transform:translate(1.1rem)}label.svelte-kgapno.svelte-kgapno{width:30%;text-transform:uppercase;font-weight:400;font-size:14px;white-space:nowrap}div.input-item.svelte-kgapno.svelte-kgapno{font-family:var(--ui-font-family);font-size:16px;margin-top:1.25em;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center}form.svelte-1xfec5.svelte-1xfec5{scroll-margin-top:3.5rem}h2.svelte-1xfec5.svelte-1xfec5{padding-top:.75rem;padding-bottom:.5rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}.version-control-box.svelte-1xfec5.svelte-1xfec5{margin-top:2em;border-top:1px solid var(--base-300);border-left:1px solid var(--base-300);border-right:1px solid var(--base-300);border-radius:5px 5px 0 0;font-size:14px;font-family:var(--ui-font-family);min-width:100%}.panel.svelte-1xfec5.svelte-1xfec5{border-top:1px solid var(--base-300);padding:0 1em 1em}.panel.svelte-1xfec5.svelte-1xfec5:first-of-type{border-top:none}footer.svelte-1xfec5.svelte-1xfec5{border:1px solid var(--base-300);border-radius:0 0 5px 5px;background-color:var(--base-200);padding:1em;display:flex;font-size:14px;align-items:center;font-family:var(--ui-font-family)}.docs-link.svelte-1xfec5.svelte-1xfec5{--tw-text-opacity:1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)));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}.docs-link.svelte-1xfec5.svelte-1xfec5:hover{--tw-brightness:brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.docs-link.svelte-1xfec5.svelte-1xfec5:active{--tw-brightness:brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.gitcheck-icon.svelte-1xfec5.svelte-1xfec5{color:var(--positive);float:right;margin-right:5px}.gitx-icon.svelte-1xfec5.svelte-1xfec5{color:var(--negative);float:right;margin-right:5px}.git-item.svelte-1xfec5.svelte-1xfec5{margin-top:18px;margin-bottom:10px}.result-msg.svelte-1xfec5.svelte-1xfec5{word-break:break-all;margin-top:3px}.repo-location.svelte-1xfec5.svelte-1xfec5{--tw-text-opacity:1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)));font-size:.8rem;text-decoration:unset}.item-label.svelte-1xfec5.svelte-1xfec5{text-transform:uppercase}.help-icon.svelte-1xfec5.svelte-1xfec5{width:18px;color:var(--base-300);display:inline-block;vertical-align:middle;line-height:1em;cursor:help;position:relative;text-transform:none}.help-icon.svelte-1xfec5 .info-msg.svelte-1xfec5{visibility:hidden;display:none;position:absolute;top:-5px;left:105%;padding:2px 5px 1px;font-size:.8em;color:var(--base-content);background-color:var(--base-200);border-radius:6px;z-index:1;max-width:200px;min-width:100px}.help-icon.svelte-1xfec5:hover .info-msg.svelte-1xfec5{visibility:visible;display:inline}@media print{.chart.svelte-19r8f8{-moz-column-break-inside:avoid;break-inside:avoid}.chart-container.svelte-19r8f8{padding:0}}.chart.svelte-19r8f8{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.chart-footer.svelte-19r8f8{display:flex;justify-content:flex-end;align-items:center;margin:3px 12px;font-size:12px;height:9px}.placeholder.svelte-1qvl5jp.svelte-1qvl5jp{display:inline;position:relative;cursor:help;color:var(--base-content-muted)}.placeholder.svelte-1qvl5jp .error-msg.svelte-1qvl5jp{display:none;position:absolute;top:-5px;left:105%;max-width:400px;min-width:150px;padding:2px 5px 1px;font-size:.8em;color:var(--base-content);background-color:var(--base-200);border:1px solid var(--base-300);border-radius:6px;z-index:1;word-wrap:break-word}.placeholder.svelte-1qvl5jp:hover .error-msg.svelte-1qvl5jp{display:inline}@media print{.chart.svelte-1f5stt7{-moz-column-break-inside:avoid;break-inside:avoid}.chart-container.svelte-1f5stt7{padding:0}}@media screen and (max-width: 480px){.chart.svelte-1f5stt7{height:190px}}@media screen and (max-width: 600px) and (min-width: 480px){.chart.svelte-1f5stt7{height:240px}}@media screen and (min-width: 600px){.chart.svelte-1f5stt7{height:330px}}.chart.svelte-1f5stt7{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.chart-footer.svelte-1f5stt7{display:flex;justify-content:flex-end;align-items:center;margin:3px 12px;font-size:12px;height:9px}.chart-container.svelte-1f5stt7{margin-bottom:25px}.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:auto;padding:0}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{border:2px dotted #38f;background:#ffffff80}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:12px;font-size:.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px #000000a6;border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px #0006;background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{display:inline!important;vertical-align:baseline!important;width:1em;height:.6669em}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;box-sizing:border-box;background:#fffc;text-shadow:1px 1px #fff}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678,M12=.70710678,M21=-.70710678,M22=.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}.shadow-bottom.svelte-168cccw{box-shadow:0 3px 3px #0000001a}.shadow-bottom-right.svelte-168cccw{box-shadow:3px 3px 5px #0000001a,2px 2px 4px -1px #0000001a}.shadow-bottom-left.svelte-168cccw{box-shadow:-3px 3px 5px #0000001a,-2px 2px 4px -1px #0000001a}div.svelte-z9gk2f .leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}div.svelte-z9gk2f .leaflet-popup-content-wrapper{background-color:var(--base-100);box-shadow:0 1px 3px #0006;border-radius:4px;font-family:Inter,sans-serif;font-size:11px}div.svelte-z9gk2f .leaflet-popup-content{margin:7px 9px}div.svelte-z9gk2f .leaflet-popup-tip{background-color:var(--base-100);display:none}div.svelte-z9gk2f .leaflet-popup-close-button{width:14px;font:10px/15px sans-serif;display:none}div.svelte-z9gk2f .leaflet-tooltip,div.svelte-z9gk2f .legend-font{font-family:Inter,sans-serif}div.svelte-z9gk2f .leaflet-tooltip:before{background-color:var(--base-100);display:none}svg.main.svelte-aailen{height:16em;width:16em}text.svelte-aailen{font:.7em var(--monospace-font-family);stroke:none}circle.svelte-aailen{pointer-events:all;fill-opacity:.1}.a.svelte-aailen{stroke:var(--info);fill:var(--info)}.b.svelte-aailen{stroke:var(--positive);fill:var(--positive)}.c.svelte-aailen{fill:#8b5cf6;stroke:#8b5cf6}.label-a.svelte-aailen{fill:var(--info)}.label-b.svelte-aailen{fill:var(--positive)}.label-c.svelte-aailen{fill:#8b5cf6}div.venndiagram-container.svelte-aailen{display:flex;margin:1.5em 0;align-items:center;justify-items:flex-end} diff --git a/_app/immutable/assets/_layout.CGPr6Vtl.css b/_app/immutable/assets/_layout.CGPr6Vtl.css new file mode 100644 index 0000000000000000000000000000000000000000..fdf1b4d463ba7ca4d10d12ab31e42b5159603e30 --- /dev/null +++ b/_app/immutable/assets/_layout.CGPr6Vtl.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;font-style:normal;font-weight:100;font-display:block;src:url(/_app/immutable/assets/Inter-Thin.CSJ_owlW.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Thin.CVMZtQER.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:100;font-display:block;src:url(/_app/immutable/assets/Inter-ThinItalic.B6FKq6qK.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ThinItalic.B2bFwwDp.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:200;font-display:block;src:url(/_app/immutable/assets/Inter-ExtraLight.egkqWonf.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ExtraLight.CbFdmbHh.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:200;font-display:block;src:url(/_app/immutable/assets/Inter-ExtraLightItalic.Bf25KIHs.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ExtraLightItalic.B3gY-m5W.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:300;font-display:block;src:url(/_app/immutable/assets/Inter-Light.CdXm_ABL.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Light.CG9upfZ4.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:300;font-display:block;src:url(/_app/immutable/assets/Inter-LightItalic.COmGGTuG.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-LightItalic.C2ZuFZOC.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:block;src:url(/_app/immutable/assets/Inter-Regular.CKDp9E3C.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Regular.DJOZHnwz.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:400;font-display:block;src:url(/_app/immutable/assets/Inter-Italic._3PMmu0i.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Italic.Ci_5KQU1.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:block;src:url(/_app/immutable/assets/Inter-Medium.P1cOs5ep.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Medium.oHczPpWt.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:500;font-display:block;src:url(/_app/immutable/assets/Inter-MediumItalic.DWiIAHvp.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-MediumItalic.8laNK8GF.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:block;src:url(/_app/immutable/assets/Inter-SemiBold.Ctx7G98q.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-SemiBold.BHlX_6qk.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:600;font-display:block;src:url(/_app/immutable/assets/Inter-SemiBoldItalic.BNz1Al2H.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-SemiBoldItalic.CxeAX7g8.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:block;src:url(/_app/immutable/assets/Inter-Bold.CuhepTt8.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Bold.2PT7Q-hu.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:700;font-display:block;src:url(/_app/immutable/assets/Inter-BoldItalic.R15IsAnq.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-BoldItalic.C906RMVC.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:800;font-display:block;src:url(/_app/immutable/assets/Inter-ExtraBold.B0QOs-T2.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ExtraBold.B8imQN9B.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:800;font-display:block;src:url(/_app/immutable/assets/Inter-ExtraBoldItalic.OErwaGem.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-ExtraBoldItalic.Bt8eprh6.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:normal;font-weight:900;font-display:block;src:url(/_app/immutable/assets/Inter-Black.DgUKMdlB.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-Black.DtxVgCT8.woff?v=3.19) format("woff")}@font-face{font-family:Inter;font-style:italic;font-weight:900;font-display:block;src:url(/_app/immutable/assets/Inter-BlackItalic.ZFcDzO3e.woff2?v=3.19) format("woff2"),url(/_app/immutable/assets/Inter-BlackItalic.CkZ-ktDH.woff?v=3.19) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:100;font-display:block;src:url(/_app/immutable/assets/Spectral-Light.TIhg4DnI.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Light.DBct1VnS.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:100;font-display:block;src:url(/_app/immutable/assets/Spectral-LightItalic.zW0f9iJS.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-LightItalic.B3o_X74d.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:200;font-display:block;src:url(/_app/immutable/assets/Spectral-ExtraLight.HPQmpGpQ.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-ExtraLight.HAWHIZWB.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:200;font-display:block;src:url(/_app/immutable/assets/Spectral-ExtraLightItalic.xW7ezc0a.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-ExtraLightItalic.C9nFbxmj.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:300;font-display:block;src:url(/_app/immutable/assets/Spectral-Light.TIhg4DnI.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Light.DBct1VnS.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:300;font-display:block;src:url(/_app/immutable/assets/Spectral-LightItalic.zW0f9iJS.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-LightItalic.B3o_X74d.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:400;font-display:block;src:url(/_app/immutable/assets/Spectral-Regular.BE1HJwUh.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Regular.C0aqGnDS.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:400;font-display:block;src:url(/_app/immutable/assets/Spectral-Italic.wSPWDyg7.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Italic.3s0_PsVL.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:500;font-display:block;src:url(/_app/immutable/assets/Spectral-Medium.NsGaEaui.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Medium.BZl4fq6u.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:500;font-display:block;src:url(/_app/immutable/assets/Spectral-MediumItalic.BvSK_s7Y.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-MediumItalic.De40Wj9n.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:600;font-display:block;src:url(/_app/immutable/assets/Spectral-SemiBold.zu1TM2FZ.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-SemiBold.CCUIByHq.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:600;font-display:block;src:url(/_app/immutable/assets/Spectral-SemiBoldItalic.D3fgUf4W.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-SemiBoldItalic.DjbDqXej.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:700;font-display:block;src:url(/_app/immutable/assets/Spectral-Bold.BwJz_A1v.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-Bold.C57huwyI.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:700;font-display:block;src:url(/_app/immutable/assets/Spectral-BoldItalic.CQC_WCFZ.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-BoldItalic.CQquRzSI.woff) format("woff")}@font-face{font-family:Spectral;font-style:normal;font-weight:800;font-display:block;src:url(/_app/immutable/assets/Spectral-ExtraBold.DeRaT2m-.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-ExtraBold.Dm6k0JyR.woff) format("woff")}@font-face{font-family:Spectral;font-style:italic;font-weight:800;font-display:block;src:url(/_app/immutable/assets/Spectral-ExtraBoldItalic.MQ9B1Gco.woff2) format("woff2"),url(/_app/immutable/assets/Spectral-ExtraBoldItalic.SZr5i_vZ.woff) format("woff")}*,: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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02";font-variation-settings:normal;-webkit-tap-highlight-color:transparent}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-feature-settings:normal;font-variation-settings:normal;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;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([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]:where(:not([hidden=until-found])){display:none}html{scroll-behavior:smooth}body{-webkit-user-select:none;-moz-user-select:none;user-select:none}*{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.pretty-scrollbar{scrollbar-width:thin;scrollbar-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1)) transparent}.pretty-scrollbar::-webkit-scrollbar{height:6px;width:6px}.pretty-scrollbar::-webkit-scrollbar-track{background-color:transparent}.pretty-scrollbar::-webkit-scrollbar-thumb{background-color:transparent;border-radius:7px}.pretty-scrollbar:hover::-webkit-scrollbar-thumb{background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, 1))}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}select{appearance:none;-moz-appearance:none;-webkit-appearance:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.markdown{font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02";font-size:1rem;line-height:1.5rem;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img.markdown{margin-left:auto;margin-right:auto;height:auto;max-width:100%;border-radius:.5rem}article.markdown a.markdown{--tw-text-opacity: 1 !important;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)))!important;text-decoration-line:underline!important;text-decoration-color:transparent!important;transition-property:all!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.2s!important}article.markdown a.markdown:hover{text-decoration-color:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1))!important}p.markdown,ul.markdown,ol.markdown{margin-block-end:1.2em;margin-block-start:0em}ol.markdown{list-style-type:decimal;padding-inline-start:1.5rem}ul.markdown{list-style-type:disc;padding-inline-start:1.5rem}ul.markdown ul.markdown,ol.markdown ul.markdown{list-style-type:circle}ul.markdown ol.markdown,ol.markdown ol.markdown{list-style-type:lower-alpha}ul.markdown ul.markdown,ul.markdown ol.markdown,ol.markdown ul.markdown,ol.markdown ol.markdown{margin-top:.25rem;margin-block-end:0em}ul.markdown ul.markdown ul.markdown,ul.markdown ol.markdown ul.markdown,ol.markdown ul.markdown ul.markdown,ol.markdown ol.markdown ul.markdown{list-style-type:square}ul.markdown ul.markdown ol.markdown,ul.markdown ol.markdown ol.markdown,ol.markdown ul.markdown ol.markdown,ol.markdown ol.markdown ol.markdown{list-style-type:lower-roman}ul.markdown li.markdown,ol.markdown li.markdown{display:list-item;text-align:-webkit-match-parent}ul.markdown li.markdown+li.markdown,ol.markdown li.markdown+li.markdown{margin-top:.25rem}h1.markdown,h2.markdown,h3.markdown,h4.markdown,h5.markdown,h6.markdown{scroll-margin-top:3.5rem;-moz-column-break-inside:avoid;break-inside:avoid;font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02";--tw-text-opacity: 1;color:hsl(var(--twc-base-heading) / var(--twc-base-heading-opacity, var(--tw-text-opacity)))}h1.title:first-of-type,h1.markdown:first-of-type{margin-top:.25rem;margin-bottom:.5rem}h1.title,h1.markdown{margin-top:1.25rem;margin-bottom:.25rem;-moz-column-break-inside:avoid;break-inside:avoid;font-size:1.5rem;line-height:2rem;font-weight:700;letter-spacing:.025em}h2.markdown{margin-top:.75rem;margin-bottom:.25rem;font-size:1.25rem;line-height:1.75rem;font-weight:600}h3.markdown{margin-top:.5rem;margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:600}h4.markdown{margin-top:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:600}h5.markdown{margin-top:.25rem;font-size:.75rem;line-height:1rem;font-weight:600}h6.markdown{margin-top:.25rem;font-size:.75rem;line-height:1rem}hr.markdown{margin-top:2rem;margin-bottom:2rem;margin-left:auto;margin-right:auto;height:1px;max-width:36rem;border-width:0px;--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}code.markdown{-webkit-user-select:all;-moz-user-select:all;user-select:all;border-radius:.25rem;border-width:1px;--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)));padding:.125rem .25rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.875em}form code{font-size:unset}blockquote.markdown{margin-top:2rem;margin-bottom:2rem;border-left-width:4px;--tw-border-opacity: 1;border-color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)));padding-top:.5rem;padding-bottom:.5rem;padding-left:.75rem}blockquote.markdown>blockquote.markdown{margin:0}blockquote.markdown>:first-child{margin-top:0}blockquote.markdown>:last-child{margin-bottom:0}blockquote.markdown *{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}strong.markdown,em.markdown,del.markdown,a.markdown{font-size:1em;color:inherit}table.markdown{margin-left:auto;margin-right:auto;margin-top:1.25rem;margin-bottom:1.25rem;min-width:100%;border-collapse:collapse;text-align:center}th.markdown{overflow:hidden;text-overflow:ellipsis;border-bottom-width:1px;--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1));padding-top:0;padding-bottom:0;padding-left:.5rem;padding-right:.5rem;font-size:.875rem;line-height:1.25rem;font-weight:500}td.markdown{overflow:hidden;text-overflow:ellipsis;padding:.25rem .5rem;font-size:.875rem;line-height:1.25rem}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{top:0;bottom:0}.-bottom-14{bottom:-3.5rem}.-right-2\.5{right:-.625rem}.-top-1{top:-.25rem}.-top-\[5\%\]{top:-5%}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.bottom-20{bottom:5rem}.bottom-8{bottom:2rem}.bottom-\[-9px\]{bottom:-9px}.left-0{left:0}.left-1\.5{left:.375rem}.left-2{left:.5rem}.left-4{left:1rem}.left-\[-9px\]{left:-9px}.left-\[105\%\]{left:105%}.left-\[115\%\]{left:115%}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.right-6{right:1.5rem}.right-\[-9px\]{right:-9px}.right-\[115\%\]{right:115%}.right-\[18\.5px\]{right:18.5px}.top-0{top:0}.top-12{top:3rem}.top-16{top:4rem}.top-2{top:.5rem}.top-20{top:5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-8{top:2rem}.top-\[-9px\]{top:-9px}.top-\[50\%\]{top:50%}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[-10\]{z-index:-10}.z-\[1\]{z-index:1}.z-\[401\]{z-index:401}.z-\[405\]{z-index:405}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2 / span 2}.col-span-4{grid-column:span 4 / span 4}.col-span-6{grid-column:span 6 / span 6}.col-span-8{grid-column:span 8 / span 8}.col-start-4{grid-column-start:4}.m-0{margin:0}.m-4{margin:1rem}.m-auto{margin:auto}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-0{margin-left:0;margin-right:0}.mx-0\.5{margin-left:.125rem;margin-right:.125rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-10{margin-left:2.5rem;margin-right:2.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0{margin-top:0;margin-bottom:0}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.my-\[0\.5em\]{margin-top:.5em;margin-bottom:.5em}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-3\.5{margin-bottom:.875rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0{margin-left:0}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-auto{margin-right:auto}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.box-content{box-sizing:content-box}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.h-1{height:.25rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[0\.83em\]{height:.83em}.h-\[10px\]{height:10px}.h-\[1px\]{height:1px}.h-\[38px\]{height:38px}.h-\[80px\]{height:80px}.h-\[8px\]{height:8px}.h-\[calc\(100vh-3rem\)\]{height:calc(100vh - 3rem)}.h-auto{height:auto}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-56{max-height:14rem}.max-h-96{max-height:24rem}.max-h-\[0px\]{max-height:0px}.max-h-\[200px\]{max-height:200px}.max-h-\[300px\]{max-height:300px}.min-h-\[8rem\]{min-height:8rem}.\!w-5{width:1.25rem!important}.\!w-\[118px\]{width:118px!important}.\!w-\[79px\]{width:79px!important}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-2\/3{width:66.666667%}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-4\/5{width:80%}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-6{width:1.5rem}.w-60{width:15rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[100px\]{width:100px}.w-\[10px\]{width:10px}.w-\[17ch\]{width:17ch}.w-\[1px\]{width:1px}.w-\[2\%\]{width:2%}.w-\[200px\]{width:200px}.w-\[22\%\]{width:22%}.w-\[8px\]{width:8px}.w-\[90vw\]{width:90vw}.w-\[calc\(100\%-0\.6rem\)\]{width:calc(100% - .6rem)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-screen{width:100vw}.min-w-24{min-width:6rem}.min-w-40{min-width:10rem}.min-w-5{min-width:1.25rem}.min-w-56{min-width:14rem}.min-w-\[120px\]{min-width:120px}.min-w-\[150px\]{min-width:150px}.min-w-\[8rem\]{min-width:8rem}.min-w-full{min-width:100%}.min-w-min{min-width:-moz-min-content;min-width:min-content}.max-w-48{max-width:12rem}.max-w-60{max-width:15rem}.max-w-7xl{max-width:80rem}.max-w-\[100\%\]{max-width:100%}.max-w-\[200px\]{max-width:200px}.max-w-\[400px\]{max-width:400px}.max-w-\[65\%\]{max-width:65%}.max-w-\[70\%\]{max-width:70%}.max-w-\[75\%\]{max-width:75%}.max-w-\[80\%\]{max-width:80%}.max-w-\[90\%\]{max-width:90%}.max-w-\[calc\(100\%-16px\)\]{max-width:calc(100% - 16px)}.max-w-\[unset\]{max-width:unset}.max-w-fit{max-width:-moz-fit-content;max-width:fit-content}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y: -50%;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))}.rotate-180{--tw-rotate: 180deg;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))}.rotate-90{--tw-rotate: 90deg;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))}.rotate-\[270deg\]{--tw-rotate: 270deg;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 pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.list-decimal{list-style-type:decimal}.list-none{list-style-type:none}.break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.break-after-page{-moz-column-break-after:page;break-after:page}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[auto\,1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto\,auto\,1fr\,auto\,auto\,1fr\,auto\,auto\]{grid-template-columns:auto auto 1fr auto auto 1fr auto auto}.grid-cols-\[auto\,auto\,1fr\]{grid-template-columns:auto auto 1fr}.grid-rows-auto{grid-template-rows:auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-8{gap:2rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-normal{overflow-wrap:normal;word-break:normal}.rounded{border-radius:.25rem}.rounded-\[unset\]{border-radius:unset}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.border{border-width:1px}.border-0{border-width:0px}.border-\[1px\]{border-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-b-\[1px\]{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-r-0{border-right-width:0px}.border-t{border-top-width:1px}.border-t-8{border-top-width:8px}.border-t-\[1px\]{border-top-width:1px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[--borderColor\]{border-color:var(--borderColor)}.border-base-200{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-border-opacity)))}.border-base-300{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.border-base-300\/50{border-color:hsl(var(--twc-base-300) / .5)}.border-base-content{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-border-opacity)))}.border-base-content-muted{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-border-opacity)))}.border-info\/20{border-color:hsl(var(--twc-info) / .2)}.border-negative{--tw-border-opacity: 1;border-color:hsl(var(--twc-negative) / var(--twc-negative-opacity, var(--tw-border-opacity)))}.border-negative\/20{border-color:hsl(var(--twc-negative) / .2)}.border-negative\/50{border-color:hsl(var(--twc-negative) / .5)}.border-positive\/20{border-color:hsl(var(--twc-positive) / .2)}.border-transparent{border-color:transparent}.bg-\[--bgColor\]{background-color:var(--bgColor)}.bg-base-100{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-bg-opacity)))}.bg-base-100\/50{background-color:hsl(var(--twc-base-100) / .5)}.bg-base-100\/70{background-color:hsl(var(--twc-base-100) / .7)}.bg-base-100\/80{background-color:hsl(var(--twc-base-100) / .8)}.bg-base-100\/90{background-color:hsl(var(--twc-base-100) / .9)}.bg-base-200{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.bg-base-200\/50{background-color:hsl(var(--twc-base-200) / .5)}.bg-base-300{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.bg-base-300\/20{background-color:hsl(var(--twc-base-300) / .2)}.bg-base-300\/40{background-color:hsl(var(--twc-base-300) / .4)}.bg-base-content{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.bg-info{--tw-bg-opacity: 1;background-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-bg-opacity)))}.bg-info\/10{background-color:hsl(var(--twc-info) / .1)}.bg-inherit{background-color:inherit}.bg-negative{--tw-bg-opacity: 1;background-color:hsl(var(--twc-negative) / var(--twc-negative-opacity, var(--tw-bg-opacity)))}.bg-negative\/10{background-color:hsl(var(--twc-negative) / .1)}.bg-negative\/25{background-color:hsl(var(--twc-negative) / .25)}.bg-positive\/10{background-color:hsl(var(--twc-positive) / .1)}.bg-positive\/25{background-color:hsl(var(--twc-positive) / .25)}.bg-primary{--tw-bg-opacity: 1;background-color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-bg-opacity)))}.bg-primary\/20{background-color:hsl(var(--twc-primary) / .2)}.bg-primary\/50{background-color:hsl(var(--twc-primary) / .5)}.bg-transparent{background-color:transparent}.bg-warning{--tw-bg-opacity: 1;background-color:hsl(var(--twc-warning) / var(--twc-warning-opacity, var(--tw-bg-opacity)))}.bg-warning\/25{background-color:hsl(var(--twc-warning) / .25)}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/80{background-color:#fffc}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-base-200{--tw-gradient-from: hsl(var(--twc-base-200) / var(--twc-base-200-opacity, 1)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--twc-base-200) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-base-300{--tw-gradient-to: hsl(var(--twc-base-300) / var(--twc-base-300-opacity, 1)) var(--tw-gradient-to-position)}.bg-right{background-position:right}.bg-no-repeat{background-repeat:no-repeat}.fill-current{fill:currentColor}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.px-\[1px\]{padding-left:1px;padding-right:1px}.px-\[2px\]{padding-left:2px;padding-right:2px}.px-\[4px\]{padding-left:4px;padding-right:4px}.px-\[8px\]{padding-left:8px;padding-right:8px}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-\[1\.5px\]{padding-top:1.5px;padding-bottom:1.5px}.py-\[1px\]{padding-top:1px;padding-bottom:1px}.py-\[2px\]{padding-top:2px;padding-bottom:2px}.py-\[3px\]{padding-top:3px;padding-bottom:3px}.pb-0\.5{padding-bottom:.125rem}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pb-\[2px\]{padding-bottom:2px}.pl-0{padding-left:0}.pl-0\.5{padding-left:.125rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pl-\[1px\]{padding-left:1px}.pl-\[6px\]{padding-left:6px}.pl-\[calc\(0\.5rem\+10px\)\]{padding-left:calc(.5rem + 10px)}.pr-1{padding-right:.25rem}.pr-1\.5{padding-right:.375rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-5{padding-right:1.25rem}.pr-8{padding-right:2rem}.pr-\[12px\]{padding-right:12px}.pr-\[16\.5px\]{padding-right:16.5px}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-\[0\.5px\]{padding-top:.5px}.pt-\[32px\]{padding-top:32px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.font-\[system-ui\]{font-family:system-ui}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:Inter,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:"cv02"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.text-\[9\.25pt\]{font-size:9.25pt}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-4{line-height:1rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-\[-1\.5px\]{letter-spacing:-1.5px}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-\[green\]{--tw-text-opacity: 1;color:rgb(0 128 0 / var(--tw-text-opacity, 1))}.text-\[grey\]{--tw-text-opacity: 1;color:rgb(128 128 128 / var(--tw-text-opacity, 1))}.text-base-100{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}.text-base-300{--tw-text-opacity: 1;color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-text-opacity)))}.text-base-content{--tw-text-opacity: 1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}.text-base-content-muted{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.text-base-heading{--tw-text-opacity: 1;color:hsl(var(--twc-base-heading) / var(--twc-base-heading-opacity, var(--tw-text-opacity)))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-info-content{--tw-text-opacity: 1;color:hsl(var(--twc-info-content) / var(--twc-info-content-opacity, var(--tw-text-opacity)))}.text-negative{--tw-text-opacity: 1;color:hsl(var(--twc-negative) / var(--twc-negative-opacity, var(--tw-text-opacity)))}.text-negative-content{--tw-text-opacity: 1;color:hsl(var(--twc-negative-content) / var(--twc-negative-content-opacity, var(--tw-text-opacity)))}.text-positive{--tw-text-opacity: 1;color:hsl(var(--twc-positive) / var(--twc-positive-opacity, var(--tw-text-opacity)))}.text-primary{--tw-text-opacity: 1;color:hsl(var(--twc-primary) / var(--twc-primary-opacity, var(--tw-text-opacity)))}.text-primary-content{--tw-text-opacity: 1;color:hsl(var(--twc-primary-content) / var(--twc-primary-content-opacity, var(--tw-text-opacity)))}.text-transparent{color:transparent}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.accent-primary{accent-color:hsl(var(--twc-primary) / var(--twc-primary-opacity, 1))}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.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)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 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-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px 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-base-100{--tw-shadow-color: hsl(var(--twc-base-100) / var(--twc-base-100-opacity, 1));--tw-shadow: var(--tw-shadow-colored)}.shadow-base-200{--tw-shadow-color: hsl(var(--twc-base-200) / var(--twc-base-200-opacity, 1));--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-offset-base-100{--tw-ring-offset-color: hsl(var(--twc-base-100) / var(--twc-base-100-opacity, 1))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,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-\[border-radius\]{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;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-opacity{transition-property:opacity;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}.delay-\[225ms\]{transition-delay:225ms}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-\[350ms\]{transition-duration:.35s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.light,[data-theme=light]{--twc-primary: 221.20000000000005 83.2% 53.3%;--twc-accent: 17.5 88.3% 40.4%;--twc-base-100: 0 0% 100%;--twc-info: 200.39999999999998 98% 39.4%;--twc-positive: 142.10000000000002 76.2% 36.3%;--twc-warning: 48.60000000000002 100% 48.6%;--twc-negative: 0 72.2% 50.6%;--twc-primary-content: 216 38.5% 97.5%;--twc-accent-content: 12 38.5% 97.5%;--twc-base-200: 0 0% 96.9%;--twc-base-300: 0 0% 83.9%;--twc-base-heading: 0 0% 2.4%;--twc-base-content: 0 0% 17.3%;--twc-base-content-muted: 0 0% 44.3%;--twc-info-content: 200 50% 2.4%;--twc-positive-content: 144 38.5% 2.5%;--twc-negative-content: 0 38.5% 97.5%;--twc-warning-content: 42.89999999999998 53.8% 2.5%}.dark,[data-theme=dark]{--twc-primary: 217.20000000000005 91.2% 59.8%;--twc-accent: 30.69999999999999 97.2% 72.4%;--twc-base-100: 240 10% 3.9%;--twc-info: 198.39999999999998 93.2% 59.6%;--twc-positive: 141.89999999999998 69.2% 58%;--twc-warning: 43.30000000000001 96.4% 56.3%;--twc-negative: 0 90.6% 70.8%;--twc-primary-content: 210 50% 2.4%;--twc-accent-content: 30 50% 2.4%;--twc-base-200: 240 5.6% 7.1%;--twc-base-300: 240 2.4% 16.5%;--twc-base-heading: 240 7.7% 97.5%;--twc-base-content: 240 1% 79.4%;--twc-base-content-muted: 240 .4% 48.4%;--twc-info-content: 190 50% 2.4%;--twc-positive-content: 144 38.5% 2.5%;--twc-negative-content: 0 50% 2.4%;--twc-warning-content: 50 50% 2.4%}html[data-theme=light]{--primary: #2563eb;--accent: #c2410c;--base-100: #ffffff;--info: #0284c7;--positive: #16a34a;--warning: #f8c900;--negative: #dc2626;--primary-content: #f6f8fb;--accent-content: #fbf7f6;--base-200: #f7f7f7;--base-300: #d6d6d6;--base-heading: #060606;--base-content: #2c2c2c;--base-content-muted: #717171;--info-content: #030709;--positive-content: #040906;--negative-content: #fbf6f6;--warning-content: #0a0803}html[data-theme=dark]{--primary: #3b82f6;--accent: #fdba74;--base-100: #09090b;--info: #38bdf8;--positive: #4ade80;--warning: #fbbf24;--negative: #f87171;--primary-content: #030609;--accent-content: #090603;--base-200: #111113;--base-300: #29292b;--base-heading: #f8f8f9;--base-content: #cacacb;--base-content-muted: #7b7b7c;--info-content: #030809;--positive-content: #040906;--negative-content: #090303;--warning-content: #090803}.\[word-wrap\:break-work\]{word-wrap:break-work}:root{--header-height: 3.5rem;--monospace-font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--ui-font-family: Inter, ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--ui-font-family-compact: Inter, ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--blue-50: #eff6ff;--blue-100: #dbeafe;--blue-200: #bfdbfe;--blue-300: #93c5fd;--blue-400: #60a5fa;--blue-500: #3b82f6;--blue-600: #2563eb;--blue-700: #1d4ed8;--blue-800: #1e40af;--blue-900: #1e3a8a;--blue-999: #172554;--blue-link: var(--blue-700);--green-50: #f0fdf4;--green-100: #dcfce7;--green-200: #bbf7d0;--green-300: #86efac;--green-400: #4ade80;--green-500: #22c55e;--green-600: #16a34a;--green-700: #15803d;--green-800: #166534;--green-900: #14532d;--green-999: #052e16;--grey-50: #f9fafb;--grey-100: #f3f4f6;--grey-200: #e5e7eb;--grey-300: #d1d5db;--grey-400: #9ca3af;--grey-500: #6b7280;--grey-600: #4b5563;--grey-700: #374151;--grey-800: #1f2937;--grey-900: #111827;--grey-999: #030712;--red-50: #fef2f2;--red-100: #fee2e2;--red-200: #fecaca;--red-300: #fca5a5;--red-400: #f87171;--red-500: #ef4444;--red-600: #dc2626;--red-700: #b91c1c;--red-800: #991b1b;--red-900: #7f1d1d;--red-999: #450a0a;--yellow-50: #fefce8;--yellow-100: #fef9c3;--yellow-200: #fef08a;--yellow-300: #fde047;--yellow-400: #facc15;--yellow-500: #eab308;--yellow-600: #ca8a04;--yellow-700: #a16207;--yellow-800: #854d0e;--yellow-900: #713f12;--yellow-999: #422006}[data-theme=dark] .__evidence-leaflet-tile-layer__{filter:invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%)}@media print{html{-webkit-print-color-adjust:exact;print-color-adjust:exact}h1,h2,h3,h4{-moz-column-break-after:avoid;break-after:avoid-page}article{orphans:2;widows:2}}.\*\:m-0>*{margin:0}.selection\:bg-black\/15 *::-moz-selection{background-color:#00000026}.selection\:bg-black\/15 *::selection{background-color:#00000026}.selection\:bg-black\/15::-moz-selection{background-color:#00000026}.selection\:bg-black\/15::selection{background-color:#00000026}.placeholder\:text-base-content-muted::-moz-placeholder{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.placeholder\:text-base-content-muted::placeholder{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-left-1\.5:before{content:var(--tw-content);left:-.375rem}.before\:-top-4:before{content:var(--tw-content);top:-1rem}.before\:top-0:before{content:var(--tw-content);top:0}.before\:z-0:before{content:var(--tw-content);z-index:0}.before\:block:before{content:var(--tw-content);display:block}.before\:h-1:before{content:var(--tw-content);height:.25rem}.before\:h-9:before{content:var(--tw-content);height:2.25rem}.before\:w-2:before{content:var(--tw-content);width:.5rem}.before\:w-\[calc\(100\%\+0\.6rem\)\]:before{content:var(--tw-content);width:calc(100% + .6rem)}.before\:bg-base-content:before{content:var(--tw-content);--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-right-1:after{content:var(--tw-content);right:-.25rem}.after\:top-0:after{content:var(--tw-content);top:0}.after\:-z-10:after{content:var(--tw-content);z-index:-10}.after\:block:after{content:var(--tw-content);display:block}.after\:h-1:after{content:var(--tw-content);height:.25rem}.after\:w-1:after{content:var(--tw-content);width:.25rem}.after\:rounded-r-full:after{content:var(--tw-content);border-top-right-radius:9999px;border-bottom-right-radius:9999px}.after\:bg-base-content\/20:after{content:var(--tw-content);background-color:hsl(var(--twc-base-content) / .2)}.first\:border-none:first-child{border-style:none}.first\:pl-\[3px\]:first-child{padding-left:3px}.last\:border-none:last-child{border-style:none}.odd\:bg-base-200\/40:nth-child(odd){background-color:hsl(var(--twc-base-200) / .4)}.odd\:bg-base-300:nth-child(odd){--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.hover\:cursor-default:hover{cursor:default}.hover\:border-info\/50:hover{border-color:hsl(var(--twc-info) / .5)}.hover\:bg-base-200:hover{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.hover\:bg-base-200\/80:hover{background-color:hsl(var(--twc-base-200) / .8)}.hover\:bg-base-300:hover{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.hover\:bg-base-300\/80:hover{background-color:hsl(var(--twc-base-300) / .8)}.hover\:bg-base-content\/90:hover{background-color:hsl(var(--twc-base-content) / .9)}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-info\/20:hover{background-color:hsl(var(--twc-info) / .2)}.hover\:bg-inherit:hover{background-color:inherit}.hover\:bg-negative\/80:hover{background-color:hsl(var(--twc-negative) / .8)}.hover\:bg-negative\/90:hover{background-color:hsl(var(--twc-negative) / .9)}.hover\:text-base-content:hover{--tw-text-opacity: 1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}.hover\:text-base-content-muted:hover{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:opacity-100:hover{opacity:1}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\:ease-in:hover{transition-timing-function:cubic-bezier(.4,0,1,1)}.focus\:z-10:focus{z-index:10}.focus\:border-info:focus{--tw-border-opacity: 1;border-color:hsl(var(--twc-info) / var(--twc-info-opacity, var(--tw-border-opacity)))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-base-300:focus{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-ring-opacity)))}.focus\:ring-base-content-muted:focus{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-ring-opacity)))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-8:focus-visible{outline-offset:8px}.focus-visible\:outline-black:focus-visible{outline-color:#000}.focus-visible\:ring:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-base-200:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-ring-opacity)))}.focus-visible\:ring-base-300:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-ring-opacity)))}.focus-visible\:ring-base-content-muted:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-ring-opacity)))}.active\:bg-base-200:active{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.active\:bg-base-300:active{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.active\:outline-none:active{outline:2px solid transparent;outline-offset:2px}.active\:ring:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.active\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.active\:brightness-90:active{--tw-brightness: brightness(.9);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:nth-child(odd) .group-odd\:bg-base-300\/60{background-color:hsl(var(--twc-base-300) / .6)}.group:nth-child(odd) .group-odd\:bg-base-300\/80{background-color:hsl(var(--twc-base-300) / .8)}.group:hover .group-hover\:inline-block{display:inline-block}.group:hover .group-hover\:inline{display:inline}.group:hover .group-hover\:bg-base-300{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.group:hover .group-hover\:bg-primary\/30{background-color:hsl(var(--twc-primary) / .3)}.group:hover .group-hover\:opacity-100{opacity:1}.aria-selected\:bg-base-200[aria-selected=true]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.data-\[disabled\]\:pointer-events-none[data-disabled],.data-\[outside-month\]\:pointer-events-none[data-outside-month]{pointer-events:none}.data-\[state\=active\]\:border-base-300[data-state=active]{--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.data-\[highlighted\]\:bg-base-200[data-highlighted]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.data-\[selection-end\]\:bg-base-content[data-selection-end],.data-\[selection-start\]\:bg-base-content[data-selection-start]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.data-\[state\=active\]\:bg-base-300[data-state=active]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-bg-opacity)))}.data-\[state\=open\]\:bg-accent[data-state=open]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-accent) / var(--twc-accent-opacity, var(--tw-bg-opacity)))}.data-\[state\=open\]\:bg-base-200[data-state=open]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.data-\[disabled\]\:text-base-content-muted[data-disabled]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.data-\[highlighted\]\:text-base-content[data-highlighted]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}.data-\[highlighted\]\:text-base-content-muted[data-highlighted],.data-\[outside-month\]\:text-base-content-muted[data-outside-month]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.data-\[selection-end\]\:text-base-100[data-selection-end],.data-\[selection-start\]\:text-base-100[data-selection-start]{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}.data-\[state\=open\]\:text-base-content-muted[data-state=open]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.data-\[unavailable\]\:text-negative\/20[data-unavailable]{color:hsl(var(--twc-negative) / .2)}.data-\[unavailable\]\:line-through[data-unavailable]{text-decoration-line:line-through}.data-\[disabled\]\:opacity-50[data-disabled],.data-\[outside-month\]\:opacity-50[data-outside-month]{opacity:.5}.data-\[selected\]\:opacity-100[data-selected]{opacity:1}.data-\[selection-end\]\:hover\:bg-base-content:hover[data-selection-end],.data-\[selection-start\]\:hover\:bg-base-content:hover[data-selection-start]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.data-\[selection-end\]\:hover\:text-base-100:hover[data-selection-end],.data-\[selection-start\]\:hover\:text-base-100:hover[data-selection-start]{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}.data-\[selection-end\]\:focus\:bg-base-content:focus[data-selection-end]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.data-\[selection-start\]\:focus\:bg-base-content:focus[data-selection-start]{--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-bg-opacity)))}.data-\[selection-end\]\:focus\:text-base-100:focus[data-selection-end]{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}.data-\[selection-start\]\:focus\:text-base-100:focus[data-selection-start]{--tw-text-opacity: 1;color:hsl(var(--twc-base-100) / var(--twc-base-100-opacity, var(--tw-text-opacity)))}@media (min-width: 640px){.sm\:inset-14{inset:3.5rem}.sm\:mb-4{margin-bottom:1rem}.sm\:mt-20{margin-top:5rem}.sm\:mt-8{margin-top:2rem}.sm\:mt-\[26px\]{margin-top:26px}.sm\:mt-\[74px\]{margin-top:74px}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-1\/4{width:25%}.sm\:w-72{width:18rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-wrap{flex-wrap:wrap}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-20{padding-left:5rem;padding-right:5rem}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:pb-0{padding-bottom:0}.sm\:text-left{text-align:left}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:px-12{padding-left:3rem;padding-right:3rem}.md\:pl-8{padding-left:2rem}.md\:pr-8{padding-right:2rem}}@media (min-width: 1024px){.lg\:block{display:block}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:p-0{padding:0}}.dark\:block:where([data-theme=dark],[data-theme=dark] *){display:block}.dark\:hidden:where([data-theme=dark],[data-theme=dark] *){display:none}.dark\:bg-primary\/30:where([data-theme=dark],[data-theme=dark] *){background-color:hsl(var(--twc-primary) / .3)}.dark\:bg-primary\/60:where([data-theme=dark],[data-theme=dark] *){background-color:hsl(var(--twc-primary) / .6)}.group:hover .dark\:group-hover\:bg-primary\/40:where([data-theme=dark],[data-theme=dark] *){background-color:hsl(var(--twc-primary) / .4)}@media print{.print\:mt-8{margin-top:2rem}.print\:hidden{display:none}.print\:w-\[650px\]{width:650px}.print\:break-inside-avoid{-moz-column-break-inside:avoid;break-inside:avoid}.print\:px-0{padding-left:0;padding-right:0}@media (min-width: 768px){.print\:md\:w-\[841px\]{width:841px}.print\:md\:px-0{padding-left:0;padding-right:0}}}.\[\&\:has\(\[data-selected\]\)\]\:bg-base-200:has([data-selected]){--tw-bg-opacity: 1;background-color:hsl(var(--twc-base-200) / var(--twc-base-200-opacity, var(--tw-bg-opacity)))}.first\:\[\&\:has\(\[data-selected\]\)\]\:rounded-l-md:has([data-selected]):first-child{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.last\:\[\&\:has\(\[data-selected\]\)\]\:rounded-r-md:has([data-selected]):last-child{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.\[\&\:has\(\[data-selected\]\[data-outside-month\]\)\]\:bg-base-100\/50:has([data-selected][data-outside-month]){background-color:hsl(var(--twc-base-100) / .5)}.\[\&\:has\(\[data-selected\]\[data-selection-end\]\)\]\:rounded-r-md:has([data-selected][data-selection-end]){border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.\[\&\:not\(\:checked\)\]\:appearance-none:not(:checked){-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\[data-outside-month\]\[data-selected\]\]\:bg-base-200\/50[data-outside-month][data-selected]{background-color:hsl(var(--twc-base-200) / .5)}.\[\&\[data-outside-month\]\[data-selected\]\]\:text-base-content-muted[data-outside-month][data-selected]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.\[\&\[data-outside-month\]\[data-selected\]\]\:opacity-30[data-outside-month][data-selected]{opacity:.3}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;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))}.\[\&\[data-today\]\:not\(\[data-selected\]\)\]\:border[data-today]:not([data-selected]){border-width:1px}.\[\&\[data-today\]\:not\(\[data-selected\]\)\]\:border-dashed[data-today]:not([data-selected]){border-style:dashed}.\[\&\[data-today\]\:not\(\[data-selected\]\)\]\:border-base-300[data-today]:not([data-selected]){--tw-border-opacity: 1;border-color:hsl(var(--twc-base-300) / var(--twc-base-300-opacity, var(--tw-border-opacity)))}.\[\&\[data-today\]\:not\(\[data-selected\]\)\]\:text-base-content[data-today]:not([data-selected]){--tw-text-opacity: 1;color:hsl(var(--twc-base-content) / var(--twc-base-content-opacity, var(--tw-text-opacity)))}.\[\&_\[data-cmdk-group-heading\]\]\:px-2 [data-cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[data-cmdk-group-heading\]\]\:py-1\.5 [data-cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[data-cmdk-group-heading\]\]\:text-xs [data-cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[data-cmdk-group-heading\]\]\:font-medium [data-cmdk-group-heading]{font-weight:500}.\[\&_\[data-cmdk-group-heading\]\]\:text-base-content-muted [data-cmdk-group-heading]{--tw-text-opacity: 1;color:hsl(var(--twc-base-content-muted) / var(--twc-base-content-muted-opacity, var(--tw-text-opacity)))}.\[\&_\[data-cmdk-group\]\:not\(\[hidden\]\)_\~\[data-cmdk-group\]\]\:pt-0 [data-cmdk-group]:not([hidden])~[data-cmdk-group]{padding-top:0}.\[\&_\[data-cmdk-group\]\]\:px-2 [data-cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[data-cmdk-input-wrapper\]_svg\]\:h-5 [data-cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[data-cmdk-input-wrapper\]_svg\]\:w-5 [data-cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[data-cmdk-input\]\]\:h-12 [data-cmdk-input]{height:3rem}.\[\&_\[data-cmdk-item\]\]\:px-2 [data-cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[data-cmdk-item\]\]\:py-3 [data-cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[data-cmdk-item\]_svg\]\:h-5 [data-cmdk-item] svg{height:1.25rem}.\[\&_\[data-cmdk-item\]_svg\]\:w-5 [data-cmdk-item] svg{width:1.25rem}.\[\&_svg\]\:invisible svg{visibility:hidden} diff --git a/_app/immutable/assets/duckdb-eh.DrTJ_0hP.wasm b/_app/immutable/assets/duckdb-eh.DrTJ_0hP.wasm new file mode 100644 index 0000000000000000000000000000000000000000..299aaedf72cebcc99347cb7cd23104b08c13f483 --- /dev/null +++ b/_app/immutable/assets/duckdb-eh.DrTJ_0hP.wasm @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00d45e5e074b7f7e17e45daabacb0fb67248eac8bd638a72cd1b42dad23788e4 +size 35659694 diff --git a/_app/immutable/assets/duckdb-mvp.DuKjbjvP.wasm b/_app/immutable/assets/duckdb-mvp.DuKjbjvP.wasm new file mode 100644 index 0000000000000000000000000000000000000000..892f0c9f1e4bc012d4705c7b99b021ae1919a5c9 --- /dev/null +++ b/_app/immutable/assets/duckdb-mvp.DuKjbjvP.wasm @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79c530032e746177e0406f3f1c4fa9f69fd7437e17a18587b1f8ab38dc5132ea +size 40621595 diff --git a/_app/immutable/assets/wordmark-black.rfl-FBgf.png b/_app/immutable/assets/wordmark-black.rfl-FBgf.png new file mode 100644 index 0000000000000000000000000000000000000000..a771b7120bca24f1d9c300a7ad4cb5ebb952bc09 Binary files /dev/null and b/_app/immutable/assets/wordmark-black.rfl-FBgf.png differ diff --git a/_app/immutable/assets/wordmark-white.C8ZS96Ri.png b/_app/immutable/assets/wordmark-white.C8ZS96Ri.png new file mode 100644 index 0000000000000000000000000000000000000000..a773e4fb22d352ee34b27e80c4a4b3af009c099c Binary files /dev/null and b/_app/immutable/assets/wordmark-white.C8ZS96Ri.png differ diff --git a/_app/immutable/chunks/AccordionItem.BAM5BvX8.js b/_app/immutable/chunks/AccordionItem.BAM5BvX8.js new file mode 100644 index 0000000000000000000000000000000000000000..cb0513bc615b509930a016428fdc40b2a20de0c4 --- /dev/null +++ b/_app/immutable/chunks/AccordionItem.BAM5BvX8.js @@ -0,0 +1 @@ +import{V as Ke,q as He,a8 as Ue,s as q,b as W,k as O,f as p,a9 as P,n as Q,aa as E,ab as $,N as K,z as N,e as L,d as z,g as F,ac as D,J as w,D as S,E as V,F as M,B as ge,L as Qe,I as ae,j as Xe,G as Ye,a as qe,c as Be,u as Ze,t as ye,i as we,m as $e}from"./scheduler.B2FSa8mv.js";import{S as G,i as J,g as le,b,d as ne,t as h,h as Le,j as ze,f as ue,c as X,a as Y,m as Z,e as y}from"./index.CzNnnxDZ.js";import{v as xe,x as ie,y as et,z as fe,A as tt,B as be,F as lt,G as _e,H as B,J as nt,K as H,L as te,M as me,j as he,I as it,N as st}from"./VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import{t as ot,g as rt,o as ft,a as ve,r as ut,c as at,b as ct,d as dt,e as _t}from"./arrays.DATw8jA9.js";import{d as mt,w as Fe}from"./entry.CmEkywbK.js";const{name:se,selector:ke}=et("accordion"),gt={multiple:!1,disabled:!1,forceVisible:!1},bt=t=>{const e={...gt,...t},n=ot(xe(e,"value","onValueChange","defaultValue")),l=rt(["root"]),{disabled:i,forceVisible:s}=n,o=e.value??Fe(e.defaultValue),a=ft(o,e==null?void 0:e.onValueChange),f=(d,m)=>m===void 0?!1:typeof m=="string"?m===d:m.includes(d),r=mt(a,d=>m=>f(m,d)),u=ie(se(),{returned:()=>({"data-melt-id":l.root})}),c=d=>typeof d=="string"?{value:d}:d,k=d=>typeof d=="number"?{level:d}:d,I=ie(se("item"),{stores:a,returned:d=>m=>{const{value:T,disabled:_}=c(m);return{"data-state":f(T,d)?"open":"closed","data-disabled":fe(_)}}}),g=ie(se("trigger"),{stores:[a,i],returned:([d,m])=>T=>{const{value:_,disabled:U}=c(T);return{disabled:fe(m||U),"aria-expanded":!!f(_,d),"aria-disabled":!!U,"data-disabled":fe(U),"data-value":_,"data-state":f(_,d)?"open":"closed"}},action:d=>({destroy:tt(be(d,"click",()=>{const T=d.dataset.disabled==="true",_=d.dataset.value;T||!_||R(_)}),be(d,"keydown",T=>{if(![B.ARROW_DOWN,B.ARROW_UP,B.HOME,B.END].includes(T.key))return;if(T.preventDefault(),T.key===B.SPACE||T.key===B.ENTER){const ee=d.dataset.disabled==="true",re=d.dataset.value;if(ee||!re)return;R(re);return}const _=T.target,U=nt(l.root);if(!U||!_e(_))return;const j=Array.from(U.querySelectorAll(ke("trigger"))).filter(ee=>_e(ee)?ee.dataset.disabled!=="true":!1);if(!j.length)return;const oe=j.indexOf(_);T.key===B.ARROW_DOWN&&j[(oe+1)%j.length].focus(),T.key===B.ARROW_UP&&j[(oe-1+j.length)%j.length].focus(),T.key===B.HOME&&j[0].focus(),T.key===B.END&&j[j.length-1].focus()}))})}),A=ie(se("content"),{stores:[a,i,s],returned:([d,m,T])=>_=>{const{value:U}=c(_),x=f(U,d)||T;return{"data-state":x?"open":"closed","data-disabled":fe(m),"data-value":U,hidden:x?void 0:!0,style:lt({display:x?void 0:"none"})}},action:d=>{Ke().then(()=>{const m=ve(),T=ve(),_=document.querySelector(`${ke("trigger")}, [data-value="${d.dataset.value}"]`);_e(_)&&(d.id=m,_.setAttribute("aria-controls",m),_.id=T)})}}),C=ie(se("heading"),{returned:()=>d=>{const{level:m}=k(d);return{role:"heading","aria-level":m,"data-heading-level":m}}});function R(d){a.update(m=>m===void 0?e.multiple?[d]:d:Array.isArray(m)?m.includes(d)?m.filter(T=>T!==d):(m.push(d),m):m===d?void 0:d)}return{ids:l,elements:{root:u,item:I,trigger:g,content:A,heading:C},states:{value:a},helpers:{isSelected:r},options:n}};function ce(){return{NAME:"accordion",ITEM_NAME:"accordion-item",PARTS:["root","content","header","item","trigger"]}}function ht(t){const e=bt(ut(t)),{NAME:n,PARTS:l}=ce(),i=at(n,l),s={...e,getAttrs:i,updateOption:ct(e.options)};return He(n,s),s}function de(){const{NAME:t}=ce();return Ue(t)}function vt(t){const{ITEM_NAME:e}=ce(),n=Fe(t);return He(e,{propsStore:n}),{...de(),propsStore:n}}function Ge(){const{ITEM_NAME:t}=ce();return Ue(t)}function kt(){const t=de(),{propsStore:e}=Ge();return{...t,propsStore:e}}function At(){const t=de(),{propsStore:e}=Ge();return{...t,props:e}}const Ct=t=>({builder:t&4}),Ae=t=>({builder:t[2]}),pt=t=>({builder:t&4}),Ce=t=>({builder:t[2]});function Et(t){let e,n,l,i;const s=t[11].default,o=N(s,t,t[10],Ae);let a=[t[2],t[4]],f={};for(let r=0;r{o[u]=null}),ne(),n=o[e],n?n.p(f,r):(n=o[e]=s[e](f),n.c()),h(n,1),n.m(l.parentNode,l))},i(f){i||(h(n),i=!0)},o(f){b(n),i=!1},d(f){f&&p(l),o[e].d(f)}}}function Nt(t,e,n){let l;const i=["multiple","value","onValueChange","disabled","asChild","el"];let s=P(e,i),o,{$$slots:a={},$$scope:f}=e,{multiple:r=!1}=e,{value:u=void 0}=e,{onValueChange:c=void 0}=e,{disabled:k=!1}=e,{asChild:I=!1}=e,{el:g=void 0}=e;const{elements:{root:A},states:{value:C},updateOption:R,getAttrs:d}=ht({multiple:r,disabled:k,defaultValue:u,onValueChange:({next:_})=>Array.isArray(_)?((!Array.isArray(u)||!dt(u,_))&&(c==null||c(_),n(5,u=_)),_):(u!==_&&(c==null||c(_),n(5,u=_)),_)});Q(t,A,_=>n(9,o=_));const m=d("root");function T(_){K[_?"unshift":"push"](()=>{g=_,n(0,g)})}return t.$$set=_=>{e=E(E({},e),$(_)),n(4,s=P(e,i)),"multiple"in _&&n(6,r=_.multiple),"value"in _&&n(5,u=_.value),"onValueChange"in _&&n(7,c=_.onValueChange),"disabled"in _&&n(8,k=_.disabled),"asChild"in _&&n(1,I=_.asChild),"el"in _&&n(0,g=_.el),"$$scope"in _&&n(10,f=_.$$scope)},t.$$.update=()=>{t.$$.dirty&32&&u!==void 0&&C.set(Array.isArray(u)?[...u]:u),t.$$.dirty&64&&R("multiple",r),t.$$.dirty&256&&R("disabled",k),t.$$.dirty&512&&n(2,l=o),t.$$.dirty&4&&Object.assign(l,m)},[g,I,l,A,s,u,r,c,k,o,f,a,T]}let St=class extends G{constructor(e){super(),J(this,e,Nt,It,q,{multiple:6,value:5,onValueChange:7,disabled:8,asChild:1,el:0})}};const Vt=t=>({builder:t&4}),pe=t=>({builder:t[2]}),Mt=t=>({builder:t&4}),Ee=t=>({builder:t[2]});function Ot(t){let e,n,l,i;const s=t[11].default,o=N(s,t,t[10],pe);let a=[t[2],t[5]],f={};for(let r=0;r{o[u]=null}),ne(),n=o[e],n?n.p(f,r):(n=o[e]=s[e](f),n.c()),h(n,1),n.m(l.parentNode,l))},i(f){i||(h(n),i=!0)},o(f){b(n),i=!1},d(f){f&&p(l),o[e].d(f)}}}function Rt(t,e,n){let l;const i=["value","disabled","asChild","el"];let s=P(e,i),o,a,{$$slots:f={},$$scope:r}=e,{value:u}=e,{disabled:c=void 0}=e,{asChild:k=!1}=e,{el:I=void 0}=e;const{elements:{item:g},propsStore:A,getAttrs:C}=vt({value:u,disabled:c});Q(t,g,m=>n(9,a=m)),Q(t,A,m=>n(8,o=m));const R=C("item");function d(m){K[m?"unshift":"push"](()=>{I=m,n(0,I)})}return t.$$set=m=>{e=E(E({},e),$(m)),n(5,s=P(e,i)),"value"in m&&n(6,u=m.value),"disabled"in m&&n(7,c=m.disabled),"asChild"in m&&n(1,k=m.asChild),"el"in m&&n(0,I=m.el),"$$scope"in m&&n(10,r=m.$$scope)},t.$$.update=()=>{t.$$.dirty&192&&A.set({value:u,disabled:c}),t.$$.dirty&896&&n(2,l=a({...o,disabled:c})),t.$$.dirty&4&&Object.assign(l,R)},[I,k,l,g,A,s,u,c,o,a,r,f,d]}let jt=class extends G{constructor(e){super(),J(this,e,Rt,Pt,q,{value:6,disabled:7,asChild:1,el:0})}};const Wt=t=>({builder:t&4}),Te=t=>({builder:t[2]}),Ht=t=>({builder:t&4}),Ie=t=>({builder:t[2]});function Ut(t){let e,n,l,i;const s=t[8].default,o=N(s,t,t[7],Te);let a=[t[2],t[4]],f={};for(let r=0;r{o[u]=null}),ne(),n=o[e],n?n.p(f,r):(n=o[e]=s[e](f),n.c()),h(n,1),n.m(l.parentNode,l))},i(f){i||(h(n),i=!0)},o(f){b(n),i=!1},d(f){f&&p(l),o[e].d(f)}}}function Lt(t,e,n){let l;const i=["level","asChild","el"];let s=P(e,i),o,{$$slots:a={},$$scope:f}=e,{level:r=3}=e,{asChild:u=!1}=e,{el:c=void 0}=e;const{elements:{heading:k},getAttrs:I}=de();Q(t,k,C=>n(6,o=C));const g=I("header");function A(C){K[C?"unshift":"push"](()=>{c=C,n(0,c)})}return t.$$set=C=>{e=E(E({},e),$(C)),n(4,s=P(e,i)),"level"in C&&n(5,r=C.level),"asChild"in C&&n(1,u=C.asChild),"el"in C&&n(0,c=C.el),"$$scope"in C&&n(7,f=C.$$scope)},t.$$.update=()=>{t.$$.dirty&96&&n(2,l=o(r)),t.$$.dirty&4&&Object.assign(l,g)},[c,u,l,k,s,r,o,f,a,A]}class zt extends G{constructor(e){super(),J(this,e,Lt,Bt,q,{level:5,asChild:1,el:0})}}const Ft=t=>({builder:t&4}),Ne=t=>({builder:t[2]}),Gt=t=>({builder:t&4}),Se=t=>({builder:t[2]});function Jt(t){let e,n,l,i;const s=t[10].default,o=N(s,t,t[9],Ne);let a=[t[2],{type:"button"},t[6]],f={};for(let r=0;r{o[u]=null}),ne(),n=o[e],n?n.p(f,r):(n=o[e]=s[e](f),n.c()),h(n,1),n.m(l.parentNode,l))},i(f){i||(h(n),i=!0)},o(f){b(n),i=!1},d(f){f&&p(l),o[e].d(f)}}}function Xt(t,e,n){let l;const i=["asChild","el"];let s=P(e,i),o,a,{$$slots:f={},$$scope:r}=e,{asChild:u=!1}=e,{el:c=void 0}=e;const{elements:{trigger:k},props:I,getAttrs:g}=At();Q(t,k,d=>n(8,a=d)),Q(t,I,d=>n(7,o=d));const A=_t(),C=g("trigger");function R(d){K[d?"unshift":"push"](()=>{c=d,n(0,c)})}return t.$$set=d=>{e=E(E({},e),$(d)),n(6,s=P(e,i)),"asChild"in d&&n(1,u=d.asChild),"el"in d&&n(0,c=d.el),"$$scope"in d&&n(9,r=d.$$scope)},t.$$.update=()=>{t.$$.dirty&384&&n(2,l=a({...o})),t.$$.dirty&4&&Object.assign(l,C)},[c,u,l,k,I,A,s,o,a,r,f,R]}let Yt=class extends G{constructor(e){super(),J(this,e,Xt,Qt,q,{asChild:1,el:0})}};const Zt=t=>({builder:t&256}),Ve=t=>({builder:t[8]}),yt=t=>({builder:t&256}),Me=t=>({builder:t[8]}),wt=t=>({builder:t&256}),Oe=t=>({builder:t[8]}),$t=t=>({builder:t&256}),De=t=>({builder:t[8]}),xt=t=>({builder:t&256}),Pe=t=>({builder:t[8]}),el=t=>({builder:t&256}),Re=t=>({builder:t[8]});function tl(t){let e,n,l,i;const s=t[17].default,o=N(s,t,t[16],Ve);let a=[t[8],t[14]],f={};for(let r=0;r{n=ze(e,t[3],t[4]),n.start()})),l=!0)},o(u){b(a,u),l=!1},d(u){u&&p(e),a&&a.d(u),t[20](null),i=!1,s()}}}function il(t){let e,n,l,i,s,o;const a=t[17].default,f=N(a,t,t[16],De);let r=[t[8],t[14]],u={};for(let c=0;c{i&&(l&&l.end(1),n=ze(e,t[3],t[4]),n.start())}),i=!0)},o(c){b(f,c),n&&n.invalidate(),c&&(l=Le(e,t[5],t[6])),i=!1},d(c){c&&p(e),f&&f.d(c),t[19](null),c&&l&&l.end(),s=!1,o()}}}function sl(t){let e,n,l,i,s;const o=t[17].default,a=N(o,t,t[16],Pe);let f=[t[8],t[14]],r={};for(let u=0;u{l&&(n||(n=ue(e,t[1],t[2],!0)),n.run(1))}),l=!0)},o(u){b(a,u),u&&(n||(n=ue(e,t[1],t[2],!1)),n.run(0)),l=!1},d(u){u&&p(e),a&&a.d(u),t[18](null),u&&n&&n.end(),i=!1,s()}}}function ol(t){let e;const n=t[17].default,l=N(n,t,t[16],Re);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,s){l&&l.m(i,s),e=!0},p(i,s){l&&l.p&&(!e||s&65792)&&S(l,n,i,i[16],e?M(n,i[16],s,el):V(i[16]),Re)},i(i){e||(h(l,i),e=!0)},o(i){b(l,i),e=!1},d(i){l&&l.d(i)}}}function rl(t){let e,n,l,i,s,o,a,f,r,u;const c=[ol,sl,il,nl,ll,tl],k=[];function I(g,A){return A&1664&&(e=null),A&1538&&(n=null),A&1576&&(l=null),A&1544&&(i=null),A&1568&&(s=null),A&1536&&(o=null),e==null&&(e=!!(g[7]&&g[10](g[9].value))),e?0:(n==null&&(n=!!(g[1]&&g[10](g[9].value))),n?1:(l==null&&(l=!!(g[3]&&g[5]&&g[10](g[9].value))),l?2:(i==null&&(i=!!(g[3]&&g[10](g[9].value))),i?3:(s==null&&(s=!!(g[5]&&g[10](g[9].value))),s?4:(o==null&&(o=!!g[10](g[9].value)),o?5:-1)))))}return~(a=I(t,-1))&&(f=k[a]=c[a](t)),{c(){f&&f.c(),r=W()},l(g){f&&f.l(g),r=W()},m(g,A){~a&&k[a].m(g,A),O(g,r,A),u=!0},p(g,[A]){let C=a;a=I(g,A),a===C?~a&&k[a].p(g,A):(f&&(le(),b(k[C],1,1,()=>{k[C]=null}),ne()),~a?(f=k[a],f?f.p(g,A):(f=k[a]=c[a](g),f.c()),h(f,1),f.m(r.parentNode,r)):f=null)},i(g){u||(h(f),u=!0)},o(g){b(f),u=!1},d(g){g&&p(r),~a&&k[a].d(g)}}}function fl(t,e,n){let l;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","el"];let s=P(e,i),o,a,f,{$$slots:r={},$$scope:u}=e,{transition:c=void 0}=e,{transitionConfig:k=void 0}=e,{inTransition:I=void 0}=e,{inTransitionConfig:g=void 0}=e,{outTransition:A=void 0}=e,{outTransitionConfig:C=void 0}=e,{asChild:R=!1}=e,{el:d=void 0}=e;const{elements:{content:m},helpers:{isSelected:T},propsStore:_,getAttrs:U}=kt();Q(t,m,v=>n(15,a=v)),Q(t,T,v=>n(10,f=v)),Q(t,_,v=>n(9,o=v));const x=U("content");function j(v){K[v?"unshift":"push"](()=>{d=v,n(0,d)})}function oe(v){K[v?"unshift":"push"](()=>{d=v,n(0,d)})}function ee(v){K[v?"unshift":"push"](()=>{d=v,n(0,d)})}function re(v){K[v?"unshift":"push"](()=>{d=v,n(0,d)})}function Je(v){K[v?"unshift":"push"](()=>{d=v,n(0,d)})}return t.$$set=v=>{e=E(E({},e),$(v)),n(14,s=P(e,i)),"transition"in v&&n(1,c=v.transition),"transitionConfig"in v&&n(2,k=v.transitionConfig),"inTransition"in v&&n(3,I=v.inTransition),"inTransitionConfig"in v&&n(4,g=v.inTransitionConfig),"outTransition"in v&&n(5,A=v.outTransition),"outTransitionConfig"in v&&n(6,C=v.outTransitionConfig),"asChild"in v&&n(7,R=v.asChild),"el"in v&&n(0,d=v.el),"$$scope"in v&&n(16,u=v.$$scope)},t.$$.update=()=>{t.$$.dirty&33280&&n(8,l=a({...o})),t.$$.dirty&256&&Object.assign(l,x)},[d,c,k,I,g,A,C,R,l,o,f,m,T,_,s,a,u,r,j,oe,ee,re,Je]}let ul=class extends G{constructor(e){super(),J(this,e,fl,rl,q,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,el:0})}};function al(t){let e,n,l;const i=t[2].default,s=N(i,t,t[3],null);return{c(){e=L("div"),s&&s.c(),this.h()},l(o){e=z(o,"DIV",{class:!0});var a=F(e);s&&s.l(a),a.forEach(p),this.h()},h(){Xe(e,"class","pb-4 pt-0")},m(o,a){O(o,e,a),s&&s.m(e,null),l=!0},p(o,a){s&&s.p&&(!l||a&8)&&S(s,i,o,o[3],l?M(i,o[3],a,null):V(o[3]),null)},i(o){l||(h(s,o),o&&ae(()=>{l&&(n||(n=ue(e,he,{duration:200},!0)),n.run(1))}),l=!0)},o(o){b(s,o),o&&(n||(n=ue(e,he,{duration:200},!1)),n.run(0)),l=!1},d(o){o&&p(e),s&&s.d(o),o&&n&&n.end()}}}function cl(t){let e,n;const l=[{class:te("overflow-hidden text-sm",t[0])},t[1]];let i={$$slots:{default:[al]},$$scope:{ctx:t}};for(let s=0;s{e=E(E({},e),$(f)),n(1,i=P(e,l)),"class"in f&&n(0,a=f.class),"$$scope"in f&&n(3,o=f.$$scope)},[a,i,s,o]}class _l extends G{constructor(e){super(),J(this,e,dl,cl,q,{class:0})}}function ml(t){let e;const n=t[3].default,l=N(n,t,t[4],null);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,s){l&&l.m(i,s),e=!0},p(i,s){l&&l.p&&(!e||s&16)&&S(l,n,i,i[4],e?M(n,i[4],s,null):V(i[4]),null)},i(i){e||(h(l,i),e=!0)},o(i){b(l,i),e=!1},d(i){l&&l.d(i)}}}function gl(t){let e,n;const l=[{value:t[1]},{class:te("border-b border-base-300",t[0])},t[2]];let i={$$slots:{default:[ml]},$$scope:{ctx:t}};for(let s=0;s{e=E(E({},e),$(r)),n(2,i=P(e,l)),"class"in r&&n(0,a=r.class),"value"in r&&n(1,f=r.value),"$$scope"in r&&n(4,o=r.$$scope)},[a,f,i,s,o]}class hl extends G{constructor(e){super(),J(this,e,bl,gl,q,{class:0,value:1})}}function vl(t){let e,n,l;const i=t[3].default,s=N(i,t,t[5],null);return n=new it({props:{src:st,class:"h-4 w-4 shrink-0 text-base-300 transition-transform duration-200"}}),{c(){s&&s.c(),e=qe(),X(n.$$.fragment)},l(o){s&&s.l(o),e=Be(o),Y(n.$$.fragment,o)},m(o,a){s&&s.m(o,a),O(o,e,a),Z(n,o,a),l=!0},p(o,a){s&&s.p&&(!l||a&32)&&S(s,i,o,o[5],l?M(i,o[5],a,null):V(o[5]),null)},i(o){l||(h(s,o),h(n.$$.fragment,o),l=!0)},o(o){b(s,o),b(n.$$.fragment,o),l=!1},d(o){o&&p(e),s&&s.d(o),y(n,o)}}}function kl(t){let e,n;const l=[{class:te("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 rounded focus-visible:ring-base-200 focus-visible:outline-none focus-visible:ring-2",t[0])},t[2]];let i={$$slots:{default:[vl]},$$scope:{ctx:t}};for(let s=0;ssvg]:rotate-180 rounded focus-visible:ring-base-200 focus-visible:outline-none focus-visible:ring-2",s[0])},o&4&&me(s[2])]):{};o&32&&(a.$$scope={dirty:o,ctx:s}),e.$set(a)},i(s){n||(h(e.$$.fragment,s),n=!0)},o(s){b(e.$$.fragment,s),n=!1},d(s){y(e,s)}}}function Al(t){let e,n;return e=new zt({props:{level:t[1],class:"flex",$$slots:{default:[kl]},$$scope:{ctx:t}}}),{c(){X(e.$$.fragment)},l(l){Y(e.$$.fragment,l)},m(l,i){Z(e,l,i),n=!0},p(l,[i]){const s={};i&2&&(s.level=l[1]),i&37&&(s.$$scope={dirty:i,ctx:l}),e.$set(s)},i(l){n||(h(e.$$.fragment,l),n=!0)},o(l){b(e.$$.fragment,l),n=!1},d(l){y(e,l)}}}function Cl(t,e,n){const l=["class","level"];let i=P(e,l),{$$slots:s={},$$scope:o}=e,{class:a=void 0}=e,{level:f=3}=e;function r(u){Ye.call(this,t,u)}return t.$$set=u=>{e=E(E({},e),$(u)),n(2,i=P(e,l)),"class"in u&&n(0,a=u.class),"level"in u&&n(1,f=u.level),"$$scope"in u&&n(5,o=u.$$scope)},[a,f,i,s,r,o]}class pl extends G{constructor(e){super(),J(this,e,Cl,Al,q,{class:0,level:1})}}const El=St;function Tl(t){let e;const n=t[2].default,l=N(n,t,t[3],null);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,s){l&&l.m(i,s),e=!0},p(i,s){l&&l.p&&(!e||s&8)&&S(l,n,i,i[3],e?M(n,i[3],s,null):V(i[3]),null)},i(i){e||(h(l,i),e=!0)},o(i){b(l,i),e=!1},d(i){l&&l.d(i)}}}function Il(t){let e,n;return e=new El({props:{class:t[1],multiple:!t[0],$$slots:{default:[Tl]},$$scope:{ctx:t}}}),{c(){X(e.$$.fragment)},l(l){Y(e.$$.fragment,l)},m(l,i){Z(e,l,i),n=!0},p(l,[i]){const s={};i&2&&(s.class=l[1]),i&1&&(s.multiple=!l[0]),i&8&&(s.$$scope={dirty:i,ctx:l}),e.$set(s)},i(l){n||(h(e.$$.fragment,l),n=!0)},o(l){b(e.$$.fragment,l),n=!1},d(l){y(e,l)}}}function Nl(t,e,n){let{$$slots:l={},$$scope:i}=e,{single:s=!1}=e,{class:o=void 0}=e;return t.$$set=a=>{"single"in a&&n(0,s=a.single),"class"in a&&n(1,o=a.class),"$$scope"in a&&n(3,i=a.$$scope)},[s,o,l,i]}class Gl extends G{constructor(e){super(),J(this,e,Nl,Il,q,{single:0,class:1})}}const Sl=t=>({}),je=t=>({});function Vl(t){let e;return{c(){e=ye(t[0])},l(n){e=we(n,t[0])},m(n,l){O(n,e,l)},p(n,l){l&1&&$e(e,n[0])},d(n){n&&p(e)}}}function Ml(t){let e;const n=t[3].title,l=N(n,t,t[4],je),i=l||Vl(t);return{c(){i&&i.c()},l(s){i&&i.l(s)},m(s,o){i&&i.m(s,o),e=!0},p(s,o){l?l.p&&(!e||o&16)&&S(l,n,s,s[4],e?M(n,s[4],o,Sl):V(s[4]),je):i&&i.p&&(!e||o&1)&&i.p(s,e?o:-1)},i(s){e||(h(i,s),e=!0)},o(s){b(i,s),e=!1},d(s){i&&i.d(s)}}}function Ol(t){let e;const n=t[3].default,l=N(n,t,t[4],null);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,s){l&&l.m(i,s),e=!0},p(i,s){l&&l.p&&(!e||s&16)&&S(l,n,i,i[4],e?M(n,i[4],s,null):V(i[4]),null)},i(i){e||(h(l,i),e=!0)},o(i){b(l,i),e=!1},d(i){l&&l.d(i)}}}function Dl(t){let e,n,l,i;return e=new pl({props:{class:t[1]?"py-0":"",$$slots:{default:[Ml]},$$scope:{ctx:t}}}),l=new _l({props:{$$slots:{default:[Ol]},$$scope:{ctx:t}}}),{c(){X(e.$$.fragment),n=qe(),X(l.$$.fragment)},l(s){Y(e.$$.fragment,s),n=Be(s),Y(l.$$.fragment,s)},m(s,o){Z(e,s,o),O(s,n,o),Z(l,s,o),i=!0},p(s,o){const a={};o&2&&(a.class=s[1]?"py-0":""),o&17&&(a.$$scope={dirty:o,ctx:s}),e.$set(a);const f={};o&16&&(f.$$scope={dirty:o,ctx:s}),l.$set(f)},i(s){i||(h(e.$$.fragment,s),h(l.$$.fragment,s),i=!0)},o(s){b(e.$$.fragment,s),b(l.$$.fragment,s),i=!1},d(s){s&&p(n),y(e,s),y(l,s)}}}function We(t){let e,n;return e=new hl({props:{value:t[0],class:t[2],$$slots:{default:[Dl]},$$scope:{ctx:t}}}),{c(){X(e.$$.fragment)},l(l){Y(e.$$.fragment,l)},m(l,i){Z(e,l,i),n=!0},p(l,i){const s={};i&1&&(s.value=l[0]),i&4&&(s.class=l[2]),i&19&&(s.$$scope={dirty:i,ctx:l}),e.$set(s)},i(l){n||(h(e.$$.fragment,l),n=!0)},o(l){b(e.$$.fragment,l),n=!1},d(l){y(e,l)}}}function Pl(t){let e=t[0],n,l,i=We(t);return{c(){i.c(),n=W()},l(s){i.l(s),n=W()},m(s,o){i.m(s,o),O(s,n,o),l=!0},p(s,[o]){o&1&&q(e,e=s[0])?(le(),b(i,1,1,Ze),ne(),i=We(s),i.c(),h(i,1),i.m(n.parentNode,n)):i.p(s,o)},i(s){l||(h(i),l=!0)},o(s){b(i),l=!1},d(s){s&&p(n),i.d(s)}}}function Rl(t,e,n){let{$$slots:l={},$$scope:i}=e,{title:s=""}=e,{compact:o=!1}=e,{class:a=void 0}=e;return t.$$set=f=>{"title"in f&&n(0,s=f.title),"compact"in f&&n(1,o=f.compact),"class"in f&&n(2,a=f.class),"$$scope"in f&&n(4,i=f.$$scope)},[s,o,a,l,i]}class Jl extends G{constructor(e){super(),J(this,e,Rl,Pl,q,{title:0,compact:1,class:2})}}export{Gl as A,Jl as a}; diff --git a/_app/immutable/chunks/AreaMap.u3IdXB4f.js b/_app/immutable/chunks/AreaMap.u3IdXB4f.js new file mode 100644 index 0000000000000000000000000000000000000000..7515b0a0446196483dfc29baba2933e8fa977cef --- /dev/null +++ b/_app/immutable/chunks/AreaMap.u3IdXB4f.js @@ -0,0 +1,27 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/chunks/leaflet-src.CnxXdW4o.js","_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js","_app/immutable/chunks/entry.CmEkywbK.js","_app/immutable/chunks/scheduler.B2FSa8mv.js","_app/immutable/chunks/index.CzNnnxDZ.js","_app/immutable/chunks/preload-helper.D7HrI6pR.js","_app/immutable/chunks/index.rV6zwFgL.js","_app/immutable/assets/VennDiagram.DBCXi1Yl.css"])))=>i.map(i=>d[i]); +var fo=Object.defineProperty;var er=l=>{throw TypeError(l)};var uo=(l,e,n)=>e in l?fo(l,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):l[e]=n;var gl=(l,e,n)=>uo(l,typeof e!="symbol"?e+"":e,n),tr=(l,e,n)=>e.has(l)||er("Cannot "+n);var be=(l,e,n)=>(tr(l,e,"read from private field"),n?n.call(l):e.get(l)),_t=(l,e,n)=>e.has(l)?er("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(l):e.set(l,n),Pt=(l,e,n,t)=>(tr(l,e,"write to private field"),t?t.call(l,n):e.set(l,n),n);import{V as gn,ae as pa,s as me,b as X,k as C,f as b,a9 as $,n as Oe,aa as w,ab as Te,N as Le,e as R,d as V,g as F,ac as ke,J as xe,u as ne,z as re,D as ie,E as ae,F as oe,q as Hn,a8 as Jn,I as St,B as Ae,L as ct,r as Vl,t as ue,i as ce,m as Ce,G as ut,l as q,an as co,j as I,A as it,a as se,c as fe,aj as Jt,ak as at,H as Ut,o as En,M as wt,T as We,ao as Pl,ag as nr,am as ho,O as lr,P as rr,K as mo}from"./scheduler.B2FSa8mv.js";import{S as _e,i as ge,g as ve,b as v,d as ye,t as k,h as ol,j as Pn,f as Et,c as U,a as Y,m as Z,e as z,k as Gt}from"./index.CzNnnxDZ.js";import{G as ot,J as _o,an as Bl,bv as go,x as tt,B as ft,w as rt,v as Fl,y as Wl,aj as wn,bw as bo,bx as ko,z as ir,A as Kt,H as pe,by as ar,bz as vo,bA as or,ao as Ca,F as bn,bB as yt,bC as yo,bD as Da,al as Lt,bE as po,ak as hn,bF as Co,K as De,L as Ne,M as He,bG as Sa,I as sl,bH as Do,bI as So,bJ as Eo,k as Ve,aq as Tn,bK as To,bL as Mo,bM as Ea,bN as Oo,Q as Nt,ae as Gn,bO as Ta,Y as Po,bj as Ma,j as an,bP as Io,a5 as ql,aa as rn,bQ as Ao,bR as sr,g as Kn,a4 as Bn,bS as wo,a7 as Lo,bT as No,af as fl,bU as Ro,ad as jl,bV as Oa,ah as ll,bW as Vo,bX as Bo,a8 as Fo,ag as Dn,bY as fr,bZ as Wo,u as qo,o as jo}from"./VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import{c as Uo,d as Pa,l as bl,b as Yo,f as Zo,a as zo,n as Ho,u as Ia,g as Il,e as Jo,r as Go,i as Aa,t as Ko,j as Qo,k as ur,m as Xo,o as kl,q as xo,s as wa,B as $o}from"./button.DfeRvuoX.js";import{o as Wn,t as Mn,g as Ul,a as es,c as ul,r as cl,b as dl,e as cn,d as ts}from"./arrays.DATw8jA9.js";import{w as st,d as Ze,r as tl}from"./entry.CmEkywbK.js";import{p as La}from"./stores.BQnhBgve.js";import{C as Na,P as Ra}from"./Prismjs.DElG_ecN.js";import{h as rl,u as Va}from"./await_block.Dveih0bk.js";import{_ as ns}from"./preload-helper.D7HrI6pR.js";function vl(l){return Array.from(l.querySelectorAll('[role="option"]:not([data-disabled])')).filter(e=>ot(e))}function ls(l){return e=>{const n=e.target,t=_o(l);if(!t||!Bl(n))return!1;const r=t.id;return!!(go(n)&&r===n.htmlFor||n.closest(`label[for="${r}"]`))}}function rs(){return{elements:{root:tt("label",{action:e=>({destroy:ft(e,"mousedown",t=>{!t.defaultPrevented&&t.detail>1&&t.preventDefault()})})})}}}const is=[pe.ARROW_LEFT,pe.ESCAPE,pe.ARROW_RIGHT,pe.SHIFT,pe.CAPS_LOCK,pe.CONTROL,pe.ALT,pe.META,pe.ENTER,pe.F1,pe.F2,pe.F3,pe.F4,pe.F5,pe.F6,pe.F7,pe.F8,pe.F9,pe.F10,pe.F11,pe.F12],as={positioning:{placement:"bottom",sameWidth:!0},scrollAlignment:"nearest",loop:!0,defaultOpen:!1,closeOnOutsideClick:!0,preventScroll:!0,closeOnEscape:!0,forceVisible:!1,portal:void 0,builder:"listbox",disabled:!1,required:!1,name:void 0,typeahead:!0,highlightOnHover:!0,onOutsideClick:void 0},os=["trigger","menu","label"];function ss(l){const e={...as,...l},n=rt(st(null)),t=rt(st(null)),r=e.selected??st(e.defaultSelected),i=Wn(r,e==null?void 0:e.onSelectedChange),a=Ze(t,J=>J?te(J):void 0),s=e.open??st(e.defaultOpen),o=Wn(s,e==null?void 0:e.onOpenChange),f=Mn({...Fl(e,"open","defaultOpen","builder","ids"),multiple:e.multiple??!1}),{scrollAlignment:u,loop:c,closeOnOutsideClick:d,closeOnEscape:h,preventScroll:m,portal:_,forceVisible:y,positioning:p,multiple:D,arrowSize:L,disabled:N,required:S,typeahead:K,name:B,highlightOnHover:O,onOutsideClick:E}=f,{name:T,selector:g}=Wl(e.builder),M=Mn({...Ul(os),...e.ids}),{handleTypeaheadSearch:P}=Uo({onMatch:J=>{t.set(J),J.scrollIntoView({block:u.get()})},getCurrentItem(){return t.get()}});function te(J){const de=J.getAttribute("data-value"),j=J.getAttribute("data-label"),Ue=J.hasAttribute("data-disabled");return{value:de&&JSON.parse(de),label:j??J.textContent??void 0,disabled:!!Ue}}const Ie=J=>{i.update(de=>{if(D.get()){const Ue=Array.isArray(de)?[...de]:[];return Ko(J,Ue,(ht,Re)=>wn(ht.value,Re.value))}return J})};function Me(J){const de=te(J);Ie(de)}async function Pe(){o.set(!0);const J=document.getElementById(M.trigger.get());if(!J)return;J!==n.get()&&n.set(J),await gn();const de=document.getElementById(M.menu.get());if(!ot(de))return;const j=de.querySelector("[aria-selected=true]");ot(j)&&t.set(j)}function G(){o.set(!1),t.set(null)}const Se=Pa({open:o,forceVisible:y,activeTrigger:n}),Ee=Ze([i],([J])=>de=>Array.isArray(J)?J.some(j=>wn(j.value,de)):bo(de)?wn(J==null?void 0:J.value,ko(de,void 0)):wn(J==null?void 0:J.value,de)),he=Ze([a],([J])=>de=>wn(J==null?void 0:J.value,de)),Fe=tt(T("trigger"),{stores:[o,t,N,M.menu,M.trigger,M.label],returned:([J,de,j,Ue,ht,Re])=>({"aria-activedescendant":de==null?void 0:de.id,"aria-autocomplete":"list","aria-controls":Ue,"aria-expanded":J,"aria-labelledby":Re,id:ht,role:"combobox",disabled:ir(j),type:e.builder==="select"?"button":void 0}),action:J=>{const de=po(J),j=Kt(ft(J,"click",()=>{J.focus(),o.get()?G():Pe()}),ft(J,"keydown",Re=>{if(!o.get()){if(is.includes(Re.key)||Re.key===pe.TAB||Re.key===pe.BACKSPACE&&de&&J.value===""||Re.key===pe.SPACE&&ar(J))return;Pe(),gn().then(()=>{if(i.get())return;const nt=document.getElementById(M.menu.get());if(!ot(nt))return;const Ye=Array.from(nt.querySelectorAll(`${g("item")}:not([data-disabled]):not([data-hidden])`)).filter(bt=>ot(bt));Ye.length&&(Re.key===pe.ARROW_DOWN?(t.set(Ye[0]),Ye[0].scrollIntoView({block:u.get()})):Re.key===pe.ARROW_UP&&(t.set(bl(Ye)),bl(Ye).scrollIntoView({block:u.get()})))})}if(Re.key===pe.TAB){G();return}if(Re.key===pe.ENTER&&!Re.isComposing||Re.key===pe.SPACE&&ar(J)){Re.preventDefault();const Ke=t.get();Ke&&Me(Ke),D.get()||G()}if(Re.key===pe.ARROW_UP&&Re.altKey&&G(),vo.includes(Re.key)){Re.preventDefault();const Ke=document.getElementById(M.menu.get());if(!ot(Ke))return;const nt=vl(Ke);if(!nt.length)return;const Ye=nt.filter(xt=>!or(xt)&&xt.dataset.hidden===void 0),bt=t.get(),mt=bt?Ye.indexOf(bt):-1,Bt=c.get(),Yt=u.get();let kt;switch(Re.key){case pe.ARROW_DOWN:kt=Ho(Ye,mt,Bt);break;case pe.ARROW_UP:kt=zo(Ye,mt,Bt);break;case pe.PAGE_DOWN:kt=Zo(Ye,mt,10,Bt);break;case pe.PAGE_UP:kt=Yo(Ye,mt,10,Bt);break;case pe.HOME:kt=Ye[0];break;case pe.END:kt=bl(Ye);break;default:return}t.set(kt),kt==null||kt.scrollIntoView({block:Yt})}else if(K.get()){const Ke=document.getElementById(M.menu.get());if(!ot(Ke))return;P(Re.key,vl(Ke))}}));let Ue=hn;const ht=Ca(J,{handler:G,enabled:Ze([o,h],([Re,Vt])=>Re&&Vt)});return ht&&ht.destroy&&(Ue=ht.destroy),{destroy(){j(),Ue()}}}}),Je=tt(T("menu"),{stores:[Se,M.menu],returned:([J,de])=>({hidden:J?void 0:!0,id:de,role:"listbox",style:bn({display:J?void 0:"none"})}),action:J=>{let de=hn;const j=Kt(yt([Se,_,d,p,n],([Ue,ht,Re,Vt,Ke])=>{de(),!(!Ue||!Ke)&&gn().then(()=>{de();const nt=ls(M.trigger.get());de=Ia(J,{anchorElement:Ke,open:o,options:{floating:Vt,focusTrap:null,modal:{closeOnInteractOutside:Re,onClose:G,open:Ue,shouldCloseOnInteractOutside:Ye=>{var mt;if((mt=E.get())==null||mt(Ye),Ye.defaultPrevented)return!1;const bt=Ye.target;return!(!Bl(bt)||bt===Ke||Ke.contains(bt)||nt(Ye))}},escapeKeydown:null,portal:Il(J,ht)}}).destroy})}));return{destroy:()=>{j(),de()}}}}),{elements:{root:x}}=rs(),{action:gt}=pa(x),Ge=tt(T("label"),{stores:[M.label,M.trigger],returned:([J,de])=>({id:J,for:de}),action:gt}),we=tt(T("option"),{stores:[Ee],returned:([J])=>de=>{const j=J(de.value);return{"data-value":JSON.stringify(de.value),"data-label":de.label,"data-disabled":ir(de.disabled),"aria-disabled":de.disabled?!0:void 0,"aria-selected":j,"data-selected":j?"":void 0,id:es(),role:"option"}},action:J=>({destroy:Kt(ft(J,"click",j=>{if(or(J)){j.preventDefault();return}Me(J),D.get()||G()}),yt(O,j=>j?Kt(ft(J,"mouseover",()=>{t.set(J)}),ft(J,"mouseleave",()=>{t.set(null)})):void 0))})}),Tt=tt(T("group"),{returned:()=>J=>({role:"group","aria-labelledby":J})}),Mt=tt(T("group-label"),{returned:()=>J=>({id:J})}),Q=yo({value:Ze([i],([J])=>{const de=Array.isArray(J)?J.map(j=>j.value):J==null?void 0:J.value;return typeof de=="string"?de:JSON.stringify(de)}),name:tl(B),required:S,prefix:e.builder}),dt=tt(T("arrow"),{stores:L,returned:J=>({"data-arrow":!0,style:bn({position:"absolute",width:`var(--arrow-size, ${J}px)`,height:`var(--arrow-size, ${J}px)`})})});return Da(()=>{if(!Lt)return;const J=document.getElementById(M.menu.get()),de=document.getElementById(M.trigger.get());if(de&&n.set(de),!J)return;const j=J.querySelector("[data-selected]");ot(j)}),yt([t],([J])=>{if(!Lt)return;const de=document.getElementById(M.menu.get());ot(de)&&vl(de).forEach(j=>{j===J?Jo(j):Go(j)})}),yt([o],([J])=>{if(!Lt)return;let de=hn;return m.get()&&J&&(de=Aa()),()=>{de()}}),{ids:M,elements:{trigger:Fe,group:Tt,option:we,menu:Je,groupLabel:Mt,label:Ge,hiddenInput:Q,arrow:dt},states:{open:o,selected:i,highlighted:a,highlightedItem:t},helpers:{isSelected:Ee,isHighlighted:he,closeMenu:G},options:f}}function yl(l,e){return l-e*Math.floor(l/e)}const Ba=1721426;function Xn(l,e,n,t){e=Yl(l,e);let r=e-1,i=-2;return n<=2?i=0:nl(e)&&(i=-1),Ba-1+365*r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400)+Math.floor((367*n-362)/12+i+t)}function nl(l){return l%4===0&&(l%100!==0||l%400===0)}function Yl(l,e){return l==="BC"?1-e:e}function fs(l){let e="AD";return l<=0&&(e="BC",l=1-l),[e,l]}const us={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class On{fromJulianDay(e){let n=e,t=n-Ba,r=Math.floor(t/146097),i=yl(t,146097),a=Math.floor(i/36524),s=yl(i,36524),o=Math.floor(s/1461),f=yl(s,1461),u=Math.floor(f/365),c=r*400+a*100+o*4+u+(a!==4&&u!==4?1:0),[d,h]=fs(c),m=n-Xn(d,h,1,1),_=2;n0&&e===ze())return new Date(l).getTimezoneOffset()*-6e4;let{year:n,month:t,day:r,hour:i,minute:a,second:s}=ja(l,e);return qa(n,t,r,i,a,s,0)-Math.floor(l/1e3)*1e3}const _r=new Map;function ja(l,e){let n=_r.get(e);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),_r.set(e,n));let t=n.formatToParts(new Date(l)),r={};for(let i of t)i.type!=="literal"&&(r[i.type]=i.value);return{year:r.era==="BC"||r.era==="B"?-r.year+1:+r.year,month:+r.month,day:+r.day,hour:r.hour==="24"?0:+r.hour,minute:+r.minute,second:+r.second}}const il=864e5;function ks(l,e){let n=on(l),t=n-qn(n-il,e),r=n-qn(n+il,e);return Ua(l,e,t,r)}function Ua(l,e,n,t){return(n===t?[n]:[n,t]).filter(i=>vs(l,e,i))}function vs(l,e,n){let t=ja(n,e);return l.year===t.year&&l.month===t.month&&l.day===t.day&&l.hour===t.hour&&l.minute===t.minute&&l.second===t.second}function qt(l,e,n="compatible"){let t=sn(l);if(e==="UTC")return on(t);if(e===ze()&&n==="compatible"){t=Ct(t,new On);let o=new Date,f=Yl(t.era,t.year);return o.setFullYear(f,t.month-1,t.day),o.setHours(t.hour,t.minute,t.second,t.millisecond),o.getTime()}let r=on(t),i=qn(r-il,e),a=qn(r+il,e),s=Ua(t,e,r-i,r-a);if(s.length===1)return s[0];if(s.length>1)switch(n){case"compatible":case"earlier":return s[0];case"later":return s[s.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(r-i,r-a);case"compatible":case"later":return Math.max(r-i,r-a);case"reject":throw new RangeError("No such absolute time found")}}function Ya(l,e,n="compatible"){return new Date(qt(l,e,n))}function jt(l,e){let n=qn(l,e),t=new Date(l+n),r=t.getUTCFullYear(),i=t.getUTCMonth()+1,a=t.getUTCDate(),s=t.getUTCHours(),o=t.getUTCMinutes(),f=t.getUTCSeconds(),u=t.getUTCMilliseconds();return new Xt(r<1?"BC":"AD",r<1?-r+1:r,i,a,e,n,s,o,f,u)}function ys(l){return new fn(l.calendar,l.era,l.year,l.month,l.day)}function sn(l,e){let n=0,t=0,r=0,i=0;if("timeZone"in l)({hour:n,minute:t,second:r,millisecond:i}=l);else if("hour"in l&&!e)return l;return e&&({hour:n,minute:t,second:r,millisecond:i}=e),new un(l.calendar,l.era,l.year,l.month,l.day,n,t,r,i)}function Ct(l,e){if(l.calendar.identifier===e.identifier)return l;let n=e.fromJulianDay(l.calendar.toJulianDay(l)),t=l.copy();return t.calendar=e,t.era=n.era,t.year=n.year,t.month=n.month,t.day=n.day,kn(t),t}function ps(l,e,n){if(l instanceof Xt)return l.timeZone===e?l:Ds(l,e);let t=qt(l,e,n);return jt(t,e)}function Cs(l){let e=on(l)-l.offset;return new Date(e)}function Ds(l,e){let n=on(l)-l.offset;return Ct(jt(n,e),l.calendar)}const Ln=36e5;function hl(l,e){let n=l.copy(),t="hour"in n?Ms(n,e):0;Al(n,e.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,l),n.month+=e.months||0,wl(n),Za(n),n.day+=(e.weeks||0)*7,n.day+=e.days||0,n.day+=t,Ss(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let r=n.calendar.getYearsInEra(n);if(n.year>r){var i,a;let o=(i=(a=n.calendar).isInverseEra)===null||i===void 0?void 0:i.call(a,n);n.year=r,n.month=o?1:n.calendar.getMonthsInYear(n),n.day=o?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let s=n.calendar.getMonthsInYear(n);return n.month>s&&(n.month=s,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Al(l,e){var n,t;!((n=(t=l.calendar).isInverseEra)===null||n===void 0)&&n.call(t,l)&&(e=-e),l.year+=e}function wl(l){for(;l.month<1;)Al(l,-1),l.month+=l.calendar.getMonthsInYear(l);let e=0;for(;l.month>(e=l.calendar.getMonthsInYear(l));)l.month-=e,Al(l,1)}function Ss(l){for(;l.day<1;)l.month--,wl(l),l.day+=l.calendar.getDaysInMonth(l);for(;l.day>l.calendar.getDaysInMonth(l);)l.day-=l.calendar.getDaysInMonth(l),l.month++,wl(l)}function Za(l){l.month=Math.max(1,Math.min(l.calendar.getMonthsInYear(l),l.month)),l.day=Math.max(1,Math.min(l.calendar.getDaysInMonth(l),l.day))}function kn(l){l.calendar.constrainDate&&l.calendar.constrainDate(l),l.year=Math.max(1,Math.min(l.calendar.getYearsInEra(l),l.year)),Za(l)}function za(l){let e={};for(let n in l)typeof l[n]=="number"&&(e[n]=-l[n]);return e}function Ha(l,e){return hl(l,za(e))}function Zl(l,e){let n=l.copy();return e.era!=null&&(n.era=e.era),e.year!=null&&(n.year=e.year),e.month!=null&&(n.month=e.month),e.day!=null&&(n.day=e.day),kn(n),n}function al(l,e){let n=l.copy();return e.hour!=null&&(n.hour=e.hour),e.minute!=null&&(n.minute=e.minute),e.second!=null&&(n.second=e.second),e.millisecond!=null&&(n.millisecond=e.millisecond),Ts(n),n}function Es(l){l.second+=Math.floor(l.millisecond/1e3),l.millisecond=$n(l.millisecond,1e3),l.minute+=Math.floor(l.second/60),l.second=$n(l.second,60),l.hour+=Math.floor(l.minute/60),l.minute=$n(l.minute,60);let e=Math.floor(l.hour/24);return l.hour=$n(l.hour,24),e}function Ts(l){l.millisecond=Math.max(0,Math.min(l.millisecond,1e3)),l.second=Math.max(0,Math.min(l.second,59)),l.minute=Math.max(0,Math.min(l.minute,59)),l.hour=Math.max(0,Math.min(l.hour,23))}function $n(l,e){let n=l%e;return n<0&&(n+=e),n}function Ms(l,e){return l.hour+=e.hours||0,l.minute+=e.minutes||0,l.second+=e.seconds||0,l.millisecond+=e.milliseconds||0,Es(l)}function zl(l,e,n,t){let r=l.copy();switch(e){case"era":{let s=l.calendar.getEras(),o=s.indexOf(l.era);if(o<0)throw new Error("Invalid era: "+l.era);o=Qt(o,n,0,s.length-1,t==null?void 0:t.round),r.era=s[o],kn(r);break}case"year":var i,a;!((i=(a=r.calendar).isInverseEra)===null||i===void 0)&&i.call(a,r)&&(n=-n),r.year=Qt(l.year,n,-1/0,9999,t==null?void 0:t.round),r.year===-1/0&&(r.year=1),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,l);break;case"month":r.month=Qt(l.month,n,1,l.calendar.getMonthsInYear(l),t==null?void 0:t.round);break;case"day":r.day=Qt(l.day,n,1,l.calendar.getDaysInMonth(l),t==null?void 0:t.round);break;default:throw new Error("Unsupported field "+e)}return l.calendar.balanceDate&&l.calendar.balanceDate(r),kn(r),r}function Ja(l,e,n,t){let r=l.copy();switch(e){case"hour":{let i=l.hour,a=0,s=23;if((t==null?void 0:t.hourCycle)===12){let o=i>=12;a=o?12:0,s=o?23:11}r.hour=Qt(i,n,a,s,t==null?void 0:t.round);break}case"minute":r.minute=Qt(l.minute,n,0,59,t==null?void 0:t.round);break;case"second":r.second=Qt(l.second,n,0,59,t==null?void 0:t.round);break;case"millisecond":r.millisecond=Qt(l.millisecond,n,0,999,t==null?void 0:t.round);break;default:throw new Error("Unsupported field "+e)}return r}function Qt(l,e,n,t,r=!1){if(r){l+=Math.sign(e),l0?l=Math.ceil(l/i)*i:l=Math.floor(l/i)*i,l>t&&(l=n)}else l+=e,lt&&(l=n+(l-t-1));return l}function Ga(l,e){let n;if(e.years!=null&&e.years!==0||e.months!=null&&e.months!==0||e.weeks!=null&&e.weeks!==0||e.days!=null&&e.days!==0){let r=hl(sn(l),{years:e.years,months:e.months,weeks:e.weeks,days:e.days});n=qt(r,l.timeZone)}else n=on(l)-l.offset;n+=e.milliseconds||0,n+=(e.seconds||0)*1e3,n+=(e.minutes||0)*6e4,n+=(e.hours||0)*36e5;let t=jt(n,l.timeZone);return Ct(t,l.calendar)}function Os(l,e){return Ga(l,za(e))}function Ps(l,e,n,t){switch(e){case"hour":{let r=0,i=23;if((t==null?void 0:t.hourCycle)===12){let m=l.hour>=12;r=m?12:0,i=m?23:11}let a=sn(l),s=Ct(al(a,{hour:r}),new On),o=[qt(s,l.timeZone,"earlier"),qt(s,l.timeZone,"later")].filter(m=>jt(m,l.timeZone).day===s.day)[0],f=Ct(al(a,{hour:i}),new On),u=[qt(f,l.timeZone,"earlier"),qt(f,l.timeZone,"later")].filter(m=>jt(m,l.timeZone).day===f.day).pop(),c=on(l)-l.offset,d=Math.floor(c/Ln),h=c%Ln;return c=Qt(d,n,Math.floor(o/Ln),Math.floor(u/Ln),t==null?void 0:t.round)*Ln+h,Ct(jt(c,l.timeZone),l.calendar)}case"minute":case"second":case"millisecond":return Ja(l,e,n,t);case"era":case"year":case"month":case"day":{let r=zl(sn(l),e,n,t),i=qt(r,l.timeZone);return Ct(jt(i,l.timeZone),l.calendar)}default:throw new Error("Unsupported field "+e)}}function Is(l,e,n){let t=sn(l),r=al(Zl(t,e),e);if(r.compare(t)===0)return l;let i=qt(r,l.timeZone,n);return Ct(jt(i,l.timeZone),l.calendar)}const As=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,ws=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Ls=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?)?\[(.*?)\]$/;function Ns(l){let e=l.match(As);if(!e)throw new Error("Invalid ISO 8601 date string: "+l);let n=new fn(et(e[1],0,9999),et(e[2],1,12),1);return n.day=et(e[3],0,n.calendar.getDaysInMonth(n)),n}function Rs(l){let e=l.match(ws);if(!e)throw new Error("Invalid ISO 8601 date time string: "+l);let n=et(e[1],-9999,9999),t=n<1?"BC":"AD",r=new un(t,n<1?-n+1:n,et(e[2],1,12),1,e[4]?et(e[4],0,23):0,e[5]?et(e[5],0,59):0,e[6]?et(e[6],0,59):0,e[7]?et(e[7],0,1/0)*1e3:0);return r.day=et(e[3],0,r.calendar.getDaysInMonth(r)),r}function Vs(l,e){let n=l.match(Ls);if(!n)throw new Error("Invalid ISO 8601 date time string: "+l);let t=et(n[1],-9999,9999),r=t<1?"BC":"AD",i=new Xt(r,t<1?-t+1:t,et(n[2],1,12),1,n[10],0,n[4]?et(n[4],0,23):0,n[5]?et(n[5],0,59):0,n[6]?et(n[6],0,59):0,n[7]?et(n[7],0,1/0)*1e3:0);i.day=et(n[3],0,i.calendar.getDaysInMonth(i));let a=sn(i),s;if(n[8]){var o;if(i.offset=et(n[8],-23,23)*36e5+et((o=n[9])!==null&&o!==void 0?o:"0",0,59)*6e4,s=on(i)-i.offset,!ks(a,i.timeZone).includes(s))throw new Error(`Offset ${Qa(i.offset)} is invalid for ${Hl(i)} in ${i.timeZone}`)}else s=qt(sn(a),i.timeZone,e);return jt(s,i.timeZone)}function et(l,e,n){let t=Number(l);if(tn)throw new RangeError(`Value out of range: ${e} <= ${t} <= ${n}`);return t}function Bs(l){return`${String(l.hour).padStart(2,"0")}:${String(l.minute).padStart(2,"0")}:${String(l.second).padStart(2,"0")}${l.millisecond?String(l.millisecond/1e3).slice(1):""}`}function Ka(l){let e=Ct(l,new On),n;return e.era==="BC"?n=e.year===1?"0000":"-"+String(Math.abs(1-e.year)).padStart(6,"00"):n=String(e.year).padStart(4,"0"),`${n}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`}function Hl(l){return`${Ka(l)}T${Bs(l)}`}function Qa(l){let e=Math.sign(l)<0?"-":"+";l=Math.abs(l);let n=Math.floor(l/36e5),t=l%36e5/6e4;return`${e}${String(n).padStart(2,"0")}:${String(t).padStart(2,"0")}`}function Fs(l){return`${Hl(l)}${Qa(l.offset)}[${l.timeZone}]`}function Ws(l,e){if(e.has(l))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jl(l,e,n){Ws(l,e),e.set(l,n)}function Gl(l){let e=typeof l[0]=="object"?l.shift():new On,n;if(typeof l[0]=="string")n=l.shift();else{let a=e.getEras();n=a[a.length-1]}let t=l.shift(),r=l.shift(),i=l.shift();return[e,n,t,r,i]}var qs=new WeakMap;class fn{copy(){return this.era?new fn(this.calendar,this.era,this.year,this.month,this.day):new fn(this.calendar,this.year,this.month,this.day)}add(e){return hl(this,e)}subtract(e){return Ha(this,e)}set(e){return Zl(this,e)}cycle(e,n,t){return zl(this,e,n,t)}toDate(e){return Ya(this,e)}toString(){return Ka(this)}compare(e){return Wa(this,e)}constructor(...e){Jl(this,qs,{writable:!0,value:void 0});let[n,t,r,i,a]=Gl(e);this.calendar=n,this.era=t,this.year=r,this.month=i,this.day=a,kn(this)}}var js=new WeakMap;class un{copy(){return this.era?new un(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new un(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return hl(this,e)}subtract(e){return Ha(this,e)}set(e){return Zl(al(this,e),e)}cycle(e,n,t){switch(e){case"era":case"year":case"month":case"day":return zl(this,e,n,t);default:return Ja(this,e,n,t)}}toDate(e,n){return Ya(this,e,n)}toString(){return Hl(this)}compare(e){let n=Wa(this,e);return n===0?_s(this,sn(e)):n}constructor(...e){Jl(this,js,{writable:!0,value:void 0});let[n,t,r,i,a]=Gl(e);this.calendar=n,this.era=t,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,kn(this)}}var Us=new WeakMap;class Xt{copy(){return this.era?new Xt(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Xt(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return Ga(this,e)}subtract(e){return Os(this,e)}set(e,n){return Is(this,e,n)}cycle(e,n,t){return Ps(this,e,n,t)}toDate(){return Cs(this)}toString(){return Fs(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-ps(e,this.timeZone).toDate().getTime()}constructor(...e){Jl(this,Us,{writable:!0,value:void 0});let[n,t,r,i,a]=Gl(e),s=e.shift(),o=e.shift();this.calendar=n,this.era=t,this.year=r,this.month=i,this.day=a,this.timeZone=s,this.offset=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,kn(this)}}let Cl=new Map;class It{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(e,n);if(n= start date");return`${this.formatter.format(e)} – ${this.formatter.format(n)}`}formatRangeToParts(e,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(e,n);if(n= start date");let t=this.formatter.formatToParts(e),r=this.formatter.formatToParts(n);return[...t.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return zs()&&(this.resolvedHourCycle||(this.resolvedHourCycle=Hs(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),e.calendar==="ethiopic-amete-alem"&&(e.calendar="ethioaa"),e}constructor(e,n={}){this.formatter=Xa(e,n),this.options=n}}const Ys={true:{ja:"h11"},false:{}};function Xa(l,e={}){if(typeof e.hour12=="boolean"&&Zs()){e={...e};let r=Ys[String(e.hour12)][l.split("-")[0]],i=e.hour12?"h12":"h23";e.hourCycle=r??i,delete e.hour12}let n=l+(e?Object.entries(e).sort((r,i)=>r[0]i.type==="hour").value,10),r=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(t===0&&r===23)return"h23";if(t===24&&r===23)return"h24";if(t===0&&r===11)return"h11";if(t===12&&r===11)return"h12";throw new Error("Unexpected hour cycle result")}const Js={defaultValue:void 0,defaultPlaceholder:void 0,granularity:"day"};function Gs(l){const e={...Js,...l},{defaultValue:n,defaultPlaceholder:t,granularity:r}=e;if(Array.isArray(n)&&n.length)return n[n.length-1];if(n&&!Array.isArray(n))return n;if(t)return t;{const i=new Date,a=i.getFullYear(),s=i.getMonth()+1,o=i.getDate();return["hour","minute","second"].includes(r??"day")?new un(a,s,o,0,0,0):new fn(a,s,o)}}function Vn(l,e){let n;return e instanceof Xt?n=Vs(l):e instanceof un?n=Rs(l):n=Ns(l),n.calendar!==e.calendar?Ct(n,e.calendar):n}function Ht(l,e=ze()){return l instanceof Xt?l.toDate():l.toDate(e)}function Ks(l){return l instanceof un}function xa(l){return l instanceof Xt}function Qs(l){return Ks(l)||xa(l)}function Xs(l){if(l instanceof Date){const e=l.getFullYear(),n=l.getMonth()+1;return new Date(e,n,0).getDate()}else return l.set({day:100}).day}function pn(l,e){return l.compare(e)<0}function El(l,e){return l.compare(e)>0}function xs(l,e){return l.compare(e)<=0}function $s(l,e){return l.compare(e)>=0}function gr(l,e,n){return $s(l,e)&&xs(l,n)}function ef(l,e,n){const t=Fa(l,n);return e>t?l.subtract({days:t+7-e}):e===t?l:l.subtract({days:t-e})}function tf(l,e,n){const t=Fa(l,n),r=e===0?6:e-1;return t===r?l:t>r?l.add({days:7-t+r}):l.add({days:r-t})}function nf(l,e,n,t){if(n===void 0&&t===void 0)return!0;let r=l.add({days:1});if(t!=null&&t(r)||n!=null&&n(r))return!1;const i=e;for(;r.compare(i)<0;)if(r=r.add({days:1}),t!=null&&t(r)||n!=null&&n(r))return!1;return!0}function lf(l){let e=l;function n(m){e=m}function t(){return e}function r(m,_){return new It(e,_).format(m)}function i(m,_=!0){return Qs(m)&&_?r(Ht(m),{dateStyle:"long",timeStyle:"long"}):r(Ht(m),{dateStyle:"long"})}function a(m){return new It(e,{month:"long",year:"numeric"}).format(m)}function s(m){return new It(e,{month:"long"}).format(m)}function o(m){return new It(e,{year:"numeric"}).format(m)}function f(m,_){return xa(m)?new It(e,{..._,timeZone:m.timeZone}).formatToParts(Ht(m)):new It(e,_).formatToParts(Ht(m))}function u(m,_="narrow"){return new It(e,{weekday:_}).format(m)}function c(m){var p;return((p=new It(e,{hour:"numeric",minute:"numeric"}).formatToParts(m).find(D=>D.type==="dayPeriod"))==null?void 0:p.value)==="PM"?"PM":"AM"}const d={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};function h(m,_,y={}){const p={...d,...y},L=f(m,p).find(N=>N.type===_);return L?L.value:""}return{setLocale:n,getLocale:t,fullMonth:s,fullYear:o,fullMonthAndYear:a,toParts:f,custom:r,part:h,dayPeriod:c,selectedDate:i,dayOfWeek:u}}function rf(l,e){const{set:n,update:t,subscribe:r,get:i}=rt(l);function a(h){t(m=>m.add(h))}function s(h){t(m=>m.set({day:1}).add({months:h}))}function o(h){t(m=>m.set({day:1}).subtract({months:h}))}function f(h){t(m=>m.subtract(h))}function u(h,m){if(m){t(_=>_.set(h,m));return}t(_=>_.set(h))}function c(){t(()=>e)}function d(){return{set:n,subscribe:r,update:t,get:i}}return{get:i,set:n,update:t,subscribe:r,add:a,subtract:f,setDate:u,reset:c,toWritable:d,nextPage:s,prevPage:o}}function af(){if(!Lt)return null;let l=document.querySelector("[data-melt-announcer]");if(!ot(l)){const t=document.createElement("div");t.style.cssText=bn({border:"0px",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute","white-space":"nowrap",width:"1px"}),t.setAttribute("data-melt-announcer",""),t.appendChild(e("assertive")),t.appendChild(e("polite")),l=t,document.body.insertBefore(l,document.body.firstChild)}function e(t){const r=document.createElement("div");return r.role="log",r.ariaLive=t,r.setAttribute("aria-relevant","additions"),r}function n(t){if(!ot(l))return null;const r=l.querySelector(`[aria-live="${t}"]`);return ot(r)?r:null}return{getLog:n}}function br(){const l=af();function e(n,t="assertive",r=7500){if(!l||!Lt)return;const i=l.getLog(t),a=document.createElement("div");return typeof n=="number"?n=n.toString():n===null?n="Empty":n=n.trim(),a.innerText=n,t==="assertive"?i==null||i.replaceChildren(a):i==null||i.appendChild(a),setTimeout(()=>{a.remove()},r)}return{announce:e}}function of(l){return!(!ot(l)||!l.hasAttribute("data-melt-calendar-cell"))}function kr(l,e){const n=[];let t=l.add({days:1});const r=e;for(;t.compare(r)<0;)n.push(t),t=t.add({days:1});return n}function Tl(l){const{dateObj:e,weekStartsOn:n,fixedWeeks:t,locale:r}=l,i=Xs(e),a=Array.from({length:i},(y,p)=>e.set({day:p+1})),s=zt(e),o=dn(e),f=ef(s,n,r),u=tf(o,n,r),c=kr(f.subtract({days:1}),s),d=kr(o,u.add({days:1})),h=c.length+a.length+d.length;if(t&&h<42){const y=42-h;let p=d[d.length-1];p||(p=e.add({months:1}).set({day:1}));const D=Array.from({length:y},(L,N)=>{const S=N+1;return p.add({days:S})});d.push(...D)}const m=c.concat(a,d),_=Qo(m,7);return{value:e,dates:m,weeks:_}}function Nn(l){const{numberOfMonths:e,dateObj:n,...t}=l,r=[];if(!e||e===1)return r.push(Tl({...t,dateObj:n})),r;r.push(Tl({...t,dateObj:n}));for(let i=1;iot(t)):[]}function vr(l,e){const n=l.getAttribute("data-value");n&&e.set(Vn(n,pa(e)))}const sf={positioning:{placement:"bottom"},arrowSize:8,defaultOpen:!1,disableFocusTrap:!1,closeOnEscape:!0,preventScroll:!1,onOpenChange:void 0,closeOnOutsideClick:!0,portal:void 0,forceVisible:!1,openFocus:void 0,closeFocus:void 0,onOutsideClick:void 0},{name:Rn}=Wl("popover"),ff=["trigger","content"];function uf(l){const e={...sf,...l},n=Mn(Fl(e,"open","ids")),{positioning:t,arrowSize:r,disableFocusTrap:i,preventScroll:a,closeOnEscape:s,closeOnOutsideClick:o,portal:f,forceVisible:u,openFocus:c,closeFocus:d,onOutsideClick:h}=n,m=e.open??st(e.defaultOpen),_=Wn(m,e==null?void 0:e.onOpenChange),y=rt.writable(null),p=Mn({...Ul(ff),...e.ids});Da(()=>{y.set(document.getElementById(p.trigger.get()))});function D(){_.set(!1);const g=document.getElementById(p.trigger.get());ur({prop:d.get(),defaultEl:g})}const L=Pa({open:_,activeTrigger:y,forceVisible:u}),N=tt(Rn("content"),{stores:[L,f,p.content],returned:([g,M,P])=>({hidden:g&&Lt?void 0:!0,tabindex:-1,style:bn({display:g?void 0:"none"}),id:P,"data-state":g?"open":"closed","data-portal":Co(M)}),action:g=>{let M=hn;const P=yt([L,y,t,i,s,o,f],([te,Ie,Me,Pe,G,Se,Ee])=>{M(),!(!te||!Ie)&&gn().then(()=>{M(),M=Ia(g,{anchorElement:Ie,open:_,options:{floating:Me,focusTrap:Pe?null:{returnFocusOnDeactivate:!1,clickOutsideDeactivates:Se,allowOutsideClick:!0,escapeDeactivates:G},modal:{shouldCloseOnInteractOutside:K,onClose:D,open:te,closeOnInteractOutside:Se},escapeKeydown:G?{handler:()=>{D()}}:null,portal:Il(g,Ee)}}).destroy})});return{destroy(){P(),M()}}}});function S(g){_.update(M=>!M),g&&g!==y.get()&&y.set(g)}function K(g){var te;if((te=h.get())==null||te(g),g.defaultPrevented)return!1;const M=g.target,P=document.getElementById(p.trigger.get());return!(P&&Bl(M)&&(M===P||P.contains(M)))}const B=tt(Rn("trigger"),{stores:[L,p.content,p.trigger],returned:([g,M,P])=>({role:"button","aria-haspopup":"dialog","aria-expanded":g?"true":"false","data-state":yr(g),"aria-controls":M,id:P}),action:g=>({destroy:Kt(ft(g,"click",()=>{S(g)}),ft(g,"keydown",P=>{P.key!==pe.ENTER&&P.key!==pe.SPACE||(P.preventDefault(),S(g))}))})}),O=tt(Rn("overlay"),{stores:[L],returned:([g])=>({hidden:g?void 0:!0,tabindex:-1,style:bn({display:g?void 0:"none"}),"aria-hidden":"true","data-state":yr(g)}),action:g=>{let M=hn,P=hn,te=hn;if(s.get()){const Ie=Ca(g,{handler:()=>{D()}});Ie&&Ie.destroy&&(M=Ie.destroy)}return P=yt([f],([Ie])=>{if(te(),Ie===null)return;const Me=Il(g,Ie);Me!==null&&(te=Xo(g,Me).destroy)}),{destroy(){M(),P(),te()}}}}),E=tt(Rn("arrow"),{stores:r,returned:g=>({"data-arrow":!0,style:bn({position:"absolute",width:`var(--arrow-size, ${g}px)`,height:`var(--arrow-size, ${g}px)`})})}),T=tt(Rn("close"),{returned:()=>({type:"button"}),action:g=>({destroy:Kt(ft(g,"click",P=>{P.defaultPrevented||D()}),ft(g,"keydown",P=>{P.defaultPrevented||P.key!==pe.ENTER&&P.key!==pe.SPACE||(P.preventDefault(),S())}))})});return yt([_,y,a],([g,M,P])=>{if(!Lt)return;const te=[];if(g){M||gn().then(()=>{const Me=document.getElementById(p.trigger.get());ot(Me)&&y.set(Me)}),P&&te.push(Aa());const Ie=M??document.getElementById(p.trigger.get());ur({prop:c.get(),defaultEl:Ie})}return()=>{te.forEach(Ie=>Ie())}}),{ids:p,elements:{trigger:B,content:N,arrow:E,close:T,overlay:O},states:{open:_},options:n}}function yr(l){return l?"open":"closed"}const cf={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,defaultValue:{start:void 0,end:void 0},preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"},{name:Cn}=Wl("calendar"),df=["calendar","accessibleHeading"];function hf(l){var xt,vn,yn;const e={...cf,...l},n=Mn({...Fl(e,"value","placeholder")}),{preventDeselect:t,numberOfMonths:r,pagedNavigation:i,weekStartsOn:a,fixedWeeks:s,calendarLabel:o,locale:f,minValue:u,maxValue:c,disabled:d,readonly:h,weekdayFormat:m}=n,_=Mn({...Ul(df),...e.ids}),y=Gs({defaultValue:(xt=e.defaultValue)==null?void 0:xt.start,defaultPlaceholder:e.defaultPlaceholder}),p=lf(f.get()),D=e.value??st(e.defaultValue),L=Wn(D,e.onValueChange);L.get()||L.set(e.defaultValue);const N=rt(st(L.get().start??((vn=e.defaultValue)==null?void 0:vn.start))),S=rt(st(L.get().end??((yn=e.defaultValue)==null?void 0:yn.end))),K=e.placeholder??st(e.defaultPlaceholder??y),B=rf(Wn(K,e.onPlaceholderChange),e.defaultPlaceholder??y),O=rt(st(null)),E=rt(st(null)),T=rt(st(Nn({dateObj:B.get(),weekStartsOn:e.weekStartsOn,locale:e.locale,fixedWeeks:e.fixedWeeks,numberOfMonths:e.numberOfMonths}))),g=rt(Ze([T],([A])=>A.map(W=>W.value))),M=rt(Ze([g],([A])=>W=>!A.some(ee=>xn(W,ee)))),P=rt(Ze([n.isDateDisabled,u,c],([A,W,ee])=>le=>!!(A!=null&&A(le)||W&&pn(le,W)||ee&&El(le,ee)))),te=rt(Ze([n.isDateUnavailable],([A])=>W=>!!(A!=null&&A(W)))),Ie=Ze([N,te,P],([A,W,ee])=>A?W(A)||ee(A):!1),Me=Ze([S,te,P],([A,W,ee])=>A?W(A)||ee(A):!1),Pe=Ze([N,S,Me,Ie],([A,W,ee,le])=>!!(le||ee||W&&A&&pn(W,A))),G=rt.derived([T,c,d],([A,W,ee])=>{if(!W||!A.length)return!1;if(ee)return!0;const Be=A[A.length-1].value.add({months:1}).set({day:1});return El(Be,W)}),Se=rt.derived([T,u,d],([A,W,ee])=>{if(!W||!A.length)return!1;if(ee)return!0;const Be=A[0].value.subtract({months:1}).set({day:35});return pn(Be,W)});let Ee=br();const he=rt.derived([T,f],([A,W])=>{if(!A.length)return"";if(W!==p.getLocale()&&p.setLocale(W),A.length===1){const vt=Ht(A[0].value);return`${p.fullMonthAndYear(vt)}`}const ee=Ht(A[0].value),le=Ht(A[A.length-1].value),Be=p.fullMonth(ee),qe=p.fullMonth(le),je=p.fullYear(ee),Qe=p.fullYear(le);return je===Qe?`${Be} - ${qe} ${Qe}`:`${Be} ${je} - ${qe} ${Qe}`}),Fe=rt.derived([he,o],([A,W])=>`${W}, ${A}`),Je=tt(Cn(),{stores:[Fe,Pe,_.calendar,d,h],returned:([A,W,ee,le,Be])=>({id:ee,role:"application","aria-label":A,"data-invalid":W?"":void 0,"data-disabled":le?"":void 0,"data-readonly":Be?"":void 0}),action:A=>{j(A,Fe.get()),Ee=br();const W=ft(A,"keydown",Bt);return{destroy(){W()}}}}),x=tt(Cn("heading"),{stores:[d],returned:([A])=>({"aria-hidden":!0,"data-disabled":A?"":void 0})}),gt=tt(Cn("grid"),{stores:[h,d],returned:([A,W])=>({tabindex:-1,role:"grid","aria-readonly":A?"true":void 0,"aria-disabled":W?"true":void 0,"data-readonly":A?"":void 0,"data-disabled":W?"":void 0})}),Ge=tt(Cn("prevButton"),{stores:[Se],returned:([A])=>{const W=A;return{role:"button",type:"button","aria-label":"Previous","aria-disabled":W?"true":void 0,disabled:W?!0:void 0,"data-disabled":W?"":void 0}},action:A=>({destroy:Kt(ft(A,"click",()=>{ht()}))})}),we=tt(Cn("nextButton"),{stores:[G],returned:([A])=>{const W=A;return{role:"button",type:"button","aria-label":"Next","aria-disabled":W?"true":void 0,disabled:W?!0:void 0,"data-disabled":W?"":void 0}},action:A=>({destroy:Kt(ft(A,"click",()=>{Ue()}))})}),Tt=Ze([N],([A])=>W=>A?Ft(A,W):!1),Mt=Ze([S],([A])=>W=>A?Ft(A,W):!1),Q=Ze([N,S],([A,W])=>ee=>A&&Ft(A,ee)||W&&Ft(W,ee)?!0:W&&A?gr(ee,A,W):!1),dt=rt.derived([N,S,O,P,te],([A,W,ee,le,Be])=>{if(A&&W||!A||!ee)return null;const qe=pn(A,ee),je=qe?A:ee,Qe=qe?ee:A;return Ft(je.add({days:1}),Qe)?{start:je,end:Qe}:nf(je,Qe,Be,le)?{start:je,end:Qe}:null}),J=tt(Cn("cell"),{stores:[Q,Mt,Tt,dt,P,te,B,M],returned:([A,W,ee,le,Be,qe,je,Qe])=>(Xe,vt)=>{const Zt=Ht(Xe),H=Be(Xe),$e=qe(Xe),Ot=ds(Xe,ze()),Dt=!xn(Xe,vt),xl=Ft(Xe,je),io=Qe(Xe),$l=A(Xe),ao=ee(Xe),oo=W(Xe),so=le?gr(Xe,le.start,le.end):!1;return{role:"button","aria-label":p.custom(Zt,{weekday:"long",month:"long",day:"numeric",year:"numeric"}),"aria-selected":$l?!0:void 0,"aria-disabled":Dt||H||$e?!0:void 0,"data-selected":$l?!0:void 0,"data-selection-start":ao?!0:void 0,"data-selection-end":oo?!0:void 0,"data-value":Xe.toString(),"data-disabled":H||Dt?"":void 0,"data-unavailable":$e?"":void 0,"data-today":Ot?"":void 0,"data-outside-month":Dt?"":void 0,"data-outside-visible-months":io?"":void 0,"data-focused":xl?"":void 0,"data-highlighted":so?"":void 0,tabindex:xl?0:Dt||H?void 0:-1}},action:A=>{const W=()=>{const le=A.getAttribute("data-value"),Be=A.getAttribute("data-label"),qe=A.hasAttribute("data-disabled");return{value:le,label:Be??A.textContent??null,disabled:!!qe}};return{destroy:Kt(ft(A,"click",le=>{const Be=W();Be.disabled||Be.value&&bt(le,Vn(Be.value,B.get()))}),ft(A,"mouseenter",()=>{const le=W();le.disabled||le.value&&O.set(Vn(le.value,B.get()))}),ft(A,"focusin",()=>{const le=W();le.disabled||le.value&&O.set(Vn(le.value,B.get()))}))}}});yt([f],([A])=>{p.getLocale()!==A&&p.setLocale(A)}),yt([B],([A])=>{if(!Lt||!A||g.get().some(Qe=>xn(Qe,A)))return;const ee=a.get(),le=f.get(),Be=s.get(),qe=r.get(),je={weekStartsOn:ee,locale:le,fixedWeeks:Be,numberOfMonths:qe};T.set(Nn({...je,dateObj:A}))}),yt([a,f,s,r],([A,W,ee,le])=>{const Be=B.get();if(!Lt||!Be)return;const qe={weekStartsOn:A,locale:W,fixedWeeks:ee,numberOfMonths:le};T.set(Nn({...qe,dateObj:Be}))}),yt([Fe],([A])=>{if(!Lt)return;const W=document.getElementById(_.accessibleHeading.get());ot(W)&&(W.textContent=A)}),yt([N],([A])=>{A&&B.get()!==A&&B.set(A)});const de=Ze([T,m,f],([A,W,ee])=>A.length?A[0].weeks[0].map(le=>p.dayOfWeek(Ht(le),W)):[]);function j(A,W){if(!Lt)return;const ee=document.createElement("div");ee.style.cssText=bn({border:"0px",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0px",position:"absolute","white-space":"nowrap",width:"1px"});const le=document.createElement("div");le.textContent=W,le.id=_.accessibleHeading.get(),le.role="heading",le.ariaLevel="2",A.insertBefore(ee,A.firstChild),ee.appendChild(le)}function Ue(){const A=T.get(),W=r.get();if(i.get()){const ee=A[0].value;B.set(ee.add({months:W}))}else{const ee=A[0].value,le=Nn({dateObj:ee.add({months:1}),weekStartsOn:a.get(),locale:f.get(),fixedWeeks:s.get(),numberOfMonths:W});T.set(le),B.set(le[0].value.set({day:1}))}}function ht(){const A=T.get(),W=r.get();if(i.get()){const ee=A[0].value;B.set(ee.subtract({months:W}))}else{const ee=A[0].value,le=Nn({dateObj:ee.subtract({months:1}),weekStartsOn:a.get(),locale:f.get(),fixedWeeks:s.get(),numberOfMonths:W});T.set(le),B.set(le[0].value.set({day:1}))}}function Re(){B.add({years:1})}function Vt(){B.subtract({years:1})}const Ke=[pe.ARROW_DOWN,pe.ARROW_UP,pe.ARROW_LEFT,pe.ARROW_RIGHT];function nt(A){B.setDate({year:A})}function Ye(A){if(A<0||A>11)throw new Error("Month must be between 0 and 11");B.setDate({month:A})}function bt(A,W){const ee=P.get(),le=te.get();if(ee(W)||le(W))return;const Be=E.get();E.set(W);const qe=N.get(),je=S.get(),Qe=dt.get();if(qe&&Qe===null){if(Ft(qe,W)&&!t.get()&&!je){N.set(void 0),B.set(W),Ee.announce("Selected date is now empty.","polite");return}else if(!je){A.preventDefault(),Be&&Ft(Be,W)&&(N.set(W),Ee.announce(`Selected Date: ${p.selectedDate(W,!1)}`,"polite"));return}}if(qe&&je&&Ft(je,W)&&!t.get()){N.set(void 0),S.set(void 0),B.set(W),Ee.announce("Selected date is now empty.","polite");return}qe?je?je&&qe&&(S.set(void 0),N.update(()=>(Ee.announce(`Selected Date: ${p.selectedDate(W,!1)}`,"polite"),W))):S.update(()=>(Ee.announce(`Selected Dates: ${p.selectedDate(qe,!1)} to ${p.selectedDate(W,!1)}`,"polite"),W)):N.update(()=>(Ee.announce(`Selected Date: ${p.selectedDate(W,!1)}`,"polite"),W))}const mt=[pe.ENTER,pe.SPACE];function Bt(A){const W=A.target;if(of(W)&&!(!Ke.includes(A.key)&&!mt.includes(A.key))&&(A.preventDefault(),A.key===pe.ARROW_DOWN&&Yt(W,7),A.key===pe.ARROW_UP&&Yt(W,-7),A.key===pe.ARROW_LEFT&&Yt(W,-1),A.key===pe.ARROW_RIGHT&&Yt(W,1),A.key===pe.SPACE||A.key===pe.ENTER)){const ee=W.getAttribute("data-value");if(!ee)return;bt(A,Vn(ee,B.get()))}}function Yt(A,W){const ee=_.calendar.get(),le=Ml(ee);if(!le.length)return;const qe=le.indexOf(A)+W;if(kl(qe,le)){const je=le[qe];return vr(je,B),je.focus()}if(qe<0){if(Se.get())return;const Qe=T.get()[0].value,Xe=r.get();B.set(Qe.subtract({months:Xe})),gn().then(()=>{const vt=Ml(ee);if(!vt.length)return;const Zt=vt.length-Math.abs(qe);if(kl(Zt,vt)){const H=vt[Zt];return vr(H,B),H.focus()}})}if(qe>=le.length){if(G.get())return;const Qe=T.get()[0].value,Xe=r.get();B.set(Qe.add({months:Xe})),gn().then(()=>{const vt=Ml(ee);if(!vt.length)return;const Zt=qe-le.length;if(kl(Zt,vt))return vt[Zt].focus()})}}const kt=Ze([P,B,u,c],([A,W,ee,le])=>Be=>!!(A(Be)||ee&&pn(Be,ee)||le&&El(Be,le)||!xn(Be,W)));return yt([L],([A])=>{const W=N.get(),ee=S.get();if(A!=null&&A.start&&(A!=null&&A.end)){A.start!==W&&N.set(A.start),A.end!==ee&&S.set(A.end);return}}),yt([N,S],([A,W])=>{const ee=L.get();ee&&(ee==null?void 0:ee.start)===A&&(ee==null?void 0:ee.end)===W||(A&&W?L.update(le=>(le==null?void 0:le.start)===A&&(le==null?void 0:le.end)===W?le:pn(W,A)?{start:W,end:A}:{start:A,end:W}):ee&&ee.start&&ee.end&&L.set({start:void 0,end:void 0}))}),{elements:{calendar:Je,heading:x,grid:gt,cell:J,nextButton:we,prevButton:Ge},states:{placeholder:B.toWritable(),months:T,weekdays:de,headingValue:he,value:L,startValue:N,endValue:S},helpers:{nextPage:Ue,prevPage:ht,nextYear:Re,prevYear:Vt,setYear:nt,setMonth:Ye,isDateDisabled:kt,isDateUnavailable:te},options:n,ids:_}}function mf(l){const e=ss({...l,builder:"select"}),n=Ze(e.states.selected,t=>Array.isArray(t)?t.map(r=>r.label).join(", "):(t==null?void 0:t.label)??"");return{...e,elements:{...e.elements},states:{...e.states,selectedLabel:n}}}const _f=typeof document<"u";function gf(l){if(!_f)return;const e=l.querySelector("[data-selected]");if(e)return Ol(e);const n=l.querySelector("[data-today]");if(n)return Ol(n);const t=l.querySelector("[data-calendar-date]");if(t)return Ol(t)}function Ol(l){const e={x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop};l.focus(),window.scrollTo(e.x,e.y)}function bf(){return{NAME:"separator",PARTS:["root"]}}function kf(l){const{NAME:e,PARTS:n}=bf(),t=ul(e,n),r={...xo(cl(l)),getAttrs:t};return{...r,updateOption:dl(r.options)}}const vf=l=>({builder:l&4}),pr=l=>({builder:l[2]});function yf(l){let e,n,t,r=[l[2],l[4]],i={};for(let a=0;a{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Df(l,e,n){let t;const r=["orientation","decorative","asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{orientation:f="horizontal"}=e,{decorative:u=!0}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{elements:{root:h},updateOption:m,getAttrs:_}=kf({orientation:f,decorative:u});Oe(l,h,D=>n(7,a=D));const y=_("root");function p(D){Le[D?"unshift":"push"](()=>{d=D,n(0,d)})}return l.$$set=D=>{e=w(w({},e),Te(D)),n(4,i=$(e,r)),"orientation"in D&&n(5,f=D.orientation),"decorative"in D&&n(6,u=D.decorative),"asChild"in D&&n(1,c=D.asChild),"el"in D&&n(0,d=D.el),"$$scope"in D&&n(8,o=D.$$scope)},l.$$.update=()=>{l.$$.dirty&32&&m("orientation",f),l.$$.dirty&64&&m("decorative",u),l.$$.dirty&128&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,y)},[d,c,t,h,i,f,u,a,o,s,p]}let Sf=class extends _e{constructor(e){super(),ge(this,e,Df,Cf,me,{orientation:5,decorative:6,asChild:1,el:0})}};function $a(){return{NAME:"popover",PARTS:["arrow","close","content","trigger"]}}function Ef(l){const{NAME:e,PARTS:n}=$a(),t=ul(e,n),r={...uf({positioning:{placement:"bottom",gutter:0},...cl(l),forceVisible:!0}),getAttrs:t};return Hn(e,r),{...r,updateOption:dl(r.options)}}function Kl(){const{NAME:l}=$a();return Jn(l)}function Tf(l){const n={...{side:"bottom",align:"center"},...l},{options:{positioning:t}}=Kl();wa(t)(n)}const Mf=l=>({ids:l&1}),Cr=l=>({ids:l[0]});function Of(l){let e;const n=l[13].default,t=re(n,l,l[12],Cr);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,[i]){t&&t.p&&(!e||i&4097)&&ie(t,n,r,r[12],e?oe(n,r[12],i,Mf):ae(r[12]),Cr)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Pf(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{disableFocusTrap:a=void 0}=e,{closeOnEscape:s=void 0}=e,{closeOnOutsideClick:o=void 0}=e,{preventScroll:f=void 0}=e,{portal:u=void 0}=e,{open:c=void 0}=e,{onOpenChange:d=void 0}=e,{openFocus:h=void 0}=e,{closeFocus:m=void 0}=e,{onOutsideClick:_=void 0}=e;const{updateOption:y,states:{open:p},ids:D}=Ef({disableFocusTrap:a,closeOnEscape:s,closeOnOutsideClick:o,preventScroll:f,portal:u,defaultOpen:c,openFocus:h,closeFocus:m,onOutsideClick:_,onOpenChange:({next:N})=>(c!==N&&(d==null||d(N),n(2,c=N)),N),positioning:{gutter:0,offset:{mainAxis:1}}}),L=Ze([D.content,D.trigger],([N,S])=>({content:N,trigger:S}));return Oe(l,L,N=>n(0,t=N)),l.$$set=N=>{"disableFocusTrap"in N&&n(3,a=N.disableFocusTrap),"closeOnEscape"in N&&n(4,s=N.closeOnEscape),"closeOnOutsideClick"in N&&n(5,o=N.closeOnOutsideClick),"preventScroll"in N&&n(6,f=N.preventScroll),"portal"in N&&n(7,u=N.portal),"open"in N&&n(2,c=N.open),"onOpenChange"in N&&n(8,d=N.onOpenChange),"openFocus"in N&&n(9,h=N.openFocus),"closeFocus"in N&&n(10,m=N.closeFocus),"onOutsideClick"in N&&n(11,_=N.onOutsideClick),"$$scope"in N&&n(12,i=N.$$scope)},l.$$.update=()=>{l.$$.dirty&4&&c!==void 0&&p.set(c),l.$$.dirty&8&&y("disableFocusTrap",a),l.$$.dirty&16&&y("closeOnEscape",s),l.$$.dirty&32&&y("closeOnOutsideClick",o),l.$$.dirty&64&&y("preventScroll",f),l.$$.dirty&128&&y("portal",u),l.$$.dirty&512&&y("openFocus",h),l.$$.dirty&1024&&y("closeFocus",m),l.$$.dirty&2048&&y("onOutsideClick",_)},[t,L,c,a,s,o,f,u,d,h,m,_,i,r]}class If extends _e{constructor(e){super(),ge(this,e,Pf,Of,me,{disableFocusTrap:3,closeOnEscape:4,closeOnOutsideClick:5,preventScroll:6,portal:7,open:2,onOpenChange:8,openFocus:9,closeFocus:10,onOutsideClick:11})}}const Af=l=>({builder:l[0]&256}),Dr=l=>({builder:l[8]}),wf=l=>({builder:l[0]&256}),Sr=l=>({builder:l[8]}),Lf=l=>({builder:l[0]&256}),Er=l=>({builder:l[8]}),Nf=l=>({builder:l[0]&256}),Tr=l=>({builder:l[8]}),Rf=l=>({builder:l[0]&256}),Mr=l=>({builder:l[8]}),Vf=l=>({builder:l[0]&256}),Or=l=>({builder:l[8]});function Bf(l){let e,n,t,r;const i=l[27].default,a=re(i,l,l[26],Dr);let s=[l[8],l[12]],o={};for(let f=0;f{n=Pn(e,l[3],l[4]),n.start()})),t=!0)},o(u){v(s,u),t=!1},d(u){u&&b(e),s&&s.d(u),l[30](null),r=!1,i()}}}function qf(l){let e,n,t,r,i,a;const s=l[27].default,o=re(s,l,l[26],Tr);let f=[l[8],l[12]],u={};for(let c=0;c{r&&(t&&t.end(1),n=Pn(e,l[3],l[4]),n.start())}),r=!0)},o(c){v(o,c),n&&n.invalidate(),c&&(t=ol(e,l[5],l[6])),r=!1},d(c){c&&b(e),o&&o.d(c),l[29](null),c&&t&&t.end(),i=!1,a()}}}function jf(l){let e,n,t,r,i;const a=l[27].default,s=re(a,l,l[26],Mr);let o=[l[8],l[12]],f={};for(let u=0;u{t&&(n||(n=Et(e,l[1],l[2],!0)),n.run(1))}),t=!0)},o(u){v(s,u),u&&(n||(n=Et(e,l[1],l[2],!1)),n.run(0)),t=!1},d(u){u&&b(e),s&&s.d(u),l[28](null),u&&n&&n.end(),r=!1,i()}}}function Uf(l){let e;const n=l[27].default,t=re(n,l,l[26],Or);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i[0]&67109120)&&ie(t,n,r,r[26],e?oe(n,r[26],i,Vf):ae(r[26]),Or)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Yf(l){let e,n,t,r;const i=[Uf,jf,qf,Wf,Ff,Bf],a=[];function s(o,f){return o[7]&&o[9]?0:o[1]&&o[9]?1:o[3]&&o[5]&&o[9]?2:o[3]&&o[9]?3:o[5]&&o[9]?4:o[9]?5:-1}return~(e=s(l))&&(n=a[e]=i[e](l)),{c(){n&&n.c(),t=X()},l(o){n&&n.l(o),t=X()},m(o,f){~e&&a[e].m(o,f),C(o,t,f),r=!0},p(o,f){let u=e;e=s(o),e===u?~e&&a[e].p(o,f):(n&&(ve(),v(a[u],1,1,()=>{a[u]=null}),ye()),~e?(n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t)):n=null)},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),~e&&a[e].d(o)}}}function Zf(l,e,n){let t;const r=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let i=$(e,r),a,s,{$$slots:o={},$$scope:f}=e,{transition:u=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:h=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:y=!1}=e,{id:p=void 0}=e,{side:D="bottom"}=e,{align:L="center"}=e,{sideOffset:N=0}=e,{alignOffset:S=0}=e,{collisionPadding:K=8}=e,{avoidCollisions:B=!0}=e,{collisionBoundary:O=void 0}=e,{sameWidth:E=!1}=e,{fitViewport:T=!1}=e,{strategy:g="absolute"}=e,{overlap:M=!1}=e,{el:P=void 0}=e;const{elements:{content:te},states:{open:Ie},ids:Me,getAttrs:Pe}=Kl();Oe(l,te,x=>n(25,s=x)),Oe(l,Ie,x=>n(9,a=x));const G=Pe("content");function Se(x){Le[x?"unshift":"push"](()=>{P=x,n(0,P)})}function Ee(x){Le[x?"unshift":"push"](()=>{P=x,n(0,P)})}function he(x){Le[x?"unshift":"push"](()=>{P=x,n(0,P)})}function Fe(x){Le[x?"unshift":"push"](()=>{P=x,n(0,P)})}function Je(x){Le[x?"unshift":"push"](()=>{P=x,n(0,P)})}return l.$$set=x=>{e=w(w({},e),Te(x)),n(12,i=$(e,r)),"transition"in x&&n(1,u=x.transition),"transitionConfig"in x&&n(2,c=x.transitionConfig),"inTransition"in x&&n(3,d=x.inTransition),"inTransitionConfig"in x&&n(4,h=x.inTransitionConfig),"outTransition"in x&&n(5,m=x.outTransition),"outTransitionConfig"in x&&n(6,_=x.outTransitionConfig),"asChild"in x&&n(7,y=x.asChild),"id"in x&&n(13,p=x.id),"side"in x&&n(14,D=x.side),"align"in x&&n(15,L=x.align),"sideOffset"in x&&n(16,N=x.sideOffset),"alignOffset"in x&&n(17,S=x.alignOffset),"collisionPadding"in x&&n(18,K=x.collisionPadding),"avoidCollisions"in x&&n(19,B=x.avoidCollisions),"collisionBoundary"in x&&n(20,O=x.collisionBoundary),"sameWidth"in x&&n(21,E=x.sameWidth),"fitViewport"in x&&n(22,T=x.fitViewport),"strategy"in x&&n(23,g=x.strategy),"overlap"in x&&n(24,M=x.overlap),"el"in x&&n(0,P=x.el),"$$scope"in x&&n(26,f=x.$$scope)},l.$$.update=()=>{l.$$.dirty[0]&8192&&p&&Me.content.set(p),l.$$.dirty[0]&33554432&&n(8,t=s),l.$$.dirty[0]&256&&Object.assign(t,G),l.$$.dirty[0]&33538560&&a&&Tf({side:D,align:L,sideOffset:N,alignOffset:S,collisionPadding:K,avoidCollisions:B,collisionBoundary:O,sameWidth:E,fitViewport:T,strategy:g,overlap:M})},[P,u,c,d,h,m,_,y,t,a,te,Ie,i,p,D,L,N,S,K,B,O,E,T,g,M,s,f,o,Se,Ee,he,Fe,Je]}let zf=class extends _e{constructor(e){super(),ge(this,e,Zf,Yf,me,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:13,side:14,align:15,sideOffset:16,alignOffset:17,collisionPadding:18,avoidCollisions:19,collisionBoundary:20,sameWidth:21,fitViewport:22,strategy:23,overlap:24,el:0},null,[-1,-1])}};const Hf=l=>({builder:l&4}),Pr=l=>({builder:l[2]}),Jf=l=>({builder:l&4}),Ir=l=>({builder:l[2]});function Gf(l){let e,n,t,r;const i=l[12].default,a=re(i,l,l[11],Pr);let s=[l[2],{type:"button"},l[6]],o={};for(let f=0;f{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Xf(l,e,n){let t,r;const i=["asChild","id","el"];let a=$(e,i),s,o,{$$slots:f={},$$scope:u}=e,{asChild:c=!1}=e,{id:d=void 0}=e,{el:h=void 0}=e;const{elements:{trigger:m},states:{open:_},ids:y,getAttrs:p}=Kl();Oe(l,m,S=>n(9,s=S)),Oe(l,_,S=>n(10,o=S));const D=cn(),L=p("trigger");function N(S){Le[S?"unshift":"push"](()=>{h=S,n(0,h)})}return l.$$set=S=>{e=w(w({},e),Te(S)),n(6,a=$(e,i)),"asChild"in S&&n(1,c=S.asChild),"id"in S&&n(7,d=S.id),"el"in S&&n(0,h=S.el),"$$scope"in S&&n(11,u=S.$$scope)},l.$$.update=()=>{l.$$.dirty&128&&d&&y.trigger.set(d),l.$$.dirty&1024&&n(8,t={...L,"aria-controls":o?y.content:void 0}),l.$$.dirty&512&&n(2,r=s),l.$$.dirty&260&&Object.assign(r,t)},[h,c,r,m,_,D,a,d,t,s,o,u,f,N]}class xf extends _e{constructor(e){super(),ge(this,e,Xf,Qf,me,{asChild:1,id:7,el:0})}}function eo(){return{NAME:"calendar",PARTS:["root","prev-button","next-button","heading","grid","day","header","grid-head","head-cell","grid-body","cell","grid-row"]}}function $f(l){const{NAME:e,PARTS:n}=eo(),t=ul(e,n),r={...hf(cl(l)),getAttrs:t};return Hn(e,r),{...r,updateOption:dl(r.options)}}function Rt(){const{NAME:l}=eo();return Jn(l)}const eu=l=>({builder:l[0]&4,months:l[0]&16,weekdays:l[0]&32,startValue:l[0]&8,endValue:l[0]&64}),Ar=l=>({builder:l[2],months:l[4],weekdays:l[5],startValue:l[3],endValue:l[6]}),tu=l=>({builder:l[0]&4,months:l[0]&16,weekdays:l[0]&32,startValue:l[0]&8,endValue:l[0]&64}),wr=l=>({builder:l[2],months:l[4],weekdays:l[5],startValue:l[3],endValue:l[6]});function nu(l){let e,n,t,r;const i=l[38].default,a=re(i,l,l[37],Ar);let s=[l[2],l[13]],o={};for(let f=0;f{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function iu(l,e,n){let t;const r=["placeholder","onPlaceholderChange","value","onValueChange","preventDeselect","minValue","maxValue","pagedNavigation","weekStartsOn","locale","isDateUnavailable","isDateDisabled","disabled","readonly","fixedWeeks","calendarLabel","asChild","id","weekdayFormat","initialFocus","startValue","numberOfMonths","el"];let i=$(e,r),a,s,o,f,u,{$$slots:c={},$$scope:d}=e,{placeholder:h=void 0}=e,{onPlaceholderChange:m=void 0}=e,{value:_=void 0}=e,{onValueChange:y=void 0}=e,{preventDeselect:p=void 0}=e,{minValue:D=void 0}=e,{maxValue:L=void 0}=e,{pagedNavigation:N=void 0}=e,{weekStartsOn:S=void 0}=e,{locale:K=void 0}=e,{isDateUnavailable:B=void 0}=e,{isDateDisabled:O=void 0}=e,{disabled:E=void 0}=e,{readonly:T=void 0}=e,{fixedWeeks:g=void 0}=e,{calendarLabel:M=void 0}=e,{asChild:P=!1}=e,{id:te=void 0}=e,{weekdayFormat:Ie=void 0}=e,{initialFocus:Me=!1}=e,{startValue:Pe=void 0}=e,{numberOfMonths:G=void 0}=e,{el:Se=void 0}=e;Vl(()=>{!Me||!Se||gf(Se)});const{elements:{calendar:Ee},states:{value:he,placeholder:Fe,months:Je,weekdays:x,startValue:gt,endValue:Ge},updateOption:we,ids:Tt,getAttrs:Mt}=$f({defaultPlaceholder:h,defaultValue:_,preventDeselect:p,minValue:D,maxValue:L,pagedNavigation:N,weekStartsOn:S,locale:K,isDateUnavailable:B,isDateDisabled:O,disabled:E,readonly:T,fixedWeeks:g,calendarLabel:M,weekdayFormat:Ie,numberOfMonths:G,onPlaceholderChange:({next:j})=>(h!==j&&(m==null||m(j),n(14,h=j)),j),onValueChange:({next:j})=>(_!==j&&(y==null||y(j),n(15,_=j)),j)});Oe(l,Ee,j=>n(36,s=j)),Oe(l,Je,j=>n(35,a=j)),Oe(l,x,j=>n(5,f=j)),Oe(l,gt,j=>n(3,o=j)),Oe(l,Ge,j=>n(6,u=j));const Q=Mt("root"),dt=cn();let J=a;function de(j){Le[j?"unshift":"push"](()=>{Se=j,n(0,Se)})}return l.$$set=j=>{e=w(w({},e),Te(j)),n(13,i=$(e,r)),"placeholder"in j&&n(14,h=j.placeholder),"onPlaceholderChange"in j&&n(17,m=j.onPlaceholderChange),"value"in j&&n(15,_=j.value),"onValueChange"in j&&n(18,y=j.onValueChange),"preventDeselect"in j&&n(19,p=j.preventDeselect),"minValue"in j&&n(20,D=j.minValue),"maxValue"in j&&n(21,L=j.maxValue),"pagedNavigation"in j&&n(22,N=j.pagedNavigation),"weekStartsOn"in j&&n(23,S=j.weekStartsOn),"locale"in j&&n(24,K=j.locale),"isDateUnavailable"in j&&n(25,B=j.isDateUnavailable),"isDateDisabled"in j&&n(26,O=j.isDateDisabled),"disabled"in j&&n(27,E=j.disabled),"readonly"in j&&n(28,T=j.readonly),"fixedWeeks"in j&&n(29,g=j.fixedWeeks),"calendarLabel"in j&&n(30,M=j.calendarLabel),"asChild"in j&&n(1,P=j.asChild),"id"in j&&n(31,te=j.id),"weekdayFormat"in j&&n(32,Ie=j.weekdayFormat),"initialFocus"in j&&n(33,Me=j.initialFocus),"startValue"in j&&n(16,Pe=j.startValue),"numberOfMonths"in j&&n(34,G=j.numberOfMonths),"el"in j&&n(0,Se=j.el),"$$scope"in j&&n(37,d=j.$$scope)},l.$$.update=()=>{l.$$.dirty[1]&1&&te&&Tt.calendar.set(te),l.$$.dirty[0]&8&&n(16,Pe=o),l.$$.dirty[0]&32768&&_!==void 0&&he.set(_),l.$$.dirty[0]&16384&&h!==void 0&&Fe.set(h),l.$$.dirty[0]&524288&&we("preventDeselect",p),l.$$.dirty[0]&1048576&&we("minValue",D),l.$$.dirty[0]&2097152&&we("maxValue",L),l.$$.dirty[0]&4194304&&we("pagedNavigation",N),l.$$.dirty[0]&8388608&&we("weekStartsOn",S),l.$$.dirty[0]&16777216&&we("locale",K),l.$$.dirty[0]&33554432&&we("isDateUnavailable",B),l.$$.dirty[0]&67108864&&we("isDateDisabled",O),l.$$.dirty[0]&134217728&&we("disabled",E),l.$$.dirty[0]&268435456&&we("readonly",T),l.$$.dirty[0]&536870912&&we("fixedWeeks",g),l.$$.dirty[0]&1073741824&&we("calendarLabel",M),l.$$.dirty[1]&2&&we("weekdayFormat",Ie),l.$$.dirty[1]&8&&we("numberOfMonths",G),l.$$.dirty[1]&32&&n(2,t=s),l.$$.dirty[0]&4&&Object.assign(t,Q),l.$$.dirty[1]&16&&n(4,J=a)},[Se,P,t,o,J,f,u,Ee,Je,x,gt,Ge,dt,i,h,_,Pe,m,y,p,D,L,N,S,K,B,O,E,T,g,M,te,Ie,Me,G,a,s,d,c,de]}let au=class extends _e{constructor(e){super(),ge(this,e,iu,ru,me,{placeholder:14,onPlaceholderChange:17,value:15,onValueChange:18,preventDeselect:19,minValue:20,maxValue:21,pagedNavigation:22,weekStartsOn:23,locale:24,isDateUnavailable:25,isDateDisabled:26,disabled:27,readonly:28,fixedWeeks:29,calendarLabel:30,asChild:1,id:31,weekdayFormat:32,initialFocus:33,startValue:16,numberOfMonths:34,el:0},null,[-1,-1])}};const ou=l=>({builder:l&8,disabled:l&32,unavailable:l&16}),Lr=l=>({builder:l[3],disabled:l[5],unavailable:l[4]}),su=l=>({builder:l&8,disabled:l&32,unavailable:l&16}),Nr=l=>({builder:l[3],disabled:l[5],unavailable:l[4]});function fu(l){let e,n,t,r;const i=l[16].default,a=re(i,l,l[15],Lr),s=a||cu(l);let o=[l[3],l[10]],f={};for(let u=0;u{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function hu(l,e,n){let t,r,i;const a=["date","month","asChild","el"];let s=$(e,a),o,f,u,{$$slots:c={},$$scope:d}=e,{date:h}=e,{month:m}=e,{asChild:_=!1}=e,{el:y=void 0}=e;const{elements:{cell:p},helpers:{isDateDisabled:D,isDateUnavailable:L},getAttrs:N}=Rt();Oe(l,p,O=>n(14,u=O)),Oe(l,D,O=>n(13,f=O)),Oe(l,L,O=>n(12,o=O));const S=N("day"),K=cn();function B(O){Le[O?"unshift":"push"](()=>{y=O,n(0,y)})}return l.$$set=O=>{e=w(w({},e),Te(O)),n(10,s=$(e,a)),"date"in O&&n(1,h=O.date),"month"in O&&n(11,m=O.month),"asChild"in O&&n(2,_=O.asChild),"el"in O&&n(0,y=O.el),"$$scope"in O&&n(15,d=O.$$scope)},l.$$.update=()=>{l.$$.dirty&18434&&n(3,t=u(h,m)),l.$$.dirty&8&&Object.assign(t,S),l.$$.dirty&8194&&n(5,r=f(h)),l.$$.dirty&4098&&n(4,i=o(h))},[y,h,_,t,i,r,p,D,L,K,s,m,o,f,u,d,c,B]}let mu=class extends _e{constructor(e){super(),ge(this,e,hu,du,me,{date:1,month:11,asChild:2,el:0})}};const _u=l=>({builder:l&4}),Rr=l=>({builder:l[2]}),gu=l=>({builder:l&4}),Vr=l=>({builder:l[2]});function bu(l){let e,n,t,r;const i=l[7].default,a=re(i,l,l[6],Rr);let s=[l[2],l[4]],o={};for(let f=0;f{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function yu(l,e,n){let t;const r=["asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{asChild:f=!1}=e,{el:u=void 0}=e;const{elements:{grid:c},getAttrs:d}=Rt();Oe(l,c,_=>n(5,a=_));const h=d("grid");function m(_){Le[_?"unshift":"push"](()=>{u=_,n(0,u)})}return l.$$set=_=>{e=w(w({},e),Te(_)),n(4,i=$(e,r)),"asChild"in _&&n(1,f=_.asChild),"el"in _&&n(0,u=_.el),"$$scope"in _&&n(6,o=_.$$scope)},l.$$.update=()=>{l.$$.dirty&32&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,h)},[u,f,t,c,i,a,o,s,m]}let pu=class extends _e{constructor(e){super(),ge(this,e,yu,vu,me,{asChild:1,el:0})}};const Cu=l=>({}),Br=l=>({attrs:l[2]});function Du(l){let e,n;const t=l[5].default,r=re(t,l,l[4],null);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Tu(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Rt(),u=f("grid-body");function c(d){Le[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=w(w({},e),Te(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let Mu=class extends _e{constructor(e){super(),ge(this,e,Tu,Eu,me,{asChild:1,el:0})}};const Ou=l=>({attrs:l&4}),Fr=l=>({attrs:l[2]}),Pu=l=>({attrs:l&4}),Wr=l=>({attrs:l[2]});function Iu(l){let e,n;const t=l[10].default,r=re(t,l,l[9],Fr);let i=[l[5],l[2]],a={};for(let s=0;s{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Lu(l,e,n){let t;const r=["date","asChild","el"];let i=$(e,r),a,s,{$$slots:o={},$$scope:f}=e,{date:u}=e,{asChild:c=!1}=e,{el:d=void 0}=e;const{helpers:{isDateDisabled:h,isDateUnavailable:m},getAttrs:_}=Rt();Oe(l,h,p=>n(8,s=p)),Oe(l,m,p=>n(7,a=p));function y(p){Le[p?"unshift":"push"](()=>{d=p,n(0,d)})}return l.$$set=p=>{e=w(w({},e),Te(p)),n(5,i=$(e,r)),"date"in p&&n(6,u=p.date),"asChild"in p&&n(1,c=p.asChild),"el"in p&&n(0,d=p.el),"$$scope"in p&&n(9,f=p.$$scope)},l.$$.update=()=>{l.$$.dirty&448&&n(2,t={..._("cell"),"aria-disabled":s(u)||a(u),role:"gridcell"})},[d,c,t,h,m,i,u,a,s,f,o,y]}let Nu=class extends _e{constructor(e){super(),ge(this,e,Lu,wu,me,{date:6,asChild:1,el:0})}};const Ru=l=>({}),qr=l=>({attrs:l[2]});function Vu(l){let e,n;const t=l[5].default,r=re(t,l,l[4],null);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Wu(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Rt(),u={...f("grid-head"),"aria-hidden":!0};function c(d){Le[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=w(w({},e),Te(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let qu=class extends _e{constructor(e){super(),ge(this,e,Wu,Fu,me,{asChild:1,el:0})}};const ju=l=>({}),jr=l=>({attrs:l[2]});function Uu(l){let e,n;const t=l[5].default,r=re(t,l,l[4],null);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function zu(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Rt(),u=f("head-cell");function c(d){Le[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=w(w({},e),Te(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let Hu=class extends _e{constructor(e){super(),ge(this,e,zu,Zu,me,{asChild:1,el:0})}};const Ju=l=>({}),Ur=l=>({attrs:l[2]}),Gu=l=>({}),Yr=l=>({attrs:l[2]});function Ku(l){let e,n;const t=l[5].default,r=re(t,l,l[4],Ur);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function xu(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Rt(),u=f("grid-row");function c(d){Le[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=w(w({},e),Te(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let $u=class extends _e{constructor(e){super(),ge(this,e,xu,Xu,me,{asChild:1,el:0})}};const ec=l=>({}),Zr=l=>({attrs:l[2]}),tc=l=>({}),zr=l=>({attrs:l[2]});function nc(l){let e,n;const t=l[5].default,r=re(t,l,l[4],Zr);let i=[l[3],l[2]],a={};for(let s=0;s{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function ic(l,e,n){const t=["asChild","el"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{asChild:s=!1}=e,{el:o=void 0}=e;const{getAttrs:f}=Rt(),u=f("header");function c(d){Le[d?"unshift":"push"](()=>{o=d,n(0,o)})}return l.$$set=d=>{e=w(w({},e),Te(d)),n(3,r=$(e,t)),"asChild"in d&&n(1,s=d.asChild),"el"in d&&n(0,o=d.el),"$$scope"in d&&n(4,a=d.$$scope)},[o,s,u,r,a,i,c]}let ac=class extends _e{constructor(e){super(),ge(this,e,ic,rc,me,{asChild:1,el:0})}};const oc=l=>({builder:l&4,headingValue:l&8}),Hr=l=>({builder:l[2],headingValue:l[3]}),sc=l=>({builder:l&4,headingValue:l&8}),Jr=l=>({builder:l[2],headingValue:l[3]});function fc(l){let e,n,t,r;const i=l[9].default,a=re(i,l,l[8],Hr),s=a||cc(l);let o=[l[2],l[6]],f={};for(let u=0;u{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function hc(l,e,n){let t;const r=["asChild","el"];let i=$(e,r),a,s,{$$slots:o={},$$scope:f}=e,{asChild:u=!1}=e,{el:c=void 0}=e;const{elements:{heading:d},states:{headingValue:h},getAttrs:m}=Rt();Oe(l,d,p=>n(7,a=p)),Oe(l,h,p=>n(3,s=p));const _=m("heading");function y(p){Le[p?"unshift":"push"](()=>{c=p,n(0,c)})}return l.$$set=p=>{e=w(w({},e),Te(p)),n(6,i=$(e,r)),"asChild"in p&&n(1,u=p.asChild),"el"in p&&n(0,c=p.el),"$$scope"in p&&n(8,f=p.$$scope)},l.$$.update=()=>{l.$$.dirty&128&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,_)},[c,u,t,s,d,h,i,a,f,o,y]}let mc=class extends _e{constructor(e){super(),ge(this,e,hc,dc,me,{asChild:1,el:0})}};const _c=l=>({builder:l&4}),Gr=l=>({builder:l[2]}),gc=l=>({builder:l&4}),Kr=l=>({builder:l[2]});function bc(l){let e,n,t,r;const i=l[8].default,a=re(i,l,l[7],Gr);let s=[l[2],{type:"button"},l[5]],o={};for(let f=0;f{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function yc(l,e,n){let t;const r=["asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{asChild:f=!1}=e,{el:u=void 0}=e;const{elements:{nextButton:c},getAttrs:d}=Rt();Oe(l,c,y=>n(6,a=y));const h=d("next-button"),m=cn();function _(y){Le[y?"unshift":"push"](()=>{u=y,n(0,u)})}return l.$$set=y=>{e=w(w({},e),Te(y)),n(5,i=$(e,r)),"asChild"in y&&n(1,f=y.asChild),"el"in y&&n(0,u=y.el),"$$scope"in y&&n(7,o=y.$$scope)},l.$$.update=()=>{l.$$.dirty&64&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,h)},[u,f,t,c,m,i,a,o,s,_]}let pc=class extends _e{constructor(e){super(),ge(this,e,yc,vc,me,{asChild:1,el:0})}};const Cc=l=>({builder:l&4}),Qr=l=>({builder:l[2]}),Dc=l=>({builder:l&4}),Xr=l=>({builder:l[2]});function Sc(l){let e,n,t,r;const i=l[8].default,a=re(i,l,l[7],Qr);let s=[l[2],{type:"button"},l[5]],o={};for(let f=0;f{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Mc(l,e,n){let t;const r=["asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{asChild:f=!1}=e,{el:u=void 0}=e;const{elements:{prevButton:c},getAttrs:d}=Rt();Oe(l,c,y=>n(6,a=y));const h=d("prev-button"),m=cn();function _(y){Le[y?"unshift":"push"](()=>{u=y,n(0,u)})}return l.$$set=y=>{e=w(w({},e),Te(y)),n(5,i=$(e,r)),"asChild"in y&&n(1,f=y.asChild),"el"in y&&n(0,u=y.el),"$$scope"in y&&n(7,o=y.$$scope)},l.$$.update=()=>{l.$$.dirty&64&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,h)},[u,f,t,c,m,i,a,o,s,_]}let Oc=class extends _e{constructor(e){super(),ge(this,e,Mc,Tc,me,{asChild:1,el:0})}};function ml(){return{NAME:"select",GROUP_NAME:"select-group",ITEM_NAME:"select-item",PARTS:["arrow","content","group","item","indicator","input","label","trigger","value"]}}function In(){const{NAME:l}=ml();return Jn(l)}function Pc(l){const{NAME:e,PARTS:n}=ml(),t=ul(e,n),r={...mf({...cl(l),forceVisible:!0}),getAttrs:t};return Hn(e,r),{...r,updateOption:dl(r.options)}}function Ic(l){const{ITEM_NAME:e}=ml(),n=In();return Hn(e,l),n}function Ac(){const{ITEM_NAME:l}=ml(),{helpers:{isSelected:e},getAttrs:n}=In();return{value:Jn(l),isSelected:e,getAttrs:n}}function wc(l){const n={...{side:"bottom",align:"center",sameWidth:!0},...l},{options:{positioning:t}}=In();wa(t)(n)}const Lc=l=>({ids:l&1}),xr=l=>({ids:l[0]});function Nc(l){let e;const n=l[19].default,t=re(n,l,l[18],xr);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,[i]){t&&t.p&&(!e||i&262145)&&ie(t,n,r,r[18],e?oe(n,r[18],i,Lc):ae(r[18]),xr)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Rc(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{required:a=void 0}=e,{disabled:s=void 0}=e,{preventScroll:o=void 0}=e,{loop:f=void 0}=e,{closeOnEscape:u=void 0}=e,{closeOnOutsideClick:c=void 0}=e,{portal:d=void 0}=e,{name:h=void 0}=e,{multiple:m=!1}=e,{selected:_=void 0}=e,{onSelectedChange:y=void 0}=e,{open:p=void 0}=e,{onOpenChange:D=void 0}=e,{items:L=[]}=e,{onOutsideClick:N=void 0}=e,{typeahead:S=void 0}=e;const{states:{open:K,selected:B},updateOption:O,ids:E}=Pc({required:a,disabled:s,preventScroll:o,loop:f,closeOnEscape:u,closeOnOutsideClick:c,portal:d,name:h,onOutsideClick:N,multiple:m,forceVisible:!0,defaultSelected:Array.isArray(_)?[..._]:_,defaultOpen:p,onSelectedChange:({next:g})=>Array.isArray(g)?((!Array.isArray(_)||!ts(_,g))&&(y==null||y(g),n(2,_=g)),g):(_!==g&&(y==null||y(g),n(2,_=g)),g),onOpenChange:({next:g})=>(p!==g&&(D==null||D(g),n(3,p=g)),g),items:L,typeahead:S}),T=Ze([E.menu,E.trigger,E.label],([g,M,P])=>({menu:g,trigger:M,label:P}));return Oe(l,T,g=>n(0,t=g)),l.$$set=g=>{"required"in g&&n(4,a=g.required),"disabled"in g&&n(5,s=g.disabled),"preventScroll"in g&&n(6,o=g.preventScroll),"loop"in g&&n(7,f=g.loop),"closeOnEscape"in g&&n(8,u=g.closeOnEscape),"closeOnOutsideClick"in g&&n(9,c=g.closeOnOutsideClick),"portal"in g&&n(10,d=g.portal),"name"in g&&n(11,h=g.name),"multiple"in g&&n(12,m=g.multiple),"selected"in g&&n(2,_=g.selected),"onSelectedChange"in g&&n(13,y=g.onSelectedChange),"open"in g&&n(3,p=g.open),"onOpenChange"in g&&n(14,D=g.onOpenChange),"items"in g&&n(15,L=g.items),"onOutsideClick"in g&&n(16,N=g.onOutsideClick),"typeahead"in g&&n(17,S=g.typeahead),"$$scope"in g&&n(18,i=g.$$scope)},l.$$.update=()=>{l.$$.dirty&8&&p!==void 0&&K.set(p),l.$$.dirty&4&&_!==void 0&&B.set(Array.isArray(_)?[..._]:_),l.$$.dirty&16&&O("required",a),l.$$.dirty&32&&O("disabled",s),l.$$.dirty&64&&O("preventScroll",o),l.$$.dirty&128&&O("loop",f),l.$$.dirty&256&&O("closeOnEscape",u),l.$$.dirty&512&&O("closeOnOutsideClick",c),l.$$.dirty&1024&&O("portal",d),l.$$.dirty&2048&&O("name",h),l.$$.dirty&4096&&O("multiple",m),l.$$.dirty&65536&&O("onOutsideClick",N),l.$$.dirty&131072&&O("typeahead",S)},[t,T,_,p,a,s,o,f,u,c,d,h,m,y,D,L,N,S,i,r]}class Vc extends _e{constructor(e){super(),ge(this,e,Rc,Nc,me,{required:4,disabled:5,preventScroll:6,loop:7,closeOnEscape:8,closeOnOutsideClick:9,portal:10,name:11,multiple:12,selected:2,onSelectedChange:13,open:3,onOpenChange:14,items:15,onOutsideClick:16,typeahead:17})}}const Bc=l=>({builder:l[0]&256}),$r=l=>({builder:l[8]}),Fc=l=>({builder:l[0]&256}),ei=l=>({builder:l[8]}),Wc=l=>({builder:l[0]&256}),ti=l=>({builder:l[8]}),qc=l=>({builder:l[0]&256}),ni=l=>({builder:l[8]}),jc=l=>({builder:l[0]&256}),li=l=>({builder:l[8]}),Uc=l=>({builder:l[0]&256}),ri=l=>({builder:l[8]});function Yc(l){let e,n,t,r;const i=l[28].default,a=re(i,l,l[27],$r);let s=[l[8],l[13]],o={};for(let f=0;f{n=Pn(e,l[3],l[4]),n.start()})),t=!0)},o(u){v(s,u),t=!1},d(u){u&&b(e),s&&s.d(u),l[36](null),r=!1,ct(i)}}}function Hc(l){let e,n,t,r,i,a;const s=l[28].default,o=re(s,l,l[27],ni);let f=[l[8],l[13]],u={};for(let c=0;c{r&&(t&&t.end(1),n=Pn(e,l[3],l[4]),n.start())}),r=!0)},o(c){v(o,c),n&&n.invalidate(),c&&(t=ol(e,l[5],l[6])),r=!1},d(c){c&&b(e),o&&o.d(c),l[35](null),c&&t&&t.end(),i=!1,ct(a)}}}function Jc(l){let e,n,t,r,i;const a=l[28].default,s=re(a,l,l[27],li);let o=[l[8],l[13]],f={};for(let u=0;u{t&&(n||(n=Et(e,l[1],l[2],!0)),n.run(1))}),t=!0)},o(u){v(s,u),u&&(n||(n=Et(e,l[1],l[2],!1)),n.run(0)),t=!1},d(u){u&&b(e),s&&s.d(u),l[34](null),u&&n&&n.end(),r=!1,ct(i)}}}function Gc(l){let e;const n=l[28].default,t=re(n,l,l[27],ri);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i[0]&134217984)&&ie(t,n,r,r[27],e?oe(n,r[27],i,Uc):ae(r[27]),ri)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Kc(l){let e,n,t,r;const i=[Gc,Jc,Hc,zc,Zc,Yc],a=[];function s(o,f){return o[7]&&o[9]?0:o[1]&&o[9]?1:o[3]&&o[5]&&o[9]?2:o[3]&&o[9]?3:o[5]&&o[9]?4:o[9]?5:-1}return~(e=s(l))&&(n=a[e]=i[e](l)),{c(){n&&n.c(),t=X()},l(o){n&&n.l(o),t=X()},m(o,f){~e&&a[e].m(o,f),C(o,t,f),r=!0},p(o,f){let u=e;e=s(o),e===u?~e&&a[e].p(o,f):(n&&(ve(),v(a[u],1,1,()=>{a[u]=null}),ye()),~e?(n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t)):n=null)},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),~e&&a[e].d(o)}}}function Qc(l,e,n){let t;const r=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let i=$(e,r),a,s,{$$slots:o={},$$scope:f}=e,{transition:u=void 0}=e,{transitionConfig:c=void 0}=e,{inTransition:d=void 0}=e,{inTransitionConfig:h=void 0}=e,{outTransition:m=void 0}=e,{outTransitionConfig:_=void 0}=e,{asChild:y=!1}=e,{id:p=void 0}=e,{side:D="bottom"}=e,{align:L="center"}=e,{sideOffset:N=0}=e,{alignOffset:S=0}=e,{collisionPadding:K=8}=e,{avoidCollisions:B=!0}=e,{collisionBoundary:O=void 0}=e,{sameWidth:E=!0}=e,{fitViewport:T=!1}=e,{strategy:g="absolute"}=e,{overlap:M=!1}=e,{el:P=void 0}=e;const{elements:{menu:te},states:{open:Ie},ids:Me,getAttrs:Pe}=In();Oe(l,te,Q=>n(26,s=Q)),Oe(l,Ie,Q=>n(9,a=Q));const G=cn(),Se=Pe("content");function Ee(Q){ut.call(this,l,Q)}function he(Q){ut.call(this,l,Q)}function Fe(Q){ut.call(this,l,Q)}function Je(Q){ut.call(this,l,Q)}function x(Q){ut.call(this,l,Q)}function gt(Q){Le[Q?"unshift":"push"](()=>{P=Q,n(0,P)})}function Ge(Q){Le[Q?"unshift":"push"](()=>{P=Q,n(0,P)})}function we(Q){Le[Q?"unshift":"push"](()=>{P=Q,n(0,P)})}function Tt(Q){Le[Q?"unshift":"push"](()=>{P=Q,n(0,P)})}function Mt(Q){Le[Q?"unshift":"push"](()=>{P=Q,n(0,P)})}return l.$$set=Q=>{e=w(w({},e),Te(Q)),n(13,i=$(e,r)),"transition"in Q&&n(1,u=Q.transition),"transitionConfig"in Q&&n(2,c=Q.transitionConfig),"inTransition"in Q&&n(3,d=Q.inTransition),"inTransitionConfig"in Q&&n(4,h=Q.inTransitionConfig),"outTransition"in Q&&n(5,m=Q.outTransition),"outTransitionConfig"in Q&&n(6,_=Q.outTransitionConfig),"asChild"in Q&&n(7,y=Q.asChild),"id"in Q&&n(14,p=Q.id),"side"in Q&&n(15,D=Q.side),"align"in Q&&n(16,L=Q.align),"sideOffset"in Q&&n(17,N=Q.sideOffset),"alignOffset"in Q&&n(18,S=Q.alignOffset),"collisionPadding"in Q&&n(19,K=Q.collisionPadding),"avoidCollisions"in Q&&n(20,B=Q.avoidCollisions),"collisionBoundary"in Q&&n(21,O=Q.collisionBoundary),"sameWidth"in Q&&n(22,E=Q.sameWidth),"fitViewport"in Q&&n(23,T=Q.fitViewport),"strategy"in Q&&n(24,g=Q.strategy),"overlap"in Q&&n(25,M=Q.overlap),"el"in Q&&n(0,P=Q.el),"$$scope"in Q&&n(27,f=Q.$$scope)},l.$$.update=()=>{l.$$.dirty[0]&16384&&p&&Me.menu.set(p),l.$$.dirty[0]&67108864&&n(8,t=s),l.$$.dirty[0]&256&&Object.assign(t,Se),l.$$.dirty[0]&67076608&&a&&wc({side:D,align:L,sideOffset:N,alignOffset:S,collisionPadding:K,avoidCollisions:B,collisionBoundary:O,sameWidth:E,fitViewport:T,strategy:g,overlap:M})},[P,u,c,d,h,m,_,y,t,a,te,Ie,G,i,p,D,L,N,S,K,B,O,E,T,g,M,s,f,o,Ee,he,Fe,Je,x,gt,Ge,we,Tt,Mt]}let Xc=class extends _e{constructor(e){super(),ge(this,e,Qc,Kc,me,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,strategy:24,overlap:25,el:0},null,[-1,-1])}};const xc=l=>({builder:l&16,isSelected:l&32}),ii=l=>({builder:l[4],isSelected:l[5]}),$c=l=>({builder:l&16,isSelected:l&32}),ai=l=>({builder:l[4],isSelected:l[5]});function ed(l){let e,n,t,r;const i=l[14].default,a=re(i,l,l[13],ii),s=a||nd(l);let o=[l[4],l[9]],f={};for(let u=0;u{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function rd(l,e,n){let t,r;const i=["value","disabled","label","asChild","el"];let a=$(e,i),s,o,{$$slots:f={},$$scope:u}=e,{value:c}=e,{disabled:d=void 0}=e,{label:h=void 0}=e,{asChild:m=!1}=e,{el:_=void 0}=e;const{elements:{option:y},helpers:{isSelected:p},getAttrs:D}=Ic(c);Oe(l,y,T=>n(12,o=T)),Oe(l,p,T=>n(11,s=T));const L=cn(),N=D("item");function S(T){ut.call(this,l,T)}function K(T){ut.call(this,l,T)}function B(T){ut.call(this,l,T)}function O(T){ut.call(this,l,T)}function E(T){Le[T?"unshift":"push"](()=>{_=T,n(0,_)})}return l.$$set=T=>{e=w(w({},e),Te(T)),n(9,a=$(e,i)),"value"in T&&n(1,c=T.value),"disabled"in T&&n(10,d=T.disabled),"label"in T&&n(2,h=T.label),"asChild"in T&&n(3,m=T.asChild),"el"in T&&n(0,_=T.el),"$$scope"in T&&n(13,u=T.$$scope)},l.$$.update=()=>{l.$$.dirty&5126&&n(4,t=o({value:c,disabled:d,label:h})),l.$$.dirty&16&&Object.assign(t,N),l.$$.dirty&2050&&n(5,r=s(c))},[_,c,h,m,t,r,y,p,L,a,d,s,o,u,f,S,K,B,O,E]}let id=class extends _e{constructor(e){super(),ge(this,e,rd,ld,me,{value:1,disabled:10,label:2,asChild:3,el:0})}};const ad=l=>({isSelected:l&4}),oi=l=>({attrs:l[5],isSelected:l[2](l[4])}),od=l=>({isSelected:l&4}),si=l=>({attrs:l[5],isSelected:l[2](l[4])});function sd(l){let e,n=l[2](l[4]),t,r=n&&fi(l),i=[l[6],l[5]],a={};for(let s=0;s{r=null}),ye()),ke(e,a=De(i,[o&64&&s[6],s[5]]))},i(s){t||(k(r),t=!0)},o(s){v(r),t=!1},d(s){s&&b(e),r&&r.d(),l[9](null)}}}function fd(l){let e;const n=l[8].default,t=re(n,l,l[7],si);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&132)&&ie(t,n,r,r[7],e?oe(n,r[7],i,od):ae(r[7]),si)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function fi(l){let e;const n=l[8].default,t=re(n,l,l[7],oi);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&132)&&ie(t,n,r,r[7],e?oe(n,r[7],i,ad):ae(r[7]),oi)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function ud(l){let e,n,t,r;const i=[fd,sd],a=[];function s(o,f){return o[1]?0:1}return e=s(l),n=a[e]=i[e](l),{c(){n.c(),t=X()},l(o){n.l(o),t=X()},m(o,f){a[e].m(o,f),C(o,t,f),r=!0},p(o,[f]){let u=e;e=s(o),e===u?a[e].p(o,f):(ve(),v(a[u],1,1,()=>{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function cd(l,e,n){const t=["asChild","el"];let r=$(e,t),i,{$$slots:a={},$$scope:s}=e,{asChild:o=!1}=e,{el:f=void 0}=e;const{isSelected:u,value:c,getAttrs:d}=Ac();Oe(l,u,_=>n(2,i=_));const h=d("indicator");function m(_){Le[_?"unshift":"push"](()=>{f=_,n(0,f)})}return l.$$set=_=>{e=w(w({},e),Te(_)),n(6,r=$(e,t)),"asChild"in _&&n(1,o=_.asChild),"el"in _&&n(0,f=_.el),"$$scope"in _&&n(7,s=_.$$scope)},[f,o,i,u,c,h,r,s,a,m]}class dd extends _e{constructor(e){super(),ge(this,e,cd,ud,me,{asChild:1,el:0})}}const hd=l=>({builder:l&4}),ui=l=>({builder:l[2]}),md=l=>({builder:l&4}),ci=l=>({builder:l[2]});function _d(l){let e,n,t,r;const i=l[9].default,a=re(i,l,l[8],ui);let s=[l[2],{type:"button"},l[5]],o={};for(let f=0;f{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function kd(l,e,n){let t;const r=["asChild","id","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{asChild:f=!1}=e,{id:u=void 0}=e,{el:c=void 0}=e;const{elements:{trigger:d},ids:h,getAttrs:m}=In();Oe(l,d,D=>n(7,a=D));const _=cn(),y=m("trigger");function p(D){Le[D?"unshift":"push"](()=>{c=D,n(0,c)})}return l.$$set=D=>{e=w(w({},e),Te(D)),n(5,i=$(e,r)),"asChild"in D&&n(1,f=D.asChild),"id"in D&&n(6,u=D.id),"el"in D&&n(0,c=D.el),"$$scope"in D&&n(8,o=D.$$scope)},l.$$.update=()=>{l.$$.dirty&64&&u&&h.trigger.set(u),l.$$.dirty&128&&n(2,t=a),l.$$.dirty&4&&Object.assign(t,y)},[c,f,t,d,_,i,u,a,o,s,p]}let Ql=class extends _e{constructor(e){super(),ge(this,e,kd,bd,me,{asChild:1,id:6,el:0})}};const vd=l=>({label:l&8}),di=l=>({label:l[3],attrs:l[5]});function yd(l){let e,n=(l[3]||l[1])+"",t,r,i=[l[6],l[5],{"data-placeholder":r=l[3]?void 0:""}],a={};for(let s=0;s{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function Dd(l,e,n){let t;const r=["placeholder","asChild","el"];let i=$(e,r),a,{$$slots:s={},$$scope:o}=e,{placeholder:f=""}=e,{asChild:u=!1}=e,{el:c=void 0}=e;const{states:{selectedLabel:d},getAttrs:h}=In();Oe(l,d,y=>n(7,a=y));const m=h("value");function _(y){Le[y?"unshift":"push"](()=>{c=y,n(0,c)})}return l.$$set=y=>{e=w(w({},e),Te(y)),n(6,i=$(e,r)),"placeholder"in y&&n(1,f=y.placeholder),"asChild"in y&&n(2,u=y.asChild),"el"in y&&n(0,c=y.el),"$$scope"in y&&n(8,o=y.$$scope)},l.$$.update=()=>{l.$$.dirty&128&&n(3,t=a)},[c,f,u,t,d,m,i,a,o,s,_]}class Sd extends _e{constructor(e){super(),ge(this,e,Dd,Cd,me,{placeholder:1,asChild:2,el:0})}}function Ed(l){let e,n;const t=l[2].default,r=re(t,l,l[1],null);return{c(){e=R("div"),r&&r.c(),this.h()},l(i){e=V(i,"DIV",{class:!0});var a=F(e);r&&r.l(a),a.forEach(b),this.h()},h(){I(e,"class","contents"),it(e,"print:hidden",l[0])},m(i,a){C(i,e,a),r&&r.m(e,null),n=!0},p(i,[a]){r&&r.p&&(!n||a&2)&&ie(r,t,i,i[1],n?oe(t,i[1],a,null):ae(i[1]),null),(!n||a&1)&&it(e,"print:hidden",i[0])},i(i){n||(k(r,i),n=!0)},o(i){v(r,i),n=!1},d(i){i&&b(e),r&&r.d(i)}}}function Td(l,e,n){let{$$slots:t={},$$scope:r}=e,{enabled:i=!0}=e;return l.$$set=a=>{"enabled"in a&&n(0,i=a.enabled),"$$scope"in a&&n(1,r=a.$$scope)},[i,r,t]}class Md extends _e{constructor(e){super(),ge(this,e,Td,Ed,me,{enabled:0})}}function Od(l){let e;const n=l[6].default,t=re(n,l,l[7],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&128)&&ie(t,n,r,r[7],e?oe(n,r[7],i,null):ae(r[7]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Pd(l){let e,n;const t=[{transition:l[1]},{transitionConfig:l[2]},{align:l[3]},{sideOffset:l[4]},l[5],{class:Ne("z-50 w-72 rounded-md border border-base-300 p-4 shadow-md outline-none bg-base-100",l[0])}];let r={$$slots:{default:[Od]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(d)),n(5,r=$(e,t)),"class"in d&&n(0,s=d.class),"transition"in d&&n(1,o=d.transition),"transitionConfig"in d&&n(2,f=d.transitionConfig),"align"in d&&n(3,u=d.align),"sideOffset"in d&&n(4,c=d.sideOffset),"$$scope"in d&&n(7,a=d.$$scope)},[s,o,f,u,c,r,i,a]}class Ad extends _e{constructor(e){super(),ge(this,e,Id,Pd,me,{class:0,transition:1,transitionConfig:2,align:3,sideOffset:4})}}const wd=If,Ld=xf;function Nd(l){let e,n;const t=[{class:Ne("shrink-0 bg-base-300",l[1]==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",l[0])},{orientation:l[1]},{decorative:l[2]},l[3]];let r={};for(let i=0;i{e=w(w({},e),Te(o)),n(3,r=$(e,t)),"class"in o&&n(0,i=o.class),"orientation"in o&&n(1,a=o.orientation),"decorative"in o&&n(2,s=o.decorative)},[i,a,s,r]}class Xl extends _e{constructor(e){super(),ge(this,e,Rd,Nd,me,{class:0,orientation:1,decorative:2})}}function Vd(l){let e,n;return e=new sl({props:{src:Do,class:"h-4 w-4"}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p:ne,i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Bd(l){let e,n,t,r;n=new dd({props:{$$slots:{default:[Vd]},$$scope:{ctx:l}}});const i=l[5].default,a=re(i,l,l[9],null);return{c(){e=R("span"),U(n.$$.fragment),t=se(),a&&a.c(),this.h()},l(s){e=V(s,"SPAN",{class:!0});var o=F(e);Y(n.$$.fragment,o),o.forEach(b),t=fe(s),a&&a.l(s),this.h()},h(){I(e,"class","absolute right-2 flex h-3.5 w-3.5 items-center justify-center")},m(s,o){C(s,e,o),Z(n,e,null),C(s,t,o),a&&a.m(s,o),r=!0},p(s,o){const f={};o&512&&(f.$$scope={dirty:o,ctx:s}),n.$set(f),a&&a.p&&(!r||o&512)&&ie(a,i,s,s[9],r?oe(i,s[9],o,null):ae(s[9]),null)},i(s){r||(k(n.$$.fragment,s),k(a,s),r=!0)},o(s){v(n.$$.fragment,s),v(a,s),r=!1},d(s){s&&(b(e),b(t)),z(n),a&&a.d(s)}}}function Fd(l){let e,n;const t=[{value:l[1]},{disabled:l[3]},{label:l[2]},{class:Ne("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-base-200 data-[disabled]:opacity-50",l[0])},l[4]];let r={$$slots:{default:[Bd]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(m)),n(4,r=$(e,t)),"class"in m&&n(0,s=m.class),"value"in m&&n(1,o=m.value),"label"in m&&n(2,f=m.label),"disabled"in m&&n(3,u=m.disabled),"$$scope"in m&&n(9,a=m.$$scope)},[s,o,f,u,r,i,c,d,h,a]}class An extends _e{constructor(e){super(),ge(this,e,Wd,Fd,me,{class:0,value:1,label:2,disabled:3})}}function qd(l){let e,n;const t=l[7].default,r=re(t,l,l[8],null);return{c(){e=R("div"),r&&r.c(),this.h()},l(i){e=V(i,"DIV",{class:!0});var a=F(e);r&&r.l(a),a.forEach(b),this.h()},h(){I(e,"class","w-full p-1")},m(i,a){C(i,e,a),r&&r.m(e,null),n=!0},p(i,a){r&&r.p&&(!n||a&256)&&ie(r,t,i,i[8],n?oe(t,i[8],a,null):ae(i[8]),null)},i(i){n||(k(r,i),n=!0)},o(i){v(r,i),n=!1},d(i){i&&b(e),r&&r.d(i)}}}function jd(l){let e,n;const t=[{inTransition:l[2]},{inTransitionConfig:l[3]},{outTransition:l[4]},{outTransitionConfig:l[5]},{sideOffset:l[1]},{class:Ne("relative z-50 min-w-[8rem] overflow-hidden rounded-md border border-base-300 bg-base-100 shadow-md focus:outline-none",l[0])},l[6]];let r={$$slots:{default:[qd]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(h)),n(6,r=$(e,t)),"class"in h&&n(0,s=h.class),"sideOffset"in h&&n(1,o=h.sideOffset),"inTransition"in h&&n(2,f=h.inTransition),"inTransitionConfig"in h&&n(3,u=h.inTransitionConfig),"outTransition"in h&&n(4,c=h.outTransition),"outTransitionConfig"in h&&n(5,d=h.outTransitionConfig),"$$scope"in h&&n(8,a=h.$$scope)},[s,o,f,u,c,d,r,i,a]}class _l extends _e{constructor(e){super(),ge(this,e,Ud,jd,me,{class:0,sideOffset:1,inTransition:2,inTransitionConfig:3,outTransition:4,outTransitionConfig:5})}}function Yd(l){let e,n,t,r;const i=l[2].default,a=re(i,l,l[3],null);return t=new sl({props:{src:Eo,class:"h-4 w-4"}}),{c(){a&&a.c(),e=se(),n=R("div"),U(t.$$.fragment)},l(s){a&&a.l(s),e=fe(s),n=V(s,"DIV",{});var o=F(n);Y(t.$$.fragment,o),o.forEach(b)},m(s,o){a&&a.m(s,o),C(s,e,o),C(s,n,o),Z(t,n,null),r=!0},p(s,o){a&&a.p&&(!r||o&8)&&ie(a,i,s,s[3],r?oe(i,s[3],o,null):ae(s[3]),null)},i(s){r||(k(a,s),k(t.$$.fragment,s),r=!0)},o(s){v(a,s),v(t.$$.fragment,s),r=!1},d(s){s&&(b(e),b(n)),a&&a.d(s),z(t)}}}function Zd(l){let e,n;const t=[{class:Ne("border border-base-300 flex h-9 w-full items-center justify-between rounded-md bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-base-content-muted focus:outline-none focus:ring-1 focus:ring-base-content-muted disabled:cursor-not-allowed disabled:opacity-50",l[0])},l[1]];let r={$$slots:{default:[Yd]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class Hd extends _e{constructor(e){super(),ge(this,e,zd,Zd,me,{class:0})}}const Ll=Vc,to=Sd;function hi(l,e,n){const t=l.slice();return t[23]=e[n],t}function mi(l,e,n){const t=l.slice();return t[26]=e[n],t}function _i(l,e,n){const t=l.slice();return t[29]=e[n],t}function gi(l,e,n){const t=l.slice();return t[32]=e[n],t}function bi(l,e,n){const t=l.slice();return t[1]=e[n].value,t[35]=e[n].label,t}function ki(l,e,n){const t=l.slice();return t[1]=e[n].value,t[35]=e[n].label,t}function Jd(l){let e,n;return e=new to({props:{placeholder:"Select month"}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p:ne,i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Gd(l){let e=l[35]+"",n,t;return{c(){n=ue(e),t=se()},l(r){n=ce(r,e),t=fe(r)},m(r,i){C(r,n,i),C(r,t,i)},p:ne,d(r){r&&(b(n),b(t))}}}function vi(l){let e,n;return e=new An({props:{value:l[1],label:l[35],$$slots:{default:[Gd]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r[1]&512&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Kd(l){let e,n,t=Ve(l[11]),r=[];for(let a=0;av(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;av(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;av(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;av(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;av(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;av(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;a({21:h,22:m}),({months:h,weekdays:m})=>[(h?2097152:0)|(m?4194304:0)]]},$$scope:{ctx:l}};for(let h=0;hGt(e,"value",o)),Le.push(()=>Gt(e,"placeholder",f)),Le.push(()=>Gt(e,"startValue",u)),Le.push(()=>Gt(e,"selectedDateRange",c)),e.$on("keydown",l[19]),{c(){U(e.$$.fragment)},l(h){Y(e.$$.fragment,h)},m(h,m){Z(e,h,m),a=!0},p(h,m){const _=m[0]&4336?De(s,[m[0]&32&&{minValue:h[5]},m[0]&64&&{maxValue:h[6]},m[0]&16&&{weekdayFormat:h[4]},m[0]&128&&{class:Ne("p-3",h[7])},m[0]&4096&&He(h[12])]):{};m[0]&6293249|m[1]&512&&(_.$$scope={dirty:m,ctx:h}),!n&&m[0]&2&&(n=!0,_.value=h[1],Jt(()=>n=!1)),!t&&m[0]&1&&(t=!0,_.placeholder=h[0],Jt(()=>t=!1)),!r&&m[0]&8&&(r=!0,_.startValue=h[3],Jt(()=>r=!1)),!i&&m[0]&4&&(i=!0,_.selectedDateRange=h[2],Jt(()=>i=!1)),e.$set(_)},i(h){a||(k(e.$$.fragment,h),a=!0)},o(h){v(e.$$.fragment,h),a=!1},d(h){z(e,h)}}}function hh(l,e,n){let t,r,i;const a=["value","placeholder","selectedDateRange","weekdayFormat","startValue","minValue","maxValue","class"];let s=$(e,a),{value:o=void 0}=e,{placeholder:f=void 0}=e,{selectedDateRange:u=void 0}=e,{weekdayFormat:c="short"}=e,{startValue:d=void 0}=e,{minValue:h=void 0}=e,{maxValue:m=void 0}=e,{class:_=void 0}=e;const y=["January","February","March","April","May","June","July","August","September","October","November","December"].map((E,T)=>({value:T+1,label:E})),p=new It("en-US",{month:"long"}),D=E=>{!E||!f||E.value!==(f==null?void 0:f.month)&&n(0,f=f.set({month:E.value}))},L=E=>{!E||!f||E.value!==(f==null?void 0:f.year)&&n(0,f=f.set({year:E.value}))};function N(E){o=E,n(1,o)}function S(E){f=E,n(0,f)}function K(E){d=E,n(3,d)}function B(E){u=E,n(2,u)}function O(E){ut.call(this,l,E)}return l.$$set=E=>{e=w(w({},e),Te(E)),n(12,s=$(e,a)),"value"in E&&n(1,o=E.value),"placeholder"in E&&n(0,f=E.placeholder),"selectedDateRange"in E&&n(2,u=E.selectedDateRange),"weekdayFormat"in E&&n(4,c=E.weekdayFormat),"startValue"in E&&n(3,d=E.startValue),"minValue"in E&&n(5,h=E.minValue),"maxValue"in E&&n(6,m=E.maxValue),"class"in E&&n(7,_=E.class)},l.$$.update=()=>{l.$$.dirty[0]&96&&n(10,t=Array.from({length:100},(E,T)=>({label:String(new Date().getFullYear()-T),value:new Date().getFullYear()-T})).filter(({value:E})=>!((h==null?void 0:h.year)>E||E>(m==null?void 0:m.year)))),l.$$.dirty[0]&1&&n(9,r=f?{value:f.year,label:String(f.year)}:void 0),l.$$.dirty[0]&1&&n(8,i=f?{value:f.month,label:p.format(f.toDate(ze()))}:void 0)},[f,o,u,d,c,h,m,_,i,r,t,y,s,D,L,N,S,K,B,O]}class mh extends _e{constructor(e){super(),ge(this,e,hh,dh,me,{value:1,placeholder:0,selectedDateRange:2,weekdayFormat:4,startValue:3,minValue:5,maxValue:6,class:7},null,[-1,-1])}}function _h(l){let e;const n=l[3].default,t=re(n,l,l[4],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&16)&&ie(t,n,r,r[4],e?oe(n,r[4],i,null):ae(r[4]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function gh(l){let e,n;const t=[{date:l[0]},{class:Ne("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-base-200 first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-outside-month])]:bg-base-100/50 [&:has([data-selected][data-selection-end])]:rounded-r-md",l[1])},l[2]];let r={$$slots:{default:[_h]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(f)),n(2,r=$(e,t)),"date"in f&&n(0,s=f.date),"class"in f&&n(1,o=f.class),"$$scope"in f&&n(4,a=f.$$scope)},[s,o,r,i,a]}class kh extends _e{constructor(e){super(),ge(this,e,bh,gh,me,{date:0,class:1})}}const vh=l=>({disabled:l&128,unavailable:l&256,builder:l&512}),Ei=l=>({disabled:l[7],unavailable:l[8],builder:l[9]});function yh(l){let e=l[0].day+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&1&&e!==(e=t[0].day+"")&&Ce(n,e)},d(t){t&&b(n)}}}function ph(l){let e;const n=l[4].default,t=re(n,l,l[6],Ei),r=t||yh(l);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,a){r&&r.m(i,a),e=!0},p(i,a){t?t.p&&(!e||a&960)&&ie(t,n,i,i[6],e?oe(n,i[6],a,vh):ae(i[6]),Ei):r&&r.p&&(!e||a&1)&&r.p(i,e?a:-1)},i(i){e||(k(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Ch(l){let e,n;const t=[{date:l[0]},{month:l[1]},{class:Ne(Tn({variant:"ghost"}),"h-8 w-8 p-0 font-normal data-[selected]:opacity-100","[&[data-today]:not([data-selected])]:border [&[data-today]:not([data-selected])]:border-dashed [&[data-today]:not([data-selected])]:border-base-300 [&[data-today]:not([data-selected])]:text-base-content","data-[selection-start]:bg-base-content data-[selection-start]:text-base-100 data-[selection-start]:hover:bg-base-content data-[selection-start]:hover:text-base-100 data-[selection-start]:focus:bg-base-content data-[selection-start]:focus:text-base-100","data-[selection-end]:bg-base-content data-[selection-end]:text-base-100 data-[selection-end]:hover:bg-base-content data-[selection-end]:hover:text-base-100 data-[selection-end]:focus:bg-base-content data-[selection-end]:focus:text-base-100","data-[outside-month]:pointer-events-none data-[outside-month]:text-base-content-muted data-[outside-month]:opacity-50 [&[data-outside-month][data-selected]]:bg-base-200/50 [&[data-outside-month][data-selected]]:text-base-content-muted [&[data-outside-month][data-selected]]:opacity-30","data-[disabled]:text-base-content-muted data-[disabled]:opacity-50","data-[unavailable]:text-negative/20 data-[unavailable]:line-through",l[2])},l[3]];let r={$$slots:{default:[ph,({disabled:i,unavailable:a,builder:s})=>({7:i,8:a,9:s}),({disabled:i,unavailable:a,builder:s})=>(i?128:0)|(a?256:0)|(s?512:0)]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(c)),n(3,r=$(e,t)),"date"in c&&n(0,s=c.date),"month"in c&&n(1,o=c.month),"class"in c&&n(2,f=c.class),"$$scope"in c&&n(6,a=c.$$scope)},[s,o,f,r,i,u,a]}class Sh extends _e{constructor(e){super(),ge(this,e,Dh,Ch,me,{date:0,month:1,class:2})}}function Eh(l){let e;const n=l[2].default,t=re(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&ie(t,n,r,r[3],e?oe(n,r[3],i,null):ae(r[3]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Th(l){let e,n;const t=[{class:Ne("w-full border-collapse space-y-1",l[0])},l[1]];let r={$$slots:{default:[Eh]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class Oh extends _e{constructor(e){super(),ge(this,e,Mh,Th,me,{class:0})}}function Ph(l){let e;const n=l[2].default,t=re(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&ie(t,n,r,r[3],e?oe(n,r[3],i,null):ae(r[3]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Ih(l){let e,n;const t=[{class:Ne("flex justify-between pt-1 relative items-center w-full",l[0])},l[1]];let r={$$slots:{default:[Ph]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class wh extends _e{constructor(e){super(),ge(this,e,Ah,Ih,me,{class:0})}}function Lh(l){let e,n,t;const r=l[3].default,i=re(r,l,l[2],null);let a=[{class:n=Ne("flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0 mt-4",l[0])},l[1]],s={};for(let o=0;o{e=w(w({},e),Te(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(2,a=o.$$scope)},[s,r,a,i]}class Rh extends _e{constructor(e){super(),ge(this,e,Nh,Lh,me,{class:0})}}function Vh(l){let e;const n=l[2].default,t=re(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&ie(t,n,r,r[3],e?oe(n,r[3],i,null):ae(r[3]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Bh(l){let e,n;const t=[{class:Ne("flex",l[0])},l[1]];let r={$$slots:{default:[Vh]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class no extends _e{constructor(e){super(),ge(this,e,Fh,Bh,me,{class:0})}}const Wh=l=>({headingValue:l&16}),Ti=l=>({headingValue:l[4]});function qh(l){let e=l[4]+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&16&&e!==(e=t[4]+"")&&Ce(n,e)},d(t){t&&b(n)}}}function jh(l){let e;const n=l[2].default,t=re(n,l,l[3],Ti),r=t||qh(l);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,a){r&&r.m(i,a),e=!0},p(i,a){t?t.p&&(!e||a&24)&&ie(t,n,i,i[3],e?oe(n,i[3],a,Wh):ae(i[3]),Ti):r&&r.p&&(!e||a&16)&&r.p(i,e?a:-1)},i(i){e||(k(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function Uh(l){let e,n;const t=[{class:Ne("text-sm font-medium",l[0])},l[1]];let r={$$slots:{default:[jh,({headingValue:i})=>({4:i}),({headingValue:i})=>i?16:0]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class Zh extends _e{constructor(e){super(),ge(this,e,Yh,Uh,me,{class:0})}}function zh(l){let e;const n=l[2].default,t=re(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&ie(t,n,r,r[3],e?oe(n,r[3],i,null):ae(r[3]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Hh(l){let e,n;const t=[{class:Ne(l[0])},l[1]];let r={$$slots:{default:[zh]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class Gh extends _e{constructor(e){super(),ge(this,e,Jh,Hh,me,{class:0})}}function Kh(l){let e;const n=l[2].default,t=re(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&ie(t,n,r,r[3],e?oe(n,r[3],i,null):ae(r[3]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Qh(l){let e,n;const t=[{class:Ne(l[0])},l[1]];let r={$$slots:{default:[Kh]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class xh extends _e{constructor(e){super(),ge(this,e,Xh,Qh,me,{class:0})}}function $h(l){let e;const n=l[2].default,t=re(n,l,l[3],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&8)&&ie(t,n,r,r[3],e?oe(n,r[3],i,null):ae(r[3]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function em(l){let e,n;const t=[{class:Ne("w-8 rounded-md text-[0.8rem] font-normal text-base-content-muted",l[0])},l[1]];let r={$$slots:{default:[$h]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(o)),n(1,r=$(e,t)),"class"in o&&n(0,s=o.class),"$$scope"in o&&n(3,a=o.$$scope)},[s,r,i,a]}class nm extends _e{constructor(e){super(),ge(this,e,tm,em,me,{class:0})}}const lm=l=>({builder:l&32}),Mi=l=>({builder:l[5]});function rm(l){let e,n;return e=new sl({props:{src:To,class:"h-4 w-4"}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p:ne,i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function im(l){let e;const n=l[2].default,t=re(n,l,l[4],Mi),r=t||rm();return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,a){r&&r.m(i,a),e=!0},p(i,a){t&&t.p&&(!e||a&48)&&ie(t,n,i,i[4],e?oe(n,i[4],a,lm):ae(i[4]),Mi)},i(i){e||(k(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function am(l){let e,n;const t=[{class:Ne(Tn({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",l[0])},l[1]];let r={$$slots:{default:[im,({builder:i})=>({5:i}),({builder:i})=>i?32:0]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(f)),n(1,r=$(e,t)),"class"in f&&n(0,s=f.class),"$$scope"in f&&n(4,a=f.$$scope)},[s,r,i,o,a]}class sm extends _e{constructor(e){super(),ge(this,e,om,am,me,{class:0})}}const fm=l=>({builder:l&32}),Oi=l=>({builder:l[5]});function um(l){let e,n;return e=new sl({props:{src:Mo,class:"h-4 w-4"}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p:ne,i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function cm(l){let e;const n=l[2].default,t=re(n,l,l[4],Oi),r=t||um();return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,a){r&&r.m(i,a),e=!0},p(i,a){t&&t.p&&(!e||a&48)&&ie(t,n,i,i[4],e?oe(n,i[4],a,fm):ae(i[4]),Oi)},i(i){e||(k(r,i),e=!0)},o(i){v(r,i),e=!1},d(i){r&&r.d(i)}}}function dm(l){let e,n;const t=[{class:Ne(Tn({variant:"ghost"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",l[0])},l[1]];let r={$$slots:{default:[cm,({builder:i})=>({5:i}),({builder:i})=>i?32:0]},$$scope:{ctx:l}};for(let i=0;i{e=w(w({},e),Te(f)),n(1,r=$(e,t)),"class"in f&&n(0,s=f.class),"$$scope"in f&&n(4,a=f.$$scope)},[s,r,i,o,a]}class mm extends _e{constructor(e){super(),ge(this,e,hm,dm,me,{class:0})}}function Pi(l,e,n){const t=l.slice();return t[23]=e[n],t}function Ii(l,e,n){const t=l.slice();return t[23]=e[n],t}function Ai(l,e,n){const t=l.slice();return t[23]=e[n],t}function wi(l,e,n){const t=l.slice();return t[23]=e[n],t}function _m(l){let e;return{c(){e=ue("Date Range")},l(n){e=ce(n,"Date Range")},m(n,t){C(n,e,t)},p:ne,d(n){n&&b(e)}}}function gm(l){let e=l[7].format(l[6].toDate(ze()))+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&64&&e!==(e=t[7].format(t[6].toDate(ze()))+"")&&Ce(n,e)},d(t){t&&b(n)}}}function bm(l){let e;function n(i,a){return i[0].end?ym:vm}let t=n(l),r=t(l);return{c(){r.c(),e=X()},l(i){r.l(i),e=X()},m(i,a){r.m(i,a),C(i,e,a)},p(i,a){t===(t=n(i))&&r?r.p(i,a):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&b(e),r.d(i)}}}function km(l){let e;return{c(){e=ue("Loading...")},l(n){e=ce(n,"Loading...")},m(n,t){C(n,e,t)},p:ne,d(n){n&&b(e)}}}function vm(l){let e=l[7].format(l[0].start.toDate(ze()))+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&1&&e!==(e=t[7].format(t[0].start.toDate(ze()))+"")&&Ce(n,e)},d(t){t&&b(n)}}}function ym(l){let e=l[7].format(l[0].start.toDate(ze()))+"",n,t,r=l[7].format(l[0].end.toDate(ze()))+"",i;return{c(){n=ue(e),t=ue(" - "),i=ue(r)},l(a){n=ce(a,e),t=ce(a," - "),i=ce(a,r)},m(a,s){C(a,n,s),C(a,t,s),C(a,i,s)},p(a,s){s[0]&1&&e!==(e=a[7].format(a[0].start.toDate(ze()))+"")&&Ce(n,e),s[0]&1&&r!==(r=a[7].format(a[0].end.toDate(ze()))+"")&&Ce(i,r)},d(a){a&&(b(n),b(t),b(i))}}}function pm(l){let e;return{c(){e=ue("Date Range")},l(n){e=ce(n,"Date Range")},m(n,t){C(n,e,t)},p:ne,d(n){n&&b(e)}}}function Cm(l){let e=l[8].format(l[6].toDate(ze()))+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&64&&e!==(e=t[8].format(t[6].toDate(ze()))+"")&&Ce(n,e)},d(t){t&&b(n)}}}function Dm(l){let e;function n(i,a){return i[0].end?Tm:Em}let t=n(l),r=t(l);return{c(){r.c(),e=X()},l(i){r.l(i),e=X()},m(i,a){r.m(i,a),C(i,e,a)},p(i,a){t===(t=n(i))&&r?r.p(i,a):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&b(e),r.d(i)}}}function Sm(l){let e;return{c(){e=ue("Loading...")},l(n){e=ce(n,"Loading...")},m(n,t){C(n,e,t)},p:ne,d(n){n&&b(e)}}}function Em(l){let e=l[8].format(l[0].start.toDate(ze()))+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&1&&e!==(e=t[8].format(t[0].start.toDate(ze()))+"")&&Ce(n,e)},d(t){t&&b(n)}}}function Tm(l){let e=l[8].format(l[0].start.toDate(ze()))+"",n,t,r=l[8].format(l[0].end.toDate(ze()))+"",i;return{c(){n=ue(e),t=ue(" - "),i=ue(r)},l(a){n=ce(a,e),t=ce(a," - "),i=ce(a,r)},m(a,s){C(a,n,s),C(a,t,s),C(a,i,s)},p(a,s){s[0]&1&&e!==(e=a[8].format(a[0].start.toDate(ze()))+"")&&Ce(n,e),s[0]&1&&r!==(r=a[8].format(a[0].end.toDate(ze()))+"")&&Ce(i,r)},d(a){a&&(b(n),b(t),b(i))}}}function Mm(l){let e,n,t;function r(u,c){return u[1]?u[0]&&u[0].start?bm:u[6]?gm:_m:km}let i=r(l),a=i(l);function s(u,c){return u[1]?u[0]&&u[0].start?Dm:u[6]?Cm:pm:Sm}let o=s(l),f=o(l);return{c(){e=R("span"),a.c(),n=se(),t=R("span"),f.c(),this.h()},l(u){e=V(u,"SPAN",{class:!0});var c=F(e);a.l(c),c.forEach(b),n=fe(u),t=V(u,"SPAN",{class:!0});var d=F(t);f.l(d),d.forEach(b),this.h()},h(){I(e,"class","hidden sm:inline"),I(t,"class","sm:hidden")},m(u,c){C(u,e,c),a.m(e,null),C(u,n,c),C(u,t,c),f.m(t,null)},p(u,c){i===(i=r(u))&&a?a.p(u,c):(a.d(1),a=i(u),a&&(a.c(),a.m(e,null))),o===(o=s(u))&&f?f.p(u,c):(f.d(1),f=o(u),f&&(f.c(),f.m(t,null)))},d(u){u&&(b(e),b(n),b(t)),a.d(),f.d()}}}function Om(l){let e,n;return e=new $o({props:{variant:"outline",size:"sm",class:Ne("flex justify-start rounded-r-none border-r-0 text-left font-normal",!l[0]&&"text-base-content-muted"),builders:[l[32]],disabled:!l[1],$$slots:{default:[Mm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r[0]&1&&(i.class=Ne("flex justify-start rounded-r-none border-r-0 text-left font-normal",!t[0]&&"text-base-content-muted")),r[1]&2&&(i.builders=[t[32]]),r[0]&2&&(i.disabled=!t[1]),r[0]&67|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Pm(l){let e,n,t,r;function i(o){l[16](o)}function a(o){l[17](o)}let s={initialFocus:!0,numberOfMonths:1,onValueChange:l[15],minValue:l[4],maxValue:l[3]};return l[0]!==void 0&&(s.selectedDateRange=l[0]),l[6]!==void 0&&(s.placeholder=l[6]),e=new mh({props:s}),Le.push(()=>Gt(e,"selectedDateRange",i)),Le.push(()=>Gt(e,"placeholder",a)),{c(){U(e.$$.fragment)},l(o){Y(e.$$.fragment,o)},m(o,f){Z(e,o,f),r=!0},p(o,f){const u={};f[0]&5&&(u.onValueChange=o[15]),f[0]&16&&(u.minValue=o[4]),f[0]&8&&(u.maxValue=o[3]),!n&&f[0]&1&&(n=!0,u.selectedDateRange=o[0],Jt(()=>n=!1)),!t&&f[0]&64&&(t=!0,u.placeholder=o[6],Jt(()=>t=!1)),e.$set(u)},i(o){r||(k(e.$$.fragment,o),r=!0)},o(o){v(e.$$.fragment,o),r=!1},d(o){z(e,o)}}}function Im(l){let e,n,t,r;return e=new Ld({props:{asChild:!0,$$slots:{default:[Om,({builder:i})=>({32:i}),({builder:i})=>[0,i?2:0]]},$$scope:{ctx:l}}}),t=new Ad({props:{class:"w-auto select-none p-0",align:"start",$$slots:{default:[Pm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment),n=se(),U(t.$$.fragment)},l(i){Y(e.$$.fragment,i),n=fe(i),Y(t.$$.fragment,i)},m(i,a){Z(e,i,a),C(i,n,a),Z(t,i,a),r=!0},p(i,a){const s={};a[0]&67|a[1]&6&&(s.$$scope={dirty:a,ctx:i}),e.$set(s);const o={};a[0]&93|a[1]&4&&(o.$$scope={dirty:a,ctx:i}),t.$set(o)},i(i){r||(k(e.$$.fragment,i),k(t.$$.fragment,i),r=!0)},o(i){v(e.$$.fragment,i),v(t.$$.fragment,i),r=!1},d(i){i&&b(n),z(e,i),z(t,i)}}}function Am(l){let e,n="Select a Range",t,r,i="Range";return{c(){e=R("span"),e.textContent=n,t=se(),r=R("span"),r.textContent=i,this.h()},l(a){e=V(a,"SPAN",{class:!0,"data-svelte-h":!0}),Ut(e)!=="svelte-184xn4x"&&(e.textContent=n),t=fe(a),r=V(a,"SPAN",{class:!0,"data-svelte-h":!0}),Ut(r)!=="svelte-1a1txje"&&(r.textContent=i),this.h()},h(){I(e,"class","hidden sm:inline text-base-content-muted"),I(r,"class","sm:hidden")},m(a,s){C(a,e,s),C(a,t,s),C(a,r,s)},p:ne,d(a){a&&(b(e),b(t),b(r))}}}function wm(l){let e=l[2].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&4&&e!==(e=t[2].label+"")&&Ce(n,e)},d(t){t&&b(n)}}}function Lm(l){let e;function n(i,a){return i[2]?wm:Am}let t=n(l),r=t(l);return{c(){r.c(),e=X()},l(i){r.l(i),e=X()},m(i,a){r.m(i,a),C(i,e,a)},p(i,a){t===(t=n(i))&&r?r.p(i,a):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&b(e),r.d(i)}}}function Nm(l){let e,n;return e=new _l({props:{$$slots:{default:[Ym]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Rm(l){let e,n;return e=new _l({props:{class:"text-sm text-center",$$slots:{default:[Zm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Vm(l){let e=l[23].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&32&&e!==(e=t[23].label+"")&&Ce(n,e)},d(t){t&&b(n)}}}function Li(l){let e,n;return e=new An({props:{value:l[23].range,label:l[23].label,class:"text-xs",$$slots:{default:[Vm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r[0]&32&&(i.value=t[23].range),r[0]&32&&(i.label=t[23].label),r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Bm(l){let e,n;return e=new Xl({props:{orientation:"horizontal"}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Fm(l){let e=l[23].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&32&&e!==(e=t[23].label+"")&&Ce(n,e)},d(t){t&&b(n)}}}function Ni(l){let e,n;return e=new An({props:{value:l[23].range,label:l[23].label,class:"text-xs",$$slots:{default:[Fm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r[0]&32&&(i.value=t[23].range),r[0]&32&&(i.label=t[23].label),r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Wm(l){let e,n;return e=new Xl({props:{orientation:"horizontal"}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function qm(l){let e=l[23].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&32&&e!==(e=t[23].label+"")&&Ce(n,e)},d(t){t&&b(n)}}}function Ri(l){let e,n;return e=new An({props:{value:l[23].range,label:l[23].label,class:"text-xs",$$slots:{default:[qm]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r[0]&32&&(i.value=t[23].range),r[0]&32&&(i.label=t[23].label),r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function jm(l){let e,n;return e=new Xl({props:{orientation:"horizontal"}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Um(l){let e=l[23].label+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&32&&e!==(e=t[23].label+"")&&Ce(n,e)},d(t){t&&b(n)}}}function Vi(l){let e,n;return e=new An({props:{value:l[23].range,label:l[23].label,class:"text-xs",$$slots:{default:[Um]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r[0]&32&&(i.value=t[23].range),r[0]&32&&(i.label=t[23].label),r[0]&32|r[1]&4&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Ym(l){let e,n=l[9]("Months"),t,r,i=l[9]("Last"),a,s,o=l[9]("To Date"),f,u,c,d=Ve(l[5].filter(Bi)),h=[];for(let g=0;gv(h[g],1,1,()=>{h[g]=null});let _=n&&Bm(),y=Ve(l[5].filter(Fi)),p=[];for(let g=0;gv(p[g],1,1,()=>{p[g]=null});let L=i&&Wm(),N=Ve(l[5].filter(Wi)),S=[];for(let g=0;gv(S[g],1,1,()=>{S[g]=null});let B=o&&jm(),O=Ve(l[5].filter(qi)),E=[];for(let g=0;gv(E[g],1,1,()=>{E[g]=null});return{c(){for(let g=0;g{o[h]=null}),ye(),r=o[t],r?r.p(u,c):(r=o[t]=s[t](u),r.c()),k(r,1),r.m(i.parentNode,i))},i(u){a||(k(e.$$.fragment,u),k(r),a=!0)},o(u){v(e.$$.fragment,u),v(r),a=!1},d(u){u&&(b(n),b(i)),z(e,u),o[t].d(u)}}}function Hm(l){let e,n,t,r,i,a;n=new wd({props:{openFocus:!0,$$slots:{default:[Im]},$$scope:{ctx:l}}});function s(f){l[19](f)}let o={onSelectedChange:l[18],disabled:!l[1],$$slots:{default:[zm]},$$scope:{ctx:l}};return l[2]!==void 0&&(o.selected=l[2]),r=new Ll({props:o}),Le.push(()=>Gt(r,"selected",s)),{c(){e=R("div"),U(n.$$.fragment),t=se(),U(r.$$.fragment),this.h()},l(f){e=V(f,"DIV",{class:!0});var u=F(e);Y(n.$$.fragment,u),t=fe(u),Y(r.$$.fragment,u),u.forEach(b),this.h()},h(){I(e,"class","flex")},m(f,u){C(f,e,u),Z(n,e,null),q(e,t),Z(r,e,null),a=!0},p(f,u){const c={};u[0]&95|u[1]&4&&(c.$$scope={dirty:u,ctx:f}),n.$set(c);const d={};u[0]&2&&(d.disabled=!f[1]),u[0]&36|u[1]&4&&(d.$$scope={dirty:u,ctx:f}),!i&&u[0]&4&&(i=!0,d.selected=f[2],Jt(()=>i=!1)),r.$set(d)},i(f){a||(k(n.$$.fragment,f),k(r.$$.fragment,f),a=!0)},o(f){v(n.$$.fragment,f),v(r.$$.fragment,f),a=!1},d(f){f&&b(e),z(n),z(r)}}}function el(l){return l.toString().toLowerCase().replace(/\s+/g,"")}const Bi=l=>l.group==="Days",Fi=l=>l.group==="Months",Wi=l=>l.group==="Last",qi=l=>l.group==="To Date";function Jm(l,e,n){let t,r,i;function a(T){const g=T.split("-");return new fn(Number(g[0]),Number(g[1]),Number(g[2]))}const s=new It("en-US",{dateStyle:"medium"}),o=new It("en-US",{dateStyle:"short"});let{selectedDateRange:f=void 0}=e,{start:u}=e,{end:c}=e,{loaded:d=!0}=e,{presetRanges:h}=e,{defaultValue:m}=e;function _(T){n(6,p=T)}let y,p;function D(T){return t.some(g=>g.group===T)}function L(T){if(!T)return;const g=t.find(M=>el(M.label)===el(typeof T=="string"?T:T.label));g&&(n(0,f=g.range??g.value),n(2,y=g))}function N(T,g){y||n(0,f={start:T,end:g})}const S=T=>{n(2,y=void 0),n(0,f=T)};function K(T){f=T,n(0,f)}function B(T){p=T,n(6,p)}const O=T=>{T.range=T.value,L(T)};function E(T){y=T,n(2,y)}return l.$$set=T=>{"selectedDateRange"in T&&n(0,f=T.selectedDateRange),"start"in T&&n(12,u=T.start),"end"in T&&n(13,c=T.end),"loaded"in T&&n(1,d=T.loaded),"presetRanges"in T&&n(11,h=T.presetRanges),"defaultValue"in T&&n(14,m=T.defaultValue)},l.$$.update=()=>{if(l.$$.dirty[0]&8192&&n(3,i=a(c)),l.$$.dirty[0]&4096&&n(4,r=a(u)),l.$$.dirty[0]&24&&n(5,t=[{label:"Last 7 Days",group:"Days",range:{start:i.subtract({days:6}),end:i}},{label:"Last 30 Days",group:"Days",range:{start:i.subtract({days:29}),end:i}},{label:"Last 90 Days",group:"Days",range:{start:i.subtract({days:89}),end:i}},{label:"Last 3 Months",group:"Months",range:{start:zt(i.subtract({months:3})),end:dn(i.subtract({months:1}))}},{label:"Last 6 Months",group:"Months",range:{start:zt(i.subtract({months:6})),end:dn(i.subtract({months:1}))}},{label:"Last 12 Months",group:"Months",range:{start:zt(i.subtract({months:12})),end:dn(i.subtract({months:1}))}},{label:"Last Month",group:"Last",range:{start:zt(i.subtract({months:1})),end:dn(i.subtract({months:1}))}},{label:"Last Year",group:"Last",range:{start:dr(i.subtract({years:1})),end:hr(i.subtract({years:1}))}},{label:"Month to Date",group:"To Date",range:{start:zt(i),end:dn(i)}},{label:"Year to Date",group:"To Date",range:{start:dr(i),end:hr(i)}},{label:"All Time",group:"To Date",range:{start:r,end:i}}]),l.$$.dirty[0]&2080&&(typeof h=="string"&&n(11,h=[h]),h&&typeof h[0]=="string")){const T=h.map(M=>el(M));let g=t.filter(M=>T.includes(el(M.label)));n(5,t=g)}l.$$.dirty[0]&8&&_(i),l.$$.dirty[0]&16421&&typeof m=="string"&&!f&&!y&&t.length&&L(m),l.$$.dirty[0]&24&&N(r,i)},[f,d,y,i,r,t,p,s,o,D,L,h,u,c,m,S,K,B,O,E]}class Gm extends _e{constructor(e){super(),ge(this,e,Jm,Hm,me,{selectedDateRange:0,start:12,end:13,loaded:1,presetRanges:11,defaultValue:14},null,[-1,-1])}}function ji(l){let e,n;return{c(){e=R("span"),n=ue(l[0]),this.h()},l(t){e=V(t,"SPAN",{class:!0});var r=F(e);n=ce(r,l[0]),r.forEach(b),this.h()},h(){I(e,"class","text-sm text-base-content block mb-1")},m(t,r){C(t,e,r),q(e,n)},p(t,r){r&1&&Ce(n,t[0])},d(t){t&&b(e)}}}function Km(l){let e,n;return e=new Gn({props:{data:l[4],$$slots:{skeleton:[xm],default:[Xm,({loaded:t})=>({19:t}),({loaded:t})=>t?524288:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&16&&(i.data=t[4]),r&1573100&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Qm(l){let e,n,t="error",r,i,a=l[8].error+"",s;return{c(){e=R("span"),n=R("span"),n.textContent=t,r=se(),i=R("span"),s=ue(a),this.h()},l(o){e=V(o,"SPAN",{class:!0});var f=F(e);n=V(f,"SPAN",{class:!0,"data-svelte-h":!0}),Ut(n)!=="svelte-1e4f3hi"&&(n.textContent=t),r=fe(f),i=V(f,"SPAN",{class:!0});var u=F(i);s=ce(u,a),u.forEach(b),f.forEach(b),this.h()},h(){I(n,"class","inline font-sans font-medium text-xs text-negative"),I(i,"class","hidden font-sans group-hover:inline absolute -top-1 left-[105%] text-sm z-10 px-2 py-1 bg-base-200 border border-base-300 leading-relaxed min-w-[150px] w-max max-w-[400px] rounded-md"),I(e,"class","group inline-flex items-center relative cursor-help cursor-helpfont-sans px-1 border border-negative py-[1px] bg-negative/10 rounded")},m(o,f){C(o,e,f),q(e,n),q(e,r),q(e,i),q(i,s)},p(o,f){f&256&&a!==(a=o[8].error+"")&&Ce(s,a)},i:ne,o:ne,d(o){o&&b(e)}}}function Xm(l){var a;let e,n,t;function r(s){l[16](s)}let i={start:l[7],end:l[6],loaded:((a=l[19])==null?void 0:a.ready)??!0,presetRanges:l[2],defaultValue:l[3]};return l[5]!==void 0&&(i.selectedDateRange=l[5]),e=new Gm({props:i}),Le.push(()=>Gt(e,"selectedDateRange",r)),{c(){U(e.$$.fragment)},l(s){Y(e.$$.fragment,s)},m(s,o){Z(e,s,o),t=!0},p(s,o){var u;const f={};o&128&&(f.start=s[7]),o&64&&(f.end=s[6]),o&524288&&(f.loaded=((u=s[19])==null?void 0:u.ready)??!0),o&4&&(f.presetRanges=s[2]),o&8&&(f.defaultValue=s[3]),!n&&o&32&&(n=!0,f.selectedDateRange=s[5],Jt(()=>n=!1)),e.$set(f)},i(s){t||(k(e.$$.fragment,s),t=!0)},o(s){v(e.$$.fragment,s),t=!1},d(s){z(e,s)}}}function xm(l){let e,n;return e=new Ta({props:{class:"h-8 w-72"}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p:ne,i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function $m(l){let e,n,t,r,i,a=l[0]&&ji(l);const s=[Qm,Km],o=[];function f(u,c){var d;return(d=u[8])!=null&&d.error?0:1}return t=f(l),r=o[t]=s[t](l),{c(){e=R("div"),a&&a.c(),n=se(),r.c(),this.h()},l(u){e=V(u,"DIV",{class:!0});var c=F(e);a&&a.l(c),n=fe(c),r.l(c),c.forEach(b),this.h()},h(){I(e,"class","mt-2 mb-4 ml-0 mr-2 inline-block")},m(u,c){C(u,e,c),a&&a.m(e,null),q(e,n),o[t].m(e,null),i=!0},p(u,c){u[0]?a?a.p(u,c):(a=ji(u),a.c(),a.m(e,n)):a&&(a.d(1),a=null);let d=t;t=f(u),t===d?o[t].p(u,c):(ve(),v(o[d],1,1,()=>{o[d]=null}),ye(),r=o[t],r?r.p(u,c):(r=o[t]=s[t](u),r.c()),k(r,1),r.m(e,null))},i(u){i||(k(r),i=!0)},o(u){v(r),i=!1},d(u){u&&b(e),a&&a.d(),o[t].d()}}}function e1(l){let e,n;return e=new Md({props:{enabled:l[1],$$slots:{default:[$m]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,[r]){const i={};r&2&&(i.enabled=t[1]),r&1049085&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}const Ui=/^\d{4}-\d{2}-\d{2}$/;function $t(l){return l.toISOString().split("T")[0]}function t1(l,e,n){let t,r,i,a,s=ne,o=()=>(s(),s=wt(S,O=>n(8,a=O)),S),f;Oe(l,La,O=>n(15,f=O)),l.$$.on_destroy.push(()=>s());const u=Ea();Oe(l,u,O=>n(17,i=O));let{name:c}=e,{title:d}=e,{hideDuringPrint:h=!0}=e,{start:m}=e,{end:_}=e,{data:y}=e,{dates:p}=e,{presetRanges:D}=e,{defaultValue:L}=e;const N=Oo();let S,K;function B(O){K=O,n(5,K)}return l.$$set=O=>{"name"in O&&n(10,c=O.name),"title"in O&&n(0,d=O.title),"hideDuringPrint"in O&&n(1,h=O.hideDuringPrint),"start"in O&&n(11,m=O.start),"end"in O&&n(12,_=O.end),"data"in O&&n(13,y=O.data),"dates"in O&&n(14,p=O.dates),"presetRanges"in O&&n(2,D=O.presetRanges),"defaultValue"in O&&n(3,L=O.defaultValue)},l.$$.update=()=>{var O,E,T,g;if(l.$$.dirty&58384&&y&&p){const M=typeof y=="string"?y:`(${y.text})`;o(n(4,S=Nt.create(`SELECT min(${p}) as start, max(${p}) as end FROM ${M}`,N,{initialData:(O=f==null?void 0:f.data)==null?void 0:O.data[`DateRange-${c}_data`],knownColumns:(E=f==null?void 0:f.data)==null?void 0:E.data[`DateRange-${c}_columns`],disableCache:!0,noResolve:!1,id:`DateRange-${c}`}))),S.fetch()}l.$$.dirty&2304&&n(7,t=typeof m=="string"&&Ui.test(m)?m:m instanceof Date?$t(m):(a==null?void 0:a[0].start)instanceof Date?$t(a==null?void 0:a[0].start):$t(new Date(0))),l.$$.dirty&4352&&n(6,r=typeof _=="string"&&Ui.test(_)?_:_ instanceof Date?$t(_):(a==null?void 0:a[0].end)instanceof Date?$t(a==null?void 0:a[0].end):$t(new Date)),l.$$.dirty&1488&&(S&&a.dataLoaded||!S)&&En(u,i[c]={start:t,end:r},i),l.$$.dirty&1056&&K&&(K.start||K.end)&&En(u,i[c]={start:$t(((T=K.start)==null?void 0:T.toDate(ze()))??new Date(0)),end:$t(((g=K.end)==null?void 0:g.toDate(ze()))??new Date)},i)},[d,h,D,L,S,K,r,t,a,u,c,m,_,y,p,f,B]}class Ng extends _e{constructor(e){super(),ge(this,e,t1,e1,me,{name:10,title:0,hideDuringPrint:1,start:11,end:12,data:13,dates:14,presetRanges:2,defaultValue:3})}}function Yi(l,e,n){const t=l.slice();return t[12]=e[n],t[14]=n,t}function Zi(l,e,n){const t=l.slice();return t[15]=e[n],t[17]=n,t}function zi(l,e,n){const t=l.slice();return t[15]=e[n],t}function Hi(l,e,n){const t=l.slice();return t[15]=e[n],t}function Ji(l){let e,n=l[15].id+"",t,r,i,a;return{c(){e=R("th"),t=ue(n),this.h()},l(s){e=V(s,"TH",{class:!0,style:!0,evidencetype:!0,evidencetypefidelity:!0});var o=F(e);t=ce(o,n),o.forEach(b),this.h()},h(){var s,o;I(e,"class",r=Pl(l[15].type)+" svelte-nkkkq7"),We(e,"width",l[6]+"%"),I(e,"evidencetype",i=((s=l[15].evidenceColumnType)==null?void 0:s.evidenceType)||"unavailable"),I(e,"evidencetypefidelity",a=((o=l[15].evidenceColumnType)==null?void 0:o.typeFidelity)||"unavailable")},m(s,o){C(s,e,o),q(e,t)},p(s,o){var f,u;o&8&&n!==(n=s[15].id+"")&&Ce(t,n),o&8&&r!==(r=Pl(s[15].type)+" svelte-nkkkq7")&&I(e,"class",r),o&64&&We(e,"width",s[6]+"%"),o&8&&i!==(i=((f=s[15].evidenceColumnType)==null?void 0:f.evidenceType)||"unavailable")&&I(e,"evidencetype",i),o&8&&a!==(a=((u=s[15].evidenceColumnType)==null?void 0:u.typeFidelity)||"unavailable")&&I(e,"evidencetypefidelity",a)},d(s){s&&b(e)}}}function Gi(l){let e,n=l[15].type+"",t,r,i,a;return{c(){e=R("th"),t=ue(n),this.h()},l(s){e=V(s,"TH",{class:!0,style:!0,evidencetype:!0,evidencetypefidelity:!0});var o=F(e);t=ce(o,n),o.forEach(b),this.h()},h(){var s,o;I(e,"class",r=l[15].type+" type-indicator svelte-nkkkq7"),We(e,"width",l[6]+"%"),I(e,"evidencetype",i=((s=l[15].evidenceColumnType)==null?void 0:s.evidenceType)||"unavailable"),I(e,"evidencetypefidelity",a=((o=l[15].evidenceColumnType)==null?void 0:o.typeFidelity)||"unavailable")},m(s,o){C(s,e,o),q(e,t)},p(s,o){var f,u;o&8&&n!==(n=s[15].type+"")&&Ce(t,n),o&8&&r!==(r=s[15].type+" type-indicator svelte-nkkkq7")&&I(e,"class",r),o&64&&We(e,"width",s[6]+"%"),o&8&&i!==(i=((f=s[15].evidenceColumnType)==null?void 0:f.evidenceType)||"unavailable")&&I(e,"evidencetype",i),o&8&&a!==(a=((u=s[15].evidenceColumnType)==null?void 0:u.typeFidelity)||"unavailable")&&I(e,"evidencetypefidelity",a)},d(s){s&&b(e)}}}function n1(l){let e=(l[2]+l[14]+1).toLocaleString()+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&4&&e!==(e=(t[2]+t[14]+1).toLocaleString()+"")&&Ce(n,e)},d(t){t&&b(n)}}}function l1(l){let e=(l[2]+l[14]+1).toLocaleString()+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&4&&e!==(e=(t[2]+t[14]+1).toLocaleString()+"")&&Ce(n,e)},d(t){t&&b(n)}}}function r1(l){let e,n=(l[12][l[15].id]||"Ø")+"",t;return{c(){e=R("td"),t=ue(n),this.h()},l(r){e=V(r,"TD",{class:!0,style:!0});var i=F(e);t=ce(i,n),i.forEach(b),this.h()},h(){I(e,"class","other svelte-nkkkq7"),We(e,"width",l[6]+"%")},m(r,i){C(r,e,i),q(e,t)},p(r,i){i&40&&n!==(n=(r[12][r[15].id]||"Ø")+"")&&Ce(t,n),i&64&&We(e,"width",r[6]+"%")},d(r){r&&b(e)}}}function i1(l){let e,n,t=(l[12][l[15].id]??"Ø")+"",r,i;return{c(){e=R("td"),n=R("div"),r=ue(t),this.h()},l(a){e=V(a,"TD",{class:!0,style:!0,title:!0});var s=F(e);n=V(s,"DIV",{class:!0});var o=F(n);r=ce(o,t),o.forEach(b),s.forEach(b),this.h()},h(){I(n,"class","svelte-nkkkq7"),I(e,"class","boolean svelte-nkkkq7"),We(e,"width",l[6]+"%"),I(e,"title",i=l[12][l[15].id])},m(a,s){C(a,e,s),q(e,n),q(n,r)},p(a,s){s&40&&t!==(t=(a[12][a[15].id]??"Ø")+"")&&Ce(r,t),s&64&&We(e,"width",a[6]+"%"),s&40&&i!==(i=a[12][a[15].id])&&I(e,"title",i)},d(a){a&&b(e)}}}function a1(l){let e,n,t=(l[12][l[15].id]||"Ø")+"",r,i;return{c(){e=R("td"),n=R("div"),r=ue(t),this.h()},l(a){e=V(a,"TD",{class:!0,style:!0,title:!0});var s=F(e);n=V(s,"DIV",{class:!0});var o=F(n);r=ce(o,t),o.forEach(b),s.forEach(b),this.h()},h(){I(n,"class","svelte-nkkkq7"),I(e,"class","string svelte-nkkkq7"),We(e,"width",l[6]+"%"),I(e,"title",i=l[12][l[15].id])},m(a,s){C(a,e,s),q(e,n),q(n,r)},p(a,s){s&40&&t!==(t=(a[12][a[15].id]||"Ø")+"")&&Ce(r,t),s&64&&We(e,"width",a[6]+"%"),s&40&&i!==(i=a[12][a[15].id])&&I(e,"title",i)},d(a){a&&b(e)}}}function o1(l){let e,n,t=rn(l[12][l[15].id],l[3][l[17]].format,l[3][l[17]].columnUnitSummary)+"",r,i;return{c(){e=R("td"),n=R("div"),r=ue(t),this.h()},l(a){e=V(a,"TD",{class:!0,style:!0,title:!0});var s=F(e);n=V(s,"DIV",{class:!0});var o=F(n);r=ce(o,t),o.forEach(b),s.forEach(b),this.h()},h(){I(n,"class","svelte-nkkkq7"),I(e,"class","string svelte-nkkkq7"),We(e,"width",l[6]+"%"),I(e,"title",i=rn(l[12][l[15].id],l[3][l[17]].format,l[3][l[17]].columnUnitSummary))},m(a,s){C(a,e,s),q(e,n),q(n,r)},p(a,s){s&40&&t!==(t=rn(a[12][a[15].id],a[3][a[17]].format,a[3][a[17]].columnUnitSummary)+"")&&Ce(r,t),s&64&&We(e,"width",a[6]+"%"),s&40&&i!==(i=rn(a[12][a[15].id],a[3][a[17]].format,a[3][a[17]].columnUnitSummary))&&I(e,"title",i)},d(a){a&&b(e)}}}function s1(l){let e,n=rn(l[12][l[15].id],l[3][l[17]].format,l[3][l[17]].columnUnitSummary)+"",t;return{c(){e=R("td"),t=ue(n),this.h()},l(r){e=V(r,"TD",{class:!0,style:!0});var i=F(e);t=ce(i,n),i.forEach(b),this.h()},h(){I(e,"class","number svelte-nkkkq7"),We(e,"width",l[6]+"%")},m(r,i){C(r,e,i),q(e,t)},p(r,i){i&40&&n!==(n=rn(r[12][r[15].id],r[3][r[17]].format,r[3][r[17]].columnUnitSummary)+"")&&Ce(t,n),i&64&&We(e,"width",r[6]+"%")},d(r){r&&b(e)}}}function f1(l){let e,n="Ø",t,r;return{c(){e=R("td"),t=ue(n),this.h()},l(i){e=V(i,"TD",{class:!0,style:!0});var a=F(e);t=ce(a,n),a.forEach(b),this.h()},h(){I(e,"class",r="null "+l[3][l[17]].type+" svelte-nkkkq7"),We(e,"width",l[6]+"%")},m(i,a){C(i,e,a),q(e,t)},p(i,a){a&8&&r!==(r="null "+i[3][i[17]].type+" svelte-nkkkq7")&&I(e,"class",r),a&64&&We(e,"width",i[6]+"%")},d(i){i&&b(e)}}}function Ki(l){let e;function n(i,a){return i[12][i[15].id]==null?f1:i[3][i[17]].type==="number"?s1:i[3][i[17]].type==="date"?o1:i[3][i[17]].type==="string"?a1:i[3][i[17]].type==="boolean"?i1:r1}let t=n(l),r=t(l);return{c(){r.c(),e=X()},l(i){r.l(i),e=X()},m(i,a){r.m(i,a),C(i,e,a)},p(i,a){t===(t=n(i))&&r?r.p(i,a):(r.d(1),r=t(i),r&&(r.c(),r.m(e.parentNode,e)))},d(i){i&&b(e),r.d(i)}}}function Qi(l){let e,n,t,r;function i(u,c){return u[14]===0?l1:n1}let s=i(l)(l),o=Ve(l[3]),f=[];for(let u=0;u0&&Xi(l);return K=new Po({props:{class:"download-button",data:l[1],queryID:l[0],display:!0}}),{c(){e=R("div"),n=R("div"),t=R("table"),r=R("thead"),i=R("tr"),a=R("th"),s=se();for(let G=0;G0?Pe?Pe.p(G,Se):(Pe=Xi(G),Pe.c(),Pe.m(e,N)):Pe&&(Pe.d(1),Pe=null);const Ee={};Se&2&&(Ee.data=G[1]),Se&1&&(Ee.queryID=G[0]),K.$set(Ee)},i(G){O||(G&&(D||St(()=>{D=Pn(t,Ma,{}),D.start()})),k(K.$$.fragment,G),G&&St(()=>{O&&(B||(B=Et(e,an,{},!0)),B.run(1))}),O=!0)},o(G){v(K.$$.fragment,G),G&&(B||(B=Et(e,an,{},!1)),B.run(0)),O=!1},d(G){G&&b(e),at(M,G),at(te,G),at(Me,G),Pe&&Pe.d(),z(K),G&&B&&B.end(),E=!1,T()}}}let mn=5;function c1(l,e,n){let t,r,i,a,{queryID:s}=e,{data:o}=e,f=0,u;function c(){u=o.slice(f,f+mn),n(5,a=u)}const d=Io(_=>{n(2,f=Math.min(Math.max(0,f+Math.floor(_.deltaY/Math.abs(_.deltaY))),i)),c()},60);function h(_){if(Math.abs(_.deltaX)>=Math.abs(_.deltaY))return;const y=_.deltaY<0&&f===0,p=_.deltaY>0&&f===i;y||p||(_.preventDefault(),d(_))}function m(){f=ho(this.value),n(2,f)}return l.$$set=_=>{"queryID"in _&&n(0,s=_.queryID),"data"in _&&n(1,o=_.data)},l.$$.update=()=>{l.$$.dirty&2&&n(3,t=ql(o,"array")),l.$$.dirty&8&&n(6,r=90/(t.length+1)),l.$$.dirty&2&&n(4,i=Math.max(o.length-mn,0)),l.$$.dirty&6&&n(5,a=o.slice(f,f+mn))},[s,o,f,t,i,a,r,c,h,m]}class d1 extends _e{constructor(e){super(),ge(this,e,c1,u1,me,{queryID:0,data:1})}}function h1(l){let e,n="Compiled",t,r,i="Written",a,s;return{c(){e=R("button"),e.textContent=n,t=se(),r=R("button"),r.textContent=i,this.h()},l(o){e=V(o,"BUTTON",{class:!0,"data-svelte-h":!0}),Ut(e)!=="svelte-1vzm9jy"&&(e.textContent=n),t=fe(o),r=V(o,"BUTTON",{class:!0,"data-svelte-h":!0}),Ut(r)!=="svelte-5roa31"&&(r.textContent=i),this.h()},h(){I(e,"class","off svelte-1mcdez6"),I(r,"class","on svelte-1mcdez6")},m(o,f){C(o,e,f),C(o,t,f),C(o,r,f),a||(s=Ae(e,"click",l[1]),a=!0)},p:ne,d(o){o&&(b(e),b(t),b(r)),a=!1,s()}}}function m1(l){let e,n="Compiled",t,r,i="Written",a,s;return{c(){e=R("button"),e.textContent=n,t=se(),r=R("button"),r.textContent=i,this.h()},l(o){e=V(o,"BUTTON",{class:!0,"data-svelte-h":!0}),Ut(e)!=="svelte-1ofx42v"&&(e.textContent=n),t=fe(o),r=V(o,"BUTTON",{class:!0,"data-svelte-h":!0}),Ut(r)!=="svelte-v36xno"&&(r.textContent=i),this.h()},h(){I(e,"class","on svelte-1mcdez6"),I(r,"class","off svelte-1mcdez6")},m(o,f){C(o,e,f),C(o,t,f),C(o,r,f),a||(s=Ae(r,"click",l[1]),a=!0)},p:ne,d(o){o&&(b(e),b(t),b(r)),a=!1,s()}}}function _1(l){let e,n,t;function r(s,o){return s[0]?m1:h1}let i=r(l),a=i(l);return{c(){e=R("div"),a.c(),this.h()},l(s){e=V(s,"DIV",{class:!0});var o=F(e);a.l(o),o.forEach(b),this.h()},h(){I(e,"class","toggle svelte-1mcdez6")},m(s,o){C(s,e,o),a.m(e,null),t=!0},p(s,[o]){i===(i=r(s))&&a?a.p(s,o):(a.d(1),a=i(s),a&&(a.c(),a.m(e,null)))},i(s){t||(s&&St(()=>{t&&(n||(n=Et(e,an,{},!0)),n.run(1))}),t=!0)},o(s){s&&(n||(n=Et(e,an,{},!1)),n.run(0)),t=!1},d(s){s&&b(e),a.d(),s&&n&&n.end()}}}function g1(l,e,n){let{showCompiled:t}=e;const r=function(){n(0,t=!t)};return l.$$set=i=>{"showCompiled"in i&&n(0,t=i.showCompiled)},[t,r]}class b1 extends _e{constructor(e){super(),ge(this,e,g1,_1,me,{showCompiled:0})}}function xi(l){let e,n,t,r,i,a,s,o,f,u,c,d,h,m,_,y,p;r=new Na({props:{toggled:l[10]}});let D=l[10]&&l[4]&&$i(l),L=l[10]&&ea(l);const N=[D1,C1,p1,y1],S=[];function K(O,E){return O[6]?0:O[8]?1:O[2].loading?2:3}c=K(l),d=S[c]=N[c](l);let B=l[8]>0&&!l[6]&&l[9]&&ta(l);return{c(){e=R("div"),n=R("div"),t=R("button"),U(r.$$.fragment),i=se(),a=ue(l[0]),s=se(),D&&D.c(),o=se(),L&&L.c(),f=se(),u=R("button"),d.c(),h=se(),B&&B.c(),this.h()},l(O){e=V(O,"DIV",{class:!0});var E=F(e);n=V(E,"DIV",{class:!0});var T=F(n);t=V(T,"BUTTON",{type:!0,"aria-label":!0,class:!0});var g=F(t);Y(r.$$.fragment,g),i=fe(g),a=ce(g,l[0]),g.forEach(b),s=fe(T),D&&D.l(T),o=fe(T),L&&L.l(T),T.forEach(b),f=fe(E),u=V(E,"BUTTON",{type:!0,"aria-label":!0,class:!0});var M=F(u);d.l(M),M.forEach(b),h=fe(E),B&&B.l(E),E.forEach(b),this.h()},h(){I(t,"type","button"),I(t,"aria-label","show-sql"),I(t,"class","title svelte-1p12lev"),I(n,"class","container-a svelte-1p12lev"),I(u,"type","button"),I(u,"aria-label","view-query"),I(u,"class",Pl("status-bar")+" svelte-1p12lev"),it(u,"error",l[6]),it(u,"success",!l[6]),it(u,"open",l[9]),it(u,"closed",!l[9]),I(e,"class","scrollbox svelte-1p12lev")},m(O,E){C(O,e,E),q(e,n),q(n,t),Z(r,t,null),q(t,i),q(t,a),q(n,s),D&&D.m(n,null),q(n,o),L&&L.m(n,null),q(e,f),q(e,u),S[c].m(u,null),q(e,h),B&&B.m(e,null),_=!0,y||(p=[Ae(t,"click",l[15]),Ae(u,"click",l[16])],y=!0)},p(O,E){const T={};E&1024&&(T.toggled=O[10]),r.$set(T),(!_||E&1)&&Ce(a,O[0]),O[10]&&O[4]?D?(D.p(O,E),E&1040&&k(D,1)):(D=$i(O),D.c(),k(D,1),D.m(n,o)):D&&(ve(),v(D,1,1,()=>{D=null}),ye()),O[10]?L?(L.p(O,E),E&1024&&k(L,1)):(L=ea(O),L.c(),k(L,1),L.m(n,null)):L&&(ve(),v(L,1,1,()=>{L=null}),ye());let g=c;c=K(O),c===g?S[c].p(O,E):(ve(),v(S[g],1,1,()=>{S[g]=null}),ye(),d=S[c],d?d.p(O,E):(d=S[c]=N[c](O),d.c()),k(d,1),d.m(u,null)),(!_||E&64)&&it(u,"error",O[6]),(!_||E&64)&&it(u,"success",!O[6]),(!_||E&512)&&it(u,"open",O[9]),(!_||E&512)&&it(u,"closed",!O[9]),O[8]>0&&!O[6]&&O[9]?B?(B.p(O,E),E&832&&k(B,1)):(B=ta(O),B.c(),k(B,1),B.m(e,null)):B&&(ve(),v(B,1,1,()=>{B=null}),ye())},i(O){_||(k(r.$$.fragment,O),k(D),k(L),k(d),k(B),O&&St(()=>{_&&(m||(m=Et(e,an,{},!0)),m.run(1))}),_=!0)},o(O){v(r.$$.fragment,O),v(D),v(L),v(d),v(B),O&&(m||(m=Et(e,an,{},!1)),m.run(0)),_=!1},d(O){O&&b(e),z(r),D&&D.d(),L&&L.d(),S[c].d(),B&&B.d(),O&&m&&m.end(),y=!1,ct(p)}}}function $i(l){let e,n,t;function r(a){l[20](a)}let i={};return l[5]!==void 0&&(i.showCompiled=l[5]),e=new b1({props:i}),Le.push(()=>Gt(e,"showCompiled",r)),{c(){U(e.$$.fragment)},l(a){Y(e.$$.fragment,a)},m(a,s){Z(e,a,s),t=!0},p(a,s){const o={};!n&&s&32&&(n=!0,o.showCompiled=a[5],Jt(()=>n=!1)),e.$set(o)},i(a){t||(k(e.$$.fragment,a),t=!0)},o(a){v(e.$$.fragment,a),t=!1},d(a){z(e,a)}}}function ea(l){let e,n,t,r,i;const a=[v1,k1],s=[];function o(f,u){return f[5]?0:1}return n=o(l),t=s[n]=a[n](l),{c(){e=R("div"),t.c(),this.h()},l(f){e=V(f,"DIV",{class:!0});var u=F(e);t.l(u),u.forEach(b),this.h()},h(){I(e,"class","code-container svelte-1p12lev")},m(f,u){C(f,e,u),s[n].m(e,null),i=!0},p(f,u){let c=n;n=o(f),n===c?s[n].p(f,u):(ve(),v(s[c],1,1,()=>{s[c]=null}),ye(),t=s[n],t?t.p(f,u):(t=s[n]=a[n](f),t.c()),k(t,1),t.m(e,null))},i(f){i||(k(t),f&&St(()=>{i&&(r||(r=Et(e,an,{},!0)),r.run(1))}),i=!0)},o(f){v(t),f&&(r||(r=Et(e,an,{},!1)),r.run(0)),i=!1},d(f){f&&b(e),s[n].d(),f&&r&&r.end()}}}function k1(l){let e,n;return e=new Ra({props:{code:l[3]}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&8&&(i.code=t[3]),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function v1(l){let e,n;return e=new Ra({props:{code:l[1].originalText}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&2&&(i.code=t[1].originalText),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function y1(l){let e;return{c(){e=ue("ran successfully but no data was returned")},l(n){e=ce(n,"ran successfully but no data was returned")},m(n,t){C(n,e,t)},p:ne,i:ne,o:ne,d(n){n&&b(e)}}}function p1(l){let e;return{c(){e=ue("loading...")},l(n){e=ce(n,"loading...")},m(n,t){C(n,e,t)},p:ne,i:ne,o:ne,d(n){n&&b(e)}}}function C1(l){let e,n,t=l[8].toLocaleString()+"",r,i,a=l[8]>1?"records":"record",s,o,f=l[7].toLocaleString()+"",u,c,d=l[7]>1?"properties":"property",h,m;return e=new Na({props:{toggled:l[9],color:l[12].colors.info}}),{c(){U(e.$$.fragment),n=se(),r=ue(t),i=se(),s=ue(a),o=ue(" with "),u=ue(f),c=se(),h=ue(d)},l(_){Y(e.$$.fragment,_),n=fe(_),r=ce(_,t),i=fe(_),s=ce(_,a),o=ce(_," with "),u=ce(_,f),c=fe(_),h=ce(_,d)},m(_,y){Z(e,_,y),C(_,n,y),C(_,r,y),C(_,i,y),C(_,s,y),C(_,o,y),C(_,u,y),C(_,c,y),C(_,h,y),m=!0},p(_,y){const p={};y&512&&(p.toggled=_[9]),y&4096&&(p.color=_[12].colors.info),e.$set(p),(!m||y&256)&&t!==(t=_[8].toLocaleString()+"")&&Ce(r,t),(!m||y&256)&&a!==(a=_[8]>1?"records":"record")&&Ce(s,a),(!m||y&128)&&f!==(f=_[7].toLocaleString()+"")&&Ce(u,f),(!m||y&128)&&d!==(d=_[7]>1?"properties":"property")&&Ce(h,d)},i(_){m||(k(e.$$.fragment,_),m=!0)},o(_){v(e.$$.fragment,_),m=!1},d(_){_&&(b(n),b(r),b(i),b(s),b(o),b(u),b(c),b(h)),z(e,_)}}}function D1(l){let e=l[6].message+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r&64&&e!==(e=t[6].message+"")&&Ce(n,e)},i:ne,o:ne,d(t){t&&b(n)}}}function ta(l){let e,n;return e=new d1({props:{data:l[1],queryID:l[0]}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&2&&(i.data=t[1]),r&1&&(i.queryID=t[0]),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function S1(l){let e,n,t,r=l[11]&&xi(l);return{c(){e=R("div"),r&&r.c(),this.h()},l(i){e=V(i,"DIV",{class:!0});var a=F(e);r&&r.l(a),a.forEach(b),this.h()},h(){I(e,"class","over-container svelte-1p12lev")},m(i,a){C(i,e,a),r&&r.m(e,null),t=!0},p(i,[a]){i[11]?r?(r.p(i,a),a&2048&&k(r,1)):(r=xi(i),r.c(),k(r,1),r.m(e,null)):r&&(ve(),v(r,1,1,()=>{r=null}),ye())},i(i){t||(k(r),i&&(n||St(()=>{n=Pn(e,Ma,{}),n.start()})),t=!0)},o(i){v(r),t=!1},d(i){i&&b(e),r&&r.d()}}}function E1(l,e,n){let t,r,i,a,s=ne,o=()=>(s(),s=wt(_,T=>n(2,a=T)),_),f,u,c,d,h;Oe(l,La,T=>n(19,c=T)),Oe(l,Ao,T=>n(11,d=T)),l.$$.on_destroy.push(()=>s());let{queryID:m}=e,{queryResult:_}=e;o();let y=sr("showSQL_".concat(m),!1);Oe(l,y,T=>n(10,u=T));let p=sr(`showResults_${m}`);Oe(l,p,T=>n(9,f=T));const D=function(){En(y,u=!u,u)},L=function(){!B&&a.length>0&&En(p,f=!f,f)};let N,S,K=!0,B;const{theme:O}=Kn();Oe(l,O,T=>n(12,h=T));function E(T){K=T,n(5,K)}return l.$$set=T=>{"queryID"in T&&n(0,m=T.queryID),"queryResult"in T&&o(n(1,_=T.queryResult))},l.$$.update=()=>{if(l.$$.dirty&524288&&n(18,t=c.data.evidencemeta.queries),l.$$.dirty&4&&(a?n(6,B=a.error):n(6,B=new Error("queryResult is undefined"))),l.$$.dirty&4&&n(8,r=(a==null?void 0:a.length)??0),l.$$.dirty&4&&n(7,i=a.columns.length??(a==null?void 0:a._evidenceColumnTypes.length)??0),l.$$.dirty&262145){let T=t==null?void 0:t.find(g=>g.id===m);T&&(n(3,N=T.inputQueryString),n(4,S=T.compiled&&T.compileError===void 0))}},[m,_,a,N,S,K,B,i,r,f,u,d,h,y,p,D,L,O,t,c,E]}class Rg extends _e{constructor(e){super(),ge(this,e,E1,S1,me,{queryID:0,queryResult:1})}}function T1(l){let e,n;return e=new No({props:{error:l[2]}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.error=t[2]),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function M1(l){let e,n=rn(l[1],l[3])+"",t;return{c(){e=R("span"),t=ue(n),this.h()},l(r){e=V(r,"SPAN",{style:!0});var i=F(e);t=ce(i,n),i.forEach(b),this.h()},h(){We(e,"color",l[4])},m(r,i){C(r,e,i),q(e,t)},p(r,i){i&10&&n!==(n=rn(r[1],r[3])+"")&&Ce(t,n),i&16&&We(e,"color",r[4])},i:ne,o:ne,d(r){r&&b(e)}}}function O1(l){let e,n,t,r,i,a="Placeholder: no data currently referenced.";return{c(){e=R("span"),n=ue("["),t=ue(l[0]),r=ue("]"),i=R("span"),i.textContent=a,this.h()},l(s){e=V(s,"SPAN",{class:!0});var o=F(e);n=ce(o,"["),t=ce(o,l[0]),r=ce(o,"]"),i=V(o,"SPAN",{class:!0,"data-svelte-h":!0}),Ut(i)!=="svelte-ddarzq"&&(i.textContent=a),o.forEach(b),this.h()},h(){I(i,"class","error-msg svelte-1qvl5jp"),I(e,"class","placeholder svelte-1qvl5jp")},m(s,o){C(s,e,o),q(e,n),q(e,t),q(e,r),q(e,i)},p(s,o){o&1&&Ce(t,s[0])},i:ne,o:ne,d(s){s&&b(e)}}}function P1(l){let e,n,t,r;const i=[O1,M1,T1],a=[];function s(o,f){return o[0]?0:o[2]?2:1}return e=s(l),n=a[e]=i[e](l),{c(){n.c(),t=X()},l(o){n.l(o),t=X()},m(o,f){a[e].m(o,f),C(o,t,f),r=!0},p(o,[f]){let u=e;e=s(o),e===u?a[e].p(o,f):(ve(),v(a[u],1,1,()=>{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function I1(l,e,n){let t,r,i=ne,a=()=>(i(),i=wt(t,S=>n(14,r=S)),t);l.$$.on_destroy.push(()=>i());const{resolveColor:s}=Kn();let{data:o=null}=e,{row:f=0}=e,{column:u=null}=e,{value:c=null}=e,{placeholder:d=null}=e,{fmt:h=void 0}=e,m,_,y,{color:p=void 0}=e,D="",{redNegatives:L=!1}=e,N;return l.$$set=S=>{"data"in S&&n(6,o=S.data),"row"in S&&n(9,f=S.row),"column"in S&&n(7,u=S.column),"value"in S&&n(10,c=S.value),"placeholder"in S&&n(0,d=S.placeholder),"fmt"in S&&n(11,h=S.fmt),"color"in S&&n(12,p=S.color),"redNegatives"in S&&n(8,L=S.redNegatives)},l.$$.update=()=>{var S;if(l.$$.dirty&1152&&n(7,u=u??c),l.$$.dirty&10949)try{if(n(2,y=void 0),!d)if(o){if(typeof o=="string")throw Error(`Received: data=${o}, expected: data={${o}}`);if(Array.isArray(o)||n(6,o=[o]),isNaN(f))throw Error("row must be a number (row="+f+")");try{Object.keys(o[f])[0]}catch{throw Error("Row "+f+" does not exist in the dataset")}n(7,u=u??Object.keys(o[f])[0]),Bn(o,[u]),n(13,N=ql(o,"array"));const K=N.filter(B=>{var O;return B.type==="date"&&!(((O=o[0])==null?void 0:O[B.id])instanceof Date)}).map(B=>B.id);for(let B=0;BB.id===u)),h?n(3,m=Lo(h,(S=N[0].format)==null?void 0:S.valueType)):n(3,m=N[0].format)}else throw Error("No data provided. If you referenced a query result, check that the name is correct.")}catch(K){n(2,y=K.message),console.error("\x1B[31m%s\x1B[0m",`Error in Value: ${y}`)}l.$$.dirty&1152&&c&&u&&console.warn('Both "value" and "column" were supplied as props to Value. "value" will be ignored.'),l.$$.dirty&4096&&a(n(5,t=s(p))),l.$$.dirty&256&&n(8,L=L==="true"||L===!0),l.$$.dirty&16642&&(L||r)&&(L&&_<0?n(4,D="rgb(220 38 38)"):r&&n(4,D=r))},[d,_,y,m,D,t,o,u,L,f,c,h,p,N,r]}class A1 extends _e{constructor(e){super(),ge(this,e,I1,P1,me,{data:6,row:9,column:7,value:10,placeholder:0,fmt:11,color:12,redNegatives:8})}}function w1(l){let e;const n=l[7].default,t=re(n,l,l[8],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&256)&&ie(t,n,r,r[8],e?oe(n,r[8],i,null):ae(r[8]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function L1(l){let e,n;const t=[l[4],{data:Nt.isQuery(l[11])?Array.from(l[11]):l[11]}];let r={$$slots:{default:[w1]},$$scope:{ctx:l}};for(let i=0;i{t=null}),ye()):t?(t.p(r,i),i&16&&k(t,1)):(t=na(r),t.c(),k(t,1),t.m(e,null))},i(r){n||(k(t),n=!0)},o(r){v(t),n=!1},d(r){r&&b(e),t&&t.d()}}}function R1(l){let e,n="Loading...";return{c(){e=R("span"),e.textContent=n,this.h()},l(t){e=V(t,"SPAN",{slot:!0,class:!0,"data-svelte-h":!0}),Ut(e)!=="svelte-89gxhc"&&(e.textContent=n),this.h()},h(){I(e,"slot","skeleton"),I(e,"class","text-base-content-muted")},m(t,r){C(t,e,r)},p:ne,d(t){t&&b(e)}}}function V1(l){let e,n;return e=new Gn({props:{data:l[0],$$slots:{skeleton:[R1],empty:[N1],default:[L1,({loaded:t})=>({11:t}),({loaded:t})=>t?2048:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,[r]){const i={};r&1&&(i.data=t[0]),r&2334&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}let B1="Value";function F1(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{data:a}=e,{column:s}=e,{agg:o}=e;const f=Nt.isQuery(a)?a.hash:void 0;let u=(a==null?void 0:a.hash)===f,{emptySet:c=void 0}=e,{emptyMessage:d=void 0}=e;return l.$$set=h=>{n(10,e=w(w({},e),Te(h))),"data"in h&&n(0,a=h.data),"column"in h&&n(5,s=h.column),"agg"in h&&n(6,o=h.agg),"emptySet"in h&&n(1,c=h.emptySet),"emptyMessage"in h&&n(2,d=h.emptyMessage),"$$scope"in h&&n(8,i=h.$$scope)},l.$$.update=()=>{l.$$.dirty&97&&o&&n(0,a=a.groupBy(void 0).agg({[o]:{col:s,as:s}})),l.$$.dirty&1&&n(3,u=(a==null?void 0:a.hash)===f),n(4,t=Object.fromEntries(Object.entries(e).filter(([,h])=>h!==void 0)))},e=Te(e),[a,c,d,u,t,s,o,r,i]}class Qn extends _e{constructor(e){super(),ge(this,e,F1,V1,me,{data:0,column:5,agg:6,emptySet:1,emptyMessage:2})}}function W1(l){let e;const n=l[6].default,t=re(n,l,l[7],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&128)&&ie(t,n,r,r[7],e?oe(n,r[7],i,null):ae(r[7]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function q1(l){let e,n;const t=[l[4],{data:Nt.isQuery(l[10])?Array.from(l[10]):l[10]},{queryID:l[5]}];let r={$$slots:{default:[W1]},$$scope:{ctx:l}};for(let i=0;i({10:t}),({loaded:t})=>t?1024:0],empty:[j1],default:[q1,({loaded:t})=>({10:t}),({loaded:t})=>t?1024:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,[r]){const i={};r&1&&(i.data=t[0]),r&1182&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}let Z1="Sparkline";function z1(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{data:a}=e;const s=Nt.isQuery(a)?a.hash:void 0;let o=(a==null?void 0:a.hash)===s,{emptySet:f=void 0}=e,{emptyMessage:u=void 0}=e,c=a==null?void 0:a.id;return l.$$set=d=>{n(9,e=w(w({},e),Te(d))),"data"in d&&n(0,a=d.data),"emptySet"in d&&n(1,f=d.emptySet),"emptyMessage"in d&&n(2,u=d.emptyMessage),"$$scope"in d&&n(7,i=d.$$scope)},l.$$.update=()=>{l.$$.dirty&1&&n(3,o=(a==null?void 0:a.hash)===s),n(4,t={...Object.fromEntries(Object.entries(e).filter(([,d])=>d!==void 0))})},e=Te(e),[a,f,u,o,t,c,r,i]}class H1 extends _e{constructor(e){super(),ge(this,e,z1,Y1,me,{data:0,emptySet:1,emptyMessage:2})}}function J1(l){let e,n,t,r,i,a,s,o,f,u;const c=[Q1,K1],d=[];function h(y,p){return y[19]?0:1}i=h(l),a=d[i]=c[i](l);let m=l[8]&&la(l),_=l[7]&&ra(l);return{c(){e=R("p"),n=ue(l[3]),t=se(),r=R("div"),a.c(),s=se(),m&&m.c(),o=se(),_&&_.c(),f=X(),this.h()},l(y){e=V(y,"P",{class:!0});var p=F(e);n=ce(p,l[3]),p.forEach(b),t=fe(y),r=V(y,"DIV",{class:!0});var D=F(r);a.l(D),s=fe(D),m&&m.l(D),D.forEach(b),o=fe(y),_&&_.l(y),f=X(),this.h()},h(){I(e,"class","text-sm"),I(r,"class","relative text-xl font-medium my-0.5")},m(y,p){C(y,e,p),q(e,n),C(y,t,p),C(y,r,p),d[i].m(r,null),q(r,s),m&&m.m(r,null),C(y,o,p),_&&_.m(y,p),C(y,f,p),u=!0},p(y,p){(!u||p&8)&&Ce(n,y[3]);let D=i;i=h(y),i===D?d[i].p(y,p):(ve(),v(d[D],1,1,()=>{d[D]=null}),ye(),a=d[i],a?a.p(y,p):(a=d[i]=c[i](y),a.c()),k(a,1),a.m(r,s)),y[8]?m?(m.p(y,p),p&256&&k(m,1)):(m=la(y),m.c(),k(m,1),m.m(r,null)):m&&(ve(),v(m,1,1,()=>{m=null}),ye()),y[7]?_?(_.p(y,p),p&128&&k(_,1)):(_=ra(y),_.c(),k(_,1),_.m(f.parentNode,f)):_&&(ve(),v(_,1,1,()=>{_=null}),ye())},i(y){u||(k(a),k(m),k(_),u=!0)},o(y){v(a),v(m),v(_),u=!1},d(y){y&&(b(e),b(t),b(r),b(o),b(f)),d[i].d(),m&&m.d(),_&&_.d(y)}}}function G1(l){let e,n;return e=new Oa({props:{chartType:"Big Value",error:l[20].message}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&1048576&&(i.error=t[20].message),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function K1(l){let e,n;return e=new Qn({props:{data:l[0],column:l[6],fmt:l[13]}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.data=t[0]),r&64&&(i.column=t[6]),r&8192&&(i.fmt=t[13]),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function Q1(l){let e,n,t,r;return n=new Qn({props:{data:l[0],column:l[6],fmt:l[13]}}),{c(){e=R("a"),U(n.$$.fragment),this.h()},l(i){e=V(i,"A",{class:!0,href:!0});var a=F(e);Y(n.$$.fragment,a),a.forEach(b),this.h()},h(){I(e,"class","hover:bg-base-200"),I(e,"href",t=ll(l[19]))},m(i,a){C(i,e,a),Z(n,e,null),r=!0},p(i,a){const s={};a&1&&(s.data=i[0]),a&64&&(s.column=i[6]),a&8192&&(s.fmt=i[13]),n.$set(s),(!r||a&524288&&t!==(t=ll(i[19])))&&I(e,"href",t)},i(i){r||(k(n.$$.fragment,i),r=!0)},o(i){v(n.$$.fragment,i),r=!1},d(i){i&&b(e),z(n)}}}function la(l){let e,n;return e=new H1({props:{height:"15",data:l[0],dateCol:l[8],valueCol:l[6],type:l[9],interactive:"true",color:l[21],valueFmt:l[13]??l[10],dateFmt:l[11],yScale:l[2],connectGroup:l[12]}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.data=t[0]),r&256&&(i.dateCol=t[8]),r&64&&(i.valueCol=t[6]),r&512&&(i.type=t[9]),r&2097152&&(i.color=t[21]),r&9216&&(i.valueFmt=t[13]??t[10]),r&2048&&(i.dateFmt=t[11]),r&4&&(i.yScale=t[2]),r&4096&&(i.connectGroup=t[12]),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function ra(l){let e,n,t,r;const i=[x1,X1],a=[];function s(o,f){return o[1]?0:1}return e=s(l),n=a[e]=i[e](l),{c(){n.c(),t=X()},l(o){n.l(o),t=X()},m(o,f){a[e].m(o,f),C(o,t,f),r=!0},p(o,f){let u=e;e=s(o),e===u?a[e].p(o,f):(ve(),v(a[u],1,1,()=>{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}function X1(l){let e,n,t,r,i,a,s;const o=[e_,$1],f=[];function u(c,d){return c[19]?0:1}return n=u(l),t=f[n]=o[n](l),{c(){e=R("p"),t.c(),r=se(),i=R("span"),a=ue(l[4]),this.h()},l(c){e=V(c,"P",{class:!0});var d=F(e);t.l(d),r=fe(d),i=V(d,"SPAN",{});var h=F(i);a=ce(h,l[4]),h.forEach(b),d.forEach(b),this.h()},h(){I(e,"class","text-xs font-sans /60 pt-[0.5px]")},m(c,d){C(c,e,d),f[n].m(e,null),q(e,r),q(e,i),q(i,a),s=!0},p(c,d){let h=n;n=u(c),n===h?f[n].p(c,d):(ve(),v(f[h],1,1,()=>{f[h]=null}),ye(),t=f[n],t?t.p(c,d):(t=f[n]=o[n](c),t.c()),k(t,1),t.m(e,r)),(!s||d&16)&&Ce(a,c[4])},i(c){s||(k(t),s=!0)},o(c){v(t),s=!1},d(c){c&&b(e),f[n].d()}}}function x1(l){let e,n,t;return n=new Vo({props:{data:l[0],column:l[7],fmt:l[14],fontClass:"text-xs",symbolPosition:"left",neutralMin:l[15],neutralMax:l[16],text:l[4],downIsGood:l[5]}}),{c(){e=R("p"),U(n.$$.fragment),this.h()},l(r){e=V(r,"P",{class:!0});var i=F(e);Y(n.$$.fragment,i),i.forEach(b),this.h()},h(){I(e,"class","text-xs font-sans")},m(r,i){C(r,e,i),Z(n,e,null),t=!0},p(r,i){const a={};i&1&&(a.data=r[0]),i&128&&(a.column=r[7]),i&16384&&(a.fmt=r[14]),i&32768&&(a.neutralMin=r[15]),i&65536&&(a.neutralMax=r[16]),i&16&&(a.text=r[4]),i&32&&(a.downIsGood=r[5]),n.$set(a)},i(r){t||(k(n.$$.fragment,r),t=!0)},o(r){v(n.$$.fragment,r),t=!1},d(r){r&&b(e),z(n)}}}function $1(l){let e,n;return e=new Qn({props:{data:l[0],column:l[7],fmt:l[14]}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&1&&(i.data=t[0]),r&128&&(i.column=t[7]),r&16384&&(i.fmt=t[14]),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function e_(l){let e,n,t,r;return n=new Qn({props:{data:l[0],column:l[7],fmt:l[14]}}),{c(){e=R("a"),U(n.$$.fragment),this.h()},l(i){e=V(i,"A",{class:!0,href:!0});var a=F(e);Y(n.$$.fragment,a),a.forEach(b),this.h()},h(){I(e,"class","hover:bg-base-200"),I(e,"href",t=ll(l[19]))},m(i,a){C(i,e,a),Z(n,e,null),r=!0},p(i,a){const s={};a&1&&(s.data=i[0]),a&128&&(s.column=i[7]),a&16384&&(s.fmt=i[14]),n.$set(s),(!r||a&524288&&t!==(t=ll(i[19])))&&I(e,"href",t)},i(i){r||(k(n.$$.fragment,i),r=!0)},o(i){v(n.$$.fragment,i),r=!1},d(i){i&&b(e),z(n)}}}function t_(l){let e,n,t,r,i;const a=[G1,J1],s=[];function o(f,u){return f[20]?0:1}return n=o(l),t=s[n]=a[n](l),{c(){e=R("div"),t.c(),this.h()},l(f){e=V(f,"DIV",{class:!0,style:!0});var u=F(e);t.l(u),u.forEach(b),this.h()},h(){I(e,"class","inline-block font-sans pt-2 pb-3 pr-3 pl-0 mr-3 items-center align-top"),I(e,"style",r=` + min-width: ${l[18]}; + max-width: ${l[17]}; + `)},m(f,u){C(f,e,u),s[n].m(e,null),i=!0},p(f,[u]){let c=n;n=o(f),n===c?s[n].p(f,u):(ve(),v(s[c],1,1,()=>{s[c]=null}),ye(),t=s[n],t?t.p(f,u):(t=s[n]=a[n](f),t.c()),k(t,1),t.m(e,null)),(!i||u&393216&&r!==(r=` + min-width: ${f[18]}; + max-width: ${f[17]}; + `))&&I(e,"style",r)},i(f){i||(k(t),i=!0)},o(f){v(t),i=!1},d(f){f&&b(e),s[n].d()}}}function n_(l,e,n){let t;const{resolveColor:r}=Kn();let{data:i}=e,{value:a=null}=e,{comparison:s=null}=e,{comparisonDelta:o=!0}=e,{sparkline:f=null}=e,{sparklineType:u="line"}=e,{sparklineColor:c=void 0}=e,{sparklineValueFmt:d=void 0}=e,{sparklineDateFmt:h=void 0}=e,{sparklineYScale:m=!1}=e,{connectGroup:_=void 0}=e,{fmt:y=void 0}=e,{comparisonFmt:p=void 0}=e,{title:D=null}=e,{comparisonTitle:L=null}=e,{downIsGood:N=!1}=e,{neutralMin:S=0}=e,{neutralMax:K=0}=e,{maxWidth:B="none"}=e,{minWidth:O="18%"}=e,{link:E=null}=e,T;return l.$$set=g=>{"data"in g&&n(0,i=g.data),"value"in g&&n(6,a=g.value),"comparison"in g&&n(7,s=g.comparison),"comparisonDelta"in g&&n(1,o=g.comparisonDelta),"sparkline"in g&&n(8,f=g.sparkline),"sparklineType"in g&&n(9,u=g.sparklineType),"sparklineColor"in g&&n(22,c=g.sparklineColor),"sparklineValueFmt"in g&&n(10,d=g.sparklineValueFmt),"sparklineDateFmt"in g&&n(11,h=g.sparklineDateFmt),"sparklineYScale"in g&&n(2,m=g.sparklineYScale),"connectGroup"in g&&n(12,_=g.connectGroup),"fmt"in g&&n(13,y=g.fmt),"comparisonFmt"in g&&n(14,p=g.comparisonFmt),"title"in g&&n(3,D=g.title),"comparisonTitle"in g&&n(4,L=g.comparisonTitle),"downIsGood"in g&&n(5,N=g.downIsGood),"neutralMin"in g&&n(15,S=g.neutralMin),"neutralMax"in g&&n(16,K=g.neutralMax),"maxWidth"in g&&n(17,B=g.maxWidth),"minWidth"in g&&n(18,O=g.minWidth),"link"in g&&n(19,E=g.link)},l.$$.update=()=>{var g;if(l.$$.dirty&2&&n(1,o=o==="true"||o===!0),l.$$.dirty&4194304&&n(21,t=r(c)),l.$$.dirty&4&&n(2,m=m==="true"||m===!0),l.$$.dirty&32&&n(5,N=N==="true"||N===!0),l.$$.dirty&1049049)try{if(n(20,T=void 0),!a)throw new Error("value is required");Array.isArray(i)||n(0,i=[i]),Bn(i,[a]);let M=ql(i,"array"),P=M.find(te=>te.id===a);if(n(3,D=D??(P?P.title:null)),s){Bn(i,[s]);let te=M.find(Ie=>Ie.id===s);n(4,L=L??(te?te.title:null))}if(f&&(Bn(i,[f]),((g=M.find(te=>te.id===f))==null?void 0:g.type)!=="date"))throw Error("sparkline must be a date column")}catch(M){n(20,T=M),console.error("\x1B[31m%s\x1B[0m",`Error in Big Value: ${T.message}`)}},[i,o,m,D,L,N,a,s,f,u,d,h,_,y,p,S,K,B,O,E,T,t,c]}let l_=class extends _e{constructor(e){super(),ge(this,e,n_,t_,me,{data:0,value:6,comparison:7,comparisonDelta:1,sparkline:8,sparklineType:9,sparklineColor:22,sparklineValueFmt:10,sparklineDateFmt:11,sparklineYScale:2,connectGroup:12,fmt:13,comparisonFmt:14,title:3,comparisonTitle:4,downIsGood:5,neutralMin:15,neutralMax:16,maxWidth:17,minWidth:18,link:19})}};function r_(l){let e;const n=l[6].default,t=re(n,l,l[7],null);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&128)&&ie(t,n,r,r[7],e?oe(n,r[7],i,null):ae(r[7]),null)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function i_(l){let e,n;const t=[l[4],{data:Nt.isQuery(l[9])?Array.from(l[9]):l[9]}];let r={$$slots:{default:[r_]},$$scope:{ctx:l}};for(let i=0;i({9:t}),({loaded:t})=>t?512:0],empty:[o_],error:[a_,({loaded:t})=>({9:t}),({loaded:t})=>t?512:0],default:[i_,({loaded:t})=>({9:t}),({loaded:t})=>t?512:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,[r]){const i={};r&1&&(i.data=t[0]),r&702&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}let u_="Big Value";function c_(l,e,n){let t,{$$slots:r={},$$scope:i}=e,{data:a}=e;const s=Nt.isQuery(a)?a.hash:void 0;let o=(a==null?void 0:a.hash)===s,{emptySet:f=void 0}=e,{emptyMessage:u=void 0}=e;return l.$$set=c=>{n(5,e=w(w({},e),Te(c))),"data"in c&&n(0,a=c.data),"emptySet"in c&&n(1,f=c.emptySet),"emptyMessage"in c&&n(2,u=c.emptyMessage),"$$scope"in c&&n(7,i=c.$$scope)},l.$$.update=()=>{l.$$.dirty&1&&n(3,o=(a==null?void 0:a.hash)===s),n(4,t=Object.fromEntries(Object.entries(e).filter(([,c])=>c!==void 0)))},e=Te(e),[a,f,u,o,t,e,r,i]}class Bg extends _e{constructor(e){super(),ge(this,e,c_,f_,me,{data:0,emptySet:1,emptyMessage:2})}}const d_={trailing:!0};function h_(l,e=25,n={}){if(n={...d_,...n},!Number.isFinite(e))throw new TypeError("Expected `wait` to be a finite number");let t,r,i=[],a,s;const o=(f,u)=>(a=m_(l,f,u),a.finally(()=>{if(a=null,n.trailing&&s&&!r){const c=o(f,s);return s=null,c}}),a);return function(...f){return a?(n.trailing&&(s=f),a):new Promise(u=>{const c=!r&&n.leading;clearTimeout(r),r=setTimeout(()=>{r=null;const d=n.leading?t:o(this,f);for(const h of i)h(d);i=[]},e),c?(t=o(this,f),u(t)):i.push(u)})}}async function m_(l,e,n){return await l.apply(e,n)}function __(l){l.Map.mergeOptions({smoothWheelZoom:!0,smoothSensitivity:1}),l.Map.SmoothWheelZoom=l.Handler.extend({addHooks:function(){l.DomEvent.on(this._map._container,"wheel",this._onWheelScroll,this)},removeHooks:function(){l.DomEvent.off(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){this._isWheeling||this._onWheelStart(e),this._onWheeling(e)},_onWheelStart:function(e){var n=this._map;this._isWheeling=!0,this._wheelMousePosition=n.mouseEventToContainerPoint(e),this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),this._wheelStartLatLng=n.containerPointToLatLng(this._wheelMousePosition),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),n._panAnim&&n._panAnim.stop(),this._goalZoom=n.getZoom(),this._prevCenter=n.getCenter(),this._prevZoom=n.getZoom(),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this))},_onWheeling:function(e){var n=this._map;this._goalZoom=this._goalZoom+l.DomEvent.getWheelDelta(e)*.003*n.options.smoothSensitivity,(this._goalZoomn.getMaxZoom())&&(this._goalZoom=n._limitZoom(this._goalZoom)),this._wheelMousePosition=this._map.mouseEventToContainerPoint(e),clearTimeout(this._timeoutId),this._timeoutId=setTimeout(this._onWheelEnd.bind(this),200),l.DomEvent.preventDefault(e),l.DomEvent.stopPropagation(e)},_onWheelEnd:function(){this._isWheeling=!1,cancelAnimationFrame(this._zoomAnimationId),this._map._moveEnd(!0)},_updateWheelZoom:function(){var e=this._map;if(!(!e.getCenter().equals(this._prevCenter)||e.getZoom()!=this._prevZoom)){this._zoom=e.getZoom()+(this._goalZoom-e.getZoom())*.3,this._zoom=Math.floor(this._zoom*100)/100;var n=this._wheelMousePosition.subtract(this._centerPoint);n.x===0&&n.y===0||(e.options.smoothWheelZoom==="center"?this._center=this._startLatLng:this._center=e.unproject(e.project(this._wheelStartLatLng,this._zoom).subtract(n),this._zoom),this._moved||(e._moveStart(!0,!1),this._moved=!0),e._move(this._center,this._zoom),this._prevCenter=e.getCenter(),this._prevZoom=e.getZoom(),this._zoomAnimationId=requestAnimationFrame(this._updateWheelZoom.bind(this)))}}}),l.Map.addInitHook("addHandler","smoothWheelZoom",l.Map.SmoothWheelZoom)}let pt;var lt,Wt,en,_n,tn,At,Sn,nn,jn,ln,Un,Yn,Zn,zn;const Fn=class Fn{constructor(){_t(this,lt);_t(this,Wt,null);_t(this,en,new Map);_t(this,_n);_t(this,tn,Bo());_t(this,At);_t(this,Sn,!1);_t(this,nn);gl(this,"updateBounds",h_(()=>{if(Pt(this,At,pt.latLngBounds()),be(this,lt).eachLayer(e=>{(e instanceof pt.Marker||e instanceof pt.CircleMarker||e instanceof pt.GeoJSON)&&be(this,At).extend(e.getBounds?e.getBounds():e.getLatLng())}),be(this,At).isValid())be(this,lt).fitBounds(be(this,At),{maxZoom:12}),be(this,nn)&&be(this,lt).setZoom(be(this,nn));else throw console.error("Bounds are invalid!",be(this,At)),new Error("Bounds are invalid!")},100));_t(this,ln,st(new Map));gl(this,"allGeoJsonLoaded",Ze(be(this,ln),e=>Array.from(e.values()).every(Boolean)));_t(this,Un,st("bottomLeft"));_t(this,Yn,st([]));_t(this,Zn,[]);_t(this,zn,st(void 0));Pt(this,Wt,null),Pt(this,en,new Map)}get initPromise(){return be(this,tn).promise}get mapEl(){return be(this,_n)}async init(e,n,t,r,i=!1,a){if(pt||(be(this,tn).start(),pt=await ns(()=>import("./leaflet-src.CnxXdW4o.js").then(o=>o.l),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(o=>{const f=o.default;return __(f),f}).catch(o=>{be(this,tn).reject(o)})),Pt(this,nn,r),be(this,_n)){const o=new Error("Evidence Map already initialized");throw be(this,tn).reject(o),o}Pt(this,_n,e),Pt(this,lt,pt.map(be(this,_n),{zoomControl:!1,scrollWheelZoom:!1,smoothWheelZoom:!0,smoothSensitivity:5}).setView(t,r??5)),i&&Pt(this,Sn,!0);const s=this.processBasemapUrl(n);pt.tileLayer(s,{subdomains:"abcd",maxZoom:20,className:"__evidence-leaflet-tile-layer__",attribution:a}).addTo(be(this,lt)),a||be(this,lt).removeControl(be(this,lt).attributionControl),Pt(this,At,pt.latLngBounds()),be(this,tn).resolve()}cleanup(){be(this,lt).remove()}addArea(e,n,t,r,i,a,s,o,f){if(!pt)throw new Error("Leaflet is not yet available");this.lastSelectedLayer||(this.lastSelectedLayer=null),this.originalStyles||(this.originalStyles=new Map);const u=pt.geoJSON(t,{...r,onEachFeature:(c,d)=>{this.originalStyles.set(d,r),d.on("click",()=>{this.lastSelectedLayer===d?(d.setStyle(this.originalStyles.get(d)),o(e,n),this.lastSelectedLayer=null):(this.lastSelectedLayer&&this.lastSelectedLayer.setStyle(this.originalStyles.get(this.lastSelectedLayer)),d.bringToFront(),d.setStyle(i),s(e,n),this.lastSelectedLayer=d),a(c),f&&(window.location.href=f)})}}).addTo(be(this,lt));return be(this,At).extend(u.getBounds()),be(this,Sn)?be(this,lt).setZoom(be(this,nn)??5):this.updateBounds(),u.bringToBack(),u}addCircle(e,n,t,r,i,a,s,o,f){if(!pt)throw new Error("Leaflet is not yet available");be(this,lt).getPane(t.pane)||(be(this,lt).createPane(t.pane),be(this,Zn).forEach((c,d)=>{c===t.pane&&(be(this,lt).getPane(c).style.zIndex=400+d)}));const u=pt.circleMarker(i,t);return u.addTo(be(this,lt)),this.updateMarkerStyle(u,t),u.on("click",()=>{if(a(),be(this,Wt)===u){const c={...be(this,en).get(u)};this.updateMarkerStyle(u,c),Pt(this,Wt,null),o(n),a(null)}else{if(be(this,Wt)){const c={...be(this,en).get(be(this,Wt))};this.updateMarkerStyle(be(this,Wt),c)}this.updateMarkerStyle(u,r),Pt(this,Wt,u),s(e,n),a(u)}u.bringToFront(),f&&(window.location.href=f)}),i&&Array.isArray(i)&&i.length===2&&!be(this,Sn)?(be(this,At).extend(i),this.updateBounds()):be(this,lt).setZoom(be(this,nn)??5),u}updateMarkerStyle(e,n){e.setStyle(n),be(this,en).has(e)||be(this,en).set(e,{...n})}buildTooltip(e,n){let t="",r=n.map(i=>({id:i.id,title:i.title??i.id,showColumnName:i.showColumnName===void 0?!0:i.showColumnName,fieldClass:i.fieldClass??"default-field-class",valueClass:i.valueClass??"default-value-class",fmt:i.fmt??"num0",formatColumnTitle:i.formatColumnTitle===void 0&&i.title===void 0?!0:i.formatColumnTitle,contentType:i.contentType??"text",linkLabel:i.linkLabel??void 0}));if(r)for(let i=0;i`+(r[i].showColumnName?`${r[i].formatColumnTitle?Fo(r[i].title):r[i].title}`:"")+(r[i].contentType==="link"?`${r[i].linkLabel?r[i].linkLabel:Dn(e[r[i].id],r[i].fmt)}`:`${Dn(e[r[i].id],r[i].fmt)}`)+"";return t}attachTooltip(e,n,t,r){r==="hover"?e.bindTooltip(n,t):r==="click"?e.bindPopup(n,t):console.error("tooltipType must be 'hover' or 'click'")}processBasemapUrl(e){const n=window.devicePixelRatio||1;let t=e;return t.includes("{r}")&&(t=t.replace("{r}",n>1?"@2x":"")),t.includes("{ext}")&&(t=t.replace("{ext}","png")),t}get geoJsonData(){return tl(be(this,ln))}async loadGeoJson(e){const n=be(Fn,jn).get(e);if(n)return n;const t=fetch(e).then(i=>i.json()).catch(i=>{be(this,ln).update(a=>(a.delete(e),a)),console.error(`Failed to load GeoJSON at URL '${e}': ${i}`)});be(Fn,jn).set(e,t),be(this,ln).update(i=>i.set(e,null));const r=await t;return be(this,ln).update(i=>(r?i.set(e,r):i.delete(e),i)),r}handleLegendValues(e,n,t){if(t==="categorical"){n=[...new Set(n)];let i=0;for(;e.length=e.length&&(i=0),e.push(e[i]),i++}else t==="scalar"&&n.forEach(r=>{typeof r!="number"&&r!==null&&console.error("Scalar legend requires numeric values or null."),typeof r=="number"&&isNaN(r)&&console.error("Scalar legend requires valid numeric values.")});return n}handleFillColor(e,n,t,r,i,a){if(!n)return a.colors.primary;if(e[n])return typeof e[n]=="string"?r[t.indexOf(e[n])]:i(e[n])}updateLegendPosition(e){be(this,Un).set(e)}get legendPosition(){let e;return be(this,Un).subscribe(n=>e=n)(),e}buildLegend(e,n,t,r,i,a,s,o,f,u){const c=()=>({colorPalette:e,values:n,minValue:t,maxValue:r,legendType:i,valueFmt:a,chartType:s,legendId:o,value:f,legend:u});be(this,Yn).update(d=>{const h=d.findIndex(m=>m.legendId===o);return h!==-1?d.map((m,_)=>_===h?{...u,...c()}:m):o!==void 0?[...d,c()]:d})}get legendData(){return tl(be(this,Yn))}async initializeData(e,{corordinates:n,value:t,checkInputs:r,min:i,max:a,colorPalette:s,legendType:o,valueFmt:f,chartType:u,legendId:c,legend:d,theme:h}){await e.fetch(),r(e,n);let m=e.map(D=>D[t]),_=Math.min(...m),y=Math.max(...m),p;return o||(typeof m[0]=="number"?o="scalar":o="categorical"),o&&!s&&(s=o==="categorical"?h.colorPalettes.default:h.colorScales.default,s=s.map(D=>fr(D).hex())),p=fr.scale(s).domain([i??_,a??y]),d&&t&&(m=this.handleLegendValues(s,m,o),this.buildLegend(s,m,_,y,o,f,u,c,t,d)),{values:m,colorPalette:s,colorScale:p}}registerPane(e){return be(this,Zn).push(e),e}handleInternalError(e){e&&be(this,zn).set(e)}get internalError(){return tl(be(this,zn))}};lt=new WeakMap,Wt=new WeakMap,en=new WeakMap,_n=new WeakMap,tn=new WeakMap,At=new WeakMap,Sn=new WeakMap,nn=new WeakMap,jn=new WeakMap,ln=new WeakMap,Un=new WeakMap,Yn=new WeakMap,Zn=new WeakMap,zn=new WeakMap,_t(Fn,jn,new Map);let Nl=Fn;const lo=Symbol("EvidenceMapContext");function ia(l,e,n){const t=l.slice();return t[7]=e[n],t[9]=n,t}function aa(l){let e,n,t,r,i,a=(l[7]||"No value")+"",s,o,f;return{c(){e=R("div"),n=R("span"),r=se(),i=R("span"),s=ue(a),f=se(),this.h()},l(u){e=V(u,"DIV",{class:!0});var c=F(e);n=V(c,"SPAN",{class:!0,style:!0}),F(n).forEach(b),r=fe(c),i=V(c,"SPAN",{class:!0,title:!0});var d=F(i);s=ce(d,a),d.forEach(b),f=fe(c),c.forEach(b),this.h()},h(){I(n,"class",t="inline-block h-[8px] "+(l[0].chartType==="Area Map"?"":"rounded-full")+" w-[8px]"),We(n,"background-color",l[0].colorPalette[l[9]]),I(i,"class","inline-block ml-2 truncate max-w-[calc(100%-16px)]"),I(i,"title",o=l[7]),I(e,"class","flex items-center")},m(u,c){C(u,e,c),q(e,n),q(e,r),q(e,i),q(i,s),q(e,f)},p(u,c){c&1&&t!==(t="inline-block h-[8px] "+(u[0].chartType==="Area Map"?"":"rounded-full")+" w-[8px]")&&I(n,"class",t),c&1&&We(n,"background-color",u[0].colorPalette[u[9]]),c&1&&a!==(a=(u[7]||"No value")+"")&&Ce(s,a),c&1&&o!==(o=u[7])&&I(i,"title",o)},d(u){u&&b(e)}}}function g_(l){let e,n,t,r,i,a,s,o,f,u=Ve(l[0].values),c=[];for(let d=0;di-50;return l.$$set=u=>{"legend"in u&&n(0,t=u.legend),"hideLegend"in u&&n(1,r=u.hideLegend),"height"in u&&n(2,i=u.height),"capitalize"in u&&n(5,a=u.capitalize)},[t,r,i,s,f,a]}class k_ extends _e{constructor(e){super(),ge(this,e,b_,g_,me,{legend:0,hideLegend:1,height:2,capitalize:5})}}function v_(l){let e,n,t,r,i,a,s,o,f,u,c=(l[0].valueFmt?Dn(l[0].minValue,l[0].valueFmt):l[0].minValue)+"",d,h,m,_=(l[0].valueFmt?Dn(l[0].maxValue,l[0].valueFmt):l[0].maxValue)+"",y,p;return{c(){e=R("div"),n=R("div"),t=R("span"),r=ue(l[6]),i=se(),a=R("div"),s=R("span"),o=se(),f=R("div"),u=R("span"),d=ue(c),h=se(),m=R("span"),y=ue(_),this.h()},l(D){e=V(D,"DIV",{class:!0});var L=F(e);n=V(L,"DIV",{class:!0});var N=F(n);t=V(N,"SPAN",{});var S=F(t);r=ce(S,l[6]),S.forEach(b),N.forEach(b),i=fe(L),a=V(L,"DIV",{class:!0});var K=F(a);s=V(K,"SPAN",{style:!0,class:!0});var B=F(s);B.forEach(b),o=fe(K),f=V(K,"DIV",{class:!0});var O=F(f);u=V(O,"SPAN",{class:!0});var E=F(u);d=ce(E,c),E.forEach(b),h=fe(O),m=V(O,"SPAN",{class:!0});var T=F(m);y=ce(T,_),T.forEach(b),O.forEach(b),K.forEach(b),L.forEach(b),this.h()},h(){I(n,"class","flex flex-wrap flex-col font-semibold"),We(s,"background",l[0].colorPalette?`linear-gradient(to right, ${l[0].colorPalette.join(", ")})`:l[2].colors["base-100"]),I(s,"class","relative h-2 min-w-56"),I(u,"class","text-[10px] inline-block"),I(m,"class","text-[10px] inline-block"),I(f,"class","flex justify-between"),I(a,"class","flex flex-col justify-center overflow-hidden h-8 w-full"),I(e,"class",p="flex flex-col "+(l[1]?l[4]:l[5])+" transition-[opacity, max-height, overflow-y] duration-[350ms] ease-in-out w-full")},m(D,L){C(D,e,L),q(e,n),q(n,t),q(t,r),q(e,i),q(e,a),q(a,s),q(a,o),q(a,f),q(f,u),q(u,d),q(f,h),q(f,m),q(m,y)},p(D,[L]){L&5&&We(s,"background",D[0].colorPalette?`linear-gradient(to right, ${D[0].colorPalette.join(", ")})`:D[2].colors["base-100"]),L&1&&c!==(c=(D[0].valueFmt?Dn(D[0].minValue,D[0].valueFmt):D[0].minValue)+"")&&Ce(d,c),L&1&&_!==(_=(D[0].valueFmt?Dn(D[0].maxValue,D[0].valueFmt):D[0].maxValue)+"")&&Ce(y,_),L&2&&p!==(p="flex flex-col "+(D[1]?D[4]:D[5])+" transition-[opacity, max-height, overflow-y] duration-[350ms] ease-in-out w-full")&&I(e,"class",p)},i:ne,o:ne,d(D){D&&b(e)}}}function y_(l,e,n){let t;const{theme:r}=Kn();Oe(l,r,c=>n(2,t=c));let{legend:i}=e,{hideLegend:a=!1}=e,{capitalize:s}=e,o="max-h-[0px] opacity-0",f="max-h-[300px]",u=s(i.value);return l.$$set=c=>{"legend"in c&&n(0,i=c.legend),"hideLegend"in c&&n(1,a=c.hideLegend),"capitalize"in c&&n(7,s=c.capitalize)},[i,a,t,r,o,f,u,s]}class p_ extends _e{constructor(e){super(),ge(this,e,y_,v_,me,{legend:0,hideLegend:1,capitalize:7})}}function C_(l){let e,n,t,r,i,a,s=l[0]?"Show Legend":"Hide Legend",o,f,u;return{c(){e=R("button"),n=lr("svg"),t=lr("polyline"),i=se(),a=R("span"),o=ue(s),this.h()},l(c){e=V(c,"BUTTON",{class:!0,"aria-label":!0});var d=F(e);n=rr(d,"svg",{xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0,class:!0});var h=F(n);t=rr(h,"polyline",{points:!0}),F(t).forEach(b),h.forEach(b),i=fe(d),a=V(d,"SPAN",{class:!0});var m=F(a);o=ce(m,s),m.forEach(b),d.forEach(b),this.h()},h(){I(t,"points","14 17 10 12 14 7"),I(n,"xmlns","http://www.w3.org/2000/svg"),I(n,"width",`8 + `),I(n,"height","8"),I(n,"viewBox","6 6 12 12"),I(n,"fill","none"),I(n,"stroke","currentColor"),I(n,"stroke-width","1"),I(n,"stroke-linecap","round"),I(n,"stroke-linejoin","round"),I(n,"class",r="transform transition-transform duration-300 ease-in-out text-left text-base-content-muted "+(l[0]?l[3][l[2]].hide:l[3][l[2]].show)),I(a,"class","sr-only"),I(e,"class","flex z-[1] items-center px-[8px] py-[1.5px]"),I(e,"aria-label","Toggle Legend")},m(c,d){C(c,e,d),q(e,n),q(n,t),q(e,i),q(e,a),q(a,o),f||(u=[Ae(e,"click",function(){mo(l[1])&&l[1].apply(this,arguments)}),Ae(e,"dblclick",D_)],f=!0)},p(c,[d]){l=c,d&5&&r!==(r="transform transition-transform duration-300 ease-in-out text-left text-base-content-muted "+(l[0]?l[3][l[2]].hide:l[3][l[2]].show))&&I(n,"class",r),d&1&&s!==(s=l[0]?"Show Legend":"Hide Legend")&&Ce(o,s)},i:ne,o:ne,d(c){c&&b(e),f=!1,ct(u)}}}const D_=l=>l.stopPropagation();function S_(l,e,n){let{hideLegend:t=!1}=e,{handleLegendToggle:r}=e,{legendPosition:i="bottomLeft"}=e,a="down";i.includes("top")?a="up":i.includes("bottom")&&(a="down");const s={down:{show:"rotate-[270deg]",hide:"rotate-90"},up:{show:"rotate-90",hide:"rotate-[270deg]"}};return l.$$set=o=>{"hideLegend"in o&&n(0,t=o.hideLegend),"handleLegendToggle"in o&&n(1,r=o.handleLegendToggle),"legendPosition"in o&&n(4,i=o.legendPosition)},[t,r,a,s,i]}class E_ extends _e{constructor(e){super(),ge(this,e,S_,C_,me,{hideLegend:0,handleLegendToggle:1,legendPosition:4})}}function oa(l,e,n){const t=l.slice();return t[14]=e[n],t}function sa(l,e,n){const t=l.slice();return t[14]=e[n],t}function fa(l){let e,n,t,r,i,a,s,o,f,u,c,d,h=l[4].length>0&&ua(l),m=l[5].length>0&&da(l);return s=new E_({props:{handleLegendToggle:l[11],hideLegend:l[6],multiLegend:l[7],legendPosition:l[1]}}),{c(){e=R("div"),n=R("div"),h&&h.c(),t=se(),m&&m.c(),i=se(),a=R("div"),U(s.$$.fragment),this.h()},l(_){e=V(_,"DIV",{class:!0,role:!0});var y=F(e);n=V(y,"DIV",{class:!0});var p=F(n);h&&h.l(p),t=fe(p),m&&m.l(p),p.forEach(b),i=fe(y),a=V(y,"DIV",{class:!0});var D=F(a);Y(s.$$.fragment,D),D.forEach(b),y.forEach(b),this.h()},h(){I(n,"class",r="bg-base-100 background-blur "+l[13][l[1]]+" svelte-168cccw"),I(a,"class",o="bg-base-100 background-blur flex justify-center w-fit transition-[border-radius] ease-in-out "+(l[1].includes("bottom")?"shadow-bottom":"")+" svelte-168cccw"),it(a,"rounded",l[6]),it(a,"delay-[225ms]",l[6]),it(a,"rounded-b",!l[6]&&l[1].includes("bottom")),it(a,"rounded-t",!l[6]&&!l[1].includes("bottom")),I(e,"class",f="absolute z-[401] m-4 flex max-w-60 legend-font "+l[12]()+" "+(l[9][l[1]]??"top-3 left-[-9px]")+" svelte-168cccw"),I(e,"role","group")},m(_,y){C(_,e,y),q(e,n),h&&h.m(n,null),q(n,t),m&&m.m(n,null),q(e,i),q(e,a),Z(s,a,null),u=!0,c||(d=[Ae(e,"wheel",M_),Ae(e,"dblclick",O_)],c=!0)},p(_,y){_[4].length>0?h?(h.p(_,y),y&16&&k(h,1)):(h=ua(_),h.c(),k(h,1),h.m(n,t)):h&&(ve(),v(h,1,1,()=>{h=null}),ye()),_[5].length>0?m?(m.p(_,y),y&32&&k(m,1)):(m=da(_),m.c(),k(m,1),m.m(n,null)):m&&(ve(),v(m,1,1,()=>{m=null}),ye()),(!u||y&2&&r!==(r="bg-base-100 background-blur "+_[13][_[1]]+" svelte-168cccw"))&&I(n,"class",r);const p={};y&64&&(p.hideLegend=_[6]),y&128&&(p.multiLegend=_[7]),y&2&&(p.legendPosition=_[1]),s.$set(p),(!u||y&2&&o!==(o="bg-base-100 background-blur flex justify-center w-fit transition-[border-radius] ease-in-out "+(_[1].includes("bottom")?"shadow-bottom":"")+" svelte-168cccw"))&&I(a,"class",o),(!u||y&66)&&it(a,"rounded",_[6]),(!u||y&66)&&it(a,"delay-[225ms]",_[6]),(!u||y&66)&&it(a,"rounded-b",!_[6]&&_[1].includes("bottom")),(!u||y&66)&&it(a,"rounded-t",!_[6]&&!_[1].includes("bottom")),(!u||y&2&&f!==(f="absolute z-[401] m-4 flex max-w-60 legend-font "+_[12]()+" "+(_[9][_[1]]??"top-3 left-[-9px]")+" svelte-168cccw"))&&I(e,"class",f)},i(_){u||(k(h),k(m),k(s.$$.fragment,_),u=!0)},o(_){v(h),v(m),v(s.$$.fragment,_),u=!1},d(_){_&&b(e),h&&h.d(),m&&m.d(),z(s),c=!1,ct(d)}}}function ua(l){let e,n,t=Ve(l[4]),r=[];for(let a=0;av(r[a],1,1,()=>{r[a]=null});return{c(){e=R("div");for(let a=0;av(r[a],1,1,()=>{r[a]=null});return{c(){for(let a=0;a0&&fa(l);return{c(){t&&t.c(),e=X()},l(r){t&&t.l(r),e=X()},m(r,i){t&&t.m(r,i),C(r,e,i),n=!0},p(r,[i]){r[8].length>0?t?(t.p(r,i),i&256&&k(t,1)):(t=fa(r),t.c(),k(t,1),t.m(e.parentNode,e)):t&&(ve(),v(t,1,1,()=>{t=null}),ye())},i(r){n||(k(t),n=!0)},o(r){v(t),n=!1},d(r){r&&b(e),t&&t.d(r)}}}function ro(l){return l&&l.charAt(0).toUpperCase()+l.slice(1).toLowerCase()}const M_=l=>l.stopPropagation(),O_=l=>l.stopPropagation();function P_(l,e,n){let t,r,i=ne,a=()=>(i(),i=wt(_,S=>n(4,r=S)),_),s,o,f=ne,u=()=>(f(),f=wt(d,S=>n(8,o=S)),d);l.$$.on_destroy.push(()=>i()),l.$$.on_destroy.push(()=>f());const c={topLeft:"top-[-9px] left-[-9px]",topRight:"top-[-9px] right-[-9px]",bottomLeft:"bottom-[-9px] left-[-9px]",bottomRight:"bottom-[-9px] right-[-9px] "};let{legendData:d}=e;u();let{legendPosition:h="bottomLeft"}=e,{height:m=300}=e,{categoricalLegendData:_=Ze(d,S=>S.filter(K=>K.legendType==="categorical"))}=e;a();let y=Ze(d,S=>S.filter(K=>K.legendType==="scalar"));Oe(l,y,S=>n(5,s=S));let p=!1;const D=()=>{n(6,p=!p)},L=()=>{let S="";return h.includes("bottom")?S+="flex-col":S+="flex-col-reverse",h.includes("Right")&&(S+=" items-end"),S},N={bottomLeft:"rounded-t rounded-br shadow-bottom-right",bottomRight:"rounded-t rounded-bl shadow-bottom-left",topLeft:"rounded-b rounded-tr z-[405] shadow-bottom",topRight:"rounded-b rounded-tl z-[405] shadow-bottom"};return l.$$set=S=>{"legendData"in S&&u(n(0,d=S.legendData)),"legendPosition"in S&&n(1,h=S.legendPosition),"height"in S&&n(2,m=S.height),"categoricalLegendData"in S&&a(n(3,_=S.categoricalLegendData))},l.$$.update=()=>{l.$$.dirty&48&&n(7,t=r.length>1||s.length>1||s.length>0&&r.length>0)},[d,h,m,_,r,s,p,t,o,c,y,D,L,N]}class I_ extends _e{constructor(e){super(),ge(this,e,P_,T_,me,{legendData:0,legendPosition:1,height:2,categoricalLegendData:3})}}function A_(l){let e,n,t,r,i,a,s,o,f,u=l[1]&&ma(l);const c=l[18].default,d=re(c,l,l[17],null);let h=l[6]&&_a(l),m=!l[7]&&ga(l);return{c(){e=R("div"),u&&u.c(),n=se(),t=R("div"),r=R("div"),d&&d.c(),i=se(),h&&h.c(),a=se(),m&&m.c(),this.h()},l(_){e=V(_,"DIV",{class:!0});var y=F(e);u&&u.l(y),n=fe(y),t=V(y,"DIV",{class:!0,style:!0});var p=F(t);r=V(p,"DIV",{class:!0});var D=F(r);d&&d.l(D),D.forEach(b),i=fe(p),h&&h.l(p),p.forEach(b),a=fe(y),m&&m.l(y),y.forEach(b),this.h()},h(){I(r,"class","svelte-z9gk2f"),I(t,"class","z-0 rounded-md focus:outline-none svelte-z9gk2f"),We(t,"height",l[0]+"px"),I(e,"class","relative break-inside-avoid svelte-z9gk2f")},m(_,y){C(_,e,y),u&&u.m(e,null),q(e,n),q(e,t),q(t,r),d&&d.m(r,null),q(t,i),h&&h.m(t,null),l[20](t),q(e,a),m&&m.m(e,null),s=!0,o||(f=Ae(r,"dispatcherror",l[19]),o=!0)},p(_,y){_[1]?u?u.p(_,y):(u=ma(_),u.c(),u.m(e,n)):u&&(u.d(1),u=null),d&&d.p&&(!s||y&131072)&&ie(d,c,_,_[17],s?oe(c,_[17],y,null):ae(_[17]),null),_[6]?h?(h.p(_,y),y&64&&k(h,1)):(h=_a(_),h.c(),k(h,1),h.m(t,null)):h&&(ve(),v(h,1,1,()=>{h=null}),ye()),(!s||y&1)&&We(t,"height",_[0]+"px"),_[7]?m&&(ve(),v(m,1,1,()=>{m=null}),ye()):m?(m.p(_,y),y&128&&k(m,1)):(m=ga(_),m.c(),k(m,1),m.m(e,null))},i(_){s||(k(d,_),k(h),k(m),s=!0)},o(_){v(d,_),v(h),v(m),s=!1},d(_){_&&b(e),u&&u.d(),d&&d.d(_),h&&h.d(),l[20](null),m&&m.d(),o=!1,f()}}}function w_(l){let e,n;return e=new jl({props:{error:l[5],chartType:l[3]}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&32&&(i.error=t[5]),r&8&&(i.chartType=t[3]),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function ma(l){let e,n;return{c(){e=R("h4"),n=ue(l[1]),this.h()},l(t){e=V(t,"H4",{class:!0});var r=F(e);n=ce(r,l[1]),r.forEach(b),this.h()},h(){I(e,"class","markdown mb-2")},m(t,r){C(t,e,r),q(e,n)},p(t,r){r&2&&Ce(n,t[1])},d(t){t&&b(e)}}}function _a(l){let e,n;return e=new I_({props:{legendData:l[9],legendPosition:l[2],height:l[0]}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,r){const i={};r&4&&(i.legendPosition=t[2]),r&1&&(i.height=t[0]),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}function ga(l){let e,n,t;return n=new Ta({}),{c(){e=R("div"),U(n.$$.fragment),this.h()},l(r){e=V(r,"DIV",{class:!0,style:!0});var i=F(e);Y(n.$$.fragment,i),i.forEach(b),this.h()},h(){I(e,"class","absolute left-0 right-0 bottom-0 w-full *:m-0 bg-base-100 svelte-z9gk2f"),We(e,"height",l[0]+"px")},m(r,i){C(r,e,i),Z(n,e,null),t=!0},p(r,i){(!t||i&1)&&We(e,"height",r[0]+"px")},i(r){t||(k(n.$$.fragment,r),t=!0)},o(r){v(n.$$.fragment,r),t=!1},d(r){r&&b(e),z(n)}}}function L_(l){let e,n,t,r;const i=[w_,A_],a=[];function s(o,f){return o[5]?0:1}return e=s(l),n=a[e]=i[e](l),{c(){n.c(),t=X()},l(o){n.l(o),t=X()},m(o,f){a[e].m(o,f),C(o,t,f),r=!0},p(o,[f]){let u=e;e=s(o),e===u?a[e].p(o,f):(ve(),v(a[u],1,1,()=>{a[u]=null}),ye(),n=a[e],n?n.p(o,f):(n=a[e]=i[e](o),n.c()),k(n,1),n.m(t.parentNode,t))},i(o){r||(k(n),r=!0)},o(o){v(n),r=!1},d(o){o&&b(t),a[e].d(o)}}}const N_=39.077;function R_(l,e,n){let t,r,i,{$$slots:a={},$$scope:s}=e,o,{startingLat:f=void 0}=e,{startingLong:u=void 0}=e,{startingZoom:c=void 0}=e;const d=-180,h=f||u;let{height:m=300}=e,{basemap:_=void 0}=e,{title:y=void 0}=e,p,{attribution:D=void 0}=e;const L=new Nl;Hn(lo,L);const N=L.allGeoJsonLoaded;Oe(l,N,g=>n(7,i=g));let S=L.legendData;Oe(l,S,g=>n(6,r=g));let{legendPosition:K="bottomLeft"}=e,B=L.internalError;Oe(l,B,g=>n(16,t=g));let{chartType:O="Map"}=e;Vl(async()=>{try{const g=f??!1?[f,u]:[N_,d];return await L.init(o,_??"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png",g,c,h,D),()=>L.cleanup()}catch(g){n(5,p=g.message),console.error(g)}});const E=g=>n(5,p=g.detail);function T(g){Le[g?"unshift":"push"](()=>{o=g,n(4,o)})}return l.$$set=g=>{"startingLat"in g&&n(11,f=g.startingLat),"startingLong"in g&&n(12,u=g.startingLong),"startingZoom"in g&&n(13,c=g.startingZoom),"height"in g&&n(0,m=g.height),"basemap"in g&&n(14,_=g.basemap),"title"in g&&n(1,y=g.title),"attribution"in g&&n(15,D=g.attribution),"legendPosition"in g&&n(2,K=g.legendPosition),"chartType"in g&&n(3,O=g.chartType),"$$scope"in g&&n(17,s=g.$$scope)},l.$$.update=()=>{l.$$.dirty&4&&K&&L.updateLegendPosition(K),l.$$.dirty&65536&&t!==void 0&&n(5,p=t)},[m,y,K,O,o,p,r,i,N,S,B,f,u,c,_,D,t,s,a,E,T]}class V_ extends _e{constructor(e){super(),ge(this,e,R_,L_,me,{startingLat:11,startingLong:12,startingZoom:13,height:0,basemap:14,title:1,attribution:15,legendPosition:2,chartType:3})}}function B_(l,e,n){let{map:t=void 0}=e,{feature:r=void 0}=e,{areaOptions:i=void 0}=e,{selectedAreaOptions:a=void 0}=e,{onclick:s=void 0}=e,{setInput:o=void 0}=e,{unsetInput:f=void 0}=e,{item:u=void 0}=e,{tooltip:c=void 0}=e,{tooltipOptions:d=void 0}=e,{tooltipType:h=void 0}=e,{showTooltip:m=void 0}=e,{link:_=void 0}=e,{name:y=void 0}=e;return Vl(()=>{const p=t.addArea(u,y,r,i,a,s,o,f,u[_]);if(m){const D=t.buildTooltip(u,c);t.attachTooltip(p,D,d,h)}return()=>p.remove()}),l.$$set=p=>{"map"in p&&n(0,t=p.map),"feature"in p&&n(1,r=p.feature),"areaOptions"in p&&n(2,i=p.areaOptions),"selectedAreaOptions"in p&&n(3,a=p.selectedAreaOptions),"onclick"in p&&n(4,s=p.onclick),"setInput"in p&&n(5,o=p.setInput),"unsetInput"in p&&n(6,f=p.unsetInput),"item"in p&&n(7,u=p.item),"tooltip"in p&&n(8,c=p.tooltip),"tooltipOptions"in p&&n(9,d=p.tooltipOptions),"tooltipType"in p&&n(10,h=p.tooltipType),"showTooltip"in p&&n(11,m=p.showTooltip),"link"in p&&n(12,_=p.link),"name"in p&&n(13,y=p.name)},[t,r,i,a,s,o,f,u,c,d,h,m,_,y]}class F_ extends _e{constructor(e){super(),ge(this,e,B_,null,me,{map:0,feature:1,areaOptions:2,selectedAreaOptions:3,onclick:4,setInput:5,unsetInput:6,item:7,tooltip:8,tooltipOptions:9,tooltipType:10,showTooltip:11,link:12,name:13})}}function ba(l,e,n){const t=l.slice();t[62]=e[n];const r=t[25].find(function(...a){return l[54](t[62],...a)});return t[63]=r,t}function W_(l){return{c:ne,l:ne,m:ne,p:ne,i:ne,o:ne,d:ne}}function q_(l){let e,n,t,r={ctx:l,current:null,token:null,hasCatch:!0,pending:Y_,then:U_,catch:j_,error:66,blocks:[,,,]};return rl(n=l[35](l[27]),r),{c(){e=X(),r.block.c()},l(i){e=X(),r.block.l(i)},m(i,a){C(i,e,a),r.block.m(i,r.anchor=a),r.mount=()=>e.parentNode,r.anchor=e,t=!0},p(i,a){l=i,r.ctx=l,a[0]&134217728&&n!==(n=l[35](l[27]))&&rl(n,r)||Va(r,l,a)},i(i){t||(k(r.block),t=!0)},o(i){for(let a=0;a<3;a+=1){const s=r.blocks[a];v(s)}t=!1},d(i){i&&b(e),r.block.d(i),r.token=null,r=null}}}function j_(l){let e=l[33].handleInternalError(l[66])+"",n;return{c(){n=ue(e)},l(t){n=ce(t,e)},m(t,r){C(t,n,r)},p(t,r){r[0]&134217728&&e!==(e=t[33].handleInternalError(t[66])+"")&&Ce(n,e)},i:ne,o:ne,d(t){t&&b(n)}}}function U_(l){let e=[],n=new Map,t,r,i=Ve(l[18]);const a=s=>s[62].properties[s[6]];for(let s=0;se.parentNode,r.anchor=e,t=!0},p(i,a){l=i,r.ctx=l,a[0]&16&&n!==(n=Promise.all([l[33].initPromise,l[4].fetch()]))&&rl(n,r)||Va(r,l,a)},i(i){t||(k(r.block),t=!0)},o(i){for(let a=0;a<3;a+=1){const s=r.blocks[a];v(s)}t=!1},d(i){i&&b(e),r.block.d(i),r.token=null,r=null}}}function H_(l,e,n){let t,r,i,a,s,o,f,u=ne,c=()=>(u(),u=wt(Pe,H=>n(25,f=H)),Pe),d,h=ne,m=()=>(h(),h=wt(t,H=>n(26,d=H)),t),_,y=ne,p=()=>(y(),y=wt(i,H=>n(56,_=H)),i),D,L,N=ne,S=()=>(N(),N=wt(r,H=>n(28,L=H)),r),K,B=ne,O=()=>(B(),B=wt(a,H=>n(29,K=H)),a),E,T=ne,g=()=>(T(),T=wt(s,H=>n(30,E=H)),s);l.$$.on_destroy.push(()=>u()),l.$$.on_destroy.push(()=>h()),l.$$.on_destroy.push(()=>y()),l.$$.on_destroy.push(()=>N()),l.$$.on_destroy.push(()=>B()),l.$$.on_destroy.push(()=>T());const M=Ea();Oe(l,M,H=>n(55,o=H));const{theme:P,resolveColor:te,resolveColorPalette:Ie}=Kn();Oe(l,P,H=>n(27,D=H));const Me=Jn(lo);if(!Me)throw new Error("Evidence Map Context has not been set. Areas will not function");let{data:Pe}=e;c();let{geoJsonUrl:G="https://evd-geojson.b-cdn.net/ca_california_zip_codes_geo_1.min.json"}=e,{areaCol:Se=void 0}=e,{geoId:Ee=void 0}=e,{value:he=void 0}=e,{valueFmt:Fe=void 0}=e,{min:Je=void 0}=e,{max:x=void 0}=e,{link:gt=void 0}=e,{name:Ge=void 0}=e,{legendType:we=void 0}=e,{chartType:Tt="Area Map"}=e,{legend:Mt=!0}=e,{onclick:Q=()=>{}}=e,{borderWidth:dt=void 0}=e;if(dt){if(dt=Number(dt),isNaN(dt))throw Error("borderWidth must be a number");if(dt<0)throw Error("borderWidth cannot be negative")}else dt=.75;let{color:J=void 0}=e,{borderColor:de="base-300"}=e,{colorPalette:j=void 0}=e,{opacity:Ue=void 0}=e;if(Ue){if(Ue=Number(Ue),isNaN(Ue))throw Error("opacity must be a number");if(Ue<0)throw Error("opacity cannot be negative")}else Ue=.9;let{areaClass:ht=void 0}=e,{selectedBorderWidth:Re=1}=e;if(Re){if(Re=Number(Re),isNaN(Re))throw Error("selectedBorderWidth must be a number");if(Re<0)throw Error("selectedBorderWidth cannot be negative")}else Re=.75;let{selectedColor:Vt="accent"}=e,{selectedBorderColor:Ke="accent-content"}=e,{selectedOpacity:nt=void 0}=e;if(nt){if(nt=Number(nt),isNaN(nt))throw Error("selectedOpacity must be a number");if(nt<0)throw Error("selectedOpacity cannot be negative")}else nt=1;let{selectedAreaClass:Ye=void 0}=e,{showTooltip:bt=!0}=e,{tooltip:mt=[]}=e;mt.length===0&&(Se&&mt.push({id:Se,showColumnName:!1,valueClass:"font-bold text-sm",fmt:"id"}),he&&mt.push({id:he,fmt:Fe}));let{tooltipClass:Bt=void 0}=e,{tooltipType:Yt="hover"}=e;const kt={permanent:!1,direction:"auto",sticky:!0,opacity:1,className:`${Bt}`,interactive:!0};async function xt(){const H=G,$e=await Me.loadGeoJson(H);if(!$e||G!==H)return;const Ot=new Set(Pe.map(Dt=>Dt[Se].toString()));n(18,A=$e==null?void 0:$e.features.filter(Dt=>Ot.has(Dt.properties[Ee])))}let vn,yn,A=[],W=Wo(),ee;async function le(H){let $e={corordinates:[Se],value:he,checkInputs:Bn,min:Je,max:x,colorPalette:_,legendType:we,valueFmt:Fe,chartType:Tt,legendId:W,legend:Mt,theme:H};await Pe.fetch(),d||n(16,{values:vn,colorPalette:ee,legendType:we,colorScale:yn}=await Me.initializeData(Pe,$e),vn,n(19,ee),n(38,we),n(17,yn)),await xt(),Ge&&f.length>0&&Be(f[0],Ge)}function Be(H,$e){En(M,o[$e]=Object.fromEntries(Object.keys(H).map(Ot=>[Ot,!0])),o)}function qe(H,$e){En(M,o[$e]=Object.fromEntries(Object.entries(H).map(([Ot,Dt])=>[Ot,typeof Dt=="string"?Dt.replaceAll("'","''"):Dt])),o)}function je(H,$e){M.update(Ot=>(Object.prototype.hasOwnProperty.call(Ot,$e)&&delete Ot[$e],Ot)),Be(H,$e)}const Qe=H=>{Q(H)},Xe=H=>{Ge&&qe(H,Ge)},vt=H=>{Ge&&je(H,Ge)},Zt=(H,$e)=>$e[Se].toString()===H.properties[Ee];return l.$$set=H=>{"data"in H&&c(n(4,Pe=H.data)),"geoJsonUrl"in H&&n(39,G=H.geoJsonUrl),"areaCol"in H&&n(5,Se=H.areaCol),"geoId"in H&&n(6,Ee=H.geoId),"value"in H&&n(7,he=H.value),"valueFmt"in H&&n(40,Fe=H.valueFmt),"min"in H&&n(41,Je=H.min),"max"in H&&n(42,x=H.max),"link"in H&&n(8,gt=H.link),"name"in H&&n(9,Ge=H.name),"legendType"in H&&n(38,we=H.legendType),"chartType"in H&&n(43,Tt=H.chartType),"legend"in H&&n(44,Mt=H.legend),"onclick"in H&&n(10,Q=H.onclick),"borderWidth"in H&&n(0,dt=H.borderWidth),"color"in H&&n(45,J=H.color),"borderColor"in H&&n(46,de=H.borderColor),"colorPalette"in H&&n(47,j=H.colorPalette),"opacity"in H&&n(1,Ue=H.opacity),"areaClass"in H&&n(11,ht=H.areaClass),"selectedBorderWidth"in H&&n(2,Re=H.selectedBorderWidth),"selectedColor"in H&&n(48,Vt=H.selectedColor),"selectedBorderColor"in H&&n(49,Ke=H.selectedBorderColor),"selectedOpacity"in H&&n(3,nt=H.selectedOpacity),"selectedAreaClass"in H&&n(12,Ye=H.selectedAreaClass),"showTooltip"in H&&n(13,bt=H.showTooltip),"tooltip"in H&&n(14,mt=H.tooltip),"tooltipClass"in H&&n(50,Bt=H.tooltipClass),"tooltipType"in H&&n(15,Yt=H.tooltipType)},l.$$.update=()=>{l.$$.dirty[1]&16384&&m(n(24,t=te(J))),l.$$.dirty[1]&32768&&S(n(23,r=te(de))),l.$$.dirty[1]&65536&&p(n(22,i=Ie(j))),l.$$.dirty[1]&131072&&O(n(21,a=te(Vt))),l.$$.dirty[1]&262144&&g(n(20,s=te(Ke))),l.$$.dirty[0]&48|l.$$.dirty[1]&256&&(async()=>(await Pe.fetch(),await xt()))()},[dt,Ue,Re,nt,Pe,Se,Ee,he,gt,Ge,Q,ht,Ye,bt,mt,Yt,vn,yn,A,ee,s,a,i,r,t,f,d,D,L,K,E,M,P,Me,kt,le,qe,je,we,G,Fe,Je,x,Tt,Mt,J,de,j,Vt,Ke,Bt,Qe,Xe,vt,Zt]}class J_ extends _e{constructor(e){super(),ge(this,e,H_,z_,me,{data:4,geoJsonUrl:39,areaCol:5,geoId:6,value:7,valueFmt:40,min:41,max:42,link:8,name:9,legendType:38,chartType:43,legend:44,onclick:10,borderWidth:0,color:45,borderColor:46,colorPalette:47,opacity:1,areaClass:11,selectedBorderWidth:2,selectedColor:48,selectedBorderColor:49,selectedOpacity:3,selectedAreaClass:12,showTooltip:13,tooltip:14,tooltipClass:50,tooltipType:15},null,[-1,-1,-1])}}const G_=l=>({data:l&1024}),va=l=>({data:l[10]});function ya(l){let e,n;return{c(){e=R("h4"),n=ue(l[1]),this.h()},l(t){e=V(t,"H4",{class:!0});var r=F(e);n=ce(r,l[1]),r.forEach(b),this.h()},h(){I(e,"class","markdown mb-2")},m(t,r){C(t,e,r),q(e,n)},p(t,r){r&2&&Ce(n,t[1])},d(t){t&&b(e)}}}function K_(l){let e;const n=l[8].default,t=re(n,l,l[9],va);return{c(){t&&t.c()},l(r){t&&t.l(r)},m(r,i){t&&t.m(r,i),e=!0},p(r,i){t&&t.p&&(!e||i&1536)&&ie(t,n,r,r[9],e?oe(n,r[9],i,G_):ae(r[9]),va)},i(r){e||(k(t,r),e=!0)},o(r){v(t,r),e=!1},d(r){t&&t.d(r)}}}function Q_(l){let e,n;const t=[l[7],{title:void 0}];let r={$$slots:{default:[K_]},$$scope:{ctx:l}};for(let i=0;i({10:a}),({loaded:a})=>a?1024:0],empty:[X_],default:[Q_,({loaded:a})=>({10:a}),({loaded:a})=>a?1024:0]},$$scope:{ctx:l}}}),{c(){e=R("div"),i&&i.c(),n=se(),U(t.$$.fragment),this.h()},l(a){e=V(a,"DIV",{style:!0});var s=F(e);i&&i.l(s),n=fe(s),Y(t.$$.fragment,s),s.forEach(b),this.h()},h(){We(e,"margin-top","15px"),We(e,"margin-bottom","10px")},m(a,s){C(a,e,s),i&&i.m(e,null),q(e,n),Z(t,e,null),r=!0},p(a,[s]){a[1]?i?i.p(a,s):(i=ya(a),i.c(),i.m(e,n)):i&&(i.d(1),i=null);const o={};s&1&&(o.data=a[0]),s&1788&&(o.$$scope={dirty:s,ctx:a}),t.$set(o)},i(a){r||(k(t.$$.fragment,a),r=!0)},o(a){v(t.$$.fragment,a),r=!1},d(a){a&&b(e),i&&i.d(),z(t)}}}function eg(l,e,n){const t=["data","title","emptySet","emptyMessage","chartType","isInitial","error"];let r=$(e,t),{$$slots:i={},$$scope:a}=e,{data:s}=e,{title:o=void 0}=e,{emptySet:f=void 0}=e,{emptyMessage:u=void 0}=e,{chartType:c=void 0}=e,{isInitial:d=!0}=e,{error:h=void 0}=e;return l.$$set=m=>{e=w(w({},e),Te(m)),n(7,r=$(e,t)),"data"in m&&n(0,s=m.data),"title"in m&&n(1,o=m.title),"emptySet"in m&&n(2,f=m.emptySet),"emptyMessage"in m&&n(3,u=m.emptyMessage),"chartType"in m&&n(4,c=m.chartType),"isInitial"in m&&n(5,d=m.isInitial),"error"in m&&n(6,h=m.error),"$$scope"in m&&n(9,a=m.$$scope)},[s,o,f,u,c,d,h,r,i,a]}class tg extends _e{constructor(e){super(),ge(this,e,eg,$_,me,{data:0,title:1,emptySet:2,emptyMessage:3,chartType:4,isInitial:5,error:6})}}function ng(l){let e,n;const t=[{data:l[15]},{geoJsonUrl:l[2]},{geoId:l[3]},{areaCol:l[4]},{legendType:l[12]},{chartType:Rl},{legend:l[13]},l[18]];let r={};for(let i=0;i({15:t}),({data:t})=>t?32768:0]},$$scope:{ctx:l}}}),{c(){U(e.$$.fragment)},l(t){Y(e.$$.fragment,t)},m(t,r){Z(e,t,r),n=!0},p(t,[r]){const i={};r&32768&&(i.data=t[15]),r&32&&(i.startingLat=t[5]),r&64&&(i.startingLong=t[6]),r&128&&(i.startingZoom=t[7]),r&256&&(i.height=t[8]),r&512&&(i.basemap=t[9]),r&1024&&(i.title=t[10]),r&2048&&(i.legendPosition=t[11]),r&131072&&(i.isInitial=t[17]),r&1&&(i.emptySet=t[0]),r&2&&(i.emptyMessage=t[1]),r&65536&&(i.error=t[16]),r&16384&&(i.attribution=t[14]),r&2469916&&(i.$$scope={dirty:r,ctx:t}),e.$set(i)},i(t){n||(k(e.$$.fragment,t),n=!0)},o(t){v(e.$$.fragment,t),n=!1},d(t){z(e,t)}}}const Rl="Area Map";function rg(l,e,n){let t;const r=["emptySet","emptyMessage","data","geoJsonUrl","geoId","areaCol","startingLat","startingLong","startingZoom","height","basemap","title","legendPosition","legendType","legend","attribution"];let i=$(e,r),{emptySet:a=void 0}=e,{emptyMessage:s=void 0}=e,o,{data:f}=e;f||(o="data is required");let{geoJsonUrl:u="https://evd-geojson.b-cdn.net/ca_california_zip_codes_geo_1.min.json"}=e,{geoId:c=void 0}=e;c||(o="geoId is required. This is the name of the field in your geoJSON file which identifies the area/feature");let{areaCol:d=void 0}=e;d||(o="areaCol is required. This is the name of the column in your query result which contains the identifier for the area you want to map");let{startingLat:h=void 0}=e,{startingLong:m=void 0}=e,{startingZoom:_=void 0}=e,{height:y=300}=e,{basemap:p=void 0}=e,{title:D=void 0}=e,{legendPosition:L="bottomLeft"}=e,{legendType:N=void 0}=e,{legend:S=!0}=e,{attribution:K=void 0}=e;const B=Nt.isQuery(f)?f.hash:void 0,O=E=>n(16,o=E.detail);return l.$$set=E=>{e=w(w({},e),Te(E)),n(18,i=$(e,r)),"emptySet"in E&&n(0,a=E.emptySet),"emptyMessage"in E&&n(1,s=E.emptyMessage),"data"in E&&n(15,f=E.data),"geoJsonUrl"in E&&n(2,u=E.geoJsonUrl),"geoId"in E&&n(3,c=E.geoId),"areaCol"in E&&n(4,d=E.areaCol),"startingLat"in E&&n(5,h=E.startingLat),"startingLong"in E&&n(6,m=E.startingLong),"startingZoom"in E&&n(7,_=E.startingZoom),"height"in E&&n(8,y=E.height),"basemap"in E&&n(9,p=E.basemap),"title"in E&&n(10,D=E.title),"legendPosition"in E&&n(11,L=E.legendPosition),"legendType"in E&&n(12,N=E.legendType),"legend"in E&&n(13,S=E.legend),"attribution"in E&&n(14,K=E.attribution)},l.$$.update=()=>{l.$$.dirty&32768&&n(17,t=(f==null?void 0:f.hash)===B)},[a,s,u,c,d,h,m,_,y,p,D,L,N,S,K,f,o,t,i,O]}class Fg extends _e{constructor(e){super(),ge(this,e,rg,lg,me,{emptySet:0,emptyMessage:1,data:15,geoJsonUrl:2,geoId:3,areaCol:4,startingLat:5,startingLong:6,startingZoom:7,height:8,basemap:9,title:10,legendPosition:11,legendType:12,legend:13,attribution:14})}}export{Fg as A,Bg as B,Ng as D,Rg as Q}; diff --git a/_app/immutable/chunks/Button.DWcgwDfR.js b/_app/immutable/chunks/Button.DWcgwDfR.js new file mode 100644 index 0000000000000000000000000000000000000000..4400d1b7b42e3f723f5ea4a3bb105b5a5b217058 --- /dev/null +++ b/_app/immutable/chunks/Button.DWcgwDfR.js @@ -0,0 +1 @@ +import{s as q,z as F,e as G,a as w,d as M,g as O,c as S,f as P,j as b,A as y,k as U,l as A,B as H,C as J,D as K,E as L,F as Q,G as W}from"./scheduler.B2FSa8mv.js";import{S as X,i as Y,t as m,g as D,b as d,d as E,c as C,a as I,m as V,e as N}from"./index.CzNnnxDZ.js";import{I as R}from"./VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";function T(n){let e,s;return e=new R({props:{src:n[2],class:z[n[5]]}}),{c(){C(e.$$.fragment)},l(t){I(e.$$.fragment,t)},m(t,r){V(e,t,r),s=!0},p(t,r){const f={};r&4&&(f.src=t[2]),r&32&&(f.class=z[t[5]]),e.$set(f)},i(t){s||(m(e.$$.fragment,t),s=!0)},o(t){d(e.$$.fragment,t),s=!1},d(t){N(e,t)}}}function p(n){let e,s;return e=new R({props:{src:n[2],class:z[n[5]]}}),{c(){C(e.$$.fragment)},l(t){I(e.$$.fragment,t)},m(t,r){V(e,t,r),s=!0},p(t,r){const f={};r&4&&(f.src=t[2]),r&32&&(f.class=z[t[5]]),e.$set(f)},i(t){s||(m(e.$$.fragment,t),s=!0)},o(t){d(e.$$.fragment,t),s=!1},d(t){N(e,t)}}}function Z(n){let e,s,t,r,f,g,h,a=n[3]==="left"&&n[2]&&T(n);const _=n[10].default,u=F(_,n,n[9],null);let l=n[3]==="right"&&n[2]&&p(n);return{c(){e=G("button"),a&&a.c(),s=w(),u&&u.c(),t=w(),l&&l.c(),this.h()},l(i){e=M(i,"BUTTON",{type:!0,formaction:!0,class:!0});var o=O(e);a&&a.l(o),s=S(o),u&&u.l(o),t=S(o),l&&l.l(o),o.forEach(P),this.h()},h(){b(e,"type",n[1]),e.disabled=n[7],b(e,"formaction",n[8]),b(e,"class",r="flex items-center transition-colors rounded variant-"+n[0]+" "+B[n[4]]+" svelte-1c08hho"),y(e,"outlined",n[6])},m(i,o){U(i,e,o),a&&a.m(e,null),A(e,s),u&&u.m(e,null),A(e,t),l&&l.m(e,null),f=!0,g||(h=H(e,"click",J(n[11])),g=!0)},p(i,[o]){i[3]==="left"&&i[2]?a?(a.p(i,o),o&12&&m(a,1)):(a=T(i),a.c(),m(a,1),a.m(e,s)):a&&(D(),d(a,1,1,()=>{a=null}),E()),u&&u.p&&(!f||o&512)&&K(u,_,i,i[9],f?Q(_,i[9],o,null):L(i[9]),null),i[3]==="right"&&i[2]?l?(l.p(i,o),o&12&&m(l,1)):(l=p(i),l.c(),m(l,1),l.m(e,null)):l&&(D(),d(l,1,1,()=>{l=null}),E()),(!f||o&2)&&b(e,"type",i[1]),(!f||o&128)&&(e.disabled=i[7]),(!f||o&256)&&b(e,"formaction",i[8]),(!f||o&17&&r!==(r="flex items-center transition-colors rounded variant-"+i[0]+" "+B[i[4]]+" svelte-1c08hho"))&&b(e,"class",r),(!f||o&81)&&y(e,"outlined",i[6])},i(i){f||(m(a),m(u,i),m(l),f=!0)},o(i){d(a),d(u,i),d(l),f=!1},d(i){i&&P(e),a&&a.d(),u&&u.d(i),l&&l.d(),g=!1,h()}}}const B={base:"px-2 py-1 mx-1 gap-2",md:"px-2 py-1 mx-1 gap-2 text-xs",sm:"px-1 py-0.5 mx-0.5 gap-1 text-xs",lg:"px-4 py-2 mx-2 gap-4"},z={base:"w-4",md:"w-4",sm:"w-3",lg:"w-5"},k={success:"positive",warn:"warning",error:"negative"},v=n=>k[n]!==void 0,x=n=>v(n)?(console.warn(`The variant "${n}" is deprecated. Please use "${k[n]}" instead.`),k[n]):n;function $(n,e,s){let{$$slots:t={},$$scope:r}=e,{icon:f=void 0}=e,{iconPosition:g="right"}=e,{size:h="base"}=e,{iconSize:a=h}=e,{variant:_="info"}=e,{outline:u=!1}=e,{disabled:l=!1}=e,{formaction:i=void 0}=e,{type:o="button"}=e;function j(c){W.call(this,n,c)}return n.$$set=c=>{"icon"in c&&s(2,f=c.icon),"iconPosition"in c&&s(3,g=c.iconPosition),"size"in c&&s(4,h=c.size),"iconSize"in c&&s(5,a=c.iconSize),"variant"in c&&s(0,_=c.variant),"outline"in c&&s(6,u=c.outline),"disabled"in c&&s(7,l=c.disabled),"formaction"in c&&s(8,i=c.formaction),"type"in c&&s(1,o=c.type),"$$scope"in c&&s(9,r=c.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&s(0,_=x(_)),n.$$.dirty&256&&i&&s(1,o="submit")},[_,o,f,g,h,a,u,l,i,r,t,j]}class te extends X{constructor(e){super(),Y(this,e,$,Z,q,{icon:2,iconPosition:3,size:4,iconSize:5,variant:0,outline:6,disabled:7,formaction:8,type:1})}}export{te as B}; diff --git a/_app/immutable/chunks/Prismjs.DElG_ecN.js b/_app/immutable/chunks/Prismjs.DElG_ecN.js new file mode 100644 index 0000000000000000000000000000000000000000..aa3aad1d063128fe3fd2810e6b09f298dfff339d --- /dev/null +++ b/_app/immutable/chunks/Prismjs.DElG_ecN.js @@ -0,0 +1,3 @@ +import{s as d,e as l,O as n,d as D,g as r,P as U,f as C,j as O,k as h,l as a,u as o,M as F,t as P,Q as f,i as c,R as g}from"./scheduler.B2FSa8mv.js";import{S as B,i as G}from"./index.CzNnnxDZ.js";import{g as m,P as M}from"./VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";function _(R){let E,T,I;return{c(){E=l("span"),T=n("svg"),I=n("path"),this.h()},l(e){E=D(e,"SPAN",{"aria-expanded":!0,class:!0});var N=r(E);T=U(N,"svg",{viewBox:!0,width:!0,height:!0,class:!0});var S=r(T);I=U(S,"path",{fill:!0,"fill-rule":!0,d:!0}),r(I).forEach(C),S.forEach(C),N.forEach(C),this.h()},h(){O(I,"fill",R[3]),O(I,"fill-rule","evenodd"),O(I,"d","M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"),O(T,"viewBox","0 0 16 16"),O(T,"width",R[1]),O(T,"height",R[1]),O(T,"class","svelte-c6mrxw"),O(E,"aria-expanded",R[0]),O(E,"class","svelte-c6mrxw")},m(e,N){h(e,E,N),a(E,T),a(T,I)},p(e,[N]){N&8&&O(I,"fill",e[3]),N&2&&O(T,"width",e[1]),N&2&&O(T,"height",e[1]),N&1&&O(E,"aria-expanded",e[0])},i:o,o,d(e){e&&C(E)}}}function H(R,E,T){let I,e,N=o,S=()=>(N(),N=F(I,t=>T(3,e=t)),I);R.$$.on_destroy.push(()=>N());const{resolveColor:L}=m();let{toggled:A=!1}=E,{color:s="base-content"}=E,{size:i=10}=E;return R.$$set=t=>{"toggled"in t&&T(0,A=t.toggled),"color"in t&&T(4,s=t.color),"size"in t&&T(1,i=t.size)},R.$$.update=()=>{R.$$.dirty&16&&S(T(2,I=L(s)))},[A,i,I,e,s]}class V extends B{constructor(E){super(),G(this,E,H,_,d,{toggled:0,color:4,size:1})}}const u={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};function Y(R){let E,T,I,e,N=M.highlight(R[0],u)+"",S;return{c(){E=l("pre"),T=P(" "),I=l("code"),e=new f(!1),S=P(` +`),this.h()},l(L){E=D(L,"PRE",{class:!0});var A=r(E);T=c(A," "),I=D(A,"CODE",{class:!0});var s=r(I);e=g(s,!1),s.forEach(C),S=c(A,` +`),A.forEach(C),this.h()},h(){e.a=null,O(I,"class","language-sql svelte-1v2cb81"),O(E,"class","text-xs max-h-56 overflow-auto pretty-scrollbar")},m(L,A){h(L,E,A),a(E,T),a(E,I),e.m(N,I),a(E,S)},p(L,[A]){A&1&&N!==(N=M.highlight(L[0],u)+"")&&e.p(N)},i:o,o,d(L){L&&C(E)}}}function b(R,E,T){let{code:I=""}=E;return R.$$set=e=>{"code"in e&&T(0,I=e.code)},[I]}class W extends B{constructor(E){super(),G(this,E,b,Y,d,{code:0})}}export{V as C,W as P}; diff --git a/_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js b/_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js new file mode 100644 index 0000000000000000000000000000000000000000..7ea3b50d4506025e9e95370bf0fdf23579d1ff8d --- /dev/null +++ b/_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js @@ -0,0 +1,294 @@ +var Vne=Object.defineProperty;var HO=r=>{throw TypeError(r)};var Une=(r,e,t)=>e in r?Vne(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var on=(r,e,t)=>Une(r,typeof e!="symbol"?e+"":e,t),WO=(r,e,t)=>e.has(r)||HO("Cannot "+t);var ee=(r,e,t)=>(WO(r,e,"read from private field"),t?t.call(r):e.get(r)),Nt=(r,e,t)=>e.has(r)?HO("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),Ir=(r,e,t,n)=>(WO(r,e,"write to private field"),n?n.call(r,t):e.set(r,t),t);var $O=(r,e,t,n)=>({set _(i){Ir(r,e,i,t)},get _(){return ee(r,e,n)}});import{w as Tf,b as lo,r as P3,d as ml,e as Gne,g as Hne}from"./entry.CmEkywbK.js";import{b as re,t as K,S as kr,i as Tr,j as Wne,c as Ne,a as ze,m as Ve,e as Ue,g as Mt,d as It,f as Gl,k as xG}from"./index.CzNnnxDZ.js";import{L as Bd,aq as R3,q as TC,a8 as Od,ae as MC,r as U0,p as IC,ar as sT,Z as $ne,s as Mr,aa as En,O as zi,b as Xe,P as Vi,g as ge,f as U,as as ga,k as le,l as X,u as xe,ak as wi,a9 as Lg,ab as us,t as dt,i as pt,m as Rt,e as oe,d as se,H as kt,j as Y,I as Pd,z as Ui,a as Le,c as Fe,J as DG,D as Gi,E as Hi,F as Wi,K as LC,at as EG,ag as Xw,B as _n,ao as jO,V as kG,T as He,A as $r,Q as cv,R as fv,n as y1,M as _o,N as N3,ap as qO,a7 as TG,G as jne,aj as MG,am as IG}from"./scheduler.B2FSa8mv.js";import{_ as Ts}from"./preload-helper.D7HrI6pR.js";import{d as qne,b as Yne}from"./index.rV6zwFgL.js";function Lr(r){return(r==null?void 0:r.length)!==void 0?r:Array.from(r)}function oYe(r,e){r.d(1),e.delete(r.key)}function Zne(r,e){re(r,1,1,()=>{e.delete(r.key)})}function Kne(r,e,t,n,i,a,o,s,l,u,c,f){let h=r.length,d=a.length,p=h;const g={};for(;p--;)g[r[p].key]=p;const v=[],m=new Map,y=new Map,b=[];for(p=d;p--;){const C=f(i,a,p),A=t(C);let x=o.get(A);x?b.push(()=>x.p(C,e)):(x=u(A,C),x.c()),m.set(A,v[p]=x),A in g&&y.set(A,Math.abs(p-g[A]))}const _=new Set,w=new Set;function S(C){K(C,1),C.m(s,c),o.set(C.key,C),c=C.first,d--}for(;h&&d;){const C=v[d-1],A=r[h-1],x=C.key,D=A.key;C===A?(c=C.first,h--,d--):m.has(D)?!o.has(x)||_.has(x)?S(C):w.has(D)?h--:y.get(x)>y.get(D)?(w.add(x),S(C)):(_.add(D),h--):(l(A,o),h--)}for(;h--;){const C=r[h];m.has(C.key)||l(C,o)}for(;d;)S(v[d-1]);return Bd(b),v}function Fo(r,e){const t={},n={},i={$$scope:1};let a=r.length;for(;a--;){const o=r[a],s=e[a];if(s){for(const l in o)l in s||(n[l]=1);for(const l in s)i[l]||(t[l]=s[l],i[l]=1);r[a]=s}else for(const l in o)i[l]=1}for(const o in n)o in t||(t[o]=void 0);return t}function b1(r){return typeof r=="object"&&r!==null?r:{}}function fr(r,e,t,n){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):i(c.value).then(s,l)}u((n=n.apply(r,e||[])).next())})}function YO(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ar(r){return this instanceof Ar?(this.v=r,this):new Ar(r)}function kl(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,a=[];return i=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(d){return function(p){return Promise.resolve(p).then(d,f)}}function s(d,p){n[d]&&(i[d]=function(g){return new Promise(function(v,m){a.push([d,g,v,m])>1||l(d,g)})},p&&(i[d]=p(i[d])))}function l(d,p){try{u(n[d](p))}catch(g){h(a[0][3],g)}}function u(d){d.value instanceof Ar?Promise.resolve(d.value.v).then(c,f):h(a[0][2],d)}function c(d){l("next",d)}function f(d){l("throw",d)}function h(d,p){d(p),a.shift(),a.length&&l(a[0][0],a[0][1])}}function tw(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,a){e[i]=r[i]?function(o){return(t=!t)?{value:Ar(r[i](o)),done:!1}:a?a(o):o}:a}}function Qh(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof YO=="function"?YO(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=r[a]&&function(o){return new Promise(function(s,l){o=r[a](o),i(s,l,o.done,o.value)})}}function i(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},o)}}var Ls;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth",r[r.DurationSecond=-27]="DurationSecond",r[r.DurationMillisecond=-28]="DurationMillisecond",r[r.DurationMicrosecond=-29]="DurationMicrosecond",r[r.DurationNanosecond=-30]="DurationNanosecond"})(Ls||(Ls={}));var ZO;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(ZO||(ZO={}));function Xne(r){switch(r.typeId){case Ls.Date:return"date";case Ls.Float:case Ls.Int:return"number";case Ls.Bool:return"boolean";case Ls.Dictionary:default:return"string"}}function Qne(r){if(r==null)return[];const e=r.toArray();Object.defineProperty(e,"_evidenceColumnTypes",{enumerable:!1,value:r.schema.fields.map(i=>({name:i.name,evidenceType:Xne(i.type),typeFidelity:"precise"}))});const t=r.schema.fields.filter(i=>i.type.typeId===Ls.Date),n=r.schema.fields.filter(i=>i.type.typeId===Ls.List);for(const i of e){for(const a of t)i[a.name]=new Date(i[a.name]);for(const a of n)i[a.name]=LG(i[a.name])}return e}function LG(r){var i,a,o,s;if(r==null)return[];const e=r.toArray(),t=((a=(i=r.type)==null?void 0:i.children)==null?void 0:a.filter(l=>l.type.typeId===Ls.Date))??[],n=((s=(o=r.type)==null?void 0:o.children)==null?void 0:s.filter(l=>l.type.typeId===Ls.List))??[];for(const l of e){for(const u of t)l[u.name]=new Date(l[u.name]);for(const u of n)l[u.name]=LG(l[u.name])}return e}function FG(){let r,e,t=new Promise((n,i)=>{r=n,e=i});return{resolve:r,reject:e,promise:t}}function BG(r){return Promise.race([r,new Promise((e,t)=>setTimeout(()=>t(new Error("Timeout while initializing database")),5e3))])}const Jne=new TextDecoder("utf-8"),lT=r=>Jne.decode(r),eie=new TextEncoder,z3=r=>eie.encode(r),tie=r=>typeof r=="number",OG=r=>typeof r=="boolean",bi=r=>typeof r=="function",co=r=>r!=null&&Object(r)===r,pd=r=>co(r)&&bi(r.then),_1=r=>co(r)&&bi(r[Symbol.iterator]),hv=r=>co(r)&&bi(r[Symbol.asyncIterator]),uT=r=>co(r)&&co(r.schema),PG=r=>co(r)&&"done"in r&&"value"in r,RG=r=>co(r)&&bi(r.stat)&&tie(r.fd),NG=r=>co(r)&&V3(r.body),FC=r=>"_getDOMStream"in r&&"_getNodeStream"in r,rie=r=>co(r)&&bi(r.abort)&&bi(r.getWriter)&&!FC(r),V3=r=>co(r)&&bi(r.cancel)&&bi(r.getReader)&&!FC(r),nie=r=>co(r)&&bi(r.end)&&bi(r.write)&&OG(r.writable)&&!FC(r),zG=r=>co(r)&&bi(r.read)&&bi(r.pipe)&&OG(r.readable)&&!FC(r),iie=r=>co(r)&&bi(r.clear)&&bi(r.bytes)&&bi(r.position)&&bi(r.setPosition)&&bi(r.capacity)&&bi(r.getBufferIdentifier)&&bi(r.createLong),U3=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function aie(r){const e=r[0]?[r[0]]:[];let t,n,i,a;for(let o,s,l=0,u=0,c=r.length;++lc+f.byteLength,0);let i,a,o,s=0,l=-1;const u=Math.min(e||Number.POSITIVE_INFINITY,n);for(const c=t.length;++ldn(Int32Array,r),XO=r=>dn(BigInt64Array,r),Yr=r=>dn(Uint8Array,r),cT=r=>(r.next(),r);function*oie(r,e){const t=function*(i){yield i},n=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof U3?t(e):_1(e)?e:t(e);return yield*cT(function*(i){let a=null;do a=i.next(yield dn(r,a));while(!a.done)}(n[Symbol.iterator]())),new r}const sie=r=>oie(Uint8Array,r);function VG(r,e){return kl(this,arguments,function*(){if(pd(e))return yield Ar(yield Ar(yield*tw(Qh(VG(r,yield Ar(e))))));const n=function(o){return kl(this,arguments,function*(){yield yield Ar(yield Ar(o))})},i=function(o){return kl(this,arguments,function*(){yield Ar(yield*tw(Qh(cT(function*(s){let l=null;do l=s.next(yield l==null?void 0:l.value);while(!l.done)}(o[Symbol.iterator]())))))})},a=typeof e=="string"||ArrayBuffer.isView(e)||e instanceof ArrayBuffer||e instanceof U3?n(e):_1(e)?i(e):hv(e)?e:n(e);return yield Ar(yield*tw(Qh(cT(function(o){return kl(this,arguments,function*(){let s=null;do s=yield Ar(o.next(yield yield Ar(dn(r,s))));while(!s.done)})}(a[Symbol.asyncIterator]()))))),yield Ar(new r)})}const lie=r=>VG(Uint8Array,r);function UG(r,e,t){if(r!==0){t=t.slice(0,e);for(let n=-1,i=t.length;++n0)do if(r[t]!==e[t])return!1;while(++t(r.next(),r);function*cie(r){let e,t=!1,n=[],i,a,o,s=0;function l(){return a==="peek"?Hl(n,o)[0]:([i,n,s]=Hl(n,o),i)}({cmd:a,size:o}=(yield null)||{cmd:"read",size:0});const u=sie(r)[Symbol.iterator]();try{do if({done:e,value:i}=Number.isNaN(o-s)?u.next():u.next(o-s),!e&&i.byteLength>0&&(n.push(i),s+=i.byteLength),e||o<=s)do({cmd:a,size:o}=yield l());while(o0&&(i.push(a),l+=a.byteLength),t||s<=l)do({cmd:o,size:s}=yield yield Ar(u()));while(s0&&(i.push(Yr(a)),l+=a.byteLength),t||s<=l)do({cmd:o,size:s}=yield yield Ar(u()));while(s{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return fr(this,void 0,void 0,function*(){const{reader:t,source:n}=this;t&&(yield t.cancel(e).catch(()=>{})),n&&n.locked&&this.releaseLock()})}read(e){return fr(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};const t=yield this.reader.read();return!t.done&&(t.value=Yr(t)),t})}}const dx=(r,e)=>{const t=i=>n([e,i]);let n;return[e,t,new Promise(i=>(n=i)&&r.once(e,t))]};function pie(r){return kl(this,arguments,function*(){const t=[];let n="error",i=!1,a=null,o,s,l=0,u=[],c;function f(){return o==="peek"?Hl(u,s)[0]:([c,u,l]=Hl(u,s),c)}if({cmd:o,size:s}=(yield yield Ar(null))||{cmd:"read",size:0},r.isTTY)return yield yield Ar(new Uint8Array(0)),yield Ar(null);try{t[0]=dx(r,"end"),t[1]=dx(r,"error");do{if(t[2]=dx(r,"readable"),[n,a]=yield Ar(Promise.race(t.map(d=>d[2]))),n==="error")break;if((i=n==="end")||(Number.isFinite(s-l)?(c=Yr(r.read(s-l)),c.byteLength0&&(u.push(c),l+=c.byteLength)),i||s<=l)do({cmd:o,size:s}=yield yield Ar(f()));while(s{for(const[m,y]of d)r.off(m,y);try{const m=r.destroy;m&&m.call(r,p),p=void 0}catch(m){p=m||p}finally{p!=null?v(p):g()}})}})}var ti;(function(r){r[r.V1=0]="V1",r[r.V2=1]="V2",r[r.V3=2]="V3",r[r.V4=3]="V4",r[r.V5=4]="V5"})(ti||(ti={}));var va;(function(r){r[r.Sparse=0]="Sparse",r[r.Dense=1]="Dense"})(va||(va={}));var pa;(function(r){r[r.HALF=0]="HALF",r[r.SINGLE=1]="SINGLE",r[r.DOUBLE=2]="DOUBLE"})(pa||(pa={}));var cs;(function(r){r[r.DAY=0]="DAY",r[r.MILLISECOND=1]="MILLISECOND"})(cs||(cs={}));var Kt;(function(r){r[r.SECOND=0]="SECOND",r[r.MILLISECOND=1]="MILLISECOND",r[r.MICROSECOND=2]="MICROSECOND",r[r.NANOSECOND=3]="NANOSECOND"})(Kt||(Kt={}));var Wl;(function(r){r[r.YEAR_MONTH=0]="YEAR_MONTH",r[r.DAY_TIME=1]="DAY_TIME",r[r.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Wl||(Wl={}));const px=2,wl=4,Mu=4,cn=4,Dc=new Int32Array(2),QO=new Float32Array(Dc.buffer),JO=new Float64Array(Dc.buffer),cb=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var fT;(function(r){r[r.UTF8_BYTES=1]="UTF8_BYTES",r[r.UTF16_STRING=2]="UTF16_STRING"})(fT||(fT={}));let Fg=class GG{constructor(e){this.bytes_=e,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(e){return new GG(new Uint8Array(e))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(e){this.position_=e}capacity(){return this.bytes_.length}readInt8(e){return this.readUint8(e)<<24>>24}readUint8(e){return this.bytes_[e]}readInt16(e){return this.readUint16(e)<<16>>16}readUint16(e){return this.bytes_[e]|this.bytes_[e+1]<<8}readInt32(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24}readUint32(e){return this.readInt32(e)>>>0}readInt64(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<>8}writeUint16(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8}writeInt32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeUint32(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24}writeInt64(e,t){this.writeInt32(e,Number(BigInt.asIntN(32,t))),this.writeInt32(e+4,Number(BigInt.asIntN(32,t>>BigInt(32))))}writeUint64(e,t){this.writeUint32(e,Number(BigInt.asUintN(32,t))),this.writeUint32(e+4,Number(BigInt.asUintN(32,t>>BigInt(32))))}writeFloat32(e,t){QO[0]=t,this.writeInt32(e,Dc[0])}writeFloat64(e,t){JO[0]=t,this.writeInt32(e,Dc[cb?0:1]),this.writeInt32(e+4,Dc[cb?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=e);const n=~(this.bb.capacity()-this.space+t)+1&e-1;for(;this.space=0&&this.vtable[t]==0;t--);const n=t+1;for(;t>=0;t--)this.addInt16(this.vtable[t]!=0?e-this.vtable[t]:0);const i=2;this.addInt16(e-this.object_start);const a=(n+i)*px;this.addInt16(a);let o=0;const s=this.space;e:for(t=0;t=0;o--)this.writeInt8(a.charCodeAt(o))}this.prep(this.minalign,wl+i),this.addOffset(e),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(e,t){this.finish(e,t,!0)}requiredField(e,t){const n=this.bb.capacity()-e,i=n-this.bb.readInt32(n);if(!(t=0;n--)e.addInt32(t[n]);return e.endVector()}static startTypeIdsVector(e,t){e.startVector(4,t,4)}static endUnion(e){return e.endObject()}static createUnion(e,t,n){return Qa.startUnion(e),Qa.addMode(e,t),Qa.addTypeIds(e,n),Qa.endUnion(e)}}let oP=class qm{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsUtf8(e,t){return(t||new qm).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsUtf8(e,t){return e.setPosition(e.position()+cn),(t||new qm).__init(e.readInt32(e.position())+e.position(),e)}static startUtf8(e){e.startObject(0)}static endUtf8(e){return e.endObject()}static createUtf8(e){return qm.startUtf8(e),qm.endUtf8(e)}};var kn;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.FloatingPoint=3]="FloatingPoint",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct_=13]="Struct_",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.LargeList=21]="LargeList",r[r.RunEndEncoded=22]="RunEndEncoded"})(kn||(kn={}));let zo=class sw{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsField(e,t){return(t||new sw).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsField(e,t){return e.setPosition(e.position()+cn),(t||new sw).__init(e.readInt32(e.position())+e.position(),e)}name(e){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}nullable(){const e=this.bb.__offset(this.bb_pos,6);return e?!!this.bb.readInt8(this.bb_pos+e):!1}typeType(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):kn.NONE}type(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__union(e,this.bb_pos+t):null}dictionary(e){const t=this.bb.__offset(this.bb_pos,12);return t?(e||new Iu).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}children(e,t){const n=this.bb.__offset(this.bb_pos,14);return n?(t||new sw).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}childrenLength(){const e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,16);return n?(t||new Si).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,16);return e?this.bb.__vector_len(this.bb_pos+e):0}static startField(e){e.startObject(7)}static addName(e,t){e.addFieldOffset(0,t,0)}static addNullable(e,t){e.addFieldInt8(1,+t,0)}static addTypeType(e,t){e.addFieldInt8(2,t,kn.NONE)}static addType(e,t){e.addFieldOffset(3,t,0)}static addDictionary(e,t){e.addFieldOffset(4,t,0)}static addChildren(e,t){e.addFieldOffset(5,t,0)}static createChildrenVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startChildrenVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(6,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endField(e){return e.endObject()}},yl=class gu{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsSchema(e,t){return(t||new gu).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsSchema(e,t){return e.setPosition(e.position()+cn),(t||new gu).__init(e.readInt32(e.position())+e.position(),e)}endianness(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):Bg.Little}fields(e,t){const n=this.bb.__offset(this.bb_pos,6);return n?(t||new zo).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}fieldsLength(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new Si).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}features(e){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb.__vector(this.bb_pos+t)+e*8):BigInt(0)}featuresLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}static startSchema(e){e.startObject(4)}static addEndianness(e,t){e.addFieldInt16(0,t,Bg.Little)}static addFields(e,t){e.addFieldOffset(1,t,0)}static createFieldsVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startFieldsVector(e,t){e.startVector(4,t,4)}static addCustomMetadata(e,t){e.addFieldOffset(2,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static addFeatures(e,t){e.addFieldOffset(3,t,0)}static createFeaturesVector(e,t){e.startVector(8,t.length,8);for(let n=t.length-1;n>=0;n--)e.addInt64(t[n]);return e.endVector()}static startFeaturesVector(e,t){e.startVector(8,t,8)}static endSchema(e){return e.endObject()}static finishSchemaBuffer(e,t){e.finish(t)}static finishSizePrefixedSchemaBuffer(e,t){e.finish(t,void 0,!0)}static createSchema(e,t,n,i,a){return gu.startSchema(e),gu.addEndianness(e,t),gu.addFields(e,n),gu.addCustomMetadata(e,i),gu.addFeatures(e,a),gu.endSchema(e)}};var en;(function(r){r[r.NONE=0]="NONE",r[r.Schema=1]="Schema",r[r.DictionaryBatch=2]="DictionaryBatch",r[r.RecordBatch=3]="RecordBatch",r[r.Tensor=4]="Tensor",r[r.SparseTensor=5]="SparseTensor"})(en||(en={}));var ae;(function(r){r[r.NONE=0]="NONE",r[r.Null=1]="Null",r[r.Int=2]="Int",r[r.Float=3]="Float",r[r.Binary=4]="Binary",r[r.Utf8=5]="Utf8",r[r.Bool=6]="Bool",r[r.Decimal=7]="Decimal",r[r.Date=8]="Date",r[r.Time=9]="Time",r[r.Timestamp=10]="Timestamp",r[r.Interval=11]="Interval",r[r.List=12]="List",r[r.Struct=13]="Struct",r[r.Union=14]="Union",r[r.FixedSizeBinary=15]="FixedSizeBinary",r[r.FixedSizeList=16]="FixedSizeList",r[r.Map=17]="Map",r[r.Duration=18]="Duration",r[r.LargeBinary=19]="LargeBinary",r[r.LargeUtf8=20]="LargeUtf8",r[r.Dictionary=-1]="Dictionary",r[r.Int8=-2]="Int8",r[r.Int16=-3]="Int16",r[r.Int32=-4]="Int32",r[r.Int64=-5]="Int64",r[r.Uint8=-6]="Uint8",r[r.Uint16=-7]="Uint16",r[r.Uint32=-8]="Uint32",r[r.Uint64=-9]="Uint64",r[r.Float16=-10]="Float16",r[r.Float32=-11]="Float32",r[r.Float64=-12]="Float64",r[r.DateDay=-13]="DateDay",r[r.DateMillisecond=-14]="DateMillisecond",r[r.TimestampSecond=-15]="TimestampSecond",r[r.TimestampMillisecond=-16]="TimestampMillisecond",r[r.TimestampMicrosecond=-17]="TimestampMicrosecond",r[r.TimestampNanosecond=-18]="TimestampNanosecond",r[r.TimeSecond=-19]="TimeSecond",r[r.TimeMillisecond=-20]="TimeMillisecond",r[r.TimeMicrosecond=-21]="TimeMicrosecond",r[r.TimeNanosecond=-22]="TimeNanosecond",r[r.DenseUnion=-23]="DenseUnion",r[r.SparseUnion=-24]="SparseUnion",r[r.IntervalDayTime=-25]="IntervalDayTime",r[r.IntervalYearMonth=-26]="IntervalYearMonth",r[r.DurationSecond=-27]="DurationSecond",r[r.DurationMillisecond=-28]="DurationMillisecond",r[r.DurationMicrosecond=-29]="DurationMicrosecond",r[r.DurationNanosecond=-30]="DurationNanosecond"})(ae||(ae={}));var yu;(function(r){r[r.OFFSET=0]="OFFSET",r[r.DATA=1]="DATA",r[r.VALIDITY=2]="VALIDITY",r[r.TYPE=3]="TYPE"})(yu||(yu={}));const gie=void 0;function G0(r){if(r===null)return"null";if(r===gie)return"undefined";switch(typeof r){case"number":return`${r}`;case"bigint":return`${r}`;case"string":return`"${r}"`}return typeof r[Symbol.toPrimitive]=="function"?r[Symbol.toPrimitive]("string"):ArrayBuffer.isView(r)?r instanceof BigInt64Array||r instanceof BigUint64Array?`[${[...r].map(e=>G0(e))}]`:`[${r}]`:ArrayBuffer.isView(r)?`[${r}]`:JSON.stringify(r,(e,t)=>typeof t=="bigint"?`${t}`:t)}function xn(r){if(typeof r=="bigint"&&(rNumber.MAX_SAFE_INTEGER))throw new TypeError(`${r} is not safe to convert to a number.`);return Number(r)}function qG(r,e){return xn(r/e)+xn(r%e)/xn(e)}const vie=Symbol.for("isArrowBigNum");function Xs(r,...e){return e.length===0?Object.setPrototypeOf(dn(this.TypedArray,r),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(r,...e),this.constructor.prototype)}Xs.prototype[vie]=!0;Xs.prototype.toJSON=function(){return`"${W0(this)}"`};Xs.prototype.valueOf=function(r){return YG(this,r)};Xs.prototype.toString=function(){return W0(this)};Xs.prototype[Symbol.toPrimitive]=function(r="default"){switch(r){case"number":return YG(this);case"string":return W0(this);case"default":return bie(this)}return W0(this)};function tg(...r){return Xs.apply(this,r)}function rg(...r){return Xs.apply(this,r)}function H0(...r){return Xs.apply(this,r)}Object.setPrototypeOf(tg.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(rg.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(H0.prototype,Object.create(Uint32Array.prototype));Object.assign(tg.prototype,Xs.prototype,{constructor:tg,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(rg.prototype,Xs.prototype,{constructor:rg,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(H0.prototype,Xs.prototype,{constructor:H0,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const mie=BigInt(4294967296)*BigInt(4294967296),yie=mie-BigInt(1);function YG(r,e){const{buffer:t,byteOffset:n,byteLength:i,signed:a}=r,o=new BigUint64Array(t,n,i/8),s=a&&o.at(-1)&BigInt(1)<=0)return gx(r);e=e.slice();let n=1;for(let a=0;a(r.children=null,r.ArrayType=Array,r.OffsetArrayType=Int32Array,r[Symbol.toStringTag]="DataType"))(Tt.prototype);let sf=class extends Tt{constructor(){super(ae.Null)}toString(){return"Null"}};KG=Symbol.toStringTag;sf[KG]=(r=>r[Symbol.toStringTag]="Null")(sf.prototype);class gd extends Tt{constructor(e,t){super(ae.Int),this.isSigned=e,this.bitWidth=t}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}XG=Symbol.toStringTag;gd[XG]=(r=>(r.isSigned=null,r.bitWidth=null,r[Symbol.toStringTag]="Int"))(gd.prototype);class $0 extends gd{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty($0.prototype,"ArrayType",{value:Int32Array});class tS extends Tt{constructor(e){super(ae.Float),this.precision=e}get ArrayType(){switch(this.precision){case pa.HALF:return Uint16Array;case pa.SINGLE:return Float32Array;case pa.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}QG=Symbol.toStringTag;tS[QG]=(r=>(r.precision=null,r[Symbol.toStringTag]="Float"))(tS.prototype);class rS extends Tt{constructor(){super(ae.Binary)}toString(){return"Binary"}}JG=Symbol.toStringTag;rS[JG]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Binary"))(rS.prototype);class nS extends Tt{constructor(){super(ae.LargeBinary)}toString(){return"LargeBinary"}}eH=Symbol.toStringTag;nS[eH]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeBinary"))(nS.prototype);class iS extends Tt{constructor(){super(ae.Utf8)}toString(){return"Utf8"}}tH=Symbol.toStringTag;iS[tH]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Utf8"))(iS.prototype);class aS extends Tt{constructor(){super(ae.LargeUtf8)}toString(){return"LargeUtf8"}}rH=Symbol.toStringTag;aS[rH]=(r=>(r.ArrayType=Uint8Array,r.OffsetArrayType=BigInt64Array,r[Symbol.toStringTag]="LargeUtf8"))(aS.prototype);let oS=class extends Tt{constructor(){super(ae.Bool)}toString(){return"Bool"}};nH=Symbol.toStringTag;oS[nH]=(r=>(r.ArrayType=Uint8Array,r[Symbol.toStringTag]="Bool"))(oS.prototype);class sS extends Tt{constructor(e,t,n=128){super(ae.Decimal),this.scale=e,this.precision=t,this.bitWidth=n}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}iH=Symbol.toStringTag;sS[iH]=(r=>(r.scale=null,r.precision=null,r.ArrayType=Uint32Array,r[Symbol.toStringTag]="Decimal"))(sS.prototype);class lS extends Tt{constructor(e){super(ae.Date),this.unit=e}toString(){return`Date${(this.unit+1)*32}<${cs[this.unit]}>`}get ArrayType(){return this.unit===cs.DAY?Int32Array:BigInt64Array}}aH=Symbol.toStringTag;lS[aH]=(r=>(r.unit=null,r[Symbol.toStringTag]="Date"))(lS.prototype);class uS extends Tt{constructor(e,t){super(ae.Time),this.unit=e,this.bitWidth=t}toString(){return`Time${this.bitWidth}<${Kt[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}oH=Symbol.toStringTag;uS[oH]=(r=>(r.unit=null,r.bitWidth=null,r[Symbol.toStringTag]="Time"))(uS.prototype);class cS extends Tt{constructor(e,t){super(ae.Timestamp),this.unit=e,this.timezone=t}toString(){return`Timestamp<${Kt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}sH=Symbol.toStringTag;cS[sH]=(r=>(r.unit=null,r.timezone=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Timestamp"))(cS.prototype);class fS extends Tt{constructor(e){super(ae.Interval),this.unit=e}toString(){return`Interval<${Wl[this.unit]}>`}}lH=Symbol.toStringTag;fS[lH]=(r=>(r.unit=null,r.ArrayType=Int32Array,r[Symbol.toStringTag]="Interval"))(fS.prototype);class hS extends Tt{constructor(e){super(ae.Duration),this.unit=e}toString(){return`Duration<${Kt[this.unit]}>`}}uH=Symbol.toStringTag;hS[uH]=(r=>(r.unit=null,r.ArrayType=BigInt64Array,r[Symbol.toStringTag]="Duration"))(hS.prototype);class dS extends Tt{constructor(e){super(ae.List),this.children=[e]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}cH=Symbol.toStringTag;dS[cH]=(r=>(r.children=null,r[Symbol.toStringTag]="List"))(dS.prototype);class Fa extends Tt{constructor(e){super(ae.Struct),this.children=e}toString(){return`Struct<{${this.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}fH=Symbol.toStringTag;Fa[fH]=(r=>(r.children=null,r[Symbol.toStringTag]="Struct"))(Fa.prototype);class pS extends Tt{constructor(e,t,n){super(ae.Union),this.mode=e,this.children=n,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((i,a,o)=>(i[a]=o)&&i||i,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(e=>`${e.type}`).join(" | ")}>`}}hH=Symbol.toStringTag;pS[hH]=(r=>(r.mode=null,r.typeIds=null,r.children=null,r.typeIdToChildIndex=null,r.ArrayType=Int8Array,r[Symbol.toStringTag]="Union"))(pS.prototype);class gS extends Tt{constructor(e){super(ae.FixedSizeBinary),this.byteWidth=e}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}dH=Symbol.toStringTag;gS[dH]=(r=>(r.byteWidth=null,r.ArrayType=Uint8Array,r[Symbol.toStringTag]="FixedSizeBinary"))(gS.prototype);class vS extends Tt{constructor(e,t){super(ae.FixedSizeList),this.listSize=e,this.children=[t]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}pH=Symbol.toStringTag;vS[pH]=(r=>(r.children=null,r.listSize=null,r[Symbol.toStringTag]="FixedSizeList"))(vS.prototype);class mS extends Tt{constructor(e,t=!1){var n,i,a;if(super(ae.Map),this.children=[e],this.keysSorted=t,e&&(e.name="entries",!((n=e==null?void 0:e.type)===null||n===void 0)&&n.children)){const o=(i=e==null?void 0:e.type)===null||i===void 0?void 0:i.children[0];o&&(o.name="key");const s=(a=e==null?void 0:e.type)===null||a===void 0?void 0:a.children[1];s&&(s.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(e=>`${e.name}:${e.type}`).join(", ")}}>`}}gH=Symbol.toStringTag;mS[gH]=(r=>(r.children=null,r.keysSorted=null,r[Symbol.toStringTag]="Map_"))(mS.prototype);const _ie=(r=>()=>++r)(-1);class Og extends Tt{constructor(e,t,n,i){super(ae.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=i||!1,this.id=n==null?_ie():xn(n)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}vH=Symbol.toStringTag;Og[vH]=(r=>(r.id=null,r.indices=null,r.isOrdered=null,r.dictionary=null,r[Symbol.toStringTag]="Dictionary"))(Og.prototype);function bu(r){const e=r;switch(r.typeId){case ae.Decimal:return r.bitWidth/32;case ae.Interval:return 1+e.unit;case ae.FixedSizeList:return e.listSize;case ae.FixedSizeBinary:return e.byteWidth;default:return 1}}class Rr{visitMany(e,...t){return e.map((n,i)=>this.visit(n,...t.map(a=>a[i])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return wie(this,e,t)}getVisitFnByTypeId(e,t=!0){return Tp(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}}function wie(r,e,t=!0){return typeof e=="number"?Tp(r,e,t):typeof e=="string"&&e in ae?Tp(r,ae[e],t):e&&e instanceof Tt?Tp(r,sP(e),t):e!=null&&e.type&&e.type instanceof Tt?Tp(r,sP(e.type),t):Tp(r,ae.NONE,t)}function Tp(r,e,t=!0){let n=null;switch(e){case ae.Null:n=r.visitNull;break;case ae.Bool:n=r.visitBool;break;case ae.Int:n=r.visitInt;break;case ae.Int8:n=r.visitInt8||r.visitInt;break;case ae.Int16:n=r.visitInt16||r.visitInt;break;case ae.Int32:n=r.visitInt32||r.visitInt;break;case ae.Int64:n=r.visitInt64||r.visitInt;break;case ae.Uint8:n=r.visitUint8||r.visitInt;break;case ae.Uint16:n=r.visitUint16||r.visitInt;break;case ae.Uint32:n=r.visitUint32||r.visitInt;break;case ae.Uint64:n=r.visitUint64||r.visitInt;break;case ae.Float:n=r.visitFloat;break;case ae.Float16:n=r.visitFloat16||r.visitFloat;break;case ae.Float32:n=r.visitFloat32||r.visitFloat;break;case ae.Float64:n=r.visitFloat64||r.visitFloat;break;case ae.Utf8:n=r.visitUtf8;break;case ae.LargeUtf8:n=r.visitLargeUtf8;break;case ae.Binary:n=r.visitBinary;break;case ae.LargeBinary:n=r.visitLargeBinary;break;case ae.FixedSizeBinary:n=r.visitFixedSizeBinary;break;case ae.Date:n=r.visitDate;break;case ae.DateDay:n=r.visitDateDay||r.visitDate;break;case ae.DateMillisecond:n=r.visitDateMillisecond||r.visitDate;break;case ae.Timestamp:n=r.visitTimestamp;break;case ae.TimestampSecond:n=r.visitTimestampSecond||r.visitTimestamp;break;case ae.TimestampMillisecond:n=r.visitTimestampMillisecond||r.visitTimestamp;break;case ae.TimestampMicrosecond:n=r.visitTimestampMicrosecond||r.visitTimestamp;break;case ae.TimestampNanosecond:n=r.visitTimestampNanosecond||r.visitTimestamp;break;case ae.Time:n=r.visitTime;break;case ae.TimeSecond:n=r.visitTimeSecond||r.visitTime;break;case ae.TimeMillisecond:n=r.visitTimeMillisecond||r.visitTime;break;case ae.TimeMicrosecond:n=r.visitTimeMicrosecond||r.visitTime;break;case ae.TimeNanosecond:n=r.visitTimeNanosecond||r.visitTime;break;case ae.Decimal:n=r.visitDecimal;break;case ae.List:n=r.visitList;break;case ae.Struct:n=r.visitStruct;break;case ae.Union:n=r.visitUnion;break;case ae.DenseUnion:n=r.visitDenseUnion||r.visitUnion;break;case ae.SparseUnion:n=r.visitSparseUnion||r.visitUnion;break;case ae.Dictionary:n=r.visitDictionary;break;case ae.Interval:n=r.visitInterval;break;case ae.IntervalDayTime:n=r.visitIntervalDayTime||r.visitInterval;break;case ae.IntervalYearMonth:n=r.visitIntervalYearMonth||r.visitInterval;break;case ae.Duration:n=r.visitDuration;break;case ae.DurationSecond:n=r.visitDurationSecond||r.visitDuration;break;case ae.DurationMillisecond:n=r.visitDurationMillisecond||r.visitDuration;break;case ae.DurationMicrosecond:n=r.visitDurationMicrosecond||r.visitDuration;break;case ae.DurationNanosecond:n=r.visitDurationNanosecond||r.visitDuration;break;case ae.FixedSizeList:n=r.visitFixedSizeList;break;case ae.Map:n=r.visitMap;break}if(typeof n=="function")return n;if(!t)return()=>null;throw new Error(`Unrecognized type '${ae[e]}'`)}function sP(r){switch(r.typeId){case ae.Null:return ae.Null;case ae.Int:{const{bitWidth:e,isSigned:t}=r;switch(e){case 8:return t?ae.Int8:ae.Uint8;case 16:return t?ae.Int16:ae.Uint16;case 32:return t?ae.Int32:ae.Uint32;case 64:return t?ae.Int64:ae.Uint64}return ae.Int}case ae.Float:switch(r.precision){case pa.HALF:return ae.Float16;case pa.SINGLE:return ae.Float32;case pa.DOUBLE:return ae.Float64}return ae.Float;case ae.Binary:return ae.Binary;case ae.LargeBinary:return ae.LargeBinary;case ae.Utf8:return ae.Utf8;case ae.LargeUtf8:return ae.LargeUtf8;case ae.Bool:return ae.Bool;case ae.Decimal:return ae.Decimal;case ae.Time:switch(r.unit){case Kt.SECOND:return ae.TimeSecond;case Kt.MILLISECOND:return ae.TimeMillisecond;case Kt.MICROSECOND:return ae.TimeMicrosecond;case Kt.NANOSECOND:return ae.TimeNanosecond}return ae.Time;case ae.Timestamp:switch(r.unit){case Kt.SECOND:return ae.TimestampSecond;case Kt.MILLISECOND:return ae.TimestampMillisecond;case Kt.MICROSECOND:return ae.TimestampMicrosecond;case Kt.NANOSECOND:return ae.TimestampNanosecond}return ae.Timestamp;case ae.Date:switch(r.unit){case cs.DAY:return ae.DateDay;case cs.MILLISECOND:return ae.DateMillisecond}return ae.Date;case ae.Interval:switch(r.unit){case Wl.DAY_TIME:return ae.IntervalDayTime;case Wl.YEAR_MONTH:return ae.IntervalYearMonth}return ae.Interval;case ae.Duration:switch(r.unit){case Kt.SECOND:return ae.DurationSecond;case Kt.MILLISECOND:return ae.DurationMillisecond;case Kt.MICROSECOND:return ae.DurationMicrosecond;case Kt.NANOSECOND:return ae.DurationNanosecond}return ae.Duration;case ae.Map:return ae.Map;case ae.List:return ae.List;case ae.Struct:return ae.Struct;case ae.Union:switch(r.mode){case va.Dense:return ae.DenseUnion;case va.Sparse:return ae.SparseUnion}return ae.Union;case ae.FixedSizeBinary:return ae.FixedSizeBinary;case ae.FixedSizeList:return ae.FixedSizeList;case ae.Dictionary:return ae.Dictionary}throw new Error(`Unrecognized type '${ae[r.typeId]}'`)}Rr.prototype.visitInt8=null;Rr.prototype.visitInt16=null;Rr.prototype.visitInt32=null;Rr.prototype.visitInt64=null;Rr.prototype.visitUint8=null;Rr.prototype.visitUint16=null;Rr.prototype.visitUint32=null;Rr.prototype.visitUint64=null;Rr.prototype.visitFloat16=null;Rr.prototype.visitFloat32=null;Rr.prototype.visitFloat64=null;Rr.prototype.visitDateDay=null;Rr.prototype.visitDateMillisecond=null;Rr.prototype.visitTimestampSecond=null;Rr.prototype.visitTimestampMillisecond=null;Rr.prototype.visitTimestampMicrosecond=null;Rr.prototype.visitTimestampNanosecond=null;Rr.prototype.visitTimeSecond=null;Rr.prototype.visitTimeMillisecond=null;Rr.prototype.visitTimeMicrosecond=null;Rr.prototype.visitTimeNanosecond=null;Rr.prototype.visitDenseUnion=null;Rr.prototype.visitSparseUnion=null;Rr.prototype.visitIntervalDayTime=null;Rr.prototype.visitIntervalYearMonth=null;Rr.prototype.visitDuration=null;Rr.prototype.visitDurationSecond=null;Rr.prototype.visitDurationMillisecond=null;Rr.prototype.visitDurationMicrosecond=null;Rr.prototype.visitDurationNanosecond=null;const mH=new Float64Array(1),Kd=new Uint32Array(mH.buffer);function yH(r){const e=(r&31744)>>10,t=(r&1023)/1024,n=Math.pow(-1,(r&32768)>>15);switch(e){case 31:return n*(t?Number.NaN:1/0);case 0:return n*(t?6103515625e-14*t:0)}return n*Math.pow(2,e-15)*(1+t)}function Sie(r){if(r!==r)return 32256;mH[0]=r;const e=(Kd[1]&2147483648)>>16&65535;let t=Kd[1]&2146435072,n=0;return t>=1089470464?Kd[0]>0?t=31744:(t=(t&2080374784)>>16,n=(Kd[1]&1048575)>>10):t<=1056964608?(n=1048576+(Kd[1]&1048575),n=1048576+(n<<(t>>20)-998)>>21,t=0):(t=t-1056964608>>10,n=(Kd[1]&1048575)+512>>10),e|t|n&65535}class Jt extends Rr{}function ar(r){return(e,t,n)=>{if(e.setValid(t,n!=null))return r(e,t,n)}}const Cie=(r,e,t)=>{r[e]=Math.floor(t/864e5)},bH=(r,e,t,n)=>{if(t+1{const i=r+t;n?e[i>>3]|=1<>3]&=~(1<{r[e]=t},H3=({values:r},e,t)=>{r[e]=t},_H=({values:r},e,t)=>{r[e]=Sie(t)},xie=(r,e,t)=>{switch(r.type.precision){case pa.HALF:return _H(r,e,t);case pa.SINGLE:case pa.DOUBLE:return H3(r,e,t)}},wH=({values:r},e,t)=>{Cie(r,e,t.valueOf())},SH=({values:r},e,t)=>{r[e]=BigInt(t)},Die=({stride:r,values:e},t,n)=>{e.set(n.subarray(0,r),r*t)},CH=({values:r,valueOffsets:e},t,n)=>bH(r,e,t,n),AH=({values:r,valueOffsets:e},t,n)=>bH(r,e,t,z3(n)),Eie=(r,e,t)=>{r.type.unit===cs.DAY?wH(r,e,t):SH(r,e,t)},xH=({values:r},e,t)=>{r[e]=BigInt(t/1e3)},DH=({values:r},e,t)=>{r[e]=BigInt(t)},EH=({values:r},e,t)=>{r[e]=BigInt(t*1e3)},kH=({values:r},e,t)=>{r[e]=BigInt(t*1e6)},kie=(r,e,t)=>{switch(r.type.unit){case Kt.SECOND:return xH(r,e,t);case Kt.MILLISECOND:return DH(r,e,t);case Kt.MICROSECOND:return EH(r,e,t);case Kt.NANOSECOND:return kH(r,e,t)}},TH=({values:r},e,t)=>{r[e]=t},MH=({values:r},e,t)=>{r[e]=t},IH=({values:r},e,t)=>{r[e]=t},LH=({values:r},e,t)=>{r[e]=t},Tie=(r,e,t)=>{switch(r.type.unit){case Kt.SECOND:return TH(r,e,t);case Kt.MILLISECOND:return MH(r,e,t);case Kt.MICROSECOND:return IH(r,e,t);case Kt.NANOSECOND:return LH(r,e,t)}},Mie=({values:r,stride:e},t,n)=>{r.set(n.subarray(0,e),e*t)},Iie=(r,e,t)=>{const n=r.children[0],i=r.valueOffsets,a=fs.getVisitFn(n);if(Array.isArray(t))for(let o=-1,s=i[e],l=i[e+1];s{const n=r.children[0],{valueOffsets:i}=r,a=fs.getVisitFn(n);let{[e]:o,[e+1]:s}=i;const l=t instanceof Map?t.entries():Object.entries(t);for(const u of l)if(a(n,o,u),++o>=s)break},Fie=(r,e)=>(t,n,i,a)=>n&&t(n,r,e[a]),Bie=(r,e)=>(t,n,i,a)=>n&&t(n,r,e.get(a)),Oie=(r,e)=>(t,n,i,a)=>n&&t(n,r,e.get(i.name)),Pie=(r,e)=>(t,n,i,a)=>n&&t(n,r,e[i.name]),Rie=(r,e,t)=>{const n=r.type.children.map(a=>fs.getVisitFn(a.type)),i=t instanceof Map?Oie(e,t):t instanceof ln?Bie(e,t):Array.isArray(t)?Fie(e,t):Pie(e,t);r.type.children.forEach((a,o)=>i(n[o],r.children[o],a,o))},Nie=(r,e,t)=>{r.type.mode===va.Dense?FH(r,e,t):BH(r,e,t)},FH=(r,e,t)=>{const n=r.type.typeIdToChildIndex[r.typeIds[e]],i=r.children[n];fs.visit(i,r.valueOffsets[e],t)},BH=(r,e,t)=>{const n=r.type.typeIdToChildIndex[r.typeIds[e]],i=r.children[n];fs.visit(i,e,t)},zie=(r,e,t)=>{var n;(n=r.dictionary)===null||n===void 0||n.set(r.values[e],t)},Vie=(r,e,t)=>{r.type.unit===Wl.DAY_TIME?OH(r,e,t):PH(r,e,t)},OH=({values:r},e,t)=>{r.set(t.subarray(0,2),2*e)},PH=({values:r},e,t)=>{r[e]=t[0]*12+t[1]%12},RH=({values:r},e,t)=>{r[e]=t},NH=({values:r},e,t)=>{r[e]=t},zH=({values:r},e,t)=>{r[e]=t},VH=({values:r},e,t)=>{r[e]=t},Uie=(r,e,t)=>{switch(r.type.unit){case Kt.SECOND:return RH(r,e,t);case Kt.MILLISECOND:return NH(r,e,t);case Kt.MICROSECOND:return zH(r,e,t);case Kt.NANOSECOND:return VH(r,e,t)}},Gie=(r,e,t)=>{const{stride:n}=r,i=r.children[0],a=fs.getVisitFn(i);if(Array.isArray(t))for(let o=-1,s=e*n;++o`${G0(e)}: ${G0(t)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Hie(this[Ms],this[ng])}}class Hie{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const e=this.childIndex;return et.name)}has(e,t){return e[Ms].type.children.findIndex(n=>n.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[Ms].type.children.findIndex(n=>n.name===t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const n=e[Ms].type.children.findIndex(i=>i.name===t);if(n!==-1){const i=fo.visit(e[Ms].children[n],e[ng]);return Reflect.set(e,t,i),i}}set(e,t,n){const i=e[Ms].type.children.findIndex(a=>a.name===t);return i!==-1?(fs.visit(e[Ms].children[i],e[ng],n),Reflect.set(e,t,n)):Reflect.has(e,t)||typeof t=="symbol"?Reflect.set(e,t,n):!1}}class $t extends Rr{}function er(r){return(e,t)=>e.getValid(t)?r(e,t):null}const $ie=(r,e)=>864e5*r[e],jie=(r,e)=>null,UH=(r,e,t)=>{if(t+1>=e.length)return null;const n=xn(e[t]),i=xn(e[t+1]);return r.subarray(n,i)},qie=({offset:r,values:e},t)=>{const n=r+t;return(e[n>>3]&1<$ie(r,e),HH=({values:r},e)=>xn(r[e]),Mf=({stride:r,values:e},t)=>e[r*t],Yie=({stride:r,values:e},t)=>yH(e[r*t]),WH=({values:r},e)=>r[e],Zie=({stride:r,values:e},t)=>e.subarray(r*t,r*(t+1)),$H=({values:r,valueOffsets:e},t)=>UH(r,e,t),jH=({values:r,valueOffsets:e},t)=>{const n=UH(r,e,t);return n!==null?lT(n):null},Kie=({values:r},e)=>r[e],Xie=({type:r,values:e},t)=>r.precision!==pa.HALF?e[t]:yH(e[t]),Qie=(r,e)=>r.type.unit===cs.DAY?GH(r,e):HH(r,e),qH=({values:r},e)=>1e3*xn(r[e]),YH=({values:r},e)=>xn(r[e]),ZH=({values:r},e)=>qG(r[e],BigInt(1e3)),KH=({values:r},e)=>qG(r[e],BigInt(1e6)),Jie=(r,e)=>{switch(r.type.unit){case Kt.SECOND:return qH(r,e);case Kt.MILLISECOND:return YH(r,e);case Kt.MICROSECOND:return ZH(r,e);case Kt.NANOSECOND:return KH(r,e)}},XH=({values:r},e)=>r[e],QH=({values:r},e)=>r[e],JH=({values:r},e)=>r[e],eW=({values:r},e)=>r[e],eae=(r,e)=>{switch(r.type.unit){case Kt.SECOND:return XH(r,e);case Kt.MILLISECOND:return QH(r,e);case Kt.MICROSECOND:return JH(r,e);case Kt.NANOSECOND:return eW(r,e)}},tae=({values:r,stride:e},t)=>G3.decimal(r.subarray(e*t,e*(t+1))),rae=(r,e)=>{const{valueOffsets:t,stride:n,children:i}=r,{[e*n]:a,[e*n+1]:o}=t,l=i[0].slice(a,o-a);return new ln([l])},nae=(r,e)=>{const{valueOffsets:t,children:n}=r,{[e]:i,[e+1]:a}=t,o=n[0];return new $3(o.slice(i,a-i))},iae=(r,e)=>new W3(r,e),aae=(r,e)=>r.type.mode===va.Dense?tW(r,e):rW(r,e),tW=(r,e)=>{const t=r.type.typeIdToChildIndex[r.typeIds[e]],n=r.children[t];return fo.visit(n,r.valueOffsets[e])},rW=(r,e)=>{const t=r.type.typeIdToChildIndex[r.typeIds[e]],n=r.children[t];return fo.visit(n,e)},oae=(r,e)=>{var t;return(t=r.dictionary)===null||t===void 0?void 0:t.get(r.values[e])},sae=(r,e)=>r.type.unit===Wl.DAY_TIME?nW(r,e):iW(r,e),nW=({values:r},e)=>r.subarray(2*e,2*(e+1)),iW=({values:r},e)=>{const t=r[e],n=new Int32Array(2);return n[0]=Math.trunc(t/12),n[1]=Math.trunc(t%12),n},aW=({values:r},e)=>r[e],oW=({values:r},e)=>r[e],sW=({values:r},e)=>r[e],lW=({values:r},e)=>r[e],lae=(r,e)=>{switch(r.type.unit){case Kt.SECOND:return aW(r,e);case Kt.MILLISECOND:return oW(r,e);case Kt.MICROSECOND:return sW(r,e);case Kt.NANOSECOND:return lW(r,e)}},uae=(r,e)=>{const{stride:t,children:n}=r,a=n[0].slice(e*t,t);return new ln([a])};$t.prototype.visitNull=er(jie);$t.prototype.visitBool=er(qie);$t.prototype.visitInt=er(Kie);$t.prototype.visitInt8=er(Mf);$t.prototype.visitInt16=er(Mf);$t.prototype.visitInt32=er(Mf);$t.prototype.visitInt64=er(WH);$t.prototype.visitUint8=er(Mf);$t.prototype.visitUint16=er(Mf);$t.prototype.visitUint32=er(Mf);$t.prototype.visitUint64=er(WH);$t.prototype.visitFloat=er(Xie);$t.prototype.visitFloat16=er(Yie);$t.prototype.visitFloat32=er(Mf);$t.prototype.visitFloat64=er(Mf);$t.prototype.visitUtf8=er(jH);$t.prototype.visitLargeUtf8=er(jH);$t.prototype.visitBinary=er($H);$t.prototype.visitLargeBinary=er($H);$t.prototype.visitFixedSizeBinary=er(Zie);$t.prototype.visitDate=er(Qie);$t.prototype.visitDateDay=er(GH);$t.prototype.visitDateMillisecond=er(HH);$t.prototype.visitTimestamp=er(Jie);$t.prototype.visitTimestampSecond=er(qH);$t.prototype.visitTimestampMillisecond=er(YH);$t.prototype.visitTimestampMicrosecond=er(ZH);$t.prototype.visitTimestampNanosecond=er(KH);$t.prototype.visitTime=er(eae);$t.prototype.visitTimeSecond=er(XH);$t.prototype.visitTimeMillisecond=er(QH);$t.prototype.visitTimeMicrosecond=er(JH);$t.prototype.visitTimeNanosecond=er(eW);$t.prototype.visitDecimal=er(tae);$t.prototype.visitList=er(rae);$t.prototype.visitStruct=er(iae);$t.prototype.visitUnion=er(aae);$t.prototype.visitDenseUnion=er(tW);$t.prototype.visitSparseUnion=er(rW);$t.prototype.visitDictionary=er(oae);$t.prototype.visitInterval=er(sae);$t.prototype.visitIntervalDayTime=er(nW);$t.prototype.visitIntervalYearMonth=er(iW);$t.prototype.visitDuration=er(lae);$t.prototype.visitDurationSecond=er(aW);$t.prototype.visitDurationMillisecond=er(oW);$t.prototype.visitDurationMicrosecond=er(sW);$t.prototype.visitDurationNanosecond=er(lW);$t.prototype.visitFixedSizeList=er(uae);$t.prototype.visitMap=er(nae);const fo=new $t,Mp=Symbol.for("keys"),ig=Symbol.for("vals"),Ip=Symbol.for("kKeysAsStrings"),pT=Symbol.for("_kKeysAsStrings");class $3{constructor(e){return this[Mp]=new ln([e.children[0]]).memoize(),this[ig]=e.children[1],new Proxy(this,new fae)}get[Ip](){return this[pT]||(this[pT]=Array.from(this[Mp].toArray(),String))}[Symbol.iterator](){return new cae(this[Mp],this[ig])}get size(){return this[Mp].length}toArray(){return Object.values(this.toJSON())}toJSON(){const e=this[Mp],t=this[ig],n={};for(let i=-1,a=e.length;++i`${G0(e)}: ${G0(t)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class cae{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){const e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),fo.visit(this.vals,e)]})}}class fae{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[Ip]}has(e,t){return e[Ip].includes(t)}getOwnPropertyDescriptor(e,t){if(e[Ip].indexOf(t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];const n=e[Ip].indexOf(t);if(n!==-1){const i=fo.visit(Reflect.get(e,ig),n);return Reflect.set(e,t,i),i}}set(e,t,n){const i=e[Ip].indexOf(t);return i!==-1?(fs.visit(Reflect.get(e,ig),i,n),Reflect.set(e,t,n)):Reflect.has(e,t)?Reflect.set(e,t,n):!1}}Object.defineProperties($3.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Mp]:{writable:!0,enumerable:!1,configurable:!1,value:null},[ig]:{writable:!0,enumerable:!1,configurable:!1,value:null},[pT]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let lP;function uW(r,e,t,n){const{length:i=0}=r;let a=typeof e!="number"?0:e,o=typeof t!="number"?i:t;return a<0&&(a=(a%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),n?n(r,a,o):[a,o]}const j3=(r,e)=>r<0?e+r:r,uP=r=>r!==r;function dv(r){if(typeof r!=="object"||r===null)return uP(r)?uP:t=>t===r;if(r instanceof Date){const t=r.valueOf();return n=>n instanceof Date?n.valueOf()===t:!1}return ArrayBuffer.isView(r)?t=>t?uie(r,t):!1:r instanceof Map?dae(r):Array.isArray(r)?hae(r):r instanceof ln?pae(r):gae(r,!0)}function hae(r){const e=[];for(let t=-1,n=r.length;++t!1;const n=[];for(let i=-1,a=t.length;++i{if(!t||typeof t!="object")return!1;switch(t.constructor){case Array:return vae(r,t);case Map:return cP(r,t,t.keys());case $3:case W3:case Object:case void 0:return cP(r,t,e||Object.keys(t))}return t instanceof ln?mae(r,t):!1}}function vae(r,e){const t=r.length;if(e.length!==t)return!1;for(let n=-1;++n>n}function yS(r,e,t){const n=t.byteLength+7&-8;if(r>0||t.byteLength>3):bS(new q3(t,r,e,null,cW)).subarray(0,n)),i}return t}function bS(r){const e=[];let t=0,n=0,i=0;for(const o of r)o&&(i|=1<0)&&(e[t++]=i);const a=new Uint8Array(e.length+7&-8);return a.set(e),a}class q3{constructor(e,t,n,i,a){this.bytes=e,this.length=n,this.context=i,this.get=a,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=e+(e%8===0?0:8-e%8);return gT(r,e,i)+gT(r,n,t)+bae(r,i>>3,n-i>>3)}function bae(r,e,t){let n=0,i=Math.trunc(e);const a=new DataView(r.buffer,r.byteOffset,r.byteLength),o=t===void 0?r.byteLength:i+t;for(;o-i>=4;)n+=vx(a.getUint32(i)),i+=4;for(;o-i>=2;)n+=vx(a.getUint16(i)),i+=2;for(;o-i>=1;)n+=vx(a.getUint8(i)),i+=1;return n}function vx(r){let e=Math.trunc(r);return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24}const _ae=-1;class fn{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:e}=this;return Tt.isSparseUnion(e)?this.children.some(t=>t.nullable):Tt.isDenseUnion(e)?this.children.some(t=>t.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let e=0;const{valueOffsets:t,values:n,nullBitmap:i,typeIds:a}=this;return t&&(e+=t.byteLength),n&&(e+=n.byteLength),i&&(e+=i.byteLength),a&&(e+=a.byteLength),this.children.reduce((o,s)=>o+s.byteLength,e)}get nullCount(){if(Tt.isUnion(this.type))return this.children.reduce((n,i)=>n+i.nullCount,0);let e=this._nullCount,t;return e<=_ae&&(t=this.nullBitmap)&&(this._nullCount=e=t.length===0?0:this.length-gT(t,this.offset,this.offset+this.length)),e}constructor(e,t,n,i,a,o=[],s){this.type=e,this.children=o,this.dictionary=s,this.offset=Math.floor(Math.max(t||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;a instanceof fn?(this.stride=a.stride,this.values=a.values,this.typeIds=a.typeIds,this.nullBitmap=a.nullBitmap,this.valueOffsets=a.valueOffsets):(this.stride=bu(e),a&&((l=a[0])&&(this.valueOffsets=l),(l=a[1])&&(this.values=l),(l=a[2])&&(this.nullBitmap=l),(l=a[3])&&(this.typeIds=l)))}getValid(e){const{type:t}=this;if(Tt.isUnion(t)){const n=t,i=this.children[n.typeIdToChildIndex[this.typeIds[e]]],a=n.mode===va.Dense?this.valueOffsets[e]:e;return i.getValid(a)}if(this.nullable&&this.nullCount>0){const n=this.offset+e;return(this.nullBitmap[n>>3]&1<>3;(!a||a.byteLength<=c)&&(a=new Uint8Array((o+s+63&-64)>>3).fill(255),this.nullCount>0?(a.set(yS(o,s,this.nullBitmap),0),Object.assign(this,{nullBitmap:a})):Object.assign(this,{nullBitmap:a,_nullCount:0}));const f=a[c];n=(f&u)!==0,a[c]=t?f|u:f&~u}return n!==!!t&&(this._nullCount=this.nullCount+(t?-1:1)),t}clone(e=this.type,t=this.offset,n=this.length,i=this._nullCount,a=this,o=this.children){return new fn(e,t,n,i,a,o,this.dictionary)}slice(e,t){const{stride:n,typeId:i,children:a}=this,o=+(this._nullCount===0)-1,s=i===16?n:1,l=this._sliceBuffers(e,t,n,i);return this.clone(this.type,this.offset+e,t,o,l,a.length===0||this.valueOffsets?a:this._sliceChildren(a,s*e,s*t))}_changeLengthAndBackfillNullBitmap(e){if(this.typeId===ae.Null)return this.clone(this.type,0,e,0);const{length:t,nullCount:n}=this,i=new Uint8Array((e+63&-64)>>3).fill(255,0,t>>3);i[t>>3]=(1<0&&i.set(yS(this.offset,t,this.nullBitmap),0);const a=this.buffers;return a[yu.VALIDITY]=i,this.clone(this.type,0,e,n+(e-t),a)}_sliceBuffers(e,t,n,i){let a;const{buffers:o}=this;return(a=o[yu.TYPE])&&(o[yu.TYPE]=a.subarray(e,e+t)),(a=o[yu.OFFSET])&&(o[yu.OFFSET]=a.subarray(e,e+t+1))||(a=o[yu.DATA])&&(o[yu.DATA]=i===6?a:a.subarray(n*e,n*(e+t))),o}_sliceChildren(e,t,n){return e.map(i=>i.slice(t,n))}}fn.prototype.children=Object.freeze([]);class v0 extends Rr{visit(e){return this.getVisitFn(e.type).call(this,e)}visitNull(e){const{["type"]:t,["offset"]:n=0,["length"]:i=0}=e;return new fn(t,n,i,i)}visitBool(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length>>3,["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitInt(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length,["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitFloat(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length,["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitUtf8(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.data),a=Yr(e.nullBitmap),o=Kv(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new fn(t,n,s,l,[o,i,a])}visitLargeUtf8(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.data),a=Yr(e.nullBitmap),o=XO(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new fn(t,n,s,l,[o,i,a])}visitBinary(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.data),a=Yr(e.nullBitmap),o=Kv(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new fn(t,n,s,l,[o,i,a])}visitLargeBinary(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.data),a=Yr(e.nullBitmap),o=XO(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new fn(t,n,s,l,[o,i,a])}visitFixedSizeBinary(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length/bu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitDate(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length/bu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitTimestamp(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length/bu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitTime(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length/bu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitDecimal(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length/bu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitList(e){const{["type"]:t,["offset"]:n=0,["child"]:i}=e,a=Yr(e.nullBitmap),o=Kv(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new fn(t,n,s,l,[o,void 0,a],[i])}visitStruct(e){const{["type"]:t,["offset"]:n=0,["children"]:i=[]}=e,a=Yr(e.nullBitmap),{length:o=i.reduce((l,{length:u})=>Math.max(l,u),0),nullCount:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,void 0,a],i)}visitUnion(e){const{["type"]:t,["offset"]:n=0,["children"]:i=[]}=e,a=dn(t.ArrayType,e.typeIds),{["length"]:o=a.length,["nullCount"]:s=-1}=e;if(Tt.isSparseUnion(t))return new fn(t,n,o,s,[void 0,void 0,void 0,a],i);const l=Kv(e.valueOffsets);return new fn(t,n,o,s,[l,void 0,void 0,a],i)}visitDictionary(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.indices.ArrayType,e.data),{["dictionary"]:o=new ln([new v0().visit({type:t.dictionary})])}=e,{["length"]:s=a.length,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new fn(t,n,s,l,[void 0,a,i],[],o)}visitInterval(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length/bu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitDuration(e){const{["type"]:t,["offset"]:n=0}=e,i=Yr(e.nullBitmap),a=dn(t.ArrayType,e.data),{["length"]:o=a.length,["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,a,i])}visitFixedSizeList(e){const{["type"]:t,["offset"]:n=0,["child"]:i=new v0().visit({type:t.valueType})}=e,a=Yr(e.nullBitmap),{["length"]:o=i.length/bu(t),["nullCount"]:s=e.nullBitmap?-1:0}=e;return new fn(t,n,o,s,[void 0,void 0,a],[i])}visitMap(e){const{["type"]:t,["offset"]:n=0,["child"]:i=new v0().visit({type:t.childType})}=e,a=Yr(e.nullBitmap),o=Kv(e.valueOffsets),{["length"]:s=o.length-1,["nullCount"]:l=e.nullBitmap?-1:0}=e;return new fn(t,n,s,l,[o,void 0,a],[i])}}const wae=new v0;function zr(r){return wae.visit(r)}class fP{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndexe.nullable)}function fW(r){return r.reduce((e,t)=>e+t.nullCount,0)}function hW(r){return r.reduce((e,t,n)=>(e[n+1]=e[n]+t.length,e),new Uint32Array(r.length+1))}function dW(r,e,t,n){const i=[];for(let a=-1,o=r.length;++a=n)break;if(t>=l+u)continue;if(l>=t&&l+u<=n){i.push(s);continue}const c=Math.max(0,t-l),f=Math.min(n-l,u);i.push(s.slice(c,f-c))}return i.length===0&&i.push(r[0].slice(0,0)),i}function Y3(r,e,t,n){let i=0,a=0,o=e.length-1;do{if(i>=o-1)return t0?0:-1}function Aae(r,e){const{nullBitmap:t}=r;if(!t||r.nullCount<=0)return-1;let n=0;for(const i of new q3(t,r.offset+(e||0),r.length,t,cW)){if(!i)return n;++n}return-1}function ur(r,e,t){if(e===void 0)return-1;if(e===null)switch(r.typeId){case ae.Union:break;case ae.Dictionary:break;default:return Aae(r,t)}const n=fo.getVisitFn(r),i=dv(e);for(let a=(t||0)-1,o=r.length;++a{const i=r.data[n];return i.values.subarray(0,i.length)[Symbol.iterator]()});let t=0;return new fP(r.data.length,n=>{const a=r.data[n].length,o=r.slice(t,t+a);return t+=a,new xae(o)})}class xae{constructor(e){this.vector=e,this.index=0}next(){return this.indexs.data):e;if(a.length===0||a.some(s=>!(s instanceof fn)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=(t=a[0])===null||t===void 0?void 0:t.type;switch(a.length){case 0:this._offsets=[0];break;case 1:{const{get:s,set:l,indexOf:u}=yW[o.typeId],c=a[0];this.isValid=f=>Z3(c,f),this.get=f=>s(c,f),this.set=(f,h)=>l(c,f,h),this.indexOf=f=>u(c,f),this._offsets=[0,c.length];break}default:Object.setPrototypeOf(this,bW[o.typeId]),this._offsets=hW(a);break}this.data=a,this.type=o,this.stride=bu(o),this.numChildren=(i=(n=o.children)===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((e,t)=>e+t.byteLength,0)}get nullable(){return Sae(this.data)}get nullCount(){return fW(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${ae[this.type.typeId]}Vector`}isValid(e){return!1}get(e){return null}at(e){return this.get(j3(e,this.length))}set(e,t){}indexOf(e,t){return-1}includes(e,t){return this.indexOf(e,t)>-1}[Symbol.iterator](){return K3.visit(this)}concat(...e){return new ln(this.data.concat(e.flatMap(t=>t.data).flat(Number.POSITIVE_INFINITY)))}slice(e,t){return new ln(uW(this,e,t,({data:n,_offsets:i},a,o)=>dW(n,i,a,o)))}toJSON(){return[...this]}toArray(){const{type:e,data:t,length:n,stride:i,ArrayType:a}=this;switch(e.typeId){case ae.Int:case ae.Float:case ae.Decimal:case ae.Time:case ae.Timestamp:switch(t.length){case 0:return new a;case 1:return t[0].values.subarray(0,n*i);default:return t.reduce((o,{values:s,length:l})=>(o.array.set(s.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new a(n*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(e){var t;return this.getChildAt((t=this.type.children)===null||t===void 0?void 0:t.findIndex(n=>n.name===e))}getChildAt(e){return e>-1&&et[e])):null}get isMemoized(){return Tt.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(Tt.isDictionary(this.type)){const e=new SS(this.data[0].dictionary),t=this.data.map(n=>{const i=n.clone();return i.dictionary=e,i});return new ln(t)}return new SS(this)}unmemoize(){if(Tt.isDictionary(this.type)&&this.isMemoized){const e=this.data[0].dictionary.unmemoize(),t=this.data.map(n=>{const i=n.clone();return i.dictionary=e,i});return new ln(t)}return this}}mW=Symbol.toStringTag;ln[mW]=(r=>{r.type=Tt.prototype,r.data=[],r.length=0,r.stride=1,r.numChildren=0,r._offsets=new Uint32Array([0]),r[Symbol.isConcatSpreadable]=!0;const e=Object.keys(ae).map(t=>ae[t]).filter(t=>typeof t=="number"&&t!==ae.NONE);for(const t of e){const n=fo.getVisitFnByTypeId(t),i=fs.getVisitFnByTypeId(t),a=wS.getVisitFnByTypeId(t);yW[t]={get:n,set:i,indexOf:a},bW[t]=Object.create(r,{isValid:{value:_S(Z3)},get:{value:_S(fo.getVisitFnByTypeId(t))},set:{value:pW(fs.getVisitFnByTypeId(t))},indexOf:{value:gW(wS.getVisitFnByTypeId(t))}})}return"Vector"})(ln.prototype);class SS extends ln{constructor(e){super(e.data);const t=this.get,n=this.set,i=this.slice,a=new Array(this.length);Object.defineProperty(this,"get",{value(o){const s=a[o];if(s!==void 0)return s;const l=t.call(this,o);return a[o]=l,l}}),Object.defineProperty(this,"set",{value(o,s){n.call(this,o,s),a[o]=s}}),Object.defineProperty(this,"slice",{value:(o,s)=>new SS(i.call(this,o,s))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new ln(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class vT{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,t,n,i){return e.prep(8,24),e.writeInt64(BigInt(i??0)),e.pad(4),e.writeInt32(n),e.writeInt64(BigInt(t??0)),e.offset()}}class bo{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsFooter(e,t){return(t||new bo).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsFooter(e,t){return e.setPosition(e.position()+cn),(t||new bo).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ti.V1}schema(e){const t=this.bb.__offset(this.bb_pos,6);return t?(e||new yl).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}dictionaries(e,t){const n=this.bb.__offset(this.bb_pos,8);return n?(t||new vT).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}dictionariesLength(){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}recordBatches(e,t){const n=this.bb.__offset(this.bb_pos,10);return n?(t||new vT).__init(this.bb.__vector(this.bb_pos+n)+e*24,this.bb):null}recordBatchesLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,12);return n?(t||new Si).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startFooter(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,ti.V1)}static addSchema(e,t){e.addFieldOffset(1,t,0)}static addDictionaries(e,t){e.addFieldOffset(2,t,0)}static startDictionariesVector(e,t){e.startVector(24,t,8)}static addRecordBatches(e,t){e.addFieldOffset(3,t,0)}static startRecordBatchesVector(e,t){e.startVector(24,t,8)}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endFooter(e){return e.endObject()}static finishFooterBuffer(e,t){e.finish(t)}static finishSizePrefixedFooterBuffer(e,t){e.finish(t,void 0,!0)}}class un{constructor(e=[],t,n,i=ti.V5){this.fields=e||[],this.metadata=t||new Map,n||(n=mT(this.fields)),this.dictionaries=n,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(e=>e.name)}toString(){return`Schema<{ ${this.fields.map((e,t)=>`${t}: ${e}`).join(", ")} }>`}select(e){const t=new Set(e),n=this.fields.filter(i=>t.has(i.name));return new un(n,this.metadata)}selectAt(e){const t=e.map(n=>this.fields[n]).filter(Boolean);return new un(t,this.metadata)}assign(...e){const t=e[0]instanceof un?e[0]:Array.isArray(e[0])?new un(e[0]):new un(e),n=[...this.fields],i=fb(fb(new Map,this.metadata),t.metadata),a=t.fields.filter(s=>{const l=n.findIndex(u=>u.name===s.name);return~l?(n[l]=s.clone({metadata:fb(fb(new Map,n[l].metadata),s.metadata)}))&&!1:!0}),o=mT(a,new Map);return new un([...n,...a],i,new Map([...this.dictionaries,...o]))}}un.prototype.fields=null;un.prototype.metadata=null;un.prototype.dictionaries=null;class Rn{static new(...e){let[t,n,i,a]=e;return e[0]&&typeof e[0]=="object"&&({name:t}=e[0],n===void 0&&(n=e[0].type),i===void 0&&(i=e[0].nullable),a===void 0&&(a=e[0].metadata)),new Rn(`${t}`,n,i,a)}constructor(e,t,n=!1,i){this.name=e,this.type=t,this.nullable=n,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...e){let[t,n,i,a]=e;return!e[0]||typeof e[0]!="object"?[t=this.name,n=this.type,i=this.nullable,a=this.metadata]=e:{name:t=this.name,type:n=this.type,nullable:i=this.nullable,metadata:a=this.metadata}=e[0],Rn.new(t,n,i,a)}}Rn.prototype.type=null;Rn.prototype.name=null;Rn.prototype.nullable=null;Rn.prototype.metadata=null;function fb(r,e){return new Map([...r||new Map,...e||new Map])}function mT(r,e=new Map){for(let t=-1,n=r.length;++t0&&mT(a.children,e)}return e}var Dae=HG,Eae=Fg;class j0{static decode(e){e=new Eae(Yr(e));const t=bo.getRootAsFooter(e),n=un.decode(t.schema(),new Map,t.version());return new kae(n,t)}static encode(e){const t=new Dae,n=un.encode(t,e.schema);bo.startRecordBatchesVector(t,e.numRecordBatches);for(const o of[...e.recordBatches()].slice().reverse())lf.encode(t,o);const i=t.endVector();bo.startDictionariesVector(t,e.numDictionaries);for(const o of[...e.dictionaryBatches()].slice().reverse())lf.encode(t,o);const a=t.endVector();return bo.startFooter(t),bo.addSchema(t,n),bo.addVersion(t,ti.V5),bo.addRecordBatches(t,i),bo.addDictionaries(t,a),bo.finishFooterBuffer(t,bo.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=ti.V5,n,i){this.schema=e,this.version=t,n&&(this._recordBatches=n),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let e,t=-1,n=this.numRecordBatches;++t=0&&e=0&&e=0&&e=0&&ethis._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return fr(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){const{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(Wn);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Yo.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Yo.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return fr(this,void 0,void 0,function*(){return yield this.abort(e),Wn})}return(e){return fr(this,void 0,void 0,function*(){return yield this.close(),Wn})}read(e){return fr(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return fr(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,n)=>{this.resolvers.push({resolve:t,reject:n})}):Promise.resolve(Wn)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class lw extends Tae{write(e){if((e=Yr(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?lT(this.toUint8Array(!0)):this.toUint8Array(!1).then(lT)}toUint8Array(e=!1){return e?Hl(this._values)[0]:fr(this,void 0,void 0,function*(){var t,n,i,a;const o=[];let s=0;try{for(var l=!0,u=Qh(this),c;c=yield u.next(),t=c.done,!t;l=!0){a=c.value,l=!1;const f=a;o.push(f),s+=f.byteLength}}catch(f){n={error:f}}finally{try{!l&&!t&&(i=u.return)&&(yield i.call(u))}finally{if(n)throw n.error}}return Hl(o,s)[0]})}}class CS{constructor(e){e&&(this.source=new Mae(Yo.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class Pg{constructor(e){e instanceof Pg?this.source=e.source:e instanceof lw?this.source=new Vf(Yo.fromAsyncIterable(e)):zG(e)?this.source=new Vf(Yo.fromNodeStream(e)):V3(e)?this.source=new Vf(Yo.fromDOMStream(e)):NG(e)?this.source=new Vf(Yo.fromDOMStream(e.body)):_1(e)?this.source=new Vf(Yo.fromIterable(e)):pd(e)?this.source=new Vf(Yo.fromAsyncIterable(e)):hv(e)&&(this.source=new Vf(Yo.fromAsyncIterable(e)))}[Symbol.asyncIterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}get closed(){return this.source.closed}cancel(e){return this.source.cancel(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}}class Mae{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||Wn)}return(e){return Object.create(this.source.return&&this.source.return(e)||Wn)}}class Vf{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return fr(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return fr(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return fr(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e){return fr(this,arguments,void 0,function*(t,n="read"){return yield this.source.next({cmd:n,size:t})})}throw(e){return fr(this,void 0,void 0,function*(){const t=this.source.throw&&(yield this.source.throw(e))||Wn;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return fr(this,void 0,void 0,function*(){const t=this.source.return&&(yield this.source.return(e))||Wn;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}}class dP extends CS{constructor(e,t){super(),this.position=0,this.buffer=Yr(e),this.size=t===void 0?this.buffer.byteLength:t}readInt32(e){const{buffer:t,byteOffset:n}=this.readAt(e,4);return new DataView(t,n).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),e>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),n=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]);let i=t[3]*n[3];this.buffer[0]=i&65535;let a=i>>>16;return i=t[2]*n[3],a+=i,i=t[3]*n[2]>>>0,a+=i,this.buffer[0]+=a<<16,this.buffer[1]=a>>>0>>16,this.buffer[1]+=t[1]*n[3]+t[2]*n[2]+t[3]*n[1],this.buffer[1]+=t[0]*n[3]+t[1]*n[2]+t[2]*n[1]+t[3]*n[0]<<16,this}_plus(e){const t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,t[2]=this.buffer[2]+e.buffer[2]>>>0,t[1]=this.buffer[1]+e.buffer[1]>>>0,t[0]=this.buffer[0]+e.buffer[0]>>>0,t[0]>>0&&++t[1],t[1]>>0&&++t[2],t[2]>>0&&++t[3],this.buffer[3]=t[3],this.buffer[2]=t[2],this.buffer[1]=t[1],this.buffer[0]=t[0],this}hex(){return`${Gp(this.buffer[3])} ${Gp(this.buffer[2])} ${Gp(this.buffer[1])} ${Gp(this.buffer[0])}`}static multiply(e,t){return new bl(new Uint32Array(e.buffer)).times(t)}static add(e,t){return new bl(new Uint32Array(e.buffer)).plus(t)}static from(e,t=new Uint32Array(4)){return bl.fromString(typeof e=="string"?e:e.toString(),t)}static fromNumber(e,t=new Uint32Array(4)){return bl.fromString(e.toString(),t)}static fromString(e,t=new Uint32Array(4)){const n=e.startsWith("-"),i=e.length,a=new bl(t);for(let o=n?1:0;o0&&this.readData(e,n)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:n}=this.nextBufferRange()){return this.bytes.subarray(n,n+t)}readDictionary(e){return this.dictionaries.get(e.id)}}class Lae extends wW{constructor(e,t,n,i,a){super(new Uint8Array(0),t,n,i,a),this.sources=e}readNullBitmap(e,t,{offset:n}=this.nextBufferRange()){return t<=0?new Uint8Array(0):bS(this.sources[n])}readOffsets(e,{offset:t}=this.nextBufferRange()){return dn(Uint8Array,dn(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return dn(Uint8Array,dn(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){const{sources:n}=this;return Tt.isTimestamp(e)||(Tt.isInt(e)||Tt.isTime(e))&&e.bitWidth===64||Tt.isDuration(e)||Tt.isDate(e)&&e.unit===cs.MILLISECOND?dn(Uint8Array,Xa.convertArray(n[t])):Tt.isDecimal(e)?dn(Uint8Array,bl.convertArray(n[t])):Tt.isBinary(e)||Tt.isLargeBinary(e)||Tt.isFixedSizeBinary(e)?Fae(n[t]):Tt.isBool(e)?bS(n[t]):Tt.isUtf8(e)||Tt.isLargeUtf8(e)?z3(n[t].join("")):dn(Uint8Array,dn(e.ArrayType,n[t].map(i=>+i)))}}function Fae(r){const e=r.join(""),t=new Uint8Array(e.length/2);for(let n=0;n>1]=Number.parseInt(e.slice(n,n+2),16);return t}class Yt extends Rr{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((n,i)=>this.compareFields(n,t[i]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}}function ja(r,e){return e instanceof r.constructor}function Rd(r,e){return r===e||ja(r,e)}function ec(r,e){return r===e||ja(r,e)&&r.bitWidth===e.bitWidth&&r.isSigned===e.isSigned}function OC(r,e){return r===e||ja(r,e)&&r.precision===e.precision}function Bae(r,e){return r===e||ja(r,e)&&r.byteWidth===e.byteWidth}function J3(r,e){return r===e||ja(r,e)&&r.unit===e.unit}function w1(r,e){return r===e||ja(r,e)&&r.unit===e.unit&&r.timezone===e.timezone}function S1(r,e){return r===e||ja(r,e)&&r.unit===e.unit&&r.bitWidth===e.bitWidth}function Oae(r,e){return r===e||ja(r,e)&&r.children.length===e.children.length&&uf.compareManyFields(r.children,e.children)}function Pae(r,e){return r===e||ja(r,e)&&r.children.length===e.children.length&&uf.compareManyFields(r.children,e.children)}function eL(r,e){return r===e||ja(r,e)&&r.mode===e.mode&&r.typeIds.every((t,n)=>t===e.typeIds[n])&&uf.compareManyFields(r.children,e.children)}function Rae(r,e){return r===e||ja(r,e)&&r.id===e.id&&r.isOrdered===e.isOrdered&&uf.visit(r.indices,e.indices)&&uf.visit(r.dictionary,e.dictionary)}function tL(r,e){return r===e||ja(r,e)&&r.unit===e.unit}function C1(r,e){return r===e||ja(r,e)&&r.unit===e.unit}function Nae(r,e){return r===e||ja(r,e)&&r.listSize===e.listSize&&r.children.length===e.children.length&&uf.compareManyFields(r.children,e.children)}function zae(r,e){return r===e||ja(r,e)&&r.keysSorted===e.keysSorted&&r.children.length===e.children.length&&uf.compareManyFields(r.children,e.children)}Yt.prototype.visitNull=Rd;Yt.prototype.visitBool=Rd;Yt.prototype.visitInt=ec;Yt.prototype.visitInt8=ec;Yt.prototype.visitInt16=ec;Yt.prototype.visitInt32=ec;Yt.prototype.visitInt64=ec;Yt.prototype.visitUint8=ec;Yt.prototype.visitUint16=ec;Yt.prototype.visitUint32=ec;Yt.prototype.visitUint64=ec;Yt.prototype.visitFloat=OC;Yt.prototype.visitFloat16=OC;Yt.prototype.visitFloat32=OC;Yt.prototype.visitFloat64=OC;Yt.prototype.visitUtf8=Rd;Yt.prototype.visitLargeUtf8=Rd;Yt.prototype.visitBinary=Rd;Yt.prototype.visitLargeBinary=Rd;Yt.prototype.visitFixedSizeBinary=Bae;Yt.prototype.visitDate=J3;Yt.prototype.visitDateDay=J3;Yt.prototype.visitDateMillisecond=J3;Yt.prototype.visitTimestamp=w1;Yt.prototype.visitTimestampSecond=w1;Yt.prototype.visitTimestampMillisecond=w1;Yt.prototype.visitTimestampMicrosecond=w1;Yt.prototype.visitTimestampNanosecond=w1;Yt.prototype.visitTime=S1;Yt.prototype.visitTimeSecond=S1;Yt.prototype.visitTimeMillisecond=S1;Yt.prototype.visitTimeMicrosecond=S1;Yt.prototype.visitTimeNanosecond=S1;Yt.prototype.visitDecimal=Rd;Yt.prototype.visitList=Oae;Yt.prototype.visitStruct=Pae;Yt.prototype.visitUnion=eL;Yt.prototype.visitDenseUnion=eL;Yt.prototype.visitSparseUnion=eL;Yt.prototype.visitDictionary=Rae;Yt.prototype.visitInterval=tL;Yt.prototype.visitIntervalDayTime=tL;Yt.prototype.visitIntervalYearMonth=tL;Yt.prototype.visitDuration=C1;Yt.prototype.visitDurationSecond=C1;Yt.prototype.visitDurationMillisecond=C1;Yt.prototype.visitDurationMicrosecond=C1;Yt.prototype.visitDurationNanosecond=C1;Yt.prototype.visitFixedSizeList=Nae;Yt.prototype.visitMap=zae;const uf=new Yt;function yT(r,e){return uf.compareSchemas(r,e)}function mx(r,e){return Vae(r,e.map(t=>t.data.concat()))}function Vae(r,e){const t=[...r.fields],n=[],i={numBatches:e.reduce((f,h)=>Math.max(f,h.length),0)};let a=0,o=0,s=-1;const l=e.length;let u,c=[];for(;i.numBatches-- >0;){for(o=Number.POSITIVE_INFINITY,s=-1;++s0&&(n[a++]=zr({type:new Fa(t),length:o,nullCount:0,children:c.slice()})))}return[r=r.assign(t),n.map(f=>new Ja(r,f))]}function Uae(r,e,t,n,i){var a;const o=(e+63&-64)>>3;for(let s=-1,l=n.length;++s=e)c===e?t[s]=u:(t[s]=u.slice(0,e),i.numBatches=Math.max(i.numBatches,n[s].unshift(u.slice(e,c-e))));else{const f=r[s];r[s]=f.clone({nullable:!0}),t[s]=(a=u==null?void 0:u._changeLengthAndBackfillNullBitmap(e))!==null&&a!==void 0?a:zr({type:f.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)})}}return t}var SW;let cf=class ph{constructor(...e){var t,n;if(e.length===0)return this.batches=[],this.schema=new un([]),this._offsets=[0],this;let i,a;e[0]instanceof un&&(i=e.shift()),e.at(-1)instanceof Uint32Array&&(a=e.pop());const o=l=>{if(l){if(l instanceof Ja)return[l];if(l instanceof ph)return l.batches;if(l instanceof fn){if(l.type instanceof Fa)return[new Ja(new un(l.type.children),l)]}else{if(Array.isArray(l))return l.flatMap(u=>o(u));if(typeof l[Symbol.iterator]=="function")return[...l].flatMap(u=>o(u));if(typeof l=="object"){const u=Object.keys(l),c=u.map(d=>new ln([l[d]])),f=i??new un(u.map((d,p)=>new Rn(String(d),c[p].type,c[p].nullable))),[,h]=mx(f,c);return h.length===0?[new Ja(l)]:h}}}return[]},s=e.flatMap(l=>o(l));if(i=(n=i??((t=s[0])===null||t===void 0?void 0:t.schema))!==null&&n!==void 0?n:new un([]),!(i instanceof un))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const l of s){if(!(l instanceof Ja))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!yT(i,l.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=s,this._offsets=a??hW(this.data)}get data(){return this.batches.map(({data:e})=>e)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((e,t)=>e+t.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=fW(this.data)),this._nullCount}isValid(e){return!1}get(e){return null}at(e){return this.get(j3(e,this.numRows))}set(e,t){}indexOf(e,t){return-1}[Symbol.iterator](){return this.batches.length>0?K3.visit(new ln(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ + ${this.toArray().join(`, + `)} +]`}concat(...e){const t=this.schema,n=this.data.concat(e.flatMap(({data:i})=>i));return new ph(t,n.map(i=>new Ja(t,i)))}slice(e,t){const n=this.schema;[e,t]=uW({length:this.numRows},e,t);const i=dW(this.data,this._offsets,e,t);return new ph(n,i.map(a=>new Ja(n,a)))}getChild(e){return this.getChildAt(this.schema.fields.findIndex(t=>t.name===e))}getChildAt(e){if(e>-1&&en.children[e]);if(t.length===0){const{type:n}=this.schema.fields[e],i=zr({type:n,length:0,nullCount:0});t.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new ln(t)}return null}setChild(e,t){var n;return this.setChildAt((n=this.schema.fields)===null||n===void 0?void 0:n.findIndex(i=>i.name===e),t)}setChildAt(e,t){let n=this.schema,i=[...this.batches];if(e>-1&&ethis.getChildAt(u));[a[e],s[e]]=[o,t],[n,i]=mx(n,s)}return new ph(n,i)}select(e){const t=this.schema.fields.reduce((n,i,a)=>n.set(i.name,a),new Map);return this.selectAt(e.map(n=>t.get(n)).filter(n=>n>-1))}selectAt(e){const t=this.schema.selectAt(e),n=this.batches.map(i=>i.selectAt(e));return new ph(t,n)}assign(e){const t=this.schema.fields,[n,i]=e.schema.fields.reduce((s,l,u)=>{const[c,f]=s,h=t.findIndex(d=>d.name===l.name);return~h?f[h]=u:c.push(u),s},[[],[]]),a=this.schema.assign(e.schema),o=[...t.map((s,l)=>[l,i[l]]).map(([s,l])=>l===void 0?this.getChildAt(s):e.getChildAt(l)),...n.map(s=>e.getChildAt(s))].filter(Boolean);return new ph(...mx(a,o))}};SW=Symbol.toStringTag;cf[SW]=(r=>(r.schema=null,r.batches=[],r._offsets=new Uint32Array([0]),r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,r.isValid=_S(Z3),r.get=_S(fo.getVisitFn(ae.Struct)),r.set=pW(fs.getVisitFn(ae.Struct)),r.indexOf=gW(wS.getVisitFn(ae.Struct)),"Table"))(cf.prototype);var CW;let Ja=class Ym{constructor(...e){switch(e.length){case 2:{if([this.schema]=e,!(this.schema instanceof un))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=zr({nullCount:0,type:new Fa(this.schema.fields),children:this.schema.fields.map(t=>zr({type:t.type,nullCount:0}))})]=e,!(this.data instanceof fn))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=pP(this.schema,this.data.children);break}case 1:{const[t]=e,{fields:n,children:i,length:a}=Object.keys(t).reduce((l,u,c)=>(l.children[c]=t[u],l.length=Math.max(l.length,t[u].length),l.fields[c]=Rn.new({name:u,type:t[u].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new un(n),s=zr({type:new Fa(n),length:a,children:i,nullCount:0});[this.schema,this.data]=pP(o,s.children,a);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=AW(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(e){return this.data.getValid(e)}get(e){return fo.visit(this.data,e)}at(e){return this.get(j3(e,this.numRows))}set(e,t){return fs.visit(this.data,e,t)}indexOf(e,t){return wS.visit(this.data,e,t)}[Symbol.iterator](){return K3.visit(new ln([this.data]))}toArray(){return[...this]}concat(...e){return new cf(this.schema,[this,...e])}slice(e,t){const[n]=new ln([this.data]).slice(e,t).data;return new Ym(this.schema,n)}getChild(e){var t;return this.getChildAt((t=this.schema.fields)===null||t===void 0?void 0:t.findIndex(n=>n.name===e))}getChildAt(e){return e>-1&&ei.name===e),t)}setChildAt(e,t){let n=this.schema,i=this.data;if(e>-1&&es.name===a);~o&&(i[o]=this.data.children[o])}return new Ym(t,zr({type:n,length:this.numRows,children:i}))}selectAt(e){const t=this.schema.selectAt(e),n=e.map(a=>this.data.children[a]).filter(Boolean),i=zr({type:new Fa(t.fields),length:this.numRows,children:n});return new Ym(t,i)}};CW=Symbol.toStringTag;Ja[CW]=(r=>(r._nullCount=-1,r[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(Ja.prototype);function pP(r,e,t=e.reduce((n,i)=>Math.max(n,i.length),0)){var n;const i=[...r.fields],a=[...e],o=(t+63&-64)>>3;for(const[s,l]of r.fields.entries()){const u=e[s];(!u||u.length!==t)&&(i[s]=l.clone({nullable:!0}),a[s]=(n=u==null?void 0:u._changeLengthAndBackfillNullBitmap(t))!==null&&n!==void 0?n:zr({type:l.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)}))}return[r.assign(i),zr({type:new Fa(i),length:t,children:a})]}function AW(r,e,t=new Map){var n,i;if(((n=r==null?void 0:r.length)!==null&&n!==void 0?n:0)>0&&(r==null?void 0:r.length)===(e==null?void 0:e.length))for(let a=-1,o=r.length;++azr({type:i.type})),n=zr({type:new Fa(e.fields),nullCount:0,children:t});super(e,n)}}let sc=class dl{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}static getRootAsMessage(e,t){return(t||new dl).__init(e.readInt32(e.position())+e.position(),e)}static getSizePrefixedRootAsMessage(e,t){return e.setPosition(e.position()+cn),(t||new dl).__init(e.readInt32(e.position())+e.position(),e)}version(){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.readInt16(this.bb_pos+e):ti.V1}headerType(){const e=this.bb.__offset(this.bb_pos,6);return e?this.bb.readUint8(this.bb_pos+e):en.NONE}header(e){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__union(e,this.bb_pos+t):null}bodyLength(){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb_pos+e):BigInt("0")}customMetadata(e,t){const n=this.bb.__offset(this.bb_pos,12);return n?(t||new Si).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+e*4),this.bb):null}customMetadataLength(){const e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}static startMessage(e){e.startObject(5)}static addVersion(e,t){e.addFieldInt16(0,t,ti.V1)}static addHeaderType(e,t){e.addFieldInt8(1,t,en.NONE)}static addHeader(e,t){e.addFieldOffset(2,t,0)}static addBodyLength(e,t){e.addFieldInt64(3,t,BigInt("0"))}static addCustomMetadata(e,t){e.addFieldOffset(4,t,0)}static createCustomMetadataVector(e,t){e.startVector(4,t.length,4);for(let n=t.length-1;n>=0;n--)e.addOffset(t[n]);return e.endVector()}static startCustomMetadataVector(e,t){e.startVector(4,t,4)}static endMessage(e){return e.endObject()}static finishMessageBuffer(e,t){e.finish(t)}static finishSizePrefixedMessageBuffer(e,t){e.finish(t,void 0,!0)}static createMessage(e,t,n,i,a,o){return dl.startMessage(e),dl.addVersion(e,t),dl.addHeaderType(e,n),dl.addHeader(e,i),dl.addBodyLength(e,a),dl.addCustomMetadata(e,o),dl.endMessage(e)}};class Gae extends Rr{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return aP.startNull(t),aP.endNull(t)}visitInt(e,t){return So.startInt(t),So.addBitWidth(t,e.bitWidth),So.addIsSigned(t,e.isSigned),So.endInt(t)}visitFloat(e,t){return Sl.startFloatingPoint(t),Sl.addPrecision(t,e.precision),Sl.endFloatingPoint(t)}visitBinary(e,t){return eP.startBinary(t),eP.endBinary(t)}visitLargeBinary(e,t){return rP.startLargeBinary(t),rP.endLargeBinary(t)}visitBool(e,t){return tP.startBool(t),tP.endBool(t)}visitUtf8(e,t){return oP.startUtf8(t),oP.endUtf8(t)}visitLargeUtf8(e,t){return nP.startLargeUtf8(t),nP.endLargeUtf8(t)}visitDecimal(e,t){return Ap.startDecimal(t),Ap.addScale(t,e.scale),Ap.addPrecision(t,e.precision),Ap.addBitWidth(t,e.bitWidth),Ap.endDecimal(t)}visitDate(e,t){return rw.startDate(t),rw.addUnit(t,e.unit),rw.endDate(t)}visitTime(e,t){return Zo.startTime(t),Zo.addUnit(t,e.unit),Zo.addBitWidth(t,e.bitWidth),Zo.endTime(t)}visitTimestamp(e,t){const n=e.timezone&&t.createString(e.timezone)||void 0;return Ko.startTimestamp(t),Ko.addUnit(t,e.unit),n!==void 0&&Ko.addTimezone(t,n),Ko.endTimestamp(t)}visitInterval(e,t){return Cl.startInterval(t),Cl.addUnit(t,e.unit),Cl.endInterval(t)}visitDuration(e,t){return nw.startDuration(t),nw.addUnit(t,e.unit),nw.endDuration(t)}visitList(e,t){return iP.startList(t),iP.endList(t)}visitStruct(e,t){return Lh.startStruct_(t),Lh.endStruct_(t)}visitUnion(e,t){Qa.startTypeIdsVector(t,e.typeIds.length);const n=Qa.createTypeIdsVector(t,e.typeIds);return Qa.startUnion(t),Qa.addMode(t,e.mode),Qa.addTypeIds(t,n),Qa.endUnion(t)}visitDictionary(e,t){const n=this.visit(e.indices,t);return Iu.startDictionaryEncoding(t),Iu.addId(t,BigInt(e.id)),Iu.addIsOrdered(t,e.isOrdered),n!==void 0&&Iu.addIndexType(t,n),Iu.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return iw.startFixedSizeBinary(t),iw.addByteWidth(t,e.byteWidth),iw.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return aw.startFixedSizeList(t),aw.addListSize(t,e.listSize),aw.endFixedSizeList(t)}visitMap(e,t){return ow.startMap(t),ow.addKeysSorted(t,e.keysSorted),ow.endMap(t)}}const yx=new Gae;function Hae(r,e=new Map){return new un($ae(r,e),uw(r.metadata),e)}function xW(r){return new Lo(r.count,DW(r.columns),EW(r.columns))}function Wae(r){return new $l(xW(r.data),r.id,r.isDelta)}function $ae(r,e){return(r.fields||[]).filter(Boolean).map(t=>Rn.fromJSON(t,e))}function gP(r,e){return(r.children||[]).filter(Boolean).map(t=>Rn.fromJSON(t,e))}function DW(r){return(r||[]).reduce((e,t)=>[...e,new ff(t.count,jae(t.VALIDITY)),...DW(t.children)],[])}function EW(r,e=[]){for(let t=-1,n=(r||[]).length;++te+ +(t===0),0)}function qae(r,e){let t,n,i,a,o,s;return!e||!(a=r.dictionary)?(o=mP(r,gP(r,e)),i=new Rn(r.name,o,r.nullable,uw(r.metadata))):e.has(t=a.id)?(n=(n=a.indexType)?vP(n):new $0,s=new Og(e.get(t),n,t,a.isOrdered),i=new Rn(r.name,s,r.nullable,uw(r.metadata))):(n=(n=a.indexType)?vP(n):new $0,e.set(t,o=mP(r,gP(r,e))),s=new Og(o,n,t,a.isOrdered),i=new Rn(r.name,s,r.nullable,uw(r.metadata))),i||null}function uw(r=[]){return new Map(r.map(({key:e,value:t})=>[e,t]))}function vP(r){return new gd(r.isSigned,r.bitWidth)}function mP(r,e){const t=r.type.name;switch(t){case"NONE":return new sf;case"null":return new sf;case"binary":return new rS;case"largebinary":return new nS;case"utf8":return new iS;case"largeutf8":return new aS;case"bool":return new oS;case"list":return new dS((e||[])[0]);case"struct":return new Fa(e||[]);case"struct_":return new Fa(e||[])}switch(t){case"int":{const n=r.type;return new gd(n.isSigned,n.bitWidth)}case"floatingpoint":{const n=r.type;return new tS(pa[n.precision])}case"decimal":{const n=r.type;return new sS(n.scale,n.precision,n.bitWidth)}case"date":{const n=r.type;return new lS(cs[n.unit])}case"time":{const n=r.type;return new uS(Kt[n.unit],n.bitWidth)}case"timestamp":{const n=r.type;return new cS(Kt[n.unit],n.timezone)}case"interval":{const n=r.type;return new fS(Wl[n.unit])}case"duration":{const n=r.type;return new hS(Kt[n.unit])}case"union":{const n=r.type,[i,...a]=(n.mode+"").toLowerCase(),o=i.toUpperCase()+a.join("");return new pS(va[o],n.typeIds||[],e||[])}case"fixedsizebinary":{const n=r.type;return new gS(n.byteWidth)}case"fixedsizelist":{const n=r.type;return new vS(n.listSize,(e||[])[0])}case"map":{const n=r.type;return new mS((e||[])[0],n.keysSorted)}}throw new Error(`Unrecognized type: "${t}"`)}var Yae=HG,Zae=Fg;class Ba{static fromJSON(e,t){const n=new Ba(0,ti.V5,t);return n._createHeader=Kae(e,t),n}static decode(e){e=new Zae(Yr(e));const t=sc.getRootAsMessage(e),n=t.bodyLength(),i=t.version(),a=t.headerType(),o=new Ba(n,i,a);return o._createHeader=Xae(t,a),o}static encode(e){const t=new Yae;let n=-1;return e.isSchema()?n=un.encode(t,e.header()):e.isRecordBatch()?n=Lo.encode(t,e.header()):e.isDictionaryBatch()&&(n=$l.encode(t,e.header())),sc.startMessage(t),sc.addVersion(t,ti.V5),sc.addHeader(t,n),sc.addHeaderType(t,e.headerType),sc.addBodyLength(t,BigInt(e.bodyLength)),sc.finishMessageBuffer(t,sc.endMessage(t)),t.asUint8Array()}static from(e,t=0){if(e instanceof un)return new Ba(0,ti.V5,en.Schema,e);if(e instanceof Lo)return new Ba(t,ti.V5,en.RecordBatch,e);if(e instanceof $l)return new Ba(t,ti.V5,en.DictionaryBatch,e);throw new Error(`Unrecognized Message header: ${e}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===en.Schema}isRecordBatch(){return this.headerType===en.RecordBatch}isDictionaryBatch(){return this.headerType===en.DictionaryBatch}constructor(e,t,n,i){this._version=t,this._headerType=n,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=xn(e)}}class Lo{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,n){this._nodes=t,this._buffers=n,this._length=xn(e)}}class $l{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,t,n=!1){this._data=e,this._isDelta=n,this._id=xn(t)}}class Tl{constructor(e,t){this.offset=xn(e),this.length=xn(t)}}class ff{constructor(e,t){this.length=xn(e),this.nullCount=xn(t)}}function Kae(r,e){return()=>{switch(e){case en.Schema:return un.fromJSON(r);case en.RecordBatch:return Lo.fromJSON(r);case en.DictionaryBatch:return $l.fromJSON(r)}throw new Error(`Unrecognized Message type: { name: ${en[e]}, type: ${e} }`)}}function Xae(r,e){return()=>{switch(e){case en.Schema:return un.decode(r.header(new yl),new Map,r.version());case en.RecordBatch:return Lo.decode(r.header(new mu),r.version());case en.DictionaryBatch:return $l.decode(r.header(new Sp),r.version())}throw new Error(`Unrecognized Message type: { name: ${en[e]}, type: ${e} }`)}}Rn.encode=loe;Rn.decode=ooe;Rn.fromJSON=qae;un.encode=soe;un.decode=Qae;un.fromJSON=Hae;Lo.encode=uoe;Lo.decode=Jae;Lo.fromJSON=xW;$l.encode=coe;$l.decode=eoe;$l.fromJSON=Wae;ff.encode=foe;ff.decode=roe;Tl.encode=hoe;Tl.decode=toe;function Qae(r,e=new Map,t=ti.V5){const n=aoe(r,e);return new un(n,cw(r),e,t)}function Jae(r,e=ti.V5){if(r.compression()!==null)throw new Error("Record batch compression not implemented");return new Lo(r.length(),noe(r),ioe(r,e))}function eoe(r,e=ti.V5){return new $l(Lo.decode(r.data(),e),r.id(),r.isDelta())}function toe(r){return new Tl(r.offset(),r.length())}function roe(r){return new ff(r.length(),r.nullCount())}function noe(r){const e=[];for(let t,n=-1,i=-1,a=r.nodesLength();++nRn.encode(r,a));yl.startFieldsVector(r,t.length);const n=yl.createFieldsVector(r,t),i=e.metadata&&e.metadata.size>0?yl.createCustomMetadataVector(r,[...e.metadata].map(([a,o])=>{const s=r.createString(`${a}`),l=r.createString(`${o}`);return Si.startKeyValue(r),Si.addKey(r,s),Si.addValue(r,l),Si.endKeyValue(r)})):-1;return yl.startSchema(r),yl.addFields(r,n),yl.addEndianness(r,doe?Bg.Little:Bg.Big),i!==-1&&yl.addCustomMetadata(r,i),yl.endSchema(r)}function loe(r,e){let t=-1,n=-1,i=-1;const a=e.type;let o=e.typeId;Tt.isDictionary(a)?(o=a.dictionary.typeId,i=yx.visit(a,r),n=yx.visit(a.dictionary,r)):n=yx.visit(a,r);const s=(a.children||[]).map(c=>Rn.encode(r,c)),l=zo.createChildrenVector(r,s),u=e.metadata&&e.metadata.size>0?zo.createCustomMetadataVector(r,[...e.metadata].map(([c,f])=>{const h=r.createString(`${c}`),d=r.createString(`${f}`);return Si.startKeyValue(r),Si.addKey(r,h),Si.addValue(r,d),Si.endKeyValue(r)})):-1;return e.name&&(t=r.createString(e.name)),zo.startField(r),zo.addType(r,n),zo.addTypeType(r,o),zo.addChildren(r,l),zo.addNullable(r,!!e.nullable),t!==-1&&zo.addName(r,t),i!==-1&&zo.addDictionary(r,i),u!==-1&&zo.addCustomMetadata(r,u),zo.endField(r)}function uoe(r,e){const t=e.nodes||[],n=e.buffers||[];mu.startNodesVector(r,t.length);for(const o of t.slice().reverse())ff.encode(r,o);const i=r.endVector();mu.startBuffersVector(r,n.length);for(const o of n.slice().reverse())Tl.encode(r,o);const a=r.endVector();return mu.startRecordBatch(r),mu.addLength(r,BigInt(e.length)),mu.addNodes(r,i),mu.addBuffers(r,a),mu.endRecordBatch(r)}function coe(r,e){const t=Lo.encode(r,e.data);return Sp.startDictionaryBatch(r),Sp.addId(r,BigInt(e.id)),Sp.addIsDelta(r,e.isDelta),Sp.addData(r,t),Sp.endDictionaryBatch(r)}function foe(r,e){return jG.createFieldNode(r,BigInt(e.length),BigInt(e.nullCount))}function hoe(r,e){return $G.createBuffer(r,BigInt(e.offset),BigInt(e.length))}const doe=(()=>{const r=new ArrayBuffer(2);return new DataView(r).setInt16(0,256,!0),new Int16Array(r)[0]===256})(),nL=r=>`Expected ${en[r]} Message in stream, but was null or length 0.`,iL=r=>`Header pointer of flatbuffer-encoded ${en[r]} Message is null or length 0.`,kW=(r,e)=>`Expected to read ${r} metadata bytes, but only read ${e}.`,TW=(r,e)=>`Expected to read ${r} bytes for message body, but only read ${e}.`;class MW{constructor(e){this.source=e instanceof CS?e:new CS(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?Wn:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(nL(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);const t=Yr(this.source.read(e));if(t.byteLength[...i,...a.VALIDITY&&[a.VALIDITY]||[],...a.TYPE_ID&&[a.TYPE_ID]||[],...a.OFFSET&&[a.OFFSET]||[],...a.DATA&&[a.DATA]||[],...t(a.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(nL(e));return t.value}readSchema(){const e=en.Schema,t=this.readMessage(e),n=t==null?void 0:t.header();if(!t||!n)throw new Error(iL(e));return n}}const PC=4,bT="ARROW1",q0=new Uint8Array(bT.length);for(let r=0;rthis):this}readRecordBatch(e){return this._impl.isFile()?this._impl.readRecordBatch(e):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Yo.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Yo.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}static from(e){return e instanceof os?e:uT(e)?_oe(e):RG(e)?Coe(e):pd(e)?fr(this,void 0,void 0,function*(){return yield os.from(yield e)}):NG(e)||V3(e)||zG(e)||hv(e)?Soe(new Pg(e)):woe(new CS(e))}static readAll(e){return e instanceof os?e.isSync()?wP(e):SP(e):uT(e)||ArrayBuffer.isView(e)||_1(e)||PG(e)?wP(e):SP(e)}}class xS extends os{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return kl(this,arguments,function*(){yield Ar(yield*tw(Qh(this[Symbol.iterator]())))})}}class DS extends os{constructor(e){super(e),this._impl=e}readAll(){return fr(this,void 0,void 0,function*(){var e,t,n,i;const a=new Array;try{for(var o=!0,s=Qh(this),l;l=yield s.next(),e=l.done,!e;o=!0){i=l.value,o=!1;const u=i;a.push(u)}}catch(u){t={error:u}}finally{try{!o&&!e&&(n=s.return)&&(yield n.call(s))}finally{if(t)throw t.error}}return a})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class LW extends xS{constructor(e){super(e),this._impl=e}}class moe extends DS{constructor(e){super(e),this._impl=e}}class FW{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){const n=this._loadVectors(e,t,this.schema.fields),i=zr({type:new Fa(this.schema.fields),length:e.length,children:n});return new Ja(this.schema,i)}_loadDictionaryBatch(e,t){const{id:n,isDelta:i}=e,{dictionaries:a,schema:o}=this,s=a.get(n),l=o.dictionaries.get(n),u=this._loadVectors(e.data,t,[l]);return(s&&i?s.concat(new ln(u)):new ln(u)).memoize()}_loadVectors(e,t,n){return new wW(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(n)}}class ES extends FW{constructor(e,t){super(t),this._reader=uT(e)?new goe(this._handle=e):new MW(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=OW(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):Wn}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):Wn}next(){if(this.closed)return Wn;let e;const{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),i=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),i=t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new rL(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}}class kS extends FW{constructor(e,t){super(t),this._reader=new poe(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return fr(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return fr(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=OW(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return fr(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):Wn})}return(e){return fr(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):Wn})}next(){return fr(this,void 0,void 0,function*(){if(this.closed)return Wn;let e;const{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;const n=e.header(),i=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(n,i)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;const n=e.header(),i=yield t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(n,i);this.dictionaries.set(n.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new rL(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return fr(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}}class BW extends ES{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof dP?e:new dP(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();const n=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(en.RecordBatch);if(i!=null&&i.isRecordBatch()){const a=i.header(),o=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(a,o)}}return null}_readDictionaryBatch(e){var t;const n=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(n&&this._handle.seek(n.offset)){const i=this._reader.readMessage(en.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const a=i.header(),o=this._reader.readMessageBody(i.bodyLength),s=this._loadDictionaryBatch(a,o);this.dictionaries.set(a.id,s)}}}_readFooter(){const{_handle:e}=this,t=e.size-IW,n=e.readInt32(t),i=e.readAt(t-n,n);return j0.decode(i)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return fr(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const n of this._footer.dictionaryBatches())n&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return fr(this,void 0,void 0,function*(){var t;if(this.closed)return null;this._footer||(yield this.open());const n=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(en.RecordBatch);if(i!=null&&i.isRecordBatch()){const a=i.header(),o=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(a,o)}}return null})}_readDictionaryBatch(e){return fr(this,void 0,void 0,function*(){var t;const n=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(n&&(yield this._handle.seek(n.offset))){const i=yield this._reader.readMessage(en.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const a=i.header(),o=yield this._reader.readMessageBody(i.bodyLength),s=this._loadDictionaryBatch(a,o);this.dictionaries.set(a.id,s)}}})}_readFooter(){return fr(this,void 0,void 0,function*(){const{_handle:e}=this;e._pending&&(yield e._pending);const t=e.size-IW,n=yield e.readInt32(t),i=yield e.readAt(t-n,n);return j0.decode(i)})}_readNextMessageAndValidate(e){return fr(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?aL(e)?new LW(new BW(r.read())):new xS(new ES(r)):new xS(new ES(function*(){}()))}function Soe(r){return fr(this,void 0,void 0,function*(){const e=yield r.peek(A1+7&-8);return e&&e.byteLength>=4?aL(e)?new LW(new BW(yield r.read())):new DS(new kS(r)):new DS(new kS(function(){return kl(this,arguments,function*(){})}()))})}function Coe(r){return fr(this,void 0,void 0,function*(){const{size:e}=yield r.stat(),t=new AS(r,e);return e>=voe&&aL(yield t.readAt(0,A1+7&-8))?new moe(new yoe(t)):new DS(new kS(t))})}class jn extends Rr{static assemble(...e){const t=i=>i.flatMap(a=>Array.isArray(a)?t(a):a instanceof Ja?a.data.children:a.data),n=new jn;return n.visitMany(t(e)),n}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(e){if(e instanceof ln)return this.visitMany(e.data),this;const{type:t}=e;if(!Tt.isDictionary(t)){const{length:n}=e;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(Tt.isUnion(t))this.nodes.push(new ff(n,0));else{const{nullCount:i}=e;Tt.isNull(t)||Ns.call(this,i<=0?new Uint8Array(0):yS(e.offset,n,e.nullBitmap)),this.nodes.push(new ff(n,i))}}return super.visit(e)}visitNull(e){return this}visitDictionary(e){return this.visit(e.clone(e.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}}function Ns(r){const e=r.byteLength+7&-8;return this.buffers.push(r),this.bufferRegions.push(new Tl(this._byteLength,e)),this._byteLength+=e,this}function Aoe(r){var e;const{type:t,length:n,typeIds:i,valueOffsets:a}=r;if(Ns.call(this,i),t.mode===va.Sparse)return _T.call(this,r);if(t.mode===va.Dense){if(r.offset<=0)return Ns.call(this,a),_T.call(this,r);{const o=new Int32Array(n),s=Object.create(null),l=Object.create(null);for(let u,c,f=-1;++f{const f=t.typeIds[c],h=s[f],d=l[f];return u.slice(h,Math.min(n,d))}))}}return this}function xoe(r){let e;return r.nullCount>=r.length?Ns.call(this,new Uint8Array(0)):(e=r.values)instanceof Uint8Array?Ns.call(this,yS(r.offset,r.length,e)):Ns.call(this,bS(r.values))}function tc(r){return Ns.call(this,r.values.subarray(0,r.length*r.stride))}function RC(r){const{length:e,values:t,valueOffsets:n}=r,i=xn(n[0]),a=xn(n[e]),o=Math.min(a-i,t.byteLength-i);return Ns.call(this,UG(-i,e+1,n)),Ns.call(this,t.subarray(i,i+o)),this}function oL(r){const{length:e,valueOffsets:t}=r;if(t){const{[0]:n,[e]:i}=t;return Ns.call(this,UG(-n,e+1,t)),this.visit(r.children[0].slice(n,i-n))}return this.visit(r.children[0])}function _T(r){return this.visitMany(r.type.children.map((e,t)=>r.children[t]).filter(Boolean))[0]}jn.prototype.visitBool=xoe;jn.prototype.visitInt=tc;jn.prototype.visitFloat=tc;jn.prototype.visitUtf8=RC;jn.prototype.visitLargeUtf8=RC;jn.prototype.visitBinary=RC;jn.prototype.visitLargeBinary=RC;jn.prototype.visitFixedSizeBinary=tc;jn.prototype.visitDate=tc;jn.prototype.visitTimestamp=tc;jn.prototype.visitTime=tc;jn.prototype.visitDecimal=tc;jn.prototype.visitList=oL;jn.prototype.visitStruct=_T;jn.prototype.visitUnion=Aoe;jn.prototype.visitInterval=tc;jn.prototype.visitDuration=tc;jn.prototype.visitFixedSizeList=oL;jn.prototype.visitMap=oL;class PW extends X3{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}constructor(e){super(),this._position=0,this._started=!1,this._sink=new lw,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,co(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return pd(e)?e.then(t=>this.writeAll(t)):hv(e)?cL(this,e):uL(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof lw?this._sink=e:(this._sink=new lw,e&&rie(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&nie(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!t||!yT(t,this._schema))&&(t==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof cf&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof Ja&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!yT(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof Ja?e instanceof rL||this._writeRecordBatch(e):e instanceof cf?this.writeAll(e.batches):_1(e)&&this.writeAll(e)}_writeMessage(e,t=8){const n=t-1,i=Ba.encode(e),a=i.byteLength,o=this._writeLegacyIpcFormat?4:8,s=a+o+n&~n,l=s-a-o;return e.headerType===en.RecordBatch?this._recordBatchBlocks.push(new lf(s,e.bodyLength,this._position)):e.headerType===en.DictionaryBatch&&this._dictionaryBlocks.push(new lf(s,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(s-o)),a>0&&this._write(i),this._writePadding(l)}_write(e){if(this._started){const t=Yr(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(Ba.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(q0)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){const{byteLength:t,nodes:n,bufferRegions:i,buffers:a}=jn.assemble(e),o=new Lo(e.numRows,n,i),s=Ba.from(o,t);return this._writeDictionaries(e)._writeMessage(s)._writeBodyBuffers(a)}_writeDictionaryBatch(e,t,n=!1){const{byteLength:i,nodes:a,bufferRegions:o,buffers:s}=jn.assemble(new ln([e])),l=new Lo(e.length,a,o),u=new $l(l,t,n),c=Ba.from(u,i);return this._writeMessage(c)._writeBodyBuffers(s)}_writeBodyBuffers(e){let t,n,i;for(let a=-1,o=e.length;++a0&&(this._write(t),(i=(n+7&-8)-n)>0&&this._writePadding(i));return this}_writeDictionaries(e){var t,n;for(const[i,a]of e.dictionaries){const o=(t=a==null?void 0:a.data)!==null&&t!==void 0?t:[],s=this._seenDictionaries.get(i),l=(n=this._dictionaryDeltaOffsets.get(i))!==null&&n!==void 0?n:0;if(!s||s.data[0]!==o[0])for(const[u,c]of o.entries())this._writeDictionaryBatch(c,i,u>0);else if(ln.writeAll(i)):hv(e)?cL(n,e):uL(n,e)}}class lL extends PW{static writeAll(e){const t=new lL;return pd(e)?e.then(n=>t.writeAll(n)):hv(e)?cL(t,e):uL(t,e)}constructor(){super(),this._autoDestroy=!0}_writeSchema(e){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(e,t,n=!1){if(!n&&this._seenDictionaries.has(t))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(e,t,n)}_writeFooter(e){const t=j0.encode(new j0(e,ti.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(e)._write(t)._write(Int32Array.of(t.byteLength))._writeMagic()}}function uL(r,e){let t=e;e instanceof cf&&(t=e.batches,r.reset(void 0,e.schema));for(const n of t)r.write(n);return r.finish()}function cL(r,e){return fr(this,void 0,void 0,function*(){var t,n,i,a,o,s,l;try{for(t=!0,n=Qh(e);i=yield n.next(),a=i.done,!a;t=!0){l=i.value,t=!1;const u=l;r.write(u)}}catch(u){o={error:u}}finally{try{!t&&!a&&(s=n.return)&&(yield s.call(n))}finally{if(o)throw o.error}}return r.finish()})}function Doe(r,e="stream"){return(e==="stream"?sL:lL).writeAll(r).toUint8Array(!0)}var Eoe=Object.create,RW=Object.defineProperty,koe=Object.getOwnPropertyDescriptor,Toe=Object.getOwnPropertyNames,Moe=Object.getPrototypeOf,Ioe=Object.prototype.hasOwnProperty,Loe=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Foe=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Toe(e))!Ioe.call(r,i)&&i!==t&&RW(r,i,{get:()=>e[i],enumerable:!(n=koe(e,i))||n.enumerable});return r},Boe=(r,e,t)=>(t=r!=null?Eoe(Moe(r)):{},Foe(!r||!r.__esModule?RW(t,"default",{value:r,enumerable:!0}):t,r)),Ooe=Loe((r,e)=>{e.exports=Worker}),Poe=(r=>(r[r.UNDEFINED=0]="UNDEFINED",r[r.AUTOMATIC=1]="AUTOMATIC",r[r.READ_ONLY=2]="READ_ONLY",r[r.READ_WRITE=3]="READ_WRITE",r))(Poe||{}),Roe=(r=>(r[r.IDENTIFIER=0]="IDENTIFIER",r[r.NUMERIC_CONSTANT=1]="NUMERIC_CONSTANT",r[r.STRING_CONSTANT=2]="STRING_CONSTANT",r[r.OPERATOR=3]="OPERATOR",r[r.KEYWORD=4]="KEYWORD",r[r.COMMENT=5]="COMMENT",r))(Roe||{}),Noe=(r=>(r[r.NONE=0]="NONE",r[r.DEBUG=1]="DEBUG",r[r.INFO=2]="INFO",r[r.WARNING=3]="WARNING",r[r.ERROR=4]="ERROR",r))(Noe||{}),zoe=(r=>(r[r.NONE=0]="NONE",r[r.CONNECT=1]="CONNECT",r[r.DISCONNECT=2]="DISCONNECT",r[r.OPEN=3]="OPEN",r[r.QUERY=4]="QUERY",r[r.INSTANTIATE=5]="INSTANTIATE",r))(zoe||{}),Voe=(r=>(r[r.NONE=0]="NONE",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR",r[r.START=3]="START",r[r.RUN=4]="RUN",r[r.CAPTURE=5]="CAPTURE",r))(Voe||{}),Uoe=(r=>(r[r.NONE=0]="NONE",r[r.WEB_WORKER=1]="WEB_WORKER",r[r.NODE_WORKER=2]="NODE_WORKER",r[r.BINDINGS=3]="BINDINGS",r[r.ASYNC_DUCKDB=4]="ASYNC_DUCKDB",r))(Uoe||{}),Goe=class{log(r){}};var Hoe=(r=>(r[r.SUCCESS=0]="SUCCESS",r))(Hoe||{}),Woe=class{constructor(r,e){this._bindings=r,this._conn=e}get bindings(){return this._bindings}async close(){return this._bindings.disconnect(this._conn)}useUnsafe(r){return r(this._bindings,this._conn)}async query(r){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.runQuery(this._conn,r),t=os.from(e);return console.assert(t.isSync(),"Reader is not sync"),console.assert(t.isFile(),"Reader is not file"),new cf(t)}async send(r){this._bindings.logger.log({timestamp:new Date,level:2,origin:4,topic:4,event:4,value:r});let e=await this._bindings.startPendingQuery(this._conn,r);for(;e==null;)e=await this._bindings.pollPendingQuery(this._conn);let t=new NW(this._bindings,this._conn,e),n=await os.from(t);return console.assert(n.isAsync()),console.assert(n.isStream()),n}async cancelSent(){return await this._bindings.cancelPendingQuery(this._conn)}async getTableNames(r){return await this._bindings.getTableNames(this._conn,r)}async prepare(r){let e=await this._bindings.createPrepared(this._conn,r);return new $oe(this._bindings,this._conn,e)}async insertArrowTable(r,e){let t=Doe(r,"stream");await this.insertArrowFromIPCStream(t,e)}async insertArrowFromIPCStream(r,e){await this._bindings.insertArrowFromIPCStream(this._conn,r,e)}async insertCSVFromPath(r,e){await this._bindings.insertCSVFromPath(this._conn,r,e)}async insertJSONFromPath(r,e){await this._bindings.insertJSONFromPath(this._conn,r,e)}},NW=class{constructor(e,t,n){this.db=e,this.conn=t,this.header=n,this._first=!0,this._depleted=!1,this._inFlight=null}async next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e;return this._inFlight!=null?(e=await this._inFlight,this._inFlight=null):e=await this.db.fetchQueryResults(this.conn),this._depleted=e.length==0,this._depleted||(this._inFlight=this.db.fetchQueryResults(this.conn)),{done:this._depleted,value:e}}[Symbol.asyncIterator](){return this}},$oe=class{constructor(r,e,t){this.bindings=r,this.connectionId=e,this.statementId=t}async close(){await this.bindings.closePrepared(this.connectionId,this.statementId)}async query(...r){let e=await this.bindings.runPrepared(this.connectionId,this.statementId,r),t=os.from(e);return console.assert(t.isSync()),console.assert(t.isFile()),new cf(t)}async send(...r){let e=await this.bindings.sendPrepared(this.connectionId,this.statementId,r),t=new NW(this.bindings,this.connectionId,e),n=await os.from(t);return console.assert(n.isAsync()),console.assert(n.isStream()),n}},joe=(r=>(r.CANCEL_PENDING_QUERY="CANCEL_PENDING_QUERY",r.CLOSE_PREPARED="CLOSE_PREPARED",r.COLLECT_FILE_STATISTICS="COLLECT_FILE_STATISTICS",r.CONNECT="CONNECT",r.COPY_FILE_TO_BUFFER="COPY_FILE_TO_BUFFER",r.COPY_FILE_TO_PATH="COPY_FILE_TO_PATH",r.CREATE_PREPARED="CREATE_PREPARED",r.DISCONNECT="DISCONNECT",r.DROP_FILE="DROP_FILE",r.DROP_FILES="DROP_FILES",r.EXPORT_FILE_STATISTICS="EXPORT_FILE_STATISTICS",r.FETCH_QUERY_RESULTS="FETCH_QUERY_RESULTS",r.FLUSH_FILES="FLUSH_FILES",r.GET_FEATURE_FLAGS="GET_FEATURE_FLAGS",r.GET_TABLE_NAMES="GET_TABLE_NAMES",r.GET_VERSION="GET_VERSION",r.GLOB_FILE_INFOS="GLOB_FILE_INFOS",r.INSERT_ARROW_FROM_IPC_STREAM="INSERT_ARROW_FROM_IPC_STREAM",r.INSERT_CSV_FROM_PATH="IMPORT_CSV_FROM_PATH",r.INSERT_JSON_FROM_PATH="IMPORT_JSON_FROM_PATH",r.INSTANTIATE="INSTANTIATE",r.OPEN="OPEN",r.PING="PING",r.POLL_PENDING_QUERY="POLL_PENDING_QUERY",r.REGISTER_FILE_BUFFER="REGISTER_FILE_BUFFER",r.REGISTER_FILE_HANDLE="REGISTER_FILE_HANDLE",r.REGISTER_FILE_URL="REGISTER_FILE_URL",r.RESET="RESET",r.RUN_PREPARED="RUN_PREPARED",r.RUN_QUERY="RUN_QUERY",r.SEND_PREPARED="SEND_PREPARED",r.START_PENDING_QUERY="START_PENDING_QUERY",r.TOKENIZE="TOKENIZE",r))(joe||{}),qoe=(r=>(r.CONNECTION_INFO="CONNECTION_INFO",r.ERROR="ERROR",r.FEATURE_FLAGS="FEATURE_FLAGS",r.FILE_BUFFER="FILE_BUFFER",r.FILE_INFOS="FILE_INFOS",r.FILE_SIZE="FILE_SIZE",r.FILE_STATISTICS="FILE_STATISTICS",r.INSTANTIATE_PROGRESS="INSTANTIATE_PROGRESS",r.LOG="LOG",r.OK="OK",r.PREPARED_STATEMENT_ID="PREPARED_STATEMENT_ID",r.QUERY_PLAN="QUERY_PLAN",r.QUERY_RESULT="QUERY_RESULT",r.QUERY_RESULT_CHUNK="QUERY_RESULT_CHUNK",r.QUERY_RESULT_HEADER="QUERY_RESULT_HEADER",r.QUERY_RESULT_HEADER_OR_NULL="QUERY_RESULT_HEADER_OR_NULL",r.REGISTERED_FILE="REGISTERED_FILE",r.SCRIPT_TOKENS="SCRIPT_TOKENS",r.SUCCESS="SUCCESS",r.TABLE_NAMES="TABLE_NAMES",r.VERSION_STRING="VERSION_STRING",r))(qoe||{}),Qr=class{constructor(r,e){this.promiseResolver=()=>{},this.promiseRejecter=()=>{},this.type=r,this.data=e,this.promise=new Promise((t,n)=>{this.promiseResolver=t,this.promiseRejecter=n})}};function fw(r){switch(r.typeId){case ae.Binary:return{sqlType:"binary"};case ae.Bool:return{sqlType:"bool"};case ae.Date:return{sqlType:"date"};case ae.DateDay:return{sqlType:"date32[d]"};case ae.DateMillisecond:return{sqlType:"date64[ms]"};case ae.Decimal:{let e=r;return{sqlType:"decimal",precision:e.precision,scale:e.scale}}case ae.Float:return{sqlType:"float"};case ae.Float16:return{sqlType:"float16"};case ae.Float32:return{sqlType:"float32"};case ae.Float64:return{sqlType:"float64"};case ae.Int:return{sqlType:"int32"};case ae.Int16:return{sqlType:"int16"};case ae.Int32:return{sqlType:"int32"};case ae.Int64:return{sqlType:"int64"};case ae.Uint16:return{sqlType:"uint16"};case ae.Uint32:return{sqlType:"uint32"};case ae.Uint64:return{sqlType:"uint64"};case ae.Uint8:return{sqlType:"uint8"};case ae.IntervalDayTime:return{sqlType:"interval[dt]"};case ae.IntervalYearMonth:return{sqlType:"interval[m]"};case ae.List:return{sqlType:"list",valueType:fw(r.valueType)};case ae.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:r.byteWidth};case ae.Null:return{sqlType:"null"};case ae.Utf8:return{sqlType:"utf8"};case ae.Struct:return{sqlType:"struct",fields:r.children.map(e=>wT(e.name,e.type))};case ae.Map:{let e=r;return{sqlType:"map",keyType:fw(e.keyType),valueType:fw(e.valueType)}}case ae.Time:return{sqlType:"time[s]"};case ae.TimeMicrosecond:return{sqlType:"time[us]"};case ae.TimeMillisecond:return{sqlType:"time[ms]"};case ae.TimeNanosecond:return{sqlType:"time[ns]"};case ae.TimeSecond:return{sqlType:"time[s]"};case ae.Timestamp:return{sqlType:"timestamp",timezone:r.timezone||void 0};case ae.TimestampSecond:return{sqlType:"timestamp[s]",timezone:r.timezone||void 0};case ae.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:r.timezone||void 0};case ae.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:r.timezone||void 0};case ae.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:r.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(r.toString()))}function wT(r,e){let t=fw(e);return t.name=r,t}var Yoe=new TextEncoder,Zoe=class{constructor(r,e=null){this._onInstantiationProgress=[],this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{},this._nextMessageId=0,this._pendingRequests=new Map,this._logger=r,this._onMessageHandler=this.onMessage.bind(this),this._onErrorHandler=this.onError.bind(this),this._onCloseHandler=this.onClose.bind(this),e!=null&&this.attach(e)}get logger(){return this._logger}attach(r){this._worker=r,this._worker.addEventListener("message",this._onMessageHandler),this._worker.addEventListener("error",this._onErrorHandler),this._worker.addEventListener("close",this._onCloseHandler),this._workerShutdownPromise=new Promise((e,t)=>{this._workerShutdownResolver=e})}detach(){this._worker&&(this._worker.removeEventListener("message",this._onMessageHandler),this._worker.removeEventListener("error",this._onErrorHandler),this._worker.removeEventListener("close",this._onCloseHandler),this._worker=null,this._workerShutdownResolver(null),this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async terminate(){this._worker&&(this._worker.terminate(),this._worker=null,this._workerShutdownPromise=null,this._workerShutdownResolver=()=>{})}async postTask(r,e=[]){if(!this._worker){console.error("cannot send a message since the worker is not set!");return}let t=this._nextMessageId++;return this._pendingRequests.set(t,r),this._worker.postMessage({messageId:t,type:r.type,data:r.data},e),await r.promise}onMessage(r){var e;let t=r.data;switch(t.type){case"LOG":{this._logger.log(t.data);return}case"INSTANTIATE_PROGRESS":{for(let i of this._onInstantiationProgress)i(t.data);return}}let n=this._pendingRequests.get(t.requestId);if(!n){console.warn("unassociated response: [".concat(t.requestId,", ").concat(t.type.toString(),"]"));return}if(this._pendingRequests.delete(t.requestId),t.type=="ERROR"){let i=new Error(t.data.message);i.name=t.data.name,(e=Object.getOwnPropertyDescriptor(i,"stack"))!=null&&e.writable&&(i.stack=t.data.stack),n.promiseRejecter(i);return}switch(n.type){case"CLOSE_PREPARED":case"COLLECT_FILE_STATISTICS":case"COPY_FILE_TO_PATH":case"DISCONNECT":case"DROP_FILE":case"DROP_FILES":case"FLUSH_FILES":case"INSERT_ARROW_FROM_IPC_STREAM":case"IMPORT_CSV_FROM_PATH":case"IMPORT_JSON_FROM_PATH":case"OPEN":case"PING":case"REGISTER_FILE_BUFFER":case"REGISTER_FILE_HANDLE":case"REGISTER_FILE_URL":case"RESET":if(t.type=="OK"){n.promiseResolver(t.data);return}break;case"INSTANTIATE":if(this._onInstantiationProgress=[],t.type=="OK"){n.promiseResolver(t.data);return}break;case"GLOB_FILE_INFOS":if(t.type=="FILE_INFOS"){n.promiseResolver(t.data);return}break;case"GET_VERSION":if(t.type=="VERSION_STRING"){n.promiseResolver(t.data);return}break;case"GET_FEATURE_FLAGS":if(t.type=="FEATURE_FLAGS"){n.promiseResolver(t.data);return}break;case"GET_TABLE_NAMES":if(t.type=="TABLE_NAMES"){n.promiseResolver(t.data);return}break;case"TOKENIZE":if(t.type=="SCRIPT_TOKENS"){n.promiseResolver(t.data);return}break;case"COPY_FILE_TO_BUFFER":if(t.type=="FILE_BUFFER"){n.promiseResolver(t.data);return}break;case"EXPORT_FILE_STATISTICS":if(t.type=="FILE_STATISTICS"){n.promiseResolver(t.data);return}break;case"CONNECT":if(t.type=="CONNECTION_INFO"){n.promiseResolver(t.data);return}break;case"RUN_PREPARED":case"RUN_QUERY":if(t.type=="QUERY_RESULT"){n.promiseResolver(t.data);return}break;case"SEND_PREPARED":if(t.type=="QUERY_RESULT_HEADER"){n.promiseResolver(t.data);return}break;case"START_PENDING_QUERY":if(t.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(t.data);return}break;case"POLL_PENDING_QUERY":if(t.type=="QUERY_RESULT_HEADER_OR_NULL"){n.promiseResolver(t.data);return}break;case"CANCEL_PENDING_QUERY":if(this._onInstantiationProgress=[],t.type=="SUCCESS"){n.promiseResolver(t.data);return}break;case"FETCH_QUERY_RESULTS":if(t.type=="QUERY_RESULT_CHUNK"){n.promiseResolver(t.data);return}break;case"CREATE_PREPARED":if(t.type=="PREPARED_STATEMENT_ID"){n.promiseResolver(t.data);return}break}n.promiseRejecter(new Error("unexpected response type: ".concat(t.type.toString())))}onError(r){console.error(r),console.error("error in duckdb worker: ".concat(r.message)),this._pendingRequests.clear()}onClose(){if(this._workerShutdownResolver(null),this._pendingRequests.size!=0){console.warn("worker terminated with ".concat(this._pendingRequests.size," pending requests"));return}this._pendingRequests.clear()}async reset(){let r=new Qr("RESET",null);return await this.postTask(r)}async ping(){let r=new Qr("PING",null);await this.postTask(r)}async dropFile(r){let e=new Qr("DROP_FILE",r);return await this.postTask(e)}async dropFiles(){let r=new Qr("DROP_FILES",null);return await this.postTask(r)}async flushFiles(){let r=new Qr("FLUSH_FILES",null);return await this.postTask(r)}async instantiate(r,e=null,t=n=>{}){this._onInstantiationProgress.push(t);let n=new Qr("INSTANTIATE",[r,e]);return await this.postTask(n)}async getVersion(){let r=new Qr("GET_VERSION",null);return await this.postTask(r)}async getFeatureFlags(){let r=new Qr("GET_FEATURE_FLAGS",null);return await this.postTask(r)}async open(r){let e=new Qr("OPEN",r);await this.postTask(e)}async tokenize(r){let e=new Qr("TOKENIZE",r);return await this.postTask(e)}async connectInternal(){let r=new Qr("CONNECT",null);return await this.postTask(r)}async connect(){let r=await this.connectInternal();return new Woe(this,r)}async disconnect(r){let e=new Qr("DISCONNECT",r);await this.postTask(e)}async runQuery(r,e){let t=new Qr("RUN_QUERY",[r,e]);return await this.postTask(t)}async startPendingQuery(r,e){let t=new Qr("START_PENDING_QUERY",[r,e]);return await this.postTask(t)}async pollPendingQuery(r){let e=new Qr("POLL_PENDING_QUERY",r);return await this.postTask(e)}async cancelPendingQuery(r){let e=new Qr("CANCEL_PENDING_QUERY",r);return await this.postTask(e)}async fetchQueryResults(r){let e=new Qr("FETCH_QUERY_RESULTS",r);return await this.postTask(e)}async getTableNames(r,e){let t=new Qr("GET_TABLE_NAMES",[r,e]);return await this.postTask(t)}async createPrepared(r,e){let t=new Qr("CREATE_PREPARED",[r,e]);return await this.postTask(t)}async closePrepared(r,e){let t=new Qr("CLOSE_PREPARED",[r,e]);await this.postTask(t)}async runPrepared(r,e,t){let n=new Qr("RUN_PREPARED",[r,e,t]);return await this.postTask(n)}async sendPrepared(r,e,t){let n=new Qr("SEND_PREPARED",[r,e,t]);return await this.postTask(n)}async globFiles(r){let e=new Qr("GLOB_FILE_INFOS",r);return await this.postTask(e)}async registerFileText(r,e){let t=Yoe.encode(e);await this.registerFileBuffer(r,t)}async registerFileURL(r,e,t,n){e===void 0&&(e=r);let i=new Qr("REGISTER_FILE_URL",[r,e,t,n]);await this.postTask(i)}async registerEmptyFileBuffer(r){}async registerFileBuffer(r,e){let t=new Qr("REGISTER_FILE_BUFFER",[r,e]);await this.postTask(t,[e.buffer])}async registerFileHandle(r,e,t,n){let i=new Qr("REGISTER_FILE_HANDLE",[r,e,t,n]);await this.postTask(i,[])}async collectFileStatistics(r,e){let t=new Qr("COLLECT_FILE_STATISTICS",[r,e]);await this.postTask(t,[])}async exportFileStatistics(r){let e=new Qr("EXPORT_FILE_STATISTICS",r);return await this.postTask(e,[])}async copyFileToBuffer(r){let e=new Qr("COPY_FILE_TO_BUFFER",r);return await this.postTask(e)}async copyFileToPath(r,e){let t=new Qr("COPY_FILE_TO_PATH",[r,e]);await this.postTask(t)}async insertArrowFromIPCStream(r,e,t){if(e.length==0)return;let n=new Qr("INSERT_ARROW_FROM_IPC_STREAM",[r,e,t]);await this.postTask(n,[e.buffer])}async insertCSVFromPath(r,e,t){if(t.columns!==void 0){let i=[];for(let a in t.columns){let o=t.columns[a];i.push(wT(a,o))}t.columnsFlat=i,delete t.columns}let n=new Qr("IMPORT_CSV_FROM_PATH",[r,e,t]);await this.postTask(n)}async insertJSONFromPath(r,e,t){if(t.columns!==void 0){let i=[];for(let a in t.columns){let o=t.columns[a];i.push(wT(a,o))}t.columnsFlat=i,delete t.columns}let n=new Qr("IMPORT_JSON_FROM_PATH",[r,e,t]);await this.postTask(n)}},Koe=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,3,1,0,1,10,14,1,12,0,65,0,65,0,65,0,252,10,0,0,11])),Xoe=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,8,1,6,0,6,64,25,11,11])),Qoe=async()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),Joe=()=>(async r=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(r)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11])),ese={name:"@duckdb/duckdb-wasm",version:"1.29.0",description:"DuckDB powered by WebAssembly",license:"MIT",repository:{type:"git",url:"https://github.com/duckdb/duckdb-wasm.git"},keywords:["sql","duckdb","relational","database","data","query","wasm","analytics","olap","arrow","parquet","json","csv"],dependencies:{"apache-arrow":"^17.0.0"},devDependencies:{"@types/emscripten":"^1.39.10","@types/jasmine":"^5.1.4","@typescript-eslint/eslint-plugin":"^6.21.0","@typescript-eslint/parser":"^6.21.0",esbuild:"^0.20.2",eslint:"^8.57.0","eslint-plugin-jasmine":"^4.1.3","eslint-plugin-react":"^7.34.0","fast-glob":"^3.3.2",jasmine:"^5.1.0","jasmine-core":"^5.1.2","jasmine-spec-reporter":"^7.0.0","js-sha256":"^0.11.0",karma:"^6.4.2","karma-chrome-launcher":"^3.2.0","karma-coverage":"^2.2.1","karma-firefox-launcher":"^2.1.3","karma-jasmine":"^5.1.0","karma-jasmine-html-reporter":"^2.1.0","karma-sourcemap-loader":"^0.4.0","karma-spec-reporter":"^0.0.36","make-dir":"^4.0.0",nyc:"^15.1.0",prettier:"^3.2.5",puppeteer:"^22.8.0",rimraf:"^5.0.5",s3rver:"^3.7.1",typedoc:"^0.25.13",typescript:"^5.3.3","wasm-feature-detect":"^1.6.1","web-worker":"^1.2.0"},scripts:{"build:debug":"node bundle.mjs debug && tsc --emitDeclarationOnly","build:release":"node bundle.mjs release && tsc --emitDeclarationOnly",docs:"typedoc",report:"node ./coverage.mjs","test:node":"node --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:debug":"node --inspect-brk --enable-source-maps ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:node:coverage":"nyc -r json --report-dir ./coverage/node node ../../node_modules/jasmine/bin/jasmine ./dist/tests-node.cjs","test:firefox":"karma start ./karma/tests-firefox.cjs","test:chrome":"karma start ./karma/tests-chrome.cjs","test:chrome:eh":"karma start ./karma/tests-chrome-eh.cjs","test:chrome:coverage":"karma start ./karma/tests-chrome-coverage.cjs","test:browser":"karma start ./karma/tests-all.cjs","test:browser:debug":"karma start ./karma/tests-debug.cjs",test:"npm run test:chrome && npm run test:node","test:coverage":"npm run test:chrome:coverage && npm run test:node:coverage && npm run report",lint:"eslint src test"},files:["dist","!dist/tests-*","!dist/duckdb-browser-mvp.worker.js.map","!dist/types/test"],main:"dist/duckdb-browser.cjs",module:"dist/duckdb-browser.mjs",types:"dist/duckdb-browser.d.ts",jsdelivr:"dist/duckdb-browser.cjs",unpkg:"dist/duckdb-browser.mjs",sideEffects:!1,browser:{fs:!1,path:!1,perf_hooks:!1,os:!1,worker_threads:!1},exports:{"./dist/duckdb-mvp.wasm":"./dist/duckdb-mvp.wasm","./dist/duckdb-eh.wasm":"./dist/duckdb-eh.wasm","./dist/duckdb-coi.wasm":"./dist/duckdb-coi.wasm","./dist/duckdb-browser":"./dist/duckdb-browser.mjs","./dist/duckdb-browser.cjs":"./dist/duckdb-browser.cjs","./dist/duckdb-browser.mjs":"./dist/duckdb-browser.mjs","./dist/duckdb-browser-coi.pthread.worker.js":"./dist/duckdb-browser-coi.pthread.worker.js","./dist/duckdb-browser-coi.worker.js":"./dist/duckdb-browser-coi.worker.js","./dist/duckdb-browser-eh.worker.js":"./dist/duckdb-browser-eh.worker.js","./dist/duckdb-browser-mvp.worker.js":"./dist/duckdb-browser-mvp.worker.js","./dist/duckdb-node":"./dist/duckdb-node.cjs","./dist/duckdb-node.cjs":"./dist/duckdb-node.cjs","./dist/duckdb-node-blocking":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-blocking.cjs":"./dist/duckdb-node-blocking.cjs","./dist/duckdb-node-eh.worker.cjs":"./dist/duckdb-node-eh.worker.cjs","./dist/duckdb-node-mvp.worker.cjs":"./dist/duckdb-node-mvp.worker.cjs","./blocking":{node:{types:"./dist/duckdb-node-blocking.d.ts",require:"./dist/duckdb-node-blocking.cjs",import:"./dist/duckdb-node-blocking.cjs"},types:"./dist/duckdb-node-blocking.d.ts",import:"./dist/duckdb-node-blocking.mjs",require:"./dist/duckdb-node-blocking.cjs"},".":{browser:{types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"},node:{types:"./dist/duckdb-node.d.ts",import:"./dist/duckdb-node.cjs",require:"./dist/duckdb-node.cjs"},types:"./dist/duckdb-browser.d.ts",import:"./dist/duckdb-browser.mjs",require:"./dist/duckdb-browser.cjs"}}},fL=ese.version.split(".");fL[0];fL[1];fL[2];var tse=()=>typeof navigator>"u",bx=null,_x=null,Sx=null,Cx=null,Ax=null;async function rse(){return bx==null&&(bx=typeof BigInt64Array<"u"),_x==null&&(_x=await Xoe()),Sx==null&&(Sx=await Joe()),Cx==null&&(Cx=await Qoe()),Ax==null&&(Ax=await Koe()),{bigInt64Array:bx,crossOriginIsolated:tse()||globalThis.crossOriginIsolated||!1,wasmExceptions:_x,wasmSIMD:Cx,wasmThreads:Sx,wasmBulkMemory:Ax}}Boe(Ooe());function nse(){let r=new TextDecoder;return e=>(typeof SharedArrayBuffer<"u"&&e.buffer instanceof SharedArrayBuffer&&(e=new Uint8Array(e)),r.decode(e))}nse();var zW=(r=>(r[r.BUFFER=0]="BUFFER",r[r.NODE_FS=1]="NODE_FS",r[r.BROWSER_FILEREADER=2]="BROWSER_FILEREADER",r[r.BROWSER_FSACCESS=3]="BROWSER_FSACCESS",r[r.HTTP=4]="HTTP",r[r.S3=5]="S3",r))(zW||{});const Jh=Symbol("InputStore"),Hp=r=>typeof r!="object"||r===null?!1:"subscribe"in r,ise=r=>Hp(r)?"set"in r&&"update"in r:!1,hYe=r=>{if(!ise(r))throw console.error({InputStoreValue:r}),new Error("InputStore must be a writable store");if(R3().has(Jh)){const e=Od(Jh);return e.set(MC(r)),e}else return TC(Jh,r),r},dYe=()=>R3().has(Jh)?Od(Jh):(console.warn("InputStoreKey not found in context. Did you forget to call ensureInputContext?"),Tf({})),pYe=()=>{if(!R3().has(Jh))return console.warn("InputStoreKey not found in context. Did you forget to call ensureInputContext?"),lo({});const r=Od(Jh);if(Hp(r))return P3(r);throw new Error(`InputStoreKey is not a readable store: ${r}`)},ase=(r,e)=>{if(r instanceof String&&(r=r.toString()),typeof r!="string"||r.startsWith("http")||r.startsWith("#")||/^[^/]*:/.test(r))return r;let t=e.deployment.basePath;return t?(t!=null&&t.startsWith("/")||(t=`/${t}`),t.endsWith("/")&&(t=t.slice(0,-1)),r.startsWith(t)?r:(r.startsWith("/")||(r=`/${r}`),`${t}${r}`)):r},ose={plugins:{components:{"@evidence-dev/core-components":{overrides:[],aliases:{},provides:[]}},datasources:{"@evidence-dev/bigquery":{},"@evidence-dev/csv":{},"@evidence-dev/databricks":{},"@evidence-dev/duckdb":{},"@evidence-dev/mssql":{},"@evidence-dev/mysql":{},"@evidence-dev/postgres":{},"@evidence-dev/snowflake":{},"@evidence-dev/sqlite":{},"@evidence-dev/trino":{},"@evidence-dev/motherduck":{}}},deployment:{basePath:""}},vd=r=>ase(r,ose);let Fs,ed;const{resolve:sse,reject:lse,promise:use}=FG(),{resolve:cse,reject:fse,promise:hse}=FG();let CP=!1;async function hL(){if(!Fs){if(CP)return BG(use);CP=!0;try{const e=await rse().then(a=>a.wasmExceptions)?{mainModule:(await Ts(async()=>{const{default:a}=await import("./duckdb-eh.CjaN1hVf.js");return{default:a}},[])).default,mainWorker:(await Ts(async()=>{const{default:a}=await import("./duckdb-browser-eh.worker.xVZH6Sl3.js");return{default:a}},[])).default}:{mainModule:(await Ts(async()=>{const{default:a}=await import("./duckdb-mvp.Bsk8BUlZ.js");return{default:a}},[])).default,mainWorker:(await Ts(async()=>{const{default:a}=await import("./duckdb-browser-mvp.worker.BgKlvv5e.js");return{default:a}},[])).default},t=new Goe,n=new e.mainWorker,i=new Zoe(t,n);window[Symbol.for("EVIDENCE_QUERY_ENGINE")]=i,await i.instantiate(e.mainModule),Fs=i,await Fs.open({query:{castBigIntToDouble:!0,castTimestampToDate:!0,castDecimalToDouble:!0,castDurationToTime64:!0}}),ed=await Fs.connect(),await ed.query("SET ieee_floating_point_ops = false;"),await ed.query("SET old_implicit_casting = true;"),sse()}catch(r){throw lse(r),r}}}async function gYe(r){Fs||await hL(),await ed.query(`PRAGMA search_path='${r.join(",")}'`)}async function xx(r){await Fs.flushFiles();for(const e of await Fs.globFiles(r))await Fs.dropFile(e.fileName)}async function vYe(r,e=!1){Fs||await hL(),e||await xx("*");try{for(const t in r){await ed.query(`CREATE SCHEMA IF NOT EXISTS "${t}";`);for(const n of r[t]){const i=n.split(/[\\/]/).at(-1).slice(0,-8),a=`${t}_${i}.parquet`;let o=n;!n.startsWith("http")&&!n.startsWith("/")&&(o=`/${n}`),o.startsWith("/static")&&(o=o.substring(7)),e&&(await xx(a),await xx(n)),await Fs.registerFileURL(a,vd(o),zW.HTTP,!1),await ed.query(`CREATE OR REPLACE VIEW "${t}"."${i}" AS (SELECT * FROM read_parquet('${a}'));`)}}cse()}catch(t){throw fse(t),t}}async function VW(r){return Fs||await hL(),await BG(hse),await ed.query(r).then(Qne)}const mYe=Tf(!0),yYe=Tf("");function dse(){const{subscribe:r,update:e}=Tf([]),t=new Map,n=i=>{e(a=>a.filter(o=>o.id!==i))};return{subscribe:r,add:(i,a=2e3)=>{if(i.id=i.id??Math.random().toString(),e(o=>{const s=o.find(l=>l.id===i.id);return s?(Object.assign(s,i),t.has(i.id)&&(clearTimeout(t.get(i.id)),t.delete(i.id))):o.push(i),o}),a){const o=setTimeout(()=>{n(i.id),t.delete(i.id)},a);t.set(i.id,o)}},dismiss:i=>{n(i),t.has(i)&&(clearTimeout(t.get(i)),t.delete[i])}}}const pse=dse(),AP=r=>{let e;return r.subscribe(t=>e=t)(),e},UW=(r,e,t)=>{const n=(t==null?void 0:t.serialize)??JSON.stringify,i=(t==null?void 0:t.deserialize)??JSON.parse,a=Tf(i(localStorage.getItem(r))??e),{subscribe:o,set:s}=a,l=u=>{typeof u>"u"||u===null?localStorage.removeItem(r):localStorage.setItem(r,n(u))};return l(AP(a)),{subscribe:o,set:u=>{s(u),l(u)},update:u=>{const c=u(AP(a));s(c),l(c)}}},bYe=UW("showQueries",qne),gse="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let vse=(r=21)=>{let e="",t=crypto.getRandomValues(new Uint8Array(r));for(;r--;)e+=gse[t[r]&63];return e};const mse={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var xP={};const hb=()=>{if(typeof process<"u")return!!(xP.EVIDENCE_DEBUG||xP.VITE_PUBLIC_EVIDENCE_DEBUG);if(typeof mse<"u")return!1};class Y0{constructor(e,t){e&&(this.table=String(e)),t&&(this.column=t)}get columns(){return this.column?[this.column]:[]}toString(){const{table:e,column:t}=this;if(t){const n=t.startsWith("*")?t:`"${t}"`;return`${e?`${DP(e)}.`:""}${n}`}else return e?DP(e):"NULL"}}function DP(r){return r.split(".").map(t=>`"${t}"`).join(".")}function yse(r,e){return r instanceof Y0&&r.column===e}function zc(r){return typeof r=="string"?_se(r):r}function Dx(r){return typeof r=="string"?bse(r):r}function bse(r){return new Y0(r)}function _se(r,e=null){return arguments.length===1&&(e=r,r=null),new Y0(r,e)}function dL(r){switch(typeof r){case"boolean":return r?"TRUE":"FALSE";case"string":return`'${r.replace("'","''")}'`;case"number":return Number.isFinite(r)?String(r):"NULL";default:if(r==null)return"NULL";if(r instanceof Date){const e=+r;if(Number.isNaN(e))return"NULL";const t=r.getUTCFullYear(),n=r.getUTCMonth(),i=r.getUTCDate();return e===Date.UTC(t,n,i)?`MAKE_DATE(${t}, ${n+1}, ${i})`:`EPOCH_MS(${e})`}else return r instanceof RegExp?`'${r.source}'`:String(r)}}const Z0=r=>typeof(r==null?void 0:r.addEventListener)=="function";function GW(r){return r instanceof NC}class NC{constructor(e,t,n){this._expr=Array.isArray(e)?e:[e],this._deps=t||[],this.annotate(n);const i=this._expr.filter(a=>Z0(a));i.length>0?(this._params=Array.from(new Set(i)),this._params.forEach(a=>{a.addEventListener("value",()=>{var o;return wse(this,(o=this.map)==null?void 0:o.get("value"))})})):this.addEventListener=void 0}get value(){return this}get columns(){const{_params:e,_deps:t}=this;if(e){const n=new Set(e.flatMap(i=>{var o;const a=(o=i.value)==null?void 0:o.columns;return Array.isArray(a)?a:[]}));if(n.size){const i=new Set(t);return n.forEach(a=>i.add(a)),Array.from(i)}}return t}get column(){return this._deps.length?this._deps[0]:this.columns[0]}annotate(...e){return Object.assign(this,...e)}toString(){return this._expr.map(e=>Z0(e)&&!GW(e)?dL(e.value):e).join("")}addEventListener(e,t){const n=this.map||(this.map=new Map);(n.get(e)||(n.set(e,new Set),n.get(e))).add(t)}}function wse(r,e){if(e!=null&&e.size)return Promise.allSettled(Array.from(e,t=>t(r)))}function HW(r,e){const t=[r[0]],n=new Set,i=e.length;for(let a=0,o=0;an.add(u)),t[o]+=typeof s=="string"?s:dL(s));const l=r[++a];Z0(t[o])?t[++o]=l:t[o]+=l}return{spans:t,cols:Array.from(n)}}function Fi(r,...e){const{spans:t,cols:n}=HW(r,e);return new NC(t,n)}function ST(r,e){return Array.from({length:r},()=>e)}class Ah extends NC{constructor(e,t,n,i,a="",o="",s=""){let l;if(i&&!(a||o||s))l=i?Fi`${t} OVER "${i}"`:Fi`${t} OVER ()`;else{const h=a&&o?" ":"",d=(a||o)&&s?" ":"";l=Fi`${t} OVER (${i?`"${i}" `:""}${a}${h}${o}${d}${s})`}n&&(l=Fi`(${l})::${n}`);const{_expr:c,_deps:f}=l;super(c,f),this.window=e,this.func=t,this.type=n,this.name=i,this.group=a,this.order=o,this.frame=s}get basis(){return this.column}get label(){const{func:e}=this;return e.label??e.toString()}over(e){const{window:t,func:n,type:i,group:a,order:o,frame:s}=this;return new Ah(t,n,i,e,a,o,s)}partitionby(...e){const t=e.flat().filter(c=>c).map(zc),n=Fi(["PARTITION BY ",ST(t.length-1,", "),""],...t),{window:i,func:a,type:o,name:s,order:l,frame:u}=this;return new Ah(i,a,o,s,n,l,u)}orderby(...e){const t=e.flat().filter(c=>c).map(zc),n=Fi(["ORDER BY ",ST(t.length-1,", "),""],...t),{window:i,func:a,type:o,name:s,group:l,frame:u}=this;return new Ah(i,a,o,s,l,n,u)}rows(e){const t=EP("ROWS",e),{window:n,func:i,type:a,name:o,group:s,order:l}=this;return new Ah(n,i,a,o,s,l,t)}range(e){const t=EP("RANGE",e),{window:n,func:i,type:a,name:o,group:s,order:l}=this;return new Ah(n,i,a,o,s,l,t)}}function EP(r,e){if(Z0(e)){const t=Fi`${e}`;return t.toString=()=>`${r} ${kP(e.value)}`,t}return`${r} ${kP(e)}`}function kP(r){const[e,t]=r,n=e===0?"CURRENT ROW":Number.isFinite(e)?`${Math.abs(e)} PRECEDING`:"UNBOUNDED PRECEDING",i=t===0?"CURRENT ROW":Number.isFinite(t)?`${Math.abs(t)} FOLLOWING`:"UNBOUNDED FOLLOWING";return`BETWEEN ${n} AND ${i}`}class m0 extends NC{constructor(e,t,n,i,a){t=(t||[]).map(zc);const{strings:o,exprs:s}=Sse(e,t,n,i,a),{spans:l,cols:u}=HW(o,s);super(l,u),this.aggregate=e,this.args=t,this.type=n,this.isDistinct=i,this.filter=a}get basis(){return this.column}get label(){const{aggregate:e,args:t,isDistinct:n}=this,i=n?"DISTINCT"+(t.length?" ":""):"",a=t.length?`(${i}${t.map(Cse).join(", ")})`:"";return`${e.toLowerCase()}${a}`}distinct(){const{aggregate:e,args:t,type:n,filter:i}=this;return new m0(e,t,n,!0,i)}where(e){const{aggregate:t,args:n,type:i,isDistinct:a}=this;return new m0(t,n,i,a,e)}window(){const{aggregate:e,args:t,type:n,isDistinct:i}=this,a=new m0(e,t,null,i);return new Ah(e,a,n)}partitionby(...e){return this.window().partitionby(...e)}orderby(...e){return this.window().orderby(...e)}rows(e){return this.window().rows(e)}range(e){return this.window().range(e)}}function Sse(r,e,t,n,i){const a=`)${t?`::${t}`:""}`;let o=[`${r}(${n?"DISTINCT ":""}`],s=[];return e.length?(o=o.concat([...ST(e.length-1,", "),`${a}${i?" FILTER (WHERE ":""}`,...i?[")"]:[]]),s=[...e,...i?[i]:[]]):o[0]+="*"+a,{exprs:s,strings:o}}function Cse(r){const e=dL(r);return e&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}function pv(r,e){return(...t)=>new m0(r,t,e)}const Ase=pv("COUNT","INTEGER"),xse=pv("AVG"),Dse=pv("MAX"),Ese=pv("MIN"),kse=pv("SUM","DOUBLE"),Tse=pv("MEDIAN");let hw=class Lp{static select(...e){return new Lp().select(...e)}static from(...e){return new Lp().from(...e)}static with(...e){return new Lp().with(...e)}static union(...e){return new Fh("UNION",e.flat())}static unionAll(...e){return new Fh("UNION ALL",e.flat())}static intersect(...e){return new Fh("INTERSECT",e.flat())}static except(...e){return new Fh("EXCEPT",e.flat())}static describe(e){const t=e.clone(),{clone:n,toString:i}=t;return Object.assign(t,{describe:!0,clone:()=>Lp.describe(n.call(t)),toString:()=>`DESCRIBE ${i.call(t)}`})}constructor(){this.query={with:[],select:[],from:[],where:[],groupby:[],having:[],window:[],qualify:[],orderby:[]},this.cteFor=null}clone(){const e=new Lp;return e.query={...this.query},e}with(...e){const{query:t}=this;if(e.length===0)return t.with;{const n=[],i=(a,o)=>{const s=o.clone();s.cteFor=this,n.push({as:a,query:s})};return e.flat().forEach(a=>{if(a!=null)if(a.as&&a.query)i(a.as,a.query);else for(const o in a)i(o,a[o])}),t.with=t.with.concat(n),this}}select(...e){const{query:t}=this;if(e.length===0)return t.select;{const n=[];for(const a of e.flat())if(a!=null)if(typeof a=="string")n.push({as:a,expr:zc(a)});else if(a instanceof Y0)n.push({as:a.column,expr:a});else if(Array.isArray(a))n.push({as:a[0],expr:a[1]});else for(const o in a)n.push({as:db(o),expr:zc(a[o])});const i=new Set(n.map(a=>a.as));return t.select=t.select.filter(a=>!i.has(a.as)).concat(n.filter(a=>a.expr)),this}}$select(...e){return this.query.select=[],this.select(...e)}distinct(e=!0){return this.query.distinct=!!e,this}from(...e){const{query:t}=this;if(e.length===0)return t.from;{const n=[];return e.flat().forEach(i=>{if(i!=null)if(typeof i=="string")n.push({as:i,from:Dx(i)});else if(i instanceof Y0)n.push({as:i.table,from:i});else if(Ex(i)||GW(i))n.push({from:i});else if(Array.isArray(i))n.push({as:db(i[0]),from:Dx(i[1])});else for(const a in i)n.push({as:db(a),from:Dx(i[a])})}),t.from=t.from.concat(n),this}}$from(...e){return this.query.from=[],this.from(...e)}sample(e,t){const{query:n}=this;if(arguments.length===0)return n.sample;{let i=e;return typeof e=="number"&&(i=e>0&&e<1?{perc:100*e,method:t}:{rows:Math.round(e),method:t}),n.sample=i,this}}where(...e){const{query:t}=this;return e.length===0?t.where:(t.where=t.where.concat(e.flat().filter(n=>n)),this)}$where(...e){return this.query.where=[],this.where(...e)}groupby(...e){const{query:t}=this;return e.length===0?t.groupby:(t.groupby=t.groupby.concat(e.flat().filter(n=>n).map(zc)),this)}$groupby(...e){return this.query.groupby=[],this.groupby(...e)}having(...e){const{query:t}=this;return e.length===0?t.having:(t.having=t.having.concat(e.flat().filter(n=>n)),this)}window(...e){const{query:t}=this;if(e.length===0)return t.window;{const n=[];return e.flat().forEach(i=>{if(i!=null)for(const a in i)n.push({as:db(a),expr:i[a]})}),t.window=t.window.concat(n),this}}qualify(...e){const{query:t}=this;return e.length===0?t.qualify:(t.qualify=t.qualify.concat(e.flat().filter(n=>n)),this)}orderby(...e){const{query:t}=this;return e.length===0?t.orderby:(t.orderby=t.orderby.concat(e.flat().filter(n=>n).map(zc)),this)}limit(e){const{query:t}=this;return arguments.length===0?t.limit:(t.limit=Number.isFinite(e)?e:void 0,this)}offset(e){const{query:t}=this;return arguments.length===0?t.offset:(t.offset=Number.isFinite(e)?e:void 0,this)}get subqueries(){const{query:e,cteFor:t}=this,n=((t==null?void 0:t.query)||e).with,i=n==null?void 0:n.reduce((o,{as:s,query:l})=>(o[s]=l,o),{}),a=[];return e.from.forEach(({from:o})=>{if(Ex(o))a.push(o);else if(i[o.table]){const s=i[o.table];a.push(s)}}),a}toString(){const{with:e,select:t,distinct:n,from:i,sample:a,where:o,groupby:s,having:l,window:u,qualify:c,orderby:f,limit:h,offset:d}=this.query,p=[];if(e.length){const v=e.map(({as:m,query:y})=>`"${m}" AS (${y})`);p.push(`WITH ${v.join(", ")}`)}const g=t.map(({as:v,expr:m})=>yse(m,v)&&!m.table?`${m}`:`${m} AS "${v}"`);if(p.push(`SELECT${n?" DISTINCT":""} ${g.join(", ")}`),i.length){const v=i.map(({as:m,from:y})=>{const b=Ex(y)?`(${y})`:`${y}`;return!m||m===y.table?b:`${b} AS "${m}"`});p.push(`FROM ${v.join(", ")}`)}if(o.length){const v=o.map(String).filter(m=>m).join(" AND ");v&&p.push(`WHERE ${v}`)}if(a){const{rows:v,perc:m,method:y,seed:b}=a,_=v?`${v} ROWS`:`${m} PERCENT`,w=y?` (${y}${b!=null?`, ${b}`:""})`:"";p.push(`USING SAMPLE ${_}${w}`)}if(s.length&&p.push(`GROUP BY ${s.join(", ")}`),l.length){const v=l.map(String).filter(m=>m).join(" AND ");v&&p.push(`HAVING ${v}`)}if(u.length){const v=u.map(({as:m,expr:y})=>`"${m}" AS (${y})`);p.push(`WINDOW ${v.join(", ")}`)}if(c.length){const v=c.map(String).filter(m=>m).join(" AND ");v&&p.push(`QUALIFY ${v}`)}return f.length&&p.push(`ORDER BY ${f.join(", ")}`),Number.isFinite(h)&&p.push(`LIMIT ${h}`),Number.isFinite(d)&&p.push(`OFFSET ${d}`),p.join(" ")}};class Fh{constructor(e,t){this.op=e,this.queries=t.map(n=>n.clone()),this.query={orderby:[]},this.cteFor=null}clone(){const e=new Fh(this.op,this.queries);return e.query={...this.query},e}orderby(...e){const{query:t}=this;return e.length===0?t.orderby:(t.orderby=t.orderby.concat(e.flat().filter(n=>n).map(zc)),this)}limit(e){const{query:t}=this;return arguments.length===0?t.limit:(t.limit=Number.isFinite(e)?e:void 0,this)}offset(e){const{query:t}=this;return arguments.length===0?t.offset:(t.offset=Number.isFinite(e)?e:void 0,this)}get subqueries(){const{queries:e,cteFor:t}=this;return t&&e.forEach(n=>n.cteFor=t),e}toString(){const{op:e,queries:t,query:{orderby:n,limit:i,offset:a}}=this,o=[t.join(` ${e} `)];return n.length&&o.push(`ORDER BY ${n.join(", ")}`),Number.isFinite(i)&&o.push(`LIMIT ${i}`),Number.isFinite(a)&&o.push(`OFFSET ${a}`),o.join(" ")}}function Ex(r){return r instanceof hw||r instanceof Fh}function db(r){return Mse(r)?r.slice(1,-1):r}function Mse(r){return r[0]==='"'&&r[r.length-1]==='"'}const kx=r=>{let e=null,t=null;const n=new Promise((o,s)=>{e=o,t=s});let i="init",a=null;if(!e||!t)throw new Error;return{promise:n,resolve:o=>{if(e)(i==="loading"||i==="init")&&(i="resolved",a=o,e(o),r==null||r());else throw new Error("SharedPromise encountered an error: res not defined")},reject:o=>{if(t)(i==="loading"||i==="init")&&(i="rejected",n.catch(()=>{}),t(o),r==null||r());else throw new Error("SharedPromise encountered an error: rej not defined")},get state(){return i},get value(){return a},start(){i="loading",r==null||r()}}},il=(r,e,t)=>{try{const n=typeof e=="function"?e():e;return n instanceof Promise?n.then(i=>r(i,!0)).catch(i=>{const a=i instanceof Error?i:new Error("Unknown Error",{cause:i});if(t)return t(a,!0);throw a}):r(n,!1)}catch(n){const i=n instanceof Error?n:new Error("Unknown Error",{cause:n});if(t)return t(i,!1);throw i}},TP=(r,e)=>{const t=e.reduce((n,i)=>n+Fse(i.column_type),e.length*4);return Math.abs(t*r)};function Ise(r){return r.startsWith("STRUCT")||r.endsWith("[]")}function Lse(r){return r.startsWith("DECIMAL")}function Fse(r){const e={string:30,number:12,boolean:4,date:48};if(Ise(r))return console.warn(`[!] Evidence does not support DuckDB Struct or Array +If you need to use one, convert it to JSON in your query, and then manually parse it in your project`),e.string;if(Lse(r))return e.number;switch(r){case"BOOLEAN":return e.boolean;case"BIGINT":case"DOUBLE":case"FLOAT":case"INTEGER":case"SMALLINT":case"TINYINT":case"UBIGINT":case"UINTEGER":case"USMALLINT":case"UTINYINT":case"HUGEINT":return e.number;case"UUID":case"VARCHAR":return e.string;case"DATE":case"TIMESTAMP":case"TIMESTAMP_S":case"TIMESTAMP_MS":case"TIMESTAMP_NS":case"TIMESTAMP WITH TIME ZONE":return e.date;case"INTERVAL":case"TIME":case"TIME WITH TIME ZONE":case"BLOB":case"BIT":return e.string;default:return console.error(`Column type ${r} is not supported`),e.string}}const Bse=/--([^']|'.*')+$/,Ose=/(\/\*.*\*\/)/g,Pse=r=>{const e=r.split(` +`);let t=!1;for(let n=e.length;n>0;n--){let i=e[n-1],a="";const o=Array.from(i.matchAll(Ose));for(const l of o){const u=i.slice(0,l.index),c=i.slice(l.index+l[0].length);i=`${u}${c}`}if(t&&i.includes("/*")){t=!1;const l=i.split("/*");i=l.slice(0,-1).join("/*"),a+="/*"+l.slice(-1)}if(i.trim().endsWith("*/")){t=!0;continue}const s=Bse.exec(i);if(s){const l=i.slice(0,s.index),u=l.trimEnd();if(u.endsWith(";")){const c=i.slice(s.index),f=l.slice(u.length,l.length);i=`${l.slice(0,-1+-1*(l.length-u.length))}${f}${c}`}}else if(i.trimEnd().endsWith(";")){const u=i.lastIndexOf(";");i=i.slice(0,u)+i.slice(u+1)}for(const l of o){const u=i.slice(0,l.index),c=i.slice(l.index);i=`${u}${l[0]}${c}`}if(i!==e[n-1]){e[n-1]=i+a;break}}return e.push(""),e.join(` +`)};var jh,sa,u1,Pc,c1,Da,f1,h1,d1,On,wc,gh,Ea,Ag,Du,SC,xg,qh,p1,Ho,CC,Un,Yh,Gn,Zh,ci,Dg,AC,Wo,xC,DC,g1,F3,B3,Eu,O3,Ka,Eg,kg,ks,ku,Rc,Sc,la,v1,Tg,EC,Mg,Nc,m1,kC;const ot=class ot{constructor(e,t,n={}){Nt(this,On);Nt(this,jh);Nt(this,sa,[]);Nt(this,u1,-1);Nt(this,Pc,0);Nt(this,c1,-1);Nt(this,Da,[]);Nt(this,f1);Nt(this,h1,-1);Nt(this,d1);Nt(this,Ea);Nt(this,Ag);Nt(this,Ho,-1);Nt(this,CC,()=>{this.lengthLoaded&&this.columnsLoaded?(Ir(this,Ho,TP(this.length,this.columns)),ee(this,Ho)>ee(ot,p1)&&ee(this,Nc).call(this,"highScore",ee(this,Ho))):Promise.allSettled([ee(this,Gn).promise,ee(this,ci).promise]).then(([e,t])=>{if(e.status==="rejected"||t.status==="rejected"){Ir(this,Ho,-1);return}if(!ee(this,Pc)||!ee(this,Da)){Ir(this,Ho,-1);return}Ir(this,Ho,TP(this.length,this.columns)),ee(this,Ho)>ee(ot,p1)&&ee(this,Nc).call(this,"highScore",ee(this,Ho))}).catch(e=>{console.error(`${this.id} | Failed to calculate Query score ${e}`)})});Nt(this,Un,kx(()=>this.publish(`data promise (${ee(this,Un).state})`)));Nt(this,Yh,()=>{var a;if(ee(this,Un).state!=="init")return ee(this,Un).promise;if(ee(this,On,wc))return ee(this,Ka).call(this,"data error","Refusing to execute data query, store has an error state"),ee(this,Un).promise;if(ee(this,Un).state!=="init"||this.opts.noResolve)return ee(this,Un).promise;ee(this,Un).start();const e=` +---- Data ${ee(this,ks)} ${ee(this,ku)} +${this.text.trim()} + `.trim()+` +`;ee(this,Eg).call(this,"data query text",` +`+e,"font-family: monospace;");const t=ee(this,la);ee(a=ot,SC).call(a,this);const n=performance.now();return il((o,s)=>{Ir(this,sa,o);const l=performance.now();return n-l>5e3&&(ee(this,Nc).call(this,"longRun",n-l),ee(this,Ka).call(this,"long-running",`Query took ${n-l}ms to execute`)),Ir(this,u1,l-n),ee(this,Zh).call(this),ee(this,Un).resolve(this),ee(this,Nc).call(this,"dataReady",void 0),s?ee(this,Un).promise:this},()=>t(e,`${ee(this,ks)}_data`),(o,s)=>(Ir(this,On,o,gh),ee(this,Un).reject(o),s?ee(this,Un).promise:this))});on(this,"fetch",()=>ee(this,Dg).call(this)instanceof Promise&&!this.opts.noResolve?Promise.allSettled([ee(this,Dg).call(this),ee(this,Yh).call(this)]).then(()=>this.value):(ee(this,Yh).call(this),this.value));on(this,"backgroundFetch",()=>{if(typeof window>"u"){ee(this,Ka).call(this,"background fetch skip","Did not execute backgroundFetch in SSR");return}ee(this,Ka).call(this,"background fetch","Executed backgroundFetch"),il(()=>{},async()=>(await new Promise(e=>setTimeout(e,0)),ee(this,la).call(this,`--data +${this.text.trim()}`,this.id)),()=>{})});Nt(this,Gn,kx(()=>this.publish(`length promise (${ee(this,Gn).state})`)));Nt(this,Zh,()=>{if(ee(this,sa)&&ee(this,Un).state==="resolved"&&ee(this,Gn).state==="init")return ee(this,Ka).call(this,"length inferred","Inferred length from already-resolved data promise",ee(this,sa)),Ir(this,Pc,ee(this,sa).length),ee(this,Gn).resolve(this),ee(this,Gn).promise;if(ee(this,On,wc))return ee(this,Ka).call(this,"length error","Refusing to execute length query, store has an error state",ee(this,On,wc)),ee(this,Gn).reject(ee(this,On,wc)),ee(this,Gn).value??ee(this,Gn).promise;if(ee(this,Gn).state!=="init"||this.opts.noResolve)return ee(this,Gn).promise;ee(this,Gn).start();const e=` +---- Length ${ee(this,ks)} (${ee(this,ku)}) +SELECT COUNT(*) as rowCount FROM (${this.text.trim()}) + `.trim()+` +`,t=ee(this,la);ee(this,Eg).call(this,"length query text",` +`+e,"font-family: monospace;");const n=performance.now();return il((a,o)=>{const s=performance.now();return Ir(this,c1,s-n),Ir(this,Pc,a[0].rowCount),ee(this,Gn).resolve(this),o?ee(this,Gn).promise:this},()=>t(e,`${ee(this,ks)}_length`),(a,o)=>(Ir(this,On,a,gh),ee(this,Gn).reject(a),o?ee(this,Gn).promise:this))});Nt(this,ci,kx(()=>this.publish(`columns promise (${ee(this,ci).state})`)));Nt(this,Dg,()=>{if(ee(this,On,wc))return ee(this,Ka).call(this,"cols query error","Refusing to execute columns query, store has an error state",ee(this,On,wc)),ee(this,ci).value??ee(this,ci).promise;if(ee(this,ci).state!=="init"||this.opts.noResolve)return ee(this,ci).promise;ee(this,ci).start();const e=` +---- Columns ${ee(this,ks)} (${ee(this,ku)}) +DESCRIBE ${this.text.trim()} + `.trim()+` +`;ee(this,Eg).call(this,"columns query text",` +`+e,"font-family: monospace;");const t=ee(this,la),n=performance.now();return il((a,o)=>{const s=performance.now();return Ir(this,h1,s-n),Ir(this,Da,a),ee(this,ci).resolve(this),Ir(this,f1,Object.fromEntries(a.map(l=>[l.column_name,void 0]))),o?ee(this,ci).promise:this},()=>t(e,`${ee(this,ks)}_columns`),(a,o)=>(Ir(this,On,a,gh),ee(this,ci).reject(a),o?ee(this,ci).promise:this))});Nt(this,AC,()=>new Proxy([],{getPrototypeOf:()=>Object.getPrototypeOf(ee(this,sa)),has:(t,n)=>n in ee(this,sa)||n in this,get:(t,n)=>{let i=n;if(typeof i=="string"&&/^[\d.]+$/.exec(i)&&(i=parseInt(i)),(typeof i=="number"||ot.ProxyFetchTriggers.includes(i.toString()))&&ee(this,Un).state==="init"&&(ee(this,Ka).call(this,"implicit fetch",`Implicit query fetch triggered by ${i.toString()}`),ee(this,Yh).call(this)),i==="length"&&ee(this,Zh).call(this),i==="constructor")return ee(this,sa).constructor;if(i==="toString")return ee(this,sa).toString.bind(ee(this,sa));const a=i in this?this:ee(this,sa)&&i in ee(this,sa)?ee(this,sa):null;if(a===null)return typeof i!="number"||i>ee(this,Pc)?void 0:ee(this,f1)??{};const o=a[i];return typeof o=="function"?o.bind(a):o}}));Nt(this,Ka,hb()?(e,...t)=>{const n=`${(performance.now()/1e3).toFixed(3)} | ${this.id} (${this.hash}) | ${e}`;console.groupCollapsed(n);for(const i of t)console.debug(typeof i=="function"?i():i);console.groupEnd()}:()=>{});Nt(this,Eg,hb()?(e,t,n)=>{const i=`${(performance.now()/1e3).toFixed(3)} | ${this.id} (${this.hash}) | ${e}`;console.groupCollapsed(i),console.debug(`%c${t}`,n),console.groupEnd()}:()=>{});Nt(this,ks);Nt(this,ku);Nt(this,Rc);Nt(this,la);on(this,"opts");Nt(this,v1);Nt(this,Tg,new Set);on(this,"subscribe",e=>(ee(this,Tg).add(e),e(ee(this,jh)),()=>ee(this,Tg).delete(e)));Nt(this,EC,0);on(this,"publish",e=>{if($O(this,EC)._++>1e5)throw new Error("Query published too many times.");ee(this,Ka).call(this,"publish",`Publishing triggered by ${e}`,this),ee(this,Tg).forEach(t=>t(ee(this,jh)))});Nt(this,Mg,{dataReady:new Set,error:new Set,highScore:new Set,longRun:new Set});Nt(this,Nc,(e,t)=>{ee(this,Mg)[e].forEach(n=>n(t,e))});on(this,"on",(e,t)=>{ee(this,Mg)[e].add(t)});on(this,"off",(e,t)=>{ee(this,Mg)[e].delete(t)});on(this,"addEventListener",this.on);on(this,"removeEventListener",this.off);on(this,"where",e=>ot.create(ee(this,Ea).clone().where(Fi`${e}`),ee(this,la),{knownColumns:ee(this,Da),noResolve:ee(this,Rc).noResolve}));on(this,"withOrdinal",e=>{const t=ee(this,Ea).clone();return t.select({ordinal:Fi`row_number() over (${e})`}),ot.create(t,ee(this,la),{...ee(this,On,Sc),knownColumns:ee(this,Da)})});on(this,"search",(e,t,n)=>{(typeof n>"u"||n<0||n>1)&&(n=1-1/e.length);const i=[...ee(this,Da),{column_name:"similarity",column_type:"INTEGER",nullable:"NO"}],a=ot.create,o=e.replaceAll("'","''"),l=(Array.isArray(t)?t:[t]).map(c=>{const f=Fi`CASE WHEN lower("${c.trim()}") = lower('${o}') THEN 2 ELSE 0 END`,h=Fi`jaccard(lower('${o}'), lower("${c}"))`,d=o.length>=1?Fi`CASE WHEN lower("${c.trim()}") LIKE lower('%${o.split(" ").join("%")}%') THEN 1 ELSE 0 END`:Fi`0`;return Fi`GREATEST((${f}), (${h}), (${d}))`}).join(",");return a(ee(this,Ea).clone().$select({similarity:Fi`GREATEST(${l})`},"*").where(Fi`"similarity" > ${n} `).orderby(Fi`"similarity" DESC`),ee(this,la),{knownColumns:i,...ee(this,On,Sc)})});on(this,"limit",e=>ot.create(ee(this,Ea).clone().limit(e),ee(this,la),{knownColumns:ee(this,Da),...ee(this,On,Sc)}));on(this,"offset",e=>ot.create(ee(this,Ea).clone().offset(e),ee(this,la),{knownColumns:ee(this,Da),...ee(this,On,Sc)}));on(this,"paginate",(e,t)=>ot.create(ee(this,Ea).clone().offset(e).limit(t),ee(this,la),{knownColumns:ee(this,Da),...ee(this,On,Sc)}));on(this,"groupBy",(e,t)=>{const n=ee(this,Ea).clone();return n.$select(e),t&&n.select({rows:Ase("*")}),n.$groupby(e),ot.create(n,ee(this,la),{knownColumns:ee(this,Da),...ee(this,On,Sc)})});on(this,"agg",e=>{var n;const t=ee(this,Ea).clone();for(const[i,a]of Object.entries(e)){if(!ee(n=ot,kC).call(n,i))throw new Error(`Unknown agg function: ${i}`);const o=ee(ot,m1)[i],s=Array.isArray(a)?a:[a];for(const l of s){const u=typeof l=="object"?l.as:`${i}_${l}`,c=typeof l=="object"?l.col:l;t.select({[u]:o(c)})}}return ot.create(t,ee(this,la),{knownColumns:ee(this,Da),...ee(this,On,Sc)})});var l;Ir(this,v1,(l=new Error().stack)==null?void 0:l.split(` +`).slice(2).map(u=>u.slice(7)).join(` +`));const{id:i,initialData:a=void 0,knownColumns:o=void 0,initialError:s=void 0}=n;if(this.opts=n,Ir(this,la,t),typeof e!="string"&&!(e instanceof hw)&&(console.warn(`Query ${i} has no query text`),n.noResolve=!0),ee(ot,kg)||console.warn("Directly using new Query() is not a recommended use-case. Please use Query.create()"),Ir(ot,kg,!1),Ir(this,jh,ee(this,AC).call(this)),Ir(this,Ag,(e==null?void 0:e.toString())??"SELECT 'Empty Query' WHERE 0"),Ir(this,ku,Uf(ee(this,Ag))),Ir(this,ks,i??ee(this,ku)),Ir(this,Rc,n),e&&typeof e!="string")Ir(this,Ea,e);else if(e){const u=new hw().from({[`inputQuery-${vse(2)}`]:Fi`(${Pse(e)})`}).select("*");Ir(this,Ea,u)}else{Ir(this,Ea,new hw),Ir(this,On,new Error("Refusing to create Query: No Query Text provided"),gh);return}if(s){Ir(this,On,s,gh);return}if(a)ee(this,Ka).call(this,"initial data","Created with initial data",a),il(u=>{Ir(this,sa,u),n.initialDataDirty?(this.publish("dataDirty"),ee(this,Yh).call(this)):(ee(this,Un).resolve(this),ee(this,Zh).call(this))},a,u=>{Ir(this,On,u,gh)});else if(n.noResolve)return ee(this,Un).start(),ee(this,Gn).start(),ee(this,ci).start(),this;if(o){if(!Array.isArray(o))throw new Error("Expected knownColumns to be an array",{cause:o});ee(this,Ka).call(this,"known columns","Created with known columns",o),Ir(this,Da,o),ee(this,ci).resolve(this)}else il(()=>{},ee(this,Dg).call(this),(u,c)=>{if(!c)throw u});il(()=>{},ee(this,Zh).call(this),(u,c)=>{if(!c)throw u}),n.autoScore&&ee(this,CC).call(this)}get value(){return ee(this,jh)}get dataLoaded(){return["resolved","rejected"].includes(ee(this,Un).state)}get dataLoading(){return ee(this,Un).state==="loading"}get dataQueryTime(){return ee(this,u1)}get length(){return ee(this,Pc)}get lengthLoaded(){return["resolved","rejected"].includes(ee(this,Gn).state)}get lengthLoading(){return ee(this,Gn).state==="loading"}get lengthQueryTime(){return ee(this,c1)}get columns(){return ee(this,Da)}get columnsLoaded(){return["resolved","rejected"].includes(ee(this,ci).state)}get columnsLoading(){return ee(this,ci).state==="loading"}get columnsQueryTime(){return ee(this,h1)}get ready(){return ee(this,Gn).state==="resolved"&&ee(this,ci).state==="resolved"&&ee(this,Un).state==="resolved"}get loading(){return ee(this,Gn).state==="loading"||ee(this,ci).state==="loading"||ee(this,Un).state==="loading"}get error(){return ee(this,On,wc)}get originalText(){return ee(this,Ag)}get text(){var e;return((e=ee(this,Ea))==null?void 0:e.toString())??"SELECT 'Empty Query' WHERE 0"}static get queriesInFlight(){return ee(ot,Du).size>0}static resetInFlightQueries(){Ir(ot,Du,new Set)}static addEventListener(e,t){ee(this,xg)[e].add(t)}static removeEventListener(e,t){ee(this,xg)[e].delete(t)}get score(){return ee(this,Ho)}get isQuery(){return!0}static[Symbol.hasInstance](e){return ot.isQuery(e)}static get ProxyFetchTriggers(){return["at"]}static get cacheSize(){return ee(this,Wo).size}get id(){return ee(this,ks)}get hash(){return ee(this,ku)}get createdStack(){return ee(this,v1)}};jh=new WeakMap,sa=new WeakMap,u1=new WeakMap,Pc=new WeakMap,c1=new WeakMap,Da=new WeakMap,f1=new WeakMap,h1=new WeakMap,d1=new WeakMap,On=new WeakSet,wc=function(){return ee(this,d1)},gh=function(e){e&&(console.error(`${this.id} | Error in Query!`,e==null?void 0:e.message),ee(this,Nc).call(this,"error",e),Ir(this,d1,e))},Ea=new WeakMap,Ag=new WeakMap,Du=new WeakMap,SC=new WeakMap,xg=new WeakMap,qh=new WeakMap,p1=new WeakMap,Ho=new WeakMap,CC=new WeakMap,Un=new WeakMap,Yh=new WeakMap,Gn=new WeakMap,Zh=new WeakMap,ci=new WeakMap,Dg=new WeakMap,AC=new WeakMap,Wo=new WeakMap,xC=new WeakMap,DC=new WeakMap,g1=new WeakMap,F3=new WeakMap,B3=new WeakMap,Eu=new WeakMap,O3=new WeakMap,Ka=new WeakMap,Eg=new WeakMap,kg=new WeakMap,ks=new WeakMap,ku=new WeakMap,Rc=new WeakMap,Sc=function(){return{autoScore:ee(this,Rc).autoScore,noResolve:ee(this,Rc).noResolve,disableCache:ee(this,Rc).disableCache}},la=new WeakMap,v1=new WeakMap,Tg=new WeakMap,EC=new WeakMap,Mg=new WeakMap,Nc=new WeakMap,m1=new WeakMap,kC=new WeakMap,Nt(ot,Du,new Set),Nt(ot,SC,e=>{var t;ee(ot,Du).size===0&&ee(t=ot,qh).call(t,"inFlightQueryStart",void 0),ee(ot,Du).add(e),ee(e,Un).promise.finally(()=>{var n;ee(ot,Du).delete(e),ee(ot,Du).size===0&&ee(n=ot,qh).call(n,"inFlightQueryEnd",void 0)})}),Nt(ot,xg,{inFlightQueryStart:new Set,inFlightQueryEnd:new Set,queryCreated:new Set,cacheCleared:new Set}),Nt(ot,qh,(e,t)=>{ee(ot,xg)[e].forEach(n=>n(t,e))}),Nt(ot,p1,10*1024*1024),on(ot,"isQuery",e=>typeof e!="object"||!e?!1:"isQuery"in e&&e.isQuery===!0),on(ot,"CacheMaxScore",5*10*1024),Nt(ot,Wo,new Map),on(ot,"emptyCache",()=>{var e;ee(ot,Wo).clear(),ee(e=ot,qh).call(e,"cacheCleared",void 0)}),Nt(ot,xC,e=>{var t;ee(ot,Wo).set(e.hash,{query:e,added:Date.now()}),ee(t=ot,Eu).call(t,"cache",`Added to cache: ${e.hash}`,{cacheSize:ee(ot,Wo).size,cacheScore:Array.from(ee(ot,Wo).values()).reduce((n,i)=>n+i.query.score,0)})}),Nt(ot,DC,e=>{const t=ee(ot,Wo).get(e);return t?t.query:null}),Nt(ot,g1,()=>{let e=Array.from(ee(ot,Wo).values()).reduce((n,i)=>n+i.query.score,0);const t=Array.from(ee(ot,Wo).values()).sort((n,i)=>n.added-i.added);for(;e>ot.CacheMaxScore;){const n=t.shift();if(!n)break;ee(ot,Wo).delete(n.query.hash),e-=n.query.score}}),on(ot,"createReactive",(e,t,n)=>{const{loadGracePeriod:i=250,callback:a=()=>{},execFn:o}=e,s=ot.create;let l=n,u=0,c;const f=(d,p)=>{var b;if(!l)throw new Error;u+=1;const g=u;ee(b=ot,Eu).call(b,`${l.id} (${Uf(d)}) | Reactive Updating`,d,{changeIdx:u,targetChangeIdx:g,hash:Uf(d)},{initialOpts:t,newOpts:p});const v=ot.isQuery(d)?d:s(d,o,Object.assign({},t,{initialData:void 0,initialError:void 0},p)),m=v.fetch();let y=m;m instanceof Promise&&(y=Promise.race([new Promise(_=>setTimeout(_,i)),v.fetch()])),il(()=>{var _;if(u!==g){ee(_=ot,Eu).call(_,"changeIdx does not match, results are discarded");return}c==null||c(),l=v.value,c=l.subscribe(a)},y,_=>{throw console.warn(`Error while attempting to update reactive query: ${_.message}`),_})};function h(){t={...t,initialData:void 0,initialError:void 0}}return(d,p)=>{if(l){il(()=>{},f(d,p),v=>{console.warn(`Error while attempting to update reactive query: ${v.message}`)});return}l=s(d,o,Object.assign({},t,p));const g=l.fetch();il(h,g),c=l.subscribe(a),a(l)}}),Nt(ot,F3,!1),Nt(ot,B3,()=>{}),on(ot,"create",(e,t,n,i)=>{var l,u,c,f,h,d,p,g;const a=Uf(e);let o;if(typeof n=="string"?o={...i,id:n}:n?(o=n,o.id||(o.id=a+"-"+Math.random().toString(36).substring(0,4))):o={id:a+"-"+Math.random().toString(36).substring(0,4)},"autoScore"in o||(o.autoScore=!0),o.disableCache)ee(h=ot,Eu).call(h,`${o.id??"[query id missing]"} (${a}) | cache disabled`,`Cache is disabled for ${o.id??"[query id missing]"}`,{opts:o,query:e,hash:Uf(e)});else{const v=ee(l=ot,DC).call(l,a);if(ee(u=ot,g1).call(u),v)return ee(c=ot,Eu).call(c,`${o.id??"[query id missing]"} (${a}) | Using cached query`,{opts:o,hash:Uf(e)},e,v),v.value;ee(f=ot,Eu).call(f,`${o.id??"[query id missing]"} (${a}) | Cached query not found`,{opts:o,hash:Uf(e)},e)}Ir(ot,kg,!0);const s=new ot(e,t,o);return ee(d=ot,qh).call(d,"queryCreated",{raw:s,proxied:s.value}),o.disableCache||(ee(p=ot,xC).call(p,s),ee(g=ot,g1).call(g)),s.value}),Nt(ot,Eu,hb()?(e,...t)=>{const n=`${(performance.now()/1e3).toFixed(3)} | Query | ${e}`;console.groupCollapsed(n);for(const i of t)console.debug(typeof i=="function"?i():i);console.groupEnd()}:()=>{}),Nt(ot,O3,hb()?(e,t,n)=>{const i=`${(performance.now()/1e3).toFixed(3)} | Query | ${e}`;console.groupCollapsed(i),console.debug(`%c${t}`,n),console.groupEnd()}:()=>{}),Nt(ot,kg,!1),Nt(ot,m1,{sum:kse,avg:xse,min:Ese,max:Dse,median:Tse}),Nt(ot,kC,e=>e in ee(ot,m1));let Pl=ot;const Uf=(...r)=>(t=>{let n=0;for(let i=0;ir[t]===void 0?e:e+`${t}:${r[t]};`,"")}function _Ye(r){return r?!0:void 0}WW({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function wYe(r){if(r!==null)return""}function LP(r){function e(t){return t(r),()=>{}}return{subscribe:e}}function SYe(r){if(!Nse)return null;const e=document.querySelector(`[data-melt-id="${r}"]`);return pL(e)?e:null}const pb=r=>new Proxy(r,{get(e,t,n){return Reflect.get(e,t,n)},ownKeys(e){return Reflect.ownKeys(e).filter(t=>t!=="action")}}),FP=r=>typeof r=="function";$W("empty");function $W(r,e){const{stores:t,action:n,returned:i}=e??{},a=(()=>{if(t&&i)return ml(t,s=>{const l=i(s);if(FP(l)){const u=(...c)=>pb({...l(...c),[`data-melt-${r}`]:"",action:n??kc});return u.action=n??kc,u}return pb({...l,[`data-melt-${r}`]:"",action:n??kc})});{const s=i,l=s==null?void 0:s();if(FP(l)){const u=(...c)=>pb({...l(...c),[`data-melt-${r}`]:"",action:n??kc});return u.action=n??kc,LP(u)}return LP(pb({...l,[`data-melt-${r}`]:"",action:n??kc}))}})(),o=n??(()=>{});return o.subscribe=a.subscribe,o}function Rse(r){const e=a=>a?`${r}-${a}`:r,t=a=>`data-melt-${r}${a?`-${a}`:""}`,n=a=>`[data-melt-${r}${a?`-${a}`:""}]`;return{name:e,attribute:t,selector:n,getEl:a=>document.querySelector(n(a))}}const Nse=typeof document<"u",zse=r=>typeof r=="function";function CYe(r){return r instanceof Element}function pL(r){return r instanceof HTMLElement}function AYe(r){return r instanceof HTMLInputElement}function xYe(r){return r instanceof HTMLLabelElement}function DYe(r){return r instanceof HTMLButtonElement}function EYe(r){const e=r.getAttribute("aria-disabled"),t=r.getAttribute("disabled"),n=r.hasAttribute("data-disabled");return!!(e==="true"||t!==null||n)}function Vse(r){return r!==null&&typeof r=="object"}function jW(r){return Vse(r)&&"subscribe"in r}function Use(...r){return(...e)=>{for(const t of r)typeof t=="function"&&t(...e)}}function kc(){}function qW(r,e,t,n){const i=Array.isArray(e)?e:[e];return i.forEach(a=>r.addEventListener(a,t,n)),()=>{i.forEach(a=>r.removeEventListener(a,t,n))}}function kYe(r,e,t,n){const i=Array.isArray(e)?e:[e];if(typeof t=="function"){const a=Hse(o=>t(o));return i.forEach(o=>r.addEventListener(o,a,n)),()=>{i.forEach(o=>r.removeEventListener(o,a,n))}}return()=>void 0}function Gse(r){const e=r.currentTarget;if(!pL(e))return null;const t=new CustomEvent(`m-${r.type}`,{detail:{originalEvent:r},cancelable:!0});return e.dispatchEvent(t),t}function Hse(r){return e=>{const t=Gse(e);if(!(t!=null&&t.defaultPrevented))return r(e)}}const TYe=r=>{try{U0(r)}catch{return r}},Wse=r=>{try{IC(r)}catch{return r}};function YW(r,...e){const t={};for(const n of Object.keys(r))e.includes(n)||(t[n]=r[n]);return t}function MYe(r,e,t){return Object.fromEntries(Object.entries(r).filter(([n,i])=>!y0(i,e)))}function $se(r){const e={};for(const t in r){const n=r[t];n!==void 0&&(e[t]=n)}return e}function TS(r){return{...r,get:()=>MC(r)}}TS.writable=function(r){const e=Tf(r);let t=r;return{subscribe:e.subscribe,set(n){e.set(n),t=n},update(n){const i=n(t);e.set(i),t=i},get(){return t}}};TS.derived=function(r,e){const t=new Map,n=()=>{const a=Array.isArray(r)?r.map(o=>o.get()):r.get();return e(a)};return{get:n,subscribe:a=>{const o=[];return(Array.isArray(r)?r:[r]).forEach(l=>{o.push(l.subscribe(()=>{a(n())}))}),a(n()),t.set(a,o),()=>{const l=t.get(a);if(l)for(const u of l)u();t.delete(a)}}}};let jse="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",qse=(r=21)=>{let e="",t=r;for(;t--;)e+=jse[Math.random()*64|0];return e};const Ou={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"},Yse=[Ou.ARROW_DOWN,Ou.PAGE_UP,Ou.HOME],Zse=[Ou.ARROW_UP,Ou.PAGE_DOWN,Ou.END],IYe=[...Yse,...Zse],LYe=[Ou.ENTER,Ou.SPACE];function Kse(r,e){let t;const n=ml(r,a=>{t==null||t(),t=e(a)}).subscribe(kc),i=()=>{n(),t==null||t()};return Wse(i),i}lo(void 0,r=>{function e(n){r(n),r(void 0)}return qW(document,"pointerup",e,{passive:!1,capture:!0})});const Xse=lo(void 0,r=>{function e(n){n&&n.key===Ou.ESCAPE&&r(n),r(void 0)}return qW(document,"keydown",e,{passive:!1})}),FYe=(r,e={})=>{let t=kc;function n(i={}){t();const a={enabled:!0,...i},o=jW(a.enabled)?a.enabled:lo(a.enabled);t=Use(Xse.subscribe(s=>{var u;if(!s||!MC(o))return;const l=s.target;if(!(!pL(l)||l.closest("[data-escapee]")!==r)){if(s.preventDefault(),a.ignore){if(zse(a.ignore)){if(a.ignore(s))return}else if(Array.isArray(a.ignore)&&a.ignore.length>0&&a.ignore.some(c=>c&&l===c))return}(u=a.handler)==null||u.call(a,s)}}),Kse(o,s=>{s?r.dataset.escapee="":delete r.dataset.escapee}))}return n(e),{update:n,destroy(){r.removeAttribute("data-escapee"),t()}}};function Qse(r){const e={};return Object.keys(r).forEach(t=>{const n=t,i=r[n];jW(i)?e[n]=TS(i):e[n]=TS(lo(i))}),e}const Jse={prefix:"",disabled:lo(!1),required:lo(!1),name:lo(void 0)};function BYe(r){const e={...Jse,...$se(r)},{name:t}=Rse(e.prefix),{value:n,name:i,disabled:a,required:o}=Qse(YW(e,"prefix")),s=i;return $W(t("hidden-input"),{stores:[n,s,a,o],returned:([u,c,f,h])=>({name:c,value:u==null?void 0:u.toString(),"aria-hidden":"true",hidden:!0,disabled:f,required:h,tabIndex:-1,style:WW({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"})}),action:u=>({destroy:n.subscribe(f=>{u.value=f,u.dispatchEvent(new Event("change",{bubbles:!0}))})})})}const ele={isDateDisabled:void 0,isDateUnavailable:void 0,value:void 0,preventDeselect:!1,numberOfMonths:1,pagedNavigation:!1,weekStartsOn:0,fixedWeeks:!1,calendarLabel:"Event Date",locale:"en",minValue:void 0,maxValue:void 0,disabled:!1,readonly:!1,weekdayFormat:"narrow"};({...YW(ele,"isDateDisabled","isDateUnavailable","value","locale","disabled","readonly","minValue","maxValue","weekdayFormat")});function ZW(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e{const e=ile(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:o=>{const s=o.split(gL);return s[0]===""&&s.length!==1&&s.shift(),KW(s,e)||nle(o)},getConflictingClassGroupIds:(o,s)=>{const l=t[o]||[];return s&&n[o]?[...l,...n[o]]:l}}},KW=(r,e)=>{var o;if(r.length===0)return e.classGroupId;const t=r[0],n=e.nextPart.get(t),i=n?KW(r.slice(1),n):void 0;if(i)return i;if(e.validators.length===0)return;const a=r.join(gL);return(o=e.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},BP=/^\[(.+)\]$/,nle=r=>{if(BP.test(r)){const e=BP.exec(r)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},ile=r=>{const{theme:e,prefix:t}=r,n={nextPart:new Map,validators:[]};return ole(Object.entries(r.classGroups),t).forEach(([a,o])=>{CT(o,n,a,e)}),n},CT=(r,e,t,n)=>{r.forEach(i=>{if(typeof i=="string"){const a=i===""?e:OP(e,i);a.classGroupId=t;return}if(typeof i=="function"){if(ale(i)){CT(i(n),e,t,n);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([a,o])=>{CT(o,OP(e,a),t,n)})})},OP=(r,e)=>{let t=r;return e.split(gL).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},ale=r=>r.isThemeGetter,ole=(r,e)=>e?r.map(([t,n])=>{const i=n.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[e+o,s])):a);return[t,i]}):r,sle=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,n=new Map;const i=(a,o)=>{t.set(a,o),e++,e>r&&(e=0,n=t,t=new Map)};return{get(a){let o=t.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return i(a,o),o},set(a,o){t.has(a)?t.set(a,o):i(a,o)}}},XW="!",lle=r=>{const{separator:e,experimentalParseClassName:t}=r,n=e.length===1,i=e[0],a=e.length,o=s=>{const l=[];let u=0,c=0,f;for(let v=0;vc?f-c:void 0;return{modifiers:l,hasImportantModifier:d,baseClassName:p,maybePostfixModifierPosition:g}};return t?s=>t({className:s,parseClassName:o}):o},ule=r=>{if(r.length<=1)return r;const e=[];let t=[];return r.forEach(n=>{n[0]==="["?(e.push(...t.sort(),n),t=[]):t.push(n)}),e.push(...t.sort()),e},cle=r=>({cache:sle(r.cacheSize),parseClassName:lle(r),...rle(r)}),fle=/\s+/,hle=(r,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:i}=e,a=[],o=r.trim().split(fle);let s="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:d}=t(u);let p=!!d,g=n(p?h.substring(0,d):h);if(!g){if(!p){s=u+(s.length>0?" "+s:s);continue}if(g=n(h),!g){s=u+(s.length>0?" "+s:s);continue}p=!1}const v=ule(c).join(":"),m=f?v+XW:v,y=m+g;if(a.includes(y))continue;a.push(y);const b=i(g,p);for(let _=0;_0?" "+s:s)}return s};function dle(){let r=0,e,t,n="";for(;r{if(typeof r=="string")return r;let e,t="";for(let n=0;nf(c),r());return t=cle(u),n=t.cache.get,i=t.cache.set,a=s,s(l)}function s(l){const u=n(l);if(u)return u;const c=hle(l,t);return i(l,c),c}return function(){return a(dle.apply(null,arguments))}}const Ln=r=>{const e=t=>t[r]||[];return e.isThemeGetter=!0,e},JW=/^\[(?:([a-z-]+):)?(.+)\]$/i,gle=/^\d+\/\d+$/,vle=new Set(["px","full","screen"]),mle=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yle=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ble=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_le=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wle=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cu=r=>ag(r)||vle.has(r)||gle.test(r),lc=r=>vv(r,"length",Tle),ag=r=>!!r&&!Number.isNaN(Number(r)),Tx=r=>vv(r,"number",ag),Xv=r=>!!r&&Number.isInteger(Number(r)),Sle=r=>r.endsWith("%")&&ag(r.slice(0,-1)),Cr=r=>JW.test(r),uc=r=>mle.test(r),Cle=new Set(["length","size","percentage"]),Ale=r=>vv(r,Cle,e$),xle=r=>vv(r,"position",e$),Dle=new Set(["image","url"]),Ele=r=>vv(r,Dle,Ile),kle=r=>vv(r,"",Mle),Qv=()=>!0,vv=(r,e,t)=>{const n=JW.exec(r);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):t(n[2]):!1},Tle=r=>yle.test(r)&&!ble.test(r),e$=()=>!1,Mle=r=>_le.test(r),Ile=r=>wle.test(r),Lle=()=>{const r=Ln("colors"),e=Ln("spacing"),t=Ln("blur"),n=Ln("brightness"),i=Ln("borderColor"),a=Ln("borderRadius"),o=Ln("borderSpacing"),s=Ln("borderWidth"),l=Ln("contrast"),u=Ln("grayscale"),c=Ln("hueRotate"),f=Ln("invert"),h=Ln("gap"),d=Ln("gradientColorStops"),p=Ln("gradientColorStopPositions"),g=Ln("inset"),v=Ln("margin"),m=Ln("opacity"),y=Ln("padding"),b=Ln("saturate"),_=Ln("scale"),w=Ln("sepia"),S=Ln("skew"),C=Ln("space"),A=Ln("translate"),x=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto",Cr,e],k=()=>[Cr,e],M=()=>["",cu,lc],T=()=>["auto",ag,Cr],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",Cr],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[ag,Cr];return{cacheSize:500,separator:":",theme:{colors:[Qv],spacing:[cu,lc],blur:["none","",uc,Cr],brightness:R(),borderColor:[r],borderRadius:["none","","full",uc,Cr],borderSpacing:k(),borderWidth:M(),contrast:R(),grayscale:W(),hueRotate:R(),invert:W(),gap:k(),gradientColorStops:[r],gradientColorStopPositions:[Sle,lc],inset:E(),margin:E(),opacity:R(),padding:k(),saturate:R(),scale:R(),sepia:W(),skew:R(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",Cr]}],container:["container"],columns:[{columns:[uc]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...L(),Cr]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Xv,Cr]}],basis:[{basis:E()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Cr]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",Xv,Cr]}],"grid-cols":[{"grid-cols":[Qv]}],"col-start-end":[{col:["auto",{span:["full",Xv,Cr]},Cr]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[Qv]}],"row-start-end":[{row:["auto",{span:[Xv,Cr]},Cr]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Cr]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Cr]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Cr,e]}],"min-w":[{"min-w":[Cr,e,"min","max","fit"]}],"max-w":[{"max-w":[Cr,e,"none","full","min","max","fit","prose",{screen:[uc]},uc]}],h:[{h:[Cr,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Cr,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Cr,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Cr,e,"auto","min","max","fit"]}],"font-size":[{text:["base",uc,lc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Tx]}],"font-family":[{font:[Qv]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Cr]}],"line-clamp":[{"line-clamp":["none",ag,Tx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",cu,Cr]}],"list-image":[{"list-image":["none",Cr]}],"list-style-type":[{list:["none","disc","decimal",Cr]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[r]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[r]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",cu,lc]}],"underline-offset":[{"underline-offset":["auto",cu,Cr]}],"text-decoration-color":[{decoration:[r]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Cr]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Cr]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),xle]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ale]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ele]}],"bg-color":[{bg:[r]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[d]}],"gradient-via":[{via:[d]}],"gradient-to":[{to:[d]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:F()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[cu,Cr]}],"outline-w":[{outline:[cu,lc]}],"outline-color":[{outline:[r]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[r]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[cu,lc]}],"ring-offset-color":[{"ring-offset":[r]}],shadow:[{shadow:["","inner","none",uc,kle]}],"shadow-color":[{shadow:[Qv]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...N(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",uc,Cr]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Cr]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",Cr]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",Cr]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Xv,Cr]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Cr]}],accent:[{accent:["auto",r]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Cr]}],"caret-color":[{caret:[r]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Cr]}],fill:[{fill:[r,"none"]}],"stroke-w":[{stroke:[cu,lc,Tx]}],stroke:[{stroke:[r,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Fle=ple(Lle);function Ble(r){return r<.5?4*r*r*r:.5*Math.pow(2*r-2,3)+1}function zC(r){const e=r-1;return e*e*e+1}function MS(...r){return Fle(tle(r))}const OYe=(r,e={y:-8,x:0,start:.95,duration:150})=>{const t=getComputedStyle(r),n=t.transform==="none"?"":t.transform,i=(o,s,l)=>{const[u,c]=s,[f,h]=l;return(o-u)/(c-u)*(h-f)+f},a=o=>Object.keys(o).reduce((s,l)=>o[l]===void 0?s:s+`${l}:${o[l]};`,"");return{duration:e.duration??200,delay:0,css:o=>{const s=i(o,[0,1],[e.y??5,0]),l=i(o,[0,1],[e.x??0,0]),u=i(o,[0,1],[e.start??.95,1]);return a({transform:`${n} translate3d(${l}px, ${s}px, 0) scale(${u})`,opacity:o})},easing:zC}};function PYe(r,{delay:e=0,duration:t=400,easing:n=Ble,amount:i=5,opacity:a=0}={}){const o=getComputedStyle(r),s=+o.opacity,l=o.filter==="none"?"":o.filter,u=s*(1-a),[c,f]=sT(i);return{delay:e,duration:t,easing:n,css:(h,d)=>`opacity: ${s-u*d}; filter: ${l} blur(${d*c}${f});`}}function md(r,{delay:e=0,duration:t=400,easing:n=$ne}={}){const i=+getComputedStyle(r).opacity;return{delay:e,duration:t,easing:n,css:a=>`opacity: ${a*i}`}}function RYe(r,{delay:e=0,duration:t=400,easing:n=zC,x:i=0,y:a=0,opacity:o=0}={}){const s=getComputedStyle(r),l=+s.opacity,u=s.transform==="none"?"":s.transform,c=l*(1-o),[f,h]=sT(i),[d,p]=sT(a);return{delay:e,duration:t,easing:n,css:(g,v)=>` + transform: ${u} translate(${(1-g)*f}${h}, ${(1-g)*d}${p}); + opacity: ${l-c*v}`}}function IS(r,{delay:e=0,duration:t=400,easing:n=zC,axis:i="y"}={}){const a=getComputedStyle(r),o=+a.opacity,s=i==="y"?"height":"width",l=parseFloat(a[s]),u=i==="y"?["top","bottom"]:["left","right"],c=u.map(m=>`${m[0].toUpperCase()}${m.slice(1)}`),f=parseFloat(a[`padding${c[0]}`]),h=parseFloat(a[`padding${c[1]}`]),d=parseFloat(a[`margin${c[0]}`]),p=parseFloat(a[`margin${c[1]}`]),g=parseFloat(a[`border${c[0]}Width`]),v=parseFloat(a[`border${c[1]}Width`]);return{delay:e,duration:t,easing:n,css:m=>`overflow: hidden;opacity: ${Math.min(m*20,1)*o};${s}: ${m*l}px;padding-${u[0]}: ${m*f}px;padding-${u[1]}: ${m*h}px;margin-${u[0]}: ${m*d}px;margin-${u[1]}: ${m*p}px;border-${u[0]}-width: ${m*g}px;border-${u[1]}-width: ${m*v}px;`}}function NYe(r,{delay:e=0,duration:t=400,easing:n=zC,start:i=0,opacity:a=0}={}){const o=getComputedStyle(r),s=+o.opacity,l=o.transform==="none"?"":o.transform,u=1-i,c=s*(1-a);return{delay:e,duration:t,easing:n,css:(f,h)=>` + transform: ${l} scale(${1-u*h}); + opacity: ${s-c*h} + `}}function PP(r,e,t){const n=r.slice();return n[6]=e[t],n}function RP(r,e,t){const n=r.slice();return n[6]=e[t],n}function NP(r,e,t){const n=r.slice();return n[6]=e[t],n}function zP(r,e,t){const n=r.slice();return n[6]=e[t],n}function VP(r,e,t){const n=r.slice();return n[6]=e[t],n}function UP(r,e,t){const n=r.slice();return n[6]=e[t],n}function GP(r){let e,t;return{c(){e=zi("title"),t=dt(r[1])},l(n){e=Vi(n,"title",{});var i=ge(e);t=pt(i,r[1]),i.forEach(U)},m(n,i){le(n,e,i),X(e,t)},p(n,i){i&2&&Rt(t,n[1])},d(n){n&&U(e)}}}function HP(r){let e,t=[r[6]],n={};for(let i=0;i{e=En(En({},e),us(c)),t(3,a=Lg(e,i)),"src"in c&&t(4,o=c.src),"size"in c&&t(0,s=c.size),"theme"in c&&t(5,l=c.theme),"title"in c&&t(1,u=c.title)},r.$$.update=()=>{r.$$.dirty&48&&t(2,n=(o==null?void 0:o[l])??(o==null?void 0:o.default))},[s,u,n,a,o,l]}class Ao extends kr{constructor(e){super(),Tr(this,e,Ple,Ole,Mr,{src:4,size:0,theme:5,title:1})}}const zYe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor"}]}},VYe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor"}]}},UYe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor"}]}},GYe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:"currentColor"}]}},HYe={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:"currentColor"}]}},Rle={default:{a:{viewBox:"0 0 15 15",fill:"none"},path:[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2 2.5C2 2.22386 2.22386 2 2.5 2H5.5C5.77614 2 6 2.22386 6 2.5C6 2.77614 5.77614 3 5.5 3H3V5.5C3 5.77614 2.77614 6 2.5 6C2.22386 6 2 5.77614 2 5.5V2.5ZM9 2.5C9 2.22386 9.22386 2 9.5 2H12.5C12.7761 2 13 2.22386 13 2.5V5.5C13 5.77614 12.7761 6 12.5 6C12.2239 6 12 5.77614 12 5.5V3H9.5C9.22386 3 9 2.77614 9 2.5ZM2.5 9C2.77614 9 3 9.22386 3 9.5V12H5.5C5.77614 12 6 12.2239 6 12.5C6 12.7761 5.77614 13 5.5 13H2.5C2.22386 13 2 12.7761 2 12.5V9.5C2 9.22386 2.22386 9 2.5 9ZM12.5 9C12.7761 9 13 9.22386 13 9.5V12.5C13 12.7761 12.7761 13 12.5 13H9.5C9.22386 13 9 12.7761 9 12.5C9 12.2239 9.22386 12 9.5 12H12V9.5C12 9.22386 12.2239 9 12.5 9Z",fill:"currentColor"}]}};function Nle(r){let e,t='Loading...
',n;return{c(){e=oe("div"),e.innerHTML=t,this.h()},l(i){e=se(i,"DIV",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-nbneoa"&&(e.innerHTML=t),this.h()},h(){Y(e,"class","animate-pulse h-full w-full my-2")},m(i,a){le(i,e,a)},p:xe,i(i){i&&(n||Pd(()=>{n=Wne(e,md,{}),n.start()}))},o:xe,d(i){i&&U(e)}}}class t$ extends kr{constructor(e){super(),Tr(this,e,null,Nle,Mr,{})}}const zle={default:{a:{class:"icon icon-tabler icon-tabler-123",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 10l2 -2v8"},{d:"M9 8h3a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 0 -1 1v2a1 1 0 0 0 1 1h3"},{d:"M17 8h2.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-1.5h1.5a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1 -1.5 1.5h-2.5"}]}},Vle={default:{a:{class:"icon icon-tabler icon-tabler-abc",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 16v-6a2 2 0 1 1 4 0v6"},{d:"M3 13h4"},{d:"M10 8v6a2 2 0 1 0 4 0v-1a2 2 0 1 0 -4 0v1"},{d:"M20.732 12a2 2 0 0 0 -3.732 1v1a2 2 0 0 0 3.726 1.01"}]}},WYe={default:{a:{class:"icon icon-tabler icon-tabler-bug",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 9v-1a3 3 0 0 1 6 0v1"},{d:"M8 9h8a6 6 0 0 1 1 3v3a5 5 0 0 1 -10 0v-3a6 6 0 0 1 1 -3"},{d:"M3 13l4 0"},{d:"M17 13l4 0"},{d:"M12 20l0 -6"},{d:"M4 19l3.35 -2"},{d:"M20 19l-3.35 -2"},{d:"M4 7l3.75 2.4"},{d:"M20 7l-3.75 2.4"}]}},Ule={default:{a:{class:"icon icon-tabler icon-tabler-calendar",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12z"},{d:"M16 3v4"},{d:"M8 3v4"},{d:"M4 11h16"},{d:"M11 15h1"},{d:"M12 15v3"}]}},r$={default:{a:{class:"icon icon-tabler icon-tabler-chevron-down",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M6 9l6 6l6 -6"}]}},Gle={default:{a:{class:"icon icon-tabler icon-tabler-chevron-left",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M15 6l-6 6l6 6"}]}},n$={default:{a:{class:"icon icon-tabler icon-tabler-chevron-right",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 6l6 6l-6 6"}]}},Hle={default:{a:{class:"icon icon-tabler icon-tabler-chevron-up",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M6 15l6 -6l6 6"}]}},Wle={default:{a:{class:"icon icon-tabler icon-tabler-chevrons-left",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M11 7l-5 5l5 5"},{d:"M17 7l-5 5l5 5"}]}},$le={default:{a:{class:"icon icon-tabler icon-tabler-chevrons-right",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M7 7l5 5l-5 5"},{d:"M13 7l5 5l-5 5"}]}},$Ye={default:{a:{class:"icon icon-tabler icon-tabler-circle-check",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},{d:"M9 12l2 2l4 -4"}]},filled:{a:{class:"icon icon-tabler icon-tabler-circle-check-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z","stroke-width":"0",fill:"currentColor"}]}},jle={default:{a:{class:"icon icon-tabler icon-tabler-circle-half-2",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},{d:"M12 3v18"},{d:"M12 14l7 -7"},{d:"M12 19l8.5 -8.5"},{d:"M12 9l4.5 -4.5"}]}},jYe={default:{a:{class:"icon icon-tabler icon-tabler-circle-x",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},{d:"M10 10l4 4m0 -4l-4 4"}]},filled:{a:{class:"icon icon-tabler icon-tabler-circle-x-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-6.489 5.8a1 1 0 0 0 -1.218 1.567l1.292 1.293l-1.292 1.293l-.083 .094a1 1 0 0 0 1.497 1.32l1.293 -1.292l1.293 1.292l.094 .083a1 1 0 0 0 1.32 -1.497l-1.292 -1.293l1.292 -1.293l.083 -.094a1 1 0 0 0 -1.497 -1.32l-1.293 1.292l-1.293 -1.292l-.094 -.083z","stroke-width":"0",fill:"currentColor"}]}},qYe={default:{a:{class:"icon icon-tabler icon-tabler-clipboard",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"}]}},YYe={default:{a:{class:"icon icon-tabler icon-tabler-database",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 6m-8 0a8 3 0 1 0 16 0a8 3 0 1 0 -16 0"},{d:"M4 6v6a8 3 0 0 0 16 0v-6"},{d:"M4 12v6a8 3 0 0 0 16 0v-6"}]}},ZYe={default:{a:{class:"icon icon-tabler icon-tabler-device-floppy",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2"},{d:"M12 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"},{d:"M14 4l0 4l-6 0l0 -4"}]}},KYe={default:{a:{class:"icon icon-tabler icon-tabler-dots",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M5 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},{d:"M19 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"}]}},XYe={default:{a:{class:"icon icon-tabler icon-tabler-exclamation-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"},{d:"M12 9v4"},{d:"M12 16v.01"}]}},QYe={default:{a:{class:"icon icon-tabler icon-tabler-eye-off",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828"},{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87"},{d:"M3 3l18 18"}]}},JYe={default:{a:{class:"icon icon-tabler icon-tabler-eye",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0"},{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6"}]},filled:{a:{class:"icon icon-tabler icon-tabler-eye-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 4c4.29 0 7.863 2.429 10.665 7.154l.22 .379l.045 .1l.03 .083l.014 .055l.014 .082l.011 .1v.11l-.014 .111a.992 .992 0 0 1 -.026 .11l-.039 .108l-.036 .075l-.016 .03c-2.764 4.836 -6.3 7.38 -10.555 7.499l-.313 .004c-4.396 0 -8.037 -2.549 -10.868 -7.504a1 1 0 0 1 0 -.992c2.831 -4.955 6.472 -7.504 10.868 -7.504zm0 5a3 3 0 1 0 0 6a3 3 0 0 0 0 -6z","stroke-width":"0",fill:"currentColor"}]}},eZe={default:{a:{class:"icon icon-tabler icon-tabler-folder-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 19h-7a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v3.5"},{d:"M16 19h6"},{d:"M19 16v6"}]}},tZe={default:{a:{class:"icon icon-tabler icon-tabler-help-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},{d:"M12 16v.01"},{d:"M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483"}]},filled:{a:{class:"icon icon-tabler icon-tabler-help-circle-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 13a1 1 0 0 0 -.993 .883l-.007 .117l.007 .127a1 1 0 0 0 1.986 0l.007 -.117l-.007 -.127a1 1 0 0 0 -.993 -.883zm1.368 -6.673a2.98 2.98 0 0 0 -3.631 .728a1 1 0 0 0 1.44 1.383l.171 -.18a.98 .98 0 0 1 1.11 -.15a1 1 0 0 1 -.34 1.886l-.232 .012a1 1 0 0 0 .111 1.994a3 3 0 0 0 1.371 -5.673z","stroke-width":"0",fill:"currentColor"}]}},qle={default:{a:{class:"icon icon-tabler icon-tabler-info-circle",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},{d:"M12 9h.01"},{d:"M11 12h1v4h1"}]},filled:{a:{class:"icon icon-tabler icon-tabler-info-circle-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 2c5.523 0 10 4.477 10 10a10 10 0 0 1 -19.995 .324l-.005 -.324l.004 -.28c.148 -5.393 4.566 -9.72 9.996 -9.72zm0 9h-1l-.117 .007a1 1 0 0 0 0 1.986l.117 .007v3l.007 .117a1 1 0 0 0 .876 .876l.117 .007h1l.117 -.007a1 1 0 0 0 .876 -.876l.007 -.117l-.007 -.117a1 1 0 0 0 -.764 -.857l-.112 -.02l-.117 -.006v-3l-.007 -.117a1 1 0 0 0 -.876 -.876l-.117 -.007zm.01 -3l-.127 .007a1 1 0 0 0 0 1.986l.117 .007l.127 -.007a1 1 0 0 0 0 -1.986l-.117 -.007z","stroke-width":"0",fill:"currentColor"}]}},rZe={default:{a:{class:"icon icon-tabler icon-tabler-menu-2",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 6l16 0"},{d:"M4 12l16 0"},{d:"M4 18l16 0"}]}},nZe={default:{a:{class:"icon icon-tabler icon-tabler-moon",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z"}]},filled:{a:{class:"icon icon-tabler icon-tabler-moon-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 1.992a10 10 0 1 0 9.236 13.838c.341 -.82 -.476 -1.644 -1.298 -1.31a6.5 6.5 0 0 1 -6.864 -10.787l.077 -.08c.551 -.63 .113 -1.653 -.758 -1.653h-.266l-.068 -.006l-.06 -.002z","stroke-width":"0",fill:"currentColor"}]}},iZe={default:{a:{class:"icon icon-tabler icon-tabler-pencil",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 20h4l10.5 -10.5a1.5 1.5 0 0 0 -4 -4l-10.5 10.5v4"},{d:"M13.5 6.5l4 4"}]}},aZe={default:{a:{class:"icon icon-tabler icon-tabler-player-play",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M7 4v16l13 -8z"}]},filled:{a:{class:"icon icon-tabler icon-tabler-player-play-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z","stroke-width":"0",fill:"currentColor"}]}},oZe={default:{a:{class:"icon icon-tabler icon-tabler-plug",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9.785 6l8.215 8.215l-2.054 2.054a5.81 5.81 0 1 1 -8.215 -8.215l2.054 -2.054z"},{d:"M4 20l3.5 -3.5"},{d:"M15 4l-3.5 3.5"},{d:"M20 9l-3.5 3.5"}]}},Yle={default:{a:{class:"icon icon-tabler icon-tabler-search",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0"},{d:"M21 21l-6 -6"}]}},sZe={default:{a:{class:"icon icon-tabler icon-tabler-sun",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0"},{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7"}]},filled:{a:{class:"icon icon-tabler icon-tabler-sun-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M12 19a1 1 0 0 1 .993 .883l.007 .117v1a1 1 0 0 1 -1.993 .117l-.007 -.117v-1a1 1 0 0 1 1 -1z","stroke-width":"0",fill:"currentColor"},{d:"M18.313 16.91l.094 .083l.7 .7a1 1 0 0 1 -1.32 1.497l-.094 -.083l-.7 -.7a1 1 0 0 1 1.218 -1.567l.102 .07z","stroke-width":"0",fill:"currentColor"},{d:"M7.007 16.993a1 1 0 0 1 .083 1.32l-.083 .094l-.7 .7a1 1 0 0 1 -1.497 -1.32l.083 -.094l.7 -.7a1 1 0 0 1 1.414 0z","stroke-width":"0",fill:"currentColor"},{d:"M4 11a1 1 0 0 1 .117 1.993l-.117 .007h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z","stroke-width":"0",fill:"currentColor"},{d:"M21 11a1 1 0 0 1 .117 1.993l-.117 .007h-1a1 1 0 0 1 -.117 -1.993l.117 -.007h1z","stroke-width":"0",fill:"currentColor"},{d:"M6.213 4.81l.094 .083l.7 .7a1 1 0 0 1 -1.32 1.497l-.094 -.083l-.7 -.7a1 1 0 0 1 1.217 -1.567l.102 .07z","stroke-width":"0",fill:"currentColor"},{d:"M19.107 4.893a1 1 0 0 1 .083 1.32l-.083 .094l-.7 .7a1 1 0 0 1 -1.497 -1.32l.083 -.094l.7 -.7a1 1 0 0 1 1.414 0z","stroke-width":"0",fill:"currentColor"},{d:"M12 2a1 1 0 0 1 .993 .883l.007 .117v1a1 1 0 0 1 -1.993 .117l-.007 -.117v-1a1 1 0 0 1 1 -1z","stroke-width":"0",fill:"currentColor"},{d:"M12 7a5 5 0 1 1 -4.995 5.217l-.005 -.217l.005 -.217a5 5 0 0 1 4.995 -4.783z","stroke-width":"0",fill:"currentColor"}]}},lZe={default:{a:{class:"icon icon-tabler icon-tabler-table",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z"},{d:"M3 10h18"},{d:"M10 3v18"}]},filled:{a:{class:"icon icon-tabler icon-tabler-table-filled",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 11h4a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-2a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-6a1 1 0 0 1 1 -1z","stroke-width":"0",fill:"currentColor"},{d:"M21 12v6a3 3 0 0 1 -2.824 2.995l-.176 .005h-6a1 1 0 0 1 -1 -1v-8a1 1 0 0 1 1 -1h8a1 1 0 0 1 1 1z","stroke-width":"0",fill:"currentColor"},{d:"M18 3a3 3 0 0 1 2.995 2.824l.005 .176v2a1 1 0 0 1 -1 1h-8a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h6z","stroke-width":"0",fill:"currentColor"},{d:"M9 4v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a3 3 0 0 1 2.824 -2.995l.176 -.005h2a1 1 0 0 1 1 1z","stroke-width":"0",fill:"currentColor"}]}},Zle={default:{a:{class:"icon icon-tabler icon-tabler-x",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M18 6l-12 12"},{d:"M6 6l12 12"}]}};function Kle(r){let e,t,n,i,a,o,s,l,u,c,f;n=new Ao({props:{class:"w-6 h-6 ",src:Zle}});const h=r[4].default,d=Ui(h,r,r[3],null);return{c(){e=oe("dialog"),t=oe("button"),Ne(n.$$.fragment),i=Le(),a=oe("div"),d&&d.c(),this.h()},l(p){e=se(p,"DIALOG",{class:!0});var g=ge(e);t=se(g,"BUTTON",{class:!0});var v=ge(t);ze(n.$$.fragment,v),v.forEach(U),i=Fe(g),a=se(g,"DIV",{class:!0});var m=ge(a);d&&d.l(m),m.forEach(U),g.forEach(U),this.h()},h(){Y(t,"class","absolute top-4 right-[18.5px] hover:bg-base-200 rounded-lg p-1 focus:outline-none focus:ring-1 focus:ring-base-300"),Y(a,"class",o="py-2 px-6 "+(r[1]?"":"pt-6")),Y(e,"class",s="w-[90vw] rounded-lg fixed border border-base-300 text-base-content shadow-lg bg-base-100 "+(r[0]?"slideIn":"slideOut")+" svelte-t161xa")},m(p,g){le(p,e,g),X(e,t),Ve(n,t,null),X(e,i),X(e,a),d&&d.m(a,null),u=!0,c||(f=DG(l=r[2].call(null,e,r[0])),c=!0)},p(p,[g]){d&&d.p&&(!u||g&8)&&Gi(d,h,p,p[3],u?Wi(h,p[3],g,null):Hi(p[3]),null),(!u||g&2&&o!==(o="py-2 px-6 "+(p[1]?"":"pt-6")))&&Y(a,"class",o),(!u||g&1&&s!==(s="w-[90vw] rounded-lg fixed border border-base-300 text-base-content shadow-lg bg-base-100 "+(p[0]?"slideIn":"slideOut")+" svelte-t161xa"))&&Y(e,"class",s),l&&LC(l.update)&&g&1&&l.update.call(null,p[0])},i(p){u||(K(n.$$.fragment,p),K(d,p),u=!0)},o(p){re(n.$$.fragment,p),re(d,p),u=!1},d(p){p&&U(e),Ue(n),d&&d.d(p),c=!1,f()}}}function Xle(r,e,t){let{$$slots:n={},$$scope:i}=e,{open:a=!1}=e,{search:o=!1}=e;function s(l,u){u?l.showModal():l.close();function c(p){p.target===l&&t(0,a=!1)}function f(){t(0,a=!1)}function h(p){p.key==="Escape"&&t(0,a=!1)}l.addEventListener("keydown",h),l.addEventListener("click",c);const d=l.firstElementChild;return d.addEventListener("click",f),{update(p){p?(l.showModal(),document.body.style.overflow="hidden"):(l.addEventListener("animationend",()=>{a||l.close()}),document.body.style.overflow="")},destroy(){l.removeEventListener("keydown",h),l.removeEventListener("click",c),d.removeEventListener("click",f)}}}return r.$$set=l=>{"open"in l&&t(0,a=l.open),"search"in l&&t(1,o=l.search),"$$scope"in l&&t(3,i=l.$$scope)},[a,o,s,i,n]}class Qle extends kr{constructor(e){super(),Tr(this,e,Xle,Kle,Mr,{open:0,search:1})}}function Jle(r){return!r||!r[0]||!r.length}const eue=r=>({loaded:r&2}),ZP=r=>({loaded:r[1]}),tue=r=>({loaded:r&2}),KP=r=>({loaded:r[1]}),rue=r=>({loaded:r&2}),XP=r=>({loaded:r[1]}),nue=r=>({loaded:r&2}),QP=r=>({loaded:r[1]}),iue=r=>({loaded:r&1}),JP=r=>({loaded:r[0]}),aue=r=>({loaded:r&1}),e4=r=>({loaded:r[0]}),oue=r=>({loaded:r&1}),t4=r=>({loaded:r[0]});function sue(r){let e;const t=r[5].default,n=Ui(t,r,r[4],ZP);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&18)&&Gi(n,t,i,i[4],e?Wi(t,i[4],a,eue):Hi(i[4]),ZP)},i(i){e||(K(n,i),e=!0)},o(i){re(n,i),e=!1},d(i){n&&n.d(i)}}}function lue(r){let e;const t=r[5].empty,n=Ui(t,r,r[4],KP);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&18)&&Gi(n,t,i,i[4],e?Wi(t,i[4],a,tue):Hi(i[4]),KP)},i(i){e||(K(n,i),e=!0)},o(i){re(n,i),e=!1},d(i){n&&n.d(i)}}}function uue(r){let e;const t=r[5].error,n=Ui(t,r,r[4],XP);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&18)&&Gi(n,t,i,i[4],e?Wi(t,i[4],a,rue):Hi(i[4]),XP)},i(i){e||(K(n,i),e=!0)},o(i){re(n,i),e=!1},d(i){n&&n.d(i)}}}function cue(r){let e;const t=r[5].skeleton,n=Ui(t,r,r[4],QP),i=n||due();return{c(){i&&i.c()},l(a){i&&i.l(a)},m(a,o){i&&i.m(a,o),e=!0},p(a,o){n&&n.p&&(!e||o&18)&&Gi(n,t,a,a[4],e?Wi(t,a[4],o,nue):Hi(a[4]),QP)},i(a){e||(K(i,a),e=!0)},o(a){re(i,a),e=!1},d(a){i&&i.d(a)}}}function fue(r){let e,t,n,i,a;const o=[gue,pue],s=[];function l(u,c){return c&5&&(e=null),e==null&&(e=!!((Array.isArray(u[0])||!u[0])&&Jle(u[0])&&u[2].empty)),e?0:1}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Xe()},l(u){n.l(u),i=Xe()},m(u,c){s[t].m(u,c),le(u,i,c),a=!0},p(u,c){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Mt(),re(s[f],1,1,()=>{s[f]=null}),It(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),K(n,1),n.m(i.parentNode,i))},i(u){a||(K(n),a=!0)},o(u){re(n),a=!1},d(u){u&&U(i),s[t].d(u)}}}function hue(r){let e;const t=r[5].default,n=Ui(t,r,r[4],t4);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&17)&&Gi(n,t,i,i[4],e?Wi(t,i[4],a,oue):Hi(i[4]),t4)},i(i){e||(K(n,i),e=!0)},o(i){re(n,i),e=!1},d(i){n&&n.d(i)}}}function due(r){let e,t,n;return t=new t$({}),{c(){e=oe("div"),Ne(t.$$.fragment),this.h()},l(i){e=se(i,"DIV",{class:!0});var a=ge(e);ze(t.$$.fragment,a),a.forEach(U),this.h()},h(){Y(e,"class","w-full h-64")},m(i,a){le(i,e,a),Ve(t,e,null),n=!0},p:xe,i(i){n||(K(t.$$.fragment,i),n=!0)},o(i){re(t.$$.fragment,i),n=!1},d(i){i&&U(e),Ue(t)}}}function pue(r){let e;const t=r[5].default,n=Ui(t,r,r[4],JP);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&17)&&Gi(n,t,i,i[4],e?Wi(t,i[4],a,iue):Hi(i[4]),JP)},i(i){e||(K(n,i),e=!0)},o(i){re(n,i),e=!1},d(i){n&&n.d(i)}}}function gue(r){let e;const t=r[5].empty,n=Ui(t,r,r[4],e4);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&17)&&Gi(n,t,i,i[4],e?Wi(t,i[4],a,aue):Hi(i[4]),e4)},i(i){e||(K(n,i),e=!0)},o(i){re(n,i),e=!1},d(i){n&&n.d(i)}}}function vue(r){let e,t,n,i,a;const o=[hue,fue,cue,uue,lue,sue],s=[];function l(u,c){return c&1&&(e=null),u[0]?(e==null&&(e=!Pl.isQuery(u[0])),e?1:!u[1]||!u[1].dataLoaded&&!u[1].error?2:u[1].error&&u[2].error?3:!u[1].length&&!u[1].error&&u[2].empty?4:5):0}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Xe()},l(u){n.l(u),i=Xe()},m(u,c){s[t].m(u,c),le(u,i,c),a=!0},p(u,[c]){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Mt(),re(s[f],1,1,()=>{s[f]=null}),It(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),K(n,1),n.m(i.parentNode,i))},i(u){a||(K(n),a=!0)},o(u){re(n),a=!1},d(u){u&&U(i),s[t].d(u)}}}function mue(r,e,t){let{$$slots:n={},$$scope:i}=e;const a=EG(n);let{data:o}=e,s=()=>{},l;return IC(s),r.$$set=u=>{"data"in u&&t(0,o=u.data),"$$scope"in u&&t(4,i=u.$$scope)},r.$$.update=()=>{r.$$.dirty&9&&Pl.isQuery(o)&&(o.fetch(),s(),t(3,s=o.subscribe(u=>{t(1,l=u)})))},[o,l,a,s,i,n]}class vL extends kr{constructor(e){super(),Tr(this,e,mue,vue,Mr,{data:0})}}function yue(r){return(...e)=>Promise.resolve(r(...e))}function bue(){this.__data__=[],this.size=0}var _ue=bue;function wue(r,e){return r===e||r!==r&&e!==e}var VC=wue,Sue=VC;function Cue(r,e){for(var t=r.length;t--;)if(Sue(r[t][0],e))return t;return-1}var UC=Cue,Aue=UC,xue=Array.prototype,Due=xue.splice;function Eue(r){var e=this.__data__,t=Aue(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Due.call(e,t,1),--this.size,!0}var kue=Eue,Tue=UC;function Mue(r){var e=this.__data__,t=Tue(e,r);return t<0?void 0:e[t][1]}var Iue=Mue,Lue=UC;function Fue(r){return Lue(this.__data__,r)>-1}var Bue=Fue,Oue=UC;function Pue(r,e){var t=this.__data__,n=Oue(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var Rue=Pue,Nue=_ue,zue=kue,Vue=Iue,Uue=Bue,Gue=Rue;function mv(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e-1&&r%1==0&&r<=ode}var g$=sde,lde=mL,ude=g$;function cde(r){return r!=null&&ude(r.length)&&!lde(r)}var _L=cde,fde=_L,hde=x1;function dde(r){return hde(r)&&fde(r)}var pde=dde,FS={exports:{}};function gde(){return!1}var vde=gde;FS.exports;(function(r,e){var t=yv,n=vde,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,s=o?t.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||n;r.exports=u})(FS,FS.exports);var v$=FS.exports,mde=HC,yde=c$,bde=x1,_de="[object Object]",wde=Function.prototype,Sde=Object.prototype,m$=wde.toString,Cde=Sde.hasOwnProperty,Ade=m$.call(Object);function xde(r){if(!bde(r)||mde(r)!=_de)return!1;var e=yde(r);if(e===null)return!0;var t=Cde.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&m$.call(t)==Ade}var Dde=xde,Ede=HC,kde=g$,Tde=x1,Mde="[object Arguments]",Ide="[object Array]",Lde="[object Boolean]",Fde="[object Date]",Bde="[object Error]",Ode="[object Function]",Pde="[object Map]",Rde="[object Number]",Nde="[object Object]",zde="[object RegExp]",Vde="[object Set]",Ude="[object String]",Gde="[object WeakMap]",Hde="[object ArrayBuffer]",Wde="[object DataView]",$de="[object Float32Array]",jde="[object Float64Array]",qde="[object Int8Array]",Yde="[object Int16Array]",Zde="[object Int32Array]",Kde="[object Uint8Array]",Xde="[object Uint8ClampedArray]",Qde="[object Uint16Array]",Jde="[object Uint32Array]",Bn={};Bn[$de]=Bn[jde]=Bn[qde]=Bn[Yde]=Bn[Zde]=Bn[Kde]=Bn[Xde]=Bn[Qde]=Bn[Jde]=!0;Bn[Mde]=Bn[Ide]=Bn[Hde]=Bn[Lde]=Bn[Wde]=Bn[Fde]=Bn[Bde]=Bn[Ode]=Bn[Pde]=Bn[Rde]=Bn[Nde]=Bn[zde]=Bn[Vde]=Bn[Ude]=Bn[Gde]=!1;function epe(r){return Tde(r)&&kde(r.length)&&!!Bn[Ede(r)]}var tpe=epe;function rpe(r){return function(e){return r(e)}}var npe=rpe,BS={exports:{}};BS.exports;(function(r,e){var t=i$,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();r.exports=s})(BS,BS.exports);var ipe=BS.exports,ape=tpe,ope=npe,h4=ipe,d4=h4&&h4.isTypedArray,spe=d4?ope(d4):ape,y$=spe;function lpe(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}var b$=lpe,upe=bL,cpe=VC,fpe=Object.prototype,hpe=fpe.hasOwnProperty;function dpe(r,e,t){var n=r[e];(!(hpe.call(r,e)&&cpe(n,t))||t===void 0&&!(e in r))&&upe(r,e,t)}var ppe=dpe,gpe=ppe,vpe=bL;function mpe(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a-1&&r%1==0&&r0){if(++e>=Mge)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var Bge=Fge,Oge=Tge,Pge=Bge,Rge=Pge(Oge),Nge=Rge,zge=C$,Vge=Cge,Uge=Nge;function Gge(r,e){return Uge(Vge(r,e,zge),r+"")}var Hge=Gge,Wge=VC,$ge=_L,jge=_$,qge=Nd;function Yge(r,e,t){if(!qge(t))return!1;var n=typeof e;return(n=="number"?$ge(t)&&jge(e,t.length):n=="string"&&e in t)?Wge(t[e],r):!1}var Zge=Yge,Kge=Hge,Xge=Zge;function Qge(r){return Kge(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&Xge(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++ni;function e(i){}r.assertIs=e;function t(i){throw new Error}r.assertNever=t,r.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},r.getValidEnumValues=i=>{const a=r.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return r.objectValues(o)},r.objectValues=i=>r.objectKeys(i).map(function(a){return i[a]}),r.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},r.find=(i,a)=>{for(const o of i)if(a(o))return o},r.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}r.joinValues=n,r.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(Xr||(Xr={}));var AT;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(AT||(AT={}));const mt=Xr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Fc=r=>{switch(typeof r){case"undefined":return mt.undefined;case"string":return mt.string;case"number":return isNaN(r)?mt.nan:mt.number;case"boolean":return mt.boolean;case"function":return mt.function;case"bigint":return mt.bigint;case"symbol":return mt.symbol;case"object":return Array.isArray(r)?mt.array:r===null?mt.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?mt.promise:typeof Map<"u"&&r instanceof Map?mt.map:typeof Set<"u"&&r instanceof Set?mt.set:typeof Date<"u"&&r instanceof Date?mt.date:mt.object;default:return mt.unknown}},Ke=Xr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ive=r=>JSON.stringify(r,null,2).replace(/"([^"]+)":/g,"$1:");class Eo extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},n={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(t(o));else{let s=n,l=0;for(;lt.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}Eo.create=r=>new Eo(r);const Ng=(r,e)=>{let t;switch(r.code){case Ke.invalid_type:r.received===mt.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case Ke.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,Xr.jsonStringifyReplacer)}`;break;case Ke.unrecognized_keys:t=`Unrecognized key(s) in object: ${Xr.joinValues(r.keys,", ")}`;break;case Ke.invalid_union:t="Invalid input";break;case Ke.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${Xr.joinValues(r.options)}`;break;case Ke.invalid_enum_value:t=`Invalid enum value. Expected ${Xr.joinValues(r.options)}, received '${r.received}'`;break;case Ke.invalid_arguments:t="Invalid function arguments";break;case Ke.invalid_return_type:t="Invalid function return type";break;case Ke.invalid_date:t="Invalid date";break;case Ke.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:Xr.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case Ke.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case Ke.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case Ke.custom:t="Invalid input";break;case Ke.invalid_intersection_types:t="Intersection results could not be merged";break;case Ke.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case Ke.not_finite:t="Number must be finite";break;default:t=e.defaultError,Xr.assertNever(r)}return{message:t}};let A$=Ng;function ave(r){A$=r}function OS(){return A$}const PS=r=>{const{data:e,path:t,errorMaps:n,issueData:i}=r,a=[...t,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const l=n.filter(u=>!!u).slice().reverse();for(const u of l)s=u(o,{data:e,defaultError:s}).message;return{...i,path:a,message:s}},ove=[];function ft(r,e){const t=OS(),n=PS({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Ng?void 0:Ng].filter(i=>!!i)});r.common.issues.push(n)}class ma{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if(i.status==="aborted")return or;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const i of t){const a=await i.key,o=await i.value;n.push({key:a,value:o})}return ma.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return or;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(n[a.value]=o.value)}return{status:e.value,value:n}}}const or=Object.freeze({status:"aborted"}),Wp=r=>({status:"dirty",value:r}),Va=r=>({status:"valid",value:r}),xT=r=>r.status==="aborted",DT=r=>r.status==="dirty",K0=r=>r.status==="valid",X0=r=>typeof Promise<"u"&&r instanceof Promise;function RS(r,e,t,n){if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(r)}function x$(r,e,t,n,i){if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(r,t),t}var Ft;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(Ft||(Ft={}));var Zm,Km;class jl{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const _4=(r,e)=>{if(K0(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Eo(r.common.issues);return this._error=t,this._error}}};function br(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:n,description:i}=r;if(e&&(t||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(o,s)=>{var l,u;const{message:c}=r;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(u=c??t)!==null&&u!==void 0?u:s.defaultError}},description:i}}class Br{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return Fc(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Fc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ma,ctx:{common:e.parent.common,data:e.data,parsedType:Fc(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(X0(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:(n=t==null?void 0:t.async)!==null&&n!==void 0?n:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Fc(e)},a=this._parseSync({data:e,path:i.path,parent:i});return _4(i,a)}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Fc(e)},i=this._parse({data:e,path:n.path,parent:n}),a=await(X0(i)?i:Promise.resolve(i));return _4(n,a)}refine(e,t){const n=i=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(i):t;return this._refinement((i,a)=>{const o=e(i),s=()=>a.addIssue({code:Ke.custom,...n(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,t){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof t=="function"?t(n,i):t),!1))}_refinement(e){return new Ws({schema:this,typeName:nr.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Rl.create(this,this._def)}nullable(){return gf.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zs.create(this,this._def)}promise(){return Vg.create(this,this._def)}or(e){return ty.create([this,e],this._def)}and(e){return ry.create(this,e,this._def)}transform(e){return new Ws({...br(this._def),schema:this,typeName:nr.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new sy({...br(this._def),innerType:this,defaultValue:t,typeName:nr.ZodDefault})}brand(){return new wL({typeName:nr.ZodBranded,type:this,...br(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ly({...br(this._def),innerType:this,catchValue:t,typeName:nr.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return D1.create(this,e)}readonly(){return uy.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const sve=/^c[^\s-]{8,}$/i,lve=/^[0-9a-z]+$/,uve=/^[0-9A-HJKMNP-TV-Z]{26}$/,cve=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fve=/^[a-z0-9_-]{21}$/i,hve=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,dve=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,pve="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ix;const gve=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vve=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,mve=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,D$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",yve=new RegExp(`^${D$}$`);function E$(r){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`),e}function bve(r){return new RegExp(`^${E$(r)}$`)}function k$(r){let e=`${D$}T${E$(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function _ve(r,e){return!!((e==="v4"||!e)&&gve.test(r)||(e==="v6"||!e)&&vve.test(r))}class Bs extends Br{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==mt.string){const a=this._getOrReturnCtx(e);return ft(a,{code:Ke.invalid_type,expected:mt.string,received:a.parsedType}),or}const n=new ma;let i;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(i=this._getOrReturnCtx(e,i),ft(i,{code:Ke.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const o=e.data.length>a.value,s=e.data.lengthe.test(i),{validation:t,code:Ke.invalid_string,...Ft.errToObj(n)})}_addCheck(e){return new Bs({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ft.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ft.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ft.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ft.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Ft.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ft.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ft.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ft.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Ft.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ft.errToObj(e)})}datetime(e){var t,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...Ft.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...Ft.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Ft.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Ft.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...Ft.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Ft.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Ft.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Ft.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Ft.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Ft.errToObj(t)})}nonempty(e){return this.min(1,Ft.errToObj(e))}trim(){return new Bs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Bs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Bs({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new Bs({checks:[],typeName:nr.ZodString,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...br(r)})};function wve(r,e){const t=(r.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=t>n?t:n,a=parseInt(r.toFixed(i).replace(".","")),o=parseInt(e.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class hf extends Br{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==mt.number){const a=this._getOrReturnCtx(e);return ft(a,{code:Ke.invalid_type,expected:mt.number,received:a.parsedType}),or}let n;const i=new ma;for(const a of this._def.checks)a.kind==="int"?Xr.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),ft(n,{code:Ke.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),ft(n,{code:Ke.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?wve(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),ft(n,{code:Ke.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),ft(n,{code:Ke.not_finite,message:a.message}),i.dirty()):Xr.assertNever(a);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ft.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ft.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ft.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ft.toString(t))}setLimit(e,t,n,i){return new hf({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ft.toString(i)}]})}_addCheck(e){return new hf({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ft.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ft.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ft.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ft.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ft.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ft.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Ft.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ft.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ft.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&Xr.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(t===null||n.value>t)&&(t=n.value):n.kind==="max"&&(e===null||n.valuenew hf({checks:[],typeName:nr.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...br(r)});class df extends Br{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==mt.bigint){const a=this._getOrReturnCtx(e);return ft(a,{code:Ke.invalid_type,expected:mt.bigint,received:a.parsedType}),or}let n;const i=new ma;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),ft(n,{code:Ke.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),ft(n,{code:Ke.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):Xr.assertNever(a);return{status:i.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ft.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ft.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ft.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ft.toString(t))}setLimit(e,t,n,i){return new df({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ft.toString(i)}]})}_addCheck(e){return new df({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ft.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ft.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ft.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ft.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ft.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new df({checks:[],typeName:nr.ZodBigInt,coerce:(e=r==null?void 0:r.coerce)!==null&&e!==void 0?e:!1,...br(r)})};class Q0 extends Br{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==mt.boolean){const n=this._getOrReturnCtx(e);return ft(n,{code:Ke.invalid_type,expected:mt.boolean,received:n.parsedType}),or}return Va(e.data)}}Q0.create=r=>new Q0({typeName:nr.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...br(r)});class yd extends Br{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==mt.date){const a=this._getOrReturnCtx(e);return ft(a,{code:Ke.invalid_type,expected:mt.date,received:a.parsedType}),or}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return ft(a,{code:Ke.invalid_date}),or}const n=new ma;let i;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(i=this._getOrReturnCtx(e,i),ft(i,{code:Ke.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):Xr.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new yd({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Ft.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Ft.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew yd({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:nr.ZodDate,...br(r)});class NS extends Br{_parse(e){if(this._getType(e)!==mt.symbol){const n=this._getOrReturnCtx(e);return ft(n,{code:Ke.invalid_type,expected:mt.symbol,received:n.parsedType}),or}return Va(e.data)}}NS.create=r=>new NS({typeName:nr.ZodSymbol,...br(r)});class J0 extends Br{_parse(e){if(this._getType(e)!==mt.undefined){const n=this._getOrReturnCtx(e);return ft(n,{code:Ke.invalid_type,expected:mt.undefined,received:n.parsedType}),or}return Va(e.data)}}J0.create=r=>new J0({typeName:nr.ZodUndefined,...br(r)});class ey extends Br{_parse(e){if(this._getType(e)!==mt.null){const n=this._getOrReturnCtx(e);return ft(n,{code:Ke.invalid_type,expected:mt.null,received:n.parsedType}),or}return Va(e.data)}}ey.create=r=>new ey({typeName:nr.ZodNull,...br(r)});class zg extends Br{constructor(){super(...arguments),this._any=!0}_parse(e){return Va(e.data)}}zg.create=r=>new zg({typeName:nr.ZodAny,...br(r)});class td extends Br{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Va(e.data)}}td.create=r=>new td({typeName:nr.ZodUnknown,...br(r)});class Gu extends Br{_parse(e){const t=this._getOrReturnCtx(e);return ft(t,{code:Ke.invalid_type,expected:mt.never,received:t.parsedType}),or}}Gu.create=r=>new Gu({typeName:nr.ZodNever,...br(r)});class zS extends Br{_parse(e){if(this._getType(e)!==mt.undefined){const n=this._getOrReturnCtx(e);return ft(n,{code:Ke.invalid_type,expected:mt.void,received:n.parsedType}),or}return Va(e.data)}}zS.create=r=>new zS({typeName:nr.ZodVoid,...br(r)});class zs extends Br{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==mt.array)return ft(t,{code:Ke.invalid_type,expected:mt.array,received:t.parsedType}),or;if(i.exactLength!==null){const o=t.data.length>i.exactLength.value,s=t.data.lengthi.maxLength.value&&(ft(t,{code:Ke.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((o,s)=>i.type._parseAsync(new jl(t,o,t.path,s)))).then(o=>ma.mergeArray(n,o));const a=[...t.data].map((o,s)=>i.type._parseSync(new jl(t,o,t.path,s)));return ma.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new zs({...this._def,minLength:{value:e,message:Ft.toString(t)}})}max(e,t){return new zs({...this._def,maxLength:{value:e,message:Ft.toString(t)}})}length(e,t){return new zs({...this._def,exactLength:{value:e,message:Ft.toString(t)}})}nonempty(e){return this.min(1,e)}}zs.create=(r,e)=>new zs({type:r,minLength:null,maxLength:null,exactLength:null,typeName:nr.ZodArray,...br(e)});function Fp(r){if(r instanceof Hn){const e={};for(const t in r.shape){const n=r.shape[t];e[t]=Rl.create(Fp(n))}return new Hn({...r._def,shape:()=>e})}else return r instanceof zs?new zs({...r._def,type:Fp(r.element)}):r instanceof Rl?Rl.create(Fp(r.unwrap())):r instanceof gf?gf.create(Fp(r.unwrap())):r instanceof ql?ql.create(r.items.map(e=>Fp(e))):r}class Hn extends Br{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=Xr.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==mt.object){const u=this._getOrReturnCtx(e);return ft(u,{code:Ke.invalid_type,expected:mt.object,received:u.parsedType}),or}const{status:n,ctx:i}=this._processInputParams(e),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Gu&&this._def.unknownKeys==="strip"))for(const u in i.data)o.includes(u)||s.push(u);const l=[];for(const u of o){const c=a[u],f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new jl(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Gu){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of s)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")s.length>0&&(ft(i,{code:Ke.unrecognized_keys,keys:s}),n.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of s){const f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new jl(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const f=await c.key,h=await c.value;u.push({key:f,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>ma.mergeObjectSync(n,u)):ma.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return Ft.errToObj,new Hn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,n)=>{var i,a,o,s;const l=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,t,n).message)!==null&&o!==void 0?o:n.defaultError;return t.code==="unrecognized_keys"?{message:(s=Ft.errToObj(e).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Hn({...this._def,unknownKeys:"strip"})}passthrough(){return new Hn({...this._def,unknownKeys:"passthrough"})}extend(e){return new Hn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Hn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:nr.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Hn({...this._def,catchall:e})}pick(e){const t={};return Xr.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])}),new Hn({...this._def,shape:()=>t})}omit(e){const t={};return Xr.objectKeys(this.shape).forEach(n=>{e[n]||(t[n]=this.shape[n])}),new Hn({...this._def,shape:()=>t})}deepPartial(){return Fp(this)}partial(e){const t={};return Xr.objectKeys(this.shape).forEach(n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()}),new Hn({...this._def,shape:()=>t})}required(e){const t={};return Xr.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])t[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof Rl;)a=a._def.innerType;t[n]=a}}),new Hn({...this._def,shape:()=>t})}keyof(){return T$(Xr.objectKeys(this.shape))}}Hn.create=(r,e)=>new Hn({shape:()=>r,unknownKeys:"strip",catchall:Gu.create(),typeName:nr.ZodObject,...br(e)});Hn.strictCreate=(r,e)=>new Hn({shape:()=>r,unknownKeys:"strict",catchall:Gu.create(),typeName:nr.ZodObject,...br(e)});Hn.lazycreate=(r,e)=>new Hn({shape:r,unknownKeys:"strip",catchall:Gu.create(),typeName:nr.ZodObject,...br(e)});class ty extends Br{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Eo(s.ctx.common.issues));return ft(t,{code:Ke.invalid_union,unionErrors:o}),or}if(t.common.async)return Promise.all(n.map(async a=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const l of n){const u={...t,common:{...t.common,issues:[]},parent:null},c=l._parseSync({data:t.data,path:t.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!a&&(a={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(l=>new Eo(l));return ft(t,{code:Ke.invalid_union,unionErrors:s}),or}}get options(){return this._def.options}}ty.create=(r,e)=>new ty({options:r,typeName:nr.ZodUnion,...br(e)});const vu=r=>r instanceof iy?vu(r.schema):r instanceof Ws?vu(r.innerType()):r instanceof ay?[r.value]:r instanceof pf?r.options:r instanceof oy?Xr.objectValues(r.enum):r instanceof sy?vu(r._def.innerType):r instanceof J0?[void 0]:r instanceof ey?[null]:r instanceof Rl?[void 0,...vu(r.unwrap())]:r instanceof gf?[null,...vu(r.unwrap())]:r instanceof wL||r instanceof uy?vu(r.unwrap()):r instanceof ly?vu(r._def.innerType):[];class jC extends Br{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==mt.object)return ft(t,{code:Ke.invalid_type,expected:mt.object,received:t.parsedType}),or;const n=this.discriminator,i=t.data[n],a=this.optionsMap.get(i);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(ft(t,{code:Ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),or)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const a of t){const o=vu(a.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,a)}}return new jC({typeName:nr.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...br(n)})}}function ET(r,e){const t=Fc(r),n=Fc(e);if(r===e)return{valid:!0,data:r};if(t===mt.object&&n===mt.object){const i=Xr.objectKeys(e),a=Xr.objectKeys(r).filter(s=>i.indexOf(s)!==-1),o={...r,...e};for(const s of a){const l=ET(r[s],e[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(t===mt.array&&n===mt.array){if(r.length!==e.length)return{valid:!1};const i=[];for(let a=0;a{if(xT(a)||xT(o))return or;const s=ET(a.value,o.value);return s.valid?((DT(a)||DT(o))&&t.dirty(),{status:t.value,value:s.data}):(ft(n,{code:Ke.invalid_intersection_types}),or)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ry.create=(r,e,t)=>new ry({left:r,right:e,typeName:nr.ZodIntersection,...br(t)});class ql extends Br{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==mt.array)return ft(n,{code:Ke.invalid_type,expected:mt.array,received:n.parsedType}),or;if(n.data.lengththis._def.items.length&&(ft(n,{code:Ke.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...n.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new jl(n,o,n.path,s)):null}).filter(o=>!!o);return n.common.async?Promise.all(a).then(o=>ma.mergeArray(t,o)):ma.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new ql({...this._def,rest:e})}}ql.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ql({items:r,typeName:nr.ZodTuple,rest:null,...br(e)})};class ny extends Br{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==mt.object)return ft(n,{code:Ke.invalid_type,expected:mt.object,received:n.parsedType}),or;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in n.data)i.push({key:a._parse(new jl(n,s,n.path,s)),value:o._parse(new jl(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?ma.mergeObjectAsync(t,i):ma.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return t instanceof Br?new ny({keyType:e,valueType:t,typeName:nr.ZodRecord,...br(n)}):new ny({keyType:Bs.create(),valueType:e,typeName:nr.ZodRecord,...br(t)})}}class VS extends Br{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==mt.map)return ft(n,{code:Ke.invalid_type,expected:mt.map,received:n.parsedType}),or;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map(([s,l],u)=>({key:i._parse(new jl(n,s,n.path,[u,"key"])),value:a._parse(new jl(n,l,n.path,[u,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return or;(u.status==="dirty"||c.status==="dirty")&&t.dirty(),s.set(u.value,c.value)}return{status:t.value,value:s}})}else{const s=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return or;(u.status==="dirty"||c.status==="dirty")&&t.dirty(),s.set(u.value,c.value)}return{status:t.value,value:s}}}}VS.create=(r,e,t)=>new VS({valueType:e,keyType:r,typeName:nr.ZodMap,...br(t)});class bd extends Br{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==mt.set)return ft(n,{code:Ke.invalid_type,expected:mt.set,received:n.parsedType}),or;const i=this._def;i.minSize!==null&&n.data.sizei.maxSize.value&&(ft(n,{code:Ke.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const a=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return or;c.status==="dirty"&&t.dirty(),u.add(c.value)}return{status:t.value,value:u}}const s=[...n.data.values()].map((l,u)=>a._parse(new jl(n,l,n.path,u)));return n.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,t){return new bd({...this._def,minSize:{value:e,message:Ft.toString(t)}})}max(e,t){return new bd({...this._def,maxSize:{value:e,message:Ft.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}bd.create=(r,e)=>new bd({valueType:r,minSize:null,maxSize:null,typeName:nr.ZodSet,...br(e)});class og extends Br{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==mt.function)return ft(t,{code:Ke.invalid_type,expected:mt.function,received:t.parsedType}),or;function n(s,l){return PS({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,OS(),Ng].filter(u=>!!u),issueData:{code:Ke.invalid_arguments,argumentsError:l}})}function i(s,l){return PS({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,OS(),Ng].filter(u=>!!u),issueData:{code:Ke.invalid_return_type,returnTypeError:l}})}const a={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Vg){const s=this;return Va(async function(...l){const u=new Eo([]),c=await s._def.args.parseAsync(l,a).catch(d=>{throw u.addIssue(n(l,d)),u}),f=await Reflect.apply(o,this,c);return await s._def.returns._def.type.parseAsync(f,a).catch(d=>{throw u.addIssue(i(f,d)),u})})}else{const s=this;return Va(function(...l){const u=s._def.args.safeParse(l,a);if(!u.success)throw new Eo([n(l,u.error)]);const c=Reflect.apply(o,this,u.data),f=s._def.returns.safeParse(c,a);if(!f.success)throw new Eo([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new og({...this._def,args:ql.create(e).rest(td.create())})}returns(e){return new og({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new og({args:e||ql.create([]).rest(td.create()),returns:t||td.create(),typeName:nr.ZodFunction,...br(n)})}}class iy extends Br{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}iy.create=(r,e)=>new iy({getter:r,typeName:nr.ZodLazy,...br(e)});class ay extends Br{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return ft(t,{received:t.data,code:Ke.invalid_literal,expected:this._def.value}),or}return{status:"valid",value:e.data}}get value(){return this._def.value}}ay.create=(r,e)=>new ay({value:r,typeName:nr.ZodLiteral,...br(e)});function T$(r,e){return new pf({values:r,typeName:nr.ZodEnum,...br(e)})}class pf extends Br{constructor(){super(...arguments),Zm.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),n=this._def.values;return ft(t,{expected:Xr.joinValues(n),received:t.parsedType,code:Ke.invalid_type}),or}if(RS(this,Zm)||x$(this,Zm,new Set(this._def.values)),!RS(this,Zm).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return ft(t,{received:t.data,code:Ke.invalid_enum_value,options:n}),or}return Va(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return pf.create(e,{...this._def,...t})}exclude(e,t=this._def){return pf.create(this.options.filter(n=>!e.includes(n)),{...this._def,...t})}}Zm=new WeakMap;pf.create=T$;class oy extends Br{constructor(){super(...arguments),Km.set(this,void 0)}_parse(e){const t=Xr.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==mt.string&&n.parsedType!==mt.number){const i=Xr.objectValues(t);return ft(n,{expected:Xr.joinValues(i),received:n.parsedType,code:Ke.invalid_type}),or}if(RS(this,Km)||x$(this,Km,new Set(Xr.getValidEnumValues(this._def.values))),!RS(this,Km).has(e.data)){const i=Xr.objectValues(t);return ft(n,{received:n.data,code:Ke.invalid_enum_value,options:i}),or}return Va(e.data)}get enum(){return this._def.values}}Km=new WeakMap;oy.create=(r,e)=>new oy({values:r,typeName:nr.ZodNativeEnum,...br(e)});class Vg extends Br{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==mt.promise&&t.common.async===!1)return ft(t,{code:Ke.invalid_type,expected:mt.promise,received:t.parsedType}),or;const n=t.parsedType===mt.promise?t.data:Promise.resolve(t.data);return Va(n.then(i=>this._def.type.parseAsync(i,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Vg.create=(r,e)=>new Vg({type:r,typeName:nr.ZodPromise,...br(e)});class Ws extends Br{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nr.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:o=>{ft(n,o),o.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(n.data,a);if(n.common.async)return Promise.resolve(o).then(async s=>{if(t.value==="aborted")return or;const l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?or:l.status==="dirty"||t.value==="dirty"?Wp(l.value):l});{if(t.value==="aborted")return or;const s=this._def.schema._parseSync({data:o,path:n.path,parent:n});return s.status==="aborted"?or:s.status==="dirty"||t.value==="dirty"?Wp(s.value):s}}if(i.type==="refinement"){const o=s=>{const l=i.refinement(s,a);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?or:(s.status==="dirty"&&t.dirty(),o(s.value),{status:t.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?or:(s.status==="dirty"&&t.dirty(),o(s.value).then(()=>({status:t.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!K0(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>K0(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:t.value,value:s})):o);Xr.assertNever(i)}}Ws.create=(r,e,t)=>new Ws({schema:r,typeName:nr.ZodEffects,effect:e,...br(t)});Ws.createWithPreprocess=(r,e,t)=>new Ws({schema:e,effect:{type:"preprocess",transform:r},typeName:nr.ZodEffects,...br(t)});class Rl extends Br{_parse(e){return this._getType(e)===mt.undefined?Va(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Rl.create=(r,e)=>new Rl({innerType:r,typeName:nr.ZodOptional,...br(e)});class gf extends Br{_parse(e){return this._getType(e)===mt.null?Va(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}gf.create=(r,e)=>new gf({innerType:r,typeName:nr.ZodNullable,...br(e)});class sy extends Br{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===mt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}sy.create=(r,e)=>new sy({innerType:r,typeName:nr.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...br(e)});class ly extends Br{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return X0(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Eo(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Eo(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ly.create=(r,e)=>new ly({innerType:r,typeName:nr.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...br(e)});class US extends Br{_parse(e){if(this._getType(e)!==mt.nan){const n=this._getOrReturnCtx(e);return ft(n,{code:Ke.invalid_type,expected:mt.nan,received:n.parsedType}),or}return{status:"valid",value:e.data}}}US.create=r=>new US({typeName:nr.ZodNaN,...br(r)});const Sve=Symbol("zod_brand");class wL extends Br{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class D1 extends Br{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?or:a.status==="dirty"?(t.dirty(),Wp(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?or:i.status==="dirty"?(t.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,t){return new D1({in:e,out:t,typeName:nr.ZodPipeline})}}class uy extends Br{_parse(e){const t=this._def.innerType._parse(e),n=i=>(K0(i)&&(i.value=Object.freeze(i.value)),i);return X0(t)?t.then(i=>n(i)):n(t)}unwrap(){return this._def.innerType}}uy.create=(r,e)=>new uy({innerType:r,typeName:nr.ZodReadonly,...br(e)});function M$(r,e={},t){return r?zg.create().superRefine((n,i)=>{var a,o;if(!r(n)){const s=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,l=(o=(a=s.fatal)!==null&&a!==void 0?a:t)!==null&&o!==void 0?o:!0,u=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...u,fatal:l})}}):zg.create()}const Cve={object:Hn.lazycreate};var nr;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(nr||(nr={}));const Ave=(r,e={message:`Input not instance of ${r.name}`})=>M$(t=>t instanceof r,e),I$=Bs.create,L$=hf.create,xve=US.create,Dve=df.create,F$=Q0.create,Eve=yd.create,kve=NS.create,Tve=J0.create,Mve=ey.create,Ive=zg.create,Lve=td.create,Fve=Gu.create,Bve=zS.create,Ove=zs.create,Pve=Hn.create,Rve=Hn.strictCreate,Nve=ty.create,zve=jC.create,Vve=ry.create,Uve=ql.create,Gve=ny.create,Hve=VS.create,Wve=bd.create,$ve=og.create,jve=iy.create,qve=ay.create,Yve=pf.create,Zve=oy.create,Kve=Vg.create,w4=Ws.create,Xve=Rl.create,Qve=gf.create,Jve=Ws.createWithPreprocess,eme=D1.create,tme=()=>I$().optional(),rme=()=>L$().optional(),nme=()=>F$().optional(),ime={string:r=>Bs.create({...r,coerce:!0}),number:r=>hf.create({...r,coerce:!0}),boolean:r=>Q0.create({...r,coerce:!0}),bigint:r=>df.create({...r,coerce:!0}),date:r=>yd.create({...r,coerce:!0})},ame=or;var Bo=Object.freeze({__proto__:null,defaultErrorMap:Ng,setErrorMap:ave,getErrorMap:OS,makeIssue:PS,EMPTY_PATH:ove,addIssueToContext:ft,ParseStatus:ma,INVALID:or,DIRTY:Wp,OK:Va,isAborted:xT,isDirty:DT,isValid:K0,isAsync:X0,get util(){return Xr},get objectUtil(){return AT},ZodParsedType:mt,getParsedType:Fc,ZodType:Br,datetimeRegex:k$,ZodString:Bs,ZodNumber:hf,ZodBigInt:df,ZodBoolean:Q0,ZodDate:yd,ZodSymbol:NS,ZodUndefined:J0,ZodNull:ey,ZodAny:zg,ZodUnknown:td,ZodNever:Gu,ZodVoid:zS,ZodArray:zs,ZodObject:Hn,ZodUnion:ty,ZodDiscriminatedUnion:jC,ZodIntersection:ry,ZodTuple:ql,ZodRecord:ny,ZodMap:VS,ZodSet:bd,ZodFunction:og,ZodLazy:iy,ZodLiteral:ay,ZodEnum:pf,ZodNativeEnum:oy,ZodPromise:Vg,ZodEffects:Ws,ZodTransformer:Ws,ZodOptional:Rl,ZodNullable:gf,ZodDefault:sy,ZodCatch:ly,ZodNaN:US,BRAND:Sve,ZodBranded:wL,ZodPipeline:D1,ZodReadonly:uy,custom:M$,Schema:Br,ZodSchema:Br,late:Cve,get ZodFirstPartyTypeKind(){return nr},coerce:ime,any:Ive,array:Ove,bigint:Dve,boolean:F$,date:Eve,discriminatedUnion:zve,effect:w4,enum:Yve,function:$ve,instanceof:Ave,intersection:Vve,lazy:jve,literal:qve,map:Hve,nan:xve,nativeEnum:Zve,never:Fve,null:Mve,nullable:Qve,number:L$,object:Pve,oboolean:nme,onumber:rme,optional:Xve,ostring:tme,pipeline:eme,preprocess:Jve,promise:Kve,record:Gve,set:Wve,strictObject:Rve,string:I$,symbol:kve,transformer:w4,tuple:Uve,undefined:Tve,union:Nve,unknown:Lve,void:Bve,NEVER:ame,ZodIssueCode:Ke,quotelessJson:ive,ZodError:Eo});Bo.object({label:Bo.union([Bo.string(),Bo.number()]).optional().nullable(),value:Bo.union([Bo.string(),Bo.number(),Bo.null()]),idx:Bo.number().optional(),selected:Bo.boolean().optional(),__auto:Bo.boolean().optional(),__removeOnDeselect:Bo.boolean().optional()});const B$="___usql_query";let O$=VW;const cZe=r=>{TC(B$,r),O$=r},fZe=()=>Od(B$),S4=(r,e,t,n)=>Pl.create(r,O$,e,{...n,initialData:t}),C4=1,ome=.9,sme=.8,lme=.17,Lx=.1,Fx=.999,ume=.9999,cme=.99,fme=/[\\/_+.#"@[({&]/,hme=/[\\/_+.#"@[({&]/g,dme=/[\s-]/,P$=/[\s-]/g;function kT(r,e,t,n,i,a,o){if(a===e.length)return i===r.length?C4:cme;const s=`${i},${a}`;if(o[s]!==void 0)return o[s];const l=n.charAt(a);let u=t.indexOf(l,i),c=0,f,h,d,p;for(;u>=0;)f=kT(r,e,t,n,u+1,a+1,o),f>c&&(u===i?f*=C4:fme.test(r.charAt(u-1))?(f*=sme,d=r.slice(i,u-1).match(hme),d&&i>0&&(f*=Math.pow(Fx,d.length))):dme.test(r.charAt(u-1))?(f*=ome,p=r.slice(i,u-1).match(P$),p&&i>0&&(f*=Math.pow(Fx,p.length))):(f*=lme,i>0&&(f*=Math.pow(Fx,u-i))),r.charAt(u)!==e.charAt(a)&&(f*=ume)),(ff&&(f=h*Lx)),f>c&&(c=f),u=t.indexOf(l,u+1);return o[s]=c,c}function A4(r){return r.toLowerCase().replace(P$," ")}function pme(r,e){return kT(r,e,A4(r),A4(e),0,0,{})}function gb(){return qse(10)}const gme=(r,e)=>pme(r,e);gb(),gb(),gb(),gb();function vme(r){return Object.keys(r).reduce((e,t)=>r[t]===void 0?e:e+`${t}:${r[t]};`,"")}vme({position:"absolute",opacity:0,"pointer-events":"none",margin:0,transform:"translateX(-100%)"});function R$(r,e,t,n){const i=Array.isArray(e)?e:[e];return i.forEach(a=>r.addEventListener(a,t,n)),()=>{i.forEach(a=>r.removeEventListener(a,t,n))}}const mme={ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",A:"a",P:"p"};lo(void 0,r=>{function e(n){r(n),r(void 0)}return R$(document,"pointerup",e,{passive:!1,capture:!0})});lo(void 0,r=>{function e(n){n&&n.key===mme.ESCAPE&&r(n),r(void 0)}return R$(document,"keydown",e,{passive:!1,capture:!0})});function Xn(r,e){const t={};return e.forEach(n=>{t[n]={[`data-bits-${r}-${n}`]:""}}),n=>t[n]}function N$(r){return Object.keys(r).reduce((e,t)=>r[t]===void 0?e:e+`${t}:${r[t]};`,"")}N$({position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"});N$({position:"absolute",width:"25px",height:"25px",opacity:"0",margin:"0px",pointerEvents:"none",transform:"translateX(-100%)"});const yme="accordion",bme=["root","content","header","item","trigger"];Xn(yme,bme);const _me="alert-dialog",wme=["action","cancel","content","description","overlay","portal","title","trigger"];Xn(_me,wme);const Sme="avatar",Cme=["root","image","fallback"];Xn(Sme,Cme);const Ame="checkbox",xme=["root","input","indicator"];Xn(Ame,xme);const Dme="collapsible",Eme=["root","content","trigger"];Xn(Dme,Eme);const kme="context-menu",Tme=["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","separator","sub-content","sub-trigger","trigger"];Xn(kme,Tme);const Mme="dialog",Ime=["close","content","description","overlay","portal","title","trigger"];Xn(Mme,Ime);const Lme="dropdown-menu",Fme=["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","separator","sub-content","sub-trigger","trigger"];Xn(Lme,Fme);const Bme="link-preview",Ome=["arrow","content","trigger"];Xn(Bme,Ome);const Pme="label",Rme=["root"];Xn(Pme,Rme);const Nme="menubar",zme=["root","arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","separator","sub-content","sub-trigger","trigger"];Xn(Nme,zme);const Vme="popover",Ume=["arrow","close","content","trigger"];Xn(Vme,Ume);const Gme="progress",Hme=["root"];Xn(Gme,Hme);const Wme="radio-group",$me=["root","item","input"];Xn(Wme,$me);const jme="select",qme=["arrow","content","group","item","input","label","trigger","value"];Xn(jme,qme);const Yme="separator",Zme=["root"];Xn(Yme,Zme);const Kme="slider",Xme=["root","input","range","thumb","tick"];Xn(Kme,Xme);const Qme="switch",Jme=["root","input","thumb"];Xn(Qme,Jme);const e0e="tabs",t0e=["root","content","list","trigger"];Xn(e0e,t0e);const r0e="toggle",n0e=["root","input"];Xn(r0e,n0e);const i0e="toggle-group",a0e=["root","item"];Xn(i0e,a0e);const o0e="tooltip",s0e=["arrow","content","trigger"];Xn(o0e,s0e);var x4=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,yo=r=>!r||typeof r!="object"||Object.keys(r).length===0,l0e=(r,e)=>JSON.stringify(r)===JSON.stringify(e);function z$(r,e){r.forEach(function(t){Array.isArray(t)?z$(t,e):e.push(t)})}function V$(r){let e=[];return z$(r,e),e}var U$=(...r)=>V$(r).filter(Boolean),G$=(r,e)=>{let t={},n=Object.keys(r),i=Object.keys(e);for(let a of n)if(i.includes(a)){let o=r[a],s=e[a];typeof o=="object"&&typeof s=="object"?t[a]=G$(o,s):Array.isArray(o)||Array.isArray(s)?t[a]=U$(s,o):t[a]=s+" "+o}else t[a]=r[a];for(let a of i)n.includes(a)||(t[a]=e[a]);return t},D4=r=>!r||typeof r!="string"?r:r.replace(/\s+/g," ").trim();function u0e(){for(var r=0,e,t,n="";rr&&(e=0,n=t,t=new Map)}return{get:function(o){var s=t.get(o);if(s!==void 0)return s;if((s=n.get(o))!==void 0)return i(o,s),s},set:function(o,s){t.has(o)?t.set(o,s):i(o,s)}}}var $$="!";function v0e(r){var e=r.separator||":",t=e.length===1,n=e[0],i=e.length;return function(o){for(var s=[],l=0,u=0,c,f=0;fu?c-u:void 0;return{modifiers:s,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:v}}}function m0e(r){if(r.length<=1)return r;var e=[],t=[];return r.forEach(function(n){var i=n[0]==="[";i?(e.push.apply(e,t.sort().concat([n])),t=[]):t.push(n)}),e.push.apply(e,t.sort()),e}function y0e(r){return{cache:g0e(r.cacheSize),splitModifiers:v0e(r),...c0e(r)}}var b0e=/\s+/;function _0e(r,e){var t=e.splitModifiers,n=e.getClassGroupId,i=e.getConflictingClassGroupIds,a=new Set;return r.trim().split(b0e).map(function(o){var s=t(o),l=s.modifiers,u=s.hasImportantModifier,c=s.baseClassName,f=s.maybePostfixModifierPosition,h=n(f?c.substring(0,f):c),d=!!f;if(!h){if(!f)return{isTailwindClass:!1,originalClassName:o};if(h=n(c),!h)return{isTailwindClass:!1,originalClassName:o};d=!1}var p=m0e(l).join(":"),g=u?p+$$:p;return{isTailwindClass:!0,modifierId:g,classGroupId:h,originalClassName:o,hasPostfixModifier:d}}).reverse().filter(function(o){if(!o.isTailwindClass)return!0;var s=o.modifierId,l=o.classGroupId,u=o.hasPostfixModifier,c=s+l;return a.has(c)?!1:(a.add(c),i(l,u).forEach(function(f){return a.add(s+f)}),!0)}).reverse().map(function(o){return o.originalClassName}).join(" ")}function MT(){for(var r=arguments.length,e=new Array(r),t=0;t1?e-1:0),n=1;nr||void 0,cy=(...r)=>Z$(V$(r).filter(Boolean).join(" ")),Bx=null,GS={},FT=!1,rm=(...r)=>e=>e.twMerge?((!Bx||FT)&&(FT=!1,Bx=yo(GS)?N0e:R0e(GS)),Z$(Bx(cy(r)))):cy(r),M4=(r,e)=>{for(let t in e)r.hasOwnProperty(t)?r[t]=cy(r[t],e[t]):r[t]=e[t];return r},K$=(r,e)=>{let{extend:t=null,slots:n={},variants:i={},compoundVariants:a=[],compoundSlots:o=[],defaultVariants:s={}}=r,l={...z0e,...e},u=t!=null&&t.base?cy(t.base,r==null?void 0:r.base):r==null?void 0:r.base,c=t!=null&&t.variants&&!yo(t.variants)?G$(i,t.variants):i,f=t!=null&&t.defaultVariants&&!yo(t.defaultVariants)?{...t.defaultVariants,...s}:s;!yo(l.twMergeConfig)&&!l0e(l.twMergeConfig,GS)&&(FT=!0,GS=l.twMergeConfig);let h=yo(t==null?void 0:t.slots),d=yo(n)?{}:{base:cy(r==null?void 0:r.base,h&&(t==null?void 0:t.base)),...n},p=h?d:M4({...t==null?void 0:t.slots},yo(d)?{base:r==null?void 0:r.base}:d),g=m=>{if(yo(c)&&yo(n)&&h)return rm(u,m==null?void 0:m.class,m==null?void 0:m.className)(l);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof a}`);if(o&&!Array.isArray(o))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof o}`);let y=(k,M,T=[],L)=>{let F=T;if(typeof M=="string")F=F.concat(D4(M).split(" ").map(N=>`${k}:${N}`));else if(Array.isArray(M))F=F.concat(M.reduce((N,z)=>N.concat(`${k}:${z}`),[]));else if(typeof M=="object"&&typeof L=="string"){for(let N in M)if(M.hasOwnProperty(N)&&N===L){let z=M[N];if(z&&typeof z=="string"){let W=D4(z);F[L]?F[L]=F[L].concat(W.split(" ").map(H=>`${k}:${H}`)):F[L]=W.split(" ").map(H=>`${k}:${H}`)}else Array.isArray(z)&&z.length>0&&(F[L]=z.reduce((W,H)=>W.concat(`${k}:${H}`),[]))}}return F},b=(k,M=c,T=null,L=null)=>{var F;let N=M[k];if(!N||yo(N))return null;let z=(F=L==null?void 0:L[k])!=null?F:m==null?void 0:m[k];if(z===null)return null;let W=x4(z),H=Array.isArray(l.responsiveVariants)&&l.responsiveVariants.length>0||l.responsiveVariants===!0,R=f==null?void 0:f[k],ne=[];if(typeof W=="object"&&H)for(let[fe,Ce]of Object.entries(W)){let Te=N[Ce];if(fe==="initial"){R=Ce;continue}Array.isArray(l.responsiveVariants)&&!l.responsiveVariants.includes(fe)||(ne=y(fe,Te,ne,T))}let te=N[W]||N[x4(R)];return typeof ne=="object"&&typeof T=="string"&&ne[T]?M4(ne,te):ne.length>0?(ne.push(te),ne):te},_=()=>c?Object.keys(c).map(k=>b(k,c)):null,w=(k,M)=>{if(!c||typeof c!="object")return null;let T=new Array;for(let L in c){let F=b(L,c,k,M),N=k==="base"&&typeof F=="string"?F:F&&F[k];N&&(T[T.length]=N)}return T},S={};for(let k in m)m[k]!==void 0&&(S[k]=m[k]);let C=(k,M)=>{var T;let L=typeof(m==null?void 0:m[k])=="object"?{[k]:(T=m[k])==null?void 0:T.initial}:{};return{...f,...S,...L,...M}},A=(k=[],M)=>{let T=[];for(let{class:L,className:F,...N}of k){let z=!0;for(let[W,H]of Object.entries(N)){let R=C(W,M);if(Array.isArray(H)){if(!H.includes(R[W])){z=!1;break}}else if(R[W]!==H){z=!1;break}}z&&(L&&T.push(L),F&&T.push(F))}return T},x=k=>{let M=A(a,k),T=A(t==null?void 0:t.compoundVariants,k);return U$(T,M)},D=k=>{let M=x(k);if(!Array.isArray(M))return M;let T={};for(let L of M)if(typeof L=="string"&&(T.base=rm(T.base,L)(l)),typeof L=="object")for(let[F,N]of Object.entries(L))T[F]=rm(T[F],N)(l);return T},E=k=>{if(o.length<1)return null;let M={};for(let{slots:T=[],class:L,className:F,...N}of o){if(!yo(N)){let z=!0;for(let W of Object.keys(N)){let H=C(W,k)[W];if(H===void 0||(Array.isArray(N[W])?!N[W].includes(H):N[W]!==H)){z=!1;break}}if(!z)continue}for(let z of T)M[z]=M[z]||[],M[z].push([L,F])}return M};if(!yo(n)||!h){let k={};if(typeof p=="object"&&!yo(p))for(let M of Object.keys(p))k[M]=T=>{var L,F;return rm(p[M],w(M,T),((L=D(T))!=null?L:[])[M],((F=E(T))!=null?F:[])[M],T==null?void 0:T.class,T==null?void 0:T.className)(l)};return k}return rm(u,_(),x(),m==null?void 0:m.class,m==null?void 0:m.className)(l)},v=()=>{if(!(!c||typeof c!="object"))return Object.keys(c)};return g.variantKeys=v(),g.extend=t,g.base=u,g.slots=p,g.variants=c,g.defaultVariants=f,g.compoundSlots=o,g.compoundVariants=a,g};const hZe=K$({base:"inline-flex items-center justify-center rounded-md text-sm font-medium whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-base-content-muted disabled:pointer-events-none disabled:opacity-50",variants:{variant:{default:"bg-base-content shadow hover:bg-base-content/90",destructive:"bg-negative text-negative-content shadow-sm hover:bg-negative/90",outline:"border border-base-300 bg-transparent shadow-sm hover:bg-base-200",secondary:"bg-base-300 text-base-content shadow-sm hover:bg-base-300/80",ghost:"hover:bg-base-200 hover:text-base-content",link:"text-base-content underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}});K$({base:"inline-flex items-center rounded-md border border-base-300 px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-base-content-muted focus:ring-offset-2 select-none",variants:{variant:{default:"border-transparent bg-base-300 text-base-content shadow hover:bg-base-300/80",destructive:"border-transparent bg-negative text-negative-content shadow hover:bg-negative/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});var X$={exports:{}};(function(r){var e={},t=function(i){i.version="0.11.2";function a($){for(var q="",j=$.length-1;j>=0;)q+=$.charAt(j--);return q}function o($,q){for(var j="";j.length=q?j:o("0",q-j.length)+j}function l($,q){var j=""+$;return j.length>=q?j:o(" ",q-j.length)+j}function u($,q){var j=""+$;return j.length>=q?j:j+o(" ",q-j.length)}function c($,q){var j=""+Math.round($);return j.length>=q?j:o("0",q-j.length)+j}function f($,q){var j=""+$;return j.length>=q?j:o("0",q-j.length)+j}var h=Math.pow(2,32);function d($,q){if($>h||$<-h)return c($,q);var j=Math.round($);return f(j,q)}function p($,q){return q=q||0,$.length>=7+q&&($.charCodeAt(q)|32)===103&&($.charCodeAt(q+1)|32)===101&&($.charCodeAt(q+2)|32)===110&&($.charCodeAt(q+3)|32)===101&&($.charCodeAt(q+4)|32)===114&&($.charCodeAt(q+5)|32)===97&&($.charCodeAt(q+6)|32)===108}var g=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],v=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function m($){$[0]="General",$[1]="0",$[2]="0.00",$[3]="#,##0",$[4]="#,##0.00",$[9]="0%",$[10]="0.00%",$[11]="0.00E+00",$[12]="# ?/?",$[13]="# ??/??",$[14]="m/d/yy",$[15]="d-mmm-yy",$[16]="d-mmm",$[17]="mmm-yy",$[18]="h:mm AM/PM",$[19]="h:mm:ss AM/PM",$[20]="h:mm",$[21]="h:mm:ss",$[22]="m/d/yy h:mm",$[37]="#,##0 ;(#,##0)",$[38]="#,##0 ;[Red](#,##0)",$[39]="#,##0.00;(#,##0.00)",$[40]="#,##0.00;[Red](#,##0.00)",$[45]="mm:ss",$[46]="[h]:mm:ss",$[47]="mmss.0",$[48]="##0.0E+0",$[49]="@",$[56]='"上午/下午 "hh"時"mm"分"ss"秒 "'}var y={};m(y);var b=[],_=0;for(_=5;_<=8;++_)b[_]=32+_;for(_=23;_<=26;++_)b[_]=0;for(_=27;_<=31;++_)b[_]=14;for(_=50;_<=58;++_)b[_]=14;for(_=59;_<=62;++_)b[_]=_-58;for(_=67;_<=68;++_)b[_]=_-58;for(_=72;_<=75;++_)b[_]=_-58;for(_=67;_<=68;++_)b[_]=_-57;for(_=76;_<=78;++_)b[_]=_-56;for(_=79;_<=81;++_)b[_]=_-34;var w=[];w[5]=w[63]='"$"#,##0_);\\("$"#,##0\\)',w[6]=w[64]='"$"#,##0_);[Red]\\("$"#,##0\\)',w[7]=w[65]='"$"#,##0.00_);\\("$"#,##0.00\\)',w[8]=w[66]='"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',w[41]='_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',w[42]='_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',w[43]='_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',w[44]='_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)';function S($,q,j){for(var he=$<0?-1:1,Q=$*he,ye=0,ie=1,me=0,Pe=1,Oe=0,Ge=0,Ye=Math.floor(Q);Oeq&&(Oe>q?(Ge=Pe,me=ye):(Ge=Oe,me=ie)),!j)return[0,he*me,Ge];var Ct=Math.floor(he*me/Ge);return[Ct,he*me-Ct*Ge,Ge]}function C($,q,j){if($>2958465||$<0)return null;var he=$|0,Q=Math.floor(86400*($-he)),ye=0,ie=[],me={D:he,T:Q,u:86400*($-he)-Q,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(me.u)<1e-6&&(me.u=0),q&&q.date1904&&(he+=1462),me.u>.9999&&(me.u=0,++Q==86400&&(me.T=Q=0,++he,++me.D)),he===60)ie=j?[1317,10,29]:[1900,2,29],ye=3;else if(he===0)ie=j?[1317,8,29]:[1900,1,0],ye=6;else{he>60&&--he;var Pe=new Date(1900,0,1);Pe.setDate(Pe.getDate()+he-1),ie=[Pe.getFullYear(),Pe.getMonth()+1,Pe.getDate()],ye=Pe.getDay(),he<60&&(ye=(ye+6)%7),j&&(ye=L(Pe,ie))}return me.y=ie[0],me.m=ie[1],me.d=ie[2],me.S=Q%60,Q=Math.floor(Q/60),me.M=Q%60,Q=Math.floor(Q/60),me.H=Q,me.q=ye,me}i.parse_date_code=C;var A=new Date(1899,11,31,0,0,0),x=A.getTime(),D=new Date(1900,2,1,0,0,0);function E($,q){var j=$.getTime();return q?j-=1262304e5:$>=D&&(j+=864e5),(j-(x+($.getTimezoneOffset()-A.getTimezoneOffset())*6e4))/864e5}function k($){return $.toString(10)}i._general_int=k;var M=function(){var q=/(?:\.0*|(\.\d*[1-9])0+)$/;function j(Oe){return Oe.indexOf(".")==-1?Oe:Oe.replace(q,"$1")}var he=/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,Q=/(E[+-])(\d)$/;function ye(Oe){return Oe.indexOf("E")==-1?Oe:Oe.replace(he,"$1E").replace(Q,"$10$2")}function ie(Oe){var Ge=Oe<0?12:11,Ye=j(Oe.toFixed(12));return Ye.length<=Ge||(Ye=Oe.toPrecision(10),Ye.length<=Ge)?Ye:Oe.toExponential(5)}function me(Oe){var Ge=j(Oe.toFixed(11));return Ge.length>(Oe<0?12:11)||Ge==="0"||Ge==="-0"?Oe.toPrecision(6):Ge}function Pe(Oe){var Ge=Math.floor(Math.log(Math.abs(Oe))*Math.LOG10E),Ye;return Ge>=-4&&Ge<=-1?Ye=Oe.toPrecision(10+Ge):Math.abs(Ge)<=9?Ye=ie(Oe):Ge===10?Ye=Oe.toFixed(10).substr(0,12):Ye=me(Oe),j(ye(Ye.toUpperCase()))}return Pe}();i._general_num=M;function T($,q){switch(typeof $){case"string":return $;case"boolean":return $?"TRUE":"FALSE";case"number":return($|0)===$?$.toString(10):M($);case"undefined":return"";case"object":if($==null)return"";if($ instanceof Date)return Se(14,E($,q&&q.date1904),q)}throw new Error("unsupported value in General format: "+$)}i._general=T;function L($,q){q[0]-=581;var j=$.getDay();return $<60&&(j=(j+6)%7),j}function F($,q,j,he){var Q="",ye=0,ie=0,me=j.y,Pe,Oe=0;switch($){case 98:me=j.y+543;case 121:switch(q.length){case 1:case 2:Pe=me%100,Oe=2;break;default:Pe=me%1e4,Oe=4;break}break;case 109:switch(q.length){case 1:case 2:Pe=j.m,Oe=q.length;break;case 3:return v[j.m-1][1];case 5:return v[j.m-1][0];default:return v[j.m-1][2]}break;case 100:switch(q.length){case 1:case 2:Pe=j.d,Oe=q.length;break;case 3:return g[j.q][0];default:return g[j.q][1]}break;case 104:switch(q.length){case 1:case 2:Pe=1+(j.H+11)%12,Oe=q.length;break;default:throw"bad hour format: "+q}break;case 72:switch(q.length){case 1:case 2:Pe=j.H,Oe=q.length;break;default:throw"bad hour format: "+q}break;case 77:switch(q.length){case 1:case 2:Pe=j.M,Oe=q.length;break;default:throw"bad minute format: "+q}break;case 115:if(q!="s"&&q!="ss"&&q!=".0"&&q!=".00"&&q!=".000")throw"bad second format: "+q;return j.u===0&&(q=="s"||q=="ss")?s(j.S,q.length):(he>=2?ie=he===3?1e3:100:ie=he===1?10:1,ye=Math.round(ie*(j.S+j.u)),ye>=60*ie&&(ye=0),q==="s"?ye===0?"0":""+ye/ie:(Q=s(ye,2+he),q==="ss"?Q.substr(0,2):"."+Q.substr(2,q.length-1)));case 90:switch(q){case"[h]":case"[hh]":Pe=j.D*24+j.H;break;case"[m]":case"[mm]":Pe=(j.D*24+j.H)*60+j.M;break;case"[s]":case"[ss]":Pe=((j.D*24+j.H)*60+j.M)*60+Math.round(j.S+j.u);break;default:throw"bad abstime format: "+q}Oe=q.length===3?1:2;break;case 101:Pe=me,Oe=1;break}var Ge=Oe>0?s(Pe,Oe):"";return Ge}function N($){var q=3;if($.length<=q)return $;for(var j=$.length%q,he=$.substr(0,j);j!=$.length;j+=q)he+=(he.length>0?",":"")+$.substr(j,q);return he}var z=function(){var q=/%/g;function j(Re,ue,de){var at=ue.replace(q,""),J=ue.length-at.length;return z(Re,at,de*Math.pow(10,2*J))+o("%",J)}function he(Re,ue,de){for(var at=ue.length-1;ue.charCodeAt(at-1)===44;)--at;return z(Re,ue.substr(0,at),de/Math.pow(10,3*(ue.length-at)))}function Q(Re,ue){var de,at=Re.indexOf("E")-Re.indexOf(".")-1;if(Re.match(/^#+0.0E\+0$/)){if(ue==0)return"0.0E+0";if(ue<0)return"-"+Q(Re,-ue);var J=Re.indexOf(".");J===-1&&(J=Re.indexOf("E"));var ve=Math.floor(Math.log(ue)*Math.LOG10E)%J;if(ve<0&&(ve+=J),de=(ue/Math.pow(10,ve)).toPrecision(at+1+(J+ve)%J),de.indexOf("e")===-1){var Ee=Math.floor(Math.log(ue)*Math.LOG10E);for(de.indexOf(".")===-1?de=de.charAt(0)+"."+de.substr(1)+"E+"+(Ee-de.length+ve):de+="E+"+(Ee-ve);de.substr(0,2)==="0.";)de=de.charAt(0)+de.substr(2,J)+"."+de.substr(2+J),de=de.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");de=de.replace(/\+-/,"-")}de=de.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(Ot,pr,Nr,lr){return pr+Nr+lr.substr(0,(J+ve)%J)+"."+lr.substr(ve)+"E"})}else de=ue.toExponential(at);return Re.match(/E\+00$/)&&de.match(/e[+-]\d$/)&&(de=de.substr(0,de.length-1)+"0"+de.charAt(de.length-1)),Re.match(/E\-/)&&de.match(/e\+/)&&(de=de.replace(/e\+/,"e")),de.replace("e","E")}var ye=/# (\?+)( ?)\/( ?)(\d+)/;function ie(Re,ue,de){var at=parseInt(Re[4],10),J=Math.round(ue*at),ve=Math.floor(J/at),Ee=J-ve*at,Ot=at;return de+(ve===0?"":""+ve)+" "+(Ee===0?o(" ",Re[1].length+1+Re[4].length):l(Ee,Re[1].length)+Re[2]+"/"+Re[3]+s(Ot,Re[4].length))}function me(Re,ue,de){return de+(ue===0?"":""+ue)+o(" ",Re[1].length+2+Re[4].length)}var Pe=/^#*0*\.([0#]+)/,Oe=/\).*[0#]/,Ge=/\(###\) ###\\?-####/;function Ye(Re){for(var ue="",de,at=0;at!=Re.length;++at)switch(de=Re.charCodeAt(at)){case 35:break;case 63:ue+=" ";break;case 48:ue+="0";break;default:ue+=String.fromCharCode(de)}return ue}function Ct(Re,ue){var de=Math.pow(10,ue);return""+Math.round(Re*de)/de}function Zt(Re,ue){var de=Re-Math.floor(Re),at=Math.pow(10,ue);return ue<(""+Math.round(de*at)).length?0:Math.round(de*at)}function qe(Re,ue){return ue<(""+Math.round((Re-Math.floor(Re))*Math.pow(10,ue))).length?1:0}function Me(Re){return Re<2147483647&&Re>-2147483648?""+(Re>=0?Re|0:Re-1|0):""+Math.floor(Re)}function At(Re,ue,de){if(Re.charCodeAt(0)===40&&!ue.match(Oe)){var at=ue.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return de>=0?At("n",at,de):"("+At("n",at,-de)+")"}if(ue.charCodeAt(ue.length-1)===44)return he(Re,ue,de);if(ue.indexOf("%")!==-1)return j(Re,ue,de);if(ue.indexOf("E")!==-1)return Q(ue,de);if(ue.charCodeAt(0)===36)return"$"+At(Re,ue.substr(ue.charAt(1)==" "?2:1),de);var J,ve,Ee,Ot,pr=Math.abs(de),Nr=de<0?"-":"";if(ue.match(/^00+$/))return Nr+d(pr,ue.length);if(ue.match(/^[#?]+$/))return J=d(de,0),J==="0"&&(J=""),J.length>ue.length?J:Ye(ue.substr(0,ue.length-J.length))+J;if(ve=ue.match(ye))return ie(ve,pr,Nr);if(ue.match(/^#+0+$/))return Nr+d(pr,ue.length-ue.indexOf("0"));if(ve=ue.match(Pe))return J=Ct(de,ve[1].length).replace(/^([^\.]+)$/,"$1."+Ye(ve[1])).replace(/\.$/,"."+Ye(ve[1])).replace(/\.(\d*)$/,function(I,V){return"."+V+o("0",Ye(ve[1]).length-V.length)}),ue.indexOf("0.")!==-1?J:J.replace(/^0\./,".");if(ue=ue.replace(/^#+([0.])/,"$1"),ve=ue.match(/^(0*)\.(#*)$/))return Nr+Ct(pr,ve[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,ve[1].length?"0.":".");if(ve=ue.match(/^#{1,3},##0(\.?)$/))return Nr+N(d(pr,0));if(ve=ue.match(/^#,##0\.([#0]*0)$/))return de<0?"-"+At(Re,ue,-de):N(""+(Math.floor(de)+qe(de,ve[1].length)))+"."+s(Zt(de,ve[1].length),ve[1].length);if(ve=ue.match(/^#,#*,#0/))return At(Re,ue.replace(/^#,#*,/,""),de);if(ve=ue.match(/^([0#]+)(\\?-([0#]+))+$/))return J=a(At(Re,ue.replace(/[\\-]/g,""),de)),Ee=0,a(a(ue.replace(/\\/g,"")).replace(/[0#]/g,function(I){return Ee=0?ht("n",at,de):"("+ht("n",at,-de)+")"}if(ue.charCodeAt(ue.length-1)===44)return lt(Re,ue,de);if(ue.indexOf("%")!==-1)return Sr(Re,ue,de);if(ue.indexOf("E")!==-1)return Vt(ue,de);if(ue.charCodeAt(0)===36)return"$"+ht(Re,ue.substr(ue.charAt(1)==" "?2:1),de);var J,ve,Ee,Ot,pr=Math.abs(de),Nr=de<0?"-":"";if(ue.match(/^00+$/))return Nr+s(pr,ue.length);if(ue.match(/^[#?]+$/))return J=""+de,de===0&&(J=""),J.length>ue.length?J:Ye(ue.substr(0,ue.length-J.length))+J;if(ve=ue.match(ye))return me(ve,pr,Nr);if(ue.match(/^#+0+$/))return Nr+s(pr,ue.length-ue.indexOf("0"));if(ve=ue.match(Pe))return J=(""+de).replace(/^([^\.]+)$/,"$1."+Ye(ve[1])).replace(/\.$/,"."+Ye(ve[1])),J=J.replace(/\.(\d*)$/,function(I,V){return"."+V+o("0",Ye(ve[1]).length-V.length)}),ue.indexOf("0.")!==-1?J:J.replace(/^0\./,".");if(ue=ue.replace(/^#+([0.])/,"$1"),ve=ue.match(/^(0*)\.(#*)$/))return Nr+(""+pr).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,ve[1].length?"0.":".");if(ve=ue.match(/^#{1,3},##0(\.?)$/))return Nr+N(""+pr);if(ve=ue.match(/^#,##0\.([#0]*0)$/))return de<0?"-"+ht(Re,ue,-de):N(""+de)+"."+o("0",ve[1].length);if(ve=ue.match(/^#,#*,#0/))return ht(Re,ue.replace(/^#,#*,/,""),de);if(ve=ue.match(/^([0#]+)(\\?-([0#]+))+$/))return J=a(ht(Re,ue.replace(/[\\-]/g,""),de)),Ee=0,a(a(ue.replace(/\\/g,"")).replace(/[0#]/g,function(I){return Ee-1||j=="\\"&&$.charAt(q+1)=="-"&&"0#".indexOf($.charAt(q+2))>-1););break;case"?":for(;$.charAt(++q)===j;);break;case"*":++q,($.charAt(q)==" "||$.charAt(q)=="*")&&++q;break;case"(":case")":++q;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;q<$.length&&"0123456789".indexOf($.charAt(++q))>-1;);break;case" ":++q;break;default:++q;break}return!1}i.is_date=R;function ne($,q,j,he){for(var Q=[],ye="",ie=0,me="",Pe="t",Oe,Ge,Ye,Ct="H";ie<$.length;)switch(me=$.charAt(ie)){case"G":if(!p($,ie))throw new Error("unrecognized character "+me+" in "+$);Q[Q.length]={t:"G",v:"General"},ie+=7;break;case'"':for(ye="";(Ye=$.charCodeAt(++ie))!==34&&ie<$.length;)ye+=String.fromCharCode(Ye);Q[Q.length]={t:"t",v:ye},++ie;break;case"\\":var Zt=$.charAt(++ie),qe=Zt==="("||Zt===")"?Zt:"t";Q[Q.length]={t:qe,v:Zt},++ie;break;case"_":Q[Q.length]={t:"t",v:" "},ie+=2;break;case"@":Q[Q.length]={t:"T",v:q},++ie;break;case"B":case"b":if($.charAt(ie+1)==="1"||$.charAt(ie+1)==="2"){if(Oe==null&&(Oe=C(q,j,$.charAt(ie+1)==="2"),Oe==null))return"";Q[Q.length]={t:"X",v:$.substr(ie,2)},Pe=me,ie+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":me=me.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(q<0||Oe==null&&(Oe=C(q,j),Oe==null))return"";for(ye=me;++ie<$.length&&$.charAt(ie).toLowerCase()===me;)ye+=me;me==="m"&&Pe.toLowerCase()==="h"&&(me="M"),me==="h"&&(me=Ct),Q[Q.length]={t:me,v:ye},Pe=me;break;case"A":case"a":case"上":var Me={t:me,v:me};if(Oe==null&&(Oe=C(q,j)),$.substr(ie,3).toUpperCase()==="A/P"?(Oe!=null&&(Me.v=Oe.H>=12?"P":"A"),Me.t="T",Ct="h",ie+=3):$.substr(ie,5).toUpperCase()==="AM/PM"?(Oe!=null&&(Me.v=Oe.H>=12?"PM":"AM"),Me.t="T",ie+=5,Ct="h"):$.substr(ie,5).toUpperCase()==="上午/下午"?(Oe!=null&&(Me.v=Oe.H>=12?"下午":"上午"),Me.t="T",ie+=5,Ct="h"):(Me.t="t",++ie),Oe==null&&Me.t==="T")return"";Q[Q.length]=Me,Pe=me;break;case"[":for(ye=me;$.charAt(ie++)!=="]"&&ie<$.length;)ye+=$.charAt(ie);if(ye.slice(-1)!=="]")throw'unterminated "[" block: |'+ye+"|";if(ye.match(H)){if(Oe==null&&(Oe=C(q,j),Oe==null))return"";Q[Q.length]={t:"Z",v:ye.toLowerCase()},Pe=ye.charAt(1)}else ye.indexOf("$")>-1&&(ye=(ye.match(/\$([^-\[\]]*)/)||[])[1]||"$",R($)||(Q[Q.length]={t:"t",v:ye}));break;case".":if(Oe!=null){for(ye=me;++ie<$.length&&(me=$.charAt(ie))==="0";)ye+=me;Q[Q.length]={t:"s",v:ye};break}case"0":case"#":for(ye=me;++ie<$.length&&"0#?.,E+-%".indexOf(me=$.charAt(ie))>-1;)ye+=me;Q[Q.length]={t:"n",v:ye};break;case"?":for(ye=me;$.charAt(++ie)===me;)ye+=me;Q[Q.length]={t:me,v:ye},Pe=me;break;case"*":++ie,($.charAt(ie)==" "||$.charAt(ie)=="*")&&++ie;break;case"(":case")":Q[Q.length]={t:he===1?"t":me,v:me},++ie;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(ye=me;ie<$.length&&"0123456789".indexOf($.charAt(++ie))>-1;)ye+=$.charAt(ie);Q[Q.length]={t:"D",v:ye};break;case" ":Q[Q.length]={t:me,v:me},++ie;break;case"$":Q[Q.length]={t:"t",v:"$"},++ie;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(me)===-1)throw new Error("unrecognized character "+me+" in "+$);Q[Q.length]={t:"t",v:me},++ie;break}var At=0,lt=0,Sr;for(ie=Q.length-1,Pe="t";ie>=0;--ie)switch(Q[ie].t){case"h":case"H":Q[ie].t=Ct,Pe="h",At<1&&(At=1);break;case"s":(Sr=Q[ie].v.match(/\.0+$/))&&(lt=Math.max(lt,Sr[0].length-1)),At<3&&(At=3);case"d":case"y":case"M":case"e":Pe=Q[ie].t;break;case"m":Pe==="s"&&(Q[ie].t="M",At<2&&(At=2));break;case"X":break;case"Z":At<1&&Q[ie].v.match(/[Hh]/)&&(At=1),At<2&&Q[ie].v.match(/[Mm]/)&&(At=2),At<3&&Q[ie].v.match(/[Ss]/)&&(At=3)}switch(At){case 0:break;case 1:Oe.u>=.5&&(Oe.u=0,++Oe.S),Oe.S>=60&&(Oe.S=0,++Oe.M),Oe.M>=60&&(Oe.M=0,++Oe.H);break;case 2:Oe.u>=.5&&(Oe.u=0,++Oe.S),Oe.S>=60&&(Oe.S=0,++Oe.M);break}var Vt="",ht;for(ie=0;ie0){Vt.charCodeAt(0)==40?(ue=q<0&&Vt.charCodeAt(0)===45?-q:q,de=z("n",Vt,ue)):(ue=q<0&&he>1?-q:q,de=z("n",Vt,ue),ue<0&&Q[0]&&Q[0].t=="t"&&(de=de.substr(1),Q[0].v="-"+Q[0].v)),ht=de.length-1;var at=Q.length;for(ie=0;ie-1){at=ie;break}var J=Q.length;if(at===Q.length&&de.indexOf("E")===-1){for(ie=Q.length-1;ie>=0;--ie)Q[ie]==null||"n?".indexOf(Q[ie].t)===-1||(ht>=Q[ie].v.length-1?(ht-=Q[ie].v.length,Q[ie].v=de.substr(ht+1,Q[ie].v.length)):ht<0?Q[ie].v="":(Q[ie].v=de.substr(0,ht+1),ht=-1),Q[ie].t="t",J=ie);ht>=0&&J=0;--ie)if(!(Q[ie]==null||"n?".indexOf(Q[ie].t)===-1)){for(Ge=Q[ie].v.indexOf(".")>-1&&ie===at?Q[ie].v.indexOf(".")-1:Q[ie].v.length-1,Re=Q[ie].v.substr(Ge+1);Ge>=0;--Ge)ht>=0&&(Q[ie].v.charAt(Ge)==="0"||Q[ie].v.charAt(Ge)==="#")&&(Re=de.charAt(ht--)+Re);Q[ie].v=Re,Q[ie].t="t",J=ie}for(ht>=0&&J-1&&ie===at?Q[ie].v.indexOf(".")+1:0,Re=Q[ie].v.substr(0,Ge);Ge-1&&(ue=he>1&&q<0&&ie>0&&Q[ie-1].v==="-"?-q:q,Q[ie].v=z(Q[ie].t,Q[ie].v,ue),Q[ie].t="t");var ve="";for(ie=0;ie!==Q.length;++ie)Q[ie]!=null&&(ve+=Q[ie].v);return ve}i._eval=ne;var te=/\[[=<>]/,fe=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Ce($,q){if(q==null)return!1;var j=parseFloat(q[2]);switch(q[1]){case"=":if($==j)return!0;break;case">":if($>j)return!0;break;case"<":if($":if($!=j)return!0;break;case">=":if($>=j)return!0;break;case"<=":if($<=j)return!0;break}return!1}function Te($,q){var j=W($),he=j.length,Q=j[he-1].indexOf("@");if(he<4&&Q>-1&&--he,j.length>4)throw new Error("cannot find right format for |"+j.join("|")+"|");if(typeof q!="number")return[4,j.length===4||Q>-1?j[j.length-1]:"@"];switch(j.length){case 1:j=Q>-1?["General","General","General",j[0]]:[j[0],j[0],j[0],"@"];break;case 2:j=Q>-1?[j[0],j[0],j[0],j[1]]:[j[0],j[1],j[0],"@"];break;case 3:j=Q>-1?[j[0],j[1],j[0],j[2]]:[j[0],j[1],j[2],"@"];break}var ye=q>0?j[0]:q<0?j[1]:j[2];if(j[0].indexOf("[")===-1&&j[1].indexOf("[")===-1)return[he,ye];if(j[0].match(te)!=null||j[1].match(te)!=null){var ie=j[0].match(fe),me=j[1].match(fe);return Ce(q,ie)?[he,j[0]]:Ce(q,me)?[he,j[1]]:[he,j[ie!=null&&me!=null?2:1]]}return[he,ye]}function Se($,q,j){j==null&&(j={});var he="";switch(typeof $){case"string":$=="m/d/yy"&&j.dateNF?he=j.dateNF:he=$;break;case"number":$==14&&j.dateNF?he=j.dateNF:he=(j.table!=null?j.table:y)[$],he==null&&(he=j.table&&j.table[b[$]]||y[b[$]]),he==null&&(he=w[$]||"General");break}if(p(he,0))return T(q,j);q instanceof Date&&(q=E(q,j.date1904));var Q=Te(he,q);if(p(Q[1]))return T(q,j);if(q===!0)q="TRUE";else if(q===!1)q="FALSE";else if(q===""||q==null)return"";return ne(Q[1],q,j,Q[0])}function _e($,q){if(typeof q!="number"){q=+q||-1;for(var j=0;j<392;++j){if(y[j]==null){q<0&&(q=j);continue}if(y[j]==$){q=j;break}}q<0&&(q=391)}return y[q]=$,q}i.load=_e,i._table=y,i.get_table=function(){return y},i.load_table=function(q){for(var j=0;j!=392;++j)q[j]!==void 0&&_e(q[j],j)},i.init_table=m,i.format=Se};t(e),typeof DO_NOT_EXPORT_SSF>"u"&&(r.exports=e)})(X$);var V0e=X$.exports;const Ug=gv(V0e),U0e="customFormattingSettings",ef="auto",G0e=3,H0e=[{name:"year",description:'When lowerCase(columnName)="year" with the column having numeric values will result in no formatting',matchingFunction:(r,e,t)=>r&&e?r.toLowerCase()==="year"&&((e==null?void 0:e.evidenceType)==="number"||(t==null?void 0:t.unitType)==="number"):!1,format:{formatCode:ef,valueType:"number",exampleInput:2013,_autoFormat:{autoFormatCode:"@",truncateUnits:!1}}},{name:"id",description:'When lowerCase(columnName)="id" with the column having numeric values, then values will have no formatting',matchingFunction:(r,e,t)=>r&&e?r.toLowerCase()==="id"&&((e==null?void 0:e.evidenceType)==="number"||(t==null?void 0:t.unitType)==="number"):!1,format:{formatCode:ef,valueType:"number",exampleInput:93120121,_autoFormat:{autoFormatFunction:r=>r!=null&&!isNaN(r)?r.toLocaleString("fullwide",{useGrouping:!1}):r}}},{name:"defaultDate",description:"Formatting for Default Date",matchingFunction:(r,e,t)=>e?(e==null?void 0:e.evidenceType)==="date"||(t==null?void 0:t.unitType)==="date":!1,format:{formatCode:ef,valueType:"date",exampleInput:"Sat Jan 01 2022 03:15:00 GMT-0500",_autoFormat:{autoFormatCode:"YYYY-MM-DD",truncateUnits:!1}}}],CL=(r,e)=>{switch(e){case"T":return r/1e12;case"B":return r/1e9;case"M":return r/1e6;case"k":return r/1e3;default:return r}},W0e=(r,e)=>{var i,a,o;let t=((i=e||r.formatCode)==null?void 0:i.toLowerCase())===ef,n=((a=r._autoFormat)==null?void 0:a.autoFormatFunction)||((o=r._autoFormat)==null?void 0:o.autoFormatCode);return!!(t&&n!==void 0)},AL=(r,e=7)=>{let t,n="",i=r==null?void 0:r.median,a;if(i!==void 0){let o;n=Q$(i),n?(o=CL(i,n),a=!0):(o=i,a=!1),r.maxDecimals===0&&!a?t="#,##0":t=Y0e(o,e)}else t="#,##0",a=!1;return{formatCode:ef,valueType:"number",_autoFormat:{autoFormatCode:t,truncateUnits:a,columnUnits:n}}},$0e=(r,e,t)=>{let n=H0e.find(i=>i.matchingFunction(r,e,t));if(n)return n.format;if((t==null?void 0:t.unitType)==="number")return AL(t)},j0e=(r,e,t=void 0)=>{var n,i,a;if((n=e._autoFormat)!=null&&n.autoFormatFunction)return e._autoFormat.autoFormatFunction(r,e,t);if(e._autoFormat.autoFormatCode){let o=(i=e==null?void 0:e._autoFormat)==null?void 0:i.autoFormatCode;if(e.valueType==="number"){let l=(a=e==null?void 0:e._autoFormat)==null?void 0:a.truncateUnits,u=r,c="";return l&&(t==null?void 0:t.median)!==void 0&&(c=Q$(t.median),u=CL(r,c)),Ug.format(o,u)+c}else return Ug.format(o,r)}else console.warn("autoFormat called without a formatCode or function");return r},q0e=r=>typeof r=="number"?r.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:2}):r!=null?r==null?void 0:r.toString():"-";function Y0e(r,e=7,t=G0e){let n="#,##0",i=Z0e(r),a=0;return i-t<0&&(a=Math.min(Math.max(Math.abs(i-t+1),0),e)),a>0&&(n+=".",n+="0".repeat(a)),n}function Q$(r){let e=Math.abs(r);return e>=5e12?"T":e>=5e9?"B":e>=5e6?"M":e>=5e3?"k":""}function Z0e(r){return r===0?0:Math.floor(Math.log10(r))}const K0e=[{primaryCode:"usd",currencySymbol:"$",displayName:"USD - United States Dollar"},{primaryCode:"aud",currencySymbol:"A$",displayName:"AUD - Australian Dollar",escapeCurrencySymbol:!0},{primaryCode:"brl",currencySymbol:"R$",displayName:"BRL - Brazilian Real",escapeCurrencySymbol:!0},{primaryCode:"cad",currencySymbol:"C$",displayName:"CAD - Canadian Dollar",escapeCurrencySymbol:!0},{primaryCode:"cny",currencySymbol:"¥",displayName:"CNY - Renminbi",escapeCurrencySymbol:!0},{primaryCode:"eur",currencySymbol:"€",displayName:"EUR - Euro"},{primaryCode:"gbp",currencySymbol:"£",displayName:"GBP - Pound Sterling",escapeCurrencySymbol:!0},{primaryCode:"jpy",currencySymbol:"¥",displayName:"JPY - Japanese Yen",escapeCurrencySymbol:!0},{primaryCode:"inr",currencySymbol:"₹",displayName:"INR - Indian Rupee",escapeCurrencySymbol:!0},{primaryCode:"krw",currencySymbol:"₩",displayName:"KRW - South Korean won",escapeCurrencySymbol:!0},{primaryCode:"ngn",currencySymbol:"₦",displayName:"NGN - Nigerian Naira",escapeCurrencySymbol:!0},{primaryCode:"rub",currencySymbol:"rub",displayName:"RUB - Russian Ruble",escapeCurrencySymbol:!0},{primaryCode:"sek",currencySymbol:"kr",displayName:"SEK - Swedish Krona",escapeCurrencySymbol:!0}],X0e=[{derivedSuffix:"",valueFormatCode:"#,##0",exampleInput:412.17,auto:!0},{derivedSuffix:"0",valueFormatCode:"#,##0",exampleInput:7043.123},{derivedSuffix:"1",valueFormatCode:"#,##0.0",exampleInput:7043.123},{derivedSuffix:"2",valueFormatCode:"#,##0.00",exampleInput:7043.123},{derivedSuffix:"0k",valueFormatCode:'#,##0,"k"',exampleInput:64301.12},{derivedSuffix:"1k",valueFormatCode:'#,##0.0,"k"',exampleInput:64301.12},{derivedSuffix:"2k",valueFormatCode:'#,##0.00,"k"',exampleInput:64301.12},{derivedSuffix:"0m",valueFormatCode:'#,##0,,"M"',exampleInput:456430112e-2},{derivedSuffix:"1m",valueFormatCode:'#,##0.0,,"M"',exampleInput:456430112e-2},{derivedSuffix:"2m",valueFormatCode:'#,##0.00,,"M"',exampleInput:456430112e-2},{derivedSuffix:"0b",valueFormatCode:'#,##0,,,"B"',exampleInput:978456430112e-2},{derivedSuffix:"1b",valueFormatCode:'#,##0.0,,,"B"',exampleInput:978456430112e-2},{derivedSuffix:"2b",valueFormatCode:'#,##0.00,,,"B"',exampleInput:978456430112e-2}],Q0e=K0e.map(r=>{let e=[];return X0e.forEach(t=>{let n={formatTag:r.primaryCode+t.derivedSuffix,parentFormat:r.primaryCode,formatCategory:"currency",valueType:"number",exampleInput:t.exampleInput,titleTagReplacement:` (${r.currencySymbol})`},i=r.escapeCurrencySymbol?`"${r.currencySymbol}"`:r.currencySymbol;t.auto||ef===t.formatCode?(n.formatCode=ef,n._autoFormat={autoFormatFunction:(a,o,s)=>{let l=AL(s,2),u=`${i}${l._autoFormat.autoFormatCode}`,c="",f=a;return l._autoFormat.truncateUnits&&l._autoFormat.columnUnits?(c=l._autoFormat.columnUnits,f=CL(a,l._autoFormat.columnUnits)):u.endsWith(".0")&&(u=u+"0"),Ug.format(u,f)+c}}):n.formatCode=`${i}${t.valueFormatCode}`,t.axisValueFormatCode&&(n.axisFormatCode=t.axisValueFormatCode),e.push(n)}),e}).flat(),J$=[...Q0e,{formatTag:"ddd",formatCode:"ddd",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"dddd",formatCode:"dddd",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"mmm",formatCode:"mmm",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"mmmm",formatCode:"mmmm",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"yyyy",formatCode:"yyyy",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"shortdate",formatCode:"mmm d/yy",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"longdate",formatCode:"mmmm d, yyyy",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"fulldate",formatCode:"dddd mmmm d, yyyy",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"mdy",formatCode:"m/d/y",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"dmy",formatCode:"d/m/y",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09 12:45"},{formatTag:"hms",formatCode:"H:MM:SS AM/PM",formatCategory:"date",valueType:"date",exampleInput:"2022-01-09T11:45:03"},{formatTag:"num0",formatCode:"#,##0",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num1",formatCode:"#,##0.0",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num2",formatCode:"#,##0.00",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num3",formatCode:"#,##0.000",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num4",formatCode:"#,##0.0000",formatCategory:"number",valueType:"number",exampleInput:11.23168},{formatTag:"num0k",formatCode:'#,##0,"k"',formatCategory:"number",valueType:"number",exampleInput:64201},{formatTag:"num1k",formatCode:'#,##0.0,"k"',formatCategory:"number",valueType:"number",exampleInput:64201},{formatTag:"num2k",formatCode:'#,##0.00,"k"',formatCategory:"number",valueType:"number",exampleInput:64201},{formatTag:"num0m",formatCode:'#,##0,,"M"',formatCategory:"number",valueType:"number",exampleInput:42539483},{formatTag:"num1m",formatCode:'#,##0.0,,"M"',formatCategory:"number",valueType:"number",exampleInput:42539483},{formatTag:"num2m",formatCode:'#,##0.00,,"M"',formatCategory:"number",valueType:"number",exampleInput:42539483},{formatTag:"num0b",formatCode:'#,##0,,,"B"',formatCategory:"number",valueType:"number",exampleInput:1384937584},{formatTag:"num1b",formatCode:'#,##0.0,,,"B"',formatCategory:"number",valueType:"number",exampleInput:1384937584},{formatTag:"num2b",formatCode:'#,##0.00,,,"B"',formatCategory:"number",valueType:"number",exampleInput:1384937584},{formatTag:"id",formatCode:"0",formatCategory:"number",valueType:"number",exampleInput:"921594675",titleTagReplacement:" id"},{formatTag:"fract",formatCode:"# ?/?",formatCategory:"number",valueType:"number",exampleInput:"0.25"},{formatTag:"mult",formatCode:'#,##0.0"x"',formatCategory:"number",valueType:"number",exampleInput:"5.32"},{formatTag:"mult0",formatCode:'#,##0"x"',formatCategory:"number",valueType:"number",exampleInput:"5.32"},{formatTag:"mult1",formatCode:'#,##0.0"x"',formatCategory:"number",valueType:"number",exampleInput:"5.32"},{formatTag:"mult2",formatCode:'#,##0.00"x"',formatCategory:"number",valueType:"number",exampleInput:"5.32"},{formatTag:"sci",formatCode:"0.00E+0",formatCategory:"number",valueType:"number",exampleInput:"16546.1561"},{formatTag:"pct",formatCode:ef,formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:"",_autoFormat:{autoFormatFunction:(r,e,t)=>{if((t==null?void 0:t.unitType)==="number"){let n={min:t.min*100,max:t.max*100,median:t.median*100,maxDecimals:Math.max(t.maxDecimals-2,0),unitType:t.unitType},i=AL(n);return Ug.format(i._autoFormat.autoFormatCode,r*100)+"%"}else return Ug.format("#,##0%",r)}}},{formatTag:"pct0",formatCode:"#,##0%",formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:""},{formatTag:"pct1",formatCode:"#,##0.0%",formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:""},{formatTag:"pct2",formatCode:"#,##0.00%",formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:""},{formatTag:"pct3",formatCode:"#,##0.000%",formatCategory:"percent",valueType:"number",exampleInput:.731,titleTagReplacement:""}];function xL(r,...e){if(typeof r=="function")throw new Error("You must supply the data as the first argument to tidy()");let t=r;for(const n of e)n&&(t=n(t));return t}function J0e(r){return r==null?[]:Array.isArray(r)?r:[r]}function eye(r,e){return re?1:r>=e?0:NaN}function*tye(r,e){if(e===void 0)for(let t of r)t!=null&&(t=+t)>=t&&(yield t);else{let t=-1;for(let n of r)(n=e(n,++t,r))!=null&&(n=+n)>=n&&(yield n)}}class rye{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let i=0;i0){for(o=e[--t];t>0&&(n=o,i=e[--t],o=n+i,a=i-(o-n),!a););t>0&&(a<0&&e[t-1]<0||a>0&&e[t-1]>0)&&(i=a*2,n=o+i,i==n-o&&(o=n))}return o}}function ej(r,e){const t=new rye;if(e===void 0)for(let n of r)(n=+n)&&t.add(n);else{let n=-1;for(let i of r)(i=+e(i,++n,r))&&t.add(i)}return+t}class nye extends Map{constructor(e,t=oye){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(I4(this,e))}has(e){return super.has(I4(this,e))}set(e,t){return super.set(iye(this,e),t)}delete(e){return super.delete(aye(this,e))}}function I4({_intern:r,_key:e},t){const n=e(t);return r.has(n)?r.get(n):t}function iye({_intern:r,_key:e},t){const n=e(t);return r.has(n)?r.get(n):(r.set(n,t),t)}function aye({_intern:r,_key:e},t){const n=e(t);return r.has(n)&&(t=r.get(t),r.delete(n)),t}function oye(r){return r!==null&&typeof r=="object"?r.valueOf():r}function L4(r){return r}function sye(r,...e){return lye(r,L4,L4,e)}function lye(r,e,t,n){return function i(a,o){if(o>=n.length)return t(a);const s=new nye,l=n[o++];let u=-1;for(const c of a){const f=l(c,++u,a),h=s.get(f);h?h.push(c):s.set(f,[c])}for(const[c,f]of s)s.set(c,i(f,o));return e(s)}(r,0)}function BT(r,e){let t;if(e===void 0)for(const n of r)n!=null&&(t=n)&&(t=n);else{let n=-1;for(let i of r)(i=e(i,++n,r))!=null&&(t=i)&&(t=i)}return t}function OT(r,e){let t;if(e===void 0)for(const n of r)n!=null&&(t>n||t===void 0&&n>=n)&&(t=n);else{let n=-1;for(let i of r)(i=e(i,++n,r))!=null&&(t>i||t===void 0&&i>=i)&&(t=i)}return t}function tj(r,e,t=0,n=r.length-1,i=eye){for(;n>t;){if(n-t>600){const l=n-t+1,u=e-t+1,c=Math.log(l),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(l-f)/l)*(u-l/2<0?-1:1),d=Math.max(t,Math.floor(e-u*f/l+h)),p=Math.min(n,Math.floor(e+(l-u)*f/l+h));tj(r,e,d,p,i)}const a=r[e];let o=t,s=n;for(nm(r,t,e),i(r[n],a)>0&&nm(r,t,n);o0;)--s}i(r[t],a)===0?nm(r,t,s):(++s,nm(r,s,n)),s<=e&&(t=s+1),e<=s&&(n=s-1)}return r}function nm(r,e,t){const n=r[e];r[e]=r[t],r[t]=n}function uye(r,e,t){if(r=Float64Array.from(tye(r,t)),!!(n=r.length)){if((e=+e)<=0||n<2)return OT(r);if(e>=1)return BT(r);var n,i=(n-1)*e,a=Math.floor(i),o=BT(tj(r,a).subarray(0,a+1)),s=OT(r.subarray(a+1));return o+(s-o)*(i-a)}}function cye(r,e){return uye(r,.5,e)}function F4(r,e){return n=>{e=e??{};const i={},a=Object.keys(r);for(const o of a)i[o]=r[o](n);if(e.rest&&n.length){const o=Object.keys(n[0]);for(const s of o)a.includes(s)||(i[s]=e.rest(s)(n))}return[i]}}function rj(r){return t=>{const n=t.map(a=>({...a}));let i=0;for(const a of n){for(const o in r){const s=r[o],l=typeof s=="function"?s(a,i,n):s;a[o]=l}++i}return n}}function HS(r,e){if(r==null||typeof r!="object"||Array.isArray(r))return r;const t=Object.fromEntries(e.filter(n=>typeof n[0]!="function"&&n[0]!=null));return Object.assign(t,r)}function qC(r,e,t,n,i,a=0){for(const[o,s]of r.entries()){const l=[...t,o];if(s instanceof Map){const u=n(e,l,a);qC(s,u,l,n,i,a+1)}else i(e,l,s,a)}return e}function fye(r,e,t=n=>n[n.length-1]){function n(o,s){const l=new Map;return o.set(t(s),l),l}function i(o,s,l){o.set(t(s),e(l,s))}const a=new Map;return qC(r,a,[],n,i),a}const WS=r=>r;function hye(r){const e=typeof r;return r!=null&&(e==="object"||e==="function")}function If(r,e,t){return typeof e=="function"?e=[e]:arguments.length===2&&e!=null&&!Array.isArray(e)&&(t=e),i=>{const a=pye(i,r),o=dye(a,e,t==null?void 0:t.addGroupKeys);if(t!=null&&t.export)switch(t.export){case"grouped":return o;case"levels":return Ox(o,t);case"entries-obj":case"entriesObject":return Ox(o,{...t,export:"levels",levels:["entries-object"]});default:return Ox(o,{...t,export:"levels",levels:[t.export]})}return gye(o,t==null?void 0:t.addGroupKeys)}}If.grouped=r=>({...r,export:"grouped"});If.entries=r=>({...r,export:"entries"});If.entriesObject=r=>({...r,export:"entries-object"});If.object=r=>({...r,export:"object"});If.map=r=>({...r,export:"map"});If.keys=r=>({...r,export:"keys"});If.values=r=>({...r,export:"values"});If.levels=r=>({...r,export:"levels"});function dye(r,e,t){let n=r;if(!(e!=null&&e.length))return n;for(const i of e)i&&(n=fye(n,(a,o)=>{let l=i(a,{groupKeys:o});return t!==!1&&(l=l.map(u=>HS(u,o))),l}));return n}function pye(r,e){const t=J0e(e).map((i,a)=>{const o=typeof i=="function"?i:l=>l[i],s=new Map;return l=>{const u=o(l),c=hye(u)?u.valueOf():u;if(s.has(c))return s.get(c);const f=[i,u];return s.set(c,f),f}});return sye(r,...t)}function gye(r,e){const t=[];return qC(r,t,[],WS,(n,i,a)=>{let o=a;e!==!1&&(o=a.map(s=>HS(s,i))),n.push(...o)}),t}const vye=r=>r.join("/");function mye(r){var e;const{flat:t,single:n,mapLeaf:i=WS,mapLeaves:a=WS,addGroupKeys:o}=r;let s;return r.flat&&(s=(e=r.compositeKey)!=null?e:vye),{groupFn:(c,f)=>n?i(o===!1?c[0]:HS(c[0],f)):a(c.map(h=>i(o===!1?h:HS(h,f)))),keyFn:t?c=>s(c.map(f=>f[1])):c=>c[c.length-1][1]}}function Ox(r,e){const{groupFn:t,keyFn:n}=mye(e);let{mapEntry:i=WS}=e;const{levels:a=["entries"]}=e,o=[];for(const c of a)switch(c){case"entries":case"entries-object":case"entries-obj":case"entriesObject":{const f=(c==="entries-object"||c==="entries-obj"||c==="entriesObject")&&e.mapEntry==null?([h,d])=>({key:h,values:d}):i;o.push({id:"entries",createEmptySubgroup:()=>[],addSubgroup:(h,d,p,g)=>{h.push(f([p,d],g))},addLeaf:(h,d,p,g)=>{h.push(f([d,p],g))}});break}case"map":o.push({id:"map",createEmptySubgroup:()=>new Map,addSubgroup:(f,h,d)=>{f.set(d,h)},addLeaf:(f,h,d)=>{f.set(h,d)}});break;case"object":o.push({id:"object",createEmptySubgroup:()=>({}),addSubgroup:(f,h,d)=>{f[d]=h},addLeaf:(f,h,d)=>{f[h]=d}});break;case"keys":o.push({id:"keys",createEmptySubgroup:()=>[],addSubgroup:(f,h,d)=>{f.push([d,h])},addLeaf:(f,h)=>{f.push(h)}});break;case"values":o.push({id:"values",createEmptySubgroup:()=>[],addSubgroup:(f,h)=>{f.push(h)},addLeaf:(f,h,d)=>{f.push(d)}});break;default:typeof c=="object"&&o.push(c)}const s=(c,f,h)=>{var d,p;if(e.flat)return c;const g=(d=o[h])!=null?d:o[o.length-1],m=((p=o[h+1])!=null?p:g).createEmptySubgroup();return g.addSubgroup(c,m,n(f),h),m},l=(c,f,h,d)=>{var p;((p=o[d])!=null?p:o[o.length-1]).addLeaf(c,n(f),t(h,f),d)},u=o[0].createEmptySubgroup();return qC(r,u,[],s,l)}function B4(r){if(r!=null&&r.predicate){const e=r.predicate;return t=>t.reduce((n,i,a)=>e(i,a,t)?n+1:n,0)}return e=>e.length}function yye(r,e){let t=typeof r=="function"?r:n=>n[r];return n=>ej(n,t)}function bye(r,e){let t=0;for(let n=0;nt[r];return t=>OT(t,e)}function wye(r){const e=typeof r=="function"?r:t=>t[r];return t=>BT(t,e)}function Sye(r){const e=typeof r=="function"?r:t=>t[r];return t=>bye(t,e)}function Cye(r){const e=typeof r=="function"?r:t=>t[r];return t=>cye(t,e)}function O4(r,e={}){const t=typeof r=="function"?r:n=>n[r];return n=>{const i=new Map;let a=0,o=0;for(const s of n){const l=t(s,o++,n);if(!i.has(l)){if(!e.includeUndefined&&l===void 0||e.includeNull===!1&&l===null)continue;a+=1,i.set(l,!0)}}return a}}function DL(r){if(r&&typeof r=="string"){let e=r.split(" ");r.includes(":")||(r=r+"T00:00:00"),e.length>2&&(r=e[0]+" "+e[1]);const t=/\.([^\s]+)/;r=r.replace(t,""),r=r.replace("Z",""),r=r.replace(" ","T")}return r}function Aye(r,e){return r=xL(r,rj({[e]:t=>t[e]?new Date(DL(t[e])):null})),r}function dZe(r,e){return r=xL(r,rj({[e]:t=>DL(t[e])})),r}var Vc;(function(r){r.BOOLEAN="boolean",r.NUMBER="number",r.STRING="string",r.DATE="date"})(Vc||(Vc={}));var fy;(function(r){r.INFERRED="inferred",r.PRECISE="precise"})(fy||(fy={}));const nj=function(r){return typeof r=="number"?Vc.NUMBER:typeof r=="boolean"?Vc.BOOLEAN:r instanceof Date?Vc.DATE:Vc.STRING};function xye(r){if(r!=null&&r._evidenceColumnTypes)return r._evidenceColumnTypes;if(r&&r.length>0){let e=Object.keys(r[0]);return e==null?void 0:e.map(n=>{let i=r.find(a=>a[n]!=null);if(i){let a=nj(i[n]);return{name:n,evidenceType:a,typeFidelity:fy.INFERRED}}else return{name:n,evidenceType:Vc.STRING,typeFidelity:fy.INFERRED}})}return[]}const ij="axis",hy="value",aj=()=>{var r;try{return((r=Od(U0e))==null?void 0:r.getCustomFormats())||[]}catch{return[]}},Dye=(r,e,t)=>{let n=Mye(r);if(e.evidenceType==="string")return;if(n){let a=aj(),o=[...J$,...a].find(s=>{var l,u;return((l=s.formatTag)==null?void 0:l.toLowerCase())===((u=n==null?void 0:n.toLowerCase)==null?void 0:u.call(n))});if(o)return o}let i=$0e(r,e,t);if(i)return i};function Di(r,e=void 0){let t=r,n=aj(),i=[...J$,...n].find(o=>{var s,l;return((s=o.formatTag)==null?void 0:s.toLowerCase())===((l=t==null?void 0:t.toLowerCase)==null?void 0:l.call(t))}),a={};return i||(a={formatTag:"custom",formatCode:t},e&&(a.valueType=e),a)}const qn=(r,e=void 0,t=void 0)=>{try{return EL(r,e,t,hy)}catch(n){return console.warn(`Unexpected error calling applyFormatting(${r}, ${e}, ${hy}, ${t}). Error=${n}`),r}},pZe=(r,e=void 0,t=void 0)=>{try{return EL(r,e,t,ij)}catch{}return r},Eye=(r,e)=>{let t=r;if(r&&(e!=null&&e.formatTag)){let n=r.toLowerCase().lastIndexOf(`_${e.formatTag.toLowerCase()}`),i="";n>0&&(typeof(e==null?void 0:e.titleTagReplacement)=="string"&&(i=e.titleTagReplacement),t=r.substring(0,n)+i)}return t},kye=r=>{switch(r){case"number":return 1234;case"date":return"2022-01-03";default:return}},gZe=r=>{var n,i;let t=((n=r.userInput)==null?void 0:n.trim())||r.exampleInput||kye(r.valueType);if(t)try{let a;if(r.valueType==="number"){let o=Number(t);a={min:o,max:o,median:o,maxDecimals:((i=o.toString().split(".")[1])==null?void 0:i.length)||0,unitType:"number"}}return EL(t,r,a,hy)}catch{}return""};function EL(r,e=void 0,t=void 0,n=hy){if(r==null)return"-";let i;if(e)try{let a=Tye(e,n),o;try{e.valueType==="date"&&typeof r=="string"?o=new Date(DL(r)):r instanceof Date?o=new Date(r.toISOString().slice(0,-1)):e.valueType==="number"&&typeof r!="number"&&!Number.isNaN(r)?o=Number(r):o=r}catch{o=r}if(W0e(e,a))try{i=j0e(o,e,t)}catch(s){console.warn(`Unexpected error applying auto formatting. Error=${s}`)}else i=Ug.format(a,o)}catch(a){console.warn(`Unexpected error applying formatting ${a}`)}return i===void 0&&(i=q0e(r)),i}function Tye(r,e=hy){return typeof r=="string"?r:e===ij&&(r!=null&&r.axisFormatCode)?r.axisFormatCode:r==null?void 0:r.formatCode}function Mye(r){let e=r.toLowerCase(),t=e.lastIndexOf("_");if(t>0)return e.substr(t).replace("_","")}function vZe(r,e){let t=Di(e),n=nj(r);return t.valueType=n,qn(r,t)}function Iye(r,e){let t=Eye(r,e),n=["id","gdp"],i=["of","the","and","in","on"];function a(o){return o.replace(/\S*/g,function(s){return!n.includes(s)&&!i.includes(s)?s.charAt(0).toUpperCase()+s.substr(1).toLowerCase():n.includes(s)?s.toUpperCase():s.toLowerCase()})}return t=a(r.replace(/"/g,"").replace(/_/g," ")),t}function Lye(r){let e,t,n="View environment variables →";return{c(){e=oe("br"),t=oe("a"),t.textContent=n,this.h()},l(i){e=se(i,"BR",{}),t=se(i,"A",{class:!0,href:!0,"data-svelte-h":!0}),kt(t)!=="svelte-1aqcg07"&&(t.textContent=n),this.h()},h(){Y(t,"class","text-primary hover:brightness-110 active:brightness-90 transition"),Y(t,"href","https://docs.evidence.dev/cli/#environment-variables")},m(i,a){le(i,e,a),le(i,t,a)},d(i){i&&(U(e),U(t))}}}function Fye(r){let e,t,n,i,a,o,s,l,u;function c(d,p){if(d[0]===Bye)return Lye}let f=c(r),h=f&&f(r);return{c(){e=oe("div"),t=oe("div"),n=oe("div"),i=dt(r[1]),a=Le(),o=oe("div"),s=dt(r[0]),l=Le(),h&&h.c(),this.h()},l(d){e=se(d,"DIV",{width:!0,class:!0});var p=ge(e);t=se(p,"DIV",{class:!0});var g=ge(t);n=se(g,"DIV",{class:!0});var v=ge(n);i=pt(v,r[1]),v.forEach(U),a=Fe(g),o=se(g,"DIV",{class:!0});var m=ge(o);s=pt(m,r[0]),l=Fe(m),h&&h.l(m),m.forEach(U),g.forEach(U),p.forEach(U),this.h()},h(){Y(n,"class","font-bold text-center text-lg"),Y(o,"class","text-center [word-wrap:break-work] text-xs"),Y(t,"class","m-auto w-full"),Y(e,"width","100%"),Y(e,"class",u="grid grid-rows-auto box-content grid-cols-1 justify-center bg-negative/10 text-negative font-ui font-normal rounded border border-negative/50 min-h-["+r[2]+"px] py-5 px-8 my-5 print:break-inside-avoid relative")},m(d,p){le(d,e,p),X(e,t),X(t,n),X(n,i),X(t,a),X(t,o),X(o,s),X(o,l),h&&h.m(o,null)},p(d,[p]){p&2&&Rt(i,d[1]),p&1&&Rt(s,d[0]),f!==(f=c(d))&&(h&&h.d(1),h=f&&f(d),h&&(h.c(),h.m(o,null))),p&4&&u!==(u="grid grid-rows-auto box-content grid-cols-1 justify-center bg-negative/10 text-negative font-ui font-normal rounded border border-negative/50 min-h-["+d[2]+"px] py-5 px-8 my-5 print:break-inside-avoid relative")&&Y(e,"class",u)},i:xe,o:xe,d(d){d&&U(e),h&&h.d()}}}const Bye="SQL Error: Missing database connection; set the EVIDENCE_DATABASE environment variable.";function Oye(r,e,t){let{error:n}=e,{chartType:i}=e,{minHeight:a="150"}=e;return r.$$set=o=>{"error"in o&&t(0,n=o.error),"chartType"in o&&t(1,i=o.chartType),"minHeight"in o&&t(2,a=o.minHeight)},[n,i,a]}class kL extends kr{constructor(e){super(),Tr(this,e,Oye,Fye,Mr,{error:0,chartType:1,minHeight:2})}}const sg=(r,e=0,t=1)=>ML(IL(e,r),t),TL=r=>{r._clipped=!1,r._unclipped=r.slice(0);for(let e=0;e<=3;e++)e<3?((r[e]<0||r[e]>255)&&(r._clipped=!0),r[e]=sg(r[e],0,255)):e===3&&(r[e]=sg(r[e],0,1));return r},oj={};for(let r of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])oj[`[object ${r}]`]=r.toLowerCase();function Gr(r){return oj[Object.prototype.toString.call(r)]||"object"}const Wr=(r,e=null)=>r.length>=3?Array.prototype.slice.call(r):Gr(r[0])=="object"&&e?e.split("").filter(t=>r[0][t]!==void 0).map(t=>r[0][t]):r[0],YC=r=>{if(r.length<2)return null;const e=r.length-1;return Gr(r[e])=="string"?r[e].toLowerCase():null},{PI:ZC,min:ML,max:IL}=Math,Su=ZC*2,Px=ZC/3,Pye=ZC/180,Rye=180/ZC,yr={format:{},autodetect:[]};class Qe{constructor(...e){const t=this;if(Gr(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let n=YC(e),i=!1;if(!n){i=!0,yr.sorted||(yr.autodetect=yr.autodetect.sort((a,o)=>o.p-a.p),yr.sorted=!0);for(let a of yr.autodetect)if(n=a.test(...e),n)break}if(yr.format[n]){const a=yr.format[n].apply(null,i?e:e.slice(0,-1));t._rgb=TL(a)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return Gr(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}}const Nye="2.6.0",Xt=(...r)=>new Xt.Color(...r);Xt.Color=Qe;Xt.version=Nye;const zye=(...r)=>{r=Wr(r,"cmyk");const[e,t,n,i]=r,a=r.length>4?r[4]:1;return i===1?[0,0,0,a]:[e>=1?0:255*(1-e)*(1-i),t>=1?0:255*(1-t)*(1-i),n>=1?0:255*(1-n)*(1-i),a]},{max:P4}=Math,Vye=(...r)=>{let[e,t,n]=Wr(r,"rgb");e=e/255,t=t/255,n=n/255;const i=1-P4(e,P4(t,n)),a=i<1?1/(1-i):0,o=(1-e-i)*a,s=(1-t-i)*a,l=(1-n-i)*a;return[o,s,l,i]};Qe.prototype.cmyk=function(){return Vye(this._rgb)};Xt.cmyk=(...r)=>new Qe(...r,"cmyk");yr.format.cmyk=zye;yr.autodetect.push({p:2,test:(...r)=>{if(r=Wr(r,"cmyk"),Gr(r)==="array"&&r.length===4)return"cmyk"}});const Rx=r=>Math.round(r*100)/100,Uye=(...r)=>{const e=Wr(r,"hsla");let t=YC(r)||"lsa";return e[0]=Rx(e[0]||0),e[1]=Rx(e[1]*100)+"%",e[2]=Rx(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]=e.length>3?e[3]:1,t="hsla"):e.length=3,`${t}(${e.join(",")})`},sj=(...r)=>{r=Wr(r,"rgba");let[e,t,n]=r;e/=255,t/=255,n/=255;const i=ML(e,t,n),a=IL(e,t,n),o=(a+i)/2;let s,l;return a===i?(s=0,l=Number.NaN):s=o<.5?(a-i)/(a+i):(a-i)/(2-a-i),e==a?l=(t-n)/(a-i):t==a?l=2+(n-e)/(a-i):n==a&&(l=4+(e-t)/(a-i)),l*=60,l<0&&(l+=360),r.length>3&&r[3]!==void 0?[l,s,o,r[3]]:[l,s,o]},{round:Nx}=Math,Gye=(...r)=>{const e=Wr(r,"rgba");let t=YC(r)||"rgb";return t.substr(0,3)=="hsl"?Uye(sj(e),t):(e[0]=Nx(e[0]),e[1]=Nx(e[1]),e[2]=Nx(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]=e.length>3?e[3]:1,t="rgba"),`${t}(${e.slice(0,t==="rgb"?3:4).join(",")})`)},{round:zx}=Math,PT=(...r)=>{r=Wr(r,"hsl");const[e,t,n]=r;let i,a,o;if(t===0)i=a=o=n*255;else{const s=[0,0,0],l=[0,0,0],u=n<.5?n*(1+t):n+t-n*t,c=2*n-u,f=e/360;s[0]=f+1/3,s[1]=f,s[2]=f-1/3;for(let h=0;h<3;h++)s[h]<0&&(s[h]+=1),s[h]>1&&(s[h]-=1),6*s[h]<1?l[h]=c+(u-c)*6*s[h]:2*s[h]<1?l[h]=u:3*s[h]<2?l[h]=c+(u-c)*(2/3-s[h])*6:l[h]=c;[i,a,o]=[zx(l[0]*255),zx(l[1]*255),zx(l[2]*255)]}return r.length>3?[i,a,o,r[3]]:[i,a,o,1]},lj=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,uj=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,cj=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,fj=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,hj=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,dj=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,{round:R4}=Math,LL=r=>{r=r.toLowerCase().trim();let e;if(yr.format.named)try{return yr.format.named(r)}catch{}if(e=r.match(lj)){const t=e.slice(1,4);for(let n=0;n<3;n++)t[n]=+t[n];return t[3]=1,t}if(e=r.match(uj)){const t=e.slice(1,5);for(let n=0;n<4;n++)t[n]=+t[n];return t}if(e=r.match(cj)){const t=e.slice(1,4);for(let n=0;n<3;n++)t[n]=R4(t[n]*2.55);return t[3]=1,t}if(e=r.match(fj)){const t=e.slice(1,5);for(let n=0;n<3;n++)t[n]=R4(t[n]*2.55);return t[3]=+t[3],t}if(e=r.match(hj)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const n=PT(t);return n[3]=1,n}if(e=r.match(dj)){const t=e.slice(1,4);t[1]*=.01,t[2]*=.01;const n=PT(t);return n[3]=+e[4],n}};LL.test=r=>lj.test(r)||uj.test(r)||cj.test(r)||fj.test(r)||hj.test(r)||dj.test(r);Qe.prototype.css=function(r){return Gye(this._rgb,r)};Xt.css=(...r)=>new Qe(...r,"css");yr.format.css=LL;yr.autodetect.push({p:5,test:(r,...e)=>{if(!e.length&&Gr(r)==="string"&&LL.test(r))return"css"}});yr.format.gl=(...r)=>{const e=Wr(r,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};Xt.gl=(...r)=>new Qe(...r,"gl");Qe.prototype.gl=function(){const r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};const{floor:Hye}=Math,Wye=(...r)=>{r=Wr(r,"hcg");let[e,t,n]=r,i,a,o;n=n*255;const s=t*255;if(t===0)i=a=o=n;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const l=Hye(e),u=e-l,c=n*(1-t),f=c+s*(1-u),h=c+s*u,d=c+s;switch(l){case 0:[i,a,o]=[d,h,c];break;case 1:[i,a,o]=[f,d,c];break;case 2:[i,a,o]=[c,d,h];break;case 3:[i,a,o]=[c,f,d];break;case 4:[i,a,o]=[h,c,d];break;case 5:[i,a,o]=[d,c,f];break}}return[i,a,o,r.length>3?r[3]:1]},$ye=(...r)=>{const[e,t,n]=Wr(r,"rgb"),i=ML(e,t,n),a=IL(e,t,n),o=a-i,s=o*100/255,l=i/(255-o)*100;let u;return o===0?u=Number.NaN:(e===a&&(u=(t-n)/o),t===a&&(u=2+(n-e)/o),n===a&&(u=4+(e-t)/o),u*=60,u<0&&(u+=360)),[u,s,l]};Qe.prototype.hcg=function(){return $ye(this._rgb)};Xt.hcg=(...r)=>new Qe(...r,"hcg");yr.format.hcg=Wye;yr.autodetect.push({p:1,test:(...r)=>{if(r=Wr(r,"hcg"),Gr(r)==="array"&&r.length===3)return"hcg"}});const jye=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,qye=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,pj=r=>{if(r.match(jye)){(r.length===4||r.length===7)&&(r=r.substr(1)),r.length===3&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]);const e=parseInt(r,16),t=e>>16,n=e>>8&255,i=e&255;return[t,n,i,1]}if(r.match(qye)){(r.length===5||r.length===9)&&(r=r.substr(1)),r.length===4&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);const e=parseInt(r,16),t=e>>24&255,n=e>>16&255,i=e>>8&255,a=Math.round((e&255)/255*100)/100;return[t,n,i,a]}throw new Error(`unknown hex color: ${r}`)},{round:mb}=Math,gj=(...r)=>{let[e,t,n,i]=Wr(r,"rgba"),a=YC(r)||"auto";i===void 0&&(i=1),a==="auto"&&(a=i<1?"rgba":"rgb"),e=mb(e),t=mb(t),n=mb(n);let s="000000"+(e<<16|t<<8|n).toString(16);s=s.substr(s.length-6);let l="0"+mb(i*255).toString(16);switch(l=l.substr(l.length-2),a.toLowerCase()){case"rgba":return`#${s}${l}`;case"argb":return`#${l}${s}`;default:return`#${s}`}};Qe.prototype.hex=function(r){return gj(this._rgb,r)};Xt.hex=(...r)=>new Qe(...r,"hex");yr.format.hex=pj;yr.autodetect.push({p:4,test:(r,...e)=>{if(!e.length&&Gr(r)==="string"&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});const{cos:Xd}=Math,Yye=(...r)=>{r=Wr(r,"hsi");let[e,t,n]=r,i,a,o;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(o=(1-t)/3,i=(1+t*Xd(Su*e)/Xd(Px-Su*e))/3,a=1-(o+i)):e<2/3?(e-=1/3,i=(1-t)/3,a=(1+t*Xd(Su*e)/Xd(Px-Su*e))/3,o=1-(i+a)):(e-=2/3,a=(1-t)/3,o=(1+t*Xd(Su*e)/Xd(Px-Su*e))/3,i=1-(a+o)),i=sg(n*i*3),a=sg(n*a*3),o=sg(n*o*3),[i*255,a*255,o*255,r.length>3?r[3]:1]},{min:Zye,sqrt:Kye,acos:Xye}=Math,Qye=(...r)=>{let[e,t,n]=Wr(r,"rgb");e/=255,t/=255,n/=255;let i;const a=Zye(e,t,n),o=(e+t+n)/3,s=o>0?1-a/o:0;return s===0?i=NaN:(i=(e-t+(e-n))/2,i/=Kye((e-t)*(e-t)+(e-n)*(t-n)),i=Xye(i),n>t&&(i=Su-i),i/=Su),[i*360,s,o]};Qe.prototype.hsi=function(){return Qye(this._rgb)};Xt.hsi=(...r)=>new Qe(...r,"hsi");yr.format.hsi=Yye;yr.autodetect.push({p:2,test:(...r)=>{if(r=Wr(r,"hsi"),Gr(r)==="array"&&r.length===3)return"hsi"}});Qe.prototype.hsl=function(){return sj(this._rgb)};Xt.hsl=(...r)=>new Qe(...r,"hsl");yr.format.hsl=PT;yr.autodetect.push({p:2,test:(...r)=>{if(r=Wr(r,"hsl"),Gr(r)==="array"&&r.length===3)return"hsl"}});const{floor:Jye}=Math,e1e=(...r)=>{r=Wr(r,"hsv");let[e,t,n]=r,i,a,o;if(n*=255,t===0)i=a=o=n;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;const s=Jye(e),l=e-s,u=n*(1-t),c=n*(1-t*l),f=n*(1-t*(1-l));switch(s){case 0:[i,a,o]=[n,f,u];break;case 1:[i,a,o]=[c,n,u];break;case 2:[i,a,o]=[u,n,f];break;case 3:[i,a,o]=[u,c,n];break;case 4:[i,a,o]=[f,u,n];break;case 5:[i,a,o]=[n,u,c];break}}return[i,a,o,r.length>3?r[3]:1]},{min:t1e,max:r1e}=Math,n1e=(...r)=>{r=Wr(r,"rgb");let[e,t,n]=r;const i=t1e(e,t,n),a=r1e(e,t,n),o=a-i;let s,l,u;return u=a/255,a===0?(s=Number.NaN,l=0):(l=o/a,e===a&&(s=(t-n)/o),t===a&&(s=2+(n-e)/o),n===a&&(s=4+(e-t)/o),s*=60,s<0&&(s+=360)),[s,l,u]};Qe.prototype.hsv=function(){return n1e(this._rgb)};Xt.hsv=(...r)=>new Qe(...r,"hsv");yr.format.hsv=e1e;yr.autodetect.push({p:2,test:(...r)=>{if(r=Wr(r,"hsv"),Gr(r)==="array"&&r.length===3)return"hsv"}});const uo={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},{pow:i1e}=Math,vj=(...r)=>{r=Wr(r,"lab");const[e,t,n]=r;let i,a,o,s,l,u;return a=(e+16)/116,i=isNaN(t)?a:a+t/500,o=isNaN(n)?a:a-n/200,a=uo.Yn*Ux(a),i=uo.Xn*Ux(i),o=uo.Zn*Ux(o),s=Vx(3.2404542*i-1.5371385*a-.4985314*o),l=Vx(-.969266*i+1.8760108*a+.041556*o),u=Vx(.0556434*i-.2040259*a+1.0572252*o),[s,l,u,r.length>3?r[3]:1]},Vx=r=>255*(r<=.00304?12.92*r:1.055*i1e(r,1/2.4)-.055),Ux=r=>r>uo.t1?r*r*r:uo.t2*(r-uo.t0),{pow:mj}=Math,yj=(...r)=>{const[e,t,n]=Wr(r,"rgb"),[i,a,o]=a1e(e,t,n),s=116*a-16;return[s<0?0:s,500*(i-a),200*(a-o)]},Gx=r=>(r/=255)<=.04045?r/12.92:mj((r+.055)/1.055,2.4),Hx=r=>r>uo.t3?mj(r,1/3):r/uo.t2+uo.t0,a1e=(r,e,t)=>{r=Gx(r),e=Gx(e),t=Gx(t);const n=Hx((.4124564*r+.3575761*e+.1804375*t)/uo.Xn),i=Hx((.2126729*r+.7151522*e+.072175*t)/uo.Yn),a=Hx((.0193339*r+.119192*e+.9503041*t)/uo.Zn);return[n,i,a]};Qe.prototype.lab=function(){return yj(this._rgb)};Xt.lab=(...r)=>new Qe(...r,"lab");yr.format.lab=vj;yr.autodetect.push({p:2,test:(...r)=>{if(r=Wr(r,"lab"),Gr(r)==="array"&&r.length===3)return"lab"}});const{sin:o1e,cos:s1e}=Math,bj=(...r)=>{let[e,t,n]=Wr(r,"lch");return isNaN(n)&&(n=0),n=n*Pye,[e,s1e(n)*t,o1e(n)*t]},_j=(...r)=>{r=Wr(r,"lch");const[e,t,n]=r,[i,a,o]=bj(e,t,n),[s,l,u]=vj(i,a,o);return[s,l,u,r.length>3?r[3]:1]},l1e=(...r)=>{const e=Wr(r,"hcl").reverse();return _j(...e)},{sqrt:u1e,atan2:c1e,round:f1e}=Math,wj=(...r)=>{const[e,t,n]=Wr(r,"lab"),i=u1e(t*t+n*n);let a=(c1e(n,t)*Rye+360)%360;return f1e(i*1e4)===0&&(a=Number.NaN),[e,i,a]},Sj=(...r)=>{const[e,t,n]=Wr(r,"rgb"),[i,a,o]=yj(e,t,n);return wj(i,a,o)};Qe.prototype.lch=function(){return Sj(this._rgb)};Qe.prototype.hcl=function(){return Sj(this._rgb).reverse()};Xt.lch=(...r)=>new Qe(...r,"lch");Xt.hcl=(...r)=>new Qe(...r,"hcl");yr.format.lch=_j;yr.format.hcl=l1e;["lch","hcl"].forEach(r=>yr.autodetect.push({p:2,test:(...e)=>{if(e=Wr(e,r),Gr(e)==="array"&&e.length===3)return r}}));const Gg={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};Qe.prototype.name=function(){const r=gj(this._rgb,"rgb");for(let e of Object.keys(Gg))if(Gg[e]===r)return e.toLowerCase();return r};yr.format.named=r=>{if(r=r.toLowerCase(),Gg[r])return pj(Gg[r]);throw new Error("unknown color name: "+r)};yr.autodetect.push({p:5,test:(r,...e)=>{if(!e.length&&Gr(r)==="string"&&Gg[r.toLowerCase()])return"named"}});const h1e=r=>{if(Gr(r)=="number"&&r>=0&&r<=16777215){const e=r>>16,t=r>>8&255,n=r&255;return[e,t,n,1]}throw new Error("unknown num color: "+r)},d1e=(...r)=>{const[e,t,n]=Wr(r,"rgb");return(e<<16)+(t<<8)+n};Qe.prototype.num=function(){return d1e(this._rgb)};Xt.num=(...r)=>new Qe(...r,"num");yr.format.num=h1e;yr.autodetect.push({p:5,test:(...r)=>{if(r.length===1&&Gr(r[0])==="number"&&r[0]>=0&&r[0]<=16777215)return"num"}});const{round:Cj}=Math;Qe.prototype.rgb=function(r=!0){return r===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Cj)};Qe.prototype.rgba=function(r=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?r===!1?e:Cj(e):e)};Xt.rgb=(...r)=>new Qe(...r,"rgb");yr.format.rgb=(...r)=>{const e=Wr(r,"rgba");return e[3]===void 0&&(e[3]=1),e};yr.autodetect.push({p:3,test:(...r)=>{if(r=Wr(r,"rgba"),Gr(r)==="array"&&(r.length===3||r.length===4&&Gr(r[3])=="number"&&r[3]>=0&&r[3]<=1))return"rgb"}});const{log:yb}=Math,Aj=r=>{const e=r/100;let t,n,i;return e<66?(t=255,n=e<6?0:-155.25485562709179-.44596950469579133*(n=e-2)+104.49216199393888*yb(n),i=e<20?0:-254.76935184120902+.8274096064007395*(i=e-10)+115.67994401066147*yb(i)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*yb(t),n=325.4494125711974+.07943456536662342*(n=e-50)-28.0852963507957*yb(n),i=255),[t,n,i,1]},{round:p1e}=Math,g1e=(...r)=>{const e=Wr(r,"rgb"),t=e[0],n=e[2];let i=1e3,a=4e4;const o=.4;let s;for(;a-i>o;){s=(a+i)*.5;const l=Aj(s);l[2]/l[0]>=n/t?a=s:i=s}return p1e(s)};Qe.prototype.temp=Qe.prototype.kelvin=Qe.prototype.temperature=function(){return g1e(this._rgb)};Xt.temp=Xt.kelvin=Xt.temperature=(...r)=>new Qe(...r,"temp");yr.format.temp=yr.format.kelvin=yr.format.temperature=Aj;const{pow:dw,sign:v1e}=Math,xj=(...r)=>{r=Wr(r,"lab");const[e,t,n]=r,i=dw(e+.3963377774*t+.2158037573*n,3),a=dw(e-.1055613458*t-.0638541728*n,3),o=dw(e-.0894841775*t-1.291485548*n,3);return[255*Wx(4.0767416621*i-3.3077115913*a+.2309699292*o),255*Wx(-1.2684380046*i+2.6097574011*a-.3413193965*o),255*Wx(-.0041960863*i-.7034186147*a+1.707614701*o),r.length>3?r[3]:1]};function Wx(r){const e=Math.abs(r);return e>.0031308?(v1e(r)||1)*(1.055*dw(e,1/2.4)-.055):r*12.92}const{cbrt:$x,pow:m1e,sign:y1e}=Math,Dj=(...r)=>{const[e,t,n]=Wr(r,"rgb"),[i,a,o]=[jx(e/255),jx(t/255),jx(n/255)],s=$x(.4122214708*i+.5363325363*a+.0514459929*o),l=$x(.2119034982*i+.6806995451*a+.1073969566*o),u=$x(.0883024619*i+.2817188376*a+.6299787005*o);return[.2104542553*s+.793617785*l-.0040720468*u,1.9779984951*s-2.428592205*l+.4505937099*u,.0259040371*s+.7827717662*l-.808675766*u]};function jx(r){const e=Math.abs(r);return e<.04045?r/12.92:(y1e(r)||1)*m1e((e+.055)/1.055,2.4)}Qe.prototype.oklab=function(){return Dj(this._rgb)};Xt.oklab=(...r)=>new Qe(...r,"oklab");yr.format.oklab=xj;yr.autodetect.push({p:3,test:(...r)=>{if(r=Wr(r,"oklab"),Gr(r)==="array"&&r.length===3)return"oklab"}});const b1e=(...r)=>{r=Wr(r,"lch");const[e,t,n]=r,[i,a,o]=bj(e,t,n),[s,l,u]=xj(i,a,o);return[s,l,u,r.length>3?r[3]:1]},_1e=(...r)=>{const[e,t,n]=Wr(r,"rgb"),[i,a,o]=Dj(e,t,n);return wj(i,a,o)};Qe.prototype.oklch=function(){return _1e(this._rgb)};Xt.oklch=(...r)=>new Qe(...r,"oklch");yr.format.oklch=b1e;yr.autodetect.push({p:3,test:(...r)=>{if(r=Wr(r,"oklch"),Gr(r)==="array"&&r.length===3)return"oklch"}});Qe.prototype.alpha=function(r,e=!1){return r!==void 0&&Gr(r)==="number"?e?(this._rgb[3]=r,this):new Qe([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]};Qe.prototype.clipped=function(){return this._rgb._clipped||!1};Qe.prototype.darken=function(r=1){const e=this,t=e.lab();return t[0]-=uo.Kn*r,new Qe(t,"lab").alpha(e.alpha(),!0)};Qe.prototype.brighten=function(r=1){return this.darken(-r)};Qe.prototype.darker=Qe.prototype.darken;Qe.prototype.brighter=Qe.prototype.brighten;Qe.prototype.get=function(r){const[e,t]=r.split("."),n=this[e]();if(t){const i=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(i>-1)return n[i];throw new Error(`unknown channel ${t} in mode ${e}`)}else return n};const{pow:w1e}=Math,S1e=1e-7,C1e=20;Qe.prototype.luminance=function(r,e="rgb"){if(r!==void 0&&Gr(r)==="number"){if(r===0)return new Qe([0,0,0,this._rgb[3]],"rgb");if(r===1)return new Qe([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),n=C1e;const i=(o,s)=>{const l=o.interpolate(s,.5,e),u=l.luminance();return Math.abs(r-u)r?i(o,l):i(l,s)},a=(t>r?i(new Qe([0,0,0]),this):i(this,new Qe([255,255,255]))).rgb();return new Qe([...a,this._rgb[3]])}return A1e(...this._rgb.slice(0,3))};const A1e=(r,e,t)=>(r=qx(r),e=qx(e),t=qx(t),.2126*r+.7152*e+.0722*t),qx=r=>(r/=255,r<=.03928?r/12.92:w1e((r+.055)/1.055,2.4)),da={},dy=(r,e,t=.5,...n)=>{let i=n[0]||"lrgb";if(!da[i]&&!n.length&&(i=Object.keys(da)[0]),!da[i])throw new Error(`interpolation mode ${i} is not defined`);return Gr(r)!=="object"&&(r=new Qe(r)),Gr(e)!=="object"&&(e=new Qe(e)),da[i](r,e,t).alpha(r.alpha()+t*(e.alpha()-r.alpha()))};Qe.prototype.mix=Qe.prototype.interpolate=function(r,e=.5,...t){return dy(this,r,e,...t)};Qe.prototype.premultiply=function(r=!1){const e=this._rgb,t=e[3];return r?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Qe([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};Qe.prototype.saturate=function(r=1){const e=this,t=e.lch();return t[1]+=uo.Kn*r,t[1]<0&&(t[1]=0),new Qe(t,"lch").alpha(e.alpha(),!0)};Qe.prototype.desaturate=function(r=1){return this.saturate(-r)};Qe.prototype.set=function(r,e,t=!1){const[n,i]=r.split("."),a=this[n]();if(i){const o=n.indexOf(i)-(n.substr(0,2)==="ok"?2:0);if(o>-1){if(Gr(e)=="string")switch(e.charAt(0)){case"+":a[o]+=+e;break;case"-":a[o]+=+e;break;case"*":a[o]*=+e.substr(1);break;case"/":a[o]/=+e.substr(1);break;default:a[o]=+e}else if(Gr(e)==="number")a[o]=e;else throw new Error("unsupported value for Color.set");const s=new Qe(a,n);return t?(this._rgb=s._rgb,this):s}throw new Error(`unknown channel ${i} in mode ${n}`)}else return a};Qe.prototype.tint=function(r=.5,...e){return dy(this,"white",r,...e)};Qe.prototype.shade=function(r=.5,...e){return dy(this,"black",r,...e)};const x1e=(r,e,t)=>{const n=r._rgb,i=e._rgb;return new Qe(n[0]+t*(i[0]-n[0]),n[1]+t*(i[1]-n[1]),n[2]+t*(i[2]-n[2]),"rgb")};da.rgb=x1e;const{sqrt:Yx,pow:Qd}=Math,D1e=(r,e,t)=>{const[n,i,a]=r._rgb,[o,s,l]=e._rgb;return new Qe(Yx(Qd(n,2)*(1-t)+Qd(o,2)*t),Yx(Qd(i,2)*(1-t)+Qd(s,2)*t),Yx(Qd(a,2)*(1-t)+Qd(l,2)*t),"rgb")};da.lrgb=D1e;const E1e=(r,e,t)=>{const n=r.lab(),i=e.lab();return new Qe(n[0]+t*(i[0]-n[0]),n[1]+t*(i[1]-n[1]),n[2]+t*(i[2]-n[2]),"lab")};da.lab=E1e;const Sv=(r,e,t,n)=>{let i,a;n==="hsl"?(i=r.hsl(),a=e.hsl()):n==="hsv"?(i=r.hsv(),a=e.hsv()):n==="hcg"?(i=r.hcg(),a=e.hcg()):n==="hsi"?(i=r.hsi(),a=e.hsi()):n==="lch"||n==="hcl"?(n="hcl",i=r.hcl(),a=e.hcl()):n==="oklch"&&(i=r.oklch().reverse(),a=e.oklch().reverse());let o,s,l,u,c,f;(n.substr(0,1)==="h"||n==="oklch")&&([o,l,c]=i,[s,u,f]=a);let h,d,p,g;return!isNaN(o)&&!isNaN(s)?(s>o&&s-o>180?g=s-(o+360):s180?g=s+360-o:g=s-o,d=o+t*g):isNaN(o)?isNaN(s)?d=Number.NaN:(d=s,(c==1||c==0)&&n!="hsv"&&(h=u)):(d=o,(f==1||f==0)&&n!="hsv"&&(h=l)),h===void 0&&(h=l+t*(u-l)),p=c+t*(f-c),n==="oklch"?new Qe([p,h,d],n):new Qe([d,h,p],n)},Ej=(r,e,t)=>Sv(r,e,t,"lch");da.lch=Ej;da.hcl=Ej;const k1e=(r,e,t)=>{const n=r.num(),i=e.num();return new Qe(n+t*(i-n),"num")};da.num=k1e;const T1e=(r,e,t)=>Sv(r,e,t,"hcg");da.hcg=T1e;const M1e=(r,e,t)=>Sv(r,e,t,"hsi");da.hsi=M1e;const I1e=(r,e,t)=>Sv(r,e,t,"hsl");da.hsl=I1e;const L1e=(r,e,t)=>Sv(r,e,t,"hsv");da.hsv=L1e;const F1e=(r,e,t)=>{const n=r.oklab(),i=e.oklab();return new Qe(n[0]+t*(i[0]-n[0]),n[1]+t*(i[1]-n[1]),n[2]+t*(i[2]-n[2]),"oklab")};da.oklab=F1e;const B1e=(r,e,t)=>Sv(r,e,t,"oklch");da.oklch=B1e;const{pow:Zx,sqrt:Kx,PI:Xx,cos:N4,sin:z4,atan2:O1e}=Math,P1e=(r,e="lrgb",t=null)=>{const n=r.length;t||(t=Array.from(new Array(n)).map(()=>1));const i=n/t.reduce(function(f,h){return f+h});if(t.forEach((f,h)=>{t[h]*=i}),r=r.map(f=>new Qe(f)),e==="lrgb")return R1e(r,t);const a=r.shift(),o=a.get(e),s=[];let l=0,u=0;for(let f=0;f{const d=f.get(e);c+=f.alpha()*t[h+1];for(let p=0;p=360;)h-=360;o[f]=h}else o[f]=o[f]/s[f];return c/=n,new Qe(o,e).alpha(c>.99999?1:c,!0)},R1e=(r,e)=>{const t=r.length,n=[0,0,0,0];for(let i=0;i.9999999&&(n[3]=1),new Qe(TL(n))},{pow:N1e}=Math;function $S(r){let e="rgb",t=Xt("#ccc"),n=0,i=[0,1],a=[],o=[0,0],s=!1,l=[],u=!1,c=0,f=1,h=!1,d={},p=!0,g=1;const v=function(C){if(C=C||["#fff","#000"],C&&Gr(C)==="string"&&Xt.brewer&&Xt.brewer[C.toLowerCase()]&&(C=Xt.brewer[C.toLowerCase()]),Gr(C)==="array"){C.length===1&&(C=[C[0],C[0]]),C=C.slice(0);for(let A=0;A=s[x];)x++;return x-1}return 0};let y=C=>C,b=C=>C;const _=function(C,A){let x,D;if(A==null&&(A=!1),isNaN(C)||C===null)return t;A?D=C:s&&s.length>2?D=m(C)/(s.length-2):f!==c?D=(C-c)/(f-c):D=1,D=b(D),A||(D=y(D)),g!==1&&(D=N1e(D,g)),D=o[0]+D*(1-o[0]-o[1]),D=sg(D,0,1);const E=Math.floor(D*1e4);if(p&&d[E])x=d[E];else{if(Gr(l)==="array")for(let k=0;k=M&&k===a.length-1){x=l[k];break}if(D>M&&Dd={};v(r);const S=function(C){const A=Xt(_(C));return u&&A[u]?A[u]():A};return S.classes=function(C){if(C!=null){if(Gr(C)==="array")s=C,i=[C[0],C[C.length-1]];else{const A=Xt.analyze(i);C===0?s=[A.min,A.max]:s=Xt.limits(A,"e",C)}return S}return s},S.domain=function(C){if(!arguments.length)return i;c=C[0],f=C[C.length-1],a=[];const A=l.length;if(C.length===A&&c!==f)for(let x of Array.from(C))a.push((x-c)/(f-c));else{for(let x=0;x2){const x=C.map((E,k)=>k/(C.length-1)),D=C.map(E=>(E-c)/(f-c));D.every((E,k)=>x[k]===E)||(b=E=>{if(E<=0||E>=1)return E;let k=0;for(;E>=D[k+1];)k++;const M=(E-D[k])/(D[k+1]-D[k]);return x[k]+M*(x[k+1]-x[k])})}}return i=[c,f],S},S.mode=function(C){return arguments.length?(e=C,w(),S):e},S.range=function(C,A){return v(C),S},S.out=function(C){return u=C,S},S.spread=function(C){return arguments.length?(n=C,S):n},S.correctLightness=function(C){return C==null&&(C=!0),h=C,w(),h?y=function(A){const x=_(0,!0).lab()[0],D=_(1,!0).lab()[0],E=x>D;let k=_(A,!0).lab()[0];const M=x+(D-x)*A;let T=k-M,L=0,F=1,N=20;for(;Math.abs(T)>.01&&N-- >0;)(function(){return E&&(T*=-1),T<0?(L=A,A+=(F-A)*.5):(F=A,A+=(L-A)*.5),k=_(A,!0).lab()[0],T=k-M})();return A}:y=A=>A,S},S.padding=function(C){return C!=null?(Gr(C)==="number"&&(C=[C,C]),o=C,S):o},S.colors=function(C,A){arguments.length<2&&(A="hex");let x=[];if(arguments.length===0)x=l.slice(0);else if(C===1)x=[S(.5)];else if(C>1){const D=i[0],E=i[1]-D;x=z1e(0,C).map(k=>S(D+k/(C-1)*E))}else{r=[];let D=[];if(s&&s.length>2)for(let E=1,k=s.length,M=1<=k;M?Ek;M?E++:E--)D.push((s[E-1]+s[E])*.5);else D=i;x=D.map(E=>S(E))}return Xt[A]&&(x=x.map(D=>D[A]())),x},S.cache=function(C){return C!=null?(p=C,S):p},S.gamma=function(C){return C!=null?(g=C,S):g},S.nodata=function(C){return C!=null?(t=Xt(C),S):t},S}function z1e(r,e,t){let n=[],i=ra;i?o++:o--)n.push(o);return n}const V1e=function(r){let e=[1,1];for(let t=1;tnew Qe(a)),r.length===2)[t,n]=r.map(a=>a.lab()),e=function(a){const o=[0,1,2].map(s=>t[s]+a*(n[s]-t[s]));return new Qe(o,"lab")};else if(r.length===3)[t,n,i]=r.map(a=>a.lab()),e=function(a){const o=[0,1,2].map(s=>(1-a)*(1-a)*t[s]+2*(1-a)*a*n[s]+a*a*i[s]);return new Qe(o,"lab")};else if(r.length===4){let a;[t,n,i,a]=r.map(o=>o.lab()),e=function(o){const s=[0,1,2].map(l=>(1-o)*(1-o)*(1-o)*t[l]+3*(1-o)*(1-o)*o*n[l]+3*(1-o)*o*o*i[l]+o*o*o*a[l]);return new Qe(s,"lab")}}else if(r.length>=5){let a,o,s;a=r.map(l=>l.lab()),s=r.length-1,o=V1e(s),e=function(l){const u=1-l,c=[0,1,2].map(f=>a.reduce((h,d,p)=>h+o[p]*u**(s-p)*l**p*d[f],0));return new Qe(c,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},G1e=r=>{const e=U1e(r);return e.scale=()=>$S(e),e},$s=(r,e,t)=>{if(!$s[t])throw new Error("unknown blend mode "+t);return $s[t](r,e)},Lf=r=>(e,t)=>{const n=Xt(t).rgb(),i=Xt(e).rgb();return Xt.rgb(r(n,i))},Ff=r=>(e,t)=>{const n=[];return n[0]=r(e[0],t[0]),n[1]=r(e[1],t[1]),n[2]=r(e[2],t[2]),n},H1e=r=>r,W1e=(r,e)=>r*e/255,$1e=(r,e)=>r>e?e:r,j1e=(r,e)=>r>e?r:e,q1e=(r,e)=>255*(1-(1-r/255)*(1-e/255)),Y1e=(r,e)=>e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255)),Z1e=(r,e)=>255*(1-(1-e/255)/(r/255)),K1e=(r,e)=>r===255?255:(r=255*(e/255)/(1-r/255),r>255?255:r);$s.normal=Lf(Ff(H1e));$s.multiply=Lf(Ff(W1e));$s.screen=Lf(Ff(q1e));$s.overlay=Lf(Ff(Y1e));$s.darken=Lf(Ff($1e));$s.lighten=Lf(Ff(j1e));$s.dodge=Lf(Ff(K1e));$s.burn=Lf(Ff(Z1e));const{pow:X1e,sin:Q1e,cos:J1e}=Math;function ebe(r=300,e=-1.5,t=1,n=1,i=[0,1]){let a=0,o;Gr(i)==="array"?o=i[1]-i[0]:(o=0,i=[i,i]);const s=function(l){const u=Su*((r+120)/360+e*l),c=X1e(i[0]+o*l,n),h=(a!==0?t[0]+l*a:t)*c*(1-c)/2,d=J1e(u),p=Q1e(u),g=c+h*(-.14861*d+1.78277*p),v=c+h*(-.29227*d-.90649*p),m=c+h*(1.97294*d);return Xt(TL([g*255,v*255,m*255,1]))};return s.start=function(l){return l==null?r:(r=l,s)},s.rotations=function(l){return l==null?e:(e=l,s)},s.gamma=function(l){return l==null?n:(n=l,s)},s.hue=function(l){return l==null?t:(t=l,Gr(t)==="array"?(a=t[1]-t[0],a===0&&(t=t[1])):a=0,s)},s.lightness=function(l){return l==null?i:(Gr(l)==="array"?(i=l,o=l[1]-l[0]):(i=[l,l],o=0),s)},s.scale=()=>Xt.scale(s),s.hue(t),s}const tbe="0123456789abcdef",{floor:rbe,random:nbe}=Math,ibe=()=>{let r="#";for(let e=0;e<6;e++)r+=tbe.charAt(rbe(nbe()*16));return new Qe(r,"hex")},{log:V4,pow:abe,floor:obe,abs:sbe}=Math;function kj(r,e=null){const t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Gr(r)==="object"&&(r=Object.values(r)),r.forEach(n=>{e&&Gr(n)==="object"&&(n=n[e]),n!=null&&!isNaN(n)&&(t.values.push(n),t.sum+=n,nt.max&&(t.max=n),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(n,i)=>Tj(t,n,i),t}function Tj(r,e="equal",t=7){Gr(r)=="array"&&(r=kj(r));const{min:n,max:i}=r,a=r.values.sort((s,l)=>s-l);if(t===1)return[n,i];const o=[];if(e.substr(0,1)==="c"&&(o.push(n),o.push(i)),e.substr(0,1)==="e"){o.push(n);for(let s=1;s 0");const s=Math.LOG10E*V4(n),l=Math.LOG10E*V4(i);o.push(n);for(let u=1;u200&&(f=!1)}const p={};for(let v=0;vv-m),o.push(g[0]);for(let v=1;v{r=new Qe(r),e=new Qe(e);const t=r.luminance(),n=e.luminance();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},{sqrt:fu,pow:ui,min:ube,max:cbe,atan2:U4,abs:G4,cos:bb,sin:H4,exp:fbe,PI:W4}=Math;function hbe(r,e,t=1,n=1,i=1){var a=function(te){return 360*te/(2*W4)},o=function(te){return 2*W4*te/360};r=new Qe(r),e=new Qe(e);const[s,l,u]=Array.from(r.lab()),[c,f,h]=Array.from(e.lab()),d=(s+c)/2,p=fu(ui(l,2)+ui(u,2)),g=fu(ui(f,2)+ui(h,2)),v=(p+g)/2,m=.5*(1-fu(ui(v,7)/(ui(v,7)+ui(25,7)))),y=l*(1+m),b=f*(1+m),_=fu(ui(y,2)+ui(u,2)),w=fu(ui(b,2)+ui(h,2)),S=(_+w)/2,C=a(U4(u,y)),A=a(U4(h,b)),x=C>=0?C:C+360,D=A>=0?A:A+360,E=G4(x-D)>180?(x+D+360)/2:(x+D)/2,k=1-.17*bb(o(E-30))+.24*bb(o(2*E))+.32*bb(o(3*E+6))-.2*bb(o(4*E-63));let M=D-x;M=G4(M)<=180?M:D<=x?M+360:M-360,M=2*fu(_*w)*H4(o(M)/2);const T=c-s,L=w-_,F=1+.015*ui(d-50,2)/fu(20+ui(d-50,2)),N=1+.045*S,z=1+.015*S*k,W=30*fbe(-ui((E-275)/25,2)),R=-(2*fu(ui(S,7)/(ui(S,7)+ui(25,7))))*H4(2*o(W)),ne=fu(ui(T/(t*F),2)+ui(L/(n*N),2)+ui(M/(i*z),2)+R*(L/(n*N))*(M/(i*z)));return cbe(0,ube(100,ne))}function dbe(r,e,t="lab"){r=new Qe(r),e=new Qe(e);const n=r.get(t),i=e.get(t);let a=0;for(let o in n){const s=(n[o]||0)-(i[o]||0);a+=s*s}return Math.sqrt(a)}const pbe=(...r)=>{try{return new Qe(...r),!0}catch{return!1}},gbe={cool(){return $S([Xt.hsl(180,1,.9),Xt.hsl(250,.7,.4)])},hot(){return $S(["#000","#f00","#ff0","#fff"]).mode("rgb")}},pw={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]};for(let r of Object.keys(pw))pw[r.toLowerCase()]=pw[r];Object.assign(Xt,{average:P1e,bezier:G1e,blend:$s,cubehelix:ebe,mix:dy,interpolate:dy,random:ibe,scale:$S,analyze:kj,contrast:lbe,deltaE:hbe,distance:dbe,limits:Tj,valid:pbe,scales:gbe,input:yr,colors:Gg,brewer:pw});const Mj={appearance:{default:"system",switcher:!0},theme:{colors:{primary:{light:"#2563eb",dark:"#3b82f6"},accent:{light:"#c2410c",dark:"#fdba74"},"base-100":{light:"#ffffff",dark:"#09090b"},info:{light:"#0284c7",dark:"#38bdf8"},positive:{light:"#16a34a",dark:"#4ade80"},warning:{light:"#f8c900",dark:"#fbbf24"},negative:{light:"#dc2626",dark:"#f87171"},"primary-content":{light:"#f6f8fb",dark:"#030609"},"accent-content":{light:"#fbf7f6",dark:"#090603"},"base-200":{light:"#f7f7f7",dark:"#111113"},"base-300":{light:"#d6d6d6",dark:"#29292b"},"base-heading":{light:"#060606",dark:"#f8f8f9"},"base-content":{light:"#2c2c2c",dark:"#cacacb"},"base-content-muted":{light:"#717171",dark:"#7b7b7c"},"info-content":{light:"#030709",dark:"#030809"},"positive-content":{light:"#040906",dark:"#040906"},"negative-content":{light:"#fbf6f6",dark:"#090303"},"warning-content":{light:"#0a0803",dark:"#090803"}},colorPalettes:{default:{light:["#236aa4","#45a1bf","#a5cdee","#8dacbf","#85c7c6","#d2c6ac","#f4b548","#8f3d56","#71b9f4","#46a485"],dark:["#236aa4","#45a1bf","#a5cdee","#8dacbf","#85c7c6","#d2c6ac","#f4b548","#8f3d56","#71b9f4","#46a485"]}},colorScales:{default:{light:["#ADD8E6","#00008B"],dark:["#ADD8E6","#00008B"]}}}},fi={light:{colors:{primary:"#2563eb",accent:"#c2410c","base-100":"#ffffff",info:"#0284c7",positive:"#16a34a",warning:"#f8c900",negative:"#dc2626","primary-content":"#f6f8fb","accent-content":"#fbf7f6","base-200":"#f7f7f7","base-300":"#d6d6d6","base-heading":"#060606","base-content":"#2c2c2c","base-content-muted":"#717171","info-content":"#030709","positive-content":"#040906","negative-content":"#fbf6f6","warning-content":"#0a0803"},colorPalettes:{default:["#236aa4","#45a1bf","#a5cdee","#8dacbf","#85c7c6","#d2c6ac","#f4b548","#8f3d56","#71b9f4","#46a485"]},colorScales:{default:["#ADD8E6","#00008B"]}},dark:{colors:{primary:"#3b82f6",accent:"#fdba74","base-100":"#09090b",info:"#38bdf8",positive:"#4ade80",warning:"#fbbf24",negative:"#f87171","primary-content":"#030609","accent-content":"#090603","base-200":"#111113","base-300":"#29292b","base-heading":"#f8f8f9","base-content":"#cacacb","base-content-muted":"#7b7b7c","info-content":"#030809","positive-content":"#040906","negative-content":"#090303","warning-content":"#090803"},colorPalettes:{default:["#236aa4","#45a1bf","#a5cdee","#8dacbf","#85c7c6","#d2c6ac","#f4b548","#8f3d56","#71b9f4","#46a485"]},colorScales:{default:["#ADD8E6","#00008B"]}}},$4=r=>{if(!Xt.valid(r))return;const e=Xt(r),t=Xt("white"),n=Xt("black"),i=e.luminance(),a=Math.abs(i-t.luminance()),o=n.luminance()+a;return e.set("hsl.l",.75*o).saturate(.2).hex()},{default:Qx,switcher:j4}=Mj.appearance,vbe=()=>{const r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return lo(r,t=>{if(window.matchMedia){const n=i=>{t(i.matches?"dark":"light")};return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n),()=>{window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",n)}}})};var Ig,Tu,$o,Kh,Xh;const Ih=class Ih{constructor(){Nt(this,Ig);Nt(this,Tu);Nt(this,$o);Nt(this,Kh);on(this,"syncDataThemeAttribute",e=>{const t=ee(this,$o).subscribe(i=>{e.getAttribute("data-theme")!==i&&e.setAttribute("data-theme",i)}),n=new MutationObserver(i=>{const o=i[0].target.getAttribute("data-theme");if(!o||!["light","dark"].includes(o))return;const s=MC(ee(this,$o));o!==s&&ee(this,Tu).set(o)});return n.observe(e,{attributeFilter:["data-theme"]}),()=>{t(),n.disconnect()}});on(this,"setAppearance",e=>{ee(this,Tu).set(e)});on(this,"cycleAppearance",()=>{j4&&ee(this,Tu).update(e=>{switch(e){case"system":return"light";case"light":return"dark";case"dark":default:return"system"}})});on(this,"resolveColor",e=>Hp(e)?e:ml(ee(this,$o),t=>{var n;return ee(n=Ih,Xh).call(n,e,t)}));on(this,"resolveColorsObject",e=>Hp(e)?e:e?ml(ee(this,$o),t=>Object.fromEntries(Object.entries(e).map(([n,i])=>{var a;return[n,ee(a=Ih,Xh).call(a,i,t)]}))):lo(void 0));on(this,"resolveColorPalette",e=>Hp(e)?e:typeof e=="string"?ml(ee(this,Kh),t=>t.colorPalettes[e.trim()]):Array.isArray(e)?ml(ee(this,$o),t=>e.map(n=>{var i;return ee(i=Ih,Xh).call(i,n,t)})):lo(void 0));on(this,"resolveColorScale",e=>Hp(e)?e:typeof e=="string"?ml(ee(this,Kh),t=>{const n=t.colorScales[e.trim()];if(n)return n;const i=t.colors[e.trim()];if(i)return[t.colors["base-100"],i];if(Xt.valid(e))return[t.colors["base-100"],e]}):Array.isArray(e)?ml(ee(this,$o),t=>e.map(n=>{var i;return ee(i=Ih,Xh).call(i,n,t)})):lo(void 0));Ir(this,Ig,vbe()),Ir(this,Tu,UW("evidence-theme",Qx,{serialize:e=>e,deserialize:e=>j4&&["system","light","dark"].includes(e)?e:Qx})),Ir(this,$o,ml([ee(this,Ig),ee(this,Tu)],([e,t])=>t==="system"?e:t)),Ir(this,Kh,ml(ee(this,$o),e=>fi[e]))}get systemTheme(){return ee(this,Ig)}get selectedAppearance(){return P3(ee(this,Tu))}get activeAppearance(){return ee(this,$o)}get theme(){return ee(this,Kh)}get themesConfig(){return Mj}};Ig=new WeakMap,Tu=new WeakMap,$o=new WeakMap,Kh=new WeakMap,Xh=new WeakMap,Nt(Ih,Xh,(e,t)=>{if(typeof e=="string"){const n=fi.light.colors[e.trim()],i=fi.dark.colors[e.trim()];if(t==="light")return n??e;if(t==="dark")return i??$4(n??e)??e}if(mbe(e)){const[n,i]=e,a=fi.light.colors[n.trim()],o=i?fi.dark.colors[i==null?void 0:i.trim()]??i:void 0;if(t==="light")return a??n;if(t==="dark")return o??$4(a??n)??i}});let RT=Ih;const q4=Symbol("__EvidenceThemeStores__"),E1=()=>{let r=Od(q4);return r||(r=new RT,TC(q4,r)),r},mbe=r=>Array.isArray(r)&&(r.length===1||r.length===2)&&r.every(e=>typeof e=="string"),mZe=Symbol(),Ij=Symbol();function ybe(r){let e,t,n="error",i,a,o;return{c(){e=oe("span"),t=oe("span"),t.textContent=n,i=Le(),a=oe("span"),o=dt(r[0]),this.h()},l(s){e=se(s,"SPAN",{class:!0});var l=ge(e);t=se(l,"SPAN",{class:!0,"data-svelte-h":!0}),kt(t)!=="svelte-1e4f3hi"&&(t.textContent=n),i=Fe(l),a=se(l,"SPAN",{class:!0});var u=ge(a);o=pt(u,r[0]),u.forEach(U),l.forEach(U),this.h()},h(){Y(t,"class","inline font-sans font-medium text-xs text-negative"),Y(a,"class","hidden font-sans group-hover:inline absolute -top-1 left-[105%] text-sm z-10 px-2 py-1 bg-base-100 border border-base-300 leading-relaxed min-w-[150px] max-w-[400px] rounded-md"),Y(e,"class","group inline-flex items-center relative cursor-help cursor-helpfont-sans px-1 border border-negative/50 py-[1px] bg-negative/10 rounded")},m(s,l){le(s,e,l),X(e,t),X(e,i),X(e,a),X(a,o)},p(s,[l]){l&1&&Rt(o,s[0])},i:xe,o:xe,d(s){s&&U(e)}}}function bbe(r,e,t){let{error:n=void 0}=e;return r.$$set=i=>{"error"in i&&t(0,n=i.error)},[n]}class FL extends kr{constructor(e){super(),Tr(this,e,bbe,ybe,Mr,{error:0})}}function _be(r){let e,t,n="Big Value",i,a,o,s,l,u;return{c(){e=oe("div"),t=oe("div"),t.textContent=n,i=Le(),a=oe("div"),o=oe("div"),s=dt(`error + `),l=oe("span"),u=dt(r[0]),this.h()},l(c){e=se(c,"DIV",{width:!0,class:!0});var f=ge(e);t=se(f,"DIV",{class:!0,"data-svelte-h":!0}),kt(t)!=="svelte-f1i116"&&(t.textContent=n),i=Fe(f),a=se(f,"DIV",{class:!0});var h=ge(a);o=se(h,"DIV",{class:!0});var d=ge(o);s=pt(d,`error + `),l=se(d,"SPAN",{class:!0});var p=ge(l);u=pt(p,r[0]),p.forEach(U),d.forEach(U),h.forEach(U),f.forEach(U),this.h()},h(){Y(t,"class","font-bold text-center text-sm"),Y(l,"class","hidden font-sans group-hover:inline-block absolute top-[50%] left-[50%] text-sm z-10 px-2 py-1 bg-base-100 border border-base-300 leading-relaxed min-w-[150px] max-w-[400px] rounded-md z-50 overflow-visible"),Y(o,"class","text-center [word-wrap:break-work] w-full font-medium text-xs text-negative"),Y(a,"class","m-auto w-[100px]"),Y(e,"width","100%"),Y(e,"class","inline-block group w-[100px] relative cursor-help cursor-helpfont-sans box-content grid-cols-1 justify-center bg-negative/10 font-ui font-normal rounded border border-negative/50 h-[38px] mt-0.5 py-3 px-3 print:break-inside-avoid")},m(c,f){le(c,e,f),X(e,t),X(e,i),X(e,a),X(a,o),X(o,s),X(o,l),X(l,u)},p(c,[f]){f&1&&Rt(u,c[0])},i:xe,o:xe,d(c){c&&U(e)}}}function wbe(r,e,t){let{error:n}=e;return r.$$set=i=>{"error"in i&&t(0,n=i.error)},[n]}class Sbe extends kr{constructor(e){super(),Tr(this,e,wbe,_be,Mr,{error:0})}}function Cbe(r){let e,t;return e=new kL({props:{chartType:r[3],error:r[4]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&8&&(a.chartType=n[3]),i&16&&(a.error=n[4]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function Abe(r){let e,t;return e=new Sbe({props:{error:r[4]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&16&&(a.error=n[4]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function xbe(r){let e,t;return e=new FL({props:{error:r[4]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&16&&(a.error=n[4]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function Dbe(r){let e;function t(a,o){return a[3]==="Value"?Tbe:a[3]==="Big Value"?kbe:Ebe}let n=t(r),i=n(r);return{c(){i.c(),e=Xe()},l(a){i.l(a),e=Xe()},m(a,o){i.m(a,o),le(a,e,o)},p(a,o){n===(n=t(a))&&i?i.p(a,o):(i.d(1),i=n(a),i&&(i.c(),i.m(e.parentNode,e)))},i:xe,o:xe,d(a){a&&U(e),i.d(a)}}}function Ebe(r){let e,t;return{c(){e=oe("p"),t=dt(r[2]),this.h()},l(n){e=se(n,"P",{class:!0});var i=ge(e);t=pt(i,r[2]),i.forEach(U),this.h()},h(){Y(e,"class","text-xs text-base-content-muted p-2 my-2 w-full border border-base-300 border-dashed rounded")},m(n,i){le(n,e,i),X(e,t)},p(n,i){i&4&&Rt(t,n[2])},d(n){n&&U(e)}}}function kbe(r){let e,t;return{c(){e=oe("p"),t=dt(r[2]),this.h()},l(n){e=se(n,"P",{class:!0});var i=ge(e);t=pt(i,r[2]),i.forEach(U),this.h()},h(){Y(e,"class","text-xs text-base-content-muted p-2 pt-[32px] my-0 text-center w-full align-middle h-[80px] border border-base-300 border-dashed rounded min-w-[120px]")},m(n,i){le(n,e,i),X(e,t)},p(n,i){i&4&&Rt(t,n[2])},d(n){n&&U(e)}}}function Tbe(r){let e,t;return{c(){e=oe("span"),t=dt(r[2]),this.h()},l(n){e=se(n,"SPAN",{class:!0});var i=ge(e);t=pt(i,r[2]),i.forEach(U),this.h()},h(){Y(e,"class","text-xs text-base-content-muted p-2 my-2 w-full border border-base-300 border-dashed rounded")},m(n,i){le(n,e,i),X(e,t)},p(n,i){i&4&&Rt(t,n[2])},d(n){n&&U(e)}}}function Mbe(r){let e,t,n,i,a;const o=[Dbe,xbe,Abe,Cbe],s=[];function l(u,c){return c&3&&(e=null),e==null&&(e=!!(["warn","pass"].includes(u[1])||!u[0])),e?0:u[3]==="Value"?1:u[3]==="Big Value"?2:3}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Xe()},l(u){n.l(u),i=Xe()},m(u,c){s[t].m(u,c),le(u,i,c),a=!0},p(u,[c]){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Mt(),re(s[f],1,1,()=>{s[f]=null}),It(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),K(n,1),n.m(i.parentNode,i))},i(u){a||(K(n),a=!0)},o(u){re(n),a=!1},d(u){u&&U(i),s[t].d(u)}}}function Ibe(r,e,t){let{isInitial:n=!0}=e,{emptySet:i="error"}=e,{emptyMessage:a="No Records"}=e,{chartType:o="Component"}=e,s="Dataset is empty - query ran successfully, but no data was returned from the database";return o==="Big Value"&&(s="Dataset is empty"),i==="error"&&n?console.error("\x1B[31m%s\x1B[0m",`Error in ${o}: ${s}`):i==="warn"&&n&&console.warn(`Warning in ${o}: Dataset is empty - query ran successfully, but no data was returned from the database`),r.$$set=l=>{"isInitial"in l&&t(0,n=l.isInitial),"emptySet"in l&&t(1,i=l.emptySet),"emptyMessage"in l&&t(2,a=l.emptyMessage),"chartType"in l&&t(3,o=l.chartType)},[n,i,a,o,s]}class Lj extends kr{constructor(e){super(),Tr(this,e,Ibe,Mbe,Mr,{isInitial:0,emptySet:1,emptyMessage:2,chartType:3})}}function Y4(r,e,t){const n=r.slice();n[4]=e[t];const i=n[4].data_type??n[4].column_type;return n[5]=i,n}function Z4(r,e){let t,n,i,a,o=e[5]+"",s,l,u,c=e[4].column_name+"",f,h,d,p;return i=new Ao({props:{src:e[3](e[5]),class:"text-base-content-muted w-5 h-5"}}),{key:r,first:null,c(){t=oe("li"),n=oe("div"),Ne(i.$$.fragment),a=Le(),s=dt(o),l=Le(),u=oe("b"),f=dt(c),h=Le(),this.h()},l(g){t=se(g,"LI",{class:!0});var v=ge(t);n=se(v,"DIV",{class:!0});var m=ge(n);ze(i.$$.fragment,m),a=Fe(m),s=pt(m,o),l=Fe(m),u=se(m,"B",{class:!0});var y=ge(u);f=pt(y,c),y.forEach(U),m.forEach(U),h=Fe(v),v.forEach(U),this.h()},h(){Y(u,"class","lowercase truncate"),Y(n,"class","grid grid-cols-[auto,auto,1fr] gap-2 px-2 py-1 w-full lowercase truncate"),Y(t,"class",d=MS("font-mono text-sm rounded flex flex-row hover:bg-base-200 max-w-full",e[1])),this.first=t},m(g,v){le(g,t,v),X(t,n),Ve(i,n,null),X(n,a),X(n,s),X(n,l),X(n,u),X(u,f),X(t,h),p=!0},p(g,v){e=g;const m={};v&1&&(m.src=e[3](e[5])),i.$set(m),(!p||v&1)&&o!==(o=e[5]+"")&&Rt(s,o),(!p||v&1)&&c!==(c=e[4].column_name+"")&&Rt(f,c),(!p||v&2&&d!==(d=MS("font-mono text-sm rounded flex flex-row hover:bg-base-200 max-w-full",e[1])))&&Y(t,"class",d)},i(g){p||(K(i.$$.fragment,g),p=!0)},o(g){re(i.$$.fragment,g),p=!1},d(g){g&&U(t),Ue(i)}}}function Lbe(r){let e,t=[],n=new Map,i,a,o=Lr(r[0]);const s=l=>l[4].column_name;for(let l=0;l{switch(s.toUpperCase()){case"INT":case"INTEGER":case"BIGINT":case"SMALLINT":case"TINYINT":case"DOUBLE":return zle;case"DATE":case"DATETIME":case"TIMESTAMP":return Ule;case"BOOLEAN":return jle;default:return Vle}};return r.$$set=s=>{"columns"in s&&t(0,n=s.columns),"rowClass"in s&&t(1,i=s.rowClass),"class"in s&&t(2,a=s.class)},[n,i,a,o]}class Bbe extends kr{constructor(e){super(),Tr(this,e,Fbe,Lbe,Mr,{columns:0,rowClass:1,class:2})}}function K4(r,e,t=!0){const n=xL(r,F4(t?{count:B4(e),countDistinct:O4(e),min:_ye(e),max:wye(e),median:Cye(e),mean:Sye(e),sum:yye(e)}:{count:B4(e),countDistinct:O4(e)}))[0],{maxDecimals:i,unitType:a}=Obe(r.map(o=>o[e]));return{min:n.min,max:n.max,median:n.median,mean:n.mean,count:n.count,countDistinct:n.countDistinct,sum:n.sum,maxDecimals:i,unitType:a}}function Obe(r){var e;if(r==null||r.length===0)return{maxDecimals:0,unitType:"unknown"};{let t=0;for(const n of r){const i=(e=n==null?void 0:n.toString().split(".")[1])==null?void 0:e.length;i>t&&(t=i)}return{maxDecimals:t,unitType:"number"}}}function BL(r,e="object"){const t={},n=xye(r);for(const i of Object.keys(r[0])){const a=n.find(u=>{var c;return((c=u.name)==null?void 0:c.toLowerCase())===(i==null?void 0:i.toLowerCase())})??{name:i,evidenceType:Vc.NUMBER,typeFidelity:fy.INFERRED},o=a.evidenceType;let s=a.evidenceType==="number"?K4(r,i,!0):K4(r,i,!1);a.evidenceType!=="number"&&(s.maxDecimals=0,s.unitType=a.evidenceType);const l=Dye(i,a,s);t[i]={title:Iye(i,l),type:o,evidenceColumnType:a,format:l,columnUnitSummary:s}}return e!=="object"?Object.entries(t).map(([i,a])=>({id:i,...a})):t}const Fj=1024;let Pbe=0,Jx=class{constructor(e,t){this.from=e,this.to=t}};class Hr{constructor(e={}){this.id=Pbe++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=ho.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}}Hr.closedBy=new Hr({deserialize:r=>r.split(" ")});Hr.openedBy=new Hr({deserialize:r=>r.split(" ")});Hr.group=new Hr({deserialize:r=>r.split(" ")});Hr.isolate=new Hr({deserialize:r=>{if(r&&r!="rtl"&&r!="ltr"&&r!="auto")throw new RangeError("Invalid value for isolate: "+r);return r||"auto"}});Hr.contextHash=new Hr({perNode:!0});Hr.lookAhead=new Hr({perNode:!0});Hr.mounted=new Hr({perNode:!0});class jS{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}static get(e){return e&&e.props&&e.props[Hr.mounted.id]}}const Rbe=Object.create(null);class ho{constructor(e,t,n,i=0){this.name=e,this.props=t,this.id=n,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):Rbe,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new ho(e.name||"",t,e.id,n);if(e.props){for(let a of e.props)if(Array.isArray(a)||(a=a(i)),a){if(a[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[a[0].id]=a[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(Hr.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let i of n.split(" "))t[i]=e[n];return n=>{for(let i=n.prop(Hr.group),a=-1;a<(i?i.length:0);a++){let o=t[a<0?n.name:i[a]];if(o)return o}}}}ho.none=new ho("",Object.create(null),0,8);class OL{constructor(e){this.types=e;for(let t=0;t0;for(let l=this.cursor(o|Oi.IncludeAnonymous);;){let u=!1;if(l.from<=a&&l.to>=i&&(!s&&l.type.isAnonymous||t(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&n&&(s||!l.type.isAnonymous)&&n(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:NL(ho.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,i)=>new NT(this.type,t,n,i,this.propValues),e.makeTree||((t,n,i)=>new NT(ho.none,t,n,i)))}static build(e){return Ube(e)}};Ki.empty=new Ki(ho.none,[],[],0);class PL{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new PL(this.buffer,this.index)}}class vf{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return ho.none}toString(){let e=[];for(let t=0;t0));l=o[l+3]);return s}slice(e,t,n){let i=this.buffer,a=new Uint16Array(t-e),o=0;for(let s=e,l=0;s=e&&te;case 1:return t<=e&&n>e;case 2:return n>e;case 4:return!0}}function py(r,e,t,n){for(var i;r.from==r.to||(t<1?r.from>=e:r.from>e)||(t>-1?r.to<=e:r.to0?s.length:-1;e!=u;e+=t){let c=s[e],f=l[e]+o.from;if(Bj(i,n,f,f+c.length)){if(c instanceof vf){if(a&Oi.ExcludeBuffers)continue;let h=c.findChild(0,c.buffer.length,t,n-f,i);if(h>-1)return new Uc(new Nbe(o,c,e,f),null,h)}else if(a&Oi.IncludeAnonymous||!c.type.isAnonymous||RL(c)){let h;if(!(a&Oi.IgnoreMounts)&&(h=jS.get(c))&&!h.overlay)return new gw(h.tree,f,e,o);let d=new gw(c,f,e,o);return a&Oi.IncludeAnonymous||!d.type.isAnonymous?d:d.nextChild(t<0?c.children.length-1:0,t,n,i)}}}if(a&Oi.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let i;if(!(n&Oi.IgnoreOverlays)&&(i=jS.get(this._tree))&&i.overlay){let a=e-this.from;for(let{from:o,to:s}of i.overlay)if((t>0?o<=a:o=a:s>a))return new gw(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function Q4(r,e,t,n){let i=r.cursor(),a=[];if(!i.firstChild())return a;if(t!=null){for(let o=!1;!o;)if(o=i.type.is(t),!i.nextSibling())return a}for(;;){if(n!=null&&i.type.is(n))return a;if(i.type.is(e)&&a.push(i.node),!i.nextSibling())return n==null?a:[]}}function zT(r,e,t=e.length-1){for(let n=r;t>=0;n=n.parent){if(!n)return!1;if(!n.type.isAnonymous){if(e[t]&&e[t]!=n.name)return!1;t--}}return!0}class Nbe{constructor(e,t,n,i){this.parent=e,this.buffer=t,this.index=n,this.start=i}}class Uc extends Oj{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,n);return a<0?null:new Uc(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&Oi.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return a<0?null:new Uc(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Uc(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Uc(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,i=this.index+4,a=n.buffer[this.index+3];if(a>i){let o=n.buffer[this.index+1];e.push(n.slice(i,a,o)),t.push(0)}return new Ki(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Pj(r){if(!r.length)return null;let e=0,t=r[0];for(let a=1;at.from||o.to=e){let s=new mf(o.tree,o.overlay[0].from+a.from,-1,a);(i||(i=[n])).push(py(s,e,t,!1))}}return i?Pj(i):n}class VT{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof mf)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=n+i.buffer[e+1],this.to=n+i.buffer[e+2],!0}yield(e){return e?e instanceof mf?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:i}=this.buffer,a=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,n);return a<0?!1:(this.stack.push(this.index),this.yieldBuf(a))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&Oi.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Oi.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Oi.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let i=n<0?0:this.stack[n]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(i)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let a=t+e,o=e<0?-1:n._tree.children.length;a!=o;a+=e){let s=n._tree.children[a];if(this.mode&Oi.IncludeAnonymous||s instanceof vf||!s.type.isAnonymous||RL(s))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,n=a+1;break e}i=this.stack[--a]}for(let i=n;i=0;a--){if(a<0)return zT(this._tree,e,i);let o=n[t.buffer[this.stack[a]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function RL(r){return r.children.some(e=>e instanceof vf||!e.type.isAnonymous||RL(e))}function Ube(r){var e;let{buffer:t,nodeSet:n,maxBufferLength:i=Fj,reused:a=[],minRepeatType:o=n.types.length}=r,s=Array.isArray(t)?new PL(t,t.length):t,l=n.types,u=0,c=0;function f(w,S,C,A,x,D){let{id:E,start:k,end:M,size:T}=s,L=c,F=u;for(;T<0;)if(s.next(),T==-1){let R=a[E];C.push(R),A.push(k-w);return}else if(T==-3){u=E;return}else if(T==-4){c=E;return}else throw new RangeError(`Unrecognized record size: ${T}`);let N=l[E],z,W,H=k-w;if(M-k<=i&&(W=v(s.pos-S,x))){let R=new Uint16Array(W.size-W.skip),ne=s.pos-W.size,te=R.length;for(;s.pos>ne;)te=m(W.start,R,te);z=new vf(R,M-W.start,n),H=W.start-w}else{let R=s.pos-T;s.next();let ne=[],te=[],fe=E>=o?E:-1,Ce=0,Te=M;for(;s.pos>R;)fe>=0&&s.id==fe&&s.size>=0?(s.end<=Te-i&&(p(ne,te,k,Ce,s.end,Te,fe,L,F),Ce=ne.length,Te=s.end),s.next()):D>2500?h(k,R,ne,te):f(k,R,ne,te,fe,D+1);if(fe>=0&&Ce>0&&Ce-1&&Ce>0){let Se=d(N,F);z=NL(N,ne,te,0,ne.length,0,M-k,Se,Se)}else z=g(N,ne,te,M-k,L-M,F)}C.push(z),A.push(H)}function h(w,S,C,A){let x=[],D=0,E=-1;for(;s.pos>S;){let{id:k,start:M,end:T,size:L}=s;if(L>4)s.next();else{if(E>-1&&M=0;T-=3)k[L++]=x[T],k[L++]=x[T+1]-M,k[L++]=x[T+2]-M,k[L++]=L;C.push(new vf(k,x[2]-M,n)),A.push(M-w)}}function d(w,S){return(C,A,x)=>{let D=0,E=C.length-1,k,M;if(E>=0&&(k=C[E])instanceof Ki){if(!E&&k.type==w&&k.length==x)return k;(M=k.prop(Hr.lookAhead))&&(D=A[E]+k.length+M)}return g(w,C,A,x,D,S)}}function p(w,S,C,A,x,D,E,k,M){let T=[],L=[];for(;w.length>A;)T.push(w.pop()),L.push(S.pop()+C-x);w.push(g(n.types[E],T,L,D-x,k-D,M)),S.push(x-C)}function g(w,S,C,A,x,D,E){if(D){let k=[Hr.contextHash,D];E=E?[k].concat(E):[k]}if(x>25){let k=[Hr.lookAhead,x];E=E?[k].concat(E):[k]}return new Ki(w,S,C,A,E)}function v(w,S){let C=s.fork(),A=0,x=0,D=0,E=C.end-i,k={size:0,start:0,skip:0};e:for(let M=C.pos-w;C.pos>M;){let T=C.size;if(C.id==S&&T>=0){k.size=A,k.start=x,k.skip=D,D+=4,A+=4,C.next();continue}let L=C.pos-T;if(T<0||L=o?4:0,N=C.start;for(C.next();C.pos>L;){if(C.size<0)if(C.size==-3)F+=4;else break e;else C.id>=o&&(F+=4);C.next()}x=N,A+=T,D+=F}return(S<0||A==w)&&(k.size=A,k.start=x,k.skip=D),k.size>4?k:void 0}function m(w,S,C){let{id:A,start:x,end:D,size:E}=s;if(s.next(),E>=0&&A4){let M=s.pos-(E-4);for(;s.pos>M;)C=m(w,S,C)}S[--C]=k,S[--C]=D-w,S[--C]=x-w,S[--C]=A}else E==-3?u=A:E==-4&&(c=A);return C}let y=[],b=[];for(;s.pos>0;)f(r.start||0,r.bufferStart||0,y,b,-1,0);let _=(e=r.length)!==null&&e!==void 0?e:y.length?b[0]+y[0].length:0;return new Ki(l[r.topID],y.reverse(),b.reverse(),_)}const J4=new WeakMap;function vw(r,e){if(!r.isAnonymous||e instanceof vf||e.type!=r)return 1;let t=J4.get(e);if(t==null){t=1;for(let n of e.children){if(n.type!=r||!(n instanceof Ki)){t=1;break}t+=vw(r,n)}J4.set(e,t)}return t}function NL(r,e,t,n,i,a,o,s,l){let u=0;for(let p=n;p=c)break;S+=C}if(b==_+1){if(S>c){let C=p[_];d(C.children,C.positions,0,C.children.length,g[_]+y);continue}f.push(p[_])}else{let C=g[b-1]+p[b-1].length-w;f.push(NL(r,p,g,_,b,w,C,null,l))}h.push(w+y-a)}}return d(e,t,n,i,0),(s||l)(f,h,o)}class rd{constructor(e,t,n,i,a=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=i,this.open=(a?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let i=[new rd(0,e.length,e,0,!1,n)];for(let a of t)a.to>e.length&&i.push(a);return i}static applyChanges(e,t,n=128){if(!t.length)return e;let i=[],a=1,o=e.length?e[0]:null;for(let s=0,l=0,u=0;;s++){let c=s=n)for(;o&&o.from=h.from||f<=h.to||u){let d=Math.max(h.from,l)-u,p=Math.min(h.to,f)-u;h=d>=p?null:new rd(d,p,h.tree,h.offset+u,s>0,!!c)}if(h&&i.push(h),o.to>f)break;o=anew Jx(i.from,i.to)):[new Jx(0,0)]:[new Jx(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let i=this.startParse(e,t,n);for(;;){let a=i.advance();if(a)return a}}};class Gbe{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new Hr({perNode:!0});class tn{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Hg(this,e,t);let i=[];return this.decompose(0,e,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(t,this.length,i,1),Al.from(i,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Hg(this,e,t);let n=[];return this.decompose(e,t,n,0),Al.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),i=new b0(this),a=new b0(e);for(let o=t,s=t;;){if(i.next(o),a.next(o),o=0,i.lineBreak!=a.lineBreak||i.done!=a.done||i.value!=a.value)return!1;if(s+=i.value.length,i.done||s>=n)return!0}}iter(e=1){return new b0(this,e)}iterRange(e,t=this.length){return new Nj(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;n=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new zj(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?tn.empty:e.length<=32?new ei(e):Al.from(ei.split(e,[]))}}class ei extends tn{constructor(e,t=Hbe(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,i){for(let a=0;;a++){let o=this.text[a],s=i+o.length;if((t?n:s)>=e)return new Wbe(i,s,n,o);i=s+1,n++}}decompose(e,t,n,i){let a=e<=0&&t>=this.length?this:new ei(eR(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let o=n.pop(),s=mw(a.text,o.text.slice(),0,a.length);if(s.length<=32)n.push(new ei(s,o.length+a.length));else{let l=s.length>>1;n.push(new ei(s.slice(0,l)),new ei(s.slice(l)))}}else n.push(a)}replace(e,t,n){if(!(n instanceof ei))return super.replace(e,t,n);[e,t]=Hg(this,e,t);let i=mw(this.text,mw(n.text,eR(this.text,0,e)),t),a=this.length+n.length-(t-e);return i.length<=32?new ei(i,a):Al.from(ei.split(i,[]),a)}sliceString(e,t=this.length,n=` +`){[e,t]=Hg(this,e,t);let i="";for(let a=0,o=0;a<=t&&oe&&o&&(i+=n),ea&&(i+=s.slice(Math.max(0,e-a),t-a)),a=l+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],i=-1;for(let a of e)n.push(a),i+=a.length+1,n.length==32&&(t.push(new ei(n,i)),n=[],i=-1);return i>-1&&t.push(new ei(n,i)),t}}class Al extends tn{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,i){for(let a=0;;a++){let o=this.children[a],s=i+o.length,l=n+o.lines-1;if((t?l:s)>=e)return o.lineInner(e,t,n,i);i=s+1,n=l+1}}decompose(e,t,n,i){for(let a=0,o=0;o<=t&&a=o){let u=i&((o<=e?1:0)|(l>=t?2:0));o>=e&&l<=t&&!u?n.push(s):s.decompose(e-o,t-o,n,u)}o=l+1}}replace(e,t,n){if([e,t]=Hg(this,e,t),n.lines=a&&t<=s){let l=o.replace(e-a,t-a,n),u=this.lines-o.lines+l.lines;if(l.lines>4&&l.lines>u>>6){let c=this.children.slice();return c[i]=l,new Al(c,this.length-(t-e)+n.length)}return super.replace(a,s,l)}a=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=` +`){[e,t]=Hg(this,e,t);let i="";for(let a=0,o=0;ae&&a&&(i+=n),eo&&(i+=s.sliceString(e-o,t-o,n)),o=l+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Al))return 0;let n=0,[i,a,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,a+=t){if(i==o||a==s)return n;let l=this.children[i],u=e.children[a];if(l!=u)return n+l.scanIdentical(u,t);n+=l.length+1}}static from(e,t=e.reduce((n,i)=>n+i.length+1,-1)){let n=0;for(let d of e)n+=d.lines;if(n<32){let d=[];for(let p of e)p.flatten(d);return new ei(d,t)}let i=Math.max(32,n>>5),a=i<<1,o=i>>1,s=[],l=0,u=-1,c=[];function f(d){let p;if(d.lines>a&&d instanceof Al)for(let g of d.children)f(g);else d.lines>o&&(l>o||!l)?(h(),s.push(d)):d instanceof ei&&l&&(p=c[c.length-1])instanceof ei&&d.lines+p.lines<=32?(l+=d.lines,u+=d.length+1,c[c.length-1]=new ei(p.text.concat(d.text),p.length+1+d.length)):(l+d.lines>i&&h(),l+=d.lines,u+=d.length+1,c.push(d))}function h(){l!=0&&(s.push(c.length==1?c[0]:Al.from(c,u)),u=-1,l=c.length=0)}for(let d of e)f(d);return h(),s.length==1?s[0]:new Al(s,t)}}tn.empty=new ei([""],0);function Hbe(r){let e=-1;for(let t of r)e+=t.length+1;return e}function mw(r,e,t=0,n=1e9){for(let i=0,a=0,o=!0;a=t&&(l>n&&(s=s.slice(0,n-i)),i0?1:(e instanceof ei?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],a=this.offsets[n],o=a>>1,s=i instanceof ei?i.text.length:i.children.length;if(o==(t>0?s:0)){if(n==0)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((a&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=` +`,this;e--}else if(i instanceof ei){let l=i.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,l.length>Math.max(0,e))return this.value=e==0?l:t>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[o+(t<0?-1:0)];e>l.length?(e-=l.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(l),this.offsets.push(t>0?1:(l instanceof ei?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Nj{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new b0(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=n?i:t<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class zj{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(tn.prototype[Symbol.iterator]=function(){return this.iter()},b0.prototype[Symbol.iterator]=Nj.prototype[Symbol.iterator]=zj.prototype[Symbol.iterator]=function(){return this});let Wbe=class{constructor(e,t,n,i){this.from=e,this.to=t,this.number=n,this.text=i}get length(){return this.to-this.from}};function Hg(r,e,t){return e=Math.max(0,Math.min(r.length,e)),[e,Math.max(e,Math.min(r.length,t))]}let lg="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(r=>r?parseInt(r,36):1);for(let r=1;rr)return lg[e-1]<=r;return!1}function tR(r){return r>=127462&&r<=127487}const rR=8205;function Xi(r,e,t=!0,n=!0){return(t?Vj:jbe)(r,e,n)}function Vj(r,e,t){if(e==r.length)return e;e&&Uj(r.charCodeAt(e))&&Gj(r.charCodeAt(e-1))&&e--;let n=fa(r,e);for(e+=es(n);e=0&&tR(fa(r,o));)a++,o-=2;if(a%2==0)break;e+=2}else break}return e}function jbe(r,e,t){for(;e>0;){let n=Vj(r,e-2,t);if(n=56320&&r<57344}function Gj(r){return r>=55296&&r<56320}function fa(r,e){let t=r.charCodeAt(e);if(!Gj(t)||e+1==r.length)return t;let n=r.charCodeAt(e+1);return Uj(n)?(t-55296<<10)+(n-56320)+65536:t}function zL(r){return r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode((r>>10)+55296,(r&1023)+56320))}function es(r){return r<65536?1:2}const UT=/\r\n?|\n/;var Oa=function(r){return r[r.Simple=0]="Simple",r[r.TrackDel=1]="TrackDel",r[r.TrackBefore=2]="TrackBefore",r[r.TrackAfter=3]="TrackAfter",r}(Oa||(Oa={}));class Nl{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return a+(e-i);a+=s}else{if(n!=Oa.Simple&&u>=e&&(n==Oa.TrackDel&&ie||n==Oa.TrackBefore&&ie))return null;if(u>e||u==e&&t<0&&!s)return e==i||t<0?a:a+l;a+=l}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return a}touchesRange(e,t=e){for(let n=0,i=0;n=0&&i<=t&&s>=e)return it?"cover":!0;i=s}return!1}toString(){let e="";for(let t=0;t=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Nl(e)}static create(e){return new Nl(e)}}class _i extends Nl{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return GT(this,(t,n,i,a,o)=>e=e.replace(i,i+(n-t),o),!1),e}mapDesc(e,t=!1){return HT(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let i=0,a=0;i=0){t[i]=s,t[i+1]=o;let l=i>>1;for(;n.length0&&Gc(n,t,a.text),a.forward(c),s+=c}let u=e[o++];for(;s>1].toJSON()))}return e}static of(e,t,n){let i=[],a=[],o=0,s=null;function l(c=!1){if(!c&&!i.length)return;oh||f<0||h>t)throw new RangeError(`Invalid change range ${f} to ${h} (in doc of length ${t})`);let p=d?typeof d=="string"?tn.of(d.split(n||UT)):d:tn.empty,g=p.length;if(f==h&&g==0)return;fo&&ca(i,f-o,-1),ca(i,h-f,g),Gc(a,i,p),o=h}}return u(e),l(!s),s}static empty(e){return new _i(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let i=0;is&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(a.length==1)t.push(a[0],0);else{for(;n.length=0&&t<=0&&t==r[i+1]?r[i]+=e:e==0&&r[i]==0?r[i+1]+=t:n?(r[i]+=e,r[i+1]+=t):r.push(e,t)}function Gc(r,e,t){if(t.length==0)return;let n=e.length-2>>1;if(n>1])),!(t||o==r.sections.length||r.sections[o+1]<0);)s=r.sections[o++],l=r.sections[o++];e(i,u,a,c,f),i=u,a=c}}}function HT(r,e,t,n=!1){let i=[],a=n?[]:null,o=new gy(r),s=new gy(e);for(let l=-1;;)if(o.ins==-1&&s.ins==-1){let u=Math.min(o.len,s.len);ca(i,u,-1),o.forward(u),s.forward(u)}else if(s.ins>=0&&(o.ins<0||l==o.i||o.off==0&&(s.len=0&&l=0){let u=0,c=o.len;for(;c;)if(s.ins==-1){let f=Math.min(c,s.len);u+=f,c-=f,s.forward(f)}else if(s.ins==0&&s.lenl||o.ins>=0&&o.len>l)&&(s||n.length>u),a.forward2(l),o.forward(l)}}}}class gy{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?tn.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?tn.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Oh{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let n,i;return this.empty?n=i=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new Oh(n,i,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return We.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return We.range(this.anchor,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return We.range(e.anchor,e.head)}static create(e,t,n){return new Oh(e,t,n)}}class We{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:We.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;ne.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new We(e.ranges.map(t=>Oh.fromJSON(t)),e.main)}static single(e,t=e){return new We([We.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;ie?8:0)|a)}static normalized(e,t=0){let n=e[t];e.sort((i,a)=>i.from-a.from),t=e.indexOf(n);for(let i=1;ia.head?We.range(l,s):We.range(s,l))}}return new We(e,t)}}function Wj(r,e){for(let t of r.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let VL=0;class Et{constructor(e,t,n,i,a){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=i,this.id=VL++,this.default=e([]),this.extensions=typeof a=="function"?a(this):a}get reader(){return this}static define(e={}){return new Et(e.combine||(t=>t),e.compareInput||((t,n)=>t===n),e.compare||(e.combine?(t,n)=>t===n:UL),!!e.static,e.enables)}of(e){return new yw([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new yw(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new yw(e,this,2,t)}from(e,t){return t||(t=n=>n),this.compute([e],n=>t(n.field(e)))}}function UL(r,e){return r==e||r.length==e.length&&r.every((t,n)=>t===e[n])}class yw{constructor(e,t,n,i){this.dependencies=e,this.facet=t,this.type=n,this.value=i,this.id=VL++}dynamicSlot(e){var t;let n=this.value,i=this.facet.compareInput,a=this.id,o=e[a]>>1,s=this.type==2,l=!1,u=!1,c=[];for(let f of this.dependencies)f=="doc"?l=!0:f=="selection"?u=!0:((t=e[f.id])!==null&&t!==void 0?t:1)&1||c.push(e[f.id]);return{create(f){return f.values[o]=n(f),1},update(f,h){if(l&&h.docChanged||u&&(h.docChanged||h.selection)||WT(f,c)){let d=n(f);if(s?!nR(d,f.values[o],i):!i(d,f.values[o]))return f.values[o]=d,1}return 0},reconfigure:(f,h)=>{let d,p=h.config.address[a];if(p!=null){let g=YS(h,p);if(this.dependencies.every(v=>v instanceof Et?h.facet(v)===f.facet(v):v instanceof ra?h.field(v,!1)==f.field(v,!1):!0)||(s?nR(d=n(f),g,i):i(d=n(f),g)))return f.values[o]=g,0}else d=n(f);return f.values[o]=d,1}}}}function nR(r,e,t){if(r.length!=e.length)return!1;for(let n=0;nr[l.id]),i=t.map(l=>l.type),a=n.filter(l=>!(l&1)),o=r[e.id]>>1;function s(l){let u=[];for(let c=0;cn===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(iR).find(n=>n.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:n=>(n.values[t]=this.create(n),1),update:(n,i)=>{let a=n.values[t],o=this.updateF(a,i);return this.compareF(a,o)?0:(n.values[t]=o,1)},reconfigure:(n,i)=>i.config.address[this.id]!=null?(n.values[t]=i.field(this),0):(n.values[t]=this.create(n),1)}}init(e){return[this,iR.of({field:this,create:e})]}get extension(){return this}}const xh={lowest:4,low:3,default:2,high:1,highest:0};function im(r){return e=>new $j(e,r)}const Vd={highest:im(xh.highest),high:im(xh.high),default:im(xh.default),low:im(xh.low),lowest:im(xh.lowest)};class $j{constructor(e,t){this.inner=e,this.prec=t}}class KC{of(e){return new $T(this,e)}reconfigure(e){return KC.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class $T{constructor(e,t){this.compartment=e,this.inner=t}}class qS{constructor(e,t,n,i,a,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=i,this.staticValues=a,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let i=[],a=Object.create(null),o=new Map;for(let h of Ybe(e,t,o))h instanceof ra?i.push(h):(a[h.facet.id]||(a[h.facet.id]=[])).push(h);let s=Object.create(null),l=[],u=[];for(let h of i)s[h.id]=u.length<<1,u.push(d=>h.slot(d));let c=n==null?void 0:n.config.facets;for(let h in a){let d=a[h],p=d[0].facet,g=c&&c[h]||[];if(d.every(v=>v.type==0))if(s[p.id]=l.length<<1|1,UL(g,d))l.push(n.facet(p));else{let v=p.combine(d.map(m=>m.value));l.push(n&&p.compare(v,n.facet(p))?n.facet(p):v)}else{for(let v of d)v.type==0?(s[v.id]=l.length<<1|1,l.push(v.value)):(s[v.id]=u.length<<1,u.push(m=>v.dynamicSlot(m)));s[p.id]=u.length<<1,u.push(v=>qbe(v,p,d))}}let f=u.map(h=>h(s));return new qS(e,o,f,s,l,a)}}function Ybe(r,e,t){let n=[[],[],[],[],[]],i=new Map;function a(o,s){let l=i.get(o);if(l!=null){if(l<=s)return;let u=n[l].indexOf(o);u>-1&&n[l].splice(u,1),o instanceof $T&&t.delete(o.compartment)}if(i.set(o,s),Array.isArray(o))for(let u of o)a(u,s);else if(o instanceof $T){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(o.compartment)||o.inner;t.set(o.compartment,u),a(u,s)}else if(o instanceof $j)a(o.inner,o.prec);else if(o instanceof ra)n[s].push(o),o.provides&&a(o.provides,s);else if(o instanceof yw)n[s].push(o),o.facet.extensions&&a(o.facet.extensions,xh.default);else{let u=o.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(u,s)}}return a(r,xh.default),n.reduce((o,s)=>o.concat(s))}function _0(r,e){if(e&1)return 2;let t=e>>1,n=r.status[t];if(n==4)throw new Error("Cyclic dependency between fields and/or facets");if(n&2)return n;r.status[t]=4;let i=r.computeSlot(r,r.config.dynamicSlots[t]);return r.status[t]=2|i}function YS(r,e){return e&1?r.config.staticValues[e>>1]:r.values[e>>1]}const jj=Et.define(),jT=Et.define({combine:r=>r.some(e=>e),static:!0}),qj=Et.define({combine:r=>r.length?r[0]:void 0,static:!0}),Yj=Et.define(),Zj=Et.define(),Kj=Et.define(),Xj=Et.define({combine:r=>r.length?r[0]:!1});class rc{constructor(e,t){this.type=e,this.value=t}static define(){return new Zbe}}class Zbe{of(e){return new rc(this,e)}}class Kbe{constructor(e){this.map=e}of(e){return new Dr(this,e)}}class Dr{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new Dr(this.type,t)}is(e){return this.type==e}static define(e={}){return new Kbe(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let i of e){let a=i.map(t);a&&n.push(a)}return n}}Dr.reconfigure=Dr.define();Dr.appendConfig=Dr.define();class Ci{constructor(e,t,n,i,a,o){this.startState=e,this.changes=t,this.selection=n,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,n&&Wj(n,t.newLength),a.some(s=>s.type==Ci.time)||(this.annotations=a.concat(Ci.time.of(Date.now())))}static create(e,t,n,i,a,o){return new Ci(e,t,n,i,a,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Ci.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Ci.time=rc.define();Ci.userEvent=rc.define();Ci.addToHistory=rc.define();Ci.remote=rc.define();function Xbe(r,e){let t=[];for(let n=0,i=0;;){let a,o;if(n=r[n]))a=r[n++],o=r[n++];else if(i=0;i--){let a=n[i](r);a instanceof Ci?r=a:Array.isArray(a)&&a.length==1&&a[0]instanceof Ci?r=a[0]:r=Jj(e,ug(a),!1)}return r}function Jbe(r){let e=r.startState,t=e.facet(Kj),n=r;for(let i=t.length-1;i>=0;i--){let a=t[i](r);a&&Object.keys(a).length&&(n=Qj(n,qT(e,a,r.changes.newLength),!0))}return n==r?r:Ci.create(e,r.changes,r.selection,n.effects,n.annotations,n.scrollIntoView)}const e_e=[];function ug(r){return r==null?e_e:Array.isArray(r)?r:[r]}var Nn=function(r){return r[r.Word=0]="Word",r[r.Space=1]="Space",r[r.Other=2]="Other",r}(Nn||(Nn={}));const t_e=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let YT;try{YT=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function r_e(r){if(YT)return YT.test(r);for(let e=0;e"€"&&(t.toUpperCase()!=t.toLowerCase()||t_e.test(t)))return!0}return!1}function n_e(r){return e=>{if(!/\S/.test(e))return Nn.Space;if(r_e(e))return Nn.Word;for(let t=0;t-1)return Nn.Word;return Nn.Other}}class nn{constructor(e,t,n,i,a,o){this.config=e,this.doc=t,this.selection=n,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=a,o&&(o._state=this);for(let s=0;si.set(u,l)),t=null),i.set(s.value.compartment,s.value.extension)):s.is(Dr.reconfigure)?(t=null,n=s.value):s.is(Dr.appendConfig)&&(t=null,n=ug(n).concat(s.value));let a;t?a=e.startState.values.slice():(t=qS.resolve(n,i,this),a=new nn(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let o=e.startState.facet(jT)?e.newSelection:e.newSelection.asSingle();new nn(t,e.newDoc,o,a,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:We.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),i=this.changes(n.changes),a=[n.range],o=ug(n.effects);for(let s=1;so.spec.fromJSON(s,l)))}}return nn.create({doc:e.doc,selection:We.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=qS.resolve(e.extensions||[],new Map),n=e.doc instanceof tn?e.doc:tn.of((e.doc||"").split(t.staticFacet(nn.lineSeparator)||UT)),i=e.selection?e.selection instanceof We?e.selection:We.single(e.selection.anchor,e.selection.head):We.single(0);return Wj(i,n.length),t.staticFacet(jT)||(i=i.asSingle()),new nn(t,n,i,t.dynamicSlots.map(()=>null),(a,o)=>o.create(a),null)}get tabSize(){return this.facet(nn.tabSize)}get lineBreak(){return this.facet(nn.lineSeparator)||` +`}get readOnly(){return this.facet(Xj)}phrase(e,...t){for(let n of this.facet(nn.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(n,i)=>{if(i=="$")return"$";let a=+(i||1);return!a||a>t.length?n:t[a-1]})),e}languageDataAt(e,t,n=-1){let i=[];for(let a of this.facet(jj))for(let o of a(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){return n_e(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:i}=this.doc.lineAt(e),a=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let l=Xi(t,o,!1);if(a(t.slice(l,o))!=Nn.Word)break;o=l}for(;sr.length?r[0]:4});nn.lineSeparator=qj;nn.readOnly=Xj;nn.phrases=Et.define({compare(r,e){let t=Object.keys(r),n=Object.keys(e);return t.length==n.length&&t.every(i=>r[i]==e[i])}});nn.languageData=jj;nn.changeFilter=Yj;nn.transactionFilter=Zj;nn.transactionExtender=Kj;KC.reconfigure=Dr.define();function Bf(r,e,t={}){let n={};for(let i of r)for(let a of Object.keys(i)){let o=i[a],s=n[a];if(s===void 0)n[a]=o;else if(!(s===o||o===void 0))if(Object.hasOwnProperty.call(t,a))n[a]=t[a](s,o);else throw new Error("Config merge conflict for field "+a)}for(let i in e)n[i]===void 0&&(n[i]=e[i]);return n}class _d{eq(e){return this==e}range(e,t=e){return vy.create(e,t,this)}}_d.prototype.startSide=_d.prototype.endSide=0;_d.prototype.point=!1;_d.prototype.mapMode=Oa.TrackDel;class vy{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new vy(e,t,n)}}function ZT(r,e){return r.from-e.from||r.value.startSide-e.value.startSide}class GL{constructor(e,t,n,i){this.from=e,this.to=t,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,i=0){let a=n?this.to:this.from;for(let o=i,s=a.length;;){if(o==s)return o;let l=o+s>>1,u=a[l]-e||(n?this.value[l].endSide:this.value[l].startSide)-t;if(l==o)return u>=0?o:s;u>=0?s=l:o=l+1}}between(e,t,n,i){for(let a=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,a);ad||h==d&&u.startSide>0&&u.endSide<=0)continue;(d-h||u.endSide-u.startSide)<0||(o<0&&(o=h),u.point&&(s=Math.max(s,d-h)),n.push(u),i.push(h-o),a.push(d-o))}return{mapped:n.length?new GL(i,a,n,s):null,pos:o}}}class Mn{constructor(e,t,n,i){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=i}static create(e,t,n,i){return new Mn(e,t,n,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:i=0,filterTo:a=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(n&&(t=t.slice().sort(ZT)),this.isEmpty)return t.length?Mn.of(t):this;let s=new eq(this,null,-1).goto(0),l=0,u=[],c=new Wg;for(;s.value||l=0){let f=t[l++];c.addInner(f.from,f.to,f.value)||u.push(f)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||as.to||a=a&&e<=a+o.length&&o.between(a,e-a,t-a,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return my.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return my.from(e).goto(t)}static compare(e,t,n,i,a=-1){let o=e.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=a),s=t.filter(f=>f.maxPoint>0||!f.isEmpty&&f.maxPoint>=a),l=aR(o,s,n),u=new am(o,l,a),c=new am(s,l,a);n.iterGaps((f,h,d)=>oR(u,f,c,h,d,i)),n.empty&&n.length==0&&oR(u,0,c,0,0,i)}static eq(e,t,n=0,i){i==null&&(i=999999999);let a=e.filter(c=>!c.isEmpty&&t.indexOf(c)<0),o=t.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(a.length!=o.length)return!1;if(!a.length)return!0;let s=aR(a,o),l=new am(a,s,0).goto(n),u=new am(o,s,0).goto(n);for(;;){if(l.to!=u.to||!KT(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>i)return!0;l.next(),u.next()}}static spans(e,t,n,i,a=-1){let o=new am(e,null,a).goto(t),s=t,l=o.openStart;for(;;){let u=Math.min(o.to,n);if(o.point){let c=o.activeForPoint(o.to),f=o.pointFroms&&(i.span(s,u,o.active,l),l=o.openEnd(u));if(o.to>n)return l+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new Wg;for(let i of e instanceof vy?[e]:t?i_e(e):e)n.add(i.from,i.to,i.value);return n.finish()}static join(e){if(!e.length)return Mn.empty;let t=e[e.length-1];for(let n=e.length-2;n>=0;n--)for(let i=e[n];i!=Mn.empty;i=i.nextLayer)t=new Mn(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Mn.empty=new Mn([],[],null,-1);function i_e(r){if(r.length>1)for(let e=r[0],t=1;t0)return r.slice().sort(ZT);e=n}return r}Mn.empty.nextLayer=Mn.empty;class Wg{finishChunk(e){this.chunks.push(new GL(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new Wg)).add(e,t,n)}addInner(e,t,n){let i=e-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Mn.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Mn.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function aR(r,e,t){let n=new Map;for(let a of r)for(let o=0;o=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&i.push(new eq(o,t,n,a));return i.length==1?i[0]:new my(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)eD(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)eD(this.heap,n);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),eD(this.heap,0)}}}function eD(r,e){for(let t=r[e];;){let n=(e<<1)+1;if(n>=r.length)break;let i=r[n];if(n+1=0&&(i=r[n+1],n++),t.compare(i)<0)break;r[n]=t,r[e]=i,e=n}}class am{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=my.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){wb(this.active,e),wb(this.activeTo,e),wb(this.activeRank,e),this.minActive=sR(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:i,rank:a}=this.cursor;for(;t0;)t++;Sb(this.active,t,n),Sb(this.activeTo,t,i),Sb(this.activeRank,t,a),e&&Sb(e,t,this.cursor.from),this.minActive=sR(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&wb(n,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let a=this.cursor.value;if(!a.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[i]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function oR(r,e,t,n,i,a){r.goto(e),t.goto(n);let o=n+i,s=n,l=n-e;for(;;){let u=r.to+l-t.to||r.endSide-t.endSide,c=u<0?r.to+l:t.to,f=Math.min(c,o);if(r.point||t.point?r.point&&t.point&&(r.point==t.point||r.point.eq(t.point))&&KT(r.activeForPoint(r.to),t.activeForPoint(t.to))||a.comparePoint(s,f,r.point,t.point):f>s&&!KT(r.active,t.active)&&a.compareRange(s,f,r.active,t.active),c>o)break;s=c,u<=0&&r.next(),u>=0&&t.next()}}function KT(r,e){if(r.length!=e.length)return!1;for(let t=0;t=e;n--)r[n+1]=r[n];r[e]=t}function sR(r,e){let t=-1,n=1e9;for(let i=0;i=e)return i;if(i==r.length)break;a+=r.charCodeAt(i)==9?t-a%t:1,i=Xi(r,i)}return n===!0?-1:r.length}const XT="ͼ",lR=typeof Symbol>"u"?"__"+XT:Symbol.for(XT),QT=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),uR=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class yf{constructor(e,t){this.rules=[];let{finish:n}=t||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function a(o,s,l,u){let c=[],f=/^@(\w+)\b/.exec(o[0]),h=f&&f[1]=="keyframes";if(f&&s==null)return l.push(o[0]+";");for(let d in s){let p=s[d];if(/&/.test(d))a(d.split(/,\s*/).map(g=>o.map(v=>g.replace(/&/,v))).reduce((g,v)=>g.concat(v)),p,l);else if(p&&typeof p=="object"){if(!f)throw new RangeError("The value of a property ("+d+") should be a primitive value.");a(i(d),p,c,h)}else p!=null&&c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+p+";")}(c.length||h)&&l.push((n&&!f&&!u?o.map(n):o).join(", ")+" {"+c.join(" ")+"}")}for(let o in e)a(i(o),e[o],this.rules)}getRules(){return this.rules.join(` +`)}static newName(){let e=uR[lR]||1;return uR[lR]=e+1,XT+e.toString(36)}static mount(e,t,n){let i=e[QT],a=n&&n.nonce;i?a&&i.setNonce(a):i=new o_e(e,a),i.mount(Array.isArray(t)?t:[t],e)}}let cR=new Map;class o_e{constructor(e,t){let n=e.ownerDocument||e,i=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let a=cR.get(n);if(a)return e[QT]=a;this.sheet=new i.CSSStyleSheet,cR.set(n,this)}else this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[QT]=this}mount(e,t){let n=this.sheet,i=0,a=0;for(let o=0;o-1&&(this.modules.splice(l,1),a--,l=-1),l==-1){if(this.modules.splice(a++,0,s),n)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s_e=typeof navigator<"u"&&/Mac/.test(navigator.platform),l_e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Zi=0;Zi<10;Zi++)bf[48+Zi]=bf[96+Zi]=String(Zi);for(var Zi=1;Zi<=24;Zi++)bf[Zi+111]="F"+Zi;for(var Zi=65;Zi<=90;Zi++)bf[Zi]=String.fromCharCode(Zi+32),yy[Zi]=String.fromCharCode(Zi);for(var tD in bf)yy.hasOwnProperty(tD)||(yy[tD]=bf[tD]);function u_e(r){var e=s_e&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||l_e&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?yy:bf)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function by(r){let e;return r.nodeType==11?e=r.getSelection?r:r.ownerDocument:e=r,e.getSelection()}function JT(r,e){return e?r==e||r.contains(e.nodeType!=1?e.parentNode:e):!1}function bw(r,e){if(!e.anchorNode)return!1;try{return JT(r,e.anchorNode)}catch{return!1}}function _y(r){return r.nodeType==3?Sd(r,0,r.nodeValue.length).getClientRects():r.nodeType==1?r.getClientRects():[]}function w0(r,e,t,n){return t?fR(r,e,t,n,-1)||fR(r,e,t,n,1):!1}function wd(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e}function ZS(r){return r.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(r.nodeName)}function fR(r,e,t,n,i){for(;;){if(r==t&&e==n)return!0;if(e==(i<0?0:Yl(r))){if(r.nodeName=="DIV")return!1;let a=r.parentNode;if(!a||a.nodeType!=1)return!1;e=wd(r)+(i<0?0:1),r=a}else if(r.nodeType==1){if(r=r.childNodes[e+(i<0?-1:0)],r.nodeType==1&&r.contentEditable=="false")return!1;e=i<0?Yl(r):0}else return!1}}function Yl(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function QC(r,e){let t=e?r.left:r.right;return{left:t,right:t,top:r.top,bottom:r.bottom}}function c_e(r){let e=r.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:r.innerWidth,top:0,bottom:r.innerHeight}}function tq(r,e){let t=e.width/r.offsetWidth,n=e.height/r.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-r.offsetWidth)<1)&&(t=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-r.offsetHeight)<1)&&(n=1),{scaleX:t,scaleY:n}}function f_e(r,e,t,n,i,a,o,s){let l=r.ownerDocument,u=l.defaultView||window;for(let c=r,f=!1;c&&!f;)if(c.nodeType==1){let h,d=c==l.body,p=1,g=1;if(d)h=c_e(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(f=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let y=c.getBoundingClientRect();({scaleX:p,scaleY:g}=tq(c,y)),h={left:y.left,right:y.left+c.clientWidth*p,top:y.top,bottom:y.top+c.clientHeight*g}}let v=0,m=0;if(i=="nearest")e.top0&&e.bottom>h.bottom+m&&(m=e.bottom-h.bottom+m+o)):e.bottom>h.bottom&&(m=e.bottom-h.bottom+o,t<0&&e.top-m0&&e.right>h.right+v&&(v=e.right-h.right+v+a)):e.right>h.right&&(v=e.right-h.right+a,t<0&&e.lefti.clientHeight&&(n=i),!t&&i.scrollWidth>i.clientWidth&&(t=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:t,y:n}}class d_e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Yl(t):0),n,Math.min(e.focusOffset,n?Yl(n):0))}set(e,t,n,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=i}}let Jd=null;function rq(r){if(r.setActive)return r.setActive();if(Jd)return r.focus(Jd);let e=[];for(let t=r;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(r.focus(Jd==null?{get preventScroll(){return Jd={preventScroll:!0},!0}}:void 0),!Jd){Jd=!1;for(let t=0;tMath.max(1,r.scrollHeight-r.clientHeight-4)}function aq(r,e){for(let t=r,n=e;;){if(t.nodeType==3&&n>0)return{node:t,offset:n};if(t.nodeType==1&&n>0){if(t.contentEditable=="false")return null;t=t.childNodes[n-1],n=Yl(t)}else if(t.parentNode&&!ZS(t))n=wd(t),t=t.parentNode;else return null}}function oq(r,e){for(let t=r,n=e;;){if(t.nodeType==3&&nt)return f.domBoundsAround(e,t,u);if(h>=e&&i==-1&&(i=l,a=u),u>t&&f.dom.parentNode==this.dom){o=l,s=c;break}c=h,u=h+f.breakAfter}return{from:a,to:s<0?n+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),t.flags&1)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=HL){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function lq(r,e,t,n,i,a,o,s,l){let{children:u}=r,c=u.length?u[e]:null,f=a.length?a[a.length-1]:null,h=f?f.breakAfter:o;if(!(e==n&&c&&!o&&!h&&a.length<2&&c.merge(t,i,a.length?f:null,t==0,s,l))){if(n0&&(!o&&a.length&&c.merge(t,c.length,a[0],!1,s,0)?c.breakAfter=a.shift().breakAfter:(t2);var bt={mac:vR||/Mac/.test(eo.platform),windows:/Win/.test(eo.platform),linux:/Linux|X11/.test(eo.platform),ie:JC,ie_version:cq?eM.documentMode||6:rM?+rM[1]:tM?+tM[1]:0,gecko:pR,gecko_version:pR?+(/Firefox\/(\d+)/.exec(eo.userAgent)||[0,0])[1]:0,chrome:!!rD,chrome_version:rD?+rD[1]:0,ios:vR,android:/Android\b/.test(eo.userAgent),webkit:gR,safari:fq,webkit_version:gR?+(/\bAppleWebKit\/(\d+)/.exec(eo.userAgent)||[0,0])[1]:0,tabSize:eM.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const v_e=256;class js extends An{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,n){return this.flags&8||n&&(!(n instanceof js)||this.length-(t-e)+n.length>v_e||n.flags&8)?!1:(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new js(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=this.flags&8,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new ha(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return m_e(this.dom,e,t)}}class Hu extends An{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let i of t)i.setParent(this)}setAttrs(e){if(nq(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,i,a,o){return n&&(!(n instanceof Hu&&n.mark.eq(this.mark))||e&&a<=0||te&&t.push(n=e&&(i=a),n=l,a++}let o=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Hu(this.mark,t,o)}domAtPos(e){return hq(this,e)}coordsAt(e,t){return pq(this,e,t)}}function m_e(r,e,t){let n=r.nodeValue.length;e>n&&(e=n);let i=e,a=e,o=0;e==0&&t<0||e==n&&t>=0?bt.chrome||bt.gecko||(e?(i--,o=1):a=0)?0:s.length-1];return bt.safari&&!o&&l.width==0&&(l=Array.prototype.find.call(s,u=>u.width)||l),o?QC(l,o<0):l||null}class Hc extends An{static create(e,t,n){return new Hc(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=Hc.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,t,n,i,a,o){return n&&(!(n instanceof Hc)||!this.widget.compare(n.widget)||e>0&&a<=0||t0)?ha.before(this.dom):ha.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let i=this.dom.getClientRects(),a=null;if(!i.length)return null;let o=this.side?this.side<0:e>0;for(let s=o?i.length-1:0;a=i[s],!(e>0?s==0:s==i.length-1||a.top0?ha.before(this.dom):ha.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return tn.empty}get isHidden(){return!0}}js.prototype.children=Hc.prototype.children=$g.prototype.children=HL;function hq(r,e){let t=r.dom,{children:n}=r,i=0;for(let a=0;ia&&e0;a--){let o=n[a-1];if(o.dom.parentNode==t)return o.domAtPos(o.length)}for(let a=i;a0&&e instanceof Hu&&i.length&&(n=i[i.length-1])instanceof Hu&&n.mark.eq(e.mark)?dq(n,e.children[0],t-1):(i.push(e),e.setParent(r)),r.length+=e.length}function pq(r,e,t){let n=null,i=-1,a=null,o=-1;function s(u,c){for(let f=0,h=0;f=c&&(d.children.length?s(d,c-h):(!a||a.isHidden&&t>0)&&(p>c||h==p&&d.getSide()>0)?(a=d,o=c-h):(h-1?1:0)!=i.length-(t&&i.indexOf(t)>-1?1:0))return!1;for(let a of n)if(a!=t&&(i.indexOf(a)==-1||r[a]!==e[a]))return!1;return!0}function iM(r,e,t){let n=!1;if(e)for(let i in e)t&&i in t||(n=!0,i=="style"?r.style.cssText="":r.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(n=!0,i=="style"?r.style.cssText=t[i]:r.setAttribute(i,t[i]));return n}function b_e(r){let e=Object.create(null);for(let t=0;t0?3e8:-4e8:t>0?1e8:-1e8,new _f(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,i;if(e.isBlockGap)n=-5e8,i=4e8;else{let{start:a,end:o}=gq(e,t);n=(a?t?-3e8:-1:5e8)-1,i=(o?t?2e8:1:-6e8)+1}return new _f(e,n,i,t,e.widget||null,!0)}static line(e){return new T1(e)}static set(e,t=!1){return Mn.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}hr.none=Mn.empty;class k1 extends hr{constructor(e){let{start:t,end:n}=gq(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof k1&&this.tagName==e.tagName&&(this.class||((t=this.attrs)===null||t===void 0?void 0:t.class))==(e.class||((n=e.attrs)===null||n===void 0?void 0:n.class))&&KS(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}k1.prototype.point=!1;class T1 extends hr{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof T1&&this.spec.class==e.spec.class&&KS(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}T1.prototype.mapMode=Oa.TrackBefore;T1.prototype.point=!0;class _f extends hr{constructor(e,t,n,i,a,o){super(t,n,a,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?Oa.TrackBefore:Oa.TrackAfter:Oa.TrackDel}get type(){return this.startSide!=this.endSide?ko.WidgetRange:this.startSide<=0?ko.WidgetBefore:ko.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof _f&&__e(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}_f.prototype.point=!0;function gq(r,e=!1){let{inclusiveStart:t,inclusiveEnd:n}=r;return t==null&&(t=r.inclusive),n==null&&(n=r.inclusive),{start:t??e,end:n??e}}function __e(r,e){return r==e||!!(r&&e&&r.compare(e))}function aM(r,e,t,n=0){let i=t.length-1;i>=0&&t[i]+n>=r?t[i]=Math.max(t[i],e):t.push(r,e)}let ka=class Xm extends An{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,i,a,o){if(n){if(!(n instanceof Xm))return!1;this.dom||n.transferDOM(this)}return i&&this.setDeco(n?n.attrs:null),uq(this,e,t,n?n.children.slice():[],a,o),!0}split(e){let t=new Xm;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i:n,off:i}=this.childPos(e);i&&(t.append(this.children[n].split(i),0),this.children[n].merge(i,this.children[n].length,null,!1,0,0),n++);for(let a=n;a0&&this.children[n-1].length==0;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){KS(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){dq(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=nM(t,this.attrs||{})),n&&(this.attrs=nM({class:n},this.attrs||{}))}domAtPos(e){return hq(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?this.flags&4&&(nq(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(iM(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let i=this.dom.lastChild;for(;i&&An.get(i)instanceof Hu;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((n=An.get(i))===null||n===void 0?void 0:n.isEditable)==!1&&(!bt.ios||!this.children.some(a=>a instanceof js))){let a=document.createElement("BR");a.cmIgnore=!0,this.dom.appendChild(a)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,t;for(let n of this.children){if(!(n instanceof js)||/[^ -~]/.test(n.text))return null;let i=_y(n.dom);if(i.length!=1)return null;e+=i[0].width,t=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(e,t){let n=pq(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:i}=this.parent.view.viewState,a=n.bottom-n.top;if(Math.abs(a-i.lineHeight)<2&&i.textHeight=t){if(a instanceof Xm)return a;if(o>t)break}i=o+a.breakAfter}return null}};class Pu extends An{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,i,a,o){return n&&(!(n instanceof Pu)||!this.widget.compare(n.widget)||e>0&&a<=0||t0}}class oM extends Cv{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class S0{constructor(e,t,n,i){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Pu&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ka),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Cb(new $g(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Pu)&&this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:a,lineBreak:o,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=a,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Cb(new js(this.text.slice(this.textOff,this.textOff+i)),t),n),this.atCursorPos=!0,this.textOff+=i,e-=i,n=0}}span(e,t,n,i){this.buildText(t-e,n,i),this.pos=t,this.openStart<0&&(this.openStart=i)}point(e,t,n,i,a,o){if(this.disallowBlockEffectsFor[o]&&n instanceof _f){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof _f)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Pu(n.widget||jg.block,s,n));else{let l=Hc.create(n.widget||jg.inline,s,s?0:n.startSide),u=this.atCursorPos&&!l.isEditable&&a<=i.length&&(e0),c=!l.isEditable&&(ei.length||n.startSide<=0),f=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(f.append(Cb(new $g(1),i),a),a=i.length+Math.max(0,a-i.length)),f.append(Cb(l,i),a),this.atCursorPos=c,this.pendingBuffer=c?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=a)}static build(e,t,n,i,a){let o=new S0(e,t,n,a);return o.openEnd=Mn.spans(i,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Cb(r,e){for(let t of e)r=new Hu(t,[r],r.length);return r}class jg extends Cv{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}jg.inline=new jg("span");jg.block=new jg("div");var zn=function(r){return r[r.LTR=0]="LTR",r[r.RTL=1]="RTL",r}(zn||(zn={}));const Cd=zn.LTR,WL=zn.RTL;function vq(r){let e=[];for(let t=0;t=t){if(s.level==n)return o;(a<0||(i!=0?i<0?s.fromt:e[a].level>s.level))&&(a=o)}}if(a<0)throw new RangeError("Index out of range");return a}}function yq(r,e){if(r.length!=e.length)return!1;for(let t=0;t=0;g-=3)if(al[g+1]==-d){let v=al[g+2],m=v&2?i:v&4?v&1?a:i:0;m&&(Cn[f]=Cn[al[g]]=m),s=g;break}}else{if(al.length==189)break;al[s++]=f,al[s++]=h,al[s++]=l}else if((p=Cn[f])==2||p==1){let g=p==i;l=g?0:1;for(let v=s-3;v>=0;v-=3){let m=al[v+2];if(m&2)break;if(g)al[v+2]|=2;else{if(m&4)break;al[v+2]|=4}}}}}function D_e(r,e,t,n){for(let i=0,a=n;i<=t.length;i++){let o=i?t[i-1].to:r,s=il;)p==v&&(p=t[--g].from,v=g?t[g-1].to:r),Cn[--p]=d;l=c}else a=u,l++}}}function lM(r,e,t,n,i,a,o){let s=n%2?2:1;if(n%2==i%2)for(let l=e,u=0;ll&&o.push(new Wc(l,g.from,d));let v=g.direction==Cd!=!(d%2);uM(r,v?n+1:n,i,g.inner,g.from,g.to,o),l=g.to}p=g.to}else{if(p==t||(c?Cn[p]!=s:Cn[p]==s))break;p++}h?lM(r,l,p,n+1,i,h,o):le;){let c=!0,f=!1;if(!u||l>a[u-1].to){let g=Cn[l-1];g!=s&&(c=!1,f=g==16)}let h=!c&&s==1?[]:null,d=c?n:n+1,p=l;e:for(;;)if(u&&p==a[u-1].to){if(f)break e;let g=a[--u];if(!c)for(let v=g.from,m=u;;){if(v==e)break e;if(m&&a[m-1].to==v)v=a[--m].from;else{if(Cn[v-1]==s)break e;break}}if(h)h.push(g);else{g.toCn.length;)Cn[Cn.length]=256;let n=[],i=e==Cd?0:1;return uM(r,i,i,t,0,r.length,n),n}function bq(r){return[new Wc(0,r,0)]}let _q="";function k_e(r,e,t,n,i){var a;let o=n.head-r.from,s=Wc.find(e,o,(a=n.bidiLevel)!==null&&a!==void 0?a:-1,n.assoc),l=e[s],u=l.side(i,t);if(o==u){let h=s+=i?1:-1;if(h<0||h>=e.length)return null;l=e[s=h],o=l.side(!i,t),u=l.side(i,t)}let c=Xi(r.text,o,l.forward(i,t));(cl.to)&&(c=u),_q=r.text.slice(Math.min(o,c),Math.max(o,c));let f=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return f&&c==u&&f.level+(i?0:1)r.some(e=>e)}),kq=Et.define({combine:r=>r.some(e=>e)}),Tq=Et.define();class fg{constructor(e,t="nearest",n="nearest",i=5,a=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=i,this.xMargin=a,this.isSnapshot=o}map(e){return e.empty?this:new fg(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new fg(We.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Ab=Dr.define({map:(r,e)=>r.map(e)}),Mq=Dr.define();function oo(r,e,t){let n=r.facet(Aq);n.length?n[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const Bc=Et.define({combine:r=>r.length?r[0]:!0});let M_e=0;const Qm=Et.define();class Ua{constructor(e,t,n,i,a){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=i,this.extension=a(this)}static define(e,t){const{eventHandlers:n,eventObservers:i,provide:a,decorations:o}=t||{};return new Ua(M_e++,e,n,i,s=>{let l=[Qm.of(s)];return o&&l.push(wy.of(u=>{let c=u.plugin(s);return c?o(c):hr.none})),a&&l.push(a(s)),l})}static fromClass(e,t){return Ua.define(n=>new e(n),t)}}class nD{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(oo(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){oo(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(n){oo(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Iq=Et.define(),qL=Et.define(),wy=Et.define(),Lq=Et.define(),YL=Et.define(),Fq=Et.define();function yR(r,e){let t=r.state.facet(Fq);if(!t.length)return t;let n=t.map(a=>a instanceof Function?a(r):a),i=[];return Mn.spans(n,e.from,e.to,{point(){},span(a,o,s,l){let u=a-e.from,c=o-e.from,f=i;for(let h=s.length-1;h>=0;h--,l--){let d=s[h].spec.bidiIsolate,p;if(d==null&&(d=T_e(e.text,u,c)),l>0&&f.length&&(p=f[f.length-1]).to==u&&p.direction==d)p.to=c,f=p.inner;else{let g={from:u,to:c,direction:d,inner:[]};f.push(g),f=g.inner}}}}),i}const Bq=Et.define();function ZL(r){let e=0,t=0,n=0,i=0;for(let a of r.state.facet(Bq)){let o=a(r);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(n=Math.max(n,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:t,top:n,bottom:i}}const Jm=Et.define();class ss{constructor(e,t,n,i){this.fromA=e,this.toA=t,this.fromB=n,this.toB=i}join(e){return new ss(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>n.toA)){if(i.toAc)break;a+=2}if(!l)return n;new ss(l.fromA,l.toA,l.fromB,l.toB).addToSet(n),o=l.toA,s=l.toB}}}class XS{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=_i.empty(this.startState.doc.length);for(let a of n)this.changes=this.changes.compose(a.changes);let i=[];this.changes.iterChangedRanges((a,o,s,l)=>i.push(new ss(a,o,s,l))),this.changedRanges=i}static create(e,t,n){return new XS(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class bR extends An{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=hr.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new ka],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ss(0,0,0,e.state.doc.length)],0,null)}update(e){var t;let n=e.changedRanges;this.minWidth>0&&n.length&&(n.every(({fromA:u,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!R_e(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let a=i>-1?L_e(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;n=new ss(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(n.slice())}this.hasComposition=a?{from:a.range.fromB,to:a.range.toB}:null,(bt.ie||bt.chrome)&&!a&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,s=this.updateDeco(),l=O_e(o,s,e.changes);return n=ss.extendWithRanges(n,l),!(this.flags&7)&&n.length==0?!1:(this.updateInner(n,e.startState.doc.length,a),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=bt.chrome||bt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||i.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let a=[];if(this.view.viewport.from||this.view.viewport.to=0?i[o]:null;if(!s)break;let{fromA:l,toA:u,fromB:c,toB:f}=s,h,d,p,g;if(n&&n.range.fromBc){let _=S0.build(this.view.state.doc,c,n.range.fromB,this.decorations,this.dynamicDecorationMap),w=S0.build(this.view.state.doc,n.range.toB,f,this.decorations,this.dynamicDecorationMap);d=_.breakAtStart,p=_.openStart,g=w.openEnd;let S=this.compositionView(n);w.breakAtStart?S.breakAfter=1:w.content.length&&S.merge(S.length,S.length,w.content[0],!1,w.openStart,0)&&(S.breakAfter=w.content[0].breakAfter,w.content.shift()),_.content.length&&S.merge(0,0,_.content[_.content.length-1],!0,0,_.openEnd)&&_.content.pop(),h=_.content.concat(S).concat(w.content)}else({content:h,breakAtStart:d,openStart:p,openEnd:g}=S0.build(this.view.state.doc,c,f,this.decorations,this.dynamicDecorationMap));let{i:v,off:m}=a.findPos(u,1),{i:y,off:b}=a.findPos(l,-1);lq(this,y,b,v,m,h,d,p,g)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)n.is(Mq)&&(this.editContextFormatting=n.value)}compositionView(e){let t=new js(e.text.nodeValue);t.flags|=8;for(let{deco:i}of e.marks)t=new Hu(i,[t],t.length);let n=new ka;return n.append(t,0),n}fixCompositionDOM(e){let t=(a,o)=>{o.flags|=8|(o.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(o);let s=An.get(a);s&&s!=o&&(s.dom=null),o.setDOM(a)},n=this.childPos(e.range.fromB,1),i=this.children[n.i];t(e.line,i);for(let a=e.marks.length-1;a>=-1;a--)n=i.childPos(n.off,1),i=i.children[n.i],t(a>=0?e.marks[a].node:e.text,i)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let n=this.view.root.activeElement,i=n==this.dom,a=!i&&bw(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),u=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(bt.gecko&&s.empty&&!this.hasComposition&&I_e(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=u=new ha(f,0),o=!0}let c=this.view.observer.selectionRange;(o||!c.focusNode||(!w0(l.node,l.offset,c.anchorNode,c.anchorOffset)||!w0(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,s))&&(this.view.observer.ignore(()=>{bt.android&&bt.chrome&&this.dom.contains(c.focusNode)&&P_e(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let f=by(this.view.root);if(f)if(s.empty){if(bt.gecko){let h=F_e(l.node,l.offset);if(h&&h!=3){let d=(h==1?aq:oq)(l.node,l.offset);d&&(l=new ha(d.node,d.offset))}}f.collapse(l.node,l.offset),s.bidiLevel!=null&&f.caretBidiLevel!==void 0&&(f.caretBidiLevel=s.bidiLevel)}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(u.node,u.offset)}catch{}}else{let h=document.createRange();s.anchor>s.head&&([l,u]=[u,l]),h.setEnd(u.node,u.offset),h.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(h)}a&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new ha(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new ha(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&w0(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=by(e.root),{anchorNode:i,anchorOffset:a}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let o=ka.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let l=this.coordsAt(t.head,-1),u=this.coordsAt(t.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let f=e.observer.selectionRange;e.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=t.from&&n.collapse(i,a)}moveToLine(e){let t=this.dom,n;if(e.node!=t)return e;for(let i=e.offset;!n&&i=0;i--){let a=An.get(t.childNodes[i]);a instanceof ka&&(n=a.domAtPos(a.length))}return n?new ha(n.node,n.offset,!0):e}nearest(e){for(let t=e;t;){let n=An.get(t);if(n&&n.rootView==this)return n;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;o--){let s=this.children[o],l=a-s.breakAfter,u=l-s.length;if(le||s.covers(1))&&(!n||s instanceof ka&&!(n instanceof ka&&t>=0)))n=s,i=u;else if(n&&u==e&&l==e&&s instanceof Pu&&Math.abs(t)<2){if(s.deco.startSide<0)break;o&&(n=null)}a=u}return n?n.coordsAt(e-i,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),i=this.children[t];if(!(i instanceof ka))return null;for(;i.children.length;){let{i:s,off:l}=i.childPos(n,1);for(;;s++){if(s==i.children.length)return null;if((i=i.children[s]).length)break}n=l}if(!(i instanceof js))return null;let a=Xi(i.text,n);if(a==n)return null;let o=Sd(i.dom,n,a).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==zn.LTR;for(let u=0,c=0;ci)break;if(u>=n){let d=f.dom.getBoundingClientRect();if(t.push(d.height),o){let p=f.dom.lastChild,g=p?_y(p):[];if(g.length){let v=g[g.length-1],m=l?v.right-d.left:d.right-v.left;m>s&&(s=m,this.minWidth=a,this.minWidthFrom=u,this.minWidthTo=h)}}}u=h+f.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?zn.RTL:zn.LTR}measureTextSize(){for(let a of this.children)if(a instanceof ka){let o=a.measureTextSize();if(o)return o}let e=document.createElement("div"),t,n,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let a=_y(e.firstChild)[0];t=e.getBoundingClientRect().height,n=a?a.width/27:7,i=a?a.height:t,e.remove()}),{lineHeight:t,charWidth:n,textHeight:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new sq(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,i=0;;i++){let a=i==t.viewports.length?null:t.viewports[i],o=a?a.from-1:this.length;if(o>n){let s=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(hr.replace({widget:new oM(s),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!a)break;n=a.to+1}return hr.set(e)}updateDeco(){let e=1,t=this.view.state.facet(wy).map(a=>(this.dynamicDecorationMap[e++]=typeof a=="function")?a(this.view):a),n=!1,i=this.view.state.facet(Lq).map((a,o)=>{let s=typeof a=="function";return s&&(n=!0),s?a(this.view):a});for(i.length&&(this.dynamicDecorationMap[e++]=n,t.push(Mn.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];et.anchor?-1:1),i;if(!n)return;!t.empty&&(i=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,i.left),top:Math.min(n.top,i.top),right:Math.max(n.right,i.right),bottom:Math.max(n.bottom,i.bottom)});let a=ZL(this.view),o={left:n.left-a.left,top:n.top-a.top,right:n.right+a.right,bottom:n.bottom+a.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;f_e(this.view.scrollDOM,o,t.head{ne.from&&(t=!0)}),t}function N_e(r,e,t=1){let n=r.charCategorizer(e),i=r.doc.lineAt(e),a=e-i.from;if(i.length==0)return We.cursor(e);a==0?t=1:a==i.length&&(t=-1);let o=a,s=a;t<0?o=Xi(i.text,a,!1):s=Xi(i.text,a);let l=n(i.text.slice(o,s));for(;o>0;){let u=Xi(i.text,o,!1);if(n(i.text.slice(u,o))!=l)break;o=u}for(;sr?e.left-r:Math.max(0,r-e.right)}function V_e(r,e){return e.top>r?e.top-r:Math.max(0,r-e.bottom)}function iD(r,e){return r.tope.top+1}function _R(r,e){return er.bottom?{top:r.top,left:r.left,right:r.right,bottom:e}:r}function fM(r,e,t){let n,i,a,o,s=!1,l,u,c,f;for(let p=r.firstChild;p;p=p.nextSibling){let g=_y(p);for(let v=0;vb||o==b&&a>y){n=p,i=m,a=y,o=b;let _=b?t0?v0)}y==0?t>m.bottom&&(!c||c.bottomm.top)&&(u=p,f=m):c&&iD(c,m)?c=wR(c,m.bottom):f&&iD(f,m)&&(f=_R(f,m.top))}}if(c&&c.bottom>=t?(n=l,i=c):f&&f.top<=t&&(n=u,i=f),!n)return{node:r,offset:0};let h=Math.max(i.left,Math.min(i.right,e));if(n.nodeType==3)return SR(n,h,t);if(s&&n.contentEditable!="false")return fM(n,h,t);let d=Array.prototype.indexOf.call(r.childNodes,n)+(e>=(i.left+i.right)/2?1:0);return{node:r,offset:d}}function SR(r,e,t){let n=r.nodeValue.length,i=-1,a=1e9,o=0;for(let s=0;st?c.top-t:t-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&f=(c.left+c.right)/2,d=h;if((bt.chrome||bt.gecko)&&Sd(r,s).getBoundingClientRect().left==c.right&&(d=!h),f<=0)return{node:r,offset:s+(d?1:0)};i=s+(d?1:0),a=f}}}return{node:r,offset:i>-1?i:o>0?r.nodeValue.length:0}}function Pq(r,e,t,n=-1){var i,a;let o=r.contentDOM.getBoundingClientRect(),s=o.top+r.viewState.paddingTop,l,{docHeight:u}=r.viewState,{x:c,y:f}=e,h=f-s;if(h<0)return 0;if(h>u)return r.state.doc.length;for(let _=r.viewState.heightOracle.textHeight/2,w=!1;l=r.elementAtHeight(h),l.type!=ko.Text;)for(;h=n>0?l.bottom+_:l.top-_,!(h>=0&&h<=u);){if(w)return t?null:0;w=!0,n=-n}f=s+h;let d=l.from;if(dr.viewport.to)return r.viewport.to==r.state.doc.length?r.state.doc.length:t?null:CR(r,o,l,c,f);let p=r.dom.ownerDocument,g=r.root.elementFromPoint?r.root:p,v=g.elementFromPoint(c,f);v&&!r.contentDOM.contains(v)&&(v=null),v||(c=Math.max(o.left+1,Math.min(o.right-1,c)),v=g.elementFromPoint(c,f),v&&!r.contentDOM.contains(v)&&(v=null));let m,y=-1;if(v&&((i=r.docView.nearest(v))===null||i===void 0?void 0:i.isEditable)!=!1){if(p.caretPositionFromPoint){let _=p.caretPositionFromPoint(c,f);_&&({offsetNode:m,offset:y}=_)}else if(p.caretRangeFromPoint){let _=p.caretRangeFromPoint(c,f);_&&({startContainer:m,startOffset:y}=_,(!r.contentDOM.contains(m)||bt.safari&&U_e(m,y,c)||bt.chrome&&G_e(m,y,c))&&(m=void 0))}m&&(y=Math.min(Yl(m),y))}if(!m||!r.docView.dom.contains(m)){let _=ka.find(r.docView,d);if(!_)return h>l.top+l.height/2?l.to:l.from;({node:m,offset:y}=fM(_.dom,c,f))}let b=r.docView.nearest(m);if(!b)return null;if(b.isWidget&&((a=b.dom)===null||a===void 0?void 0:a.nodeType)==1){let _=b.dom.getBoundingClientRect();return e.y<_.top||e.y<=_.bottom&&e.x<=(_.left+_.right)/2?b.posAtStart:b.posAtEnd}else return b.localPosFromDOM(m,y)+b.posAtStart}function CR(r,e,t,n,i){let a=Math.round((n-e.left)*r.defaultCharacterWidth);if(r.lineWrapping&&t.height>r.defaultLineHeight*1.5){let s=r.viewState.heightOracle.textHeight,l=Math.floor((i-t.top-(r.defaultLineHeight-s)*.5)/s);a+=l*r.viewState.heightOracle.lineLength}let o=r.state.sliceDoc(t.from,t.to);return t.from+a_e(o,a,r.state.tabSize)}function U_e(r,e,t){let n;if(r.nodeType!=3||e!=(n=r.nodeValue.length))return!1;for(let i=r.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return Sd(r,n-1,n).getBoundingClientRect().left>t}function G_e(r,e,t){if(e!=0)return!1;for(let i=r;;){let a=i.parentNode;if(!a||a.nodeType!=1||a.firstChild!=i)return!1;if(a.classList.contains("cm-line"))break;i=a}let n=r.nodeType==1?r.getBoundingClientRect():Sd(r,0,Math.max(r.nodeValue.length,1)).getBoundingClientRect();return t-n.left>5}function hM(r,e){let t=r.lineBlockAt(e);if(Array.isArray(t.type)){for(let n of t.type)if(n.to>e||n.to==e&&(n.to==t.to||n.type==ko.Text))return n}return t}function H_e(r,e,t,n){let i=hM(r,e.head),a=!n||i.type!=ko.Text||!(r.lineWrapping||i.widgetLineBreaks)?null:r.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(a){let o=r.dom.getBoundingClientRect(),s=r.textDirectionAt(i.from),l=r.posAtCoords({x:t==(s==zn.LTR)?o.right-1:o.left+1,y:(a.top+a.bottom)/2});if(l!=null)return We.cursor(l,t?-1:1)}return We.cursor(t?i.to:i.from,t?-1:1)}function AR(r,e,t,n){let i=r.state.doc.lineAt(e.head),a=r.bidiSpans(i),o=r.textDirectionAt(i.from);for(let s=e,l=null;;){let u=k_e(i,a,o,s,t),c=_q;if(!u){if(i.number==(t?r.state.doc.lines:1))return s;c=` +`,i=r.state.doc.line(i.number+(t?1:-1)),a=r.bidiSpans(i),u=r.visualLineSide(i,!t)}if(l){if(!l(c))return s}else{if(!n)return u;l=n(c)}s=u}}function W_e(r,e,t){let n=r.state.charCategorizer(e),i=n(t);return a=>{let o=n(a);return i==Nn.Space&&(i=o),i==o}}function $_e(r,e,t,n){let i=e.head,a=t?1:-1;if(i==(t?r.state.doc.length:0))return We.cursor(i,e.assoc);let o=e.goalColumn,s,l=r.contentDOM.getBoundingClientRect(),u=r.coordsAtPos(i,e.assoc||-1),c=r.documentTop;if(u)o==null&&(o=u.left-l.left),s=a<0?u.top:u.bottom;else{let d=r.viewState.lineBlockAt(i);o==null&&(o=Math.min(l.right-l.left,r.defaultCharacterWidth*(i-d.from))),s=(a<0?d.top:d.bottom)+c}let f=l.left+o,h=n??r.viewState.heightOracle.textHeight>>1;for(let d=0;;d+=10){let p=s+(h+d)*a,g=Pq(r,{x:f,y:p},!1,a);if(pl.bottom||(a<0?gi)){let v=r.docView.coordsForChar(g),m=!v||p{if(e>a&&ei(r)),t.from,e.head>t.from?-1:1);return n==t.from?t:We.cursor(n,na)&&this.lineBreak(),i=o}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let a=-1,o=1,s;if(this.lineSeparator?(a=t.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(s=i.exec(t))&&(a=s.index,o=s[0].length),this.append(t.slice(n,a<0?t.length:a)),a<0)break;if(this.lineBreak(),o>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=o-1);n=a+o}}readNode(e){if(e.cmIgnore)return;let t=An.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let i=n.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(q_e(e,n.node,n.offset)?t:0))}}function q_e(r,e,t){for(;;){if(!e||t-1;let{impreciseHead:a,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let s=a||o?[]:X_e(e),l=new j_e(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=Q_e(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=a&&a.node==s.focusNode&&a.offset==s.focusOffset||!JT(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),u=o&&o.node==s.anchorNode&&o.offset==s.anchorOffset||!JT(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),c=e.viewport;if((bt.ios||bt.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.toDate.now()-100?r.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:s}=e.bounds,l=i.from,u=null;(a===8||bt.android&&e.text.length=i.from&&t.to<=i.to&&(t.from!=i.from||t.to!=i.to)&&i.to-i.from-(t.to-t.from)<=4?t={from:i.from,to:i.to,insert:r.state.doc.slice(i.from,t.from).append(t.insert).append(r.state.doc.slice(t.to,i.to))}:(bt.mac||bt.android)&&t&&t.from==t.to&&t.from==i.head-1&&/^\. ?$/.test(t.insert.toString())&&r.contentDOM.getAttribute("autocorrect")=="off"?(n&&t.insert.length==2&&(n=We.single(n.main.anchor-1,n.main.head-1)),t={from:i.from,to:i.to,insert:tn.of([" "])}):bt.chrome&&t&&t.from==t.to&&t.from==i.head&&t.insert.toString()==` + `&&r.lineWrapping&&(n&&(n=We.single(n.main.anchor-1,n.main.head-1)),t={from:i.from,to:i.to,insert:tn.of([" "])}),t)return KL(r,t,n,a);if(n&&!n.main.eq(i)){let o=!1,s="select";return r.inputState.lastSelectionTime>Date.now()-50&&(r.inputState.lastSelectionOrigin=="select"&&(o=!0),s=r.inputState.lastSelectionOrigin),r.dispatch({selection:n,scrollIntoView:o,userEvent:s}),!0}else return!1}function KL(r,e,t,n=-1){if(bt.ios&&r.inputState.flushIOSKey(e))return!0;let i=r.state.selection.main;if(bt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&r.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&cg(r.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||n==8&&e.insert.lengthi.head)&&cg(r.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&cg(r.contentDOM,"Delete",46)))return!0;let a=e.insert.toString();r.inputState.composing>=0&&r.inputState.composing++;let o,s=()=>o||(o=Z_e(r,e,t));return r.state.facet(xq).some(l=>l(r,e.from,e.to,a,s))||r.dispatch(s()),!0}function Z_e(r,e,t){let n,i=r.state,a=i.selection.main;if(e.from>=a.from&&e.to<=a.to&&e.to-e.from>=(a.to-a.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&r.inputState.composing<0){let s=a.frome.to?i.sliceDoc(e.to,a.to):"";n=i.replaceSelection(r.state.toText(s+e.insert.sliceString(0,void 0,r.state.lineBreak)+l))}else{let s=i.changes(e),l=t&&t.main.to<=s.newLength?t.main:void 0;if(i.selection.ranges.length>1&&r.inputState.composing>=0&&e.to<=a.to&&e.to>=a.to-10){let u=r.state.sliceDoc(e.from,e.to),c,f=t&&Oq(r,t.main.head);if(f){let p=e.insert.length-(e.to-e.from);c={from:f.from,to:f.to-p}}else c=r.state.doc.lineAt(a.head);let h=a.to-e.to,d=a.to-a.from;n=i.changeByRange(p=>{if(p.from==a.from&&p.to==a.to)return{changes:s,range:l||p.map(s)};let g=p.to-h,v=g-u.length;if(p.to-p.from!=d||r.state.sliceDoc(v,g)!=u||p.to>=c.from&&p.from<=c.to)return{range:p};let m=i.changes({from:v,to:g,insert:e.insert}),y=p.to-a.to;return{changes:m,range:l?We.range(Math.max(0,l.anchor+y),Math.max(0,l.head+y)):p.map(m)}})}else n={changes:s,selection:l&&i.selection.replaceRange(l)}}let o="input.type";return(r.composing||r.inputState.compositionPendingChange&&r.inputState.compositionEndedAt>Date.now()-50)&&(r.inputState.compositionPendingChange=!1,o+=".compose",r.inputState.compositionFirstChange&&(o+=".start",r.inputState.compositionFirstChange=!1)),i.update(n,{userEvent:o,scrollIntoView:!0})}function K_e(r,e,t,n){let i=Math.min(r.length,e.length),a=0;for(;a0&&s>0&&r.charCodeAt(o-1)==e.charCodeAt(s-1);)o--,s--;if(n=="end"){let l=Math.max(0,a-Math.min(o,s));t-=o+l-a}if(o=o?a-t:0;a-=l,s=a+(s-o),o=a}else if(s=s?a-t:0;a-=l,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function X_e(r){let e=[];if(r.root.activeElement!=r.contentDOM)return e;let{anchorNode:t,anchorOffset:n,focusNode:i,focusOffset:a}=r.observer.selectionRange;return t&&(e.push(new xR(t,n)),(i!=t||a!=n)&&e.push(new xR(i,a))),e}function Q_e(r,e){if(r.length==0)return null;let t=r[0].pos,n=r.length==2?r[1].pos:t;return t>-1&&n>-1?We.single(t+e,n+e):null}class J_e{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,bt.safari&&e.contentDOM.addEventListener("input",()=>null),bt.gecko&&gwe(e.contentDOM.ownerDocument)}handleEvent(e){!swe(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let i of n.observers)i(this.view,t);for(let i of n.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=ewe(e),n=this.handlers,i=this.view.contentDOM;for(let a in t)if(a!="scroll"){let o=!t[a].handlers.length,s=n[a];s&&o!=!s.handlers.length&&(i.removeEventListener(a,this.handleEvent),s=null),s||i.addEventListener(a,this.handleEvent,{passive:o})}for(let a in n)a!="scroll"&&!t[a]&&i.removeEventListener(a,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&zq.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),bt.android&&bt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return bt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((t=Nq.find(n=>n.keyCode==e.keyCode))&&!e.ctrlKey||twe.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from0?!0:bt.safari&&!bt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function DR(r,e){return(t,n)=>{try{return e.call(r,n,t)}catch(i){oo(t.state,i)}}}function ewe(r){let e=Object.create(null);function t(n){return e[n]||(e[n]={observers:[],handlers:[]})}for(let n of r){let i=n.spec;if(i&&i.domEventHandlers)for(let a in i.domEventHandlers){let o=i.domEventHandlers[a];o&&t(a).handlers.push(DR(n.value,o))}if(i&&i.domEventObservers)for(let a in i.domEventObservers){let o=i.domEventObservers[a];o&&t(a).observers.push(DR(n.value,o))}}for(let n in qs)t(n).handlers.push(qs[n]);for(let n in hs)t(n).observers.push(hs[n]);return e}const Nq=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],twe="dthko",zq=[16,17,18,20,91,92,224,225],xb=6;function Db(r){return Math.max(0,r)*.7+8}function rwe(r,e){return Math.max(Math.abs(r.clientX-e.clientX),Math.abs(r.clientY-e.clientY))}class nwe{constructor(e,t,n,i){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=h_e(e.contentDOM),this.atoms=e.state.facet(YL).map(o=>o(e));let a=e.contentDOM.ownerDocument;a.addEventListener("mousemove",this.move=this.move.bind(this)),a.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(nn.allowMultipleSelections)&&iwe(e,t),this.dragging=owe(e,t)&&Gq(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&rwe(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,i=0,a=0,o=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:a,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=ZL(this.view);e.clientX-l.left<=i+xb?t=-Db(i-e.clientX):e.clientX+l.right>=o-xb&&(t=Db(e.clientX-o)),e.clientY-l.top<=a+xb?n=-Db(a-e.clientY):e.clientY+l.bottom>=s-xb&&(n=Db(e.clientY-s)),this.setScrollSpeed(t,n)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;nt.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function iwe(r,e){let t=r.state.facet(wq);return t.length?t[0](e):bt.mac?e.metaKey:e.ctrlKey}function awe(r,e){let t=r.state.facet(Sq);return t.length?t[0](e):bt.mac?!e.altKey:!e.ctrlKey}function owe(r,e){let{main:t}=r.state.selection;if(t.empty)return!1;let n=by(r.root);if(!n||n.rangeCount==0)return!0;let i=n.getRangeAt(0).getClientRects();for(let a=0;a=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function swe(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,n;t!=r.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(n=An.get(t))&&n.ignoreEvent(e))return!1;return!0}const qs=Object.create(null),hs=Object.create(null),Vq=bt.ie&&bt.ie_version<15||bt.ios&&bt.webkit_version<604;function lwe(r){let e=r.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{r.focus(),t.remove(),Uq(r,t.value)},50)}function eA(r,e,t){for(let n of r.facet(e))t=n(t,r);return t}function Uq(r,e){e=eA(r.state,$L,e);let{state:t}=r,n,i=1,a=t.toText(e),o=a.lines==t.selection.ranges.length;if(dM!=null&&t.selection.ranges.every(l=>l.empty)&&dM==a.toString()){let l=-1;n=t.changeByRange(u=>{let c=t.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let f=t.toText((o?a.line(i++).text:e)+t.lineBreak);return{changes:{from:c.from,insert:f},range:We.cursor(u.from+f.length)}})}else o?n=t.changeByRange(l=>{let u=a.line(i++);return{changes:{from:l.from,to:l.to,insert:u.text},range:We.cursor(l.from+u.length)}}):n=t.replaceSelection(a);r.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}hs.scroll=r=>{r.inputState.lastScrollTop=r.scrollDOM.scrollTop,r.inputState.lastScrollLeft=r.scrollDOM.scrollLeft};qs.keydown=(r,e)=>(r.inputState.setSelectionOrigin("select"),e.keyCode==27&&r.inputState.tabFocusMode!=0&&(r.inputState.tabFocusMode=Date.now()+2e3),!1);hs.touchstart=(r,e)=>{r.inputState.lastTouchTime=Date.now(),r.inputState.setSelectionOrigin("select.pointer")};hs.touchmove=r=>{r.inputState.setSelectionOrigin("select.pointer")};qs.mousedown=(r,e)=>{if(r.observer.flush(),r.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let n of r.state.facet(Cq))if(t=n(r,e),t)break;if(!t&&e.button==0&&(t=fwe(r,e)),t){let n=!r.hasFocus;r.inputState.startMouseSelection(new nwe(r,e,t,n)),n&&r.observer.ignore(()=>{rq(r.contentDOM);let a=r.root.activeElement;a&&!a.contains(r.contentDOM)&&a.blur()});let i=r.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function ER(r,e,t,n){if(n==1)return We.cursor(e,t);if(n==2)return N_e(r.state,e,t);{let i=ka.find(r.docView,e),a=r.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:a.from,s=i?i.posAtEnd:a.to;return se>=t.top&&e<=t.bottom&&r>=t.left&&r<=t.right;function uwe(r,e,t,n){let i=ka.find(r.docView,e);if(!i)return 1;let a=e-i.posAtStart;if(a==0)return 1;if(a==i.length)return-1;let o=i.coordsAt(a,-1);if(o&&kR(t,n,o))return-1;let s=i.coordsAt(a,1);return s&&kR(t,n,s)?1:o&&o.bottom>=n?-1:1}function TR(r,e){let t=r.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:uwe(r,t,e.clientX,e.clientY)}}const cwe=bt.ie&&bt.ie_version<=11;let MR=null,IR=0,LR=0;function Gq(r){if(!cwe)return r.detail;let e=MR,t=LR;return MR=r,LR=Date.now(),IR=!e||t>Date.now()-400&&Math.abs(e.clientX-r.clientX)<2&&Math.abs(e.clientY-r.clientY)<2?(IR+1)%3:1}function fwe(r,e){let t=TR(r,e),n=Gq(e),i=r.state.selection;return{update(a){a.docChanged&&(t.pos=a.changes.mapPos(t.pos),i=i.map(a.changes))},get(a,o,s){let l=TR(r,a),u,c=ER(r,l.pos,l.bias,n);if(t.pos!=l.pos&&!o){let f=ER(r,t.pos,t.bias,n),h=Math.min(f.from,c.from),d=Math.max(f.to,c.to);c=h1&&(u=hwe(i,l.pos))?u:s?i.addRange(c):We.create([c])}}}function hwe(r,e){for(let t=0;t=e)return We.create(r.ranges.slice(0,t).concat(r.ranges.slice(t+1)),r.mainIndex==t?0:r.mainIndex-(r.mainIndex>t?1:0))}return null}qs.dragstart=(r,e)=>{let{selection:{main:t}}=r.state;if(e.target.draggable){let i=r.docView.nearest(e.target);if(i&&i.isWidget){let a=i.posAtStart,o=a+i.length;(a>=t.to||o<=t.from)&&(t=We.range(a,o))}}let{inputState:n}=r;return n.mouseSelection&&(n.mouseSelection.dragging=!0),n.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",eA(r.state,jL,r.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};qs.dragend=r=>(r.inputState.draggedContent=null,!1);function FR(r,e,t,n){if(t=eA(r.state,$L,t),!t)return;let i=r.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:a}=r.inputState,o=n&&a&&awe(r,e)?{from:a.from,to:a.to}:null,s={from:i,insert:t},l=r.state.changes(o?[o,s]:s);r.focus(),r.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),r.inputState.draggedContent=null}qs.drop=(r,e)=>{if(!e.dataTransfer)return!1;if(r.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let n=Array(t.length),i=0,a=()=>{++i==t.length&&FR(r,e,n.filter(o=>o!=null).join(r.state.lineBreak),!1)};for(let o=0;o{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(n[o]=s.result),a()},s.readAsText(t[o])}return!0}else{let n=e.dataTransfer.getData("Text");if(n)return FR(r,e,n,!0),!0}return!1};qs.paste=(r,e)=>{if(r.state.readOnly)return!0;r.observer.flush();let t=Vq?null:e.clipboardData;return t?(Uq(r,t.getData("text/plain")||t.getData("text/uri-list")),!0):(lwe(r),!1)};function dwe(r,e){let t=r.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout(()=>{n.remove(),r.focus()},50)}function pwe(r){let e=[],t=[],n=!1;for(let i of r.selection.ranges)i.empty||(e.push(r.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:a}of r.selection.ranges){let o=r.doc.lineAt(a);o.number>i&&(e.push(o.text),t.push({from:o.from,to:Math.min(r.doc.length,o.to+1)})),i=o.number}n=!0}return{text:eA(r,jL,e.join(r.lineBreak)),ranges:t,linewise:n}}let dM=null;qs.copy=qs.cut=(r,e)=>{let{text:t,ranges:n,linewise:i}=pwe(r.state);if(!t&&!i)return!1;dM=i?t:null,e.type=="cut"&&!r.state.readOnly&&r.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let a=Vq?null:e.clipboardData;return a?(a.clearData(),a.setData("text/plain",t),!0):(dwe(r,t),!1)};const Hq=rc.define();function Wq(r,e){let t=[];for(let n of r.facet(Dq)){let i=n(r,e);i&&t.push(i)}return t?r.update({effects:t,annotations:Hq.of(!0)}):null}function $q(r){setTimeout(()=>{let e=r.hasFocus;if(e!=r.inputState.notifiedFocused){let t=Wq(r.state,e);t?r.dispatch(t):r.update([])}},10)}hs.focus=r=>{r.inputState.lastFocusTime=Date.now(),!r.scrollDOM.scrollTop&&(r.inputState.lastScrollTop||r.inputState.lastScrollLeft)&&(r.scrollDOM.scrollTop=r.inputState.lastScrollTop,r.scrollDOM.scrollLeft=r.inputState.lastScrollLeft),$q(r)};hs.blur=r=>{r.observer.clearSelectionRange(),$q(r)};hs.compositionstart=hs.compositionupdate=r=>{r.observer.editContext||(r.inputState.compositionFirstChange==null&&(r.inputState.compositionFirstChange=!0),r.inputState.composing<0&&(r.inputState.composing=0))};hs.compositionend=r=>{r.observer.editContext||(r.inputState.composing=-1,r.inputState.compositionEndedAt=Date.now(),r.inputState.compositionPendingKey=!0,r.inputState.compositionPendingChange=r.observer.pendingRecords().length>0,r.inputState.compositionFirstChange=null,bt.chrome&&bt.android?r.observer.flushSoon():r.inputState.compositionPendingChange?Promise.resolve().then(()=>r.observer.flush()):setTimeout(()=>{r.inputState.composing<0&&r.docView.hasComposition&&r.update([])},50))};hs.contextmenu=r=>{r.inputState.lastContextMenu=Date.now()};qs.beforeinput=(r,e)=>{var t,n;if(e.inputType=="insertReplacementText"&&r.observer.editContext){let a=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(a&&o.length){let s=o[0],l=r.posAtDOM(s.startContainer,s.startOffset),u=r.posAtDOM(s.endContainer,s.endOffset);return KL(r,{from:l,to:u,insert:r.state.toText(a)},null),!0}}let i;if(bt.chrome&&bt.android&&(i=Nq.find(a=>a.inputType==e.inputType))&&(r.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let a=((n=window.visualViewport)===null||n===void 0?void 0:n.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>a+10&&r.hasFocus&&(r.contentDOM.blur(),r.focus())},100)}return bt.ios&&e.inputType=="deleteContentForward"&&r.observer.flushSoon(),bt.safari&&e.inputType=="insertText"&&r.inputState.composing>=0&&setTimeout(()=>hs.compositionend(r,e),20),!1};const BR=new Set;function gwe(r){BR.has(r)||(BR.add(r),r.addEventListener("copy",()=>{}),r.addEventListener("cut",()=>{}))}const OR=["pre-wrap","normal","pre-line","break-spaces"];let qg=!1;function PR(){qg=!1}class vwe{constructor(e){this.lineWrapping=e,this.doc=tn.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return OR.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,l=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=i,this.lineLength=a,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>ww&&(qg=!0),this.height=e)}replace(e,t,n){return Ra.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,i){let a=this,o=n.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:u,fromB:c,toB:f}=i[s],h=a.lineAt(l,Pn.ByPosNoHeight,n.setDoc(t),0,0),d=h.to>=u?h:a.lineAt(u,Pn.ByPosNoHeight,n,0,0);for(f+=d.to-u,u=d.to;s>0&&h.from<=i[s-1].toA;)l=i[s-1].fromA,c=i[s-1].fromB,s--,la*2){let s=e[t-1];s.break?e.splice(--t,1,s.left,null,s.right):e.splice(--t,1,s.left,s.right),n+=1+s.break,i-=s.size}else if(a>i*2){let s=e[n];s.break?e.splice(n,1,s.left,null,s.right):e.splice(n,1,s.left,s.right),n+=2+s.break,a-=s.size}else break;else if(i=a&&o(this.blockAt(0,n,i,a))}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class wo extends jq{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,i){return new xl(i,this.length,n,this.height,this.breaks)}replace(e,t,n){let i=n[0];return n.length==1&&(i instanceof wo||i instanceof Yi&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Yi?i=new wo(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Ra.of(n)}updateHeight(e,t=0,n=!1,i){return i&&i.from<=t&&i.more?this.setHeight(i.heights[i.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Yi extends Ra{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,a=i-n+1,o,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*a);o=l/a,this.length>a+1&&(s=(this.height-l)/(this.length-a-1))}else o=this.height/a;return{firstLine:n,lastLine:i,perLine:o,perChar:s}}blockAt(e,t,n,i){let{firstLine:a,lastLine:o,perLine:s,perChar:l}=this.heightMetrics(t,i);if(t.lineWrapping){let u=i+(e0){let a=n[n.length-1];a instanceof Yi?n[n.length-1]=new Yi(a.length+i):n.push(null,new Yi(i-1))}if(e>0){let a=n[0];a instanceof Yi?n[0]=new Yi(e+a.length):n.unshift(new Yi(e-1),null)}return Ra.of(n)}decomposeLeft(e,t){t.push(new Yi(e-1),null)}decomposeRight(e,t){t.push(null,new Yi(this.length-e-1))}updateHeight(e,t=0,n=!1,i){let a=t+this.length;if(i&&i.from<=t+this.length&&i.more){let o=[],s=Math.max(t,i.from),l=-1;for(i.from>t&&o.push(new Yi(i.from-t-1).updateHeight(e,t));s<=a&&i.more;){let c=e.doc.lineAt(s).length;o.length&&o.push(null);let f=i.heights[i.index++];l==-1?l=f:Math.abs(f-l)>=ww&&(l=-2);let h=new wo(c,f);h.outdated=!1,o.push(h),s+=c+1}s<=a&&o.push(null,new Yi(a-s).updateHeight(e,s));let u=Ra.of(o);return(l<0||Math.abs(u.height-this.height)>=ww||Math.abs(l-this.heightMetrics(e,t).perLine)>=ww)&&(qg=!0),QS(this,u)}else(n||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class ywe extends Ra{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,i){let a=n+this.left.height;return es))return u;let c=t==Pn.ByPosNoHeight?Pn.ByPosNoHeight:Pn.ByPos;return l?u.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,i,a).join(u)}forEachLine(e,t,n,i,a,o){let s=i+this.left.height,l=a+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,t,n,s,l,o);else{let u=this.lineAt(l,Pn.ByPos,n,i,a);e=e&&u.from<=t&&o(u),t>u.to&&this.right.forEachLine(u.to+1,t,n,s,l,o)}}replace(e,t,n){let i=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,n));let a=[];e>0&&this.decomposeLeft(e,a);let o=a.length;for(let s of n)a.push(s);if(e>0&&RR(a,o-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,i=n+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e2*t.size||t.size>2*e.size?Ra.of(this.break?[e,null,t]:[e,t]):(this.left=QS(this.left,e),this.right=QS(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,i){let{left:a,right:o}=this,s=t+a.length+this.break,l=null;return i&&i.from<=t+a.length&&i.more?l=a=a.updateHeight(e,t,n,i):a.updateHeight(e,t,n),i&&i.from<=s+o.length&&i.more?l=o=o.updateHeight(e,s,n,i):o.updateHeight(e,s,n),l?this.balanced(a,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function RR(r,e){let t,n;r[e]==null&&(t=r[e-1])instanceof Yi&&(n=r[e+1])instanceof Yi&&r.splice(e-1,3,new Yi(t.length+1+n.length))}const bwe=5;class XL{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof wo?i.length+=n-this.pos:(n>this.pos||!this.isCovered)&&this.nodes.push(new wo(n-this.pos,-1)),this.writtenTo=n,t>n&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=bwe)&&this.addLineDeco(i,a,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new wo(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new Yi(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof wo)return e;let t=new wo(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let i=this.ensureLine();i.length+=n,i.collapsed+=n,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof wo)&&!this.isCovered?this.nodes.push(new wo(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&f.overflow!="visible"){let h=c.getBoundingClientRect();a=Math.max(a,h.left),o=Math.min(o,h.right),s=Math.max(s,h.top),l=Math.min(u==r.parentNode?i.innerHeight:l,h.bottom)}u=f.position=="absolute"||f.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:a-t.left,right:Math.max(a,o)-t.left,top:s-(t.top+e),bottom:Math.max(s,l)-(t.top+e)}}function Cwe(r,e){let t=r.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class oD{constructor(e,t,n,i){this.from=e,this.to=t,this.size=n,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;ntypeof n!="function"&&n.class=="cm-lineWrapping");this.heightOracle=new vwe(t),this.stateDeco=e.facet(wy).filter(n=>typeof n!="function"),this.heightMap=Ra.empty().applyChanges(this.stateDeco,tn.empty,this.heightOracle.setDoc(e.doc),[new ss(0,0,0,e.doc.length)]);for(let n=0;n<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());n++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=hr.set(this.lineGaps.map(n=>n.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let i=n?t.head:t.anchor;if(!e.some(({from:a,to:o})=>i>=a&&i<=o)){let{from:a,to:o}=this.lineBlockAt(i);e.push(new Eb(a,o))}}return this.viewports=e.sort((n,i)=>n.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?zR:new QL(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(t0(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(wy).filter(c=>typeof c!="function");let i=e.changedRanges,a=ss.extendWithRanges(i,_we(n,this.stateDeco,e?e.changes:_i.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);PR(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),a),(this.heightMap.height!=o||qg)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=a.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(kq)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),i=this.heightOracle,a=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?zn.RTL:zn.LTR;let o=this.heightOracle.mustRefreshForWrapping(a),s=t.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let u=0,c=0;if(s.width&&s.height){let{scaleX:_,scaleY:w}=tq(t,s);(_>.005&&Math.abs(this.scaleX-_)>.005||w>.005&&Math.abs(this.scaleY-w)>.005)&&(this.scaleX=_,this.scaleY=w,u|=8,o=l=!0)}let f=(parseInt(n.paddingTop)||0)*this.scaleY,h=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=f||this.paddingBottom!=h)&&(this.paddingTop=f,this.paddingBottom=h,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let d=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=iq(e.scrollDOM);let p=(this.printing?Cwe:Swe)(t,this.paddingTop),g=p.top-this.pixelViewport.top,v=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let y=s.width;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let _=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(_)&&(o=!0),o||i.lineWrapping&&Math.abs(y-this.contentDOMWidth)>i.charWidth){let{lineHeight:w,charWidth:S,textHeight:C}=e.docView.measureTextSize();o=w>0&&i.refresh(a,w,S,C,y/S,_),o&&(e.docView.minWidth=0,u|=8)}g>0&&v>0?c=Math.max(g,v):g<0&&v<0&&(c=Math.min(g,v)),PR();for(let w of this.viewports){let S=w.from==this.viewport.from?_:e.docView.measureVisibleLineHeights(w);this.heightMap=(o?Ra.empty().applyChanges(this.stateDeco,tn.empty,this.heightOracle,[new ss(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new mwe(w.from,S))}qg&&(u|=2)}let b=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return b&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),u|=this.updateForViewport()),(u&2||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,a=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,l=new Eb(i.lineAt(o-n*1e3,Pn.ByHeight,a,0,0).from,i.lineAt(s+(1-n)*1e3,Pn.ByHeight,a,0,0).to);if(t){let{head:u}=t.range;if(ul.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),f=i.lineAt(u,Pn.ByPos,a,0,0),h;t.y=="center"?h=(f.top+f.bottom)/2-c/2:t.y=="start"||t.y=="nearest"&&u=s+Math.max(10,Math.min(n,250)))&&i>o-2*1e3&&a>1,o=i<<1;if(this.defaultTextDirection!=zn.LTR&&!n)return[];let s=[],l=(c,f,h,d)=>{if(f-cc&&mm.from>=h.from&&m.to<=h.to&&Math.abs(m.from-c)m.fromy));if(!v){if(fb.from<=f&&b.to>=f)){let b=t.moveToLineBoundary(We.cursor(f),!1,!0).head;b>c&&(f=b)}let m=this.gapSize(h,c,f,d),y=n||m<2e6?m:2e6;v=new oD(c,f,m,y)}s.push(v)},u=c=>{if(c.length2e6)for(let S of e)S.from>=c.from&&S.fromc.from&&l(c.from,d,c,f),pt.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];Mn.spans(e,this.viewport.from,this.viewport.to,{span(i,a){t.push({from:i,to:a})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((i,a)=>i.from!=t[a].from||i.to!=t[a].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||t0(this.heightMap.lineAt(e,Pn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||t0(this.heightMap.lineAt(this.scaler.fromDOM(e),Pn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return t0(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Eb{constructor(e,t){this.from=e,this.to=t}}function xwe(r,e,t){let n=[],i=r,a=0;return Mn.spans(t,r,e,{span(){},point(o,s){o>i&&(n.push({from:i,to:o}),a+=o-i),i=s}},20),i=1)return e[e.length-1].to;let n=Math.floor(r*t);for(let i=0;;i++){let{from:a,to:o}=e[i],s=o-a;if(n<=s)return a+n;n-=s}}function Tb(r,e){let t=0;for(let{from:n,to:i}of r.ranges){if(e<=i){t+=e-n;break}t+=i-n}return t/r.total}function Dwe(r,e){for(let t of r)if(e(t))return t}const zR={toDOM(r){return r},fromDOM(r){return r},scale:1,eq(r){return r==this}};class QL{constructor(e,t,n){let i=0,a=0,o=0;this.viewports=n.map(({from:s,to:l})=>{let u=t.lineAt(s,Pn.ByPos,e,0,0).top,c=t.lineAt(l,Pn.ByPos,e,0,0).bottom;return i+=c-u,{from:s,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let s of this.viewports)s.domTop=o+(s.top-a)*this.scale,o=s.domBottom=s.domTop+(s.bottom-s.top),a=s.bottom}toDOM(e){for(let t=0,n=0,i=0;;t++){let a=tt.from==e.viewports[n].from&&t.to==e.viewports[n].to):!1}}function t0(r,e){if(e.scale==1)return r;let t=e.toDOM(r.top),n=e.toDOM(r.bottom);return new xl(r.from,r.length,t,n-t,Array.isArray(r._content)?r._content.map(i=>t0(i,e)):r._content)}const Mb=Et.define({combine:r=>r.join(" ")}),pM=Et.define({combine:r=>r.indexOf(!0)>-1}),gM=yf.newName(),qq=yf.newName(),Yq=yf.newName(),Zq={"&light":"."+qq,"&dark":"."+Yq};function vM(r,e,t){return new yf(e,{finish(n){return/&/.test(n)?n.replace(/&\w*/,i=>{if(i=="&")return r;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):r+" "+n}})}const Ewe=vM("."+gM,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Zq),kwe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},sD=bt.ie&&bt.ie_version<=11;class Twe{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new d_e,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let n of t)this.queue.push(n);(bt.ie&&bt.ie_version<=11||bt.ios&&e.composing)&&t.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(bt.chrome&&bt.chrome_version<126)&&(this.editContext=new Iwe(e),e.state.facet(Bc)&&(e.contentDOM.editContext=this.editContext.editContext)),sD&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,i=this.selectionRange;if(n.state.facet(Bc)?n.root.activeElement!=this.dom:!bw(this.dom,i))return;let a=i.anchorNode&&n.docView.nearest(i.anchorNode);if(a&&a.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(bt.ie&&bt.ie_version<=11||bt.android&&bt.chrome)&&!n.state.selection.main.empty&&i.focusNode&&w0(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=by(e.root);if(!t)return!1;let n=bt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Mwe(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let i=bw(this.dom,n);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let a=this.delayedAndroidKey;a&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=a.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&a.force&&cg(this.dom,a.key,a.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,i=!1;for(let a of e){let o=this.readMutation(a);o&&(o.typeOver&&(i=!0),t==-1?{from:t,to:n}=o:(t=Math.min(o.from,t),n=Math.max(o.to,n)))}return{from:t,to:n,typeOver:i}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),i=this.selectionChanged&&bw(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let a=new Y_e(this.view,e,t,n);return this.view.docView.domChanged={newSel:a.newSel?a.newSel.main:null},a}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,i=Rq(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!t.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.flags|=4),e.type=="childList"){let n=VR(t,e.previousSibling||e.target.previousSibling,-1),i=VR(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Bc)!=e.state.facet(Bc)&&(e.view.contentDOM.editContext=e.state.facet(Bc)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function VR(r,e,t){for(;e;){let n=An.get(e);if(n&&n.parent==r)return n;let i=e.parentNode;e=i!=r.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function UR(r,e){let t=e.startContainer,n=e.startOffset,i=e.endContainer,a=e.endOffset,o=r.docView.domAtPos(r.state.selection.main.anchor);return w0(o.node,o.offset,i,a)&&([t,n,i,a]=[i,a,t,n]),{anchorNode:t,anchorOffset:n,focusNode:i,focusOffset:a}}function Mwe(r,e){if(e.getComposedRanges){let i=e.getComposedRanges(r.root)[0];if(i)return UR(r,i)}let t=null;function n(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return r.contentDOM.addEventListener("beforeinput",n,!0),r.dom.ownerDocument.execCommand("indent"),r.contentDOM.removeEventListener("beforeinput",n,!0),t?UR(r,t):null}class Iwe{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let{anchor:i}=e.state.selection.main,a=this.toEditorPos(n.updateRangeStart),o=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:a,drifted:!1});let s={from:a,to:o,insert:tn.of(n.text.split(` +`))};s.from==this.from&&ithis.to&&(s.to=i),!(s.from==s.to&&!s.insert.length)&&(this.pendingContextChange=s,e.state.readOnly||KL(e,s,We.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=n=>{let i=[],a=null;for(let o=this.toEditorPos(n.rangeStart),s=this.toEditorPos(n.rangeEnd);o{let i=[];for(let a of n.getTextFormats()){let o=a.underlineStyle,s=a.underlineThickness;if(o!="None"&&s!="None"){let l=`text-decoration: underline ${o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${s=="Thin"?1:2}px`;i.push(hr.mark({attributes:{style:l}}).range(this.toEditorPos(a.rangeStart),this.toEditorPos(a.rangeEnd)))}}e.dispatch({effects:Mq.of(hr.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;this.composing=null,n&&this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:n=>{this.editContext.updateControlBounds(n.contentDOM.getBoundingClientRect());let i=by(n.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,i=this.pendingContextChange;return e.changes.iterChanges((a,o,s,l,u)=>{if(n)return;let c=u.length-(o-a);if(i&&o>=i.to)if(i.from==a&&i.to==o&&i.insert.eq(u)){i=this.pendingContextChange=null,t+=c,this.to+=c;return}else i=null,this.revertPending(e.state);if(a+=t,o+=t,o<=this.from)this.from+=c,this.to+=c;else if(athis.to||this.to-this.from+u.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(a),this.toContextPos(o),u.toString()),this.to+=c}t+=c}),i&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange;this.composing&&(this.composing.drifted||e.transactions.some(n=>!n.isUserEvent("input.type")&&n.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(n,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to1e4*3)}toEditorPos(e){let t=this.composing;return t&&t.drifted?t.editorBase+(e-t.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class St{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:n}=e;this.dispatchTransactions=e.dispatchTransactions||n&&(i=>i.forEach(a=>n(a,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||p_e(e.parent)||document,this.viewState=new NR(e.state||nn.create(e)),e.scrollTo&&e.scrollTo.is(Ab)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Qm).map(i=>new nD(i));for(let i of this.plugins)i.update(this);this.observer=new Twe(this),this.inputState=new J_e(this),this.inputState.ensureHandlers(this.plugins),this.docView=new bR(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let t=e.length==1&&e[0]instanceof Ci?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,i,a=this.state;for(let h of e){if(h.startState!=a)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");a=h.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,l=null;e.some(h=>h.annotation(Hq))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=Wq(a,o),l||(s=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(c=null)):this.observer.clear(),a.facet(nn.phrases)!=this.state.facet(nn.phrases))return this.setState(a);i=XS.create(this,a,e),i.flags|=s;let f=this.viewState.scrollTarget;try{this.updateState=2;for(let h of e){if(f&&(f=f.map(h.changes)),h.scrollIntoView){let{main:d}=h.state.selection;f=new fg(d.empty?d:We.cursor(d.head,d.head>d.anchor?-1:1))}for(let d of h.effects)d.is(Ab)&&(f=d.value.clip(this.state))}this.viewState.update(i,f),this.bidiCache=JS.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Jm)!=this.styleModules&&this.mountStyles(),n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(h=>h.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Mb)!=i.state.facet(Mb)&&(this.viewState.mustMeasureContent=!0),(t||n||f||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let h of this.state.facet(cM))try{h(i)}catch(d){oo(this.state,d,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!Rq(this,c)&&u.force&&cg(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new NR(e),this.plugins=e.facet(Qm).map(n=>new nD(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new bR(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Qm),n=e.state.facet(Qm);if(t!=n){let i=[];for(let a of n){let o=t.indexOf(a);if(o<0)i.push(new nD(a));else{let s=this.plugins[o];s.mustUpdate=e,i.push(s)}}for(let a of this.plugins)a.mustUpdate!=e&&a.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,i=n.scrollTop*this.scaleY,{scrollAnchorPos:a,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(o<0)if(iq(n))a=-1,o=this.viewState.heightMap.height;else{let d=this.viewState.scrollAnchorAt(i);a=d.from,o=d.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(d=>{try{return d.read(this)}catch(p){return oo(this.state,p),GR}}),f=XS.create(this,this.state,[]),h=!1;f.flags|=l,t?t.flags|=l:t=f,this.updateState=2,f.empty||(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),h=this.docView.update(f),h&&this.docViewUpdate());for(let d=0;d1||p<-1){i=i+p,n.scrollTop=i/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let s of this.state.facet(cM))s(t)}get themeClasses(){return gM+" "+(this.state.facet(pM)?Yq:qq)+" "+this.state.facet(Mb)}updateAttrs(){let e=HR(this,Iq,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Bc)?"true":"false",class:"cm-content",style:`${bt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),HR(this,qL,t);let n=this.observer.ignore(()=>{let i=iM(this.contentDOM,this.contentAttrs,t),a=iM(this.dom,this.editorAttrs,e);return i||a});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let i of n.effects)if(i.is(St.announce)){t&&(this.announceDOM.textContent=""),t=!1;let a=this.announceDOM.appendChild(document.createElement("div"));a.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Jm);let e=this.state.facet(St.cspNonce);yf.mount(this.root,this.styleModules.concat(Ewe).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;tn.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return aD(this,e,AR(this,e,t,n))}moveByGroup(e,t){return aD(this,e,AR(this,e,t,n=>W_e(this,e.head,n)))}visualLineSide(e,t){let n=this.bidiSpans(e),i=this.textDirectionAt(e.from),a=n[t?n.length-1:0];return We.cursor(a.side(t,i)+e.from,a.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,n=!0){return H_e(this,e,t,n)}moveVertically(e,t,n){return aD(this,e,$_e(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Pq(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let i=this.state.doc.lineAt(e),a=this.bidiSpans(i),o=a[Wc.find(a,e-i.from,-1,t)];return QC(n,o.dir==zn.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Eq)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Lwe)return bq(e.length);let t=this.textDirectionAt(e.from),n;for(let a of this.bidiCache)if(a.from==e.from&&a.dir==t&&(a.fresh||yq(a.isolates,n=yR(this,e))))return a.order;n||(n=yR(this,e));let i=E_e(e.text,t,n);return this.bidiCache.push(new JS(e.from,e.to,t,n,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||bt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{rq(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Ab.of(new fg(typeof e=="number"?We.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Ab.of(new fg(We.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Ua.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Ua.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=yf.newName(),i=[Mb.of(n),Jm.of(vM(`.${n}`,e))];return t&&t.dark&&i.push(pM.of(!0)),i}static baseTheme(e){return Vd.lowest(Jm.of(vM("."+gM,e,Zq)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),i=n&&An.get(n)||An.get(e);return((t=i==null?void 0:i.rootView)===null||t===void 0?void 0:t.view)||null}}St.styleModule=Jm;St.inputHandler=xq;St.clipboardInputFilter=$L;St.clipboardOutputFilter=jL;St.scrollHandler=Tq;St.focusChangeEffect=Dq;St.perLineTextDirection=Eq;St.exceptionSink=Aq;St.updateListener=cM;St.editable=Bc;St.mouseSelectionStyle=Cq;St.dragMovesSelection=Sq;St.clickAddsSelectionRange=wq;St.decorations=wy;St.outerDecorations=Lq;St.atomicRanges=YL;St.bidiIsolatedRanges=Fq;St.scrollMargins=Bq;St.darkTheme=pM;St.cspNonce=Et.define({combine:r=>r.length?r[0]:""});St.contentAttributes=qL;St.editorAttributes=Iq;St.lineWrapping=St.contentAttributes.of({class:"cm-lineWrapping"});St.announce=Dr.define();const Lwe=4096,GR={};class JS{constructor(e,t,n,i,a,o){this.from=e,this.to=t,this.dir=n,this.isolates=i,this.fresh=a,this.order=o}static update(e,t){if(t.empty&&!e.some(a=>a.fresh))return e;let n=[],i=e.length?e[e.length-1].dir:zn.LTR;for(let a=Math.max(0,e.length-10);a=0;i--){let a=n[i],o=typeof a=="function"?a(r):a;o&&nM(o,t)}return t}const Fwe=bt.mac?"mac":bt.windows?"win":bt.linux?"linux":"key";function Bwe(r,e){const t=r.split(/-(?!$)/);let n=t[t.length-1];n=="Space"&&(n=" ");let i,a,o,s;for(let l=0;ln.concat(i),[]))),t}function Pwe(r,e,t){return Xq(Kq(r.state),e,r,t)}let Oc=null;const Rwe=4e3;function Nwe(r,e=Fwe){let t=Object.create(null),n=Object.create(null),i=(o,s)=>{let l=n[o];if(l==null)n[o]=s;else if(l!=s)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},a=(o,s,l,u,c)=>{var f,h;let d=t[o]||(t[o]=Object.create(null)),p=s.split(/ (?!$)/).map(m=>Bwe(m,e));for(let m=1;m{let _=Oc={view:b,prefix:y,scope:o};return setTimeout(()=>{Oc==_&&(Oc=null)},Rwe),!0}]})}let g=p.join(" ");i(g,!1);let v=d[g]||(d[g]={preventDefault:!1,stopPropagation:!1,run:((h=(f=d._any)===null||f===void 0?void 0:f.run)===null||h===void 0?void 0:h.slice())||[]});l&&v.run.push(l),u&&(v.preventDefault=!0),c&&(v.stopPropagation=!0)};for(let o of r){let s=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let u of s){let c=t[u]||(t[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:f}=o;for(let h in c)c[h].run.push(d=>f(d,mM))}let l=o[e]||o.key;if(l)for(let u of s)a(u,l,o.run,o.preventDefault,o.stopPropagation),o.shift&&a(u,"Shift-"+l,o.shift,o.preventDefault,o.stopPropagation)}return t}let mM=null;function Xq(r,e,t,n){mM=e;let i=u_e(e),a=fa(i,0),o=es(a)==i.length&&i!=" ",s="",l=!1,u=!1,c=!1;Oc&&Oc.view==t&&Oc.scope==n&&(s=Oc.prefix+" ",zq.indexOf(e.keyCode)<0&&(u=!0,Oc=null));let f=new Set,h=v=>{if(v){for(let m of v.run)if(!f.has(m)&&(f.add(m),m(t)))return v.stopPropagation&&(c=!0),!0;v.preventDefault&&(v.stopPropagation&&(c=!0),u=!0)}return!1},d=r[n],p,g;return d&&(h(d[s+Ib(i,e,!o)])?l=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(bt.windows&&e.ctrlKey&&e.altKey)&&(p=bf[e.keyCode])&&p!=i?(h(d[s+Ib(p,e,!0)])||e.shiftKey&&(g=yy[e.keyCode])!=i&&g!=p&&h(d[s+Ib(g,e,!1)]))&&(l=!0):o&&e.shiftKey&&h(d[s+Ib(i,e,!0)])&&(l=!0),!l&&h(d._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),mM=null,l}class M1{constructor(e,t,n,i,a){this.className=e,this.left=t,this.top=n,this.width=i,this.height=a}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let i=e.coordsAtPos(n.head,n.assoc||1);if(!i)return[];let a=Qq(e);return[new M1(t,i.left-a.left,i.top-a.top,null,i.bottom-i.top)]}else return zwe(e,t,n)}}function Qq(r){let e=r.scrollDOM.getBoundingClientRect();return{left:(r.textDirection==zn.LTR?e.left:e.right-r.scrollDOM.clientWidth*r.scaleX)-r.scrollDOM.scrollLeft*r.scaleX,top:e.top-r.scrollDOM.scrollTop*r.scaleY}}function $R(r,e,t,n){let i=r.coordsAtPos(e,t*2);if(!i)return n;let a=r.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,s=r.posAtCoords({x:a.left+1,y:o}),l=r.posAtCoords({x:a.right-1,y:o});return s==null||l==null?n:{from:Math.max(n.from,Math.min(s,l)),to:Math.min(n.to,Math.max(s,l))}}function zwe(r,e,t){if(t.to<=r.viewport.from||t.from>=r.viewport.to)return[];let n=Math.max(t.from,r.viewport.from),i=Math.min(t.to,r.viewport.to),a=r.textDirection==zn.LTR,o=r.contentDOM,s=o.getBoundingClientRect(),l=Qq(r),u=o.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),f=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),h=s.right-(c?parseInt(c.paddingRight):0),d=hM(r,n),p=hM(r,i),g=d.type==ko.Text?d:null,v=p.type==ko.Text?p:null;if(g&&(r.lineWrapping||d.widgetLineBreaks)&&(g=$R(r,n,1,g)),v&&(r.lineWrapping||p.widgetLineBreaks)&&(v=$R(r,i,-1,v)),g&&v&&g.from==v.from&&g.to==v.to)return y(b(t.from,t.to,g));{let w=g?b(t.from,null,g):_(d,!1),S=v?b(null,t.to,v):_(p,!0),C=[];return(g||d).to<(v||p).from-(g&&v?1:0)||d.widgetLineBreaks>1&&w.bottom+r.defaultLineHeight/2k&&T.from=F)break;H>L&&E(Math.max(W,L),w==null&&W<=k,Math.min(H,F),S==null&&H>=M,z.dir)}if(L=N.to+1,L>=F)break}return D.length==0&&E(k,w==null,M,S==null,r.textDirection),{top:A,bottom:x,horizontal:D}}function _(w,S){let C=s.top+(S?w.top:w.bottom);return{top:C,bottom:C,horizontal:[]}}}function Vwe(r,e){return r.constructor==e.constructor&&r.eq(e)}class Uwe{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(Sw)!=e.state.facet(Sw)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(Sw);for(;t!Vwe(t,this.drawn[n]))){let t=this.dom.firstChild,n=0;for(let i of e)i.update&&t&&i.constructor&&this.drawn[n].constructor&&i.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(i.draw(),t);for(;t;){let i=t.nextSibling;t.remove(),t=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const Sw=Et.define();function Jq(r){return[Ua.define(e=>new Uwe(e,r)),Sw.of(r)]}const eY=!bt.ios,Sy=Et.define({combine(r){return Bf(r,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Gwe(r={}){return[Sy.of(r),Hwe,Wwe,$we,kq.of(!0)]}function tY(r){return r.startState.facet(Sy)!=r.state.facet(Sy)}const Hwe=Jq({above:!0,markers(r){let{state:e}=r,t=e.facet(Sy),n=[];for(let i of e.selection.ranges){let a=i==e.selection.main;if(i.empty?!a||eY:t.drawRangeCursor){let o=a?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:We.cursor(i.head,i.head>i.anchor?-1:1);for(let l of M1.forRange(r,o,s))n.push(l)}}return n},update(r,e){r.transactions.some(n=>n.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let t=tY(r);return t&&jR(r.state,e),r.docChanged||r.selectionSet||t},mount(r,e){jR(e.state,r)},class:"cm-cursorLayer"});function jR(r,e){e.style.animationDuration=r.facet(Sy).cursorBlinkRate+"ms"}const Wwe=Jq({above:!1,markers(r){return r.state.selection.ranges.map(e=>e.empty?[]:M1.forRange(r,"cm-selectionBackground",e)).reduce((e,t)=>e.concat(t))},update(r,e){return r.docChanged||r.selectionSet||r.viewportChanged||tY(r)},class:"cm-selectionLayer"}),yM={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};eY&&(yM[".cm-line"].caretColor=yM[".cm-content"].caretColor="transparent !important");const $we=Vd.highest(St.theme(yM)),rY=Dr.define({map(r,e){return r==null?null:e.mapPos(r)}}),r0=ra.define({create(){return null},update(r,e){return r!=null&&(r=e.changes.mapPos(r)),e.effects.reduce((t,n)=>n.is(rY)?n.value:t,r)}}),jwe=Ua.fromClass(class{constructor(r){this.view=r,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(r){var e;let t=r.state.field(r0);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(r.startState.field(r0)!=t||r.docChanged||r.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:r}=this,e=r.state.field(r0),t=e!=null&&r.coordsAtPos(e);if(!t)return null;let n=r.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+r.scrollDOM.scrollLeft*r.scaleX,top:t.top-n.top+r.scrollDOM.scrollTop*r.scaleY,height:t.bottom-t.top}}drawCursor(r){if(this.cursor){let{scaleX:e,scaleY:t}=this.view;r?(this.cursor.style.left=r.left/e+"px",this.cursor.style.top=r.top/t+"px",this.cursor.style.height=r.height/t+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(r){this.view.state.field(r0)!=r&&this.view.dispatch({effects:rY.of(r)})}},{eventObservers:{dragover(r){this.setDropPos(this.view.posAtCoords({x:r.clientX,y:r.clientY}))},dragleave(r){(r.target==this.view.contentDOM||!this.view.contentDOM.contains(r.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function qwe(){return[r0,jwe]}const om="-10000px";class nY{constructor(e,t,n,i){this.facet=t,this.createTooltipView=n,this.removeTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(o=>o);let a=null;this.tooltipViews=this.tooltips.map(o=>a=n(o,a))}update(e,t){var n;let i=e.state.facet(this.facet),a=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let o=[],s=t?[]:null;for(let l=0;lt[u]=l),t.length=s.length),this.input=i,this.tooltips=a,this.tooltipViews=o,!0}}function Ywe(r){let{win:e}=r;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const lD=Et.define({combine:r=>{var e,t,n;return{position:bt.ios?"absolute":((e=r.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=r.find(i=>i.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((n=r.find(i=>i.tooltipSpace))===null||n===void 0?void 0:n.tooltipSpace)||Ywe}}}),qR=new WeakMap,JL=Ua.fromClass(class{constructor(r){this.view=r,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=r.state.facet(lD);this.position=e.position,this.parent=e.parent,this.classes=r.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new nY(r,eF,(t,n)=>this.createTooltip(t,n),t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()}),this.above=this.manager.tooltips.map(t=>!!t.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),r.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let r of this.manager.tooltipViews)this.intersectionObserver.observe(r.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(r){r.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(r,this.above);e&&this.observeIntersection();let t=e||r.geometryChanged,n=r.state.facet(lD);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;t=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(r,e){let t=r.create(this.view),n=e?e.dom:null;if(t.dom.classList.add("cm-tooltip"),r.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",t.dom.appendChild(i)}return t.dom.style.position=this.position,t.dom.style.top=om,t.dom.style.left="0px",this.container.insertBefore(t.dom,n),t.mount&&t.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(t.dom),t}destroy(){var r,e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let n of this.manager.tooltipViews)n.dom.remove(),(r=n.destroy)===null||r===void 0||r.call(n);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(t=this.intersectionObserver)===null||t===void 0||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let r=1,e=1,t=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:a}=this.manager.tooltipViews[0];if(bt.gecko)t=a.offsetParent!=this.container.ownerDocument.body;else if(a.style.top==om&&a.style.left=="0px"){let o=a.getBoundingClientRect();t=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(t||this.position=="absolute")if(this.parent){let a=this.parent.getBoundingClientRect();a.width&&a.height&&(r=a.width/this.parent.offsetWidth,e=a.height/this.parent.offsetHeight)}else({scaleX:r,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),i=ZL(this.view);return{visible:{left:n.left+i.left,top:n.top+i.top,right:n.right-i.right,bottom:n.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((a,o)=>{let s=this.manager.tooltipViews[o];return s.getCoords?s.getCoords(a.pos):this.view.coordsAtPos(a.pos)}),size:this.manager.tooltipViews.map(({dom:a})=>a.getBoundingClientRect()),space:this.view.state.facet(lD).tooltipSpace(this.view),scaleX:r,scaleY:e,makeAbsolute:t}}writeMeasure(r){var e;if(r.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{visible:t,space:n,scaleX:i,scaleY:a}=r,o=[];for(let s=0;s=Math.min(t.bottom,n.bottom)||f.rightMath.min(t.right,n.right)+.1)){c.style.top=om;continue}let d=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,p=d?7:0,g=h.right-h.left,v=(e=qR.get(u))!==null&&e!==void 0?e:h.bottom-h.top,m=u.offset||Kwe,y=this.view.textDirection==zn.LTR,b=h.width>n.right-n.left?y?n.left:n.right-h.width:y?Math.max(n.left,Math.min(f.left-(d?14:0)+m.x,n.right-g)):Math.min(Math.max(n.left,f.left-g+(d?14:0)-m.x),n.right-g),_=this.above[s];!l.strictSide&&(_?f.top-v-p-m.yn.bottom)&&_==n.bottom-f.bottom>f.top-n.top&&(_=this.above[s]=!_);let w=(_?f.top-n.top:n.bottom-f.bottom)-p;if(wb&&A.topS&&(S=_?A.top-v-2-p:A.bottom+p+2);if(this.position=="absolute"?(c.style.top=(S-r.parent.top)/a+"px",c.style.left=(b-r.parent.left)/i+"px"):(c.style.top=S/a+"px",c.style.left=b/i+"px"),d){let A=f.left+(y?m.x:-m.x)-(b+14-7);d.style.left=A/i+"px"}u.overlap!==!0&&o.push({left:b,top:S,right:C,bottom:S+v}),c.classList.toggle("cm-tooltip-above",_),c.classList.toggle("cm-tooltip-below",!_),u.positioned&&u.positioned(r.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let r of this.manager.tooltipViews)r.dom.style.top=om}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Zwe=St.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Kwe={x:0,y:0},eF=Et.define({enables:[JL,Zwe]}),e2=Et.define({combine:r=>r.reduce((e,t)=>e.concat(t),[])});class rA{static create(e){return new rA(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new nY(e,e2,(t,n)=>this.createHostedView(t,n),t=>t.dom.remove())}createHostedView(e,t){let n=e.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,t?t.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)(e=t.destroy)===null||e===void 0||e.call(t)}passProp(e){let t;for(let n of this.manager.tooltipViews){let i=n[e];if(i!==void 0){if(t===void 0)t=i;else if(t!==i)return}}return t}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Xwe=eF.compute([e2],r=>{let e=r.facet(e2);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.map(t=>{var n;return(n=t.end)!==null&&n!==void 0?n:t.pos})),create:rA.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Qwe{constructor(e,t,n,i,a){this.view=e,this.source=t,this.field=n,this.setHover=i,this.hoverTime=a,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;es.bottom||t.xs.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(c=>c.from<=i&&c.to>=i),u=l&&l.dir==zn.RTL?-1:1;a=t.x{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>oo(e.state,l,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(JL),t=e?e.manager.tooltips.findIndex(n=>n.create==rA.create):-1;return t>-1?e.manager.tooltipViews[t]:null}mousemove(e){var t,n;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:a}=this;if(i.length&&a&&!Jwe(a.dom,e)||this.pending){let{pos:o}=i[0]||this.pending,s=(n=(t=i[0])===null||t===void 0?void 0:t.end)!==null&&n!==void 0?n:o;(o==s?this.view.posAtCoords(this.lastMove)!=o:!eSe(this.view,o,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:t}=this;if(t.length){let{tooltip:n}=this;n&&n.dom.contains(e.relatedTarget)?this.watchTooltipLeave(n.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let t=n=>{e.removeEventListener("mouseleave",t),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",t)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Lb=4;function Jwe(r,e){let{left:t,right:n,top:i,bottom:a}=r.getBoundingClientRect(),o;if(o=r.querySelector(".cm-tooltip-arrow")){let s=o.getBoundingClientRect();i=Math.min(s.top,i),a=Math.max(s.bottom,a)}return e.clientX>=t-Lb&&e.clientX<=n+Lb&&e.clientY>=i-Lb&&e.clientY<=a+Lb}function eSe(r,e,t,n,i,a){let o=r.scrollDOM.getBoundingClientRect(),s=r.documentTop+r.documentPadding.top+r.contentHeight;if(o.left>n||o.righti||Math.min(o.bottom,s)=e&&l<=t}function tSe(r,e={}){let t=Dr.define(),n=ra.define({create(){return[]},update(i,a){if(i.length&&(e.hideOnChange&&(a.docChanged||a.selection)?i=[]:e.hideOn&&(i=i.filter(o=>!e.hideOn(a,o))),a.docChanged)){let o=[];for(let s of i){let l=a.changes.mapPos(s.pos,-1,Oa.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),s);u.pos=l,u.end!=null&&(u.end=a.changes.mapPos(u.end)),o.push(u)}}i=o}for(let o of a.effects)o.is(t)&&(i=o.value),o.is(rSe)&&(i=[]);return i},provide:i=>e2.from(i)});return{active:n,extension:[n,Ua.define(i=>new Qwe(i,r,n,t,e.hoverTime||300)),Xwe]}}function iY(r,e){let t=r.plugin(JL);if(!t)return null;let n=t.manager.tooltips.indexOf(e);return n<0?null:t.manager.tooltipViews[n]}const rSe=Dr.define(),YR=Et.define({combine(r){let e,t;for(let n of r)e=e||n.topContainer,t=t||n.bottomContainer;return{topContainer:e,bottomContainer:t}}});function Cy(r,e){let t=r.plugin(aY),n=t?t.specs.indexOf(e):-1;return n>-1?t.panels[n]:null}const aY=Ua.fromClass(class{constructor(r){this.input=r.state.facet(Ay),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(r));let e=r.state.facet(YR);this.top=new Fb(r,!0,e.topContainer),this.bottom=new Fb(r,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(r){let e=r.state.facet(YR);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Fb(r.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Fb(r.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=r.state.facet(Ay);if(t!=this.input){let n=t.filter(l=>l),i=[],a=[],o=[],s=[];for(let l of n){let u=this.specs.indexOf(l),c;u<0?(c=l(r.view),s.push(c)):(c=this.panels[u],c.update&&c.update(r)),i.push(c),(c.top?a:o).push(c)}this.specs=n,this.panels=i,this.top.sync(a),this.bottom.sync(o);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let n of this.panels)n.update&&n.update(r)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:r=>St.scrollMargins.of(e=>{let t=e.plugin(r);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Fb{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=ZR(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=ZR(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function ZR(r){let e=r.nextSibling;return r.remove(),e}const Ay=Et.define({enables:aY});class Yg extends _d{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Yg.prototype.elementClass="";Yg.prototype.toDOM=void 0;Yg.prototype.mapMode=Oa.TrackBefore;Yg.prototype.startSide=Yg.prototype.endSide=-1;Yg.prototype.point=!0;let nSe=0;class Xo{constructor(e,t,n,i){this.name=e,this.set=t,this.base=n,this.modified=i,this.id=nSe++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof Xo&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Xo(n,[],null,[]);if(i.set.push(i),t)for(let a of t.set)i.set.push(a);return i}static defineModifier(e){let t=new t2(e);return n=>n.modified.indexOf(t)>-1?n:t2.get(n.base||n,n.modified.concat(t).sort((i,a)=>i.id-a.id))}}let iSe=0;class t2{constructor(e){this.name=e,this.instances=[],this.id=iSe++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(s=>s.base==e&&aSe(t,s.modified));if(n)return n;let i=[],a=new Xo(e.name,i,e,t);for(let s of t)s.instances.push(a);let o=oSe(t);for(let s of e.set)if(!s.modified.length)for(let l of o)i.push(t2.get(s,l));return a}}function aSe(r,e){return r.length==e.length&&r.every((t,n)=>t==e[n])}function oSe(r){let e=[[]];for(let t=0;tn.length-t.length)}function oY(r){let e=Object.create(null);for(let t in r){let n=r[t];Array.isArray(n)||(n=[n]);for(let i of t.split(" "))if(i){let a=[],o=2,s=i;for(let f=0;;){if(s=="..."&&f>0&&f+3==i.length){o=1;break}let h=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!h)throw new RangeError("Invalid path: "+i);if(a.push(h[0]=="*"?"":h[0][0]=='"'?JSON.parse(h[0]):h[0]),f+=h[0].length,f==i.length)break;let d=i[f++];if(f==i.length&&d=="!"){o=0;break}if(d!="/")throw new RangeError("Invalid path: "+i);s=i.slice(f)}let l=a.length-1,u=a[l];if(!u)throw new RangeError("Invalid path: "+i);let c=new r2(n,o,l>0?a.slice(0,l):null);e[u]=c.sort(e[u])}}return sY.add(e)}const sY=new Hr;class r2{constructor(e,t,n,i){this.tags=e,this.mode=t,this.context=n,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let o=i;for(let s of a)for(let l of s.set){let u=t[l.id];if(u){o=o?o+" "+u:u;break}}return o},scope:n}}function sSe(r,e){let t=null;for(let n of r){let i=n.style(e);i&&(t=t?t+" "+i:i)}return t}function lSe(r,e,t,n=0,i=r.length){let a=new uSe(n,Array.isArray(e)?e:[e],t);a.highlightRange(r.cursor(),n,i,"",a.highlighters),a.flush(i)}class uSe{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,i,a){let{type:o,from:s,to:l}=e;if(s>=n||l<=t)return;o.isTop&&(a=this.highlighters.filter(d=>!d.scope||d.scope(o)));let u=i,c=cSe(e)||r2.empty,f=sSe(a,c.tags);if(f&&(u&&(u+=" "),u+=f,c.mode==1&&(i+=(i?" ":"")+f)),this.startSpan(Math.max(t,s),u),c.opaque)return;let h=e.tree&&e.tree.prop(Hr.mounted);if(h&&h.overlay){let d=e.node.enter(h.overlay[0].from+s,1),p=this.highlighters.filter(v=>!v.scope||v.scope(h.tree.type)),g=e.firstChild();for(let v=0,m=s;;v++){let y=v=b||!e.nextSibling())););if(!y||b>n)break;m=y.to+s,m>t&&(this.highlightRange(d.cursor(),Math.max(t,y.from+s),Math.min(n,m),"",p),this.startSpan(Math.min(n,m),u))}g&&e.parent()}else if(e.firstChild()){h&&(i="");do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,i,a),this.startSpan(Math.min(n,e.to),u)}while(e.nextSibling());e.parent()}}}function cSe(r){let e=r.type.prop(sY);for(;e&&e.context&&!r.matchContext(e.context);)e=e.next;return e||null}const it=Xo.define,Bb=it(),Tc=it(),KR=it(Tc),XR=it(Tc),Mc=it(),Ob=it(Mc),uD=it(Mc),pl=it(),Gf=it(pl),ol=it(),sl=it(),bM=it(),sm=it(bM),Pb=it(),O={comment:Bb,lineComment:it(Bb),blockComment:it(Bb),docComment:it(Bb),name:Tc,variableName:it(Tc),typeName:KR,tagName:it(KR),propertyName:XR,attributeName:it(XR),className:it(Tc),labelName:it(Tc),namespace:it(Tc),macroName:it(Tc),literal:Mc,string:Ob,docString:it(Ob),character:it(Ob),attributeValue:it(Ob),number:uD,integer:it(uD),float:it(uD),bool:it(Mc),regexp:it(Mc),escape:it(Mc),color:it(Mc),url:it(Mc),keyword:ol,self:it(ol),null:it(ol),atom:it(ol),unit:it(ol),modifier:it(ol),operatorKeyword:it(ol),controlKeyword:it(ol),definitionKeyword:it(ol),moduleKeyword:it(ol),operator:sl,derefOperator:it(sl),arithmeticOperator:it(sl),logicOperator:it(sl),bitwiseOperator:it(sl),compareOperator:it(sl),updateOperator:it(sl),definitionOperator:it(sl),typeOperator:it(sl),controlOperator:it(sl),punctuation:bM,separator:it(bM),bracket:sm,angleBracket:it(sm),squareBracket:it(sm),paren:it(sm),brace:it(sm),content:pl,heading:Gf,heading1:it(Gf),heading2:it(Gf),heading3:it(Gf),heading4:it(Gf),heading5:it(Gf),heading6:it(Gf),contentSeparator:it(pl),list:it(pl),quote:it(pl),emphasis:it(pl),strong:it(pl),link:it(pl),monospace:it(pl),strikethrough:it(pl),inserted:it(),deleted:it(),changed:it(),invalid:it(),meta:Pb,documentMeta:it(Pb),annotation:it(Pb),processingInstruction:it(Pb),definition:Xo.defineModifier("definition"),constant:Xo.defineModifier("constant"),function:Xo.defineModifier("function"),standard:Xo.defineModifier("standard"),local:Xo.defineModifier("local"),special:Xo.defineModifier("special")};for(let r in O){let e=O[r];e instanceof Xo&&(e.name=r)}lY([{tag:O.link,class:"tok-link"},{tag:O.heading,class:"tok-heading"},{tag:O.emphasis,class:"tok-emphasis"},{tag:O.strong,class:"tok-strong"},{tag:O.keyword,class:"tok-keyword"},{tag:O.atom,class:"tok-atom"},{tag:O.bool,class:"tok-bool"},{tag:O.url,class:"tok-url"},{tag:O.labelName,class:"tok-labelName"},{tag:O.inserted,class:"tok-inserted"},{tag:O.deleted,class:"tok-deleted"},{tag:O.literal,class:"tok-literal"},{tag:O.string,class:"tok-string"},{tag:O.number,class:"tok-number"},{tag:[O.regexp,O.escape,O.special(O.string)],class:"tok-string2"},{tag:O.variableName,class:"tok-variableName"},{tag:O.local(O.variableName),class:"tok-variableName tok-local"},{tag:O.definition(O.variableName),class:"tok-variableName tok-definition"},{tag:O.special(O.variableName),class:"tok-variableName2"},{tag:O.definition(O.propertyName),class:"tok-propertyName tok-definition"},{tag:O.typeName,class:"tok-typeName"},{tag:O.namespace,class:"tok-namespace"},{tag:O.className,class:"tok-className"},{tag:O.macroName,class:"tok-macroName"},{tag:O.propertyName,class:"tok-propertyName"},{tag:O.operator,class:"tok-operator"},{tag:O.comment,class:"tok-comment"},{tag:O.meta,class:"tok-meta"},{tag:O.invalid,class:"tok-invalid"},{tag:O.punctuation,class:"tok-punctuation"}]);var cD;const $p=new Hr;function fSe(r){return Et.define({combine:r?e=>e.concat(r):void 0})}const hSe=new Hr;class Os{constructor(e,t,n=[],i=""){this.data=e,this.name=i,nn.prototype.hasOwnProperty("tree")||Object.defineProperty(nn.prototype,"tree",{get(){return ya(this)}}),this.parser=t,this.extension=[Kg.of(this),nn.languageData.of((a,o,s)=>{let l=QR(a,o,s),u=l.type.prop($p);if(!u)return[];let c=a.facet(u),f=l.type.prop(hSe);if(f){let h=l.resolve(o-l.from,s);for(let d of f)if(d.test(h,a)){let p=a.facet(d.facet);return d.type=="replace"?p:p.concat(c)}}return c})].concat(n)}isActiveAt(e,t,n=-1){return QR(e,t,n).type.prop($p)==this.data}findRegions(e){let t=e.facet(Kg);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],i=(a,o)=>{if(a.prop($p)==this.data){n.push({from:o,to:o+a.length});return}let s=a.prop(Hr.mounted);if(s){if(s.tree.prop($p)==this.data){if(s.overlay)for(let l of s.overlay)n.push({from:l.from+o,to:l.to+o});else n.push({from:o,to:o+a.length});return}else if(s.overlay){let l=n.length;if(i(s.tree,s.overlay[0].from+o),n.length>l)return}}for(let l=0;ln.isTop?t:void 0)]}),e.name)}configure(e,t){return new n2(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function ya(r){let e=r.field(Os.state,!1);return e?e.tree:Ki.empty}class dSe{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let lm=null;class i2{constructor(e,t,n=[],i,a,o,s,l){this.parser=e,this.state=t,this.fragments=n,this.tree=i,this.treeLen=a,this.viewport=o,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new i2(e,t,[],Ki.empty,0,n,[],null)}startParse(){return this.parser.startParse(new dSe(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Ki.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(rd.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=lm;lm=this;try{return e()}finally{lm=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=JR(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,f,h)=>l.push({fromA:u,toA:c,fromB:f,toB:h})),n=rd.applyChanges(n,l),i=Ki.empty,a=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),f=e.mapPos(u.to,-1);ce.from&&(this.fragments=JR(this.fragments,i,a),this.skipped.splice(n--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Rj{createParse(t,n,i){let a=i[0].from,o=i[i.length-1].to;return{parsedPos:a,advance(){let l=lm;if(l){for(let u of i)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=o,new Ki(ho.none,[],[],o-a)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return lm}}function JR(r,e,t){return rd.applyChanges(r,[{fromA:e,toA:t,fromB:e,toB:t}])}class Zg{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new Zg(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=i2.create(e.facet(Kg).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new Zg(n)}}Os.state=ra.define({create:Zg.init,update(r,e){for(let t of e.effects)if(t.is(Os.setState))return t.value;return e.startState.facet(Kg)!=e.state.facet(Kg)?Zg.init(e.state):r.apply(e)}});let uY=r=>{let e=setTimeout(()=>r(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(uY=r=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(r,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const fD=typeof navigator<"u"&&(!((cD=navigator.scheduling)===null||cD===void 0)&&cD.isInputPending)?()=>navigator.scheduling.isInputPending():null,pSe=Ua.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Os.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Os.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=uY(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndi+1e3,l=a.context.work(()=>fD&&fD()||Date.now()>o,i+(s?0:1e5));this.chunkBudget-=Date.now()-t,(l||this.chunkBudget<=0)&&(a.context.takeTree(),this.view.dispatch({effects:Os.setState.of(new Zg(a.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(a.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>oo(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Kg=Et.define({combine(r){return r.length?r[0]:null},enables:r=>[Os.state,pSe,St.contentAttributes.compute([r],e=>{let t=e.facet(r);return t&&t.name?{"data-language":t.name}:{}})]});class gSe{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const vSe=Et.define(),tF=Et.define({combine:r=>{if(!r.length)return" ";let e=r[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(r[0]));return e}});function a2(r){let e=r.facet(tF);return e.charCodeAt(0)==9?r.tabSize*e.length:e.length}function xy(r,e){let t="",n=r.tabSize,i=r.facet(tF)[0];if(i==" "){for(;e>=n;)t+=" ",e-=n;i=" "}for(let a=0;a=e?mSe(r,t,e):null}class nA{constructor(e,t={}){this.state=e,this.options=t,this.unit=a2(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:a}=this.options;return i!=null&&i>=n.from&&i<=n.to?a&&i==e?{text:"",from:e}:(t<0?i-1&&(a+=o-this.countColumn(n,n.search(/\S|$/))),a}countColumn(e,t=e.length){return XC(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:i}=this.lineAt(e,t),a=this.options.overrideIndentation;if(a){let o=a(i);if(o>-1)return o}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const cY=new Hr;function mSe(r,e,t){let n=e.resolveStack(t),i=n.node.enterUnfinishedNodesBefore(t);if(i!=n.node){let a=[];for(let o=i;o!=n.node;o=o.parent)a.push(o);for(let o=a.length-1;o>=0;o--)n={node:a[o],next:n}}return fY(n,r,t)}function fY(r,e,t){for(let n=r;n;n=n.next){let i=bSe(n.node);if(i)return i(nF.create(e,t,n))}return 0}function ySe(r){return r.pos==r.options.simulateBreak&&r.options.simulateDoubleBreak}function bSe(r){let e=r.type.prop(cY);if(e)return e;let t=r.firstChild,n;if(t&&(n=t.type.prop(Hr.closedBy))){let i=r.lastChild,a=i&&n.indexOf(i.name)>-1;return o=>CSe(o,!0,1,void 0,a&&!ySe(o)?i.from:void 0)}return r.parent==null?_Se:null}function _Se(){return 0}class nF extends nA{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new nF(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(wSe(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return fY(this.context.next,this.base,this.pos)}}function wSe(r,e){for(let t=e;t;t=t.parent)if(r==t)return!0;return!1}function SSe(r){let e=r.node,t=e.childAfter(e.from),n=e.lastChild;if(!t)return null;let i=r.options.simulateBreak,a=r.state.doc.lineAt(t.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let s=t.to;;){let l=e.childAfter(s);if(!l||l==n)return null;if(!l.type.isSkipped){if(l.from>=o)return null;let u=/^ */.exec(a.text.slice(t.to-a.from))[0].length;return{from:t.from,to:t.to+u}}s=l.to}}function CSe(r,e,t,n,i){let a=r.textAfter,o=a.match(/^\s*/)[0].length,s=i==r.pos+o,l=SSe(r);return l?s?r.column(l.from):r.column(l.to):r.baseIndent+(s?0:r.unit*t)}function ASe({except:r,units:e=1}={}){return t=>{let n=r&&r.test(t.textAfter);return t.baseIndent+(n?0:e*t.unit)}}const xSe=200;function DSe(){return nn.transactionFilter.of(r=>{if(!r.docChanged||!r.isUserEvent("input.type")&&!r.isUserEvent("input.complete"))return r;let e=r.startState.languageDataAt("indentOnInput",r.startState.selection.main.head);if(!e.length)return r;let t=r.newDoc,{head:n}=r.newSelection.main,i=t.lineAt(n);if(n>i.from+xSe)return r;let a=t.sliceString(i.from,n);if(!e.some(u=>u.test(a)))return r;let{state:o}=r,s=-1,l=[];for(let{head:u}of o.selection.ranges){let c=o.doc.lineAt(u);if(c.from==s)continue;s=c.from;let f=rF(o,c.from);if(f==null)continue;let h=/^\s*/.exec(c.text)[0],d=xy(o,f);h!=d&&l.push({from:c.from,to:c.from+h.length,insert:d})}return l.length?[r,{changes:l,sequential:!0}]:r})}const ESe=Et.define(),hY=new Hr;function kSe(r,e,t){let n=ya(r);if(n.lengtht)continue;if(a&&s.from=e&&u.to>t&&(a=u)}}return a}function TSe(r){let e=r.lastChild;return e&&e.to==r.to&&e.type.isError}function dY(r,e,t){for(let n of r.facet(ESe)){let i=n(r,e,t);if(i)return i}return kSe(r,e,t)}function pY(r,e){let t=e.mapPos(r.from,1),n=e.mapPos(r.to,-1);return t>=n?void 0:{from:t,to:n}}const iF=Dr.define({map:pY}),iA=Dr.define({map:pY});function gY(r){let e=[];for(let{head:t}of r.state.selection.ranges)e.some(n=>n.from<=t&&n.to>=t)||e.push(r.lineBlockAt(t));return e}const I1=ra.define({create(){return hr.none},update(r,e){r=r.map(e.changes);for(let t of e.effects)if(t.is(iF)&&!MSe(r,t.value.from,t.value.to)){let{preparePlaceholder:n}=e.state.facet(bY),i=n?hr.replace({widget:new NSe(n(e.state,t.value))}):e5;r=r.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(iA)&&(r=r.update({filter:(n,i)=>t.value.from!=n||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:n}=e.selection.main;r.between(n,n,(i,a)=>{in&&(t=!0)}),t&&(r=r.update({filterFrom:n,filterTo:n,filter:(i,a)=>a<=n||i>=n}))}return r},provide:r=>St.decorations.from(r),toJSON(r,e){let t=[];return r.between(0,e.doc.length,(n,i)=>{t.push(n,i)}),t},fromJSON(r){if(!Array.isArray(r)||r.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t{(!i||i.from>a)&&(i={from:a,to:o})}),i}function MSe(r,e,t){let n=!1;return r.between(e,e,(i,a)=>{i==e&&a==t&&(n=!0)}),n}function mY(r,e){return r.field(I1,!1)?e:e.concat(Dr.appendConfig.of(RSe()))}const ISe=r=>{for(let e of gY(r)){let t=dY(r.state,e.from,e.to);if(t)return r.dispatch({effects:mY(r.state,[iF.of(t),yY(r,t)])}),!0}return!1},LSe=r=>{if(!r.state.field(I1,!1))return!1;let e=[];for(let t of gY(r)){let n=vY(r.state,t.from,t.to);n&&e.push(iA.of(n),yY(r,n,!1))}return e.length&&r.dispatch({effects:e}),e.length>0};function yY(r,e,t=!0){let n=r.state.doc.lineAt(e.from).number,i=r.state.doc.lineAt(e.to).number;return St.announce.of(`${r.state.phrase(t?"Folded lines":"Unfolded lines")} ${n} ${r.state.phrase("to")} ${i}.`)}const FSe=r=>{let{state:e}=r,t=[];for(let n=0;n{let e=r.state.field(I1,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,r.state.doc.length,(n,i)=>{t.push(iA.of({from:n,to:i}))}),r.dispatch({effects:t}),!0},OSe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:ISe},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:LSe},{key:"Ctrl-Alt-[",run:FSe},{key:"Ctrl-Alt-]",run:BSe}],PSe={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},bY=Et.define({combine(r){return Bf(r,PSe)}});function RSe(r){return[I1,zSe]}function _Y(r,e){let{state:t}=r,n=t.facet(bY),i=o=>{let s=r.lineBlockAt(r.posAtDOM(o.target)),l=vY(r.state,s.from,s.to);l&&r.dispatch({effects:iA.of(l)}),o.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(r,i,e);let a=document.createElement("span");return a.textContent=n.placeholderText,a.setAttribute("aria-label",t.phrase("folded code")),a.title=t.phrase("unfold"),a.className="cm-foldPlaceholder",a.onclick=i,a}const e5=hr.replace({widget:new class extends Cv{toDOM(r){return _Y(r,null)}}});class NSe extends Cv{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return _Y(e,this.value)}}const zSe=St.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class L1{constructor(e,t){this.specs=e;let n;function i(s){let l=yf.newName();return(n||(n=Object.create(null)))["."+l]=s,l}const a=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof Os?s=>s.prop($p)==o.data:o?s=>s==o:void 0,this.style=lY(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:a}).style,this.module=n?new yf(n):null,this.themeType=t.themeType}static define(e,t){return new L1(e,t||{})}}const _M=Et.define(),wY=Et.define({combine(r){return r.length?[r[0]]:null}});function hD(r){let e=r.facet(_M);return e.length?e:r.facet(wY)}function SY(r,e){let t=[USe],n;return r instanceof L1&&(r.module&&t.push(St.styleModule.of(r.module)),n=r.themeType),e!=null&&e.fallback?t.push(wY.of(r)):n?t.push(_M.computeN([St.darkTheme],i=>i.facet(St.darkTheme)==(n=="dark")?[r]:[])):t.push(_M.of(r)),t}class VSe{constructor(e){this.markCache=Object.create(null),this.tree=ya(e.state),this.decorations=this.buildDeco(e,hD(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=ya(e.state),n=hD(e.state),i=n!=hD(e.startState),{viewport:a}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length=a.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=a.to)}buildDeco(e,t){if(!t||!this.tree.length)return hr.none;let n=new Wg;for(let{from:i,to:a}of e.visibleRanges)lSe(this.tree,t,(o,s,l)=>{n.add(o,s,this.markCache[l]||(this.markCache[l]=hr.mark({class:l})))},i,a);return n.finish()}}const USe=Vd.high(Ua.fromClass(VSe,{decorations:r=>r.decorations})),GSe=L1.define([{tag:O.meta,color:"#404740"},{tag:O.link,textDecoration:"underline"},{tag:O.heading,textDecoration:"underline",fontWeight:"bold"},{tag:O.emphasis,fontStyle:"italic"},{tag:O.strong,fontWeight:"bold"},{tag:O.strikethrough,textDecoration:"line-through"},{tag:O.keyword,color:"#708"},{tag:[O.atom,O.bool,O.url,O.contentSeparator,O.labelName],color:"#219"},{tag:[O.literal,O.inserted],color:"#164"},{tag:[O.string,O.deleted],color:"#a11"},{tag:[O.regexp,O.escape,O.special(O.string)],color:"#e40"},{tag:O.definition(O.variableName),color:"#00f"},{tag:O.local(O.variableName),color:"#30a"},{tag:[O.typeName,O.namespace],color:"#085"},{tag:O.className,color:"#167"},{tag:[O.special(O.variableName),O.macroName],color:"#256"},{tag:O.definition(O.propertyName),color:"#00c"},{tag:O.comment,color:"#940"},{tag:O.invalid,color:"#f00"}]),HSe=St.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),CY=1e4,AY="()[]{}",xY=Et.define({combine(r){return Bf(r,{afterCursor:!0,brackets:AY,maxScanDistance:CY,renderMatch:jSe})}}),WSe=hr.mark({class:"cm-matchingBracket"}),$Se=hr.mark({class:"cm-nonmatchingBracket"});function jSe(r){let e=[],t=r.matched?WSe:$Se;return e.push(t.range(r.start.from,r.start.to)),r.end&&e.push(t.range(r.end.from,r.end.to)),e}const qSe=ra.define({create(){return hr.none},update(r,e){if(!e.docChanged&&!e.selection)return r;let t=[],n=e.state.facet(xY);for(let i of e.state.selection.ranges){if(!i.empty)continue;let a=Ml(e.state,i.head,-1,n)||i.head>0&&Ml(e.state,i.head-1,1,n)||n.afterCursor&&(Ml(e.state,i.head,1,n)||i.headSt.decorations.from(r)}),YSe=[qSe,HSe];function ZSe(r={}){return[xY.of(r),YSe]}const KSe=new Hr;function wM(r,e,t){let n=r.prop(e<0?Hr.openedBy:Hr.closedBy);if(n)return n;if(r.name.length==1){let i=t.indexOf(r.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function SM(r){let e=r.type.prop(KSe);return e?e(r.node):r}function Ml(r,e,t,n={}){let i=n.maxScanDistance||CY,a=n.brackets||AY,o=ya(r),s=o.resolveInner(e,t);for(let l=s;l;l=l.parent){let u=wM(l.type,t,a);if(u&&l.from0?e>=c.from&&ec.from&&e<=c.to))return XSe(r,e,t,l,c,u,a)}}return QSe(r,e,t,o,s.type,i,a)}function XSe(r,e,t,n,i,a,o){let s=n.parent,l={from:i.from,to:i.to},u=0,c=s==null?void 0:s.cursor();if(c&&(t<0?c.childBefore(n.from):c.childAfter(n.to)))do if(t<0?c.to<=n.from:c.from>=n.to){if(u==0&&a.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:t<0?e-1:e,to:t>0?e+1:e},c=r.doc.iterRange(e,t>0?r.doc.length:0),f=0;for(let h=0;!c.next().done&&h<=a;){let d=c.value;t<0&&(h+=d.length);let p=e+h*t;for(let g=t>0?0:d.length-1,v=t>0?d.length:-1;g!=v;g+=t){let m=o.indexOf(d[g]);if(!(m<0||n.resolveInner(p+g,1).type!=i))if(m%2==0==t>0)f++;else{if(f==1)return{start:u,end:{from:p+g,to:p+g+1},matched:m>>1==l>>1};f--}}t>0&&(h+=d.length)}return c.done?{start:u,matched:!1}:null}const JSe=Object.create(null),t5=[ho.none],r5=[],n5=Object.create(null),e2e=Object.create(null);for(let[r,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])e2e[r]=t2e(JSe,e);function dD(r,e){r5.indexOf(r)>-1||(r5.push(r),console.warn(e))}function t2e(r,e){let t=[];for(let s of e.split(" ")){let l=[];for(let u of s.split(".")){let c=r[u]||O[u];c?typeof c=="function"?l.length?l=l.map(c):dD(u,`Modifier ${u} used at start of tag`):l.length?dD(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:dD(u,`Unknown highlighting tag ${u}`)}for(let u of l)t.push(u)}if(!t.length)return 0;let n=e.replace(/ /g,"_"),i=n+" "+t.map(s=>s.id),a=n5[i];if(a)return a.id;let o=n5[i]=ho.define({id:t5.length,name:n,props:[oY({[n]:t})]});return t5.push(o),o.id}zn.RTL,zn.LTR;var i5={};class o2{constructor(e,t,n,i,a,o,s,l,u,c=0,f){this.p=e,this.stack=t,this.state=n,this.reducePos=i,this.pos=a,this.score=o,this.buffer=s,this.bufferBase=l,this.curContext=u,this.lookAhead=c,this.parent=f}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let i=e.parser.context;return new o2(e,[],t,n,n,0,[],0,i?new a5(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,i=e&65535,{parser:a}=this.p,o=this.reducePos=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,u)}storeNode(e,t,n,i=4,a=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&o.buffer[s-4]==0&&o.buffer[s-1]>-1){if(t==n)return;if(o.buffer[s-2]>=t){o.buffer[s-2]=n;return}}}if(!a||this.pos==n)this.buffer.push(e,t,n,i);else{let o=this.buffer.length;if(o>0&&this.buffer[o-4]!=0){let s=!1;for(let l=o;l>0&&this.buffer[l-2]>n;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;o>0&&this.buffer[o-2]>n;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=n,this.buffer[o+3]=i}}shift(e,t,n,i){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=i,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,i,4);else{let a=e,{parser:o}=this.p;(i>this.pos||t<=o.maxNode)&&(this.pos=i,o.stateFlag(a,1)||(this.reducePos=i)),this.pushState(a,n),this.shiftContext(t,n),t<=o.maxNode&&this.buffer.push(t,n,i,4)}}apply(e,t,n,i){e&65536?this.reduce(e):this.shift(e,t,n,i)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(n,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new o2(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new r2e(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let a=0,o;al&1&&s==o)||i.push(t[a],o)}t=i}let n=[];for(let i=0;i>19,i=t&65535,a=this.stack.length-n*3;if(a<0||e.getGoto(this.stack[a],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(i,a)=>{if(!t.includes(i))return t.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let s=(o>>19)-a;if(s>1){let l=o&65535,u=this.stack.length-s*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return s<<19|65536|l}}else{let s=n(o,a+1);if(s!=null)return s}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class a5{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class r2e{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class s2{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new s2(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new s2(this.stack,this.pos,this.index)}}function Rb(r,e=Uint16Array){if(typeof r!="string")return r;let t=null;for(let n=0,i=0;n=92&&o--,o>=34&&o--;let l=o-32;if(l>=46&&(l-=46,s=!0),a+=l,s)break;a*=46}t?t[i++]=a:t=new e(a)}return t}class Cw{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const o5=new Cw;class n2e{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=o5,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,i=this.rangeIndex,a=this.pos+e;for(;an.to:a>=n.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];a+=o.from-n.to,n=o}return a}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,i;if(t>=0&&t=this.chunk2Pos&&ns.to&&(this.chunk2=this.chunk2.slice(0,s.to-n)),i=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),i}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=o5,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(n+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return n}}class hg{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;a2e(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}hg.prototype.contextual=hg.prototype.fallback=hg.prototype.extend=!1;hg.prototype.fallback=hg.prototype.extend=!1;class i2e{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function a2e(r,e,t,n,i,a){let o=0,s=1<0){let p=r[d];if(l.allows(p)&&(e.token.value==-1||e.token.value==p||o2e(p,e.token.value,i,a))){e.acceptToken(p);break}}let c=e.next,f=0,h=r[o+2];if(e.next<0&&h>f&&r[u+h*3-3]==65535){o=r[u+h*3-1];continue e}for(;f>1,p=u+d+(d<<1),g=r[p],v=r[p+1]||65536;if(c=v)f=d+1;else{o=r[p+2],e.advance();continue e}}break}}function s5(r,e,t){for(let n=e,i;(i=r[n])!=65535;n++)if(i==t)return n-e;return-1}function o2e(r,e,t,n){let i=s5(t,n,e);return i<0||s5(t,n,r)e)&&!n.type.isError)return t<0?Math.max(0,Math.min(n.to-1,e-25)):Math.min(r.length,Math.max(n.from+1,e+25));if(t<0?n.prevSibling():n.nextSibling())break;if(!n.parent())return t<0?0:r.length}}class s2e{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?l5(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?l5(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=o,null;if(a instanceof Ki){if(o==e){if(o=Math.max(this.safeFrom,e)&&(this.trees.push(a),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+a.length}}}class l2e{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(n=>new Cw)}getActions(e){let t=0,n=null,{parser:i}=e.p,{tokenizers:a}=i,o=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let u=0;uf.end+25&&(l=Math.max(f.lookAhead,l)),f.value!=0)){let h=t;if(f.extended>-1&&(t=this.addActions(e,f.extended,f.end,t)),t=this.addActions(e,f.value,f.end,t),!c.extend&&(n=f,t>h))break}}for(;this.actions.length>t;)this.actions.pop();return l&&e.setLookAhead(l),!n&&e.pos==this.stream.end&&(n=new Cw,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Cw,{pos:n,p:i}=e;return t.start=n,t.end=Math.min(n+1,i.stream.end),t.value=n==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,n){let i=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(i,e),n),e.value>-1){let{parser:a}=n.p;for(let o=0;o=0&&n.p.parser.dialect.allows(s>>1)){s&1?e.extended=s>>1:e.value=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,n,i){for(let a=0;ae.bufferLength*4?new s2e(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],i,a;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;ot)n.push(s);else{if(this.advanceStack(s,n,e))continue;{i||(i=[],a=[]),i.push(s);let l=this.tokens.getMainToken(s);a.push(l.value,l.end)}}break}}if(!n.length){let o=i&&f2e(i);if(o)return go&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw go&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,a,n);if(o)return go&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(n.length>o)for(n.sort((s,l)=>l.score-s.score);n.length>o;)n.pop();n.some(s=>s.reducePos>t)&&this.recovering--}else if(n.length>1){e:for(let o=0;o500&&u.buffer.length>500)if((s.score-u.score||s.buffer.length-u.buffer.length)>0)n.splice(l--,1);else{n.splice(o--,1);continue e}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let o=1;o ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let f=this.fragments.nodeAt(i);f;){let h=this.parser.nodeSet.types[f.type.id]==f.type?a.getGoto(e.state,f.type.id):-1;if(h>-1&&f.length&&(!u||(f.prop(Hr.contextHash)||0)==c))return e.useNode(f,h),go&&console.log(o+this.stackID(e)+` (via reuse of ${a.getName(f.type.id)})`),!0;if(!(f instanceof Ki)||f.children.length==0||f.positions[0]>0)break;let d=f.children[0];if(d instanceof Ki&&f.positions[0]==0)f=d;else break}}let s=a.stateSlot(e.state,4);if(s>0)return e.reduce(s),go&&console.log(o+this.stackID(e)+` (via always-reduce ${a.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;ui?t.push(p):n.push(p)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return u5(e,t),!0}}runRecovery(e,t,n){let i=null,a=!1;for(let o=0;o ":"";if(s.deadEnd&&(a||(a=!0,s.restart(),go&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))))continue;let f=s.split(),h=c;for(let d=0;f.forceReduce()&&d<10&&(go&&console.log(h+this.stackID(f)+" (via force-reduce)"),!this.advanceFully(f,n));d++)go&&(h=this.stackID(f)+" -> ");for(let d of s.recoverByInsert(l))go&&console.log(c+this.stackID(d)+" (via recover-insert)"),this.advanceFully(d,n);this.stream.end>s.pos?(u==s.pos&&(u++,l=0),s.recoverByDelete(l,u),go&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),u5(s,n)):(!i||i.scoree.topRules[s][1]),i=[];for(let s=0;s=0)a(c,l,s[u++]);else{let f=s[u+-c];for(let h=-c;h>0;h--)a(s[u++],l,f);u++}}}this.nodeSet=new OL(t.map((s,l)=>ho.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:n.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Fj;let o=Rb(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new hg(o,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let i=new u2e(this,e,t,n);for(let a of this.wrappers)i=a(i,e,t,n);return i}getGoto(e,t,n=!1){let i=this.goto;if(t>=i[0])return-1;for(let a=i[t+1];;){let o=i[a++],s=o&1,l=i[a++];if(s&&n)return l;for(let u=a+(o>>1);a0}validAction(e,t){return!!this.allActions(e,n=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),i=n?t(n):void 0;for(let a=this.stateSlot(e,1);i==null;a+=3){if(this.data[a]==65535)if(this.data[a+1]==1)a=Cu(this.data,a+2);else break;i=t(Cu(this.data,a+1))}return i}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=Cu(this.data,n+2);else break;if(!(this.data[n+2]&1)){let i=this.data[n+1];t.some((a,o)=>o&1&&a==i)||t.push(this.data[n],i)}}return t}configure(e){let t=Object.assign(Object.create(l2.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(n=>{let i=e.tokenizers.find(a=>a.from==n);return i?i.to:n})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,i)=>{let a=e.specializers.find(s=>s.from==n.external);if(!a)return n;let o=Object.assign(Object.assign({},n),{external:a.to});return t.specializers[i]=c5(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let a of e.split(" ")){let o=t.indexOf(a);o>=0&&(n[o]=!0)}let i=null;for(let a=0;an)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.scorer.external(t,n)<<1|e}return r.get}class DY{constructor(e,t,n,i){this.state=e,this.pos=t,this.explicit=n,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=ya(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),i=t.text.slice(n-t.from,this.pos-t.from),a=i.search(kY(e,!1));return a<0?null:{from:n+a,to:this.pos,text:i.slice(a)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function f5(r){let e=Object.keys(r).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function h2e(r){let e=Object.create(null),t=Object.create(null);for(let{label:i}of r){e[i[0]]=!0;for(let a=1;atypeof i=="string"?{label:i}:i),[t,n]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:h2e(e);return i=>{let a=i.matchBefore(n);return a||i.explicit?{from:a?a.from:i.pos,options:e,validFor:t}:null}}function d2e(r,e){return t=>{for(let n=ya(t.state).resolveInner(t.pos,-1);n;n=n.parent){if(r.indexOf(n.name)>-1)return null;if(n.type.isTop)break}return e(t)}}class h5{constructor(e,t,n,i){this.completion=e,this.source=t,this.match=n,this.score=i}}function nd(r){return r.selection.main.from}function kY(r,e){var t;let{source:n}=r,i=e&&n[0]!="^",a=n[n.length-1]!="$";return!i&&!a?r:new RegExp(`${i?"^":""}(?:${n})${a?"$":""}`,(t=r.flags)!==null&&t!==void 0?t:r.ignoreCase?"i":"")}const TY=rc.define();function p2e(r,e,t,n){let{main:i}=r.selection,a=t-i.from,o=n-i.from;return Object.assign(Object.assign({},r.changeByRange(s=>{if(s!=i&&t!=n&&r.sliceDoc(s.from+a,s.from+o)!=r.sliceDoc(t,n))return{range:s};let l=r.toText(e);return{changes:{from:s.from+a,to:n==i.from?s.to:s.from+o,insert:l},range:We.cursor(s.from+a+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const d5=new WeakMap;function g2e(r){if(!Array.isArray(r))return r;let e=d5.get(r);return e||d5.set(r,e=EY(r)),e}const u2=Dr.define(),Dy=Dr.define();class v2e{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t=48&&w<=57||w>=97&&w<=122?2:w>=65&&w<=90?1:0:(S=zL(w))!=S.toLowerCase()?1:S!=S.toUpperCase()?2:0;(!y||C==1&&v||_==0&&C!=0)&&(t[f]==w||n[f]==w&&(h=!0)?o[f++]=y:o.length&&(m=!1)),_=C,y+=es(w)}return f==l&&o[0]==0&&m?this.result(-100+(h?-200:0),o,e):d==l&&p==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):d==l?this.ret(-900-e.length,[p,g]):f==l?this.result(-100+(h?-200:0)+-700+(m?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,n){let i=[],a=0;for(let o of t){let s=o+(this.astral?es(fa(n,o)):1);a&&i[a-1]==o?i[a-1]=s:(i[a++]=o,i[a++]=s)}return this.ret(e-n.length,i)}}class m2e{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:y2e,filterStrict:!1,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>p5(e(n),t(n)),optionClass:(e,t)=>n=>p5(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function p5(r,e){return r?e?r+" "+e:r:e}function y2e(r,e,t,n,i,a){let o=r.textDirection==zn.RTL,s=o,l=!1,u="top",c,f,h=e.left-i.left,d=i.right-e.right,p=n.right-n.left,g=n.bottom-n.top;if(s&&h=g||y>e.top?c=t.bottom-e.top:(u="bottom",c=e.bottom-t.top)}let v=(e.bottom-e.top)/a.offsetHeight,m=(e.right-e.left)/a.offsetWidth;return{style:`${u}: ${c/v}px; max-width: ${f/m}px`,class:"cm-completionInfo-"+(l?o?"left-narrow":"right-narrow":s?"left":"right")}}function b2e(r){let e=r.addToOptions.slice();return r.icons&&e.push({render(t){let n=document.createElement("div");return n.classList.add("cm-completionIcon"),t.type&&n.classList.add(...t.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),n.setAttribute("aria-hidden","true"),n},position:20}),e.push({render(t,n,i,a){let o=document.createElement("span");o.className="cm-completionLabel";let s=t.displayLabel||t.label,l=0;for(let u=0;ul&&o.appendChild(document.createTextNode(s.slice(l,c)));let h=o.appendChild(document.createElement("span"));h.appendChild(document.createTextNode(s.slice(c,f))),h.className="cm-completionMatchedText",l=f}return lt.position-n.position).map(t=>t.render)}function gD(r,e,t){if(r<=t)return{from:0,to:r};if(e<0&&(e=0),e<=r>>1){let i=Math.floor(e/t);return{from:i*t,to:(i+1)*t}}let n=Math.floor((r-e)/t);return{from:r-(n+1)*t,to:r-n*t}}class _2e{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(t),{options:a,selected:o}=i.open,s=e.state.facet(Pi);this.optionContent=b2e(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=gD(a.length,o,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(t).open;for(let c=l.target,f;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(f=/-(\d+)$/.exec(c.id))&&+f[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(Pi).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:Dy.of(null)})}),this.showOptions(a,i.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=i){let{options:a,selected:o,disabled:s}=n.open;(!i.open||i.open.options!=a)&&(this.range=gD(a.length,o,e.state.facet(Pi).maxRenderedOptions),this.showOptions(a,n.id)),this.updateSel(),s!=((t=i.open)===null||t===void 0?void 0:t.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))n&&this.dom.classList.remove(n);for(let n of t.split(" "))n&&this.dom.classList.add(n);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=gD(t.options.length,t.selected,this.view.state.facet(Pi).maxRenderedOptions),this.showOptions(t.options,e.id)),this.updateSelectedOption(t.selected)){this.destroyInfo();let{completion:n}=t.options[t.selected],{info:i}=n;if(!i)return;let a=typeof i=="string"?document.createTextNode(i):i(n);if(!a)return;"then"in a?a.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o,n)}).catch(o=>oo(this.view.state,o,"completion info")):this.addInfoPane(a,n)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:a}=e;n.appendChild(i),this.infoDestroy=a||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,i=this.range.from;n;n=n.nextSibling,i++)n.nodeName!="LI"||!n.id?i--:i==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected");return t&&S2e(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),a=this.space;if(!a){let o=this.dom.ownerDocument.defaultView||window;a={left:0,top:0,right:o.innerWidth,bottom:o.innerHeight}}return i.top>Math.min(a.bottom,t.bottom)-10||i.bottomn.from||n.from==0))if(a=h,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let d=i.appendChild(document.createElement("completion-section"));d.textContent=h}}const c=i.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let f=this.optionClass(s);f&&(c.className=f);for(let h of this.optionContent){let d=h(s,this.view.state,this.view,l);d&&c.appendChild(d)}}return n.from&&i.classList.add("cm-completionListIncompleteTop"),n.tonew _2e(t,r,e)}function S2e(r,e){let t=r.getBoundingClientRect(),n=e.getBoundingClientRect(),i=t.height/r.offsetHeight;n.topt.bottom&&(r.scrollTop+=(n.bottom-t.bottom)/i)}function g5(r){return(r.boost||0)*100+(r.apply?10:0)+(r.info?5:0)+(r.type?1:0)}function C2e(r,e){let t=[],n=null,i=u=>{t.push(u);let{section:c}=u.completion;if(c){n||(n=[]);let f=typeof c=="string"?c:c.name;n.some(h=>h.name==f)||n.push(typeof c=="string"?{name:f}:c)}},a=e.facet(Pi);for(let u of r)if(u.hasResult()){let c=u.result.getMatch;if(u.result.filter===!1)for(let f of u.result.options)i(new h5(f,u.source,c?c(f):[],1e9-t.length));else{let f=e.sliceDoc(u.from,u.to),h,d=a.filterStrict?new m2e(f):new v2e(f);for(let p of u.result.options)if(h=d.match(p.label)){let g=p.displayLabel?c?c(p,h.matched):[]:h.matched;i(new h5(p,u.source,g,h.score+(p.boost||0)))}}}if(n){let u=Object.create(null),c=0,f=(h,d)=>{var p,g;return((p=h.rank)!==null&&p!==void 0?p:1e9)-((g=d.rank)!==null&&g!==void 0?g:1e9)||(h.namef.score-c.score||l(c.completion,f.completion))){let c=u.completion;!s||s.label!=c.label||s.detail!=c.detail||s.type!=null&&c.type!=null&&s.type!=c.type||s.apply!=c.apply||s.boost!=c.boost?o.push(u):g5(u.completion)>g5(s)&&(o[o.length-1]=u),s=u.completion}return o}class jp{constructor(e,t,n,i,a,o){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=i,this.selected=a,this.disabled=o}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new jp(this.options,v5(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,i,a,o){if(i&&!o&&e.some(u=>u.isPending))return i.setDisabled();let s=C2e(e,t);if(!s.length)return i&&e.some(u=>u.isPending)?i.setDisabled():null;let l=t.facet(Pi).selectOnOpen?0:-1;if(i&&i.selected!=l&&i.selected!=-1){let u=i.options[i.selected].completion;for(let c=0;cc.hasResult()?Math.min(u,c.from):u,1e8),create:T2e,above:a.aboveCursor},i?i.timestamp:Date.now(),l,!1)}map(e){return new jp(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new jp(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class c2{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new c2(E2e,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Pi),a=(n.override||t.languageDataAt("autocomplete",nd(t)).map(g2e)).map(l=>(this.active.find(c=>c.source==l)||new ns(l,this.active.some(c=>c.state!=0)?1:0)).update(e,n));a.length==this.active.length&&a.every((l,u)=>l==this.active[u])&&(a=this.active);let o=this.open,s=e.effects.some(l=>l.is(aF));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||a.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!A2e(a,this.active)||s?o=jp.build(a,t,this.id,o,n,s):o&&o.disabled&&!a.some(l=>l.isPending)&&(o=null),!o&&a.every(l=>!l.isPending)&&a.some(l=>l.hasResult())&&(a=a.map(l=>l.hasResult()?new ns(l.source,0):l));for(let l of e.effects)l.is(IY)&&(o=o&&o.setSelected(l.value,this.id));return a==this.active&&o==this.open?this:new c2(a,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?x2e:D2e}}function A2e(r,e){if(r==e)return!0;for(let t=0,n=0;;){for(;t-1&&(t["aria-activedescendant"]=r+"-"+e),t}const E2e=[];function MY(r,e){if(r.isUserEvent("input.complete")){let n=r.annotation(TY);if(n&&e.activateOnCompletion(n))return 12}let t=r.isUserEvent("input.type");return t&&e.activateOnTyping?5:t?1:r.isUserEvent("delete.backward")?2:r.selection?8:r.docChanged?16:0}class ns{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=MY(e,t),i=this;(n&8||n&16&&this.touches(e))&&(i=new ns(i.source,0)),n&4&&i.state==0&&(i=new ns(this.source,1)),i=i.updateFor(e,n);for(let a of e.effects)if(a.is(u2))i=new ns(i.source,1,a.value);else if(a.is(Dy))i=new ns(i.source,0);else if(a.is(aF))for(let o of a.value)o.source==i.source&&(i=o);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(nd(e.state))}}class dg extends ns{constructor(e,t,n,i,a,o){super(e,3,t),this.limit=n,this.result=i,this.from=a,this.to=o}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let a=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=nd(e.state);if(s>o||!i||t&2&&(nd(e.startState)==this.from||st.map(e))}}),IY=Dr.define(),La=ra.define({create(){return c2.start()},update(r,e){return r.update(e)},provide:r=>[eF.from(r,e=>e.tooltip),St.contentAttributes.from(r,e=>e.attrs)]});function oF(r,e){const t=e.completion.apply||e.completion.label;let n=r.state.field(La).active.find(i=>i.source==e.source);return n instanceof dg?(typeof t=="string"?r.dispatch(Object.assign(Object.assign({},p2e(r.state,t,n.from,n.to)),{annotations:TY.of(e.completion)})):t(r,e.completion,n.from,n.to),!0):!1}const T2e=w2e(La,oF);function Nb(r,e="option"){return t=>{let n=t.state.field(La,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+i*(r?1:-1):r?0:o-1;return s<0?s=e=="page"?0:o-1:s>=o&&(s=e=="page"?o-1:0),t.dispatch({effects:IY.of(s)}),!0}}const LY=r=>{let e=r.state.field(La,!1);return r.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampr.state.field(La,!1)?(r.dispatch({effects:u2.of(!0)}),!0):!1,M2e=r=>{let e=r.state.field(La,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(r.dispatch({effects:Dy.of(null)}),!0)};class I2e{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const L2e=50,F2e=1e3,B2e=Ua.fromClass(class{constructor(r){this.view=r,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of r.state.field(La).active)e.isPending&&this.startQuery(e)}update(r){let e=r.state.field(La),t=r.state.facet(Pi);if(!r.selectionSet&&!r.docChanged&&r.startState.field(La)==e)return;let n=r.transactions.some(a=>{let o=MY(a,t);return o&8||(a.selection||a.docChanged)&&!(o&3)});for(let a=0;aL2e&&Date.now()-o.time>F2e){for(let s of o.context.abortListeners)try{s()}catch(l){oo(this.view.state,l)}o.context.abortListeners=null,this.running.splice(a--,1)}else o.updates.push(...r.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),r.transactions.some(a=>a.effects.some(o=>o.is(u2)))&&(this.pendingStart=!0);let i=this.pendingStart?50:t.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(a=>a.isPending&&!this.running.some(o=>o.active.source==a.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let a of r.transactions)a.isUserEvent("input.type")?this.composing=2:this.composing==2&&a.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:r}=this.view,e=r.field(La);for(let t of e.active)t.isPending&&!this.running.some(n=>n.active.source==t.source)&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Pi).updateSyncTime))}startQuery(r){let{state:e}=this.view,t=nd(e),n=new DY(e,t,r.explicit,this.view),i=new I2e(r,n);this.running.push(i),Promise.resolve(r.source(n)).then(a=>{i.context.aborted||(i.done=a||null,this.scheduleAccept())},a=>{this.view.dispatch({effects:Dy.of(null)}),oo(this.view.state,a)})}scheduleAccept(){this.running.every(r=>r.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Pi).updateSyncTime))}accept(){var r;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(Pi),n=this.view.state.field(La);for(let i=0;is.source==a.active.source);if(o&&o.isPending)if(a.done==null){let s=new ns(a.active.source,0);for(let l of a.updates)s=s.update(l,t);s.isPending||e.push(s)}else this.startQuery(o)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:aF.of(e)})}},{eventHandlers:{blur(r){let e=this.view.state.field(La,!1);if(e&&e.tooltip&&this.view.state.facet(Pi).closeOnBlur){let t=e.open&&iY(this.view,e.open.tooltip);(!t||!t.dom.contains(r.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Dy.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:u2.of(!1)}),20),this.composing=0}}}),O2e=typeof navigator=="object"&&/Win/.test(navigator.platform),P2e=Vd.highest(St.domEventHandlers({keydown(r,e){let t=e.state.field(La,!1);if(!t||!t.open||t.open.disabled||t.open.selected<0||r.key.length>1||r.ctrlKey&&!(O2e&&r.altKey)||r.metaKey)return!1;let n=t.open.options[t.open.selected],i=t.active.find(o=>o.source==n.source),a=n.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(r.key)>-1&&oF(e,n),!1}})),R2e=St.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),Ey={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Ph=Dr.define({map(r,e){let t=e.mapPos(r,-1,Oa.TrackAfter);return t??void 0}}),sF=new class extends _d{};sF.startSide=1;sF.endSide=-1;const FY=ra.define({create(){return Mn.empty},update(r,e){if(r=r.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);r=r.update({filter:n=>n>=t.from&&n<=t.to})}for(let t of e.effects)t.is(Ph)&&(r=r.update({add:[sF.range(t.value,t.value+1)]}));return r}});function N2e(){return[V2e,FY]}const vD="()[]{}<>";function BY(r){for(let e=0;e{if((z2e?r.composing:r.compositionStarted)||r.state.readOnly)return!1;let i=r.state.selection.main;if(n.length>2||n.length==2&&es(fa(n,0))==1||e!=i.from||t!=i.to)return!1;let a=H2e(r.state,n);return a?(r.dispatch(a),!0):!1}),U2e=({state:r,dispatch:e})=>{if(r.readOnly)return!1;let n=OY(r,r.selection.main.head).brackets||Ey.brackets,i=null,a=r.changeByRange(o=>{if(o.empty){let s=W2e(r.doc,o.head);for(let l of n)if(l==s&&aA(r.doc,o.head)==BY(fa(l,0)))return{changes:{from:o.head-l.length,to:o.head+l.length},range:We.cursor(o.head-l.length)}}return{range:i=o}});return i||e(r.update(a,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},G2e=[{key:"Backspace",run:U2e}];function H2e(r,e){let t=OY(r,r.selection.main.head),n=t.brackets||Ey.brackets;for(let i of n){let a=BY(fa(i,0));if(e==i)return a==i?q2e(r,i,n.indexOf(i+i+i)>-1,t):$2e(r,i,a,t.before||Ey.before);if(e==a&&PY(r,r.selection.main.from))return j2e(r,i,a)}return null}function PY(r,e){let t=!1;return r.field(FY).between(0,r.doc.length,n=>{n==e&&(t=!0)}),t}function aA(r,e){let t=r.sliceString(e,e+2);return t.slice(0,es(fa(t,0)))}function W2e(r,e){let t=r.sliceString(e-2,e);return es(fa(t,0))==t.length?t:t.slice(1)}function $2e(r,e,t,n){let i=null,a=r.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:Ph.of(o.to+e.length),range:We.range(o.anchor+e.length,o.head+e.length)};let s=aA(r.doc,o.head);return!s||/\s/.test(s)||n.indexOf(s)>-1?{changes:{insert:e+t,from:o.head},effects:Ph.of(o.head+e.length),range:We.cursor(o.head+e.length)}:{range:i=o}});return i?null:r.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function j2e(r,e,t){let n=null,i=r.changeByRange(a=>a.empty&&aA(r.doc,a.head)==t?{changes:{from:a.head,to:a.head+t.length,insert:t},range:We.cursor(a.head+t.length)}:n={range:a});return n?null:r.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function q2e(r,e,t,n){let i=n.stringPrefixes||Ey.stringPrefixes,a=null,o=r.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Ph.of(s.to+e.length),range:We.range(s.anchor+e.length,s.head+e.length)};let l=s.head,u=aA(r.doc,l),c;if(u==e){if(y5(r,l))return{changes:{insert:e+e,from:l},effects:Ph.of(l+e.length),range:We.cursor(l+e.length)};if(PY(r,l)){let h=t&&r.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+h.length,insert:h},range:We.cursor(l+h.length)}}}else{if(t&&r.sliceDoc(l-2*e.length,l)==e+e&&(c=b5(r,l-2*e.length,i))>-1&&y5(r,c))return{changes:{insert:e+e+e+e,from:l},effects:Ph.of(l+e.length),range:We.cursor(l+e.length)};if(r.charCategorizer(l)(u)!=Nn.Word&&b5(r,l,i)>-1&&!Y2e(r,l,e,i))return{changes:{insert:e+e,from:l},effects:Ph.of(l+e.length),range:We.cursor(l+e.length)}}return{range:a=s}});return a?null:r.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function y5(r,e){let t=ya(r).resolveInner(e+1);return t.parent&&t.from==e}function Y2e(r,e,t,n){let i=ya(r).resolveInner(e,-1),a=n.reduce((o,s)=>Math.max(o,s.length),0);for(let o=0;o<5;o++){let s=r.sliceDoc(i.from,Math.min(i.to,i.from+t.length+a)),l=s.indexOf(t);if(!l||l>-1&&n.indexOf(s.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>t.length+l;){if(r.sliceDoc(c.to-t.length,c.to)==t)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function b5(r,e,t){let n=r.charCategorizer(e);if(n(r.sliceDoc(e-1,e))!=Nn.Word)return e;for(let i of t){let a=e-i.length;if(r.sliceDoc(a,e)==i&&n(r.sliceDoc(a-1,a))!=Nn.Word)return a}return-1}function Z2e(r={}){return[P2e,La,Pi.of(r),B2e,K2e,R2e]}const RY=[{key:"Ctrl-Space",run:m5},{mac:"Alt-`",run:m5},{key:"Escape",run:M2e},{key:"ArrowDown",run:Nb(!0)},{key:"ArrowUp",run:Nb(!1)},{key:"PageDown",run:Nb(!0,"page")},{key:"PageUp",run:Nb(!1,"page")},{key:"Enter",run:LY}],K2e=Vd.highest(tA.computeN([Pi],r=>r.facet(Pi).defaultKeymap?[RY]:[]));function X2e(r){let e=r.field(La,!1);return e&&e.active.some(t=>t.isPending)?"pending":e&&e.active.some(t=>t.state!=0)?"active":null}const Q2e=36,_5=1,J2e=2,ep=3,mD=4,eCe=5,tCe=6,rCe=7,nCe=8,iCe=9,aCe=10,oCe=11,sCe=12,lCe=13,uCe=14,cCe=15,fCe=16,hCe=17,w5=18,dCe=19,NY=20,zY=21,S5=22,pCe=23,gCe=24;function CM(r){return r>=65&&r<=90||r>=97&&r<=122||r>=48&&r<=57}function vCe(r){return r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70}function vh(r,e,t){for(let n=!1;;){if(r.next<0)return;if(r.next==e&&!n){r.advance();return}n=t&&!n&&r.next==92,r.advance()}}function mCe(r,e){e:for(;;){if(r.next<0)return;if(r.next==36){r.advance();for(let t=0;t)".charCodeAt(t);for(;;){if(r.next<0)return;if(r.next==n&&r.peek(1)==39){r.advance(2);return}r.advance()}}function AM(r,e){for(;!(r.next!=95&&!CM(r.next));)e!=null&&(e+=String.fromCharCode(r.next)),r.advance();return e}function bCe(r){if(r.next==39||r.next==34||r.next==96){let e=r.next;r.advance(),vh(r,e,!1)}else AM(r)}function C5(r,e){for(;r.next==48||r.next==49;)r.advance();e&&r.next==e&&r.advance()}function A5(r,e){for(;;){if(r.next==46){if(e)break;e=!0}else if(r.next<48||r.next>57)break;r.advance()}if(r.next==69||r.next==101)for(r.advance(),(r.next==43||r.next==45)&&r.advance();r.next>=48&&r.next<=57;)r.advance()}function x5(r){for(;!(r.next<0||r.next==10);)r.advance()}function Hf(r,e){for(let t=0;t!=&|~^/",specialVar:"?",identifierQuotes:'"',caseInsensitiveIdentifiers:!1,words:VY(GY,UY)};function _Ce(r,e,t,n){let i={};for(let a in xM)i[a]=(r.hasOwnProperty(a)?r:xM)[a];return e&&(i.words=VY(e,t||"",n)),i}function HY(r){return new i2e(e=>{var t;let{next:n}=e;if(e.advance(),Hf(n,yD)){for(;Hf(e.next,yD);)e.advance();e.acceptToken(Q2e)}else if(n==36&&r.doubleDollarQuotedStrings){let i=AM(e,"");e.next==36&&(e.advance(),mCe(e,i),e.acceptToken(ep))}else if(n==39||n==34&&r.doubleQuotedStrings)vh(e,n,r.backslashEscapes),e.acceptToken(ep);else if(n==35&&r.hashComments||n==47&&e.next==47&&r.slashComments)x5(e),e.acceptToken(_5);else if(n==45&&e.next==45&&(!r.spaceAfterDashes||e.peek(1)==32))x5(e),e.acceptToken(_5);else if(n==47&&e.next==42){e.advance();for(let i=1;;){let a=e.next;if(e.next<0)break;if(e.advance(),a==42&&e.next==47){if(i--,e.advance(),!i)break}else a==47&&e.next==42&&(i++,e.advance())}e.acceptToken(J2e)}else if((n==101||n==69)&&e.next==39)e.advance(),vh(e,39,!0),e.acceptToken(ep);else if((n==110||n==78)&&e.next==39&&r.charSetCasts)e.advance(),vh(e,39,r.backslashEscapes),e.acceptToken(ep);else if(n==95&&r.charSetCasts)for(let i=0;;i++){if(e.next==39&&i>1){e.advance(),vh(e,39,r.backslashEscapes),e.acceptToken(ep);break}if(!CM(e.next))break;e.advance()}else if(r.plsqlQuotingMechanism&&(n==113||n==81)&&e.next==39&&e.peek(1)>0&&!Hf(e.peek(1),yD)){let i=e.peek(1);e.advance(2),yCe(e,i),e.acceptToken(ep)}else if(n==40)e.acceptToken(rCe);else if(n==41)e.acceptToken(nCe);else if(n==123)e.acceptToken(iCe);else if(n==125)e.acceptToken(aCe);else if(n==91)e.acceptToken(oCe);else if(n==93)e.acceptToken(sCe);else if(n==59)e.acceptToken(lCe);else if(r.unquotedBitLiterals&&n==48&&e.next==98)e.advance(),C5(e),e.acceptToken(S5);else if((n==98||n==66)&&(e.next==39||e.next==34)){const i=e.next;e.advance(),r.treatBitsAsBytes?(vh(e,i,r.backslashEscapes),e.acceptToken(pCe)):(C5(e,i),e.acceptToken(S5))}else if(n==48&&(e.next==120||e.next==88)||(n==120||n==88)&&e.next==39){let i=e.next==39;for(e.advance();vCe(e.next);)e.advance();i&&e.next==39&&e.advance(),e.acceptToken(mD)}else if(n==46&&e.next>=48&&e.next<=57)A5(e,!0),e.acceptToken(mD);else if(n==46)e.acceptToken(uCe);else if(n>=48&&n<=57)A5(e,!1),e.acceptToken(mD);else if(Hf(n,r.operatorChars)){for(;Hf(e.next,r.operatorChars);)e.advance();e.acceptToken(cCe)}else if(Hf(n,r.specialVar))e.next==n&&e.advance(),bCe(e),e.acceptToken(hCe);else if(Hf(n,r.identifierQuotes))vh(e,n,!1),e.acceptToken(dCe);else if(n==58||n==44)e.acceptToken(fCe);else if(CM(n)){let i=AM(e,String.fromCharCode(n));e.acceptToken(e.next==46||e.peek(-i.length-1)==46?w5:(t=r.words[i.toLowerCase()])!==null&&t!==void 0?t:w5)}})}const WY=HY(xM),wCe=l2.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:"⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement",maxTerm:38,nodeProps:[["isolate",-4,1,2,3,19,""]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:"RORO",tokenizers:[0,WY],topRules:{Script:[0,25]},tokenPrec:0});function DM(r){let e=r.cursor().moveTo(r.from,-1);for(;/Comment/.test(e.name);)e.moveTo(e.from,-1);return e.node}function ky(r,e){let t=r.sliceString(e.from,e.to),n=/^([`'"])(.*)\1$/.exec(t);return n?n[2]:t}function f2(r){return r&&(r.name=="Identifier"||r.name=="QuotedIdentifier")}function SCe(r,e){if(e.name=="CompositeIdentifier"){let t=[];for(let n=e.firstChild;n;n=n.nextSibling)f2(n)&&t.push(ky(r,n));return t}return[ky(r,e)]}function D5(r,e){for(let t=[];;){if(!e||e.name!=".")return t;let n=DM(e);if(!f2(n))return t;t.unshift(ky(r,n)),e=DM(n)}}function CCe(r,e){let t=ya(r).resolveInner(e,-1),n=xCe(r.doc,t);return t.name=="Identifier"||t.name=="QuotedIdentifier"||t.name=="Keyword"?{from:t.from,quoted:t.name=="QuotedIdentifier"?r.doc.sliceString(t.from,t.from+1):null,parents:D5(r.doc,DM(t)),aliases:n}:t.name=="."?{from:e,quoted:null,parents:D5(r.doc,t),aliases:n}:{from:e,quoted:null,parents:[],empty:!0,aliases:n}}const ACe=new Set("where group having order union intersect except all distinct limit offset fetch for".split(" "));function xCe(r,e){let t;for(let i=e;!t;i=i.parent){if(!i)return null;i.name=="Statement"&&(t=i)}let n=null;for(let i=t.firstChild,a=!1,o=null;i;i=i.nextSibling){let s=i.name=="Keyword"?r.sliceString(i.from,i.to).toLowerCase():null,l=null;if(!a)a=s=="from";else if(s=="as"&&o&&f2(i.nextSibling))l=ky(r,i.nextSibling);else{if(s&&ACe.has(s))break;o&&f2(i)&&(l=ky(r,i))}l&&(n||(n=Object.create(null)),n[l]=SCe(r,o)),o=/Identifier$/.test(i.name)?i:null}return n}function DCe(r,e){return r?e.map(t=>Object.assign(Object.assign({},t),{label:t.label[0]==r?t.label:r+t.label+r,apply:void 0})):e}const ECe=/^\w*$/,kCe=/^[`'"]?\w*[`'"]?$/;function E5(r){return r.self&&typeof r.self.label=="string"}class lF{constructor(e,t){this.idQuote=e,this.idCaseInsensitive=t,this.list=[],this.children=void 0}child(e){let t=this.children||(this.children=Object.create(null)),n=t[e];return n||(e&&!this.list.some(i=>i.label==e)&&this.list.push(k5(e,"type",this.idQuote,this.idCaseInsensitive)),t[e]=new lF(this.idQuote,this.idCaseInsensitive))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let t=this.list.findIndex(n=>n.label==e.label);t>-1?this.list[t]=e:this.list.push(e)}addCompletions(e){for(let t of e)this.addCompletion(typeof t=="string"?k5(t,"property",this.idQuote,this.idCaseInsensitive):t)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):E5(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let t of Object.keys(e)){let n=e[t],i=null,a=t.replace(/\\?\./g,s=>s=="."?"\0":s).split("\0"),o=this;E5(n)&&(i=n.self,n=n.children);for(let s=0;s{let{parents:f,from:h,quoted:d,empty:p,aliases:g}=CCe(c.state,c.pos);if(p&&!c.explicit)return null;g&&f.length==1&&(f=g[f[0]]||f);let v=l;for(let b of f){for(;!v.children||!v.children[b];)if(v==l&&u)v=u;else if(v==u&&n)v=v.child(n);else return null;let _=v.maybeChild(b);if(!_)return null;v=_}let m=d&&c.state.sliceDoc(c.pos,c.pos+1)==d,y=v.list;return v==l&&g&&(y=y.concat(Object.keys(g).map(b=>({label:b,type:"constant"})))),{from:h,to:m?c.pos+1:void 0,options:DCe(d,y),validFor:d?kCe:ECe}}}function MCe(r){return r==zY?"type":r==NY?"keyword":"variable"}function ICe(r,e,t){let n=Object.keys(r).map(i=>t(e?i.toUpperCase():i,MCe(r[i])));return d2e(["QuotedIdentifier","SpecialVar","String","LineComment","BlockComment","."],EY(n))}let LCe=wCe.configure({props:[cY.add({Statement:ASe()}),hY.add({Statement(r,e){return{from:Math.min(r.from+100,e.doc.lineAt(r.from).to),to:r.to}},BlockComment(r){return{from:r.from+2,to:r.to-2}}}),oY({Keyword:O.keyword,Type:O.typeName,Builtin:O.standard(O.name),Bits:O.number,Bytes:O.string,Bool:O.bool,Null:O.null,Number:O.number,String:O.string,Identifier:O.name,QuotedIdentifier:O.special(O.string),SpecialVar:O.special(O.name),LineComment:O.lineComment,BlockComment:O.blockComment,Operator:O.operator,"Semi Punctuation":O.punctuation,"( )":O.paren,"{ }":O.brace,"[ ]":O.squareBracket})]});class oA{constructor(e,t,n){this.dialect=e,this.language=t,this.spec=n}get extension(){return this.language.extension}static define(e){let t=_Ce(e,e.keywords,e.types,e.builtin),n=n2.define({name:"sql",parser:LCe.configure({tokenizers:[{from:WY,to:HY(t)}]}),languageData:{commentTokens:{line:"--",block:{open:"/*",close:"*/"}},closeBrackets:{brackets:["(","[","{","'",'"',"`"]}}});return new oA(t,n,e)}}function FCe(r,e){return{label:r,type:e,boost:-1}}function BCe(r,e=!1,t){return ICe(r.dialect.words,e,t||FCe)}function OCe(r){return r.schema?TCe(r.schema,r.tables,r.schemas,r.defaultTable,r.defaultSchema,r.dialect||uF):()=>null}function PCe(r){return r.schema?(r.dialect||uF).language.data.of({autocomplete:OCe(r)}):[]}function RCe(r={}){let e=r.dialect||uF;return new gSe(e.language,[PCe(r),e.language.data.of({autocomplete:BCe(e,r.upperCaseKeywords,r.keywordCompletion)})])}const uF=oA.define({}),NCe=oA.define({charSetCasts:!0,doubleDollarQuotedStrings:!0,operatorChars:"+-*/<>=~!@#%^&|`?",specialVar:"",keywords:GY+"abort abs absent access according ada admin aggregate alias also always analyse analyze array_agg array_max_cardinality asensitive assert assignment asymmetric atomic attach attribute attributes avg backward base64 begin_frame begin_partition bernoulli bit_length blocked bom cache called cardinality catalog_name ceil ceiling chain char_length character_length character_set_catalog character_set_name character_set_schema characteristics characters checkpoint class class_origin cluster coalesce cobol collation_catalog collation_name collation_schema collect column_name columns command_function command_function_code comment comments committed concurrently condition_number configuration conflict connection_name constant constraint_catalog constraint_name constraint_schema contains content control conversion convert copy corr cost covar_pop covar_samp csv cume_dist current_catalog current_row current_schema cursor_name database datalink datatype datetime_interval_code datetime_interval_precision db debug defaults defined definer degree delimiter delimiters dense_rank depends derived detach detail dictionary disable discard dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue document dump dynamic_function dynamic_function_code element elsif empty enable encoding encrypted end_frame end_partition endexec enforced enum errcode error event every exclude excluding exclusive exp explain expression extension extract family file filter final first_value flag floor following force foreach fortran forward frame_row freeze fs functions fusion generated granted greatest groups handler header hex hierarchy hint id ignore ilike immediately immutable implementation implicit import include including increment indent index indexes info inherit inherits inline insensitive instance instantiable instead integrity intersection invoker isnull key_member key_type label lag last_value lead leakproof least length library like_regex link listen ln load location lock locked log logged lower mapping matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text min minvalue mod mode more move multiset mumps name namespace nfc nfd nfkc nfkd nil normalize normalized nothing notice notify notnull nowait nth_value ntile nullable nullif nulls number occurrences_regex octet_length octets off offset oids operator options ordering others over overlay overriding owned owner parallel parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partition pascal passing passthrough password percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding prepared print_strict_params procedural procedures program publication query quote raise range rank reassign recheck recovery refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex rename repeatable replace replica requiring reset respect restart restore result_oid returned_cardinality returned_length returned_octet_length returned_sqlstate returning reverse routine_catalog routine_name routine_schema routines row_count row_number rowtype rule scale schema_name schemas scope scope_catalog scope_name scope_schema security selective self sensitive sequence sequences serializable server server_name setof share show simple skip slice snapshot source specific_name sqlcode sqlerror sqrt stable stacked standalone statement statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time table_name tables tablesample tablespace temp template ties token top_level_count transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex trigger_catalog trigger_name trigger_schema trim trim_array truncate trusted type types uescape unbounded uncommitted unencrypted unlink unlisten unlogged unnamed untyped upper uri use_column use_variable user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema vacuum valid validate validator value_of var_pop var_samp varbinary variable_conflict variadic verbose version versioning views volatile warning whitespace width_bucket window within wrapper xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate yes",types:UY+"bigint int8 bigserial serial8 varbit bool box bytea cidr circle precision float8 inet int4 json jsonb line lseg macaddr macaddr8 money numeric pg_lsn point polygon float4 int2 smallserial serial2 serial serial4 text timetz timestamptz tsquery tsvector txid_snapshot uuid xml"}),zCe=r=>{let{state:e}=r,t=e.doc.lineAt(e.selection.main.from),n=fF(r.state,t.from);return n.line?VCe(r):n.block?GCe(r):!1};function cF(r,e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let i=r(e,t);return i?(n(t.update(i)),!0):!1}}const VCe=cF($Ce,0),UCe=cF($Y,0),GCe=cF((r,e)=>$Y(r,e,WCe(e)),0);function fF(r,e){let t=r.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const um=50;function HCe(r,{open:e,close:t},n,i){let a=r.sliceDoc(n-um,n),o=r.sliceDoc(i,i+um),s=/\s*$/.exec(a)[0].length,l=/^\s*/.exec(o)[0].length,u=a.length-s;if(a.slice(u-e.length,u)==e&&o.slice(l,l+t.length)==t)return{open:{pos:n-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let c,f;i-n<=2*um?c=f=r.sliceDoc(n,i):(c=r.sliceDoc(n,n+um),f=r.sliceDoc(i-um,i));let h=/^\s*/.exec(c)[0].length,d=/\s*$/.exec(f)[0].length,p=f.length-d-t.length;return c.slice(h,h+e.length)==e&&f.slice(p,p+t.length)==t?{open:{pos:n+h+e.length,margin:/\s/.test(c.charAt(h+e.length))?1:0},close:{pos:i-d-t.length,margin:/\s/.test(f.charAt(p-1))?1:0}}:null}function WCe(r){let e=[];for(let t of r.selection.ranges){let n=r.doc.lineAt(t.from),i=t.to<=n.to?n:r.doc.lineAt(t.to);i.from>n.from&&i.from==t.to&&(i=t.to==n.to+1?n:r.doc.lineAt(t.to-1));let a=e.length-1;a>=0&&e[a].to>n.from?e[a].to=i.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:i.to})}return e}function $Y(r,e,t=e.selection.ranges){let n=t.map(a=>fF(e,a.from).block);if(!n.every(a=>a))return null;let i=t.map((a,o)=>HCe(e,n[o],a.from,a.to));if(r!=2&&!i.every(a=>a))return{changes:e.changes(t.map((a,o)=>i[o]?[]:[{from:a.from,insert:n[o].open+" "},{from:a.to,insert:" "+n[o].close}]))};if(r!=1&&i.some(a=>a)){let a=[];for(let o=0,s;oi&&(a==o||o>f.from)){i=f.from;let h=/^\s*/.exec(f.text)[0].length,d=h==f.length,p=f.text.slice(h,h+u.length)==u?h:-1;ha.comment<0&&(!a.empty||a.single))){let a=[];for(let{line:s,token:l,indent:u,empty:c,single:f}of n)(f||!c)&&a.push({from:s.from+u,insert:l+" "});let o=e.changes(a);return{changes:o,selection:e.selection.map(o,1)}}else if(r!=1&&n.some(a=>a.comment>=0)){let a=[];for(let{line:o,comment:s,token:l}of n)if(s>=0){let u=o.from+s,c=u+l.length;o.text[c-o.from]==" "&&c++,a.push({from:u,to:c})}return{changes:a}}return null}const EM=rc.define(),jCe=rc.define(),qCe=Et.define(),jY=Et.define({combine(r){return Bf(r,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,i)=>e(n,i)||t(n,i)})}}),qY=ra.define({create(){return Il.empty},update(r,e){let t=e.state.facet(jY),n=e.annotation(EM);if(n){let l=so.fromTransaction(e,n.selection),u=n.side,c=u==0?r.undone:r.done;return l?c=h2(c,c.length,t.minDepth,l):c=KY(c,e.startState.selection),new Il(u==0?n.rest:c,u==0?c:n.rest)}let i=e.annotation(jCe);if((i=="full"||i=="before")&&(r=r.isolate()),e.annotation(Ci.addToHistory)===!1)return e.changes.empty?r:r.addMapping(e.changes.desc);let a=so.fromTransaction(e),o=e.annotation(Ci.time),s=e.annotation(Ci.userEvent);return a?r=r.addChanges(a,o,s,t,e):e.selection&&(r=r.addSelection(e.startState.selection,o,s,t.newGroupDelay)),(i=="full"||i=="after")&&(r=r.isolate()),r},toJSON(r){return{done:r.done.map(e=>e.toJSON()),undone:r.undone.map(e=>e.toJSON())}},fromJSON(r){return new Il(r.done.map(so.fromJSON),r.undone.map(so.fromJSON))}});function YCe(r={}){return[qY,jY.of(r),St.domEventHandlers({beforeinput(e,t){let n=e.inputType=="historyUndo"?YY:e.inputType=="historyRedo"?kM:null;return n?(e.preventDefault(),n(t)):!1}})]}function sA(r,e){return function({state:t,dispatch:n}){if(!e&&t.readOnly)return!1;let i=t.field(qY,!1);if(!i)return!1;let a=i.pop(r,t,e);return a?(n(a),!0):!1}}const YY=sA(0,!1),kM=sA(1,!1),ZCe=sA(0,!0),KCe=sA(1,!0);class so{constructor(e,t,n,i,a){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=i,this.selectionsAfter=a}setSelAfter(e){return new so(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new so(e.changes&&_i.fromJSON(e.changes),[],e.mapped&&Nl.fromJSON(e.mapped),e.startSelection&&We.fromJSON(e.startSelection),e.selectionsAfter.map(We.fromJSON))}static fromTransaction(e,t){let n=is;for(let i of e.startState.facet(qCe)){let a=i(e);a.length&&(n=n.concat(a))}return!n.length&&e.changes.empty?null:new so(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,is)}static selection(e){return new so(void 0,is,void 0,void 0,e)}}function h2(r,e,t,n){let i=e+1>t+20?e-t-1:0,a=r.slice(i,e);return a.push(n),a}function XCe(r,e){let t=[],n=!1;return r.iterChangedRanges((i,a)=>t.push(i,a)),e.iterChangedRanges((i,a,o,s)=>{for(let l=0;l=u&&o<=c&&(n=!0)}}),n}function QCe(r,e){return r.ranges.length==e.ranges.length&&r.ranges.filter((t,n)=>t.empty!=e.ranges[n].empty).length===0}function ZY(r,e){return r.length?e.length?r.concat(e):r:e}const is=[],JCe=200;function KY(r,e){if(r.length){let t=r[r.length-1],n=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-JCe));return n.length&&n[n.length-1].eq(e)?r:(n.push(e),h2(r,r.length-1,1e9,t.setSelAfter(n)))}else return[so.selection([e])]}function eAe(r){let e=r[r.length-1],t=r.slice();return t[r.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function bD(r,e){if(!r.length)return r;let t=r.length,n=is;for(;t;){let i=tAe(r[t-1],e,n);if(i.changes&&!i.changes.empty||i.effects.length){let a=r.slice(0,t);return a[t-1]=i,a}else e=i.mapped,t--,n=i.selectionsAfter}return n.length?[so.selection(n)]:is}function tAe(r,e,t){let n=ZY(r.selectionsAfter.length?r.selectionsAfter.map(s=>s.map(e)):is,t);if(!r.changes)return so.selection(n);let i=r.changes.map(e),a=e.mapDesc(r.changes,!0),o=r.mapped?r.mapped.composeDesc(a):a;return new so(i,Dr.mapEffects(r.effects,e),o,r.startSelection.map(a),n)}const rAe=/^(input\.type|delete)($|\.)/;class Il{constructor(e,t,n=0,i=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=i}isolate(){return this.prevTime?new Il(this.done,this.undone):this}addChanges(e,t,n,i,a){let o=this.done,s=o[o.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!n||rAe.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime0&&t-this.prevTimet.empty?r.moveByChar(t,e):lA(t,e))}function wa(r){return r.textDirectionAt(r.state.selection.main.head)==zn.LTR}const QY=r=>XY(r,!wa(r)),JY=r=>XY(r,wa(r));function eZ(r,e){return Qs(r,t=>t.empty?r.moveByGroup(t,e):lA(t,e))}const iAe=r=>eZ(r,!wa(r)),aAe=r=>eZ(r,wa(r));function oAe(r,e,t){if(e.type.prop(t))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(r.sliceDoc(e.from,e.to)))||e.firstChild}function uA(r,e,t){let n=ya(r).resolveInner(e.head),i=t?Hr.closedBy:Hr.openedBy;for(let l=e.head;;){let u=t?n.childAfter(l):n.childBefore(l);if(!u)break;oAe(r,u,i)?n=u:l=t?u.to:u.from}let a=n.type.prop(i),o,s;return a&&(o=t?Ml(r,n.from,1):Ml(r,n.to,-1))&&o.matched?s=t?o.end.to:o.end.from:s=t?n.to:n.from,We.cursor(s,t?-1:1)}const sAe=r=>Qs(r,e=>uA(r.state,e,!wa(r))),lAe=r=>Qs(r,e=>uA(r.state,e,wa(r)));function tZ(r,e){return Qs(r,t=>{if(!t.empty)return lA(t,e);let n=r.moveVertically(t,e);return n.head!=t.head?n:r.moveToLineBoundary(t,e)})}const rZ=r=>tZ(r,!1),nZ=r=>tZ(r,!0);function iZ(r){let e=r.scrollDOM.clientHeighto.empty?r.moveVertically(o,e,t.height):lA(o,e));if(i.eq(n.selection))return!1;let a;if(t.selfScroll){let o=r.coordsAtPos(n.selection.main.head),s=r.scrollDOM.getBoundingClientRect(),l=s.top+t.marginTop,u=s.bottom-t.marginBottom;o&&o.top>l&&o.bottomaZ(r,!1),TM=r=>aZ(r,!0);function Of(r,e,t){let n=r.lineBlockAt(e.head),i=r.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?n.to:n.from)&&(i=r.moveToLineBoundary(e,t,!1)),!t&&i.head==n.from&&n.length){let a=/^\s*/.exec(r.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;a&&e.head!=n.from+a&&(i=We.cursor(n.from+a))}return i}const uAe=r=>Qs(r,e=>Of(r,e,!0)),cAe=r=>Qs(r,e=>Of(r,e,!1)),fAe=r=>Qs(r,e=>Of(r,e,!wa(r))),hAe=r=>Qs(r,e=>Of(r,e,wa(r))),dAe=r=>Qs(r,e=>We.cursor(r.lineBlockAt(e.head).from,1)),pAe=r=>Qs(r,e=>We.cursor(r.lineBlockAt(e.head).to,-1));function gAe(r,e,t){let n=!1,i=Av(r.selection,a=>{let o=Ml(r,a.head,-1)||Ml(r,a.head,1)||a.head>0&&Ml(r,a.head-1,1)||a.headgAe(r,e);function gs(r,e){let t=Av(r.state.selection,n=>{let i=e(n);return We.range(n.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return t.eq(r.state.selection)?!1:(r.dispatch(nu(r.state,t)),!0)}function oZ(r,e){return gs(r,t=>r.moveByChar(t,e))}const sZ=r=>oZ(r,!wa(r)),lZ=r=>oZ(r,wa(r));function uZ(r,e){return gs(r,t=>r.moveByGroup(t,e))}const mAe=r=>uZ(r,!wa(r)),yAe=r=>uZ(r,wa(r)),bAe=r=>gs(r,e=>uA(r.state,e,!wa(r))),_Ae=r=>gs(r,e=>uA(r.state,e,wa(r)));function cZ(r,e){return gs(r,t=>r.moveVertically(t,e))}const fZ=r=>cZ(r,!1),hZ=r=>cZ(r,!0);function dZ(r,e){return gs(r,t=>r.moveVertically(t,e,iZ(r).height))}const M5=r=>dZ(r,!1),I5=r=>dZ(r,!0),wAe=r=>gs(r,e=>Of(r,e,!0)),SAe=r=>gs(r,e=>Of(r,e,!1)),CAe=r=>gs(r,e=>Of(r,e,!wa(r))),AAe=r=>gs(r,e=>Of(r,e,wa(r))),xAe=r=>gs(r,e=>We.cursor(r.lineBlockAt(e.head).from)),DAe=r=>gs(r,e=>We.cursor(r.lineBlockAt(e.head).to)),L5=({state:r,dispatch:e})=>(e(nu(r,{anchor:0})),!0),F5=({state:r,dispatch:e})=>(e(nu(r,{anchor:r.doc.length})),!0),B5=({state:r,dispatch:e})=>(e(nu(r,{anchor:r.selection.main.anchor,head:0})),!0),O5=({state:r,dispatch:e})=>(e(nu(r,{anchor:r.selection.main.anchor,head:r.doc.length})),!0),EAe=({state:r,dispatch:e})=>(e(r.update({selection:{anchor:0,head:r.doc.length},userEvent:"select"})),!0),kAe=({state:r,dispatch:e})=>{let t=cA(r).map(({from:n,to:i})=>We.range(n,Math.min(i+1,r.doc.length)));return e(r.update({selection:We.create(t),userEvent:"select"})),!0},TAe=({state:r,dispatch:e})=>{let t=Av(r.selection,n=>{let i=ya(r),a=i.resolveStack(n.from,1);if(n.empty){let o=i.resolveStack(n.from,-1);o.node.from>=a.node.from&&o.node.to<=a.node.to&&(a=o)}for(let o=a;o;o=o.next){let{node:s}=o;if((s.from=n.to||s.to>n.to&&s.from<=n.from)&&o.next)return We.range(s.to,s.from)}return n});return t.eq(r.selection)?!1:(e(nu(r,t)),!0)},MAe=({state:r,dispatch:e})=>{let t=r.selection,n=null;return t.ranges.length>1?n=We.create([t.main]):t.main.empty||(n=We.create([We.cursor(t.main.head)])),n?(e(nu(r,n)),!0):!1};function F1(r,e){if(r.state.readOnly)return!1;let t="delete.selection",{state:n}=r,i=n.changeByRange(a=>{let{from:o,to:s}=a;if(o==s){let l=e(a);lo&&(t="delete.forward",l=zb(r,l,!0)),o=Math.min(o,l),s=Math.max(s,l)}else o=zb(r,o,!1),s=zb(r,s,!0);return o==s?{range:a}:{changes:{from:o,to:s},range:We.cursor(o,oi(r)))n.between(e,e,(i,a)=>{ie&&(e=t?a:i)});return e}const pZ=(r,e,t)=>F1(r,n=>{let i=n.from,{state:a}=r,o=a.doc.lineAt(i),s,l;if(t&&!e&&i>o.from&&ipZ(r,!1,!0),gZ=r=>pZ(r,!0,!1),vZ=(r,e)=>F1(r,t=>{let n=t.head,{state:i}=r,a=i.doc.lineAt(n),o=i.charCategorizer(n);for(let s=null;;){if(n==(e?a.to:a.from)){n==t.head&&a.number!=(e?i.doc.lines:1)&&(n+=e?1:-1);break}let l=Xi(a.text,n-a.from,e)+a.from,u=a.text.slice(Math.min(n,l)-a.from,Math.max(n,l)-a.from),c=o(u);if(s!=null&&c!=s)break;(u!=" "||n!=t.head)&&(s=c),n=l}return n}),mZ=r=>vZ(r,!1),IAe=r=>vZ(r,!0),LAe=r=>F1(r,e=>{let t=r.lineBlockAt(e.head).to;return e.headF1(r,e=>{let t=r.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),BAe=r=>F1(r,e=>{let t=r.moveToLineBoundary(e,!0).head;return e.head{if(r.readOnly)return!1;let t=r.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:tn.of(["",""])},range:We.cursor(n.from)}));return e(r.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},PAe=({state:r,dispatch:e})=>{if(r.readOnly)return!1;let t=r.changeByRange(n=>{if(!n.empty||n.from==0||n.from==r.doc.length)return{range:n};let i=n.from,a=r.doc.lineAt(i),o=i==a.from?i-1:Xi(a.text,i-a.from,!1)+a.from,s=i==a.to?i+1:Xi(a.text,i-a.from,!0)+a.from;return{changes:{from:o,to:s,insert:r.doc.slice(i,s).append(r.doc.slice(o,i))},range:We.cursor(s)}});return t.changes.empty?!1:(e(r.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function cA(r){let e=[],t=-1;for(let n of r.selection.ranges){let i=r.doc.lineAt(n.from),a=r.doc.lineAt(n.to);if(!n.empty&&n.to==a.from&&(a=r.doc.lineAt(n.to-1)),t>=i.number){let o=e[e.length-1];o.to=a.to,o.ranges.push(n)}else e.push({from:i.from,to:a.to,ranges:[n]});t=a.number+1}return e}function yZ(r,e,t){if(r.readOnly)return!1;let n=[],i=[];for(let a of cA(r)){if(t?a.to==r.doc.length:a.from==0)continue;let o=r.doc.lineAt(t?a.to+1:a.from-1),s=o.length+1;if(t){n.push({from:a.to,to:o.to},{from:a.from,insert:o.text+r.lineBreak});for(let l of a.ranges)i.push(We.range(Math.min(r.doc.length,l.anchor+s),Math.min(r.doc.length,l.head+s)))}else{n.push({from:o.from,to:a.from},{from:a.to,insert:r.lineBreak+o.text});for(let l of a.ranges)i.push(We.range(l.anchor-s,l.head-s))}}return n.length?(e(r.update({changes:n,scrollIntoView:!0,selection:We.create(i,r.selection.mainIndex),userEvent:"move.line"})),!0):!1}const RAe=({state:r,dispatch:e})=>yZ(r,e,!1),NAe=({state:r,dispatch:e})=>yZ(r,e,!0);function bZ(r,e,t){if(r.readOnly)return!1;let n=[];for(let i of cA(r))t?n.push({from:i.from,insert:r.doc.slice(i.from,i.to)+r.lineBreak}):n.push({from:i.to,insert:r.lineBreak+r.doc.slice(i.from,i.to)});return e(r.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const zAe=({state:r,dispatch:e})=>bZ(r,e,!1),VAe=({state:r,dispatch:e})=>bZ(r,e,!0),UAe=r=>{if(r.state.readOnly)return!1;let{state:e}=r,t=e.changes(cA(e).map(({from:i,to:a})=>(i>0?i--:a{let a;if(r.lineWrapping){let o=r.lineBlockAt(i.head),s=r.coordsAtPos(i.head,i.assoc||1);s&&(a=o.bottom+r.documentTop-s.bottom+r.defaultLineHeight/2)}return r.moveVertically(i,!0,a)}).map(t);return r.dispatch({changes:t,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function GAe(r,e){if(/\(\)|\[\]|\{\}/.test(r.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ya(r).resolveInner(e),n=t.childBefore(e),i=t.childAfter(e),a;return n&&i&&n.to<=e&&i.from>=e&&(a=n.type.prop(Hr.closedBy))&&a.indexOf(i.name)>-1&&r.doc.lineAt(n.to).from==r.doc.lineAt(i.from).from&&!/\S/.test(r.sliceDoc(n.to,i.from))?{from:n.to,to:i.from}:null}const P5=_Z(!1),HAe=_Z(!0);function _Z(r){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(i=>{let{from:a,to:o}=i,s=e.doc.lineAt(a),l=!r&&a==o&&GAe(e,a);r&&(a=o=(o<=s.to?s:e.doc.lineAt(o)).to);let u=new nA(e,{simulateBreak:a,simulateDoubleBreak:!!l}),c=rF(u,a);for(c==null&&(c=XC(/^\s*/.exec(e.doc.lineAt(a).text)[0],e.tabSize));os.from&&a{let i=[];for(let o=n.from;o<=n.to;){let s=r.doc.lineAt(o);s.number>t&&(n.empty||n.to>s.from)&&(e(s,i,n),t=s.number),o=s.to+1}let a=r.changes(i);return{changes:i,range:We.range(a.mapPos(n.anchor,1),a.mapPos(n.head,1))}})}const WAe=({state:r,dispatch:e})=>{if(r.readOnly)return!1;let t=Object.create(null),n=new nA(r,{overrideIndentation:a=>{let o=t[a];return o??-1}}),i=hF(r,(a,o,s)=>{let l=rF(n,a.from);if(l==null)return;/\S/.test(a.text)||(l=0);let u=/^\s*/.exec(a.text)[0],c=xy(r,l);(u!=c||s.fromr.readOnly?!1:(e(r.update(hF(r,(t,n)=>{n.push({from:t.from,insert:r.facet(tF)})}),{userEvent:"input.indent"})),!0),jAe=({state:r,dispatch:e})=>r.readOnly?!1:(e(r.update(hF(r,(t,n)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let a=XC(i,r.tabSize),o=0,s=xy(r,Math.max(0,a-a2(r)));for(;o(r.setTabFocusMode(),!0),YAe=[{key:"Ctrl-b",run:QY,shift:sZ,preventDefault:!0},{key:"Ctrl-f",run:JY,shift:lZ},{key:"Ctrl-p",run:rZ,shift:fZ},{key:"Ctrl-n",run:nZ,shift:hZ},{key:"Ctrl-a",run:dAe,shift:xAe},{key:"Ctrl-e",run:pAe,shift:DAe},{key:"Ctrl-d",run:gZ},{key:"Ctrl-h",run:MM},{key:"Ctrl-k",run:LAe},{key:"Ctrl-Alt-h",run:mZ},{key:"Ctrl-o",run:OAe},{key:"Ctrl-t",run:PAe},{key:"Ctrl-v",run:TM}],ZAe=[{key:"ArrowLeft",run:QY,shift:sZ,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:iAe,shift:mAe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:fAe,shift:CAe,preventDefault:!0},{key:"ArrowRight",run:JY,shift:lZ,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:aAe,shift:yAe,preventDefault:!0},{mac:"Cmd-ArrowRight",run:hAe,shift:AAe,preventDefault:!0},{key:"ArrowUp",run:rZ,shift:fZ,preventDefault:!0},{mac:"Cmd-ArrowUp",run:L5,shift:B5},{mac:"Ctrl-ArrowUp",run:T5,shift:M5},{key:"ArrowDown",run:nZ,shift:hZ,preventDefault:!0},{mac:"Cmd-ArrowDown",run:F5,shift:O5},{mac:"Ctrl-ArrowDown",run:TM,shift:I5},{key:"PageUp",run:T5,shift:M5},{key:"PageDown",run:TM,shift:I5},{key:"Home",run:cAe,shift:SAe,preventDefault:!0},{key:"Mod-Home",run:L5,shift:B5},{key:"End",run:uAe,shift:wAe,preventDefault:!0},{key:"Mod-End",run:F5,shift:O5},{key:"Enter",run:P5,shift:P5},{key:"Mod-a",run:EAe},{key:"Backspace",run:MM,shift:MM},{key:"Delete",run:gZ},{key:"Mod-Backspace",mac:"Alt-Backspace",run:mZ},{key:"Mod-Delete",mac:"Alt-Delete",run:IAe},{mac:"Mod-Backspace",run:FAe},{mac:"Mod-Delete",run:BAe}].concat(YAe.map(r=>({mac:r.key,run:r.run,shift:r.shift}))),KAe=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:sAe,shift:bAe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:lAe,shift:_Ae},{key:"Alt-ArrowUp",run:RAe},{key:"Shift-Alt-ArrowUp",run:zAe},{key:"Alt-ArrowDown",run:NAe},{key:"Shift-Alt-ArrowDown",run:VAe},{key:"Escape",run:MAe},{key:"Mod-Enter",run:HAe},{key:"Alt-l",mac:"Ctrl-l",run:kAe},{key:"Mod-i",run:TAe,preventDefault:!0},{key:"Mod-[",run:jAe},{key:"Mod-]",run:$Ae},{key:"Mod-Alt-\\",run:WAe},{key:"Shift-Mod-k",run:UAe},{key:"Shift-Mod-\\",run:vAe},{key:"Mod-/",run:zCe},{key:"Alt-A",run:UCe},{key:"Ctrl-m",mac:"Shift-Alt-m",run:qAe}].concat(ZAe);function Tn(){var r=arguments[0];typeof r=="string"&&(r=document.createElement(r));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=t[n];typeof i=="string"?r.setAttribute(n,i):i!=null&&(r[n]=i)}e++}for(;er.normalize("NFKD"):r=>r;class Xg{constructor(e,t,n=0,i=e.length,a,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,i),this.bufferStart=n,this.normalize=a?s=>a(R5(s)):R5,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return fa(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=zL(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=es(e);let i=this.normalize(t);if(i.length)for(let a=0,o=n;;a++){let s=i.charCodeAt(a),l=this.match(s,o,this.bufferPos+this.bufferStart);if(a==i.length-1){if(l)return this.value=l,this;break}o==n&&athis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,i=n+t[0].length;if(this.matchPos=d2(this.text,i+(n==i?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=n||i.to<=t){let s=new pg(t,e.sliceString(t,n));return _D.set(e,s),s}if(i.from==t&&i.to==n)return i;let{text:a,from:o}=i;return o>t&&(a=e.sliceString(t,o)+a,o=t),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let n=this.flat.from+t.index,i=n+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,i,t)))return this.value={from:n,to:i,match:t},this.matchPos=d2(this.text,i+(n==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=pg.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(CZ.prototype[Symbol.iterator]=AZ.prototype[Symbol.iterator]=function(){return this});function XAe(r){try{return new RegExp(r,dF),!0}catch{return!1}}function d2(r,e){if(e>=r.length)return e;let t=r.lineAt(e),n;for(;e=56320&&n<57344;)e++;return e}function IM(r){let e=String(r.state.doc.lineAt(r.state.selection.main.head).number),t=Tn("input",{class:"cm-textfield",name:"line",value:e}),n=Tn("form",{class:"cm-gotoLine",onkeydown:a=>{a.keyCode==27?(a.preventDefault(),r.dispatch({effects:p2.of(!1)}),r.focus()):a.keyCode==13&&(a.preventDefault(),i())},onsubmit:a=>{a.preventDefault(),i()}},Tn("label",r.state.phrase("Go to line"),": ",t)," ",Tn("button",{class:"cm-button",type:"submit"},r.state.phrase("go")));function i(){let a=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!a)return;let{state:o}=r,s=o.doc.lineAt(o.selection.main.head),[,l,u,c,f]=a,h=c?+c.slice(1):0,d=u?+u:s.number;if(u&&f){let v=d/100;l&&(v=v*(l=="-"?-1:1)+s.number/o.doc.lines),d=Math.round(o.doc.lines*v)}else u&&l&&(d=d*(l=="-"?-1:1)+s.number);let p=o.doc.line(Math.max(1,Math.min(o.doc.lines,d))),g=We.cursor(p.from+Math.max(0,Math.min(h,p.length)));r.dispatch({effects:[p2.of(!1),St.scrollIntoView(g.from,{y:"center"})],selection:g}),r.focus()}return{dom:n}}const p2=Dr.define(),N5=ra.define({create(){return!0},update(r,e){for(let t of e.effects)t.is(p2)&&(r=t.value);return r},provide:r=>Ay.from(r,e=>e?IM:null)}),QAe=r=>{let e=Cy(r,IM);if(!e){let t=[p2.of(!0)];r.state.field(N5,!1)==null&&t.push(Dr.appendConfig.of([N5,JAe])),r.dispatch({effects:t}),e=Cy(r,IM)}return e&&e.dom.querySelector("input").select(),!0},JAe=St.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),exe={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},txe=Et.define({combine(r){return Bf(r,exe,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function rxe(r){return[sxe,oxe]}const nxe=hr.mark({class:"cm-selectionMatch"}),ixe=hr.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function z5(r,e,t,n){return(t==0||r(e.sliceDoc(t-1,t))!=Nn.Word)&&(n==e.doc.length||r(e.sliceDoc(n,n+1))!=Nn.Word)}function axe(r,e,t,n){return r(e.sliceDoc(t,t+1))==Nn.Word&&r(e.sliceDoc(n-1,n))==Nn.Word}const oxe=Ua.fromClass(class{constructor(r){this.decorations=this.getDeco(r)}update(r){(r.selectionSet||r.docChanged||r.viewportChanged)&&(this.decorations=this.getDeco(r.view))}getDeco(r){let e=r.state.facet(txe),{state:t}=r,n=t.selection;if(n.ranges.length>1)return hr.none;let i=n.main,a,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return hr.none;let l=t.wordAt(i.head);if(!l)return hr.none;o=t.charCategorizer(i.head),a=t.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return hr.none;if(e.wholeWords){if(a=t.sliceDoc(i.from,i.to),o=t.charCategorizer(i.head),!(z5(o,t,i.from,i.to)&&axe(o,t,i.from,i.to)))return hr.none}else if(a=t.sliceDoc(i.from,i.to),!a)return hr.none}let s=[];for(let l of r.visibleRanges){let u=new Xg(t.doc,a,l.from,l.to);for(;!u.next().done;){let{from:c,to:f}=u.value;if((!o||z5(o,t,c,f))&&(i.empty&&c<=i.from&&f>=i.to?s.push(ixe.range(c,f)):(c>=i.to||f<=i.from)&&s.push(nxe.range(c,f)),s.length>e.maxMatches))return hr.none}}return hr.set(s)}},{decorations:r=>r.decorations}),sxe=St.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),lxe=({state:r,dispatch:e})=>{let{selection:t}=r,n=We.create(t.ranges.map(i=>r.wordAt(i.head)||We.cursor(i.head)),t.mainIndex);return n.eq(t)?!1:(e(r.update({selection:n})),!0)};function uxe(r,e){let{main:t,ranges:n}=r.selection,i=r.wordAt(t.head),a=i&&i.from==t.from&&i.to==t.to;for(let o=!1,s=new Xg(r.doc,e,n[n.length-1].to);;)if(s.next(),s.done){if(o)return null;s=new Xg(r.doc,e,0,Math.max(0,n[n.length-1].from-1)),o=!0}else{if(o&&n.some(l=>l.from==s.value.from))continue;if(a){let l=r.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const cxe=({state:r,dispatch:e})=>{let{ranges:t}=r.selection;if(t.some(a=>a.from===a.to))return lxe({state:r,dispatch:e});let n=r.sliceDoc(t[0].from,t[0].to);if(r.selection.ranges.some(a=>r.sliceDoc(a.from,a.to)!=n))return!1;let i=uxe(r,n);return i?(e(r.update({selection:r.selection.addRange(We.range(i.from,i.to),!1),effects:St.scrollIntoView(i.to)})),!0):!1},xv=Et.define({combine(r){return Bf(r,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Sxe(e),scrollToMatch:e=>St.scrollIntoView(e)})}});class xZ{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||XAe(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(t,n)=>n=="n"?` +`:n=="r"?"\r":n=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new pxe(this):new hxe(this)}getCursor(e,t=0,n){let i=e.doc?e:nn.create({doc:e});return n==null&&(n=i.doc.length),this.regexp?Op(this,i,t,n):Bp(this,i,t,n)}}class DZ{constructor(e){this.spec=e}}function Bp(r,e,t,n){return new Xg(e.doc,r.unquoted,t,n,r.caseSensitive?void 0:i=>i.toLowerCase(),r.wholeWord?fxe(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function fxe(r,e){return(t,n,i,a)=>((a>t||a+i.length=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let a=Bp(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!a.next().done;)i(a.value.from,a.value.to)}}function Op(r,e,t,n){return new CZ(e.doc,r.search,{ignoreCase:!r.caseSensitive,test:r.wholeWord?dxe(e.charCategorizer(e.selection.main.head)):void 0},t,n)}function g2(r,e){return r.slice(Xi(r,e,!1),e)}function v2(r,e){return r.slice(e,Xi(r,e))}function dxe(r){return(e,t,n)=>!n[0].length||(r(g2(n.input,n.index))!=Nn.Word||r(v2(n.input,n.index))!=Nn.Word)&&(r(v2(n.input,n.index+n[0].length))!=Nn.Word||r(g2(n.input,n.index+n[0].length))!=Nn.Word)}class pxe extends DZ{nextMatch(e,t,n){let i=Op(this.spec,e,n,e.doc.length).next();return i.done&&(i=Op(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,n){for(let i=1;;i++){let a=Math.max(t,n-i*1e4),o=Op(this.spec,e,a,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(a==t||s.from>a+10))return s;if(a==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(t,n)=>n=="$"?"$":n=="&"?e.match[0]:n!="0"&&+n=t)return null;i.push(n.value)}return i}highlight(e,t,n,i){let a=Op(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!a.next().done;)i(a.value.from,a.value.to)}}const Ty=Dr.define(),pF=Dr.define(),tf=ra.define({create(r){return new wD(LM(r).create(),null)},update(r,e){for(let t of e.effects)t.is(Ty)?r=new wD(t.value.create(),r.panel):t.is(pF)&&(r=new wD(r.query,t.value?gF:null));return r},provide:r=>Ay.from(r,e=>e.panel)});class wD{constructor(e,t){this.query=e,this.panel=t}}const gxe=hr.mark({class:"cm-searchMatch"}),vxe=hr.mark({class:"cm-searchMatch cm-searchMatch-selected"}),mxe=Ua.fromClass(class{constructor(r){this.view=r,this.decorations=this.highlight(r.state.field(tf))}update(r){let e=r.state.field(tf);(e!=r.startState.field(tf)||r.docChanged||r.selectionSet||r.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:r,panel:e}){if(!e||!r.spec.valid)return hr.none;let{view:t}=this,n=new Wg;for(let i=0,a=t.visibleRanges,o=a.length;ia[i+1].from-2*250;)l=a[++i].to;r.highlight(t.state,s,l,(u,c)=>{let f=t.state.selection.ranges.some(h=>h.from==u&&h.to==c);n.add(u,c,f?vxe:gxe)})}return n.finish()}},{decorations:r=>r.decorations});function B1(r){return e=>{let t=e.state.field(tf,!1);return t&&t.query.spec.valid?r(e,t):TZ(e)}}const m2=B1((r,{query:e})=>{let{to:t}=r.state.selection.main,n=e.nextMatch(r.state,t,t);if(!n)return!1;let i=We.single(n.from,n.to),a=r.state.facet(xv);return r.dispatch({selection:i,effects:[vF(r,n),a.scrollToMatch(i.main,r)],userEvent:"select.search"}),kZ(r),!0}),y2=B1((r,{query:e})=>{let{state:t}=r,{from:n}=t.selection.main,i=e.prevMatch(t,n,n);if(!i)return!1;let a=We.single(i.from,i.to),o=r.state.facet(xv);return r.dispatch({selection:a,effects:[vF(r,i),o.scrollToMatch(a.main,r)],userEvent:"select.search"}),kZ(r),!0}),yxe=B1((r,{query:e})=>{let t=e.matchAll(r.state,1e3);return!t||!t.length?!1:(r.dispatch({selection:We.create(t.map(n=>We.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),bxe=({state:r,dispatch:e})=>{let t=r.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:n,to:i}=t.main,a=[],o=0;for(let s=new Xg(r.doc,r.sliceDoc(n,i));!s.next().done;){if(a.length>1e3)return!1;s.value.from==n&&(o=a.length),a.push(We.range(s.value.from,s.value.to))}return e(r.update({selection:We.create(a,o),userEvent:"select.search.matches"})),!0},V5=B1((r,{query:e})=>{let{state:t}=r,{from:n,to:i}=t.selection.main;if(t.readOnly)return!1;let a=e.nextMatch(t,n,n);if(!a)return!1;let o=a,s=[],l,u,c=[];if(o.from==n&&o.to==i&&(u=t.toText(e.getReplacement(o)),s.push({from:o.from,to:o.to,insert:u}),o=e.nextMatch(t,o.from,o.to),c.push(St.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(n).number)+"."))),o){let f=s.length==0||s[0].from>=a.to?0:a.to-a.from-u.length;l=We.single(o.from-f,o.to-f),c.push(vF(r,o)),c.push(t.facet(xv).scrollToMatch(l.main,r))}return r.dispatch({changes:s,selection:l,effects:c,userEvent:"input.replace"}),!0}),_xe=B1((r,{query:e})=>{if(r.state.readOnly)return!1;let t=e.matchAll(r.state,1e9).map(i=>{let{from:a,to:o}=i;return{from:a,to:o,insert:e.getReplacement(i)}});if(!t.length)return!1;let n=r.state.phrase("replaced $ matches",t.length)+".";return r.dispatch({changes:t,effects:St.announce.of(n),userEvent:"input.replace.all"}),!0});function gF(r){return r.state.facet(xv).createPanel(r)}function LM(r,e){var t,n,i,a,o;let s=r.selection.main,l=s.empty||s.to>s.from+100?"":r.sliceDoc(s.from,s.to);if(e&&!l)return e;let u=r.facet(xv);return new xZ({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(n=e==null?void 0:e.caseSensitive)!==null&&n!==void 0?n:u.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:u.literal,regexp:(a=e==null?void 0:e.regexp)!==null&&a!==void 0?a:u.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:u.wholeWord})}function EZ(r){let e=Cy(r,gF);return e&&e.dom.querySelector("[main-field]")}function kZ(r){let e=EZ(r);e&&e==r.root.activeElement&&e.select()}const TZ=r=>{let e=r.state.field(tf,!1);if(e&&e.panel){let t=EZ(r);if(t&&t!=r.root.activeElement){let n=LM(r.state,e.query.spec);n.valid&&r.dispatch({effects:Ty.of(n)}),t.focus(),t.select()}}else r.dispatch({effects:[pF.of(!0),e?Ty.of(LM(r.state,e.query.spec)):Dr.appendConfig.of(Axe)]});return!0},MZ=r=>{let e=r.state.field(tf,!1);if(!e||!e.panel)return!1;let t=Cy(r,gF);return t&&t.dom.contains(r.root.activeElement)&&r.focus(),r.dispatch({effects:pF.of(!1)}),!0},wxe=[{key:"Mod-f",run:TZ,scope:"editor search-panel"},{key:"F3",run:m2,shift:y2,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:m2,shift:y2,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:MZ,scope:"editor search-panel"},{key:"Mod-Shift-l",run:bxe},{key:"Mod-Alt-g",run:QAe},{key:"Mod-d",run:cxe,preventDefault:!0}];class Sxe{constructor(e){this.view=e;let t=this.query=e.state.field(tf).query.spec;this.commit=this.commit.bind(this),this.searchField=Tn("input",{value:t.search,placeholder:vo(e,"Find"),"aria-label":vo(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Tn("input",{value:t.replace,placeholder:vo(e,"Replace"),"aria-label":vo(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Tn("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=Tn("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=Tn("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function n(i,a,o){return Tn("button",{class:"cm-button",name:i,onclick:a,type:"button"},o)}this.dom=Tn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,n("next",()=>m2(e),[vo(e,"next")]),n("prev",()=>y2(e),[vo(e,"previous")]),n("select",()=>yxe(e),[vo(e,"all")]),Tn("label",null,[this.caseField,vo(e,"match case")]),Tn("label",null,[this.reField,vo(e,"regexp")]),Tn("label",null,[this.wordField,vo(e,"by word")]),...e.state.readOnly?[]:[Tn("br"),this.replaceField,n("replace",()=>V5(e),[vo(e,"replace")]),n("replaceAll",()=>_xe(e),[vo(e,"replace all")])],Tn("button",{name:"close",onclick:()=>MZ(e),"aria-label":vo(e,"close"),type:"button"},["×"])])}commit(){let e=new xZ({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Ty.of(e)}))}keydown(e){Pwe(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?y2:m2)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),V5(this.view))}update(e){for(let t of e.transactions)for(let n of t.effects)n.is(Ty)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(xv).top}}function vo(r,e){return r.state.phrase(e)}const Vb=30,Ub=/[\s\.,:;?!]/;function vF(r,{from:e,to:t}){let n=r.state.doc.lineAt(e),i=r.state.doc.lineAt(t).to,a=Math.max(n.from,e-Vb),o=Math.min(i,t+Vb),s=r.state.sliceDoc(a,o);if(a!=n.from){for(let l=0;ls.length-Vb;l--)if(!Ub.test(s[l-1])&&Ub.test(s[l])){s=s.slice(0,l);break}}return St.announce.of(`${r.state.phrase("current match")}. ${s} ${r.state.phrase("on line")} ${n.number}.`)}const Cxe=St.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Axe=[tf,Vd.low(mxe),Cxe];class xxe{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class Dh{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let i=e,a=n.facet(My).markerFilter;a&&(i=a(i,n));let o=hr.set(i.map(s=>s.from==s.to||s.from==s.to-1&&n.doc.lineAt(s.from).to==s.from?hr.widget({widget:new Bxe(s),diagnostic:s}).range(s.from):hr.mark({attributes:{class:"cm-lintRange cm-lintRange-"+s.severity+(s.markClass?" "+s.markClass:"")},diagnostic:s}).range(s.from,s.to)),!0);return new Dh(o,t,Qg(o))}}function Qg(r,e=null,t=0){let n=null;return r.between(t,1e9,(i,a,{spec:o})=>{if(!(e&&o.diagnostic!=e))return n=new xxe(i,a,o.diagnostic),!1}),n}function Dxe(r,e){let t=e.pos,n=e.end||t,i=r.state.facet(My).hideOn(r,t,n);if(i!=null)return i;let a=r.startState.doc.lineAt(e.pos);return!!(r.effects.some(o=>o.is(IZ))||r.changes.touchesRange(a.from,Math.max(a.to,n)))}function Exe(r,e){return r.field(xo,!1)?e:e.concat(Dr.appendConfig.of(Rxe))}const IZ=Dr.define(),mF=Dr.define(),LZ=Dr.define(),xo=ra.define({create(){return new Dh(hr.none,null,null)},update(r,e){if(e.docChanged&&r.diagnostics.size){let t=r.diagnostics.map(e.changes),n=null,i=r.panel;if(r.selected){let a=e.changes.mapPos(r.selected.from,1);n=Qg(t,r.selected.diagnostic,a)||Qg(t,null,a)}!t.size&&i&&e.state.facet(My).autoPanel&&(i=null),r=new Dh(t,i,n)}for(let t of e.effects)if(t.is(IZ)){let n=e.state.facet(My).autoPanel?t.value.length?Iy.open:null:r.panel;r=Dh.init(t.value,n,e.state)}else t.is(mF)?r=new Dh(r.diagnostics,t.value?Iy.open:null,r.selected):t.is(LZ)&&(r=new Dh(r.diagnostics,r.panel,t.value));return r},provide:r=>[Ay.from(r,e=>e.panel),St.decorations.from(r,e=>e.diagnostics)]}),kxe=hr.mark({class:"cm-lintRange cm-lintRange-active"});function Txe(r,e,t){let{diagnostics:n}=r.state.field(xo),i=[],a=2e8,o=0;n.between(e-(t<0?1:0),e+(t>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||t>0)&&(eBZ(r,t,!1)))}const Ixe=r=>{let e=r.state.field(xo,!1);(!e||!e.panel)&&r.dispatch({effects:Exe(r.state,[mF.of(!0)])});let t=Cy(r,Iy.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},U5=r=>{let e=r.state.field(xo,!1);return!e||!e.panel?!1:(r.dispatch({effects:mF.of(!1)}),!0)},Lxe=r=>{let e=r.state.field(xo,!1);if(!e)return!1;let t=r.state.selection.main,n=e.diagnostics.iter(t.to+1);return!n.value&&(n=e.diagnostics.iter(0),!n.value||n.from==t.from&&n.to==t.to)?!1:(r.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)},Fxe=[{key:"Mod-Shift-m",run:Ixe,preventDefault:!0},{key:"F8",run:Lxe}],My=Et.define({combine(r){return Object.assign({sources:r.map(e=>e.source).filter(e=>e!=null)},Bf(r.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))}});function FZ(r){let e=[];if(r)e:for(let{name:t}of r){for(let n=0;na.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function BZ(r,e,t){var n;let i=t?FZ(e.actions):[];return Tn("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Tn("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(r):e.message),(n=e.actions)===null||n===void 0?void 0:n.map((a,o)=>{let s=!1,l=h=>{if(h.preventDefault(),s)return;s=!0;let d=Qg(r.state.field(xo).diagnostics,e);d&&a.apply(r,d.from,d.to)},{name:u}=a,c=i[o]?u.indexOf(i[o]):-1,f=c<0?u:[u.slice(0,c),Tn("u",u.slice(c,c+1)),u.slice(c+1)];return Tn("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[o]})"`}.`},f)}),e.source&&Tn("div",{class:"cm-diagnosticSource"},e.source))}class Bxe extends Cv{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return Tn("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class G5{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=BZ(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Iy{constructor(e){this.view=e,this.items=[];let t=i=>{if(i.keyCode==27)U5(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:a}=this.items[this.selectedIndex],o=FZ(a.actions);for(let s=0;s{for(let a=0;aU5(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(xo).selected;if(!e)return-1;for(let t=0;t{let u=-1,c;for(let f=n;fn&&(this.items.splice(n,u-n),i=!0)),t&&c.diagnostic==t.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),a=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),n++});n({sel:a.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:s})=>{let l=s.height/this.list.offsetHeight;o.tops.bottom&&(this.list.scrollTop+=(o.bottom-s.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function t(){let n=e;e=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(xo),n=Qg(t.diagnostics,this.items[e].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:LZ.of(n)})}static open(e){return new Iy(e)}}function Oxe(r,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(r)}')`}function Gb(r){return Oxe(``,'width="6" height="3"')}const Pxe=St.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Gb("#d11")},".cm-lintRange-warning":{backgroundImage:Gb("orange")},".cm-lintRange-info":{backgroundImage:Gb("#999")},".cm-lintRange-hint":{backgroundImage:Gb("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Rxe=[xo,St.decorations.compute([xo],r=>{let{selected:e,panel:t}=r.field(xo);return!e||!t||e.from==e.to?hr.none:hr.set([kxe.range(e.from,e.to)])}),tSe(Txe,{hideOn:Dxe}),Pxe],Sa=({variant:r,settings:e,styles:t})=>{const n=St.theme({"&":{backgroundColor:e.background,color:e.foreground},".cm-content":{caretColor:e.caret},".cm-cursor, .cm-dropCursor":{borderLeftColor:e.caret},"&.cm-focused .cm-selectionBackgroundm .cm-selectionBackground, .cm-content ::selection":{backgroundColor:e.selection},".cm-activeLine":{backgroundColor:e.lineHighlight},".cm-gutters":{backgroundColor:e.gutterBackground,color:e.gutterForeground},".cm-activeLineGutter":{backgroundColor:e.lineHighlight}},{dark:r==="dark"}),i=L1.define(t);return[n,SY(i)]};Sa({variant:"dark",settings:{background:"#200020",foreground:"#D0D0FF",caret:"#7070FF",selection:"#80000080",gutterBackground:"#200020",gutterForeground:"#C080C0",lineHighlight:"#80000040"},styles:[{tag:O.comment,color:"#404080"},{tag:[O.string,O.regexp],color:"#999999"},{tag:O.number,color:"#7090B0"},{tag:[O.bool,O.null],color:"#8080A0"},{tag:[O.punctuation,O.derefOperator],color:"#805080"},{tag:O.keyword,color:"#60B0FF"},{tag:O.definitionKeyword,color:"#B0FFF0"},{tag:O.moduleKeyword,color:"#60B0FF"},{tag:O.operator,color:"#A0A0FF"},{tag:[O.variableName,O.self],color:"#008080"},{tag:O.operatorKeyword,color:"#A0A0FF"},{tag:O.controlKeyword,color:"#80A0FF"},{tag:O.className,color:"#70E080"},{tag:[O.function(O.propertyName),O.propertyName],color:"#50A0A0"},{tag:O.tagName,color:"#009090"},{tag:O.modifier,color:"#B0FFF0"},{tag:[O.squareBracket,O.attributeName],color:"#D0D0FF"}]});Sa({variant:"light",settings:{background:"#fcfcfc",foreground:"#5c6166",caret:"#ffaa33",selection:"#036dd626",gutterBackground:"#fcfcfc",gutterForeground:"#8a919966",lineHighlight:"#8a91991a"},styles:[{tag:O.comment,color:"#787b8099"},{tag:O.string,color:"#86b300"},{tag:O.regexp,color:"#4cbf99"},{tag:[O.number,O.bool,O.null],color:"#ffaa33"},{tag:O.variableName,color:"#5c6166"},{tag:[O.definitionKeyword,O.modifier],color:"#fa8d3e"},{tag:[O.keyword,O.special(O.brace)],color:"#fa8d3e"},{tag:O.operator,color:"#ed9366"},{tag:O.separator,color:"#5c6166b3"},{tag:O.punctuation,color:"#5c6166"},{tag:[O.definition(O.propertyName),O.function(O.variableName)],color:"#f2ae49"},{tag:[O.className,O.definition(O.typeName)],color:"#22a4e6"},{tag:[O.tagName,O.typeName,O.self,O.labelName],color:"#55b4d4"},{tag:O.angleBracket,color:"#55b4d480"},{tag:O.attributeName,color:"#f2ae49"}]});Sa({variant:"dark",settings:{background:"#15191EFA",foreground:"#EEF2F7",caret:"#C4C4C4",selection:"#90B2D557",gutterBackground:"#15191EFA",gutterForeground:"#aaaaaa95",lineHighlight:"#57575712"},styles:[{tag:O.comment,color:"#6E6E6E"},{tag:[O.string,O.regexp,O.special(O.brace)],color:"#5C81B3"},{tag:O.number,color:"#C1E1B8"},{tag:O.bool,color:"#53667D"},{tag:[O.definitionKeyword,O.modifier,O.function(O.propertyName)],color:"#A3D295",fontWeight:"bold"},{tag:[O.keyword,O.moduleKeyword,O.operatorKeyword,O.operator],color:"#697A8E",fontWeight:"bold"},{tag:[O.variableName,O.attributeName],color:"#708E67"},{tag:[O.function(O.variableName),O.definition(O.propertyName),O.derefOperator],color:"#fff"},{tag:O.tagName,color:"#A3D295"}]});Sa({variant:"dark",settings:{background:"#2e241d",foreground:"#BAAE9E",caret:"#A7A7A7",selection:"#DDF0FF33",gutterBackground:"#28211C",gutterForeground:"#BAAE9E90",lineHighlight:"#FFFFFF08"},styles:[{tag:O.comment,color:"#666666"},{tag:[O.string,O.special(O.brace)],color:"#54BE0D"},{tag:O.regexp,color:"#E9C062"},{tag:O.number,color:"#CF6A4C"},{tag:[O.keyword,O.operator],color:"#5EA6EA"},{tag:O.variableName,color:"#7587A6"},{tag:[O.definitionKeyword,O.modifier],color:"#F9EE98"},{tag:[O.propertyName,O.function(O.variableName)],color:"#937121"},{tag:[O.typeName,O.angleBracket,O.tagName],color:"#9B859D"}]});Sa({variant:"dark",settings:{background:"#3b2627",foreground:"#E6E1C4",caret:"#E6E1C4",selection:"#16120E",gutterBackground:"#3b2627",gutterForeground:"#E6E1C490",lineHighlight:"#1F1611"},styles:[{tag:O.comment,color:"#6B4E32"},{tag:[O.keyword,O.operator,O.derefOperator],color:"#EF5D32"},{tag:O.className,color:"#EFAC32",fontWeight:"bold"},{tag:[O.typeName,O.propertyName,O.function(O.variableName),O.definition(O.variableName)],color:"#EFAC32"},{tag:O.definition(O.typeName),color:"#EFAC32",fontWeight:"bold"},{tag:O.labelName,color:"#EFAC32",fontWeight:"bold"},{tag:[O.number,O.bool],color:"#6C99BB"},{tag:[O.variableName,O.self],color:"#7DAF9C"},{tag:[O.string,O.special(O.brace),O.regexp],color:"#D9D762"},{tag:[O.angleBracket,O.tagName,O.attributeName],color:"#EFCB43"}]});const Nxe=Sa({variant:"dark",settings:{background:"#000205",foreground:"#FFFFFF",caret:"#E60065",selection:"#E60C6559",gutterBackground:"#000205",gutterForeground:"#ffffff90",lineHighlight:"#4DD7FC1A"},styles:[{tag:O.comment,color:"#404040"},{tag:[O.string,O.special(O.brace),O.regexp],color:"#00D8FF"},{tag:O.number,color:"#E62286"},{tag:[O.variableName,O.attributeName,O.self],color:"#E62286",fontWeight:"bold"},{tag:O.function(O.variableName),color:"#fff",fontWeight:"bold"}]});Sa({variant:"light",settings:{background:"#fff",foreground:"#000",caret:"#000",selection:"#BDD5FC",gutterBackground:"#fff",gutterForeground:"#00000070",lineHighlight:"#FFFBD1"},styles:[{tag:O.comment,color:"#BCC8BA"},{tag:[O.string,O.special(O.brace),O.regexp],color:"#5D90CD"},{tag:[O.number,O.bool,O.null],color:"#46A609"},{tag:O.keyword,color:"#AF956F"},{tag:[O.definitionKeyword,O.modifier],color:"#C52727"},{tag:[O.angleBracket,O.tagName,O.attributeName],color:"#606060"},{tag:O.self,color:"#000"}]});Sa({variant:"dark",settings:{background:"#00254b",foreground:"#FFFFFF",caret:"#FFFFFF",selection:"#B36539BF",gutterBackground:"#00254b",gutterForeground:"#FFFFFF70",lineHighlight:"#00000059"},styles:[{tag:O.comment,color:"#0088FF"},{tag:O.string,color:"#3AD900"},{tag:O.regexp,color:"#80FFC2"},{tag:[O.number,O.bool,O.null],color:"#FF628C"},{tag:[O.definitionKeyword,O.modifier],color:"#FFEE80"},{tag:O.variableName,color:"#CCCCCC"},{tag:O.self,color:"#FF80E1"},{tag:[O.className,O.definition(O.propertyName),O.function(O.variableName),O.definition(O.typeName),O.labelName],color:"#FFDD00"},{tag:[O.keyword,O.operator],color:"#FF9D00"},{tag:[O.propertyName,O.typeName],color:"#80FFBB"},{tag:O.special(O.brace),color:"#EDEF7D"},{tag:O.attributeName,color:"#9EFFFF"},{tag:O.derefOperator,color:"#fff"}]});Sa({variant:"dark",settings:{background:"#060521",foreground:"#E0E0E0",caret:"#FFFFFFA6",selection:"#122BBB",gutterBackground:"#060521",gutterForeground:"#E0E0E090",lineHighlight:"#FFFFFF0F"},styles:[{tag:O.comment,color:"#AEAEAE"},{tag:[O.string,O.special(O.brace),O.regexp],color:"#8DFF8E"},{tag:[O.className,O.definition(O.propertyName),O.function(O.variableName),O.function(O.definition(O.variableName)),O.definition(O.typeName)],color:"#A3EBFF"},{tag:[O.number,O.bool,O.null],color:"#62E9BD"},{tag:[O.keyword,O.operator],color:"#2BF1DC"},{tag:[O.definitionKeyword,O.modifier],color:"#F8FBB1"},{tag:[O.variableName,O.self],color:"#B683CA"},{tag:[O.angleBracket,O.tagName,O.typeName,O.propertyName],color:"#60A4F1"},{tag:O.derefOperator,color:"#E0E0E0"},{tag:O.attributeName,color:"#7BACCA"}]});Sa({variant:"dark",settings:{background:"#2d2f3f",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"#44475a",gutterBackground:"#282a36",gutterForeground:"rgb(144, 145, 148)",lineHighlight:"#44475a"},styles:[{tag:O.comment,color:"#6272a4"},{tag:[O.string,O.special(O.brace)],color:"#f1fa8c"},{tag:[O.number,O.self,O.bool,O.null],color:"#bd93f9"},{tag:[O.keyword,O.operator],color:"#ff79c6"},{tag:[O.definitionKeyword,O.typeName],color:"#8be9fd"},{tag:O.definition(O.typeName),color:"#f8f8f2"},{tag:[O.className,O.definition(O.propertyName),O.function(O.variableName),O.attributeName],color:"#50fa7b"}]});const zxe=Sa({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#80C7FF",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#C1E2F8"},styles:[{tag:O.comment,color:"#AAAAAA"},{tag:[O.keyword,O.operator,O.typeName,O.tagName,O.propertyName],color:"#2F6F9F",fontWeight:"bold"},{tag:[O.attributeName,O.definition(O.propertyName)],color:"#4F9FD0"},{tag:[O.className,O.string,O.special(O.brace)],color:"#CF4F5F"},{tag:O.number,color:"#CF4F5F",fontWeight:"bold"},{tag:O.variableName,fontWeight:"bold"}]});Sa({variant:"light",settings:{background:"#f2f1f8",foreground:"#0c006b",caret:"#5c49e9",selection:"#d5d1f2",gutterBackground:"#f2f1f8",gutterForeground:"#0c006b70",lineHighlight:"#e1def3"},styles:[{tag:O.comment,color:"#9995b7"},{tag:O.keyword,color:"#ff5792",fontWeight:"bold"},{tag:[O.definitionKeyword,O.modifier],color:"#ff5792"},{tag:[O.className,O.tagName,O.definition(O.typeName)],color:"#0094f0"},{tag:[O.number,O.bool,O.null,O.special(O.brace)],color:"#5842ff"},{tag:[O.definition(O.propertyName),O.function(O.variableName)],color:"#0095a8"},{tag:O.typeName,color:"#b3694d"},{tag:[O.propertyName,O.variableName],color:"#fa8900"},{tag:O.operator,color:"#ff5792"},{tag:O.self,color:"#e64100"},{tag:[O.string,O.regexp],color:"#00b368"},{tag:[O.paren,O.bracket],color:"#0431fa"},{tag:O.labelName,color:"#00bdd6"},{tag:O.attributeName,color:"#e64100"},{tag:O.angleBracket,color:"#9995b7"}]});Sa({variant:"light",settings:{background:"#faf4ed",foreground:"#575279",caret:"#575279",selection:"#6e6a8614",gutterBackground:"#faf4ed",gutterForeground:"#57527970",lineHighlight:"#6e6a860d"},styles:[{tag:O.comment,color:"#9893a5"},{tag:[O.bool,O.null],color:"#286983"},{tag:O.number,color:"#d7827e"},{tag:O.className,color:"#d7827e"},{tag:[O.angleBracket,O.tagName,O.typeName],color:"#56949f"},{tag:O.attributeName,color:"#907aa9"},{tag:O.punctuation,color:"#797593"},{tag:[O.keyword,O.modifier],color:"#286983"},{tag:[O.string,O.regexp],color:"#ea9d34"},{tag:O.variableName,color:"#d7827e"}]});Sa({variant:"light",settings:{background:"#FFFFFF",foreground:"#000000",caret:"#000000",selection:"#FFFD0054",gutterBackground:"#FFFFFF",gutterForeground:"#00000070",lineHighlight:"#00000008"},styles:[{tag:O.comment,color:"#CFCFCF"},{tag:[O.number,O.bool,O.null],color:"#E66C29"},{tag:[O.className,O.definition(O.propertyName),O.function(O.variableName),O.labelName,O.definition(O.typeName)],color:"#2EB43B"},{tag:O.keyword,color:"#D8B229"},{tag:O.operator,color:"#4EA44E",fontWeight:"bold"},{tag:[O.definitionKeyword,O.modifier],color:"#925A47"},{tag:O.string,color:"#704D3D"},{tag:O.typeName,color:"#2F8996"},{tag:[O.variableName,O.propertyName],color:"#77ACB0"},{tag:O.self,color:"#77ACB0",fontWeight:"bold"},{tag:O.regexp,color:"#E3965E"},{tag:[O.tagName,O.angleBracket],color:"#BAA827"},{tag:O.attributeName,color:"#B06520"},{tag:O.derefOperator,color:"#000"}]});Sa({variant:"light",settings:{background:"#fef7e5",foreground:"#586E75",caret:"#000000",selection:"#073642",gutterBackground:"#fef7e5",gutterForeground:"#586E7580",lineHighlight:"#EEE8D5"},styles:[{tag:O.comment,color:"#93A1A1"},{tag:O.string,color:"#2AA198"},{tag:O.regexp,color:"#D30102"},{tag:O.number,color:"#D33682"},{tag:O.variableName,color:"#268BD2"},{tag:[O.keyword,O.operator,O.punctuation],color:"#859900"},{tag:[O.definitionKeyword,O.modifier],color:"#073642",fontWeight:"bold"},{tag:[O.className,O.self,O.definition(O.propertyName)],color:"#268BD2"},{tag:O.function(O.variableName),color:"#268BD2"},{tag:[O.bool,O.null],color:"#B58900"},{tag:O.tagName,color:"#268BD2",fontWeight:"bold"},{tag:O.angleBracket,color:"#93A1A1"},{tag:O.attributeName,color:"#93A1A1"},{tag:O.typeName,color:"#859900"}]});Sa({variant:"light",settings:{background:"#FFFFFF",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C80",lineHighlight:"#EFEFEF"},styles:[{tag:O.comment,color:"#8E908C"},{tag:[O.variableName,O.self,O.propertyName,O.attributeName,O.regexp],color:"#C82829"},{tag:[O.number,O.bool,O.null],color:"#F5871F"},{tag:[O.className,O.typeName,O.definition(O.typeName)],color:"#C99E00"},{tag:[O.string,O.special(O.brace)],color:"#718C00"},{tag:O.operator,color:"#3E999F"},{tag:[O.definition(O.propertyName),O.function(O.variableName)],color:"#4271AE"},{tag:O.keyword,color:"#8959A8"},{tag:O.derefOperator,color:"#4D4D4C"}]});const CZe=async()=>{const r=` +SELECT concat(tables.table_schema, '.', tables.table_name) as qualifiedTable, + column_name as label, + ordinal_position as ordinal, + * +FROM information_schema.tables +INNER JOIN information_schema.columns +ON tables.table_name = columns.table_name + AND tables.table_schema = columns.table_schema`.trim(),e=S4(r);if(await e.fetch(),e.error)throw e.error;const t=e.reduce((s,l)=>{l.qualifiedTable in s||(s[l.qualifiedTable]=[]);const u=l.is_nullable==="YES"?"":"(NOT NULL)";return s[l.qualifiedTable].push({label:l.label,type:"property",detail:`${l.data_type} ${u}`,boost:Math.floor(100/l.ordinal)}),s},{}),n=` + SELECT concat(tables.table_schema, '.', tables.table_name) as qualifiedTable, + * + FROM information_schema.tables`.trim(),i=S4(n);if(await i.fetch(),i.error)throw i.error;const a=i.map(s=>({label:s.qualifiedTable,displayLabel:s.table_name,detail:s.table_schema,type:"class",info:u=>{const c=t[u.label],f=document.createElement("dl");return f.classList.add("grid-cols-2","grid","gap-x-4"),c.forEach(h=>{const d=document.createElement("dt");d.classList.add("overflow-hidden","truncate","text-ellipsis"),d.textContent=h.label;const p=document.createElement("dd");p.textContent=h.detail,f.appendChild(d),f.appendChild(p)}),f}})),o=Object.values(i.reduce((s,l)=>{if(!s[l.label]){const u={label:l.table_schema,type:"namespace",info:c=>{const f=a.filter(d=>d.label.startsWith(c.label)),h=document.createElement("dl");return h.classList.add("grid-cols-2","grid","gap-x-4"),f.forEach(d=>{const p=document.createElement("dt");p.classList.add("overflow-hidden","truncate","text-ellipsis"),p.textContent=d.displayLabel;const g=document.createElement("dd");g.textContent=d.detail,h.appendChild(p),h.appendChild(g)}),h}};s[l.label]=u}return s},{}));return{schema:t,tables:a,schemas:o}},AZe=(r,e)=>{let t,n;function i({initialState:a,schema:o,onChange:s,onSubmit:l,theme:u}){t&&t.destroy(),n&&n(),t=new St({doc:a,extensions:[tA.of([{preventDefault:!0,stopPropagation:!0,key:"Ctrl-Enter",mac:"Cmd-Enter",run:l},{preventDefault:!0,key:"Tab",run:f=>{if(X2e(f.state)!==null)LY(f);else{const d=f.state.selection.asSingle().ranges[0];if(d.from===d.to){const p=d.from;f.dispatch({changes:{from:p,insert:" "},selection:{anchor:d.from+1,head:d.from+1}})}else{const p=f.lineBlockAt(d.from);f.dispatch({changes:{from:p.from,insert:" "}})}}}},{preventDefault:!0,key:"Shift-Tab",run:f=>{const h=f.state.selection.asSingle().ranges[0],d=f.lineBlockAt(h.from);f.state.doc.slice(d.from,d.from+1).toString()===" "&&f.dispatch({changes:{from:d.from,to:d.from+1,insert:""}}),f.state.doc.slice(d.from,d.from+2).toString()===" "&&f.dispatch({changes:{from:d.from,to:d.from+2,insert:""}})}}]),u==="light"?zxe:Nxe,...Vxe,RCe({...o,dialect:NCe}),St.updateListener.of(s)],parent:r});const c=f=>{f.stopImmediatePropagation(),t.focus()};r.addEventListener("click",c),n=()=>r.removeEventListener("click",c)}return e&&i(e),{destroy(){t.destroy()},update(a){a&&i(a)}}},Vxe=[YCe(),Gwe(),qwe(),DSe(),SY(GSe,{fallback:!0}),ZSe(),N2e(),Z2e(),rxe(),tA.of([...G2e,...KAe,...wxe,...nAe,...OSe,...RY,...Fxe])];function Uxe(r){let e,t,n,i,a,o,s,l;return a=new Ao({props:{src:Yle,class:"pl-0.5"}}),{c(){e=oe("div"),t=oe("input"),n=Le(),i=oe("div"),Ne(a.$$.fragment),this.h()},l(u){e=se(u,"DIV",{class:!0});var c=ge(e);t=se(c,"INPUT",{class:!0,type:!0,placeholder:!0}),n=Fe(c),i=se(c,"DIV",{class:!0});var f=ge(i);ze(a.$$.fragment,f),f.forEach(U),c.forEach(U),this.h()},h(){Y(t,"class","search-bar svelte-116nqgn"),Y(t,"type","text"),Y(t,"placeholder",r[1]),Y(i,"class","search-icon svelte-116nqgn"),Y(e,"class","search-container svelte-116nqgn")},m(u,c){le(u,e,c),X(e,t),Xw(t,r[0]),X(e,n),X(e,i),Ve(a,i,null),o=!0,s||(l=[_n(t,"input",r[3]),_n(t,"keyup",r[4])],s=!0)},p(u,[c]){(!o||c&2)&&Y(t,"placeholder",u[1]),c&1&&t.value!==u[0]&&Xw(t,u[0])},i(u){o||(K(a.$$.fragment,u),o=!0)},o(u){re(a.$$.fragment,u),o=!1},d(u){u&&U(e),Ue(a),s=!1,Bd(l)}}}function Gxe(r,e,t){let{placeholder:n="Search"}=e,{value:i}=e,{searchFunction:a}=e;function o(){i=this.value,t(0,i)}const s=()=>a(i);return r.$$set=l=>{"placeholder"in l&&t(1,n=l.placeholder),"value"in l&&t(0,i=l.value),"searchFunction"in l&&t(2,a=l.searchFunction)},[i,n,a,o,s]}class Hxe extends kr{constructor(e){super(),Tr(this,e,Gxe,Uxe,Mr,{placeholder:1,value:0,searchFunction:2})}}function yF(r,e,t){var a,o,s,l,u;let n=[];if(r===void 0)throw Error("No data provided");if(typeof r!="object")throw Error("'"+r+"' is not a recognized query result. Data should be provided in the format: data = {"+r.replace("data.","")+"}");if(r[0]===void 0||r.length===0)throw Error("Dataset is empty: query ran successfully, but no data was returned from the database");if(((o=(a=r[0])==null?void 0:a.error_object)==null?void 0:o.error)!=null)throw Error("SQL Error: "+((u=(l=(s=r[0])==null?void 0:s.error_object)==null?void 0:l.error)==null?void 0:u.message));if(e!=null){if(!(e instanceof Array))throw Error("reqCols must be passed in as an array");for(var i=0;i0&&console.warn("Option to use object keys as headers was set, but headers were still passed!")}return Object.defineProperty(s.prototype,"options",{get:function(){return this._options},set:function(l){this._options=o({},r.ConfigDefaults,l)},enumerable:!0,configurable:!0}),s.prototype.generateCsv=function(l,u){if(u===void 0&&(u=!1),this._csv="",this._parseData(l),this._options.useBom&&(this._csv+=e.BOM),this._options.showTitle&&(this._csv+=this._options.title+`\r + +`),this._getHeaders(),this._getBody(),this._csv==""){console.log("Invalid data");return}if(u)return this._csv;var c=this._options.useTextFile?"plain":"csv",f=this._options.useTextFile?".txt":".csv",h=new Blob([this._csv],{type:"text/"+c+";charset=utf8;"});if(navigator.msSaveBlob){var d=this._options.filename.replace(/ /g,"_")+f;navigator.msSaveBlob(h,d)}else{var p=this._options.useTextFile?"text":"csv";""+p+encodeURI(this._csv);var g=document.createElement("a");g.href=URL.createObjectURL(h),g.setAttribute("visibility","hidden"),g.download=this._options.filename.replace(/ /g,"_")+f,document.body.appendChild(g),g.click(),document.body.removeChild(g)}},s.prototype._getHeaders=function(){if(!(!this._options.showLabels&&!this._options.useKeysAsHeaders)){var l=this._options.useKeysAsHeaders,u=l?Object.keys(this._data[0]):this._options.headers;if(u.length>0){for(var c="",f=0;f-1||l.indexOf(` +`)>-1||l.indexOf("\r")>-1)&&(l=this._options.quoteStrings+l+this._options.quoteStrings),l):typeof l=="boolean"?l?"TRUE":"FALSE":l},s.prototype._isFloat=function(l){return+l===l&&(!isFinite(l)||!!(l%1))},s.prototype._parseData=function(l){return this._data=typeof l!="object"?JSON.parse(l):l,this._data},s}();r.ExportToCsv=t;var n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(s){for(var l,u=a(s),c,f=1;f{l&&(s||(s=Gl(e,md,{duration:200},!0)),s.run(1))}),l=!0)},o(p){re(d,p),p&&(s||(s=Gl(e,md,{duration:200},!1)),s.run(0)),l=!1},d(p){p&&U(e),d&&d.d(p),p&&s&&s.end(),u=!1,c()}}}function Wxe(r){let e,t;return{c(){e=zi("svg"),t=zi("path"),this.h()},l(n){e=Vi(n,"svg",{width:!0,height:!0,viewBox:!0,fill:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0});var i=ge(e);t=Vi(i,"path",{d:!0}),ge(t).forEach(U),i.forEach(U),this.h()},h(){Y(t,"d","M3 15v4c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2v-4M17 9l-5 5-5-5M12 12.8V2.5"),Y(e,"width","12"),Y(e,"height","12"),Y(e,"viewBox","0 0 24 24"),Y(e,"fill","none"),Y(e,"stroke-width","2"),Y(e,"stroke-linecap","round"),Y(e,"stroke-linejoin","round")},m(n,i){le(n,e,i),X(e,t)},p:xe,d(n){n&&U(e)}}}function $xe(r){let e,t,n=r[0]&&H5(r);return{c(){n&&n.c(),e=Xe()},l(i){n&&n.l(i),e=Xe()},m(i,a){n&&n.m(i,a),le(i,e,a),t=!0},p(i,[a]){i[0]?n?(n.p(i,a),a&1&&K(n,1)):(n=H5(i),n.c(),K(n,1),n.m(e.parentNode,e)):n&&(Mt(),re(n,1,1,()=>{n=null}),It())},i(i){t||(K(n),t=!0)},o(i){re(n),t=!1},d(i){i&&U(e),n&&n.d(i)}}}function jxe(r,e,t){let{$$slots:n={},$$scope:i}=e,{data:a=void 0}=e,{queryID:o=void 0}=e,{text:s="Download"}=e,{display:l=!0}=e;const u=new Date,c=new Date(u.getTime()-u.getTimezoneOffset()*6e4).toISOString().slice(0,19).replaceAll(":","-");let{downloadData:f=h=>{const d={fieldSeparator:",",quoteStrings:'"',decimalSeparator:".",showLabels:!0,showTitle:!1,filename:(o??"evidence_download")+` ${c}`,useTextFile:!1,useBom:!0,useKeysAsHeaders:!0},p=JSON.parse(JSON.stringify(Array.from(h)));new OZ.ExportToCsv(d).generateCsv(p)}}=e;return r.$$set=h=>{t(4,e=En(En({},e),us(h))),"data"in h&&t(1,a=h.data),"queryID"in h&&t(5,o=h.queryID),"text"in h&&t(2,s=h.text),"display"in h&&t(0,l=h.display),"downloadData"in h&&t(3,f=h.downloadData),"$$scope"in h&&t(6,i=h.$$scope)},r.$$.update=()=>{r.$$.dirty&1&&t(0,l=l==="true"||l===!0)},e=us(e),[l,a,s,f,e,o,i,n]}class RZ extends kr{constructor(e){super(),Tr(this,e,jxe,$xe,Mr,{data:1,queryID:5,text:2,display:0,downloadData:3})}}function qxe(r){let e;return{c(){e=Xe()},l(t){e=Xe()},m(t,n){le(t,e,n)},p(t,[n]){},i:xe,o:xe,d(t){t&&U(e)}}}function Yxe(r,e,t){let{data:n}=e,{link:i}=e;const a=o=>o[i];return r.$$set=o=>{"data"in o&&t(0,n=o.data),"link"in o&&t(1,i=o.link)},[n,i,a]}class NZ extends kr{constructor(e){super(),Tr(this,e,Yxe,qxe,Mr,{data:0,link:1})}}const zZ=async()=>{const r=(await Ts(async()=>{const{default:e}=await Promise.resolve().then(()=>Kqe);return{default:e}},void 0)).default;return await Ts(()=>import("./prism-bash.DTkDXsAh.js"),[]),await Ts(()=>import("./prism-sql.AgAyy5H_.js"),[]),await Ts(()=>import("./prism-python.DhmbaUsA.js"),[]),await Ts(()=>import("./prism-markdown.4MKFcK2x.js"),[]),await Ts(()=>import("./prism-yaml.Chm5ZdEN.js"),[]),await Ts(()=>import("./prism-svelte.CcUq_OPu.js"),[]),r};function W5(r){let e,t;return{c(){e=zi("title"),t=dt(r[0])},l(n){e=Vi(n,"title",{});var i=ge(e);t=pt(i,r[0]),i.forEach(U)},m(n,i){le(n,e,i),X(e,t)},p(n,i){i&1&&Rt(t,n[0])},d(n){n&&U(e)}}}function Zxe(r){let e,t,n,i=r[0]&&W5(r),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{width:"100%"},{height:"100%"},{preserveAspectRatio:"xMidYMid meet"},r[1],r[2]],o={};for(let s=0;s{t(4,e=En(En({},e),us(l))),t(2,o=Lg(e,a)),"title"in l&&t(0,s=l.title)},r.$$.update=()=>{t(3,n=e["aria-label"]||e["aria-labelledby"]||s),t(1,i={"aria-hidden":n?void 0:!0,role:n?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=us(e),[s,i,o,n]}class Xxe extends kr{constructor(e){super(),Tr(this,e,Kxe,Zxe,Mr,{title:0})}}function Qxe(r){let e,t;return{c(){e=zi("svg"),t=zi("path"),this.h()},l(n){e=Vi(n,"svg",{class:!0,fill:!0,viewBox:!0,width:!0,height:!0,preserveAspectRatio:!0});var i=ge(e);t=Vi(i,"path",{d:!0}),ge(t).forEach(U),i.forEach(U),this.h()},h(){Y(t,"d","M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"),Y(e,"class","copyButtonSuccessIcon text-positive"),Y(e,"fill","currentColor"),Y(e,"viewBox","0 0 24 24"),Y(e,"width","100%"),Y(e,"height","100%"),Y(e,"preserveAspectRatio","xMidYMid meet")},m(n,i){le(n,e,i),X(e,t)},p:xe,i:xe,o:xe,d(n){n&&U(e)}}}class Jxe extends kr{constructor(e){super(),Tr(this,e,null,Qxe,Mr,{})}}function $5(r){let e,t,n,i,a,o,s;const l=[tDe,eDe],u=[];function c(f,h){return f[3]?0:1}return t=c(r),n=u[t]=l[t](r),{c(){e=oe("button"),n.c(),this.h()},l(f){e=se(f,"BUTTON",{class:!0});var h=ge(e);n.l(h),h.forEach(U),this.h()},h(){Y(e,"class",i="absolute opacity-0 rounded-sm p-1 group-hover:opacity-100 top-4 right-6 h-6 w-6 z-10 transition-all duration-200 ease-in-out"+(r[3],""))},m(f,h){le(f,e,h),u[t].m(e,null),a=!0,o||(s=_n(e,"click",r[7]),o=!0)},p(f,h){let d=t;t=c(f),t!==d&&(Mt(),re(u[d],1,1,()=>{u[d]=null}),It(),n=u[t],n||(n=u[t]=l[t](f),n.c()),K(n,1),n.m(e,null)),(!a||h&8&&i!==(i="absolute opacity-0 rounded-sm p-1 group-hover:opacity-100 top-4 right-6 h-6 w-6 z-10 transition-all duration-200 ease-in-out"+(f[3],"")))&&Y(e,"class",i)},i(f){a||(K(n),a=!0)},o(f){re(n),a=!1},d(f){f&&U(e),u[t].d(),o=!1,s()}}}function eDe(r){let e,t;return e=new Xxe({}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function tDe(r){let e,t;return e=new Jxe({}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function rDe(r){let e;const t=r[6].default,n=Ui(t,r,r[5],null);return{c(){n&&n.c()},l(i){n&&n.l(i)},m(i,a){n&&n.m(i,a),e=!0},p(i,a){n&&n.p&&(!e||a&32)&&Gi(n,t,i,i[5],e?Wi(t,i[5],a,null):Hi(i[5]),null)},i(i){e||(K(n,i),e=!0)},o(i){re(n,i),e=!1},d(i){n&&n.d(i)}}}function nDe(r){let e;return{c(){e=dt(r[0])},l(t){e=pt(t,r[0])},m(t,n){le(t,e,n)},p(t,n){n&1&&Rt(e,t[0])},i:xe,o:xe,d(t){t&&U(e)}}}function iDe(r){let e,t,n,i,a,o,s,l,u=r[1]&&$5(r);const c=[nDe,rDe],f=[];function h(d,p){return d[0]?0:1}return a=h(r),o=f[a]=c[a](r),{c(){e=oe("div"),u&&u.c(),t=Le(),n=oe("pre"),i=oe("code"),o.c(),this.h()},l(d){e=se(d,"DIV",{class:!0});var p=ge(e);u&&u.l(p),t=Fe(p),n=se(p,"PRE",{class:!0});var g=ge(n);i=se(g,"CODE",{class:!0});var v=ge(i);o.l(v),v.forEach(U),g.forEach(U),p.forEach(U),this.h()},h(){Y(i,"class",s="language-"+r[2]+" text-sm"),Y(n,"class","overflow-auto pretty-scrollbar my-[0.5em]"),Y(e,"class","my-5 bg-base-200 border border-base-300 rounded px-3 py-2 relative group")},m(d,p){le(d,e,p),u&&u.m(e,null),X(e,t),X(e,n),X(n,i),f[a].m(i,null),l=!0},p(d,[p]){d[1]?u?(u.p(d,p),p&2&&K(u,1)):(u=$5(d),u.c(),K(u,1),u.m(e,t)):u&&(Mt(),re(u,1,1,()=>{u=null}),It());let g=a;a=h(d),a===g?f[a].p(d,p):(Mt(),re(f[g],1,1,()=>{f[g]=null}),It(),o=f[a],o?o.p(d,p):(o=f[a]=c[a](d),o.c()),K(o,1),o.m(i,null)),(!l||p&4&&s!==(s="language-"+d[2]+" text-sm"))&&Y(i,"class",s)},i(d){l||(K(u),K(o),l=!0)},o(d){re(u),re(o),l=!1},d(d){d&&U(e),u&&u.d(),f[a].d()}}}function aDe(r,e,t){let{$$slots:n={},$$scope:i}=e,{source:a}=e,{copyToClipboard:o=!1}=e,{language:s=void 0}=e,l=!1;const u=function(){t(3,l=!1)};async function c(){try{await navigator.clipboard.writeText(a),t(3,l=!0),setTimeout(u,1500)}catch{}}const f=()=>{a!==void 0&&c()};return r.$$set=h=>{"source"in h&&t(0,a=h.source),"copyToClipboard"in h&&t(1,o=h.copyToClipboard),"language"in h&&t(2,s=h.language),"$$scope"in h&&t(5,i=h.$$scope)},r.$$.update=()=>{r.$$.dirty&4&&kG().then(async()=>{const h=await zZ();typeof h<"u"?document.querySelectorAll(`pre code${s?`.language-${s}`:""}`).forEach(p=>{h.highlightElement(p,!1)}):console.error("Prism is not defined in reactive statement")})},[a,o,s,l,c,i,n,f]}class oDe extends kr{constructor(e){super(),Tr(this,e,aDe,iDe,Mr,{source:0,copyToClipboard:1,language:2})}}function Is(r,e){const t=e.filter(n=>n.id===r.id);if(t===void 0||t.length!==1){const n=r.id===void 0?new Error('please add an "id" property to all the '):new Error(`column with id: "${r.id}" not found`);return console.warn(n.message),""}return t[0]}function b2(r,e,t){if(!t||!r.length)return null;let n=0,i=0;return r.forEach(a=>{const o=Number(a[e]??0),s=Number(a[t]??0);n+=o*s,i+=s}),i>0?n/i:0}function Wu(r,e,t,n,i=null){if(!t&&n==="number"&&(t="sum"),!r||!r.length)return null;if(n!=="number"&&["sum","min","max","mean","weightedMean","median",void 0].includes(t))return"-";const a=r.map(o=>o[e]).filter(o=>o!==void 0);switch(t){case"sum":return a.reduce((o,s)=>o+Number(s),0);case"min":return Math.min(...a);case"max":return Math.max(...a);case"mean":return a.length?a.reduce((o,s)=>o+Number(s),0)/a.length:"-";case"count":return r.length;case"countDistinct":return new Set(a).size;case"weightedMean":{if(!i)return"Weight column name required for weightedMean";let o=0,s=r.reduce((l,u)=>{const c=u[i]||0;return o+=c,l+(Number(u[e])||0)*c},0);return o>0?s/o:null}case"median":{const o=a.sort((l,u)=>l-u),s=Math.floor(o.length/2);return o.length%2!==0?o[s]:(o[s-1]+o[s])/2}default:return`${t}`}}function sDe(r,e){const t=r.filter(n=>!e.includes(n));return[...e,...t]}function lDe(r){let e,t;return e=new FL({props:{error:r[8]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&256&&(a.error=n[8]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function uDe(r){let e,t,n,i;function a(u,c){return u[5]==="right"?fDe:cDe}let o=a(r),s=o(r),l=r[3]&&K5(r);return{c(){e=oe("span"),t=oe("span"),s.c(),n=Le(),l&&l.c(),this.h()},l(u){e=se(u,"SPAN",{class:!0});var c=ge(e);t=se(c,"SPAN",{});var f=ge(t);s.l(f),n=Fe(f),l&&l.l(f),f.forEach(U),c.forEach(U),this.h()},h(){He(t,"text-align",r[6]??"right"),Y(e,"class",i="m-0 "+r[7]+" font-ui inline-block rounded-md "+r[12][r[11]]+" "+(r[0]?r[13][r[11]]:"")),$r(e,"px-1",r[0])},m(u,c){le(u,e,c),X(e,t),s.m(t,null),X(t,n),l&&l.m(t,null)},p(u,c){o===(o=a(u))&&s?s.p(u,c):(s.d(1),s=o(u),s&&(s.c(),s.m(t,n))),u[3]?l?l.p(u,c):(l=K5(u),l.c(),l.m(t,null)):l&&(l.d(1),l=null),c&64&&He(t,"text-align",u[6]??"right"),c&2177&&i!==(i="m-0 "+u[7]+" font-ui inline-block rounded-md "+u[12][u[11]]+" "+(u[0]?u[13][u[11]]:""))&&Y(e,"class",i),c&2177&&$r(e,"px-1",u[0])},i:xe,o:xe,d(u){u&&U(e),s.d(),l&&l.d()}}}function cDe(r){let e,t,n=r[2]&&j5(r),i=r[1]&&q5(r);return{c(){n&&n.c(),e=Le(),i&&i.c(),t=Xe()},l(a){n&&n.l(a),e=Fe(a),i&&i.l(a),t=Xe()},m(a,o){n&&n.m(a,o),le(a,e,o),i&&i.m(a,o),le(a,t,o)},p(a,o){a[2]?n?n.p(a,o):(n=j5(a),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null),a[1]?i?i.p(a,o):(i=q5(a),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(a){a&&(U(e),U(t)),n&&n.d(a),i&&i.d(a)}}}function fDe(r){let e,t,n=r[1]&&Y5(r),i=r[2]&&Z5(r);return{c(){n&&n.c(),e=Le(),i&&i.c(),t=Xe()},l(a){n&&n.l(a),e=Fe(a),i&&i.l(a),t=Xe()},m(a,o){n&&n.m(a,o),le(a,e,o),i&&i.m(a,o),le(a,t,o)},p(a,o){a[1]?n?n.p(a,o):(n=Y5(a),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null),a[2]?i?i.p(a,o):(i=Z5(a),i.c(),i.m(t.parentNode,t)):i&&(i.d(1),i=null)},d(a){a&&(U(e),U(t)),n&&n.d(a),i&&i.d(a)}}}function j5(r){let e,t,n=r[11]==="positive"?"▲":r[11]==="negative"?"▼":"—";return{c(){e=oe("span"),t=new cv(!1),this.h()},l(i){e=se(i,"SPAN",{class:!0});var a=ge(e);t=fv(a,!1),a.forEach(U),this.h()},h(){t.a=null,Y(e,"class","font-[system-ui]")},m(i,a){le(i,e,a),t.m(n,e)},p(i,a){a&2048&&n!==(n=i[11]==="positive"?"▲":i[11]==="negative"?"▼":"—")&&t.p(n)},d(i){i&&U(e)}}}function q5(r){let e;function t(a,o){return a[9]===null?dDe:hDe}let n=t(r),i=n(r);return{c(){i.c(),e=Xe()},l(a){i.l(a),e=Xe()},m(a,o){i.m(a,o),le(a,e,o)},p(a,o){n===(n=t(a))&&i?i.p(a,o):(i.d(1),i=n(a),i&&(i.c(),i.m(e.parentNode,e)))},d(a){a&&U(e),i.d(a)}}}function hDe(r){let e,t=qn(r[9],r[10],r[4])+"",n;return{c(){e=oe("span"),n=dt(t)},l(i){e=se(i,"SPAN",{});var a=ge(e);n=pt(a,t),a.forEach(U)},m(i,a){le(i,e,a),X(e,n)},p(i,a){a&1552&&t!==(t=qn(i[9],i[10],i[4])+"")&&Rt(n,t)},d(i){i&&U(e)}}}function dDe(r){let e,t="–";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-45ueay"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-[system-ui]")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Y5(r){let e;function t(a,o){return a[9]===null?gDe:pDe}let n=t(r),i=n(r);return{c(){i.c(),e=Xe()},l(a){i.l(a),e=Xe()},m(a,o){i.m(a,o),le(a,e,o)},p(a,o){n===(n=t(a))&&i?i.p(a,o):(i.d(1),i=n(a),i&&(i.c(),i.m(e.parentNode,e)))},d(a){a&&U(e),i.d(a)}}}function pDe(r){let e,t=qn(r[9],r[10],r[4])+"",n;return{c(){e=oe("span"),n=dt(t)},l(i){e=se(i,"SPAN",{});var a=ge(e);n=pt(a,t),a.forEach(U)},m(i,a){le(i,e,a),X(e,n)},p(i,a){a&1552&&t!==(t=qn(i[9],i[10],i[4])+"")&&Rt(n,t)},d(i){i&&U(e)}}}function gDe(r){let e,t="–";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-45ueay"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-[system-ui]")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Z5(r){let e,t,n=r[11]==="positive"?"▲":r[11]==="negative"?"▼":"– ";return{c(){e=oe("span"),t=new cv(!1),this.h()},l(i){e=se(i,"SPAN",{class:!0});var a=ge(e);t=fv(a,!1),a.forEach(U),this.h()},h(){t.a=null,Y(e,"class","font-[system-ui]")},m(i,a){le(i,e,a),t.m(n,e)},p(i,a){a&2048&&n!==(n=i[11]==="positive"?"▲":i[11]==="negative"?"▼":"– ")&&t.p(n)},d(i){i&&U(e)}}}function K5(r){let e,t;return{c(){e=oe("span"),t=dt(r[3])},l(n){e=se(n,"SPAN",{});var i=ge(e);t=pt(i,r[3]),i.forEach(U)},m(n,i){le(n,e,i),X(e,t)},p(n,i){i&8&&Rt(t,n[3])},d(n){n&&U(e)}}}function vDe(r){let e,t,n,i;const a=[uDe,lDe],o=[];function s(l,u){return l[8]?1:0}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),le(l,n,u),i=!0},p(l,[u]){let c=e;e=s(l),e===c?o[e].p(l,u):(Mt(),re(o[c],1,1,()=>{o[c]=null}),It(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),o[e].d(l)}}}function mDe(r,e,t){let{data:n=void 0}=e,{row:i=0}=e,{column:a=void 0}=e,{value:o=void 0}=e,{text:s=void 0}=e,{chip:l=!1}=e,{downIsGood:u=!1}=e,{fmt:c=void 0}=e,{format_object:f=void 0}=e,{columnUnitSummary:h=void 0}=e,{showValue:d=!0}=e,{showSymbol:p=!0}=e,{symbolPosition:g="right"}=e,{align:v="right"}=e,{fontClass:m=l?"text-sm":"text-base"}=e,{neutralMin:y=0}=e,{neutralMax:b=0}=e;const _={positive:u?"text-negative":"text-positive",negative:u?"text-positive":"text-negative",neutral:"text-base-content-muted"},w={positive:u?"bg-negative/10 border border-negative/20":"bg-positive/10 border border-positive/20",negative:u?"bg-positive/10 border border-positive/20":"bg-negative/10 border border-negative/20",neutral:"bg-base-200 border border-base-300"};let S,C,A,x,D;return r.$$set=E=>{"data"in E&&t(14,n=E.data),"row"in E&&t(17,i=E.row),"column"in E&&t(15,a=E.column),"value"in E&&t(18,o=E.value),"text"in E&&t(3,s=E.text),"chip"in E&&t(0,l=E.chip),"downIsGood"in E&&t(16,u=E.downIsGood),"fmt"in E&&t(19,c=E.fmt),"format_object"in E&&t(20,f=E.format_object),"columnUnitSummary"in E&&t(4,h=E.columnUnitSummary),"showValue"in E&&t(1,d=E.showValue),"showSymbol"in E&&t(2,p=E.showSymbol),"symbolPosition"in E&&t(5,g=E.symbolPosition),"align"in E&&t(6,v=E.align),"fontClass"in E&&t(7,m=E.fontClass),"neutralMin"in E&&t(21,y=E.neutralMin),"neutralMax"in E&&t(22,b=E.neutralMax)},r.$$.update=()=>{var E;if(r.$$.dirty&1&&t(0,l=l==="true"||l===!0),r.$$.dirty&65536&&t(16,u=u==="true"||u===!0),r.$$.dirty&2&&t(1,d=d==="true"||d===!0),r.$$.dirty&4&&t(2,p=p==="true"||p===!0),r.$$.dirty&16696064)try{if(t(8,S=void 0),n){if(typeof n=="string")throw Error(`Received: data=${n}, expected: data={${n}}`);if(Array.isArray(n)||t(14,n=[n]),isNaN(i))throw Error("row must be a number (row="+i+")");try{Object.keys(n[i])[0]}catch{throw Error("Row "+i+" does not exist in the dataset")}t(15,a=a??Object.keys(n[i])[0]),yF(n,[a]),t(23,A=BL(n,"array")),t(9,C=n[i][a]),t(23,A=A.filter(k=>k.id===a)),c?t(10,x=Di(c,(E=A[0].format)==null?void 0:E.valueType)):t(10,x=A[0].format)}else if(o!==void 0){if(isNaN(o))throw Error("value must be a number (value="+o+")");t(9,C=o),t(10,x=c?Di(c,"number"):f??void 0)}else throw Error("No data or value provided. If you referenced a query result, check that the name is correct.");t(11,D=C>b?"positive":C{n=null}),It()):n?(n.p(i,a),a&16&&K(n,1)):(n=X5(i),n.c(),K(n,1),n.m(e,null))},i(i){t||(K(n),t=!0)},o(i){re(n),t=!1},d(i){i&&U(e),n&&n.d()}}}function wDe(r){let e,t="Loading...";return{c(){e=oe("p"),e.textContent=t,this.h()},l(n){e=se(n,"P",{slot:!0,class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1vn8ohu"&&(e.textContent=t),this.h()},h(){Y(e,"slot","skeleton"),Y(e,"class","text-base-content-muted")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function SDe(r){let e,t;return e=new vL({props:{data:r[0],$$slots:{skeleton:[wDe],empty:[_De],default:[bDe,({loaded:n})=>({7:n}),({loaded:n})=>n?128:0]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,[i]){const a={};i&1&&(a.data=n[0]),i&414&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}let CDe="Delta";function ADe(r,e,t){let n,{data:i=void 0}=e;const a=typeof i=="object"&&"__isQueryStore"in i?i.hash:void 0;let o=(i==null?void 0:i.hash)===a,{emptySet:s=void 0}=e,{emptyMessage:l=void 0}=e;return r.$$set=u=>{t(6,e=En(En({},e),us(u))),"data"in u&&t(0,i=u.data),"emptySet"in u&&t(1,s=u.emptySet),"emptyMessage"in u&&t(2,l=u.emptyMessage)},r.$$.update=()=>{r.$$.dirty&1&&t(3,o=(i==null?void 0:i.hash)===a),t(4,n=Object.fromEntries(Object.entries(e).filter(([,u])=>u!==void 0)))},e=us(e),[i,s,l,o,n]}class fA extends kr{constructor(e){super(),Tr(this,e,ADe,SDe,Mr,{data:0,emptySet:1,emptyMessage:2})}}function xDe(r){let e,t,n;const i=r[17].default,a=Ui(i,r,r[16],null);return{c(){e=oe("td"),a&&a.c(),this.h()},l(o){e=se(o,"TD",{role:!0,class:!0,rowspan:!0,colspan:!0});var s=ge(e);a&&a.l(s),s.forEach(U),this.h()},h(){Y(e,"role","cell"),Y(e,"class",t=(r[15].class||"")+" "+r[0]+" "+r[11]+" whitespace-nowrap overflow-hidden first:pl-[3px] "+(r[14]?"text-xs py-[1px] pr-[16.5px]":"py-[2px] pl-[6px] pr-[12px]")+" svelte-1hwgyu4"),Y(e,"rowspan",r[6]),Y(e,"colspan",r[7]),He(e,"text-align",r[1]),He(e,"height",r[2]),He(e,"width",r[3]),He(e,"white-space",r[4]?"normal":"nowrap"),He(e,"vertical-align",r[5]),He(e,"display",r[8]?void 0:"none"),He(e,"background-color",r[9]),He(e,"color",r[10]),He(e,"padding-left",r[12]),He(e,"border-bottom",r[13])},m(o,s){le(o,e,s),a&&a.m(e,null),n=!0},p(o,[s]){a&&a.p&&(!n||s&65536)&&Gi(a,i,o,o[16],n?Wi(i,o[16],s,null):Hi(o[16]),null),(!n||s&51201&&t!==(t=(o[15].class||"")+" "+o[0]+" "+o[11]+" whitespace-nowrap overflow-hidden first:pl-[3px] "+(o[14]?"text-xs py-[1px] pr-[16.5px]":"py-[2px] pl-[6px] pr-[12px]")+" svelte-1hwgyu4"))&&Y(e,"class",t),(!n||s&64)&&Y(e,"rowspan",o[6]),(!n||s&128)&&Y(e,"colspan",o[7]),s&2&&He(e,"text-align",o[1]),s&4&&He(e,"height",o[2]),s&8&&He(e,"width",o[3]),s&16&&He(e,"white-space",o[4]?"normal":"nowrap"),s&32&&He(e,"vertical-align",o[5]),s&256&&He(e,"display",o[8]?void 0:"none"),s&512&&He(e,"background-color",o[9]),s&1024&&He(e,"color",o[10]),s&4096&&He(e,"padding-left",o[12]),s&8192&&He(e,"border-bottom",o[13])},i(o){n||(K(a,o),n=!0)},o(o){re(a,o),n=!1},d(o){o&&U(e),a&&a.d(o)}}}function DDe(r,e,t){const n=["dataType","align","height","width","wrap","verticalAlign","rowSpan","colSpan","show","cellColor","fontColor","topBorder","paddingLeft","borderBottom","compact"];let i=Lg(e,n),{$$slots:a={},$$scope:o}=e,{dataType:s=void 0}=e,{align:l=void 0}=e,{height:u=void 0}=e,{width:c=void 0}=e,{wrap:f=void 0}=e,{verticalAlign:h="middle"}=e,{rowSpan:d=1}=e,{colSpan:p=1}=e,{show:g=!0}=e,{cellColor:v=void 0}=e,{fontColor:m=void 0}=e,{topBorder:y=void 0}=e,{paddingLeft:b=void 0}=e,{borderBottom:_=void 0}=e,{compact:w=!1}=e;return r.$$set=S=>{e=En(En({},e),us(S)),t(15,i=Lg(e,n)),"dataType"in S&&t(0,s=S.dataType),"align"in S&&t(1,l=S.align),"height"in S&&t(2,u=S.height),"width"in S&&t(3,c=S.width),"wrap"in S&&t(4,f=S.wrap),"verticalAlign"in S&&t(5,h=S.verticalAlign),"rowSpan"in S&&t(6,d=S.rowSpan),"colSpan"in S&&t(7,p=S.colSpan),"show"in S&&t(8,g=S.show),"cellColor"in S&&t(9,v=S.cellColor),"fontColor"in S&&t(10,m=S.fontColor),"topBorder"in S&&t(11,y=S.topBorder),"paddingLeft"in S&&t(12,b=S.paddingLeft),"borderBottom"in S&&t(13,_=S.borderBottom),"compact"in S&&t(14,w=S.compact),"$$scope"in S&&t(16,o=S.$$scope)},[s,l,u,c,f,h,d,p,g,v,m,y,b,_,w,i,o,a]}class nc extends kr{constructor(e){super(),Tr(this,e,DDe,xDe,Mr,{dataType:0,align:1,height:2,width:3,wrap:4,verticalAlign:5,rowSpan:6,colSpan:7,show:8,cellColor:9,fontColor:10,topBorder:11,paddingLeft:12,borderBottom:13,compact:14})}}/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */var FM=function(r,e){return FM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},FM(r,e)};function pe(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");FM(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var EDe=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),kDe=function(){function r(){this.browser=new EDe,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return r}(),dr=new kDe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(dr.wxa=!0,dr.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?dr.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(dr.node=!0,dr.svgSupported=!0):TDe(navigator.userAgent,dr);function TDe(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),i&&(t.ie=!0,t.version=i[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}var bF=12,VZ="sans-serif",wf=bF+"px "+VZ,MDe=20,IDe=100,LDe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function FDe(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function eEe(r,e,t){for(var n=t?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,h=c.left,d=c.top;o.push(h,d),l=l&&a&&h===a[f]&&d===a[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=t?tN(s,o):tN(o,s))}function qZ(r){return r.nodeName.toUpperCase()==="CANVAS"}var tEe=/([&<>"'])/g,rEe={"&":"&","<":"<",">":">",'"':""","'":"'"};function to(r){return r==null?"":(r+"").replace(tEe,function(e,t){return rEe[t]})}var nEe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,CD=[],iEe=dr.browser.firefox&&+dr.browser.version.split(".")[0]<39;function UM(r,e,t,n){return t=t||{},n?nN(r,e,t):iEe&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):nN(r,e,t),t}function nN(r,e,t){if(dr.domSupported&&r.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(qZ(r)){var a=r.getBoundingClientRect();t.zrX=n-a.left,t.zrY=i-a.top;return}else if(VM(CD,r,n,i)){t.zrX=CD[0],t.zrY=CD[1];return}}t.zrX=t.zrY=0}function DF(r){return r||window.event}function Uo(r,e,t){if(e=DF(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&UM(r,o,e,t)}else{UM(r,e,e,t);var a=aEe(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&nEe.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function aEe(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var i=Math.abs(n!==0?n:t),a=n>0?-1:n<0?1:t>0?-1:1;return 3*i*a}function GM(r,e,t,n){r.addEventListener(e,t,n)}function oEe(r,e,t,n){r.removeEventListener(e,t,n)}var $u=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function iN(r){return r.which===2||r.which===3}var sEe=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},o=0,s=i.length;o1&&n&&n.length>1){var a=aN(n)/aN(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=lEe(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function To(){return[1,0,0,1,0,0]}function gA(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function EF(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Nu(r,e,t){var n=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function Kl(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function Gd(r,e,t,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return r[0]=i*f+s*c,r[1]=-i*c+s*f,r[2]=a*f+l*c,r[3]=-a*c+f*l,r[4]=f*(o-n[0])+c*(u-n[1])+n[0],r[5]=f*(u-n[1])-c*(o-n[0])+n[1],r}function kF(r,e,t){var n=t[0],i=t[1];return r[0]=e[0]*n,r[1]=e[1]*i,r[2]=e[2]*n,r[3]=e[3]*i,r[4]=e[4]*n,r[5]=e[5]*i,r}function kv(r,e){var t=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*n;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*i)*l,r[5]=(a*i-t*s)*l,r):null}function uEe(r){var e=To();return EF(e,r),e}var zt=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,i){e.x=t.x+n.x*i,e.y=t.y+n.y*i},r.lerp=function(e,t,n,i){var a=1-i;e.x=a*t.x+i*n.x,e.y=a*t.y+i*n.y},r}(),Wb=Math.min,$b=Math.max,Wf=new zt,$f=new zt,jf=new zt,qf=new zt,cm=new zt,fm=new zt,Gt=function(){function r(e,t,n,i){n<0&&(e=e+n,n=-n),i<0&&(t=t+i,i=-i),this.x=e,this.y=t,this.width=n,this.height=i}return r.prototype.union=function(e){var t=Wb(e.x,this.x),n=Wb(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=$b(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=$b(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,i=e.height/t.height,a=To();return Kl(a,a,[-t.x,-t.y]),kF(a,a,[n,i]),Kl(a,a,[e.x,e.y]),a},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,c=e.y,f=e.y+e.height,h=!(ap&&(p=b,gp&&(p=_,m=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];e.x=t.x*i+o,e.y=t.y*a+s,e.width=t.width*i,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Wf.x=jf.x=t.x,Wf.y=qf.y=t.y,$f.x=qf.x=t.x+t.width,$f.y=jf.y=t.y+t.height,Wf.transform(n),qf.transform(n),$f.transform(n),jf.transform(n),e.x=Wb(Wf.x,$f.x,jf.x,qf.x),e.y=Wb(Wf.y,$f.y,jf.y,qf.y);var l=$b(Wf.x,$f.x,jf.x,qf.x),u=$b(Wf.y,$f.y,jf.y,qf.y);e.width=l-e.x,e.height=u-e.y},r}(),YZ="silent";function cEe(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:fEe}}function fEe(){$u(this.event)}var hEe=function(r){Sn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(vs),hm=function(){function r(e,t){this.x=e,this.y=t}return r}(),dEe=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],xD=new Gt(0,0,0,0),ZZ=function(r){Sn(e,r);function e(t,n,i,a,o){var s=r.call(this)||this;return s._hovered=new hm(0,0),s.storage=t,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new hEe,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new KDe(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(B(dEe,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,i=t.zrY,a=KZ(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new hm(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new hm(0,0)},e.prototype.dispatch=function(t,n){var i=this[t];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,i){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+n,s=cEe(n,t,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(t,n,i){var a=this.storage.getDisplayList(),o=new hm(t,n);if(oN(a,o,t,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Gt(t-u,n-u,l,l),f=a.length-1;f>=0;f--){var h=a[f];h!==i&&!h.ignore&&!h.ignoreCoarsePointer&&(!h.parent||!h.parent.ignoreCoarsePointer)&&(xD.copy(h.getBoundingRect()),h.transform&&xD.applyTransform(h.transform),xD.intersect(c)&&s.push(h))}if(s.length)for(var d=4,p=Math.PI/12,g=Math.PI*2,v=0;v4)return;this._downPoint=null}this.dispatchToElement(a,r,e)}});function pEe(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?YZ:!0}return!1}function oN(r,e,t,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=pEe(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==YZ)){e.target=o;break}}}function KZ(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var XZ=32,dm=7;function gEe(r){for(var e=0;r>=XZ;)e|=r&1,r>>=1;return r+e}function sN(r,e,t,n){var i=e+1;if(i===t)return 1;if(n(r[i++],r[e])<0){for(;i=0;)i++;return i-e}function vEe(r,e,t){for(t--;e>>1,i(a,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function DD(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])>0){for(s=n-i;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o>>1);a(r,e[t+c])>0?o=c+1:l=c}return l}function ED(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])<0){for(s=i+1;ls&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o>>1);a(r,e[t+c])<0?l=c:o=c+1}return l}function mEe(r,e){var t=dm,n,i,a=0,o=[];n=[],i=[];function s(d,p){n[a]=d,i[a]=p,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]=dm||C>=dm);if(A)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),p===1){for(m=0;m=0;m--)r[S+m]=r[w+m];r[_]=o[b];return}for(var C=t;;){var A=0,x=0,D=!1;do if(e(o[b],r[y])<0){if(r[_--]=r[y--],A++,x=0,--p===0){D=!0;break}}else if(r[_--]=o[b--],x++,A=0,--v===1){D=!0;break}while((A|x)=0;m--)r[S+m]=r[w+m];if(p===0){D=!0;break}}if(r[_--]=o[b--],--v===1){D=!0;break}if(x=v-DD(r[y],o,0,v,v-1,e),x!==0){for(_-=x,b-=x,v-=x,S=_+1,w=b+1,m=0;m=dm||x>=dm);if(D)break;C<0&&(C=0),C+=2}if(t=C,t<1&&(t=1),v===1){for(_-=p,y-=p,S=_+1,w=y+1,m=p-1;m>=0;m--)r[S+m]=r[w+m];r[_]=o[b]}else{if(v===0)throw new Error;for(w=_-(v-1),m=0;ms&&(l=s),lN(r,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),i-=a,t+=a}while(i!==0);o.forceMergeRuns()}}var Co=1,n0=2,Pp=4,uN=!1;function kD(){uN||(uN=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function cN(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var yEe=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=cN}return r.prototype.traverse=function(e,t){for(var n=0;n0&&(c.__clipPaths=[]),isNaN(c.z)&&(kD(),c.z=0),isNaN(c.z2)&&(kD(),c.z2=0),isNaN(c.zlevel)&&(kD(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=e.getDecalElement&&e.getDecalElement();f&&this._updateAndAddDisplayable(f,t,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,t,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,t,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),S2;S2=dr.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var A0={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-A0.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?A0.bounceIn(r*2)*.5:A0.bounceOut(r*2-1)*.5+.5}},jb=Math.pow,rf=Math.sqrt,C2=1e-8,QZ=1e-4,fN=rf(3),qb=1/3,Dl=Ud(),Qo=Ud(),gg=Ud();function Yc(r){return r>-C2&&rC2||r<-C2}function yi(r,e,t,n,i){var a=1-i;return a*a*(a*r+3*i*e)+i*i*(i*n+3*a*t)}function hN(r,e,t,n,i){var a=1-i;return 3*(((e-r)*a+2*(t-e)*i)*a+(n-t)*i*i)}function A2(r,e,t,n,i,a){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-i,c=s*s-3*o*l,f=s*l-9*o*u,h=l*l-3*s*u,d=0;if(Yc(c)&&Yc(f))if(Yc(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var g=f*f-4*c*h;if(Yc(g)){var v=f/c,p=-s/o+v,m=-v/2;p>=0&&p<=1&&(a[d++]=p),m>=0&&m<=1&&(a[d++]=m)}else if(g>0){var y=rf(g),b=c*s+1.5*o*(-f+y),_=c*s+1.5*o*(-f-y);b<0?b=-jb(-b,qb):b=jb(b,qb),_<0?_=-jb(-_,qb):_=jb(_,qb);var p=(-s-(b+_))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var w=(2*c*s-3*o*f)/(2*rf(c*c*c)),S=Math.acos(w)/3,C=rf(c),A=Math.cos(S),p=(-s-2*C*A)/(3*o),m=(-s+C*(A+fN*Math.sin(S)))/(3*o),x=(-s+C*(A-fN*Math.sin(S)))/(3*o);p>=0&&p<=1&&(a[d++]=p),m>=0&&m<=1&&(a[d++]=m),x>=0&&x<=1&&(a[d++]=x)}}return d}function eK(r,e,t,n,i){var a=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(Yc(o)){if(JZ(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Yc(c))i[0]=-a/(2*o);else if(c>0){var f=rf(c),u=(-a+f)/(2*o),h=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function Cf(r,e,t,n,i,a){var o=(e-r)*i+r,s=(t-e)*i+e,l=(n-t)*i+t,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=n}function tK(r,e,t,n,i,a,o,s,l,u,c){var f,h=.005,d=1/0,p,g,v,m;Dl[0]=l,Dl[1]=u;for(var y=0;y<1;y+=.05)Qo[0]=yi(r,t,i,o,y),Qo[1]=yi(e,n,a,s,y),v=id(Dl,Qo),v=0&&v=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Yc(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=rf(c),u=(-o+f)/(2*a),h=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),h>=0&&h<=1&&(i[l++]=h)}}return l}function rK(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Fy(r,e,t,n,i){var a=(e-r)*n+r,o=(t-e)*n+e,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function nK(r,e,t,n,i,a,o,s,l){var u,c=.005,f=1/0;Dl[0]=o,Dl[1]=s;for(var h=0;h<1;h+=.05){Qo[0]=Bi(r,t,i,h),Qo[1]=Bi(e,n,a,h);var d=id(Dl,Qo);d=0&&d=1?1:A2(0,n,a,1,l,s)&&yi(0,i,o,1,s[0])}}}var CEe=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Kn,this.ondestroy=e.ondestroy||Kn,this.onrestart=e.onrestart||Kn,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=gt(e)?e:A0[e]||TF(e)},r}(),iK=function(){function r(e){this.value=e}return r}(),AEe=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new iK(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),O1=function(){function r(e){this._list=new AEe,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new iK(t),s.key=e,n.insertEntry(s),i[e]=s}return a},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),dN={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Vs(r){return r=Math.round(r),r<0?0:r>255?255:r}function xEe(r){return r=Math.round(r),r<0?0:r>360?360:r}function By(r){return r<0?0:r>1?1:r}function TD(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Vs(parseFloat(e)/100*255):Vs(parseInt(e,10))}function ad(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?By(parseFloat(e)/100):By(parseFloat(e))}function MD(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Zc(r,e,t){return r+(e-r)*t}function Vo(r,e,t,n,i){return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r}function WM(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var aK=new O1(20),Yb=null;function rp(r,e){Yb&&WM(Yb,e),Yb=aK.put(r,Yb||e.slice())}function Mo(r,e){if(r){e=e||[];var t=aK.get(r);if(t)return WM(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in dN)return WM(e,dN[n]),rp(r,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Vo(e,0,0,0,1);return}return Vo(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),rp(r,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Vo(e,0,0,0,1);return}return Vo(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),rp(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Vo(e,+u[0],+u[1],+u[2],1):Vo(e,0,0,0,1);c=ad(u.pop());case"rgb":if(u.length>=3)return Vo(e,TD(u[0]),TD(u[1]),TD(u[2]),u.length===3?c:ad(u[3])),rp(r,e),e;Vo(e,0,0,0,1);return;case"hsla":if(u.length!==4){Vo(e,0,0,0,1);return}return u[3]=ad(u[3]),$M(u,e),rp(r,e),e;case"hsl":if(u.length!==3){Vo(e,0,0,0,1);return}return $M(u,e),rp(r,e),e;default:return}}Vo(e,0,0,0,1)}}function $M(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=ad(r[1]),i=ad(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],Vo(e,Vs(MD(o,a,t+1/3)*255),Vs(MD(o,a,t)*255),Vs(MD(o,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function DEe(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),a=Math.max(e,t,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-t)/6+o/2)/o,h=((a-n)/6+o/2)/o;e===a?l=h-f:t===a?l=1/3+c-h:n===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return r[3]!=null&&d.push(r[3]),d}}function jM(r,e){var t=Mo(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return zu(t,t.length===4?"rgba":"rgb")}}function ID(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return t[0]=Vs(Zc(o[0],s[0],l)),t[1]=Vs(Zc(o[1],s[1],l)),t[2]=Vs(Zc(o[2],s[2],l)),t[3]=By(Zc(o[3],s[3],l)),t}}function EEe(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=Mo(e[i]),s=Mo(e[a]),l=n-i,u=zu([Vs(Zc(o[0],s[0],l)),Vs(Zc(o[1],s[1],l)),Vs(Zc(o[2],s[2],l)),By(Zc(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function x0(r,e,t,n){var i=Mo(r);if(r)return i=DEe(i),e!=null&&(i[0]=xEe(e)),t!=null&&(i[1]=ad(t)),n!=null&&(i[2]=ad(n)),zu($M(i),"rgba")}function x2(r,e){var t=Mo(r);if(t&&e!=null)return t[3]=By(e),zu(t,"rgba")}function zu(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function D2(r,e){var t=Mo(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var pN=new O1(100);function qM(r){if(Ze(r)){var e=pN.get(r);return e||(e=jM(r,-.1),pN.put(r,e)),e}else if(dA(r)){var t=be({},r);return t.colorStops=De(r.colorStops,function(n){return{offset:n.offset,color:jM(n.color,-.1)}}),t}return r}var E2=Math.round;function Oy(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Mo(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var gN=1e-4;function Kc(r){return r-gN}function Zb(r){return E2(r*1e3)/1e3}function YM(r){return E2(r*1e4)/1e4}function kEe(r){return"matrix("+Zb(r[0])+","+Zb(r[1])+","+Zb(r[2])+","+Zb(r[3])+","+YM(r[4])+","+YM(r[5])+")"}var TEe={left:"start",right:"end",center:"middle",middle:"middle"};function MEe(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function IEe(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function LEe(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function oK(r){return r&&!!r.image}function FEe(r){return r&&!!r.svgElement}function MF(r){return oK(r)||FEe(r)}function sK(r){return r.type==="linear"}function lK(r){return r.type==="radial"}function uK(r){return r&&(r.type==="linear"||r.type==="radial")}function vA(r){return"url(#"+r+")"}function cK(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function fK(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*Aw,i=Lt(r.scaleX,1),a=Lt(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+E2(o*Aw)+"deg, "+E2(s*Aw)+"deg)"),l.join(" ")}var BEe=function(){return dr.hasGlobalWindow&>(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),ZM=Array.prototype.slice;function _u(r,e,t){return(e-r)*t+r}function LD(r,e,t,n){for(var i=e.length,a=0;an?e:r,a=Math.min(t,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)n.length=o;else for(var l=a;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=mN,l=t;if(ba(t)){var u=NEe(t);s=u,(u===1&&!Or(t[0])||u===2&&!Or(t[0][0]))&&(o=!0)}else if(Or(t)&&!Ly(t))s=Xb;else if(Ze(t))if(!isNaN(+t))s=Xb;else{var c=Mo(t);c&&(l=c,s=i0)}else if(dA(t)){var f=be({},l);f.colorStops=De(t.colorStops,function(d){return{offset:d.offset,color:Mo(d.color)}}),sK(t)?s=KM:lK(t)&&(s=XM),l=f}a===0?this.valType=s:(s!==this.valType||s===mN)&&(o=!0),this.discrete=this.discrete||o;var h={time:e,value:l,rawValue:t,percent:0};return n&&(h.easing=n,h.easingFunc=gt(n)?n:A0[n]||TF(n)),i.push(h),h},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(g,v){return g.time-v.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Qb(i),u=yN(i),c=0;c=0&&!(o[c].percent<=t);c--);c=h(c,s-2)}else{for(c=f;ct);c++);c=h(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=t;var v=p.percent-d.percent,m=v===0?1:h((t-d.percent)/v,1);p.easingFunc&&(m=p.easingFunc(m));var y=n?this._additiveValue:u?pm:e[l];if((Qb(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?d.rawValue:p.rawValue;else if(Qb(a))a===Tw?LD(y,d[i],p[i],m):OEe(y,d[i],p[i],m);else if(yN(a)){var b=d[i],_=p[i],w=a===KM;e[l]={type:w?"linear":"radial",x:_u(b.x,_.x,m),y:_u(b.y,_.y,m),colorStops:De(b.colorStops,function(C,A){var x=_.colorStops[A];return{offset:_u(C.offset,x.offset,m),color:kw(LD([],C.color,x.color,m))}}),global:_.global},w?(e[l].x2=_u(b.x2,_.x2,m),e[l].y2=_u(b.y2,_.y2,m)):e[l].r=_u(b.r,_.r,m)}else if(u)LD(y,d[i],p[i],m),n||(e[l]=kw(y));else{var S=_u(d[i],p[i],m);n?this._additiveValue=S:e[l]=S}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,i=this._additiveValue;t===Xb?e[n]=e[n]+i:t===i0?(Mo(e[n],pm),Kb(pm,pm,i,1),e[n]=kw(pm)):t===Tw?Kb(e[n],e[n],i,1):t===hK&&vN(e[n],e[n],i,1)},r}(),IF=function(){function r(e,t,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){SF("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,vr(t),n)},r.prototype.whenWithKeys=function(e,t,n,i){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,D0(u),i),this._trackKeys.push(s)}l.addKeyframe(e,D0(t[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],i=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function qp(){return new Date().getTime()}var VEe=function(r){Sn(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,i=t.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=qp()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(S2(n),!t._paused&&t.update())}S2(n)},e.prototype.start=function(){this._running||(this._time=qp(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=qp(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=qp()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var i=new IF(t,n.loop);return this.addAnimator(i),i},e}(vs),UEe=300,FD=dr.domSupported,BD=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=De(r,function(i){var a=i.replace("mouse","pointer");return t.hasOwnProperty(a)?a:i});return{mouse:r,touch:e,pointer:n}}(),bN={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},_N=!1;function QM(r){var e=r.pointerType;return e==="pen"||e==="touch"}function GEe(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function OD(r){r&&(r.zrByTouch=!0)}function HEe(r,e){return Uo(r.dom,new WEe(r,e),!0)}function dK(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var WEe=function(){function r(e,t){this.stopPropagation=Kn,this.stopImmediatePropagation=Kn,this.preventDefault=Kn,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),As={mousedown:function(r){r=Uo(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=Uo(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=Uo(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=Uo(this.dom,r);var e=r.toElement||r.relatedTarget;dK(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){_N=!0,r=Uo(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){_N||(r=Uo(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=Uo(this.dom,r),OD(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),As.mousemove.call(this,r),As.mousedown.call(this,r)},touchmove:function(r){r=Uo(this.dom,r),OD(r),this.handler.processGesture(r,"change"),As.mousemove.call(this,r)},touchend:function(r){r=Uo(this.dom,r),OD(r),this.handler.processGesture(r,"end"),As.mouseup.call(this,r),+new Date-+this.__lastTouchMomentCN||r<-CN}var Zf=[],np=[],RD=To(),ND=Math.abs,Fu=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Yf(this.rotation)||Yf(this.x)||Yf(this.y)||Yf(this.scaleX-1)||Yf(this.scaleY-1)||Yf(this.skewX)||Yf(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(SN(n),this.invTransform=null);return}n=n||To(),t?this.getLocalTransform(n):SN(n),e&&(t?Nu(n,e,n):EF(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Zf);var n=Zf[0]<0?-1:1,i=Zf[1]<0?-1:1,a=((Zf[0]-n)*t+n)/Zf[0]||0,o=((Zf[1]-i)*t+i)/Zf[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||To(),kv(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||To(),Nu(np,e.invTransform,t),t=np);var n=this.originX,i=this.originY;(n||i)&&(RD[4]=n,RD[5]=i,Nu(np,t,RD),np[4]-=n,np[5]-=i,t=np),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&Ji(n,n,i),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&Ji(n,n,i),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&ND(e[0]-1)>1e-10&&ND(e[3]-1)>1e-10?Math.sqrt(ND(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){gK(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,h=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;t[4]=-p*a-h*g*o,t[5]=-g*o-d*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=d*a,t[2]=h*o,u&&Gd(t,t,u),t[4]+=n+c,t[5]+=i+f,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Xl=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function gK(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function T2(r,e,t){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,c="left",f="top";if(n instanceof Array)l+=Ys(n[0],t.width),u+=Ys(n[1],t.height),c=null,f=null;else switch(n){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var zD="__zr_normal__",VD=Xl.concat(["ignore"]),ZEe=Zl(Xl,function(r,e){return r[e]=!0,r},{ignore:!1}),ip={},KEe=new Gt(0,0,0,0),yA=function(){function r(e){this.id=HZ(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(t),n.position!=null){var c=KEe;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(ip,n,c):T2(ip,n,c),a.x=ip.x,a.y=ip.y,o=ip.align,s=ip.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var h=void 0,d=void 0;f==="center"?(h=c.width*.5,d=c.height*.5):(h=Ys(f[0],c.width),d=Ys(f[1],c.height)),u=!0,a.originX=-a.x+h+(i?0:c.x),a.originY=-a.y+d+(i?0:c.y)}}n.rotation!=null&&(a.rotation=n.rotation);var p=n.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var g=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,b=void 0;g&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),b=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),b=!0)),m=m||"#000",(m!==v.fill||y!==v.stroke||b!==v.autoStroke||o!==v.align||s!==v.verticalAlign)&&(l=!0,v.fill=m,v.stroke=y,v.autoStroke=b,v.align=o,v.verticalAlign=s,t.setDefaultTextStyle(v)),t.__dirty|=Co,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?rI:tI},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&Mo(t);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,zu(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},be(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(_t(e))for(var n=e,i=vr(n),a=0;a0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(zD,!1,e)},r.prototype.useState=function(e,t,n,i){var a=e===zD,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(Qt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){SF("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,h=this._textGuide;return f&&f.useState(e,t,n,c),h&&h.useState(e,t,n,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Co),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l0,p);var g=this._textContent,v=this._textGuide;g&&g.useStates(e,t,h),v&&v.useStates(e,t,h),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Co)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var i=this.currentStates.slice(),a=Qt(i,e),o=Qt(i,t)>=0;a>=0?o?i.splice(a,1):i[a]=t:n&&!o&&i.push(t),this.useStates(i)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,i=0;i=0&&a.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,i=n.length,a=[],o=0;o0&&t.during&&a[0].during(function(p,g){t.during(g)});for(var h=0;h0||i.force&&!o.length){var A=void 0,x=void 0,D=void 0;if(s){x={},h&&(A={});for(var _=0;_=0&&(i.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var i=Qt(this._children,t);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(t,n){var i=this._children,a=i[n];if(t&&t!==this&&t.parent!==this&&t!==a){i[n]=t,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,i=this._children,a=Qt(i,t);return a<0?this:(i.splice(a,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}function $e(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Ze(r)?ske(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function $n(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),yK),r=(+r).toFixed(e),t?r:+r}function as(r){return r.sort(function(e,t){return e-t}),r}function Ll(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return lke(r)}function lke(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,i=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function bK(r,e){var t=Math.log,n=Math.LN10,i=Math.floor(t(r[1]-r[0])/n),a=Math.round(t(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function uke(r,e){var t=Zl(r,function(d,p){return d+(isNaN(p)?0:p)},0);if(t===0)return[];for(var n=Math.pow(10,e),i=De(r,function(d){return(isNaN(d)?0:d)/t*n*100}),a=n*100,o=De(i,function(d){return Math.floor(d)}),s=Zl(o,function(d,p){return d+p},0),l=De(i,function(d,p){return d-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return De(o,function(d){return d/n})}function cke(r,e){var t=Math.max(Ll(r),Ll(e)),n=r+e;return t>yK?n:$n(n,t)}var kN=9007199254740991;function _K(r){var e=Math.PI*2;return(r%e+e)%e}function Py(r){return r>-EN&&r=10&&e++,e}function wK(r,e){var t=LF(r),n=Math.pow(10,t),i=r/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,r=a*n,t>=-20?+r.toFixed(t<0?-t:0):r}function HD(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),i=+r[n-1],a=t-n;return a?i+a*(r[n]-i):i}function TN(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n=0||a&&Qt(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var Pke=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Rke=Dd(Pke),Nke=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return Rke(this,e,t)},r}(),aI=new O1(50);function zke(r){if(typeof r=="string"){var e=aI.get(r);return e&&e.image}else return r}function PF(r,e,t,n,i){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var a=aI.get(r),o={hostEl:t,cb:n,cbPayload:i};return a?(e=a.image,!_A(e)&&a.pending.push(o)):(e=Sf.loadImage(r,FN,FN),e.__zrImageSrc=r,aI.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function FN(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=Io(t,e);return u>s&&(t="",u=0),s=r-u,i.ellipsis=t,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function BK(r,e){var t=e.containerWidth,n=e.font,i=e.contentWidth;if(!t)return"";var a=Io(r,n);if(a<=t)return r;for(var o=0;;o++){if(a<=i||o>=e.maxIterations){r+=e.ellipsis;break}var s=o===0?Uke(r,i,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(r.length*i/a):0;r=r.substr(0,s),a=Io(r,n)}return r===""&&(r=e.placeholder),r}function Uke(r,e,t,n){for(var i=0,a=0,o=r.length;ad&&u){var p=Math.floor(d/s);f=f.slice(0,p)}if(r&&a&&c!=null)for(var g=FK(c,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;vs&&$D(t,r.substring(s,u),e,o),$D(t,l[2],e,o,l[1]),s=WD.lastIndex}si){w>0?(y.tokens=y.tokens.slice(0,w),v(y,_,b),t.lines=t.lines.slice(0,m+1)):t.lines=t.lines.slice(0,m);break e}var k=C.width,M=k==null||k==="auto";if(typeof k=="string"&&k.charAt(k.length-1)==="%")S.percentWidth=k,c.push(S),S.contentWidth=Io(S.text,D);else{if(M){var T=C.backgroundColor,L=T&&T.image;L&&(L=zke(L),_A(L)&&(S.width=Math.max(S.width,L.width*E/L.height)))}var F=p&&n!=null?n-_:null;F!=null&&F0&&p+n.accumWidth>n.width&&(c=e.split(` +`),u=!0),n.accumWidth=p}else{var g=OK(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,f=g.linesWidths,c=g.lines}}else c=e.split(` +`);for(var v=0;v=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var qke=Zl(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function Yke(r){return jke(r)?!!qke[r]:!0}function OK(r,e,t,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,f=0;ft:i+c+d>t){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=h,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=h,c=d)):p?(a.push(l),o.push(u),l=h,u=d):(a.push(h),o.push(d));continue}c+=d,p?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}var oI="__zr_style_"+Math.round(Math.random()*10),od={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},wA={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};od[oI]=!0;var ON=["z","z2","invisible"],Zke=["invisible"],ds=function(r){Sn(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=vr(t),i=0;i1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(Jb[0]=ZD(i)*t+r,Jb[1]=YD(i)*n+e,e_[0]=ZD(a)*t+r,e_[1]=YD(a)*n+e,u(s,Jb,e_),c(l,Jb,e_),i=i%Xf,i<0&&(i=i+Xf),a=a%Xf,a<0&&(a=a+Xf),i>a&&!o?a+=Xf:ii&&(t_[0]=ZD(d)*t+r,t_[1]=YD(d)*n+e,u(s,t_,s),c(l,t_,l))}var sn={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qf=[],Jf=[],ll=[],fc=[],ul=[],cl=[],KD=Math.min,XD=Math.max,eh=Math.cos,th=Math.sin,hu=Math.abs,sI=Math.PI,Cc=sI*2,QD=typeof Float32Array<"u",gm=[];function JD(r){var e=Math.round(r/sI*1e8)/1e8;return e%2*sI}function RF(r,e){var t=JD(r[0]);t<0&&(t+=Cc);var n=t-r[0],i=r[1];i+=n,!e&&i-t>=Cc?i=t+Cc:e&&t-i>=Cc?i=t-Cc:!e&&t>i?i=t+(Cc-JD(t-i)):e&&t0&&(this._ux=hu(n/k2/e)||0,this._uy=hu(n/k2/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(sn.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=hu(e-this._xi),i=hu(t-this._yi),a=n>this._ux||i>this._uy;if(this.addData(sn.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,i,a,o){return this._drawPendingPt(),this.addData(sn.C,e,t,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,i){return this._drawPendingPt(),this.addData(sn.Q,e,t,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(e,t,n,i,a,o){this._drawPendingPt(),gm[0]=i,gm[1]=a,RF(gm,o),i=gm[0],a=gm[1];var s=a-i;return this.addData(sn.A,e,t,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,i,a,o),this._xi=eh(a)*n+e,this._yi=th(a)*n+t,this},r.prototype.arcTo=function(e,t,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,i,a),this},r.prototype.rect=function(e,t,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,i),this.addData(sn.R,e,t,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(sn.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&QD&&(this.data=new Float32Array(t));for(var n=0;nc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){ll[0]=ll[1]=ul[0]=ul[1]=Number.MAX_VALUE,fc[0]=fc[1]=cl[0]=cl[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,i=0,a=0,o;for(o=0;on||hu(b)>i||h===t-1)&&(g=Math.sqrt(y*y+b*b),a=v,o=m);break}case sn.C:{var _=e[h++],w=e[h++],v=e[h++],m=e[h++],S=e[h++],C=e[h++];g=bEe(a,o,_,w,v,m,S,C,10),a=S,o=C;break}case sn.Q:{var _=e[h++],w=e[h++],v=e[h++],m=e[h++];g=wEe(a,o,_,w,v,m,10),a=v,o=m;break}case sn.A:var A=e[h++],x=e[h++],D=e[h++],E=e[h++],k=e[h++],M=e[h++],T=M+k;h+=1,p&&(s=eh(k)*D+A,l=th(k)*E+x),g=XD(D,E)*KD(Cc,Math.abs(M)),a=eh(T)*D+A,o=th(T)*E+x;break;case sn.R:{s=a=e[h++],l=o=e[h++];var L=e[h++],F=e[h++];g=L*2+F*2;break}case sn.Z:{var y=s-a,b=l-o;g=Math.sqrt(y*y+b*b),a=s,o=l;break}}g>=0&&(u[f++]=g,c+=g)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,f,h,d=t<1,p,g,v=0,m=0,y,b=0,_,w;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,y=t*g,!y)))e:for(var S=0;S0&&(e.lineTo(_,w),b=0),C){case sn.M:s=u=n[S++],l=c=n[S++],e.moveTo(u,c);break;case sn.L:{f=n[S++],h=n[S++];var x=hu(f-u),D=hu(h-c);if(x>i||D>a){if(d){var E=p[m++];if(v+E>y){var k=(y-v)/E;e.lineTo(u*(1-k)+f*k,c*(1-k)+h*k);break e}v+=E}e.lineTo(f,h),u=f,c=h,b=0}else{var M=x*x+D*D;M>b&&(_=f,w=h,b=M)}break}case sn.C:{var T=n[S++],L=n[S++],F=n[S++],N=n[S++],z=n[S++],W=n[S++];if(d){var E=p[m++];if(v+E>y){var k=(y-v)/E;Cf(u,T,F,z,k,Qf),Cf(c,L,N,W,k,Jf),e.bezierCurveTo(Qf[1],Jf[1],Qf[2],Jf[2],Qf[3],Jf[3]);break e}v+=E}e.bezierCurveTo(T,L,F,N,z,W),u=z,c=W;break}case sn.Q:{var T=n[S++],L=n[S++],F=n[S++],N=n[S++];if(d){var E=p[m++];if(v+E>y){var k=(y-v)/E;Fy(u,T,F,k,Qf),Fy(c,L,N,k,Jf),e.quadraticCurveTo(Qf[1],Jf[1],Qf[2],Jf[2]);break e}v+=E}e.quadraticCurveTo(T,L,F,N),u=F,c=N;break}case sn.A:var H=n[S++],R=n[S++],ne=n[S++],te=n[S++],fe=n[S++],Ce=n[S++],Te=n[S++],Se=!n[S++],_e=ne>te?ne:te,$=hu(ne-te)>.001,q=fe+Ce,j=!1;if(d){var E=p[m++];v+E>y&&(q=fe+Ce*(y-v)/E,j=!0),v+=E}if($&&e.ellipse?e.ellipse(H,R,ne,te,Te,fe,q,Se):e.arc(H,R,_e,fe,q,Se),j)break e;A&&(s=eh(fe)*ne+H,l=th(fe)*te+R),u=eh(q)*ne+H,c=th(q)*te+R;break;case sn.R:s=u=n[S],l=c=n[S+1],f=n[S++],h=n[S++];var he=n[S++],Q=n[S++];if(d){var E=p[m++];if(v+E>y){var ye=y-v;e.moveTo(f,h),e.lineTo(f+KD(ye,he),h),ye-=he,ye>0&&e.lineTo(f+he,h+KD(ye,Q)),ye-=Q,ye>0&&e.lineTo(f+XD(he-ye,0),h+Q),ye-=he,ye>0&&e.lineTo(f,h+XD(Q-ye,0));break e}v+=E}e.rect(f,h,he,Q);break;case sn.Z:if(d){var E=p[m++];if(v+E>y){var k=(y-v)/E;e.lineTo(u*(1-k)+s*k,c*(1-k)+l*k);break e}v+=E}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=sn,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function Ic(r,e,t,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>e+s&&o>n+s||or+s&&a>t+s||ae+f&&c>n+f&&c>a+f&&c>s+f||cr+f&&u>t+f&&u>i+f&&u>o+f||ue+u&&l>n+u&&l>a+u||lr+u&&s>t+u&&s>i+u||st||c+ui&&(i+=vm);var h=Math.atan2(l,s);return h<0&&(h+=vm),h>=n&&h<=i||h+vm>=n&&h+vm<=i}function wu(r,e,t,n,i,a){if(a>e&&a>n||ai?s:0}var hc=Jl.CMD,rh=Math.PI*2,rTe=1e-4;function nTe(r,e){return Math.abs(r-e)e&&u>n&&u>a&&u>s||u1&&iTe(),d=yi(e,n,a,s,jo[0]),h>1&&(p=yi(e,n,a,s,jo[1]))),h===2?ve&&s>n&&s>a||s=0&&u<=1){for(var c=0,f=Bi(e,n,a,u),h=0;ht||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Ma[0]=-l,Ma[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=rh-1e-4){n=0,i=rh;var c=a?1:-1;return o>=Ma[0]+r&&o<=Ma[1]+r?c:0}if(n>i){var f=n;n=i,i=f}n<0&&(n+=rh,i+=rh);for(var h=0,d=0;d<2;d++){var p=Ma[d];if(p+r>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=rh+g),(g>=n&&g<=i||g+rh>=n&&g+rh<=i)&&(g>Math.PI/2&&g1&&(t||(s+=wu(l,u,c,f,n,i))),v&&(l=a[p],u=a[p+1],c=l,f=u),g){case hc.M:c=a[p++],f=a[p++],l=c,u=f;break;case hc.L:if(t){if(Ic(l,u,a[p],a[p+1],e,n,i))return!0}else s+=wu(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case hc.C:if(t){if(eTe(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=aTe(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case hc.Q:if(t){if(PK(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=oTe(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case hc.A:var m=a[p++],y=a[p++],b=a[p++],_=a[p++],w=a[p++],S=a[p++];p+=1;var C=!!(1-a[p++]);h=Math.cos(w)*b+m,d=Math.sin(w)*_+y,v?(c=h,f=d):s+=wu(l,u,h,d,n,i);var A=(n-m)*_/b+m;if(t){if(tTe(m,y,_,w,w+S,C,e,A,i))return!0}else s+=sTe(m,y,_,w,w+S,C,A,i);l=Math.cos(w+S)*b+m,u=Math.sin(w+S)*_+y;break;case hc.R:c=l=a[p++],f=u=a[p++];var x=a[p++],D=a[p++];if(h=c+x,d=f+D,t){if(Ic(c,f,h,f,e,n,i)||Ic(h,f,h,d,e,n,i)||Ic(h,d,c,d,e,n,i)||Ic(c,d,c,f,e,n,i))return!0}else s+=wu(h,f,h,d,n,i),s+=wu(c,d,c,f,n,i);break;case hc.Z:if(t){if(Ic(l,u,c,f,e,n,i))return!0}else s+=wu(l,u,c,f,n,i);l=c,u=f;break}}return!t&&!nTe(u,f)&&(s+=wu(l,u,c,f,n,i)||0),s!==0}function lTe(r,e,t){return RK(r,0,!1,e,t)}function uTe(r,e,t,n){return RK(r,e,!0,t,n)}var M2=yt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},od),cTe={style:yt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},wA.style)},eE=Xl.concat(["invisible","culling","z","z2","zlevel","parent"]),sr=function(r){Sn(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){t.buildPath(l,t.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s.5?tI:n>.2?YEe:rI}else if(t)return rI}return tI},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(Ze(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=D2(t,0)0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&Pp)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||i){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect(),o=this.style;if(t=i[0],n=i[1],a.contain(t,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),uTe(s,l/u,t,n)))return!0}if(this.hasFill())return lTe(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Pp,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var i=this.shape;return i||(i=this.shape={}),typeof t=="string"?i[t]=n:be(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Pp)},e.prototype.createStyle=function(t){return pA(M2,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=be({},this.shape))},e.prototype._applyStateObj=function(t,n,i,a,o,s){r.prototype._applyStateObj.call(this,t,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=be({},i.shape),be(u,n.shape)):(u=be({},a?this.shape:i.shape),be(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=be({},this.shape);for(var c={},f=vr(u),h=0;h0},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.createStyle=function(t){return pA(fTe,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var n=t.text;n!=null?n+="":n="";var i=P1(n,t.font,t.textAlign,t.textBaseline);if(i.x+=t.x||0,i.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(ds);ev.prototype.type="tspan";var hTe=yt({x:0,y:0},od),dTe={style:yt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},wA.style)};function pTe(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var $i=function(r){Sn(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return pA(hTe,t)},e.prototype._getSize=function(t){var n=this.style,i=n[t];if(i!=null)return i;var a=pTe(n.image)?n.image:this.__image;if(!a)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?a[t]:a[t]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return dTe},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Gt(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(ds);$i.prototype.type="image";function gTe(r,e){var t=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,c;i<0&&(t=t+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>i&&(f=s+l,s*=i/f,l*=i/f),u+c>i&&(f=u+c,u*=i/f,c*=i/f),l+u>a&&(f=l+u,l*=a/f,u*=a/f),s+c>a&&(f=s+c,s*=a/f,c*=a/f),r.moveTo(t+s,n),r.lineTo(t+i-l,n),l!==0&&r.arc(t+i-l,n+l,l,-Math.PI/2,0),r.lineTo(t+i,n+a-u),u!==0&&r.arc(t+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(t+c,n+a),c!==0&&r.arc(t+c,n+a-c,c,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var Yp=Math.round;function NK(r,e,t){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=t&&t.lineWidth;return s&&(Yp(n*2)===Yp(i*2)&&(r.x1=r.x2=Nh(n,s,!0)),Yp(a*2)===Yp(o*2)&&(r.y1=r.y2=Nh(a,s,!0))),r}}function zK(r,e,t){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Nh(n,s,!0),r.y=Nh(i,s,!0),r.width=Math.max(Nh(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(Nh(i+o,s,!1)-r.y,o===0?0:1)),r}}function Nh(r,e,t){if(!e)return r;var n=Yp(r*2);return(n+Yp(e))%2===0?n/2:(n+(t?1:-1))/2}var vTe=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),mTe={},_r=function(r){Sn(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new vTe},e.prototype.buildPath=function(t,n){var i,a,o,s;if(this.subPixelOptimize){var l=zK(mTe,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?gTe(t,n):t.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(sr);_r.prototype.type="rect";var VN={fill:"#000"},UN=2,yTe={style:yt({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},wA.style)},Er=function(r){Sn(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=VN,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,k=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),M=o.calculatedLineHeight,T=0;T=0&&(T=S[M],T.align==="right");)this._placeToken(T,t,A,m,k,"right",b),x-=T.width,k-=T.width,M--;for(E+=(a-(E-v)-(y-k)-x)/2;D<=M;)T=S[D],this._placeToken(T,t,A,m,E+T.width/2,"center",b),E+=T.width,D++;m+=A}},e.prototype._placeToken=function(t,n,i,a,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,f=a+i/2;c==="top"?f=a+t.height/2:c==="bottom"&&(f=a+i-t.height/2);var h=!t.isLineHolder&&tE(u);h&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,f-t.height/2,t.width,t.height);var d=!!u.backgroundColor,p=t.textPadding;p&&(o=qN(o,s,p),f-=t.height/2-p[0]-t.innerHeight/2);var g=this._getOrCreateChild(ev),v=g.createStyle();g.useStyle(v);var m=this._defaultStyle,y=!1,b=0,_=jN("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),w=$N("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!m.autoStroke||y)?(b=UN,m.stroke):null),S=u.textShadowBlur>0||n.textShadowBlur>0;v.text=t.text,v.x=o,v.y=f,S&&(v.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,v.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",v.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,v.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=t.font||wf,v.opacity=zl(u.opacity,n.opacity,1),HN(v,u),w&&(v.lineWidth=zl(u.lineWidth,n.lineWidth,b),v.lineDash=Lt(u.lineDash,n.lineDash),v.lineDashOffset=n.lineDashOffset||0,v.stroke=w),_&&(v.fill=_);var C=t.contentWidth,A=t.contentHeight;g.setBoundingRect(new Gt(a0(v.x,C,v.textAlign),Rp(v.y,A,v.textBaseline),C,A))},e.prototype._renderBackground=function(t,n,i,a,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,f=l&&l.image,h=l&&!f,d=t.borderRadius,p=this,g,v;if(h||t.lineHeight||u&&c){g=this._getOrCreateChild(_r),g.useStyle(g.createStyle()),g.style.fill=null;var m=g.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=d,g.dirtyShape()}if(h){var y=g.style;y.fill=l||null,y.fillOpacity=Lt(t.fillOpacity,1)}else if(f){v=this._getOrCreateChild($i),v.onload=function(){p.dirtyStyle()};var b=v.style;b.image=l.image,b.x=i,b.y=a,b.width=o,b.height=s}if(u&&c){var y=g.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=Lt(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var _=(g||v).style;_.shadowBlur=t.shadowBlur||0,_.shadowColor=t.shadowColor||"transparent",_.shadowOffsetX=t.shadowOffsetX||0,_.shadowOffsetY=t.shadowOffsetY||0,_.opacity=zl(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return UK(t)&&(n=[t.fontStyle,t.fontWeight,VK(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&Ps(n)||t.textFont||t.font},e}(ds),bTe={left:!0,right:1,center:1},_Te={top:1,bottom:1,middle:1},GN=["fontStyle","fontWeight","fontSize","fontFamily"];function VK(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?bF+"px":r+"px"}function HN(r,e){for(var t=0;t=0,a=!1;if(r instanceof sr){var o=GK(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(ap(s)||ap(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=be({},n),u=be({},u),u.fill=s):!ap(u.fill)&&ap(s)?(a=!0,n=be({},n),u=be({},u),u.fill=qM(s)):!ap(u.stroke)&&ap(l)&&(a||(n=be({},n),u=be({},u)),u.stroke=qM(l)),n.style=u}}if(n&&n.z2==null){a||(n=be({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c??Mv)}return n}function ETe(r,e,t){if(t&&t.z2==null){t=be({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??STe)}return t}function kTe(r,e,t){var n=Qt(r.currentStates,e)>=0,i=r.style.opacity,a=n?null:xTe(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=be({},t),o=be({opacity:n?i:a.opacity*.1},o),t.style=o),t}function rE(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return DTe(this,r,e,t);if(r==="blur")return kTe(this,r,t);if(r==="select")return ETe(this,r,t)}return t}function Ed(r){r.stateProxy=rE;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=rE),t&&(t.stateProxy=rE)}function QN(r,e){!ZK(r,e)&&!r.__highByOuter&&ic(r,HK)}function JN(r,e){!ZK(r,e)&&!r.__highByOuter&&ic(r,WK)}function qu(r,e){r.__highByOuter|=1<<(e||0),ic(r,HK)}function Yu(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&ic(r,WK)}function jK(r){ic(r,VF)}function UF(r){ic(r,$K)}function qK(r){ic(r,CTe)}function YK(r){ic(r,ATe)}function ZK(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function KK(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(i,a){var o=NF(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){$K(u)}),s&&t.push(a)),o.isBlured=!1}),B(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(t,!1,e)})}function uI(r,e,t,n){var i=n.getModel();t=t||"coordinateSystem";function a(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:t.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function ld(r,e,t){zh(r,!0),ic(r,Ed),fI(r,e,t)}function BTe(r){zh(r,!1)}function Vn(r,e,t,n){n?BTe(r):ld(r,e,t)}function fI(r,e,t){var n=Dt(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var t6=["emphasis","blur","select"],OTe={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ea(r,e,t,n){t=t||"itemStyle";for(var i=0;i1&&(o*=nE(p),s*=nE(p));var g=(i===a?-1:1)*nE((o*o*(s*s)-o*o*(d*d)-s*s*(h*h))/(o*o*(d*d)+s*s*(h*h)))||0,v=g*o*d/s,m=g*-s*h/o,y=(r+t)/2+n_(f)*v-r_(f)*m,b=(e+n)/2+r_(f)*v+n_(f)*m,_=a6([1,0],[(h-v)/o,(d-m)/s]),w=[(h-v)/o,(d-m)/s],S=[(-1*h-v)/o,(-1*d-m)/s],C=a6(w,S);if(dI(w,S)<=-1&&(C=mm),dI(w,S)>=1&&(C=0),C<0){var A=Math.round(C/mm*1e6)/1e6;C=mm*2+A%2*mm}c.addData(u,y,b,o,s,_,C,f,a)}var UTe=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,GTe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function HTe(r){var e=new Jl;if(!r)return e;var t=0,n=0,i=t,a=n,o,s=Jl.CMD,l=r.match(UTe);if(!l)return e;for(var u=0;uT*T+L*L&&(A=D,x=E),{cx:A,cy:x,x0:-c,y0:-f,x1:A*(i/w-1),y1:x*(i/w-1)}}function KTe(r){var e;if(Ae(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function XTe(r,e){var t,n=o0(e.r,0),i=o0(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,f=e.cy,h=!!e.clockwise,d=s6(u-l),p=d>iE&&d%iE;if(p>Cs&&(d=p),!(n>Cs))r.moveTo(c,f);else if(d>iE-Cs)r.moveTo(c+n*sp(l),f+n*nh(l)),r.arc(c,f,n,l,u,!h),i>Cs&&(r.moveTo(c+i*sp(u),f+i*nh(u)),r.arc(c,f,i,u,l,h));else{var g=void 0,v=void 0,m=void 0,y=void 0,b=void 0,_=void 0,w=void 0,S=void 0,C=void 0,A=void 0,x=void 0,D=void 0,E=void 0,k=void 0,M=void 0,T=void 0,L=n*sp(l),F=n*nh(l),N=i*sp(u),z=i*nh(u),W=d>Cs;if(W){var H=e.cornerRadius;H&&(t=KTe(H),g=t[0],v=t[1],m=t[2],y=t[3]);var R=s6(n-i)/2;if(b=fl(R,m),_=fl(R,y),w=fl(R,g),S=fl(R,v),x=C=o0(b,_),D=A=o0(w,S),(C>Cs||A>Cs)&&(E=n*sp(u),k=n*nh(u),M=i*sp(l),T=i*nh(l),dCs){var $=fl(m,x),q=fl(y,x),j=i_(M,T,L,F,n,$,h),he=i_(E,k,N,z,n,q,h);r.moveTo(c+j.cx+j.x0,f+j.cy+j.y0),x0&&r.arc(c+j.cx,f+j.cy,$,aa(j.y0,j.x0),aa(j.y1,j.x1),!h),r.arc(c,f,n,aa(j.cy+j.y1,j.cx+j.x1),aa(he.cy+he.y1,he.cx+he.x1),!h),q>0&&r.arc(c+he.cx,f+he.cy,q,aa(he.y1,he.x1),aa(he.y0,he.x0),!h))}else r.moveTo(c+L,f+F),r.arc(c,f,n,l,u,!h);if(!(i>Cs)||!W)r.lineTo(c+N,f+z);else if(D>Cs){var $=fl(g,D),q=fl(v,D),j=i_(N,z,E,k,i,-q,h),he=i_(L,F,M,T,i,-$,h);r.lineTo(c+j.cx+j.x0,f+j.cy+j.y0),D0&&r.arc(c+j.cx,f+j.cy,q,aa(j.y0,j.x0),aa(j.y1,j.x1),!h),r.arc(c,f,i,aa(j.cy+j.y1,j.cx+j.x1),aa(he.cy+he.y1,he.cx+he.x1),h),$>0&&r.arc(c+he.cx,f+he.cy,$,aa(he.y1,he.x1),aa(he.y0,he.x0),!h))}else r.lineTo(c+N,f+z),r.arc(c,f,i,u,l,h)}r.closePath()}}}var QTe=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),Wa=function(r){Sn(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new QTe},e.prototype.buildPath=function(t,n){XTe(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(sr);Wa.prototype.type="sector";var JTe=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),z1=function(r){Sn(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new JTe},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.PI*2;t.moveTo(i+n.r,a),t.arc(i,a,n.r,0,o,!1),t.moveTo(i+n.r0,a),t.arc(i,a,n.r0,0,o,!0)},e}(sr);z1.prototype.type="ring";function eMe(r,e,t,n){var i=[],a=[],o=[],s=[],l,u,c,f;if(n){c=[1/0,1/0],f=[-1/0,-1/0];for(var h=0,d=r.length;h=2){if(n){var a=eMe(i,n,t,e.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(t?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,f=i.length;sah[1]){if(s=!1,a)return s;var c=Math.abs(ah[0]-ih[1]),f=Math.abs(ih[0]-ah[1]);Math.min(c,f)>i.len()&&(c0){var f=c.duration,h=c.delay,d=c.easing,p={duration:f,delay:h||0,easing:d,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),a&&a()}function Pr(r,e,t,n,i,a){$F("update",r,e,t,n,i,a)}function Dn(r,e,t,n,i,a){$F("enter",r,e,t,n,i,a)}function vg(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function c6(r){return!r.isGroup}function pMe(r){return r.shape!=null}function G1(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){c6(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return pMe(o)&&(s.shape=be({},o.shape)),s}var a=n(r);e.traverse(function(o){if(c6(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),Pr(o,l,t,Dt(o).dataIndex)}}})}function cX(r,e){return De(r,function(t){var n=t[0];n=F2(n,e.x),n=B2(n,e.x+e.width);var i=t[1];return i=F2(i,e.y),i=B2(i,e.y+e.height),[n,i]})}function gMe(r,e){var t=F2(r.x,e.x),n=B2(r.x+r.width,e.x+e.width),i=F2(r.y,e.y),a=B2(r.y+r.height,e.y+e.height);if(n>=t&&a>=i)return{x:t,y:i,width:n-t,height:a-i}}function H1(r,e,t){var n=be({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),yt(i,t),new $i(n)):EA(r.replace("path://",""),n,t,"center")}function s0(r,e,t,n,i){for(var a=0,o=i[i.length-1];a1)return!1;var v=aE(d,p,c,f)/h;return!(v<0||v>1)}function aE(r,e,t,n){return r*n-t*e}function vMe(r){return r<=1e-6&&r>=-1e-6}function Lv(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,i=Ze(e)?{formatter:e}:e,a=t.mainType,o=t.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&B(vr(l),function(c){tt(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=Dt(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:yt({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function f6(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Pf(r,e){if(r)if(Ae(r))for(var t=0;t=0&&s.push(l)}),s}}function Rf(r,e){return Ut(Ut({},r,!0),e,!0)}const kMe={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},TMe={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var P2="ZH",YF="EN",mg=YF,Ow={},ZF={},mX=dr.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||mg).toUpperCase();return r.indexOf(P2)>-1?P2:mg}():mg;function yX(r,e){r=r.toUpperCase(),ZF[r]=new Zr(e),Ow[r]=e}function MMe(r){if(Ze(r)){var e=Ow[r.toUpperCase()]||{};return r===P2||r===YF?wt(e):Ut(wt(e),wt(Ow[mg]),!1)}else return Ut(wt(r),wt(Ow[mg]),!1)}function vI(r){return ZF[r]}function IMe(){return ZF[mg]}yX(YF,kMe);yX(P2,TMe);var KF=1e3,XF=KF*60,L0=XF*60,rs=L0*24,v6=rs*365,l0={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},s_="{yyyy}-{MM}-{dd}",m6={year:"{yyyy}",month:"{yyyy}-{MM}",day:s_,hour:s_+" "+l0.hour,minute:s_+" "+l0.minute,second:s_+" "+l0.second,millisecond:l0.none},lE=["year","month","day","hour","minute","second","millisecond"],bX=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function dc(r,e){return r+="","0000".substr(0,e-r.length)+r}function yg(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function LMe(r){return r===yg(r)}function FMe(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function MA(r,e,t,n){var i=Ql(r),a=i[QF(t)](),o=i[bg(t)]()+1,s=Math.floor((o-1)/3)+1,l=i[IA(t)](),u=i["get"+(t?"UTC":"")+"Day"](),c=i[Uy(t)](),f=(c-1)%12+1,h=i[LA(t)](),d=i[FA(t)](),p=i[BA(t)](),g=c>=12?"pm":"am",v=g.toUpperCase(),m=n instanceof Zr?n:vI(n||mX)||IMe(),y=m.getModel("time"),b=y.get("month"),_=y.get("monthAbbr"),w=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,dc(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,b[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,dc(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,dc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,dc(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,dc(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,dc(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,dc(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,dc(p,3)).replace(/{S}/g,p+"")}function BMe(r,e,t,n,i){var a=null;if(Ze(t))a=t;else if(gt(t))a=t(r.value,e,{level:r.level});else{var o=be({},l0);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(Ae(a)){var f=r.level==null?0:r.level>=0?r.level:a.length+r.level;f=Math.min(f,a.length-1),a=a[f]}}return MA(new Date(r.value),a,i,n)}function _X(r,e){var t=Ql(r),n=t[bg(e)]()+1,i=t[IA(e)](),a=t[Uy(e)](),o=t[LA(e)](),s=t[FA(e)](),l=t[BA(e)](),u=l===0,c=u&&s===0,f=c&&o===0,h=f&&a===0,d=h&&i===1,p=d&&n===1;return p?"year":d?"month":h?"day":f?"hour":c?"minute":u?"second":"millisecond"}function y6(r,e,t){var n=Or(r)?Ql(r):r;switch(e=e||_X(r,t),e){case"year":return n[QF(t)]();case"half-year":return n[bg(t)]()>=6?1:0;case"quarter":return Math.floor((n[bg(t)]()+1)/4);case"month":return n[bg(t)]();case"day":return n[IA(t)]();case"half-day":return n[Uy(t)]()/24;case"hour":return n[Uy(t)]();case"minute":return n[LA(t)]();case"second":return n[FA(t)]();case"millisecond":return n[BA(t)]()}}function QF(r){return r?"getUTCFullYear":"getFullYear"}function bg(r){return r?"getUTCMonth":"getMonth"}function IA(r){return r?"getUTCDate":"getDate"}function Uy(r){return r?"getUTCHours":"getHours"}function LA(r){return r?"getUTCMinutes":"getMinutes"}function FA(r){return r?"getUTCSeconds":"getSeconds"}function BA(r){return r?"getUTCMilliseconds":"getMilliseconds"}function OMe(r){return r?"setUTCFullYear":"setFullYear"}function wX(r){return r?"setUTCMonth":"setMonth"}function SX(r){return r?"setUTCDate":"setDate"}function CX(r){return r?"setUTCHours":"setHours"}function AX(r){return r?"setUTCMinutes":"setMinutes"}function xX(r){return r?"setUTCSeconds":"setSeconds"}function DX(r){return r?"setUTCMilliseconds":"setMilliseconds"}function EX(r){if(!SK(r))return Ze(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function kX(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Ov=xF;function mI(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&Ps(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Ql(r):r;if(isNaN(+l)){if(s)return"-"}else return MA(l,n,t)}if(e==="ordinal")return BM(r)?i(r):Or(r)&&a(r)?r+"":"-";var u=ju(r);return a(u)?EX(u):BM(r)?i(r):typeof r=="boolean"?r+"":"-"}var b6=["a","b","c","d","e","f","g"],uE=function(r,e){return"{"+r+(e??"")+"}"};function TX(r,e,t){Ae(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a':'';var o=t.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function kd(r,e){return e=e||"transparent",Ze(r)?r:_t(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function R2(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Pw=B,MX=["left","right","top","bottom","width","height"],Vh=[["width","left","right"],["height","top","bottom"]];function JF(r,e,t,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),f=e.childAt(u+1),h=f&&f.getBoundingRect(),d,p;if(r==="horizontal"){var g=c.width+(h?-h.x+c.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var v=c.height+(h?-h.y+c.y:0);p=o+v,p>i||l.newline?(a+=s+t,o=0,p=v,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=d+t:o=p+t)})}var cd=JF;Bt(JF,"vertical");Bt(JF,"horizontal");function NMe(r,e,t){var n=e.width,i=e.height,a=$e(r.left,n),o=$e(r.top,i),s=$e(r.right,n),l=$e(r.bottom,i);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=i),t=Ov(t||0),{width:Math.max(s-a-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function di(r,e,t){t=Ov(t||0);var n=e.width,i=e.height,a=$e(r.left,n),o=$e(r.top,i),s=$e(r.right,n),l=$e(r.bottom,i),u=$e(r.width,n),c=$e(r.height,i),f=t[2]+t[0],h=t[1]+t[3],d=r.aspect;switch(isNaN(u)&&(u=n-s-h-a),isNaN(c)&&(c=i-l-f-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-h),isNaN(o)&&(o=i-l-c-f),r.left||r.right){case"center":a=n/2-u/2-t[3];break;case"right":a=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-c/2-t[0];break;case"bottom":o=i-c-f;break}a=a||0,o=o||0,isNaN(u)&&(u=n-h-a-(s||0)),isNaN(c)&&(c=i-f-o-(l||0));var p=new Gt(a+t[3],o+t[0],u,c);return p.margin=t,p}function OA(r,e,t,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new Gt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var f=di(yt({width:u.width,height:u.height},e),t,n),h=o?f.x-u.x:0,d=s?f.y-u.y:0;return l==="raw"?(a.x=h,a.y=d):(a.x+=h,a.y+=d),a===r&&r.markRedraw(),!0}function zMe(r,e){return r[Vh[e][0]]!=null||r[Vh[e][1]]!=null&&r[Vh[e][2]]!=null}function Gy(r){var e=r.layoutMode||r.constructor.layoutMode;return _t(e)?e:e?{type:e}:null}function xf(r,e,t){var n=t&&t.ignoreSize;!Ae(n)&&(n=[n,n]);var i=o(Vh[0],0),a=o(Vh[1],1);u(Vh[0],r,i),u(Vh[1],r,a);function o(c,f){var h={},d=0,p={},g=0,v=2;if(Pw(c,function(b){p[b]=r[b]}),Pw(c,function(b){s(e,b)&&(h[b]=p[b]=e[b]),l(h,b)&&d++,l(p,b)&&g++}),n[f])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(g===v||!d)return p;if(d>=v)return h;for(var m=0;m=0;l--)s=Ut(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var i=t+"Index",a=t+"Id";return R1(this.ecModel,t,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Zr);LK(gr,Zr);bA(gr);DMe(gr);EMe(gr,UMe);function UMe(r){var e=[];return B(gr.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=De(e,function(t){return Fl(t).main}),r!=="dataset"&&Qt(e,"dataset")<=0&&e.unshift("dataset"),e}var LX="";typeof navigator<"u"&&(LX=navigator.platform||"");var lp="rgba(0, 0, 0, 0.2)";const GMe={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:lp,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:lp,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:lp,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:lp,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:lp,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:lp,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:LX.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var FX=nt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),ms="original",_a="arrayRows",ys="objectRows",iu="keyedColumns",nf="typedArray",BX="unknown",Vl="column",Rv="row",qi={Must:1,Might:2,Not:3},OX=wr();function HMe(r){OX(r).datasetMap=nt()}function PX(r,e,t){var n={},i=tB(e);if(!i||!r)return n;var a=[],o=[],s=e.ecModel,l=OX(s).datasetMap,u=i.uid+"_"+t.seriesLayoutBy,c,f;r=r.slice(),B(r,function(g,v){var m=_t(g)?g:r[v]={name:g};m.type==="ordinal"&&c==null&&(c=v,f=p(m)),n[m.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});B(r,function(g,v){var m=g.name,y=p(g);if(c==null){var b=h.valueWayDim;d(n[m],b,y),d(o,b,y),h.valueWayDim+=y}else if(c===v)d(n[m],0,y),d(a,0,y);else{var b=h.categoryWayDim;d(n[m],b,y),d(o,b,y),h.categoryWayDim+=y}});function d(g,v,m){for(var y=0;ye)return r[n];return r[t-1]}function zX(r,e,t,n,i,a,o){a=a||r;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?t:YMe(n,o);if(c=c||t,!(!c||!c.length)){var f=c[l];return i&&(u[i]=f),s.paletteIdx=(l+1)%c.length,f}}function ZMe(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var l_,ym,w6,S6="\0_ec_inner",KMe=1,nB=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,i,a,o,s){a=a||{},this.option=null,this._theme=new Zr(a),this._locale=new Zr(o),this._optionManager=s},e.prototype.setOption=function(t,n,i){var a=x6(n);this._optionManager.setOption(t,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,n){return this._resetOption(t,x6(n))},e.prototype._resetOption=function(t,n){var i=!1,a=this._optionManager;if(!t||t==="recreate"){var o=a.mountOption(t==="recreate");!this.option||t==="recreate"?w6(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&B(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=nt(),u=n&&n.replaceMergeMainTypeMap;HMe(this),B(t,function(f,h){f!=null&&(gr.hasClass(h)?h&&(s.push(h),l.set(h,!0)):i[h]=i[h]==null?wt(f):Ut(i[h],f,!0))}),u&&u.each(function(f,h){gr.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),gr.topologicalTravel(s,gr.getAllClassMainTypes(),c,this);function c(f){var h=jMe(this,f,rn(t[f])),d=a.get(f),p=d?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",g=EK(d,h,p);wke(g,f,gr),i[f]=null,a.set(f,null),o.set(f,0);var v=[],m=[],y=0,b;B(g,function(_,w){var S=_.existing,C=_.newOption;if(!C)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var A=f==="series",x=gr.getClass(f,_.keyInfo.subType,!A);if(!x)return;if(f==="tooltip"){if(b)return;b=!0}if(S&&S.constructor===x)S.name=_.keyInfo.name,S.mergeOption(C,this),S.optionUpdated(C,!1);else{var D=be({componentIndex:w},_.keyInfo);S=new x(C,this,this,D),be(S,D),_.brandNew&&(S.__requireNewView=!0),S.init(C,this,this),S.optionUpdated(null,!0)}}S?(v.push(S.option),m.push(S),y++):(v.push(void 0),m.push(void 0))},this),i[f]=v,a.set(f,m),o.set(f,y),f==="series"&&l_(this)}this._seriesIndices||l_(this)},e.prototype.getOption=function(){var t=wt(this.option);return B(t,function(n,i){if(gr.hasClass(i)){for(var a=rn(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Ry(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,t[i]=a}}),delete t[S6],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var i=this._componentsMap.get(t);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function aIe(r,e){return r.join(",")===e.join(",")}var _s=B,Hy=_t,D6=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function fE(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=D6.length;t=0;v--){var m=r[v];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=cke(h,y),g=y;break}}}return n[0]=h,n[1]=g,n})})}var PA=function(){function r(e){this.data=e.data||(e.sourceFormat===iu?{}:[]),this.sourceFormat=e.sourceFormat||BX,this.seriesLayoutBy=e.seriesLayoutBy||Vl,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;ng&&(g=b)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};F6=(e={},e[_a+"_"+Vl]={pure:!0,appendData:a},e[_a+"_"+Rv]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[ys]={pure:!0,appendData:a},e[iu]={pure:!0,appendData:function(o){var s=this._data;B(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},e[ms]={appendData:a},e[nf]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[v])}return g!=null?g+"":""})}},r.prototype.getRawValue=function(e,t){return rv(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r}();function R6(r){var e,t;return _t(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function F0(r){return new SIe(r)}var SIe=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var i=this.context;i.data=i.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var f;(this._dirty||a==="reset")&&(this._dirty=!1,f=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(f||d1&&n>0?s:o}};return a;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},AIe=function(){function r(e,t){if(!Or(t)){var n="";qr(n)}this._opFn=KX[e],this._rvalFloat=ju(t)}return r.prototype.evaluate=function(e){return Or(e)?this._opFn(e,this._rvalFloat):this._opFn(ju(e),this._rvalFloat)},r}(),XX=function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=Or(e)?e:ju(e),i=Or(t)?t:ju(t),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=Ze(e),l=Ze(t);s&&(n=l?e:0),l&&(i=s?t:0)}return ni?-this._resultLT:0},r}(),xIe=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=ju(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=ju(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function DIe(r,e){return r==="eq"||r==="ne"?new xIe(r==="eq",e):tt(KX,r)?new AIe(r,e):null}var EIe=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return af(e,t)},r}();function kIe(r,e){var t=new EIe,n=r.data,i=t.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Vl&&qr(o);var s=[],l={},u=r.dimensionsDefine;if(u)B(u,function(g,v){var m=g.name,y={index:v,name:m,displayName:g.displayName};if(s.push(y),m!=null){var b="";tt(l,m)&&qr(b),l[m]=y}});else for(var c=0;c65535?PIe:RIe}function up(){return[1/0,-1/0]}function NIe(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function V6(r,e,t,n,i){var a=eQ[t||"float"];if(i){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;uv[1]&&(v[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=De(o,function(y){return y.property}),c=0;cm[1]&&(m[1]=v)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c=0&&l<0)&&(s=p,l=d,u=0),d===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a=f&&y<=h||isNaN(y))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var v=d[i[0]],b=d[i[1]],_=e[i[1]][0],w=e[i[1]][1],m=0;m=f&&y<=h||isNaN(y))&&(S>=_&&S<=w||isNaN(S))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var m=0;m=f&&y<=h||isNaN(y))&&(l[u++]=C)}else for(var m=0;me[D][1])&&(A=!1)}A&&(l[u++]=t.getRawIndex(m))}return um[1]&&(m[1]=v)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,f,h,d=new(_m(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;pc&&(c=f,h=_)}E>0&&Ec-p&&(l=c-p,s.length=l);for(var g=0;gf[1]&&(f[1]=m),h[d++]=y}return a._count=d,a._indices=h,a._updateGetRawIdx(),a},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();al&&(l=f)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,a=0;a=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,n,i,a){return af(t[a],this._dimensions[a])}pE={arrayRows:e,objectRows:function(t,n,i,a){return af(t[n],this._dimensions[a])},keyedColumns:e,original:function(t,n,i,a){var o=t&&(t.value==null?t:t.value);return af(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(t,n,i,a){return t[a]}}}(),r}(),tQ=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,i,a;if(u_(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=po(s)?nf:ms,a=[];var f=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},d=Lt(f.seriesLayoutBy,h.seriesLayoutBy)||null,p=Lt(f.sourceHeader,h.sourceHeader),g=Lt(f.dimensions,h.dimensions),v=d!==h.seriesLayoutBy||!!p!=!!h.sourceHeader||g;i=v?[_I(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},l)]:[]}else{var m=e;if(n){var y=this._applyTransform(t);i=y.sourceList,a=y.upstreamSignList}else{var b=m.get("source",!0);i=[_I(b,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),i=t.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&G6(a)}var o,s=[],l=[];return B(e,function(u){u.prepareSource();var c=u.getSource(i||0),f="";i!=null&&!c&&G6(f),s.push(c),l.push(u._getVersionSign())}),n?o=BIe(n,s,{datasetIndex:t.componentIndex}):i!=null&&(o=[gIe(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return B(r.blocks,function(i){var a=aQ(i);a>=e&&(e=a+ +(n&&(!a||SI(i)&&!i.noHeader)))}),e}return 0}function UIe(r,e,t,n){var i=e.noHeader,a=HIe(aQ(e)),o=[],s=e.blocks||[];Ga(!s||Ae(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(tt(u,l)){var c=new XX(u[l],null);s.sort(function(p,g){return c.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}B(s,function(p,g){var v=e.valueFormatter,m=iQ(p)(v?be(be({},r),{valueFormatter:v}):r,p,g>0?a.html:0,n);m!=null&&o.push(m)});var f=r.renderMode==="richText"?o.join(a.richText):CI(o.join(""),i?t:a.html);if(i)return f;var h=mI(e.header,"ordinal",r.useUTC),d=nQ(n,r.renderMode).nameStyle;return r.renderMode==="richText"?oQ(r,h,d)+a.richText+f:CI('
'+to(h)+"
"+f,t)}function GIe(r,e,t,n){var i=r.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(_){return _=Ae(_)?_:[_],De(_,function(w,S){return mI(w,Ae(d)?d[S]:d,u)})};if(!(a&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),h=a?"":mI(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,v=!s&&a,m=nQ(n,i),y=m.nameStyle,b=m.valueStyle;return i==="richText"?(s?"":f)+(a?"":oQ(r,h,y))+(o?"":jIe(r,p,g,v,b)):CI((s?"":f)+(a?"":WIe(h,!s,y))+(o?"":$Ie(p,g,v,b)),t)}}function H6(r,e,t,n,i,a){if(r){var o=iQ(r),s={useUTC:i,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function HIe(r){return{html:zIe[r],richText:VIe[r]}}function CI(r,e){var t='
',n="margin: "+e+"px 0 0";return'
'+r+t+"
"}function WIe(r,e,t){var n=e?"margin-left:2px":"";return''+to(r)+""}function $Ie(r,e,t,n){var i=t?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return r=Ae(r)?r:[r],''+De(r,function(o){return to(o)}).join("  ")+""}function oQ(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function jIe(r,e,t,n,i){var a=[i],o=n?10:20;return t&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(Ae(e)?e.join(" "):e,a)}function sQ(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return kd(n)}function lQ(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var gE=function(){function r(){this.richTextStyles={},this._nextStyleNameId=CK()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var i=n==="richText"?this._generateStyleName():null,a=RMe({color:t,type:e,renderMode:n,markerId:i});return Ze(a)?a:(this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};Ae(t)?B(t,function(a){return be(n,a)}):be(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},r}();function uQ(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(t),l=Ae(s),u=sQ(e,t),c,f,h,d;if(o>1||l&&!o){var p=qIe(s,e,t,a,u);c=p.inlineValues,f=p.inlineValueTypes,h=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=rv(i,t,a[0]),f=g.type}else d=c=l?s[0]:s;var v=FF(e),m=v&&e.name||"",y=i.getName(t),b=n?m:y;return Mi("section",{header:m,noHeader:n||!v,sortParam:d,blocks:[Mi("nameValue",{markerType:"item",markerColor:u,name:b,noName:!Ps(b),value:c,valueType:f,dataIndex:t})].concat(h||[])})}function qIe(r,e,t,n,i){var a=e.getData(),o=Zl(r,function(f,h,d){var p=a.getDimensionInfo(d);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?B(n,function(f){c(rv(a,t,f),f)}):B(r,c);function c(f,h){var d=a.getDimensionInfo(h);!d||d.otherDims.tooltip===!1||(o?u.push(Mi("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:f,valueType:d.type})):(s.push(f),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var pc=wr();function c_(r,e){return r.getName(e)||r.getId(e)}var Rw="__universalTransitionEnabled",bn=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=F0({count:ZIe,reset:KIe}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i);var a=pc(this).sourceManager=new tQ(this);a.prepareSource();var o=this.getInitialData(t,i);$6(o,this),this.dataTask.context.data=o,pc(this).dataBeforeProcessed=o,W6(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var i=Gy(this),a=i?Pv(t):{},o=this.subType;gr.hasClass(o)&&(o+="Series"),Ut(t,n.getTheme().get(this.subType)),Ut(t,this.getDefaultOption()),Ad(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&xf(t,a,i)},e.prototype.mergeOption=function(t,n){t=Ut(this.option,t,!0),this.fillDataTextStyle(t.data);var i=Gy(this);i&&xf(this.option,t,i);var a=pc(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(t,n);$6(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,pc(this).dataBeforeProcessed=o,W6(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!po(t))for(var n=["show"],i=0;ithis.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,i){var a=this.ecModel,o=rB.prototype.getColorFromPalette.call(this,t,n,i);return o||(o=a.getColorFromPalette(t,n,i)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&i.push(o)}return i},e.prototype.isSelected=function(t,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[c_(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Rw])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){_t(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(t,n)}},e.registerClass=function(t){return gr.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(gr);oi(bn,RA);oi(bn,rB);LK(bn,gr);function W6(r){var e=r.name;FF(r)||(r.name=YIe(r)||e)}function YIe(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return B(t,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function ZIe(r){return r.model.getRawData().count()}function KIe(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),XIe}function XIe(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function $6(r,e){B(w2(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Bt(QIe,e))})}function QIe(r,e){var t=AI(r);return t&&t.setOutputEnd((e||this).count()),e}function AI(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var In=function(){function r(){this.group=new xt,this.uid=Bv("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){},r.prototype.updateLayout=function(e,t,n,i){},r.prototype.updateVisual=function(e,t,n,i){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();OF(In);bA(In);function Nv(){var r=wr();return function(e){var t=r(e),n=e.pipelineContext,i=!!t.large,a=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var cQ=wr(),JIe=Nv(),an=function(){function r(){this.group=new xt,this.uid=Bv("viewChart"),this.renderTask=F0({plan:e3e,reset:t3e}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.highlight=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&q6(a,i,"emphasis")},r.prototype.downplay=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&q6(a,i,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateLayout=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.eachRendered=function(e){Pf(this.group,e)},r.markUpdateMethod=function(e,t){cQ(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function j6(r,e,t){r&&zy(r)&&(e==="emphasis"?qu:Yu)(r,t)}function q6(r,e,t){var n=xd(r,e),i=e&&e.highlightKey!=null?RTe(e.highlightKey):null;n!=null?B(rn(n),function(a){j6(r.getItemGraphicEl(a),t,i)}):r.eachItemGraphicEl(function(a){j6(a,t,i)})}OF(an);bA(an);function e3e(r){return JIe(r.model)}function t3e(r){var e=r.model,t=r.ecModel,n=r.api,i=r.payload,a=e.pipelineContext.progressiveRender,o=r.view,s=i&&cQ(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,i),r3e[l]}var r3e={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},N2="\0__throttleOriginMethod",Y6="\0__throttleRate",Z6="\0__throttleType";function lB(r,e,t){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function f(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var d=[],p=0;p=0?f():o=setTimeout(f,-s),i=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(d){c=d},h}function zv(r,e,t,n){var i=r[e];if(i){var a=i[N2]||i,o=i[Z6],s=i[Y6];if(s!==t||o!==n){if(t==null||!n)return r[e]=a;i=r[e]=lB(a,t,n==="debounce"),i[N2]=a,i[Z6]=n,i[Y6]=t}return i}}function Wy(r,e){var t=r[e];t&&t[N2]&&(t.clear&&t.clear(),r[e]=t[N2])}var K6=wr(),X6={itemStyle:Dd(vX,!0),lineStyle:Dd(gX,!0)},n3e={lineStyle:"stroke",itemStyle:"fill"};function fQ(r,e){var t=r.visualStyleMapper||X6[e];return t||(console.warn("Unknown style type '"+e+"'."),X6.itemStyle)}function hQ(r,e){var t=r.visualDrawType||n3e[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var i3e={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=fQ(r,n),o=a(i),s=i.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=hQ(r,n),u=o[l],c=gt(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var h=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=h,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||gt(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||gt(o.stroke)?h:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=r.getDataParams(p),v=be({},o);v[l]=c(g),d.setItemVisual(p,"style",v)}}}},wm=new Zr,a3e={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=fQ(r,n),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){wm.option=l[n];var u=i(wm),c=o.ensureUniqueItemVisual(s,"style");be(c,u),wm.option.decal&&(o.setItemVisual(s,"decal",wm.option.decal),wm.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},o3e={performRawSeries:!0,overallReset:function(r){var e=nt();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),K6(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),i={},a=t.getData(),o=K6(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=hQ(t,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],f=a.getItemVisual(c,"colorFromPalette");if(f){var h=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();h[l]=t.getColorFromPalette(d,o,p)}})}})}},f_=Math.PI;function s3e(r,e){e=e||{},yt(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new xt,n=new _r({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var i=new Er({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new _r({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var o;return e.showSpinner&&(o=new DA({shape:{startAngle:-f_/2,endAngle:-f_/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:f_*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:f_*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=i.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var dQ=function(){function r(e,t,n,i){this._stageTaskMap=nt(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=nt();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;B(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";Ga(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,t,n),i.overallReset&&this._createOverallStageTask(i,a,t,n)},this)},r.prototype.prepareView=function(e,t,n,i){var a=e.renderTask,o=a.context;o.model=t,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,i){i=i||{};var a=!1,o=this;B(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,h=c.overallTask;if(h){var d,p=h.agentStubMap;p.each(function(v){s(i,v)&&(v.dirty(),d=!0)}),d&&h.dirty(),o.updatePayload(h,n);var g=o.getPerformArgs(h,i.block);p.each(function(v){v.perform(g)}),h.perform(g)&&(a=!0)}else f&&f.each(function(v,m){s(i,v)&&v.dirty();var y=o.getPerformArgs(v,i.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(v.context.model),o.updatePayload(v,n),v.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,i){var a=this,o=t.seriesTaskMap,s=t.seriesTaskMap=nt(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(f){var h=f.uid,d=s.set(h,o&&o.get(h)||F0({plan:h3e,reset:d3e,count:g3e}));d.context={model:f,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(f,d)}},r.prototype._createOverallStageTask=function(e,t,n,i){var a=this,o=t.overallTask=t.overallTask||F0({reset:l3e});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=nt(),u=e.seriesType,c=e.getTargetSeries,f=!0,h=!1,d="";Ga(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(f=!1,B(n.getSeries(),p));function p(g){var v=g.uid,m=l.set(v,s&&s.get(v)||(h=!0,F0({reset:u3e,onDirty:f3e})));m.context={model:g,overallProgress:f},m.agent=o,m.__block=f,a._pipe(g,m)}h&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},r.wrapStageHandler=function(e,t){return gt(e)&&(e={overallReset:e,seriesType:v3e(e)}),e.uid=Bv("stageHandler"),t&&(e.visualType=t),e},r}();function l3e(r){r.overallReset(r.ecModel,r.api,r.payload)}function u3e(r){return r.overallProgress&&c3e}function c3e(){this.agent.dirty(),this.getDownstream().dirty()}function f3e(){this.agent&&this.agent.dirty()}function h3e(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function d3e(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=rn(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?De(e,function(t,n){return pQ(n)}):p3e}var p3e=pQ(0);function pQ(r){return function(e,t){var n=t.data,i=t.resetDefines[r];if(i&&i.dataEach)for(var a=e.start;a0&&d===u.length-h.length){var p=u.slice(0,d);p!=="data"&&(t.mainType=p,t[h.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:i}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,i,a));function c(f,h,d,p){return f[d]==null||h[p||d]===f[d]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),xI=["symbol","symbolSize","symbolRotate","symbolOffset"],t8=xI.concat(["symbolKeepAspect"]),b3e={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o=0&&Gh(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function DI(r,e,t){for(var n=e.type==="radial"?B3e(r,e,t):F3e(r,e,t),i=e.colorStops,a=0;a0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Or(r)?[r]:Ae(r)?r:null}function cB(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&P3e(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var i=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(t=De(t,function(a){return a/i}),n/=i)}return[t,n]}var R3e=new Jl(!0);function U2(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function r8(r){return typeof r=="string"&&r!=="none"}function G2(r){var e=r.fill;return e!=null&&e!=="none"}function n8(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function i8(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function EI(r,e,t){var n=PF(e.image,e.__image,t);if(_A(n)){var i=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*Aw),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function N3e(r,e,t,n){var i,a=U2(t),o=G2(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||R3e,f=e.__dirty;if(!n){var h=t.fill,d=t.stroke,p=o&&!!h.colorStops,g=a&&!!d.colorStops,v=o&&!!h.image,m=a&&!!d.image,y=void 0,b=void 0,_=void 0,w=void 0,S=void 0;(p||g)&&(S=e.getBoundingRect()),p&&(y=f?DI(r,h,S):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(b=f?DI(r,d,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=b),v&&(_=f||!e.__canvasFillPattern?EI(r,h,e):e.__canvasFillPattern,e.__canvasFillPattern=_),m&&(w=f||!e.__canvasStrokePattern?EI(r,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=_),p?r.fillStyle=y:v&&(_?r.fillStyle=_:o=!1),g?r.strokeStyle=b:m&&(w?r.strokeStyle=w:a=!1)}var C=e.getGlobalScale();c.setScale(C[0],C[1],e.segmentIgnoreThreshold);var A,x;r.setLineDash&&t.lineDash&&(i=cB(e),A=i[0],x=i[1]);var D=!0;(u||f&Pp)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),D=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),D&&c.rebuildPath(r,l?s:1),A&&(r.setLineDash(A),r.lineDashOffset=x),n||(t.strokeFirst?(a&&i8(r,t),o&&n8(r,t)):(o&&n8(r,t),a&&i8(r,t))),A&&r.setLineDash([])}function z3e(r,e,t){var n=e.__image=PF(t.image,e.__image,e,e.onload);if(!(!n||!_A(n))){var i=t.x||0,a=t.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),t.sWidth&&t.sHeight){var u=t.sx||0,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,i,a,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,f=o-u,h=s-c;r.drawImage(n,u,c,f,h,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function V3e(r,e,t){var n,i=t.text;if(i!=null&&(i+=""),i){r.font=t.font||wf,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var a=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=cB(e),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),t.strokeFirst?(U2(t)&&r.strokeText(i,t.x,t.y),G2(t)&&r.fillText(i,t.x,t.y)):(G2(t)&&r.fillText(i,t.x,t.y),U2(t)&&r.strokeText(i,t.x,t.y)),a&&r.setLineDash([])}}var a8=["shadowBlur","shadowOffsetX","shadowOffsetY"],o8=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function _Q(r,e,t,n,i){var a=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){ao(r,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?od.opacity:o}(n||e.blend!==t.blend)&&(a||(ao(r,i),a=!0),r.globalCompositeOperation=e.blend||od.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,i){if(!this[oa]){if(this._disposed){this.id;return}var a,o,s;if(_t(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[oa]=!0,!this._model||n){var l=new tIe(this._api),u=this._theme,c=this._model=new nB;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},TI);var f={seriesTransition:s,optionChanged:!0};if(i)this[Za]={silent:a,updateParams:f},this[oa]=!1,this.getZr().wakeUp();else{try{fp(this),gc.update.call(this,null,f)}catch(h){throw this[Za]=null,this[oa]=!1,h}this._ssr||this._zr.flush(),this[Za]=null,this[oa]=!1,Sm.call(this,a),Cm.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||dr.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(dr.svgSupported){var t=this._zr,n=t.storage.getDisplayList();return B(n,function(i){i.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,i=this._model,a=[],o=this;B(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return B(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(II[i]){var l=s,u=s,c=-s,f=-s,h=[],d=t&&t.pixelRatio||this.getDevicePixelRatio();B(O0,function(b,_){if(b.group===i){var w=n?b.getZr().painter.getSvgDom().innerHTML:b.renderToCanvas(wt(t)),S=b.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),c=o(S.right,c),f=o(S.bottom,f),h.push({dom:w,left:S.left,top:S.top})}}),l*=d,u*=d,c*=d,f*=d;var p=c-l,g=f-u,v=Sf.createCanvas(),m=DN(v,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:g}),n){var y="";return B(h,function(b){var _=b.left-l,w=b.top-u;y+=''+b.dom+""}),m.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return t.connectedBackgroundColor&&m.add(new _r({shape:{x:0,y:0,width:p,height:g},style:{fill:t.connectedBackgroundColor}})),B(h,function(b){var _=new $i({style:{x:b.left*d-l,y:b.top*d-u,image:b.dom}});m.add(_)}),m.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n){return _E(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return _E(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var i=this._model,a,o=k0(i,t);return B(o,function(s,l){l.indexOf("Models")>=0&&B(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(a=a||f.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(t,n){var i=this._model,a=k0(i,t,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?uB(s,l,n):$1(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;B(fLe,function(n){var i=function(a){var o=t.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&Uh(s,function(p){var g=Dt(p);if(g&&g.dataIndex!=null){var v=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=v&&v.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=be({},g.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var h=c&&f!=null&&o.getComponent(c,f),d=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=a,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:d},t.trigger(n,l)}};i.zrEventfulCallAtLast=!0,t._zr.on(n,i,t)}),B(B0,function(n,i){t._messageCenter.on(i,function(a){this.trigger(i,a)},t)}),B(["selectchanged"],function(n){t._messageCenter.on(n,function(i){this.trigger(n,i)},t)}),w3e(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&TK(this.getDom(),dB,"");var n=this,i=n._api,a=n._model;B(n._componentsViews,function(o){o.dispose(a,i)}),B(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete O0[n.id]},e.prototype.resize=function(t){if(!this[oa]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=t&&t.silent;this[Za]&&(a==null&&(a=this[Za].silent),i=!0,this[Za]=null),this[oa]=!0;try{i&&fp(this),gc.update.call(this,{type:"resize",animation:be({duration:0},t&&t.animation)})}catch(o){throw this[oa]=!1,o}this[oa]=!1,Sm.call(this,a),Cm.call(this,a)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(_t(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!MI[t]){var i=MI[t](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=be({},t);return n.type=B0[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(_t(n)||(n={silent:!!n}),!!H2[t.type]&&this._model){if(this[oa]){this._pendingActions.push(t);return}var i=n.silent;SE.call(this,t,i);var a=n.flush;a?this._zr.flush():a!==!1&&dr.browser.weChat&&this._throttledZrFlush(),Sm.call(this,i),Cm.call(this,i)}},e.prototype.updateLabelLayout=function(){xs.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){fp=function(f){var h=f._scheduler;h.restorePipelines(f._model),h.prepareStageTasks(),bE(f,!0),bE(f,!1),h.plan()},bE=function(f,h){for(var d=f._model,p=f._scheduler,g=h?f._componentsViews:f._chartsViews,v=h?f._componentsMap:f._chartsMap,m=f._zr,y=f._api,b=0;bh.get("hoverLayerThreshold")&&!dr.node&&!dr.worker&&h.eachSeries(function(v){if(!v.preventUsingHoverLayer){var m=f._chartsMap[v.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(f,h){var d=f.get("blendMode")||null;h.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(f,h){if(!f.preventAutoZ){var d=f.get("z")||0,p=f.get("zlevel")||0;h.eachRendered(function(g){return l(g,d,p,-1/0),!0})}}function l(f,h,d,p){var g=f.getTextContent(),v=f.getTextGuideLine(),m=f.isGroup;if(m)for(var y=f.childrenRef(),b=0;b0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(vg(m))return;if(m instanceof sr&&NTe(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=v;var b=m.getTextContent(),_=m.getTextGuideLine();b&&(b.stateTransition=v),_&&(_.stateTransition=v)}m.__dirty&&i(m)}})}b8=function(f){return new(function(h){pe(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return f._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){qu(p,g),Oo(f)},d.prototype.leaveEmphasis=function(p,g){Yu(p,g),Oo(f)},d.prototype.enterBlur=function(p){jK(p),Oo(f)},d.prototype.leaveBlur=function(p){UF(p),Oo(f)},d.prototype.enterSelect=function(p){qK(p),Oo(f)},d.prototype.leaveSelect=function(p){YK(p),Oo(f)},d.prototype.getModel=function(){return f.getModel()},d.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},d}(VX))(f)},OQ=function(f){function h(d,p){for(var g=0;g=0)){w8.push(t);var a=dQ.wrapStageHandler(t,i);a.__prio=e,a.__raw=t,r.push(a)}}function UQ(r,e){MI[r]=e}function _Le(r,e,t){var n=K3e("registerMap");n&&n(r,e,t)}var wLe=FIe;$d(fB,i3e);$d(zA,a3e);$d(zA,o3e);$d(fB,b3e);$d(zA,_3e);$d(TQ,Y3e);zQ(GX);VQ(J3e,dIe);UQ("default",s3e);au({type:sd,event:sd,update:sd},Kn);au({type:Lw,event:Lw,update:Lw},Kn);au({type:T0,event:T0,update:T0},Kn);au({type:Fw,event:Fw,update:Fw},Kn);au({type:M0,event:M0,update:M0},Kn);NQ("light",m3e);NQ("dark",mQ);var S8=[],SLe={registerPreprocessor:zQ,registerProcessor:VQ,registerPostInit:vLe,registerPostUpdate:mLe,registerUpdateLifecycle:pB,registerAction:au,registerCoordinateSystem:yLe,registerLayout:bLe,registerVisual:$d,registerTransform:wLe,registerLoading:UQ,registerMap:_Le,registerImpl:Z3e,PRIORITY:lLe,ComponentModel:gr,ComponentView:In,SeriesModel:bn,ChartView:an,registerComponentModel:function(r){gr.registerClass(r)},registerComponentView:function(r){In.registerClass(r)},registerSeriesModel:function(r){bn.registerClass(r)},registerChartView:function(r){an.registerClass(r)},registerSubTypeDefaulter:function(r,e){gr.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){ike(r,e)}};function ir(r){if(Ae(r)){B(r,function(e){ir(e)});return}Qt(S8,r)>=0||(S8.push(r),gt(r)&&(r={install:r}),r.install(SLe))}function Am(r){return r==null?0:r.length||1}function C8(r){return r}var Zu=function(){function r(e,t,n,i,a,o){this._old=e,this._new=t,this._oldKeyGetter=n||C8,this._newKeyGetter=i||C8,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},i=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,a,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var s=0;s1&&h===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(f===1&&h>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(f===1&&h===1)this._update&&this._update(c,u),i[l]=null;else if(f>1&&h>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(f>1)for(var d=0;d1)for(var s=0;s30}var xm=_t,vc=De,kLe=typeof Int32Array>"u"?Array:Int32Array,TLe="e\0\0",A8=-1,MLe=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],ILe=["_approximateExtent"],x8,v_,Dm,Em,DE,m_,EE,Na=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,i=!1;HQ(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c=t)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===ms;if(l&&!i.pure)for(var u=[],c=e;c0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[t];return a==null&&(a=this.getVisual(t),Ae(a)?a=a.slice():xm(a)&&(a=be({},a)),i[t]=a),a},r.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,xm(t)?be(i,t):i[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){xm(e)?be(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?be(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;lI(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){B(this._graphicEls,function(n,i){n&&e&&e.call(t,n,i)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:vc(this.dimensions,this._getDimInfo,this),this.hostModel)),DE(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];gt(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return t.apply(this,[i].concat(AF(arguments)))})},r.internalField=function(){x8=function(e){var t=e._invertedIndicesMap;B(t,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=t[i]=new kLe(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),i[t]=l}}}(),r}();function j1(r,e){iB(r)||(r=aB(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],i=nt(),a=[],o=FLe(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&jQ(o),l=n===r.dimensionsDefine,u=l?$Q(r):WQ(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var f=nt(c),h=new JX(o),d=0;d0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function FLe(r,e,t,n){var i=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return B(e,function(a){var o;_t(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function BLe(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var OLe=function(){function r(e){this.coordSysDims=[],this.axisMap=nt(),this.categoryAxisMap=nt(),this.coordSysName=e}return r}();function PLe(r){var e=r.get("coordinateSystem"),t=new OLe(e),n=RLe[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var RLe={cartesian2d:function(r,e,t,n){var i=r.getReferringComponents("xAxis",ri).models[0],a=r.getReferringComponents("yAxis",ri).models[0];e.coordSysDims=["x","y"],t.set("x",i),t.set("y",a),hp(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),hp(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var i=r.getReferringComponents("singleAxis",ri).models[0];e.coordSysDims=["single"],t.set("single",i),hp(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var i=r.getReferringComponents("polar",ri).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",o),hp(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),hp(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();B(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];t.set(c,u),hp(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function hp(r){return r.get("type")==="category"}function NLe(r,e,t){t=t||{};var n=t.byIndex,i=t.stackedCoordDimension,a,o,s;zLe(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,f,h;if(B(a,function(y,b){Ze(y)&&(a[b]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){f="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,g=0;B(a,function(y){y.coordDim===d&&g++});var v={name:f,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:h,coordDim:h,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(h,p),m.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(v),o.appendCalculationDimension(m)):(a.push(v),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:f}}function zLe(r){return!HQ(r.schema)}function Df(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function qQ(r,e){return Df(r,e)?r.getCalculationInfo("stackResultDimension"):e}function VLe(r,e){var t=r.get("coordinateSystem"),n=W1.get(t),i;return e&&e.coordSysDims&&(i=De(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=$2(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function ULe(r,e,t){var n,i;return t&&B(r,function(a,o){var s=a.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function oc(r,e,t){t=t||{};var n=e.getSourceManager(),i,a=!1;r?(a=!0,i=aB(r)):(i=n.getSource(),a=i.sourceFormat===ms);var o=PLe(e),s=VLe(e,o),l=t.useEncodeDefaulter,u=gt(l)?l:l?Bt(PX,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},f=j1(i,c),h=ULe(f.dimensions,t.createInvertedIndices,o),d=a?null:n.getSharedDataStore(f),p=NLe(e,{schema:f,store:d}),g=new Na(f,e);g.setCalculationInfo(p);var v=h!=null&&GLe(i)?function(m,y,b,_){return _===h?b:this.defaultDimValueGetter(m,y,b,_)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,v),g}function GLe(r){if(r.sourceFormat===ms){var e=HLe(r.data||[]);return!Ae(Tv(e))}}function HLe(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();bA(ou);var WLe=0,LI=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++WLe}return r.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&De(n,$Le);return new r({categories:i,needCollect:!i,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!Ze(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=this._getOrCreateMap();return t=i.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=nt(this.categories))},r}();function $Le(r){return _t(r)&&r.value!=null?r.value:r+""}function FI(r){return r.type==="interval"||r.type==="log"}function jLe(r,e,t,n){var i={},a=r[1]-r[0],o=i.interval=wK(a/e);t!=null&&on&&(o=i.interval=n);var s=i.intervalPrecision=YQ(o),l=i.niceTickExtent=[$n(Math.ceil(r[0]/o)*o,s),$n(Math.floor(r[1]/o)*o,s)];return qLe(l,r),i}function kE(r){var e=Math.pow(10,LF(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,$n(t*e)}function YQ(r){return Ll(r)+2}function D8(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function qLe(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),D8(r,0,e),D8(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function VA(r,e){return r>=e[0]&&r<=e[1]}function UA(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function GA(r,e){return r*(e[1]-e[0])+e[0]}var HA=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new LI({})),Ae(i)&&(i=new LI({categories:De(i,function(a){return _t(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:Ze(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),VA(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),UA(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(GA(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,i=n[0];i<=n[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(ou);ou.registerClass(HA);var uh=$n,Ku=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return VA(t,this._extent)},e.prototype.normalize=function(t){return UA(t,this._extent)},e.prototype.scale=function(t){return GA(t,this._extent)},e.prototype.setExtent=function(t,n){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(t){var n=this._extent;t[0]n[1]&&(n[1]=t[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=YQ(t)},e.prototype.getTicks=function(t){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]l)return[];var c=s.length?s[s.length-1].value:a[1];return i[1]>c&&(t?s.push({value:uh(c+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;oa[0]&&d0&&(a=a===null?s:Math.min(a,s))}t[n]=a}}return t}function XQ(r){var e=KLe(r),t=[];return B(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),f=a.scale.getExtent(),h=Math.abs(f[1]-f[0]);s=u?c/h*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=$e(n.get("barWidth"),s),g=$e(n.get("barMaxWidth"),s),v=$e(n.get("barMinWidth")||(rJ(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:v,barGap:m,barCategoryGap:y,axisKey:mB(a),stackId:vB(n)})}),QQ(t)}function QQ(r){var e={};B(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=n.barMaxWidth;f&&(l[u].maxWidth=f);var h=n.barMinWidth;h&&(l[u].minWidth=h);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return B(e,function(n,i){t[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=vr(a).length;s=Math.max(35-l*4,15)+"%"}var u=$e(s,o),c=$e(n.gap,1),f=n.remainedWidth,h=n.autoWidthCount,d=(f-u)/(h+(h-1)*c);d=Math.max(d,0),B(a,function(m){var y=m.maxWidth,b=m.minWidth;if(m.width){var _=m.width;y&&(_=Math.min(_,y)),b&&(_=Math.max(_,b)),m.width=_,f-=_+c*_,h--}else{var _=d;y&&y<_&&(_=Math.min(y,f)),b&&b>_&&(_=b),_!==d&&(m.width=_,f-=_+c*_,h--)}}),d=(f-u)/(h+(h-1)*c),d=Math.max(d,0);var p=0,g;B(a,function(m,y){m.width||(m.width=d),g=m,p+=m.width*(1+c)}),g&&(p-=g.width*c);var v=-p/2;B(a,function(m,y){t[i][y]=t[i][y]||{bandWidth:o,offset:v,width:m.width},v+=m.width*(1+c)})}),t}function XLe(r,e,t){if(r&&e){var n=r[mB(e)];return n!=null&&t!=null?n[vB(t)]:n}}function JQ(r,e){var t=KQ(r,e),n=XQ(t);B(t,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=vB(i),u=n[mB(s)][l],c=u.offset,f=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function eJ(r){return{seriesType:r,plan:Nv(),reset:function(e){if(tJ(e)){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=t.getDimensionIndex(t.mapDimension(i.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),f=Df(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),h=a.isHorizontal(),d=QLe(i,a),p=rJ(e),g=e.get("barMinHeight")||0,v=c&&t.getDimensionIndex(c),m=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(b,_){for(var w=b.count,S=p&&Bl(w*3),C=p&&l&&Bl(w*3),A=p&&Bl(w),x=n.master.getRect(),D=h?x.width:x.height,E,k=_.getStore(),M=0;(E=b.next())!=null;){var T=k.get(f?v:o,E),L=k.get(s,E),F=d,N=void 0;f&&(N=+T-k.get(o,E));var z=void 0,W=void 0,H=void 0,R=void 0;if(h){var ne=n.dataToPoint([T,L]);if(f){var te=n.dataToPoint([N,L]);F=te[0]}z=F,W=ne[1]+y,H=ne[0]-F,R=m,Math.abs(H)0?t:1:t))}var JLe=function(r,e,t,n){for(;t>>1;r[i][1]i&&(this._approxInterval=i);var s=y_.length,l=Math.min(JLe(y_,this._approxInterval,0,s),s-1);this._interval=y_[l][1],this._minLevelUnit=y_[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Or(t)?t:+Ql(t)},e.prototype.contain=function(t){return VA(this.parse(t),this._extent)},e.prototype.normalize=function(t){return UA(this.parse(t),this._extent)},e.prototype.scale=function(t){return GA(t,this._extent)},e.type="time",e}(Ku),y_=[["second",KF],["minute",XF],["hour",L0],["quarter-day",L0*6],["half-day",L0*12],["day",rs*1.2],["half-week",rs*3.5],["week",rs*7],["month",rs*31],["quarter",rs*95],["half-year",v6/2],["year",v6]];function eFe(r,e,t,n){var i=Ql(e),a=Ql(t),o=function(p){return y6(i,p,n)===y6(a,p,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},h=function(){return f()&&o("second")},d=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return h();case"millisecond":return d()}}function tFe(r,e){return r/=rs,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function rFe(r){var e=30*rs;return r/=e,r>6?6:r>3?3:r>2?2:1}function nFe(r){return r/=L0,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function E8(r,e){return r/=e?XF:KF,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function iFe(r){return wK(r)}function aFe(r,e,t){var n=new Date(r);switch(yg(e)){case"year":case"month":n[wX(t)](0);case"day":n[SX(t)](1);case"hour":n[CX(t)](0);case"minute":n[AX(t)](0);case"second":n[xX(t)](0),n[DX(t)](0)}return n.getTime()}function oFe(r,e,t,n){var i=1e4,a=bX,o=0;function s(D,E,k,M,T,L,F){for(var N=new Date(E),z=E,W=N[M]();z1&&L===0&&k.unshift({value:k[0].value-z})}}for(var L=0;L=n[0]&&y<=n[1]&&f++)}var b=(n[1]-n[0])/e;if(f>b*1.5&&h>b/1.5||(u.push(v),f>b||r===a[d]))break}c=[]}}}for(var _=Jr(De(u,function(D){return Jr(D,function(E){return E.value>=n[0]&&E.value<=n[1]&&!E.notAdd})}),function(D){return D.length>0}),w=[],S=_.length-1,d=0;d<_.length;++d)for(var C=_[d],A=0;A0;)a*=10;var s=[$n(uFe(n[0]/a)*a),$n(lFe(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){P0.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=ws(t)/ws(this.base),VA(t,this._extent)},e.prototype.normalize=function(t){return t=ws(t)/ws(this.base),UA(t,this._extent)},e.prototype.scale=function(t){return t=GA(t,this._extent),b_(this.base,t)},e.type="log",e}(ou),nJ=bB.prototype;nJ.getMinorTicks=P0.getMinorTicks;nJ.getLabel=P0.getLabel;function __(r,e){return sFe(r,Ll(e))}ou.registerClass(bB);var cFe=function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var h=this._determinedMin,d=this._determinedMax;return h!=null&&(s=h,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(e,t){this[hFe[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=fFe[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),fFe={min:"_determinedMin",max:"_determinedMax"},hFe={min:"_dataMin",max:"_dataMax"};function iJ(r,e,t){var n=r.rawExtentInfo;return n||(n=new cFe(r,e,t),r.rawExtentInfo=n,n)}function w_(r,e){return e==null?null:Ly(e)?NaN:r.parse(e)}function aJ(r,e){var t=r.type,n=iJ(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&t==="time"){var s=KQ("bar",o),l=!1;if(B(s,function(f){l=l||f.getBaseAxis()===e.axis}),l){var u=XQ(s),c=dFe(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function dFe(r,e,t,n){var i=t.axis.getExtent(),a=i[1]-i[0],o=XLe(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;B(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;B(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,f=1-(s+l)/a,h=c/f-c;return e+=h*(l/u),r-=h*(s/u),{min:r,max:e}}function iv(r,e){var t=e,n=aJ(r,t),i=n.extent,a=t.get("splitNumber");r instanceof bB&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function WA(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new HA({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new yB({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(ou.getClass(e)||Ku)}}function pFe(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Uv(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}}(e):Ze(e)?function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a??"");return o}}(e):gt(e)?function(n){return function(i,a){return t!=null&&(a=i.value-t),n(_B(r,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function _B(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function gFe(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var n,i,a=t.getExtent();t instanceof HA?i=t.count():(n=t.getTicks(),i=n.length);var o=r.getLabelModel(),s=Uv(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;cr[1]&&(r[1]=i[1])})}var q1=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),yFe=1e-8;function T8(r,e){return Math.abs(r-e)i&&(n=o,i=l)}if(n)return _Fe(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return B(o,function(s){s.type==="polygon"?M8(s.exterior,i,a,t):B(s.points,function(l){M8(l,i,a,t)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new Gt(i[0],i[1],a[0]-i[0],a[1]-i[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var a=0,o=i.length;a>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/t,l/t])}return n}function CFe(r,e){return r=SFe(r),De(Jr(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,i=t.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new I8(o[0],o.slice(1)));break;case"MultiPolygon":B(i.coordinates,function(l){l[0]&&a.push(new I8(l[0],l.slice(1)))});break;case"LineString":a.push(new L8([i.coordinates]));break;case"MultiLineString":a.push(new L8(i.coordinates))}var s=new lJ(n[e||"name"],a,n.cp);return s.properties=n,s})}var qy=wr();function cJ(r,e){var t=De(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function AFe(r){var e=r.getLabelModel().get("customValues");if(e){var t=Uv(r);return{labels:cJ(r,e).map(function(n){var i={value:n};return{formattedLabel:t(i),rawLabel:r.scale.getLabel(i),tickValue:n}})}}return r.type==="category"?DFe(r):kFe(r)}function xFe(r,e){var t=r.getTickModel().get("customValues");return t?{ticks:cJ(r,t)}:r.type==="category"?EFe(r,e):{ticks:De(r.scale.getTicks(),function(n){return n.value})}}function DFe(r){var e=r.getLabelModel(),t=fJ(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function fJ(r,e){var t=hJ(r,"labels"),n=wB(e),i=dJ(t,n);if(i)return i;var a,o;return gt(n)?a=vJ(r,n):(o=n==="auto"?TFe(r):n,a=gJ(r,o)),pJ(t,n,{labels:a,labelCategoryInterval:o})}function EFe(r,e){var t=hJ(r,"ticks"),n=wB(e),i=dJ(t,n);if(i)return i;var a,o;if((!e.get("show")||r.scale.isBlank())&&(a=[]),gt(n))a=vJ(r,n,!0);else if(n==="auto"){var s=fJ(r,r.getLabelModel());o=s.labelCategoryInterval,a=De(s.labels,function(l){return l.tickValue})}else o=n,a=gJ(r,o,!0);return pJ(t,n,{ticks:a,tickCategoryInterval:o})}function kFe(r){var e=r.scale.getTicks(),t=Uv(r);return{labels:De(e,function(n,i){return{level:n.level,formattedLabel:t(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function hJ(r,e){return qy(r)[e]||(qy(r)[e]=[])}function dJ(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(n)),f=Math.abs(u*Math.sin(n)),h=0,d=0;l<=a[1];l+=s){var p=0,g=0,v=P1(t({value:l}),e.font,"center","top");p=v.width*1.3,g=v.height*1.3,h=Math.max(h,p,7),d=Math.max(d,g,7)}var m=h/c,y=d/f;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var b=Math.max(0,Math.floor(Math.min(m,y))),_=qy(r.model),w=r.getExtent(),S=_.lastAutoInterval,C=_.lastTickCount;return S!=null&&C!=null&&Math.abs(S-b)<=1&&Math.abs(C-o)<=1&&S>b&&_.axisExtent0===w[0]&&_.axisExtent1===w[1]?b=S:(_.lastTickCount=o,_.lastAutoInterval=b,_.axisExtent0=w[0],_.axisExtent1=w[1]),b}function IFe(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function gJ(r,e,t){var n=Uv(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=oJ(r),h=o.get("showMinLabel")||f,d=o.get("showMaxLabel")||f;h&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);d&&p-l!==a[1]&&g(a[1]);function g(v){var m={value:v};s.push(t?v:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:v})}return s}function vJ(r,e,t){var n=r.scale,i=Uv(r),a=[];return B(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var F8=[0,1],el=function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return bK(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),B8(n,i.count())),Kr(e,F8,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),B8(n,i.count()));var a=Kr(e,n,F8,t);return this.scale.scale(a)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=xFe(this,t),i=n.ticks,a=De(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return LFe(this,a,o,e.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),i=De(n,function(a){return De(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return AFe(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return MFe(this)},r}();function B8(r,e){var t=r[1]-r[0],n=e,i=t/n/2;r[0]+=i,r[1]-=i}function LFe(r,e,t,n){var i=e.length;if(!r.onBand||t||!i)return;var a=r.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1]};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;B(e,function(d){d.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s},e.push(o)}var f=a[0]>a[1];h(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&h(a[0],e[0].coord)&&e.unshift({coord:a[0]}),h(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&h(o.coord,a[1])&&e.push({coord:a[1]});function h(d,p){return d=$n(d),p=$n(p),f?d>p:di&&(i+=km);var d=Math.atan2(s,o);if(d<0&&(d+=km),d>=n&&d<=i||d+km>=n&&d+km<=i)return l[0]=c,l[1]=f,u-t;var p=t*Math.cos(n)+r,g=t*Math.sin(n)+e,v=t*Math.cos(i)+r,m=t*Math.sin(i)+e,y=(p-o)*(p-o)+(g-s)*(g-s),b=(v-o)*(v-o)+(m-s)*(m-s);return y0){e=e/180*Math.PI,Rs.fromArray(r[0]),pn.fromArray(r[1]),Zn.fromArray(r[2]),zt.sub(Ol,Rs,pn),zt.sub(El,Zn,pn);var t=Ol.len(),n=El.len();if(!(t<.001||n<.001)){Ol.scale(1/t),El.scale(1/n);var i=Ol.dot(El),a=Math.cos(e);if(a1&&zt.copy(Ia,Zn),Ia.toArray(r[1])}}}}function NFe(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Rs.fromArray(r[0]),pn.fromArray(r[1]),Zn.fromArray(r[2]),zt.sub(Ol,pn,Rs),zt.sub(El,Zn,pn);var n=Ol.len(),i=El.len();if(!(n<.001||i<.001)){Ol.scale(1/n),El.scale(1/i);var a=Ol.dot(e),o=Math.cos(t);if(a=l)zt.copy(Ia,Zn);else{Ia.scaleAndAdd(El,s/Math.tan(Math.PI/2-c));var f=Zn.x!==pn.x?(Ia.x-pn.x)/(Zn.x-pn.x):(Ia.y-pn.y)/(Zn.y-pn.y);if(isNaN(f))return;f<0?zt.copy(Ia,pn):f>1&&zt.copy(Ia,Zn)}Ia.toArray(r[1])}}}}function IE(r,e,t,n){var i=t==="normal",a=i?r:r.ensureState(t);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?r.useStyle(s):a.style=s}function zFe(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var i=$c(n[0],n[1]),a=$c(n[1],n[2]);if(!i||!a){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*t,s=Dw([],n[1],n[0],o/i),l=Dw([],n[1],n[2],o/a),u=Dw([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var c=1;c0&&a&&w(-c/o,0,o);var g=r[0],v=r[o-1],m,y;b(),m<0&&S(-m,.8),y<0&&S(y,.8),b(),_(m,y,1),_(y,m,-1),b(),m<0&&C(-m),y<0&&C(y);function b(){m=g.rect[e]-n,y=i-v.rect[e]-v.rect[t]}function _(A,x,D){if(A<0){var E=Math.min(x,-A);if(E>0){w(E*D,0,o);var k=E+A;k<0&&S(-k*D,1)}else S(-A*D,1)}}function w(A,x,D){A!==0&&(u=!0);for(var E=x;E0)for(var k=0;k0;k--){var F=D[k-1]*L;w(-F,k,o)}}}function C(A){var x=A<0?-1:1;A=Math.abs(A);for(var D=Math.ceil(A/(o-1)),E=0;E0?w(D,0,E+1):w(-D,o-E-1,o),A-=D,A<=0)return}return u}function VFe(r,e,t,n){return _J(r,"x","width",e,t,n)}function wJ(r,e,t,n){return _J(r,"y","height",e,t,n)}function SJ(r){var e=[];r.sort(function(g,v){return v.priority-g.priority});var t=new Gt(0,0,0,0);function n(g){if(!g.ignore){var v=g.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}g.ignore=!0}for(var i=0;i=0&&n.attr(a.oldLayoutSelect),Qt(h,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),Pr(n,u,t,l)}else if(n.attr(u),!Fv(n).valueAnimation){var f=Lt(n.style.opacity,1);n.style.opacity=0,Dn(n,{style:{opacity:f}},t,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};S_(d,u,C_),S_(d,n.states.select,C_)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};S_(p,u,C_),S_(p,n.states.emphasis,C_)}pX(n,l,c,t,t)}if(i&&!i.ignore&&!i.invisible){var a=HFe(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),Pr(i,{shape:g},t)):(i.setShape(g),i.style.strokePercent=0,Dn(i,{style:{strokePercent:1}},t)),a.oldLayout=g}},r}(),FE=wr();function $Fe(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var i=FE(t).labelManager;i||(i=FE(t).labelManager=new WFe),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var i=FE(t).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})}var BE=Math.sin,OE=Math.cos,CJ=Math.PI,fh=Math.PI*2,jFe=180/CJ,AJ=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,i,a,o){this._add("C",e,t,n,i,a,o)},r.prototype.quadraticCurveTo=function(e,t,n,i){this._add("Q",e,t,n,i)},r.prototype.arc=function(e,t,n,i,a,o){this.ellipse(e,t,n,n,0,i,a,o)},r.prototype.ellipse=function(e,t,n,i,a,o,s,l){var u=s-o,c=!l,f=Math.abs(u),h=Kc(f-fh)||(c?u>=fh:-u>=fh),d=u>0?u%fh:u%fh+fh,p=!1;h?p=!0:Kc(f)?p=!1:p=d>=CJ==!!c;var g=e+n*OE(o),v=t+i*BE(o);this._start&&this._add("M",g,v);var m=Math.round(a*jFe);if(h){var y=1/this._p,b=(c?1:-1)*(fh-y);this._add("A",n,i,m,1,+c,e+n*OE(o+b),t+i*BE(o+b)),y>.01&&this._add("A",n,i,m,0,+c,g,v)}else{var _=e+n*OE(s),w=t+i*BE(s);this._add("A",n,i,m,+p,+c,_,w)}},r.prototype.rect=function(e,t,n,i){this._add("M",e,t),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,i,a,o,s,l,u){for(var c=[],f=this._p,h=1;h"}function tBe(r){return""}function xB(r,e){e=e||{};var t=e.newline?` +`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return eBe(o,s)+(o!=="style"?to(l):l||"")+(a?""+t+De(a,function(u){return n(u)}).join(t)+t:"")+tBe(o)}return n(r)}function rBe(r,e,t){t=t||{};var n=t.newline?` +`:"",i=" {"+n,a=n+"}",o=De(vr(r),function(l){return l+i+De(vr(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+a}).join(n),s=De(vr(e),function(l){return"@keyframes "+l+i+De(vr(e[l]),function(u){return u+i+De(vr(e[l][u]),function(c){var f=e[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":[""].join(n)}function PI(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function N8(r,e,t,n){return xi("svg","root",{width:r,height:e,xmlns:xJ,"xmlns:xlink":DJ,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var nBe=0;function kJ(){return nBe++}var z8={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},mh="transform-origin";function iBe(r,e,t){var n=be({},r.shape);be(n,e),r.buildPath(t,n);var i=new AJ;return i.reset(cK(r)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function aBe(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[mh]=t+"px "+n+"px")}var oBe={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function TJ(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function sBe(r,e,t){var n=r.shape.paths,i={},a,o;if(B(n,function(l){var u=PI(t.zrId);u.animation=!0,$A(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,h=vr(c),d=h.length;if(d){o=h[d-1];var p=c[o];for(var g in p){var v=p[g];i[g]=i[g]||{d:""},i[g].d+=v.d||""}for(var m in f){var y=f[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){e.d=!1;var s=TJ(i,t);return a.replace(o,s)}}function V8(r){return Ze(r)?z8[r]?"cubic-bezier("+z8[r]+")":TF(r)?r:"":""}function $A(r,e,t,n){var i=r.animators,a=i.length,o=[];if(r instanceof WF){var s=sBe(r,e,t);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u0}).length){var Se=TJ(C,t);return Se+" "+y[0]+" both"}}for(var v in l){var s=g(l[v]);s&&o.push(s)}if(o.length){var m=t.zrId+"-cls-"+kJ();t.cssNodes["."+m]={animation:o.join(",")},e.class=m}}function lBe(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};U8(n,e,t)}else{var i=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=i.fill;if(!a){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(a=qM(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),U8(n,e,t)}}function U8(r,e,t,n){var i=JSON.stringify(r),a=t.cssStyleCache[i];a||(a=t.zrId+"-cls-"+kJ(),t.cssStyleCache[i]=a,t.cssNodes["."+a+":hover"]=r),e.class=e.class?e.class+" "+a:a}var Yy=Math.round;function MJ(r){return r&&Ze(r.src)}function IJ(r){return r&>(r.toDataURL)}function DB(r,e,t,n){XFe(function(i,a){var o=i==="fill"||i==="stroke";o&&uK(a)?FJ(e,r,i,n):o&&MF(a)?BJ(t,r,i,n):o&&a==="none"?r[i]="transparent":r[i]=a},e,t,!1),gBe(t,r,n)}function EB(r,e){var t=ake(e);t&&(t.each(function(n,i){n!=null&&(r[(R8+i).toLowerCase()]=n+"")}),e.isSilent()&&(r[R8+"silent"]="true"))}function G8(r){return Kc(r[0]-1)&&Kc(r[1])&&Kc(r[2])&&Kc(r[3]-1)}function uBe(r){return Kc(r[4])&&Kc(r[5])}function kB(r,e,t){if(e&&!(uBe(e)&&G8(e))){var n=1e4;r.transform=G8(e)?"translate("+Yy(e[4]*n)/n+" "+Yy(e[5]*n)/n+")":kEe(e)}}function H8(r,e,t){for(var n=r.points,i=[],a=0;a"u"){var v="Image width/height must been given explictly in svg-ssr renderer.";Ga(h,v),Ga(d,v)}else if(h==null||d==null){var m=function(D,E){if(D){var k=D.elm,M=h||E.width,T=d||E.height;D.tag==="pattern"&&(u?(T=1,M/=a.width):c&&(M=1,T/=a.height)),D.attrs.width=M,D.attrs.height=T,k&&(k.setAttribute("width",M),k.setAttribute("height",T))}},y=PF(p,null,r,function(D){l||m(S,D),m(f,D)});y&&y.width&&y.height&&(h=h||y.width,d=d||y.height)}f=xi("image","img",{href:p,width:h,height:d}),o.width=h,o.height=d}else i.svgElement&&(f=wt(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(f){var b,_;l?b=_=1:u?(_=1,b=o.width/a.width):c?(b=1,_=o.height/a.height):o.patternUnits="userSpaceOnUse",b!=null&&!isNaN(b)&&(o.width=b),_!=null&&!isNaN(_)&&(o.height=_);var w=fK(i);w&&(o.patternTransform=w);var S=xi("pattern","",o,[f]),C=xB(S),A=n.patternCache,x=A[C];x||(x=n.zrId+"-p"+n.patternIdx++,A[C]=x,o.id=x,S=n.defs[x]=xi("pattern",x,o,[f])),e[t]=vA(x)}}function vBe(r,e,t){var n=t.clipPathCache,i=t.defs,a=n[r.id];if(!a){a=t.zrId+"-c"+t.clipPathIdx++;var o={id:a};n[r.id]=a,i[a]=xi("clipPath",a,o,[LJ(r,t)])}e["clip-path"]=vA(a)}function j8(r){return document.createTextNode(r)}function kh(r,e,t){r.insertBefore(e,t)}function q8(r,e){r.removeChild(e)}function Y8(r,e){r.appendChild(e)}function OJ(r){return r.parentNode}function PJ(r){return r.nextSibling}function PE(r,e){r.textContent=e}var Z8=58,mBe=120,yBe=xi("","");function RI(r){return r===void 0}function _l(r){return r!==void 0}function bBe(r,e,t){for(var n={},i=e;i<=t;++i){var a=r[i].key;a!==void 0&&(n[a]=i)}return n}function c0(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function Zy(r){var e,t=r.children,n=r.tag;if(_l(n)){var i=r.elm=EJ(n);if(TB(yBe,r),Ae(t))for(e=0;ea?(p=t[l+1]==null?null:t[l+1].elm,RJ(r,p,t,i,l)):Z2(r,e,n,a))}function Np(r,e){var t=e.elm=r.elm,n=r.children,i=e.children;r!==e&&(TB(r,e),RI(e.text)?_l(n)&&_l(i)?n!==i&&_Be(t,n,i):_l(i)?(_l(r.text)&&PE(t,""),RJ(t,null,i,0,i.length-1)):_l(n)?Z2(t,n,0,n.length-1):_l(r.text)&&PE(t,""):r.text!==e.text&&(_l(n)&&Z2(t,n,0,n.length-1),PE(t,e.text)))}function wBe(r,e){if(c0(r,e))Np(r,e);else{var t=r.elm,n=OJ(t);Zy(e),n!==null&&(kh(n,e.elm,PJ(t)),Z2(n,[r],0,0))}return e}var SBe=0,CBe=function(){function r(e,t,n){if(this.type="svg",this.refreshHover=K8(),this.configLayer=K8(),this.storage=t,this._opts=n=be({},n),this.root=e,this._id="zr"+SBe++,this._oldVNode=N8(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=EJ("svg");TB(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",wBe(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return $8(e,PI(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=PI(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis;var o=[],s=this._bgVNode=ABe(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=xi("g","main",{},[]);this._paintList(t,a,l?l.children:o),l&&o.push(l);var u=De(vr(a.defs),function(h){return a.defs[h]});if(u.length&&o.push(xi("defs","defs",{},u)),e.animation){var c=rBe(a.cssNodes,a.cssAnims,{newline:!0});if(c){var f=xi("style","stl",{},[],c);o.push(f)}}return N8(n,i,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},xB(this.renderToVNode({animation:Lt(e.cssAnimation,!0),emphasis:Lt(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Lt(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c=0&&!(h&&l&&h[g]===l[g]);g--);for(var v=p-1;v>g;v--)o--,s=a[o-1];for(var m=g+1;m=s)}}for(var f=this.__startIndex;f15)break}}T.prevElClipPaths&&m.restore()};if(y)if(y.length===0)A=v.__endIndex;else for(var D=d.dpr,E=0;E0&&e>i[0]){for(l=0;le);l++);s=n[i[l]]}if(i.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,i=0;i0?A_:0),this._needsManuallyCompositing),c.__builtin__||SF("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),a=c),i.__dirty&Co&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(f,h){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,B(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Ut(n[e],t,!0):n[e]=t;for(var i=0;i-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(bn);function av(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var i=rv(r,e,t[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o=0&&n.push(e[a])}return n.join(" ")}var Y1=function(r){pe(e,r);function e(t,n,i,a){var o=r.call(this)||this;return o.updateData(t,n,i,a),o}return e.prototype._createSymbol=function(t,n,i,a,o){this.removeAll();var s=ni(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=LBe,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){qu(this.childAt(0))},e.prototype.downplay=function(){Yu(this.childAt(0))},e.prototype.setZ=function(t,n){var i=this.childAt(0);i.zlevel=t,i.z=n},e.prototype.setDraggable=function(t,n){var i=this.childAt(0);i.draggable=t,i.cursor=!n&&t?"move":i.cursor},e.prototype.updateData=function(t,n,i,a){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=o!==this._symbolType,c=a&&a.disableAnimation;if(u){var f=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,f)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(d):Pr(h,d,s,n),Zs(h)}if(this._updateCommon(t,n,l,i,a),u){var h=this.childAt(0);if(!c){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Dn(h,d,s,n)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,i,a,o){var s=this.childAt(0),l=t.hostModel,u,c,f,h,d,p,g,v,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,f=a.selectItemStyle,h=a.focus,d=a.blurScope,g=a.labelStatesModels,v=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||t.hasItemOption){var y=a&&a.itemModel?a.itemModel:t.getItemModel(n),b=y.getModel("emphasis");u=b.getModel("itemStyle").getItemStyle(),f=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),h=b.get("focus"),d=b.get("blurScope"),p=b.get("disabled"),g=Ti(y),v=b.getShallow("scale"),m=y.getShallow("cursor")}var _=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var w=Wd(t.getItemVisual(n,"symbolOffset"),i);w&&(s.x=w[0],s.y=w[1]),m&&s.attr("cursor",m);var S=t.getItemVisual(n,"style"),C=S.fill;if(s instanceof $i){var A=s.style;s.useStyle(be({image:A.image,x:A.x,y:A.y,width:A.width,height:A.height},S))}else s.__isEmptyBrush?s.useStyle(be({},S)):s.useStyle(S),s.style.decal=null,s.setColor(C,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var x=t.getItemVisual(n,"liftZ"),D=this._z2;x!=null?D==null&&(this._z2=s.z2,s.z2+=x):D!=null&&(s.z2=D,this._z2=null);var E=o&&o.useNameLabel;ta(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:k,inheritColor:C,defaultOpacity:S.opacity});function k(L){return E?t.getName(L):av(t,L)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var M=s.ensureState("emphasis");M.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var T=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;M.scaleX=this._sizeX*T,M.scaleY=this._sizeY*T,this.setSymbolScale(1),Vn(this,h,d,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,i){var a=this.childAt(0),o=Dt(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Af(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Af(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return Vv(t.getItemVisual(n,"symbolSize"))},e}(xt);function LBe(r,e){this.parent.drift(r,e)}function NE(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function J8(r){return r!=null&&!_t(r)&&(r={isIgnore:r}),r||{}}function e9(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Ti(e),cursorStyle:e.get("cursor")}}var Z1=function(){function r(e){this.group=new xt,this._SymbolCtor=e||Y1}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=J8(t);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=e9(e),u={disableAnimation:s},c=t.getSymbolPoint||function(f){return e.getItemLayout(f)};a||n.removeAll(),e.diff(a).add(function(f){var h=c(f);if(NE(e,h,f,t)){var d=new o(e,f,l,u);d.setPosition(h),e.setItemGraphicEl(f,d),n.add(d)}}).update(function(f,h){var d=a.getItemGraphicEl(h),p=c(f);if(!NE(e,p,f,t)){n.remove(d);return}var g=e.getItemVisual(f,"symbol")||"circle",v=d&&d.getSymbolType&&d.getSymbolType();if(!d||v&&v!==g)n.remove(d),d=new o(e,f,l,u),d.setPosition(p);else{d.updateData(e,f,l,u);var m={x:p[0],y:p[1]};s?d.attr(m):Pr(d,m,i)}n.add(d),e.setItemGraphicEl(f,d)}).remove(function(f){var h=a.getItemGraphicEl(f);h&&h.fadeOut(function(){n.remove(h)},i)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=e9(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=J8(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0?t=n[0]:n[1]<0&&(t=n[1]),t}function VJ(r,e,t,n){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=t.get(r.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function BBe(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,i){t.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function OBe(r,e,t,n,i,a,o,s){for(var l=BBe(r,e),u=[],c=[],f=[],h=[],d=[],p=[],g=[],v=zJ(i,e,o),m=r.getLayout("points")||[],y=e.getLayout("points")||[],b=0;b=i||g<0)break;if(fd(m,y)){if(l){g+=a;continue}break}if(g===t)r[a>0?"moveTo":"lineTo"](m,y),f=m,h=y;else{var b=m-u,_=y-c;if(b*b+_*_<.5){g+=a;continue}if(o>0){for(var w=g+a,S=e[w*2],C=e[w*2+1];S===m&&C===y&&v=n||fd(S,C))d=m,p=y;else{D=S-u,E=C-c;var T=m-u,L=S-m,F=y-c,N=C-y,z=void 0,W=void 0;if(s==="x"){z=Math.abs(T),W=Math.abs(L);var H=D>0?1:-1;d=m-H*z*o,p=y,k=m+H*W*o,M=y}else if(s==="y"){z=Math.abs(F),W=Math.abs(N);var R=E>0?1:-1;d=m,p=y-R*z*o,k=m,M=y+R*W*o}else z=Math.sqrt(T*T+F*F),W=Math.sqrt(L*L+N*N),x=W/(W+z),d=m-D*o*(1-x),p=y-E*o*(1-x),k=m+D*o*x,M=y+E*o*x,k=mc(k,yc(S,m)),M=mc(M,yc(C,y)),k=yc(k,mc(S,m)),M=yc(M,mc(C,y)),D=k-m,E=M-y,d=m-D*z/W,p=y-E*z/W,d=mc(d,yc(u,m)),p=mc(p,yc(c,y)),d=yc(d,mc(u,m)),p=yc(p,mc(c,y)),D=m-d,E=y-p,k=m+D*W/z,M=y+E*W/z}r.bezierCurveTo(f,h,d,p,m,y),f=k,h=M}else r.lineTo(m,y)}u=m,c=y,g+=a}return v}var UJ=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),PBe=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new UJ},e.prototype.buildPath=function(t,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&fd(i[o*2-2],i[o*2-1]);o--);for(;a=0){var _=u?(p-l)*b+l:(d-s)*b+s;return u?[t,_]:[_,t]}s=d,l=p;break;case o.C:d=a[f++],p=a[f++],g=a[f++],v=a[f++],m=a[f++],y=a[f++];var w=u?A2(s,d,g,m,t,c):A2(l,p,v,y,t,c);if(w>0)for(var S=0;S=0){var _=u?yi(l,p,v,y,C):yi(s,d,g,m,C);return u?[t,_]:[_,t]}}s=m,l=y;break}}},e}(sr),RBe=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(UJ),GJ=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new RBe},e.prototype.buildPath=function(t,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&fd(i[s*2-2],i[s*2-1]);s--);for(;oe){a?t.push(o(a,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),a=l}return t}function VBe(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=De(a.stops,function(b){return{coord:l.toGlobalCoord(l.dataToCoord(b.value)),color:b.color}}),c=u.length,f=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var h=zBe(u,i==="x"?t.getWidth():t.getHeight()),d=h.length;if(!d&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,g=h[0].coord-p,v=h[d-1].coord+p,m=v-g;if(m<.001)return"transparent";B(h,function(b){b.offset=(b.coord-g)/m}),h.push({offset:d?h[d-1].offset:.5,color:f[1]||"transparent"}),h.unshift({offset:d?h[0].offset:.5,color:f[0]||"transparent"});var y=new U1(0,0,0,0,h,!0);return y[i]=g,y[i+"2"]=v,y}}}function UBe(r,e,t){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(i&&GBe(a,e))){var o=e.mapDimension(a.dim),s={};return B(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function GBe(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;on)return!1;return!0}function HBe(r,e){return isNaN(r)||isNaN(e)}function WBe(r){for(var e=r.length/2;e>0&&HBe(r[e*2-2],r[e*2-1]);e--);return e-1}function a9(r,e){return[r[e*2],r[e*2+1]]}function $Be(r,e,t){for(var n=r.length/2,i=t==="x"?0:1,a,o,s=0,l=-1,u=0;u=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function $J(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var H=g.getState("emphasis").style;H.lineWidth=+g.style.lineWidth+1}Dt(g).seriesIndex=t.seriesIndex,Vn(g,N,z,W);var R=i9(t.get("smooth")),ne=t.get("smoothMonotone");if(g.setShape({smooth:R,smoothMonotone:ne,connectNulls:A}),v){var te=l.getCalculationInfo("stackedOnSeries"),fe=0;v.useStyle(yt(c.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),te&&(fe=i9(te.get("smooth"))),v.setShape({smooth:R,stackedOnSmooth:fe,smoothMonotone:ne,connectNulls:A}),ea(v,t,"areaStyle"),Dt(v).seriesIndex=t.seriesIndex,Vn(v,N,z,W)}var Ce=function(Te){a._changePolyState(Te)};l.eachItemGraphicEl(function(Te){Te&&(Te.onHoverStateChange=Ce)}),this._polyline.onHoverStateChange=Ce,this._data=l,this._coordSys=o,this._stackedOnPoints=S,this._points=f,this._step=E,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,g),v&&this.packEventData(t,v))},e.prototype.packEventData=function(t,n){Dt(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,i,a){var o=t.getData(),s=xd(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var h=t.get("zlevel")||0,d=t.get("z")||0;u=new Y1(o,s),u.x=c,u.y=f,u.setZ(h,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else an.prototype.highlight.call(this,t,n,i,a)},e.prototype.downplay=function(t,n,i,a){var o=t.getData(),s=xd(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else an.prototype.downplay.call(this,t,n,i,a)},e.prototype._changePolyState=function(t){var n=this._polygon;I2(this._polyline,t),n&&I2(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new PBe({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new GJ({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");gt(c)&&(c=c(null));var f=u.get("animationDelay")||0,h=gt(f)?f(null):f;t.eachItemGraphicEl(function(d,p){var g=d;if(g){var v=[d.x,d.y],m=void 0,y=void 0,b=void 0;if(i)if(o){var _=i,w=n.pointToCoord(v);a?(m=_.startAngle,y=_.endAngle,b=-w[1]/180*Math.PI):(m=_.r0,y=_.r,b=w[0])}else{var S=i;a?(m=S.x,y=S.x+S.width,b=d.x):(m=S.y+S.height,y=S.y,b=d.y)}var C=y===m?0:(b-m)/(y-m);l&&(C=1-C);var A=gt(f)?f(p):c*C+h,x=g.getSymbolPath(),D=x.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:A}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:A}),x.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,i){var a=t.getModel("endLabel");if($J(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Er({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=WBe(l);c>=0&&(ta(s,Ti(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:c,defaultText:function(f,h,d){return d!=null?NJ(o,d):av(o,f)},enableTextSetter:!0},jBe(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var f=i.getLayout("points"),h=i.hostModel,d=h.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,v=l.getBaseAxis(),m=v.isHorizontal(),y=v.inverse,b=n.shape,_=y?m?b.x:b.y+b.height:m?b.x+b.width:b.y,w=(m?g:0)*(y?-1:1),S=(m?0:-g)*(y?-1:1),C=m?"x":"y",A=$Be(f,_,C),x=A.range,D=x[1]-x[0],E=void 0;if(D>=1){if(D>1&&!d){var k=a9(f,x[0]);u.attr({x:k[0]+w,y:k[1]+S}),o&&(E=h.getRawValue(x[0]))}else{var k=c.getPointOn(_,C);k&&u.attr({x:k[0]+w,y:k[1]+S});var M=h.getRawValue(x[0]),T=h.getRawValue(x[1]);o&&(E=MK(i,p,M,T,A.t))}a.lastFrameIndex=x[0]}else{var L=t===1||a.lastFrameIndex>0?x[0]:0,k=a9(f,L);o&&(E=h.getRawValue(L)),u.attr({x:k[0]+w,y:k[1]+S})}if(o){var F=Fv(u);typeof F.setLabelText=="function"&&F.setLabelText(E)}}},e.prototype._doUpdateAnimation=function(t,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,f=t.hostModel,h=OBe(this._data,t,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=h.current,p=h.stackedOnCurrent,g=h.next,v=h.stackedOnNext;if(o&&(d=bc(h.current,i,o,l),p=bc(h.stackedOnCurrent,i,o,l),g=bc(h.next,i,o,l),v=bc(h.stackedOnNext,i,o,l)),n9(d,g)>3e3||c&&n9(p,v)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:v}));return}u.shape.__points=h.current,u.shape.points=d;var m={shape:{points:g}};h.current!==d&&(m.shape.__points=h.next),u.stopAnimation(),Pr(u,m,f),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),Pr(c,{shape:{stackedOnPoints:v}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],b=h.status,_=0;_e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;te&&(e=a,t=i)}return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},ZBe=function(r){return Math.round(r.length/2)};function jJ(r){return{seriesType:r,reset:function(e,t,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=n.getDevicePixelRatio(),h=Math.abs(c[1]-c[0])*(f||1),d=Math.round(s/h);if(isFinite(d)&&d>1){a==="lttb"&&e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d));var p=void 0;Ze(a)?p=YBe[a]:gt(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,p,ZBe))}}}}}function KBe(r){r.registerChartView(qBe),r.registerSeriesModel(IBe),r.registerLayout(X1("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,jJ("line"))}var Ky=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return oc(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(t),s=a.dataToPoint(o);if(i)B(a.getAxes(),function(h,d){if(h.type==="category"&&n!=null){var p=h.getTicksCoords(),g=h.getTickModel().get("alignWithLabel"),v=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!g&&(v+=1),p.length<2)return;if(p.length===2){s[d]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,b=void 0,_=1,w=0;wv){b=(S+y)/2;break}w===1&&(_=C-p[0].tickValue)}b==null&&(y?y&&(b=p[p.length-1].coord):b=p[0].coord),s[d]=h.toGlobalCoord(b)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=a.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(bn);bn.registerClass(Ky);var XBe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return oc(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,i){return i.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Rf(Ky.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Ky),QBe=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),K2=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new QBe},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,f=n.endAngle,h=n.clockwise,d=Math.PI*2,p=h?f-cMath.PI/2&&cs)return!0;s=f}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,i,a){if(this._isOrderChangedWithinSameData(t,n,i)){var o=this._dataSort(t,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,i){var a=n.baseAxis,o=this._dataSort(t,a,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Vy(a,t,Dt(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(an),o9={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var i=r.x+r.width,a=r.y+r.height,o=VE(e.x,r.x),s=UE(e.x+e.width,i),l=VE(e.y,r.y),u=UE(e.y+e.height,a),c=si?s:o,e.y=f&&l>a?u:l,e.width=c?0:s-o,e.height=f?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||f},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var i=UE(e.r,r.r),a=VE(e.r0,r.r0);e.r=i,e.r0=a;var o=i-a<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},s9={cartesian2d:function(r,e,t,n,i,a,o,s,l){var u=new _r({shape:be({},n),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,f=i?"height":"width";c[f]=0}return u},polar:function(r,e,t,n,i,a,o,s,l){var u=!i&&l?K2:Wa,c=new u({shape:n,z2:1});c.name="item";var f=qJ(i);if(c.calculateTextPosition=JBe(f,{isRoundCap:u===K2}),a){var h=c.shape,d=i?"r":"endAngle",p={};h[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?Pr:Dn)(c,{shape:p},a)}return c}};function nOe(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function l9(r,e,t,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Pr:Dn)(t,{shape:l},e,i,null);var c=e?r.baseAxis.model:null;(o?Pr:Dn)(t,{shape:u},c,i)}function u9(r,e){for(var t=0;t0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(r,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function oOe(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function qJ(r){return function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}}(r)}function f9(r,e,t,n,i,a,o,s){var l=e.getItemVisual(t,"style");if(s){if(!a.get("roundCap")){var c=r.shape,f=Wh(n.getModel("itemStyle"),c,!0);be(c,f),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=n.getShallow("cursor");h&&r.attr("cursor",h);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=Ti(n);ta(r,p,{labelFetcher:a,labelDataIndex:t,defaultText:av(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=r.getTextContent();if(s&&g){var v=n.get(["label","position"]);r.textConfig.inside=v==="middle"?!0:null,eOe(r,v==="outside"?d:v,qJ(o),n.get(["label","rotate"]))}dX(g,p,a.getRawValue(t),function(y){return NJ(e,y)});var m=n.getModel(["emphasis"]);Vn(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),ea(r,n),oOe(i)&&(r.style.fill="none",r.style.stroke="none",B(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function sOe(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var lOe=function(){function r(){}return r}(),h9=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new lOe},e.prototype.buildPath=function(t,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?t:null},30,!1);function uOe(r,e,t){for(var n=r.baseDimIdx,i=1-n,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=a.length/3;c=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function YJ(r,e,t){if(jd(t,"cartesian2d")){var n=e,i=t.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=t.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function cOe(r,e,t){var n=r.type==="polar"?Wa:_r;return new n({shape:YJ(e,t,r),silent:!0,z2:0})}function fOe(r){r.registerChartView(rOe),r.registerSeriesModel(XBe),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Bt(JQ,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,eJ("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,jJ("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var g9=Math.PI*2,k_=Math.PI/180;function ZJ(r,e){return di(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function KJ(r,e){var t=ZJ(r,e),n=r.get("center"),i=r.get("radius");Ae(i)||(i=[0,i]);var a=$e(t.width,e.getWidth()),o=$e(t.height,e.getHeight()),s=Math.min(a,o),l=$e(i[0],s/2),u=$e(i[1],s/2),c,f,h=r.coordinateSystem;if(h){var d=h.dataToPoint(n);c=d[0]||0,f=d[1]||0}else Ae(n)||(n=[n,n]),c=$e(n[0],a)+t.x,f=$e(n[1],o)+t.y;return{cx:c,cy:f,r0:l,r:u}}function hOe(r,e,t){e.eachSeriesByType(r,function(n){var i=n.getData(),a=i.mapDimension("value"),o=ZJ(n,t),s=KJ(n,t),l=s.cx,u=s.cy,c=s.r,f=s.r0,h=-n.get("startAngle")*k_,d=n.get("endAngle"),p=n.get("padAngle")*k_;d=d==="auto"?h-g9:-d*k_;var g=n.get("minAngle")*k_,v=g+p,m=0;i.each(a,function(N){!isNaN(N)&&m++});var y=i.getSum(a),b=Math.PI/(y||m)*2,_=n.get("clockwise"),w=n.get("roseType"),S=n.get("stillShowZeroSum"),C=i.getDataExtent(a);C[0]=0;var A=_?1:-1,x=[h,d],D=A*p/2;RF(x,!_),h=x[0],d=x[1];var E=XJ(n);E.startAngle=h,E.endAngle=d,E.clockwise=_;var k=Math.abs(d-h),M=k,T=0,L=h;if(i.setLayout({viewRect:o,r:c}),i.each(a,function(N,z){var W;if(isNaN(N)){i.setItemLayout(z,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:l,cy:u,r0:f,r:w?NaN:c});return}w!=="area"?W=y===0&&S?b:N*b:W=k/m,WW?(R=L+A*W/2,ne=R):(R=L+D,ne=H-D),i.setItemLayout(z,{angle:W,startAngle:R,endAngle:ne,clockwise:_,cx:l,cy:u,r0:f,r:w?Kr(N,C,[f,c]):c}),L=H}),Mt?m:v,w=Math.abs(b.label.y-t);if(w>=_.maxY){var S=b.label.x-e-b.len2*i,C=n+b.len,A=Math.abs(S)r.unconstrainedWidth?null:d:null;n.setStyle("width",p)}var g=n.getBoundingRect();a.width=g.width;var v=(n.style.margin||0)+2.1;a.height=g.height+v,a.y-=(a.height-f)/2}}}function GE(r){return r.position==="center"}function gOe(r){var e=r.getData(),t=[],n,i,a=!1,o=(r.get("minShowLabelAngle")||0)*dOe,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,f=s.y,h=s.height;function d(S){S.ignore=!0}function p(S){if(!S.ignore)return!0;for(var C in S.states)if(S.states[C].ignore===!1)return!0;return!1}e.each(function(S){var C=e.getItemGraphicEl(S),A=C.shape,x=C.getTextContent(),D=C.getTextGuideLine(),E=e.getItemModel(S),k=E.getModel("label"),M=k.get("position")||E.get(["emphasis","label","position"]),T=k.get("distanceToLabelLine"),L=k.get("alignTo"),F=$e(k.get("edgeDistance"),u),N=k.get("bleedMargin"),z=E.getModel("labelLine"),W=z.get("length");W=$e(W,u);var H=z.get("length2");if(H=$e(H,u),Math.abs(A.endAngle-A.startAngle)0?"right":"left":ne>0?"left":"right"}var ie=Math.PI,me=0,Pe=k.get("rotate");if(Or(Pe))me=Pe*(ie/180);else if(M==="center")me=0;else if(Pe==="radial"||Pe===!0){var Oe=ne<0?-R+ie:-R;me=Oe}else if(Pe==="tangential"&&M!=="outside"&&M!=="outer"){var Ge=Math.atan2(ne,te);Ge<0&&(Ge=ie*2+Ge);var Ye=te>0;Ye&&(Ge=ie+Ge),me=Ge-ie}if(a=!!me,x.x=fe,x.y=Ce,x.rotation=me,x.setStyle({verticalAlign:"middle"}),_e){x.setStyle({align:Se});var qe=x.states.select;qe&&(qe.x+=x.x,qe.y+=x.y)}else{var Ct=x.getBoundingRect().clone();Ct.applyTransform(x.getComputedTransform());var Zt=(x.style.margin||0)+2.1;Ct.y-=Zt/2,Ct.height+=Zt,t.push({label:x,labelLine:D,position:M,len:W,len2:H,minTurnAngle:z.get("minTurnAngle"),maxSurfaceAngle:z.get("maxSurfaceAngle"),surfaceNormal:new zt(ne,te),linePoints:Te,textAlign:Se,labelDistance:T,labelAlignTo:L,edgeDistance:F,bleedMargin:N,rect:Ct,unconstrainedWidth:Ct.width,labelStyleWidth:x.style.width})}C.setTextConfig({inside:_e})}}),!a&&r.get("avoidLabelOverlap")&&pOe(t,n,i,l,u,h,c,f);for(var g=0;g0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=a.r0}},e.type="pie",e}(an);function Gv(r,e,t){e=Ae(e)&&{coordDimensions:e}||be({encodeDefine:r.getEncode()},e);var n=r.getSource(),i=j1(n,e).dimensions,a=new Na(i,r);return a.initData(n,t),a}var J1=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r}(),yOe=wr(),bOe=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new J1(Je(this.getData,this),Je(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Gv(this,{coordDimensions:["value"],encodeDefaulter:Bt(eB,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),i=yOe(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=uke(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=a[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){Ad(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(bn);function _Oe(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(Or(o)&&!isNaN(o)&&o<0)})}}}function wOe(r){r.registerChartView(mOe),r.registerSeriesModel(bOe),bQ("pie",r.registerAction),r.registerLayout(Bt(hOe,"pie")),r.registerProcessor(Q1("pie")),r.registerProcessor(_Oe("pie"))}var SOe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return oc(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,i){return i.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(bn),JJ=4,COe=function(){function r(){}return r}(),AOe=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new COe},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&a[0]=0;u--){var c=u*2,f=a[c]-s/2,h=a[c+1]-l/2;if(t>=f&&n>=h&&t<=f+s&&n<=h+l)return u}return-1},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(t=i[0],n=i[1],a.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,f=-1/0,h=0;h=0&&(u.dataIndex=f+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),DOe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,i){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,i){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,i){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=X1("").reset(t,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var n=t.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new xOe:new Z1,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(an),EOe=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(gr),zI=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",ri).models[0]},e.type="cartesian2dAxis",e}(gr);oi(zI,q1);var eee={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},kOe=Ut({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},eee),MB=Ut({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},eee),TOe=Ut({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},MB),MOe=yt({logBase:10},MB);const tee={category:kOe,value:MB,time:TOe,log:MOe};var IOe={value:1,category:1,time:1,log:1};function ov(r,e,t,n){B(IOe,function(i,a){var o=Ut(Ut({},tee[a],!0),n,!0),s=function(l){pe(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var h=Gy(this),d=h?Pv(c):{},p=f.getTheme();Ut(c,p.get(a+"Axis")),Ut(c,this.getDefaultOption()),c.type=m9(c),h&&xf(c,d,h)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=LI.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",m9)}function m9(r){return r.type||(r.data?"category":"value")}var LOe=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return De(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Jr(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}(),VI=["x","y"];function y9(r){return r.type==="interval"||r.type==="time"}var FOe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=VI,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!y9(t)||!y9(n))){var i=t.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,h=o[0]-i[0]*c,d=o[1]-a[0]*f,p=this._transform=[c,0,0,f,h,d];this._invTransform=kv([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var i=this.dataToPoint(t),a=this.dataToPoint(n),o=this.getArea(),s=new Gt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,i){i=i||[];var a=t[0],o=t[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Ji(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(t,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(t[0]),u=a.parse(t[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(t,n){var i=[];if(this._invTransform)return Ji(i,t,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(t[0]),n),i[1]=o.coordToData(o.toLocalCoord(t[1]),n),i},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(n[0],n[1])-a+t,l=Math.max(i[0],i[1])-o+t;return new Gt(a,o,s,l)},e}(LOe),BOe=function(r){pe(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(el);function UI(r,e,t){t=t||{};var n=r.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,c=n.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],h={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p=u==="x"?[f[2]-d,f[3]+d]:[f[0]-d,f[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[h.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=[u==="y"?p[h[l]]:f[0],u==="x"?p[h[l]]:f[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[h[s]]-p[h.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Ni(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function b9(r){return r.get("coordinateSystem")==="cartesian2d"}function _9(r){var e={xAxisModel:null,yAxisModel:null};return B(e,function(t,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,ri).models[0];e[n]=a}),e}var HE=Math.log;function ree(r,e,t){var n=Ku.prototype,i=n.getTicks.call(t),a=n.getTicks.call(t,!0),o=i.length-1,s=n.getInterval.call(t),l=aJ(r,e),u=l.extent,c=l.fixMin,f=l.fixMax;if(r.type==="log"){var h=HE(r.base);u=[HE(u[0])/h,HE(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var d=n.getExtent.call(r);c&&(u[0]=d[0]),f&&(u[1]=d[1]);var p=n.getInterval.call(r),g=u[0],v=u[1];if(c&&f)p=(v-g)/o;else if(c)for(v=u[0]+p*o;vu[0]&&isFinite(g)&&isFinite(u[0]);)p=kE(p),g=u[1]-p*o;else{var m=r.getTicks().length-1;m>o&&(p=kE(p));var y=p*o;v=Math.ceil(u[1]/p)*p,g=$n(v-y),g<0&&u[0]>=0?(g=0,v=$n(y)):v>0&&u[1]<=0&&(v=0,g=-$n(y))}var b=(i[0].value-a[0].value)/s,_=(i[o].value-a[o].value)/s;n.setExtent.call(r,g+p*b,v+p*_),n.setInterval.call(r,p),(b||_)&&n.setNiceExtent.call(r,g+p,v-p)}var OOe=function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=VI,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function i(o){var s,l=vr(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var h=+l[f],d=o[h],p=d.model,g=d.scale;FI(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(iv(g,p),FI(g)&&(s=d))}c.length&&(s||(s=c.pop(),iv(s.scale,s.model)),B(c,function(v){ree(v.scale,v.model,s.scale)}))}}i(n.x),i(n.y);var a={};B(n.x,function(o){w9(n,"y",o,a)}),B(n.y,function(o){w9(n,"x",o,a)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=di(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(B(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=gFe(u);if(c){var f=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+h,u.position==="top"?o.y+=c.height+h:u.position==="left"&&(o.x+=c.width+h)}}}),l()),B(this._coordsList,function(u){u.calcAffineTransform()});function l(){B(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(f[h],f[1-h]),POe(u,c?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}_t(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i0?"top":"bottom",a="center"):Py(i-Xc)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),C9={axisLine:function(r,e,t,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Ji(s,s,o),Ji(l,l,o));var c=be({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new Ai({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});tv(f.shape,f.style.lineWidth),f.anid="line",t.add(f);var h=e.get(["axisLine","symbol"]);if(h!=null){var d=e.get(["axisLine","symbolSize"]);Ze(h)&&(h=[h,h]),(Ze(d)||Or(d))&&(d=[d,d]);var p=Wd(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],v=d[1];B([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var b=ni(h[y],-g/2,-v/2,g,v,c.stroke,!0),_=m.r+m.offset,w=u?l:s;b.attr({rotation:m.rotate,x:w[0]+_*Math.cos(r.rotation),y:w[1]-_*Math.sin(r.rotation),silent:!0,z2:11}),t.add(b)}})}}},axisTickLabel:function(r,e,t,n){var i=zOe(t,n,e,r),a=UOe(t,n,e,r);if(NOe(e,a,i),VOe(t,n,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=bJ(De(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));SJ(o)}},axisName:function(r,e,t,n){var i=Ni(r.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,x9(a)?r.labelOffset+o*l:0],h,d=e.get("nameRotate");d!=null&&(d=d*Xc/180);var p;x9(a)?h=za.innerTextLayout(r.rotation,d??r.rotation,o):(h=ROe(r.rotation,a,d||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(h.rotation)),!isFinite(p)&&(p=null)));var g=s.getFont(),v=e.get("nameTruncate",!0)||{},m=v.ellipsis,y=Ni(r.nameTruncateMaxWidth,v.maxWidth,p),b=new Er({x:f[0],y:f[1],rotation:h.rotation,silent:za.isLabelSilent(e),style:mn(s,{text:i,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Lv({el:b,componentModel:e,itemName:i}),b.__fullText=i,b.anid="name",e.get("triggerEvent")){var _=za.makeAxisEventDataBase(e);_.targetType="axisName",_.name=i,Dt(b).eventData=_}n.add(b),b.updateTransform(),t.add(b),b.decomposeTransform()}}};function ROe(r,e,t,n){var i=_K(t-r),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Py(i-Xc/2)?(o=l?"bottom":"top",a="center"):Py(i-Xc*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",iXc/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function NOe(r,e,t){if(!oJ(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],f=t[t.length-1],h=t[t.length-2];n===!1?(Po(a),Po(u)):A9(a,o)&&(n?(Po(o),Po(c)):(Po(a),Po(u))),i===!1?(Po(s),Po(f)):A9(l,s)&&(i?(Po(l),Po(h)):(Po(s),Po(f)))}}function Po(r){r&&(r.ignore=!0)}function A9(r,e){var t=r&&r.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!t||!n)){var i=gA([]);return Gd(i,i,-r.rotation),t.applyTransform(Nu([],i,r.getLocalTransform())),n.applyTransform(Nu([],i,e.getLocalTransform())),t.intersect(n)}}function x9(r){return r==="middle"||r==="center"}function nee(r,e,t,n,i){for(var a=[],o=[],s=[],l=0;l=0||r===e}function qOe(r){var e=IB(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,i=t.option,a=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=GI(t);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=yt({color:p.color},l));var v=Ut(wt(p),{boundaryGap:t,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:g,triggerEvent:h},!1);if(Ze(c)){var m=v.name;v.name=c.replace("{value}",m??"")}else gt(c)&&(v.name=c(v.name,v));var y=new Zr(v,null,this.ecModel);return oi(y,q1.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Ut({lineStyle:{color:"#bbb"}},Tm.axisLine),axisLabel:T_(Tm.axisLabel,!1),axisTick:T_(Tm.axisTick,!1),splitLine:T_(Tm.splitLine,!0),splitArea:T_(Tm.splitArea,!0),indicator:[]},e}(gr),oPe=["axisLine","axisTickLabel","axisName"],sPe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var n=t.coordinateSystem,i=n.getIndicatorAxes(),a=De(i,function(o){var s=o.model.get("showName")?o.name:"",l=new za(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});B(a,function(o){B(oPe,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),h=l.get("color"),d=u.get("color"),p=Ae(h)?h:[h],g=Ae(d)?d:[d],v=[],m=[];function y(L,F,N){var z=N%F.length;return L[z]=L[z]||[],z}if(a==="circle")for(var b=i[0].getTicksCoords(),_=n.cx,w=n.cy,S=0;S3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;jE(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var f=Math.abs(a),h=(a>0?1:-1)*(f>3?.4:f>1?.15:.05);jE(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:h,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!I9(this._zr,"globalPan")){var n=t.pinchScale>1?1.1:1/1.1;jE(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(vs);function jE(r,e,t,n,i){r.pointerChecker&&r.pointerChecker(n,i.originX,i.originY)&&($u(n.event),uee(r,e,t,n,i))}function uee(r,e,t,n,i){i.isAvailableBehavior=Je(zw,null,t,n),r.trigger(e,i)}function zw(r,e,t){var n=t[r];return!r||n&&(!Ze(n)||e.event[n+"Key"])}function FB(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function BB(r,e,t,n){var i=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(n-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var pPe={axisPointer:1,tooltip:1,brush:1};function jA(r,e,t){var n=e.getComponentByElement(r.topTarget),i=n&&n.coordinateSystem;return n&&n!==t&&!pPe.hasOwnProperty(n.mainType)&&i&&i.model!==t}function cee(r){if(Ze(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var qE,X2={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},L9=vr(X2),Q2={"alignment-baseline":"textBaseline","stop-color":"stopColor"},F9=vr(Q2),gPe=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=cee(e);this._defsUsePending=[];var i=new xt;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),mo(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;yPe(this._defs,this._defsUsePending),this._defsUsePending=[];var c,f;if(o){var h=qA(o);h.length>=4&&(c={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(c&&s!=null&&l!=null&&(f=hee(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var d=i;i=new xt,i.add(d),d.scaleX=d.scaleY=f.scale,d.x=f.x,d.y=f.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new _r({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:a}},r.prototype._parseNode=function(e,t,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!a){var c=qE[s];if(c&&tt(qE,s)){l=c.call(this,e,t);var f=e.getAttribute("name");if(f){var h={name:f,namedFrom:null,svgNodeTagLower:s,el:l};n.push(h),s==="g"&&(u=h)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var d=B9[s];if(d&&tt(B9,s)){var p=d.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var v=e.firstChild;v;)v.nodeType===1?this._parseNode(v,l,n,u,a,o):v.nodeType===3&&o&&this._parseText(v,l),v=v.nextSibling},r.prototype._parseText=function(e,t){var n=new ev({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Ro(t,n),mo(e,n,this._defsUsePending,!1,!1),vPe(n,t);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=function(){qE={g:function(e,t){var n=new xt;return Ro(t,n),mo(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new _r;return Ro(t,n),mo(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new ac;return Ro(t,n),mo(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new Ai;return Ro(t,n),mo(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new xA;return Ro(t,n),mo(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute("points"),i;n&&(i=R9(n));var a=new $a({shape:{points:i||[]},silent:!0});return Ro(t,a),mo(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var n=e.getAttribute("points"),i;n&&(i=R9(n));var a=new qa({shape:{points:i||[]},silent:!0});return Ro(t,a),mo(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var n=new $i;return Ro(t,n),mo(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new xt;return Ro(t,s),mo(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new xt;return Ro(t,s),mo(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",i=tX(n);return Ro(t,i),mo(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),r}(),B9={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),i=parseInt(r.getAttribute("y2")||"0",10),a=new U1(e,t,n,i);return O9(r,a),P9(r,a),a},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),i=new aX(e,t,n);return O9(r,i),P9(r,i),i}};function O9(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function P9(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};fee(t,a,a);var o=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function Ro(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),yt(e.__inheritedStyle,r.__inheritedStyle))}function R9(r){for(var e=qA(r),t=[],n=0;n0;a-=2){var o=n[a],s=n[a-1],l=qA(o);switch(i=i||To(),s){case"translate":Kl(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":kF(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Gd(i,i,-parseFloat(l[0])*YE,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*YE);Nu(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*YE);Nu(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var z9=/([^\s:;]+)\s*:\s*([^:;]+)/g;function fee(r,e,t){var n=r.getAttribute("style");if(n){z9.lastIndex=0;for(var i;(i=z9.exec(n))!=null;){var a=i[1],o=tt(X2,a)?X2[a]:null;o&&(e[o]=i[2]);var s=tt(Q2,a)?Q2[a]:null;s&&(t[s]=i[2])}}}function SPe(r,e,t){for(var n=0;n0,v={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:h};l.resourceType==="geoJSON"?this._buildGeoJSON(v):l.resourceType==="geoSVG"&&this._buildSVG(v),this._updateController(e,t,n),this._updateMapSelectHandler(e,u,n,i)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=nt(),n=nt(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function f(d){for(var p=[],g=!u&&l&&l.project,v=0;v=0)&&(h=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;ta(e,Ti(n),{labelFetcher:h,labelDataIndex:f,defaultText:t},d);var p=e.getTextContent();if(p&&(dee(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function W9(r,e,t,n,i,a){r.data?r.data.setItemGraphicEl(a,e):Dt(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:n&&n.option||{}}}function $9(r,e,t,n,i){r.data||Lv({el:e,componentModel:i,itemName:t,itemTooltipOption:n.get("tooltip")})}function j9(r,e,t,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Vn(e,o,a.get("blurScope"),a.get("disabled")),r.isGeo&&PTe(e,i,t),o}function q9(r,e,t){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),B(r,function(l){s.lineStart();for(var u=0;u-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(bn);function GPe(r,e){var t={};return B(r,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(n,i){for(var a="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=t[a].length,c=0;c1?(_.width=b,_.height=b/v):(_.height=b,_.width=b*v),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var w=r.getBoxLayoutParams();w.aspect=v,_=di(w,{width:p,height:g})}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function jPe(r,e){B(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var qPe=function(){function r(){this.dimensions=gee}return r.prototype.create=function(e,t){var n=[];function i(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new $I(l+s,l,be({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=X9,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),B(a,function(o,s){var l=De(o,function(c){return c.get("nameMap")}),u=new $I(s,s,be({nameMap:CF(l)},i(o[0])));u.zoomLimit=Ni.apply(null,De(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=X9,u.resize(o[0],t),B(o,function(c){c.coordinateSystem=u,jPe(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,i){for(var a=(e||[]).slice(),o=nt(),s=0;s=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function JPe(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,i=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){r4e(r);var a=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+e(r,i),r.hierNode.modifier=r.hierNode.prelim-a):r.hierNode.prelim=a}else i&&(r.hierNode.prelim=i.hierNode.prelim+e(r,i));r.parentNode.hierNode.defaultAncestor=n4e(r,i,r.parentNode.hierNode.defaultAncestor||n[0],e)}function e4e(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function J9(r){return arguments.length?r:o4e}function f0(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function t4e(r,e){return di(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function r4e(r){for(var e=r.children,t=e.length,n=0,i=0;--t>=0;){var a=e[t];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function n4e(r,e,t,n){if(e){for(var i=r,a=r,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=ZE(s),a=KE(a),s&&a;){i=ZE(i),o=KE(o),i.hierNode.ancestor=r;var h=s.hierNode.prelim+f-a.hierNode.prelim-u+n(s,a);h>0&&(a4e(i4e(s,r,t),r,h),u+=h,l+=h),f+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!ZE(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=f-l),a&&!KE(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,t=r)}return t}function ZE(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function KE(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function i4e(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function a4e(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function o4e(r,e){return r.parentNode===e.parentNode?1:2}var s4e=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),l4e=function(r){pe(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new s4e},e.prototype.buildPath=function(t,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,h=$e(n.forkPosition,1),d=[];d[c]=o[c],d[f]=o[f]+(l[f]-o[f])*h,t.moveTo(o[0],o[1]),t.lineTo(d[0],d[1]),t.moveTo(s[0],s[1]),d[c]=s[c],t.lineTo(d[0],d[1]),d[c]=l[c],t.lineTo(d[0],d[1]),t.lineTo(l[0],l[1]);for(var p=1;py.x,w||(_=_-Math.PI));var C=w?"left":"right",A=s.getModel("label"),x=A.get("rotate"),D=x*(Math.PI/180),E=v.getTextContent();E&&(v.setTextConfig({position:A.get("position")||C,rotation:x==null?-_:D,origin:"center"}),E.setStyle("verticalAlign","middle"))}var k=s.get(["emphasis","focus"]),M=k==="relative"?w2(o.getAncestorsIndices(),o.getDescendantIndices()):k==="ancestor"?o.getAncestorsIndices():k==="descendant"?o.getDescendantIndices():null;M&&(Dt(t).focus=M),c4e(i,o,c,t,p,d,g,n),t.__edge&&(t.onHoverStateChange=function(T){if(T!=="blur"){var L=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);L&&L.hoverState===N1||I2(t.__edge,T)}})}function c4e(r,e,t,n,i,a,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),h=r.get(["lineStyle","curveness"]),d=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(g||(g=n.__edge=new V1({shape:jI(c,f,h,i,i)})),Pr(g,{shape:jI(c,f,h,a,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var v=e.children,m=[],y=0;yt&&(t=i.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var n=t.getData().tree.root,i=r.targetNode;if(Ze(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=r.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function wee(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function zB(r,e){var t=wee(r);return Qt(t,e)>=0}function YA(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var b4e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},i=t.leaves||{},a=new Zr(i,this,this.ecModel),o=NB.createTree(n,this,s);function s(f){f.wrapMethod("getItemModel",function(h,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(h.parentModel=a),h})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var h=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=h&&h.collapsed!=null?!h.collapsed:f.depth<=c}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Mi("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=YA(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(bn);function _4e(r,e,t){for(var n=[r],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s=0;a--)t.push(i[a])}}function w4e(r,e){r.eachSeriesByType("tree",function(t){S4e(t,e)})}function S4e(r,e){var t=t4e(r,e);r.layoutInfo=t;var n=r.get("layout"),i=0,a=0,o=null;n==="radial"?(i=2*Math.PI,a=Math.min(t.height,t.width)/2,o=J9(function(b,_){return(b.parentNode===_.parentNode?1:2)/b.depth})):(i=t.width,a=t.height,o=J9());var s=r.getData().tree.root,l=s.children[0];if(l){QPe(s),_4e(l,JPe,o),s.hierNode.modifier=-l.hierNode.prelim,Im(l,e4e);var u=l,c=l,f=l;Im(l,function(b){var _=b.getLayout().x;_c.getLayout().x&&(c=b),b.depth>f.depth&&(f=b)});var h=u===c?1:o(u,c)/2,d=h-u.getLayout().x,p=0,g=0,v=0,m=0;if(n==="radial")p=i/(c.getLayout().x+h+d),g=a/(f.depth-1||1),Im(l,function(b){v=(b.getLayout().x+d)*p,m=(b.depth-1)*g;var _=f0(v,m);b.setLayout({x:_.x,y:_.y,rawX:v,rawY:m},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(g=a/(c.getLayout().x+h+d),p=i/(f.depth-1||1),Im(l,function(b){m=(b.getLayout().x+d)*g,v=y==="LR"?(b.depth-1)*p:i-(b.depth-1)*p,b.setLayout({x:v,y:m},!0)})):(y==="TB"||y==="BT")&&(p=i/(c.getLayout().x+h+d),g=a/(f.depth-1||1),Im(l,function(b){v=(b.getLayout().x+d)*p,m=y==="TB"?(b.depth-1)*g:a-(b.depth-1)*g,b.setLayout({x:v,y:m},!0)}))}}}function C4e(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");be(s,o)})})}function A4e(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(i){var a=i.coordinateSystem,o=PB(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function x4e(r){r.registerChartView(u4e),r.registerSeriesModel(b4e),r.registerLayout(w4e),r.registerVisual(C4e),A4e(r)}var i7=["treemapZoomToNode","treemapRender","treemapMove"];function D4e(r){for(var e=0;e1;)a=a.parentNode;var o=bI(r.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var E4e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var i={name:t.name,children:t.data};Cee(i);var a=t.levels||[],o=this.designatedVisualItemStyle={},s=new Zr({itemStyle:o},this,n);a=t.levels=k4e(a,n);var l=De(a||[],function(f){return new Zr(f,s,n)},this),u=NB.createTree(i,this,c);function c(f){f.wrapMethod("getItemModel",function(h,d){var p=u.getNodeByDataIndex(d),g=p?l[p.depth]:null;return h.parentModel=g||s,h})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return Mi("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=YA(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},be(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=nt(),this._idIndexMapCount=0);var i=n.get(t);return i==null&&n.set(t,i=this._idIndexMapCount++),i},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){See(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(bn);function Cee(r){var e=0;B(r.children,function(n){Cee(n);var i=n.value;Ae(i)&&(i=i[0]),e+=i});var t=r.value;Ae(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),Ae(r.value)?r.value[0]=t:r.value=t}function k4e(r,e){var t=rn(e.get("color")),n=rn(e.get(["aria","decal","decals"]));if(t){r=r||[];var i,a;B(r,function(s){var l=new Zr(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=r[0]||(r[0]={});return i||(o.color=t.slice()),!a&&n&&(o.decal=n.slice()),r}}var T4e=8,a7=8,XE=5,M4e=function(){function r(e){this.group=new xt,e.add(this.group)}return r.prototype.render=function(e,t,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),f={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,f,u),this._renderContent(e,f,s,l,u,c,i),OA(o,f.pos,f.box)}},r.prototype._prepare=function(e,t,n){for(var i=e;i;i=i.parentNode){var a=hi(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+T4e*2,t.emptyItemWidth);t.totalWidth+=s+a7,t.renderList.push({node:i,text:a,width:s})}},r.prototype._renderContent=function(e,t,n,i,a,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),f=NMe(t.pos,t.box),h=t.totalWidth,d=t.renderList,p=i.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var v=d[g],m=v.node,y=v.width,b=v.text;h>f.width&&(h-=y-u,y=u,b=null);var _=new $a({shape:{points:I4e(l,0,y,c,g===d.length-1,g===0)},style:yt(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Er({style:mn(a,{text:b})}),textConfig:{position:"inside"},z2:Mv*1e4,onclick:Bt(s,m)});_.disableLabelAnimation=!0,_.getTextContent().ensureState("emphasis").style=mn(o,{text:b}),_.ensureState("emphasis").style=p,Vn(_,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(_),L4e(_,e,m),l+=y+a7}},r.prototype.remove=function(){this.group.removeAll()},r}();function I4e(r,e,t,n,i,a){var o=[[i?r:r-XE,e],[r+t,e],[r+t,e+n],[i?r:r-XE,e+n]];return!a&&o.splice(2,0,[r+t+XE,e+n/2]),!i&&o.push([r,e+n/2]),o}function L4e(r,e,t){Dt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&YA(t,e)}}var F4e=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:i,easing:a}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},i=0,a=this._storage.length;is7||Math.abs(t.dy)>s7)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var n=t.originX,i=t.originY,a=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new Gt(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=a,u){var h=u.min||0,d=u.max||1/0;f=Math.max(Math.min(d,f),h)}var p=f/c.zoom;c.zoom=f;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var v=To();Kl(v,v,[-n,-i]),kF(v,v,[p,p]),Kl(v,v,[n,i]),l.applyTransform(v),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&R2(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,i){var a=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new M4e(this.group))).render(t,n,i.node,function(o){a._state!=="animating"&&(zB(t.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Lm(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var i,a=this.seriesModel.getViewRoot();return a.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(an);function Lm(){return{nodeGroup:[],background:[],content:[]}}function z4e(r,e,t,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),h=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,g=c.borderWidth,v=c.invisible,m=o.getRawIndex(),y=s&&s.getRawIndex(),b=o.viewChildren,_=c.upperHeight,w=b&&b.length,S=h.getModel("itemStyle"),C=h.getModel(["emphasis","itemStyle"]),A=h.getModel(["blur","itemStyle"]),x=h.getModel(["select","itemStyle"]),D=S.get("borderRadius")||0,E=fe("nodeGroup",qI);if(!E)return;if(l.add(E),E.x=c.x||0,E.y=c.y||0,E.markRedraw(),J2(E).nodeWidth=d,J2(E).nodeHeight=p,c.isAboveViewRoot)return E;var k=fe("background",o7,u,P4e);k&&W(E,k,w&&c.upperLabelHeight);var M=h.getModel("emphasis"),T=M.get("focus"),L=M.get("blurScope"),F=M.get("disabled"),N=T==="ancestor"?o.getAncestorsIndices():T==="descendant"?o.getDescendantIndices():T;if(w)zy(E)&&zh(E,!1),k&&(zh(k,!F),f.setItemGraphicEl(o.dataIndex,k),fI(k,N,L));else{var z=fe("content",o7,u,R4e);z&&H(E,z),k.disableMorphing=!0,k&&zy(k)&&zh(k,!1),zh(E,!F),f.setItemGraphicEl(o.dataIndex,E),fI(E,N,L)}return E;function W(Se,_e,$){var q=Dt(_e);if(q.dataIndex=o.dataIndex,q.seriesIndex=r.seriesIndex,_e.setShape({x:0,y:0,width:d,height:p,r:D}),v)R(_e);else{_e.invisible=!1;var j=o.getVisual("style"),he=j.stroke,Q=c7(S);Q.fill=he;var ye=bh(C);ye.fill=C.get("borderColor");var ie=bh(A);ie.fill=A.get("borderColor");var me=bh(x);if(me.fill=x.get("borderColor"),$){var Pe=d-2*g;ne(_e,he,j.opacity,{x:g,y:0,width:Pe,height:_})}else _e.removeTextContent();_e.setStyle(Q),_e.ensureState("emphasis").style=ye,_e.ensureState("blur").style=ie,_e.ensureState("select").style=me,Ed(_e)}Se.add(_e)}function H(Se,_e){var $=Dt(_e);$.dataIndex=o.dataIndex,$.seriesIndex=r.seriesIndex;var q=Math.max(d-2*g,0),j=Math.max(p-2*g,0);if(_e.culling=!0,_e.setShape({x:g,y:g,width:q,height:j,r:D}),v)R(_e);else{_e.invisible=!1;var he=o.getVisual("style"),Q=he.fill,ye=c7(S);ye.fill=Q,ye.decal=he.decal;var ie=bh(C),me=bh(A),Pe=bh(x);ne(_e,Q,he.opacity,null),_e.setStyle(ye),_e.ensureState("emphasis").style=ie,_e.ensureState("blur").style=me,_e.ensureState("select").style=Pe,Ed(_e)}Se.add(_e)}function R(Se){!Se.invisible&&a.push(Se)}function ne(Se,_e,$,q){var j=h.getModel(q?u7:l7),he=hi(h.get("name"),null),Q=j.getShallow("show");ta(Se,Ti(h,q?u7:l7),{defaultText:Q?he:null,inheritColor:_e,defaultOpacity:$,labelFetcher:r,labelDataIndex:o.dataIndex});var ye=Se.getTextContent();if(ye){var ie=ye.style,me=xF(ie.padding||0);q&&(Se.setTextConfig({layoutRect:q}),ye.disableLabelLayout=!0),ye.beforeUpdate=function(){var Oe=Math.max((q?q.width:Se.shape.width)-me[1]-me[3],0),Ge=Math.max((q?q.height:Se.shape.height)-me[0]-me[2],0);(ie.width!==Oe||ie.height!==Ge)&&ye.setStyle({width:Oe,height:Ge})},ie.truncateMinChar=2,ie.lineOverflow="truncate",te(ie,q,c);var Pe=ye.getState("emphasis");te(Pe?Pe.style:null,q,c)}}function te(Se,_e,$){var q=Se?Se.text:null;if(!_e&&$.isLeafRoot&&q!=null){var j=r.get("drillDownIcon",!0);Se.text=j?j+" "+q:q}}function fe(Se,_e,$,q){var j=y!=null&&t[Se][y],he=i[Se];return j?(t[Se][y]=null,Ce(he,j)):v||(j=new _e,j instanceof ds&&(j.z2=V4e($,q)),Te(he,j)),e[Se][m]=j}function Ce(Se,_e){var $=Se[m]={};_e instanceof qI?($.oldX=_e.x,$.oldY=_e.y):$.oldShape=be({},_e.shape)}function Te(Se,_e){var $=Se[m]={},q=o.parentNode,j=_e instanceof xt;if(q&&(!n||n.direction==="drillDown")){var he=0,Q=0,ye=i.background[q.getRawIndex()];!n&&ye&&ye.oldShape&&(he=ye.oldShape.width,Q=ye.oldShape.height),j?($.oldX=0,$.oldY=Q):$.oldShape={x:he,y:Q,width:0,height:0}}$.fadein=!j}}function V4e(r,e){return r*O4e+e}var Jy=B,U4e=_t,eC=-1,Ei=function(){function r(e){var t=e.mappingMethod,n=e.type,i=this.option=wt(e);this.type=n,this.mappingMethod=t,this._normalizeData=W4e[t];var a=r.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?(QE(i),G4e(i)):t==="category"?i.categories?H4e(i):QE(i,!0):(Ga(t!=="linear"||i.dataExtent),QE(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return Je(this._normalizeData,this)},r.listVisualTypes=function(){return vr(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){_t(e)?B(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var i,a=Ae(e)?[]:_t(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);i?a=l:a[s]=l}),a},r.retrieveVisuals=function(e){var t={},n;return e&&Jy(r.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(t[a]=e[a],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(Ae(e))e=e.slice();else if(U4e(e)){var t=[];Jy(e,function(n,i){t.push(i)}),e=t}else return[];return e.sort(function(n,i){return i==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var i,a=1/0,o=0,s=t.length;o=0;a--)n[a]==null&&(delete t[e[a]],e.pop())}function QE(r,e){var t=r.visual,n=[];_t(t)?Jy(t,function(a){n.push(a)}):t!=null&&n.push(t);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(r.type)&&(n[1]=n[0]),Aee(r,n)}function I_(r){return{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);n("color",r(t("color"),i))},_normalizedToVisual:YI([0,1])}}function f7(r){var e=this.option.visual;return e[Math.round(Kr(r,[0,1],[0,e.length-1],!0))]||{}}function Fm(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function h0(r){var e=this.option.visual;return e[this.option.loop&&r!==eC?r%e.length:r]}function _h(){return this.option.visual[0]}function YI(r){return{linear:function(e){return Kr(e,r,this.option.visual,!0)},category:h0,piecewise:function(e,t){var n=ZI.call(this,t);return n==null&&(n=Kr(e,r,this.option.visual,!0)),n},fixed:_h}}function ZI(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=Ei.findPieceIndex(r,t),i=t[n];if(i&&i.visual)return i.visual[this.type]}}function Aee(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=De(e,function(t){var n=Mo(t);return n||[0,0,0,1]})),e}var W4e={linear:function(r){return Kr(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Ei.findPieceIndex(r,e,!0);if(t!=null)return Kr(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??eC},fixed:Kn};function L_(r,e,t){return r?e<=t:e=t.length||g===t[g.depth]){var m=K4e(i,l,g,v,p,n);Dee(g,m,t,n)}})}}}function q4e(r,e,t){var n=be({},e),i=t.designatedVisualItemStyle;return B(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=r.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function h7(r){var e=JE(r,"color");if(e){var t=JE(r,"colorAlpha"),n=JE(r,"colorSaturation");return n&&(e=x0(e,null,null,n)),t&&(e=x2(e,t)),e}}function Y4e(r,e){return e!=null?x0(e,null,null,r):null}function JE(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function Z4e(r,e,t,n,i,a){if(!(!a||!a.length)){var o=ek(e,"color")||i.color!=null&&i.color!=="none"&&(ek(e,"colorAlpha")||ek(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=e.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var h=new Ei(f);return xee(h).drColorMappingBy=c,h}}}function ek(r,e){var t=r.get(e);return Ae(t)&&t.length?{name:e,range:t}:null}function K4e(r,e,t,n,i,a){var o=be({},e);if(i){var s=i.type,l=s==="color"&&xee(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var e1=Math.max,tC=Math.min,d7=Ni,VB=B,Eee=["itemStyle","borderWidth"],X4e=["itemStyle","gapWidth"],Q4e=["upperLabel","show"],J4e=["upperLabel","height"];const eRe={seriesType:"treemap",reset:function(r,e,t,n){var i=t.getWidth(),a=t.getHeight(),o=r.option,s=di(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=$e(d7(s.width,l[0]),i),c=$e(d7(s.height,l[1]),a),f=n&&n.type,h=["treemapZoomToNode","treemapRootToNode"],d=Qy(n,h,r),p=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,g=r.getViewRoot(),v=wee(g);if(f!=="treemapMove"){var m=f==="treemapZoomToNode"?oRe(r,d,g,u,c):p?[p.width,p.height]:[u,c],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var b={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(_),kee(g,b,!1,0),_=g.getLayout(),VB(v,function(S,C){var A=(v[C+1]||g).getValue();S.setLayout(be({dataExtent:[A,A],borderWidth:0,upperHeight:0},_))})}var w=r.getData().tree.root;w.setLayout(sRe(s,p,d),!0),r.setLayoutInfo(s),Tee(w,new Gt(-s.x,-s.y,i,a),v,g,0)}};function kee(r,e,t,n){var i,a;if(!r.isRemoved()){var o=r.getLayout();i=o.width,a=o.height;var s=r.getModel(),l=s.get(Eee),u=s.get(X4e)/2,c=Mee(s),f=Math.max(l,c),h=l-u,d=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),i=e1(i-2*h,0),a=e1(a-h-d,0);var p=i*a,g=tRe(r,s,p,e,t,n);if(g.length){var v={x:h,y:d,width:i,height:a},m=tC(i,a),y=1/0,b=[];b.area=0;for(var _=0,w=g.length;_=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function aRe(r,e,t){for(var n=0,i=1/0,a=0,o=void 0,s=r.length;an&&(n=o));var l=r.area*r.area,u=e*e*t;return l?e1(u*n/l,l/(u*i)):1/0}function p7(r,e,t,n,i){var a=e===t.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=t[s[a]],c=e?r.area/e:0;(i||c>t[l[o]])&&(c=t[l[o]]);for(var f=0,h=r.length;fkN&&(u=kN),a=s}un&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o0&&(w[0]=-w[0],w[1]=-w[1]);var C=_[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var A=-Math.atan2(_[1],_[0]);f[0].8?"left":h[0]<-.8?"right":"center",g=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":a.x=-h[0]*m+c[0],a.y=-h[1]*y+c[1],p=h[0]>.8?"right":h[0]<-.8?"left":"center",g=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=m*C+c[0],a.y=c[1]+x,p=_[0]<0?"right":"left",a.originX=-m*C,a.originY=-x;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=S[0],a.y=S[1]+x,p="center",a.originY=-x;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-m*C+f[0],a.y=f[1]+x,p=_[0]>=0?"right":"left",a.originX=m*C,a.originY=-x;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(xt),$B=function(){function r(e){this.group=new xt,this._LineCtor=e||WB}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=_7(e);e.diff(a).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=_7(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!xRe(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0}function _7(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Ti(e)}}function w7(r){return isNaN(r[0])||isNaN(r[1])}function ak(r){return r&&!w7(r[0])&&!w7(r[1])}var ok=[],sk=[],lk=[],gp=Bi,uk=id,S7=Math.abs;function C7(r,e,t){for(var n=r[0],i=r[1],a=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){ok[0]=gp(n[0],i[0],a[0],c),ok[1]=gp(n[1],i[1],a[1],c);var f=S7(uk(ok,e)-l);f=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function ck(r,e){var t=[],n=Fy,i=[[],[],[]],a=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Ru(u[0]),Ru(u[1])],u[2]&&u.__original.push(Ru(u[2])));var h=u.__original;if(u[2]!=null){if(Ta(i[0],h[0]),Ta(i[1],h[2]),Ta(i[2],h[1]),c&&c!=="none"){var d=p0(s.node1),p=C7(i,h[0],d*e);n(i[0][0],i[1][0],i[2][0],p,t),i[0][0]=t[3],i[1][0]=t[4],n(i[0][1],i[1][1],i[2][1],p,t),i[0][1]=t[3],i[1][1]=t[4]}if(f&&f!=="none"){var d=p0(s.node2),p=C7(i,h[1],d*e);n(i[0][0],i[1][0],i[2][0],p,t),i[1][0]=t[1],i[2][0]=t[2],n(i[0][1],i[1][1],i[2][1],p,t),i[1][1]=t[1],i[2][1]=t[2]}Ta(u[0],i[0]),Ta(u[1],i[2]),Ta(u[2],i[1])}else{if(Ta(a[0],h[0]),Ta(a[1],h[1]),Rh(o,a[1],a[0]),Ev(o,o),c&&c!=="none"){var d=p0(s.node1);PM(a[0],a[0],o,d*e)}if(f&&f!=="none"){var d=p0(s.node2);PM(a[1],a[1],o,-d*e)}Ta(u[0],a[0]),Ta(u[1],a[1])}})}function A7(r){return r.type==="view"}var DRe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var i=new Z1,a=new $B,o=this.group;this._controller=new eb(n.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(a.group),this._symbolDraw=i,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(t,n,i){var a=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(A7(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):Pr(u,c,t)}ck(t.getGraph(),d0(t));var f=t.getData();s.updateData(f);var h=t.getEdgeData();l.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,n,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p);var g=t.get("layout");f.graph.eachNode(function(b){var _=b.dataIndex,w=b.getGraphicEl(),S=b.getModel();if(w){w.off("drag").off("dragend");var C=S.get("draggable");C&&w.on("drag",function(x){switch(g){case"force":d.warmUp(),!a._layouting&&a._startForceLayoutIteration(d,p),d.setFixed(_),f.setItemLayout(_,[w.x,w.y]);break;case"circular":f.setItemLayout(_,[w.x,w.y]),b.setLayout({fixed:!0},!0),HB(t,"symbolSize",b,[x.offsetX,x.offsetY]),a.updateLayout(t);break;case"none":default:f.setItemLayout(_,[w.x,w.y]),GB(t.getGraph(),t),a.updateLayout(t);break}}).on("dragend",function(){d&&d.setUnfixed(_)}),w.setDraggable(C,!!S.get("cursor"));var A=S.get(["emphasis","focus"]);A==="adjacency"&&(Dt(w).focus=b.getAdjacentDataIndices())}}),f.graph.eachEdge(function(b){var _=b.getGraphicEl(),w=b.getModel().get(["emphasis","focus"]);_&&w==="adjacency"&&(Dt(_).focus={edge:[b.dataIndex],node:[b.node1.dataIndex,b.node2.dataIndex]})});var v=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=f.getLayout("cx"),y=f.getLayout("cy");f.graph.eachNode(function(b){Bee(b,v,m,y)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n){var i=this;(function a(){t.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(n?i._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(t,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,f){var h=l.getBoundingRect();return h.applyTransform(l.transform),h.contain(c,f)&&!jA(u,i,t)}),!A7(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){FB(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){BB(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),ck(t.getGraph(),d0(t)),a._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),i=d0(t);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(t){ck(t.getGraph(),d0(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(an);function vp(r){return"_EC_"+r}var ERe=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(!n[vp(e)]){var i=new wh(e,t);return i.hostGraph=this,this.nodes.push(i),n[vp(e)]=i,i}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[vp(e)]},r.prototype.addEdge=function(e,t,n){var i=this._nodesMap,a=this._edgesMap;if(Or(e)&&(e=this.nodes[e]),Or(t)&&(t=this.nodes[t]),e instanceof wh||(e=i[vp(e)]),t instanceof wh||(t=i[vp(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new Pee(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),a[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof wh&&(e=e.id),t instanceof wh&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,i=n.length,a=0;a=0&&e.call(t,n[a],a)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,i=n.length,a=0;a=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(t,n[a],a)},r.prototype.breadthFirstTraverse=function(e,t,n,i){if(t instanceof wh||(t=this._nodesMap[vp(t)]),!!t){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}oi(wh,Ree("hostGraph","data"));oi(Pee,Ree("hostGraph","edgeData"));function Nee(r,e,t,n,i){for(var a=new ERe(n),o=0;o "+h)),u++)}var d=t.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar")p=oc(r,t);else{var g=W1.get(d),v=g?g.dimensions||[]:[];Qt(v,"value")<0&&v.concat(["value"]);var m=j1(r,{coordDimensions:v,encodeDefine:t.getEncode()}).dimensions;p=new Na(m,t),p.initData(r)}var y=new Na(["value"],t);return y.initData(l,s),i&&i(p,y),bee({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var kRe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new J1(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Ad(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var i=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;if(a&&i){pRe(this);var s=Nee(a,i,this,!0,l);return B(s.edges,function(u){gRe(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,v=p.getShallow("category"),m=g[v];return m&&(m.parentModel=p.parentModel,p.parentModel=m),p});var f=Zr.prototype.getModel;function h(p,g){var v=f.call(this,p,g);return v.resolveParentPath=d,v}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=h,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(t,i),s=a.graph.getEdgeByIndex(t),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Mi("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=uQ({series:this,dataIndex:t,multipleSeries:n});return f},e.prototype._updateCategoriesData=function(){var t=De(this.option.categories||[],function(i){return i.value!=null?i:be({value:0},i)}),n=new Na(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(bn),TRe={type:"graphRoam",event:"graphRoam",update:"none"};function MRe(r){r.registerChartView(DRe),r.registerSeriesModel(kRe),r.registerProcessor(uRe),r.registerVisual(cRe),r.registerVisual(fRe),r.registerLayout(vRe),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,yRe),r.registerLayout(_Re),r.registerCoordinateSystem("graphView",{dimensions:tb.dimensions,create:SRe}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Kn),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Kn),r.registerAction(TRe,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(i){var a=i.coordinateSystem,o=PB(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var IRe=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),LRe=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new IRe},e.prototype.buildPath=function(t,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(n.x+i(l)*s,n.y+a(l)*s),t.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),t.lineTo(n.x-i(l)*s,n.y-a(l)*s),t.lineTo(u,c)},e}(sr);function FRe(r,e){var t=r.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=$e(t[0],e.getWidth()),s=$e(t[1],e.getHeight()),l=$e(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function B_(r,e){var t=r==null?"":r+"";return e&&(Ze(e)?t=e.replace("{value}",t):gt(e)&&(t=e(r))),t}var BRe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),o=FRe(t,i);this._renderMain(t,n,i,a,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,i,a,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),h=f.get("roundCap"),d=h?K2:Wa,p=f.get("show"),g=f.getModel("lineStyle"),v=g.get("width"),m=[u,c];RF(m,!l),u=m[0],c=m[1];for(var y=c-u,b=u,_=[],w=0;p&&w=x&&(D===0?0:a[D-1][0])Math.PI/2&&(fe+=Math.PI)):te==="tangential"?fe=-A-Math.PI/2:Or(te)&&(fe=te*Math.PI/180),fe===0?f.add(new Er({style:mn(b,{text:W,x:R,y:ne,verticalAlign:L<-.8?"top":L>.8?"bottom":"middle",align:T<-.4?"left":T>.4?"right":"center"},{inheritColor:H}),silent:!0})):f.add(new Er({style:mn(b,{text:W,x:R,y:ne,verticalAlign:"middle",align:"center"},{inheritColor:H}),silent:!0,originX:R,originY:ne,rotation:fe}))}if(y.get("show")&&F!==_){var N=y.get("distance");N=N?N+c:c;for(var Ce=0;Ce<=w;Ce++){T=Math.cos(A),L=Math.sin(A);var Te=new Ai({shape:{x1:T*(p-N)+h,y1:L*(p-N)+d,x2:T*(p-C-N)+h,y2:L*(p-C-N)+d},silent:!0,style:k});k.stroke==="auto"&&Te.setStyle({stroke:a((F+Ce/w)/_)}),f.add(Te),A+=D}A-=D}else A+=x}},e.prototype._renderPointer=function(t,n,i,a,o,s,l,u,c){var f=this.group,h=this._data,d=this._progressEls,p=[],g=t.get(["pointer","show"]),v=t.getModel("progress"),m=v.get("show"),y=t.getData(),b=y.mapDimension("value"),_=+t.get("min"),w=+t.get("max"),S=[_,w],C=[s,l];function A(D,E){var k=y.getItemModel(D),M=k.getModel("pointer"),T=$e(M.get("width"),o.r),L=$e(M.get("length"),o.r),F=t.get(["pointer","icon"]),N=M.get("offsetCenter"),z=$e(N[0],o.r),W=$e(N[1],o.r),H=M.get("keepAspect"),R;return F?R=ni(F,z-T/2,W-L,T,L,null,H):R=new LRe({shape:{angle:-Math.PI/2,width:T,r:L,x:z,y:W}}),R.rotation=-(E+Math.PI/2),R.x=o.cx,R.y=o.cy,R}function x(D,E){var k=v.get("roundCap"),M=k?K2:Wa,T=v.get("overlap"),L=T?v.get("width"):c/y.count(),F=T?o.r-L:o.r-(D+1)*L,N=T?o.r:o.r-D*L,z=new M({shape:{startAngle:s,endAngle:E,cx:o.cx,cy:o.cy,clockwise:u,r0:F,r:N}});return T&&(z.z2=w-y.get(b,D)%w),z}(m||g)&&(y.diff(h).add(function(D){var E=y.get(b,D);if(g){var k=A(D,s);Dn(k,{rotation:-((isNaN(+E)?C[0]:Kr(E,S,C,!0))+Math.PI/2)},t),f.add(k),y.setItemGraphicEl(D,k)}if(m){var M=x(D,s),T=v.get("clip");Dn(M,{shape:{endAngle:Kr(E,S,C,T)}},t),f.add(M),lI(t.seriesIndex,y.dataType,D,M),p[D]=M}}).update(function(D,E){var k=y.get(b,D);if(g){var M=h.getItemGraphicEl(E),T=M?M.rotation:s,L=A(D,T);L.rotation=T,Pr(L,{rotation:-((isNaN(+k)?C[0]:Kr(k,S,C,!0))+Math.PI/2)},t),f.add(L),y.setItemGraphicEl(D,L)}if(m){var F=d[E],N=F?F.shape.endAngle:s,z=x(D,N),W=v.get("clip");Pr(z,{shape:{endAngle:Kr(k,S,C,W)}},t),f.add(z),lI(t.seriesIndex,y.dataType,D,z),p[D]=z}}).execute(),y.each(function(D){var E=y.getItemModel(D),k=E.getModel("emphasis"),M=k.get("focus"),T=k.get("blurScope"),L=k.get("disabled");if(g){var F=y.getItemGraphicEl(D),N=y.getItemVisual(D,"style"),z=N.fill;if(F instanceof $i){var W=F.style;F.useStyle(be({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},N))}else F.useStyle(N),F.type!=="pointer"&&F.setColor(z);F.setStyle(E.getModel(["pointer","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",a(Kr(y.get(b,D),S,[0,1],!0))),F.z2EmphasisLift=0,ea(F,E),Vn(F,M,T,L)}if(m){var H=p[D];H.useStyle(y.getItemVisual(D,"style")),H.setStyle(E.getModel(["progress","itemStyle"]).getItemStyle()),H.z2EmphasisLift=0,ea(H,E),Vn(H,M,T,L)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,n){var i=t.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=ni(s,n.cx-o/2+$e(l[0],n.r),n.cy-o/2+$e(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,i,a,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),f=+t.get("max"),h=new xt,d=[],p=[],g=t.isAnimationEnabled(),v=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){d[m]=new Er({silent:!0}),p[m]=new Er({silent:!0})}).update(function(m,y){d[m]=s._titleEls[y],p[m]=s._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),b=l.get(u,m),_=new xt,w=a(Kr(b,[c,f],[0,1],!0)),S=y.getModel("title");if(S.get("show")){var C=S.get("offsetCenter"),A=o.cx+$e(C[0],o.r),x=o.cy+$e(C[1],o.r),D=d[m];D.attr({z2:v?0:2,style:mn(S,{x:A,y:x,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:w})}),_.add(D)}var E=y.getModel("detail");if(E.get("show")){var k=E.get("offsetCenter"),M=o.cx+$e(k[0],o.r),T=o.cy+$e(k[1],o.r),L=$e(E.get("width"),o.r),F=$e(E.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:w,D=p[m],z=E.get("formatter");D.attr({z2:v?0:2,style:mn(E,{x:M,y:T,text:B_(b,z),width:isNaN(L)?null:L,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:N})}),dX(D,{normal:E},b,function(H){return B_(H,z)}),g&&pX(D,m,l,t,{getFormattedLabel:function(H,R,ne,te,fe,Ce){return B_(Ce?Ce.interpolatedValue:b,z)}}),_.add(D)}h.add(_)}),this.group.add(h),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(an),ORe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return Gv(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(bn);function PRe(r){r.registerChartView(BRe),r.registerSeriesModel(ORe)}var RRe=["itemStyle","opacity"],NRe=function(r){pe(e,r);function e(t,n){var i=r.call(this)||this,a=i,o=new qa,s=new Er;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,n,!0),i}return e.prototype.updateData=function(t,n,i){var a=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(RRe);c=c??1,i||Zs(a),a.useStyle(t.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Dn(a,{style:{opacity:c}},o,n)):Pr(a,{style:{opacity:c},shape:{points:l.points}},o,n),ea(a,s),this._updateLabel(t,n),Vn(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),c=u.label,f=t.getItemVisual(n,"style"),h=f.fill;ta(o,Ti(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:f.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:h,outsideFill:h});var d=c.linePoints;a.setShape({points:d}),i.textGuideLineConfig={anchor:d?new zt(d[0][0],d[0][1]):null},Pr(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),SB(i,CB(l),{stroke:h})},e}($a),zRe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new NRe(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Vy(u,t,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(an),VRe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new J1(Je(this.getData,this),Je(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return Gv(this,{coordDimensions:["value"],encodeDefaulter:Bt(eB,this)})},e.prototype._defaultLabelLine=function(t){Ad(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),i=r.prototype.getDataParams.call(this,t),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(bn);function URe(r,e){return di(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function GRe(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),i=[],a=e==="ascending",o=0,s=r.count();oi5e)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!hk(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function hk(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var s5e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&Ut(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var i=t.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){B(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],i=Jr(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);B(i,function(a){t.push("dim"+a.get("dim")),n.push(a.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(gr),l5e=function(r){pe(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(el);function Yd(r,e,t,n,i,a){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=mp(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=mp(s,[0,o]),i=a=mp(s,[i,a]),n=0}e[0]=mp(e[0],t),e[1]=mp(e[1],t);var l=dk(e,n);e[n]+=r;var u=i||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=mp(e[n],c);var f;return f=dk(e,n),i!=null&&(f.sign!==l.sign||f.spana&&(e[1-n]=e[n]+f.sign*a),e}function dk(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function mp(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var pk=B,Vee=Math.min,Uee=Math.max,E7=Math.floor,u5e=Math.ceil,k7=$n,c5e=Math.PI,f5e=function(){function r(e,t,n){this.type="parallel",this._axesMap=nt(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var i=e.dimensions,a=e.parallelAxisIndex;pk(i,function(o,s){var l=a[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new l5e(o,WA(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,a=t.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+t.axisLength&&s>=i&&s<=i+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var i=n.getData();pk(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),iv(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=di(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,c=O_(e.get("axisExpandWidth"),l),f=O_(e.get("axisExpandCount")||0,[0,u]),h=e.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,d=e.get("axisExpandWindow"),p;if(d)p=O_(d[1]-d[0],l),d[1]=d[0]+p;else{p=O_(c*(f-1),l);var g=e.get("axisExpandCenter")||E7(u/2);d=[c*g-p/2],d[1]=d[0]+p}var v=(s-p)/(u-f);v<3&&(v=0);var m=[E7(k7(d[0]/c,1))+1,u5e(k7(d[1]/c,1))-1],y=v/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[i[1-o]],axisExpandable:h,axisExpandWidth:c,axisCollapseWidth:v,axisExpandWindow:d,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),pk(n,function(o,s){var l=(i.axisExpandable?d5e:h5e)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:c5e/2,vertical:0},f=[u[a].x+e.x,u[a].y+e.y],h=c[a],d=To();Gd(d,d,h),Kl(d,d,f),this._axesLayout[o]={position:f,rotation:h,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];B(o,function(v){s.push(e.mapDimension(v)),l.push(a.get(v).model)});for(var u=this.hasAxisBrushed(),c=n;ca*(1-f[0])?(u="jump",l=s-a*(1-f[2])):(l=s-a*f[1])>=0&&(l=s-a*(1-f[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?Yd(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[Uee(0,p-d/2)],i[1]=Vee(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},r}();function O_(r,e){return Vee(Uee(r,e[0]),e[1])}function h5e(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function d5e(r,e){var t=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return r=0;i--)as(n[i])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var i=n[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var a=0,o=n.length;ay5e}function qee(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function Yee(r,e,t,n){var i=new xt;return i.add(new _r({name:"main",style:KB(t),silent:!0,draggable:!0,cursor:"move",drift:Bt(I7,r,e,i,["n","s","w","e"]),ondragend:Bt(Md,e,{isEnd:!0})})),B(n,function(a){i.add(new _r({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Bt(I7,r,e,i,a),ondragend:Bt(Md,e,{isEnd:!0})}))}),i}function Zee(r,e,t,n){var i=n.brushStyle.lineWidth||0,a=sv(i,b5e),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,c=t[0][1],f=t[1][1],h=c-a+i/2,d=f-a+i/2,p=c-o,g=f-s,v=p+i,m=g+i;pu(r,e,"main",o,s,p,g),n.transformable&&(pu(r,e,"w",l,u,a,m),pu(r,e,"e",h,u,a,m),pu(r,e,"n",l,u,v,a),pu(r,e,"s",l,d,v,a),pu(r,e,"nw",l,u,a,a),pu(r,e,"ne",h,u,a,a),pu(r,e,"sw",l,d,a,a),pu(r,e,"se",h,d,a,a))}function t3(r,e){var t=e.__brushOption,n=t.transformable,i=e.childAt(0);i.useStyle(KB(t)),i.attr({silent:!n,cursor:n?"move":"default"}),B([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?r3(r,a[0]):x5e(r,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?w5e[s]+"-resize":null})})}function pu(r,e,t,n,i,a,o){var s=e.childOfName(t);s&&s.setShape(E5e(XB(r,e,[[n,i],[n+a,i+o]])))}function KB(r){return yt({strokeNoScale:!0},r.brushStyle)}function Kee(r,e,t,n){var i=[r1(r,t),r1(e,n)],a=[sv(r,t),sv(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function A5e(r){return ud(r.group)}function r3(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=kA(t[e],A5e(r));return n[i]}function x5e(r,e){var t=[r3(r,e[0]),r3(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function I7(r,e,t,n,i,a){var o=t.__brushOption,s=r.toRectRange(o.range),l=Xee(e,i,a);B(n,function(u){var c=_5e[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(Kee(s[0][0],s[1][0],s[0][1],s[1][1])),qB(e,t),Md(e,{isEnd:!1})}function D5e(r,e,t,n){var i=e.__brushOption.range,a=Xee(r,t,n);B(i,function(o){o[0]+=a[0],o[1]+=a[1]}),qB(r,e),Md(r,{isEnd:!1})}function Xee(r,e,t){var n=r.group,i=n.transformCoordToLocal(e,t),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function XB(r,e,t){var n=jee(r,e);return n&&n!==Td?n.clipPath(t,r._transform):wt(t)}function E5e(r){var e=r1(r[0][0],r[1][0]),t=r1(r[0][1],r[1][1]),n=sv(r[0][0],r[1][0]),i=sv(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:i-t}}function k5e(r,e,t){if(!(!r._brushType||M5e(r,e.offsetX,e.offsetY))){var n=r._zr,i=r._covers,a=ZB(r,e,t);if(!r._dragging)for(var o=0;on.getWidth()||t<0||t>n.getHeight()}var KA={lineX:B7(0),lineY:B7(1),rect:{createCover:function(r,e){function t(n){return n}return Yee({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=qee(r);return Kee(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){Zee(r,e,t,n)},updateCommon:t3,contain:i3},polygon:{createCover:function(r,e){var t=new xt;return t.add(new qa({name:"main",style:KB(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new $a({name:"main",draggable:!0,drift:Bt(D5e,r,e),ondragend:Bt(Md,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:XB(r,e,t)})},updateCommon:t3,contain:i3}};function B7(r){return{createCover:function(e,t){return Yee({toRectRange:function(n){var i=[n,[0,100]];return r&&i.reverse(),i},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=qee(e),n=r1(t[0][r],t[1][r]),i=sv(t[0][r],t[1][r]);return[n,i]},updateCoverShape:function(e,t,n,i){var a,o=jee(e,t);if(o!==Td&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,a];r&&l.reverse(),Zee(e,t,l,i)},updateCommon:t3,contain:i3}}function Jee(r){return r=QB(r),function(e){return cX(e,r)}}function ete(r,e){return r=QB(r),function(t){var n=e??t,i=n?r.width:r.height,a=n?r.x:r.y;return[a,a+(i||0)]}}function tte(r,e,t){var n=QB(r);return function(i,a){return n.contain(a[0],a[1])&&!jA(i,e,t)}}function QB(r){return Gt.create(r)}var I5e=["axisLine","axisTickLabel","axisName"],L5e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new jB(n.getZr())).on("brush",Je(this._onBrush,this))},e.prototype.render=function(t,n,i,a){if(!F5e(t,n,a)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new xt,this.group.add(this._axisGroup),!!t.get("show")){var s=O5e(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,f=t.axis.dim,h=l.getAxisLayout(f),d=be({strokeContainThreshold:c},h),p=new za(t,d);B(I5e,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,u,t,s,c,i),G1(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Gt.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:Jee(f),isTargetByCursor:tte(f,s,a),getLinearBrushOtherExtent:ete(f,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(B5e(i))},e.prototype._onBrush=function(t){var n=t.areas,i=this.axisModel,a=i.axis,o=De(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(In);function F5e(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function B5e(r){var e=r.axis;return De(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function O5e(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var P5e={type:"axisAreaSelect",event:"axisAreaSelected"};function R5e(r){r.registerAction(P5e,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var N5e={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function rte(r){r.registerComponentView(a5e),r.registerComponentModel(s5e),r.registerCoordinateSystem("parallel",g5e),r.registerPreprocessor(t5e),r.registerComponentModel(JI),r.registerComponentView(L5e),ov(r,"parallel",JI,N5e),R5e(r)}function z5e(r){ir(rte),r.registerChartView(qRe),r.registerSeriesModel(KRe),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,e5e)}var V5e=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),U5e=function(r){pe(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new V5e},e.prototype.buildPath=function(t,n){var i=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+i,n.y2),t.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(t.lineTo(n.x2,n.y2+i),t.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),t.closePath()},e.prototype.highlight=function(){qu(this)},e.prototype.downplay=function(){Yu(this)},e}(sr),G5e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,n,i){var a=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,f=t.getData(),h=t.getData("edge"),d=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var g=new U5e,v=Dt(g);v.dataIndex=p.dataIndex,v.seriesIndex=t.seriesIndex,v.dataType="edge";var m=p.getModel(),y=m.getModel("lineStyle"),b=y.get("curveness"),_=p.node1.getLayout(),w=p.node1.getModel(),S=w.get("localX"),C=w.get("localY"),A=p.node2.getLayout(),x=p.node2.getModel(),D=x.get("localX"),E=x.get("localY"),k=p.getLayout(),M,T,L,F,N,z,W,H;g.shape.extent=Math.max(1,k.dy),g.shape.orient=d,d==="vertical"?(M=(S!=null?S*u:_.x)+k.sy,T=(C!=null?C*c:_.y)+_.dy,L=(D!=null?D*u:A.x)+k.ty,F=E!=null?E*c:A.y,N=M,z=T*(1-b)+F*b,W=L,H=T*b+F*(1-b)):(M=(S!=null?S*u:_.x)+_.dx,T=(C!=null?C*c:_.y)+k.sy,L=D!=null?D*u:A.x,F=(E!=null?E*c:A.y)+k.ty,N=M*(1-b)+L*b,z=T,W=M*b+L*(1-b),H=F),g.setShape({x1:M,y1:T,x2:L,y2:F,cpx1:N,cpy1:z,cpx2:W,cpy2:H}),g.useStyle(y.getItemStyle()),O7(g.style,d,p);var R=""+m.get("value"),ne=Ti(m,"edgeLabel");ta(g,ne,{labelFetcher:{getFormattedLabel:function(Ce,Te,Se,_e,$,q){return t.getFormattedLabel(Ce,Te,"edge",_e,zl($,ne.normal&&ne.normal.get("formatter"),R),q)}},labelDataIndex:p.dataIndex,defaultText:R}),g.setTextConfig({position:"inside"});var te=m.getModel("emphasis");ea(g,m,"lineStyle",function(Ce){var Te=Ce.getItemStyle();return O7(Te,d,p),Te}),s.add(g),h.setItemGraphicEl(p.dataIndex,g);var fe=te.get("focus");Vn(g,fe==="adjacency"?p.getAdjacentDataIndices():fe==="trajectory"?p.getTrajectoryDataIndices():fe,te.get("blurScope"),te.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),v=p.getModel(),m=v.get("localX"),y=v.get("localY"),b=v.getModel("emphasis"),_=v.get(["itemStyle","borderRadius"])||0,w=new _r({shape:{x:m!=null?m*u:g.x,y:y!=null?y*c:g.y,width:g.dx,height:g.dy,r:_},style:v.getModel("itemStyle").getItemStyle(),z2:10});ta(w,Ti(v),{labelFetcher:{getFormattedLabel:function(C,A){return t.getFormattedLabel(C,A,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),w.disableLabelAnimation=!0,w.setStyle("fill",p.getVisual("color")),w.setStyle("decal",p.getVisual("style").decal),ea(w,v),s.add(w),f.setItemGraphicEl(p.dataIndex,w),Dt(w).dataType="node";var S=b.get("focus");Vn(w,S==="adjacency"?p.getAdjacentDataIndices():S==="trajectory"?p.getTrajectoryDataIndices():S,b.get("blurScope"),b.get("disabled"))}),f.eachItemGraphicEl(function(p,g){var v=f.getItemModel(g);v.get("draggable")&&(p.drift=function(m,y){a._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:f.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(H5e(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(an);function O7(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var n=t.node1.getVisual("color"),i=t.node2.getVisual("color");Ze(n)&&Ze(i)&&(r.fill=new U1(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function H5e(r,e,t){var n=new _r({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Dn(n,{shape:{width:r.width+20}},e,t),n}var W5e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var i=t.edges||t.links,a=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Zr(o[l],this,n));if(a&&i){var u=Nee(a,i,this,!0,c);return u.data}function c(f,h){f.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,v=g.getData().getItemLayout(p);if(v){var m=v.depth,y=g.levelModels[m];y&&(d.parentModel=y)}return d}),h.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,v=g.getGraph().getEdgeByIndex(p),m=v.node1.getLayout();if(m){var y=m.depth,b=g.levelModels[y];b&&(d.parentModel=b)}return d})}},e.prototype.setNodePosition=function(t,n){var i=this.option.data||this.option.nodes,a=i[t];a.localX=n[0],a.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Mi("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(t),f=c.getLayout().value,h=this.getDataParams(t,i).data.name;return Mi("nameValue",{name:h!=null?h+"":null,value:f,noValue:a(f)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var i=r.prototype.getDataParams.call(this,t,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(t),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(bn);function $5e(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),a=j5e(t,e);t.layoutInfo=a;var o=a.width,s=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;Y5e(u);var f=Jr(u,function(g){return g.getLayout().value===0}),h=f.length!==0?0:t.get("layoutIterations"),d=t.get("orient"),p=t.get("nodeAlign");q5e(u,c,n,i,o,s,h,d,p)})}function j5e(r,e){return di(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function q5e(r,e,t,n,i,a,o,s,l){Z5e(r,e,t,i,a,s,l),J5e(r,e,a,i,n,o,s),lNe(r,s)}function Y5e(r){B(r,function(e){var t=of(e.outEdges,rC),n=of(e.inEdges,rC),i=e.getValue()||0,a=Math.max(t,n,i);e.setLayout({value:a},!0)})}function Z5e(r,e,t,n,i,a,o){for(var s=[],l=[],u=[],c=[],f=0,h=0;h=0;m&&v.depth>d&&(d=v.depth),g.setLayout({depth:m?v.depth:f},!0),a==="vertical"?g.setLayout({dy:t},!0):g.setLayout({dx:t},!0);for(var y=0;yf-1?d:f-1;o&&o!=="left"&&K5e(r,o,a,C);var A=a==="vertical"?(i-t)/C:(n-t)/C;Q5e(r,A,a)}function nte(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function K5e(r,e,t,n){if(e==="right"){for(var i=[],a=r,o=0;a.length;){for(var s=0;s0;a--)l*=.99,rNe(s,l,o),gk(s,i,t,n,o),sNe(s,l,o),gk(s,i,t,n,o)}function eNe(r,e){var t=[],n=e==="vertical"?"y":"x",i=iI(r,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),B(i.keys,function(a){t.push(i.buckets.get(a))}),t}function tNe(r,e,t,n,i,a){var o=1/0;B(r,function(s){var l=s.length,u=0;B(s,function(f){u+=f.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(t-(l-1)*i)/u;c0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[h]+e;var p=i==="vertical"?n:t;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=f-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[h]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function rNe(r,e,t){B(r.slice().reverse(),function(n){B(n,function(i){if(i.outEdges.length){var a=of(i.outEdges,nNe,t)/of(i.outEdges,rC);if(isNaN(a)){var o=i.outEdges.length;a=o?of(i.outEdges,iNe,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(a-Ef(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-Ef(i,t))*e;i.setLayout({y:l},!0)}}})})}function nNe(r,e){return Ef(r.node2,e)*r.getValue()}function iNe(r,e){return Ef(r.node2,e)}function aNe(r,e){return Ef(r.node1,e)*r.getValue()}function oNe(r,e){return Ef(r.node1,e)}function Ef(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function rC(r){return r.getValue()}function of(r,e,t){for(var n=0,i=r.length,a=-1;++ao&&(o=l)}),B(n,function(s){var l=new Ei({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&B(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function cNe(r){r.registerChartView(G5e),r.registerSeriesModel(W5e),r.registerLayout($5e),r.registerVisual(uNe),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var ite=function(){function r(){}return r.prototype.getInitialData=function(e,t){var n,i=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],h=u[1-c],d=[i,a],p=d[c].get("type"),g=d[1-c].get("type"),v=e.data;if(v&&l){var m=[];B(v,function(_,w){var S;Ae(_)?(S=_.slice(),_.unshift(w)):Ae(_.value)?(S=be({},_),S.value=S.value.slice(),_.value.unshift(w)):S=_,m.push(S)}),e.data=m}var y=this.defaultValueDimensions,b=[{name:f,type:$2(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:$2(g),dimsDef:y.slice()}];return Gv(this,{coordDimensions:b,dimensionsCount:y.length+1,encodeDefaulter:Bt(PX,b,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),ate=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(bn);oi(ate,ite,!0);var fNe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),f=P7(c,a,u,l,!0);a.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(f);return}var h=a.getItemLayout(u);f?(Zs(f),ote(h,f,a,u)):f=P7(h,a,u,l),o.add(f),a.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(t){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(an),hNe=function(){function r(){}return r}(),dNe=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new hNe},e.prototype.buildPath=function(t,n){var i=n.points,a=0;for(t.moveTo(i[a][0],i[a][1]),a++;a<4;a++)t.lineTo(i[a][0],i[a][1]);for(t.closePath();ag){var _=[m,b];n.push(_)}}}return{boxData:t,outliers:n}}var _Ne={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==_a){var n="";qr(n)}var i=bNe(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function wNe(r){r.registerSeriesModel(ate),r.registerChartView(fNe),r.registerLayout(gNe),r.registerTransform(_Ne)}var SNe=["color","borderColor"],CNe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){Pf(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var f=n.getItemLayout(c);if(s&&R7(u,f))return;var h=vk(f,c,!0);Dn(h,{shape:{points:f.ends}},t,c),mk(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}}).update(function(c,f){var h=i.getItemGraphicEl(f);if(!n.hasValue(c)){a.remove(h);return}var d=n.getItemLayout(c);if(s&&R7(u,d)){a.remove(h);return}h?(Pr(h,{shape:{points:d.ends}},t,c),Zs(h)):h=vk(d),mk(h,n,c,o),a.add(h),n.setItemGraphicEl(c,h)}).remove(function(c){var f=i.getItemGraphicEl(c);f&&a.remove(f)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),N7(t,this.group);var n=t.get("clip",!0)?K1(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=vk(s);mk(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){N7(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(an),ANe=function(){function r(){}return r}(),xNe=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new ANe},e.prototype.buildPath=function(t,n){var i=n.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(sr);function vk(r,e,t){var n=r.ends;return new xNe({shape:{points:t?DNe(n,r):n},z2:100})}function R7(r,e){for(var t=!0,n=0;n0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(i=t.get(["itemStyle","borderColorDoji"]));var a=t.getModel("itemStyle").getItemStyle(SNe);e.useStyle(a),e.style.fill=null,e.style.stroke=i}var ste=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,i){var a=n.getItemLayout(t);return a&&i.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(bn);oi(ste,ite,!0);function kNe(r){!r||!Ae(r.series)||B(r.series,function(e){_t(e)&&e.type==="k"&&(e.type="candlestick")})}var TNe=["itemStyle","borderColor"],MNe=["itemStyle","borderColor0"],INe=["itemStyle","borderColorDoji"],LNe=["itemStyle","color"],FNe=["itemStyle","color0"],BNe={seriesType:"candlestick",plan:Nv(),performRawSeries:!0,reset:function(r,e){function t(a,o){return o.get(a>0?LNe:FNe)}function n(a,o){return o.get(a===0?INe:a>0?TNe:MNe)}if(!e.isSeriesFiltered(r)){var i=r.pipelineContext.large;return!i&&{progress:function(a,o){for(var s;(s=a.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,c=l.getItemStyle();c.fill=t(u,l),c.stroke=n(u,l)||c.fill;var f=o.ensureUniqueItemVisual(s,"style");be(f,c)}}}}}},ONe={seriesType:"candlestick",plan:Nv(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=PNe(r,t),i=0,a=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=De(t.mapDimensionsAll(o[a]),t.getDimensionIndex,t),u=l[0],c=l[1],f=l[2],h=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:d};function d(g,v){for(var m,y=v.getStore();(m=g.next())!=null;){var b=y.get(s,m),_=y.get(u,m),w=y.get(c,m),S=y.get(f,m),C=y.get(h,m),A=Math.min(_,w),x=Math.max(_,w),D=N(A,b),E=N(x,b),k=N(S,b),M=N(C,b),T=[];z(T,E,0),z(T,D,1),T.push(H(M),H(E),H(k),H(D));var L=v.getItemModel(m),F=!!L.get(["itemStyle","borderColorDoji"]);v.setItemLayout(m,{sign:z7(y,m,_,w,c,F),initBaseline:_>w?E[a]:D[a],ends:T,brushRect:W(S,C,b)})}function N(R,ne){var te=[];return te[i]=ne,te[a]=R,isNaN(ne)||isNaN(R)?[NaN,NaN]:e.dataToPoint(te)}function z(R,ne,te){var fe=ne.slice(),Ce=ne.slice();fe[i]=Bw(fe[i]+n/2,1,!1),Ce[i]=Bw(Ce[i]-n/2,1,!0),te?R.push(fe,Ce):R.push(Ce,fe)}function W(R,ne,te){var fe=N(R,te),Ce=N(ne,te);return fe[i]-=n/2,Ce[i]-=n/2,{x:fe[0],y:fe[1],width:n,height:Ce[1]-fe[1]}}function H(R){return R[i]=Bw(R[i],1),R}}function p(g,v){for(var m=Bl(g.count*4),y=0,b,_=[],w=[],S,C=v.getStore(),A=!!r.get(["itemStyle","borderColorDoji"]);(S=g.next())!=null;){var x=C.get(s,S),D=C.get(u,S),E=C.get(c,S),k=C.get(f,S),M=C.get(h,S);if(isNaN(x)||isNaN(k)||isNaN(M)){m[y++]=NaN,y+=3;continue}m[y++]=z7(C,S,D,E,c,A),_[i]=x,_[a]=k,b=e.dataToPoint(_,null,w),m[y++]=b?b[0]:NaN,m[y++]=b?b[1]:NaN,_[a]=M,b=e.dataToPoint(_,null,w),m[y++]=b?b[1]:NaN}v.setLayout("largePoints",m)}}};function z7(r,e,t,n,i,a){var o;return t>n?o=-1:t0?r.get(i,e-1)<=n?1:-1:1,o}function PNe(r,e){var t=r.getBaseAxis(),n,i=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=$e(Lt(r.get("barMaxWidth"),i),i),o=$e(Lt(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?$e(s,i):Math.max(Math.min(i/2,a),o)}function RNe(r){r.registerChartView(CNe),r.registerSeriesModel(ste),r.registerPreprocessor(kNe),r.registerVisual(BNe),r.registerLayout(ONe)}function V7(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var NNe=function(r){pe(e,r);function e(t,n){var i=r.call(this)||this,a=new Y1(t,n),o=new xt;return i.add(a),i.add(o),i.updateData(t,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,i=t.color,a=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var h=void 0;gt(f)?h=f(i):h=f,a.__t>0&&(h=-s*a.__t),this._animateSymbol(a,s,h,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,i,a,o){if(n>0){t.__t=0;var s=this,l=t.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});a||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return $c(t.__p1,t.__cp1)+$c(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,i){this.childAt(0).updateData(t,n,i),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,i=t.__p2,a=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Bi,c=HM;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var f=t.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),h=t.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);t.rotation=-Math.atan2(h,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),f=i[l],h=i[l+1];t.x=f[0]*(1-c)+c*h[0],t.y=f[1]*(1-c)+c*h[1];var d=t.__t<1?h[0]-f[0]:f[0]-h[0],p=t.__t<1?h[1]-f[1]:f[1]-h[1];t.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e}(lte),HNe=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),WNe=function(r){pe(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new HNe},e.prototype.buildPath=function(t,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o0){t.moveTo(i[o++],i[o++]);for(var l=1;l0){var d=(u+f)/2-(c-h)*a,p=(c+h)/2-(f-u)*a;t.quadraticCurveTo(d,p,f,h)}else t.lineTo(f,h)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u0)for(var f=a[u++],h=a[u++],d=1;d0){var v=(f+p)/2-(h-g)*o,m=(h+g)/2-(p-f)*o;if(PK(f,h,v,m,p,g,s,t,n))return l}else if(Ic(f,h,p,g,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(t=i[0],n=i[1],a.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),cte={seriesType:"lines",plan:Nv(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(t){for(var u=0,c=i.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var f=t.get("clip",!0)&&K1(t.coordinateSystem,!1,t);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,i){var a=t.getData(),o=this._updateLineDraw(a,t);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,i){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,i){var a=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=cte.reset(t,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new $Ne:new $B(o?a?GNe:ute:a?lte:WB),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),i=n.painter.getType()==="svg";!i&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e}(an),qNe=typeof Uint32Array>"u"?Array:Uint32Array,YNe=typeof Float64Array>"u"?Array:Float64Array;function U7(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=De(e,function(t){var n=[t[0].coord,t[1].coord],i={coords:n};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),CF([i,t[0],t[1]])}))}var ZNe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],U7(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(U7(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=w2(this._flatCoords,n.flatCoords),this._flatCoordsOffset=w2(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(bn);function P_(r){return r instanceof Array||(r=[r,r]),r}var KNe={seriesType:"lines",reset:function(r){var e=P_(r.get("symbol")),t=P_(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function i(a,o){var s=a.getItemModel(o),l=P_(s.getShallow("symbol",!0)),u=P_(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};function XNe(r){r.registerChartView(jNe),r.registerSeriesModel(ZNe),r.registerLayout(cte),r.registerVisual(KNe)}var QNe=256,JNe=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Sf.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,h=f.getContext("2d"),d=e.length;f.width=t,f.height=n;for(var p=0;p0){var k=o(b)?l:u;b>0&&(b=b*D+A),w[S++]=k[E],w[S++]=k[E+1],w[S++]=k[E+2],w[S++]=k[E+3]*b*256}else S+=4}return h.putImageData(_,0,0),f},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Sf.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,i=n[t]||(n[t]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},r}();function e6e(r,e,t){var n=r[1]-r[0];e=De(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function G7(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var r6e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):G7(o)&&this._renderOnGeo(o,t,a,i)},e.prototype.incrementalPrepareRender=function(t,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,i,a){var o=n.coordinateSystem;o&&(G7(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Pf(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,n,i,a,o){var s=t.coordinateSystem,l=jd(s,"cartesian2d"),u,c,f,h;if(l){var d=s.getAxis("x"),p=s.getAxis("y");u=d.getBandWidth()+.5,c=p.getBandWidth()+.5,f=d.scale.getExtent(),h=p.scale.getExtent()}for(var g=this.group,v=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),b=t.getModel(["select","itemStyle"]).getItemStyle(),_=t.get(["itemStyle","borderRadius"]),w=Ti(t),S=t.getModel("emphasis"),C=S.get("focus"),A=S.get("blurScope"),x=S.get("disabled"),D=l?[v.mapDimension("x"),v.mapDimension("y"),v.mapDimension("value")]:[v.mapDimension("time"),v.mapDimension("value")],E=i;Ef[1]||Lh[1])continue;var F=s.dataToPoint([T,L]);k=new _r({shape:{x:F[0]-u/2,y:F[1]-c/2,width:u,height:c},style:M})}else{if(isNaN(v.get(D[1],E)))continue;k=new _r({z2:1,shape:s.dataToRect([v.get(D[0],E)]).contentShape,style:M})}if(v.hasItemOption){var N=v.getItemModel(E),z=N.getModel("emphasis");m=z.getModel("itemStyle").getItemStyle(),y=N.getModel(["blur","itemStyle"]).getItemStyle(),b=N.getModel(["select","itemStyle"]).getItemStyle(),_=N.get(["itemStyle","borderRadius"]),C=z.get("focus"),A=z.get("blurScope"),x=z.get("disabled"),w=Ti(N)}k.shape.r=_;var W=t.getRawValue(E),H="-";W&&W[2]!=null&&(H=W[2]+""),ta(k,w,{labelFetcher:t,labelDataIndex:E,defaultOpacity:M.opacity,defaultText:H}),k.ensureState("emphasis").style=m,k.ensureState("blur").style=y,k.ensureState("select").style=b,Vn(k,C,A,x),k.incremental=o,o&&(k.states.emphasis.hoverLayer=!0),g.add(k),v.setItemGraphicEl(E,k),this._progressiveEls&&this._progressiveEls.push(k)}},e.prototype._renderOnGeo=function(t,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new JNe;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),f=t.getRoamTransform();c.applyTransform(f);var h=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),v=p-h,m=g-d,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],b=l.mapArray(y,function(C,A,x){var D=t.dataToPoint([C,A]);return D[0]-=h,D[1]-=d,D.push(x),D}),_=i.getExtent(),w=i.type==="visualMap.continuous"?t6e(_,i.option.range):e6e(_,i.getPieceList(),i.option.selected);u.update(b,v,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},w);var S=new $i({style:{width:v,height:m,x:h,y:d,image:u.canvas},silent:!0});this.group.add(S)},e.type="heatmap",e}(an),n6e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return oc(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=W1.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(bn);function i6e(r){r.registerChartView(r6e),r.registerSeriesModel(n6e)}var a6e=["itemStyle","borderWidth"],H7=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],_k=new ac,o6e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:H7[+c],categoryDim:H7[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=$7(o,p),v=W7(o,p,g,h),m=j7(o,h,v);o.setItemGraphicEl(p,m),a.add(m),Y7(m,h,v)}}).update(function(p,g){var v=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(v);return}var m=$7(o,p),y=W7(o,p,m,h),b=vte(o,y);v&&b!==v.__pictorialShapeStr&&(a.remove(v),o.setItemGraphicEl(p,null),v=null),v?d6e(v,h,y):v=j7(o,h,y,!0),o.setItemGraphicEl(p,v),v.__pictorialSymbolMeta=y,a.add(v),Y7(v,h,y)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&q7(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=t.get("clip",!0)?K1(t.coordinateSystem,!1,t):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var i=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(o){q7(a,Dt(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(an);function W7(r,e,t,n){var i=r.getItemLayout(e),a=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,f=t.isAnimationEnabled(),h={dataIndex:e,layout:i,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?t:null,hoverScale:f&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};s6e(t,a,i,n,h),l6e(r,e,i,a,o,h.boundingLength,h.pxSign,c,n,h),u6e(t,h.symbolScale,u,n,h);var d=h.symbolSize,p=Wd(t.get("symbolOffset"),d);return c6e(t,d,i,a,o,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function s6e(r,e,t,n,i){var a=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[a.wh]<=0),c;if(Ae(o)){var f=[wk(s,o[0])-l,wk(s,o[1])-l];f[1]0?1:-1}function wk(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function l6e(r,e,t,n,i,a,o,s,l,u){var c=l.valueDim,f=l.categoryDim,h=Math.abs(t[f.wh]),d=r.getItemVisual(e,"symbolSize"),p;Ae(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[f.index]=$e(p[f.index],h),p[c.index]=$e(p[c.index],n?h:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function u6e(r,e,t,n,i){var a=r.get(a6e)||0;a&&(_k.attr({scaleX:e[0],scaleY:e[1],rotation:t}),_k.updateTransform(),a/=_k.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function c6e(r,e,t,n,i,a,o,s,l,u,c,f){var h=c.categoryDim,d=c.valueDim,p=f.pxSign,g=Math.max(e[d.index]+s,0),v=g;if(n){var m=Math.abs(l),y=Ni(r.get("symbolMargin"),"15%")+"",b=!1;y.lastIndexOf("!")===y.length-1&&(b=!0,y=y.slice(0,y.length-1));var _=$e(y,e[d.index]),w=Math.max(g+_*2,0),S=b?0:_*2,C=SK(n),A=C?n:Z7((m+S)/w),x=m-A*g;_=x/2/(b?A:Math.max(A-1,1)),w=g+_*2,S=b?0:_*2,!C&&n!=="fixed"&&(A=u?Z7((Math.abs(u)+S)/w):0),v=A*w-S,f.repeatTimes=A,f.symbolMargin=_}var D=p*(v/2),E=f.pathPosition=[];E[h.index]=t[h.wh]/2,E[d.index]=o==="start"?D:o==="end"?l-D:l/2,a&&(E[0]+=a[0],E[1]+=a[1]);var k=f.bundlePosition=[];k[h.index]=t[h.xy],k[d.index]=t[d.xy];var M=f.barRectShape=be({},t);M[d.wh]=p*Math.max(Math.abs(t[d.wh]),Math.abs(E[d.index]+D)),M[h.wh]=t[h.wh];var T=f.clipShape={};T[h.xy]=-t[h.xy],T[h.wh]=c.ecSize[h.wh],T[d.xy]=0,T[d.wh]=t[d.wh]}function fte(r){var e=r.symbolPatternSize,t=ni(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function hte(r,e,t,n){var i=r.__pictorialBundle,a=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,f=a[e.valueDim.index]+o+t.symbolMargin*2;for(JB(r,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:m<0)&&(y=u-1-g),v[l.index]=f*(y-u/2+.5)+s[l.index],{x:v[0],y:v[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function dte(r,e,t,n){var i=r.__pictorialBundle,a=r.__pictorialMainPath;a?_g(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(a=r.__pictorialMainPath=fte(t),i.add(a),_g(a,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function pte(r,e,t){var n=be({},e.barRectShape),i=r.__pictorialBarRect;i?_g(i,null,{shape:n},e,t):(i=r.__pictorialBarRect=new _r({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function gte(r,e,t,n){if(t.symbolClip){var i=r.__pictorialClipPath,a=be({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)Pr(i,{shape:a},s,l);else{a[o.wh]=0,i=new _r({shape:a}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],Hd[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function $7(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=f6e,t.isAnimationEnabled=h6e,t}function f6e(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function h6e(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function j7(r,e,t,n){var i=new xt,a=new xt;return i.add(a),i.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?hte(i,e,t):dte(i,e,t),pte(i,t,n),gte(i,e,t,n),i.__pictorialShapeStr=vte(r,t),i.__pictorialSymbolMeta=t,i}function d6e(r,e,t){var n=t.animationModel,i=t.dataIndex,a=r.__pictorialBundle;Pr(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,i),t.symbolRepeat?hte(r,e,t,!0):dte(r,e,t,!0),pte(r,t,!0),gte(r,e,t,!0)}function q7(r,e,t,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];JB(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),B(a,function(o){Af(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function vte(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function JB(r,e,t){B(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function _g(r,e,t,n,i,a){e&&r.attr(e),n.symbolClip&&!i?t&&r.attr(t):t&&Hd[i?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,a)}function Y7(r,e,t){var n=t.dataIndex,i=t.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),f=a.get("blurScope"),h=a.get("scale");JB(r,function(g){if(g instanceof $i){var v=g.style;g.useStyle(be({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},t.style))}else g.useStyle(t.style);var m=g.ensureState("emphasis");m.style=o,h&&(m.scaleX=g.scaleX*1.1,m.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=t.z2});var d=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,ta(p,Ti(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:av(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:d}),Vn(r,c,f,a.get("disabled"))}function Z7(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var p6e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Rf(Ky.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Ky);function g6e(r){r.registerChartView(o6e),r.registerSeriesModel(p6e),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Bt(JQ,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,eJ("pictorialBar"))}var v6e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,i){var a=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function h(v){return v.name}var d=new Zu(this._layersSeries||[],l,h,h),p=[];d.add(Je(g,this,"add")).update(Je(g,this,"update")).remove(Je(g,this,"remove")).execute();function g(v,m,y){var b=o._layers;if(v==="remove"){s.remove(b[m]);return}for(var _=[],w=[],S,C=l[m].indices,A=0;Aa&&(a=s),n.push(s)}for(var u=0;ua&&(a=f)}return{y0:i,max:a}}function w6e(r){r.registerChartView(v6e),r.registerSeriesModel(y6e),r.registerLayout(b6e),r.registerProcessor(Q1("themeRiver"))}var S6e=2,C6e=4,X7=function(r){pe(e,r);function e(t,n,i,a){var o=r.call(this)||this;o.z2=S6e,o.textConfig={inside:!0},Dt(o).seriesIndex=n.seriesIndex;var s=new Er({z2:C6e,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,i,a),o}return e.prototype.updateData=function(t,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;Dt(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),f=be({},c);f.label=null;var h=n.getVisual("style");h.lineJoin="bevel";var d=n.getVisual("decal");d&&(h.decal=nv(d,o));var p=Wh(l.getModel("itemStyle"),f,!0);be(f,p),B(Ha,function(y){var b=s.ensureState(y),_=l.getModel([y,"itemStyle"]);b.style=_.getItemStyle();var w=Wh(_,f);w&&(b.shape=w)}),t?(s.setShape(f),s.shape.r=c.r0,Dn(s,{shape:{r:c.r}},i,n.dataIndex)):(Pr(s,{shape:f},i),Zs(s)),s.useStyle(h),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var v=u.get("focus"),m=v==="ancestor"?n.getAncestorsIndices():v==="descendant"?n.getDescendantIndices():v;Vn(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),f=this,h=f.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)T&&!Py(F-T)&&F0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,t,n,i):(o.virtualPiece=new X7(y,t,n,i),c.add(o.virtualPiece)),b.piece.off("click"),o.virtualPiece.on("click",function(_){o._rootToNode(b.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=t.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";R2(u,c)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:a3,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=t[0]-a.cx,s=t[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(an),E6e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var i={name:t.name,children:t.data};mte(i);var a=this._levelModels=De(t.levels||[],function(l){return new Zr(l,this,n)},this),o=NB.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),h=a[f.depth];return h&&(u.parentModel=h),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=YA(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){See(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(bn);function mte(r){var e=0;B(r.children,function(n){mte(n);var i=n.value;Ae(i)&&(i=i[0]),e+=i});var t=r.value;Ae(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),Ae(r.value)?r.value[0]=t:r.value=t}var J7=Math.PI/180;function k6e(r,e,t){e.eachSeriesByType(r,function(n){var i=n.get("center"),a=n.get("radius");Ae(a)||(a=[0,a]),Ae(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=$e(i[0],o),c=$e(i[1],s),f=$e(a[0],l/2),h=$e(a[1],l/2),d=-n.get("startAngle")*J7,p=n.get("minAngle")*J7,g=n.getData().tree.root,v=n.getViewRoot(),m=v.depth,y=n.get("sort");y!=null&&yte(v,y);var b=0;B(v.children,function(F){!isNaN(F.getValue())&&b++});var _=v.getValue(),w=Math.PI/(_||b)*2,S=v.depth>0,C=v.height-(S?-1:1),A=(h-f)/(C||1),x=n.get("clockwise"),D=n.get("stillShowZeroSum"),E=x?1:-1,k=function(F,N){if(F){var z=N;if(F!==g){var W=F.getValue(),H=_===0&&D?w:W*w;H1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&Ze(s)&&(s=jM(s,(n.depth-1)/(a-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");be(u,l)})})}function I6e(r){r.registerChartView(D6e),r.registerSeriesModel(E6e),r.registerLayout(Bt(k6e,"sunburst")),r.registerProcessor(Bt(Q1,"sunburst")),r.registerVisual(M6e),x6e(r)}var ez={color:"fill",borderColor:"stroke"},L6e={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Vu=wr(),F6e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return oc(null,this)},e.prototype.getDataParams=function(t,n,i){var a=r.prototype.getDataParams.call(this,t,n);return i&&(a.info=Vu(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(bn);function B6e(r,e){return e=e||[0,0],De(["x","y"],function(t,n){var i=this.getAxis(t),a=e[n],o=r[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function O6e(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Je(B6e,r)}}}function P6e(r,e){return e=e||[0,0],De([0,1],function(t){var n=e[t],i=r[t]/2,a=[],o=[];return a[t]=n-i,o[t]=n+i,a[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(a)[t]-this.dataToPoint(o)[t])},this)}function R6e(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:Je(P6e,r)}}}function N6e(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,i=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-i)-t.dataToCoord(n+i))}function z6e(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Je(N6e,r)}}}function V6e(r,e){return e=e||[0,0],De(["Radius","Angle"],function(t,n){var i="get"+t+"Axis",a=this[i](),o=e[n],s=r[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function U6e(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(i){var a=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=r.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:Je(V6e,r)}}}function G6e(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,i){return r.dataToPoint(n,i)}}}}function bte(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||tt(r,"text")))}function _te(r,e,t){var n=r,i,a,o;if(e==="text")o=n;else{o={},tt(n,"text")&&(o.text=n.text),tt(n,"rich")&&(o.rich=n.rich),tt(n,"textFill")&&(o.fill=n.textFill),tt(n,"textStroke")&&(o.stroke=n.textStroke),tt(n,"fontFamily")&&(o.fontFamily=n.fontFamily),tt(n,"fontSize")&&(o.fontSize=n.fontSize),tt(n,"fontStyle")&&(o.fontStyle=n.fontStyle),tt(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=tt(n,"textPosition");t?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),tt(n,"textPosition")&&(i.position=n.textPosition),tt(n,"textOffset")&&(i.offset=n.textOffset),tt(n,"textRotation")&&(i.rotation=n.textRotation),tt(n,"textDistance")&&(i.distance=n.textDistance)}return tz(o,r),B(o.rich,function(l){tz(l,l)}),{textConfig:i,textContent:a}}function tz(r,e){e&&(e.font=e.textFont||e.font,tt(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),tt(e,"textAlign")&&(r.align=e.textAlign),tt(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),tt(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),tt(e,"textWidth")&&(r.width=e.textWidth),tt(e,"textHeight")&&(r.height=e.textHeight),tt(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),tt(e,"textPadding")&&(r.padding=e.textPadding),tt(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),tt(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),tt(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),tt(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),tt(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),tt(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),tt(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function rz(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var i=n.textPosition.indexOf("inside")>=0,a=r.fill||"#000";nz(n,e);var o=n.textFill==null;return i?o&&(n.textFill=t.insideFill||"#fff",!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||"#000"),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,B(e.rich,function(s){nz(s,s)}),n}function nz(r,e){e&&(tt(e,"fill")&&(r.textFill=e.fill),tt(e,"stroke")&&(r.textStroke=e.fill),tt(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),tt(e,"font")&&(r.font=e.font),tt(e,"fontStyle")&&(r.fontStyle=e.fontStyle),tt(e,"fontWeight")&&(r.fontWeight=e.fontWeight),tt(e,"fontSize")&&(r.fontSize=e.fontSize),tt(e,"fontFamily")&&(r.fontFamily=e.fontFamily),tt(e,"align")&&(r.textAlign=e.align),tt(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),tt(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),tt(e,"width")&&(r.textWidth=e.width),tt(e,"height")&&(r.textHeight=e.height),tt(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),tt(e,"padding")&&(r.textPadding=e.padding),tt(e,"borderColor")&&(r.textBorderColor=e.borderColor),tt(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),tt(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),tt(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),tt(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),tt(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),tt(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),tt(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),tt(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),tt(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),tt(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var wte={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},iz=vr(wte);Zl(Xl,function(r,e){return r[e]=1,r},{});Xl.join(", ");var nC=["","style","shape","extra"],lv=wr();function eO(r,e,t,n,i){var a=r+"Animation",o=Iv(r,n,i)||{},s=lv(e).userDuring;return o.duration>0&&(o.during=s?Je(q6e,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),be(o,t[a]),o}function Vw(r,e,t,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=lv(r),u=e.style;l.userDuring=e.during;var c={},f={};if(Z6e(r,e,f),oz("shape",e,f),oz("extra",e,f),!a&&s&&(Y6e(r,e,c),az("shape",r,e,c),az("extra",r,e,c),K6e(r,e,u,c)),f.style=u,H6e(r,f,o),$6e(r,e),s)if(a){var h={};B(nC,function(p){var g=p?e[p]:e;g&&g.enterFrom&&(p&&(h[p]=h[p]||{}),be(p?h[p]:h,g.enterFrom))});var d=eO("enter",r,e,t,i);d.duration>0&&r.animateFrom(h,d)}else W6e(r,e,i||0,t,c);Ste(r,e),u?r.dirty():r.markRedraw()}function Ste(r,e){for(var t=lv(r).leaveToProps,n=0;n0&&r.animateFrom(i,a)}}function $6e(r,e){tt(e,"silent")&&(r.silent=e.silent),tt(e,"ignore")&&(r.ignore=e.ignore),r instanceof ds&&tt(e,"invisible")&&(r.invisible=e.invisible),r instanceof sr&&tt(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var gl={},j6e={setTransform:function(r,e){return gl.el[r]=e,this},getTransform:function(r){return gl.el[r]},setShape:function(r,e){var t=gl.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=gl.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=gl.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=gl.el.style;if(e)return e[r]},setExtra:function(r,e){var t=gl.el.extra||(gl.el.extra={});return t[r]=e,this},getExtra:function(r){var e=gl.el.extra;if(e)return e[r]}};function q6e(){var r=this,e=r.el;if(e){var t=lv(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}gl.el=e,n(j6e)}}function az(r,e,t,n){var i=t[r];if(i){var a=e[r],o;if(a){var s=t.transition,l=i.transition;if(l)if(!o&&(o=n[r]={}),hd(l))be(o,a);else for(var u=rn(l),c=0;c=0){!o&&(o=n[r]={});for(var d=vr(a),c=0;c=0)){var h=r.getAnimationStyleProps(),d=h?h.style:null;if(d){!a&&(a=n.style={});for(var p=vr(t),u=0;u=0?e.getStore().get(N,L):void 0}var z=e.get(F.name,L),W=F&&F.ordinalMeta;return W?W.categories[z]:z}function S(T,L){L==null&&(L=u);var F=e.getItemVisual(L,"style"),N=F&&F.fill,z=F&&F.opacity,W=y(L,Qc).getItemStyle();N!=null&&(W.fill=N),z!=null&&(W.opacity=z);var H={inheritColor:Ze(N)?N:"#000"},R=b(L,Qc),ne=mn(R,null,H,!1,!0);ne.text=R.getShallow("show")?Lt(r.getFormattedLabel(L,Qc),av(e,L)):null;var te=O2(R,H,!1);return x(T,W),W=rz(W,ne,te),T&&A(W,T),W.legacy=!0,W}function C(T,L){L==null&&(L=u);var F=y(L,Uu).getItemStyle(),N=b(L,Uu),z=mn(N,null,null,!0,!0);z.text=N.getShallow("show")?zl(r.getFormattedLabel(L,Uu),r.getFormattedLabel(L,Qc),av(e,L)):null;var W=O2(N,null,!0);return x(T,F),F=rz(F,z,W),T&&A(F,T),F.legacy=!0,F}function A(T,L){for(var F in L)tt(L,F)&&(T[F]=L[F])}function x(T,L){T&&(T.textFill&&(L.textFill=T.textFill),T.textPosition&&(L.textPosition=T.textPosition))}function D(T,L){if(L==null&&(L=u),tt(ez,T)){var F=e.getItemVisual(L,"style");return F?F[ez[T]]:null}if(tt(L6e,T))return e.getItemVisual(L,T)}function E(T){if(a.type==="cartesian2d"){var L=a.getBaseAxis();return ZLe(yt({axis:L},T))}}function k(){return t.getCurrentSeriesIndices()}function M(T){return qF(T,t)}}function o8e(r){var e={};return B(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function xk(r,e,t,n,i,a,o){if(!n){a.remove(e);return}var s=aO(r,e,t,n,i,a);return s&&o.setItemGraphicEl(t,s),s&&Vn(s,n.focus,n.blurScope,n.emphasisDisabled),s}function aO(r,e,t,n,i,a){var o=-1,s=e;e&&Dte(e,n,i)&&(o=Qt(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=nO(n),s&&r8e(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),No.normal.cfg=No.normal.conOpt=No.emphasis.cfg=No.emphasis.conOpt=No.blur.cfg=No.blur.conOpt=No.select.cfg=No.select.conOpt=null,No.isLegacy=!1,l8e(u,t,n,i,l,No),s8e(u,t,n,i,l),iO(r,u,t,n,No,i,l),tt(n,"info")&&(Vu(u).info=n.info);for(var c=0;c=0?a.replaceAt(u,o):a.add(u),u}function Dte(r,e,t){var n=Vu(r),i=e.type,a=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&d8e(a)&&Ete(a)!==n.customPathData||i==="image"&&tt(o,"image")&&o.image!==n.customImagePath}function s8e(r,e,t,n,i){var a=t.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var o=r.getClipPath();o&&Dte(o,a,n)&&(o=null),o||(o=nO(a),r.setClipPath(o)),iO(null,o,e,a,null,n,i)}}function l8e(r,e,t,n,i,a){if(!r.isGroup){lz(t,null,a),lz(t,Uu,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=nO(o),r.setTextContent(c)),iO(null,c,e,o,null,n,i);for(var f=o&&o.style,h=0;h=c;d--){var p=e.childAt(d);c8e(e,p,i)}}}function c8e(r,e,t){e&&XA(e,Vu(r).option,t)}function f8e(r){new Zu(r.oldChildren,r.newChildren,uz,uz,r).add(cz).update(cz).remove(h8e).execute()}function uz(r,e){var t=r&&r.name;return t??e8e+e}function cz(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,i=e!=null?t.oldChildren[e]:null;aO(t.api,i,t.dataIndex,n,t.seriesModel,t.group)}function h8e(r){var e=this.context,t=e.oldChildren[r];t&&XA(t,Vu(t).option,e.seriesModel)}function Ete(r){return r&&(r.pathData||r.d)}function d8e(r){return r&&(tt(r,"pathData")||tt(r,"d"))}function p8e(r){r.registerChartView(n8e),r.registerSeriesModel(F6e)}var Th=wr(),fz=wt,Dk=Je,sO=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,i){var a=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new xt,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var h=Bt(hz,t,f);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,t)}pz(s,t,!0),this._renderHandle(a)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),i=e.axis,a=i.type==="category",o=t.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=IB(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,i,a){},r.prototype.createPointerEl=function(e,t,n,i){var a=t.pointer;if(a){var o=Th(e).pointerEl=new Hd[a.type](fz(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,i){if(t.label){var a=Th(e).labelEl=new Er(fz(t.label));e.add(a),dz(a,i)}},r.prototype.updatePointerEl=function(e,t,n){var i=Th(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,i){var a=Th(e).labelEl;a&&(a.setStyle(t.label.style),n(a,{x:t.label.x,y:t.label.y}),dz(a,i))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=t.getModel("handle"),o=t.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=H1(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){$u(u.event)},onmousedown:Dk(this._onHandleDragMove,this,0,0),drift:Dk(this._onHandleDragMove,this),ondragend:Dk(this._onHandleDragEnd,this)}),n.add(i)),pz(i,t,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");Ae(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,zv(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){hz(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Ek(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Ek(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Ek(i)),Th(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Wy(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r}();function hz(r,e,t,n){kte(Th(t).lastProp,n)||(Th(t).lastProp=n,e?Pr(t,n,r):(t.stopAnimation(),t.attr(n)))}function kte(r,e){if(_t(r)&&_t(e)){var t=!0;return B(e,function(n,i){t=t&&kte(r[i],n)}),!!t}else return r===e}function dz(r,e){r[e.get(["label","show"])?"show":"hide"]()}function Ek(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function pz(r,e,t){var n=e.get("z"),i=e.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=t)})}function lO(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function Tte(r,e,t,n,i){var a=t.get("value"),o=Mte(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Ov(s.get("padding")||0),u=s.getFont(),c=P1(o,u),f=i.position,h=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(f[0]-=h),p==="center"&&(f[0]-=h/2);var g=i.verticalAlign;g==="bottom"&&(f[1]-=d),g==="middle"&&(f[1]-=d/2),g8e(f,h,d,n);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:mn(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:v}),z2:10}}function g8e(r,e,t,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+e,i)-e,r[1]=Math.min(r[1]+t,a)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function Mte(r,e,t,n,i){r=e.scale.parse(r);var a=e.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:_B(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};B(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),Ze(o)?a=o.replace("{value}",a):gt(o)&&(a=o(s))}return a}function uO(r,e,t){var n=To();return Gd(n,n,t.rotation),Kl(n,n,t.position),Us([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function Ite(r,e,t,n,i,a){var o=za.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),Tte(e,n,i,a,{position:uO(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function cO(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function Lte(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function gz(r,e,t,n,i,a){return{cx:r,cy:e,r0:t,r:n,startAngle:i,endAngle:a,clockwise:!0}}var v8e=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=vz(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=lO(a),d=m8e[u](s,f,c);d.style=h,t.graphicKey=d.type,t.pointer=d}var p=UI(l.model,i);Ite(n,t,p,i,a,o)},e.prototype.getHandleTransform=function(t,n,i){var a=UI(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=uO(n.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=vz(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[t.x,t.y];f[c]+=n[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var h=(u[1]+u[0])/2,d=[h,h];d[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:d,tooltipOption:p[c]}},e}(sO);function vz(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var m8e={line:function(r,e,t){var n=cO([e,t[0]],[e,t[1]],mz(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:Lte([e-n/2,t[0]],[n,i],mz(r))}}};function mz(r){return r.dim==="x"?0:1}var y8e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(gr),Bu=wr(),b8e=B;function Fte(r,e,t){if(!dr.node){var n=e.getZr();Bu(n).records||(Bu(n).records={}),_8e(n,e);var i=Bu(n).records[r]||(Bu(n).records[r]={});i.handler=t}}function _8e(r,e){if(Bu(r).initialized)return;Bu(r).initialized=!0,t("click",Bt(yz,"click")),t("mousemove",Bt(yz,"mousemove")),t("globalout",S8e);function t(n,i){r.on(n,function(a){var o=C8e(e);b8e(Bu(r).records,function(s){s&&i(s,a,o.dispatchAction)}),w8e(o.pendings,e)})}}function w8e(r,e){var t=r.showTip.length,n=r.hideTip.length,i;t?i=r.showTip[t-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function S8e(r,e,t){r.handler("leave",null,t)}function yz(r,e,t,n){e.handler(r,t,n)}function C8e(r){var e={showTip:[],hideTip:[]},t=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function l3(r,e){if(!dr.node){var t=e.getZr(),n=(Bu(t).records||{})[r];n&&(Bu(t).records[r]=null)}}var A8e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=n.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";Fte("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){l3("axisPointer",n)},e.prototype.dispose=function(t,n){l3("axisPointer",n)},e.type="axisPointer",e}(In);function Bte(r,e){var t=[],n=r.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=xd(a,r);if(o==null||o<0||Ae(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,h=u.dim,d=f==="x"||f==="radius"?1:0,p=a.mapDimension(h),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(g)||[]}else t=l.dataToPoint(a.getValues(De(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),t=[v.x+v.width/2,v.y+v.height/2]}return{point:t,el:s}}var bz=wr();function x8e(r,e,t){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||Je(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Uw(i)&&(i=Bte({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=Uw(i),u=a.axesInfo,c=s.axesInfo,f=n==="leave"||Uw(i),h={},d={},p={list:[],map:{}},g={showPointer:Bt(E8e,d),showTooltip:Bt(k8e,p)};B(s.coordSysMap,function(m,y){var b=l||m.containPoint(i);B(s.coordSysAxesInfo[y],function(_,w){var S=_.axis,C=L8e(u,_);if(!f&&b&&(!u||C)){var A=C&&C.value;A==null&&!l&&(A=S.pointToData(i)),A!=null&&_z(_,A,g,!1,h)}})});var v={};return B(c,function(m,y){var b=m.linkGroup;b&&!d[y]&&B(b.axesInfo,function(_,w){var S=d[w];if(_!==m&&S){var C=S.value;b.mapper&&(C=m.axis.scale.parse(b.mapper(C,wz(_),wz(m)))),v[m.key]=C}})}),B(v,function(m,y){_z(c[y],m,g,!0,h)}),T8e(d,c,h),M8e(p,i,r,o),I8e(c,o,t),h}}function _z(r,e,t,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=D8e(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&be(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function D8e(r,e){var t=e.axis,n=t.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return B(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),f,h;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,r,t);h=d.dataIndices,f=d.nestestValue}else{if(h=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!h.length)return;f=l.getData().get(c[0],h[0])}if(!(f==null||!isFinite(f))){var p=r-f,g=Math.abs(p);g<=o&&((g=0&&s<0)&&(o=g,s=p,i=f,a.length=0),B(h,function(v){a.push({seriesIndex:l.seriesIndex,dataIndexInside:v,dataIndex:l.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:i}}function E8e(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function k8e(r,e,t,n){var i=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=Xy(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function T8e(r,e,t){var n=t.axesInfo=[];B(e,function(i,a){var o=i.axisPointerModel.option,s=r[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function M8e(r,e,t,n){if(Uw(e)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function I8e(r,e,t){var n=t.getZr(),i="axisPointerLastHighlights",a=bz(n)[i]||{},o=bz(n)[i]={};B(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&B(f.seriesDataIndices,function(h){var d=h.seriesIndex+" | "+h.dataIndex;o[d]=h})});var s=[],l=[];B(a,function(u,c){!o[c]&&l.push(u)}),B(o,function(u,c){!a[c]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function L8e(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function wz(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function Uw(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function rb(r){qd.registerAxisPointerClass("CartesianAxisPointer",v8e),r.registerComponentModel(y8e),r.registerComponentView(A8e),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Ae(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=GOe(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},x8e)}function F8e(r){ir(lee),ir(rb)}var B8e=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(n),h=a.get("type");if(h&&h!=="none"){var d=lO(a),p=P8e[h](s,l,f,c);p.style=d,t.graphicKey=p.type,t.pointer=p}var g=a.get(["label","margin"]),v=O8e(n,i,a,l,g);Tte(t,i,a,o,v)},e}(sO);function O8e(r,e,t,n,i){var a=e.axis,o=a.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,f;if(a.dim==="radius"){var h=To();Gd(h,h,s),Kl(h,h,[n.cx,n.cy]),u=Us([o,-i],h);var d=e.getModel("axisLabel").get("rotate")||0,p=za.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,f=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var v=n.cx,m=n.cy;c=Math.abs(u[0]-v)/g<.3?"center":u[0]>v?"left":"right",f=Math.abs(u[1]-m)/g<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var P8e={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:cO(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var i=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:gz(e.cx,e.cy,n[0],n[1],(-t-i/2)*a,(-t+i/2)*a)}:{type:"Sector",shape:gz(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}},R8e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,i=this.ecModel;return i.eachComponent(t,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(gr),fO=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",ri).models[0]},e.type="polarAxis",e}(gr);oi(fO,q1);var N8e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(fO),z8e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(fO),hO=function(r){pe(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e}(el);hO.prototype.dataToRadius=el.prototype.dataToCoord;hO.prototype.radiusToData=el.prototype.coordToData;var V8e=wr(),dO=function(r){pe(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=P1(s==null?"":s+"",n.getFont(),"center","top"),f=Math.max(c.height,7),h=f/u;isNaN(h)&&(h=1/0);var d=Math.max(0,Math.floor(h)),p=V8e(t.model),g=p.lastAutoInterval,v=p.lastTickCount;return g!=null&&v!=null&&Math.abs(g-d)<=1&&Math.abs(v-o)<=1&&g>d?d=g:(p.lastTickCount=o,p.lastAutoInterval=d),d},e}(el);dO.prototype.dataToAngle=el.prototype.dataToCoord;dO.prototype.angleToData=el.prototype.coordToData;var Ote=["radius","angle"],U8e=function(){function r(e){this.dimensions=Ote,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new hO,this._angleAxis=new dO,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,c=us;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,i=Math.cos(n)*t+this.cx,a=-Math.sin(n)*t+this.cy;return[i,a]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,c=l*l+u*u-1e-4,f=this.r,h=this.r0;return c<=f*f&&c>=h*h}}},r.prototype.convertToPixel=function(e,t,n){var i=Sz(t);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=Sz(t);return i===this?this.pointToData(n):null},r}();function Sz(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function G8e(r,e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight();r.cx=$e(n[0],i),r.cy=$e(n[1],a);var o=r.getRadiusAxis(),s=Math.min(i,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:Ae(l)||(l=[0,l]);var u=[$e(l[0],s),$e(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function H8e(r,e){var t=this,n=t.getAngleAxis(),i=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();B(j2(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),B(j2(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),iv(n.scale,n.model),iv(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function W8e(r){return r.mainType==="angleAxis"}function Cz(r,e){var t;if(r.type=e.get("type"),r.scale=WA(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),W8e(e)){r.inverse=r.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:n+(r.inverse?-360:360);r.setExtent(n,i)}e.axis=r,r.model=e}var $8e={dimensions:Ote,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,i){var a=new U8e(i+"");a.update=H8e;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");Cz(o,l),Cz(s,u),G8e(a,n,e),t.push(a),n.coordinateSystem=a,a.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",ri).models[0];n.coordinateSystem=i.coordinateSystem}}),t}},j8e=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function R_(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),i=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function N_(r){var e=r.getRadiusAxis();return e.inverse?0:1}function Az(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var q8e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var i=t.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=De(i.getViewLabels(),function(c){c=wt(c);var f=i.scale,h=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(h),c});Az(u),Az(s),B(j8e,function(c){t.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Y8e[c](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e}(qd),Y8e={axisLine:function(r,e,t,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=N_(t),f=c?0:1,h,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[f]===0?h=new Hd[d]({shape:{cx:t.cx,cy:t.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):h=new z1({shape:{cx:t.cx,cy:t.cy,r:a[c],r0:a[f]},style:o.getLineStyle(),z2:1,silent:!0}),h.style.fill=null,r.add(h)},axisTick:function(r,e,t,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[N_(t)],u=De(n,function(c){return new Ai({shape:R_(t,[l,l+s],c.coord)})});r.add(ts(u,{style:yt(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[N_(t)],c=[],f=0;fm?"left":"right",_=Math.abs(v[1]-y)/g<.3?"middle":v[1]>y?"top":"bottom";if(s&&s[p]){var w=s[p];_t(w)&&w.textStyle&&(d=new Zr(w.textStyle,l,l.ecModel))}var S=new Er({silent:za.isLabelSilent(e),style:mn(d,{x:v[0],y:v[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:b,verticalAlign:_})});if(r.add(S),c){var C=za.makeAxisEventDataBase(e);C.targetType="axisLabel",C.value=f.rawLabel,Dt(S).eventData=C}},this)},splitLine:function(r,e,t,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",L=x;w&&(n[c][M]||(n[c][M]={p:x,n:x}),L=n[c][M][T]);var F=void 0,N=void 0,z=void 0,W=void 0;if(p.dim==="radius"){var H=p.dataToCoord(k)-x,R=l.dataToCoord(M);Math.abs(H)=W})}}})}function t9e(r){var e={};B(r,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=Rte(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),f=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},h=f.stacks;e[l]=f;var d=Pte(n);h[d]||f.autoWidthCount++,h[d]=h[d]||{width:0,maxWidth:0};var p=$e(n.get("barWidth"),c),g=$e(n.get("barMaxWidth"),c),v=n.get("barGap"),m=n.get("barCategoryGap");p&&!h[d].width&&(p=Math.min(f.remainedWidth,p),h[d].width=p,f.remainedWidth-=p),g&&(h[d].maxWidth=g),v!=null&&(f.gap=v),m!=null&&(f.categoryGap=m)});var t={};return B(e,function(n,i){t[i]={};var a=n.stacks,o=n.bandWidth,s=$e(n.categoryGap,o),l=$e(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),B(a,function(g,v){var m=g.maxWidth;m&&m=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),i=[],a=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[a]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-a]=a===0?n.y+n.height/2:n.x+n.width/2,i},r.prototype.convertToPixel=function(e,t,n){var i=xz(t);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=xz(t);return i===this?this.pointToData(n):null},r}();function xz(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function h9e(r,e){var t=[];return r.eachComponent("singleAxis",function(n,i){var a=new f9e(n,r,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,t.push(a)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",ri).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),t}var d9e={create:h9e,dimensions:Nte},Dz=["x","y"],p9e=["width","height"],g9e=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=kk(l,1-oC(s)),c=l.dataToPoint(n)[0],f=a.get("type");if(f&&f!=="none"){var h=lO(a),d=v9e[f](s,c,u);d.style=h,t.graphicKey=d.type,t.pointer=d}var p=u3(i);Ite(n,t,p,i,a,o)},e.prototype.getHandleTransform=function(t,n,i){var a=u3(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=uO(n.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,i,a){var o=i.axis,s=o.coordinateSystem,l=oC(o),u=kk(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=kk(s,1-l),h=(f[1]+f[0])/2,d=[h,h];return d[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(sO),v9e={line:function(r,e,t){var n=cO([e,t[0]],[e,t[1]],oC(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:Lte([e-n/2,t[0]],[n,i],oC(r))}}};function oC(r){return r.isHorizontal()?0:1}function kk(r,e){var t=r.getRect();return[t[Dz[e]],t[Dz[e]]+t[p9e[e]]]}var m9e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(In);function y9e(r){ir(rb),qd.registerAxisPointerClass("SingleAxisPointer",g9e),r.registerComponentView(m9e),r.registerComponentView(l9e),r.registerComponentModel(Gw),ov(r,"single",Gw,Gw.defaultOption),r.registerCoordinateSystem("single",d9e)}var b9e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,i){var a=Pv(t);r.prototype.init.apply(this,arguments),Ez(t,a)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),Ez(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(gr);function Ez(r,e){var t=r.cellSize,n;Ae(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var i=De([0,1],function(a){return zMe(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});xf(r,e,{type:"box",ignoreSize:i})}var _9e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){var a=this.group;a.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,a),this._renderLines(t,s,l,a),this._renderYearText(t,s,l,a),this._renderMonthText(t,u,l,a),this._renderWeekText(t,u,s,l,a)},e.prototype._renderDayRect=function(t,n,i){for(var a=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,f=new _r({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(f)}},e.prototype._renderLines=function(t,n,i,a){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=n.start,h=0;f.time<=n.end.time;h++){p(f.formatedDate),h===0&&(f=s.getDateInfo(n.start.y+"-"+n.start.m));var d=f.date;d.setMonth(d.getMonth()+1),f=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToRect([g],!1).tl);var v=o._getLinePointsOfOneWeek(t,g,i);o._tlpoints.push(v[0]),o._blpoints.push(v[v.length-1]),u&&o._drawSplitline(v,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(t,n,i){var a=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(t,n,i){var a=new qa({z2:20,shape:{points:t},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,n,i){for(var a=t.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return Ze(t)&&t?PMe(t,n):gt(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,i,a){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,h=i==="horizontal"?0:1,d={top:[c,u[h][1]],bottom:[c,u[1-h][1]],left:[u[1-h][0],f],right:[u[h][0],f]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),v={start:n.start.y,end:n.end.y,nameMap:p},m=this._formatterLabel(g,v),y=new Er({z2:30,style:mn(o,{text:m})});y.attr(this._yearTextPositionControl(y,d[l],i,l,s)),a.add(y)}},e.prototype._monthTextPositionControl=function(t,n,i,a,o){var s="left",l="top",u=t[0],c=t[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,i,a){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||Ze(s))&&(s&&(n=vI(s)||n),s=n.get(["time","monthAbbr"])||[]);var h=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=0;g=i.start.time&&n.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var i=Math.floor(t[1].time/Tk)-Math.floor(t[0].time/Tk)+1,a=new Date(t[0].time),o=a.getDate(),s=t[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-t[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+t[0].day+6)/7),f=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:c,nthWeek:f,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&ti.lweek)return null;var a=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(i){var a=new r(i);n.push(a),i.coordinateSystem=a}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=n[i.get("calendarIndex")||0])}),n},r.dimensions=["time","value"],r}();function kz(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}function S9e(r){r.registerComponentModel(b9e),r.registerComponentView(_9e),r.registerCoordinateSystem("calendar",w9e)}function C9e(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function Tz(r,e){var t;return B(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function A9e(r,e,t){var n=be({},t),i=r[e],a=t.$action||"merge";a==="merge"?i?(Ut(i,n,!0),xf(i,n,{ignoreSize:!0}),IX(t,i),z_(t,i),z_(t,i,"shape"),z_(t,i,"style"),z_(t,i,"extra"),t.clipPath=i.clipPath):r[e]=n:a==="replace"?r[e]=n:a==="remove"&&i&&(r[e]=null)}var zte=["transition","enterFrom","leaveTo"],x9e=zte.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function z_(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?zte:x9e,i=0;i=0;c--){var f=i[c],h=hi(f.id,null),d=h!=null?o.get(h):null;if(d){var p=d.parent,m=qo(p),y=p===a?{width:s,height:l}:{width:m.width,height:m.height},b={},_=OA(d,f,y,null,{hv:f.hv,boundingMode:f.bounding},b);if(!qo(d).isNew&&_){for(var w=f.transition,S={},C=0;C=0)?S[A]=x:d[A]=x}Pr(d,S,t,0)}else d.attr(b)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(i){Hw(i,qo(i).option,n,t._lastGraphicModel)}),this._elMap=nt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(In);function c3(r){var e=tt(Mz,r)?Mz[r]:jF(r),t=new e({});return qo(t).type=r,t}function Iz(r,e,t,n){var i=c3(t);return e.add(i),n.set(r,i),qo(i).id=r,qo(i).isNew=!0,i}function Hw(r,e,t,n){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(a){Hw(a,e,t,n)}),XA(r,e,n),t.removeKey(qo(r).id))}function Lz(r,e,t,n){r.isGroup||B([["cursor",ds.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(i){var a=i[0];tt(e,a)?r[a]=Lt(e[a],i[1]):r[a]==null&&(r[a]=i[1])}),B(vr(e),function(i){if(i.indexOf("on")===0){var a=e[i];r[i]=gt(a)?a:null}}),tt(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function T9e(r){return r=be({},r),B(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(MX),function(e){delete r[e]}),r}function M9e(r,e,t){var n=Dt(r).eventData;!r.silent&&!r.ignore&&!n&&(n=Dt(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function I9e(r){r.registerComponentModel(E9e),r.registerComponentView(k9e),r.registerPreprocessor(function(e){var t=e.graphic;Ae(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Fz=["x","y","radius","angle","single"],L9e=["cartesian2d","polar","singleAxis"];function F9e(r){var e=r.get("coordinateSystem");return Qt(L9e,e)>=0}function Jc(r){return r+"Axis"}function B9e(r,e){var t=nt(),n=[],i=nt();r.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(h,d){var p=t.get(h);p&&p[d]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,h){(t.get(f)||t.set(f,[]))[h]=!0})}return n}function Vte(r){var e=r.ecModel,t={infoList:[],infoMap:nt()};return r.eachTargetAxis(function(n,i){var a=e.getComponent(Jc(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(a)}}}),t}var Mk=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),n1=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,i){var a=Bz(t);this.settledOption=a,this.mergeDefaultAndTheme(t,i),this._doInit(a)},e.prototype.mergeOption=function(t){var n=Bz(t);Ut(this.option,t,!0),Ut(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;B([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=nt(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return B(Fz,function(i){var a=this.getReferringComponents(Jc(i),xke);if(a.specified){n=!0;var o=new Mk;B(a.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var f=u[0];if(f){var h=new Mk;if(h.add(f.componentIndex),t.set(c,h),a=!1,c==="x"||c==="y"){var d=f.getReferringComponents("grid",ri).models[0];d&&B(u,function(p){f.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",ri).models[0]&&h.add(p.componentIndex)})}}}a&&B(Fz,function(u){if(a){var c=i.findComponents({mainType:Jc(u),filter:function(h){return h.get("type",!0)==="category"}});if(c[0]){var f=new Mk;f.add(c[0].componentIndex),t.set(u,f),a=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,i=this.get("rangeMode");B([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,i){t==null&&(t=this.ecModel.getComponent(Jc(n),i))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(i,a){B(i.indexList,function(o){t.call(n,a,o)})})},e.prototype.getAxisProxy=function(t,n){var i=this.getAxisModel(t,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[n])return this.ecModel.getComponent(Jc(t),n)},e.prototype.setRawRange=function(t){var n=this.option,i=this.settledOption;B([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(n[a[0]]=i[a[0]]=t[a[0]],n[a[1]]=i[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;B(["start","startValue","end","endValue"],function(i){n[i]=t[i]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;ao[1];if(b&&!_&&!w)return!0;b&&(v=!0),_&&(p=!0),w&&(g=!0)}return v&&p&&g})}else zp(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});zp(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;zp(["min","max"],function(i){var a=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Kr(n[0]+o,n,[0,100],!0):a!=null&&(o=Kr(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=bK(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),t[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r}();function N9e(r,e,t){var n=[1/0,-1/0];zp(t,function(o){mFe(n,o.getData(),e)});var i=r.getAxisModel(),a=iJ(i.axis.scale,i,n).calculate();return[a.min,a.max]}var z9e={getTargetSeries:function(r){function e(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Jc(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new R9e(i,a,s,r),t.push(o.__dzAxisProxy))});var n=nt();return B(t,function(i){B(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function V9e(r){r.registerAction("dataZoom",function(e,t){var n=B9e(t,e);B(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var Pz=!1;function gO(r){Pz||(Pz=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,z9e),V9e(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function U9e(r){r.registerComponentModel(O9e),r.registerComponentView(P9e),gO(r)}var Jo=function(){function r(){}return r}(),Ute={};function Vp(r,e){Ute[r]=e}function Gte(r){return Ute[r]}var G9e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;B(this.option.feature,function(n,i){var a=Gte(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),Ut(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(gr);function H9e(r,e,t){var n=e.getBoxLayoutParams(),i=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},o=di(n,a,i);cd(e.get("orient"),r,e.get("itemGap"),o.width,o.height),OA(r,n,a,i)}function Hte(r,e){var t=Ov(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),r=new _r({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var W9e=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i,a){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},c=this._features||(this._features={}),f=[];B(u,function(p,g){f.push(g)}),new Zu(this._featureNames||[],f).add(h).update(h).remove(Bt(h,null)).execute(),this._featureNames=f;function h(p,g){var v=f[p],m=f[g],y=u[v],b=new Zr(y,t,t.ecModel),_;if(a&&a.newTitle!=null&&a.featureName===v&&(y.title=a.newTitle),v&&!m){if($9e(v))_={onclick:b.option.onclick,featureName:v};else{var w=Gte(v);if(!w)return;_=new w}c[v]=_}else if(_=c[m],!_)return;_.uid=Bv("toolbox-feature"),_.model=b,_.ecModel=n,_.api=i;var S=_ instanceof Jo;if(!v&&m){S&&_.dispose&&_.dispose(n,i);return}if(!b.get("show")||S&&_.unusable){S&&_.remove&&_.remove(n,i);return}d(b,_,v),b.setIconStatus=function(C,A){var x=this.option,D=this.iconPaths;x.iconStatus=x.iconStatus||{},x.iconStatus[C]=A,D[C]&&(A==="emphasis"?qu:Yu)(D[C])},_ instanceof Jo&&_.render&&_.render(b,n,i,a)}function d(p,g,v){var m=p.getModel("iconStyle"),y=p.getModel(["emphasis","iconStyle"]),b=g instanceof Jo&&g.getIcons?g.getIcons():p.get("icon"),_=p.get("title")||{},w,S;Ze(b)?(w={},w[v]=b):w=b,Ze(_)?(S={},S[v]=_):S=_;var C=p.iconPaths={};B(w,function(A,x){var D=H1(A,{},{x:-s/2,y:-s/2,width:s,height:s});D.setStyle(m.getItemStyle());var E=D.ensureState("emphasis");E.style=y.getItemStyle();var k=new Er({style:{text:S[x],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:qF({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},n)},ignore:!0});D.setTextContent(k),Lv({el:D,componentModel:t,itemName:x,formatterParamsExtra:{title:S[x]}}),D.__title=S[x],D.on("mouseover",function(){var M=y.getItemStyle(),T=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";k.setStyle({fill:y.get("textFill")||M.fill||M.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),D.setTextConfig({position:y.get("textPosition")||T}),k.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",x])!=="emphasis"&&i.leaveEmphasis(this),k.hide()}),(p.get(["iconStatus",x])==="emphasis"?qu:Yu)(D),o.add(D),D.on("click",Je(g.onclick,g,n,i,x)),C[x]=D})}H9e(o,t,i),o.add(Hte(o.getBoundingRect(),t)),l||o.eachChild(function(p){var g=p.__title,v=p.ensureState("emphasis"),m=v.textConfig||(v.textConfig={}),y=p.getTextContent(),b=y&&y.ensureState("emphasis");if(b&&!gt(b)&&g){var _=b.style||(b.style={}),w=P1(g,Er.makeFont(_)),S=p.x+o.x,C=p.y+o.y+s,A=!1;C+w.height>i.getHeight()&&(m.position="top",A=!0);var x=A?-5-w.height:s+10;S+w.width/2>i.getWidth()?(m.position=["100%",x],_.align="right"):S-w.width/2<0&&(m.position=[0,x],_.align="left")}})},e.prototype.updateView=function(t,n,i,a){B(this._features,function(o){o instanceof Jo&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(t,n){B(this._features,function(i){i instanceof Jo&&i.remove&&i.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){B(this._features,function(i){i instanceof Jo&&i.dispose&&i.dispose(t,n)})},e.type="toolbox",e}(In);function $9e(r){return r.indexOf("my")===0}var j9e=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var i=this.model,a=i.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=dr.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),d=h[0].indexOf("base64")>-1,p=o?decodeURIComponent(h[1]):h[1];d&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var v=p.length,m=new Uint8Array(v);v--;)m[v]=p.charCodeAt(v);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,g)}else{var b=document.createElement("iframe");document.body.appendChild(b);var _=b.contentWindow,w=_.document;w.open("image/svg+xml","replace"),w.write(p),w.close(),_.focus(),w.execCommand("SaveAs",!0,g),document.body.removeChild(b)}}else{var S=i.get("lang"),C='',A=window.open();A.document.write(C),A.document.title=a}},e.getDefaultOption=function(t){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(Jo),Rz="__ec_magicType_stack__",q9e=[["line","bar"],["stack"]],Y9e=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),i={};return B(t.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},e.getDefaultOption=function(t){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,i){var a=this.model,o=a.get(["seriesIndex",i]);if(Nz[i]){var s={series:[]},l=function(f){var h=f.subType,d=f.id,p=Nz[i](h,d,f,a);p&&(yt(p,f.option),s.series.push(p));var g=f.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var v=g.getAxesByScale("ordinal")[0];if(v){var m=v.dim,y=m+"Axis",b=f.getReferringComponents(y,ri).models[0],_=b.componentIndex;s[y]=s[y]||[];for(var w=0;w<=_;w++)s[y][_]=s[y][_]||{};s[y][_].boundaryGap=i==="bar"}}};B(q9e,function(f){Qt(f,i)>=0&&B(f,function(h){a.setIconStatus(h,"normal")})}),a.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=Ut({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Jo),Nz={line:function(r,e,t,n){if(r==="bar")return Ut({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return Ut({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var i=t.get("stack")===Rz;if(r==="line"||r==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),Ut({id:e,stack:i?"":Rz},n.get(["option","stack"])||{},!0)}};au({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var QA=new Array(60).join("-"),uv=" ";function Z9e(r){var e={},t=[],n=[];return r.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function K9e(r){var e=[];return B(r,function(t,n){var i=t.categoryAxis,a=t.valueAxis,o=a.dim,s=[" "].concat(De(t.series,function(d){return d.name})),l=[i.model.getCategories()];B(t.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(uv)],c=0;c=0)return!0}var f3=new RegExp("["+uv+"]+","g");function e7e(r){for(var e=r.split(/\n+/g),t=sC(e.shift()).split(f3),n=[],i=De(t,function(l){return{name:l,data:[]}}),a=0;a=0;a--){var o=t[a];if(o[i])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function o7e(r){var e=vO(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return Wte(t,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function s7e(r){$te(r).snapshots=null}function l7e(r){return vO(r).length}function vO(r){var e=$te(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var u7e=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){s7e(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e}(Jo);au({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var c7e=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],mO=function(){function r(e,t,n){var i=this;this._targetInfoList=[];var a=zz(t,e);B(f7e,function(o,s){(!n||!n.include||Qt(n.include,s)>=0)&&o(a,i._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=Ik[n.brushType](0,a,i);n.__rangeOffset={offset:Hz[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){B(e,function(i){var a=this.findTargetInfo(i,t);a&&a!==!0&&B(a.coordSyses,function(o){var s=Ik[i.brushType](1,o,i.range,!0);n(i,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){B(e,function(n){var i=this.findTargetInfo(n,t);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=Ik[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?Hz[n.brushType](a.values,o.offset,h7e(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(e,t){return De(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:Jee(i),isTargetByCursor:tte(i,e,n.coordSysModel),getLinearBrushOtherExtent:ete(i)}})},r.prototype.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return i===!0||i&&Qt(i.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=zz(t,e),a=0;ar[1]&&r.reverse(),r}function zz(r,e){return k0(r,e,{includeMainTypes:c7e})}var f7e={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,i=r.gridModels,a=nt(),o={},s={};!t&&!n&&!i||(B(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),B(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),B(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];B(u.getCartesians(),function(f,h){(Qt(t,f.getAxis("x").model)>=0||Qt(n,f.getAxis("y").model)>=0)&&c.push(f)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:Uz.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){B(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:Uz.geo})})}},Vz=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,i=r.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],Uz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(ud(r)),e}},Ik={lineX:Bt(Gz,0),lineY:Bt(Gz,1),rect:function(r,e,t,n){var i=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),a=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[h3([i[0],a[0]]),h3([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=De(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function Gz(r,e,t,n){var i=t.getAxis(["x","y"][r]),a=h3(De([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var Hz={lineX:Bt(Wz,0),lineY:Bt(Wz,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return De(r,function(n,i){return[n[0]-t[0]*e[i][0],n[1]-t[1]*e[i][1]]})}};function Wz(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function h7e(r,e){var t=$z(r),n=$z(e),i=[t[0]/n[0],t[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function $z(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var d3=B,d7e=_ke("toolbox-dataZoom_"),p7e=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i,a){this._brushController||(this._brushController=new jB(i.getZr()),this._brushController.on("brush",Je(this._onBrush,this)).mount()),m7e(t,n,this,a,i),v7e(t,n)},e.prototype.onclick=function(t,n,i){g7e[i].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new mO(yO(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,f){if(f.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[h],f,c)}}),a7e(a,i),this._dispatchZoomAction(i);function s(u,c,f){var h=c.getAxis(u),d=h.model,p=l(u,d,a),g=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(f=Yd(0,f.slice(),h.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var h;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(h=d)}),h}},e.prototype._dispatchZoomAction=function(t){var n=[];d3(t,function(i,a){n.push(wt(i))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},e}(Jo),g7e={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(o7e(this.ecModel))}};function yO(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function v7e(r,e){r.setIconStatus("back",l7e(e)>1?"emphasis":"normal")}function m7e(r,e,t,n,i){var a=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new mO(yO(r),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}$Me("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),i=[],a=yO(n),o=k0(r,a);d3(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),d3(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:d7e+u+f};h[c]=f,i.push(h)}return i});function y7e(r){r.registerComponentModel(G9e),r.registerComponentView(W9e),Vp("saveAsImage",j9e),Vp("magicType",Y9e),Vp("dataView",n7e),Vp("dataZoom",p7e),Vp("restore",u7e),ir(U9e)}var b7e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(gr);function jte(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function qte(r){if(dr.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+i,h=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),d=Math.round(((h-Math.SQRT2*i)/2+Math.SQRT2*i-(h-f)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function D7e(r,e){var t="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+t,i="opacity"+n+",visibility"+n;return e||(n=" "+r+"s "+t,i+=dr.transformSupported?","+bO+n:",left"+n+",top"+n),S7e+":"+i}function jz(r,e,t){var n=r.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!dr.transformSupported)return t?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=dr.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return t?"top:0;left:0;"+bO+":"+o+";":[["top",0],["left",0],[Yte,o]]}function E7e(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var i=r.get("textShadowColor"),a=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return i&&a&&e.push("text-shadow:"+o+"px "+s+"px "+a+"px "+i),B(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function k7e(r,e,t){var n=[],i=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),f=lQ(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),e&&i&&n.push(D7e(i,t)),a&&n.push("background-color:"+a),B(["width","color","radius"],function(d){var p="border-"+d,g=kX(p),v=r.get(g);v!=null&&n.push(p+":"+v+(d==="color"?"":"px"))}),n.push(E7e(c)),f!=null&&n.push("padding:"+Ov(f).join("px ")+"px"),n.join(";")+";"}function qz(r,e,t,n,i){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&QDe(r,o,t,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var T7e=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,dr.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=t.appendTo,o=a&&(Ze(a)?document.querySelector(a):Jg(a)?a:gt(a)&&a(e.getDom()));qz(this._styleCoord,i,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,c=i.painter.getViewportRoot();Uo(c,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=w7e(t,"position"),i=t.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=C7e+k7e(e,!this._firstShow,this._longHide)+jz(a[0],a[1],!0)+("border-color:"+kd(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(Ze(a)&&n.get("trigger")==="item"&&!jte(n)&&(s=x7e(n,i,a)),Ze(e))o.innerHTML=e+s;else if(e){o.innerHTML="",Ae(e)||(e=[e]);for(var l=0;l=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,i=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,i,a){if(!(a.from===this.uid||dr.node||!i.getDom())){var o=Kz(a,i);this._ticket="";var s=a.dataByCoordSys,l=P7e(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=I7e;c.x=a.x,c.y=a.y,c.update(),Dt(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,i,a))return;var f=Bte(a,n),h=f.point[0],d=f.point[1];h!=null&&d!=null&&this._tryShow({offsetX:h,offsetY:d,target:f.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Kz(a,i))},e.prototype._manuallyAxisShowTip=function(t,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),f=Bm([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,n){var i=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=Dt(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Uh(i,function(c){if(Dt(c).dataIndex!=null)return l=c,!0;if(Dt(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var i=t.get("showDelay");n=Je(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(t,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=Bm([n.tooltipOption],a),l=this._renderMode,u=[],c=Mi("section",{blocks:[],noHeader:!0}),f=[],h=new gE;B(t,function(y){B(y.dataByAxis,function(b){var _=i.getComponent(b.axisDim+"Axis",b.axisIndex),w=b.value;if(!(!_||w==null)){var S=Mte(w,_.axis,i,b.seriesDataIndices,b.valueLabelOpt),C=Mi("section",{header:S,noHeader:!Ps(S),sortBlocks:!0,blocks:[]});c.blocks.push(C),B(b.seriesDataIndices,function(A){var x=i.getSeriesByIndex(A.seriesIndex),D=A.dataIndexInside,E=x.getDataParams(D);if(!(E.dataIndex<0)){E.axisDim=b.axisDim,E.axisIndex=b.axisIndex,E.axisType=b.axisType,E.axisId=b.axisId,E.axisValue=_B(_.axis,{value:w}),E.axisValueLabel=S,E.marker=h.makeTooltipMarker("item",kd(E.color),l);var k=R6(x.formatTooltip(D,!0,null)),M=k.frag;if(M){var T=Bm([x],a).get("valueFormatter");C.blocks.push(T?be({valueFormatter:T},M):M)}k.text&&f.push(k.text),u.push(E)}})}})}),c.blocks.reverse(),f.reverse();var d=n.position,p=s.get("order"),g=H6(c,h,l,p,i.get("useUTC"),s.get("textStyle"));g&&f.unshift(g);var v=l==="richText"?` + +`:"
",m=f.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],d,null,h)})},e.prototype._showSeriesItemTooltip=function(t,n,i){var a=this._ecModel,o=Dt(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,h=u.getData(f),d=this._renderMode,p=t.positionDefault,g=Bm([h.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),v=g.get("trigger");if(!(v!=null&&v!=="item")){var m=u.getDataParams(c,f),y=new gE;m.marker=y.makeTooltipMarker("item",kd(m.color),d);var b=R6(u.formatTooltip(c,!1,f)),_=g.get("order"),w=g.get("valueFormatter"),S=b.frag,C=S?H6(w?be({valueFormatter:w},S):S,y,d,_,a.get("useUTC"),g.get("textStyle")):b.text,A="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,C,m,A,t.offsetX,t.offsetY,t.position,t.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:h.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,i){var a=this._renderMode==="html",o=Dt(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Ze(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=wt(l),l.content=to(l.content));var f=[l],h=this._ecModel.getComponent(o.componentMainType,o.componentIndex);h&&f.push(h),f.push({formatter:l.content});var d=t.positionDefault,p=Bm(f,this._tooltipModel,d?{position:d}:null),g=p.get("content"),v=Math.random()+"",m=new gE;this._showOrMove(p,function(){var y=wt(p.get("formatterParams")||{});this._showTooltipContent(p,g,y,v,t.offsetX,t.offsetY,t.position,n,m)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,i,a,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var h=t.get("formatter");l=l||t.get("position");var d=n,p=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor")),g=p.color;if(h)if(Ze(h)){var v=t.ecModel.get("useUTC"),m=Ae(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=h,y&&(d=MA(m.axisValue,d,v)),d=TX(d,i,!0)}else if(gt(h)){var b=Je(function(_,w){_===this._ticket&&(f.setContent(w,c,t,g,l),this._updatePosition(t,l,o,s,f,i,u))},this);this._ticket=a,d=h(i,a,b)}else d=h;f.setContent(d,c,t,g,l),f.show(t,g),this._updatePosition(t,l,o,s,f,i,u)}},e.prototype._getNearestPoint=function(t,n,i,a){if(i==="axis"||Ae(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!Ae(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var f=o.getSize(),h=t.get("align"),d=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),gt(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),Ae(n))i=$e(n[0],u),a=$e(n[1],c);else if(_t(n)){var g=n;g.width=f[0],g.height=f[1];var v=di(g,{width:u,height:c});i=v.x,a=v.y,h=null,d=null}else if(Ze(n)&&l){var m=O7e(n,p,f,t.get("borderWidth"));i=m[0],a=m[1]}else{var m=F7e(i,a,o,u,c,h?null:20,d?null:20);i=m[0],a=m[1]}if(h&&(i-=Xz(h)?f[0]/2:h==="right"?f[0]:0),d&&(a-=Xz(d)?f[1]/2:d==="bottom"?f[1]:0),jte(t)){var m=B7e(i,a,o,u,c);i=m[0],a=m[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===t.length;return o&&B(i,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&B(u,function(h,d){var p=f[d]||{},g=h.seriesDataIndices||[],v=p.seriesDataIndices||[];o=o&&h.value===p.value&&h.axisType===p.axisType&&h.axisId===p.axisId&&g.length===v.length,o&&B(g,function(m,y){var b=v[y];o=o&&m.seriesIndex===b.seriesIndex&&m.dataIndex===b.dataIndex}),a&&B(h.seriesDataIndices,function(m){var y=m.seriesIndex,b=n[y],_=a[y];b&&_&&_.data!==b.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){dr.node||!n.getDom()||(Wy(this,"_updatePosition"),this._tooltipContent.dispose(),l3("itemTooltip",n))},e.type="tooltip",e}(In);function Bm(r,e,t){var n=e.ecModel,i;t?(i=new Zr(t,n,n),i=new Zr(e.option,i,n)):i=e;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Zr&&(o=o.get("tooltip",!0)),Ze(o)&&(o={formatter:o}),o&&(i=new Zr(o,i,n)))}return i}function Kz(r,e){return r.dispatchAction||Je(e.dispatchAction,e)}function F7e(r,e,t,n,i,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[r,e]}function B7e(r,e,t,n,i){var a=t.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,i)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function O7e(r,e,t,n){var i=t[0],a=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function Xz(r){return r==="center"||r==="middle"}function P7e(r,e,t){var n=BF(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=R1(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=Dt(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function R7e(r){ir(rb),r.registerComponentModel(b7e),r.registerComponentView(L7e),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Kn),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Kn)}var N7e=["rect","polygon","keep","clear"];function z7e(r,e){var t=rn(r?r.brush:[]);if(t.length){var n=[];B(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=r&&r.toolbox;Ae(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),V7e(s),e&&!s.length&&s.push.apply(s,N7e)}}function V7e(r){var e={};B(r,function(t){e[t]=1}),r.length=0,B(e,function(t,n){r.push(n)})}var Qz=B;function Jz(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function p3(r,e,t){var n={};return Qz(e,function(a){var o=n[a]=i();Qz(r[a],function(s,l){if(Ei.isValidType(l)){var u={type:l,visual:s};t&&t(u,a),o[l]=new Ei(u),l==="opacity"&&(u=wt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Ei(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function Kte(r,e,t){var n;B(t,function(i){e.hasOwnProperty(i)&&Jz(e[i])&&(n=!0)}),n&&B(t,function(i){e.hasOwnProperty(i)&&Jz(e[i])?r[i]=wt(e[i]):delete r[i]})}function U7e(r,e,t,n,i,a){var o={};B(r,function(f){var h=Ei.prepareVisualTypes(e[f]);o[f]=h});var s;function l(f){return uB(t,s,f)}function u(f,h){yQ(t,s,f,h)}t.each(c);function c(f,h){s=f;var d=t.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,f),g=e[p],v=o[p],m=0,y=v.length;me[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&iV(e)}};function iV(r){return new Gt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Z7e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new jB(n.getZr())).on("brush",Je(this._onBrush,this)).mount()},e.prototype.render=function(t,n,i,a){this.model=t,this._updateController(t,n,i,a)},e.prototype.updateTransform=function(t,n,i,a){Xte(n),this._updateController(t,n,i,a)},e.prototype.updateVisual=function(t,n,i,a){this.updateTransform(t,n,i,a)},e.prototype.updateView=function(t,n,i,a){this._updateController(t,n,i,a)},e.prototype._updateController=function(t,n,i,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:wt(i),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:wt(i),$from:n})},e.type="brush",e}(In),K7e="#ddd",X7e=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var i=this.option;!n&&Kte(i,t,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:K7e},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=De(t,function(n){return aV(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=aV(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(gr);function aV(r,e){return Ut({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Zr(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var Q7e=["rect","polygon","lineX","lineY","keep","clear"],J7e=function(r){pe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,B(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,i){this.render(t,n,i)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),i={};return B(t.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(t,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:Q7e.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e}(Jo);function eze(r){r.registerComponentView(Z7e),r.registerComponentModel(X7e),r.registerPreprocessor(z7e),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,W7e),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Kn),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Kn),Vp("brush",J7e)}var tze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(gr),rze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,i){if(this.group.removeAll(),!!t.get("show")){var a=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=Lt(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Er({style:mn(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),h=t.get("subtext"),d=new Er({style:mn(s,{text:h,fill:s.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),g=t.get("sublink"),v=t.get("triggerEvent",!0);c.silent=!p&&!v,d.silent=!g&&!v,p&&c.on("click",function(){R2(p,"_"+t.get("target"))}),g&&d.on("click",function(){R2(g,"_"+t.get("subtarget"))}),Dt(c).eventData=Dt(d).eventData=v?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(c),h&&a.add(d);var m=a.getBoundingRect(),y=t.getBoxLayoutParams();y.width=m.width,y.height=m.height;var b=di(y,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?b.x+=b.width:l==="center"&&(b.x+=b.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?b.y+=b.height:u==="middle"&&(b.y+=b.height/2),u=u||"top"),a.x=b.x,a.y=b.y,a.markRedraw();var _={align:l,verticalAlign:u};c.setStyle(_),d.setStyle(_),m=a.getBoundingRect();var w=b.margin,S=t.getItemStyle(["color","opacity"]);S.fill=t.get("backgroundColor");var C=new _r({shape:{x:m.x-w[3],y:m.y-w[0],width:m.width+w[1]+w[3],height:m.height+w[0]+w[2],r:t.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(C)}},e.type="title",e}(In);function nze(r){r.registerComponentModel(tze),r.registerComponentView(rze)}var oV=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],i=t.axisType,a=this._names=[],o;i==="category"?(o=[],B(n,function(u,c){var f=hi(Tv(u),""),h;_t(u)?(h=wt(u),h.value=c):h=c,o.push(h),a.push(f)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new Na([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(gr),Qte=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Rf(oV.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(oV);oi(Qte,RA.prototype);var ize=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(In),aze=function(r){pe(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(el),Fk=Math.PI,sV=wr(),oze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,i){if(this.model=t,this.api=i,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Mi("nameValue",{noName:!0,value:c})},B(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,t)},this),this._renderAxisLabel(a,s,l,t),this._position(a,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var i=t.get(["label","position"]),a=t.get("orient"),o=lze(t,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Fk/2},f=a==="vertical"?o.height:o.width,h=t.getModel("controlStyle"),d=h.get("show",!0),p=d?h.get("itemSize"):0,g=d?h.get("itemGap"):0,v=p+g,m=t.get(["label","rotate"])||0;m=m*Fk/180;var y,b,_,w=h.get("position",!0),S=d&&h.get("showPlayBtn",!0),C=d&&h.get("showPrevBtn",!0),A=d&&h.get("showNextBtn",!0),x=0,D=f;w==="left"||w==="bottom"?(S&&(y=[0,0],x+=v),C&&(b=[x,0],x+=v),A&&(_=[D-p,0],D-=v)):(S&&(y=[D-p,0],D-=v),C&&(b=[0,0],x+=v),A&&(_=[D-p,0],D-=v));var E=[x,D];return t.get("inverse")&&E.reverse(),{viewRect:o,mainLength:f,orient:a,rotation:c[a],labelRotation:m,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:b,nextBtnPosition:_,axisExtent:E,controlSize:p,controlGap:g}},e.prototype._position=function(t,n){var i=this._mainGroup,a=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=To(),l=o.x,u=o.y+o.height;Kl(s,s,[-l,-u]),Gd(s,s,-Fk/2),Kl(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),f=y(i.getBoundingRect()),h=y(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var g=t.labelPosOpt;if(g==null||Ze(g)){var v=g==="+"?0:1;b(d,f,c,1,v),b(p,h,c,1,1-v)}else{var v=g>=0?0:1;b(d,f,c,1,v),p[1]=d[1]+g}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=t.rotation,m(i),m(a);function m(_){_.originX=c[0][0]-_.x,_.originY=c[1][0]-_.y}function y(_){return[[_.x,_.x+_.width],[_.y,_.y+_.height]]}function b(_,w,S,C,A){_[C]+=S[C][A]-w[C][A]}},e.prototype._createAxis=function(t,n){var i=n.getData(),a=n.get("axisType"),o=sze(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new aze("value",o,t.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new xt;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Ai({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:be({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Ai({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:yt({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],B(l,function(u){var c=i.dataToCoord(u.value),f=s.getItemModel(u.value),h=f.getModel("itemStyle"),d=f.getModel(["emphasis","itemStyle"]),p=f.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:Je(o._changeTimeline,o,u.value)},v=lV(f,h,n,g);v.ensureState("emphasis").style=d.getItemStyle(),v.ensureState("progress").style=p.getItemStyle(),ld(v);var m=Dt(v);f.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,o._tickSymbols.push(v)})},e.prototype._renderAxisLabel=function(t,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],B(u,function(c){var f=c.tickValue,h=l.getItemModel(f),d=h.getModel("label"),p=h.getModel(["emphasis","label"]),g=h.getModel(["progress","label"]),v=i.dataToCoord(c.tickValue),m=new Er({x:v,y:0,rotation:t.labelRotation-t.rotation,onclick:Je(o._changeTimeline,o,f),silent:!1,style:mn(d,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});m.ensureState("emphasis").style=mn(p),m.ensureState("progress").style=mn(g),n.add(m),ld(m),sV(m).dataIndex=f,o._tickLabels.push(m)})}},e.prototype._renderControl=function(t,n,i,a){var o=t.controlSize,s=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),f=a.get("inverse",!0);h(t.nextBtnPosition,"next",Je(this._changeTimeline,this,f?"-":"+")),h(t.prevBtnPosition,"prev",Je(this._changeTimeline,this,f?"+":"-")),h(t.playPosition,c?"stop":"play",Je(this._handlePlayClick,this,!c),!0);function h(d,p,g,v){if(d){var m=Ys(Lt(a.get(["controlStyle",p+"BtnSize"]),o),o),y=[0,-m/2,m,m],b=uze(a,p+"Icon",y,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:v?-s:0,rectHover:!0,style:l,onclick:g});b.ensureState("emphasis").style=u,n.add(b),ld(b)}}},e.prototype._renderCurrentPointer=function(t,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=Je(u._handlePointerDrag,u),f.ondragend=Je(u._handlePointerDragend,u),uV(f,u._progressLine,s,i,a,!0)},onUpdate:function(f){uV(f,u._progressLine,s,i,a)}};this._currentPointer=lV(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var i=this._toAxisCoord(t)[0],a=this._axis,o=as(a.getExtent().slice());i>o[1]&&(i=o[1]),i=0&&(o[a]=+o[a].toFixed(h)),[o,f]}var Bk={min:Bt(G_,"min"),max:Bt(G_,"max"),average:Bt(G_,"average"),median:Bt(G_,"median")};function i1(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,i=n&&n.dimensions;if(!gze(e)&&!Ae(e.coord)&&Ae(i)){var a=Jte(e,t,n,r);if(e=wt(e),e.type&&Bk[e.type]&&a.baseAxis&&a.valueAxis){var o=Qt(i,a.baseAxis.dim),s=Qt(i,a.valueAxis.dim),l=Bk[e.type](t,a.baseDataDim,a.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!Ae(i))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)Bk[u[c]]&&(u[c]=wO(t,t.mapDimension(i[c]),u[c]));return e}}function Jte(r,e,t,n){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,i.valueAxis=t.getAxis(vze(n,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function vze(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function a1(r,e){return r&&r.containData&&e.coord&&!v3(e)?r.containData(e.coord):!0}function mze(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!v3(e)&&!v3(t)?r.containZone(e.coord,t.coord):!0}function ere(r,e){return r?function(t,n,i,a){var o=a<2?t.coord&&t.coord[a]:t.value;return af(o,e[a])}:function(t,n,i,a){return af(t.value,e[a])}}function wO(r,e,t){if(t==="average"){var n=0,i=0;return r.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var Ok=wr(),SO=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=nt()},e.prototype.render=function(t,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){Ok(s).keep=!1}),n.eachSeries(function(s){var l=Qu.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!Ok(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(t){Ok(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var i=this;B(t,function(a){var o=Qu.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?jK(l):UF(l))})}})},e.type="marker",e}(In);function fV(r,e,t){var n=e.coordinateSystem;r.each(function(i){var a=r.getItemModel(i),o,s=$e(a.get("x"),t.getWidth()),l=$e(a.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,i));else if(n){var u=r.get(n.dimensions[0],i),c=r.get(n.dimensions[1],i);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(i,o)})}var yze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,i){n.eachSeries(function(a){var o=Qu.getMarkerModelFromSeries(a,"markPoint");o&&(fV(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Z1),f=bze(o,t,n);n.setData(f),fV(n.getData(),t,a),f.each(function(h){var d=f.getItemModel(h),p=d.getShallow("symbol"),g=d.getShallow("symbolSize"),v=d.getShallow("symbolRotate"),m=d.getShallow("symbolOffset"),y=d.getShallow("symbolKeepAspect");if(gt(p)||gt(g)||gt(v)||gt(m)){var b=n.getRawValue(h),_=n.getDataParams(h);gt(p)&&(p=p(b,_)),gt(g)&&(g=g(b,_)),gt(v)&&(v=v(b,_)),gt(m)&&(m=m(b,_))}var w=d.getModel("itemStyle").getItemStyle(),S=$1(l,"color");w.fill||(w.fill=S),f.setItemVisual(h,{symbol:p,symbolSize:g,symbolRotate:v,symbolOffset:m,symbolKeepAspect:y,style:w})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(h){h.traverse(function(d){Dt(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e}(SO);function bze(r,e,t){var n;r?n=De(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return be(be({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Na(n,t),a=De(t.get("data"),Bt(i1,e));r&&(a=Jr(a,Bt(a1,r)));var o=ere(!!r,n);return i.initData(a,null,o),i}function _ze(r){r.registerComponentModel(pze),r.registerComponentView(yze),r.registerPreprocessor(function(e){_O(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var wze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Qu),H_=wr(),Sze=function(r,e,t,n){var i=r.getData(),a;if(Ae(n))a=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=Ni(n.yAxis,n.xAxis);else{var u=Jte(n,i,e,r);s=u.valueAxis;var c=qQ(i,u.valueDataDim);l=wO(i,c,o)}var f=s.dim==="x"?0:1,h=1-f,d=wt(n),p={coord:[]};d.type=null,d.coord=[],d.coord[h]=-1/0,p.coord[h]=1/0;var g=t.get("precision");g>=0&&Or(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[f]=p.coord[f]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var v=[i1(r,a[0]),i1(r,a[1]),be({},a[2])];return v[2].type=v[2].type||null,Ut(v[2],v[0]),Ut(v[2],v[1]),v};function lC(r){return!isNaN(r)&&!isFinite(r)}function hV(r,e,t,n){var i=1-r,a=n.dimensions[r];return lC(e[i])&&lC(t[i])&&e[r]===t[r]&&n.getAxis(a).containData(e[r])}function Cze(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(hV(1,t,n,r)||hV(0,t,n,r)))return!0}return a1(r,e[0])&&a1(r,e[1])}function Pk(r,e,t,n,i){var a=n.coordinateSystem,o=r.getItemModel(e),s,l=$e(o.get("x"),i.getWidth()),u=$e(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=a.dimensions,f=r.get(c[0],e),h=r.get(c[1],e);s=a.dataToPoint([f,h])}if(jd(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;lC(r.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[t?0:1]):lC(r.get(c[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var Aze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,i){n.eachSeries(function(a){var o=Qu.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=H_(o).from,u=H_(o).to;l.each(function(c){Pk(l,c,!0,a,i),Pk(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new $B);this.group.add(c.group);var f=xze(o,t,n),h=f.from,d=f.to,p=f.line;H_(n).from=h,H_(n).to=d,n.setData(p);var g=n.get("symbol"),v=n.get("symbolSize"),m=n.get("symbolRotate"),y=n.get("symbolOffset");Ae(g)||(g=[g,g]),Ae(v)||(v=[v,v]),Ae(m)||(m=[m,m]),Ae(y)||(y=[y,y]),f.from.each(function(_){b(h,_,!0),b(d,_,!1)}),p.each(function(_){var w=p.getItemModel(_).getModel("lineStyle").getLineStyle();p.setItemLayout(_,[h.getItemLayout(_),d.getItemLayout(_)]),w.stroke==null&&(w.stroke=h.getItemVisual(_,"style").fill),p.setItemVisual(_,{fromSymbolKeepAspect:h.getItemVisual(_,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(_,"symbolOffset"),fromSymbolRotate:h.getItemVisual(_,"symbolRotate"),fromSymbolSize:h.getItemVisual(_,"symbolSize"),fromSymbol:h.getItemVisual(_,"symbol"),toSymbolKeepAspect:d.getItemVisual(_,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(_,"symbolOffset"),toSymbolRotate:d.getItemVisual(_,"symbolRotate"),toSymbolSize:d.getItemVisual(_,"symbolSize"),toSymbol:d.getItemVisual(_,"symbol"),style:w})}),c.updateData(p),f.line.eachItemGraphicEl(function(_){Dt(_).dataModel=n,_.traverse(function(w){Dt(w).dataModel=n})});function b(_,w,S){var C=_.getItemModel(w);Pk(_,w,S,t,a);var A=C.getModel("itemStyle").getItemStyle();A.fill==null&&(A.fill=$1(l,"color")),_.setItemVisual(w,{symbolKeepAspect:C.get("symbolKeepAspect"),symbolOffset:Lt(C.get("symbolOffset",!0),y[S?0:1]),symbolRotate:Lt(C.get("symbolRotate",!0),m[S?0:1]),symbolSize:Lt(C.get("symbolSize"),v[S?0:1]),symbol:Lt(C.get("symbol",!0),g[S?0:1]),style:A})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e}(SO);function xze(r,e,t){var n;r?n=De(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return be(be({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new Na(n,t),a=new Na(n,t),o=new Na([],t),s=De(t.get("data"),Bt(Sze,e,r,t));r&&(s=Jr(s,Bt(Cze,r)));var l=ere(!!r,n);return i.initData(De(s,function(u){return u[0]}),null,l),a.initData(De(s,function(u){return u[1]}),null,l),o.initData(De(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function Dze(r){r.registerComponentModel(wze),r.registerComponentView(Aze),r.registerPreprocessor(function(e){_O(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Eze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Qu),W_=wr(),kze=function(r,e,t,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=i1(r,i),s=i1(r,a),l=o.coord,u=s.coord;l[0]=Ni(l[0],-1/0),l[1]=Ni(l[1],-1/0),u[0]=Ni(u[0],1/0),u[1]=Ni(u[1],1/0);var c=CF([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function uC(r){return!isNaN(r)&&!isFinite(r)}function dV(r,e,t,n){var i=1-r;return uC(e[i])&&uC(t[i])}function Tze(r,e){var t=e.coord[0],n=e.coord[1],i={coord:t,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return jd(r,"cartesian2d")?t&&n&&(dV(1,t,n)||dV(0,t,n))?!0:mze(r,i,a):a1(r,i)||a1(r,a)}function pV(r,e,t,n,i){var a=n.coordinateSystem,o=r.getItemModel(e),s,l=$e(o.get(t[0]),i.getWidth()),u=$e(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],e),f=r.getValues(["x1","y1"],e),h=a.clampData(c),d=a.clampData(f),p=[];t[0]==="x0"?p[0]=h[0]>d[0]?f[0]:c[0]:p[0]=h[0]>d[0]?c[0]:f[0],t[1]==="y0"?p[1]=h[1]>d[1]?f[1]:c[1]:p[1]=h[1]>d[1]?c[1]:f[1],s=n.getMarkerPosition(p,t,!0)}else{var g=r.get(t[0],e),v=r.get(t[1],e),m=[g,v];a.clampData&&a.clampData(m,m),s=a.dataToPoint(m,!0)}if(jd(a,"cartesian2d")){var y=a.getAxis("x"),b=a.getAxis("y"),g=r.get(t[0],e),v=r.get(t[1],e);uC(g)?s[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):uC(v)&&(s[1]=b.toGlobalCoord(b.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var gV=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Mze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,i){n.eachSeries(function(a){var o=Qu.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=De(gV,function(f){return pV(s,l,f,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new xt});this.group.add(c.group),this.markKeep(c);var f=Ize(o,t,n);n.setData(f),f.each(function(h){var d=De(gV,function(A){return pV(f,h,A,t,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,v=p.getExtent(),m=g.getExtent(),y=[p.parse(f.get("x0",h)),p.parse(f.get("x1",h))],b=[g.parse(f.get("y0",h)),g.parse(f.get("y1",h))];as(y),as(b);var _=!(v[0]>y[1]||v[1]b[1]||m[1]=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(gr),yp=Bt,y3=B,$_=xt,tre=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new $_),this.group.add(this._selectorGroup=new $_),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,i,l,s,u);var c=t.getBoxLayoutParams(),f={width:i.getWidth(),height:i.getHeight()},h=t.get("padding"),d=di(c,f,h),p=this.layoutInner(t,o,d,a,l,u),g=di(yt({width:p.width,height:p.height},c),f,h);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Hte(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,i,a,o,s,l){var u=this.getContentGroup(),c=nt(),f=n.get("selectedMode"),h=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),y3(n.getData(),function(d,p){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` +`)){var v=new $_;v.newline=!0,u.add(v);return}var m=i.getSeriesByName(g)[0];if(!c.get(g))if(m){var y=m.getData(),b=y.getVisual("legendLineStyle")||{},_=y.getVisual("legendIcon"),w=y.getVisual("style"),S=this._createItem(m,g,p,d,n,t,b,w,_,f,a);S.on("click",yp(vV,g,null,a,h)).on("mouseover",yp(b3,m.name,null,a,h)).on("mouseout",yp(_3,m.name,null,a,h)),i.ssr&&S.eachChild(function(C){var A=Dt(C);A.seriesIndex=m.seriesIndex,A.dataIndex=p,A.ssrType="legend"}),c.set(g,!0)}else i.eachRawSeries(function(C){if(!c.get(g)&&C.legendVisualProvider){var A=C.legendVisualProvider;if(!A.containName(g))return;var x=A.indexOfName(g),D=A.getItemVisual(x,"style"),E=A.getItemVisual(x,"legendIcon"),k=Mo(D.fill);k&&k[3]===0&&(k[3]=.2,D=be(be({},D),{fill:zu(k,"rgba")}));var M=this._createItem(C,g,p,d,n,t,{},D,E,f,a);M.on("click",yp(vV,null,g,a,h)).on("mouseover",yp(b3,null,g,a,h)).on("mouseout",yp(_3,null,g,a,h)),i.ssr&&M.eachChild(function(T){var L=Dt(T);L.seriesIndex=C.seriesIndex,L.dataIndex=p,L.ssrType="legend"}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype._createSelector=function(t,n,i,a,o){var s=this.getSelectorGroup();y3(t,function(u){var c=u.type,f=new Er({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(f);var h=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);ta(f,{normal:h,emphasis:d},{defaultText:u.title}),ld(f)})},e.prototype._createItem=function(t,n,i,a,o,s,l,u,c,f,h){var d=t.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),v=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),b=a.get("icon");c=b||c||"roundRect";var _=Bze(c,a,l,u,d,v,h),w=new $_,S=a.getModel("textStyle");if(gt(t.getLegendIcon)&&(!b||b==="inherit"))w.add(t.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:m,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}));else{var C=b==="inherit"&&t.getData().getVisual("symbol")?m==="inherit"?t.getData().getVisual("symbolRotate"):m:0;w.add(Oze({itemWidth:p,itemHeight:g,icon:c,iconRotate:C,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:y}))}var A=s==="left"?p+5:-5,x=s,D=o.get("formatter"),E=n;Ze(D)&&D?E=D.replace("{name}",n??""):gt(D)&&(E=D(n));var k=v?S.getTextColor():a.get("inactiveColor");w.add(new Er({style:mn(S,{text:E,x:A,y:g/2,fill:k,align:x,verticalAlign:"middle"},{inheritColor:k})}));var M=new _r({shape:w.getBoundingRect(),style:{fill:"transparent"}}),T=a.getModel("tooltip");return T.get("show")&&Lv({el:M,componentModel:o,itemName:n,itemTooltipOption:T.option}),w.add(M),w.eachChild(function(L){L.silent=!0}),M.silent=!f,this.getContentGroup().add(w),ld(w),w.__legendDataIndex=i,w},e.prototype.layoutInner=function(t,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();cd(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){cd("horizontal",u,t.get("selectorItemGap",!0));var h=u.getBoundingRect(),d=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),g=t.getOrient().index,v=g===0?"width":"height",m=g===0?"height":"width",y=g===0?"y":"x";s==="end"?d[g]+=c[v]+p:f[g]+=h[v]+p,d[1-g]+=c[m]/2-h[m]/2,u.x=d[0],u.y=d[1],l.x=f[0],l.y=f[1];var b={x:0,y:0};return b[v]=c[v]+p+h[v],b[m]=Math.max(c[m],h[m]),b[y]=Math.min(0,h[y]+d[1-g]),b}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(In);function Bze(r,e,t,n,i,a,o){function s(v,m){v.lineWidth==="auto"&&(v.lineWidth=m.lineWidth>0?2:0),y3(v,function(y,b){v[b]==="inherit"&&(v[b]=m[b])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?n.decal:nv(f,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:t).opacity),s(u,n);var h=e.getModel("lineStyle"),d=h.getLineStyle();if(s(d,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=h.get("inactiveColor"),d.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function Oze(r){var e=r.icon||"roundRect",t=ni(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function vV(r,e,t,n){_3(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),b3(r,e,t,n)}function rre(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,i=e.length;ni[o],v=[-d.x,-d.y];n||(v[a]=c[u]);var m=[0,0],y=[-p.x,-p.y],b=Lt(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(g){var _=t.get("pageButtonPosition",!0);_==="end"?y[a]+=i[o]-p[o]:m[a]+=p[o]+b}y[1-a]+=d[s]/2-p[s]/2,c.setPosition(v),f.setPosition(m),h.setPosition(y);var w={x:0,y:0};if(w[o]=g?i[o]:d[o],w[s]=Math.max(d[s],p[s]),w[l]=Math.min(0,p[l]+y[1-a]),f.__rectSize=i[o],g){var S={x:0,y:0};S[o]=Math.max(i[o]-p[o]-b,0),S[s]=w[s],f.setClipPath(new _r({shape:S})),f.__rectSize=S[o]}else h.eachChild(function(A){A.attr({invisible:!0,silent:!0})});var C=this._getPageInfo(t);return C.pageIndex!=null&&Pr(c,{x:C.contentPosition[0],y:C.contentPosition[1]},g?t:null),this._updatePageInfoView(t,C),w},e.prototype._pageGo=function(t,n,i){var a=this._getPageInfo(n)[t];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var i=this._controllerGroup;B(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",h=n[f]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",h?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),d.cursor=h?"pointer":"default")});var a=i.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Ze(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=Rk[o],l=Nk[o],u=this._findTargetItemIndex(n),c=i.children(),f=c[u],h=c.length,d=h?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var g=_(f);p.contentPosition[o]=-g.s;for(var v=u+1,m=g,y=g,b=null;v<=h;++v)b=_(c[v]),(!b&&y.e>m.s+a||b&&!w(b,m.s))&&(y.i>m.i?m=y:m=b,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=b;for(var v=u-1,m=g,y=g,b=null;v>=-1;--v)b=_(c[v]),(!b||!w(y,b.s))&&m.i=C&&S.s<=C+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===t&&(n=s)}),n??a},e.type="legend.scroll",e}(tre);function Vze(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function Uze(r){ir(nre),r.registerComponentModel(Nze),r.registerComponentView(zze),Vze(r)}function Gze(r){ir(nre),ir(Uze)}var Hze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Rf(n1.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(n1),CO=wr();function Wze(r,e,t){CO(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function $ze(r,e){for(var t=CO(r).coordSysRecordMap,n=t.keys(),i=0;in[t+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function Kze(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=CO(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=nt());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=Vte(a);B(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,jze(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=nt());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){ire(i,a);return}var c=Zze(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),zv(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Xze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,i){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Wze(i,t,{pan:Je(zk.pan,this),zoom:Je(zk.zoom,this),scrollMove:Je(zk.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){$ze(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(pO),zk={zoom:function(r,e,t,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(o){var s=Vk[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Yd(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:bV(function(r,e,t,n,i,a){var o=Vk[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:bV(function(r,e,t,n,i,a){var o=Vk[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,t);return o.signal*(r[1]-r[0])*a.scrollDelta})};function bV(r){return function(e,t,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,i);if(Yd(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var Vk={grid:function(r,e,t,n,i){var a=t.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,e,t,n,i){var a=t.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,e,t,n,i){var a=t.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function are(r){gO(r),r.registerComponentModel(Hze),r.registerComponentView(Xze),Kze(r)}var Qze=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Rf(n1.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(n1),Rm=_r,_V=7,Jze=1,Uk=30,eVe=7,Nm="horizontal",wV="vertical",tVe=5,rVe=["line","bar","candlestick","scatter"],nVe={easing:"cubicOut",duration:100,delay:0},iVe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=Je(this._onBrush,this),this._onBrushEnd=Je(this._onBrushEnd,this)},e.prototype.render=function(t,n,i,a){if(r.prototype.render.apply(this,arguments),zv(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Wy(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new xt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,i=t.get("brushSelect"),a=i?eVe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===Nm?{right:s.width-o.x-o.width,top:s.height-Uk-_V-a,width:o.width,height:Uk}:{right:_V,top:o.y,width:Uk,height:o.height},u=Pv(t.option);B(["right","top","width","height"],function(f){u[f]==="ph"&&(u[f]=l[f])});var c=di(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===wV&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===Nm&&!o?{scaleY:l?1:-1,scaleX:1}:i===Nm&&o?{scaleY:l?1:-1,scaleX:-1}:i===wV&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=t.get("brushSelect");i.add(new Rm({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new Rm({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Je(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,i=this._shadowSize||[],a=t.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var f=o.getDataExtent(l),h=(f[1]-f[0])*.3;f=[f[0]-h,f[1]+h];var d=[0,n[1]],p=[0,n[0]],g=[[n[0],0],[0,0]],v=[],m=p[1]/(o.count()-1),y=0,b=Math.round(o.count()/n[0]),_;o.each([l],function(x,D){if(b>0&&D%b){y+=m;return}var E=x==null||isNaN(x)||x==="",k=E?0:Kr(x,f,d,!0);E&&!_&&D?(g.push([g[g.length-1][0],0]),v.push([v[v.length-1][0],0])):!E&&_&&(g.push([y,0]),v.push([y,0])),g.push([y,k]),v.push([y,k]),y+=m,_=E}),u=this._shadowPolygonPts=g,c=this._shadowPolylinePts=v}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var w=this.dataZoomModel;function S(x){var D=w.getModel(x?"selectedDataBackground":"dataBackground"),E=new xt,k=new $a({shape:{points:u},segmentIgnoreThreshold:1,style:D.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),M=new qa({shape:{points:c},segmentIgnoreThreshold:1,style:D.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return E.add(k),E.add(M),E}for(var C=0;C<3;C++){var A=S(C===1);this._displayables.sliderGroup.add(A),this._displayables.dataShadowSegs.push(A)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();B(l,function(u){if(!i&&!(n!==!0&&Qt(rVe,u.get("type"))<0)){var c=a.getComponent(Jc(o),s).axis,f=aVe(o),h,d=u.coordinateSystem;f!=null&&d.getOtherAxis&&(h=d.getOtherAxis(c).inverse),f=u.getData().mapDimension(f),i={thisAxis:c,series:u,thisDim:o,otherDim:f,otherAxisInverse:h}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,f=l.get("brushSelect"),h=n.filler=new Rm({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(h),o.add(new Rm({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Jze,fill:"rgba(0,0,0,0)"}})),B([0,1],function(b){var _=l.get("handleIcon");!V2[_]&&_.indexOf("path://")<0&&_.indexOf("image://")<0&&(_="path://"+_);var w=ni(_,-1,0,2,2,null,!0);w.attr({cursor:SV(this._orient),draggable:!0,drift:Je(this._onDragMove,this,b),ondragend:Je(this._onDragEnd,this),onmouseover:Je(this._showDataInfo,this,!0),onmouseout:Je(this._showDataInfo,this,!1),z2:5});var S=w.getBoundingRect(),C=l.get("handleSize");this._handleHeight=$e(C,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ld(w);var A=l.get("handleColor");A!=null&&(w.style.fill=A),o.add(i[b]=w);var x=l.getModel("textStyle");t.add(a[b]=new Er({silent:!0,invisible:!0,style:mn(x,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:x.getTextColor(),font:x.getFont()}),z2:10}))},this);var d=h;if(f){var p=$e(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new _r({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),v=p*.8,m=n.moveHandleIcon=ni(l.get("moveHandleIcon"),-v/2,-v/2,v,v,"#fff",!0);m.silent=!0,m.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new _r({invisible:!0,shape:{y:s[1]-y,height:p+y}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(m),o.add(d)}d.attr({draggable:!0,cursor:SV(this._orient),drift:Je(this._onDragMove,this,"all"),ondragstart:Je(this._showDataInfo,this,!0),ondragend:Je(this._onDragEnd,this),onmouseover:Je(this._showDataInfo,this,!0),onmouseout:Je(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Kr(t[0],[0,100],n,!0),Kr(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Yd(n,a,o,i.get("zoomLock")?"all":t,s.minSpan!=null?Kr(s.minSpan,l,o,!0):null,s.maxSpan!=null?Kr(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=as([Kr(a[0],o,l,!0),Kr(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,i=this._handleEnds,a=as(i.slice()),o=this._size;B([0,1],function(d){var p=n.handles[d],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],c=0;cn[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,i=t.offsetY;this._brushStart=new zt(n,i),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=as([Kr(i.x,o,s,!0),Kr(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&($u(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new Rm({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?nVe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=Vte(this.dataZoomModel).infoList;if(!t&&n.length){var i=n[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var a=this.api.getWidth(),o=this.api.getHeight();t={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(pO);function aVe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function SV(r){return r==="vertical"?"ns-resize":"ew-resize"}function ore(r){r.registerComponentModel(Qze),r.registerComponentView(iVe),gO(r)}function oVe(r){ir(are),ir(ore)}var sre={get:function(r,e,t){var n=wt((sVe[r]||{})[e]);return t&&Ae(n)?n[n.length-1]:n}},sVe={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},CV=Ei.mapVisual,lVe=Ei.eachVisual,uVe=Ae,AV=B,cVe=as,fVe=Kr,cC=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,n){var i=this.option;!n&&Kte(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=Je(t,this),this.controllerVisuals=p3(this.option.controller,n,t),this.targetVisuals=p3(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=rn(t),n},e.prototype.eachTargetSeries=function(t,n){B(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&t.call(n,a)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(i){i===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],Ae(t)&&(t=t.slice(),u=!0);var c=n?t:u?[f(t[0]),f(t[1])]:f(t);if(Ze(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(gt(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+c[1]:t[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(h){return h===s[0]?"min":h===s[1]?"max":(+h).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=cVe([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var i=t.dimensions,a=i.length-1;a>=0;a--){var o=i[a],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});Ut(a,i),Ut(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(f){uVe(n.color)&&!f.inRange&&(f.inRange={color:n.color.slice().reverse()}),f.inRange=f.inRange||{color:t.get("gradientColor")}}function u(f,h,d){var p=f[h],g=f[d];p&&!g&&(g=f[d]={},AV(p,function(v,m){if(Ei.isValidType(m)){var y=sre.get(m,"inactive",s);y!=null&&(g[m]=y,m==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(f){var h=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,d=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),v=g||"roundRect";AV(this.stateList,function(m){var y=this.itemSize,b=f[m];b||(b=f[m]={color:s?p:[p]}),b.symbol==null&&(b.symbol=h&&wt(h)||(s?v:[v])),b.symbolSize==null&&(b.symbolSize=d&&wt(d)||(s?y[0]:[y[0],y[0]])),b.symbol=CV(b.symbol,function(S){return S==="none"?v:S});var _=b.symbolSize;if(_!=null){var w=-1/0;lVe(_,function(S){S>w&&(w=S)}),b.symbolSize=CV(_,function(S){return fVe(S,[0,w],[0,y[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(gr),xV=[20,140],hVe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(i){i.mappingMethod="linear",i.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=xV[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=xV[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):Ae(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),B(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=as((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]=i[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(t){var n=DV(this,"outOfRange",this.getExtent()),i=DV(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:t(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;lt[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(t,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,i=this.visualMapModel.get("inverse");return new xt(n==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent();dVe([0,1],function(c){var f=o[c];f.setStyle("fill",n.handlesColor[c]),f.y=t[c];var h=vl(t[c],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");f.scaleX=f.scaleY=d/l[0],f.x=l[0]-d/2;var p=Us(i.handleLabelPoints[c],ud(f,this.group));s[c].setStyle({x:p[0],y:p[1],text:a.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var h={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",h),p=this.getControllerVisual(t,"symbolSize"),g=vl(t,s,u,!0),v=l[0]-p/2,m={x:f.x,y:f.y};f.y=g,f.x=v;var y=Us(c.indicatorLabelPoint,ud(f,this.group)),b=c.indicatorLabel;b.attr("invisible",!1);var _=this._applyTransform("left",c.mainGroup),w=this._orient,S=w==="horizontal";b.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:S?_:"middle",align:S?"center":_});var C={x:v,y:g,style:{fill:d}},A={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:"cubicInOut",additive:!0};f.x=m.x,f.y=m.y,f.animateTo(C,x),b.animateTo(A,x)}else f.attr(C),b.attr(A);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var E=0;Eo[1]&&(f[1]=1/0),n&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var h=this._hoverLinkDataIndices,d=[];(n||MV(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(f));var p=Cke(h,d);this._dispatchHighDown("downplay",Ww(p[0],i)),this._dispatchHighDown("highlight",Ww(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(Uh(t.target,function(l){var u=Dt(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var i=0;i=0&&(a.dimension=o,n.push(a))}}),r.getData().setVisual("visualMeta",n)}}];function wVe(r,e,t,n){for(var i=e.targetVisuals[n],a=Ei.prepareVisualTypes(i),o={color:$1(r.getData(),"color")},s=0,l=a.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(yVe,bVe),B(_Ve,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(SVe))}function fre(r){r.registerComponentModel(hVe),r.registerComponentView(vVe),cre(r)}var CVe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],AVe[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=wt(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=De(this._pieceList,function(l){return l=wt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},i=Ei.listVisualTypes(),a=this.isCategory();B(t.pieces,function(s){B(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),B(n,function(s,l){var u=!1;B(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&B(this.stateList,function(c){(t[c]||(t[c]={}))[l]=sre.get(l,c==="inRange"?"active":"inactive",a)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var i=this.option,a=this._pieceList,o=(n?i:t).selected||{};if(i.selected=o,B(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;B(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=wt(t)},e.prototype.getValueState=function(t){var n=Ei.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Ei.findPieceIndex(l,i);c===t&&o.push(u)},this),n.push({seriesId:a.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var i=t.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,f){var h=a.getRepresentValue({interval:c});f||(f=a.getValueState(h));var d=t(h,f);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return B(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=Rf(cC.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(cC),AVe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function BV(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var xVe=function(r){pe(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),f=c.endsText,h=Ni(n.get("showLabel",!0),!f);f&&this._renderEndsText(t,f[0],u,h,l),B(c.viewPieceList,function(d){var p=d.piece,g=new xt;g.onclick=Je(this._onItemClick,this,p),this._enableHoverLink(g,d.indexInModelPieceList);var v=n.getRepresentValue(p);if(this._createItemSymbol(g,v,[0,0,u[0],u[1]]),h){var m=this.visualMapModel.getValueState(v);g.add(new Er({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:m==="outOfRange"?.5:1}}))}t.add(g)},this),f&&this._renderEndsText(t,f[1],u,h,l),cd(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var i=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:Ww(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return ure(t,this.api,t.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,n,i,a,o){if(n){var s=new xt,l=this.visualMapModel.textStyleModel;s.add(new Er({style:mn(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=De(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),a=t.get("orient"),o=t.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(t,n,i){t.add(ni(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color")))},e.prototype._onItemClick=function(t){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=wt(i.selected),s=n.getSelectedMapKey(t);a==="single"||a===!0?(o[s]=!0,B(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(lre);function hre(r){r.registerComponentModel(CVe),r.registerComponentView(xVe),cre(r)}function DVe(r){ir(fre),ir(hre)}var EVe={label:{enabled:!0},decal:{show:!1}},OV=wr(),kVe={};function TVe(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=wt(EVe);Ut(n.label,r.getLocaleModel().get("aria"),!1),Ut(t.option,n,!1),i(),a();function i(){var u=t.getModel("decal"),c=u.get("show");if(c){var f=nt();r.eachSeries(function(h){if(!h.isColorBySeries()){var d=f.get(h.type);d||(d={},f.set(h.type,d)),OV(h).scope=d}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(gt(h.enableAriaDecal)){h.enableAriaDecal();return}var d=h.getData();if(h.isColorBySeries()){var y=bI(h.ecModel,h.name,kVe,r.getSeriesCount()),b=d.getVisual("decal");d.setVisual("decal",_(b,y))}else{var p=h.getRawData(),g={},v=OV(h).scope;d.each(function(w){var S=d.getRawIndex(w);g[S]=w});var m=p.count();p.each(function(w){var S=g[w],C=p.getName(w)||w+"",A=bI(h.ecModel,C,v,m),x=d.getItemVisual(S,"decal");d.setItemVisual(S,"decal",_(x,A))})}function _(w,S){var C=w?be(be({},S),w):S;return C.dirty=!0,C}})}}function a(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=t.getModel("label");if(f.option=yt(f.option,c),!!f.get("enabled")){if(f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var h=r.getSeriesCount(),d=f.get(["data","maxCount"])||10,p=f.get(["series","maxCount"])||10,g=Math.min(h,p),v;if(!(h<1)){var m=s();if(m){var y=f.get(["general","withTitle"]);v=o(y,{title:m})}else v=f.get(["general","withoutTitle"]);var b=[],_=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);v+=o(_,{seriesCount:h}),r.eachSeries(function(A,x){if(x1?f.get(["series","multiple",k]):f.get(["series","single",k]),D=o(D,{seriesId:A.seriesIndex,seriesName:A.get("name"),seriesType:l(A.subType)});var M=A.getData();if(M.count()>d){var T=f.get(["data","partialData"]);D+=o(T,{displayCnt:d})}else D+=f.get(["data","allData"]);for(var L=f.get(["data","separator","middle"]),F=f.get(["data","separator","end"]),N=[],z=0;z":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},LVe=function(){function r(e){var t=this._condVal=Ze(e)?new RegExp(e):HDe(e)?e:null;if(t==null){var n="";qr(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return Ze(t)?this._condVal.test(e):Or(t)?this._condVal.test(e+""):!1},r}(),FVe=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),BVe=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&n.push(i),i=[M,T]}function c(M,T,L,F){Kp(M,L)&&Kp(T,F)||i.push(M,T,L,F,L,F)}function f(M,T,L,F,N,z){var W=Math.abs(T-M),H=Math.tan(W/4)*4/3,R=TA:E2&&n.push(i),n}function S3(r,e,t,n,i,a,o,s,l,u){if(Kp(r,t)&&Kp(e,n)&&Kp(i,o)&&Kp(a,s)){l.push(o,s);return}var c=2/u,f=c*c,h=o-r,d=s-e,p=Math.sqrt(h*h+d*d);h/=p,d/=p;var g=t-r,v=n-e,m=i-o,y=a-s,b=g*g+v*v,_=m*m+y*y;if(b=0&&A=0){l.push(o,s);return}var x=[],D=[];Cf(r,t,i,o,.5,x),Cf(e,n,a,s,.5,D),S3(x[0],D[0],x[1],D[1],x[2],D[2],x[3],D[3],l,u),S3(x[4],D[4],x[5],D[5],x[6],D[6],x[7],D[7],l,u)}function YVe(r,e){var t=w3(r),n=[];e=e||1;for(var i=0;i0)for(var u=0;uMath.abs(u),f=pre([l,u],c?0:1,e),h=(c?s:u)/f.length,d=0;di,o=pre([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",f=r[s]/o.length,h=0;h1?null:new zt(g*l+r,g*u+e)}function XVe(r,e,t){var n=new zt;zt.sub(n,t,e),n.normalize();var i=new zt;zt.sub(i,r,e);var a=i.dot(n);return a}function _p(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function QVe(r,e,t){for(var n=r.length,i=[],a=0;ao?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),QVe(e,u,c)}function fC(r,e,t,n){if(t===1)n.push(e);else{var i=Math.floor(t/2),a=r(e);fC(r,a[0],i,n),fC(r,a[1],t-i,n)}return n}function JVe(r,e){for(var t=[],n=0;n0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(e&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function pC(r){var e=1/0,t=1/0,n=-1/0,i=-1/0,a=De(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(f,t),n=Math.max(c,n),i=Math.max(f,i),[c,f]}),o=De(a,function(s,l){return{cp:s,z:lUe(s[0],s[1],e,t,n,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function mre(r){return rUe(r.path,r.count)}function C3(){return{fromIndividuals:[],toIndividuals:[],count:0}}function uUe(r,e,t){var n=[];function i(w){for(var S=0;S=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var a=l.length,u=Math.ceil(a/2);t[i].many=l.slice(u,a),t[s].many=l.slice(0,u),s++}return t}var fUe={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;WV(r)&&(u=r,c=e),WV(e)&&(u=e,c=r);function f(m,y,b,_,w){var S=m.many,C=m.one;if(S.length===1&&!w){var A=y?S[0]:C,x=y?C:S[0];if(hC(A))f({many:[A],one:x},!0,b,_,!0);else{var D=s?yt({delay:s(b,_)},l):l;xO(A,x,D),a(A,x,A,x,D)}}else for(var E=yt({dividePath:fUe[t],individualDelay:s&&function(N,z,W,H){return s(N+b,_)}},l),k=y?uUe(S,C,E):cUe(C,S,E),M=k.fromIndividuals,T=k.toIndividuals,L=M.length,F=0;Fe.length,d=u?$V(c,u):$V(h?e:r,[h?r:e]),p=0,g=0;gyre))for(var a=n.getIndices(),o=0;o0&&S.group.traverse(function(A){A instanceof sr&&!A.animators.length&&A.animateFrom({style:{opacity:0}},C)})})}function KV(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function XV(r){return Ae(r)?r.sort().join(","):r}function Lc(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function yUe(r,e){var t=nt(),n=nt(),i=nt();return B(r.oldSeries,function(a,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=KV(a),c=XV(u);n.set(c,{dataGroupId:s,data:l}),Ae(u)&&B(u,function(f){i.set(f,{key:c,dataGroupId:s,data:l})})}),B(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=KV(a),u=XV(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:Lc(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:Lc(s),data:s}]});else if(Ae(l)){var f=[];B(l,function(p){var g=n.get(p);g.data&&f.push({dataGroupId:g.dataGroupId,divide:Lc(g.data),data:g.data})}),f.length&&t.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:Lc(s)}]})}else{var h=i.get(l);if(h){var d=t.get(h.key);d||(d={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Lc(h.data)}],newSeries:[]},t.set(h.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:Lc(s)})}}}}),t}function QV(r,e){for(var t=0;t=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Lc(e.oldData[s]),groupIdDim:o.dimension})}),B(rn(r.to),function(o){var s=QV(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Lc(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&bre(i,a,n)}function _Ue(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){B(rn(n.seriesTransition),function(i){B(rn(i.to),function(a){for(var o=n.updatedSeries,s=0;s${qn(f.value[1],a)}`,d=`
`,p=`
${qn(f.axisValueLabel,o)}
`;return h+d+p},backgroundColor:"transparent",borderWidth:0,borderColor:"transparent",extraCssText:"box-shadow: none; padding-bottom: 0;",padding:0,textStyle:{fontSize:9}},legend:{show:!1},grid:{left:0,right:0,bottom:0,top:0,containLabel:!0},xAxis:{type:"time",splitLine:{show:!1},axisTick:{show:!1},axisLabel:{show:!1,hideOverlap:!0,showMaxLabel:!1,formatter:!1,margin:6},scale:!0,z:2,boundaryGap:"2%",axisPointer:{show:!0,snap:!0,type:"line",z:0,lineStyle:{width:.5},handle:{show:!1},label:{show:!1}}},yAxis:[{type:"value",logBase:10,splitLine:{show:!1},axisLine:{show:!1,onZero:!1},axisTick:{show:!1},axisLabel:{show:!1,hideOverlap:!0,margin:4},name:"",nameLocation:"end",nameTextStyle:{align:"left",verticalAlign:"top",padding:[0,5,0,0]},nameGap:6,scale:i,boundaryGap:["1%","1%"],z:2}],series:[{type:t,triggerLineEvent:!0,label:{show:!1,position:"top",padding:0,fontSize:9},labelLayout:{hideOverlap:!0},connectNulls:!1,emphasis:{disabled:!0},lineStyle:{width:1,type:"solid",color:n??u.colors["base-content-muted"]},areaStyle:{color:e==="area"?n?Xt(n).brighten(1.5).hex():u.colors["base-300"]:"transparent"},itemStyle:{color:n??u.colors["base-content-muted"]},showSymbol:!1,symbol:"circle",symbolSize:0,step:!1,name:"sparkline",data:r,yAxisIndex:0}],animation:!1}}function AUe(r){let e;return{c(){e=oe("div"),this.h()},l(t){e=se(t,"DIV",{class:!0,style:!0}),ge(e).forEach(U),this.h()},h(){Y(e,"class","inline-block align-baseline overflow-visible"),He(e,"width",r[0]+"px"),He(e,"height",r[1]+"px")},m(t,n){le(t,e,n),r[24](e)},p(t,n){n&1&&He(e,"width",t[0]+"px"),n&2&&He(e,"height",t[1]+"px")},i:xe,o:xe,d(t){t&&U(e),r[24](null)}}}function xUe(r){let e,t;return{c(){e=oe("div"),t=new cv(!1),this.h()},l(n){e=se(n,"DIV",{class:!0,style:!0});var i=ge(e);t=fv(i,!1),i.forEach(U),this.h()},h(){t.a=null,Y(e,"class","inline-block align-baseline"),He(e,"width",r[0]+"px"),He(e,"height",r[1]+"px")},m(n,i){le(n,e,i),t.m(r[5],e)},p(n,i){i&32&&t.p(n[5]),i&1&&He(e,"width",n[0]+"px"),i&2&&He(e,"height",n[1]+"px")},i:xe,o:xe,d(n){n&&U(e)}}}function DUe(r){let e,t;return{c(){e=oe("div"),t=new cv(!1),this.h()},l(n){e=se(n,"DIV",{class:!0,style:!0});var i=ge(e);t=fv(i,!1),i.forEach(U),this.h()},h(){t.a=null,Y(e,"class","inline-block align-baseline"),He(e,"width",r[0]+"px"),He(e,"height",r[1]+"px")},m(n,i){le(n,e,i),t.m(r[6],e)},p(n,i){i&64&&t.p(n[6]),i&1&&He(e,"width",n[0]+"px"),i&2&&He(e,"height",n[1]+"px")},i:xe,o:xe,d(n){n&&U(e)}}}function EUe(r){let e,t;return e=new FL({props:{error:r[4]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&16&&(a.error=n[4]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function kUe(r){let e,t,n,i;const a=[EUe,DUe,xUe,AUe],o=[];function s(l,u){return l[4]?0:l[2]?3:2}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),le(l,n,u),i=!0},p(l,[u]){let c=e;e=s(l),e===c?o[e].p(l,u):(Mt(),re(o[c],1,1,()=>{o[c]=null}),It(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),o[e].d(l)}}}let TUe="white";function MUe(r,e,t){let n,i,a,o=xe,s=()=>(o(),o=_o(n,N=>t(23,a=N)),n);r.$$.on_destroy.push(()=>o());const{theme:l,resolveColor:u}=E1();y1(r,l,N=>t(22,i=N));let{config:c={}}=e,{width:f=50}=e,{height:h=15}=e,{interactive:d=!0}=e,p,g=null,v="",{data:m=void 0}=e,{dateCol:y=void 0}=e,{valueCol:b=void 0}=e,{valueFmt:_=void 0}=e,w,{dateFmt:S=void 0}=e,C,{type:A="line"}=e,{color:x=void 0}=e,{yScale:D=!1}=e,E=A==="area"?"line":A,{connectGroup:k=void 0}=e,M,T;function L(){d&&p&&!g&&(t(19,g=AE(p,"evidence-light",{renderer:"svg",width:f,height:h})),g.setOption(c),k&&(t(19,g.group=k,g),pLe(k)))}U0(()=>{if(d)L();else{const N=document.createElement("div");N.style.width=f+"px",N.style.height=h+"px";const z=AE(N,"evidence-light",{renderer:"svg",height:h,width:f});z.setOption(c),t(5,v=z.renderToSVGString()),z.dispose()}}),IC(()=>{g&&g.dispose()});function F(N){N3[N?"unshift":"push"](()=>{p=N,t(3,p)})}return r.$$set=N=>{"config"in N&&t(9,c=N.config),"width"in N&&t(0,f=N.width),"height"in N&&t(1,h=N.height),"interactive"in N&&t(2,d=N.interactive),"data"in N&&t(11,m=N.data),"dateCol"in N&&t(12,y=N.dateCol),"valueCol"in N&&t(13,b=N.valueCol),"valueFmt"in N&&t(14,_=N.valueFmt),"dateFmt"in N&&t(15,S=N.dateFmt),"type"in N&&t(16,A=N.type),"color"in N&&t(17,x=N.color),"yScale"in N&&t(10,D=N.yScale),"connectGroup"in N&&t(18,k=N.connectGroup)},r.$$.update=()=>{if(r.$$.dirty&4&&t(2,d=d==="true"||d===!0),r.$$.dirty&131072&&s(t(7,n=u(x))),r.$$.dirty&1024&&t(10,D=D==="true"||D===!0),r.$$.dirty&16383519)try{if(!["line","area","bar"].includes(A))throw Error("type must be line, area, or bar");t(1,{height:h,width:f}=wUe(h,f),h,(t(0,f),t(16,A),t(1,h),t(11,m),t(13,b),t(12,y),t(14,_),t(15,S),t(26,E),t(23,a),t(10,D),t(20,w),t(21,C),t(22,i),t(9,c),t(3,p),t(2,d),t(19,g),t(4,T))),yF(m,[b,y]),t(20,{value_format_object:w,date_format_object:C}=SUe(m,b,y,_,S),w,(t(21,C),t(16,A),t(1,h),t(0,f),t(11,m),t(13,b),t(12,y),t(14,_),t(15,S),t(26,E),t(23,a),t(10,D),t(20,w),t(22,i),t(9,c),t(3,p),t(2,d),t(19,g),t(4,T)));const N=m.map(z=>[z[y],z[b]]);N.sort((z,W)=>z[0]-W[0]),t(9,c=CUe(N,A,E,a,D,w,C,h,TUe,i)),p&&d&&!g&&L()}catch(N){t(4,T=N),console.error("\x1B[31m%s\x1B[0m",`Error in Sparkline: ${T.message}`)}if(r.$$.dirty&2560,r.$$.dirty&524800&&g&&c&&g.setOption(c,!0),r.$$.dirty&519)if(d)L();else{const N=document.createElement("div");N.style.width=f+"px",N.style.height=h+"px";const z=AE(N,"evidence-light",{renderer:"svg",height:h,width:f});z.setOption(c),t(5,v=z.renderToSVGString()),z.dispose()}},[f,h,d,p,T,v,M,n,l,c,D,m,y,b,_,S,A,x,k,g,w,C,i,a,F]}class DO extends kr{constructor(e){super(),Tr(this,e,MUe,kUe,Mr,{config:9,width:0,height:1,interactive:2,data:11,dateCol:12,valueCol:13,valueFmt:14,dateFmt:15,type:16,color:17,yScale:10,connectGroup:18})}}function JV(r,e,t){const n=r.slice();return n[23]=e[t],n[25]=t,n}function eU(r,e,t){var g,v,m,y;const n=r.slice();n[26]=e[t],n[39]=t;const i=Is(n[26],n[13]);n[27]=i;const a=n[26].scaleColumn?n[13].find(function(..._){return r[18](n[26],..._)}):n[27];n[28]=a;const o=n[26].colorMin??((g=n[28].columnUnitSummary)==null?void 0:g.min);n[29]=o;const s=n[26].colorMax??((v=n[28].columnUnitSummary)==null?void 0:v.max);n[30]=s;const l=n[30]-n[29]!==0&&!isNaN(n[30])&&!isNaN(n[29]);n[31]=l;const u=n[26].fmt?Di(n[26].fmt,(m=n[27].format)==null?void 0:m.valueType):n[26].fmtColumn?Di(n[23][n[26].fmtColumn],(y=n[27].format)==null?void 0:y.valuetype):n[27].format;n[32]=u;const c=n[26].colorBreakpoints??(n[26].colorMid?[n[29],n[26].colorMid,n[30]]:[n[29],n[30]]);n[33]=c;const f=n[26].colorScale?Xt.scale(n[26].colorScale).domain(n[33]).nodata(n[14].colors["base-100"]):"";n[34]=f;const h=n[26].contentType==="colorscale"&&n[31]&&n[26].colorScale?n[26].scaleColumn?n[34](n[23][n[26].scaleColumn]).hex():n[34](n[23][n[26].id]).hex():"";n[35]=h;const d=n[26].redNegatives?n[23][n[26].id]<0?n[14].colors.negative:"":n[26].contentType==="colorscale"&&n[31]&&n[26].colorScale?Xt.contrast(n[35],n[14].colors["base-content"])=0?e[30]:e[30]<0?e[29]:Math.abs(e[29])+e[30];return e[41]=t,e}function tU(r){let e,t;return e=new nc({props:{class:"index w-[2%]",compact:r[12],$$slots:{default:[PUe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[0]&4096&&(a.compact=n[12]),i[0]&32|i[1]&4096&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function PUe(r){let e=(r[5]+r[25]+1).toLocaleString()+"",t;return{c(){t=dt(e)},l(n){t=pt(n,e)},m(n,i){le(n,t,i)},p(n,i){i[0]&32&&e!==(e=(n[5]+n[25]+1).toLocaleString()+"")&&Rt(t,e)},d(n){n&&U(t)}}}function RUe(r){let e=qn(r[23][r[26].id],r[32],r[27].columnUnitSummary)+"",t;return{c(){t=dt(e)},l(n){t=pt(n,e)},m(n,i){le(n,t,i)},p(n,i){i[0]&10241&&e!==(e=qn(n[23][n[26].id],n[32],n[27].columnUnitSummary)+"")&&Rt(t,e)},i:xe,o:xe,d(n){n&&U(t)}}}function NUe(r){let e,t=r[23][r[26].id]+"",n;return{c(){e=new cv(!1),n=Xe(),this.h()},l(i){e=fv(i,!1),n=Xe(),this.h()},h(){e.a=n},m(i,a){e.m(t,i,a),le(i,n,a)},p(i,a){a[0]&2049&&t!==(t=i[23][i[26].id]+"")&&e.p(t)},i:xe,o:xe,d(i){i&&(U(n),e.d())}}}function zUe(r){let e,t,n,i;return t=new DO({props:{type:"area",data:[...r[23][r[26].id]],dateCol:r[26].sparkX,valueCol:r[26].sparkY,interactive:"false",color:r[26].sparkColor,yScale:r[26].sparkYScale,height:r[26].sparkHeight??20,width:r[26].sparkWidth??80}}),{c(){e=oe("div"),Ne(t.$$.fragment),this.h()},l(a){e=se(a,"DIV",{class:!0});var o=ge(e);ze(t.$$.fragment,o),o.forEach(U),this.h()},h(){Y(e,"class",n="items-center justify-"+r[42]+" flex svelte-174z7k0")},m(a,o){le(a,e,o),Ve(t,e,null),i=!0},p(a,o){const s={};o[0]&2049&&(s.data=[...a[23][a[26].id]]),o[0]&2048&&(s.dateCol=a[26].sparkX),o[0]&2048&&(s.valueCol=a[26].sparkY),o[0]&2048&&(s.color=a[26].sparkColor),o[0]&2048&&(s.yScale=a[26].sparkYScale),o[0]&2048&&(s.height=a[26].sparkHeight??20),o[0]&2048&&(s.width=a[26].sparkWidth??80),t.$set(s),(!i||o[0]&2048&&n!==(n="items-center justify-"+a[42]+" flex svelte-174z7k0"))&&Y(e,"class",n)},i(a){i||(K(t.$$.fragment,a),i=!0)},o(a){re(t.$$.fragment,a),i=!1},d(a){a&&U(e),Ue(t)}}}function VUe(r){let e,t,n;return t=new DO({props:{type:"bar",data:[...r[23][r[26].id]],dateCol:r[26].sparkX,valueCol:r[26].sparkY,interactive:"false",color:r[26].sparkColor,yScale:r[26].sparkYScale,height:r[26].sparkHeight??19,width:r[26].sparkWidth??90}}),{c(){e=oe("div"),Ne(t.$$.fragment),this.h()},l(i){e=se(i,"DIV",{class:!0});var a=ge(e);ze(t.$$.fragment,a),a.forEach(U),this.h()},h(){Y(e,"class","items-center justify-center flex svelte-174z7k0")},m(i,a){le(i,e,a),Ve(t,e,null),n=!0},p(i,a){const o={};a[0]&2049&&(o.data=[...i[23][i[26].id]]),a[0]&2048&&(o.dateCol=i[26].sparkX),a[0]&2048&&(o.valueCol=i[26].sparkY),a[0]&2048&&(o.color=i[26].sparkColor),a[0]&2048&&(o.yScale=i[26].sparkYScale),a[0]&2048&&(o.height=i[26].sparkHeight??19),a[0]&2048&&(o.width=i[26].sparkWidth??90),t.$set(o)},i(i){n||(K(t.$$.fragment,i),n=!0)},o(i){re(t.$$.fragment,i),n=!1},d(i){i&&U(e),Ue(t)}}}function UUe(r){let e,t,n,i;return t=new DO({props:{type:"line",data:[...r[23][r[26].id]],dateCol:r[26].sparkX,valueCol:r[26].sparkY,interactive:"false",color:r[26].sparkColor,yScale:r[26].sparkYScale,height:r[26].sparkHeight??19,width:r[26].sparkWidth??90}}),{c(){e=oe("div"),Ne(t.$$.fragment),this.h()},l(a){e=se(a,"DIV",{class:!0});var o=ge(e);ze(t.$$.fragment,o),o.forEach(U),this.h()},h(){Y(e,"class",n="items-"+r[42]+" justify-"+r[42]+" flex svelte-174z7k0")},m(a,o){le(a,e,o),Ve(t,e,null),i=!0},p(a,o){const s={};o[0]&2049&&(s.data=[...a[23][a[26].id]]),o[0]&2048&&(s.dateCol=a[26].sparkX),o[0]&2048&&(s.valueCol=a[26].sparkY),o[0]&2048&&(s.color=a[26].sparkColor),o[0]&2048&&(s.yScale=a[26].sparkYScale),o[0]&2048&&(s.height=a[26].sparkHeight??19),o[0]&2048&&(s.width=a[26].sparkWidth??90),t.$set(s),(!i||o[0]&2048&&n!==(n="items-"+a[42]+" justify-"+a[42]+" flex svelte-174z7k0"))&&Y(e,"class",n)},i(a){i||(K(t.$$.fragment,a),i=!0)},o(a){re(t.$$.fragment,a),i=!1},d(a){a&&U(e),Ue(t)}}}function GUe(r){let e,t,n,i,a=qn(r[23][r[26].id],r[32],r[27].columnUnitSummary)+"",o,s=r[29]<0&&rU(r),l=r[23][r[26].id]>=0&&iU(r);return{c(){e=oe("div"),s&&s.c(),t=Le(),l&&l.c(),n=Le(),i=oe("div"),o=dt(a),this.h()},l(u){e=se(u,"DIV",{style:!0,class:!0});var c=ge(e);s&&s.l(c),t=Fe(c),l&&l.l(c),n=Fe(c),i=se(c,"DIV",{style:!0,class:!0});var f=ge(i);o=pt(f,a),f.forEach(U),c.forEach(U),this.h()},h(){He(i,"position","relative"),He(i,"z-index","2"),He(i,"padding-left","4px"),He(i,"padding-right","4px"),He(i,"text-align",r[26].align??"left"),He(i,"width",Math.abs(r[30])/((r[29]<0?Math.abs(r[29]):0)+Math.abs(r[30]))*100+"%"),He(i,"left",r[29]<0&&r[30]>=0?Math.abs(r[29])/(Math.abs(r[29])+r[30])*100+"%":"0"),Y(i,"class","svelte-174z7k0"),$r(i,"invisible",r[26].hideLabels),He(e,"width","100%"),He(e,"background-color",r[26].backgroundColor),He(e,"position","relative"),He(e,"height","100%"),He(e,"display","flex"),He(e,"align-items","center"),He(e,"overflow","hidden"),Y(e,"class","svelte-174z7k0")},m(u,c){le(u,e,c),s&&s.m(e,null),X(e,t),l&&l.m(e,null),X(e,n),X(e,i),X(i,o)},p(u,c){u[29]<0?s?s.p(u,c):(s=rU(u),s.c(),s.m(e,t)):s&&(s.d(1),s=null),u[23][u[26].id]>=0?l?l.p(u,c):(l=iU(u),l.c(),l.m(e,n)):l&&(l.d(1),l=null),c[0]&10241&&a!==(a=qn(u[23][u[26].id],u[32],u[27].columnUnitSummary)+"")&&Rt(o,a),c[0]&2048&&He(i,"text-align",u[26].align??"left"),c[0]&10240&&He(i,"width",Math.abs(u[30])/((u[29]<0?Math.abs(u[29]):0)+Math.abs(u[30]))*100+"%"),c[0]&10240&&He(i,"left",u[29]<0&&u[30]>=0?Math.abs(u[29])/(Math.abs(u[29])+u[30])*100+"%":"0"),c[0]&2048&&$r(i,"invisible",u[26].hideLabels),c[0]&2048&&He(e,"background-color",u[26].backgroundColor)},i:xe,o:xe,d(u){u&&U(e),s&&s.d(),l&&l.d()}}}function HUe(r){let e,t;return e=new fA({props:{value:r[23][r[26].id],downIsGood:r[26].downIsGood,format_object:r[32],columnUnitSummary:r[27].columnUnitSummary,showValue:r[26].showValue,showSymbol:r[26].deltaSymbol,align:r[26].align,fontClass:"text-[9.25pt]",neutralMin:r[26].neutralMin,neutralMax:r[26].neutralMax,chip:r[26].chip}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[0]&2049&&(a.value=n[23][n[26].id]),i[0]&2048&&(a.downIsGood=n[26].downIsGood),i[0]&10241&&(a.format_object=n[32]),i[0]&10240&&(a.columnUnitSummary=n[27].columnUnitSummary),i[0]&2048&&(a.showValue=n[26].showValue),i[0]&2048&&(a.showSymbol=n[26].deltaSymbol),i[0]&2048&&(a.align=n[26].align),i[0]&2048&&(a.neutralMin=n[26].neutralMin),i[0]&2048&&(a.neutralMax=n[26].neutralMax),i[0]&2048&&(a.chip=n[26].chip),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function WUe(r){let e;function t(a,o){return a[26].linkLabel!=null&&a[23][a[26].linkLabel]==null&&a[26].linkLabel in a[23]?qUe:jUe}let n=t(r),i=n(r);return{c(){i.c(),e=Xe()},l(a){i.l(a),e=Xe()},m(a,o){i.m(a,o),le(a,e,o)},p(a,o){n===(n=t(a))&&i?i.p(a,o):(i.d(1),i=n(a),i&&(i.c(),i.m(e.parentNode,e)))},i:xe,o:xe,d(a){a&&U(e),i.d(a)}}}function $Ue(r){let e,t,n;return{c(){e=oe("img"),this.h()},l(i){e=se(i,"IMG",{src:!0,alt:!0,class:!0}),this.h()},h(){qO(e.src,t=r[23][r[26].id])||Y(e,"src",t),Y(e,"alt",n=r[26].alt?r[23][r[26].alt]:r[23][r[26].id].replace(/^(.*[/])/g,"").replace(/[.][^.]+$/g,"")),Y(e,"class","mx-auto my-2 max-w-[unset] rounded-[unset] svelte-174z7k0"),He(e,"height",r[26].height),He(e,"width",r[26].width)},m(i,a){le(i,e,a)},p(i,a){a[0]&2049&&!qO(e.src,t=i[23][i[26].id])&&Y(e,"src",t),a[0]&2049&&n!==(n=i[26].alt?i[23][i[26].alt]:i[23][i[26].id].replace(/^(.*[/])/g,"").replace(/[.][^.]+$/g,""))&&Y(e,"alt",n),a[0]&2048&&He(e,"height",i[26].height),a[0]&2048&&He(e,"width",i[26].width)},i:xe,o:xe,d(i){i&&U(e)}}}function rU(r){let e,t=r[23][r[26].id]<0&&nU(r);return{c(){t&&t.c(),e=Xe()},l(n){t&&t.l(n),e=Xe()},m(n,i){t&&t.m(n,i),le(n,e,i)},p(n,i){n[23][n[26].id]<0?t?t.p(n,i):(t=nU(n),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(n){n&&U(e),t&&t.d(n)}}}function nU(r){let e;return{c(){e=oe("div"),this.h()},l(t){e=se(t,"DIV",{style:!0,class:!0}),ge(e).forEach(U),this.h()},h(){He(e,"width",Math.min(Math.abs(r[23][r[26].id]/r[41]*100),100)+"%"),He(e,"background-color",r[26].negativeBarColor),He(e,"height","100%"),He(e,"position","absolute"),He(e,"right",(1-Math.abs(r[29])/(Math.abs(r[29])+r[30]))*100+"%"),Y(e,"class","svelte-174z7k0")},m(t,n){le(t,e,n)},p(t,n){n[0]&10241&&He(e,"width",Math.min(Math.abs(t[23][t[26].id]/t[41]*100),100)+"%"),n[0]&2048&&He(e,"background-color",t[26].negativeBarColor),n[0]&10240&&He(e,"right",(1-Math.abs(t[29])/(Math.abs(t[29])+t[30]))*100+"%")},d(t){t&&U(e)}}}function iU(r){let e;return{c(){e=oe("div"),this.h()},l(t){e=se(t,"DIV",{style:!0,class:!0}),ge(e).forEach(U),this.h()},h(){He(e,"width",Math.min(r[23][r[26].id]/r[41]*100,100)+"%"),He(e,"background-color",r[26].barColor),He(e,"height","100%"),He(e,"position","absolute"),He(e,"left",r[29]<0?Math.abs(r[29])/(Math.abs(r[29])+r[30])*100+"%":"0"),Y(e,"class","svelte-174z7k0")},m(t,n){le(t,e,n)},p(t,n){n[0]&10241&&He(e,"width",Math.min(t[23][t[26].id]/t[41]*100,100)+"%"),n[0]&2048&&He(e,"background-color",t[26].barColor),n[0]&10240&&He(e,"left",t[29]<0?Math.abs(t[29])/(Math.abs(t[29])+t[30])*100+"%":"0")},d(t){t&&U(e)}}}function jUe(r){let e,t,n;function i(l,u){return l[26].linkLabel!=null?YUe:aU}function a(l,u){return u===aU?LUe(l):l}let o=i(r),s=o(a(r,o));return{c(){e=oe("a"),s.c(),this.h()},l(l){e=se(l,"A",{href:!0,target:!0,class:!0});var u=ge(e);s.l(u),u.forEach(U),this.h()},h(){Y(e,"href",t=vd(r[23][r[26].id])),Y(e,"target",n=r[26].openInNewTab?"_blank":""),Y(e,"class","text-primary hover:brightness-110 transition-colors duration-200 svelte-174z7k0")},m(l,u){le(l,e,u),s.m(e,null)},p(l,u){o===(o=i(l))&&s?s.p(a(l,o),u):(s.d(1),s=o(a(l,o)),s&&(s.c(),s.m(e,null))),u[0]&2049&&t!==(t=vd(l[23][l[26].id]))&&Y(e,"href",t),u[0]&2048&&n!==(n=l[26].openInNewTab?"_blank":"")&&Y(e,"target",n)},d(l){l&&U(e),s.d()}}}function qUe(r){let e;return{c(){e=dt("-")},l(t){e=pt(t,"-")},m(t,n){le(t,e,n)},p:xe,d(t){t&&U(e)}}}function aU(r){var n;let e=qn(r[23][r[26].id],r[26].fmt?Di(r[26].fmt,(n=r[13].format)==null?void 0:n.valueType):r[13].format,r[13].columnUnitSummary)+"",t;return{c(){t=dt(e)},l(i){t=pt(i,e)},m(i,a){le(i,t,a)},p(i,a){var o;a[0]&10241&&e!==(e=qn(i[23][i[26].id],i[26].fmt?Di(i[26].fmt,(o=i[13].format)==null?void 0:o.valueType):i[13].format,i[13].columnUnitSummary)+"")&&Rt(t,e)},d(i){i&&U(t)}}}function YUe(r){let e;function t(o,s){return o[23][o[26].linkLabel]!=null?oU:ZUe}function n(o,s){return s===oU?IUe(o):o}let i=t(r),a=i(n(r,i));return{c(){a.c(),e=Xe()},l(o){a.l(o),e=Xe()},m(o,s){a.m(o,s),le(o,e,s)},p(o,s){i===(i=t(o))&&a?a.p(n(o,i),s):(a.d(1),a=i(n(o,i)),a&&(a.c(),a.m(e.parentNode,e)))},d(o){o&&U(e),a.d(o)}}}function ZUe(r){let e=r[26].linkLabel+"",t;return{c(){t=dt(e)},l(n){t=pt(n,e)},m(n,i){le(n,t,i)},p(n,i){i[0]&2048&&e!==(e=n[26].linkLabel+"")&&Rt(t,e)},d(n){n&&U(t)}}}function oU(r){var n;let e=qn(r[23][r[26].linkLabel],r[26].fmt?Di(r[26].fmt,(n=r[40].format)==null?void 0:n.valueType):r[40].format,r[40].columnUnitSummary)+"",t;return{c(){t=dt(e)},l(i){t=pt(i,e)},m(i,a){le(i,t,a)},p(i,a){var o;a[0]&10241&&e!==(e=qn(i[23][i[26].linkLabel],i[26].fmt?Di(i[26].fmt,(o=i[40].format)==null?void 0:o.valueType):i[40].format,i[40].columnUnitSummary)+"")&&Rt(t,e)},d(i){i&&U(t)}}}function KUe(r){let e,t,n,i;const a=[$Ue,WUe,HUe,GUe,UUe,VUe,zUe,NUe,RUe],o=[];function s(u,c){return u[26].contentType==="image"&&u[23][u[26].id]!==void 0?0:u[26].contentType==="link"&&u[23][u[26].id]!==void 0?1:u[26].contentType==="delta"&&u[23][u[26].id]!==void 0?2:u[26].contentType==="bar"&&u[23][u[26].id]!==void 0?3:u[26].contentType==="sparkline"&&u[23][u[26].id]!==void 0?4:u[26].contentType==="sparkbar"&&u[23][u[26].id]!==void 0?5:u[26].contentType==="sparkarea"&&u[23][u[26].id]!==void 0?6:u[26].contentType==="html"&&u[23][u[26].id]!==void 0?7:8}function l(u,c){return c===3?OUe(u):c===4?BUe(u):c===6?FUe(u):u}return e=s(r),t=o[e]=a[e](l(r,e)),{c(){t.c(),n=Xe()},l(u){t.l(u),n=Xe()},m(u,c){o[e].m(u,c),le(u,n,c),i=!0},p(u,c){let f=e;e=s(u),e===f?o[e].p(l(u,e),c):(Mt(),re(o[f],1,1,()=>{o[f]=null}),It(),t=o[e],t?t.p(l(u,e),c):(t=o[e]=a[e](l(u,e)),t.c()),K(t,1),t.m(n.parentNode,n))},i(u){i||(K(t),i=!0)},o(u){re(t),i=!1},d(u){u&&U(n),o[e].d(u)}}}function sU(r){var n;let e,t;return e=new nc({props:{class:(n=r[27])==null?void 0:n.type,compact:r[12],verticalAlign:r[7]==="section"?r[10]:void 0,rowSpan:r[7]==="section"&&r[8]===r[27].id&&r[25]===0?r[9]:1,show:!(r[7]==="section"&&r[8]===r[27].id&&r[25]!==0),align:r[26].align,paddingLeft:r[39]===0&&r[6]&&r[7]==="accordion"&&!r[3]?"28px":void 0,height:r[26].height,width:r[26].width,wrap:r[26].wrap,cellColor:r[35],fontColor:r[36],borderBottom:r[37],$$slots:{default:[KUe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(i){ze(e.$$.fragment,i)},m(i,a){Ve(e,i,a),t=!0},p(i,a){var s;const o={};a[0]&10240&&(o.class=(s=i[27])==null?void 0:s.type),a[0]&4096&&(o.compact=i[12]),a[0]&1152&&(o.verticalAlign=i[7]==="section"?i[10]:void 0),a[0]&11136&&(o.rowSpan=i[7]==="section"&&i[8]===i[27].id&&i[25]===0?i[9]:1),a[0]&10624&&(o.show=!(i[7]==="section"&&i[8]===i[27].id&&i[25]!==0)),a[0]&2048&&(o.align=i[26].align),a[0]&200&&(o.paddingLeft=i[39]===0&&i[6]&&i[7]==="accordion"&&!i[3]?"28px":void 0),a[0]&2048&&(o.height=i[26].height),a[0]&2048&&(o.width=i[26].width),a[0]&2048&&(o.wrap=i[26].wrap),a[0]&26625&&(o.cellColor=i[35]),a[0]&26625&&(o.fontColor=i[36]),a[0]&26641&&(o.borderBottom=i[37]),a[0]&10241|a[1]&4096&&(o.$$scope={dirty:a,ctx:i}),e.$set(o)},i(i){t||(K(e.$$.fragment,i),t=!0)},o(i){re(e.$$.fragment,i),t=!1},d(i){Ue(e,i)}}}function lU(r){let e,t;return e=new nc({props:{compact:r[12],width:"16px",$$slots:{default:[XUe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[0]&4096&&(a.compact=n[12]),i[0]&5|i[1]&4096&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function XUe(r){let e,t,n,i,a,o;return e=new Ao({props:{src:n$,class:"w-4 h-4"}}),{c(){Ne(e.$$.fragment),t=Le(),n=oe("a"),i=dt("See more"),this.h()},l(s){ze(e.$$.fragment,s),t=Fe(s),n=se(s,"A",{href:!0,class:!0});var l=ge(n);i=pt(l,"See more"),l.forEach(U),this.h()},h(){Y(n,"href",a=vd(r[23][r[2]])),Y(n,"class","sr-only svelte-174z7k0")},m(s,l){Ve(e,s,l),le(s,t,l),le(s,n,l),X(n,i),o=!0},p(s,l){(!o||l[0]&5&&a!==(a=vd(s[23][s[2]])))&&Y(n,"href",a)},i(s){o||(K(e.$$.fragment,s),o=!0)},o(s){re(e.$$.fragment,s),o=!1},d(s){s&&(U(t),U(n)),Ue(e,s)}}}function uU(r){let e,t,n,i,a,o,s,l=r[3]&&r[7]!=="section"&&tU(r),u=Lr(r[11]),c=[];for(let v=0;vre(c[v],1,1,()=>{c[v]=null});let h=r[2]&&r[23][r[2]]&&lU(r);function d(){return r[19](r[23])}function p(){return r[20](r[23])}function g(){return r[21](r[23])}return{c(){e=oe("tr"),l&&l.c(),t=Le();for(let v=0;v{l=null}),It()),m[0]&32729){u=Lr(r[11]);let y;for(y=0;y{h=null}),It()),(!a||m[0]&2)&&$r(e,"shaded-row",r[1]&&r[25]%2===1),(!a||m[0]&5)&&$r(e,"row-link",r[2]&&r[23][r[2]]),(!a||m[0]&16)&&$r(e,"row-lines",r[4])},i(v){if(!a){K(l);for(let m=0;mre(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;onew URL(D,window.location.origin).origin!==window.location.origin,b=async D=>{if(!o||!D[o])return;const E=D[o];y(E)||await Gne(E)},_=async D=>{if(!o||!D[o])return;const E=D[o];if(y(E)){window.location=vd(E);return}await Hne(vd(D[o]))},{theme:w}=E1();y1(r,w,D=>t(14,n=D));const S=(D,E)=>E.id===D.scaleColumn,C=D=>b(D),A=D=>b(D),x=D=>_(D);return r.$$set=D=>{"displayedData"in D&&t(0,i=D.displayedData),"rowShading"in D&&t(1,a=D.rowShading),"link"in D&&t(2,o=D.link),"rowNumbers"in D&&t(3,s=D.rowNumbers),"rowLines"in D&&t(4,l=D.rowLines),"index"in D&&t(5,u=D.index),"columnSummary"in D&&t(13,c=D.columnSummary),"grouped"in D&&t(6,f=D.grouped),"groupType"in D&&t(7,h=D.groupType),"groupColumn"in D&&t(8,d=D.groupColumn),"rowSpan"in D&&t(9,p=D.rowSpan),"groupNamePosition"in D&&t(10,g=D.groupNamePosition),"orderedColumns"in D&&t(11,v=D.orderedColumns),"compact"in D&&t(12,m=D.compact)},[i,a,o,s,l,u,f,h,d,p,g,v,m,c,n,b,_,w,S,C,A,x]}class EO extends kr{constructor(e){super(),Tr(this,e,JUe,QUe,Mr,{displayedData:0,rowShading:1,link:2,rowNumbers:3,rowLines:4,index:5,columnSummary:13,grouped:6,groupType:7,groupColumn:8,rowSpan:9,groupNamePosition:10,orderedColumns:11,compact:12},null,[-1,-1])}}function cU(r,e,t){const n=r.slice();n[8]=e[t];const i=Is(n[8],n[2]);n[9]=i;const a=n[8].totalFmt?Di(n[8].totalFmt):n[8].fmt?Di(n[8].fmt):n[9].format;n[10]=a;const o=n[8].totalAgg??"sum";return n[11]=o,n}function fU(r){let e,t;return e=new nc({props:{class:"index w-[2%]",compact:r[7],topBorder:"border-t border-base-300"}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&128&&(a.compact=n[7]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function eGe(r){let e=(r[8].totalFmt?qn(r[11],r[10],r[9].columnUnitSummary):r[11])+"",t;return{c(){t=dt(e)},l(n){t=pt(n,e)},m(n,i){le(n,t,i)},p(n,i){i&68&&e!==(e=(n[8].totalFmt?qn(n[11],n[10],n[9].columnUnitSummary):n[11])+"")&&Rt(t,e)},i:xe,o:xe,d(n){n&&U(t)}}}function tGe(r){let e,t,n,i;const a=[nGe,rGe],o=[];function s(l,u){return l[8].contentType==="delta"?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),le(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Mt(),re(o[c],1,1,()=>{o[c]=null}),It(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),o[e].d(l)}}}function rGe(r){let e=qn(r[11]==="weightedMean"?b2(r[0],r[8].id,r[8].weightCol):r[9].columnUnitSummary[r[11]],r[10],r[9].columnUnitSummary)+"",t;return{c(){t=dt(e)},l(n){t=pt(n,e)},m(n,i){le(n,t,i)},p(n,i){i&69&&e!==(e=qn(n[11]==="weightedMean"?b2(n[0],n[8].id,n[8].weightCol):n[9].columnUnitSummary[n[11]],n[10],n[9].columnUnitSummary)+"")&&Rt(t,e)},i:xe,o:xe,d(n){n&&U(t)}}}function nGe(r){let e,t;return e=new fA({props:{value:r[11]==="weightedMean"?b2(r[0],r[8].id,r[8].weightCol):r[9].columnUnitSummary[r[11]],downIsGood:r[8].downIsGood,format_object:r[10],columnUnitSummary:r[9].columnUnitSummary,showValue:r[8].showValue,showSymbol:r[8].deltaSymbol,align:r[8].align,fontClass:"font-semibold text-[9.25pt]",neutralMin:r[8].neutralMin,neutralMax:r[8].neutralMax,chip:r[8].chip}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&69&&(a.value=n[11]==="weightedMean"?b2(n[0],n[8].id,n[8].weightCol):n[9].columnUnitSummary[n[11]]),i&64&&(a.downIsGood=n[8].downIsGood),i&68&&(a.format_object=n[10]),i&68&&(a.columnUnitSummary=n[9].columnUnitSummary),i&64&&(a.showValue=n[8].showValue),i&64&&(a.showSymbol=n[8].deltaSymbol),i&64&&(a.align=n[8].align),i&64&&(a.neutralMin=n[8].neutralMin),i&64&&(a.neutralMax=n[8].neutralMax),i&64&&(a.chip=n[8].chip),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function iGe(r){let e,t,n,i,a;const o=[tGe,eGe],s=[];function l(u,c){return c&64&&(e=null),e==null&&(e=!!["sum","mean","weightedMean","median","min","max","count","countDistinct"].includes(u[11])),e?0:1}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Le()},l(u){n.l(u),i=Fe(u)},m(u,c){s[t].m(u,c),le(u,i,c),a=!0},p(u,c){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Mt(),re(s[f],1,1,()=>{s[f]=null}),It(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),K(n,1),n.m(i.parentNode,i))},i(u){a||(K(n),a=!0)},o(u){re(n),a=!1},d(u){u&&U(i),s[t].d(u)}}}function hU(r){let e,t;return e=new nc({props:{compact:r[7],dataType:r[9].type,align:r[8].align,height:r[8].height,width:r[8].width,wrap:r[8].wrap,topBorder:"border-t border-base-content-muted",$$slots:{default:[iGe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&128&&(a.compact=n[7]),i&68&&(a.dataType=n[9].type),i&64&&(a.align=n[8].align),i&64&&(a.height=n[8].height),i&64&&(a.width=n[8].width),i&64&&(a.wrap=n[8].wrap),i&16453&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function aGe(r){let e,t,n,i=r[1]&&r[5]!=="section"&&fU(r),a=Lr(r[6]),o=[];for(let l=0;lre(o[l],1,1,()=>{o[l]=null});return{c(){e=oe("tr"),i&&i.c(),t=Le();for(let l=0;l{i=null}),It()),u&197){a=Lr(l[6]);let c;for(c=0;c{"data"in f&&t(0,n=f.data),"rowNumbers"in f&&t(1,i=f.rowNumbers),"columnSummary"in f&&t(2,a=f.columnSummary),"rowColor"in f&&t(3,o=f.rowColor),"fontColor"in f&&t(4,s=f.fontColor),"groupType"in f&&t(5,l=f.groupType),"orderedColumns"in f&&t(6,u=f.orderedColumns),"compact"in f&&t(7,c=f.compact)},[n,i,a,o,s,l,u,c]}class sGe extends kr{constructor(e){super(),Tr(this,e,oGe,aGe,Mr,{data:0,rowNumbers:1,columnSummary:2,rowColor:3,fontColor:4,groupType:5,orderedColumns:6,compact:7})}}function dU(r,e,t){var l,u;const n=r.slice();n[9]=e[t];const i=Is(n[9],n[2]);n[10]=i;const a=n[9].fmt?Di(n[9].fmt,(l=n[10].format)==null?void 0:l.valueType):n[10].format;n[11]=a;const o=n[9].subtotalFmt?Di(n[9].subtotalFmt):n[9].totalFmt?Di(n[9].totalFmt):n[11];n[12]=o;const s=((u=n[12])==null?void 0:u.valueType)==="date"?"":n[12];return n[13]=s,n}function lGe(r){let e;return{c(){e=dt(r[0])},l(t){e=pt(t,r[0])},m(t,n){le(t,e,n)},p(t,n){n&1&&Rt(e,t[0])},i:xe,o:xe,d(t){t&&U(e)}}}function uGe(r){let e,t,n,i;const a=[fGe,cGe],o=[];function s(l,u){return l[9].contentType==="delta"?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),le(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Mt(),re(o[c],1,1,()=>{o[c]=null}),It(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),o[e].d(l)}}}function cGe(r){let e=qn(Wu(r[1],r[9].id,r[9].totalAgg,r[10].type,r[9].weightCol),r[13],r[10].columnUnitSummary)+"",t;return{c(){t=dt(e)},l(n){t=pt(n,e)},m(n,i){le(n,t,i)},p(n,i){i&134&&e!==(e=qn(Wu(n[1],n[9].id,n[9].totalAgg,n[10].type,n[9].weightCol),n[13],n[10].columnUnitSummary)+"")&&Rt(t,e)},i:xe,o:xe,d(n){n&&U(t)}}}function fGe(r){let e,t;return e=new fA({props:{value:Wu(r[1],r[9].id,r[9].totalAgg,r[10].type,r[9].weightCol),downIsGood:r[9].downIsGood,format_object:r[11],columnUnitSummary:r[10].columnUnitSummary,showValue:r[9].showValue,showSymbol:r[9].deltaSymbol,align:r[9].align,fontClass:"font-medium text-[9.25pt]",neutralMin:r[9].neutralMin,neutralMax:r[9].neutralMax,chip:r[9].chip}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&134&&(a.value=Wu(n[1],n[9].id,n[9].totalAgg,n[10].type,n[9].weightCol)),i&128&&(a.downIsGood=n[9].downIsGood),i&132&&(a.format_object=n[11]),i&132&&(a.columnUnitSummary=n[10].columnUnitSummary),i&128&&(a.showValue=n[9].showValue),i&128&&(a.showSymbol=n[9].deltaSymbol),i&128&&(a.align=n[9].align),i&128&&(a.neutralMin=n[9].neutralMin),i&128&&(a.neutralMax=n[9].neutralMax),i&128&&(a.chip=n[9].chip),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function hGe(r){let e,t,n,i;const a=[uGe,lGe],o=[];function s(l,u){return l[9].id!==l[4]?0:l[5]==="section"?1:-1}return~(e=s(r))&&(t=o[e]=a[e](r)),{c(){t&&t.c(),n=Le()},l(l){t&&t.l(l),n=Fe(l)},m(l,u){~e&&o[e].m(l,u),le(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?~e&&o[e].p(l,u):(t&&(Mt(),re(o[c],1,1,()=>{o[c]=null}),It()),~e?(t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n)):t=null)},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),~e&&o[e].d(l)}}}function pU(r){let e,t;return e=new nc({props:{class:r[10].type+" font-medium",compact:r[8],align:r[9].align,$$slots:{default:[hGe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&132&&(a.class=n[10].type+" font-medium"),i&256&&(a.compact=n[8]),i&128&&(a.align=n[9].align),i&65719&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function dGe(r){let e,t,n=Lr(r[7]),i=[];for(let o=0;ore(i[o],1,1,()=>{i[o]=null});return{c(){e=oe("tr");for(let o=0;o{"groupName"in h&&t(0,n=h.groupName),"currentGroupData"in h&&t(1,i=h.currentGroupData),"columnSummary"in h&&t(2,a=h.columnSummary),"rowColor"in h&&t(3,o=h.rowColor),"groupBy"in h&&t(4,s=h.groupBy),"groupType"in h&&t(5,l=h.groupType),"fontColor"in h&&t(6,u=h.fontColor),"orderedColumns"in h&&t(7,c=h.orderedColumns),"compact"in h&&t(8,f=h.compact)},[n,i,a,o,s,l,u,c,f]}class gGe extends kr{constructor(e){super(),Tr(this,e,pGe,dGe,Mr,{groupName:0,currentGroupData:1,columnSummary:2,rowColor:3,groupBy:4,groupType:5,fontColor:6,orderedColumns:7,compact:8})}}function vGe(r){let e,t;return e=new Ao({props:{src:r$,class:"w-[10px] h-[10px] mb-0.5 inline"}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function mGe(r){let e,t;return e=new Ao({props:{src:Hle,class:"w-[10px] h-[10px] mb-0.5 inline"}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function yGe(r){let e,t,n,i;const a=[mGe,vGe],o=[];function s(l,u){return l[0]?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),le(l,n,u),i=!0},p(l,[u]){let c=e;e=s(l),e!==c&&(Mt(),re(o[c],1,1,()=>{o[c]=null}),It(),t=o[e],t||(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),o[e].d(l)}}}function bGe(r,e,t){let{ascending:n}=e;return r.$$set=i=>{"ascending"in i&&t(0,n=i.ascending)},[n]}class _re extends kr{constructor(e){super(),Tr(this,e,bGe,yGe,Mr,{ascending:0})}}function gU(r,e,t){const n=r.slice();return n[12]=e[t],n}function vU(r,e,t){const n=r.slice();return n[12]=e[t],n}function jk(r){const e=r.slice(),t=e[3].map((n,i,a)=>{let o=i===0||n.colGroup!==a[i-1].colGroup,s=1;if(n.colGroup)for(let l=i+1;l0&&yU(r);return{c(){t&&t.c(),e=Xe()},l(n){t&&t.l(n),e=Xe()},m(n,i){t&&t.m(n,i),le(n,e,i)},p(n,i){n[15].length>0?t?t.p(n,i):(t=yU(n),t.c(),t.m(e.parentNode,e)):t&&(t.d(1),t=null)},d(n){n&&U(e),t&&t.d(n)}}}function yU(r){let e,t,n=r[0]&&bU(r),i=Lr(r[15]),a=[];for(let o=0;o{b[C]=null}),It(),c=b[u],c?c.p(r,S):(c=b[u]=y[u](r),c.c()),K(c,1),c.m(l,null)),(!g||S&1544&&f!==(f="tracking-normal "+(r[9]||r[12].wrapTitle?"ml-0.5":"")+" "+(r[10]?"mr-1":"")))&&Y(l,"class",f),(!g||S&520&&h!==(h=(r[9]||r[12].wrapTitle?"flex items-end":"")+" tracking-[-1.5px]"))&&Y(t,"class",h),(!g||S&1048&&p!==(p=Is(r[12],r[4]).type+" "+(r[10]?"text-xs py-[1px] pl-[1px]":"py-[2px] pl-[6px]")+" svelte-1q0vbz4"))&&Y(e,"class",p),S&8&&He(e,"text-align",r[12].align??(["sparkline","sparkbar","sparkarea","bar"].includes(r[12].contentType)?"center":void 0)),S&4&&He(e,"color",r[2]),S&2&&He(e,"background",r[1]),S&32&&He(e,"cursor",r[5]?"pointer":"auto"),S&264&&He(e,"border-radius",r[8].col===r[12].id?"2px":"")},i(w){g||(K(c),g=!0)},o(w){re(c),g=!1},d(w){w&&U(e),b[u].d(),v=!1,m()}}}function CU(r){let e,t='Links';return{c(){e=oe("th"),e.innerHTML=t,this.h()},l(n){e=se(n,"TH",{role:!0,class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-17az424"&&(e.innerHTML=t),this.h()},h(){Y(e,"role","columnheader"),Y(e,"class","svelte-1q0vbz4")},m(n,i){le(n,e,i)},d(n){n&&U(e)}}}function xGe(r){let e,t,n,i,a,o,s=r[3].length>0&&mU(jk(r)),l=r[0]&&wU(r),u=Lr(r[3]),c=[];for(let d=0;dre(c[d],1,1,()=>{c[d]=null});let h=r[11]&&CU();return{c(){e=oe("thead"),s&&s.c(),t=Le(),n=oe("tr"),l&&l.c(),i=Le();for(let d=0;d0?s?s.p(jk(d),p):(s=mU(jk(d)),s.c(),s.m(e,t)):s&&(s.d(1),s=null),d[0]?l?l.p(d,p):(l=wU(d),l.c(),l.m(n,i)):l&&(l.d(1),l=null),p&2046){u=Lr(d[3]);let g;for(g=0;g{"rowNumbers"in g&&t(0,n=g.rowNumbers),"headerColor"in g&&t(1,i=g.headerColor),"headerFontColor"in g&&t(2,a=g.headerFontColor),"orderedColumns"in g&&t(3,o=g.orderedColumns),"columnSummary"in g&&t(4,s=g.columnSummary),"sortable"in g&&t(5,l=g.sortable),"sortClick"in g&&t(6,u=g.sortClick),"formatColumnTitles"in g&&t(7,c=g.formatColumnTitles),"sortObj"in g&&t(8,f=g.sortObj),"wrapTitles"in g&&t(9,h=g.wrapTitles),"compact"in g&&t(10,d=g.compact),"link"in g&&t(11,p=g.link)},[n,i,a,o,s,l,u,c,f,h,d,p]}class EGe extends kr{constructor(e){super(),Tr(this,e,DGe,xGe,Mr,{rowNumbers:0,headerColor:1,headerFontColor:2,orderedColumns:3,columnSummary:4,sortable:5,sortClick:6,formatColumnTitles:7,sortObj:8,wrapTitles:9,compact:10,link:11})}}function kGe(r){let e,t,n,i;return{c(){e=oe("span"),t=zi("svg"),n=zi("path"),this.h()},l(a){e=se(a,"SPAN",{"aria-expanded":!0,class:!0});var o=ge(e);t=Vi(o,"svg",{viewBox:!0,width:!0,height:!0,class:!0});var s=ge(t);n=Vi(s,"path",{fill:!0,"fill-rule":!0,d:!0}),ge(n).forEach(U),s.forEach(U),o.forEach(U),this.h()},h(){Y(n,"fill",i=r[1]??r[3].colors["base-content"]),Y(n,"fill-rule","evenodd"),Y(n,"d","M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"),Y(t,"viewBox","0 0 16 16"),Y(t,"width",r[2]),Y(t,"height",r[2]),Y(t,"class","svelte-c6mrxw"),Y(e,"aria-expanded",r[0]),Y(e,"class","inline-flex svelte-c6mrxw")},m(a,o){le(a,e,o),X(e,t),X(t,n)},p(a,[o]){o&10&&i!==(i=a[1]??a[3].colors["base-content"])&&Y(n,"fill",i),o&4&&Y(t,"width",a[2]),o&4&&Y(t,"height",a[2]),o&1&&Y(e,"aria-expanded",a[0])},i:xe,o:xe,d(a){a&&U(e)}}}function TGe(r,e,t){let n,{toggled:i=!1}=e,{color:a=void 0}=e,{size:o=10}=e;const{theme:s}=E1();return y1(r,s,l=>t(3,n=l)),r.$$set=l=>{"toggled"in l&&t(0,i=l.toggled),"color"in l&&t(1,a=l.color),"size"in l&&t(2,o=l.size)},[i,a,o,n,s]}class MGe extends kr{constructor(e){super(),Tr(this,e,TGe,kGe,Mr,{toggled:0,color:1,size:2})}}function AU(r,e,t){var l,u;const n=r.slice();n[12]=e[t],n[18]=t;const i=Is(n[12],n[3]);n[13]=i;const a=n[12].fmt?Di(n[12].fmt,(l=n[13].format)==null?void 0:l.valueType):n[13].format;n[14]=a;const o=n[12].subtotalFmt?Di(n[12].subtotalFmt):n[12].totalFmt?Di(n[12].totalFmt):n[14];n[15]=o;const s=((u=n[15])==null?void 0:u.valueType)==="date"?"":n[15];return n[16]=s,n}function IGe(r){let e,t;return e=new nc({}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p:xe,i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function LGe(r){let e,t;return e=new nc({props:{class:r[13].type+" font-medium",compact:r[8],align:r[12].align,$$slots:{default:[NGe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&136&&(a.class=n[13].type+" font-medium"),i&256&&(a.compact=n[8]),i&128&&(a.align=n[12].align),i&524426&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function FGe(r){let e,t;return e=new nc({props:{class:"font-medium py-[3px]",compact:r[8],colSpan:r[4]?2:1,paddingLeft:"1px",$$slots:{default:[zGe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&256&&(a.compact=n[8]),i&16&&(a.colSpan=n[4]?2:1),i&524293&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function BGe(r){let e=r[12].totalAgg+"",t;return{c(){t=dt(e)},l(n){t=pt(n,e)},m(n,i){le(n,t,i)},p(n,i){i&128&&e!==(e=n[12].totalAgg+"")&&Rt(t,e)},i:xe,o:xe,d(n){n&&U(t)}}}function OGe(r){let e,t,n,i;const a=[RGe,PGe],o=[];function s(l,u){return l[12].contentType==="delta"?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),le(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Mt(),re(o[c],1,1,()=>{o[c]=null}),It(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),o[e].d(l)}}}function PGe(r){let e=qn(Wu(r[1],r[12].id,r[12].totalAgg,r[13].type,r[12].weightCol),r[16],r[13].columnUnitSummary)+"",t;return{c(){t=dt(e)},l(n){t=pt(n,e)},m(n,i){le(n,t,i)},p(n,i){i&138&&e!==(e=qn(Wu(n[1],n[12].id,n[12].totalAgg,n[13].type,n[12].weightCol),n[16],n[13].columnUnitSummary)+"")&&Rt(t,e)},i:xe,o:xe,d(n){n&&U(t)}}}function RGe(r){let e,t;return e=new fA({props:{value:Wu(r[1],r[12].id,r[12].totalAgg,r[13].type,r[12].weightCol),downIsGood:r[12].downIsGood,format_object:r[16],columnUnitSummary:r[13].columnUnitSummary,showValue:r[12].showValue,showSymbol:r[12].deltaSymbol,align:r[12].align,fontClass:"font-medium text-[9.25pt]",neutralMin:r[12].neutralMin,neutralMax:r[12].neutralMax,chip:r[12].chip}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&138&&(a.value=Wu(n[1],n[12].id,n[12].totalAgg,n[13].type,n[12].weightCol)),i&128&&(a.downIsGood=n[12].downIsGood),i&136&&(a.format_object=n[16]),i&136&&(a.columnUnitSummary=n[13].columnUnitSummary),i&128&&(a.showValue=n[12].showValue),i&128&&(a.showSymbol=n[12].deltaSymbol),i&128&&(a.align=n[12].align),i&128&&(a.neutralMin=n[12].neutralMin),i&128&&(a.neutralMax=n[12].neutralMax),i&128&&(a.chip=n[12].chip),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function NGe(r){let e,t,n,i,a;const o=[OGe,BGe],s=[];function l(u,c){return c&128&&(e=null),e==null&&(e=!!([void 0,"sum","mean","median","min","max","weightedMean","count","countDistinct"].includes(u[12].totalAgg)||u[12].subtotalFmt)),e?0:1}return t=l(r,-1),n=s[t]=o[t](r),{c(){n.c(),i=Le()},l(u){n.l(u),i=Fe(u)},m(u,c){s[t].m(u,c),le(u,i,c),a=!0},p(u,c){let f=t;t=l(u,c),t===f?s[t].p(u,c):(Mt(),re(s[f],1,1,()=>{s[f]=null}),It(),n=s[t],n?n.p(u,c):(n=s[t]=o[t](u),n.c()),K(n,1),n.m(i.parentNode,i))},i(u){a||(K(n),a=!0)},o(u){re(n),a=!1},d(u){u&&U(i),s[t].d(u)}}}function zGe(r){let e,t,n,i,a,o,s;return n=new MGe({props:{toggled:r[2]}}),{c(){e=oe("div"),t=oe("span"),Ne(n.$$.fragment),i=Le(),a=dt(r[0]),o=Le(),this.h()},l(l){e=se(l,"DIV",{class:!0});var u=ge(e);t=se(u,"SPAN",{class:!0});var c=ge(t);ze(n.$$.fragment,c),c.forEach(U),i=Fe(u),a=pt(u,r[0]),u.forEach(U),o=Fe(l),this.h()},h(){Y(t,"class","inline-flex print-hidden chevron svelte-bqpzbr"),Y(e,"class","items-center gap-2 align-top")},m(l,u){le(l,e,u),X(e,t),Ve(n,t,null),X(e,i),X(e,a),le(l,o,u),s=!0},p(l,u){const c={};u&4&&(c.toggled=l[2]),n.$set(c),(!s||u&1)&&Rt(a,l[0])},i(l){s||(K(n.$$.fragment,l),s=!0)},o(l){re(n.$$.fragment,l),s=!1},d(l){l&&(U(e),U(o)),Ue(n)}}}function xU(r){let e,t,n,i;const a=[FGe,LGe,IGe],o=[];function s(l,u){return l[18]===0?0:l[6]?1:2}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),le(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Mt(),re(o[c],1,1,()=>{o[c]=null}),It(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),o[e].d(l)}}}function VGe(r){let e,t,n,i,a=Lr(r[7]),o=[];for(let l=0;lre(o[l],1,1,()=>{o[l]=null});return{c(){e=oe("tr");for(let l=0;lg.key==="Enter"&&d();return r.$$set=g=>{"groupName"in g&&t(0,n=g.groupName),"currentGroupData"in g&&t(1,i=g.currentGroupData),"toggled"in g&&t(2,a=g.toggled),"columnSummary"in g&&t(3,o=g.columnSummary),"rowNumbers"in g&&t(4,s=g.rowNumbers),"rowColor"in g&&t(5,l=g.rowColor),"subtotals"in g&&t(6,u=g.subtotals),"orderedColumns"in g&&t(7,c=g.orderedColumns),"compact"in g&&t(8,f=g.compact)},[n,i,a,o,s,l,u,c,f,d,p]}class GGe extends kr{constructor(e){super(),Tr(this,e,UGe,VGe,Mr,{groupName:0,currentGroupData:1,toggled:2,columnSummary:3,rowNumbers:4,rowColor:5,subtotals:6,orderedColumns:7,compact:8})}}function DU(r){let e,t,n,i="Fullscreen",a,o,s,l,u,c;return o=new Ao({props:{class:"w-3 h-3",src:Rle}}),{c(){e=oe("div"),t=oe("button"),n=oe("span"),n.textContent=i,a=Le(),Ne(o.$$.fragment),this.h()},l(f){e=se(f,"DIV",{});var h=ge(e);t=se(h,"BUTTON",{type:!0,"aria-label":!0,class:!0});var d=ge(t);n=se(d,"SPAN",{"data-svelte-h":!0}),kt(n)!=="svelte-qzhydn"&&(n.textContent=i),a=Fe(d),ze(o.$$.fragment,d),d.forEach(U),h.forEach(U),this.h()},h(){Y(t,"type","button"),Y(t,"aria-label","Enter Fullscreen"),Y(t,"class","svelte-1grvppi")},m(f,h){le(f,e,h),X(e,t),X(t,n),X(t,a),Ve(o,t,null),l=!0,u||(c=_n(t,"click",r[1]),u=!0)},i(f){l||(K(o.$$.fragment,f),f&&Pd(()=>{l&&(s||(s=Gl(e,md,{duration:200},!0)),s.run(1))}),l=!0)},o(f){re(o.$$.fragment,f),f&&(s||(s=Gl(e,md,{duration:200},!1)),s.run(0)),l=!1},d(f){f&&U(e),Ue(o),f&&s&&s.end(),u=!1,c()}}}function HGe(r){let e,t,n=r[0]&&DU(r);return{c(){n&&n.c(),e=Xe()},l(i){n&&n.l(i),e=Xe()},m(i,a){n&&n.m(i,a),le(i,e,a),t=!0},p(i,[a]){i[0]?n?a&1&&K(n,1):(n=DU(i),n.c(),K(n,1),n.m(e.parentNode,e)):n&&(Mt(),re(n,1,1,()=>{n=null}),It())},i(i){t||(K(n),t=!0)},o(i){re(n),t=!1},d(i){i&&U(e),n&&n.d(i)}}}function WGe(r,e,t){let{display:n}=e;function i(a){jne.call(this,r,a)}return r.$$set=a=>{"display"in a&&t(0,n=a.display)},[n,i]}class wre extends kr{constructor(e){super(),Tr(this,e,WGe,HGe,Mr,{display:0})}}const $Ge=r=>Object.keys(Sre).includes(r),Sre={grey:"base-content-muted",blue:"info",green:"positive",yellow:"warning",red:"negative",bluegreen:"positive"},jGe=(r,e,t)=>$Ge(t)?(console.warn(`[${r}] ${e}=${t} is deprecated. Please use a color from the theme, or a valid color string.`),Sre[t]):t;function qGe(r,e,t){let n,i,a,o,s,l,u=xe,c=()=>(u(),u=_o(o,J=>t(48,l=J)),o),f,h=xe,d=()=>(h(),h=_o(a,J=>t(49,f=J)),a),p,g=xe,v=()=>(g(),g=_o(i,J=>t(50,p=J)),i),m,y=xe,b=()=>(y(),y=_o(n,J=>t(51,m=J)),n),_;r.$$.on_destroy.push(()=>u()),r.$$.on_destroy.push(()=>h()),r.$$.on_destroy.push(()=>g()),r.$$.on_destroy.push(()=>y());const{resolveColor:w,resolveColorScale:S}=E1();let C=Od(Ij);y1(r,C,J=>t(53,_=J));let A;const x=Symbol();let{id:D}=e;function E(){try{if(!Object.keys(_.data[0]).includes(D))throw A="Error in table: "+D+" does not exist in the dataset",new Error(A)}catch(J){A=J.message}}let{contentType:k=void 0}=e,{title:M=void 0}=e,{align:T=void 0}=e;T==="centre"&&(T="center");let{wrap:L=!1}=e,{wrapTitle:F=!1}=e,{height:N=void 0}=e,{width:z=void 0}=e,{alt:W=void 0}=e,{openInNewTab:H=!1}=e,{linkLabel:R=void 0}=e,{fmt:ne=void 0}=e,{totalAgg:te=void 0}=e,{totalFmt:fe=void 0}=e,{weightCol:Ce=void 0}=e,{subtotalFmt:Te=void 0}=e,{colorMax:Se=void 0}=e,{colorMin:_e=void 0}=e,{colorMid:$=void 0}=e,{colorBreakpoints:q=void 0}=e,{scaleColor:j=void 0}=e,{colorScale:he="positive"}=e,{scaleColumn:Q=void 0}=e,{downIsGood:ye=!1}=e,{showValue:ie=!0}=e,{deltaSymbol:me=!0}=e,{neutralMin:Pe=0}=e,{neutralMax:Oe=0}=e,{chip:Ge=!1}=e,{sparkWidth:Ye=void 0}=e,{sparkHeight:Ct=void 0}=e,{sparkColor:Zt=void 0}=e,{sparkX:qe=void 0}=e,{sparkY:Me=void 0}=e,{sparkYScale:At=!1}=e,{barColor:lt="#a5cdee"}=e,{negativeBarColor:Sr="#fca5a5"}=e,{backgroundColor:Vt="transparent"}=e,{hideLabels:ht=!1}=e,{colGroup:Re=void 0}=e,{fmtColumn:ue=void 0}=e,{redNegatives:de=!1}=e;const at=()=>{E(),C.update(J=>{const ve=J.columns.findIndex(Ee=>Ee.identifier===x);return ve===-1?J.columns.push(s):J.columns=[...J.columns.slice(0,ve),s,...J.columns.slice(ve+1)],J})};return IC(()=>{C.update(J=>(J.columns=J.columns.filter(ve=>ve.identifier!==x),J))}),r.$$set=J=>{"id"in J&&t(17,D=J.id),"contentType"in J&&t(18,k=J.contentType),"title"in J&&t(19,M=J.title),"align"in J&&t(5,T=J.align),"wrap"in J&&t(6,L=J.wrap),"wrapTitle"in J&&t(7,F=J.wrapTitle),"height"in J&&t(20,N=J.height),"width"in J&&t(21,z=J.width),"alt"in J&&t(22,W=J.alt),"openInNewTab"in J&&t(8,H=J.openInNewTab),"linkLabel"in J&&t(23,R=J.linkLabel),"fmt"in J&&t(24,ne=J.fmt),"totalAgg"in J&&t(25,te=J.totalAgg),"totalFmt"in J&&t(26,fe=J.totalFmt),"weightCol"in J&&t(27,Ce=J.weightCol),"subtotalFmt"in J&&t(28,Te=J.subtotalFmt),"colorMax"in J&&t(29,Se=J.colorMax),"colorMin"in J&&t(30,_e=J.colorMin),"colorMid"in J&&t(31,$=J.colorMid),"colorBreakpoints"in J&&t(32,q=J.colorBreakpoints),"scaleColor"in J&&t(33,j=J.scaleColor),"colorScale"in J&&t(9,he=J.colorScale),"scaleColumn"in J&&t(34,Q=J.scaleColumn),"downIsGood"in J&&t(10,ye=J.downIsGood),"showValue"in J&&t(11,ie=J.showValue),"deltaSymbol"in J&&t(12,me=J.deltaSymbol),"neutralMin"in J&&t(35,Pe=J.neutralMin),"neutralMax"in J&&t(36,Oe=J.neutralMax),"chip"in J&&t(13,Ge=J.chip),"sparkWidth"in J&&t(37,Ye=J.sparkWidth),"sparkHeight"in J&&t(38,Ct=J.sparkHeight),"sparkColor"in J&&t(39,Zt=J.sparkColor),"sparkX"in J&&t(40,qe=J.sparkX),"sparkY"in J&&t(41,Me=J.sparkY),"sparkYScale"in J&&t(14,At=J.sparkYScale),"barColor"in J&&t(42,lt=J.barColor),"negativeBarColor"in J&&t(43,Sr=J.negativeBarColor),"backgroundColor"in J&&t(44,Vt=J.backgroundColor),"hideLabels"in J&&t(15,ht=J.hideLabels),"colGroup"in J&&t(45,Re=J.colGroup),"fmtColumn"in J&&t(46,ue=J.fmtColumn),"redNegatives"in J&&t(16,de=J.redNegatives)},r.$$.update=()=>{r.$$.dirty[0]&64&&t(6,L=L==="true"||L===!0),r.$$.dirty[0]&128&&t(7,F=F==="true"||F===!0),r.$$.dirty[0]&256&&t(8,H=H==="true"||H===!0),r.$$.dirty[1]&4&&j&&console.warn("[Column] scaleColor is deprecated. Use colorScale instead."),r.$$.dirty[0]&512&&t(9,he=jGe("Column","colorScale",he)),r.$$.dirty[0]&512&&b(t(3,n=S(he??he))),r.$$.dirty[0]&1024&&t(10,ye=ye==="true"||ye===!0),r.$$.dirty[0]&2048&&t(11,ie=ie==="true"||ie===!0),r.$$.dirty[0]&4096&&t(12,me=me==="true"||me===!0),r.$$.dirty[0]&8192&&t(13,Ge=Ge==="true"||Ge===!0),r.$$.dirty[0]&16384&&t(14,At=At==="true"||At===!0),r.$$.dirty[1]&2048&&v(t(2,i=w(lt))),r.$$.dirty[1]&4096&&d(t(1,a=w(Sr))),r.$$.dirty[1]&8192&&c(t(0,o=w(Vt))),r.$$.dirty[0]&32768&&t(15,ht=ht==="true"||ht===!0),r.$$.dirty[0]&65536&&t(16,de=de==="true"||de===!0),r.$$.dirty[0]&2147483104|r.$$.dirty[1]&2017275&&t(47,s={identifier:x,id:D,title:M,align:T,wrap:L,wrapTitle:F,contentType:k,height:N,width:z,alt:W,openInNewTab:H,linkLabel:R,fmt:ne,fmtColumn:ue,totalAgg:te,totalFmt:fe,subtotalFmt:Te,weightCol:Ce,downIsGood:ye,deltaSymbol:me,chip:Ge,neutralMin:Pe,neutralMax:Oe,showValue:ie,colorMax:Se,colorMin:_e,colorScale:m,scaleColumn:Q,colGroup:Re,colorMid:$,colorBreakpoints:q,redNegatives:de,sparkWidth:Ye,sparkHeight:Ct,sparkColor:Zt,sparkX:qe,sparkY:Me,sparkYScale:At,barColor:p,negativeBarColor:f,backgroundColor:l,hideLabels:ht}),r.$$.dirty[1]&65536&&at()},[o,a,i,n,C,T,L,F,H,he,ye,ie,me,Ge,At,ht,de,D,k,M,N,z,W,R,ne,te,fe,Ce,Te,Se,_e,$,q,j,Q,Pe,Oe,Ye,Ct,Zt,qe,Me,lt,Sr,Vt,Re,ue,s,l,f,p,m]}class Cre extends kr{constructor(e){super(),Tr(this,e,qGe,null,Mr,{id:17,contentType:18,title:19,align:5,wrap:6,wrapTitle:7,height:20,width:21,alt:22,openInNewTab:8,linkLabel:23,fmt:24,totalAgg:25,totalFmt:26,weightCol:27,subtotalFmt:28,colorMax:29,colorMin:30,colorMid:31,colorBreakpoints:32,scaleColor:33,colorScale:9,scaleColumn:34,downIsGood:10,showValue:11,deltaSymbol:12,neutralMin:35,neutralMax:36,chip:13,sparkWidth:37,sparkHeight:38,sparkColor:39,sparkX:40,sparkY:41,sparkYScale:14,barColor:42,negativeBarColor:43,backgroundColor:44,hideLabels:15,colGroup:45,fmtColumn:46,redNegatives:16},null,[-1,-1])}}function EU(r,e,t){const n=r.slice();return n[103]=e[t],n}function kU(r,e,t){const n=r.slice();return n[106]=e[t],n}function TU(r,e,t){const n=r.slice();return n[103]=e[t],n}function MU(r,e,t){const n=r.slice();return n[103]=e[t],n}function IU(r){const e=r[18]?17.5:23;r[113]=e;const t=45;r[114]=t;const n=24;r[115]=n;const i=r[4]?r[115]+r[114]+234:r[114]+234;r[116]=i}function LU(r,e,t){const n=r.slice();return n[103]=e[t],n}function FU(r){let e,t,n;function i(o){r[87](o)}let a={search:r[4],$$slots:{default:[ZGe]},$$scope:{ctx:r}};return r[38]!==void 0&&(a.open=r[38]),e=new Qle({props:a}),N3.push(()=>xG(e,"open",i)),{c(){Ne(e.$$.fragment)},l(o){ze(e.$$.fragment,o)},m(o,s){Ve(e,o,s),n=!0},p(o,s){const l={};s[0]&16&&(l.search=o[4]),s[0]&262160|s[1]&260|s[2]&2|s[3]&128&&(l.$$scope={dirty:s,ctx:o}),!t&&s[1]&128&&(t=!0,l.open=o[38],MG(()=>t=!1)),e.$set(l)},i(o){n||(K(e.$$.fragment,o),n=!0)},o(o){re(e.$$.fragment,o),n=!1},d(o){Ue(e,o)}}}function BU(r){let e,t;const n=[r[103]];let i={};for(let a=0;are(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;ore(M[H],1,1,()=>{M[H]=null});let L=r[4]&&NU(r);l=new EGe({props:{rowNumbers:r[1],headerColor:r[54],headerFontColor:r[55],orderedColumns:r[44],columnSummary:r[23],compact:r[18],sortable:r[5],sortClick:r[42],formatColumnTitles:r[11],sortObj:r[19],wrapTitles:r[10],link:r[17]}}),c=new vL({props:{data:r[27],$$slots:{skeleton:[iHe],default:[nHe]},$$scope:{ctx:r}}});const F=[oHe,aHe],N=[];function z(H,R){return H[21]&&H[29]>1?0:1}g=z(r),v=N[g]=F[g](r);let W=r[3]&&qU(r);return{c(){D&&D.c(),e=Le(),E&&E.c(),t=Le();for(let H=0;H{E=null}),It()),R[0]&1|R[1]&4){k=Lr(H[33].columns.filter(KU));let Te;for(Te=0;Te{L=null}),It());const ne={};R[0]&2&&(ne.rowNumbers=H[1]),R[1]&8388608&&(ne.headerColor=H[54]),R[1]&16777216&&(ne.headerFontColor=H[55]),R[1]&8192&&(ne.orderedColumns=H[44]),R[0]&8388608&&(ne.columnSummary=H[23]),R[0]&262144&&(ne.compact=H[18]),R[0]&32&&(ne.sortable=H[5]),R[1]&2048&&(ne.sortClick=H[42]),R[0]&2048&&(ne.formatColumnTitles=H[11]),R[0]&524288&&(ne.sortObj=H[19]),R[0]&1024&&(ne.wrapTitles=H[10]),R[0]&131072&&(ne.link=H[17]),l.$set(ne);const te={};R[0]&134217728&&(te.data=H[27]),R[0]&496427911|R[1]&1040195601|R[3]&128&&(te.$$scope={dirty:R,ctx:H}),c.$set(te),R[1]&4194304&&He(o,"background-color",H[53]);let fe=g;g=z(H),g===fe?N[g].p(H,R):(Mt(),re(N[fe],1,1,()=>{N[fe]=null}),It(),v=N[g],v?v.p(H,R):(v=N[g]=F[g](H),v.c()),K(v,1),v.m(i,null)),(!w||R[0]&65537&&m!==(m=H[16]?void 0:`DataTable-${((Ce=H[0])==null?void 0:Ce.id)??"no-id"}`))&&Y(i,"data-testid",m),H[3]?W?(W.p(H,R),R[0]&8&&K(W,1)):(W=qU(H),W.c(),K(W,1),W.m(_.parentNode,_)):W&&(Mt(),re(W,1,1,()=>{W=null}),It())},i(H){if(!w){K(D,H),K(E);for(let R=0;R{w&&(y||(y=Gl(i,IS,{},!0)),y.run(1))}),K(W),w=!0}},o(H){re(D,H),re(E),M=M.filter(Boolean);for(let R=0;Rre(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;oxG(e,"value",i)),{c(){Ne(e.$$.fragment)},l(o){ze(e.$$.fragment,o)},m(o,s){Ve(e,o,s),n=!0},p(o,s){const l={};!t&&s[0]&67108864&&(t=!0,l.value=o[26],MG(()=>t=!1)),e.$set(l)},i(o){n||(K(e.$$.fragment,o),n=!0)},o(o){re(e.$$.fragment,o),n=!1},d(o){Ue(e,o)}}}function JGe(r){let e,t;return e=new EO({props:{displayedData:r[28],rowShading:r[8],link:r[17],rowNumbers:r[1],rowLines:r[9],compact:r[18],index:r[24],columnSummary:r[23],orderedColumns:r[44]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[0]&268435456&&(a.displayedData=n[28]),i[0]&256&&(a.rowShading=n[8]),i[0]&131072&&(a.link=n[17]),i[0]&2&&(a.rowNumbers=n[1]),i[0]&512&&(a.rowLines=n[9]),i[0]&262144&&(a.compact=n[18]),i[0]&16777216&&(a.index=n[24]),i[0]&8388608&&(a.columnSummary=n[23]),i[1]&8192&&(a.orderedColumns=n[44]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function eHe(r){let e,t,n=Lr(r[35]),i=[];for(let o=0;ore(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o{a=null}),It())},i(o){i||(K(e.$$.fragment,o),K(a),i=!0)},o(o){re(e.$$.fragment,o),re(a),i=!1},d(o){o&&(U(t),U(n)),Ue(e,o),a&&a.d(o)}}}function rHe(r){let e,t,n,i;e=new GGe({props:{groupName:r[106],currentGroupData:r[31][r[106]],toggled:r[20][r[106]],columnSummary:r[23],rowColor:r[56],rowNumbers:r[1],subtotals:r[2],compact:r[18],orderedColumns:r[44]}}),e.$on("toggle",r[62]);let a=r[20][r[106]]&&VU(r);return{c(){Ne(e.$$.fragment),t=Le(),a&&a.c(),n=Xe()},l(o){ze(e.$$.fragment,o),t=Fe(o),a&&a.l(o),n=Xe()},m(o,s){Ve(e,o,s),le(o,t,s),a&&a.m(o,s),le(o,n,s),i=!0},p(o,s){const l={};s[1]&16&&(l.groupName=o[106]),s[1]&17&&(l.currentGroupData=o[31][o[106]]),s[0]&1048576|s[1]&16&&(l.toggled=o[20][o[106]]),s[0]&8388608&&(l.columnSummary=o[23]),s[1]&33554432&&(l.rowColor=o[56]),s[0]&2&&(l.rowNumbers=o[1]),s[0]&4&&(l.subtotals=o[2]),s[0]&262144&&(l.compact=o[18]),s[1]&8192&&(l.orderedColumns=o[44]),e.$set(l),o[20][o[106]]?a?(a.p(o,s),s[0]&1048576|s[1]&16&&K(a,1)):(a=VU(o),a.c(),K(a,1),a.m(n.parentNode,n)):a&&(Mt(),re(a,1,1,()=>{a=null}),It())},i(o){i||(K(e.$$.fragment,o),K(a),i=!0)},o(o){re(e.$$.fragment,o),re(a),i=!1},d(o){o&&(U(t),U(n)),Ue(e,o),a&&a.d(o)}}}function zU(r){let e,t;return e=new gGe({props:{groupName:r[106],currentGroupData:r[31][r[106]],columnSummary:r[23],rowColor:r[57],fontColor:r[58],groupType:r[14],groupBy:r[13],compact:r[18],orderedColumns:r[44]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[1]&16&&(a.groupName=n[106]),i[1]&17&&(a.currentGroupData=n[31][n[106]]),i[0]&8388608&&(a.columnSummary=n[23]),i[1]&67108864&&(a.rowColor=n[57]),i[1]&134217728&&(a.fontColor=n[58]),i[0]&16384&&(a.groupType=n[14]),i[0]&8192&&(a.groupBy=n[13]),i[0]&262144&&(a.compact=n[18]),i[1]&8192&&(a.orderedColumns=n[44]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function VU(r){let e,t;return e=new EO({props:{displayedData:r[31][r[106]],groupType:r[14],rowShading:r[8],link:r[17],rowNumbers:r[1],rowLines:r[9],compact:r[18],index:r[24],columnSummary:r[23],grouped:!0,groupColumn:r[13],orderedColumns:r[44]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[1]&17&&(a.displayedData=n[31][n[106]]),i[0]&16384&&(a.groupType=n[14]),i[0]&256&&(a.rowShading=n[8]),i[0]&131072&&(a.link=n[17]),i[0]&2&&(a.rowNumbers=n[1]),i[0]&512&&(a.rowLines=n[9]),i[0]&262144&&(a.compact=n[18]),i[0]&16777216&&(a.index=n[24]),i[0]&8388608&&(a.columnSummary=n[23]),i[0]&8192&&(a.groupColumn=n[13]),i[1]&8192&&(a.orderedColumns=n[44]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function UU(r){let e,t,n,i;const a=[rHe,tHe],o=[];function s(l,u){return l[14]==="accordion"?0:l[14]==="section"?1:-1}return~(e=s(r))&&(t=o[e]=a[e](r)),{c(){t&&t.c(),n=Xe()},l(l){t&&t.l(l),n=Xe()},m(l,u){~e&&o[e].m(l,u),le(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?~e&&o[e].p(l,u):(t&&(Mt(),re(o[c],1,1,()=>{o[c]=null}),It()),~e?(t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n)):t=null)},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),~e&&o[e].d(l)}}}function GU(r){let e,t;return e=new sGe({props:{data:r[0],rowNumbers:r[1],columnSummary:r[23],rowColor:r[59],fontColor:r[60],groupType:r[14],compact:r[18],orderedColumns:r[44]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[0]&1&&(a.data=n[0]),i[0]&2&&(a.rowNumbers=n[1]),i[0]&8388608&&(a.columnSummary=n[23]),i[1]&268435456&&(a.rowColor=n[59]),i[1]&536870912&&(a.fontColor=n[60]),i[0]&16384&&(a.groupType=n[14]),i[0]&262144&&(a.compact=n[18]),i[1]&8192&&(a.orderedColumns=n[44]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function nHe(r){let e,t,n,i,a;const o=[eHe,JGe],s=[];function l(c,f){return c[13]&&c[31]&&c[26]===""?0:1}e=l(r),t=s[e]=o[e](r);let u=r[7]&&r[26]===""&&GU(r);return{c(){t.c(),n=Le(),u&&u.c(),i=Xe()},l(c){t.l(c),n=Fe(c),u&&u.l(c),i=Xe()},m(c,f){s[e].m(c,f),le(c,n,f),u&&u.m(c,f),le(c,i,f),a=!0},p(c,f){let h=e;e=l(c),e===h?s[e].p(c,f):(Mt(),re(s[h],1,1,()=>{s[h]=null}),It(),t=s[e],t?t.p(c,f):(t=s[e]=o[e](c),t.c()),K(t,1),t.m(n.parentNode,n)),c[7]&&c[26]===""?u?(u.p(c,f),f[0]&67108992&&K(u,1)):(u=GU(c),u.c(),K(u,1),u.m(i.parentNode,i)):u&&(Mt(),re(u,1,1,()=>{u=null}),It())},i(c){a||(K(t),K(u),a=!0)},o(c){re(t),re(u),a=!1},d(c){c&&(U(n),U(i)),s[e].d(c),u&&u.d(c)}}}function iHe(r){let e,t,n,i,a;return n=new t$({}),{c(){e=oe("tr"),t=oe("td"),Ne(n.$$.fragment),this.h()},l(o){e=se(o,"TR",{class:!0});var s=ge(e);t=se(s,"TD",{colspan:!0,class:!0});var l=ge(t);ze(n.$$.fragment,l),l.forEach(U),s.forEach(U),this.h()},h(){Y(t,"colspan",i=r[27].columns.length),Y(t,"class","h-32 svelte-ozf09l"),Y(e,"class","svelte-ozf09l")},m(o,s){le(o,e,s),X(e,t),Ve(n,t,null),a=!0},p(o,s){(!a||s[0]&134217728&&i!==(i=o[27].columns.length))&&Y(t,"colspan",i)},i(o){a||(K(n.$$.fragment,o),a=!0)},o(o){re(n.$$.fragment,o),a=!1},d(o){o&&U(e),Ue(n)}}}function aHe(r){let e,t,n,i=r[6]&&HU(r),a=!r[16]&&WU(r);return{c(){e=oe("div"),i&&i.c(),t=Le(),a&&a.c(),this.h()},l(o){e=se(o,"DIV",{class:!0});var s=ge(e);i&&i.l(s),t=Fe(s),a&&a.l(s),s.forEach(U),this.h()},h(){Y(e,"class","table-footer svelte-ozf09l")},m(o,s){le(o,e,s),i&&i.m(e,null),X(e,t),a&&a.m(e,null),n=!0},p(o,s){o[6]?i?(i.p(o,s),s[0]&64&&K(i,1)):(i=HU(o),i.c(),K(i,1),i.m(e,t)):i&&(Mt(),re(i,1,1,()=>{i=null}),It()),o[16]?a&&(Mt(),re(a,1,1,()=>{a=null}),It()):a?(a.p(o,s),s[0]&65536&&K(a,1)):(a=WU(o),a.c(),K(a,1),a.m(e,null))},i(o){n||(K(i),K(a),n=!0)},o(o){re(i),re(a),n=!1},d(o){o&&U(e),i&&i.d(),a&&a.d()}}}function oHe(r){let e,t,n,i,a,o,s,l,u,c,f,h,d,p,g,v,m,y=r[29].toLocaleString()+"",b,_,w,S=r[37].toLocaleString()+"",C,A,x=r[36].toLocaleString()+"",D,E,k,M,T,L,F,N,z,W,H,R,ne,te,fe,Ce,Te;a=new Ao({props:{src:Wle}}),c=new Ao({props:{src:Gle,class:"h-[0.83em]"}}),L=new Ao({props:{src:n$,class:"h-[0.83em]"}}),H=new Ao({props:{src:$le}});let Se=r[6]&&$U(r),_e=!r[16]&&jU(r);return{c(){e=oe("div"),t=oe("div"),n=oe("button"),i=oe("div"),Ne(a.$$.fragment),s=Le(),l=oe("button"),u=oe("div"),Ne(c.$$.fragment),h=Le(),d=oe("span"),p=dt(`Page + `),g=oe("input"),v=dt(` + / + `),m=oe("span"),b=dt(y),_=Le(),w=oe("span"),C=dt(S),A=dt(" of "),D=dt(x),E=dt(" records"),k=Le(),M=oe("button"),T=oe("div"),Ne(L.$$.fragment),N=Le(),z=oe("button"),W=oe("div"),Ne(H.$$.fragment),ne=Le(),Se&&Se.c(),te=Le(),_e&&_e.c(),this.h()},l($){e=se($,"DIV",{class:!0});var q=ge(e);t=se(q,"DIV",{class:!0});var j=ge(t);n=se(j,"BUTTON",{"aria-label":!0,class:!0});var he=ge(n);i=se(he,"DIV",{class:!0});var Q=ge(i);ze(a.$$.fragment,Q),Q.forEach(U),he.forEach(U),s=Fe(j),l=se(j,"BUTTON",{"aria-label":!0,class:!0});var ye=ge(l);u=se(ye,"DIV",{class:!0});var ie=ge(u);ze(c.$$.fragment,ie),ie.forEach(U),ye.forEach(U),h=Fe(j),d=se(j,"SPAN",{class:!0});var me=ge(d);p=pt(me,`Page + `),g=se(me,"INPUT",{class:!0,style:!0,type:!0,placeholder:!0}),v=pt(me,` + / + `),m=se(me,"SPAN",{class:!0});var Pe=ge(m);b=pt(Pe,y),Pe.forEach(U),me.forEach(U),_=Fe(j),w=se(j,"SPAN",{class:!0});var Oe=ge(w);C=pt(Oe,S),A=pt(Oe," of "),D=pt(Oe,x),E=pt(Oe," records"),Oe.forEach(U),k=Fe(j),M=se(j,"BUTTON",{"aria-label":!0,class:!0});var Ge=ge(M);T=se(Ge,"DIV",{class:!0});var Ye=ge(T);ze(L.$$.fragment,Ye),Ye.forEach(U),Ge.forEach(U),N=Fe(j),z=se(j,"BUTTON",{"aria-label":!0,class:!0});var Ct=ge(z);W=se(Ct,"DIV",{class:!0});var Zt=ge(W);ze(H.$$.fragment,Zt),Zt.forEach(U),Ct.forEach(U),j.forEach(U),ne=Fe(q),Se&&Se.l(q),te=Fe(q),_e&&_e.l(q),q.forEach(U),this.h()},h(){Y(i,"class","page-icon flex items-center svelte-ozf09l"),Y(n,"aria-label","first-page"),Y(n,"class","page-changer svelte-ozf09l"),n.disabled=o=r[30]===1,$r(n,"hovering",r[34]),Y(u,"class","page-icon h-[0.83em] flex items-center svelte-ozf09l"),Y(l,"aria-label","previous-page"),Y(l,"class","page-changer svelte-ozf09l"),l.disabled=f=r[30]===1,$r(l,"hovering",r[34]),Y(g,"class","page-input svelte-ozf09l"),He(g,"width",r[25]?r[43]:r[41]),Y(g,"type","number"),Y(g,"placeholder",r[30]),$r(g,"hovering",r[34]),$r(g,"error",r[25]>r[29]),Y(m,"class","page-count ml-1 svelte-ozf09l"),Y(d,"class","page-count svelte-ozf09l"),Y(w,"class","print-page-count svelte-ozf09l"),Y(T,"class","page-icon h-[0.83em] flex items-center svelte-ozf09l"),Y(M,"aria-label","next-page"),Y(M,"class","page-changer svelte-ozf09l"),M.disabled=F=r[30]===r[29],$r(M,"hovering",r[34]),Y(W,"class","page-icon flex items-center svelte-ozf09l"),Y(z,"aria-label","last-page"),Y(z,"class","page-changer svelte-ozf09l"),z.disabled=R=r[30]===r[29],$r(z,"hovering",r[34]),Y(t,"class","page-labels mr-auto svelte-ozf09l"),Y(e,"class","pagination svelte-ozf09l")},m($,q){le($,e,q),X(e,t),X(t,n),X(n,i),Ve(a,i,null),X(t,s),X(t,l),X(l,u),Ve(c,u,null),X(t,h),X(t,d),X(d,p),X(d,g),Xw(g,r[25]),X(d,v),X(d,m),X(m,b),X(t,_),X(t,w),X(w,C),X(w,A),X(w,D),X(w,E),X(t,k),X(t,M),X(M,T),Ve(L,T,null),X(t,N),X(t,z),X(z,W),Ve(H,W,null),X(e,ne),Se&&Se.m(e,null),X(e,te),_e&&_e.m(e,null),fe=!0,Ce||(Te=[_n(n,"click",r[89]),_n(l,"click",r[90]),_n(g,"input",r[91]),_n(g,"keyup",r[92]),_n(g,"change",r[93]),_n(M,"click",r[94]),_n(z,"click",r[95])],Ce=!0)},p($,q){(!fe||q[0]&1073741824&&o!==(o=$[30]===1))&&(n.disabled=o),(!fe||q[1]&8)&&$r(n,"hovering",$[34]),(!fe||q[0]&1073741824&&f!==(f=$[30]===1))&&(l.disabled=f),(!fe||q[1]&8)&&$r(l,"hovering",$[34]),(!fe||q[0]&33554432|q[1]&5120)&&He(g,"width",$[25]?$[43]:$[41]),(!fe||q[0]&1073741824)&&Y(g,"placeholder",$[30]),q[0]&33554432&&IG(g.value)!==$[25]&&Xw(g,$[25]),(!fe||q[1]&8)&&$r(g,"hovering",$[34]),(!fe||q[0]&570425344)&&$r(g,"error",$[25]>$[29]),(!fe||q[0]&536870912)&&y!==(y=$[29].toLocaleString()+"")&&Rt(b,y),(!fe||q[1]&64)&&S!==(S=$[37].toLocaleString()+"")&&Rt(C,S),(!fe||q[1]&32)&&x!==(x=$[36].toLocaleString()+"")&&Rt(D,x),(!fe||q[0]&1610612736&&F!==(F=$[30]===$[29]))&&(M.disabled=F),(!fe||q[1]&8)&&$r(M,"hovering",$[34]),(!fe||q[0]&1610612736&&R!==(R=$[30]===$[29]))&&(z.disabled=R),(!fe||q[1]&8)&&$r(z,"hovering",$[34]),$[6]?Se?(Se.p($,q),q[0]&64&&K(Se,1)):(Se=$U($),Se.c(),K(Se,1),Se.m(e,te)):Se&&(Mt(),re(Se,1,1,()=>{Se=null}),It()),$[16]?_e&&(Mt(),re(_e,1,1,()=>{_e=null}),It()):_e?(_e.p($,q),q[0]&65536&&K(_e,1)):(_e=jU($),_e.c(),K(_e,1),_e.m(e,null))},i($){fe||(K(a.$$.fragment,$),K(c.$$.fragment,$),K(L.$$.fragment,$),K(H.$$.fragment,$),K(Se),K(_e),fe=!0)},o($){re(a.$$.fragment,$),re(c.$$.fragment,$),re(L.$$.fragment,$),re(H.$$.fragment,$),re(Se),re(_e),fe=!1},d($){$&&U(e),Ue(a),Ue(c),Ue(L),Ue(H),Se&&Se.d(),_e&&_e.d(),Ce=!1,Bd(Te)}}}function HU(r){let e,t;return e=new RZ({props:{class:"download-button",data:r[40],queryID:r[12],display:r[34]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[1]&512&&(a.data=n[40]),i[0]&4096&&(a.queryID=n[12]),i[1]&8&&(a.display=n[34]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function WU(r){let e,t;return e=new wre({props:{display:r[34]}}),e.$on("click",r[97]),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[1]&8&&(a.display=n[34]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function $U(r){let e,t;return e=new RZ({props:{class:"download-button",data:r[40],queryID:r[12],display:r[34]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[1]&512&&(a.data=n[40]),i[0]&4096&&(a.queryID=n[12]),i[1]&8&&(a.display=n[34]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function jU(r){let e,t;return e=new wre({props:{display:r[34]}}),e.$on("click",r[96]),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[1]&8&&(a.display=n[34]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function qU(r){let e,t,n=r[12]&&YU(r);return{c(){n&&n.c(),e=Xe()},l(i){n&&n.l(i),e=Xe()},m(i,a){n&&n.m(i,a),le(i,e,a),t=!0},p(i,a){i[12]?n?(n.p(i,a),a[0]&4096&&K(n,1)):(n=YU(i),n.c(),K(n,1),n.m(e.parentNode,e)):n&&(Mt(),re(n,1,1,()=>{n=null}),It())},i(i){t||(K(n),t=!0)},o(i){re(n),t=!1},d(i){i&&U(e),n&&n.d(i)}}}function YU(r){let e,t;return e=new oDe({props:{$$slots:{default:[sHe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i[0]&4097|i[3]&128&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function ZU(r){let e=` `,t,n,i;return{c(){t=dt(e),n=Le(),i=oe("br"),this.h()},l(a){t=pt(a,e),n=Fe(a),i=se(a,"BR",{class:!0}),this.h()},h(){Y(i,"class","svelte-ozf09l")},m(a,o){le(a,t,o),le(a,n,o),le(a,i,o)},p(a,o){o[0]&1&&e!==(e=` `)&&Rt(t,e)},d(a){a&&(U(t),U(n),U(i))}}}function sHe(r){let e=``,t,n,i,a,o,s="",l,u=Lr(Object.keys(r[0][0])),c=[];for(let f=0;f`)&&Rt(t,e),h[0]&1){u=Lr(Object.keys(f[0][0]));let d;for(d=0;d{l=null}),It());let p=t;t=f(h),t===p?c[t].p(h,d):(Mt(),re(c[p],1,1,()=>{c[p]=null}),It(),n=c[t],n?n.p(h,d):(n=c[t]=u[t](h),n.c()),K(n,1),n.m(i.parentNode,i))},i(h){a||(K(l),K(n),a=!0)},o(h){re(l),re(n),a=!1},d(h){h&&(U(e),U(i)),l&&l.d(h),c[t].d(h),o=!1,s()}}}let uHe="1.5em",cHe="1em",fHe="0em",hHe=!1;function dHe(r,e){return r.map(t=>{const n={};for(const i of e)n[i]=t[i];return n})}const KU=r=>r.contentType==="link",pHe=()=>{};function gHe(r,e,t){let n,i,a,o,s,l,u,c,f,h,d,p,g,v,m,y,b,_,w=xe,S=()=>(w(),w=_o(c,ke=>t(53,_=ke)),c),C,A=xe,x=()=>(A(),A=_o(l,ke=>t(54,C=ke)),l),D,E=xe,k=()=>(E(),E=_o(u,ke=>t(55,D=ke)),u),M,T=xe,L=()=>(T(),T=_o(n,ke=>t(56,M=ke)),n),F,N=xe,z=()=>(N(),N=_o(i,ke=>t(57,F=ke)),i),W,H=xe,R=()=>(H(),H=_o(a,ke=>t(58,W=ke)),a),ne,te=xe,fe=()=>(te(),te=_o(o,ke=>t(59,ne=ke)),o),Ce,Te=xe,Se=()=>(Te(),Te=_o(s,ke=>t(60,Ce=ke)),s);r.$$.on_destroy.push(()=>w()),r.$$.on_destroy.push(()=>A()),r.$$.on_destroy.push(()=>E()),r.$$.on_destroy.push(()=>T()),r.$$.on_destroy.push(()=>N()),r.$$.on_destroy.push(()=>H()),r.$$.on_destroy.push(()=>te()),r.$$.on_destroy.push(()=>Te());let{$$slots:_e={},$$scope:$}=e;const{resolveColor:q}=E1();let j=Tf({});y1(r,j,ke=>t(33,b=ke)),TC(Ij,j);let{data:he}=e,{queryID:Q=void 0}=e,{rows:ye=10}=e,{rowNumbers:ie=!1}=e,{sort:me=void 0}=e,Pe,Oe,Ge,Ye={},{groupBy:Ct=void 0}=e,{groupsOpen:Zt=!0}=e,{groupType:qe="accordion"}=e,{accordionRowColor:Me=void 0}=e,{groupNamePosition:At="middle"}=e;qe==="section"&&(ie=!1);let{subtotals:lt=!1}=e,{subtotalRowColor:Sr=void 0}=e,{subtotalFontColor:Vt=void 0}=e,ht={};function Re({detail:ke}){const{groupName:cr}=ke;t(20,ht[cr]=!ht[cr],ht)}let ue,de=!1,{generateMarkdown:at=!1}=e,{search:J=!1}=e,{sortable:ve=!0}=e,{downloadable:Ee=!0}=e,{totalRow:Ot=!1}=e,{totalRowColor:pr=void 0}=e,{totalFontColor:Nr=void 0}=e,{isFullPage:lr=!1}=e,{link:si=void 0}=e,{showLinkCol:li=!1}=e,gi,I=!1;j.update(ke=>(t(79,I=!1),{...ke,data:he,columns:[]}));let{rowShading:V=!1}=e,{rowLines:P=!0}=e,{wrapTitles:G=!1}=e,{headerColor:Z=void 0}=e,{headerFontColor:we=void 0}=e,{formatColumnTitles:Ie=!0}=e,{backgroundColor:je=void 0}=e,{compact:vt=void 0}=e,mr,Qn=[Ct];j.update(ke=>({...ke,priorityColumns:Qn}));let ji=0,Ca=null,rl="",na,ia,cx,fx,jv=na,qv,lu=1,Yv,UO=0,nl={},hx=[],Zv=!1,GO;function Sne(){t(39,GO=window.innerHeight)}function Cne(ke){Zv=ke,t(38,Zv)}function Ane(ke){rl=ke,t(26,rl)}const xne=()=>m(0),Dne=()=>m(lu-2);function Ene(){Ca=IG(this.value),t(25,Ca),t(64,ye),t(24,ji),t(81,Yv),t(27,na),t(0,he),t(4,J),t(13,Ct),t(31,nl),t(76,Pe),t(23,mr),t(78,Ge),t(17,si),t(66,li),t(22,gi),t(79,I),t(33,b),t(20,ht),t(65,Zt),t(67,me),t(77,Oe)}const kne=()=>m((Ca??1)-1),Tne=()=>m((Ca??1)-1),Mne=()=>m(lu),Ine=()=>m(qv-1),Lne=()=>t(38,Zv=!0),Fne=()=>t(38,Zv=!0),Bne=()=>t(34,de=!0),One=()=>t(34,de=!1);return r.$$set=ke=>{t(63,e=En(En({},e),us(ke))),"data"in ke&&t(0,he=ke.data),"queryID"in ke&&t(12,Q=ke.queryID),"rows"in ke&&t(64,ye=ke.rows),"rowNumbers"in ke&&t(1,ie=ke.rowNumbers),"sort"in ke&&t(67,me=ke.sort),"groupBy"in ke&&t(13,Ct=ke.groupBy),"groupsOpen"in ke&&t(65,Zt=ke.groupsOpen),"groupType"in ke&&t(14,qe=ke.groupType),"accordionRowColor"in ke&&t(68,Me=ke.accordionRowColor),"groupNamePosition"in ke&&t(15,At=ke.groupNamePosition),"subtotals"in ke&&t(2,lt=ke.subtotals),"subtotalRowColor"in ke&&t(69,Sr=ke.subtotalRowColor),"subtotalFontColor"in ke&&t(70,Vt=ke.subtotalFontColor),"generateMarkdown"in ke&&t(3,at=ke.generateMarkdown),"search"in ke&&t(4,J=ke.search),"sortable"in ke&&t(5,ve=ke.sortable),"downloadable"in ke&&t(6,Ee=ke.downloadable),"totalRow"in ke&&t(7,Ot=ke.totalRow),"totalRowColor"in ke&&t(71,pr=ke.totalRowColor),"totalFontColor"in ke&&t(72,Nr=ke.totalFontColor),"isFullPage"in ke&&t(16,lr=ke.isFullPage),"link"in ke&&t(17,si=ke.link),"showLinkCol"in ke&&t(66,li=ke.showLinkCol),"rowShading"in ke&&t(8,V=ke.rowShading),"rowLines"in ke&&t(9,P=ke.rowLines),"wrapTitles"in ke&&t(10,G=ke.wrapTitles),"headerColor"in ke&&t(73,Z=ke.headerColor),"headerFontColor"in ke&&t(74,we=ke.headerFontColor),"formatColumnTitles"in ke&&t(11,Ie=ke.formatColumnTitles),"backgroundColor"in ke&&t(75,je=ke.backgroundColor),"compact"in ke&&t(18,vt=ke.compact),"$$scope"in ke&&t(100,$=ke.$$scope)},r.$$.update=()=>{if(r.$$.dirty[2]&4&&t(64,ye=Number.parseInt(ye)),r.$$.dirty[0]&2&&t(1,ie=ie==="true"||ie===!0),r.$$.dirty[2]&49184&&me){const[ke,cr]=me.split(" ");t(76,Pe=ke),t(78,Ge=cr),t(77,Oe=cr!=="desc"),t(19,Ye=Pe?{col:Pe,ascending:Oe}:{col:null,ascending:null})}if(r.$$.dirty[2]&8&&t(65,Zt=Zt==="true"||Zt===!0),r.$$.dirty[2]&64&&L(t(52,n=q(Me))),r.$$.dirty[0]&4&&t(2,lt=lt==="true"||lt===!0),r.$$.dirty[2]&128&&z(t(51,i=q(Sr))),r.$$.dirty[2]&256&&R(t(50,a=q(Vt))),r.$$.dirty[2]&16&&t(66,li=li==="true"||li===!0),r.$$.dirty[0]&12713985|r.$$.dirty[2]&81936)try{if(t(22,gi=void 0),yF(he),t(23,mr=BL(he,"array")),Pe){if(!mr.map(cr=>cr.id).includes(Pe))throw Error(`${Pe} is not a column in the dataset. sort should contain one column name and optionally a direction (asc or desc). E.g., sort=my_column or sort="my_column desc"`);if(Ge&&!["asc","desc"].includes(Ge))throw Error(`${Ge} is not a valid sort direction. Please use asc or desc`)}const ke=mr.filter(cr=>{var Yn;return cr.type==="date"&&!(((Yn=he[0])==null?void 0:Yn[cr.id])instanceof Date)}).map(cr=>cr.id);for(let cr=0;crYn.id===si);cr!==-1&&!li&&mr.splice(cr,1)}}catch(ke){t(22,gi=ke.message)}if(r.$$.dirty[0]&8193|r.$$.dirty[2]&4&&t(21,ue=he.length>ye&&!Ct),r.$$.dirty[0]&8&&t(3,at=at==="true"||at===!0),r.$$.dirty[0]&16&&t(4,J=J==="true"||J===!0),r.$$.dirty[0]&32&&t(5,ve=ve==="true"||ve===!0),r.$$.dirty[0]&64&&t(6,Ee=Ee==="true"||Ee===!0),r.$$.dirty[0]&128&&t(7,Ot=Ot==="true"||Ot===!0),r.$$.dirty[2]&512&&fe(t(49,o=q(pr))),r.$$.dirty[2]&1024&&Se(t(48,s=q(Nr))),r.$$.dirty[0]&256&&t(8,V=V==="true"||V===!0),r.$$.dirty[0]&512&&t(9,P=P==="true"||P===!0),r.$$.dirty[0]&1024&&t(10,G=G==="true"||G===!0),r.$$.dirty[2]&2048&&x(t(47,l=q(Z))),r.$$.dirty[2]&4096&&k(t(46,u=q(we))),r.$$.dirty[0]&2048&&t(11,Ie=Ie==="true"||Ie===!0),r.$$.dirty[2]&8192&&S(t(45,c=q(je))),r.$$.dirty[1]&4&&t(84,f=sDe(b.columns.map(ke=>ke.id),b.priorityColumns)),r.$$.dirty[1]&4|r.$$.dirty[2]&4194304&&t(44,h=[...b.columns].sort((ke,cr)=>f.indexOf(ke.id)-f.indexOf(cr.id))),r.$$.dirty[0]&1&&t(27,na=he),r.$$.dirty[0]&17&&Pl.isQuery(he)&&J&&t(80,ia=yue(Pl.createReactive({loadGracePeriod:1e3,callback:ke=>{t(27,na=ke)},execFn:VW},he.opts,he))),r.$$.dirty[0]&134225920|r.$$.dirty[1]&1&&t(83,g=ke=>{const cr=ke.col,Yn=ke.ascending?1:-1,vi=Ii=>Ii==null||typeof Ii=="number"&&isNaN(Ii),Zd=(Ii,uu)=>vi(Ii[cr])&&!vi(uu[cr])||Ii[cr]uu[cr]?1*Yn:0;if(Ct){const Ii={};for(const uu of Object.keys(nl))Ii[uu]=[...nl[uu]].sort(Zd);t(31,nl=Ii)}else{const Ii=[...na].sort(Zd);t(27,na=Ii)}}),r.$$.dirty[0]&184549376|r.$$.dirty[2]&524292&&t(32,m=ke=>{t(24,ji=ke*ye),t(81,Yv=ji+ye),t(30,lu=Math.ceil(Yv/ye)),Ca&&t(25,Ca=Math.ceil(Yv/ye)),t(36,fx=na.length),t(28,jv=na.slice(ji,ji+ye))}),r.$$.dirty[0]&33554432&&t(43,d=`${(Ca??1).toString().length}ch`),r.$$.dirty[0]&67108865|r.$$.dirty[1]&4|r.$$.dirty[2]&262144&&ia&&ia(rl?he.search(rl,b.columns.map(ke=>ke.id),rl.length===1?.5:rl.length>=6?.9:.8):he,he.opts),r.$$.dirty[0]&17&&J&&!Pl.isQuery(he)&&pse.add({status:"warning",title:"Search Failed",message:"Please use a query instead."},5e3),r.$$.dirty[0]&524288|r.$$.dirty[2]&2097152&&t(42,p=ke=>{Ye.col===ke?t(19,Ye.ascending=!Ye.ascending,Ye):(t(19,Ye.col=ke,Ye),t(19,Ye.ascending=!0,Ye)),g(Ye)}),r.$$.dirty[0]&13639681|r.$$.dirty[1]&5|r.$$.dirty[2]&131080&&!gi){Ct&&!I&&(t(31,nl=he.reduce((cr,Yn)=>{const vi=Yn[Ct];return cr[vi]||(cr[vi]=[]),cr[vi].push(Yn),cr},{})),t(79,I=!0)),t(82,hx=Object.keys(nl).reduce((cr,Yn)=>{var vi;cr[Yn]={};for(const Zd of b.columns){const Ii=Zd.id,uu=(vi=mr.find(zne=>zne.id===Ii))==null?void 0:vi.type,Pne=Zd.totalAgg,Rne=Zd.weightCol,Nne=nl[Yn];cr[Yn][Ii]=Wu(Nne,Ii,Pne,uu,Rne)}return cr},{}));const ke=Object.keys(ht);for(const cr of Object.keys(nl))ke.includes(cr)||t(20,ht[cr]=Zt,ht)}r.$$.dirty[0]&532480|r.$$.dirty[1]&1|r.$$.dirty[2]&1048576&&(Ct&&Ye.col?t(35,cx=Object.entries(hx).sort((ke,cr)=>{const Yn=ke[1][Ye.col],vi=cr[1][Ye.col];return Ye.col===Ct&&isNaN(Ct)?Ye.ascending?ke[0].localeCompare(cr[0]):cr[0].localeCompare(ke[0]):(Yn==null||isNaN(Yn))&&vi!==void 0&&!isNaN(vi)?-1*(Ye.ascending?1:-1):(vi==null||isNaN(vi))&&Yn!==void 0&&!isNaN(Yn)?1*(Ye.ascending?1:-1):Ynvi?1*(Ye.ascending?1:-1):0}).map(ke=>ke[0])):t(35,cx=Object.keys(nl).sort())),r.$$.dirty[0]&524289|r.$$.dirty[2]&2097184&&he&&me&&g(Ye),r.$$.dirty[0]&134217728&&t(36,fx=na.length),r.$$.dirty[0]&16777216|r.$$.dirty[2]&4&&t(30,lu=Math.ceil((ji+ye)/ye)),r.$$.dirty[0]&2032140288|r.$$.dirty[1]&2|r.$$.dirty[2]&4&&(ue?(t(29,qv=Math.ceil(na.length/ye)),t(28,jv=na.slice(ji,ji+ye)),t(37,UO=jv.length),qvke.id)))},e=us(e),[he,ie,lt,at,J,ve,Ee,Ot,V,P,G,Ie,Q,Ct,qe,At,lr,si,vt,Ye,ht,ue,gi,mr,ji,Ca,rl,na,jv,qv,lu,nl,m,b,de,cx,fx,UO,Zv,GO,y,v,p,d,h,c,u,l,s,o,a,i,n,_,C,D,M,F,W,ne,Ce,j,Re,e,ye,Zt,li,me,Me,Sr,Vt,pr,Nr,Z,we,je,Pe,Oe,Ge,I,ia,Yv,hx,g,f,_e,Sne,Cne,Ane,xne,Dne,Ene,kne,Tne,Mne,Ine,Lne,Fne,Bne,One,$]}class kO extends kr{constructor(e){super(),Tr(this,e,gHe,lHe,Mr,{data:0,queryID:12,rows:64,rowNumbers:1,sort:67,groupBy:13,groupsOpen:65,groupType:14,accordionRowColor:68,groupNamePosition:15,subtotals:2,subtotalRowColor:69,subtotalFontColor:70,generateMarkdown:3,search:4,sortable:5,downloadable:6,totalRow:7,totalRowColor:71,totalFontColor:72,isFullPage:16,link:17,showLinkCol:66,rowShading:8,rowLines:9,wrapTitles:10,headerColor:73,headerFontColor:74,formatColumnTitles:11,backgroundColor:75,compact:18},null,[-1,-1,-1,-1])}}function vHe(r){let e,t;const n=[r[4],{data:r[11]},{queryID:r[5]}];let i={};for(let a=0;a{o[c]=null}),It(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),o[e].d(l)}}}function _He(r){let e,t;return e=new Lj({props:{slot:"empty",emptyMessage:r[2],emptySet:r[1],chartType:Are,isInitial:r[3]}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&4&&(a.emptyMessage=n[2]),i&2&&(a.emptySet=n[1]),i&8&&(a.isInitial=n[3]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function wHe(r){let e,t;return e=new kL({props:{slot:"error",chartType:Are,error:r[11].error.message}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&2048&&(a.error=n[11].error.message),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function SHe(r){let e,t;return e=new vL({props:{data:r[0],$$slots:{error:[wHe,({loaded:n})=>({11:n}),({loaded:n})=>n?2048:0],empty:[_He],default:[bHe,({loaded:n})=>({11:n}),({loaded:n})=>n?2048:0]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,[i]){const a={};i&1&&(a.data=n[0]),i&2398&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}let Are="Data Table";function CHe(r,e,t){let n,{$$slots:i={},$$scope:a}=e;const o=EG(i);let{data:s}=e;const l=Pl.isQuery(s)?s.hash:void 0;let u=(s==null?void 0:s.hash)===l,{emptySet:c=void 0}=e,{emptyMessage:f=void 0}=e,h=s==null?void 0:s.id;return r.$$set=d=>{t(10,e=En(En({},e),us(d))),"data"in d&&t(0,s=d.data),"emptySet"in d&&t(1,c=d.emptySet),"emptyMessage"in d&&t(2,f=d.emptyMessage),"$$scope"in d&&t(8,a=d.$$scope)},r.$$.update=()=>{r.$$.dirty&1&&t(3,u=(s==null?void 0:s.hash)===l),t(4,n=Object.fromEntries(Object.entries(e).filter(([,d])=>d!==void 0)))},e=us(e),[s,c,f,u,n,h,o,i,a]}class AHe extends kr{constructor(e){super(),Tr(this,e,CHe,SHe,Mr,{data:0,emptySet:1,emptyMessage:2})}}const TO=Symbol.for("yaml.alias"),xHe=Symbol.for("yaml.document"),dd=Symbol.for("yaml.map"),xre=Symbol.for("yaml.pair"),MO=Symbol.for("yaml.scalar"),nb=Symbol.for("yaml.seq"),su=Symbol.for("yaml.node.type"),Hv=r=>!!r&&typeof r=="object"&&r[su]===TO,ib=r=>!!r&&typeof r=="object"&&r[su]===xHe,JA=r=>!!r&&typeof r=="object"&&r[su]===dd,ii=r=>!!r&&typeof r=="object"&&r[su]===xre,ai=r=>!!r&&typeof r=="object"&&r[su]===MO,ex=r=>!!r&&typeof r=="object"&&r[su]===nb;function Pa(r){if(r&&typeof r=="object")switch(r[su]){case dd:case nb:return!0}return!1}function ki(r){if(r&&typeof r=="object")switch(r[su]){case TO:case dd:case MO:case nb:return!0}return!1}const DHe=r=>(ai(r)||Pa(r))&&!!r.anchor,io=Symbol("break visit"),Dre=Symbol("skip children"),Ul=Symbol("remove node");function Id(r,e){const t=Ere(e);ib(r)?Xp(null,r.contents,t,Object.freeze([r]))===Ul&&(r.contents=null):Xp(null,r,t,Object.freeze([]))}Id.BREAK=io;Id.SKIP=Dre;Id.REMOVE=Ul;function Xp(r,e,t,n){const i=kre(r,e,t,n);if(ki(i)||ii(i))return Tre(r,n,i),Xp(r,i,t,n);if(typeof i!="symbol"){if(Pa(e)){n=Object.freeze(n.concat(e));for(let a=0;ar.replace(/[!,[\]{}]/g,e=>EHe[e]);class Es{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Es.defaultYaml,e),this.tags=Object.assign({},Es.defaultTags,t)}clone(){const e=new Es(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Es(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Es.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Es.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:Es.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Es.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[a,o]=n;return this.tags[a]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[a]=n;if(a==="1.1"||a==="1.2")return this.yaml.version=a,!0;{const o=/^\d+\.\d+$/.test(a);return t(6,`Unsupported YAML version ${a}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,n,i]=e.match(/^(.*!)([^!]*)$/s);i||t(`The ${e} tag has no suffix`);const a=this.tags[n];if(a)try{return a+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+kHe(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let i;if(e&&n.length>0&&ki(e.contents)){const a={};Id(e.contents,(o,s)=>{ki(s)&&s.tag&&(a[s.tag]=!0)}),i=Object.keys(a)}else i=[];for(const[a,o]of n)a==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(s=>s.startsWith(o)))&&t.push(`%TAG ${a} ${o}`);return t.join(` +`)}}Es.defaultYaml={explicit:!1,version:"1.2"};Es.defaultTags={"!!":"tag:yaml.org,2002:"};function Mre(r){if(/[\x00-\x19\s,[\]{}]/.test(r)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(r)}`;throw new Error(t)}return!0}function THe(r){const e=new Set;return Id(r,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function MHe(r,e){for(let t=1;;++t){const n=`${r}${t}`;if(!e.has(n))return n}}function xZe(r,e){const t=[],n=new Map;let i=null;return{onAnchor:a=>{t.push(a),i||(i=THe(r));const o=MHe(e,i);return i.add(o),o},setAnchors:()=>{for(const a of t){const o=n.get(a);if(typeof o=="object"&&o.anchor&&(ai(o.node)||Pa(o.node)))o.node.anchor=o.anchor;else{const s=new Error("Failed to resolve repeated object (this should not happen)");throw s.source=a,s}}},sourceObjects:n}}function g0(r,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,a=n.length;iGs(n,String(i),t));if(r&&typeof r.toJSON=="function"){if(!t||!DHe(r))return r.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(r,n),t.onCreate=a=>{n.res=a,delete t.onCreate};const i=r.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof r=="bigint"&&!(t!=null&&t.keep)?Number(r):r}class LO{constructor(e){Object.defineProperty(this,su,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:a}={}){if(!ib(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},s=Gs(this,"",o);if(typeof i=="function")for(const{count:l,res:u}of o.anchors.values())i(u,l);return typeof a=="function"?g0(a,{"":s},"",s):s}}class IHe extends LO{constructor(e){super(TO),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return Id(e,{Node:(n,i)=>{if(i===this)return Id.BREAK;i.anchor===this.source&&(t=i)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:a}=t,o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let s=n.get(o);if(s||(Gs(o,null,t),s=n.get(o)),!s||s.res===void 0){const l="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(l)}if(a>=0&&(s.count+=1,s.aliasCount===0&&(s.aliasCount=$w(i,o,n)),s.count*s.aliasCount>a)){const l="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(l)}return s.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(Mre(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(a)}if(e.implicitKey)return`${i} `}return i}}function $w(r,e,t){if(Hv(e)){const n=e.resolve(r),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(Pa(e)){let n=0;for(const i of e.items){const a=$w(r,i,t);a>n&&(n=a)}return n}else if(ii(e)){const n=$w(r,e.key,t),i=$w(r,e.value,t);return Math.max(n,i)}return 1}const Ire=r=>!r||typeof r!="function"&&typeof r!="object";class gn extends LO{constructor(e){super(MO),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:Gs(this.value,e,t)}toString(){return String(this.value)}}gn.BLOCK_FOLDED="BLOCK_FOLDED";gn.BLOCK_LITERAL="BLOCK_LITERAL";gn.PLAIN="PLAIN";gn.QUOTE_DOUBLE="QUOTE_DOUBLE";gn.QUOTE_SINGLE="QUOTE_SINGLE";const LHe="tag:yaml.org,2002:";function FHe(r,e,t){if(e){const n=t.filter(a=>a.tag===e),i=n.find(a=>!a.format)??n[0];if(!i)throw new Error(`Tag ${e} not found`);return i}return t.find(n=>{var i;return((i=n.identify)==null?void 0:i.call(n,r))&&!n.format})}function gC(r,e,t){var f,h,d;if(ib(r)&&(r=r.contents),ki(r))return r;if(ii(r)){const p=(h=(f=t.schema[dd]).createNode)==null?void 0:h.call(f,t.schema,null,t);return p.items.push(r),p}(r instanceof String||r instanceof Number||r instanceof Boolean||typeof BigInt<"u"&&r instanceof BigInt)&&(r=r.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=t;let l;if(n&&r&&typeof r=="object"){if(l=s.get(r),l)return l.anchor||(l.anchor=i(r)),new IHe(l.anchor);l={anchor:null,node:null},s.set(r,l)}e!=null&&e.startsWith("!!")&&(e=LHe+e.slice(2));let u=FHe(r,e,o.tags);if(!u){if(r&&typeof r.toJSON=="function"&&(r=r.toJSON()),!r||typeof r!="object"){const p=new gn(r);return l&&(l.node=p),p}u=r instanceof Map?o[dd]:Symbol.iterator in Object(r)?o[nb]:o[dd]}a&&(a(u),delete t.onTagObj);const c=u!=null&&u.createNode?u.createNode(t.schema,r,t):typeof((d=u==null?void 0:u.nodeClass)==null?void 0:d.from)=="function"?u.nodeClass.from(t.schema,r,t):new gn(r);return e?c.tag=e:u.default||(c.tag=u.tag),l&&(l.node=c),c}function XU(r,e,t){let n=t;for(let i=e.length-1;i>=0;--i){const a=e[i];if(typeof a=="number"&&Number.isInteger(a)&&a>=0){const o=[];o[a]=n,n=o}else n=new Map([[a,n]])}return gC(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:r,sourceObjects:new Map})}const BHe=r=>r==null||typeof r=="object"&&!!r[Symbol.iterator]().next().done;class Lre extends LO{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>ki(n)||ii(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(BHe(e))this.add(t);else{const[n,...i]=e,a=this.get(n,!0);if(Pa(a))a.addIn(i,t);else if(a===void 0&&this.schema)this.set(n,XU(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const i=this.get(t,!0);if(Pa(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...i]=e,a=this.get(n,!0);return i.length===0?!t&&ai(a)?a.value:a:Pa(a)?a.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!ii(t))return!1;const n=t.value;return n==null||e&&ai(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const i=this.get(t,!0);return Pa(i)?i.hasIn(n):!1}setIn(e,t){const[n,...i]=e;if(i.length===0)this.set(n,t);else{const a=this.get(n,!0);if(Pa(a))a.setIn(i,t);else if(a===void 0&&this.schema)this.set(n,XU(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}}const OHe=r=>r.replace(/^(?!$)(?: $)?/gm,"#");function o1(r,e){return/^\n+$/.test(r)?r.substring(1):e?r.replace(/^(?! *$)/gm,e):r}const Jp=(r,e,t)=>r.endsWith(` +`)?o1(t,e):t.includes(` +`)?` +`+o1(t,e):(r.endsWith(" ")?"":" ")+t,Fre="flow",A3="block",jw="quoted";function tx(r,e,t="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return r;ii-Math.max(2,a)?u.push(0):f=i-n);let h,d,p=!1,g=-1,v=-1,m=-1;t===A3&&(g=QU(r,g,e.length),g!==-1&&(f=g+l));for(let b;b=r[g+=1];){if(t===jw&&b==="\\"){switch(v=g,r[g+1]){case"x":g+=3;break;case"u":g+=5;break;case"U":g+=9;break;default:g+=1}m=g}if(b===` +`)t===A3&&(g=QU(r,g,e.length)),f=g+e.length+l,h=void 0;else{if(b===" "&&d&&d!==" "&&d!==` +`&&d!==" "){const _=r[g+1];_&&_!==" "&&_!==` +`&&_!==" "&&(h=g)}if(g>=f)if(h)u.push(h),f=h+l,h=void 0;else if(t===jw){for(;d===" "||d===" ";)d=b,b=r[g+=1],p=!0;const _=g>m+1?g-2:v-1;if(c[_])return r;u.push(_),c[_]=!0,f=_+l,h=void 0}else p=!0}d=b}if(p&&s&&s(),u.length===0)return r;o&&o();let y=r.slice(0,u[0]);for(let b=0;b({indentAtStart:e?r.indent.length:r.indentAtStart,lineWidth:r.options.lineWidth,minContentWidth:r.options.minContentWidth}),nx=r=>/^(%|---|\.\.\.)/m.test(r);function PHe(r,e,t){if(!e||e<0)return!1;const n=e-t,i=r.length;if(i<=n)return!1;for(let a=0,o=0;an)return!0;if(o=a+1,i-o<=n)return!1}return!0}function z0(r,e){const t=JSON.stringify(r);if(e.options.doubleQuotedAsJSON)return t;const{implicitKey:n}=e,i=e.options.doubleQuotedMinMultiLineLength,a=e.indent||(nx(r)?" ":"");let o="",s=0;for(let l=0,u=t[l];u;u=t[++l])if(u===" "&&t[l+1]==="\\"&&t[l+2]==="n"&&(o+=t.slice(s,l)+"\\ ",l+=1,s=l,u="\\"),u==="\\")switch(t[l+1]){case"u":{o+=t.slice(s,l);const c=t.substr(l+2,4);switch(c){case"0000":o+="\\0";break;case"0007":o+="\\a";break;case"000b":o+="\\v";break;case"001b":o+="\\e";break;case"0085":o+="\\N";break;case"00a0":o+="\\_";break;case"2028":o+="\\L";break;case"2029":o+="\\P";break;default:c.substr(0,2)==="00"?o+="\\x"+c.substr(2):o+=t.substr(l,6)}l+=5,s=l+1}break;case"n":if(n||t[l+2]==='"'||t.length +`;let f,h;for(h=t.length;h>0;--h){const w=t[h-1];if(w!==` +`&&w!==" "&&w!==" ")break}let d=t.substring(h);const p=d.indexOf(` +`);p===-1?f="-":t===d||p!==d.length-1?(f="+",a&&a()):f="",d&&(t=t.slice(0,-d.length),d[d.length-1]===` +`&&(d=d.slice(0,-1)),d=d.replace(D3,`$&${u}`));let g=!1,v,m=-1;for(v=0;v{S=!0});const A=tx(`${y}${w}${d}`,u,A3,C);if(!S)return`>${_} +${u}${A}`}return t=t.replace(/\n+/g,`$&${u}`),`|${_} +${u}${y}${t}${d}`}function RHe(r,e,t,n){const{type:i,value:a}=r,{actualString:o,implicitKey:s,indent:l,indentStep:u,inFlow:c}=e;if(s&&a.includes(` +`)||c&&/[[\]{},]/.test(a))return eg(a,e);if(!a||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||c||!a.includes(` +`)?eg(a,e):qw(r,e,t,n);if(!s&&!c&&i!==gn.PLAIN&&a.includes(` +`))return qw(r,e,t,n);if(nx(a)){if(l==="")return e.forceBlockIndent=!0,qw(r,e,t,n);if(s&&l===u)return eg(a,e)}const f=a.replace(/\n+/g,`$& +${l}`);if(o){const h=g=>{var v;return g.default&&g.tag!=="tag:yaml.org,2002:str"&&((v=g.test)==null?void 0:v.test(f))},{compat:d,tags:p}=e.doc.schema;if(p.some(h)||d!=null&&d.some(h))return eg(a,e)}return s?f:tx(f,l,Fre,rx(e,!1))}function FO(r,e,t,n){const{implicitKey:i,inFlow:a}=e,o=typeof r.value=="string"?r:Object.assign({},r,{value:String(r.value)});let{type:s}=r;s!==gn.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=gn.QUOTE_DOUBLE);const l=c=>{switch(c){case gn.BLOCK_FOLDED:case gn.BLOCK_LITERAL:return i||a?eg(o.value,e):qw(o,e,t,n);case gn.QUOTE_DOUBLE:return z0(o.value,e);case gn.QUOTE_SINGLE:return x3(o.value,e);case gn.PLAIN:return RHe(o,e,t,n);default:return null}};let u=l(s);if(u===null){const{defaultKeyType:c,defaultStringType:f}=e.options,h=i&&c||f;if(u=l(h),u===null)throw new Error(`Unsupported default string type ${h}`)}return u}function NHe(r,e){const t=Object.assign({blockQuote:!0,commentString:OHe,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},r.schema.toStringOptions,e);let n;switch(t.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:r,flowCollectionPadding:t.flowCollectionPadding?" ":"",indent:"",indentStep:typeof t.indent=="number"?" ".repeat(t.indent):" ",inFlow:n,options:t}}function zHe(r,e){var i;if(e.tag){const a=r.filter(o=>o.tag===e.tag);if(a.length>0)return a.find(o=>o.format===e.format)??a[0]}let t,n;if(ai(e)){n=e.value;let a=r.filter(o=>{var s;return(s=o.identify)==null?void 0:s.call(o,n)});if(a.length>1){const o=a.filter(s=>s.test);o.length>0&&(a=o)}t=a.find(o=>o.format===e.format)??a.find(o=>!o.format)}else n=e,t=r.find(a=>a.nodeClass&&n instanceof a.nodeClass);if(!t){const a=((i=n==null?void 0:n.constructor)==null?void 0:i.name)??typeof n;throw new Error(`Tag not resolved for ${a} value`)}return t}function VHe(r,e,{anchors:t,doc:n}){if(!n.directives)return"";const i=[],a=(ai(r)||Pa(r))&&r.anchor;a&&Mre(a)&&(t.add(a),i.push(`&${a}`));const o=r.tag?r.tag:e.default?null:e.tag;return o&&i.push(n.directives.tagString(o)),i.join(" ")}function vC(r,e,t,n){var l;if(ii(r))return r.toString(e,t,n);if(Hv(r)){if(e.doc.directives)return r.toString(e);if((l=e.resolvedAliases)!=null&&l.has(r))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(r):e.resolvedAliases=new Set([r]),r=r.resolve(e.doc)}let i;const a=ki(r)?r:e.doc.createNode(r,{onTagObj:u=>i=u});i||(i=zHe(e.doc.schema.tags,a));const o=VHe(a,i,e);o.length>0&&(e.indentAtStart=(e.indentAtStart??0)+o.length+1);const s=typeof i.stringify=="function"?i.stringify(a,e,t,n):ai(a)?FO(a,e,t,n):a.toString(e,t,n);return o?ai(a)||s[0]==="{"||s[0]==="["?`${o} ${s}`:`${o} +${e.indent}${s}`:s}function UHe({key:r,value:e},t,n,i){const{allNullValues:a,doc:o,indent:s,indentStep:l,options:{commentString:u,indentSeq:c,simpleKeys:f}}=t;let h=ki(r)&&r.comment||null;if(f){if(h)throw new Error("With simple keys, key nodes cannot have comments");if(Pa(r)||!ki(r)&&typeof r=="object"){const C="With simple keys, collection cannot be used as a key value";throw new Error(C)}}let d=!f&&(!r||h&&e==null&&!t.inFlow||Pa(r)||(ai(r)?r.type===gn.BLOCK_FOLDED||r.type===gn.BLOCK_LITERAL:typeof r=="object"));t=Object.assign({},t,{allNullValues:!1,implicitKey:!d&&(f||!a),indent:s+l});let p=!1,g=!1,v=vC(r,t,()=>p=!0,()=>g=!0);if(!d&&!t.inFlow&&v.length>1024){if(f)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");d=!0}if(t.inFlow){if(a||e==null)return p&&n&&n(),v===""?"?":d?`? ${v}`:v}else if(a&&!f||e==null&&d)return v=`? ${v}`,h&&!p?v+=Jp(v,t.indent,u(h)):g&&i&&i(),v;p&&(h=null),d?(h&&(v+=Jp(v,t.indent,u(h))),v=`? ${v} +${s}:`):(v=`${v}:`,h&&(v+=Jp(v,t.indent,u(h))));let m,y,b;ki(e)?(m=!!e.spaceBefore,y=e.commentBefore,b=e.comment):(m=!1,y=null,b=null,e&&typeof e=="object"&&(e=o.createNode(e))),t.implicitKey=!1,!d&&!h&&ai(e)&&(t.indentAtStart=v.length+1),g=!1,!c&&l.length>=2&&!t.inFlow&&!d&&ex(e)&&!e.flow&&!e.tag&&!e.anchor&&(t.indent=t.indent.substring(2));let _=!1;const w=vC(e,t,()=>_=!0,()=>g=!0);let S=" ";if(h||m||y){if(S=m?` +`:"",y){const C=u(y);S+=` +${o1(C,t.indent)}`}w===""&&!t.inFlow?S===` +`&&(S=` + +`):S+=` +${t.indent}`}else if(!d&&Pa(e)){const C=w[0],A=w.indexOf(` +`),x=A!==-1,D=t.inFlow??e.flow??e.items.length===0;if(x||!D){let E=!1;if(x&&(C==="&"||C==="!")){let k=w.indexOf(" ");C==="&"&&k!==-1&&kr===j_||typeof r=="symbol"&&r.description===j_,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new gn(Symbol(j_)),{addToJSMap:Bre}),stringify:()=>j_},HHe=(r,e)=>(qk.identify(e)||ai(e)&&(!e.type||e.type===gn.PLAIN)&&qk.identify(e.value))&&(r==null?void 0:r.doc.schema.tags.some(t=>t.tag===qk.tag&&t.default));function Bre(r,e,t){if(t=r&&Hv(t)?t.resolve(r.doc):t,ex(t))for(const n of t.items)Yk(r,e,n);else if(Array.isArray(t))for(const n of t)Yk(r,e,n);else Yk(r,e,t)}function Yk(r,e,t){const n=r&&Hv(t)?t.resolve(r.doc):t;if(!JA(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,r,Map);for(const[a,o]of i)e instanceof Map?e.has(a)||e.set(a,o):e instanceof Set?e.add(a):Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function Ore(r,e,{key:t,value:n}){if(ki(t)&&t.addToJSMap)t.addToJSMap(r,e,n);else if(HHe(r,t))Bre(r,e,n);else{const i=Gs(t,"",r);if(e instanceof Map)e.set(i,Gs(n,i,r));else if(e instanceof Set)e.add(i);else{const a=WHe(t,i,r),o=Gs(n,a,r);a in e?Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[a]=o}}return e}function WHe(r,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(ki(r)&&(t!=null&&t.doc)){const n=NHe(t.doc,{});n.anchors=new Set;for(const a of t.anchors.keys())n.anchors.add(a.anchor);n.inFlow=!0,n.inStringifyKey=!0;const i=r.toString(n);if(!t.mapKeyWarned){let a=JSON.stringify(i);a.length>40&&(a=a.substring(0,36)+'..."'),GHe(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${a}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function BO(r,e,t){const n=gC(r,void 0,t),i=gC(e,void 0,t);return new Hs(n,i)}class Hs{constructor(e,t=null){Object.defineProperty(this,su,{value:xre}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return ki(t)&&(t=t.clone(e)),ki(n)&&(n=n.clone(e)),new Hs(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return Ore(t,n,this)}toString(e,t,n){return e!=null&&e.doc?UHe(this,e,t,n):JSON.stringify(this)}}function Pre(r,e,t){return(e.inFlow??r.flow?jHe:$He)(r,e,t)}function $He({comment:r,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){const{indent:l,options:{commentString:u}}=t,c=Object.assign({},t,{indent:a,type:null});let f=!1;const h=[];for(let p=0;pv=null,()=>f=!0);v&&(m+=Jp(m,a,u(v))),f&&v&&(f=!1),h.push(n+m)}let d;if(h.length===0)d=i.start+i.end;else{d=h[0];for(let p=1;pv=null);pc||m.includes(` +`))&&(u=!0),f.push(m),c=f.length}const{start:h,end:d}=t;if(f.length===0)return h+d;if(!u){const p=f.reduce((g,v)=>g+v.length+2,2);u=e.options.lineWidth>0&&p>e.options.lineWidth}if(u){let p=h;for(const g of f)p+=g?` +${a}${i}${g}`:` +`;return`${p} +${i}${d}`}else return`${h}${o}${f.join(" ")}${o}${d}`}function mC({indent:r,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const a=o1(e(n),r);t.push(a.trimStart())}}function $h(r,e){const t=ai(e)?e.value:e;for(const n of r)if(ii(n)&&(n.key===e||n.key===t||ai(n.key)&&n.key.value===t))return n}class Up extends Lre{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(dd,e),this.items=[]}static from(e,t,n){const{keepUndefined:i,replacer:a}=n,o=new this(e),s=(l,u)=>{if(typeof a=="function")u=a.call(t,l,u);else if(Array.isArray(a)&&!a.includes(l))return;(u!==void 0||i)&&o.items.push(BO(l,u,n))};if(t instanceof Map)for(const[l,u]of t)s(l,u);else if(t&&typeof t=="object")for(const l of Object.keys(t))s(l,t[l]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){var o;let n;ii(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new Hs(e,e==null?void 0:e.value):n=new Hs(e.key,e.value);const i=$h(this.items,n.key),a=(o=this.schema)==null?void 0:o.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);ai(i.value)&&Ire(n.value)?i.value.value=n.value:i.value=n.value}else if(a){const s=this.items.findIndex(l=>a(n,l)<0);s===-1?this.items.push(n):this.items.splice(s,0,n)}else this.items.push(n)}delete(e){const t=$h(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){const n=$h(this.items,e),i=n==null?void 0:n.value;return(!t&&ai(i)?i.value:i)??void 0}has(e){return!!$h(this.items,e)}set(e,t){this.add(new Hs(e,t),!0)}toJSON(e,t,n){const i=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(i);for(const a of this.items)Ore(t,i,a);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(const i of this.items)if(!ii(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Pre(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}class Rre extends Lre{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(nb,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=q_(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=q_(e);if(typeof n!="number")return;const i=this.items[n];return!t&&ai(i)?i.value:i}has(e){const t=q_(e);return typeof t=="number"&&t=0?e:null}function Nre(r,e){if(ex(r))for(let t=0;t1&&e("Each pair must have its own sequence indicator");const i=n.items[0]||new Hs(new gn(null));if(n.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${n.commentBefore} +${i.key.commentBefore}`:n.commentBefore),n.comment){const a=i.value??i.key;a.comment=a.comment?`${n.comment} +${a.comment}`:n.comment}n=i}r.items[t]=ii(n)?n:new Hs(n)}}else e("Expected a sequence for this tag");return r}function zre(r,e,t){const{replacer:n}=t,i=new Rre(r);i.tag="tag:yaml.org,2002:pairs";let a=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(a++),o));let s,l;if(Array.isArray(o))if(o.length===2)s=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)s=u[0],l=o[s];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else s=o;i.items.push(BO(s,l,t))}return i}const DZe={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Nre,createNode:zre};class wg extends Rre{constructor(){super(),this.add=Up.prototype.add.bind(this),this.delete=Up.prototype.delete.bind(this),this.get=Up.prototype.get.bind(this),this.has=Up.prototype.has.bind(this),this.set=Up.prototype.set.bind(this),this.tag=wg.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const i of this.items){let a,o;if(ii(i)?(a=Gs(i.key,"",t),o=Gs(i.value,a,t)):a=Gs(i,"",t),n.has(a))throw new Error("Ordered maps must not include duplicate keys");n.set(a,o)}return n}static from(e,t,n){const i=zre(e,t,n),a=new this;return a.items=i.items,a}}wg.tag="tag:yaml.org,2002:omap";const EZe={collection:"seq",identify:r=>r instanceof Map,nodeClass:wg,default:!1,tag:"tag:yaml.org,2002:omap",resolve(r,e){const t=Nre(r,e),n=[];for(const{key:i}of t.items)ai(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new wg,t)},createNode:(r,e,t)=>wg.from(r,e,t)};class Sg extends Up{constructor(e){super(e),this.tag=Sg.tag}add(e){let t;ii(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new Hs(e.key,null):t=new Hs(e,null),$h(this.items,t.key)||this.items.push(t)}get(e,t){const n=$h(this.items,e);return!t&&ii(n)?ai(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=$h(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new Hs(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:i}=n,a=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),a.items.push(BO(o,null,n));return a}}Sg.tag="tag:yaml.org,2002:set";const kZe={collection:"map",identify:r=>r instanceof Set,nodeClass:Sg,default:!1,tag:"tag:yaml.org,2002:set",createNode:(r,e,t)=>Sg.from(r,e,t),resolve(r,e){if(JA(r)){if(r.hasAllNullValues(!0))return Object.assign(new Sg,r);e("Set items must all have null values")}else e("Expected a mapping for this tag");return r}};class Vre extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}}class qHe extends Vre{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class TZe extends Vre{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const MZe=(r,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(s=>e.linePos(s));const{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let a=i-1,o=r.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(a>=60&&o.length>80){const s=Math.min(a-39,o.length-79);o="…"+o.substring(s),a-=s-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,a))){let s=r.substring(e.lineStarts[n-2],e.lineStarts[n-1]);s.length>80&&(s=s.substring(0,79)+`… +`),o=s+o}if(/[^ ]/.test(o)){let s=1;const l=t.linePos[1];l&&l.line===n&&l.col>i&&(s=Math.max(1,Math.min(l.col-i,80-a)));const u=" ".repeat(a)+"^".repeat(s);t.message+=`: + +${o} +${u} +`}};function YHe(r,e,t,n){let i="";if(r){let a=!1,o="";for(const s of r){const{source:l,type:u}=s;switch(u){case"space":a=!0;break;case"comment":{t&&!a&&n(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const c=l.substring(1)||" ";i?i+=o+c:i=c,o="";break}case"newline":i&&(o+=l),a=!0;break;default:n(s,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}e+=l.length}}return{comment:i,offset:e}}function ZHe(r,e,t){const n=e.offset,i=KHe(e,r.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};const a=i.mode===">"?gn.BLOCK_FOLDED:gn.BLOCK_LITERAL,o=e.source?XHe(e.source):[];let s=o.length;for(let g=o.length-1;g>=0;--g){const v=o[g][1];if(v===""||v==="\r")s=g;else break}if(s===0){const g=i.chomp==="+"&&o.length>0?` +`.repeat(Math.max(1,o.length-1)):"";let v=n+i.length;return e.source&&(v+=e.source.length),{value:g,type:a,comment:i.comment,range:[n,v,v]}}let l=e.indent+i.indent,u=e.offset+i.length,c=0;for(let g=0;gl&&(l=v.length);else{v.length=s;--g)o[g][0].length>l&&(s=g+1);let f="",h="",d=!1;for(let g=0;gl||m[0]===" "?(h===" "?h=` +`:!d&&h===` +`&&(h=` + +`),f+=h+v.slice(l)+m,h=` +`,d=!0):m===""?h===` +`?f+=` +`:h=` +`:(f+=h+m,h=" ",d=!1)}switch(i.chomp){case"-":break;case"+":for(let g=s;gt(n+h,d,p);switch(i){case"scalar":s=gn.PLAIN,l=JHe(a,u);break;case"single-quoted-scalar":s=gn.QUOTE_SINGLE,l=eWe(a,u);break;case"double-quoted-scalar":s=gn.QUOTE_DOUBLE,l=tWe(a,u);break;default:return t(r,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+a.length,n+a.length]}}const c=n+a.length,f=YHe(o,c,e,t);return{value:l,type:s,comment:f.comment,range:[n,c,f.offset]}}function JHe(r,e){let t="";switch(r[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${r[0]}`;break}case"@":case"`":{t=`reserved character ${r[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Ure(r)}function eWe(r,e){return(r[r.length-1]!=="'"||r.length===1)&&e(r.length,"MISSING_CHAR","Missing closing 'quote"),Ure(r.slice(1,-1)).replace(/''/g,"'")}function Ure(r){let e,t;try{e=new RegExp(`(.*?)(?a?r.slice(a,n+1):i)}else t+=i}return(r[r.length-1]!=='"'||r.length===1)&&e(r.length,"MISSING_CHAR",'Missing closing "quote'),t}function rWe(r,e){let t="",n=r[e+1];for(;(n===" "||n===" "||n===` +`||n==="\r")&&!(n==="\r"&&r[e+2]!==` +`);)n===` +`&&(t+=` +`),e+=1,n=r[e+1];return t||(t=" "),{fold:t,offset:e}}const nWe={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:` +`,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function iWe(r,e,t,n){const i=r.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const s=r.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${s}`),s}return String.fromCodePoint(o)}function aWe(r,e=!0,t){if(r){const n=(i,a,o)=>{const s=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(s,a,o);else throw new qHe([s,s+1],a,o)};switch(r.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return QHe(r,e,n);case"block-scalar":return ZHe({options:{strict:e}},r,n)}}return null}function oWe(r,e){const{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:a=-1,type:o="PLAIN"}=e,s=FO({type:o,value:r},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=e.end??[{type:"newline",offset:-1,indent:n,source:` +`}];switch(s[0]){case"|":case">":{const u=s.indexOf(` +`),c=s.substring(0,u),f=s.substring(u+1)+` +`,h=[{type:"block-scalar-header",offset:a,indent:n,source:c}];return Gre(h,l)||h.push({type:"newline",offset:-1,indent:n,source:` +`}),{type:"block-scalar",offset:a,indent:n,props:h,source:f}}case'"':return{type:"double-quoted-scalar",offset:a,indent:n,source:s,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:n,source:s,end:l};default:return{type:"scalar",offset:a,indent:n,source:s,end:l}}}function sWe(r,e,t={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:a=!1,type:o}=t,s="indent"in r?r.indent:null;if(n&&typeof s=="number"&&(s+=2),!o)switch(r.type){case"single-quoted-scalar":o="QUOTE_SINGLE";break;case"double-quoted-scalar":o="QUOTE_DOUBLE";break;case"block-scalar":{const u=r.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o=u.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:o="PLAIN"}const l=FO({type:o,value:e},{implicitKey:i||s===null,indent:s!==null&&s>0?" ".repeat(s):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":lWe(r,l);break;case'"':Zk(r,l,"double-quoted-scalar");break;case"'":Zk(r,l,"single-quoted-scalar");break;default:Zk(r,l,"scalar")}}function lWe(r,e){const t=e.indexOf(` +`),n=e.substring(0,t),i=e.substring(t+1)+` +`;if(r.type==="block-scalar"){const a=r.props[0];if(a.type!=="block-scalar-header")throw new Error("Invalid block scalar header");a.source=n,r.source=i}else{const{offset:a}=r,o="indent"in r?r.indent:-1,s=[{type:"block-scalar-header",offset:a,indent:o,source:n}];Gre(s,"end"in r?r.end:void 0)||s.push({type:"newline",offset:-1,indent:o,source:` +`});for(const l of Object.keys(r))l!=="type"&&l!=="offset"&&delete r[l];Object.assign(r,{type:"block-scalar",indent:o,props:s,source:i})}}function Gre(r,e){if(e)for(const t of e)switch(t.type){case"space":case"comment":r.push(t);break;case"newline":return r.push(t),!0}return!1}function Zk(r,e,t){switch(r.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":r.type=t,r.source=e;break;case"block-scalar":{const n=r.props.slice(1);let i=e.length;r.props[0].type==="block-scalar-header"&&(i-=r.props[0].source.length);for(const a of n)a.offset+=i;delete r.props,Object.assign(r,{type:t,source:e,end:n});break}case"block-map":case"block-seq":{const i={type:"newline",offset:r.offset+e.length,indent:r.indent,source:` +`};delete r.items,Object.assign(r,{type:t,source:e,end:[i]});break}default:{const n="indent"in r?r.indent:-1,i="end"in r&&Array.isArray(r.end)?r.end.filter(a=>a.type==="space"||a.type==="comment"||a.type==="newline"):[];for(const a of Object.keys(r))a!=="type"&&a!=="offset"&&delete r[a];Object.assign(r,{type:t,indent:n,source:e,end:i})}}}const uWe=r=>"type"in r?yC(r):Yw(r);function yC(r){switch(r.type){case"block-scalar":{let e="";for(const t of r.props)e+=yC(t);return e+r.source}case"block-map":case"block-seq":{let e="";for(const t of r.items)e+=Yw(t);return e}case"flow-collection":{let e=r.start.source;for(const t of r.items)e+=Yw(t);for(const t of r.end)e+=t.source;return e}case"document":{let e=Yw(r);if(r.end)for(const t of r.end)e+=t.source;return e}default:{let e=r.source;if("end"in r&&r.end)for(const t of r.end)e+=t.source;return e}}}function Yw({start:r,key:e,sep:t,value:n}){let i="";for(const a of r)i+=a.source;if(e&&(i+=yC(e)),t)for(const a of t)i+=a.source;return n&&(i+=yC(n)),i}const E3=Symbol("break visit"),cWe=Symbol("skip children"),Hre=Symbol("remove item");function Ld(r,e){"type"in r&&r.type==="document"&&(r={start:r.start,value:r.value}),Wre(Object.freeze([]),r,e)}Ld.BREAK=E3;Ld.SKIP=cWe;Ld.REMOVE=Hre;Ld.itemAtPath=(r,e)=>{let t=r;for(const[n,i]of e){const a=t==null?void 0:t[n];if(a&&"items"in a)t=a.items[i];else return}return t};Ld.parentCollection=(r,e)=>{const t=Ld.itemAtPath(r,e.slice(0,-1)),n=e[e.length-1][0],i=t==null?void 0:t[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function Wre(r,e,t){let n=t(e,r);if(typeof n=="symbol")return n;for(const i of["key","value"]){const a=e[i];if(a&&"items"in a){for(let o=0;o!!r&&"items"in r,hWe=r=>!!r&&(r.type==="scalar"||r.type==="single-quoted-scalar"||r.type==="double-quoted-scalar"||r.type==="block-scalar");function dWe(r){switch(r){case ix:return"";case ax:return"";case ox:return"";case s1:return"";default:return JSON.stringify(r)}}function pWe(r){switch(r){case ix:return"byte-order-mark";case ax:return"doc-mode";case ox:return"flow-error-end";case s1:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case` +`:case`\r +`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(r[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const IZe=Object.freeze(Object.defineProperty({__proto__:null,BOM:ix,DOCUMENT:ax,FLOW_END:ox,SCALAR:s1,createScalarToken:oWe,isCollection:fWe,isScalar:hWe,prettyToken:dWe,resolveAsScalar:aWe,setScalarValue:sWe,stringify:uWe,tokenType:pWe,visit:Ld},Symbol.toStringTag,{value:"Module"}));function Ss(r){switch(r){case void 0:case" ":case` +`:case"\r":case" ":return!0;default:return!1}}const JU=new Set("0123456789ABCDEFabcdef"),gWe=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Y_=new Set(",[]{}"),vWe=new Set(` ,[]{} +\r `),Kk=r=>!r||vWe.has(r);class LZe{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let n=this.next??"stream";for(;n&&(t||this.hasChars(1));)n=yield*this.parseNext(n)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;t===" "||t===" ";)t=this.buffer[++e];return!t||t==="#"||t===` +`?!0:t==="\r"?this.buffer[e+1]===` +`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let n=0;for(;t===" ";)t=this.buffer[++n+e];if(t==="\r"){const i=this.buffer[n+e+1];if(i===` +`||!i&&!this.atEnd)return e+n+1}return t===` +`||n>=this.indentNext||!t&&!this.atEnd?e+n:-1}if(t==="-"||t==="."){const n=this.buffer.substr(e,3);if((n==="---"||n==="...")&&Ss(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&ethis.indentValue&&!Ss(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&Ss(t)){const n=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=n,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Kk),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=yield*this.parseBlockScalarHeader(),t+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,n=-1;do e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=n=t):t=0,t+=yield*this.pushSpaces(!0);while(e+t>0);const i=this.getLine();if(i===null)return this.setNext("flow");if((n!==-1&&n"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if(t!=="-")break}return yield*this.pushUntil(t=>Ss(t)||t==="#")}*parseBlockScalar(){let e=this.pos-1,t=0,n;e:for(let a=this.pos;n=this.buffer[a];++a)switch(n){case" ":t+=1;break;case` +`:e=a,t=0;break;case"\r":{const o=this.buffer[a+1];if(!o&&!this.atEnd)return this.setNext("block-scalar");if(o===` +`)break}default:break e}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(t>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=t:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const a=this.continueScalar(e+1);if(a===-1)break;e=this.buffer.indexOf(` +`,a)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let i=e+1;for(n=this.buffer[i];n===" ";)n=this.buffer[++i];if(n===" "){for(;n===" "||n===" "||n==="\r"||n===` +`;)n=this.buffer[++i];e=i-1}else if(!this.blockScalarKeep)do{let a=e-1,o=this.buffer[a];o==="\r"&&(o=this.buffer[--a]);const s=a;for(;o===" ";)o=this.buffer[--a];if(o===` +`&&a>=this.pos&&a+1+t>s)e=a;else break}while(!0);return yield s1,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t=this.pos-1,n=this.pos-1,i;for(;i=this.buffer[++n];)if(i===":"){const a=this.buffer[n+1];if(Ss(a)||e&&Y_.has(a))break;t=n}else if(Ss(i)){let a=this.buffer[n+1];if(i==="\r"&&(a===` +`?(n+=1,i=` +`,a=this.buffer[n+1]):t=n),a==="#"||e&&Y_.has(a))break;if(i===` +`){const o=this.continueScalar(n+1);if(o===-1)break;n=Math.max(n,o-2)}}else{if(e&&Y_.has(i))break;t=n}return!i&&!this.atEnd?this.setNext("plain-scalar"):(yield s1,yield*this.pushToIndex(t+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const n=this.buffer.slice(this.pos,e);return n?(yield n,this.pos+=n.length,n.length):(t&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Kk))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,t=this.charAt(1);if(Ss(t)||e&&Y_.has(t))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,t=this.buffer[e];for(;!Ss(t)&&t!==">";)t=this.buffer[++e];return yield*this.pushToIndex(t===">"?e+1:e,!1)}else{let e=this.pos+1,t=this.buffer[e];for(;t;)if(gWe.has(t))t=this.buffer[++e];else if(t==="%"&&JU.has(this.buffer[e+1])&&JU.has(this.buffer[e+2]))t=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===` +`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===` +`?yield*this.pushCount(2):0}*pushSpaces(e){let t=this.pos-1,n;do n=this.buffer[++t];while(n===" "||e&&n===" ");const i=t-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=t),i}*pushUntil(e){let t=this.pos,n=this.buffer[t];for(;!e(n);)n=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}var ct,tl,$re,xc,ut,OO,jre,rt,vn,ce,xr,Vr,wn,Be,st,Pt,et;ct={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9};tl={};tl[ct.BooleanLiteral]="Boolean";tl[ct.EOF]="";tl[ct.Identifier]="Identifier";tl[ct.Keyword]="Keyword";tl[ct.NullLiteral]="Null";tl[ct.NumericLiteral]="Numeric";tl[ct.Punctuator]="Punctuator";tl[ct.StringLiteral]="String";tl[ct.RegularExpression]="RegularExpression";$re=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="];var Ht={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"};xc={Data:1,Get:2,Set:4};ut={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"};OO={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")};function ab(r,e){if(!r)throw new Error("ASSERT: "+e)}function Au(r){return r>=48&&r<=57}function qre(r){return"0123456789abcdefABCDEF".indexOf(r)>=0}function V0(r){return"01234567".indexOf(r)>=0}function mWe(r){return r===32||r===9||r===11||r===12||r===160||r>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(r)>=0}function Fd(r){return r===10||r===13||r===8232||r===8233}function Wv(r){return r==64||r===36||r===95||r>=65&&r<=90||r>=97&&r<=122||r===92||r>=128&&OO.NonAsciiIdentifierStart.test(String.fromCharCode(r))}function bC(r){return r===36||r===95||r>=65&&r<=90||r>=97&&r<=122||r>=48&&r<=57||r===92||r>=128&&OO.NonAsciiIdentifierPart.test(String.fromCharCode(r))}function yWe(r){switch(r){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}function ob(r){switch(r){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function ps(r){return r==="eval"||r==="arguments"}function bWe(r){if(vn&&ob(r))return!0;switch(r.length){case 2:return r==="if"||r==="in"||r==="do";case 3:return r==="var"||r==="for"||r==="new"||r==="try"||r==="let";case 4:return r==="this"||r==="else"||r==="case"||r==="void"||r==="with"||r==="enum";case 5:return r==="while"||r==="break"||r==="catch"||r==="throw"||r==="const"||r==="yield"||r==="class"||r==="super";case 6:return r==="return"||r==="typeof"||r==="delete"||r==="switch"||r==="export"||r==="import";case 7:return r==="default"||r==="finally"||r==="extends";case 8:return r==="function"||r==="continue"||r==="debugger";case 10:return r==="instanceof";default:return!1}}function k3(r,e,t,n,i){var a;ab(typeof t=="number","Comment must have valid position"),!(Pt.lastCommentStart>=t)&&(Pt.lastCommentStart=t,a={type:r,value:e},et.range&&(a.range=[t,n]),et.loc&&(a.loc=i),et.comments.push(a),et.attachComment&&(et.leadingComments.push(a),et.trailingComments.push(a)))}function Xk(r){var e,t,n,i;for(e=ce-r,t={start:{line:xr,column:ce-Vr-r}};ce=wn&&Fr({},ut.UnexpectedToken,"ILLEGAL");else if(t===42){if(rt.charCodeAt(ce+1)===47){++ce,++ce,et.comments&&(n=rt.slice(r+2,ce-2),e.end={line:xr,column:ce-Vr},k3("Block",n,r,ce,e));return}++ce}else++ce;Fr({},ut.UnexpectedToken,"ILLEGAL")}function Nf(){var r,e;for(e=ce===0;ce>>=")return ce+=4,{type:ct.Punctuator,value:o,lineNumber:xr,lineStart:Vr,start:r,end:ce};if(a=o.substr(0,3),a===">>>"||a==="<<="||a===">>=")return ce+=3,{type:ct.Punctuator,value:a,lineNumber:xr,lineStart:Vr,start:r,end:ce};if(i=a.substr(0,2),n===i[1]&&"+-<>&|".indexOf(n)>=0||i==="=>")return ce+=2,{type:ct.Punctuator,value:i,lineNumber:xr,lineStart:Vr,start:r,end:ce};if("<>=!+-*%&|^/".indexOf(n)>=0)return++ce,{type:ct.Punctuator,value:n,lineNumber:xr,lineStart:Vr,start:r,end:ce};Fr({},ut.UnexpectedToken,"ILLEGAL")}function CWe(r){for(var e="";ce=0&&ce0&&(n=et.tokens[et.tokens.length-1],n.range[0]===r&&n.type==="Punctuator"&&(n.value==="/"||n.value==="/=")&&et.tokens.pop()),et.tokens.push({type:"RegularExpression",value:t.literal,range:[r,ce],loc:e})),t}function TWe(r){return r.type===ct.Identifier||r.type===ct.Keyword||r.type===ct.BooleanLiteral||r.type===ct.NullLiteral}function MWe(){var r,e;if(r=et.tokens[et.tokens.length-1],!r)return Ch();if(r.type==="Punctuator"){if(r.value==="]")return xu();if(r.value===")")return e=et.tokens[et.openParenToken-1],e&&e.type==="Keyword"&&(e.value==="if"||e.value==="while"||e.value==="for"||e.value==="with")?Ch():xu();if(r.value==="}"){if(et.tokens[et.openCurlyToken-3]&&et.tokens[et.openCurlyToken-3].type==="Keyword"){if(e=et.tokens[et.openCurlyToken-4],!e)return xu()}else if(et.tokens[et.openCurlyToken-4]&&et.tokens[et.openCurlyToken-4].type==="Keyword"){if(e=et.tokens[et.openCurlyToken-5],!e)return Ch()}else return xu();return $re.indexOf(e.value)>=0?xu():Ch()}return Ch()}return r.type==="Keyword"?Ch():xu()}function PO(){var r;return Nf(),ce>=wn?{type:ct.EOF,lineNumber:xr,lineStart:Vr,start:ce,end:ce}:(r=rt.charCodeAt(ce),Wv(r)?SWe():r===40||r===41||r===59?xu():r===39||r===34?xWe():r===46?Au(rt.charCodeAt(ce+1))?eG():xu():Au(r)?eG():et.tokenize&&r===47?MWe():xu())}function Kre(){var r,e,t;return Nf(),r={start:{line:xr,column:ce-Vr}},e=PO(),r.end={line:xr,column:ce-Vr},e.type!==ct.EOF&&(t=rt.slice(e.start,e.end),et.tokens.push({type:tl[e.type],value:t,range:[e.start,e.end],loc:r})),e}function Ur(){var r;return r=st,ce=r.end,xr=r.lineNumber,Vr=r.lineStart,st=typeof et.tokens<"u"?Kre():PO(),ce=r.end,xr=r.lineNumber,Vr=r.lineStart,r}function Xre(){var r,e,t;r=ce,e=xr,t=Vr,st=typeof et.tokens<"u"?Kre():PO(),ce=r,xr=e,Vr=t}function tG(r,e){this.line=r,this.column=e}function IWe(r,e,t,n){this.start=new tG(r,e),this.end=new tG(t,n)}jre={name:"SyntaxTree",processComment:function(r){var e,t;if(!(r.type===Ht.Program&&r.body.length>0)){for(et.trailingComments.length>0?et.trailingComments[0].range[0]>=r.range[1]?(t=et.trailingComments,et.trailingComments=[]):et.trailingComments.length=0:et.bottomRightStack.length>0&&et.bottomRightStack[et.bottomRightStack.length-1].trailingComments&&et.bottomRightStack[et.bottomRightStack.length-1].trailingComments[0].range[0]>=r.range[1]&&(t=et.bottomRightStack[et.bottomRightStack.length-1].trailingComments,delete et.bottomRightStack[et.bottomRightStack.length-1].trailingComments);et.bottomRightStack.length>0&&et.bottomRightStack[et.bottomRightStack.length-1].range[0]>=r.range[0];)e=et.bottomRightStack.pop();e?e.leadingComments&&e.leadingComments[e.leadingComments.length-1].range[1]<=r.range[0]&&(r.leadingComments=e.leadingComments,delete e.leadingComments):et.leadingComments.length>0&&et.leadingComments[et.leadingComments.length-1].range[1]<=r.range[0]&&(r.leadingComments=et.leadingComments,et.leadingComments=[]),t&&(r.trailingComments=t),et.bottomRightStack.push(r)}},markEnd:function(r,e){return et.range&&(r.range=[e.start,ce]),et.loc&&(r.loc=new IWe(e.startLineNumber===void 0?e.lineNumber:e.startLineNumber,e.start-(e.startLineStart===void 0?e.lineStart:e.startLineStart),xr,ce-Vr),this.postProcess(r)),et.attachComment&&this.processComment(r),r},postProcess:function(r){return et.source&&(r.loc.source=et.source),r},createArrayExpression:function(r){return{type:Ht.ArrayExpression,elements:r}},createAssignmentExpression:function(r,e,t){return{type:Ht.AssignmentExpression,operator:r,left:e,right:t}},createBinaryExpression:function(r,e,t){var n=r==="||"||r==="&&"?Ht.LogicalExpression:Ht.BinaryExpression;return{type:n,operator:r,left:e,right:t}},createBlockStatement:function(r){return{type:Ht.BlockStatement,body:r}},createBreakStatement:function(r){return{type:Ht.BreakStatement,label:r}},createCallExpression:function(r,e){return{type:Ht.CallExpression,callee:r,arguments:e}},createCatchClause:function(r,e){return{type:Ht.CatchClause,param:r,body:e}},createConditionalExpression:function(r,e,t){return{type:Ht.ConditionalExpression,test:r,consequent:e,alternate:t}},createContinueStatement:function(r){return{type:Ht.ContinueStatement,label:r}},createDebuggerStatement:function(){return{type:Ht.DebuggerStatement}},createDoWhileStatement:function(r,e){return{type:Ht.DoWhileStatement,body:r,test:e}},createEmptyStatement:function(){return{type:Ht.EmptyStatement}},createExpressionStatement:function(r){return{type:Ht.ExpressionStatement,expression:r}},createForStatement:function(r,e,t,n){return{type:Ht.ForStatement,init:r,test:e,update:t,body:n}},createForInStatement:function(r,e,t){return{type:Ht.ForInStatement,left:r,right:e,body:t,each:!1}},createFunctionDeclaration:function(r,e,t,n){return{type:Ht.FunctionDeclaration,id:r,params:e,defaults:t,body:n,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(r,e,t,n){return{type:Ht.FunctionExpression,id:r,params:e,defaults:t,body:n,rest:null,generator:!1,expression:!1}},createIdentifier:function(r){return{type:Ht.Identifier,name:r}},createIfStatement:function(r,e,t){return{type:Ht.IfStatement,test:r,consequent:e,alternate:t}},createLabeledStatement:function(r,e){return{type:Ht.LabeledStatement,label:r,body:e}},createLiteral:function(r){return{type:Ht.Literal,value:r.value,raw:rt.slice(r.start,r.end)}},createMemberExpression:function(r,e,t){return{type:Ht.MemberExpression,computed:r==="[",object:e,property:t}},createNewExpression:function(r,e){return{type:Ht.NewExpression,callee:r,arguments:e}},createObjectExpression:function(r){return{type:Ht.ObjectExpression,properties:r}},createPostfixExpression:function(r,e){return{type:Ht.UpdateExpression,operator:r,argument:e,prefix:!1}},createProgram:function(r){return{type:Ht.Program,body:r}},createProperty:function(r,e,t){return{type:Ht.Property,key:e,value:t,kind:r}},createReturnStatement:function(r){return{type:Ht.ReturnStatement,argument:r}},createSequenceExpression:function(r){return{type:Ht.SequenceExpression,expressions:r}},createSwitchCase:function(r,e){return{type:Ht.SwitchCase,test:r,consequent:e}},createSwitchStatement:function(r,e){return{type:Ht.SwitchStatement,discriminant:r,cases:e}},createThisExpression:function(){return{type:Ht.ThisExpression}},createThrowStatement:function(r){return{type:Ht.ThrowStatement,argument:r}},createTryStatement:function(r,e,t,n){return{type:Ht.TryStatement,block:r,guardedHandlers:e,handlers:t,finalizer:n}},createUnaryExpression:function(r,e){return r==="++"||r==="--"?{type:Ht.UpdateExpression,operator:r,argument:e,prefix:!0}:{type:Ht.UnaryExpression,operator:r,argument:e,prefix:!0}},createVariableDeclaration:function(r,e){return{type:Ht.VariableDeclaration,declarations:r,kind:e}},createVariableDeclarator:function(r,e){return{type:Ht.VariableDeclarator,id:r,init:e}},createWhileStatement:function(r,e){return{type:Ht.WhileStatement,test:r,body:e}},createWithStatement:function(r,e){return{type:Ht.WithStatement,object:r,body:e}}};function sb(){var r,e,t,n;return r=ce,e=xr,t=Vr,Nf(),n=xr!==e,ce=r,xr=e,Vr=t,n}function Fr(r,e){for(var t=[],n=2;n>="||r===">>>="||r==="&="||r==="^="||r==="|=")}function tu(){var r;if(rt.charCodeAt(ce)===59||Wt(";")){Ur();return}r=xr,Nf(),xr===r&&st.type!==ct.EOF&&!Wt("}")&&eu(st)}function sx(r){return r.type===Ht.Identifier||r.type===Ht.MemberExpression}function FWe(){var r=[],e;for(e=st,rr("[");!Wt("]");)Wt(",")?(Ur(),r.push(null)):(r.push(Ks()),Wt("]")||rr(","));return Ur(),Be.markEnd(Be.createArrayExpression(r),e)}function Qk(r,e){var t,n,i;return t=vn,i=st,n=NO(),e&&vn&&ps(r[0].name)&&yn(e,ut.StrictParamName),vn=t,Be.markEnd(Be.createFunctionExpression(null,r,[],n),i)}function Z_(){var r,e;return e=st,r=Ur(),r.type===ct.StringLiteral||r.type===ct.NumericLiteral?(vn&&r.octal&&yn(r,ut.StrictOctalLiteral),Be.markEnd(Be.createLiteral(r),e)):Be.markEnd(Be.createIdentifier(r.value),e)}function BWe(){var r,e,t,n,i,a;if(r=st,a=st,r.type===ct.Identifier)return t=Z_(),r.value==="get"&&!Wt(":")?(e=Z_(),rr("("),rr(")"),n=Qk([]),Be.markEnd(Be.createProperty("get",e,n),a)):r.value==="set"&&!Wt(":")?(e=Z_(),rr("("),r=st,r.type!==ct.Identifier?(rr(")"),yn(r,ut.UnexpectedToken,r.value),n=Qk([])):(i=[zf()],rr(")"),n=Qk(i,r)),Be.markEnd(Be.createProperty("set",e,n),a)):(rr(":"),n=Ks(),Be.markEnd(Be.createProperty("init",t,n),a));if(r.type===ct.EOF||r.type===ct.Punctuator)eu(r);else return e=Z_(),rr(":"),n=Ks(),Be.markEnd(Be.createProperty("init",e,n),a)}function OWe(){var r=[],e,t,n,i,a={},o=String,s;for(s=st,rr("{");!Wt("}");)e=BWe(),e.key.type===Ht.Identifier?t=e.key.name:t=o(e.key.value),i=e.kind==="init"?xc.Data:e.kind==="get"?xc.Get:xc.Set,n="$"+t,Object.prototype.hasOwnProperty.call(a,n)?(a[n]===xc.Data?vn&&i===xc.Data?yn({},ut.StrictDuplicateProperty):i!==xc.Data&&yn({},ut.AccessorDataProperty):i===xc.Data?yn({},ut.AccessorDataProperty):a[n]&i&&yn({},ut.AccessorGetSet),a[n]|=i):a[n]=i,r.push(e),Wt("}")||rr(",");return rr("}"),Be.markEnd(Be.createObjectExpression(r),s)}function PWe(){var r;return rr("("),r=Ri(),rr(")"),r}function Qre(){var r,e,t,n;if(Wt("("))return PWe();if(Wt("["))return FWe();if(Wt("{"))return OWe();if(r=st.type,n=st,r===ct.Identifier)t=Be.createIdentifier(Ur().value);else if(r===ct.StringLiteral||r===ct.NumericLiteral)vn&&st.octal&&yn(st,ut.StrictOctalLiteral),t=Be.createLiteral(Ur());else if(r===ct.Keyword){if(Qi("function"))return u$e();Qi("this")?(Ur(),t=Be.createThisExpression()):eu(Ur())}else r===ct.BooleanLiteral?(e=Ur(),e.value=e.value==="true",t=Be.createLiteral(e)):r===ct.NullLiteral?(e=Ur(),e.value=null,t=Be.createLiteral(e)):Wt("/")||Wt("/=")?(typeof et.tokens<"u"?t=Be.createLiteral(Ch()):t=Be.createLiteral(Zre()),Xre()):eu(Ur());return Be.markEnd(t,n)}function Jre(){var r=[];if(rr("("),!Wt(")"))for(;ce":case"<=":case">=":case"instanceof":t=7;break;case"in":t=e?7:0;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11;break}return t}function VWe(){var r,e,t,n,i,a,o,s,l,u;if(r=st,l=Cg(),n=st,i=nG(n,Pt.allowIn),i===0)return l;for(n.prec=i,Ur(),e=[r,st],o=Cg(),a=[l,n,o];(i=nG(st,Pt.allowIn))>0;){for(;a.length>2&&i<=a[a.length-2].prec;)o=a.pop(),s=a.pop().value,l=a.pop(),t=Be.createBinaryExpression(s,l,o),e.pop(),r=e[e.length-1],Be.markEnd(t,r),a.push(t);n=Ur(),n.prec=i,a.push(n),e.push(st),t=Cg(),a.push(t)}for(u=a.length-1,t=a[u],e.pop();u>1;)t=Be.createBinaryExpression(a[u-1].value,a[u-2],t),u-=2,r=e.pop(),Be.markEnd(t,r);return t}function UWe(){var r,e,t,n,i;return i=st,r=VWe(),Wt("?")&&(Ur(),e=Pt.allowIn,Pt.allowIn=!0,t=Ks(),Pt.allowIn=e,rr(":"),n=Ks(),r=Be.createConditionalExpression(r,t,n),Be.markEnd(r,i)),r}function Ks(){var r,e,t,n,i;return r=st,i=st,n=e=UWe(),LWe()&&(sx(e)||yn({},ut.InvalidLHSInAssignment),vn&&e.type===Ht.Identifier&&ps(e.name)&&yn(r,ut.StrictLHSAssignment),r=Ur(),t=Ks(),n=Be.markEnd(Be.createAssignmentExpression(r.value,e,t),i)),n}function Ri(){var r,e=st;if(r=Ks(),Wt(",")){for(r=Be.createSequenceExpression([r]);ce"u"));)r.push(e);return r}function wC(){var r,e;return e=st,rr("{"),r=GWe(),rr("}"),Be.markEnd(Be.createBlockStatement(r),e)}function zf(){var r,e;return e=st,r=Ur(),r.type!==ct.Identifier&&eu(r),Be.markEnd(Be.createIdentifier(r.value),e)}function HWe(r){var e=null,t,n;return n=st,t=zf(),vn&&ps(t.name)&&yn({},ut.StrictVarName),r==="const"?(rr("="),e=Ks()):Wt("=")&&(Ur(),e=Ks()),Be.markEnd(Be.createVariableDeclarator(t,e),n)}function RO(r){var e=[];do{if(e.push(HWe(r)),!Wt(","))break;Ur()}while(ce"u"&&rr(";")),typeof n>"u"&&(Wt(";")||(e=Ri()),rr(";"),Wt(")")||(t=Ri())),rr(")"),o=Pt.inIteration,Pt.inIteration=!0,a=ru(),Pt.inIteration=o,typeof n>"u"?Be.createForStatement(r,e,t,a):Be.createForInStatement(n,i,a)}function JWe(){var r=null,e;return pi("continue"),rt.charCodeAt(ce)===59?(Ur(),Pt.inIteration||Fr({},ut.IllegalContinue),Be.createContinueStatement(null)):sb()?(Pt.inIteration||Fr({},ut.IllegalContinue),Be.createContinueStatement(null)):(st.type===ct.Identifier&&(r=zf(),e="$"+r.name,Object.prototype.hasOwnProperty.call(Pt.labelSet,e)||Fr({},ut.UnknownLabel,r.name)),tu(),r===null&&!Pt.inIteration&&Fr({},ut.IllegalContinue),Be.createContinueStatement(r))}function e$e(){var r=null,e;return pi("break"),rt.charCodeAt(ce)===59?(Ur(),Pt.inIteration||Pt.inSwitch||Fr({},ut.IllegalBreak),Be.createBreakStatement(null)):sb()?(Pt.inIteration||Pt.inSwitch||Fr({},ut.IllegalBreak),Be.createBreakStatement(null)):(st.type===ct.Identifier&&(r=zf(),e="$"+r.name,Object.prototype.hasOwnProperty.call(Pt.labelSet,e)||Fr({},ut.UnknownLabel,r.name)),tu(),r===null&&!(Pt.inIteration||Pt.inSwitch)&&Fr({},ut.IllegalBreak),Be.createBreakStatement(r))}function t$e(){var r=null;return pi("return"),Pt.inFunctionBody||yn({},ut.IllegalReturn),rt.charCodeAt(ce)===32&&Wv(rt.charCodeAt(ce+1))?(r=Ri(),tu(),Be.createReturnStatement(r)):sb()?Be.createReturnStatement(null):(Wt(";")||!Wt("}")&&st.type!==ct.EOF&&(r=Ri()),tu(),Be.createReturnStatement(r))}function r$e(){var r,e;return vn&&(Nf(),yn({},ut.StrictModeWith)),pi("with"),rr("("),r=Ri(),rr(")"),e=ru(),Be.createWithStatement(r,e)}function n$e(){var r,e=[],t,n;for(n=st,Qi("default")?(Ur(),r=null):(pi("case"),r=Ri()),rr(":");ce"u"));)e.push(r);return rr("}"),Pt.labelSet=a,Pt.inIteration=o,Pt.inSwitch=s,Pt.inFunctionBody=l,Be.markEnd(Be.createBlockStatement(e),u)}function nne(r){var e,t=[],n,i,a,o,s;if(rr("("),!Wt(")"))for(a={};ce"u"));)e.push(r);return e}function f$e(){var r,e;return Nf(),Xre(),e=st,vn=!1,r=c$e(),Be.markEnd(Be.createProgram(r),e)}function h$e(){var r,e,t,n=[];for(r=0;r0?1:0,Vr=0,wn=rt.length,st=null,Pt={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},et={};try{t=f$e(),typeof et.comments<"u"&&(t.comments=et.comments),typeof et.tokens<"u"&&(h$e(),t.tokens=et.tokens),typeof et.errors<"u"&&(t.errors=et.errors)}catch(i){throw i}finally{et={}}return t}function d$e(r,e,t,n){function i(l){return String(l).match(/^[0-9]+$/)?parseInt(l):Number.isFinite(l)?parseInt(l,10):0}if(typeof e=="string")throw new Error("start cannot be a string");if(typeof t=="string")throw new Error("end cannot be a string");if(typeof n=="string")throw new Error("step cannot be a string");var a=r.length;if(n===0)throw new Error("step cannot be zero");if(n=n?i(n):1,e=e<0?a+e:e,t=t<0?a+t:t,e=i(e===0?0:e||(n>0?0:a-1)),t=i(t===0?0:t||(n>0?a:-1)),e=n>0?Math.max(0,e):Math.min(a,e),t=n>0?Math.min(t,a):Math.max(-1,t),n>0&&t<=e)return[];if(n<0&&e<=t)return[];for(var o=[],s=e;s!=t&&!(n<0&&s<=t||n>0&&s>=t);s+=n)o.push(r[s]);return o}var ane={},one={};const p$e="estraverse",g$e="ECMAScript JS AST traversal functions",v$e="https://github.com/estools/estraverse",m$e="estraverse.js",y$e="4.3.0",b$e={node:">=4.0"},_$e=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],w$e={type:"git",url:"http://github.com/estools/estraverse.git"},S$e={"babel-preset-env":"^1.6.1","babel-register":"^6.3.13",chai:"^2.1.1",espree:"^1.11.0",gulp:"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.3.0",jshint:"^2.5.6",mocha:"^2.1.0"},C$e="BSD-2-Clause",A$e={test:"npm run-script lint && npm run-script unit-test",lint:"jshint estraverse.js","unit-test":"mocha --compilers js:babel-register"},x$e={name:p$e,description:g$e,homepage:v$e,main:m$e,version:y$e,engines:b$e,maintainers:_$e,repository:w$e,devDependencies:S$e,license:C$e,scripts:A$e};(function(r){(function e(t){var n,i,a,o,s,l;function u(_){var w={},S,C;for(S in _)_.hasOwnProperty(S)&&(C=_[S],typeof C=="object"&&C!==null?w[S]=u(C):w[S]=C);return w}function c(_,w){var S,C,A,x;for(C=_.length,A=0;C;)S=C>>>1,x=A+S,w(_[x])?C=S:(A=x+1,C-=S+1);return A}n={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportExpression:"ImportExpression",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},a={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportExpression:["source"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},o={},s={},l={},i={Break:o,Skip:s,Remove:l};function f(_,w){this.parent=_,this.key=w}f.prototype.replace=function(w){this.parent[this.key]=w},f.prototype.remove=function(){return Array.isArray(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)};function h(_,w,S,C){this.node=_,this.path=w,this.wrap=S,this.ref=C}function d(){}d.prototype.path=function(){var w,S,C,A,x,D;function E(k,M){if(Array.isArray(M))for(C=0,A=M.length;C=0;)if(M=F[T],N=D[M],!!N)if(Array.isArray(N)){for(L=N.length;(L-=1)>=0;)if(N[L]){if(g(E,F[T]))x=new h(N[L],[M,L],"Property",null);else if(p(N[L]))x=new h(N[L],[M,L],null,null);else continue;C.push(x)}}else p(N)&&C.push(new h(N,M,null,null))}}},d.prototype.replace=function(w,S){var C,A,x,D,E,k,M,T,L,F,N,z,W;function H(R){var ne,te,fe,Ce;if(R.ref.remove()){for(te=R.ref.key,Ce=R.ref.parent,ne=C.length;ne--;)if(fe=C[ne],fe.ref&&fe.ref.parent===Ce){if(fe.ref.key=0;)if(W=L[M],F=x[W],!!F)if(Array.isArray(F)){for(T=F.length;(T-=1)>=0;)if(F[T]){if(g(D,L[M]))k=new h(F[T],[W,T],"Property",new f(F,T));else if(p(F[T]))k=new h(F[T],[W,T],null,new f(F,T));else continue;C.push(k)}}else p(F)&&C.push(new h(F,W,null,new f(x,W)))}}return z.root};function v(_,w){var S=new d;return S.traverse(_,w)}function m(_,w){var S=new d;return S.replace(_,w)}function y(_,w){var S;return S=c(w,function(A){return A.range[0]>_.range[0]}),_.extendedRange=[_.range[0],_.range[1]],S!==w.length&&(_.extendedRange[1]=w[S].range[0]),S-=1,S>=0&&(_.extendedRange[0]=w[S].range[1]),_}function b(_,w,S){var C=[],A,x,D,E;if(!_.range)throw new Error("attachComments needs range information");if(!S.length){if(w.length){for(D=0,x=w.length;Dk.range[0]));)M.extendedRange[1]===k.range[0]?(k.leadingComments||(k.leadingComments=[]),k.leadingComments.push(M),C.splice(E,1)):E+=1;if(E===C.length)return i.Break;if(C[E].extendedRange[0]>k.range[1])return i.Skip}}),E=0,v(_,{leave:function(k){for(var M;Ek.range[1])return i.Skip}}),_}return t.version=x$e.version,t.Syntax=n,t.traverse=v,t.replace=m,t.attachComments=b,t.VisitorKeys=a,t.VisitorOption=i,t.Controller=d,t.cloneEnvironment=function(){return e({})},t})(r)})(one);var Zw={},sne={exports:{}};(function(){function r(o){if(o==null)return!1;switch(o.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function e(o){if(o==null)return!1;switch(o.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function t(o){if(o==null)return!1;switch(o.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(o){return t(o)||o!=null&&o.type==="FunctionDeclaration"}function i(o){switch(o.type){case"IfStatement":return o.alternate!=null?o.alternate:o.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return o.body}return null}function a(o){var s;if(o.type!=="IfStatement"||o.alternate==null)return!1;s=o.consequent;do{if(s.type==="IfStatement"&&s.alternate==null)return!0;s=i(s)}while(s);return!1}sne.exports={isExpression:r,isStatement:t,isIterationStatement:e,isSourceElement:n,isProblematicIfStatement:a,trailingStatement:i}})();var D$e=sne.exports,lne={exports:{}};(function(){var r,e,t,n,i,a;e={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function o(v){return 48<=v&&v<=57}function s(v){return 48<=v&&v<=57||97<=v&&v<=102||65<=v&&v<=70}function l(v){return v>=48&&v<=55}t=[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function u(v){return v===32||v===9||v===11||v===12||v===160||v>=5760&&t.indexOf(v)>=0}function c(v){return v===10||v===13||v===8232||v===8233}function f(v){if(v<=65535)return String.fromCharCode(v);var m=String.fromCharCode(Math.floor((v-65536)/1024)+55296),y=String.fromCharCode((v-65536)%1024+56320);return m+y}for(n=new Array(128),a=0;a<128;++a)n[a]=a>=97&&a<=122||a>=65&&a<=90||a===36||a===95;for(i=new Array(128),a=0;a<128;++a)i[a]=a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===36||a===95;function h(v){return v<128?n[v]:e.NonAsciiIdentifierStart.test(f(v))}function d(v){return v<128?i[v]:e.NonAsciiIdentifierPart.test(f(v))}function p(v){return v<128?n[v]:r.NonAsciiIdentifierStart.test(f(v))}function g(v){return v<128?i[v]:r.NonAsciiIdentifierPart.test(f(v))}lne.exports={isDecimalDigit:o,isHexDigit:s,isOctalDigit:l,isWhiteSpace:u,isLineTerminator:c,isIdentifierStartES5:h,isIdentifierPartES5:d,isIdentifierStartES6:p,isIdentifierPartES6:g}})();var une=lne.exports,cne={exports:{}};(function(){var r=une;function e(h){switch(h){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function t(h,d){return!d&&h==="yield"?!1:n(h,d)}function n(h,d){if(d&&e(h))return!0;switch(h.length){case 2:return h==="if"||h==="in"||h==="do";case 3:return h==="var"||h==="for"||h==="new"||h==="try";case 4:return h==="this"||h==="else"||h==="case"||h==="void"||h==="with"||h==="enum";case 5:return h==="while"||h==="break"||h==="catch"||h==="throw"||h==="const"||h==="yield"||h==="class"||h==="super";case 6:return h==="return"||h==="typeof"||h==="delete"||h==="switch"||h==="export"||h==="import";case 7:return h==="default"||h==="finally"||h==="extends";case 8:return h==="function"||h==="continue"||h==="debugger";case 10:return h==="instanceof";default:return!1}}function i(h,d){return h==="null"||h==="true"||h==="false"||t(h,d)}function a(h,d){return h==="null"||h==="true"||h==="false"||n(h,d)}function o(h){return h==="eval"||h==="arguments"}function s(h){var d,p,g;if(h.length===0||(g=h.charCodeAt(0),!r.isIdentifierStartES5(g)))return!1;for(d=1,p=h.length;d=p||(v=h.charCodeAt(d),!(56320<=v&&v<=57343)))return!1;g=l(g,v)}if(!m(g))return!1;m=r.isIdentifierPartES6}return!0}function c(h,d){return s(h)&&!i(h,d)}function f(h,d){return u(h)&&!a(h,d)}cne.exports={isKeywordES5:t,isKeywordES6:n,isReservedWordES5:i,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:s,isIdentifierNameES6:u,isIdentifierES5:c,isIdentifierES6:f}})();var E$e=cne.exports;(function(){Zw.ast=D$e,Zw.code=une,Zw.keyword=E$e})();var zm={},Jk={},K_={},X_={},iG;function k$e(){if(iG)return X_;iG=1;var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return X_.encode=function(e){if(0<=e&&e>1;return l?-u:u}return K_.encode=function(l){var u="",c,f=a(l);do c=f&n,f>>>=e,f>0&&(c|=i),u+=r.encode(c);while(f>0);return u},K_.decode=function(l,u,c){var f=l.length,h=0,d=0,p,g;do{if(u>=f)throw new Error("Expected more digits in base 64 VLQ value.");if(g=r.decode(l.charCodeAt(u++)),g===-1)throw new Error("Invalid base64 digit: "+l.charAt(u-1));p=!!(g&i),g&=n,h=h+(g<=0;E--)x=A[E],x==="."?A.splice(E,1):x===".."?D++:D>0&&(x===""?(A.splice(E+1,D),D=0):(A.splice(E,2),D--));return w=A.join("/"),w===""&&(w=C?"/":"."),S?(S.path=w,a(S)):w}r.normalize=o;function s(_,w){_===""&&(_="."),w===""&&(w=".");var S=i(w),C=i(_);if(C&&(_=C.path||"/"),S&&!S.scheme)return C&&(S.scheme=C.scheme),a(S);if(S||w.match(n))return w;if(C&&!C.host&&!C.path)return C.host=w,a(C);var A=w.charAt(0)==="/"?w:o(_.replace(/\/+$/,"")+"/"+w);return C?(C.path=A,a(C)):A}r.join=s,r.isAbsolute=function(_){return _.charAt(0)==="/"||t.test(_)};function l(_,w){_===""&&(_="."),_=_.replace(/\/$/,"");for(var S=0;w.indexOf(_+"/")!==0;){var C=_.lastIndexOf("/");if(C<0||(_=_.slice(0,C),_.match(/^([^\/]+:\/)?\/*$/)))return w;++S}return Array(S+1).join("../")+w.substr(_.length+1)}r.relative=l;var u=function(){var _=Object.create(null);return!("__proto__"in _)}();function c(_){return _}function f(_){return d(_)?"$"+_:_}r.toSetString=u?c:f;function h(_){return d(_)?_.slice(1):_}r.fromSetString=u?c:h;function d(_){if(!_)return!1;var w=_.length;if(w<9||_.charCodeAt(w-1)!==95||_.charCodeAt(w-2)!==95||_.charCodeAt(w-3)!==111||_.charCodeAt(w-4)!==116||_.charCodeAt(w-5)!==111||_.charCodeAt(w-6)!==114||_.charCodeAt(w-7)!==112||_.charCodeAt(w-8)!==95||_.charCodeAt(w-9)!==95)return!1;for(var S=w-10;S>=0;S--)if(_.charCodeAt(S)!==36)return!1;return!0}function p(_,w,S){var C=v(_.source,w.source);return C!==0||(C=_.originalLine-w.originalLine,C!==0)||(C=_.originalColumn-w.originalColumn,C!==0||S)||(C=_.generatedColumn-w.generatedColumn,C!==0)||(C=_.generatedLine-w.generatedLine,C!==0)?C:v(_.name,w.name)}r.compareByOriginalPositions=p;function g(_,w,S){var C=_.generatedLine-w.generatedLine;return C!==0||(C=_.generatedColumn-w.generatedColumn,C!==0||S)||(C=v(_.source,w.source),C!==0)||(C=_.originalLine-w.originalLine,C!==0)||(C=_.originalColumn-w.originalColumn,C!==0)?C:v(_.name,w.name)}r.compareByGeneratedPositionsDeflated=g;function v(_,w){return _===w?0:_===null?1:w===null?-1:_>w?1:-1}function m(_,w){var S=_.generatedLine-w.generatedLine;return S!==0||(S=_.generatedColumn-w.generatedColumn,S!==0)||(S=v(_.source,w.source),S!==0)||(S=_.originalLine-w.originalLine,S!==0)||(S=_.originalColumn-w.originalColumn,S!==0)?S:v(_.name,w.name)}r.compareByGeneratedPositionsInflated=m;function y(_){return JSON.parse(_.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=y;function b(_,w,S){if(w=w||"",_&&(_[_.length-1]!=="/"&&w[0]!=="/"&&(_+="/"),w=_+w),S){var C=i(S);if(!C)throw new Error("sourceMapURL could not be parsed");if(C.path){var A=C.path.lastIndexOf("/");A>=0&&(C.path=C.path.substring(0,A+1))}w=s(a(C),w)}return o(w)}r.computeSourceURL=b}(eT)),eT}var tT={},sG;function hne(){if(sG)return tT;sG=1;var r=lb(),e=Object.prototype.hasOwnProperty,t=typeof Map<"u";function n(){this._array=[],this._set=t?new Map:Object.create(null)}return n.fromArray=function(a,o){for(var s=new n,l=0,u=a.length;l=0)return o}else{var s=r.toSetString(a);if(e.call(this._set,s))return this._set[s]}throw new Error('"'+a+'" is not in the set.')},n.prototype.at=function(a){if(a>=0&&aa||o==a&&l>=s||r.compareByGeneratedPositionsInflated(n,i)<=0}function t(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return t.prototype.unsortedForEach=function(i,a){this._array.forEach(i,a)},t.prototype.add=function(i){e(this._last,i)?(this._last=i,this._array.push(i)):(this._sorted=!1,this._array.push(i))},t.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},rT.MappingList=t,rT}var uG;function dne(){if(uG)return Jk;uG=1;var r=fne(),e=lb(),t=hne().ArraySet,n=T$e().MappingList;function i(a){a||(a={}),this._file=e.getArg(a,"file",null),this._sourceRoot=e.getArg(a,"sourceRoot",null),this._skipValidation=e.getArg(a,"skipValidation",!1),this._sources=new t,this._names=new t,this._mappings=new n,this._sourcesContents=null}return i.prototype._version=3,i.fromSourceMap=function(o){var s=o.sourceRoot,l=new i({file:o.file,sourceRoot:s});return o.eachMapping(function(u){var c={generated:{line:u.generatedLine,column:u.generatedColumn}};u.source!=null&&(c.source=u.source,s!=null&&(c.source=e.relative(s,c.source)),c.original={line:u.originalLine,column:u.originalColumn},u.name!=null&&(c.name=u.name)),l.addMapping(c)}),o.sources.forEach(function(u){var c=u;s!==null&&(c=e.relative(s,u)),l._sources.has(c)||l._sources.add(c);var f=o.sourceContentFor(u);f!=null&&l.setSourceContent(u,f)}),l},i.prototype.addMapping=function(o){var s=e.getArg(o,"generated"),l=e.getArg(o,"original",null),u=e.getArg(o,"source",null),c=e.getArg(o,"name",null);this._skipValidation||this._validateMapping(s,l,u,c),u!=null&&(u=String(u),this._sources.has(u)||this._sources.add(u)),c!=null&&(c=String(c),this._names.has(c)||this._names.add(c)),this._mappings.add({generatedLine:s.line,generatedColumn:s.column,originalLine:l!=null&&l.line,originalColumn:l!=null&&l.column,source:u,name:c})},i.prototype.setSourceContent=function(o,s){var l=o;this._sourceRoot!=null&&(l=e.relative(this._sourceRoot,l)),s!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(l)]=s):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(l)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},i.prototype.applySourceMap=function(o,s,l){var u=s;if(s==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);u=o.file}var c=this._sourceRoot;c!=null&&(u=e.relative(c,u));var f=new t,h=new t;this._mappings.unsortedForEach(function(d){if(d.source===u&&d.originalLine!=null){var p=o.originalPositionFor({line:d.originalLine,column:d.originalColumn});p.source!=null&&(d.source=p.source,l!=null&&(d.source=e.join(l,d.source)),c!=null&&(d.source=e.relative(c,d.source)),d.originalLine=p.line,d.originalColumn=p.column,p.name!=null&&(d.name=p.name))}var g=d.source;g!=null&&!f.has(g)&&f.add(g);var v=d.name;v!=null&&!h.has(v)&&h.add(v)},this),this._sources=f,this._names=h,o.sources.forEach(function(d){var p=o.sourceContentFor(d);p!=null&&(l!=null&&(d=e.join(l,d)),c!=null&&(d=e.relative(c,d)),this.setSourceContent(d,p))},this)},i.prototype._validateMapping=function(o,s,l,u){if(s&&typeof s.line!="number"&&typeof s.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!s&&!l&&!u)){if(o&&"line"in o&&"column"in o&&s&&"line"in s&&"column"in s&&o.line>0&&o.column>=0&&s.line>0&&s.column>=0&&l)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:o,source:l,original:s,name:u}))}},i.prototype._serializeMappings=function(){for(var o=0,s=1,l=0,u=0,c=0,f=0,h="",d,p,g,v,m=this._mappings.toArray(),y=0,b=m.length;y0){if(!e.compareByGeneratedPositionsInflated(p,m[y-1]))continue;d+=","}d+=r.encode(p.generatedColumn-o),o=p.generatedColumn,p.source!=null&&(v=this._sources.indexOf(p.source),d+=r.encode(v-f),f=v,d+=r.encode(p.originalLine-1-u),u=p.originalLine-1,d+=r.encode(p.originalColumn-l),l=p.originalColumn,p.name!=null&&(g=this._names.indexOf(p.name),d+=r.encode(g-c),c=g)),h+=d}return h},i.prototype._generateSourcesContent=function(o,s){return o.map(function(l){if(!this._sourcesContents)return null;s!=null&&(l=e.relative(s,l));var u=e.toSetString(l);return Object.prototype.hasOwnProperty.call(this._sourcesContents,u)?this._sourcesContents[u]:null},this)},i.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o},i.prototype.toString=function(){return JSON.stringify(this.toJSON())},Jk.SourceMapGenerator=i,Jk}var Vm={},nT={},cG;function M$e(){return cG||(cG=1,function(r){r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2;function e(t,n,i,a,o,s){var l=Math.floor((n-t)/2)+t,u=o(i,a[l],!0);return u===0?l:u>0?n-l>1?e(l,n,i,a,o,s):s==r.LEAST_UPPER_BOUND?n1?e(t,l,i,a,o,s):s==r.LEAST_UPPER_BOUND?l:t<0?-1:t}r.search=function(n,i,a,o){if(i.length===0)return-1;var s=e(-1,i.length,n,i,a,o||r.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&a(i[s],i[s-1],!0)===0;)--s;return s}}(nT)),nT}var iT={},fG;function I$e(){if(fG)return iT;fG=1;function r(n,i,a){var o=n[i];n[i]=n[a],n[a]=o}function e(n,i){return Math.round(n+Math.random()*(i-n))}function t(n,i,a,o){if(a=0){var g=this._originalMappings[p];if(c.column===void 0)for(var v=g.originalLine;g&&g.originalLine===v;)d.push({line:r.getArg(g,"generatedLine",null),column:r.getArg(g,"generatedColumn",null),lastColumn:r.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++p];else for(var m=g.originalColumn;g&&g.originalLine===f&&g.originalColumn==m;)d.push({line:r.getArg(g,"generatedLine",null),column:r.getArg(g,"generatedColumn",null),lastColumn:r.getArg(g,"lastGeneratedColumn",null)}),g=this._originalMappings[++p]}return d},Vm.SourceMapConsumer=a;function o(u,c){var f=u;typeof u=="string"&&(f=r.parseSourceMapInput(u));var h=r.getArg(f,"version"),d=r.getArg(f,"sources"),p=r.getArg(f,"names",[]),g=r.getArg(f,"sourceRoot",null),v=r.getArg(f,"sourcesContent",null),m=r.getArg(f,"mappings"),y=r.getArg(f,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);g&&(g=r.normalize(g)),d=d.map(String).map(r.normalize).map(function(b){return g&&r.isAbsolute(g)&&r.isAbsolute(b)?r.relative(g,b):b}),this._names=t.fromArray(p.map(String),!0),this._sources=t.fromArray(d,!0),this._absoluteSources=this._sources.toArray().map(function(b){return r.computeSourceURL(g,b,c)}),this.sourceRoot=g,this.sourcesContent=v,this._mappings=m,this._sourceMapURL=c,this.file=y}o.prototype=Object.create(a.prototype),o.prototype.consumer=a,o.prototype._findSourceIndex=function(u){var c=u;if(this.sourceRoot!=null&&(c=r.relative(this.sourceRoot,c)),this._sources.has(c))return this._sources.indexOf(c);var f;for(f=0;f1&&(A.source=v+D[1],v+=D[1],A.originalLine=p+D[2],p=A.originalLine,A.originalLine+=1,A.originalColumn=g+D[3],g=A.originalColumn,D.length>4&&(A.name=m+D[4],m+=D[4])),C.push(A),typeof A.originalLine=="number"&&S.push(A)}i(C,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=C,i(S,r.compareByOriginalPositions),this.__originalMappings=S},o.prototype._findMapping=function(c,f,h,d,p,g){if(c[h]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+c[h]);if(c[d]<0)throw new TypeError("Column must be greater than or equal to 0, got "+c[d]);return e.search(c,f,p,g)},o.prototype.computeColumnSpans=function(){for(var c=0;c=0){var d=this._generatedMappings[h];if(d.generatedLine===f.generatedLine){var p=r.getArg(d,"source",null);p!==null&&(p=this._sources.at(p),p=r.computeSourceURL(this.sourceRoot,p,this._sourceMapURL));var g=r.getArg(d,"name",null);return g!==null&&(g=this._names.at(g)),{source:p,line:r.getArg(d,"originalLine",null),column:r.getArg(d,"originalColumn",null),name:g}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(c){return c==null}):!1},o.prototype.sourceContentFor=function(c,f){if(!this.sourcesContent)return null;var h=this._findSourceIndex(c);if(h>=0)return this.sourcesContent[h];var d=c;this.sourceRoot!=null&&(d=r.relative(this.sourceRoot,d));var p;if(this.sourceRoot!=null&&(p=r.urlParse(this.sourceRoot))){var g=d.replace(/^file:\/\//,"");if(p.scheme=="file"&&this._sources.has(g))return this.sourcesContent[this._sources.indexOf(g)];if((!p.path||p.path=="/")&&this._sources.has("/"+d))return this.sourcesContent[this._sources.indexOf("/"+d)]}if(f)return null;throw new Error('"'+d+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(c){var f=r.getArg(c,"source");if(f=this._findSourceIndex(f),f<0)return{line:null,column:null,lastColumn:null};var h={source:f,originalLine:r.getArg(c,"line"),originalColumn:r.getArg(c,"column")},d=this._findMapping(h,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(c,"bias",a.GREATEST_LOWER_BOUND));if(d>=0){var p=this._originalMappings[d];if(p.source===h.source)return{line:r.getArg(p,"generatedLine",null),column:r.getArg(p,"generatedColumn",null),lastColumn:r.getArg(p,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},Vm.BasicSourceMapConsumer=o;function l(u,c){var f=u;typeof u=="string"&&(f=r.parseSourceMapInput(u));var h=r.getArg(f,"version"),d=r.getArg(f,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new t,this._names=new t;var p={line:-1,column:0};this._sections=d.map(function(g){if(g.url)throw new Error("Support for url field in sections not implemented.");var v=r.getArg(g,"offset"),m=r.getArg(v,"line"),y=r.getArg(v,"column");if(m=0;l--)this.prepend(s[l]);else if(s[i]||typeof s=="string")this.children.unshift(s);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+s);return this},a.prototype.walk=function(s){for(var l,u=0,c=this.children.length;u0){for(l=[],u=0;u=4.0"},H$e=[{name:"Yusuke Suzuki",email:"utatane.tea@gmail.com",web:"http://github.com/Constellation"}],W$e={type:"git",url:"http://github.com/estools/escodegen.git"},$$e={estraverse:"^4.2.0",esutils:"^2.0.2",esprima:"^4.0.1",optionator:"^0.8.1"},j$e={"source-map":"~0.6.1"},q$e={acorn:"^7.1.0",bluebird:"^3.4.7","bower-registry-client":"^1.0.0",chai:"^3.5.0","commonjs-everywhere":"^0.9.7",gulp:"^3.8.10","gulp-eslint":"^3.0.1","gulp-mocha":"^3.0.1",semver:"^5.1.0"},Y$e="BSD-2-Clause",Z$e={test:"gulp travis","unit-test":"gulp test",lint:"gulp lint",release:"node tools/release.js","build-min":"./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js",build:"./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js"},K$e={name:O$e,description:P$e,homepage:R$e,main:N$e,bin:z$e,files:V$e,version:U$e,engines:G$e,maintainers:H$e,repository:W$e,dependencies:$$e,optionalDependencies:j$e,devDependencies:q$e,license:Y$e,scripts:Z$e};(function(r){(function(){var e,t,n,i,a,o,s,l,u,c,f,h,d,p,g,v,m,y,b,_,w,S,C,A,x,D;a=one,o=Zw,e=a.Syntax;function E(I){return Ot.Expression.hasOwnProperty(I.type)}function k(I){return Ot.Statement.hasOwnProperty(I.type)}t={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Exponentiation:13,Await:14,Unary:14,Postfix:15,Call:16,New:17,TaggedTemplate:18,Member:19,Primary:20},n={"||":t.LogicalOR,"&&":t.LogicalAND,"|":t.BitwiseOR,"^":t.BitwiseXOR,"&":t.BitwiseAND,"==":t.Equality,"!=":t.Equality,"===":t.Equality,"!==":t.Equality,is:t.Equality,isnt:t.Equality,"<":t.Relational,">":t.Relational,"<=":t.Relational,">=":t.Relational,in:t.Relational,instanceof:t.Relational,"<<":t.BitwiseSHIFT,">>":t.BitwiseSHIFT,">>>":t.BitwiseSHIFT,"+":t.Additive,"-":t.Additive,"*":t.Multiplicative,"%":t.Multiplicative,"/":t.Multiplicative,"**":t.Exponentiation};var M=1,T=2,L=4,F=8,N=16,z=32,W=T|L,H=M|T,R=M|T|L,ne=M,te=L,fe=M|L,Ce=M,Te=M|z,Se=0,_e=M|N,$=M|F;function q(){return{indent:null,base:null,parse:null,comment:!1,format:{indent:{style:" ",base:0,adjustMultilineComment:!1},newline:` +`,space:" ",json:!1,renumber:!1,hexadecimal:!1,quotes:"single",escapeless:!1,compact:!1,parentheses:!0,semicolons:!0,safeConcatenation:!1,preserveBlankLines:!1},moz:{comprehensionExpressionStartsWithAssignment:!1,starlessGenerator:!1},sourceMap:null,sourceMapRoot:null,sourceMapWithCode:!1,directive:!1,raw:!0,verbatim:null,sourceCode:null}}function j(I,V){var P="";for(V|=0;V>0;V>>>=1,I+=I)V&1&&(P+=I);return P}function he(I){return/[\r\n]/g.test(I)}function Q(I){var V=I.length;return V&&o.code.isLineTerminator(I.charCodeAt(V-1))}function ye(I,V){var P;for(P in V)V.hasOwnProperty(P)&&(I[P]=V[P]);return I}function ie(I,V){var P,G;function Z(we){return typeof we=="object"&&we instanceof Object&&!(we instanceof RegExp)}for(P in V)V.hasOwnProperty(P)&&(G=V[P],Z(G)?Z(I[P])?ie(I[P],G):I[P]=ie({},G):I[P]=G);return I}function me(I){var V,P,G,Z,we;if(I!==I)throw new Error("Numeric literal whose value is NaN");if(I<0||I===0&&1/I<0)throw new Error("Numeric literal whose value is negative");if(I===1/0)return u?"null":c?"1e400":"1e+400";if(V=""+I,!c||V.length<3)return V;for(P=V.indexOf("."),!u&&V.charCodeAt(0)===48&&P===1&&(P=0,V=V.slice(1)),G=V,V=V.replace("e+","e"),Z=0,(we=G.indexOf("e"))>0&&(Z=+G.slice(we+1),G=G.slice(0,we)),P>=0&&(Z-=G.length-P-1,G=+(G.slice(0,P)+G.slice(P+1))+""),we=0;G.charCodeAt(G.length+we-1)===48;)--we;return we!==0&&(Z-=we,G=G.slice(0,we)),Z!==0&&(G+="e"+Z),(G.length1e12&&Math.floor(I)===I&&(G="0x"+I.toString(16)).length255?"\\u"+"0000".slice(P.length)+P:I===0&&!o.code.isDecimalDigit(V)?"\\0":I===11?"\\x0B":"\\x"+"00".slice(P.length)+P)}function Ye(I){if(I===92)return"\\\\";if(I===10)return"\\n";if(I===13)return"\\r";if(I===8232)return"\\u2028";if(I===8233)return"\\u2029";throw new Error("Incorrectly classified character")}function Ct(I){var V,P,G,Z;for(Z=h==="double"?'"':"'",V=0,P=I.length;V126))){V+=Ge(Z,I.charCodeAt(P+1));continue}V+=String.fromCharCode(Z)}if(je=!(h==="double"||h==="auto"&&Ie=0&&!o.code.isLineTerminator(I.charCodeAt(V));--V);return I.length-1-V}function Re(I,V){var P,G,Z,we,Ie,je,vt,mr;for(P=I.split(/\r\n|[\r\n]/),je=Number.MAX_VALUE,G=1,Z=P.length;GIe&&(je=Ie)}for(typeof V<"u"?(vt=s,P[1][je]==="*"&&(V+=" "),s=V):(je&1&&--je,vt=s),G=1,Z=P.length;G0){if(we=V,A){for(Z=I.leadingComments[0],V=[],mr=Z.extendedRange,Qn=Z.range,Ca=C.substring(mr[0],Qn[0]),ia=(Ca.match(/\n/g)||[]).length,ia>0?(V.push(j(` +`,ia)),V.push(Sr(ue(Z)))):(V.push(Ca),V.push(ue(Z))),ji=Qn,P=1,G=I.leadingComments.length;P0?(V.push(j(` +`,ia)),V.push(Sr(ue(Z)))):(V.push(Ca),V.push(ue(Z)));else for(Ie=!Q(Me(V).toString()),je=j(" ",ht(Me([s,V,l]).toString())),P=0,G=I.trailingComments.length;P")),I.expression?(V.push(g),P=this.generateExpression(I.body,t.Assignment,R),P.toString().charAt(0)==="{"&&(P=["(",P,")"]),V.push(P)):V.push(this.maybeBlock(I.body,$)),V},Ot.prototype.generateIterationForStatement=function(I,V,P){var G=["for"+(V.await?At()+"await":"")+g+"("],Z=this;return Vt(function(){V.left.type===e.VariableDeclaration?Vt(function(){G.push(V.left.kind+At()),G.push(Z.generateStatement(V.left.declarations[0],Se))}):G.push(Z.generateExpression(V.left,t.Call,R)),G=lt(G,I),G=[lt(G,Z.generateExpression(V.right,t.Assignment,R)),")"]}),G.push(this.maybeBlock(V.body,P)),G},Ot.prototype.generatePropertyKey=function(I,V){var P=[];return V&&P.push("["),P.push(this.generateExpression(I,t.Assignment,R)),V&&P.push("]"),P},Ot.prototype.generateAssignment=function(I,V,P,G,Z){return t.Assignment2&&(G=C.substring(P[0]+1,P[1]-1),G[0]===` +`&&(Z=["{"]),Z.push(G)));var Ie,je,vt,mr;for(mr=Ce,V&F&&(mr|=N),Ie=0,je=I.body.length;Ie0&&!I.body[Ie-1].trailingComments&&!I.body[Ie].leadingComments&&at(I.body[Ie-1].range[1],I.body[Ie].range[0],Z)),Ie===je-1&&(mr|=z),I.body[Ie].leadingComments&&A?vt=we.generateStatement(I.body[Ie],mr):vt=Sr(we.generateStatement(I.body[Ie],mr)),Z.push(vt),Q(Me(vt).toString())||A&&Ie1?Vt(vt):vt(),P.push(this.semicolon(V)),P},ThrowStatement:function(I,V){return[lt("throw",this.generateExpression(I.argument,t.Sequence,R)),this.semicolon(V)]},TryStatement:function(I,V){var P,G,Z,we;if(P=["try",this.maybeBlock(I.block,Ce)],P=this.maybeBlockSuffix(I.block,P),I.handlers)for(G=0,Z=I.handlers.length;G0?` +`:""],Ie=_e,Z=0;Z0&&!I.body[Z-1].trailingComments&&!I.body[Z].leadingComments&&at(I.body[Z-1].range[1],I.body[Z].range[0],P)),G=Sr(this.generateStatement(I.body[Z],Ie)),P.push(G),Z+10){for(G.push("("),we=0,Ie=Z;we=2&&Z.charCodeAt(0)===48)&&G.push(" ")),G.push("."),G.push(pr(I.property))),J(G,t.Member,V)},MetaProperty:function(I,V,P){var G;return G=[],G.push(typeof I.meta=="string"?I.meta:pr(I.meta)),G.push("."),G.push(typeof I.property=="string"?I.property:pr(I.property)),J(G,t.Member,V)},UnaryExpression:function(I,V,P){var G,Z,we,Ie,je;return Z=this.generateExpression(I.argument,t.Unary,R),g===""?G=lt(I.operator,Z):(G=[I.operator],I.operator.length>2?G=lt(G,Z):(Ie=Me(G).toString(),je=Ie.charCodeAt(Ie.length-1),we=Z.toString().charCodeAt(0),((je===43||je===45)&&je===we||o.code.isIdentifierPartES5(je)&&o.code.isIdentifierPartES5(we))&&G.push(At()),G.push(Z))),J(G,t.Unary,V)},YieldExpression:function(I,V,P){var G;return I.delegate?G="yield*":G="yield",I.argument&&(G=lt(G,this.generateExpression(I.argument,t.Yield,R))),J(G,t.Yield,V)},AwaitExpression:function(I,V,P){var G=lt(I.all?"await*":"await",this.generateExpression(I.argument,t.Await,R));return J(G,t.Await,V)},UpdateExpression:function(I,V,P){return I.prefix?J([I.operator,this.generateExpression(I.argument,t.Unary,R)],t.Unary,V):J([this.generateExpression(I.argument,t.Postfix,R),I.operator],t.Postfix,V)},FunctionExpression:function(I,V,P){var G=[Nr(I,!0),"function"];return I.id?(G.push(lr(I)||At()),G.push(pr(I.id))):G.push(lr(I)||g),G.push(this.generateFunctionBody(I)),G},ArrayPattern:function(I,V,P){return this.ArrayExpression(I,V,P,!0)},ArrayExpression:function(I,V,P,G){var Z,we,Ie=this;return I.elements.length?(we=G?!1:I.elements.length>1,Z=["[",we?p:""],Vt(function(je){var vt,mr;for(vt=0,mr=I.elements.length;vt1,Vt(function(){we=Ie.generateExpression(I.properties[0],t.Sequence,R)}),!G&&!he(Me(we).toString())?["{",g,we,g,"}"]:(Vt(function(je){var vt,mr;if(Z=["{",p,je,we],G)for(Z.push(","+p),vt=1,mr=I.properties.length;vt0||_.moz.comprehensionExpressionStartsWithAssignment?G=lt(G,Ie):G.push(Ie)}),I.filter&&(G=lt(G,"if"+g),Ie=this.generateExpression(I.filter,t.Sequence,R),G=lt(G,["(",Ie,")"])),_.moz.comprehensionExpressionStartsWithAssignment||(Ie=this.generateExpression(I.body,t.Assignment,R),G=lt(G,Ie)),G.push(I.type===e.GeneratorExpression?")":"]"),G},ComprehensionBlock:function(I,V,P){var G;return I.left.type===e.VariableDeclaration?G=[I.left.kind,At(),this.generateStatement(I.left.declarations[0],Se)]:G=this.generateExpression(I.left,t.Call,R),G=lt(G,I.of?"of":"in"),G=lt(G,this.generateExpression(I.right,t.Sequence,R)),["for"+g+"(",G,")"]},SpreadElement:function(I,V,P){return["...",this.generateExpression(I.argument,t.Assignment,R)]},TaggedTemplateExpression:function(I,V,P){var G=H;P&T||(G=ne);var Z=[this.generateExpression(I.tag,t.Call,G),this.generateExpression(I.quasi,t.Primary,te)];return J(Z,t.TaggedTemplate,V)},TemplateElement:function(I,V,P){return I.value.raw},TemplateLiteral:function(I,V,P){var G,Z,we;for(G=["`"],Z=0,we=I.quasis.length;Z"?c>g:v===">="?c>=g:v==="|"?c|g:v==="&"?c&g:v==="^"?c^g:v==="&&"?c&&g:v==="||"?c||g:t}else{if(a.type==="Identifier")return{}.hasOwnProperty.call(e,a.name)?e[a.name]:t;if(a.type==="ThisExpression")return{}.hasOwnProperty.call(e,"this")?e.this:t;if(a.type==="CallExpression"){var m=i(a.callee);if(m===t||typeof m!="function")return t;var y=a.callee.object?i(a.callee.object):t;y===t&&(y=null);for(var b=[],u=0,c=a.arguments.length;u=i||n(h,f,t)&&s.push({path:c.concat(h),value:f})}),u.forEach(function(f,h){s.length>=i||r&&l(f,c.concat(h))})):tje(u)&&(Object.keys(u).forEach(function(f){s.length>=i||n(f,u[f],t)&&s.push({path:c.concat(f),value:u[f]})}),Object.keys(u).forEach(function(f){s.length>=i||r&&l(u[f],c.concat(f))}))}).bind(this);return l(a,o),s}}function M3(r,e){try{return J$e(r,e)}catch{}}function Q_(r){return function(e,t,n){return this.descend(t,e.expression.value,r,n)}}function J_(r){return function(e,t,n){return this.traverse(t,e.expression.value,r,n)}}function vG(r){return r=r.filter(function(e){return e}),nje(r,function(e){return e.path.map(function(t){return String(t).replace("-","--")}).join("-")})}function eje(r){var e=String(r);return e.match(/^-?[0-9]+$/)?parseInt(e):null}function pne(r){return Array.isArray(r)}function tje(r){return r&&!(r instanceof Array)&&r instanceof Object}function oT(r,e,t){var n=T3(e).body[0].expression,i=M3(n,{"@":r.value}),a=t.replace(/\{\{\s*value\s*\}\}/g,i),o=vne.nodes(r.value,a);return o.forEach(function(s){s.path=r.path.concat(s.path.slice(1))}),o}var rje=function(){function r(){this._fns={"member-child-identifier":function(e,t){var n=e.expression.value,i=t.value;if(i instanceof Object&&n in i)return[{value:i[n],path:t.path.concat(n)}]},"member-descendant-identifier":J_(function(e,t,n){return e==n}),"subscript-child-numeric_literal":Q_(function(e,t,n){return e===n}),"member-child-numeric_literal":Q_(function(e,t,n){return String(e)===String(n)}),"subscript-descendant-numeric_literal":J_(function(e,t,n){return e===n}),"member-child-wildcard":Q_(function(){return!0}),"member-descendant-wildcard":J_(function(){return!0}),"subscript-descendant-wildcard":J_(function(){return!0}),"subscript-child-wildcard":Q_(function(){return!0}),"subscript-child-slice":function(e,t){if(pne(t.value)){var n=e.expression.value.split(":").map(eje),i=t.value.map(function(a,o){return{value:a,path:t.path.concat(o)}});return d$e.apply(null,[i].concat(n))}},"subscript-child-union":function(e,t){var n=[];return e.expression.value.forEach(function(i){var a={operation:"subscript",scope:"child",expression:i.expression},o=this.resolve(a),s=o(a,t);s&&(n=n.concat(s))},this),vG(n)},"subscript-descendant-union":function(e,t,n){var i=this,a=[],o=vne.nodes(t,"$..*").slice(1);return o.forEach(function(s){a.length>=n||e.expression.value.forEach(function(l){var u={operation:"subscript",scope:"child",expression:l.expression},c=i.resolve(u),f=c(u,s);a=a.concat(f)})}),vG(a)},"subscript-child-filter_expression":function(e,t,n){var i=e.expression.value.slice(2,-1),a=T3(i).body[0].expression,o=function(s,l){return M3(a,{"@":l})};return this.descend(t,null,o,n)},"subscript-descendant-filter_expression":function(e,t,n){var i=e.expression.value.slice(2,-1),a=T3(i).body[0].expression,o=function(s,l){return M3(a,{"@":l})};return this.traverse(t,null,o,n)},"subscript-child-script_expression":function(e,t){var n=e.expression.value.slice(1,-1);return oT(t,n,"$[{{value}}]")},"member-child-script_expression":function(e,t){var n=e.expression.value.slice(1,-1);return oT(t,n,"$.{{value}}")},"member-descendant-script_expression":function(e,t){var n=e.expression.value.slice(1,-1);return oT(t,n,"$..value")}},this.initialize()}return r.prototype.initialize=function(){this.traverse=gG(!0),this.descend=gG(),this._fns["subscript-child-string_literal"]=this._fns["member-child-identifier"],this._fns["member-descendant-numeric_literal"]=this._fns["subscript-descendant-string_literal"]=this._fns["member-descendant-identifier"]},r.prototype.resolve=function(e){var t=[e.operation,e.scope,e.expression.type].join("-"),n=this._fns[t];if(!n)throw new Error("couldn't resolve key: "+t);return n.bind(this)},r.prototype.register=function(e,t){if(!(t instanceof Function))throw new Error("handler must be a function");this._fns[e]=t},r}();function nje(r,e){for(var t=[],n=[],i=0,a=r==null?void 0:r.length;i1?k.ast.set({expression:{type:"union",value:T[F]}}):this.$=T[F];break;case 25:this.$=[T[F]];break;case 26:this.$=T[F-2].concat(T[F]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(T[F])}},k.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:T[F]}},k.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:T[F]}},k.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:T[F]}},k.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:T[F]}},k.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:T[F]}},k.ast.set(this.$);break;case 33:case 34:this.$=T[F];break}},table:[{3:1,4:[1,2],6:3,13:4,15:n,16:i,17:a,18:o,19:s},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:l,14:u,20:16,21:17,22:c},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:l,14:u,20:16,21:17,22:c},t(f,[2,12]),t(f,[2,14]),t(f,[2,15]),t(f,[2,16]),t(f,[2,17]),t(f,[2,18]),{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:l,14:u,20:16,21:17,22:c},t(f,[2,5]),t(f,[2,7]),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(f,[2,19]),t(f,[2,20]),{13:23,15:n,16:i,17:a,18:o,19:s},{13:24,15:n,16:i,17:a,18:o,19:s,22:[1,25]},{15:h,17:d,18:p,23:26,25:27,26:28,27:32,29:34,30:g,31:v,32:m,33:y},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:l,14:u,20:16,21:17,22:c},t(f,[2,6]),t(f,[2,11]),t(f,[2,13]),{15:h,17:d,18:p,23:38,25:27,26:28,27:32,29:34,30:g,31:v,32:m,33:y},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},t(b,[2,25]),t(b,[2,27]),t(b,[2,28]),t(b,[2,29]),t(b,[2,33]),t(b,[2,34]),{24:[1,41]},t(f,[2,21]),{18:p,27:42,29:34,30:g,32:m,33:y},t(f,[2,22]),t(b,[2,26])],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(x,D){if(D.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=D,E}},parse:function(x){var D=this,E=[0],k=[null],M=[],T=this.table,L="",F=0,N=0,z=2,W=1,H=M.slice.call(arguments,1),R=Object.create(this.lexer),ne={yy:{}};for(var te in this.yy)Object.prototype.hasOwnProperty.call(this.yy,te)&&(ne.yy[te]=this.yy[te]);R.setInput(x,ne.yy),ne.yy.lexer=R,ne.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var fe=R.yylloc;M.push(fe);var Ce=R.options&&R.options.ranges;typeof ne.yy.parseError=="function"?this.parseError=ne.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var Te=function(){var Pe;return Pe=R.lex()||W,typeof Pe!="number"&&(Pe=D.symbols_[Pe]||Pe),Pe},Se,_e,$,q,j={},he,Q,ye,ie;;){if(_e=E[E.length-1],this.defaultActions[_e]?$=this.defaultActions[_e]:((Se===null||typeof Se>"u")&&(Se=Te()),$=T[_e]&&T[_e][Se]),typeof $>"u"||!$.length||!$[0]){var me="";ie=[];for(he in T[_e])this.terminals_[he]&&he>z&&ie.push("'"+this.terminals_[he]+"'");R.showPosition?me="Parse error on line "+(F+1)+`: +`+R.showPosition()+` +Expecting `+ie.join(", ")+", got '"+(this.terminals_[Se]||Se)+"'":me="Parse error on line "+(F+1)+": Unexpected "+(Se==W?"end of input":"'"+(this.terminals_[Se]||Se)+"'"),this.parseError(me,{text:R.match,token:this.terminals_[Se]||Se,line:R.yylineno,loc:fe,expected:ie})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_e+", token: "+Se);switch($[0]){case 1:E.push(Se),k.push(R.yytext),M.push(R.yylloc),E.push($[1]),Se=null,N=R.yyleng,L=R.yytext,F=R.yylineno,fe=R.yylloc;break;case 2:if(Q=this.productions_[$[1]][1],j.$=k[k.length-Q],j._$={first_line:M[M.length-(Q||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(Q||1)].first_column,last_column:M[M.length-1].last_column},Ce&&(j._$.range=[M[M.length-(Q||1)].range[0],M[M.length-1].range[1]]),q=this.performAction.apply(j,[L,N,F,ne.yy,$[1],k,M].concat(H)),typeof q<"u")return q;Q&&(E=E.slice(0,-1*Q*2),k=k.slice(0,-1*Q),M=M.slice(0,-1*Q)),E.push(this.productions_[$[1]][0]),k.push(j.$),M.push(j._$),ye=T[E[E.length-2]][E[E.length-1]],E.push(ye);break;case 3:return!0}}return!0}},w={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(A){for(var x in A)this._node[x]=A[x];return this._node},node:function(A){return arguments.length&&(this._node=A),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var A=this._nodes;return this.initialize(),A}},S=function(){var A={EOF:1,parseError:function(D,E){if(this.yy.parser)this.yy.parser.parseError(D,E);else throw new Error(D)},setInput:function(x,D){return this.yy=D||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var D=x.match(/(?:\r\n?|\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},unput:function(x){var D=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var k=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var M=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===k.length?this.yylloc.first_column:0)+k[k.length-E.length].length-E[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-D]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(x){this.unput(this.match.slice(x))},pastInput:function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var x=this.pastInput(),D=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+D+"^"},test_match:function(x,D){var E,k,M;if(this.options.backtrack_lexer&&(M={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(M.yylloc.range=this.yylloc.range.slice(0))),k=x[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],E=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var T in M)this[T]=M[T];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,D,E,k;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),T=0;TD[0].length)){if(D=E,k=T,this.options.backtrack_lexer){if(x=this.test_match(E,M[T]),x!==!1)return x;if(this._backtrack){D=!1;continue}else return!1}else if(!this.options.flex)break}return D?(x=this.test_match(D,M[k]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var D=this.next();return D||this.lex()},begin:function(D){this.conditionStack.push(D)},popState:function(){var D=this.conditionStack.length-1;return D>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(D){return D=this.conditionStack.length-1-Math.abs(D||0),D>=0?this.conditionStack[D]:"INITIAL"},pushState:function(D){this.begin(D)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(D,E,k,M){switch(k){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return E.yytext=E.yytext.substr(1,E.yyleng-2),32;case 11:return E.yytext=E.yytext.substr(1,E.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt\/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return A}();_.lexer=S;function C(){this.yy={}}return C.prototype=_,_.Parser=C,new C}();typeof aje<"u"&&(r.parser=e,r.Parser=e.Parser,r.parse=function(){return e.parse.apply(e,arguments)})})(gne);function ew(){var r=new gne.Parser,e=r.parseError;return r.yy.parseError=function(){r.yy.ast&&r.yy.ast.initialize(),e.apply(r,arguments)},r}var Li=function(){function r(){}return r.ok=function(e,t){if(!e)throw new Error(t)},r.equal=function(e,t,n){if(e!==t)throw new Error(n)},r}(),vne=function(){function r(){}return r.parse=function(e){return Li.ok(typeof e=="string","we need a path"),new ew().parse(e)},r.parent=function(e,t){Li.ok(e instanceof Object,"obj needs to be an object"),Li.ok(t,"we need a path");var n=this.nodes(e,t)[0];return n.path.pop(),this.value(e,n.path)},r.apply=function(e,t,n){Li.ok(e instanceof Object,"obj needs to be an object"),Li.ok(t,"we need a path"),Li.equal(typeof n,"function","fn needs to be function");var i=this.nodes(e,t).sort(function(a,o){return o.path.length-a.path.length});return i.forEach(function(a){var o=a.path.pop(),s=this.value(e,this.stringify(a.path)),l=a.value=n.call(e,s[o]);s[o]=l},this),i},r.value=function(e,t,n){if(Li.ok(e instanceof Object,"obj needs to be an object"),Li.ok(t,"we need a path"),n!==void 0){var i=this.nodes(e,t).shift();if(!i)return this._vivify(e,t,n);var a=i.path.slice(-1).shift(),o=this.parent(e,this.stringify(i.path));o[a]=n}return this.query(e,this.stringify(t),1).shift()},r._vivify=function(e,t,n){var i=this;Li.ok(e instanceof Object,"obj needs to be an object"),Li.ok(t,"we need a path");var a=new ew().parse(t).map(function(s){return s.expression.value}),o=function(s,l){var u=s.pop(),c=i.value(e,s);c||(o(s.concat(),typeof u=="string"?{}:[]),c=i.value(e,s)),c[u]=l};return o(a,n),this.query(e,t)[0]},r.query=function(e,t,n){Li.ok(e instanceof Object,"obj needs to be an object"),Li.ok(typeof t=="string","we need a path");var i=this.nodes(e,t,n).map(function(a){return a.value});return i},r.paths=function(e,t,n){Li.ok(e instanceof Object,"obj needs to be an object"),Li.ok(t,"we need a path");var i=this.nodes(e,t,n).map(function(a){return a.path});return i},r.nodes=function(e,t,n){if(Li.ok(e instanceof Object,"obj needs to be an object"),Li.ok(t,"we need a path"),n===0)return[];var i=new ew().parse(t),a=new rje,o=[{path:["$"],value:e}],s=[];return i.length&&i[0].expression.type=="root"&&i.shift(),i.length?(i.forEach(function(l,u){if(!(s.length>=n)){var c=a.resolve(l),f=[];o.forEach(function(h){if(!(s.length>=n)){var d=c(l,h,n);u==i.length-1?s=s.concat(d||[]):f=f.concat(d||[])}}),o=f}}),n?s.slice(0,n):s):o},r.stringify=function(e){Li.ok(e,"we need a path");var t="$",n={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return e=this._normalize(e),e.forEach(function(i){if(i.expression.type!="root"){var a=[i.scope,i.operation].join("-"),o=n[a],s;if(i.expression.type=="string_literal"?s=JSON.stringify(i.expression.value):s=i.expression.value,!o)throw new Error("couldn't find template "+a);t+=o.replace(/{{value}}/,s)}}),t},r._normalize=function(e){if(Li.ok(e,"we need a path"),typeof e=="string")return new ew().parse(e);if(Array.isArray(e)&&typeof e[0]=="string"){var t=[{expression:{type:"root",value:"$"}}];return e.forEach(function(n,i){if(!(n=="$"&&i===0))if(typeof n=="string"&&n.match("^"+ije.identifier+"$"))t.push({operation:"member",scope:"child",expression:{value:n,type:"identifier"}});else{var a=typeof n=="number"?"numeric_literal":"string_literal";t.push({operation:"subscript",scope:"child",expression:{value:n,type:a}})}}),t}else if(Array.isArray(e)&&typeof e[0]=="object")return e;throw new Error("couldn't understand path "+e)},r}();const oje=r=>({}),mG=r=>({});function sje(r){let e,t;return e=new Ao({props:{src:r[0],class:"w-5 h-5"}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&1&&(a.src=n[0]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function yG(r){let e,t,n;const i=r[7].default,a=Ui(i,r,r[6],null);return{c(){e=oe("span"),a&&a.c(),this.h()},l(o){e=se(o,"SPAN",{class:!0});var s=ge(e);a&&a.l(s),s.forEach(U),this.h()},h(){Y(e,"class","text-sm bg-base-200 border border-base-300 rounded py-1 px-2 absolute -top-[5%] z-50 min-w-min w-max"),$r(e,"left-[115%]",r[2]==="right"),$r(e,"right-[115%]",r[2]==="left"),$r(e,"max-w-sm",r[1]==="sm"),$r(e,"max-w-md",r[1]==="md"),$r(e,"max-w-lg",r[1]==="lg"),$r(e,"max-w-[200px]",r[1]!=="sm"&&r[1]!=="md"&&r[1]!=="lg")},m(o,s){le(o,e,s),a&&a.m(e,null),n=!0},p(o,s){a&&a.p&&(!n||s&64)&&Gi(a,i,o,o[6],n?Wi(i,o[6],s,null):Hi(o[6]),null),(!n||s&4)&&$r(e,"left-[115%]",o[2]==="right"),(!n||s&4)&&$r(e,"right-[115%]",o[2]==="left"),(!n||s&2)&&$r(e,"max-w-sm",o[1]==="sm"),(!n||s&2)&&$r(e,"max-w-md",o[1]==="md"),(!n||s&2)&&$r(e,"max-w-lg",o[1]==="lg"),(!n||s&2)&&$r(e,"max-w-[200px]",o[1]!=="sm"&&o[1]!=="md"&&o[1]!=="lg")},i(o){n||(K(a,o),o&&Pd(()=>{n&&(t||(t=Gl(e,md,{},!0)),t.run(1))}),n=!0)},o(o){re(a,o),o&&(t||(t=Gl(e,md,{},!1)),t.run(0)),n=!1},d(o){o&&U(e),a&&a.d(o),o&&t&&t.end()}}}function lje(r){let e,t,n,i,a;const o=r[7].handle,s=Ui(o,r,r[6],mG),l=s||sje(r);let u=r[3]&&yG(r);return{c(){e=oe("span"),l&&l.c(),t=Le(),u&&u.c(),this.h()},l(c){e=se(c,"SPAN",{class:!0,role:!0});var f=ge(e);l&&l.l(f),t=Fe(f),u&&u.l(f),f.forEach(U),this.h()},h(){Y(e,"class","inline-block align-middle leading-4 cursor-help relative w-fit"),Y(e,"role","tooltip")},m(c,f){le(c,e,f),l&&l.m(e,null),X(e,t),u&&u.m(e,null),n=!0,i||(a=[_n(e,"focus",r[4]),_n(e,"blur",r[5]),_n(e,"mouseenter",r[4]),_n(e,"mouseleave",r[5])],i=!0)},p(c,[f]){s?s.p&&(!n||f&64)&&Gi(s,o,c,c[6],n?Wi(o,c[6],f,oje):Hi(c[6]),mG):l&&l.p&&(!n||f&1)&&l.p(c,n?f:-1),c[3]?u?(u.p(c,f),f&8&&K(u,1)):(u=yG(c),u.c(),K(u,1),u.m(e,null)):u&&(Mt(),re(u,1,1,()=>{u=null}),It())},i(c){n||(K(l,c),K(u),n=!0)},o(c){re(l,c),re(u),n=!1},d(c){c&&U(e),l&&l.d(c),u&&u.d(),i=!1,Bd(a)}}}function uje(r,e,t){let{$$slots:n={},$$scope:i}=e,{icon:a=qle}=e,{maxWidth:o=void 0}=e,{direction:s="right"}=e,l=!1;const u=()=>t(3,l=!0),c=()=>t(3,l=!1);return r.$$set=f=>{"icon"in f&&t(0,a=f.icon),"maxWidth"in f&&t(1,o=f.maxWidth),"direction"in f&&t(2,s=f.direction),"$$scope"in f&&t(6,i=f.$$scope)},[a,o,s,l,u,c,i,n]}class mi extends kr{constructor(e){super(),Tr(this,e,uje,lje,Mr,{icon:0,maxWidth:1,direction:2})}}/** + * tua-body-scroll-lock v1.5.3 + * (c) 2024 Evinma, BuptStEve + * @license MIT + */var lx=function(){return typeof window>"u"},zO=function(e){e=e||navigator.userAgent;var t=/(iPad).*OS\s([\d_]+)/.test(e),n=!t&&/(iPhone\sOS)\s([\d_]+)/.test(e),i=/(Android);?[\s/]+([\d.]+)?/.test(e),a=n||t;return{ios:a,android:i}};function mne(r){if(lx())return!1;if(!r)throw new Error("options must be provided");var e=!1,t={get passive(){e=!0}},n=function(){},i="__TUA_BSL_TEST_PASSIVE__";window.addEventListener(i,n,t),window.removeEventListener(i,n,t);var a=r.capture;return e?r:typeof a<"u"?a:!1}function VO(){return"__BSL_PREVENT_DEFAULT__"in window||(window.__BSL_PREVENT_DEFAULT__=function(r){r.cancelable&&r.preventDefault()}),window.__BSL_PREVENT_DEFAULT__}function yne(r){return r?Array.isArray(r)?r:[r]:[]}var Kw={lockedNum:0,lockedElements:[],unLockCallback:null,documentListenerAdded:!1,initialClientPos:{clientX:0,clientY:0}};function ux(r){if(lx())return Kw;if(!(r!=null&&r.useGlobalLockState))return ux.lockState;var e="__BSL_LOCK_STATE__"in window?Object.assign(Object.assign({},Kw),window.__BSL_LOCK_STATE__):Kw;return window.__BSL_LOCK_STATE__=e,e}ux.lockState=Kw;function cje(r,e,t){if(e){var n=e.scrollTop,i=e.scrollLeft,a=e.scrollWidth,o=e.scrollHeight,s=e.clientWidth,l=e.clientHeight,u=r.targetTouches[0].clientX-t.clientX,c=r.targetTouches[0].clientY-t.clientY,f=Math.abs(c)>Math.abs(u),h=c>0&&n===0,d=u>0&&i===0,p=u<0&&i+s+1>=a,g=c<0&&n+l+1>=o;if(f&&(h||g)||!f&&(d||p))return VO()(r)}return r.stopPropagation(),!0}function fje(){var r=document.documentElement,e=Object.assign({},r.style),t=window.innerWidth-r.clientWidth,n=parseInt(window.getComputedStyle(r).paddingRight,10);return r.style.overflow="hidden",r.style.boxSizing="border-box",r.style.paddingRight="".concat(t+n,"px"),function(){["overflow","boxSizing","paddingRight"].forEach(function(i){r.style[i]=e[i]||""})}}function hje(r){var e=document.documentElement,t=document.body,n=e.scrollTop||t.scrollTop,i=Object.assign({},e.style),a=Object.assign({},t.style);return e.style.height="100%",e.style.overflow="hidden",t.style.top="-".concat(n,"px"),t.style.width="100%",t.style.height="auto",t.style.position="fixed",t.style.overflow="hidden",function(){e.style.height=i.height||"",e.style.overflow=i.overflow||"",["top","width","height","overflow","position"].forEach(function(s){t.style[s]=a[s]||""});var o="scrollBehavior"in document.documentElement.style;o?window.scrollTo({top:n,behavior:"instant"}):window.scrollTo(0,n)}}function FZe(r,e){if(!lx()){var t=zO(),n=ux(e);t.ios?(yne(r).filter(function(i){return i&&n.lockedElements.indexOf(i)===-1}).forEach(function(i){i.ontouchstart=function(a){var o=a.targetTouches[0],s=o.clientX,l=o.clientY;n.initialClientPos={clientX:s,clientY:l}},i.ontouchmove=function(a){cje(a,i,n.initialClientPos)},n.lockedElements.push(i)}),pje(n)):n.lockedNum<=0&&(n.unLockCallback=t.android?hje():fje()),n.lockedNum+=1}}function BZe(r,e){if(!lx()){var t=ux(e);t.lockedNum-=1,!(t.lockedNum>0)&&(dje(t)||(yne(r).forEach(function(n){var i=t.lockedElements.indexOf(n);n&&i!==-1&&(n.ontouchmove=null,n.ontouchstart=null,t.lockedElements.splice(i,1))}),gje(t)))}}function dje(r){return zO().ios||typeof r.unLockCallback!="function"?!1:(r.unLockCallback(),!0)}function pje(r){zO().ios&&(r.documentListenerAdded||(document.addEventListener("touchmove",VO(),mne({passive:!1})),r.documentListenerAdded=!0))}function gje(r){r.documentListenerAdded&&(document.removeEventListener("touchmove",VO(),mne({passive:!1})),r.documentListenerAdded=!1)}const vje=r=>({}),bG=r=>({});function _G(r){let e,t;return e=new Ao({props:{src:r$,class:"h-4 w-4 transition-transform "+(r[1]?"":"rotate-180")}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&2&&(a.class="h-4 w-4 transition-transform "+(n[1]?"":"rotate-180")),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function wG(r){let e,t,n;const i=r[4].default,a=Ui(i,r,r[3],null);return{c(){e=oe("div"),a&&a.c()},l(o){e=se(o,"DIV",{});var s=ge(e);a&&a.l(s),s.forEach(U)},m(o,s){le(o,e,s),a&&a.m(e,null),n=!0},p(o,s){a&&a.p&&(!n||s&8)&&Gi(a,i,o,o[3],n?Wi(i,o[3],s,null):Hi(o[3]),null)},i(o){n||(K(a,o),o&&Pd(()=>{n&&(t||(t=Gl(e,IS,{},!0)),t.run(1))}),n=!0)},o(o){re(a,o),o&&(t||(t=Gl(e,IS,{},!1)),t.run(0)),n=!1},d(o){o&&U(e),a&&a.d(o),o&&t&&t.end()}}}function mje(r){let e,t,n,i,a,o,s,l,u;const c=r[4].header,f=Ui(c,r,r[3],bG);let h=r[0]&&_G(r),d=(r[0]&&r[1]||!r[0])&&wG(r);return{c(){e=oe("div"),t=oe("section"),n=oe("button"),i=oe("header"),f&&f.c(),a=Le(),h&&h.c(),o=Le(),d&&d.c(),this.h()},l(p){e=se(p,"DIV",{class:!0});var g=ge(e);t=se(g,"SECTION",{class:!0});var v=ge(t);n=se(v,"BUTTON",{class:!0});var m=ge(n);i=se(m,"HEADER",{class:!0});var y=ge(i);f&&f.l(y),a=Fe(y),h&&h.l(y),y.forEach(U),m.forEach(U),o=Fe(v),d&&d.l(v),v.forEach(U),g.forEach(U),this.h()},h(){Y(i,"class","font-bold px-2 absolute -translate-y-1/2 top-0 left-4 bg-inherit flex gap-2 items-center"),Y(n,"class","contents bg-inherit"),$r(n,"cursor-default",!r[0]),Y(t,"class","flex flex-col border p-4 relative border-base-300 bg-inherit w-full rounded cu"),Y(e,"class","h-fit bg-inherit")},m(p,g){le(p,e,g),X(e,t),X(t,n),X(n,i),f&&f.m(i,null),X(i,a),h&&h.m(i,null),X(t,o),d&&d.m(t,null),s=!0,l||(u=_n(n,"click",r[5]),l=!0)},p(p,[g]){f&&f.p&&(!s||g&8)&&Gi(f,c,p,p[3],s?Wi(c,p[3],g,vje):Hi(p[3]),bG),p[0]?h?(h.p(p,g),g&1&&K(h,1)):(h=_G(p),h.c(),K(h,1),h.m(i,null)):h&&(Mt(),re(h,1,1,()=>{h=null}),It()),(!s||g&1)&&$r(n,"cursor-default",!p[0]),p[0]&&p[1]||!p[0]?d?(d.p(p,g),g&3&&K(d,1)):(d=wG(p),d.c(),K(d,1),d.m(t,null)):d&&(Mt(),re(d,1,1,()=>{d=null}),It())},i(p){s||(K(f,p),K(h),K(d),s=!0)},o(p){re(f,p),re(h),re(d),s=!1},d(p){p&&U(e),f&&f.d(p),h&&h.d(),d&&d.d(),l=!1,u()}}}function yje(r,e,t){let{$$slots:n={},$$scope:i}=e,{togglable:a=!1}=e,{defaultOpen:o=!0}=e,s=o;const l=()=>t(1,s=!s);return r.$$set=u=>{"togglable"in u&&t(0,a=u.togglable),"defaultOpen"in u&&t(2,o=u.defaultOpen),"$$scope"in u&&t(3,i=u.$$scope)},[a,s,o,i,n,l]}class $v extends kr{constructor(e){super(),Tr(this,e,yje,mje,Mr,{togglable:0,defaultOpen:2})}}function SG(r,e,t){const n=r.slice();return n[5]=e[t],n[7]=t,n}function CG(r){let e,t,n=r[7]+1+"",i,a,o,s,l=r[5]+"",u;return{c(){e=oe("div"),t=oe("span"),i=dt(n),a=Le(),o=oe("pre"),s=new cv(!1),u=Le(),this.h()},l(c){e=se(c,"DIV",{class:!0});var f=ge(e);t=se(f,"SPAN",{class:!0});var h=ge(t);i=pt(h,n),h.forEach(U),a=Fe(f),o=se(f,"PRE",{class:!0});var d=ge(o);s=fv(d,!1),d.forEach(U),u=Fe(f),f.forEach(U),this.h()},h(){Y(t,"class","bg-base-300/40 group-odd:bg-base-300/80 group-hover:bg-base-300 text-base-content pr-1.5 pl-1 select-none"),s.a=null,Y(o,"class","bg-base-300/20 group-odd:bg-base-300/60 group-hover:bg-base-300 pl-2 whitespace-pre-wrap pr-4"),Y(e,"class","group contents")},m(c,f){le(c,e,f),X(e,t),X(t,i),X(e,a),X(e,o),s.m(l,o),X(e,u)},p(c,f){f&1&&l!==(l=c[5]+"")&&s.p(l)},d(c){c&&U(e)}}}function bje(r){let e,t,n=Lr(r[0].split(` +`)),i=[];for(let a=0;a"",o;U0(async()=>{t(4,o=await zZ()),t(3,a=o.highlight.bind(o))});let s=n?a(i,o==null?void 0:o.languages[n],n):i;return r.$$set=l=>{"lang"in l&&t(1,n=l.lang),"text"in l&&t(2,i=l.text)},r.$$.update=()=>{r.$$.dirty&30&&t(0,s=n?a(i,o==null?void 0:o.languages[n],n):i)},[s,n,i,a,o]}class I3 extends kr{constructor(e){super(),Tr(this,e,_je,bje,Mr,{lang:1,text:2})}}function wje(r){let e,t="[my-query].id";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-s8zzb5"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Sje(r){let e,t="Identifier";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-i8zb8q"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Cje(r){let e,t="[my-query].hash";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-umwgaq"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Aje(r){let e,t="Input Text Hash";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1urstca"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function xje(r){let e,t="[my-query].score";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1c7ih8g"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Dje(r){let e,t="Execution Score";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-15qeshn"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold mr-2"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Eje(r){let e;return{c(){e=dt(`Score is a rough estimate of the overall cost of running a Query, take it with a grain of + salt. Lower is better!`)},l(t){e=pt(t,`Score is a rough estimate of the overall cost of running a Query, take it with a grain of + salt. Lower is better!`)},m(t,n){le(t,e,n)},d(t){t&&U(e)}}}function kje(r){let e,t="[my-query].length";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-iyrn7e"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Tje(r){let e,t="Length";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-vllvmp"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Mje(r){let e,t="[my-query].ready";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-uxqyh"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Ije(r){let e,t="Ready";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1d0in98"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Lje(r){let e,t="[my-query].opts.noResolve";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-bdf7yt"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Fje(r){let e,t="Waiting for Input";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1kfnohx"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Bje(r){let e,t="[my-query].error?.message";return{c(){e=oe("p"),e.textContent=t,this.h()},l(n){e=se(n,"P",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-53hk42"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Oje(r){let e,t="Error";return{c(){e=oe("p"),e.textContent=t,this.h()},l(n){e=se(n,"P",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-kw73ff"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Pje(r){let e,t="No Error";return{c(){e=oe("span"),e.textContent=t},l(n){e=se(n,"SPAN",{"data-svelte-h":!0}),kt(e)!=="svelte-1xdh2tj"&&(e.textContent=t)},m(n,i){le(n,e,i)},p:xe,i:xe,o:xe,d(n){n&&U(e)}}}function Rje(r){let e,t;return e=new I3({props:{text:r[0].error.message}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&1&&(a.text=n[0].error.message),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function Nje(r){let e,t,n,i,a=r[0].id+"",o,s,l,u,c,f,h,d=r[0].hash+"",p,g,v,m,y,b,_,w,S,C,A=r[0].score.toLocaleString()+"",x,D,E,k,M,T=r[0].length+"",L,F,N,z,W,H,R,ne=r[0].ready+"",te,fe,Ce,Te,Se,_e,$,q=r[0].opts.noResolve+"",j,he,Q,ye,ie,me,Pe,Oe,Ge;t=new mi({props:{maxWidth:"md",$$slots:{handle:[Sje],default:[wje]},$$scope:{ctx:r}}}),c=new mi({props:{maxWidth:"md",$$slots:{handle:[Aje],default:[Cje]},$$scope:{ctx:r}}}),b=new mi({props:{maxWidth:"md",direction:"left",$$slots:{handle:[Dje],default:[xje]},$$scope:{ctx:r}}}),w=new mi({props:{direction:"left",$$slots:{default:[Eje]},$$scope:{ctx:r}}}),E=new mi({props:{maxWidth:"md",$$slots:{handle:[Tje],default:[kje]},$$scope:{ctx:r}}}),W=new mi({props:{maxWidth:"md",$$slots:{handle:[Ije],default:[Mje]},$$scope:{ctx:r}}}),Se=new mi({props:{maxWidth:"md",direction:"left",$$slots:{handle:[Fje],default:[Lje]},$$scope:{ctx:r}}}),ye=new mi({props:{maxWidth:"md",direction:"right",$$slots:{handle:[Oje],default:[Bje]},$$scope:{ctx:r}}});const Ye=[Rje,Pje],Ct=[];function Zt(qe,Me){return qe[0].error?0:1}return me=Zt(r),Pe=Ct[me]=Ye[me](r),{c(){e=oe("div"),Ne(t.$$.fragment),n=Le(),i=oe("span"),o=dt(a),s=Le(),l=oe("span"),u=Le(),Ne(c.$$.fragment),f=Le(),h=oe("span"),p=dt(d),g=Le(),v=oe("span"),m=Le(),y=oe("span"),Ne(b.$$.fragment),_=Le(),Ne(w.$$.fragment),S=Le(),C=oe("span"),x=dt(A),D=Le(),Ne(E.$$.fragment),k=Le(),M=oe("span"),L=dt(T),F=Le(),N=oe("span"),z=Le(),Ne(W.$$.fragment),H=Le(),R=oe("span"),te=dt(ne),fe=Le(),Ce=oe("span"),Te=Le(),Ne(Se.$$.fragment),_e=Le(),$=oe("span"),j=dt(q),he=Le(),Q=oe("div"),Ne(ye.$$.fragment),ie=Le(),Pe.c(),this.h()},l(qe){e=se(qe,"DIV",{class:!0});var Me=ge(e);ze(t.$$.fragment,Me),n=Fe(Me),i=se(Me,"SPAN",{});var At=ge(i);o=pt(At,a),At.forEach(U),s=Fe(Me),l=se(Me,"SPAN",{}),ge(l).forEach(U),u=Fe(Me),ze(c.$$.fragment,Me),f=Fe(Me),h=se(Me,"SPAN",{});var lt=ge(h);p=pt(lt,d),lt.forEach(U),g=Fe(Me),v=se(Me,"SPAN",{}),ge(v).forEach(U),m=Fe(Me),y=se(Me,"SPAN",{class:!0});var Sr=ge(y);ze(b.$$.fragment,Sr),_=Fe(Sr),ze(w.$$.fragment,Sr),Sr.forEach(U),S=Fe(Me),C=se(Me,"SPAN",{});var Vt=ge(C);x=pt(Vt,A),Vt.forEach(U),D=Fe(Me),ze(E.$$.fragment,Me),k=Fe(Me),M=se(Me,"SPAN",{});var ht=ge(M);L=pt(ht,T),ht.forEach(U),F=Fe(Me),N=se(Me,"SPAN",{}),ge(N).forEach(U),z=Fe(Me),ze(W.$$.fragment,Me),H=Fe(Me),R=se(Me,"SPAN",{});var Re=ge(R);te=pt(Re,ne),Re.forEach(U),fe=Fe(Me),Ce=se(Me,"SPAN",{}),ge(Ce).forEach(U),Te=Fe(Me),ze(Se.$$.fragment,Me),_e=Fe(Me),$=se(Me,"SPAN",{});var ue=ge($);j=pt(ue,q),ue.forEach(U),he=Fe(Me),Q=se(Me,"DIV",{class:!0});var de=ge(Q);ze(ye.$$.fragment,de),ie=Fe(de),Pe.l(de),de.forEach(U),Me.forEach(U),this.h()},h(){Y(y,"class","font-bold"),Y(Q,"class",Oe="col-span-8 "+(r[0].error?"flex flex-col gap-2":"contents")),Y(e,"class","grid grid-cols-[auto,auto,1fr,auto,auto,1fr,auto,auto] items-center gap-x-2 gap-y-4 w-fit")},m(qe,Me){le(qe,e,Me),Ve(t,e,null),X(e,n),X(e,i),X(i,o),X(e,s),X(e,l),X(e,u),Ve(c,e,null),X(e,f),X(e,h),X(h,p),X(e,g),X(e,v),X(e,m),X(e,y),Ve(b,y,null),X(y,_),Ve(w,y,null),X(e,S),X(e,C),X(C,x),X(e,D),Ve(E,e,null),X(e,k),X(e,M),X(M,L),X(e,F),X(e,N),X(e,z),Ve(W,e,null),X(e,H),X(e,R),X(R,te),X(e,fe),X(e,Ce),X(e,Te),Ve(Se,e,null),X(e,_e),X(e,$),X($,j),X(e,he),X(e,Q),Ve(ye,Q,null),X(Q,ie),Ct[me].m(Q,null),Ge=!0},p(qe,Me){const At={};Me&2&&(At.$$scope={dirty:Me,ctx:qe}),t.$set(At),(!Ge||Me&1)&&a!==(a=qe[0].id+"")&&Rt(o,a);const lt={};Me&2&&(lt.$$scope={dirty:Me,ctx:qe}),c.$set(lt),(!Ge||Me&1)&&d!==(d=qe[0].hash+"")&&Rt(p,d);const Sr={};Me&2&&(Sr.$$scope={dirty:Me,ctx:qe}),b.$set(Sr);const Vt={};Me&2&&(Vt.$$scope={dirty:Me,ctx:qe}),w.$set(Vt),(!Ge||Me&1)&&A!==(A=qe[0].score.toLocaleString()+"")&&Rt(x,A);const ht={};Me&2&&(ht.$$scope={dirty:Me,ctx:qe}),E.$set(ht),(!Ge||Me&1)&&T!==(T=qe[0].length+"")&&Rt(L,T);const Re={};Me&2&&(Re.$$scope={dirty:Me,ctx:qe}),W.$set(Re),(!Ge||Me&1)&&ne!==(ne=qe[0].ready+"")&&Rt(te,ne);const ue={};Me&2&&(ue.$$scope={dirty:Me,ctx:qe}),Se.$set(ue),(!Ge||Me&1)&&q!==(q=qe[0].opts.noResolve+"")&&Rt(j,q);const de={};Me&2&&(de.$$scope={dirty:Me,ctx:qe}),ye.$set(de);let at=me;me=Zt(qe),me===at?Ct[me].p(qe,Me):(Mt(),re(Ct[at],1,1,()=>{Ct[at]=null}),It(),Pe=Ct[me],Pe?Pe.p(qe,Me):(Pe=Ct[me]=Ye[me](qe),Pe.c()),K(Pe,1),Pe.m(Q,null)),(!Ge||Me&1&&Oe!==(Oe="col-span-8 "+(qe[0].error?"flex flex-col gap-2":"contents")))&&Y(Q,"class",Oe)},i(qe){Ge||(K(t.$$.fragment,qe),K(c.$$.fragment,qe),K(b.$$.fragment,qe),K(w.$$.fragment,qe),K(E.$$.fragment,qe),K(W.$$.fragment,qe),K(Se.$$.fragment,qe),K(ye.$$.fragment,qe),K(Pe),Ge=!0)},o(qe){re(t.$$.fragment,qe),re(c.$$.fragment,qe),re(b.$$.fragment,qe),re(w.$$.fragment,qe),re(E.$$.fragment,qe),re(W.$$.fragment,qe),re(Se.$$.fragment,qe),re(ye.$$.fragment,qe),re(Pe),Ge=!1},d(qe){qe&&U(e),Ue(t),Ue(c),Ue(b),Ue(w),Ue(E),Ue(W),Ue(Se),Ue(ye),Ct[me].d()}}}function zje(r){let e,t="Metadata";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-11krzs3"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Vje(r){let e,t;return e=new $v({props:{$$slots:{header:[zje],default:[Nje]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function Uje(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class Gje extends kr{constructor(e){super(),Tr(this,e,Uje,Vje,Mr,{query:0})}}function Hje(r){let e,t="[my-query].dataLoading";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-184x792"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Wje(r){let e,t="Data Loading";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-gdo8md"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function $je(r){let e,t="[my-query].dataLoaded";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1vkgo5p"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function jje(r){let e,t="Data Loaded";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1as0p1i"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function qje(r){let e,t="[my-query].dataQueryTime";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1eowj43"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Yje(r){let e,t="Data Query Time";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-149ejke"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Zje(r){let e,t="[my-query].lengthLoading";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1820kb6"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Kje(r){let e,t="Length Loading";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1mb454x"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Xje(r){let e,t="[my-query].lengthLoaded";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1yn43p9"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Qje(r){let e,t="Length Loaded";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-8nyrra"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Jje(r){let e,t="[my-query].lengthQueryTime";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-hdlej"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function eqe(r){let e,t="Length Query Time";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-yp3o72"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function tqe(r){let e,t="[my-query].columnsLoading";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1hnv6sd"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function rqe(r){let e,t="Columns Loading";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-hoefmu"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function nqe(r){let e,t="[my-query].columnsLoaded";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-u2s16g"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function iqe(r){let e,t="Columns Loaded";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1czt7n1"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function aqe(r){let e,t="[my-query].columnsQueryTime";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-foqbdm"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-mono text-xs")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function oqe(r){let e,t="Columns Query Time";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1lzmvxh"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function sqe(r){let e,t,n,i,a=r[0].dataLoading+"",o,s,l,u,c,f,h,d=r[0].dataLoaded+"",p,g,v,m,y,b,_,w=Math.round(r[0].dataQueryTime*10)/10+"",S,C,A,x,D,E,k=r[0].lengthLoading+"",M,T,L,F,N,z,W,H=r[0].lengthLoaded+"",R,ne,te,fe,Ce,Te,Se,_e=Math.round(r[0].lengthQueryTime*10)/10+"",$,q,j,he,Q,ye,ie=r[0].columnsLoading+"",me,Pe,Oe,Ge,Ye,Ct,Zt,qe=r[0].columnsLoaded+"",Me,At,lt,Sr,Vt,ht,Re,ue=Math.round(r[0].columnsQueryTime*10)/10+"",de,at,J;return t=new mi({props:{maxWidth:"md",$$slots:{handle:[Wje],default:[Hje]},$$scope:{ctx:r}}}),c=new mi({props:{maxWidth:"md",$$slots:{handle:[jje],default:[$je]},$$scope:{ctx:r}}}),y=new mi({props:{maxWidth:"md",$$slots:{handle:[Yje],default:[qje]},$$scope:{ctx:r}}}),x=new mi({props:{maxWidth:"md",$$slots:{handle:[Kje],default:[Zje]},$$scope:{ctx:r}}}),N=new mi({props:{maxWidth:"md",$$slots:{handle:[Qje],default:[Xje]},$$scope:{ctx:r}}}),Ce=new mi({props:{maxWidth:"md",$$slots:{handle:[eqe],default:[Jje]},$$scope:{ctx:r}}}),he=new mi({props:{maxWidth:"md",$$slots:{handle:[rqe],default:[tqe]},$$scope:{ctx:r}}}),Ye=new mi({props:{maxWidth:"md",$$slots:{handle:[iqe],default:[nqe]},$$scope:{ctx:r}}}),Vt=new mi({props:{maxWidth:"md",$$slots:{handle:[oqe],default:[aqe]},$$scope:{ctx:r}}}),{c(){e=oe("div"),Ne(t.$$.fragment),n=Le(),i=oe("span"),o=dt(a),s=Le(),l=oe("span"),u=Le(),Ne(c.$$.fragment),f=Le(),h=oe("span"),p=dt(d),g=Le(),v=oe("span"),m=Le(),Ne(y.$$.fragment),b=Le(),_=oe("span"),S=dt(w),C=dt(" ms"),A=Le(),Ne(x.$$.fragment),D=Le(),E=oe("span"),M=dt(k),T=Le(),L=oe("span"),F=Le(),Ne(N.$$.fragment),z=Le(),W=oe("span"),R=dt(H),ne=Le(),te=oe("span"),fe=Le(),Ne(Ce.$$.fragment),Te=Le(),Se=oe("span"),$=dt(_e),q=dt(" ms"),j=Le(),Ne(he.$$.fragment),Q=Le(),ye=oe("span"),me=dt(ie),Pe=Le(),Oe=oe("span"),Ge=Le(),Ne(Ye.$$.fragment),Ct=Le(),Zt=oe("span"),Me=dt(qe),At=Le(),lt=oe("span"),Sr=Le(),Ne(Vt.$$.fragment),ht=Le(),Re=oe("span"),de=dt(ue),at=dt(" ms"),this.h()},l(ve){e=se(ve,"DIV",{class:!0});var Ee=ge(e);ze(t.$$.fragment,Ee),n=Fe(Ee),i=se(Ee,"SPAN",{});var Ot=ge(i);o=pt(Ot,a),Ot.forEach(U),s=Fe(Ee),l=se(Ee,"SPAN",{}),ge(l).forEach(U),u=Fe(Ee),ze(c.$$.fragment,Ee),f=Fe(Ee),h=se(Ee,"SPAN",{});var pr=ge(h);p=pt(pr,d),pr.forEach(U),g=Fe(Ee),v=se(Ee,"SPAN",{}),ge(v).forEach(U),m=Fe(Ee),ze(y.$$.fragment,Ee),b=Fe(Ee),_=se(Ee,"SPAN",{});var Nr=ge(_);S=pt(Nr,w),C=pt(Nr," ms"),Nr.forEach(U),A=Fe(Ee),ze(x.$$.fragment,Ee),D=Fe(Ee),E=se(Ee,"SPAN",{});var lr=ge(E);M=pt(lr,k),lr.forEach(U),T=Fe(Ee),L=se(Ee,"SPAN",{}),ge(L).forEach(U),F=Fe(Ee),ze(N.$$.fragment,Ee),z=Fe(Ee),W=se(Ee,"SPAN",{});var si=ge(W);R=pt(si,H),si.forEach(U),ne=Fe(Ee),te=se(Ee,"SPAN",{}),ge(te).forEach(U),fe=Fe(Ee),ze(Ce.$$.fragment,Ee),Te=Fe(Ee),Se=se(Ee,"SPAN",{});var li=ge(Se);$=pt(li,_e),q=pt(li," ms"),li.forEach(U),j=Fe(Ee),ze(he.$$.fragment,Ee),Q=Fe(Ee),ye=se(Ee,"SPAN",{});var gi=ge(ye);me=pt(gi,ie),gi.forEach(U),Pe=Fe(Ee),Oe=se(Ee,"SPAN",{}),ge(Oe).forEach(U),Ge=Fe(Ee),ze(Ye.$$.fragment,Ee),Ct=Fe(Ee),Zt=se(Ee,"SPAN",{});var I=ge(Zt);Me=pt(I,qe),I.forEach(U),At=Fe(Ee),lt=se(Ee,"SPAN",{}),ge(lt).forEach(U),Sr=Fe(Ee),ze(Vt.$$.fragment,Ee),ht=Fe(Ee),Re=se(Ee,"SPAN",{});var V=ge(Re);de=pt(V,ue),at=pt(V," ms"),V.forEach(U),Ee.forEach(U),this.h()},h(){Y(e,"class","grid grid-cols-[auto,auto,1fr,auto,auto,1fr,auto,auto] items-center gap-x-2 gap-y-4 w-fit")},m(ve,Ee){le(ve,e,Ee),Ve(t,e,null),X(e,n),X(e,i),X(i,o),X(e,s),X(e,l),X(e,u),Ve(c,e,null),X(e,f),X(e,h),X(h,p),X(e,g),X(e,v),X(e,m),Ve(y,e,null),X(e,b),X(e,_),X(_,S),X(_,C),X(e,A),Ve(x,e,null),X(e,D),X(e,E),X(E,M),X(e,T),X(e,L),X(e,F),Ve(N,e,null),X(e,z),X(e,W),X(W,R),X(e,ne),X(e,te),X(e,fe),Ve(Ce,e,null),X(e,Te),X(e,Se),X(Se,$),X(Se,q),X(e,j),Ve(he,e,null),X(e,Q),X(e,ye),X(ye,me),X(e,Pe),X(e,Oe),X(e,Ge),Ve(Ye,e,null),X(e,Ct),X(e,Zt),X(Zt,Me),X(e,At),X(e,lt),X(e,Sr),Ve(Vt,e,null),X(e,ht),X(e,Re),X(Re,de),X(Re,at),J=!0},p(ve,Ee){const Ot={};Ee&2&&(Ot.$$scope={dirty:Ee,ctx:ve}),t.$set(Ot),(!J||Ee&1)&&a!==(a=ve[0].dataLoading+"")&&Rt(o,a);const pr={};Ee&2&&(pr.$$scope={dirty:Ee,ctx:ve}),c.$set(pr),(!J||Ee&1)&&d!==(d=ve[0].dataLoaded+"")&&Rt(p,d);const Nr={};Ee&2&&(Nr.$$scope={dirty:Ee,ctx:ve}),y.$set(Nr),(!J||Ee&1)&&w!==(w=Math.round(ve[0].dataQueryTime*10)/10+"")&&Rt(S,w);const lr={};Ee&2&&(lr.$$scope={dirty:Ee,ctx:ve}),x.$set(lr),(!J||Ee&1)&&k!==(k=ve[0].lengthLoading+"")&&Rt(M,k);const si={};Ee&2&&(si.$$scope={dirty:Ee,ctx:ve}),N.$set(si),(!J||Ee&1)&&H!==(H=ve[0].lengthLoaded+"")&&Rt(R,H);const li={};Ee&2&&(li.$$scope={dirty:Ee,ctx:ve}),Ce.$set(li),(!J||Ee&1)&&_e!==(_e=Math.round(ve[0].lengthQueryTime*10)/10+"")&&Rt($,_e);const gi={};Ee&2&&(gi.$$scope={dirty:Ee,ctx:ve}),he.$set(gi),(!J||Ee&1)&&ie!==(ie=ve[0].columnsLoading+"")&&Rt(me,ie);const I={};Ee&2&&(I.$$scope={dirty:Ee,ctx:ve}),Ye.$set(I),(!J||Ee&1)&&qe!==(qe=ve[0].columnsLoaded+"")&&Rt(Me,qe);const V={};Ee&2&&(V.$$scope={dirty:Ee,ctx:ve}),Vt.$set(V),(!J||Ee&1)&&ue!==(ue=Math.round(ve[0].columnsQueryTime*10)/10+"")&&Rt(de,ue)},i(ve){J||(K(t.$$.fragment,ve),K(c.$$.fragment,ve),K(y.$$.fragment,ve),K(x.$$.fragment,ve),K(N.$$.fragment,ve),K(Ce.$$.fragment,ve),K(he.$$.fragment,ve),K(Ye.$$.fragment,ve),K(Vt.$$.fragment,ve),J=!0)},o(ve){re(t.$$.fragment,ve),re(c.$$.fragment,ve),re(y.$$.fragment,ve),re(x.$$.fragment,ve),re(N.$$.fragment,ve),re(Ce.$$.fragment,ve),re(he.$$.fragment,ve),re(Ye.$$.fragment,ve),re(Vt.$$.fragment,ve),J=!1},d(ve){ve&&U(e),Ue(t),Ue(c),Ue(y),Ue(x),Ue(N),Ue(Ce),Ue(he),Ue(Ye),Ue(Vt)}}}function lqe(r){let e,t="State Overview";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-lamrq2"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function uqe(r){let e,t;return e=new $v({props:{$$slots:{header:[lqe],default:[sqe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function cqe(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class fqe extends kr{constructor(e){super(),Tr(this,e,cqe,uqe,Mr,{query:0})}}function hqe(r){let e,t="Fetch Data",n,i;return{c(){e=oe("button"),e.textContent=t,this.h()},l(a){e=se(a,"BUTTON",{class:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1v4odo8"&&(e.textContent=t),this.h()},h(){Y(e,"class","px-2 py-1 rounded bg-primary text-primary-content hover:brightness-110 transition")},m(a,o){le(a,e,o),n||(i=_n(e,"click",r[1]),n=!0)},p:xe,i:xe,o:xe,d(a){a&&U(e),n=!1,i()}}}function dqe(r){let e,t;return e=new AHe({props:{data:r[0],rowNumbers:!0,sortable:!1,downloadable:!1,isFullPage:!0}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,i){const a={};i&1&&(a.data=n[0]),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function pqe(r){let e,t,n,i;const a=[dqe,hqe],o=[];function s(l,u){return l[0].dataLoaded?0:1}return t=s(r),n=o[t]=a[t](r),{c(){e=oe("div"),n.c(),this.h()},l(l){e=se(l,"DIV",{class:!0});var u=ge(e);n.l(u),u.forEach(U),this.h()},h(){Y(e,"class","w-full overflow-x-auto")},m(l,u){le(l,e,u),o[t].m(e,null),i=!0},p(l,u){let c=t;t=s(l),t===c?o[t].p(l,u):(Mt(),re(o[c],1,1,()=>{o[c]=null}),It(),n=o[t],n?n.p(l,u):(n=o[t]=a[t](l),n.c()),K(n,1),n.m(e,null))},i(l){i||(K(n),i=!0)},o(l){re(n),i=!1},d(l){l&&U(e),o[t].d()}}}function gqe(r){let e,t="Data Preview";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1le2fsq"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function vqe(r){let e,t;return e=new $v({props:{togglable:!0,defaultOpen:!1,$$slots:{header:[gqe],default:[pqe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,[i]){const a={};i&5&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function mqe(r,e,t){let{query:n}=e;const i=()=>n.fetch();return r.$$set=a=>{"query"in a&&t(0,n=a.query)},[n,i]}class yqe extends kr{constructor(e){super(),Tr(this,e,mqe,vqe,Mr,{query:0})}}function bqe(r){let e,t='[my-query].originalText';return{c(){e=oe("span"),e.innerHTML=t},l(n){e=se(n,"SPAN",{"data-svelte-h":!0}),kt(e)!=="svelte-jl0ems"&&(e.innerHTML=t)},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function _qe(r){let e,t="Original";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-fjjgpy"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function wqe(r){let e,t='[my-query].text';return{c(){e=oe("span"),e.innerHTML=t},l(n){e=se(n,"SPAN",{"data-svelte-h":!0}),kt(e)!=="svelte-lcxq67"&&(e.innerHTML=t)},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Sqe(r){let e,t="Executed";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{class:!0,slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1nwtyas"&&(e.textContent=t),this.h()},h(){Y(e,"class","font-bold"),Y(e,"slot","handle")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Cqe(r){let e,t,n,i,a="This is the query that was input by the user",o,s,l,u,c,f,h="This is the query that was executed after Query did transformations",d,p,g;return t=new mi({props:{$$slots:{handle:[_qe],default:[bqe]},$$scope:{ctx:r}}}),s=new I3({props:{text:r[0].originalText,lang:"sql"}}),u=new mi({props:{$$slots:{handle:[Sqe],default:[wqe]},$$scope:{ctx:r}}}),p=new I3({props:{text:r[0].text,lang:"sql"}}),{c(){e=oe("div"),Ne(t.$$.fragment),n=Le(),i=oe("p"),i.textContent=a,o=Le(),Ne(s.$$.fragment),l=Le(),Ne(u.$$.fragment),c=Le(),f=oe("p"),f.textContent=h,d=Le(),Ne(p.$$.fragment),this.h()},l(v){e=se(v,"DIV",{class:!0});var m=ge(e);ze(t.$$.fragment,m),n=Fe(m),i=se(m,"P",{class:!0,"data-svelte-h":!0}),kt(i)!=="svelte-13xmom7"&&(i.textContent=a),o=Fe(m),ze(s.$$.fragment,m),l=Fe(m),ze(u.$$.fragment,m),c=Fe(m),f=se(m,"P",{class:!0,"data-svelte-h":!0}),kt(f)!=="svelte-h5plex"&&(f.textContent=h),d=Fe(m),ze(p.$$.fragment,m),m.forEach(U),this.h()},h(){Y(i,"class","italic text-sm"),Y(f,"class","italic text-sm"),Y(e,"class","w-full")},m(v,m){le(v,e,m),Ve(t,e,null),X(e,n),X(e,i),X(e,o),Ve(s,e,null),X(e,l),Ve(u,e,null),X(e,c),X(e,f),X(e,d),Ve(p,e,null),g=!0},p(v,m){const y={};m&2&&(y.$$scope={dirty:m,ctx:v}),t.$set(y);const b={};m&1&&(b.text=v[0].originalText),s.$set(b);const _={};m&2&&(_.$$scope={dirty:m,ctx:v}),u.$set(_);const w={};m&1&&(w.text=v[0].text),p.$set(w)},i(v){g||(K(t.$$.fragment,v),K(s.$$.fragment,v),K(u.$$.fragment,v),K(p.$$.fragment,v),g=!0)},o(v){re(t.$$.fragment,v),re(s.$$.fragment,v),re(u.$$.fragment,v),re(p.$$.fragment,v),g=!1},d(v){v&&U(e),Ue(t),Ue(s),Ue(u),Ue(p)}}}function Aqe(r){let e,t="Query Text";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1lb6bl9"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function xqe(r){let e,t;return e=new $v({props:{$$slots:{header:[Aqe],default:[Cqe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function Dqe(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class Eqe extends kr{constructor(e){super(),Tr(this,e,Dqe,xqe,Mr,{query:0})}}function kqe(r){let e,t,n,i,a;const o=r[2].default,s=Ui(o,r,r[1],null);return{c(){e=oe("div"),s&&s.c(),this.h()},l(l){e=se(l,"DIV",{});var u=ge(e);s&&s.l(u),u.forEach(U),this.h()},h(){e.hidden=!0},m(l,u){le(l,e,u),s&&s.m(e,null),n=!0,i||(a=DG(t=Tqe.call(null,e,{target:r[0]})),i=!0)},p(l,[u]){s&&s.p&&(!n||u&2)&&Gi(s,o,l,l[1],n?Wi(o,l[1],u,null):Hi(l[1]),null),t&&LC(t.update)&&u&1&&t.update.call(null,{target:l[0]})},i(l){n||(K(s,l),n=!0)},o(l){re(s,l),n=!1},d(l){l&&U(e),s&&s.d(l),i=!1,a()}}}function Tqe(r,{target:e="body",prepend:t=!1}){let n;const i=document.createElement("div");i.style.display="none",i.style.position="absolute",r.parentElement.insertBefore(i,r);const a=async s=>{const{target:l}=s??{target:null};if(e=l,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await kG(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else if(e===null){i.parentElement.insertBefore(r,i),r.hidden=!1;return}else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);t?n.prepend(r):n.appendChild(r),r.hidden=!1};function o(){r.parentNode&&r.parentNode.removeChild(r)}return a({target:e}),{update:a,destroy:o}}function Mqe(r,e,t){let{$$slots:n={},$$scope:i}=e,{target:a="body"}=e;return r.$$set=o=>{"target"in o&&t(0,a=o.target),"$$scope"in o&&t(1,i=o.$$scope)},[a,i,n]}class Iqe extends kr{constructor(e){super(),Tr(this,e,Mqe,kqe,Mr,{target:0})}}function Lqe(r){let e;return{c(){e=dt("Columns not available")},l(t){e=pt(t,"Columns not available")},m(t,n){le(t,e,n)},p:xe,i:xe,o:xe,d(t){t&&U(e)}}}function Fqe(r){let e,t,n;return t=new Bbe({props:{class:"contents",rowClass:"bg-inherit hover:bg-inherit",columns:r[0].columns,query:r[0]}}),{c(){e=oe("div"),Ne(t.$$.fragment),this.h()},l(i){e=se(i,"DIV",{class:!0});var a=ge(e);ze(t.$$.fragment,a),a.forEach(U),this.h()},h(){Y(e,"class","w-fit grid grid-cols-2 gap-2")},m(i,a){le(i,e,a),Ve(t,e,null),n=!0},p(i,a){const o={};a&1&&(o.columns=i[0].columns),a&1&&(o.query=i[0]),t.$set(o)},i(i){n||(K(t.$$.fragment,i),n=!0)},o(i){re(t.$$.fragment,i),n=!1},d(i){i&&U(e),Ue(t)}}}function Bqe(r){let e,t,n,i;const a=[Fqe,Lqe],o=[];function s(l,u){var c;return(c=l[0].columns)!=null&&c.length?0:1}return e=s(r),t=o[e]=a[e](r),{c(){t.c(),n=Xe()},l(l){t.l(l),n=Xe()},m(l,u){o[e].m(l,u),le(l,n,u),i=!0},p(l,u){let c=e;e=s(l),e===c?o[e].p(l,u):(Mt(),re(o[c],1,1,()=>{o[c]=null}),It(),t=o[e],t?t.p(l,u):(t=o[e]=a[e](l),t.c()),K(t,1),t.m(n.parentNode,n))},i(l){i||(K(t),i=!0)},o(l){re(t),i=!1},d(l){l&&U(n),o[e].d(l)}}}function Oqe(r){let e,t="Columns";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-118fp8f"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Pqe(r){let e,t;return e=new $v({props:{togglable:!0,defaultOpen:!1,$$slots:{header:[Oqe],default:[Bqe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function Rqe(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class Nqe extends kr{constructor(e){super(),Tr(this,e,Rqe,Pqe,Mr,{query:0})}}function zqe(r){let e,t,n,i="Options",a,o,s,l=JSON.stringify({...r[0].opts,initialData:void 0},null,2)+"",u,c,f,h,d="Trace",p,g,v,m=(r[0].createdStack??"Not Available")+"",y;return{c(){e=oe("div"),t=oe("div"),n=oe("span"),n.textContent=i,a=Le(),o=oe("span"),s=oe("pre"),u=dt(l),c=Le(),f=oe("div"),h=oe("span"),h.textContent=d,p=Le(),g=oe("span"),v=oe("pre"),y=dt(m),this.h()},l(b){e=se(b,"DIV",{class:!0});var _=ge(e);t=se(_,"DIV",{class:!0});var w=ge(t);n=se(w,"SPAN",{class:!0,"data-svelte-h":!0}),kt(n)!=="svelte-11p6zew"&&(n.textContent=i),a=Fe(w),o=se(w,"SPAN",{});var S=ge(o);s=se(S,"PRE",{class:!0});var C=ge(s);u=pt(C,l),C.forEach(U),S.forEach(U),w.forEach(U),c=Fe(_),f=se(_,"DIV",{class:!0});var A=ge(f);h=se(A,"SPAN",{class:!0,"data-svelte-h":!0}),kt(h)!=="svelte-1q2bxsl"&&(h.textContent=d),p=Fe(A),g=se(A,"SPAN",{class:!0});var x=ge(g);v=se(x,"PRE",{class:!0});var D=ge(v);y=pt(D,m),D.forEach(U),x.forEach(U),A.forEach(U),_.forEach(U),this.h()},h(){Y(n,"class","font-bold"),Y(s,"class","text-xs font-mono pl-4"),Y(t,"class","flex flex-col gap-2 col-span-2"),Y(h,"class","font-bold"),Y(v,"class","text-xs font-mono pl-4"),Y(g,"class","max-w-full overflow-x-auto"),Y(f,"class","flex flex-col gap-2 max-w-full col-span-4"),Y(e,"class","grid grid-cols-3 gap-4 w-full")},m(b,_){le(b,e,_),X(e,t),X(t,n),X(t,a),X(t,o),X(o,s),X(s,u),X(e,c),X(e,f),X(f,h),X(f,p),X(f,g),X(g,v),X(v,y)},p(b,_){_&1&&l!==(l=JSON.stringify({...b[0].opts,initialData:void 0},null,2)+"")&&Rt(u,l),_&1&&m!==(m=(b[0].createdStack??"Not Available")+"")&&Rt(y,m)},d(b){b&&U(e)}}}function Vqe(r){let e,t="Verbose Info";return{c(){e=oe("span"),e.textContent=t,this.h()},l(n){e=se(n,"SPAN",{slot:!0,"data-svelte-h":!0}),kt(e)!=="svelte-1k0akqs"&&(e.textContent=t),this.h()},h(){Y(e,"slot","header")},m(n,i){le(n,e,i)},p:xe,d(n){n&&U(e)}}}function Uqe(r){let e,t;return e=new $v({props:{togglable:!0,defaultOpen:!1,$$slots:{header:[Vqe],default:[zqe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,[i]){const a={};i&3&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}function Gqe(r,e,t){let{query:n}=e;return r.$$set=i=>{"query"in i&&t(0,n=i.query)},[n]}class Hqe extends kr{constructor(e){super(),Tr(this,e,Gqe,Uqe,Mr,{query:0})}}function AG(r){let e,t,n,i,a="Query Inspector",o,s,l,u=r[0].id+"",c,f,h,d,p=r[0].hash+"",g,v,m,y="Close",b,_,w,S,C,A,x,D,E,k,M,T,L,F,N,z,W,H;return S=new Gje({props:{query:r[0]}}),A=new fqe({props:{query:r[0]}}),D=new Nqe({props:{query:r[0]}}),k=new yqe({props:{query:r[0]}}),T=new Hqe({props:{query:r[0]}}),N=new Eqe({props:{query:r[0]}}),{c(){e=oe("div"),t=oe("header"),n=oe("div"),i=oe("h2"),i.textContent=a,o=Le(),s=oe("p"),l=dt("Query ID: "),c=dt(u),f=Le(),h=oe("p"),d=dt("Query Hash: "),g=dt(p),v=Le(),m=oe("button"),m.textContent=y,b=Le(),_=oe("div"),w=oe("div"),Ne(S.$$.fragment),C=Le(),Ne(A.$$.fragment),x=Le(),Ne(D.$$.fragment),E=Le(),Ne(k.$$.fragment),M=Le(),Ne(T.$$.fragment),L=Le(),F=oe("div"),Ne(N.$$.fragment),this.h()},l(R){e=se(R,"DIV",{class:!0});var ne=ge(e);t=se(ne,"HEADER",{class:!0});var te=ge(t);n=se(te,"DIV",{class:!0});var fe=ge(n);i=se(fe,"H2",{class:!0,"data-svelte-h":!0}),kt(i)!=="svelte-wn7ukb"&&(i.textContent=a),o=Fe(fe),s=se(fe,"P",{class:!0});var Ce=ge(s);l=pt(Ce,"Query ID: "),c=pt(Ce,u),Ce.forEach(U),f=Fe(fe),h=se(fe,"P",{class:!0});var Te=ge(h);d=pt(Te,"Query Hash: "),g=pt(Te,p),Te.forEach(U),fe.forEach(U),v=Fe(te),m=se(te,"BUTTON",{"data-svelte-h":!0}),kt(m)!=="svelte-1c2vztb"&&(m.textContent=y),te.forEach(U),b=Fe(ne),_=se(ne,"DIV",{class:!0});var Se=ge(_);w=se(Se,"DIV",{class:!0});var _e=ge(w);ze(S.$$.fragment,_e),C=Fe(_e),ze(A.$$.fragment,_e),x=Fe(_e),ze(D.$$.fragment,_e),E=Fe(_e),ze(k.$$.fragment,_e),M=Fe(_e),ze(T.$$.fragment,_e),_e.forEach(U),L=Fe(Se),F=se(Se,"DIV",{class:!0});var $=ge(F);ze(N.$$.fragment,$),$.forEach(U),Se.forEach(U),ne.forEach(U),this.h()},h(){Y(i,"class","font-bold text-xl"),Y(s,"class","text-sm font-medium"),Y(h,"class","text-sm font-medium"),Y(n,"class","pt-4"),Y(t,"class","flex justify-between px-8"),Y(w,"class","col-span-6 bg-inherit flex flex-col gap-4 h-fit overflow-x-auto pt-4"),Y(F,"class","col-span-6 bg-inherit overflow-x-auto pt-4"),Y(_,"class","px-8 py-4 flex-col gap-8 bg-inherit grid grid-cols-12"),Y(e,"class","bg-base-100 w-screen h-screen overflow-y-auto fixed top-12 left-0 select-text z-50")},m(R,ne){le(R,e,ne),X(e,t),X(t,n),X(n,i),X(n,o),X(n,s),X(s,l),X(s,c),X(n,f),X(n,h),X(h,d),X(h,g),X(t,v),X(t,m),X(e,b),X(e,_),X(_,w),Ve(S,w,null),X(w,C),Ve(A,w,null),X(w,x),Ve(D,w,null),X(w,E),Ve(k,w,null),X(w,M),Ve(T,w,null),X(_,L),X(_,F),Ve(N,F,null),z=!0,W||(H=_n(m,"click",r[2]),W=!0)},p(R,ne){(!z||ne&1)&&u!==(u=R[0].id+"")&&Rt(c,u),(!z||ne&1)&&p!==(p=R[0].hash+"")&&Rt(g,p);const te={};ne&1&&(te.query=R[0]),S.$set(te);const fe={};ne&1&&(fe.query=R[0]),A.$set(fe);const Ce={};ne&1&&(Ce.query=R[0]),D.$set(Ce);const Te={};ne&1&&(Te.query=R[0]),k.$set(Te);const Se={};ne&1&&(Se.query=R[0]),T.$set(Se);const _e={};ne&1&&(_e.query=R[0]),N.$set(_e)},i(R){z||(K(S.$$.fragment,R),K(A.$$.fragment,R),K(D.$$.fragment,R),K(k.$$.fragment,R),K(T.$$.fragment,R),K(N.$$.fragment,R),z=!0)},o(R){re(S.$$.fragment,R),re(A.$$.fragment,R),re(D.$$.fragment,R),re(k.$$.fragment,R),re(T.$$.fragment,R),re(N.$$.fragment,R),z=!1},d(R){R&&U(e),Ue(S),Ue(A),Ue(D),Ue(k),Ue(T),Ue(N),W=!1,H()}}}function Wqe(r){let e,t,n=r[0]&&AG(r);return{c(){n&&n.c(),e=Xe()},l(i){n&&n.l(i),e=Xe()},m(i,a){n&&n.m(i,a),le(i,e,a),t=!0},p(i,a){i[0]?n?(n.p(i,a),a&1&&K(n,1)):(n=AG(i),n.c(),K(n,1),n.m(e.parentNode,e)):n&&(Mt(),re(n,1,1,()=>{n=null}),It())},i(i){t||(K(n),t=!0)},o(i){re(n),t=!1},d(i){i&&U(e),n&&n.d(i)}}}function $qe(r){let e,t;return e=new Iqe({props:{target:document.body,$$slots:{default:[Wqe]},$$scope:{ctx:r}}}),{c(){Ne(e.$$.fragment)},l(n){ze(e.$$.fragment,n)},m(n,i){Ve(e,n,i),t=!0},p(n,[i]){const a={};i&9&&(a.$$scope={dirty:i,ctx:n}),e.$set(a)},i(n){t||(K(e.$$.fragment,n),t=!0)},o(n){re(e.$$.fragment,n),t=!1},d(n){Ue(e,n)}}}const jqe=Tf(new Map),OZe=P3(jqe);function qqe(r,e,t){let{query:n}=e;U0(()=>(document.body.classList.add("overflow-hidden"),()=>document.body.classList.remove("overflow-hidden")));const i=TG();U0(()=>{const o=s=>{s.key==="Escape"&&(i("close"),s.stopPropagation())};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)});const a=()=>i("close");return r.$$set=o=>{"query"in o&&t(0,n=o.query)},r.$$.update=()=>{r.$$.dirty&1&&(window.currentQuery=n)},[n,i,a]}class PZe extends kr{constructor(e){super(),Tr(this,e,qqe,$qe,Mr,{query:0})}}var bne={exports:{}};(function(r){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** + * Prism: Lightweight, robust, elegant syntax highlighting + * + * @license MIT + * @author Lea Verou + * @namespace + * @public + */var t=function(n){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,o={},s={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function y(b){return b instanceof l?new l(b.type,y(b.content),b.alias):Array.isArray(b)?b.map(y):b.replace(/&/g,"&").replace(/"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(w){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(y){var b=document.getElementsByTagName("script");for(var _ in b)if(b[_].src==y)return b[_]}return null}},isActive:function(y,b,_){for(var w="no-"+b;y;){var S=y.classList;if(S.contains(b))return!0;if(S.contains(w))return!1;y=y.parentElement}return!!_}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(y,b){var _=s.util.clone(s.languages[y]);for(var w in b)_[w]=b[w];return _},insertBefore:function(y,b,_,w){w=w||s.languages;var S=w[y],C={};for(var A in S)if(S.hasOwnProperty(A)){if(A==b)for(var x in _)_.hasOwnProperty(x)&&(C[x]=_[x]);_.hasOwnProperty(A)||(C[A]=S[A])}var D=w[y];return w[y]=C,s.languages.DFS(s.languages,function(E,k){k===D&&E!=y&&(this[E]=C)}),C},DFS:function y(b,_,w,S){S=S||{};var C=s.util.objId;for(var A in b)if(b.hasOwnProperty(A)){_.call(b,A,b[A],w||A);var x=b[A],D=s.util.type(x);D==="Object"&&!S[C(x)]?(S[C(x)]=!0,y(x,_,null,S)):D==="Array"&&!S[C(x)]&&(S[C(x)]=!0,y(x,_,A,S))}}},plugins:{},highlightAll:function(y,b){s.highlightAllUnder(document,y,b)},highlightAllUnder:function(y,b,_){var w={callback:_,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};s.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),s.hooks.run("before-all-elements-highlight",w);for(var S=0,C;C=w.elements[S++];)s.highlightElement(C,b===!0,w.callback)},highlightElement:function(y,b,_){var w=s.util.getLanguage(y),S=s.languages[w];s.util.setLanguage(y,w);var C=y.parentElement;C&&C.nodeName.toLowerCase()==="pre"&&s.util.setLanguage(C,w);var A=y.textContent,x={element:y,language:w,grammar:S,code:A};function D(k){x.highlightedCode=k,s.hooks.run("before-insert",x),x.element.innerHTML=x.highlightedCode,s.hooks.run("after-highlight",x),s.hooks.run("complete",x),_&&_.call(x.element)}if(s.hooks.run("before-sanity-check",x),C=x.element.parentElement,C&&C.nodeName.toLowerCase()==="pre"&&!C.hasAttribute("tabindex")&&C.setAttribute("tabindex","0"),!x.code){s.hooks.run("complete",x),_&&_.call(x.element);return}if(s.hooks.run("before-highlight",x),!x.grammar){D(s.util.encode(x.code));return}if(b&&n.Worker){var E=new Worker(s.filename);E.onmessage=function(k){D(k.data)},E.postMessage(JSON.stringify({language:x.language,code:x.code,immediateClose:!0}))}else D(s.highlight(x.code,x.grammar,x.language))},highlight:function(y,b,_){var w={code:y,grammar:b,language:_};if(s.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=s.tokenize(w.code,w.grammar),s.hooks.run("after-tokenize",w),l.stringify(s.util.encode(w.tokens),w.language)},tokenize:function(y,b){var _=b.rest;if(_){for(var w in _)b[w]=_[w];delete b.rest}var S=new f;return h(S,S.head,y),c(y,S,b,S.head,0),p(S)},hooks:{all:{},add:function(y,b){var _=s.hooks.all;_[y]=_[y]||[],_[y].push(b)},run:function(y,b){var _=s.hooks.all[y];if(!(!_||!_.length))for(var w=0,S;S=_[w++];)S(b)}},Token:l};n.Prism=s;function l(y,b,_,w){this.type=y,this.content=b,this.alias=_,this.length=(w||"").length|0}l.stringify=function y(b,_){if(typeof b=="string")return b;if(Array.isArray(b)){var w="";return b.forEach(function(D){w+=y(D,_)}),w}var S={type:b.type,content:y(b.content,_),tag:"span",classes:["token",b.type],attributes:{},language:_},C=b.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(S.classes,C):S.classes.push(C)),s.hooks.run("wrap",S);var A="";for(var x in S.attributes)A+=" "+x+'="'+(S.attributes[x]||"").replace(/"/g,""")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+A+">"+S.content+""};function u(y,b,_,w){y.lastIndex=b;var S=y.exec(_);if(S&&w&&S[1]){var C=S[1].length;S.index+=C,S[0]=S[0].slice(C)}return S}function c(y,b,_,w,S,C){for(var A in _)if(!(!_.hasOwnProperty(A)||!_[A])){var x=_[A];x=Array.isArray(x)?x:[x];for(var D=0;D=C.reach);W+=z.value.length,z=z.next){var H=z.value;if(b.length>y.length)return;if(!(H instanceof l)){var R=1,ne;if(T){if(ne=u(N,W,y,M),!ne||ne.index>=y.length)break;var Te=ne.index,te=ne.index+ne[0].length,fe=W;for(fe+=z.value.length;Te>=fe;)z=z.next,fe+=z.value.length;if(fe-=z.value.length,W=fe,z.value instanceof l)continue;for(var Ce=z;Ce!==b.tail&&(feC.reach&&(C.reach=q);var j=z.prev;_e&&(j=h(b,j,_e),W+=_e.length),d(b,j,R);var he=new l(A,k?s.tokenize(Se,k):Se,L,Se);if(z=h(b,j,he),$&&h(b,z,$),R>1){var Q={cause:A+","+D,reach:q};c(y,b,_,z.prev,W,Q),C&&Q.reach>C.reach&&(C.reach=Q.reach)}}}}}}function f(){var y={value:null,prev:null,next:null},b={value:null,prev:y,next:null};y.next=b,this.head=y,this.tail=b,this.length=0}function h(y,b,_){var w=b.next,S={value:_,prev:b,next:w};return b.next=S,w.prev=S,y.length++,S}function d(y,b,_){for(var w=b.next,S=0;S<_&&w!==y.tail;S++)w=w.next;b.next=w,w.prev=b,y.length-=S}function p(y){for(var b=[],_=y.head.next;_!==y.tail;)b.push(_.value),_=_.next;return b}if(!n.document)return n.addEventListener&&(s.disableWorkerMessageHandler||n.addEventListener("message",function(y){var b=JSON.parse(y.data),_=b.language,w=b.code,S=b.immediateClose;n.postMessage(s.highlight(w,s.languages[_],_)),S&&n.close()},!1)),s;var g=s.util.currentScript();g&&(s.filename=g.src,g.hasAttribute("data-manual")&&(s.manual=!0));function v(){s.manual||s.highlightAll()}if(!s.manual){var m=document.readyState;m==="loading"||m==="interactive"&&g&&g.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return s}(e);r.exports&&(r.exports=t),typeof Lu<"u"&&(Lu.Prism=t),t.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(i,a){var o={};o["language-"+a]={pattern:/(^$)/i,lookbehind:!0,inside:t.languages[a]},o.cdata=/^$/i;var s={"included-cdata":{pattern://i,inside:o}};s["language-"+a]={pattern:/[\s\S]+/,inside:t.languages[a]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:s},t.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(n,i){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:t.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(n){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var a=n.languages.markup;a&&(a.tag.addInlined("style","css"),a.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(typeof t>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loading…",i=function(g,v){return"✖ Error "+g+" while fetching file: "+v},a="✖ Error: File does not exist or is empty",o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},s="data-src-status",l="loading",u="loaded",c="failed",f="pre[data-src]:not(["+s+'="'+u+'"]):not(['+s+'="'+l+'"])';function h(g,v,m){var y=new XMLHttpRequest;y.open("GET",g,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?v(y.responseText):y.status>=400?m(i(y.status,y.statusText)):m(a))},y.send(null)}function d(g){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g||"");if(v){var m=Number(v[1]),y=v[2],b=v[3];return y?b?[m,Number(b)]:[m,void 0]:[m,m]}}t.hooks.add("before-highlightall",function(g){g.selector+=", "+f}),t.hooks.add("before-sanity-check",function(g){var v=g.element;if(v.matches(f)){g.code="",v.setAttribute(s,l);var m=v.appendChild(document.createElement("CODE"));m.textContent=n;var y=v.getAttribute("data-src"),b=g.language;if(b==="none"){var _=(/\.(\w+)$/.exec(y)||[,"none"])[1];b=o[_]||_}t.util.setLanguage(m,b),t.util.setLanguage(v,b);var w=t.plugins.autoloader;w&&w.loadLanguages(b),h(y,function(S){v.setAttribute(s,u);var C=d(v.getAttribute("data-range"));if(C){var A=S.split(/\r\n?|\n/g),x=C[0],D=C[1]==null?A.length:C[1];x<0&&(x+=A.length),x=Math.max(0,Math.min(x-1,A.length)),D<0&&(D+=A.length),D=Math.max(0,Math.min(D,A.length)),S=A.slice(x,D).join(` +`),v.hasAttribute("data-start")||v.setAttribute("data-start",String(x+1))}m.textContent=S,t.highlightElement(m)},function(S){v.setAttribute(s,c),m.textContent=S})}}),t.plugins.fileHighlight={highlight:function(v){for(var m=(v||document).querySelectorAll(f),y=0,b;b=m[y++];)t.highlightElement(b)}};var p=!1;t.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(bne);var Yqe=bne.exports;const Zqe=gv(Yqe),Kqe=Object.freeze(Object.defineProperty({__proto__:null,default:Zqe},Symbol.toStringTag,{value:"Module"})),_ne=r=>{const e=fi[r].colors["base-content-muted"],t=fi[r].colors["base-content-muted"],n=fi[r].colors["base-content-muted"],i=fi[r].colors["base-300"],a=fi[r].colors["base-100"],o=fi[r].colors["base-content-muted"],s=fi[r].colors["base-content-muted"],l=fi[r].colors["base-content-muted"],u=fi[r].colors["base-300"],c=fi[r].colors["base-100"],f=fi[r].colors["base-content"],h=fi[r].colors["base-heading"],d=fi[r].colors["base-content-muted"];return{darkMode:r==="dark",backgroundColor:fi[r].colors["base-100"],textStyle:{fontFamily:["Inter","sans-serif"]},grid:{left:"0%",right:"4%",bottom:"0%",top:"15%",containLabel:!0},color:fi[r].colorPalettes.default,title:{padding:0,itemGap:7,textStyle:{fontSize:14,color:h},subtextStyle:{fontSize:13,color:d,overflow:"break"},top:"0%"},line:{itemStyle:{borderWidth:0},lineStyle:{width:2,join:"round"},symbolSize:0,symbol:"circle",smooth:!1},radar:{itemStyle:{borderWidth:0},lineStyle:{width:2},symbolSize:0,symbol:"circle",smooth:!1},pie:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},scatter:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},boxplot:{itemStyle:{borderWidth:1.5}},parallel:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},sankey:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},funnel:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},gauge:{itemStyle:{borderWidth:0,borderColor:"#cccccc"}},candlestick:{itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1}},graph:{itemStyle:{borderWidth:0,borderColor:"#cccccc"},lineStyle:{width:1,color:"#aaaaaa"},symbolSize:0,symbol:"circle",smooth:!1,color:["#923d59","#488f96","#518eca","#b3a9a0","#ffc857","#495867","#bfdbf7","#bc4749","#eeebd0"],label:{color:"#f2f2f2"}},map:{itemStyle:{areaColor:"#eee",borderColor:"#444",borderWidth:.5},label:{color:"#000"},emphasis:{itemStyle:{areaColor:"rgba(255,215,0,0.8)",borderColor:"#444",borderWidth:1},label:{color:"rgb(100,0,0)"}}},geo:{itemStyle:{areaColor:"#eee",borderColor:"#444",borderWidth:.5},label:{color:"#000"},emphasis:{itemStyle:{areaColor:"rgba(255,215,0,0.8)",borderColor:"#444",borderWidth:1},label:{color:"rgb(100,0,0)"}}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:e}},axisTick:{show:!1,lineStyle:{color:t},length:3,alignWithLabel:!0},axisLabel:{show:!0,color:n},splitLine:{show:!1,lineStyle:{color:[i]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},valueAxis:{axisLine:{show:!1,lineStyle:{color:e}},axisTick:{show:!1,lineStyle:{color:t},length:2},axisLabel:{show:!0,color:n},splitLine:{show:!0,lineStyle:{color:[i],width:1}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}},nameTextStyle:{backgroundColor:a}},logAxis:{axisLine:{show:!1,lineStyle:{color:e}},axisTick:{show:!1,lineStyle:{color:t},length:2},axisLabel:{show:!0,color:n},splitLine:{show:!0,lineStyle:{color:[i]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}},nameTextStyle:{backgroundColor:a}},timeAxis:{axisLine:{show:!0,lineStyle:{color:e}},axisTick:{show:!0,lineStyle:{color:t},length:3},axisLabel:{show:!0,color:n},splitLine:{show:!1,lineStyle:{color:[i]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},toolbox:{iconStyle:{borderColor:"#999999"},emphasis:{iconStyle:{borderColor:"#459cde"}}},legend:{textStyle:{padding:[0,0,0,-7],color:o},icon:"circle",pageIcons:{horizontal:["M 17 3 h 2 c 0.386 0 0.738 0.223 0.904 0.572 s 0.115 0.762 -0.13 1.062 L 11.292 15 l 8.482 10.367 c 0.245 0.299 0.295 0.712 0.13 1.062 S 19.386 27 19 27 h -2 c -0.3 0 -0.584 -0.135 -0.774 -0.367 l -9 -11 c -0.301 -0.369 -0.301 -0.898 0 -1.267 l 9 -11 C 16.416 3.135 16.7 3 17 3 Z","M 12 27 h -2 c -0.386 0 -0.738 -0.223 -0.904 -0.572 s -0.115 -0.762 0.13 -1.062 L 17.708 15 L 9.226 4.633 c -0.245 -0.299 -0.295 -0.712 -0.13 -1.062 S 9.614 3 10 3 h 2 c 0.3 0 0.584 0.135 0.774 0.367 l 9 11 c 0.301 0.369 0.301 0.898 0 1.267 l -9 11 C 12.584 26.865 12.3 27 12 27 Z"]},pageIconColor:s,pageIconSize:12,pageTextStyle:{color:l},pageButtonItemGap:-2,animationDurationUpdate:300},tooltip:{axisPointer:{lineStyle:{color:"#cccccc",width:1},crossStyle:{color:"#cccccc",width:1}},borderRadius:4,borderWidth:1,borderColor:u,backgroundColor:c,textStyle:{color:f,fontSize:12,fontWeight:400},padding:6},timeline:{lineStyle:{color:"#e3e3e3",width:2},itemStyle:{color:"#d6d6d6",borderWidth:1},controlStyle:{color:"#bfbfbf",borderColor:"#bfbfbf",borderWidth:1},checkpointStyle:{color:"#8f8f8f",borderColor:"#ffffff"},label:{color:"#c9c9c9"},emphasis:{itemStyle:{color:"#9c9c9c"},controlStyle:{color:"#bfbfbf",borderColor:"#bfbfbf",borderWidth:1},label:{color:"#c9c9c9"}}},visualMap:{color:["#c41621","#e39588","#f5ed98"]},dataZoom:{handleSize:"undefined%",textStyle:{}},markPoint:{label:{color:"#f2f2f2"},emphasis:{label:{color:"#f2f2f2"}}}}},RZe=_ne("light"),NZe=_ne("dark");function L3(r,e,t){var n,i,a,o,s;e==null&&(e=100);function l(){var c=Date.now()-o;c=0?n=setTimeout(l,e-c):(n=null,t||(s=r.apply(a,i),a=i=null))}var u=function(){a=this,i=arguments,o=Date.now();var c=t&&!n;return n||(n=setTimeout(l,e)),c&&(s=r.apply(a,i),a=i=null),s};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(s=r.apply(a,i),a=i=null,clearTimeout(n),n=null)},u}L3.debounce=L3;var Xqe=L3;const zZe=gv(Xqe);var wne={exports:{}};(function(r,e){(function(t,n){r.exports=n()})(Lu,function(){return function t(n,i,a){var o=window,s="application/octet-stream",l=a||s,u=n,c=!i&&!a&&u,f=document.createElement("a"),h=function(C){return String(C)},d=o.Blob||o.MozBlob||o.WebKitBlob||h,p=i||"download",g,v;if(d=d.call?d.bind(o):Blob,String(this)==="true"&&(u=[u,l],l=u[0],u=u[1]),c&&c.length<2048&&(p=c.split("/").pop().split("?")[0],f.href=c,f.href.indexOf(c)!==-1)){var m=new XMLHttpRequest;return m.open("GET",c,!0),m.responseType="blob",m.onload=function(C){t(C.target.response,p,s)},setTimeout(function(){m.send()},0),m}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(u))if(u.length>1024*1024*1.999&&d!==h)u=w(u),l=u.type||s;else return navigator.msSaveBlob?navigator.msSaveBlob(w(u),p):S(u);else if(/([\x80-\xff])/.test(u)){var y=0,b=new Uint8Array(u.length),_=b.length;for(y;y<_;++y)b[y]=u.charCodeAt(y);u=new d([b],{type:l})}g=u instanceof d?u:new d([u],{type:l});function w(C){var A=C.split(/[:;,]/),x=A[1],D=A[2]=="base64"?atob:decodeURIComponent,E=D(A.pop()),k=E.length,M=0,T=new Uint8Array(k);for(M;MW&&(z.min=W),z.maxb?1:y0)w=S;else if(C<0)_=S+1;else return S+1}return _}function m(y,b,_){if(y&&b){if(y.map&&y.map===u)return y.map(b,_);for(var w=[],S=0,C=y.length;S=10&&f++,f}return{isNumber:s,isInteger:l,quantityExponent:u}}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(2),l=s.dataPreprocess,u=s.normalizeDimensions,c={linear:function(d,p){for(var g=p.dimensions[0],v=p.dimensions[1],m=0,y=0,b=0,_=0,w=d.length,S=0;S=0;w--)w>1?N+=Math.round(M[w]*Math.pow(10,w+1))/Math.pow(10,w+1)+"x^"+w+" + ":w===1?N+=Math.round(M[w]*100)/100+"x + ":N+=Math.round(M[w]*100)/100;return{points:T,parameter:M,expression:N}}};function f(d,p){for(var g=0;gMath.abs(d[g][v])&&(v=m);for(var y=g;y=g;w--)d[w][_]-=d[w][g]/d[g][g]*d[g][_]}for(var S=new Array(p),C=d.length-1,m=d.length-2;m>=0;m--){for(var b=0,g=m+1;gf&&(f=c[h]);return f}return u}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(9);return function(l){var u=s(l);return u&&Math.sqrt(u)}}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(4),l=s.isNumber,u=i(10);function c(f){var h=f.length;if(!h||h<2)return 0;if(f.length>=2){for(var d=u(f),p=0,g,v=0;v=1)return s[u-1];var c=(u-1)*l,f=Math.floor(c),h=s[f],d=s[f+1];return h+(d-h)*(c-f)}}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(4),l=s.isNumber;function u(c){for(var f=1/0,h=0;h0?z[R-1]:z[R]-M===F?M:z[R]-F,H[R].x1=R50?50:C},scott:function(S,C,A){return Math.ceil((A-C)/(3.5*c(S)*Math.pow(S.length,-1/3)))},freedmanDiaconis:function(S,C,A){return S.sort(g),Math.ceil((A-C)/(2*(u(S,.75)-u(S,.25))*Math.pow(S.length,-1/3)))},sturges:function(S){return Math.ceil(Math.log(S.length)/Math.LN2)+1}};return _}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(2),l=s.getPrecision;return function(u,c,f,h){var d=arguments.length;d<2?(c=u,u=0,f=1):d<3?f=1:d<4?(f=+f,h=l(f)):h=+h;for(var p=Math.ceil(((c-u)/f).toFixed(h)),g=new Array(p+1),v=0;v=Math.sqrt(50)?d*=10:p>=Math.sqrt(10)?d*=5:p>=Math.sqrt(2)&&(d*=2);var g=h<0?-h:0,v=+(u>=l?d:-d).toFixed(g);return{step:v,toFixedPrecision:g}}}).call(n,i,n,t),a!==void 0&&(t.exports=a)},function(t,n,i){var a;a=(function(o){var s=i(5),l=i(19),u=2;return{type:"ecStat:regression",transform:function(f){var h=f.upstream,d=f.config||{},p=d.method||"linear",g=s(p,h.cloneRawData(),{order:d.order,dimensions:l.normalizeExistingDimensions(f,d.dimensions)}),v=g.points,m=d.formulaOn;m==null&&(m="end");var y;if(m!=="none"){for(var b=0;b{const e=d(n),r=(s,o)=>{e.update(u=>{const c=s(u);let i=c;return t&&(i=t({curr:u,next:c})),o==null||o(i),i})};return{...e,update:r,set:s=>{r(()=>s)}}};function b(){return l(10)}function v(n){return n.reduce((t,e)=>(t[e]=b(),t),{})}function w(n){const t={};return Object.keys(n).forEach(e=>{const r=e,a=n[r];t[r]=d(f(a))}),t}function A(n,t){const e={};return t.forEach(r=>{e[r]={[`data-${n}-${r}`]:""}}),r=>e[r]}function D(n){return n?{"aria-disabled":"true","data-disabled":""}:{"aria-disabled":void 0,"data-disabled":void 0}}function k(){const n=p();return t=>{const{originalEvent:e}=t.detail,{cancelable:r}=t,a=e.type;n(a,{originalEvent:e,currentTarget:e.currentTarget},{cancelable:r})||t.preventDefault()}}function x(n){const t={};for(const e in n){const r=n[e];r!==void 0&&(t[e]=r)}return t}function I(n){return function(t,e){if(e===void 0)return;const r=n[t];r&&r.set(e)}}function O(n,t){return n.length!==t.length?!1:n.every((e,r)=>e===t[r])}export{b as a,I as b,A as c,O as d,k as e,D as f,v as g,m as o,x as r,w as t}; diff --git a/_app/immutable/chunks/await_block.Dveih0bk.js b/_app/immutable/chunks/await_block.Dveih0bk.js new file mode 100644 index 0000000000000000000000000000000000000000..c5c8c4923daf13ee46ed5f919897ff2490def71a --- /dev/null +++ b/_app/immutable/chunks/await_block.Dveih0bk.js @@ -0,0 +1 @@ +import{v as o,w as p,x as a,y as m}from"./scheduler.B2FSa8mv.js";import{g as v,b as g,d as x,t as w}from"./index.CzNnnxDZ.js";function j(e,t){const h=t.token={};function c(r,s,d,k){if(t.token!==h)return;t.resolved=k;let u=t.ctx;d!==void 0&&(u=u.slice(),u[d]=k);const l=r&&(t.current=r)(u);let b=!1;t.block&&(t.blocks?t.blocks.forEach((n,_)=>{_!==s&&n&&(v(),g(n,1,1,()=>{t.blocks[_]===n&&(t.blocks[_]=null)}),x())}):t.block.d(1),l.c(),w(l,1),l.m(t.mount(),t.anchor),b=!0),t.block=l,t.blocks&&(t.blocks[s]=l),b&&m()}if(o(e)){const r=p();if(e.then(s=>{a(r),c(t.then,1,t.value,s),a(null)},s=>{if(a(r),c(t.catch,2,t.error,s),a(null),!t.hasCatch)throw s}),t.current!==t.pending)return c(t.pending,0),!0}else{if(t.current!==t.then)return c(t.then,1,t.value,e),!0;t.resolved=e}}function q(e,t,h){const c=t.slice(),{resolved:r}=e;e.current===e.then&&(c[e.value]=r),e.current===e.catch&&(c[e.error]=r),e.block.p(c,h)}export{j as h,q as u}; diff --git a/_app/immutable/chunks/button.DfeRvuoX.js b/_app/immutable/chunks/button.DfeRvuoX.js new file mode 100644 index 0000000000000000000000000000000000000000..05c4df4e84f5d7c4a68400a0a85e7f19334605ec --- /dev/null +++ b/_app/immutable/chunks/button.DfeRvuoX.js @@ -0,0 +1,8 @@ +import{aj as un,ak as ie,al as fn,G as W,w as dn,am as hn,an as et,ao as mn,A as Ge,ap as te,x as bn,K as tt,L as bt,aq as vt,M as vn}from"./VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import{d as pn,w as qe,r as pt}from"./entry.CmEkywbK.js";import{ae as gn,V as Lt,s as Ie,b as fe,k as Te,f as oe,a9 as Se,aa as re,ab as Mt,G as N,N as gt,z as nt,e as Bt,d as jt,g as Wt,af as Oe,B as F,D as it,E as ot,F as rt,L as Vt,J as yn,K as wn}from"./scheduler.B2FSa8mv.js";import{t as Tn}from"./arrays.DATw8jA9.js";import{S as Kt,i as zt,g as xn,b as X,d as _n,t as J,c as An,a as En,m as Sn,e as On}from"./index.CzNnnxDZ.js";function Fo(t,...e){return t.call(this,...e)}const Ye=Symbol("Unset"),yt=Symbol("IsSetTracked"),wt=Symbol("GetModKeys"),Tt=Symbol("GetOwnKey"),Pn=Symbol("GetOwnPath"),xt=Symbol("GetParent"),_t=(t={},e={},n=void 0,i=void 0)=>{if(n&&!n[yt])throw new Error("SetTracked parent must be SetTracked");const o=Object.assign(()=>{},e??{}),a=Object.keys(o),r=new Proxy(o,{get(l,s){switch(s){case Ye:return!(n!=null&&n[wt].includes(i));case wt:return a;case Tt:return i;case xt:return n;case Pn:{const u=[i];let c=n;for(;c!==void 0;)u.unshift(c[Tt]),c=c[xt];return u.join(".")}case yt:return!0;case"toJSON":return()=>({...l});case"toString":case"toPrimitive":case Symbol.toPrimitive:return r[Ye]?i&&i in t?()=>t[i]:()=>"":e.toString.bind(e);default:return s in l||(l[s]=_t(t,void 0,r,s)),l[s]}},set(l,s,u){return a.push(s),typeof u=="object"&&(u=_t(t,u,r,s)),l[s]=u,!0}});return r},Ro=(t,...e)=>e.filter(i=>i==null?void 0:i[Ye]).length!==0;function Do(t,e,n,i=!0){const o=e-n;return o<=0?i?t[t.length-1]:t[0]:t[o]}function Io(t,e,n,i=!0){const o=e+n;return o>t.length-1?i?t[0]:t[t.length-1]:t[o]}function Lo(t,e,n=!0){return e===t.length-1?n?t[0]:t[e]:t[e+1]}function Mo(t,e,n=!0){return e<=0?n?t[t.length-1]:t[0]:t[e-1]}function kn(t){return t[t.length-1]}function Nn(t,e){return t.map((n,i)=>t[(e+i)%t.length])}function Bo(t,e,n=un){const i=e.findIndex(o=>n(o,t));return i!==-1?e.splice(i,1):e.push(t),e}function jo(t,e){const n=[];for(let i=0;i=0&&tsetTimeout(e,t))}function Cn(t,e=500){let n=null;return function(...i){const o=()=>{n=null,t(...i)};n&&clearTimeout(n),n=setTimeout(o,e)}}const Ht=()=>typeof window<"u";function Fn(){const t=navigator.userAgentData;return(t==null?void 0:t.platform)??navigator.platform}const Ut=t=>Ht()&&t.test(Fn().toLowerCase()),Rn=()=>Ht()&&!!navigator.maxTouchPoints,Dn=()=>Ut(/^mac/)&&!Rn(),In=()=>Ut(/mac|iphone|ipad|ipod/i),Ln=()=>In()&&!Dn(),Ve="data-melt-scroll-lock";function At(t,e){if(!t)return;const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function Mn(t,e,n){if(!t)return;const i=t.style.getPropertyValue(e);return t.style.setProperty(e,n),()=>{i?t.style.setProperty(e,i):t.style.removeProperty(e)}}function Bn(t){const e=t.getBoundingClientRect().left;return Math.round(e)+t.scrollLeft?"paddingLeft":"paddingRight"}function zo(t){const e=document,n=e.defaultView??window,{documentElement:i,body:o}=e;if(o.hasAttribute(Ve))return ie;o.setAttribute(Ve,"");const r=n.innerWidth-i.clientWidth,l=()=>Mn(i,"--scrollbar-width",`${r}px`),s=Bn(i),u=n.getComputedStyle(o)[s],c=()=>At(o,{overflow:"hidden",[s]:`calc(${u} + ${r}px)`}),f=()=>{const{scrollX:m,scrollY:p,visualViewport:g}=n,y=(g==null?void 0:g.offsetLeft)??0,w=(g==null?void 0:g.offsetTop)??0,x=At(o,{position:"fixed",overflow:"hidden",top:`${-(p-Math.floor(w))}px`,left:`${-(m-Math.floor(y))}px`,right:"0",[s]:`calc(${u} + ${r}px)`});return()=>{x==null||x(),n.scrollTo(m,p)}},v=[l(),Ln()?f():c()];return()=>{v.forEach(m=>m==null?void 0:m()),o.removeAttribute(Ve)}}function Ho(t){const{open:e,forceVisible:n,activeTrigger:i}=t;return pn([e,n,i],([o,a,r])=>(o||a)&&r!==null)}function jn(t){fn&&at(1).then(()=>{const e=document.activeElement;!W(e)||e===t||(e.tabIndex=-1,t&&(t.tabIndex=0,t.focus()))})}function Gt(){return Array.from(document.querySelectorAll('a[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'))}function Uo(t){const e=Gt(),i=e.indexOf(t)+1,o=e[i];return i=0&&W(o)?o:null}const Wn=new Set(["Shift","Control","Alt","Meta","CapsLock","NumLock"]),Vn={onMatch:jn,getCurrentItem:()=>document.activeElement};function qo(t={}){const e={...Vn,...t},n=dn(qe([])),i=Cn(()=>{n.update(()=>[])});return{typed:n,resetTyped:i,handleTypeaheadSearch:(a,r)=>{if(Wn.has(a))return;const l=e.getCurrentItem(),s=gn(n);if(!Array.isArray(s))return;s.push(a.toLowerCase()),n.set(s);const u=r.filter(y=>!(y.getAttribute("disabled")==="true"||y.getAttribute("aria-disabled")==="true"||y.hasAttribute("data-disabled"))),f=s.length>1&&s.every(y=>y===s[0])?s[0]:s.join(""),v=W(l)?u.indexOf(l):-1;let m=Nn(u,Math.max(v,0));f.length===1&&(m=m.filter(y=>y!==l));const g=m.find(y=>(y==null?void 0:y.innerText)&&y.innerText.toLowerCase().startsWith(f.toLowerCase()));W(g)&&g!==l&&e.onMatch(g),i()}}}function Kn(t){let e=t.parentElement;for(;W(e)&&!e.hasAttribute("data-portal");)e=e.parentElement;return e||"body"}function Yo(t,e){return e!==void 0?e:Kn(t)==="body"?document.body:null}async function Xo(t){const{prop:e,defaultEl:n}=t;if(await Promise.all([at(1),Lt]),e===void 0){n==null||n.focus();return}const i=hn(e)?e(n):e;if(typeof i=="string"){const o=document.querySelector(i);if(!W(o))return;o.focus()}else W(i)&&i.focus()}const Z=Math.min,V=Math.max,Pe=Math.round,_e=Math.floor,U=t=>({x:t,y:t}),zn={left:"right",right:"left",bottom:"top",top:"bottom"},Hn={start:"end",end:"start"};function Xe(t,e,n){return V(t,Z(e,n))}function he(t,e){return typeof t=="function"?t(e):t}function Q(t){return t.split("-")[0]}function me(t){return t.split("-")[1]}function qt(t){return t==="x"?"y":"x"}function st(t){return t==="y"?"height":"width"}function ae(t){return["top","bottom"].includes(Q(t))?"y":"x"}function lt(t){return qt(ae(t))}function Un(t,e,n){n===void 0&&(n=!1);const i=me(t),o=lt(t),a=st(o);let r=o==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(r=ke(r)),[r,ke(r)]}function Gn(t){const e=ke(t);return[Je(t),e,Je(e)]}function Je(t){return t.replace(/start|end/g,e=>Hn[e])}function qn(t,e,n){const i=["left","right"],o=["right","left"],a=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?a:r;default:return[]}}function Yn(t,e,n,i){const o=me(t);let a=qn(Q(t),n==="start",i);return o&&(a=a.map(r=>r+"-"+o),e&&(a=a.concat(a.map(Je)))),a}function ke(t){return t.replace(/left|right|bottom|top/g,e=>zn[e])}function Xn(t){return{top:0,right:0,bottom:0,left:0,...t}}function Yt(t){return typeof t!="number"?Xn(t):{top:t,right:t,bottom:t,left:t}}function Ne(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function Et(t,e,n){let{reference:i,floating:o}=t;const a=ae(e),r=lt(e),l=st(r),s=Q(e),u=a==="y",c=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,v=i[l]/2-o[l]/2;let m;switch(s){case"top":m={x:c,y:i.y-o.height};break;case"bottom":m={x:c,y:i.y+i.height};break;case"right":m={x:i.x+i.width,y:f};break;case"left":m={x:i.x-o.width,y:f};break;default:m={x:i.x,y:i.y}}switch(me(e)){case"start":m[r]-=v*(n&&u?-1:1);break;case"end":m[r]+=v*(n&&u?-1:1);break}return m}const Jn=async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:a=[],platform:r}=n,l=a.filter(Boolean),s=await(r.isRTL==null?void 0:r.isRTL(e));let u=await r.getElementRects({reference:t,floating:e,strategy:o}),{x:c,y:f}=Et(u,i,s),v=i,m={},p=0;for(let g=0;g({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:o,rects:a,platform:r,elements:l,middlewareData:s}=e,{element:u,padding:c=0}=he(t,e)||{};if(u==null)return{};const f=Yt(c),v={x:n,y:i},m=lt(o),p=st(m),g=await r.getDimensions(u),y=m==="y",w=y?"top":"left",x=y?"bottom":"right",A=y?"clientHeight":"clientWidth",k=a.reference[p]+a.reference[m]-v[m]-a.floating[p],P=v[m]-a.reference[m],D=await(r.getOffsetParent==null?void 0:r.getOffsetParent(u));let L=D?D[A]:0;(!L||!await(r.isElement==null?void 0:r.isElement(D)))&&(L=l.floating[A]||a.floating[p]);const B=k/2-P/2,j=L/2-g[p]/2-1,I=Z(f[w],j),M=Z(f[x],j),O=I,d=L-g[p]-M,h=L/2-g[p]/2+B,T=Xe(O,h,d),E=!s.arrow&&me(o)!=null&&h!==T&&a.reference[p]/2-(hh<=0)){var M,O;const h=(((M=a.flip)==null?void 0:M.index)||0)+1,T=L[h];if(T)return{data:{index:h,overflows:I},reset:{placement:T}};let E=(O=I.filter(S=>S.overflows[0]<=0).sort((S,b)=>S.overflows[1]-b.overflows[1])[0])==null?void 0:O.placement;if(!E)switch(m){case"bestFit":{var d;const S=(d=I.filter(b=>{if(D){const _=ae(b.placement);return _===x||_==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(_=>_>0).reduce((_,C)=>_+C,0)]).sort((b,_)=>b[1]-_[1])[0])==null?void 0:d[0];S&&(E=S);break}case"initialPlacement":E=l;break}if(o!==E)return{reset:{placement:E}}}return{}}}};async function $n(t,e){const{placement:n,platform:i,elements:o}=t,a=await(i.isRTL==null?void 0:i.isRTL(o.floating)),r=Q(n),l=me(n),s=ae(n)==="y",u=["left","top"].includes(r)?-1:1,c=a&&s?-1:1,f=he(e,t);let{mainAxis:v,crossAxis:m,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof p=="number"&&(m=l==="end"?p*-1:p),s?{x:m*c,y:v*u}:{x:v*u,y:m*c}}const ei=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:o,y:a,placement:r,middlewareData:l}=e,s=await $n(e,t);return r===((n=l.offset)==null?void 0:n.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:r}}}}},ti=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o}=e,{mainAxis:a=!0,crossAxis:r=!1,limiter:l={fn:y=>{let{x:w,y:x}=y;return{x:w,y:x}}},...s}=he(t,e),u={x:n,y:i},c=await ct(e,s),f=ae(Q(o)),v=qt(f);let m=u[v],p=u[f];if(a){const y=v==="y"?"top":"left",w=v==="y"?"bottom":"right",x=m+c[y],A=m-c[w];m=Xe(x,m,A)}if(r){const y=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=p+c[y],A=p-c[w];p=Xe(x,p,A)}const g=l.fn({...e,[v]:m,[f]:p});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[v]:a,[f]:r}}}}}},ni=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:o,rects:a,platform:r,elements:l}=e,{apply:s=()=>{},...u}=he(t,e),c=await ct(e,u),f=Q(o),v=me(o),m=ae(o)==="y",{width:p,height:g}=a.floating;let y,w;f==="top"||f==="bottom"?(y=f,w=v===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(w=f,y=v==="end"?"top":"bottom");const x=g-c.top-c.bottom,A=p-c.left-c.right,k=Z(g-c[y],x),P=Z(p-c[w],A),D=!e.middlewareData.shift;let L=k,B=P;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(B=A),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(L=x),D&&!v){const I=V(c.left,0),M=V(c.right,0),O=V(c.top,0),d=V(c.bottom,0);m?B=p-2*(I!==0||M!==0?I+M:V(c.left,c.right)):L=g-2*(O!==0||d!==0?O+d:V(c.top,c.bottom))}await s({...e,availableWidth:B,availableHeight:L});const j=await r.getDimensions(l.floating);return p!==j.width||g!==j.height?{reset:{rects:!0}}:{}}}};function Le(){return typeof window<"u"}function be(t){return Xt(t)?(t.nodeName||"").toLowerCase():"#document"}function K(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function q(t){var e;return(e=(Xt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Xt(t){return Le()?t instanceof Node||t instanceof K(t).Node:!1}function z(t){return Le()?t instanceof Element||t instanceof K(t).Element:!1}function G(t){return Le()?t instanceof HTMLElement||t instanceof K(t).HTMLElement:!1}function St(t){return!Le()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof K(t).ShadowRoot}function xe(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=H(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function ii(t){return["table","td","th"].includes(be(t))}function Me(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function ut(t){const e=ft(),n=z(t)?H(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function oi(t){let e=$(t);for(;G(e)&&!de(e);){if(ut(e))return e;if(Me(e))return null;e=$(e)}return null}function ft(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function de(t){return["html","body","#document"].includes(be(t))}function H(t){return K(t).getComputedStyle(t)}function Be(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function $(t){if(be(t)==="html")return t;const e=t.assignedSlot||t.parentNode||St(t)&&t.host||q(t);return St(e)?e.host:e}function Jt(t){const e=$(t);return de(e)?t.ownerDocument?t.ownerDocument.body:t.body:G(e)&&xe(e)?e:Jt(e)}function we(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const o=Jt(t),a=o===((i=t.ownerDocument)==null?void 0:i.body),r=K(o);if(a){const l=Ze(r);return e.concat(r,r.visualViewport||[],xe(o)?o:[],l&&n?we(l):[])}return e.concat(o,we(o,[],n))}function Ze(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){const e=H(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=G(t),a=o?t.offsetWidth:n,r=o?t.offsetHeight:i,l=Pe(n)!==a||Pe(i)!==r;return l&&(n=a,i=r),{width:n,height:i,$:l}}function dt(t){return z(t)?t:t.contextElement}function ue(t){const e=dt(t);if(!G(e))return U(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:a}=Zt(e);let r=(a?Pe(n.width):n.width)/i,l=(a?Pe(n.height):n.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!l||!Number.isFinite(l))&&(l=1),{x:r,y:l}}const ri=U(0);function Qt(t){const e=K(t);return!ft()||!e.visualViewport?ri:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ai(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==K(t)?!1:e}function se(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),a=dt(t);let r=U(1);e&&(i?z(i)&&(r=ue(i)):r=ue(t));const l=ai(a,n,i)?Qt(a):U(0);let s=(o.left+l.x)/r.x,u=(o.top+l.y)/r.y,c=o.width/r.x,f=o.height/r.y;if(a){const v=K(a),m=i&&z(i)?K(i):i;let p=v,g=Ze(p);for(;g&&i&&m!==p;){const y=ue(g),w=g.getBoundingClientRect(),x=H(g),A=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,k=w.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;s*=y.x,u*=y.y,c*=y.x,f*=y.y,s+=A,u+=k,p=K(g),g=Ze(p)}}return Ne({width:c,height:f,x:s,y:u})}function ht(t,e){const n=Be(t).scrollLeft;return e?e.left+n:se(q(t)).left+n}function $t(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:ht(t,i)),a=i.top+e.scrollTop;return{x:o,y:a}}function si(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const a=o==="fixed",r=q(i),l=e?Me(e.floating):!1;if(i===r||l&&a)return n;let s={scrollLeft:0,scrollTop:0},u=U(1);const c=U(0),f=G(i);if((f||!f&&!a)&&((be(i)!=="body"||xe(r))&&(s=Be(i)),G(i))){const m=se(i);u=ue(i),c.x=m.x+i.clientLeft,c.y=m.y+i.clientTop}const v=r&&!f&&!a?$t(r,s,!0):U(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+c.x+v.x,y:n.y*u.y-s.scrollTop*u.y+c.y+v.y}}function li(t){return Array.from(t.getClientRects())}function ci(t){const e=q(t),n=Be(t),i=t.ownerDocument.body,o=V(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),a=V(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+ht(t);const l=-n.scrollTop;return H(i).direction==="rtl"&&(r+=V(e.clientWidth,i.clientWidth)-o),{width:o,height:a,x:r,y:l}}function ui(t,e){const n=K(t),i=q(t),o=n.visualViewport;let a=i.clientWidth,r=i.clientHeight,l=0,s=0;if(o){a=o.width,r=o.height;const u=ft();(!u||u&&e==="fixed")&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:r,x:l,y:s}}function fi(t,e){const n=se(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,a=G(t)?ue(t):U(1),r=t.clientWidth*a.x,l=t.clientHeight*a.y,s=o*a.x,u=i*a.y;return{width:r,height:l,x:s,y:u}}function Ot(t,e,n){let i;if(e==="viewport")i=ui(t,n);else if(e==="document")i=ci(q(t));else if(z(e))i=fi(e,n);else{const o=Qt(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return Ne(i)}function en(t,e){const n=$(t);return n===e||!z(n)||de(n)?!1:H(n).position==="fixed"||en(n,e)}function di(t,e){const n=e.get(t);if(n)return n;let i=we(t,[],!1).filter(l=>z(l)&&be(l)!=="body"),o=null;const a=H(t).position==="fixed";let r=a?$(t):t;for(;z(r)&&!de(r);){const l=H(r),s=ut(r);!s&&l.position==="fixed"&&(o=null),(a?!s&&!o:!s&&l.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||xe(r)&&!s&&en(t,r))?i=i.filter(c=>c!==r):o=l,r=$(r)}return e.set(t,i),i}function hi(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[...n==="clippingAncestors"?Me(e)?[]:di(e,this._c):[].concat(n),i],l=r[0],s=r.reduce((u,c)=>{const f=Ot(e,c,o);return u.top=V(f.top,u.top),u.right=Z(f.right,u.right),u.bottom=Z(f.bottom,u.bottom),u.left=V(f.left,u.left),u},Ot(e,l,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function mi(t){const{width:e,height:n}=Zt(t);return{width:e,height:n}}function bi(t,e,n){const i=G(e),o=q(e),a=n==="fixed",r=se(t,!0,a,e);let l={scrollLeft:0,scrollTop:0};const s=U(0);if(i||!i&&!a)if((be(e)!=="body"||xe(o))&&(l=Be(e)),i){const v=se(e,!0,a,e);s.x=v.x+e.clientLeft,s.y=v.y+e.clientTop}else o&&(s.x=ht(o));const u=o&&!i&&!a?$t(o,l):U(0),c=r.left+l.scrollLeft-s.x-u.x,f=r.top+l.scrollTop-s.y-u.y;return{x:c,y:f,width:r.width,height:r.height}}function Ke(t){return H(t).position==="static"}function Pt(t,e){if(!G(t)||H(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return q(t)===n&&(n=n.ownerDocument.body),n}function tn(t,e){const n=K(t);if(Me(t))return n;if(!G(t)){let o=$(t);for(;o&&!de(o);){if(z(o)&&!Ke(o))return o;o=$(o)}return n}let i=Pt(t,e);for(;i&&ii(i)&&Ke(i);)i=Pt(i,e);return i&&de(i)&&Ke(i)&&!ut(i)?n:i||oi(t)||n}const vi=async function(t){const e=this.getOffsetParent||tn,n=this.getDimensions,i=await n(t.floating);return{reference:bi(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function pi(t){return H(t).direction==="rtl"}const gi={convertOffsetParentRelativeRectToViewportRelativeRect:si,getDocumentElement:q,getClippingRect:hi,getOffsetParent:tn,getElementRects:vi,getClientRects:li,getDimensions:mi,getScale:ue,isElement:z,isRTL:pi};function yi(t,e){let n=null,i;const o=q(t);function a(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function r(l,s){l===void 0&&(l=!1),s===void 0&&(s=1),a();const{left:u,top:c,width:f,height:v}=t.getBoundingClientRect();if(l||e(),!f||!v)return;const m=_e(c),p=_e(o.clientWidth-(u+f)),g=_e(o.clientHeight-(c+v)),y=_e(u),x={rootMargin:-m+"px "+-p+"px "+-g+"px "+-y+"px",threshold:V(0,Z(1,s))||1};let A=!0;function k(P){const D=P[0].intersectionRatio;if(D!==s){if(!A)return r();D?r(!1,D):i=setTimeout(()=>{r(!1,1e-7)},1e3)}A=!1}try{n=new IntersectionObserver(k,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,x)}n.observe(t)}return r(!0),a}function wi(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:s=!1}=i,u=dt(t),c=o||a?[...u?we(u):[],...we(e)]:[];c.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const f=u&&l?yi(u,n):null;let v=-1,m=null;r&&(m=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=m)==null||A.observe(e)})),n()}),u&&!s&&m.observe(u),m.observe(e));let p,g=s?se(t):null;s&&y();function y(){const w=se(t);g&&(w.x!==g.x||w.y!==g.y||w.width!==g.width||w.height!==g.height)&&n(),g=w,p=requestAnimationFrame(y)}return n(),()=>{var w;c.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),f==null||f(),(w=m)==null||w.disconnect(),m=null,s&&cancelAnimationFrame(p)}}const Ti=ei,xi=ti,_i=Qn,Ai=ni,Ei=Zn,Si=(t,e,n)=>{const i=new Map,o={platform:gi,...n},a={...o.platform,_c:i};return Jn(t,e,{...o,platform:a})},Oi={strategy:"absolute",placement:"top",gutter:5,flip:!0,sameWidth:!1,overflowPadding:8},Pi={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function ki(t,e,n={}){if(!e||!t||n===null)return{destroy:ie};const i={...Oi,...n},o=e.querySelector("[data-arrow=true]"),a=[];i.flip&&a.push(_i({boundary:i.boundary,padding:i.overflowPadding}));const r=W(o)?o.offsetHeight/2:0;if(i.gutter||i.offset){const s=i.gutter?{mainAxis:i.gutter}:i.offset;(s==null?void 0:s.mainAxis)!=null&&(s.mainAxis+=r),a.push(Ti(s))}a.push(xi({boundary:i.boundary,crossAxis:i.overlap,padding:i.overflowPadding})),o&&a.push(Ei({element:o,padding:8})),a.push(Ai({padding:i.overflowPadding,apply({rects:s,availableHeight:u,availableWidth:c}){i.sameWidth&&Object.assign(e.style,{width:`${Math.round(s.reference.width)}px`,minWidth:"unset"}),i.fitViewport&&Object.assign(e.style,{maxWidth:`${c}px`,maxHeight:`${u}px`})}}));function l(){if(!t||!e||W(t)&&!t.ownerDocument.documentElement.contains(t))return;const{placement:s,strategy:u}=i;Si(t,e,{placement:s,middleware:a,strategy:u}).then(c=>{const f=Math.round(c.x),v=Math.round(c.y),[m,p]=Ni(c.placement);if(e.setAttribute("data-side",m),e.setAttribute("data-align",p),Object.assign(e.style,{position:i.strategy,top:`${v}px`,left:`${f}px`}),W(o)&&c.middlewareData.arrow){const{x:g,y}=c.middlewareData.arrow,w=c.placement.split("-")[0];o.setAttribute("data-side",w),Object.assign(o.style,{position:"absolute",left:g!=null?`${g}px`:"",top:y!=null?`${y}px`:"",[w]:`calc(100% - ${r}px)`,transform:Pi[w],backgroundColor:"inherit",zIndex:"inherit"})}return c})}return Object.assign(e.style,{position:i.strategy}),{destroy:wi(t,e,l)}}function Ni(t){const[e,n="center"]=t.split("-");return[e,n]}/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var nn=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ce=nn.join(","),on=typeof Element>"u",le=on?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fe=!on&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},Re=function t(e,n){var i;n===void 0&&(n=!0);var o=e==null||(i=e.getAttribute)===null||i===void 0?void 0:i.call(e,"inert"),a=o===""||o==="true",r=a||n&&e&&t(e.parentNode);return r},Ci=function(e){var n,i=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return i===""||i==="true"},rn=function(e,n,i){if(Re(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Ce));return n&&le.call(e,Ce)&&o.unshift(e),o=o.filter(i),o},an=function t(e,n,i){for(var o=[],a=Array.from(e);a.length;){var r=a.shift();if(!Re(r,!1))if(r.tagName==="SLOT"){var l=r.assignedElements(),s=l.length?l:r.children,u=t(s,!0,i);i.flatten?o.push.apply(o,u):o.push({scopeParent:r,candidates:u})}else{var c=le.call(r,Ce);c&&i.filter(r)&&(n||!e.includes(r))&&o.push(r);var f=r.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(r),v=!Re(f,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(r));if(f&&v){var m=t(f===!0?r.children:f.children,!0,i);i.flatten?o.push.apply(o,m):o.push({scopeParent:r,candidates:m})}else a.unshift.apply(a,r.children)}}return o},sn=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ne=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Ci(e))&&!sn(e)?0:e.tabIndex},Fi=function(e,n){var i=ne(e);return i<0&&n&&!sn(e)?0:i},Ri=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},ln=function(e){return e.tagName==="INPUT"},Di=function(e){return ln(e)&&e.type==="hidden"},Ii=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(i){return i.tagName==="SUMMARY"});return n},Li=function(e,n){for(var i=0;isummary:first-of-type"),r=a?e.parentElement:e;if(le.call(r,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof o=="function"){for(var l=e;e;){var s=e.parentElement,u=Fe(e);if(s&&!s.shadowRoot&&o(s)===!0)return kt(e);e.assignedSlot?e=e.assignedSlot:!s&&u!==e.ownerDocument?e=u.host:e=s}e=l}if(Wi(e))return!e.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return kt(e);return!1},Ki=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i=0)},Hi=function t(e){var n=[],i=[];return e.forEach(function(o,a){var r=!!o.scopeParent,l=r?o.scopeParent:o,s=Fi(l,r),u=r?t(o.candidates):l;s===0?r?n.push.apply(n,u):n.push(l):i.push({documentOrder:a,tabIndex:s,item:o,isScope:r,content:u})}),i.sort(Ri).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concat(n)},Ui=function(e,n){n=n||{};var i;return n.getShadowRoot?i=an([e],n.includeContainer,{filter:Qe.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:zi}):i=rn(e,n.includeContainer,Qe.bind(null,n)),Hi(i)},Gi=function(e,n){n=n||{};var i;return n.getShadowRoot?i=an([e],n.includeContainer,{filter:De.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):i=rn(e,n.includeContainer,De.bind(null,n)),i},ce=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return le.call(e,Ce)===!1?!1:Qe(n,e)},qi=nn.concat("iframe").join(","),ze=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return le.call(e,qi)===!1?!1:De(n,e)};/*! +* focus-trap 7.6.2 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function $e(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n0){var i=e[e.length-1];i!==n&&i.pause()}var o=e.indexOf(n);o===-1||e.splice(o,1),e.push(n)},deactivateTrap:function(e,n){var i=e.indexOf(n);i!==-1&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}},no=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},io=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},ye=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},oo=function(e){return ye(e)&&!e.shiftKey},ro=function(e){return ye(e)&&e.shiftKey},Rt=function(e){return setTimeout(e,0)},ge=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o1&&arguments[1]!==void 0?arguments[1]:{},T=h.hasFallback,E=T===void 0?!1:T,S=h.params,b=S===void 0?[]:S,_=a[d];if(typeof _=="function"&&(_=_.apply(void 0,Qi(b))),_===!0&&(_=void 0),!_){if(_===void 0||_===!1)return _;throw new Error("`".concat(d,"` was specified but was not a node, or did not return a node"))}var C=_;if(typeof _=="string"){try{C=i.querySelector(_)}catch(R){throw new Error("`".concat(d,'` appears to be an invalid selector; error="').concat(R.message,'"'))}if(!C&&!E)throw new Error("`".concat(d,"` as selector refers to no known node"))}return C},f=function(){var d=c("initialFocus",{hasFallback:!0});if(d===!1)return!1;if(d===void 0||d&&!ze(d,a.tabbableOptions))if(u(i.activeElement)>=0)d=i.activeElement;else{var h=r.tabbableGroups[0],T=h&&h.firstTabbableNode;d=T||c("fallbackFocus")}else d===null&&(d=c("fallbackFocus"));if(!d)throw new Error("Your focus-trap needs to have at least one focusable element");return d},v=function(){if(r.containerGroups=r.containers.map(function(d){var h=Ui(d,a.tabbableOptions),T=Gi(d,a.tabbableOptions),E=h.length>0?h[0]:void 0,S=h.length>0?h[h.length-1]:void 0,b=T.find(function(R){return ce(R)}),_=T.slice().reverse().find(function(R){return ce(R)}),C=!!h.find(function(R){return ne(R)>0});return{container:d,tabbableNodes:h,focusableNodes:T,posTabIndexesFound:C,firstTabbableNode:E,lastTabbableNode:S,firstDomTabbableNode:b,lastDomTabbableNode:_,nextTabbableNode:function(ee){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Y=h.indexOf(ee);return Y<0?ve?T.slice(T.indexOf(ee)+1).find(function(pe){return ce(pe)}):T.slice(0,T.indexOf(ee)).reverse().find(function(pe){return ce(pe)}):h[Y+(ve?1:-1)]}}}),r.tabbableGroups=r.containerGroups.filter(function(d){return d.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(r.containerGroups.find(function(d){return d.posTabIndexesFound})&&r.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},m=function(d){var h=d.activeElement;if(h)return h.shadowRoot&&h.shadowRoot.activeElement!==null?m(h.shadowRoot):h},p=function(d){if(d!==!1&&d!==m(document)){if(!d||!d.focus){p(f());return}d.focus({preventScroll:!!a.preventScroll}),r.mostRecentlyFocusedNode=d,no(d)&&d.select()}},g=function(d){var h=c("setReturnFocus",{params:[d]});return h||(h===!1?!1:d)},y=function(d){var h=d.target,T=d.event,E=d.isBackward,S=E===void 0?!1:E;h=h||Ae(T),v();var b=null;if(r.tabbableGroups.length>0){var _=u(h,T),C=_>=0?r.containerGroups[_]:void 0;if(_<0)S?b=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:b=r.tabbableGroups[0].firstTabbableNode;else if(S){var R=r.tabbableGroups.findIndex(function(je){var We=je.firstTabbableNode;return h===We});if(R<0&&(C.container===h||ze(h,a.tabbableOptions)&&!ce(h,a.tabbableOptions)&&!C.nextTabbableNode(h,!1))&&(R=_),R>=0){var ee=R===0?r.tabbableGroups.length-1:R-1,ve=r.tabbableGroups[ee];b=ne(h)>=0?ve.lastTabbableNode:ve.lastDomTabbableNode}else ye(T)||(b=C.nextTabbableNode(h,!1))}else{var Y=r.tabbableGroups.findIndex(function(je){var We=je.lastTabbableNode;return h===We});if(Y<0&&(C.container===h||ze(h,a.tabbableOptions)&&!ce(h,a.tabbableOptions)&&!C.nextTabbableNode(h))&&(Y=_),Y>=0){var pe=Y===r.tabbableGroups.length-1?0:Y+1,mt=r.tabbableGroups[pe];b=ne(h)>=0?mt.firstTabbableNode:mt.firstDomTabbableNode}else ye(T)||(b=C.nextTabbableNode(h))}}else b=c("fallbackFocus");return b},w=function(d){var h=Ae(d);if(!(u(h,d)>=0)){if(ge(a.clickOutsideDeactivates,d)){l.deactivate({returnFocus:a.returnFocusOnDeactivate});return}ge(a.allowOutsideClick,d)||d.preventDefault()}},x=function(d){var h=Ae(d),T=u(h,d)>=0;if(T||h instanceof Document)T&&(r.mostRecentlyFocusedNode=h);else{d.stopImmediatePropagation();var E,S=!0;if(r.mostRecentlyFocusedNode)if(ne(r.mostRecentlyFocusedNode)>0){var b=u(r.mostRecentlyFocusedNode),_=r.containerGroups[b].tabbableNodes;if(_.length>0){var C=_.findIndex(function(R){return R===r.mostRecentlyFocusedNode});C>=0&&(a.isKeyForward(r.recentNavEvent)?C+1<_.length&&(E=_[C+1],S=!1):C-1>=0&&(E=_[C-1],S=!1))}}else r.containerGroups.some(function(R){return R.tabbableNodes.some(function(ee){return ne(ee)>0})})||(S=!1);else S=!1;S&&(E=y({target:r.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(r.recentNavEvent)})),p(E||r.mostRecentlyFocusedNode||f())}r.recentNavEvent=void 0},A=function(d){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r.recentNavEvent=d;var T=y({event:d,isBackward:h});T&&(ye(d)&&d.preventDefault(),p(T))},k=function(d){(a.isKeyForward(d)||a.isKeyBackward(d))&&A(d,a.isKeyBackward(d))},P=function(d){io(d)&&ge(a.escapeDeactivates,d)!==!1&&(d.preventDefault(),l.deactivate())},D=function(d){var h=Ae(d);u(h,d)>=0||ge(a.clickOutsideDeactivates,d)||ge(a.allowOutsideClick,d)||(d.preventDefault(),d.stopImmediatePropagation())},L=function(){if(r.active)return Ft.activateTrap(o,l),r.delayInitialFocusTimer=a.delayInitialFocus?Rt(function(){p(f())}):p(f()),i.addEventListener("focusin",x,!0),i.addEventListener("mousedown",w,{capture:!0,passive:!1}),i.addEventListener("touchstart",w,{capture:!0,passive:!1}),i.addEventListener("click",D,{capture:!0,passive:!1}),i.addEventListener("keydown",k,{capture:!0,passive:!1}),i.addEventListener("keydown",P),l},B=function(){if(r.active)return i.removeEventListener("focusin",x,!0),i.removeEventListener("mousedown",w,!0),i.removeEventListener("touchstart",w,!0),i.removeEventListener("click",D,!0),i.removeEventListener("keydown",k,!0),i.removeEventListener("keydown",P),l},j=function(d){var h=d.some(function(T){var E=Array.from(T.removedNodes);return E.some(function(S){return S===r.mostRecentlyFocusedNode})});h&&p(f())},I=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(j):void 0,M=function(){I&&(I.disconnect(),r.active&&!r.paused&&r.containers.map(function(d){I.observe(d,{subtree:!0,childList:!0})}))};return l={get active(){return r.active},get paused(){return r.paused},activate:function(d){if(r.active)return this;var h=s(d,"onActivate"),T=s(d,"onPostActivate"),E=s(d,"checkCanFocusTrap");E||v(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=i.activeElement,h==null||h();var S=function(){E&&v(),L(),M(),T==null||T()};return E?(E(r.containers.concat()).then(S,S),this):(S(),this)},deactivate:function(d){if(!r.active)return this;var h=Ct({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},d);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,B(),r.active=!1,r.paused=!1,M(),Ft.deactivateTrap(o,l);var T=s(h,"onDeactivate"),E=s(h,"onPostDeactivate"),S=s(h,"checkCanReturnFocus"),b=s(h,"returnFocus","returnFocusOnDeactivate");T==null||T();var _=function(){Rt(function(){b&&p(g(r.nodeFocusedBeforeActivation)),E==null||E()})};return b&&S?(S(g(r.nodeFocusedBeforeActivation)).then(_,_),this):(_(),this)},pause:function(d){if(r.paused||!r.active)return this;var h=s(d,"onPause"),T=s(d,"onPostPause");return r.paused=!0,h==null||h(),B(),M(),T==null||T(),this},unpause:function(d){if(!r.paused||!r.active)return this;var h=s(d,"onUnpause"),T=s(d,"onPostUnpause");return r.paused=!1,h==null||h(),v(),L(),M(),T==null||T(),this},updateContainerElements:function(d){var h=[].concat(d).filter(Boolean);return r.containers=h.map(function(T){return typeof T=="string"?i.querySelector(T):T}),r.active&&v(),M(),this}},l.updateContainerElements(e),l};function lo(t={}){let e;const{immediate:n,...i}=t,o=qe(!1),a=qe(!1),r=f=>e==null?void 0:e.activate(f),l=f=>{e==null||e.deactivate(f)},s=()=>{e&&(e.pause(),a.set(!0))},u=()=>{e&&(e.unpause(),a.set(!1))};return{useFocusTrap:f=>(e=so(f,{...i,onActivate(){var v;o.set(!0),(v=t.onActivate)==null||v.call(t)},onDeactivate(){var v;o.set(!1),(v=t.onDeactivate)==null||v.call(t)}}),n&&r(),{destroy(){l(),e=void 0}}),hasFocus:pt(o),isPaused:pt(a),activate:r,deactivate:l,pause:s,unpause:u}}const Ee=[],co=(t,e)=>{let n=ie;function i(){const a=Ee.indexOf(t);a>=0&&Ee.splice(a,1)}function o(a){n();const{open:r,onClose:l,shouldCloseOnInteractOutside:s,closeOnInteractOutside:u}=a;at(100).then(()=>{r?Ee.push(t):i()});function c(){return kn(Ee)===t}function f(){c()&&l&&(l(),i())}function v(p){const g=p.target;et(g)&&g&&c()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation())}function m(p){s!=null&&s(p)&&c()&&(p.preventDefault(),p.stopPropagation(),p.stopImmediatePropagation(),f())}n=ho(t,{onInteractOutsideStart:v,onInteractOutside:u?m:void 0,enabled:r}).destroy}return o(e),{update:o,destroy(){i(),n()}}},uo={floating:{},focusTrap:{},modal:{},escapeKeydown:{},portal:"body"},Jo=(t,e)=>{t.dataset.escapee="";const{anchorElement:n,open:i,options:o}=e;if(!n||!i||!o)return{destroy:ie};const a={...uo,...o},r=[];if(a.portal!==null&&r.push(fo(t,a.portal).destroy),r.push(ki(n,t,a.floating).destroy),a.focusTrap!==null){const{useFocusTrap:s}=lo({immediate:!0,escapeDeactivates:!1,allowOutsideClick:!0,returnFocusOnDeactivate:!1,fallbackFocus:t,...a.focusTrap});r.push(s(t).destroy)}a.modal!==null&&r.push(co(t,{onClose:()=>{W(n)&&(i.set(!1),n.focus())},shouldCloseOnInteractOutside:s=>!(s.defaultPrevented||W(n)&&n.contains(s.target)),...a.modal}).destroy),a.escapeKeydown!==null&&r.push(mn(t,{enabled:i,handler:()=>{i.set(!1)},...a.escapeKeydown}).destroy);const l=Ge(...r);return{destroy(){l()}}},fo=(t,e="body")=>{let n;if(!W(e)&&typeof e!="string")return{destroy:ie};async function i(a){if(e=a,typeof e=="string"){if(n=document.querySelector(e),n===null&&(await Lt(),n=document.querySelector(e)),n===null)throw new Error(`No element found matching css selector: "${e}"`)}else if(e instanceof HTMLElement)n=e;else throw new TypeError(`Unknown portal target type: ${e===null?"null":typeof e}. Allowed types: string (CSS selector) or HTMLElement.`);t.dataset.portal="",n.appendChild(t),t.hidden=!1}function o(){t.remove()}return i(e),{update:i,destroy:o}},ho=(t,e)=>{let n=ie,i=ie,o=!1,a=!1,r=!1;function l(c){n(),i();const{onInteractOutside:f,onInteractOutsideStart:v,enabled:m}=c;if(!m)return;function p(w){f&&Dt(w,t)&&(v==null||v(w));const x=w.target;et(x)&&cn(t,x)&&(a=!0),o=!0}function g(w){f==null||f(w)}const y=mo(t);if(typeof PointerEvent<"u"){const w=x=>{i();const A=k=>{s(k)&&g(k),u()};if(x.pointerType==="touch"){i=te(y,"click",A,{capture:!0,once:!0});return}A(x)};n=Ge(te(y,"pointerdown",p,!0),te(y,"pointerup",w,!0))}else{const w=A=>{r?r=!1:s(A)&&g(A),u()},x=A=>{r=!0,s(A)&&g(A),u()};n=Ge(te(y,"mousedown",p,!0),te(y,"mouseup",w,!0),te(y,"touchstart",p,!0),te(y,"touchend",x,!0))}}function s(c){return!!(o&&!a&&Dt(c,t))}function u(){o=!1,a=!1}return l(e),{update:l,destroy(){n(),i()}}};function Dt(t,e){if("button"in t&&t.button>0)return!1;const n=t.target;if(!et(n))return!1;const i=n.ownerDocument;return!i||!i.documentElement.contains(n)?!1:e&&!cn(e,n)}function cn(t,e){return t===e||t.contains(e)}function mo(t){return(t==null?void 0:t.ownerDocument)??document}const bo={orientation:"horizontal",decorative:!1},Zo=t=>{const e={...bo,...t},n=Tn(e),{orientation:i,decorative:o}=n;return{elements:{root:bn("separator",{stores:[i,o],returned:([r,l])=>({role:l?"none":"separator","aria-orientation":r==="vertical"?r:void 0,"aria-hidden":l,"data-orientation":r})})},options:n}};function vo(t,e){const n=[];return e.builders.forEach(i=>{const o=i.action(t);o&&n.push(o)}),{destroy:()=>{n.forEach(i=>{i.destroy&&i.destroy()})}}}function It(t){const e={};return t.forEach(n=>{Object.keys(n).forEach(i=>{i!=="action"&&(e[i]=n[i])})}),e}function po(t){let e=t[1]?"a":"button",n,i,o=(t[1]?"a":"button")&&He(t);return{c(){o&&o.c(),n=fe()},l(a){o&&o.l(a),n=fe()},m(a,r){o&&o.m(a,r),Te(a,n,r),i=!0},p(a,r){a[1],e?Ie(e,a[1]?"a":"button")?(o.d(1),o=He(a),e=a[1]?"a":"button",o.c(),o.m(n.parentNode,n)):o.p(a,r):(o=He(a),e=a[1]?"a":"button",o.c(),o.m(n.parentNode,n))},i(a){i||(J(o,a),i=!0)},o(a){X(o,a),i=!1},d(a){a&&oe(n),o&&o.d(a)}}}function go(t){let e=t[1]?"a":"button",n,i,o=(t[1]?"a":"button")&&Ue(t);return{c(){o&&o.c(),n=fe()},l(a){o&&o.l(a),n=fe()},m(a,r){o&&o.m(a,r),Te(a,n,r),i=!0},p(a,r){a[1],e?Ie(e,a[1]?"a":"button")?(o.d(1),o=Ue(a),e=a[1]?"a":"button",o.c(),o.m(n.parentNode,n)):o.p(a,r):(o=Ue(a),e=a[1]?"a":"button",o.c(),o.m(n.parentNode,n))},i(a){i||(J(o,a),i=!0)},o(a){X(o,a),i=!1},d(a){a&&oe(n),o&&o.d(a)}}}function He(t){let e,n,i,o,a;const r=t[7].default,l=nt(r,t,t[6],null);let s=[{type:n=t[1]?void 0:t[2]},{href:t[1]},{tabindex:"0"},t[5],t[4]],u={};for(let c=0;c{r[c]=null}),_n(),n=r[e],n?n.p(s,u):(n=r[e]=a[e](s),n.c()),J(n,1),n.m(i.parentNode,i))},i(s){o||(J(n),o=!0)},o(s){X(n),o=!1},d(s){s&&oe(i),r[e].d(s)}}}function wo(t,e,n){const i=["href","type","builders","el"];let o=Se(e,i),{$$slots:a={},$$scope:r}=e,{href:l=void 0}=e,{type:s=void 0}=e,{builders:u=[]}=e,{el:c=void 0}=e;const f={"data-button-root":""};function v(b){N.call(this,t,b)}function m(b){N.call(this,t,b)}function p(b){N.call(this,t,b)}function g(b){N.call(this,t,b)}function y(b){N.call(this,t,b)}function w(b){N.call(this,t,b)}function x(b){N.call(this,t,b)}function A(b){N.call(this,t,b)}function k(b){N.call(this,t,b)}function P(b){N.call(this,t,b)}function D(b){N.call(this,t,b)}function L(b){N.call(this,t,b)}function B(b){N.call(this,t,b)}function j(b){N.call(this,t,b)}function I(b){N.call(this,t,b)}function M(b){N.call(this,t,b)}function O(b){N.call(this,t,b)}function d(b){N.call(this,t,b)}function h(b){N.call(this,t,b)}function T(b){N.call(this,t,b)}function E(b){gt[b?"unshift":"push"](()=>{c=b,n(0,c)})}function S(b){gt[b?"unshift":"push"](()=>{c=b,n(0,c)})}return t.$$set=b=>{e=re(re({},e),Mt(b)),n(5,o=Se(e,i)),"href"in b&&n(1,l=b.href),"type"in b&&n(2,s=b.type),"builders"in b&&n(3,u=b.builders),"el"in b&&n(0,c=b.el),"$$scope"in b&&n(6,r=b.$$scope)},[c,l,s,u,f,o,r,a,v,m,p,g,y,w,x,A,k,P,D,L,B,j,I,M,O,d,h,T,E,S]}let To=class extends Kt{constructor(e){super(),zt(this,e,wo,yo,Ie,{href:1,type:2,builders:3,el:0})}};function $o(t){return(e={})=>xo(t,e)}function xo(t,e){const i={...{side:"bottom",align:"center",sideOffset:0,alignOffset:0,sameWidth:!1,avoidCollisions:!0,collisionPadding:8,fitViewport:!1,strategy:"absolute",overlap:!1},...e};t.update(o=>({...o,placement:_o(i.side,i.align),offset:{...o.offset,mainAxis:i.sideOffset,crossAxis:i.alignOffset},gutter:0,sameWidth:i.sameWidth,flip:i.avoidCollisions,overflowPadding:i.collisionPadding,boundary:i.collisionBoundary,fitViewport:i.fitViewport,strategy:i.strategy,overlap:i.overlap}))}function _o(t,e){return e==="center"?t:`${t}-${e}`}function Ao(t){let e;const n=t[5].default,i=nt(n,t,t[8],null);return{c(){i&&i.c()},l(o){i&&i.l(o)},m(o,a){i&&i.m(o,a),e=!0},p(o,a){i&&i.p&&(!e||a&256)&&it(i,n,o,o[8],e?rt(n,o[8],a,null):ot(o[8]),null)},i(o){e||(J(i,o),e=!0)},o(o){X(i,o),e=!1},d(o){i&&i.d(o)}}}function Eo(t){let e,n;const i=[{builders:t[3]},{class:bt(vt({variant:t[1],size:t[2],className:t[0]}),"hover:bg-base-200 shadow-base-200")},{type:"button"},t[4]];let o={$$slots:{default:[Ao]},$$scope:{ctx:t}};for(let a=0;a{e=re(re({},e),Mt(m)),n(4,o=Se(e,i)),"class"in m&&n(0,l=m.class),"variant"in m&&n(1,s=m.variant),"size"in m&&n(2,u=m.size),"builders"in m&&n(3,c=m.builders),"$$scope"in m&&n(8,r=m.$$scope)},[l,s,u,c,o,a,f,v,r]}class er extends Kt{constructor(e){super(),zt(this,e,So,Eo,Ie,{class:0,variant:1,size:2,builders:3})}}export{er as B,Mo as a,Do as b,qo as c,Ho as d,Vo as e,Io as f,Yo as g,Ro as h,zo as i,jo as j,Xo as k,kn as l,fo as m,Lo as n,Wo as o,Fo as p,Zo as q,Ko as r,$o as s,Bo as t,Jo as u,_t as v,jn as w,at as x,Uo as y,Go as z}; diff --git a/_app/immutable/chunks/duckdb-browser-eh.worker.xVZH6Sl3.js b/_app/immutable/chunks/duckdb-browser-eh.worker.xVZH6Sl3.js new file mode 100644 index 0000000000000000000000000000000000000000..43e0a2563d2f6f59ad7299328cc31a78d80ce290 --- /dev/null +++ b/_app/immutable/chunks/duckdb-browser-eh.worker.xVZH6Sl3.js @@ -0,0 +1 @@ +function r(e){return new Worker("/_app/immutable/workers/duckdb-browser-eh.worker-fevVEjXW.js",{name:e==null?void 0:e.name})}export{r as default}; diff --git a/_app/immutable/chunks/duckdb-browser-mvp.worker.BgKlvv5e.js b/_app/immutable/chunks/duckdb-browser-mvp.worker.BgKlvv5e.js new file mode 100644 index 0000000000000000000000000000000000000000..680273185a20ba929a292e64a96a37d89aaa1389 --- /dev/null +++ b/_app/immutable/chunks/duckdb-browser-mvp.worker.BgKlvv5e.js @@ -0,0 +1 @@ +function e(r){return new Worker("/_app/immutable/workers/duckdb-browser-mvp.worker-C3M52Bw4.js",{name:r==null?void 0:r.name})}export{e as default}; diff --git a/_app/immutable/chunks/duckdb-eh.CjaN1hVf.js b/_app/immutable/chunks/duckdb-eh.CjaN1hVf.js new file mode 100644 index 0000000000000000000000000000000000000000..22030e8ad713841660956dcf959f203ffe1d87b3 --- /dev/null +++ b/_app/immutable/chunks/duckdb-eh.CjaN1hVf.js @@ -0,0 +1 @@ +const a="/_app/immutable/assets/duckdb-eh.DrTJ_0hP.wasm";export{a as default}; diff --git a/_app/immutable/chunks/duckdb-mvp.Bsk8BUlZ.js b/_app/immutable/chunks/duckdb-mvp.Bsk8BUlZ.js new file mode 100644 index 0000000000000000000000000000000000000000..bdd903c8bd266eae76461b6effefa9a77faea4a4 --- /dev/null +++ b/_app/immutable/chunks/duckdb-mvp.Bsk8BUlZ.js @@ -0,0 +1 @@ +const a="/_app/immutable/assets/duckdb-mvp.DuKjbjvP.wasm";export{a as default}; diff --git a/_app/immutable/chunks/entry.CmEkywbK.js b/_app/immutable/chunks/entry.CmEkywbK.js new file mode 100644 index 0000000000000000000000000000000000000000..3d2e8338c61a9ae45b91644fd9db088391945ddc --- /dev/null +++ b/_app/immutable/chunks/entry.CmEkywbK.js @@ -0,0 +1,3 @@ +import{u as G,M as _e,L as we,s as ve,K as be,V as wt,r as Ae}from"./scheduler.B2FSa8mv.js";new URL("sveltekit-internal://");function ke(t,n){return t==="/"||n==="ignore"?t:n==="never"?t.endsWith("/")?t.slice(0,-1):t:n==="always"&&!t.endsWith("/")?t+"/":t}function Ee(t){return t.split("%25").map(decodeURI).join("%25")}function Se(t){for(const n in t)t[n]=decodeURIComponent(t[n]);return t}function gt({href:t}){return t.split("#")[0]}const Re=["href","pathname","search","toString","toJSON"];function Ie(t,n,e){const r=new URL(t);Object.defineProperty(r,"searchParams",{value:new Proxy(r.searchParams,{get(a,o){if(o==="get"||o==="getAll"||o==="has")return s=>(e(s),a[o](s));n();const i=Reflect.get(a,o);return typeof i=="function"?i.bind(a):i}}),enumerable:!0,configurable:!0});for(const a of Re)Object.defineProperty(r,a,{get(){return n(),t[a]},enumerable:!0,configurable:!0});return r}const Le="/__data.json",Ue=".html__data.json";function xe(t){return t.endsWith(".html")?t.replace(/\.html$/,Ue):t.replace(/\/$/,"")+Le}function Te(...t){let n=5381;for(const e of t)if(typeof e=="string"){let r=e.length;for(;r;)n=n*33^e.charCodeAt(--r)}else if(ArrayBuffer.isView(e)){const r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);let a=r.length;for(;a;)n=n*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(n>>>0).toString(36)}function Pe(t){const n=atob(t),e=new Uint8Array(n.length);for(let r=0;r((t instanceof Request?t.method:(n==null?void 0:n.method)||"GET")!=="GET"&&K.delete(Et(t)),Ht(t,n));const K=new Map;function Ne(t,n){const e=Et(t,n),r=document.querySelector(e);if(r!=null&&r.textContent){let{body:a,...o}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&K.set(e,{body:a,init:o,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Pe(a)),Promise.resolve(new Response(a,o))}return window.fetch(t,n)}function Ce(t,n,e){if(K.size>0){const r=Et(t,e),a=K.get(r);if(a){if(performance.now(){const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return n.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(o)return n.push({name:o[1],matcher:o[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return mt(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return mt(String.fromCharCode(...c.slice(2).split("-").map(f=>parseInt(f,16))));const d=Oe.exec(c),[,h,g,u,p]=d;return n.push({name:u,matcher:p,optional:!!h,rest:!!g,chained:g?l===1&&i[0]==="":!1}),g?"(.*?)":h?"([^/]*)?":"([^/]+?)"}return mt(c)}).join("")}).join("")}/?$`),params:n}}function $e(t){return!/^\([^)]+\)$/.test(t)}function De(t){return t.slice(1).split("/").filter($e)}function Ve(t,n,e){const r={},a=t.slice(1),o=a.filter(s=>s!==void 0);let i=0;for(let s=0;sd).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||e[c.matcher](l)){r[c.name]=l;const d=n[s+1],h=a[s+1];d&&!d.rest&&d.optional&&h&&c.chained&&(i=0),!d&&!h&&Object.keys(r).length===o.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function mt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Fe({nodes:t,server_loads:n,dictionary:e,matchers:r}){const a=new Set(n);return Object.entries(e).map(([s,[c,l,d]])=>{const{pattern:h,params:g}=je(s),u={id:s,exec:p=>{const f=h.exec(p);if(f)return Ve(f,g,r)},errors:[1,...d||[]].map(p=>t[p]),layouts:[0,...l||[]].map(i),leaf:o(c)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function o(s){const c=s<0;return c&&(s=~s),[c,t[s]]}function i(s){return s===void 0?s:[a.has(s),t[s]]}}function Wt(t,n=JSON.parse){try{return n(sessionStorage[t])}catch{}}function Ot(t,n,e=JSON.stringify){const r=e(n);try{sessionStorage[t]=r}catch{}}const j=[];function Be(t,n){return{subscribe:st(t,n).subscribe}}function st(t,n=G){let e;const r=new Set;function a(s){if(ve(t,s)&&(t=s,e)){const c=!j.length;for(const l of r)l[1](),j.push(l,t);if(c){for(let l=0;l{r.delete(l),r.size===0&&e&&(e(),e=null)}}return{set:a,update:o,subscribe:i}}function mn(t,n,e){const r=!Array.isArray(t),a=r?[t]:t;if(!a.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const o=n.length<2;return Be(e,(i,s)=>{let c=!1;const l=[];let d=0,h=G;const g=()=>{if(d)return;h();const p=n(r?l[0]:l,i,s);o?i(p):h=be(p)?p:G},u=a.map((p,f)=>_e(p,m=>{l[f]=m,d&=~(1<{d|=1<i)}function a(i){e=!1,n.set(i)}function o(i){let s;return n.subscribe(c=>{(s===void 0||e&&c!==s)&&i(s=c)})}return{notify:r,set:a,subscribe:o}}function Ke(){const{set:t,subscribe:n}=st(!1);let e;async function r(){clearTimeout(e);try{const a=await fetch(`${qe}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==Me;return i&&(t(!0),clearTimeout(e)),i}catch{return!1}}return{subscribe:n,check:r}}function it(t,n){return t.origin!==X||!t.pathname.startsWith(n)}function Dt(t){const n=We(t),e=new ArrayBuffer(n.length),r=new DataView(e);for(let a=0;a>16),n+=String.fromCharCode((e&65280)>>8),n+=String.fromCharCode(e&255),e=r=0);return r===12?(e>>=4,n+=String.fromCharCode(e)):r===18&&(e>>=2,n+=String.fromCharCode((e&65280)>>8),n+=String.fromCharCode(e&255)),n}const Ye=-1,ze=-2,Je=-3,Xe=-4,Ze=-5,Qe=-6;function _n(t,n){return Qt(JSON.parse(t),n)}function Qt(t,n){if(typeof t=="number")return a(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const e=t,r=Array(e.length);function a(o,i=!1){if(o===Ye)return;if(o===Je)return NaN;if(o===Xe)return 1/0;if(o===Ze)return-1/0;if(o===Qe)return-0;if(i)throw new Error("Invalid input");if(o in r)return r[o];const s=e[o];if(!s||typeof s!="object")r[o]=s;else if(Array.isArray(s))if(typeof s[0]=="string"){const c=s[0],l=n==null?void 0:n[c];if(l)return r[o]=l(a(s[1]));switch(c){case"Date":r[o]=new Date(s[1]);break;case"Set":const d=new Set;r[o]=d;for(let u=1;un!=null)}class ct{constructor(n,e){this.status=n,typeof e=="string"?this.body={message:e}:e?this.body=e:this.body={message:`Error: ${n}`}}toString(){return JSON.stringify(this.body)}}class ee{constructor(n,e){this.status=n,this.location=e}}class It extends Error{constructor(n,e,r){super(r),this.status=n,this.text=e}}const nn="x-sveltekit-invalidated",rn="x-sveltekit-trailing-slash";function nt(t){return t instanceof ct||t instanceof It?t.status:500}function an(t){return t instanceof It?t.text:"Internal Error"}const O=Wt(zt)??{},Y=Wt(Yt)??{},T={url:$t({}),page:$t({}),navigating:st(null),updated:Ke()};function Lt(t){O[t]=Rt()}function on(t,n){let e=t+1;for(;O[e];)delete O[e],e+=1;for(e=n+1;Y[e];)delete Y[e],e+=1}function F(t){return location.href=t.href,new Promise(()=>{})}async function ne(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function Vt(){}let lt,bt,rt,x,At,q;const re=[],at=[];let I=null;const ae=[],sn=[];let N=[],_={branch:[],error:null,url:null},Ut=!1,ot=!1,Ft=!0,z=!1,M=!1,oe=!1,ft=!1,C,E,L,S,B;const H=new Set;let yt;async function wn(t,n,e){var a,o;document.URL!==location.href&&(location.href=location.href),q=t,lt=Fe(t),x=document.documentElement,At=n,bt=t.nodes[0],rt=t.nodes[1],bt(),rt(),E=(a=history.state)==null?void 0:a[D],L=(o=history.state)==null?void 0:o[W],E||(E=L=Date.now(),history.replaceState({...history.state,[D]:E,[W]:L},""));const r=O[E];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),e?await pn(At,e):dn(location.href,{replaceState:!0}),hn()}async function cn(){if(await(yt||(yt=Promise.resolve())),!yt)return;yt=null;const t=Z(_.url,!0);I=null;const n=B={},e=t&&await Pt(t);if(!(!e||n!==B)){if(e.type==="redirect")return ut(new URL(e.location,_.url).href,{},1,n);e.props.page&&(S=e.props.page),_=e.state,se(),C.$set(e.props)}}function se(){re.length=0,ft=!1}function ie(t){at.some(n=>n==null?void 0:n.snapshot)&&(Y[t]=at.map(n=>{var e;return(e=n==null?void 0:n.snapshot)==null?void 0:e.capture()}))}function ce(t){var n;(n=Y[t])==null||n.forEach((e,r)=>{var a,o;(o=(a=at[r])==null?void 0:a.snapshot)==null||o.restore(e)})}function Bt(){Lt(E),Ot(zt,O),ie(L),Ot(Yt,Y)}async function ut(t,n,e,r){return Q({type:"goto",url:St(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:e,nav_token:r,accept:()=>{n.invalidateAll&&(ft=!0)}})}async function le(t){if(t.id!==(I==null?void 0:I.id)){const n={};H.add(n),I={id:t.id,token:n,promise:Pt({...t,preload:n}).then(e=>(H.delete(n),e.type==="loaded"&&e.state.error&&(I=null),e))}}return I.promise}async function _t(t){const n=lt.find(e=>e.exec(de(t)));n&&await Promise.all([...n.layouts,n.leaf].map(e=>e==null?void 0:e[1]()))}function fe(t,n,e){var o;_=t.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),S=t.props.page,C=new q.root({target:n,props:{...t.props,stores:T,components:at},hydrate:e,sync:!1}),ce(L);const a={from:null,to:{params:_.params,route:{id:((o=_.route)==null?void 0:o.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};N.forEach(i=>i(a)),ot=!0}function J({url:t,params:n,branch:e,status:r,error:a,route:o,form:i}){let s="never";if(U&&(t.pathname===U||t.pathname===U+"/"))s="always";else for(const u of e)(u==null?void 0:u.slash)!==void 0&&(s=u.slash);t.pathname=ke(t.pathname,s),t.search=t.search;const c={type:"loaded",state:{url:t,params:n,branch:e,error:a,route:o},props:{constructors:en(e).map(u=>u.node.component),page:S}};i!==void 0&&(c.props.form=i);let l={},d=!S,h=0;for(let u=0;u(s&&(c.route=!0),f[m])}),params:new Proxy(r,{get:(f,m)=>(s&&c.params.add(m),f[m])}),data:(o==null?void 0:o.data)??null,url:Ie(e,()=>{s&&(c.url=!0)},f=>{s&&c.search_params.add(f)}),async fetch(f,m){let b;f instanceof Request?(b=f.url,m={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length?f.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...m}):b=f;const R=new URL(b,e);return s&&u(R.href),R.origin===e.origin&&(b=R.href.slice(e.origin.length)),ot?Ce(b,R.href,m):Ne(b,m)},setHeaders:()=>{},depends:u,parent(){return s&&(c.parent=!0),n()},untrack(f){s=!1;try{return f()}finally{s=!0}}};i=await l.universal.load.call(null,p)??null}return{node:l,loader:t,server:o,universal:(h=l.universal)!=null&&h.load?{type:"data",data:i,uses:c}:null,data:i??(o==null?void 0:o.data)??null,slash:((g=l.universal)==null?void 0:g.trailingSlash)??(o==null?void 0:o.slash)}}function qt(t,n,e,r,a,o){if(ft)return!0;if(!a)return!1;if(a.parent&&t||a.route&&n||a.url&&e)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(o[i]!==_.params[i])return!0;for(const i of a.dependencies)if(re.some(s=>s(new URL(i))))return!0;return!1}function Tt(t,n){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?n??null:null}function ln(t,n){if(!t)return new Set(n.searchParams.keys());const e=new Set([...t.searchParams.keys(),...n.searchParams.keys()]);for(const r of e){const a=t.searchParams.getAll(r),o=n.searchParams.getAll(r);a.every(i=>o.includes(i))&&o.every(i=>a.includes(i))&&e.delete(r)}return e}function Mt({error:t,url:n,route:e,params:r}){return{type:"loaded",state:{error:t,url:n,route:e,params:r,branch:[]},props:{page:S,constructors:[]}}}async function Pt({id:t,invalidating:n,url:e,params:r,route:a,preload:o}){if((I==null?void 0:I.id)===t)return H.delete(I.token),I.promise;const{errors:i,layouts:s,leaf:c}=a,l=[...s,c];i.forEach(y=>y==null?void 0:y().catch(()=>{})),l.forEach(y=>y==null?void 0:y[1]().catch(()=>{}));let d=null;const h=_.url?t!==_.url.pathname+_.url.search:!1,g=_.route?a.id!==_.route.id:!1,u=ln(_.url,e);let p=!1;const f=l.map((y,v)=>{var P;const A=_.branch[v],k=!!(y!=null&&y[0])&&((A==null?void 0:A.loader)!==y[1]||qt(p,g,h,u,(P=A.server)==null?void 0:P.uses,r));return k&&(p=!0),k});if(f.some(Boolean)){try{d=await ge(e,f)}catch(y){const v=await V(y,{url:e,params:r,route:{id:t}});return H.has(o)?Mt({error:v,url:e,params:r,route:a}):dt({status:nt(y),error:v,url:e,route:a})}if(d.type==="redirect")return d}const m=d==null?void 0:d.nodes;let b=!1;const R=l.map(async(y,v)=>{var ht;if(!y)return;const A=_.branch[v],k=m==null?void 0:m[v];if((!k||k.type==="skip")&&y[1]===(A==null?void 0:A.loader)&&!qt(b,g,h,u,(ht=A.universal)==null?void 0:ht.uses,r))return A;if(b=!0,(k==null?void 0:k.type)==="error")throw k;return xt({loader:y[1],url:e,params:r,route:a,parent:async()=>{var Ct;const Nt={};for(let pt=0;pt{});const w=[];for(let y=0;yPromise.resolve({}),server_data_node:Tt(o)}),c={node:await rt(),loader:rt,universal:null,server:null,data:null};return J({url:e,params:a,branch:[s,c],status:t,error:n,route:null})}function Z(t,n){if(!t||it(t,U))return;let e;try{e=q.hooks.reroute({url:new URL(t)})??t.pathname}catch{return}const r=de(e);for(const a of lt){const o=a.exec(r);if(o)return{id:t.pathname+t.search,invalidating:n,route:a,params:Se(o),url:t}}}function de(t){return Ee(t.slice(U.length)||"/")}function he({url:t,type:n,intent:e,delta:r}){let a=!1;const o=ye(_,e,t,n);r!==void 0&&(o.navigation.delta=r);const i={...o.navigation,cancel:()=>{a=!0,o.reject(new Error("navigation cancelled"))}};return z||ae.forEach(s=>s(i)),a?null:o}async function Q({type:t,url:n,popped:e,keepfocus:r,noscroll:a,replace_state:o,state:i={},redirect_count:s=0,nav_token:c={},accept:l=Vt,block:d=Vt}){const h=Z(n,!1),g=he({url:n,type:t,delta:e==null?void 0:e.delta,intent:h});if(!g){d();return}const u=E,p=L;l(),z=!0,ot&&T.navigating.set(g.navigation),B=c;let f=h&&await Pt(h);if(!f){if(it(n,U))return await F(n);f=await pe(n,{id:null},await V(new It(404,"Not Found",`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404)}if(n=(h==null?void 0:h.url)||n,B!==c)return g.reject(new Error("navigation aborted")),!1;if(f.type==="redirect")if(s>=20)f=await dt({status:500,error:await V(new Error("Redirect loop"),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}});else return ut(new URL(f.location,n).href,{},s+1,c),!1;else f.props.page.status>=400&&await T.updated.check()&&(await ne(),await F(n));if(se(),Lt(u),ie(p),f.props.page.url.pathname!==n.pathname&&(n.pathname=f.props.page.url.pathname),i=e?e.state:i,!e){const w=o?0:1,y={[D]:E+=w,[W]:L+=w,[Jt]:i};(o?history.replaceState:history.pushState).call(history,y,"",n),o||on(E,L)}if(I=null,f.props.page.state=i,ot){_=f.state,f.props.page&&(f.props.page.url=n);const w=(await Promise.all(sn.map(y=>y(g.navigation)))).filter(y=>typeof y=="function");if(w.length>0){let y=function(){N=N.filter(v=>!w.includes(v))};w.push(y),N.push(...w)}C.$set(f.props),oe=!0}else fe(f,At,!1);const{activeElement:m}=document;await wt();const b=e?e.scroll:a?Rt():null;if(Ft){const w=n.hash&&document.getElementById(decodeURIComponent(n.hash.slice(1)));b?scrollTo(b.x,b.y):w?w.scrollIntoView():scrollTo(0,0)}const R=document.activeElement!==m&&document.activeElement!==document.body;!r&&!R&&kt(),Ft=!0,f.props.page&&(S=f.props.page),z=!1,t==="popstate"&&ce(L),g.fulfil(void 0),N.forEach(w=>w(g.navigation)),T.navigating.set(null)}async function pe(t,n,e,r){return t.origin===X&&t.pathname===location.pathname&&!Ut?await dt({status:r,error:e,url:t,route:n}):await F(t)}function fn(){let t;x.addEventListener("mousemove",o=>{const i=o.target;clearTimeout(t),t=setTimeout(()=>{r(i,2)},20)});function n(o){o.defaultPrevented||r(o.composedPath()[0],1)}x.addEventListener("mousedown",n),x.addEventListener("touchstart",n,{passive:!0});const e=new IntersectionObserver(o=>{for(const i of o)i.isIntersecting&&(_t(i.target.href),e.unobserve(i.target))},{threshold:0});function r(o,i){const s=Zt(o,x);if(!s)return;const{url:c,external:l,download:d}=vt(s,U);if(l||d)return;const h=et(s),g=c&&_.url.pathname+_.url.search===c.pathname+c.search;if(!h.reload&&!g)if(i<=h.preload_data){const u=Z(c,!1);u&&le(u)}else i<=h.preload_code&&_t(c.pathname)}function a(){e.disconnect();for(const o of x.querySelectorAll("a")){const{url:i,external:s,download:c}=vt(o,U);if(s||c)continue;const l=et(o);l.reload||(l.preload_code===tt.viewport&&e.observe(o),l.preload_code===tt.eager&&_t(i.pathname))}}N.push(a),a()}function V(t,n){if(t instanceof ct)return t.body;const e=nt(t),r=an(t);return q.hooks.handleError({error:t,event:n,status:e,message:r})??{message:r}}function un(t,n){Ae(()=>(t.push(n),()=>{const e=t.indexOf(n);t.splice(e,1)}))}function vn(t){un(N,t)}function dn(t,n={}){return t=St(t),t.origin!==X?Promise.reject(new Error("goto: invalid URL")):ut(t,n,0)}function bn(){return ft=!0,cn()}async function An(t){const n=St(t),e=Z(n,!1);if(!e)throw new Error(`Attempted to preload a URL that does not belong to this app: ${n}`);const r=await le(e);if(r.type==="redirect")return{type:r.type,location:r.location};const{status:a,data:o}=r.props.page??S;return{type:r.type,status:a,data:o}}async function kn(t){if(t.type==="error"){const n=new URL(location.href),{branch:e,route:r}=_;if(!r)return;const a=await ue(_.branch.length,e,r.errors);if(a){const o=J({url:n,params:_.params,branch:e.slice(0,a.idx).concat(a.node),status:t.status??500,error:t.error,route:r});_=o.state,C.$set(o.props),wt().then(kt)}}else t.type==="redirect"?ut(t.location,{invalidateAll:!0},0):(C.$set({form:null,page:{...S,form:t.data,status:t.status}}),await wt(),C.$set({form:t.data}),t.type==="success"&&kt())}function hn(){var n;history.scrollRestoration="manual",addEventListener("beforeunload",e=>{let r=!1;if(Bt(),!z){const a=ye(_,void 0,null,"leave"),o={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};ae.forEach(i=>i(o))}r?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Bt()}),(n=navigator.connection)!=null&&n.saveData||fn(),x.addEventListener("click",async e=>{if(e.button||e.which!==1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.defaultPrevented)return;const r=Zt(e.composedPath()[0],x);if(!r)return;const{url:a,external:o,target:i,download:s}=vt(r,U);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=et(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||s)return;const[d,h]=a.href.split("#"),g=d===gt(location);if(o||c.reload&&(!g||!h)){he({url:a,type:"link"})?z=!0:e.preventDefault();return}if(h!==void 0&&g){const[,u]=_.url.href.split("#");if(u===h){if(e.preventDefault(),h===""||h==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const p=r.ownerDocument.getElementById(decodeURIComponent(h));p&&(p.scrollIntoView(),p.focus())}return}if(M=!0,Lt(E),t(a),!c.replace_state)return;M=!1}e.preventDefault(),await new Promise(u=>{requestAnimationFrame(()=>{setTimeout(u,0)}),setTimeout(u,100)}),Q({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),x.addEventListener("submit",e=>{if(e.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(e.target),a=e.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const s=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(it(s,U))return;const c=e.target,l=et(c);if(l.reload)return;e.preventDefault(),e.stopPropagation();const d=new FormData(c),h=a==null?void 0:a.getAttribute("name");h&&d.append(h,(a==null?void 0:a.getAttribute("value"))??""),s.search=new URLSearchParams(d).toString(),Q({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href})}),addEventListener("popstate",async e=>{var r;if((r=e.state)!=null&&r[D]){const a=e.state[D];if(B={},a===E)return;const o=O[a],i=e.state[Jt]??{},s=new URL(e.state[Ge]??location.href),c=e.state[W],l=gt(location)===gt(_.url);if(c===L&&(oe||l)){t(s),O[E]=Rt(),o&&scrollTo(o.x,o.y),i!==S.state&&(S={...S,state:i},C.$set({page:S})),E=a;return}const h=a-E;await Q({type:"popstate",url:s,popped:{state:i,scroll:o,delta:h},accept:()=>{E=a,L=c},block:()=>{history.go(-h)},nav_token:B})}else if(!M){const a=new URL(location.href);t(a)}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[D]:++E,[W]:L},"",location.href))});for(const e of document.querySelectorAll("link"))e.rel==="icon"&&(e.href=e.href);addEventListener("pageshow",e=>{e.persisted&&T.navigating.set(null)});function t(e){_.url=e,T.page.set({...S,url:e}),T.page.notify()}}async function pn(t,{status:n=200,error:e,node_ids:r,params:a,route:o,data:i,form:s}){Ut=!0;const c=new URL(location.href);({params:a={},route:o={id:null}}=Z(c,!1)||{});let l;try{const d=r.map(async(u,p)=>{const f=i[p];return f!=null&&f.uses&&(f.uses=me(f.uses)),xt({loader:q.nodes[u],url:c,params:a,route:o,parent:async()=>{const m={};for(let b=0;bu===o.id);if(g){const u=g.layouts;for(let p=0;po?"1":"0").join(""));const r=await Ht(e.href);if(!r.ok){let o;throw(a=r.headers.get("content-type"))!=null&&a.includes("application/json")?o=await r.json():r.status===404?o="Not Found":r.status===500&&(o="Internal Error"),new ct(r.status,o)}return new Promise(async o=>{var h;const i=new Map,s=r.body.getReader(),c=new TextDecoder;function l(g){return Qt(g,{Promise:u=>new Promise((p,f)=>{i.set(u,{fulfil:p,reject:f})})})}let d="";for(;;){const{done:g,value:u}=await s.read();if(g&&!d)break;for(d+=!u&&d?` +`:c.decode(u,{stream:!0});;){const p=d.indexOf(` +`);if(p===-1)break;const f=JSON.parse(d.slice(0,p));if(d=d.slice(p+1),f.type==="redirect")return o(f);if(f.type==="data")(h=f.nodes)==null||h.forEach(m=>{(m==null?void 0:m.type)==="data"&&(m.uses=me(m.uses),m.data=l(m.data))}),o(f);else if(f.type==="chunk"){const{id:m,data:b,error:R}=f,w=i.get(m);i.delete(m),R?w.reject(l(R)):w.fulfil(l(b))}}}})}function me(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}function kt(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const n=document.body,e=n.getAttribute("tabindex");n.tabIndex=-1,n.focus({preventScroll:!0,focusVisible:!1}),e!==null?n.setAttribute("tabindex",e):n.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let o=0;o{if(r.rangeCount===a.length){for(let o=0;o{a=d,o=h});return i.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url},to:e&&{params:(n==null?void 0:n.params)??null,route:{id:((l=n==null?void 0:n.route)==null?void 0:l.id)??null},url:e},willUnload:!n,type:r,complete:i},fulfil:a,reject:o}}export{kn as a,Be as b,vn as c,mn as d,An as e,wn as f,dn as g,bn as i,_n as p,yn as r,T as s,st as w}; diff --git a/_app/immutable/chunks/index.CzNnnxDZ.js b/_app/immutable/chunks/index.CzNnnxDZ.js new file mode 100644 index 0000000000000000000000000000000000000000..52dd2caa9c472ac1a56118d33684a99bc627f64c --- /dev/null +++ b/_app/immutable/chunks/index.CzNnnxDZ.js @@ -0,0 +1,4 @@ +var q=Object.defineProperty;var G=(t,e,n)=>e in t?q(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>G(t,typeof e!="symbol"?e+"":e,n);import{u as w,W as H,f as W,X as J,L as E,K as j,I as O,Y as Q,Z as L,_ as U,g as T,y as tt,$ as et,a0 as nt,a1 as it,x as V,a2 as st,a3 as rt,a4 as at,a5 as ft,a6 as ot}from"./scheduler.B2FSa8mv.js";const X=typeof window<"u";let N=X?()=>window.performance.now():()=>Date.now(),B=X?t=>requestAnimationFrame(t):w;const k=new Set;function Y(t){k.forEach(e=>{e.c(t)||(k.delete(e),e.f())}),k.size!==0&&B(Y)}function D(t){let e;return k.size===0&&B(Y),{promise:new Promise(n=>{k.add(e={c:t,f:n})}),abort(){k.delete(e)}}}const M=new Map;let P=0;function ut(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function lt(t,e){const n={stylesheet:J(e),rules:{}};return M.set(t,n),n}function R(t,e,n,s,u,a,l,i=0){const c=16.666/s;let r=`{ +`;for(let $=0;$<=1;$+=c){const m=e+(n-e)*a($);r+=$*100+`%{${l(m,1-m)}} +`}const d=r+`100% {${l(n,1-n)}} +}`,o=`__svelte_${ut(d)}_${i}`,g=H(t),{stylesheet:h,rules:f}=M.get(g)||lt(g,t);f[o]||(f[o]=!0,h.insertRule(`@keyframes ${o} ${d}`,h.cssRules.length));const _=t.style.animation||"";return t.style.animation=`${_?`${_}, `:""}${o} ${s}ms linear ${u}ms 1 both`,P+=1,o}function z(t,e){const n=(t.style.animation||"").split(", "),s=n.filter(e?a=>a.indexOf(e)<0:a=>a.indexOf("__svelte")===-1),u=n.length-s.length;u&&(t.style.animation=s.join(", "),P-=u,P||ct())}function ct(){B(()=>{P||(M.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&W(e)}),M.clear())})}let S;function F(){return S||(S=Promise.resolve(),S.then(()=>{S=null})),S}function v(t,e,n){t.dispatchEvent(Q(`${e?"intro":"outro"}${n}`))}const I=new Set;let p;function yt(){p={r:0,c:[],p}}function xt(){p.r||E(p.c),p=p.p}function dt(t,e){t&&t.i&&(I.delete(t),t.i(e))}function vt(t,e,n,s){if(t&&t.o){if(I.has(t))return;I.add(t),p.c.push(()=>{I.delete(t),s&&(n&&t.d(1),s())}),t.o(e)}else s&&s()}const K={duration:0};function wt(t,e,n){const s={direction:"in"};let u=e(t,n,s),a=!1,l,i,c=0;function r(){l&&z(t,l)}function d(){const{delay:g=0,duration:h=300,easing:f=L,tick:_=w,css:$}=u||K;$&&(l=R(t,0,1,h,g,f,$,c++)),_(0,1);const m=N()+g,y=m+h;i&&i.abort(),a=!0,O(()=>v(t,!0,"start")),i=D(x=>{if(a){if(x>=y)return _(1,0),v(t,!0,"end"),r(),a=!1;if(x>=m){const b=f((x-m)/h);_(b,1-b)}}return a})}let o=!1;return{start(){o||(o=!0,z(t),j(u)?(u=u(s),F().then(d)):d())},invalidate(){o=!1},end(){a&&(r(),a=!1)}}}function bt(t,e,n){const s={direction:"out"};let u=e(t,n,s),a=!0,l;const i=p;i.r+=1;let c;function r(){const{delay:d=0,duration:o=300,easing:g=L,tick:h=w,css:f}=u||K;f&&(l=R(t,1,0,o,d,g,f));const _=N()+d,$=_+o;O(()=>v(t,!1,"start")),"inert"in t&&(c=t.inert,t.inert=!0),D(m=>{if(a){if(m>=$)return h(0,1),v(t,!1,"end"),--i.r||E(i.c),!1;if(m>=_){const y=g((m-_)/o);h(1-y,y)}}return a})}return j(u)?F().then(()=>{u=u(s),r()}):r(),{end(d){d&&"inert"in t&&(t.inert=c),d&&u.tick&&u.tick(1,0),a&&(l&&z(t,l),a=!1)}}}function kt(t,e,n,s){let a=e(t,n,{direction:"both"}),l=s?0:1,i=null,c=null,r=null,d;function o(){r&&z(t,r)}function g(f,_){const $=f.b-l;return _*=Math.abs($),{a:l,b:f.b,d:$,duration:_,start:f.start,end:f.start+_,group:f.group}}function h(f){const{delay:_=0,duration:$=300,easing:m=L,tick:y=w,css:x}=a||K,b={start:N()+_,b:f};f||(b.group=p,p.r+=1),"inert"in t&&(f?d!==void 0&&(t.inert=d):(d=t.inert,t.inert=!0)),i||c?c=b:(x&&(o(),r=R(t,l,f,$,_,m,x)),f&&y(0,1),i=g(b,$),O(()=>v(t,f,"start")),D(C=>{if(c&&C>c.start&&(i=g(c,$),c=null,v(t,i.b,"start"),x&&(o(),r=R(t,l,i.b,i.duration,0,m,a.css))),i){if(C>=i.end)y(l=i.b,1-l),v(t,i.b,"end"),c||(i.b?o():--i.group.r||E(i.group.c)),i=null;else if(C>=i.start){const Z=C-i.start;l=i.a+i.d*m(Z/i.duration),y(l,1-l)}}return!!(i||c)}))}return{run(f){j(a)?F().then(()=>{a=a({direction:f?"in":"out"}),h(f)}):h(f)},end(){o(),i=c=null}}}function Et(t,e,n){const s=t.$$.props[e];s!==void 0&&(t.$$.bound[s]=n,n(t.$$.ctx[s]))}function St(t){t&&t.c()}function Ot(t,e){t&&t.l(e)}function _t(t,e,n){const{fragment:s,after_update:u}=t.$$;s&&s.m(e,n),O(()=>{const a=t.$$.on_mount.map(st).filter(j);t.$$.on_destroy?t.$$.on_destroy.push(...a):E(a),t.$$.on_mount=[]}),u.forEach(O)}function $t(t,e){const n=t.$$;n.fragment!==null&&(nt(n.after_update),E(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ht(t,e){t.$$.dirty[0]===-1&&(rt.push(t),at(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const f=h.length?h[0]:g;return r.ctx&&u(r.ctx[o],r.ctx[o]=f)&&(!r.skip_bound&&r.bound[o]&&r.bound[o](f),d&&ht(t,o)),g}):[],r.update(),d=!0,E(r.before_update),r.fragment=s?s(r.ctx):!1,e.target){if(e.hydrate){ft();const o=T(e.target);r.fragment&&r.fragment.l(o),o.forEach(W)}else r.fragment&&r.fragment.c();e.intro&&dt(t.$$.fragment),_t(t,e.target,e.anchor),ot(),tt()}V(c)}class Ct{constructor(){A(this,"$$");A(this,"$$set")}$destroy(){$t(this,1),this.$destroy=w}$on(e,n){if(!j(n))return w;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(n),()=>{const u=s.indexOf(n);u!==-1&&s.splice(u,1)}}$set(e){this.$$set&&!et(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const gt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(gt);export{Ct as S,Ot as a,vt as b,St as c,xt as d,$t as e,kt as f,yt as g,bt as h,jt as i,wt as j,Et as k,_t as m,dt as t}; diff --git a/_app/immutable/chunks/leaflet-src.CnxXdW4o.js b/_app/immutable/chunks/leaflet-src.CnxXdW4o.js new file mode 100644 index 0000000000000000000000000000000000000000..27af701b089aa7e8091f0b4d9c30778846f60c3b --- /dev/null +++ b/_app/immutable/chunks/leaflet-src.CnxXdW4o.js @@ -0,0 +1,4 @@ +import{n as Vo,q as qo}from"./VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";function jo(Gt,Vt){for(var l=0;lit[x]})}}}return Object.freeze(Object.defineProperty(Gt,Symbol.toStringTag,{value:"Module"}))}var Xe={exports:{}};/* @preserve + * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com + * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */(function(Gt,Vt){(function(l,it){it(Vt)})(qo,function(l){var it="1.9.4";function x(t){var e,i,n,o;for(i=1,n=arguments.length;i"u"||!L||!L.Mixin)){t=K(t)?t:[t];for(var e=0;e0?Math.floor(t):Math.ceil(t)};m.prototype={clone:function(){return new m(this.x,this.y)},add:function(t){return this.clone()._add(_(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(_(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new m(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new m(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=oi(this.x),this.y=oi(this.y),this},distanceTo:function(t){t=_(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=_(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=_(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+J(this.x)+", "+J(this.y)+")"}};function _(t,e,i){return t instanceof m?t:K(t)?new m(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new m(t.x,t.y):new m(t,e,i)}function z(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=F(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=F(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=O(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,On=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",E,e),window.removeEventListener("testPassiveEventSupport",E,e)}catch{}return t}(),In=function(){return!!document.createElement("canvas").getContext}(),Le=!!(document.createElementNS&&ri("svg").createSVGRect),An=!!Le&&function(){var t=document.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Bn=!Le&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}(),Nn=navigator.platform.indexOf("Mac")===0,Rn=navigator.platform.indexOf("Linux")===0;function $(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var f={ie:jt,ielt9:xn,edge:hi,webkit:we,android:ui,android23:li,androidStock:Ln,opera:xe,chrome:ci,gecko:fi,safari:Tn,phantom:di,opera12:_i,win:bn,ie3d:mi,webkit3d:Pe,gecko3d:pi,any3d:Mn,mobile:Et,mobileWebkit:Sn,mobileWebkit3d:Cn,msPointer:vi,pointer:gi,touch:zn,touchNative:yi,mobileOpera:kn,mobileGecko:En,retina:Zn,passiveEvents:On,canvas:In,svg:Le,vml:Bn,inlineSvg:An,mac:Nn,linux:Rn},wi=f.msPointer?"MSPointerDown":"pointerdown",xi=f.msPointer?"MSPointerMove":"pointermove",Pi=f.msPointer?"MSPointerUp":"pointerup",Li=f.msPointer?"MSPointerCancel":"pointercancel",Te={touchstart:wi,touchmove:xi,touchend:Pi,touchcancel:Li},Ti={touchstart:Gn,touchmove:Kt,touchend:Kt,touchcancel:Kt},yt={},bi=!1;function Dn(t,e,i){return e==="touchstart"&&Un(),Ti[e]?(i=Ti[e].bind(this,i),t.addEventListener(Te[e],i,!1),i):(console.warn("wrong event specified:",e),E)}function Fn(t,e,i){if(!Te[e]){console.warn("wrong event specified:",e);return}t.removeEventListener(Te[e],i,!1)}function Hn(t){yt[t.pointerId]=t}function Wn(t){yt[t.pointerId]&&(yt[t.pointerId]=t)}function Mi(t){delete yt[t.pointerId]}function Un(){bi||(document.addEventListener(wi,Hn,!0),document.addEventListener(xi,Wn,!0),document.addEventListener(Pi,Mi,!0),document.addEventListener(Li,Mi,!0),bi=!0)}function Kt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){e.touches=[];for(var i in yt)e.touches.push(yt[i]);e.changedTouches=[e],t(e)}}function Gn(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&N(e),Kt(t,e)}function Vn(t){var e={},i,n;for(n in t)i=t[n],e[n]=i&&i.bind?i.bind(t):i;return t=e,e.type="dblclick",e.detail=2,e.isTrusted=!1,e._simulated=!0,e}var qn=200;function jn(t,e){t.addEventListener("dblclick",e);var i=0,n;function o(s){if(s.detail!==1){n=s.detail;return}if(!(s.pointerType==="mouse"||s.sourceCapabilities&&!s.sourceCapabilities.firesTouchEvents)){var r=Ei(s);if(!(r.some(function(h){return h instanceof HTMLLabelElement&&h.attributes.for})&&!r.some(function(h){return h instanceof HTMLInputElement||h instanceof HTMLSelectElement}))){var a=Date.now();a-i<=qn?(n++,n===2&&e(Vn(s))):n=1,i=a}}}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function Kn(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var be=Jt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Zt=Jt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Si=Zt==="webkitTransition"||Zt==="OTransition"?Zt+"End":"transitionend";function Ci(t){return typeof t=="string"?document.getElementById(t):t}function Ot(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function T(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function k(t){var e=t.parentNode;e&&e.removeChild(t)}function Yt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function wt(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function xt(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Me(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=Xt(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function v(t,e){if(t.classList!==void 0)for(var i=dt(e),n=0,o=i.length;n0?2*window.devicePixelRatio:1;function Oi(t){return f.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Jn:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Re(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var $n={__proto__:null,on:p,off:M,stopPropagation:pt,disableScrollPropagation:Ne,disableClickPropagation:Nt,preventDefault:N,stop:vt,getPropagationPath:Ei,getMousePosition:Zi,getWheelDelta:Oi,isExternalTarget:Re,addListener:p,removeListener:M},Ii=zt.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=mt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=D(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=this._duration*1e3;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,O(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=_(e.paddingTopLeft||e.padding||[0,0]),n=_(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=F([r.min.add(i),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var u=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(h);o.x+=u.x<0?-c.x:c.x,o.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=x({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(S(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=x({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=S(this._handleGeolocationResponse,this),i=S(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=t.coords.latitude,i=t.coords.longitude,n=new b(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var a={latlng:n,bounds:o,timestamp:t.timestamp};for(var h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),k(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(G(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)k(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=T("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new H(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=O(t),i=_(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(i),u=F(this.project(a,n),this.project(r,n)).getSize(),c=f.any3d?this.options.zoomSnap:1,d=h.x/u.x,g=h.y/u.y,R=e?Math.max(d,g):Math.min(d,g);return n=this.getScaleZoom(R,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new m(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new z(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(y(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(_(t),e)},layerPointToLatLng:function(t){var e=_(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(y(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(y(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(O(t))},distance:function(t,e){return this.options.crs.distance(y(t),y(e))},containerPointToLayerPoint:function(t){return _(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return _(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(_(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(y(t)))},mouseEventToContainerPoint:function(t){return Zi(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Ci(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");p(e,"scroll",this._onScroll,this),this._containerId=P(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&f.any3d,v(t,"leaflet-container"+(f.touch?" leaflet-touch":"")+(f.retina?" leaflet-retina":"")+(f.ielt9?" leaflet-oldie":"")+(f.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Ot(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&e!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),I(this._mapPane,new m(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(v(t.markerPane,"leaflet-zoom-hide"),v(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){I(this._mapPane,new m(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){e===void 0&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return G(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){I(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[P(this._container)]=this;var e=t?M:p;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),f.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){G(this._resizeRequest),this._resizeRequest=D(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[P(s)],n&&(e==="click"||e==="preclick")&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!Re(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&this.listens(e,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))){var i=t.type;i==="mousedown"&&Ze(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=x({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}var o=this._findEventTargets(t,e);if(i){for(var s=[],r=0;r0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=f.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Z(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=T("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=be,n=this._proxy.style[i];_t(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){k(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();_t(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(D(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,v(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(S(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Qn(t,e){return new w(t,e)}var Y=nt.extend({options:{position:"topright"},initialize:function(t){C(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return v(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(k(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Rt=function(t){return new Y(t)};w.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=T("div",e+"control-container",this._container);function n(o,s){var r=e+o+" "+e+s;t[o+s]=T("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)k(this._controlCorners[t]);k(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ai=Y.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(P(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+P(this),i),this._layerControlInputs.push(n),n.layerId=P(t.layer),p(n,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");e.appendChild(s),s.appendChild(n),s.appendChild(o);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,e,i,n=[],o=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||o.push(i);for(s=0;s=0;o--)e=t[o],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,p(t,"click",N),this.expand();var e=this;setTimeout(function(){M(t,"click",N),e._preventClick=!1})}}),to=function(t,e,i){return new Ai(t,e,i)},De=Y.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=T("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=T("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Nt(s),p(s,"click",vt),p(s,"click",o,this),p(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";Z(this._zoomInButton,e),Z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(v(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(v(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});w.mergeOptions({zoomControl:!0}),w.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new De,this.addControl(this.zoomControl))});var eo=function(t){return new De(t)},Bi=Y.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=T("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=T("div",e,i)),t.imperial&&(this._iScale=T("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,o;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),io=function(t){return new Bi(t)},no='',Fe=Y.extend({options:{position:"bottomright",prefix:''+(f.inlineSvg?no+" ":"")+"Leaflet"},initialize:function(t){C(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=T("div","leaflet-control-attribution"),Nt(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' ')}}});w.mergeOptions({attributionControl:!0}),w.addInitHook(function(){this.options.attributionControl&&new Fe().addTo(this)});var oo=function(t){return new Fe(t)};Y.Layers=Ai,Y.Zoom=De,Y.Scale=Bi,Y.Attribution=Fe,Rt.layers=to,Rt.zoom=eo,Rt.scale=io,Rt.attribution=oo;var tt=nt.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});tt.addTo=function(t,e){return t.addHandler(e,this),this};var so={Events:U},Ni=f.touch?"touchstart mousedown":"mousedown",ct=zt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){C(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(p(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ct._dragging===this&&this.finishDrag(!0),M(this._dragStartTarget,Ni,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!Me(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){ct._dragging===this&&this.finishDrag();return}if(!(ct._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(ct._dragging=this,this._preventOutline&&Ze(this._element),ze(),It(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,i=zi(this._element);this._startPoint=new m(e.clientX,e.clientY),this._startPos=mt(this._element),this._parentScale=Oe(i);var n=t.type==="mousedown";p(document,n?"mousemove":"touchmove",this._onMove,this),p(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new m(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)s&&(r=a,s=h);s>i&&(e[r]=1,We(t,e,i,n,r),We(t,e,i,r,o))}function uo(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function lo(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Dt(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,h=r*r+a*a,u;return h>0&&(u=((t.x-o)*r+(t.y-s)*a)/h,u>1?(o=i.x,s=i.y):u>0&&(o+=r*u,s+=a*u)),r=t.x-o,a=t.y-s,n?r*r+a*a:new m(o,s)}function q(t){return!K(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function Gi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),q(t)}function Vi(t,e){var i,n,o,s,r,a,h,u;if(!t||t.length===0)throw new Error("latlngs not passed");q(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=y([0,0]),d=O(t),g=d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest());g<1700&&(c=He(t));var R=t.length,B=[];for(i=0;in){h=(s-n)/o,u=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var W=e.unproject(_(u));return y([W.lat+c.lat,W.lng+c.lng])}var co={__proto__:null,simplify:Fi,pointToSegmentDistance:Hi,closestPointOnSegment:ao,clipSegment:Ui,_getEdgeIntersection:te,_getBitCode:gt,_sqClosestPointOnSegment:Dt,isFlat:q,_flat:Gi,polylineCenter:Vi},Ue={project:function(t){return new m(t.lng,t.lat)},unproject:function(t){return new b(t.y,t.x)},bounds:new z([-180,-90],[180,90])},Ge={R:6378137,R_MINOR:6356752314245179e-9,bounds:new z([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new m(t.lng*e*i,n)},unproject:function(t){for(var e=180/Math.PI,i=this.R,n=this.R_MINOR/i,o=Math.sqrt(1-n*n),s=Math.exp(-t.y/i),r=Math.PI/2-2*Math.atan(s),a=0,h=.1,u;a<15&&Math.abs(h)>1e-7;a++)u=o*Math.sin(r),u=Math.pow((1-u)/(1+u),o/2),h=Math.PI/2-2*Math.atan(s*u)-r,r+=h;return new b(r*e,t.x*e/i)}},fo={__proto__:null,LonLat:Ue,Mercator:Ge,SphericalMercator:pe},_o=x({},lt,{code:"EPSG:3395",projection:Ge,transformation:function(){var t=.5/(Math.PI*Ge.R);return kt(t,.5,-t,.5)}()}),qi=x({},lt,{code:"EPSG:4326",projection:Ue,transformation:kt(1/180,1,-1/180,.5)}),mo=x({},ot,{projection:Ue,transformation:kt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});ot.Earth=lt,ot.EPSG3395=_o,ot.EPSG3857=ge,ot.EPSG900913=wn,ot.EPSG4326=qi,ot.Simple=mo;var X=zt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[P(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[P(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});w.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=P(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=P(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return P(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?K(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof b&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){rt.prototype._setLatLngs.call(this,t),q(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return q(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new m(e,e);if(t=new z(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var n=0,o=this._rings.length,s;nt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(e=!e);return e||rt.prototype._containsPoint.call(this,t,!0)}});function Lo(t,e){return new Tt(t,e)}var at=st.extend({initialize:function(t,e){C(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=K(t)?t:t.features,i,n,o;if(e){for(i=0,n=e.length;i0&&o.push(o[0].slice()),o}function bt(t,e){return t.feature?x({},t.feature,{geometry:e}):re(e)}function re(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Ke={toGeoJSON:function(t){return bt(this,{type:"Point",coordinates:je(this.getLatLng(),t)})}};ee.include(Ke),Ve.include(Ke),ie.include(Ke),rt.include({toGeoJSON:function(t){var e=!q(this._latlngs),i=se(this._latlngs,e?1:0,!1,t);return bt(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),Tt.include({toGeoJSON:function(t){var e=!q(this._latlngs),i=e&&!q(this._latlngs[0]),n=se(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),bt(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Pt.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),bt(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(e==="MultiPoint")return this.toMultiPoint(t);var i=e==="GeometryCollection",n=[];return this.eachLayer(function(o){if(o.toGeoJSON){var s=o.toGeoJSON(t);if(i)n.push(s.geometry);else{var r=re(s);r.type==="FeatureCollection"?n.push.apply(n,r.features):n.push(r)}}}),i?bt(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});function Yi(t,e){return new at(t,e)}var To=Yi,ae=X.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=O(e),C(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(v(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){k(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&wt(this._image),this},bringToBack:function(){return this._map&&xt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=O(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",e=this._image=t?this._url:T("img");if(v(e,"leaflet-image-layer"),this._zoomAnimated&&v(e,"leaflet-zoom-animated"),this.options.className&&v(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onload=S(this.fire,this,"load"),e.onerror=S(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;_t(this._image,i,e)},_reset:function(){var t=this._image,e=new z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();I(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){V(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),bo=function(t,e,i){return new ae(t,e,i)},Xi=ae.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",e=this._image=t?this._url:T("video");if(v(e,"leaflet-image-layer"),this._zoomAnimated&&v(e,"leaflet-zoom-animated"),this.options.className&&v(e,this.options.className),e.onselectstart=E,e.onmousemove=E,e.onloadeddata=S(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],o=0;o0?n:[e.src];return}K(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;so?(e.height=o+"px",v(t,s)):Z(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();I(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(Ot(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new m(this._containerLeft,-i-this._containerBottom);o._add(mt(this._container));var s=t.layerPointToContainerPoint(o),r=_(this.options.autoPanPadding),a=_(this.options.autoPanPaddingTopLeft||r),h=_(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),c=0,d=0;s.x+n+h.x>u.x&&(c=s.x+n-u.x+h.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+i+h.y>u.y&&(d=s.y+i-u.y+h.y),s.y-d-a.y<0&&(d=s.y-a.y),(c||d)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,d]))}},_getAnchor:function(){return _(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Co=function(t,e){return new he(t,e)};w.mergeOptions({closePopupOnClick:!0}),w.include({openPopup:function(t,e,i){return this._initOverlay(he,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),X.include({bindPopup:function(t,e){return this._popup=this._initOverlay(he,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof st||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){vt(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof ft)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var ue=et.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){et.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){et.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=et.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=T("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+P(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,u=o.offsetHeight,c=_(this.options.offset),d=this._getAnchor();a==="top"?(e=h/2,i=u):a==="bottom"?(e=h/2,i=0):a==="center"?(e=h/2,i=u/2):a==="right"?(e=0,i=u/2):a==="left"?(e=h,i=u/2):r.xthis.options.maxZoom||in?this._retainParent(o,s,r,n):!1)},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new m(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];if(h&&h.active){h.retain=!0;continue}else h&&h.loaded&&(h.retain=!0);i+1this.options.maxZoom||this.options.minZoom!==void 0&&o1){this._setView(t,i);return}for(var d=o.min.y;d<=o.max.y;d++)for(var g=o.min.x;g<=o.max.x;g++){var R=new m(g,d);if(R.z=this._tileZoom,!!this._isValidTile(R)){var B=this._tiles[this._tileCoordsToKey(R)];B?B.current=!0:r.push(R)}}if(r.sort(function(W,St){return W.distanceTo(s)-St.distanceTo(s)}),r.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var j=document.createDocumentFragment();for(g=0;gi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return O(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),s=e.unproject(n,t.z),r=e.unproject(o,t.z);return[s,r]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new H(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new m(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(k(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){v(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=E,t.onmousemove=E,f.ielt9&&this.options.opacity<1&&V(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),S(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&D(S(this._tileReady,this,t,null,o)),I(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],i&&(i.loaded=+new Date,this._map._fadeAnimated?(V(i.el,0),G(this._fadeFrame),this._fadeFrame=D(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(v(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),f.ielt9||!this._map._fadeAnimated?D(this._pruneTiles,this):setTimeout(S(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new m(this._wrapX?Ct(t.x,this._wrapX):t.x,this._wrapY?Ct(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Eo(t){return new Ht(t)}var Mt=Ht.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,e=C(this,e),e.detectRetina&&f.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return p(i,"load",S(this._tileOnLoad,this,e,i)),p(i,"error",S(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:f.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return ti(this._url,x(e,this.options))},_tileOnLoad:function(t,e){f.ielt9?setTimeout(S(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=E,e.onerror=E,!e.complete)){e.src=qt;var i=this._tiles[t].coords;k(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",qt),Ht.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===qt))return Ht.prototype._tileReady.call(this,t,e,i)}});function Qi(t,e){return new Mt(t,e)}var tn=Mt.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=x({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=C(this,e);var o=e.detectRetina&&f.retina?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Mt.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=F(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===qi?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Mt.prototype.getTileUrl.call(this,t);return a+Qe(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return x(this.wmsParams,t),e||this.redraw(),this}});function Zo(t,e){return new tn(t,e)}Mt.WMS=tn,Qi.wms=Zo;var ht=X.extend({options:{padding:.1},initialize:function(t){C(this,t),P(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),v(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));f.any3d?_t(this._container,s,i):I(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),en=ht.extend({options:{tolerance:0},getEvents:function(){var t=ht.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ht.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");p(t,"mousemove",this._onMouseMove,this),p(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),p(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){G(this._redrawRequest),delete this._ctx,k(this._container),M(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ht.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=f.retina?2:1;I(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",f.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ht.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[P(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[P(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,o;for(o=0;o')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Oo={_initContainer:function(){this._container=T("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ht.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Wt("shape");v(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Wt("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[P(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;k(e),t.removeInteractiveTarget(e),delete this._layers[P(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Wt("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=K(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Wt("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){wt(t._container)},_bringToBack:function(t){xt(t._container)}},le=f.vml?Wt:ri,Ut=ht.extend({_initContainer:function(){this._container=le("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=le("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){k(this._container),M(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){ht.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),I(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=le("path");t.options.className&&v(e,t.options.className),t.options.interactive&&v(e,"leaflet-interactive"),this._updateStyle(t),this._layers[P(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){k(t._path),t.removeInteractiveTarget(t._path),delete this._layers[P(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,ai(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+i*2+",0 "+o+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){wt(t._path)},_bringToBack:function(t){xt(t._path)}});f.vml&&Ut.include(Oo);function on(t){return f.svg||f.vml?new Ut(t):null}w.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&nn(t)||on(t)}});var sn=Tt.extend({initialize:function(t,e){Tt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=O(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Io(t,e){return new sn(t,e)}Ut.create=le,Ut.pointsToPath=ai,at.geometryToLayer=ne,at.coordsToLatLng=qe,at.coordsToLatLngs=oe,at.latLngToCoords=je,at.latLngsToCoords=se,at.getFeature=bt,at.asFeature=re,w.mergeOptions({boxZoom:!0});var rn=tt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){p(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){M(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){k(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),It(),ze(),this._startPoint=this._map.mouseEventToContainerPoint(t),p(document,{contextmenu:vt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=T("div","leaflet-zoom-box",this._container),v(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),i=e.getSize();I(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(k(this._box),Z(this._container,"leaflet-crosshair")),At(),ke(),M(document,{contextmenu:vt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(S(this._resetState,this),0);var e=new H(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});w.addInitHook("addHandler","boxZoom",rn),w.mergeOptions({doubleClickZoom:!0});var an=tt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});w.addInitHook("addHandler","doubleClickZoom",an),w.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var hn=tt.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ct(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}v(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Z(this._map._container,"leaflet-grab"),Z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=O(this._map.options.maxBounds);this._offsetLimit=F(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,r&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});w.addInitHook("addHandler","scrollWheelZoom",ln);var Ao=600;w.mergeOptions({tapHold:f.touchNative&&f.safari&&f.mobile,tapTolerance:15});var cn=tt.extend({addHooks:function(){p(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){M(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var e=t.touches[0];this._startPos=this._newPos=new m(e.clientX,e.clientY),this._holdTimeout=setTimeout(S(function(){this._cancel(),this._isTapValid()&&(p(document,"touchend",N),p(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),Ao),p(document,"touchend touchcancel contextmenu",this._cancel,this),p(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){M(document,"touchend",N),M(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),M(document,"touchend touchcancel contextmenu",this._cancel,this),M(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new m(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});w.addInitHook("addHandler","tapHold",cn),w.mergeOptions({touchZoom:f.touch,bounceAtZoomLimits:!0});var fn=tt.extend({addHooks:function(){v(this._map._container,"leaflet-touch-zoom"),p(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Z(this._map._container,"leaflet-touch-zoom"),M(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),p(document,"touchmove",this._onTouchMove,this),p(document,"touchend touchcancel",this._onTouchEnd,this),N(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,o===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(o===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),G(this._animRequest);var r=S(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=D(r,this,!0),N(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,G(this._animRequest),M(document,"touchmove",this._onTouchMove,this),M(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});w.addInitHook("addHandler","touchZoom",fn),w.BoxZoom=rn,w.DoubleClickZoom=an,w.Drag=hn,w.Keyboard=un,w.ScrollWheelZoom=ln,w.TapHold=cn,w.TouchZoom=fn,l.Bounds=z,l.Browser=f,l.CRS=ot,l.Canvas=en,l.Circle=Ve,l.CircleMarker=ie,l.Class=nt,l.Control=Y,l.DivIcon=$i,l.DivOverlay=et,l.DomEvent=$n,l.DomUtil=Xn,l.Draggable=ct,l.Evented=zt,l.FeatureGroup=st,l.GeoJSON=at,l.GridLayer=Ht,l.Handler=tt,l.Icon=Lt,l.ImageOverlay=ae,l.LatLng=b,l.LatLngBounds=H,l.Layer=X,l.LayerGroup=Pt,l.LineUtil=co,l.Map=w,l.Marker=ee,l.Mixin=so,l.Path=ft,l.Point=m,l.PolyUtil=ro,l.Polygon=Tt,l.Polyline=rt,l.Popup=he,l.PosAnimation=Ii,l.Projection=fo,l.Rectangle=sn,l.Renderer=ht,l.SVG=Ut,l.SVGOverlay=Ji,l.TileLayer=Mt,l.Tooltip=ue,l.Transformation=ve,l.Util=gn,l.VideoOverlay=Xi,l.bind=S,l.bounds=F,l.canvas=nn,l.circle=xo,l.circleMarker=wo,l.control=Rt,l.divIcon=ko,l.extend=x,l.featureGroup=vo,l.geoJSON=Yi,l.geoJson=To,l.gridLayer=Eo,l.icon=go,l.imageOverlay=bo,l.latLng=y,l.latLngBounds=O,l.layerGroup=po,l.map=Qn,l.marker=yo,l.point=_,l.polygon=Lo,l.polyline=Po,l.popup=Co,l.rectangle=Io,l.setOptions=C,l.stamp=P,l.svg=on,l.svgOverlay=So,l.tileLayer=Qi,l.tooltip=zo,l.transformation=kt,l.version=it,l.videoOverlay=Mo;var Bo=window.L;l.noConflict=function(){return window.L=Bo,this},window.L=l})})(Xe,Xe.exports);var pn=Xe.exports;const Ko=Vo(pn),Xo=jo({__proto__:null,default:Ko},[pn]);export{Xo as l}; diff --git a/_app/immutable/chunks/prism-svelte.CcUq_OPu.js b/_app/immutable/chunks/prism-svelte.CcUq_OPu.js new file mode 100644 index 0000000000000000000000000000000000000000..11fc81736fe60288b8acfd97000d160384efcff6 --- /dev/null +++ b/_app/immutable/chunks/prism-svelte.CcUq_OPu.js @@ -0,0 +1 @@ +import{P as e}from"./VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";const g="(if|else if|await|then|catch|each|html|debug)";e.languages.svelte=e.languages.extend("markup",{each:{pattern:new RegExp("{[#/]each(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{"language-javascript":[{pattern:/(as[\s\S]*)\([\s\S]*\)(?=\s*\})/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(as[\s]*)[\s\S]*(?=\s*)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(#each[\s]*)[\s\S]*(?=as)/,lookbehind:!0,inside:e.languages.javascript}],keyword:/[#/]each|as/,punctuation:/{|}/}},if:{pattern:new RegExp("{[#/]if(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{"language-javascript":[{pattern:/(as[\s\S]*)\([\s\S]*\)(?=\s*\})/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(as[\s]*)[\s\S]*(?=\s*)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(#if[\s]*)[\s\S]*(?=as)/,lookbehind:!0,inside:e.languages.javascript}],keyword:/[#/]if|as/,punctuation:/{|}/}},block:{pattern:new RegExp("{[#:/@]/s"+g+"(?:(?:\\{(?:(?:\\{(?:[^{}])*\\})|(?:[^{}]))*\\})|(?:[^{}]))*}"),inside:{punctuation:/^{|}$/,keyword:[new RegExp("[#:/@]"+g+"( )*"),/as/,/then/],"language-javascript":{pattern:/[\s\S]*/,inside:e.languages.javascript}}},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?:"[^"]*"|'[^']*'|{[\s\S]+?}(?=[\s/>])))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"language-javascript":{pattern:/\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/,inside:e.languages.javascript},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],"language-javascript":{pattern:/{[\s\S]+}/,inside:e.languages.javascript}}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},"language-javascript":{pattern:/\{(?:(?:\{(?:(?:\{(?:[^{}])*\})|(?:[^{}]))*\})|(?:[^{}]))*\}/,lookbehind:!0,inside:e.languages.javascript}});e.languages.svelte.tag.inside["attr-value"].inside.entity=e.languages.svelte.entity;e.hooks.add("wrap",a=>{a.type==="entity"&&(a.attributes.title=a.content.replace(/&/,"&"))});Object.defineProperty(e.languages.svelte.tag,"addInlined",{value:function(n,s){const t={};t["language-"+s]={pattern:/(^$)/i,lookbehind:!0,inside:e.languages[s]},t.cdata=/^$/i;const i={"included-cdata":{pattern://i,inside:t}};i["language-"+s]={pattern:/[\s\S]+/,inside:e.languages[s]};const r={};r[n]={pattern:RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,n),"i"),lookbehind:!0,greedy:!0,inside:i},e.languages.insertBefore("svelte","cdata",r)}});e.languages.svelte.tag.addInlined("style","css");e.languages.svelte.tag.addInlined("script","javascript"); diff --git a/_app/immutable/chunks/prism-yaml.Chm5ZdEN.js b/_app/immutable/chunks/prism-yaml.Chm5ZdEN.js new file mode 100644 index 0000000000000000000000000000000000000000..2b9d7cfadcbab106ee0e11fc0553946b22ef0202 --- /dev/null +++ b/_app/immutable/chunks/prism-yaml.Chm5ZdEN.js @@ -0,0 +1 @@ +(function(r){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,a="(?:"+n.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+n.source+")?)",d=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function e(i,u){u=(u||"").replace(/m/g,"")+"m";var p=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return a}).replace(/<>/g,function(){return i});return RegExp(p,u)}r.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return a})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return a}).replace(/<>/g,function(){return"(?:"+d+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:e(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:e(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:e(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:e(o),lookbehind:!0,greedy:!0},number:{pattern:e(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},r.languages.yml=r.languages.yaml})(Prism); diff --git a/_app/immutable/chunks/scheduler.B2FSa8mv.js b/_app/immutable/chunks/scheduler.B2FSa8mv.js new file mode 100644 index 0000000000000000000000000000000000000000..8c8a7c5d4eba21b02e938e3d53f971f8c15d6cbf --- /dev/null +++ b/_app/immutable/chunks/scheduler.B2FSa8mv.js @@ -0,0 +1 @@ +var F=Object.defineProperty;var G=(t,e,n)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _=(t,e,n)=>G(t,typeof e!="symbol"?e+"":e,n);function H(){}const mt=t=>t;function I(t,e){for(const n in e)t[n]=e[n];return t}function pt(t){return!!t&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function U(t){return t()}function yt(){return Object.create(null)}function z(t){t.forEach(U)}function W(t){return typeof t=="function"}function bt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let p;function gt(t,e){return t===e?!0:(p||(p=document.createElement("a")),p.href=e,t===p.href)}function xt(t){return Object.keys(t).length===0}function L(t,...e){if(t==null){for(const i of e)i(void 0);return H}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function wt(t){let e;return L(t,n=>e=n)(),e}function Et(t,e,n){t.$$.on_destroy.push(L(e,n))}function Tt(t,e,n,i){if(t){const s=S(t,e,n,i);return t[0](s)}}function S(t,e,n,i){return t[1]&&i?I(n.ctx.slice(),t[1](i(e))):n.ctx}function Nt(t,e,n,i){if(t[2]&&i){const s=t[2](i(n));if(e.dirty===void 0)return s;if(typeof s=="object"){const o=[],r=Math.max(e.dirty.length,s.length);for(let l=0;l32){const e=[],n=t.ctx.length/32;for(let i=0;i>1);n(s)<=i?t=s+1:e=s}return t}function Q(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if(t.nodeName==="HEAD"){const c=[];for(let a=0;a0&&e[n[s]].claim_order<=a?s+1:K(1,s,R=>e[n[R]].claim_order,a))-1;i[c]=n[f]+1;const C=f+1;n[C]=c,s=Math.max(C,s)}const o=[],r=[];let l=e.length-1;for(let c=n[s]+1;c!=0;c=i[c-1]){for(o.push(e[c-1]);l>=c;l--)r.push(e[l]);l--}for(;l>=0;l--)r.push(e[l]);o.reverse(),r.sort((c,a)=>c.claim_order-a.claim_order);for(let c=0,a=0;c=o[a].claim_order;)a++;const f=at.removeEventListener(e,n,i)}function Gt(t){return function(e){return e.preventDefault(),t.call(this,e)}}function It(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function A(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const et=["width","height"];function nt(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const i in e)e[i]==null?t.removeAttribute(i):i==="style"?t.style.cssText=e[i]:i==="__value"?t.value=t[i]=e[i]:n[i]&&n[i].set&&et.indexOf(i)===-1?t[i]=e[i]:A(t,i,e[i])}function Ut(t,e){for(const n in e)A(t,n,e[n])}function it(t,e){Object.keys(e).forEach(n=>{st(t,n,e[n])})}function st(t,e,n){const i=e.toLowerCase();i in t?t[i]=typeof t[i]=="boolean"&&n===""?!0:n:e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:A(t,e,n)}function zt(t){return/-/.test(t)?it:nt}function Wt(t){return t.dataset.svelteH}function Jt(t){return t===""?null:+t}function Kt(t){return Array.from(t.childNodes)}function P(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function O(t,e,n,i,s=!1){P(t);const o=(()=>{for(let r=t.claim_info.last_index;r=0;r--){const l=t[r];if(e(l)){const c=n(l);return c===void 0?t.splice(r,1):t[r]=c,s?c===void 0&&t.claim_info.last_index--:t.claim_info.last_index=r,l}}return i()})();return o.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,o}function q(t,e,n,i){return O(t,s=>s.nodeName===e,s=>{const o=[];for(let r=0;rs.removeAttribute(r))},()=>i(e))}function Qt(t,e,n){return q(t,e,n,k)}function Vt(t,e,n){return q(t,e,n,M)}function rt(t,e){return O(t,n=>n.nodeType===3,n=>{const i=""+e;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>v(e),!0)}function Xt(t){return rt(t," ")}function j(t,e,n){for(let i=n;i0&&n.push(s);return n}class at{constructor(e=!1){_(this,"is_svg",!1);_(this,"e");_(this,"n");_(this,"t");_(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=M(n.nodeName):this.e=k(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n{const s=t.$$.callbacks[e];if(s){const o=lt(e,n,{cancelable:i});return s.slice().forEach(r=>{r.call(t,o)}),!o.defaultPrevented}return!0}}function fe(t,e){return u().$$.context.set(t,e),e}function _e(t){return u().$$.context.get(t)}function he(){return u().$$.context}function de(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const m=[],D=[];let d=[];const T=[],B=Promise.resolve();let N=!1;function ut(){N||(N=!0,B.then(_t))}function me(){return ut(),B}function ft(t){d.push(t)}function pe(t){T.push(t)}const w=new Set;let h=0;function _t(){if(h!==0)return;const t=y;do{try{for(;ht.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),d=e}export{xt as $,ie as A,Ft as B,It as C,kt as D,vt as E,Nt as F,de as G,Wt as H,ft as I,Lt as J,W as K,z as L,L as M,D as N,M as O,Vt as P,g as Q,Yt as R,le as S,te as T,re as U,me as V,X as W,Ot as X,lt as Y,mt as Z,yt as _,Bt as a,ye as a0,y as a1,U as a2,m as a3,ut as a4,Mt as a5,Pt as a6,ue as a7,_e as a8,Ct as a9,I as aa,At as ab,nt as ac,ce as ad,wt as ae,zt as af,$t as ag,ee as ah,Gt as ai,pe as aj,qt as ak,ne as al,Jt as am,Zt as an,Dt as ao,gt as ap,he as aq,St as ar,Ut as as,jt as at,Rt as b,Xt as c,Qt as d,k as e,E as f,Kt as g,se as h,rt as i,A as j,tt as k,Z as l,ct as m,Et as n,Ht as o,ae as p,fe as q,oe as r,bt as s,v as t,H as u,pt as v,u as w,x,_t as y,Tt as z}; diff --git a/_app/immutable/chunks/stores.BQnhBgve.js b/_app/immutable/chunks/stores.BQnhBgve.js new file mode 100644 index 0000000000000000000000000000000000000000..46b872edaef1df783c5add6c5879f77243c2deb3 --- /dev/null +++ b/_app/immutable/chunks/stores.BQnhBgve.js @@ -0,0 +1 @@ +import{s as r}from"./entry.CmEkywbK.js";const e=()=>{const s=r;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},a={subscribe(s){return e().page.subscribe(s)}},i={subscribe(s){return e().navigating.subscribe(s)}};export{i as n,a as p}; diff --git a/_app/immutable/entry/app.eVNqlex7.js b/_app/immutable/entry/app.eVNqlex7.js new file mode 100644 index 0000000000000000000000000000000000000000..157f2ec67ca40cd131d3e6e166c85f6e5644bd74 --- /dev/null +++ b/_app/immutable/entry/app.eVNqlex7.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.kcWwAGgm.js","_app/immutable/chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js","_app/immutable/chunks/entry.CmEkywbK.js","_app/immutable/chunks/scheduler.B2FSa8mv.js","_app/immutable/chunks/index.CzNnnxDZ.js","_app/immutable/chunks/preload-helper.D7HrI6pR.js","_app/immutable/chunks/index.rV6zwFgL.js","_app/immutable/assets/VennDiagram.DBCXi1Yl.css","_app/immutable/chunks/button.DfeRvuoX.js","_app/immutable/chunks/arrays.DATw8jA9.js","_app/immutable/chunks/stores.BQnhBgve.js","_app/immutable/chunks/index.CqVitEmB.js","_app/immutable/chunks/AccordionItem.BAM5BvX8.js","_app/immutable/assets/0.DOZ2siFK.css","_app/immutable/nodes/1.DJ9Jibod.js","_app/immutable/nodes/2.B_uyDmX-.js","_app/immutable/nodes/3.Ct4wDhpw.js","_app/immutable/nodes/4.BbVuqJ42.js","_app/immutable/chunks/AreaMap.u3IdXB4f.js","_app/immutable/chunks/Prismjs.DElG_ecN.js","_app/immutable/chunks/await_block.Dveih0bk.js","_app/immutable/nodes/5.DjysBRZq.js","_app/immutable/nodes/6.Jl8FJZCP.js","_app/immutable/chunks/Button.DWcgwDfR.js","_app/immutable/nodes/7.KNtEiiIo.js","_app/immutable/nodes/8.7FYwEOQO.js"])))=>i.map(i=>d[i]); +import{_ as v}from"../chunks/preload-helper.D7HrI6pR.js";import{s as q,a as C,b as u,c as M,k as g,f as h,S as z,r as B,e as F,d as G,g as H,j as R,T as N,t as K,i as Q,m as W,N as D,U as w,V as X}from"../chunks/scheduler.B2FSa8mv.js";import{S as Y,i as Z,b as m,d as O,t as p,g as P,c as b,a as I,m as k,e as E}from"../chunks/index.CzNnnxDZ.js";const y=o=>o instanceof Error?{message:o.message,stack:o.stack,name:o.name,cause:o.cause?y(o.cause):void 0}:(console.log("Page threw a non-error",{error:o}),JSON.parse(JSON.stringify(o))),x=o=>(console.error("Error in client-side routing",o),y(o.error)),ce={};function ee(o){let e,n,r;var i=o[1][0];function c(t,f){return{props:{data:t[3],form:t[2]}}}return i&&(e=w(i,c(o)),o[15](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][0])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[15](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&8&&(s.data=t[3]),f&4&&(s.form=t[2]),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[15](null),e&&E(e,t)}}}function te(o){let e,n,r;var i=o[1][0];function c(t,f){return{props:{data:t[3],$$slots:{default:[re]},$$scope:{ctx:t}}}}return i&&(e=w(i,c(o)),o[14](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][0])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[14](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&8&&(s.data=t[3]),f&65591&&(s.$$scope={dirty:f,ctx:t}),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[14](null),e&&E(e,t)}}}function ne(o){let e,n,r;var i=o[1][1];function c(t,f){return{props:{data:t[4],form:t[2]}}}return i&&(e=w(i,c(o)),o[13](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][1])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[13](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&16&&(s.data=t[4]),f&4&&(s.form=t[2]),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[13](null),e&&E(e,t)}}}function ie(o){let e,n,r;var i=o[1][1];function c(t,f){return{props:{data:t[4],$$slots:{default:[se]},$$scope:{ctx:t}}}}return i&&(e=w(i,c(o)),o[12](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][1])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[12](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&16&&(s.data=t[4]),f&65575&&(s.$$scope={dirty:f,ctx:t}),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[12](null),e&&E(e,t)}}}function se(o){let e,n,r;var i=o[1][2];function c(t,f){return{props:{data:t[5],form:t[2]}}}return i&&(e=w(i,c(o)),o[11](e)),{c(){e&&b(e.$$.fragment),n=u()},l(t){e&&I(e.$$.fragment,t),n=u()},m(t,f){e&&k(e,t,f),g(t,n,f),r=!0},p(t,f){if(f&2&&i!==(i=t[1][2])){if(e){P();const s=e;m(s.$$.fragment,1,0,()=>{E(s,1)}),O()}i?(e=w(i,c(t)),t[11](e),b(e.$$.fragment),p(e.$$.fragment,1),k(e,n.parentNode,n)):e=null}else if(i){const s={};f&32&&(s.data=t[5]),f&4&&(s.form=t[2]),e.$set(s)}},i(t){r||(e&&p(e.$$.fragment,t),r=!0)},o(t){e&&m(e.$$.fragment,t),r=!1},d(t){t&&h(n),o[11](null),e&&E(e,t)}}}function re(o){let e,n,r,i;const c=[ie,ne],t=[];function f(s,l){return s[1][2]?0:1}return e=f(o),n=t[e]=c[e](o),{c(){n.c(),r=u()},l(s){n.l(s),r=u()},m(s,l){t[e].m(s,l),g(s,r,l),i=!0},p(s,l){let _=e;e=f(s),e===_?t[e].p(s,l):(P(),m(t[_],1,1,()=>{t[_]=null}),O(),n=t[e],n?n.p(s,l):(n=t[e]=c[e](s),n.c()),p(n,1),n.m(r.parentNode,r))},i(s){i||(p(n),i=!0)},o(s){m(n),i=!1},d(s){s&&h(r),t[e].d(s)}}}function A(o){let e,n=o[7]&&L(o);return{c(){e=F("div"),n&&n.c(),this.h()},l(r){e=G(r,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var i=H(e);n&&n.l(i),i.forEach(h),this.h()},h(){R(e,"id","svelte-announcer"),R(e,"aria-live","assertive"),R(e,"aria-atomic","true"),N(e,"position","absolute"),N(e,"left","0"),N(e,"top","0"),N(e,"clip","rect(0 0 0 0)"),N(e,"clip-path","inset(50%)"),N(e,"overflow","hidden"),N(e,"white-space","nowrap"),N(e,"width","1px"),N(e,"height","1px")},m(r,i){g(r,e,i),n&&n.m(e,null)},p(r,i){r[7]?n?n.p(r,i):(n=L(r),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(r){r&&h(e),n&&n.d()}}}function L(o){let e;return{c(){e=K(o[8])},l(n){e=Q(n,o[8])},m(n,r){g(n,e,r)},p(n,r){r&256&&W(e,n[8])},d(n){n&&h(e)}}}function oe(o){let e,n,r,i,c;const t=[te,ee],f=[];function s(_,d){return _[1][1]?0:1}e=s(o),n=f[e]=t[e](o);let l=o[6]&&A(o);return{c(){n.c(),r=C(),l&&l.c(),i=u()},l(_){n.l(_),r=M(_),l&&l.l(_),i=u()},m(_,d){f[e].m(_,d),g(_,r,d),l&&l.m(_,d),g(_,i,d),c=!0},p(_,[d]){let V=e;e=s(_),e===V?f[e].p(_,d):(P(),m(f[V],1,1,()=>{f[V]=null}),O(),n=f[e],n?n.p(_,d):(n=f[e]=t[e](_),n.c()),p(n,1),n.m(r.parentNode,r)),_[6]?l?l.p(_,d):(l=A(_),l.c(),l.m(i.parentNode,i)):l&&(l.d(1),l=null)},i(_){c||(p(n),c=!0)},o(_){m(n),c=!1},d(_){_&&(h(r),h(i)),f[e].d(_),l&&l.d(_)}}}function fe(o,e,n){let{stores:r}=e,{page:i}=e,{constructors:c}=e,{components:t=[]}=e,{form:f}=e,{data_0:s=null}=e,{data_1:l=null}=e,{data_2:_=null}=e;z(r.page.notify);let d=!1,V=!1,T=null;B(()=>{const a=r.page.subscribe(()=>{d&&(n(7,V=!0),X().then(()=>{n(8,T=document.title||"untitled page")}))});return n(6,d=!0),a});function S(a){D[a?"unshift":"push"](()=>{t[2]=a,n(0,t)})}function $(a){D[a?"unshift":"push"](()=>{t[1]=a,n(0,t)})}function J(a){D[a?"unshift":"push"](()=>{t[1]=a,n(0,t)})}function U(a){D[a?"unshift":"push"](()=>{t[0]=a,n(0,t)})}function j(a){D[a?"unshift":"push"](()=>{t[0]=a,n(0,t)})}return o.$$set=a=>{"stores"in a&&n(9,r=a.stores),"page"in a&&n(10,i=a.page),"constructors"in a&&n(1,c=a.constructors),"components"in a&&n(0,t=a.components),"form"in a&&n(2,f=a.form),"data_0"in a&&n(3,s=a.data_0),"data_1"in a&&n(4,l=a.data_1),"data_2"in a&&n(5,_=a.data_2)},o.$$.update=()=>{o.$$.dirty&1536&&r.page.set(i)},[t,c,f,s,l,_,d,V,T,r,i,S,$,J,U,j]}class ue extends Y{constructor(e){super(),Z(this,e,fe,oe,q,{stores:9,page:10,constructors:1,components:0,form:2,data_0:3,data_1:4,data_2:5})}}const me=[()=>v(()=>import("../nodes/0.kcWwAGgm.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),()=>v(()=>import("../nodes/1.DJ9Jibod.js"),__vite__mapDeps([14,3,4,10,2,12,1,5,6,7,9])),()=>v(()=>import("../nodes/2.B_uyDmX-.js"),__vite__mapDeps([15,6,16,3,4])),()=>v(()=>import("../nodes/3.Ct4wDhpw.js"),__vite__mapDeps([16,3,4])),()=>v(()=>import("../nodes/4.BbVuqJ42.js"),__vite__mapDeps([17,3,4,1,2,5,6,7,8,9,10,18,19,20])),()=>v(()=>import("../nodes/5.DjysBRZq.js"),__vite__mapDeps([21,3,4,1,2,5,6,7,8,9,10,18,19,20])),()=>v(()=>import("../nodes/6.Jl8FJZCP.js"),__vite__mapDeps([22,3,4,1,2,5,6,7,23])),()=>v(()=>import("../nodes/7.KNtEiiIo.js"),__vite__mapDeps([24,3,4,1,2,5,6,7,20])),()=>v(()=>import("../nodes/8.7FYwEOQO.js"),__vite__mapDeps([25,3,4,1,2,5,6,7,23,11,12,9,19]))],pe=[],de={"/":[4],"/borough/[borough]":[5],"/explore/console":[6,[2]],"/explore/schema":[7,[2]],"/settings":[-9,[3]]},he={handleError:x||(({error:o})=>{console.error(o)}),reroute:()=>{}};export{de as dictionary,he as hooks,ce as matchers,me as nodes,ue as root,pe as server_loads}; diff --git a/_app/immutable/entry/start.Cm-tlAbH.js b/_app/immutable/entry/start.Cm-tlAbH.js new file mode 100644 index 0000000000000000000000000000000000000000..b7705263eff05a11fac51e52dbeac14d91736826 --- /dev/null +++ b/_app/immutable/entry/start.Cm-tlAbH.js @@ -0,0 +1 @@ +import{f as a}from"../chunks/entry.CmEkywbK.js";export{a as start}; diff --git a/_app/immutable/nodes/0.kcWwAGgm.js b/_app/immutable/nodes/0.kcWwAGgm.js new file mode 100644 index 0000000000000000000000000000000000000000..d4bc13079a6725ef5e5d12fc847a18ddfb16f7f8 --- /dev/null +++ b/_app/immutable/nodes/0.kcWwAGgm.js @@ -0,0 +1,19 @@ +var gg=Object.defineProperty;var jc=n=>{throw TypeError(n)};var yg=(n,t,e)=>t in n?gg(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var Ya=(n,t,e)=>yg(n,typeof t!="symbol"?t+"":t,e),Lc=(n,t,e)=>t.has(n)||jc("Cannot "+e);var Or=(n,t,e)=>(Lc(n,t,"read from private field"),e?e.call(n):t.get(n)),ts=(n,t,e)=>t.has(n)?jc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),Ka=(n,t,e,r)=>(Lc(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e);var Rc=(n,t,e,r)=>({set _(i){Ka(n,t,i,e)},get _(){return Or(n,t,r)}});import{b_ as $n,b$ as Ut,c0 as Mo,c1 as Ai,c2 as Dt,c3 as A,c4 as Ur,q as _g,n as bg,ah as zt,c5 as th,c6 as vg,c7 as wg,c8 as Sg,c9 as Ig,w as Qe,x as un,F as es,bF as Og,bB as Rn,G as Bt,A as er,B as Yt,bz as Uc,H as We,ca as Yo,ao as Dg,ak as ns,bA as nr,bD as xc,ap as xr,al as hi,y as kg,z as Ja,v as eh,t as Eg,K as In,bI as _l,cb as Zr,k as ye,u as nh,bl as Vc,M as Ql,o as Ag,L as Ci,bG as Tg,bQ as zc,g as rh,cc as Bg,cd as Pg,I as On,ce as Mg,cf as Ng,cg as Ko,f as Us,ch as Cg,ci as Fg,cj as ih,ck as jg,cl as sh,cm as Lg,cn as Rg,e as Ug,co as bl,cp as xg,Q as Wc,bp as Vg,cq as zg}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import{p as ws,v as Wg,c as Hg,d as Hc,u as qc,g as $c,w as Je,m as qg,x as Oi,q as $g,r as oi,k as Yg,i as Kg,y as Jg,z as Qg,e as Gg,s as Xg,B as Zg}from"../chunks/button.DfeRvuoX.js";import{V as go,q as oh,a8 as ty,s as Zt,b as It,k as x,f as O,a9 as an,n as Me,aa as de,ab as ei,G as ir,N as zn,z as Se,D as Ie,E as Oe,F as De,e as q,d as $,g as Q,af as Yc,J as Fr,B as fe,L as yr,ac as $e,I as Bn,a as et,t as Pt,c as nt,i as Mt,j as N,l as H,m as Fe,a7 as ey,u as Qt,ap as Jo,r as Xr,T as Qo,H as pr,S as ny,ak as Qn,A as Br,p as ry,ao as Kc,M as iy,aj as ah}from"../chunks/scheduler.B2FSa8mv.js";import{S as se,i as oe,g as qt,b as M,d as $t,t as E,h as Pa,j as Zs,f as vn,c as st,a as ot,m as at,e as lt,k as lh}from"../chunks/index.CzNnnxDZ.js";import{w as ze,d as us,b as sy,c as oy}from"../chunks/entry.CmEkywbK.js";import{p as Ma,n as ch}from"../chunks/stores.BQnhBgve.js";import{d as vl}from"../chunks/index.rV6zwFgL.js";import{G as ay,X as ly,B as cy,S as uy}from"../chunks/index.CqVitEmB.js";import{t as No,g as Jc,o as Co,c as fy,r as dy,b as hy,e as Gl,f as my}from"../chunks/arrays.DATw8jA9.js";import{A as py,a as Qa}from"../chunks/AccordionItem.BAM5BvX8.js";const gy=new TextDecoder("utf-8"),wl=n=>gy.decode(n),yy=new TextEncoder,Xl=n=>yy.encode(n),_y=n=>typeof n=="number",by=n=>typeof n=="boolean",Ge=n=>typeof n=="function",Pn=n=>n!=null&&Object(n)===n,xs=n=>Pn(n)&&Ge(n.then),Na=n=>Pn(n)&&Ge(n[Symbol.iterator]),Zl=n=>Pn(n)&&Ge(n[Symbol.asyncIterator]),Sl=n=>Pn(n)&&Pn(n.schema),uh=n=>Pn(n)&&"done"in n&&"value"in n,fh=n=>Pn(n)&&Ge(n.stat)&&_y(n.fd),dh=n=>Pn(n)&&tc(n.body),hh=n=>"_getDOMStream"in n&&"_getNodeStream"in n,tc=n=>Pn(n)&&Ge(n.cancel)&&Ge(n.getReader)&&!hh(n),mh=n=>Pn(n)&&Ge(n.read)&&Ge(n.pipe)&&by(n.readable)&&!hh(n),vy=n=>Pn(n)&&Ge(n.clear)&&Ge(n.bytes)&&Ge(n.position)&&Ge(n.setPosition)&&Ge(n.capacity)&&Ge(n.getBufferIdentifier)&&Ge(n.createLong),ec=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function wy(n){const t=n[0]?[n[0]]:[];let e,r,i,s;for(let o,a,l=0,c=0,u=n.length;++lu+f.byteLength,0);let i,s,o,a=0,l=-1;const c=Math.min(t||Number.POSITIVE_INFINITY,r);for(const u=e.length;++lie(Int32Array,n),Gc=n=>ie(BigInt64Array,n),Ht=n=>ie(Uint8Array,n),Il=n=>(n.next(),n);function*Sy(n,t){const e=function*(i){yield i},r=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof ec?e(t):Na(t)?t:e(t);return yield*Il(function*(i){let s=null;do s=i.next(yield ie(n,s));while(!s.done)}(r[Symbol.iterator]())),new n}const Iy=n=>Sy(Uint8Array,n);function ph(n,t){return $n(this,arguments,function*(){if(xs(t))return yield Ut(yield Ut(yield*Mo(Ai(ph(n,yield Ut(t))))));const r=function(o){return $n(this,arguments,function*(){yield yield Ut(yield Ut(o))})},i=function(o){return $n(this,arguments,function*(){yield Ut(yield*Mo(Ai(Il(function*(a){let l=null;do l=a.next(yield l==null?void 0:l.value);while(!l.done)}(o[Symbol.iterator]())))))})},s=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof ec?r(t):Na(t)?i(t):Zl(t)?t:r(t);return yield Ut(yield*Mo(Ai(Il(function(o){return $n(this,arguments,function*(){let a=null;do a=yield Ut(o.next(yield yield Ut(ie(n,a))));while(!a.done)})}(s[Symbol.asyncIterator]()))))),yield Ut(new n)})}const Oy=n=>ph(Uint8Array,n);function Dy(n,t){let e=0;const r=n.length;if(r!==t.length)return!1;if(r>0)do if(n[e]!==t[e])return!1;while(++e(n.next(),n);function*ky(n){let t,e=!1,r=[],i,s,o,a=0;function l(){return s==="peek"?Gn(r,o)[0]:([i,r,a]=Gn(r,o),i)}({cmd:s,size:o}=(yield null)||{cmd:"read",size:0});const c=Iy(n)[Symbol.iterator]();try{do if({done:t,value:i}=Number.isNaN(o-a)?c.next():c.next(o-a),!t&&i.byteLength>0&&(r.push(i),a+=i.byteLength),t||o<=a)do({cmd:s,size:o}=yield l());while(o0&&(i.push(s),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Ut(c()));while(a0&&(i.push(Ht(s)),l+=s.byteLength),e||a<=l)do({cmd:o,size:a}=yield yield Ut(c()));while(a{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(t){return Dt(this,void 0,void 0,function*(){const{reader:e,source:r}=this;e&&(yield e.cancel(t).catch(()=>{})),r&&r.locked&&this.releaseLock()})}read(t){return Dt(this,void 0,void 0,function*(){if(t===0)return{done:this.reader==null,value:new Uint8Array(0)};const e=yield this.reader.read();return!e.done&&(e.value=Ht(e)),e})}}const Ga=(n,t)=>{const e=i=>r([t,i]);let r;return[t,e,new Promise(i=>(r=i)&&n.once(t,e))]};function By(n){return $n(this,arguments,function*(){const e=[];let r="error",i=!1,s=null,o,a,l=0,c=[],u;function f(){return o==="peek"?Gn(c,a)[0]:([u,c,l]=Gn(c,a),u)}if({cmd:o,size:a}=(yield yield Ut(null))||{cmd:"read",size:0},n.isTTY)return yield yield Ut(new Uint8Array(0)),yield Ut(null);try{e[0]=Ga(n,"end"),e[1]=Ga(n,"error");do{if(e[2]=Ga(n,"readable"),[r,s]=yield Ut(Promise.race(e.map(d=>d[2]))),r==="error")break;if((i=r==="end")||(Number.isFinite(a-l)?(u=Ht(n.read(a-l)),u.byteLength0&&(c.push(u),l+=u.byteLength)),i||a<=l)do({cmd:o,size:a}=yield yield Ut(f()));while(a{for(const[_,y]of d)n.off(_,y);try{const _=n.destroy;_&&_.call(n,g),g=void 0}catch(_){g=_||g}finally{g!=null?p(g):m()}})}})}var Pe;(function(n){n[n.V1=0]="V1",n[n.V2=1]="V2",n[n.V3=2]="V3",n[n.V4=3]="V4",n[n.V5=4]="V5"})(Pe||(Pe={}));var ln;(function(n){n[n.Sparse=0]="Sparse",n[n.Dense=1]="Dense"})(ln||(ln={}));var He;(function(n){n[n.HALF=0]="HALF",n[n.SINGLE=1]="SINGLE",n[n.DOUBLE=2]="DOUBLE"})(He||(He={}));var wn;(function(n){n[n.DAY=0]="DAY",n[n.MILLISECOND=1]="MILLISECOND"})(wn||(wn={}));var gt;(function(n){n[n.SECOND=0]="SECOND",n[n.MILLISECOND=1]="MILLISECOND",n[n.MICROSECOND=2]="MICROSECOND",n[n.NANOSECOND=3]="NANOSECOND"})(gt||(gt={}));var Xn;(function(n){n[n.YEAR_MONTH=0]="YEAR_MONTH",n[n.DAY_TIME=1]="DAY_TIME",n[n.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Xn||(Xn={}));const Xa=2,Wn=4,ar=4,te=4,Ar=new Int32Array(2),Xc=new Float32Array(Ar.buffer),Zc=new Float64Array(Ar.buffer),_o=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1;var Ol;(function(n){n[n.UTF8_BYTES=1]="UTF8_BYTES",n[n.UTF16_STRING=2]="UTF16_STRING"})(Ol||(Ol={}));let Fi=class gh{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new gh(new Uint8Array(t))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<>8}writeUint16(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8}writeInt32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeUint32(t,e){this.bytes_[t]=e,this.bytes_[t+1]=e>>8,this.bytes_[t+2]=e>>16,this.bytes_[t+3]=e>>24}writeInt64(t,e){this.writeInt32(t,Number(BigInt.asIntN(32,e))),this.writeInt32(t+4,Number(BigInt.asIntN(32,e>>BigInt(32))))}writeUint64(t,e){this.writeUint32(t,Number(BigInt.asUintN(32,e))),this.writeUint32(t+4,Number(BigInt.asUintN(32,e>>BigInt(32))))}writeFloat32(t,e){Xc[0]=e,this.writeInt32(t,Ar[0])}writeFloat64(t,e){Zc[0]=e,this.writeInt32(t,Ar[_o?0:1]),this.writeInt32(t+4,Ar[_o?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);const r=~(this.bb.capacity()-this.space+e)+1&t-1;for(;this.space=0&&this.vtable[e]==0;e--);const r=e+1;for(;e>=0;e--)this.addInt16(this.vtable[e]!=0?t-this.vtable[e]:0);const i=2;this.addInt16(t-this.object_start);const s=(r+i)*Xa;this.addInt16(s);let o=0;const a=this.space;t:for(e=0;e=0;o--)this.writeInt8(s.charCodeAt(o))}this.prep(this.minalign,Wn+i),this.addOffset(t),i&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(t,e){this.finish(t,e,!0)}requiredField(t,e){const r=this.bb.capacity()-t,i=r-this.bb.readInt32(r);if(!(e=0;r--)t.addInt32(e[r]);return t.endVector()}static startTypeIdsVector(t,e){t.startVector(4,e,4)}static endUnion(t){return t.endObject()}static createUnion(t,e,r){return sn.startUnion(t),sn.addMode(t,e),sn.addTypeIds(t,r),sn.endUnion(t)}}let ou=class ys{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsUtf8(t,e){return(e||new ys).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,e){return t.setPosition(t.position()+te),(e||new ys).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(t){return ys.startUtf8(t),ys.endUtf8(t)}};var ue;(function(n){n[n.NONE=0]="NONE",n[n.Null=1]="Null",n[n.Int=2]="Int",n[n.FloatingPoint=3]="FloatingPoint",n[n.Binary=4]="Binary",n[n.Utf8=5]="Utf8",n[n.Bool=6]="Bool",n[n.Decimal=7]="Decimal",n[n.Date=8]="Date",n[n.Time=9]="Time",n[n.Timestamp=10]="Timestamp",n[n.Interval=11]="Interval",n[n.List=12]="List",n[n.Struct_=13]="Struct_",n[n.Union=14]="Union",n[n.FixedSizeBinary=15]="FixedSizeBinary",n[n.FixedSizeList=16]="FixedSizeList",n[n.Map=17]="Map",n[n.Duration=18]="Duration",n[n.LargeBinary=19]="LargeBinary",n[n.LargeUtf8=20]="LargeUtf8",n[n.LargeList=21]="LargeList",n[n.RunEndEncoded=22]="RunEndEncoded"})(ue||(ue={}));let pn=class xo{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsField(t,e){return(e||new xo).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,e){return t.setPosition(t.position()+te),(e||new xo).__init(t.readInt32(t.position())+t.position(),t)}name(t){const e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__string(this.bb_pos+e,t):null}nullable(){const t=this.bb.__offset(this.bb_pos,6);return t?!!this.bb.readInt8(this.bb_pos+t):!1}typeType(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readUint8(this.bb_pos+t):ue.NONE}type(t){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__union(t,this.bb_pos+e):null}dictionary(t){const e=this.bb.__offset(this.bb_pos,12);return e?(t||new lr).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}children(t,e){const r=this.bb.__offset(this.bb_pos,14);return r?(e||new xo).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}childrenLength(){const t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const r=this.bb.__offset(this.bb_pos,16);return r?(e||new Ce).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,e){t.addFieldOffset(0,e,0)}static addNullable(t,e){t.addFieldInt8(1,+e,0)}static addTypeType(t,e){t.addFieldInt8(2,e,ue.NONE)}static addType(t,e){t.addFieldOffset(3,e,0)}static addDictionary(t,e){t.addFieldOffset(4,e,0)}static addChildren(t,e){t.addFieldOffset(5,e,0)}static createChildrenVector(t,e){t.startVector(4,e.length,4);for(let r=e.length-1;r>=0;r--)t.addOffset(e[r]);return t.endVector()}static startChildrenVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(6,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let r=e.length-1;r>=0;r--)t.addOffset(e[r]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endField(t){return t.endObject()}},xn=class rr{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsSchema(t,e){return(e||new rr).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,e){return t.setPosition(t.position()+te),(e||new rr).__init(t.readInt32(t.position())+t.position(),t)}endianness(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):ji.Little}fields(t,e){const r=this.bb.__offset(this.bb_pos,6);return r?(e||new pn).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}fieldsLength(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const r=this.bb.__offset(this.bb_pos,8);return r?(e||new Ce).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){const e=this.bb.__offset(this.bb_pos,10);return e?this.bb.readInt64(this.bb.__vector(this.bb_pos+e)+t*8):BigInt(0)}featuresLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,e){t.addFieldInt16(0,e,ji.Little)}static addFields(t,e){t.addFieldOffset(1,e,0)}static createFieldsVector(t,e){t.startVector(4,e.length,4);for(let r=e.length-1;r>=0;r--)t.addOffset(e[r]);return t.endVector()}static startFieldsVector(t,e){t.startVector(4,e,4)}static addCustomMetadata(t,e){t.addFieldOffset(2,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let r=e.length-1;r>=0;r--)t.addOffset(e[r]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static addFeatures(t,e){t.addFieldOffset(3,e,0)}static createFeaturesVector(t,e){t.startVector(8,e.length,8);for(let r=e.length-1;r>=0;r--)t.addInt64(e[r]);return t.endVector()}static startFeaturesVector(t,e){t.startVector(8,e,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,e){t.finish(e)}static finishSizePrefixedSchemaBuffer(t,e){t.finish(e,void 0,!0)}static createSchema(t,e,r,i,s){return rr.startSchema(t),rr.addEndianness(t,e),rr.addFields(t,r),rr.addCustomMetadata(t,i),rr.addFeatures(t,s),rr.endSchema(t)}};var Gt;(function(n){n[n.NONE=0]="NONE",n[n.Schema=1]="Schema",n[n.DictionaryBatch=2]="DictionaryBatch",n[n.RecordBatch=3]="RecordBatch",n[n.Tensor=4]="Tensor",n[n.SparseTensor=5]="SparseTensor"})(Gt||(Gt={}));const Py=void 0;function Vs(n){if(n===null)return"null";if(n===Py)return"undefined";switch(typeof n){case"number":return`${n}`;case"bigint":return`${n}`;case"string":return`"${n}"`}return typeof n[Symbol.toPrimitive]=="function"?n[Symbol.toPrimitive]("string"):ArrayBuffer.isView(n)?n instanceof BigInt64Array||n instanceof BigUint64Array?`[${[...n].map(t=>Vs(t))}]`:`[${n}]`:ArrayBuffer.isView(n)?`[${n}]`:JSON.stringify(n,(t,e)=>typeof e=="bigint"?`${e}`:e)}function pe(n){if(typeof n=="bigint"&&(nNumber.MAX_SAFE_INTEGER))throw new TypeError(`${n} is not safe to convert to a number.`);return Number(n)}function wh(n,t){return pe(n/t)+pe(n%t)/pe(t)}const My=Symbol.for("isArrowBigNum");function Nn(n,...t){return t.length===0?Object.setPrototypeOf(ie(this.TypedArray,n),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(n,...t),this.constructor.prototype)}Nn.prototype[My]=!0;Nn.prototype.toJSON=function(){return`"${Ws(this)}"`};Nn.prototype.valueOf=function(n){return Sh(this,n)};Nn.prototype.toString=function(){return Ws(this)};Nn.prototype[Symbol.toPrimitive]=function(n="default"){switch(n){case"number":return Sh(this);case"string":return Ws(this);case"default":return Fy(this)}return Ws(this)};function Ti(...n){return Nn.apply(this,n)}function Bi(...n){return Nn.apply(this,n)}function zs(...n){return Nn.apply(this,n)}Object.setPrototypeOf(Ti.prototype,Object.create(Int32Array.prototype));Object.setPrototypeOf(Bi.prototype,Object.create(Uint32Array.prototype));Object.setPrototypeOf(zs.prototype,Object.create(Uint32Array.prototype));Object.assign(Ti.prototype,Nn.prototype,{constructor:Ti,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array});Object.assign(Bi.prototype,Nn.prototype,{constructor:Bi,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array});Object.assign(zs.prototype,Nn.prototype,{constructor:zs,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});const Ny=BigInt(4294967296)*BigInt(4294967296),Cy=Ny-BigInt(1);function Sh(n,t){const{buffer:e,byteOffset:r,byteLength:i,signed:s}=n,o=new BigUint64Array(e,r,i/8),a=s&&o.at(-1)&BigInt(1)<=0)return Za(n);t=t.slice();let r=1;for(let s=0;s(n.children=null,n.ArrayType=Array,n.OffsetArrayType=Int32Array,n[Symbol.toStringTag]="DataType"))(ct.prototype);class Pr extends ct{constructor(){super(A.Null)}toString(){return"Null"}}Oh=Symbol.toStringTag;Pr[Oh]=(n=>n[Symbol.toStringTag]="Null")(Pr.prototype);class ti extends ct{constructor(t,e){super(A.Int),this.isSigned=t,this.bitWidth=e}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}Dh=Symbol.toStringTag;ti[Dh]=(n=>(n.isSigned=null,n.bitWidth=null,n[Symbol.toStringTag]="Int"))(ti.prototype);class Hs extends ti{constructor(){super(!0,32)}get ArrayType(){return Int32Array}}Object.defineProperty(Hs.prototype,"ArrayType",{value:Int32Array});class ta extends ct{constructor(t){super(A.Float),this.precision=t}get ArrayType(){switch(this.precision){case He.HALF:return Uint16Array;case He.SINGLE:return Float32Array;case He.DOUBLE:return Float64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}toString(){return`Float${this.precision<<5||16}`}}kh=Symbol.toStringTag;ta[kh]=(n=>(n.precision=null,n[Symbol.toStringTag]="Float"))(ta.prototype);class ea extends ct{constructor(){super(A.Binary)}toString(){return"Binary"}}Eh=Symbol.toStringTag;ea[Eh]=(n=>(n.ArrayType=Uint8Array,n[Symbol.toStringTag]="Binary"))(ea.prototype);class na extends ct{constructor(){super(A.LargeBinary)}toString(){return"LargeBinary"}}Ah=Symbol.toStringTag;na[Ah]=(n=>(n.ArrayType=Uint8Array,n.OffsetArrayType=BigInt64Array,n[Symbol.toStringTag]="LargeBinary"))(na.prototype);class ra extends ct{constructor(){super(A.Utf8)}toString(){return"Utf8"}}Th=Symbol.toStringTag;ra[Th]=(n=>(n.ArrayType=Uint8Array,n[Symbol.toStringTag]="Utf8"))(ra.prototype);class ia extends ct{constructor(){super(A.LargeUtf8)}toString(){return"LargeUtf8"}}Bh=Symbol.toStringTag;ia[Bh]=(n=>(n.ArrayType=Uint8Array,n.OffsetArrayType=BigInt64Array,n[Symbol.toStringTag]="LargeUtf8"))(ia.prototype);class sa extends ct{constructor(){super(A.Bool)}toString(){return"Bool"}}Ph=Symbol.toStringTag;sa[Ph]=(n=>(n.ArrayType=Uint8Array,n[Symbol.toStringTag]="Bool"))(sa.prototype);class oa extends ct{constructor(t,e,r=128){super(A.Decimal),this.scale=t,this.precision=e,this.bitWidth=r}toString(){return`Decimal[${this.precision}e${this.scale>0?"+":""}${this.scale}]`}}Mh=Symbol.toStringTag;oa[Mh]=(n=>(n.scale=null,n.precision=null,n.ArrayType=Uint32Array,n[Symbol.toStringTag]="Decimal"))(oa.prototype);class aa extends ct{constructor(t){super(A.Date),this.unit=t}toString(){return`Date${(this.unit+1)*32}<${wn[this.unit]}>`}get ArrayType(){return this.unit===wn.DAY?Int32Array:BigInt64Array}}Nh=Symbol.toStringTag;aa[Nh]=(n=>(n.unit=null,n[Symbol.toStringTag]="Date"))(aa.prototype);class la extends ct{constructor(t,e){super(A.Time),this.unit=t,this.bitWidth=e}toString(){return`Time${this.bitWidth}<${gt[this.unit]}>`}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error(`Unrecognized ${this[Symbol.toStringTag]} type`)}}Ch=Symbol.toStringTag;la[Ch]=(n=>(n.unit=null,n.bitWidth=null,n[Symbol.toStringTag]="Time"))(la.prototype);class ca extends ct{constructor(t,e){super(A.Timestamp),this.unit=t,this.timezone=e}toString(){return`Timestamp<${gt[this.unit]}${this.timezone?`, ${this.timezone}`:""}>`}}Fh=Symbol.toStringTag;ca[Fh]=(n=>(n.unit=null,n.timezone=null,n.ArrayType=BigInt64Array,n[Symbol.toStringTag]="Timestamp"))(ca.prototype);class ua extends ct{constructor(t){super(A.Interval),this.unit=t}toString(){return`Interval<${Xn[this.unit]}>`}}jh=Symbol.toStringTag;ua[jh]=(n=>(n.unit=null,n.ArrayType=Int32Array,n[Symbol.toStringTag]="Interval"))(ua.prototype);class fa extends ct{constructor(t){super(A.Duration),this.unit=t}toString(){return`Duration<${gt[this.unit]}>`}}Lh=Symbol.toStringTag;fa[Lh]=(n=>(n.unit=null,n.ArrayType=BigInt64Array,n[Symbol.toStringTag]="Duration"))(fa.prototype);class da extends ct{constructor(t){super(A.List),this.children=[t]}toString(){return`List<${this.valueType}>`}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}}Rh=Symbol.toStringTag;da[Rh]=(n=>(n.children=null,n[Symbol.toStringTag]="List"))(da.prototype);class Xe extends ct{constructor(t){super(A.Struct),this.children=t}toString(){return`Struct<{${this.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}Uh=Symbol.toStringTag;Xe[Uh]=(n=>(n.children=null,n[Symbol.toStringTag]="Struct"))(Xe.prototype);class ha extends ct{constructor(t,e,r){super(A.Union),this.mode=t,this.children=r,this.typeIds=e=Int32Array.from(e),this.typeIdToChildIndex=e.reduce((i,s,o)=>(i[s]=o)&&i||i,Object.create(null))}toString(){return`${this[Symbol.toStringTag]}<${this.children.map(t=>`${t.type}`).join(" | ")}>`}}xh=Symbol.toStringTag;ha[xh]=(n=>(n.mode=null,n.typeIds=null,n.children=null,n.typeIdToChildIndex=null,n.ArrayType=Int8Array,n[Symbol.toStringTag]="Union"))(ha.prototype);class ma extends ct{constructor(t){super(A.FixedSizeBinary),this.byteWidth=t}toString(){return`FixedSizeBinary[${this.byteWidth}]`}}Vh=Symbol.toStringTag;ma[Vh]=(n=>(n.byteWidth=null,n.ArrayType=Uint8Array,n[Symbol.toStringTag]="FixedSizeBinary"))(ma.prototype);class pa extends ct{constructor(t,e){super(A.FixedSizeList),this.listSize=t,this.children=[e]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}zh=Symbol.toStringTag;pa[zh]=(n=>(n.children=null,n.listSize=null,n[Symbol.toStringTag]="FixedSizeList"))(pa.prototype);class ga extends ct{constructor(t,e=!1){var r,i,s;if(super(A.Map),this.children=[t],this.keysSorted=e,t&&(t.name="entries",!((r=t==null?void 0:t.type)===null||r===void 0)&&r.children)){const o=(i=t==null?void 0:t.type)===null||i===void 0?void 0:i.children[0];o&&(o.name="key");const a=(s=t==null?void 0:t.type)===null||s===void 0?void 0:s.children[1];a&&(a.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return`Map<{${this.children[0].type.children.map(t=>`${t.name}:${t.type}`).join(", ")}}>`}}Wh=Symbol.toStringTag;ga[Wh]=(n=>(n.children=null,n.keysSorted=null,n[Symbol.toStringTag]="Map_"))(ga.prototype);const jy=(n=>()=>++n)(-1);class Li extends ct{constructor(t,e,r,i){super(A.Dictionary),this.indices=e,this.dictionary=t,this.isOrdered=i||!1,this.id=r==null?jy():pe(r)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return`Dictionary<${this.indices}, ${this.dictionary}>`}}Hh=Symbol.toStringTag;Li[Hh]=(n=>(n.id=null,n.indices=null,n.isOrdered=null,n.dictionary=null,n[Symbol.toStringTag]="Dictionary"))(Li.prototype);function or(n){const t=n;switch(n.typeId){case A.Decimal:return n.bitWidth/32;case A.Interval:return 1+t.unit;case A.FixedSizeList:return t.listSize;case A.FixedSizeBinary:return t.byteWidth;default:return 1}}class Rt{visitMany(t,...e){return t.map((r,i)=>this.visit(r,...e.map(s=>s[i])))}visit(...t){return this.getVisitFn(t[0],!1).apply(this,t)}getVisitFn(t,e=!0){return Ly(this,t,e)}getVisitFnByTypeId(t,e=!0){return wi(this,t,e)}visitNull(t,...e){return null}visitBool(t,...e){return null}visitInt(t,...e){return null}visitFloat(t,...e){return null}visitUtf8(t,...e){return null}visitLargeUtf8(t,...e){return null}visitBinary(t,...e){return null}visitLargeBinary(t,...e){return null}visitFixedSizeBinary(t,...e){return null}visitDate(t,...e){return null}visitTimestamp(t,...e){return null}visitTime(t,...e){return null}visitDecimal(t,...e){return null}visitList(t,...e){return null}visitStruct(t,...e){return null}visitUnion(t,...e){return null}visitDictionary(t,...e){return null}visitInterval(t,...e){return null}visitDuration(t,...e){return null}visitFixedSizeList(t,...e){return null}visitMap(t,...e){return null}}function Ly(n,t,e=!0){return typeof t=="number"?wi(n,t,e):typeof t=="string"&&t in A?wi(n,A[t],e):t&&t instanceof ct?wi(n,au(t),e):t!=null&&t.type&&t.type instanceof ct?wi(n,au(t.type),e):wi(n,A.NONE,e)}function wi(n,t,e=!0){let r=null;switch(t){case A.Null:r=n.visitNull;break;case A.Bool:r=n.visitBool;break;case A.Int:r=n.visitInt;break;case A.Int8:r=n.visitInt8||n.visitInt;break;case A.Int16:r=n.visitInt16||n.visitInt;break;case A.Int32:r=n.visitInt32||n.visitInt;break;case A.Int64:r=n.visitInt64||n.visitInt;break;case A.Uint8:r=n.visitUint8||n.visitInt;break;case A.Uint16:r=n.visitUint16||n.visitInt;break;case A.Uint32:r=n.visitUint32||n.visitInt;break;case A.Uint64:r=n.visitUint64||n.visitInt;break;case A.Float:r=n.visitFloat;break;case A.Float16:r=n.visitFloat16||n.visitFloat;break;case A.Float32:r=n.visitFloat32||n.visitFloat;break;case A.Float64:r=n.visitFloat64||n.visitFloat;break;case A.Utf8:r=n.visitUtf8;break;case A.LargeUtf8:r=n.visitLargeUtf8;break;case A.Binary:r=n.visitBinary;break;case A.LargeBinary:r=n.visitLargeBinary;break;case A.FixedSizeBinary:r=n.visitFixedSizeBinary;break;case A.Date:r=n.visitDate;break;case A.DateDay:r=n.visitDateDay||n.visitDate;break;case A.DateMillisecond:r=n.visitDateMillisecond||n.visitDate;break;case A.Timestamp:r=n.visitTimestamp;break;case A.TimestampSecond:r=n.visitTimestampSecond||n.visitTimestamp;break;case A.TimestampMillisecond:r=n.visitTimestampMillisecond||n.visitTimestamp;break;case A.TimestampMicrosecond:r=n.visitTimestampMicrosecond||n.visitTimestamp;break;case A.TimestampNanosecond:r=n.visitTimestampNanosecond||n.visitTimestamp;break;case A.Time:r=n.visitTime;break;case A.TimeSecond:r=n.visitTimeSecond||n.visitTime;break;case A.TimeMillisecond:r=n.visitTimeMillisecond||n.visitTime;break;case A.TimeMicrosecond:r=n.visitTimeMicrosecond||n.visitTime;break;case A.TimeNanosecond:r=n.visitTimeNanosecond||n.visitTime;break;case A.Decimal:r=n.visitDecimal;break;case A.List:r=n.visitList;break;case A.Struct:r=n.visitStruct;break;case A.Union:r=n.visitUnion;break;case A.DenseUnion:r=n.visitDenseUnion||n.visitUnion;break;case A.SparseUnion:r=n.visitSparseUnion||n.visitUnion;break;case A.Dictionary:r=n.visitDictionary;break;case A.Interval:r=n.visitInterval;break;case A.IntervalDayTime:r=n.visitIntervalDayTime||n.visitInterval;break;case A.IntervalYearMonth:r=n.visitIntervalYearMonth||n.visitInterval;break;case A.Duration:r=n.visitDuration;break;case A.DurationSecond:r=n.visitDurationSecond||n.visitDuration;break;case A.DurationMillisecond:r=n.visitDurationMillisecond||n.visitDuration;break;case A.DurationMicrosecond:r=n.visitDurationMicrosecond||n.visitDuration;break;case A.DurationNanosecond:r=n.visitDurationNanosecond||n.visitDuration;break;case A.FixedSizeList:r=n.visitFixedSizeList;break;case A.Map:r=n.visitMap;break}if(typeof r=="function")return r;if(!e)return()=>null;throw new Error(`Unrecognized type '${A[t]}'`)}function au(n){switch(n.typeId){case A.Null:return A.Null;case A.Int:{const{bitWidth:t,isSigned:e}=n;switch(t){case 8:return e?A.Int8:A.Uint8;case 16:return e?A.Int16:A.Uint16;case 32:return e?A.Int32:A.Uint32;case 64:return e?A.Int64:A.Uint64}return A.Int}case A.Float:switch(n.precision){case He.HALF:return A.Float16;case He.SINGLE:return A.Float32;case He.DOUBLE:return A.Float64}return A.Float;case A.Binary:return A.Binary;case A.LargeBinary:return A.LargeBinary;case A.Utf8:return A.Utf8;case A.LargeUtf8:return A.LargeUtf8;case A.Bool:return A.Bool;case A.Decimal:return A.Decimal;case A.Time:switch(n.unit){case gt.SECOND:return A.TimeSecond;case gt.MILLISECOND:return A.TimeMillisecond;case gt.MICROSECOND:return A.TimeMicrosecond;case gt.NANOSECOND:return A.TimeNanosecond}return A.Time;case A.Timestamp:switch(n.unit){case gt.SECOND:return A.TimestampSecond;case gt.MILLISECOND:return A.TimestampMillisecond;case gt.MICROSECOND:return A.TimestampMicrosecond;case gt.NANOSECOND:return A.TimestampNanosecond}return A.Timestamp;case A.Date:switch(n.unit){case wn.DAY:return A.DateDay;case wn.MILLISECOND:return A.DateMillisecond}return A.Date;case A.Interval:switch(n.unit){case Xn.DAY_TIME:return A.IntervalDayTime;case Xn.YEAR_MONTH:return A.IntervalYearMonth}return A.Interval;case A.Duration:switch(n.unit){case gt.SECOND:return A.DurationSecond;case gt.MILLISECOND:return A.DurationMillisecond;case gt.MICROSECOND:return A.DurationMicrosecond;case gt.NANOSECOND:return A.DurationNanosecond}return A.Duration;case A.Map:return A.Map;case A.List:return A.List;case A.Struct:return A.Struct;case A.Union:switch(n.mode){case ln.Dense:return A.DenseUnion;case ln.Sparse:return A.SparseUnion}return A.Union;case A.FixedSizeBinary:return A.FixedSizeBinary;case A.FixedSizeList:return A.FixedSizeList;case A.Dictionary:return A.Dictionary}throw new Error(`Unrecognized type '${A[n.typeId]}'`)}Rt.prototype.visitInt8=null;Rt.prototype.visitInt16=null;Rt.prototype.visitInt32=null;Rt.prototype.visitInt64=null;Rt.prototype.visitUint8=null;Rt.prototype.visitUint16=null;Rt.prototype.visitUint32=null;Rt.prototype.visitUint64=null;Rt.prototype.visitFloat16=null;Rt.prototype.visitFloat32=null;Rt.prototype.visitFloat64=null;Rt.prototype.visitDateDay=null;Rt.prototype.visitDateMillisecond=null;Rt.prototype.visitTimestampSecond=null;Rt.prototype.visitTimestampMillisecond=null;Rt.prototype.visitTimestampMicrosecond=null;Rt.prototype.visitTimestampNanosecond=null;Rt.prototype.visitTimeSecond=null;Rt.prototype.visitTimeMillisecond=null;Rt.prototype.visitTimeMicrosecond=null;Rt.prototype.visitTimeNanosecond=null;Rt.prototype.visitDenseUnion=null;Rt.prototype.visitSparseUnion=null;Rt.prototype.visitIntervalDayTime=null;Rt.prototype.visitIntervalYearMonth=null;Rt.prototype.visitDuration=null;Rt.prototype.visitDurationSecond=null;Rt.prototype.visitDurationMillisecond=null;Rt.prototype.visitDurationMicrosecond=null;Rt.prototype.visitDurationNanosecond=null;const qh=new Float64Array(1),ai=new Uint32Array(qh.buffer);function $h(n){const t=(n&31744)>>10,e=(n&1023)/1024,r=Math.pow(-1,(n&32768)>>15);switch(t){case 31:return r*(e?Number.NaN:1/0);case 0:return r*(e?6103515625e-14*e:0)}return r*Math.pow(2,t-15)*(1+e)}function Ry(n){if(n!==n)return 32256;qh[0]=n;const t=(ai[1]&2147483648)>>16&65535;let e=ai[1]&2146435072,r=0;return e>=1089470464?ai[0]>0?e=31744:(e=(e&2080374784)>>16,r=(ai[1]&1048575)>>10):e<=1056964608?(r=1048576+(ai[1]&1048575),r=1048576+(r<<(e>>20)-998)>>21,e=0):(e=e-1056964608>>10,r=(ai[1]&1048575)+512>>10),t|e|r&65535}class yt extends Rt{}function vt(n){return(t,e,r)=>{if(t.setValid(e,r!=null))return n(t,e,r)}}const Uy=(n,t,e)=>{n[t]=Math.floor(e/864e5)},Yh=(n,t,e,r)=>{if(e+1{const i=n+e;r?t[i>>3]|=1<>3]&=~(1<{n[t]=e},rc=({values:n},t,e)=>{n[t]=e},Kh=({values:n},t,e)=>{n[t]=Ry(e)},Vy=(n,t,e)=>{switch(n.type.precision){case He.HALF:return Kh(n,t,e);case He.SINGLE:case He.DOUBLE:return rc(n,t,e)}},Jh=({values:n},t,e)=>{Uy(n,t,e.valueOf())},Qh=({values:n},t,e)=>{n[t]=BigInt(e)},zy=({stride:n,values:t},e,r)=>{t.set(r.subarray(0,n),n*e)},Gh=({values:n,valueOffsets:t},e,r)=>Yh(n,t,e,r),Xh=({values:n,valueOffsets:t},e,r)=>Yh(n,t,e,Xl(r)),Wy=(n,t,e)=>{n.type.unit===wn.DAY?Jh(n,t,e):Qh(n,t,e)},Zh=({values:n},t,e)=>{n[t]=BigInt(e/1e3)},tm=({values:n},t,e)=>{n[t]=BigInt(e)},em=({values:n},t,e)=>{n[t]=BigInt(e*1e3)},nm=({values:n},t,e)=>{n[t]=BigInt(e*1e6)},Hy=(n,t,e)=>{switch(n.type.unit){case gt.SECOND:return Zh(n,t,e);case gt.MILLISECOND:return tm(n,t,e);case gt.MICROSECOND:return em(n,t,e);case gt.NANOSECOND:return nm(n,t,e)}},rm=({values:n},t,e)=>{n[t]=e},im=({values:n},t,e)=>{n[t]=e},sm=({values:n},t,e)=>{n[t]=e},om=({values:n},t,e)=>{n[t]=e},qy=(n,t,e)=>{switch(n.type.unit){case gt.SECOND:return rm(n,t,e);case gt.MILLISECOND:return im(n,t,e);case gt.MICROSECOND:return sm(n,t,e);case gt.NANOSECOND:return om(n,t,e)}},$y=({values:n,stride:t},e,r)=>{n.set(r.subarray(0,t),t*e)},Yy=(n,t,e)=>{const r=n.children[0],i=n.valueOffsets,s=Sn.getVisitFn(r);if(Array.isArray(e))for(let o=-1,a=i[t],l=i[t+1];a{const r=n.children[0],{valueOffsets:i}=n,s=Sn.getVisitFn(r);let{[t]:o,[t+1]:a}=i;const l=e instanceof Map?e.entries():Object.entries(e);for(const c of l)if(s(r,o,c),++o>=a)break},Jy=(n,t)=>(e,r,i,s)=>r&&e(r,n,t[s]),Qy=(n,t)=>(e,r,i,s)=>r&&e(r,n,t.get(s)),Gy=(n,t)=>(e,r,i,s)=>r&&e(r,n,t.get(i.name)),Xy=(n,t)=>(e,r,i,s)=>r&&e(r,n,t[i.name]),Zy=(n,t,e)=>{const r=n.type.children.map(s=>Sn.getVisitFn(s.type)),i=e instanceof Map?Gy(t,e):e instanceof ae?Qy(t,e):Array.isArray(e)?Jy(t,e):Xy(t,e);n.type.children.forEach((s,o)=>i(r[o],n.children[o],s,o))},t_=(n,t,e)=>{n.type.mode===ln.Dense?am(n,t,e):lm(n,t,e)},am=(n,t,e)=>{const r=n.type.typeIdToChildIndex[n.typeIds[t]],i=n.children[r];Sn.visit(i,n.valueOffsets[t],e)},lm=(n,t,e)=>{const r=n.type.typeIdToChildIndex[n.typeIds[t]],i=n.children[r];Sn.visit(i,t,e)},e_=(n,t,e)=>{var r;(r=n.dictionary)===null||r===void 0||r.set(n.values[t],e)},n_=(n,t,e)=>{n.type.unit===Xn.DAY_TIME?cm(n,t,e):um(n,t,e)},cm=({values:n},t,e)=>{n.set(e.subarray(0,2),2*t)},um=({values:n},t,e)=>{n[t]=e[0]*12+e[1]%12},fm=({values:n},t,e)=>{n[t]=e},dm=({values:n},t,e)=>{n[t]=e},hm=({values:n},t,e)=>{n[t]=e},mm=({values:n},t,e)=>{n[t]=e},r_=(n,t,e)=>{switch(n.type.unit){case gt.SECOND:return fm(n,t,e);case gt.MILLISECOND:return dm(n,t,e);case gt.MICROSECOND:return hm(n,t,e);case gt.NANOSECOND:return mm(n,t,e)}},i_=(n,t,e)=>{const{stride:r}=n,i=n.children[0],s=Sn.getVisitFn(i);if(Array.isArray(e))for(let o=-1,a=t*r;++o`${Vs(t)}: ${Vs(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new s_(this[En],this[Pi])}}class s_{constructor(t,e){this.childIndex=0,this.children=t.children,this.rowIndex=e,this.childFields=t.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){const t=this.childIndex;return te.name)}has(t,e){return t[En].type.children.findIndex(r=>r.name===e)!==-1}getOwnPropertyDescriptor(t,e){if(t[En].type.children.findIndex(r=>r.name===e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const r=t[En].type.children.findIndex(i=>i.name===e);if(r!==-1){const i=cn.visit(t[En].children[r],t[Pi]);return Reflect.set(t,e,i),i}}set(t,e,r){const i=t[En].type.children.findIndex(s=>s.name===e);return i!==-1?(Sn.visit(t[En].children[i],t[Pi],r),Reflect.set(t,e,r)):Reflect.has(t,e)||typeof e=="symbol"?Reflect.set(t,e,r):!1}}class dt extends Rt{}function _t(n){return(t,e)=>t.getValid(e)?n(t,e):null}const a_=(n,t)=>864e5*n[t],l_=(n,t)=>null,pm=(n,t,e)=>{if(e+1>=t.length)return null;const r=pe(t[e]),i=pe(t[e+1]);return n.subarray(r,i)},c_=({offset:n,values:t},e)=>{const r=n+e;return(t[r>>3]&1<a_(n,t),ym=({values:n},t)=>pe(n[t]),jr=({stride:n,values:t},e)=>t[n*e],u_=({stride:n,values:t},e)=>$h(t[n*e]),_m=({values:n},t)=>n[t],f_=({stride:n,values:t},e)=>t.subarray(n*e,n*(e+1)),bm=({values:n,valueOffsets:t},e)=>pm(n,t,e),vm=({values:n,valueOffsets:t},e)=>{const r=pm(n,t,e);return r!==null?wl(r):null},d_=({values:n},t)=>n[t],h_=({type:n,values:t},e)=>n.precision!==He.HALF?t[e]:$h(t[e]),m_=(n,t)=>n.type.unit===wn.DAY?gm(n,t):ym(n,t),wm=({values:n},t)=>1e3*pe(n[t]),Sm=({values:n},t)=>pe(n[t]),Im=({values:n},t)=>wh(n[t],BigInt(1e3)),Om=({values:n},t)=>wh(n[t],BigInt(1e6)),p_=(n,t)=>{switch(n.type.unit){case gt.SECOND:return wm(n,t);case gt.MILLISECOND:return Sm(n,t);case gt.MICROSECOND:return Im(n,t);case gt.NANOSECOND:return Om(n,t)}},Dm=({values:n},t)=>n[t],km=({values:n},t)=>n[t],Em=({values:n},t)=>n[t],Am=({values:n},t)=>n[t],g_=(n,t)=>{switch(n.type.unit){case gt.SECOND:return Dm(n,t);case gt.MILLISECOND:return km(n,t);case gt.MICROSECOND:return Em(n,t);case gt.NANOSECOND:return Am(n,t)}},y_=({values:n,stride:t},e)=>nc.decimal(n.subarray(t*e,t*(e+1))),__=(n,t)=>{const{valueOffsets:e,stride:r,children:i}=n,{[t*r]:s,[t*r+1]:o}=e,l=i[0].slice(s,o-s);return new ae([l])},b_=(n,t)=>{const{valueOffsets:e,children:r}=n,{[t]:i,[t+1]:s}=e,o=r[0];return new sc(o.slice(i,s-i))},v_=(n,t)=>new ic(n,t),w_=(n,t)=>n.type.mode===ln.Dense?Tm(n,t):Bm(n,t),Tm=(n,t)=>{const e=n.type.typeIdToChildIndex[n.typeIds[t]],r=n.children[e];return cn.visit(r,n.valueOffsets[t])},Bm=(n,t)=>{const e=n.type.typeIdToChildIndex[n.typeIds[t]],r=n.children[e];return cn.visit(r,t)},S_=(n,t)=>{var e;return(e=n.dictionary)===null||e===void 0?void 0:e.get(n.values[t])},I_=(n,t)=>n.type.unit===Xn.DAY_TIME?Pm(n,t):Mm(n,t),Pm=({values:n},t)=>n.subarray(2*t,2*(t+1)),Mm=({values:n},t)=>{const e=n[t],r=new Int32Array(2);return r[0]=Math.trunc(e/12),r[1]=Math.trunc(e%12),r},Nm=({values:n},t)=>n[t],Cm=({values:n},t)=>n[t],Fm=({values:n},t)=>n[t],jm=({values:n},t)=>n[t],O_=(n,t)=>{switch(n.type.unit){case gt.SECOND:return Nm(n,t);case gt.MILLISECOND:return Cm(n,t);case gt.MICROSECOND:return Fm(n,t);case gt.NANOSECOND:return jm(n,t)}},D_=(n,t)=>{const{stride:e,children:r}=n,s=r[0].slice(t*e,e);return new ae([s])};dt.prototype.visitNull=_t(l_);dt.prototype.visitBool=_t(c_);dt.prototype.visitInt=_t(d_);dt.prototype.visitInt8=_t(jr);dt.prototype.visitInt16=_t(jr);dt.prototype.visitInt32=_t(jr);dt.prototype.visitInt64=_t(_m);dt.prototype.visitUint8=_t(jr);dt.prototype.visitUint16=_t(jr);dt.prototype.visitUint32=_t(jr);dt.prototype.visitUint64=_t(_m);dt.prototype.visitFloat=_t(h_);dt.prototype.visitFloat16=_t(u_);dt.prototype.visitFloat32=_t(jr);dt.prototype.visitFloat64=_t(jr);dt.prototype.visitUtf8=_t(vm);dt.prototype.visitLargeUtf8=_t(vm);dt.prototype.visitBinary=_t(bm);dt.prototype.visitLargeBinary=_t(bm);dt.prototype.visitFixedSizeBinary=_t(f_);dt.prototype.visitDate=_t(m_);dt.prototype.visitDateDay=_t(gm);dt.prototype.visitDateMillisecond=_t(ym);dt.prototype.visitTimestamp=_t(p_);dt.prototype.visitTimestampSecond=_t(wm);dt.prototype.visitTimestampMillisecond=_t(Sm);dt.prototype.visitTimestampMicrosecond=_t(Im);dt.prototype.visitTimestampNanosecond=_t(Om);dt.prototype.visitTime=_t(g_);dt.prototype.visitTimeSecond=_t(Dm);dt.prototype.visitTimeMillisecond=_t(km);dt.prototype.visitTimeMicrosecond=_t(Em);dt.prototype.visitTimeNanosecond=_t(Am);dt.prototype.visitDecimal=_t(y_);dt.prototype.visitList=_t(__);dt.prototype.visitStruct=_t(v_);dt.prototype.visitUnion=_t(w_);dt.prototype.visitDenseUnion=_t(Tm);dt.prototype.visitSparseUnion=_t(Bm);dt.prototype.visitDictionary=_t(S_);dt.prototype.visitInterval=_t(I_);dt.prototype.visitIntervalDayTime=_t(Pm);dt.prototype.visitIntervalYearMonth=_t(Mm);dt.prototype.visitDuration=_t(O_);dt.prototype.visitDurationSecond=_t(Nm);dt.prototype.visitDurationMillisecond=_t(Cm);dt.prototype.visitDurationMicrosecond=_t(Fm);dt.prototype.visitDurationNanosecond=_t(jm);dt.prototype.visitFixedSizeList=_t(D_);dt.prototype.visitMap=_t(b_);const cn=new dt,Si=Symbol.for("keys"),Mi=Symbol.for("vals"),Ii=Symbol.for("kKeysAsStrings"),El=Symbol.for("_kKeysAsStrings");class sc{constructor(t){return this[Si]=new ae([t.children[0]]).memoize(),this[Mi]=t.children[1],new Proxy(this,new E_)}get[Ii](){return this[El]||(this[El]=Array.from(this[Si].toArray(),String))}[Symbol.iterator](){return new k_(this[Si],this[Mi])}get size(){return this[Si].length}toArray(){return Object.values(this.toJSON())}toJSON(){const t=this[Si],e=this[Mi],r={};for(let i=-1,s=t.length;++i`${Vs(t)}: ${Vs(e)}`).join(", ")}}`}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}}class k_{constructor(t,e){this.keys=t,this.vals=e,this.keyIndex=0,this.numKeys=t.length}[Symbol.iterator](){return this}next(){const t=this.keyIndex;return t===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(t),cn.visit(this.vals,t)]})}}class E_{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(t){return t[Ii]}has(t,e){return t[Ii].includes(e)}getOwnPropertyDescriptor(t,e){if(t[Ii].indexOf(e)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(t,e){if(Reflect.has(t,e))return t[e];const r=t[Ii].indexOf(e);if(r!==-1){const i=cn.visit(Reflect.get(t,Mi),r);return Reflect.set(t,e,i),i}}set(t,e,r){const i=t[Ii].indexOf(e);return i!==-1?(Sn.visit(Reflect.get(t,Mi),i,r),Reflect.set(t,e,r)):Reflect.has(t,e)?Reflect.set(t,e,r):!1}}Object.defineProperties(sc.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Si]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Mi]:{writable:!0,enumerable:!1,configurable:!1,value:null},[El]:{writable:!0,enumerable:!1,configurable:!1,value:null}});let lu;function Lm(n,t,e,r){const{length:i=0}=n;let s=typeof t!="number"?0:t,o=typeof e!="number"?i:e;return s<0&&(s=(s%i+i)%i),o<0&&(o=(o%i+i)%i),oi&&(o=i),r?r(n,s,o):[s,o]}const oc=(n,t)=>n<0?t+n:n,cu=n=>n!==n;function Wi(n){if(typeof n!=="object"||n===null)return cu(n)?cu:e=>e===n;if(n instanceof Date){const e=n.valueOf();return r=>r instanceof Date?r.valueOf()===e:!1}return ArrayBuffer.isView(n)?e=>e?Dy(n,e):!1:n instanceof Map?T_(n):Array.isArray(n)?A_(n):n instanceof ae?B_(n):P_(n,!0)}function A_(n){const t=[];for(let e=-1,r=n.length;++e!1;const r=[];for(let i=-1,s=e.length;++i{if(!e||typeof e!="object")return!1;switch(e.constructor){case Array:return M_(n,e);case Map:return uu(n,e,e.keys());case sc:case ic:case Object:case void 0:return uu(n,e,t||Object.keys(e))}return e instanceof ae?N_(n,e):!1}}function M_(n,t){const e=n.length;if(t.length!==e)return!1;for(let r=-1;++r>r}function fu(n,t,e){const r=e.byteLength+7&-8;if(n>0||e.byteLength>3):Al(new ac(e,n,t,null,Rm)).subarray(0,r)),i}return e}function Al(n){const t=[];let e=0,r=0,i=0;for(const o of n)o&&(i|=1<0)&&(t[e++]=i);const s=new Uint8Array(t.length+7&-8);return s.set(t),s}class ac{constructor(t,e,r,i,s){this.bytes=t,this.length=r,this.context=i,this.get=s,this.bit=e%8,this.byteIndex=e>>3,this.byte=t[this.byteIndex++],this.index=0}next(){return this.index>3<<3,i=t+(t%8===0?0:8-t%8);return Tl(n,t,i)+Tl(n,r,e)+F_(n,i>>3,r-i>>3)}function F_(n,t,e){let r=0,i=Math.trunc(t);const s=new DataView(n.buffer,n.byteOffset,n.byteLength),o=e===void 0?n.byteLength:i+e;for(;o-i>=4;)r+=tl(s.getUint32(i)),i+=4;for(;o-i>=2;)r+=tl(s.getUint16(i)),i+=2;for(;o-i>=1;)r+=tl(s.getUint8(i)),i+=1;return r}function tl(n){let t=Math.trunc(n);return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}const j_=-1;class ee{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){const{type:t}=this;return ct.isSparseUnion(t)?this.children.some(e=>e.nullable):ct.isDenseUnion(t)?this.children.some(e=>e.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0;const{valueOffsets:e,values:r,nullBitmap:i,typeIds:s}=this;return e&&(t+=e.byteLength),r&&(t+=r.byteLength),i&&(t+=i.byteLength),s&&(t+=s.byteLength),this.children.reduce((o,a)=>o+a.byteLength,t)}get nullCount(){if(ct.isUnion(this.type))return this.children.reduce((r,i)=>r+i.nullCount,0);let t=this._nullCount,e;return t<=j_&&(e=this.nullBitmap)&&(this._nullCount=t=e.length===0?0:this.length-Tl(e,this.offset,this.offset+this.length)),t}constructor(t,e,r,i,s,o=[],a){this.type=t,this.children=o,this.dictionary=a,this.offset=Math.floor(Math.max(e||0,0)),this.length=Math.floor(Math.max(r||0,0)),this._nullCount=Math.floor(Math.max(i||0,-1));let l;s instanceof ee?(this.stride=s.stride,this.values=s.values,this.typeIds=s.typeIds,this.nullBitmap=s.nullBitmap,this.valueOffsets=s.valueOffsets):(this.stride=or(t),s&&((l=s[0])&&(this.valueOffsets=l),(l=s[1])&&(this.values=l),(l=s[2])&&(this.nullBitmap=l),(l=s[3])&&(this.typeIds=l)))}getValid(t){const{type:e}=this;if(ct.isUnion(e)){const r=e,i=this.children[r.typeIdToChildIndex[this.typeIds[t]]],s=r.mode===ln.Dense?this.valueOffsets[t]:t;return i.getValid(s)}if(this.nullable&&this.nullCount>0){const r=this.offset+t;return(this.nullBitmap[r>>3]&1<>3;(!s||s.byteLength<=u)&&(s=new Uint8Array((o+a+63&-64)>>3).fill(255),this.nullCount>0?(s.set(fu(o,a,this.nullBitmap),0),Object.assign(this,{nullBitmap:s})):Object.assign(this,{nullBitmap:s,_nullCount:0}));const f=s[u];r=(f&c)!==0,s[u]=e?f|c:f&~c}return r!==!!e&&(this._nullCount=this.nullCount+(e?-1:1)),e}clone(t=this.type,e=this.offset,r=this.length,i=this._nullCount,s=this,o=this.children){return new ee(t,e,r,i,s,o,this.dictionary)}slice(t,e){const{stride:r,typeId:i,children:s}=this,o=+(this._nullCount===0)-1,a=i===16?r:1,l=this._sliceBuffers(t,e,r,i);return this.clone(this.type,this.offset+t,e,o,l,s.length===0||this.valueOffsets?s:this._sliceChildren(s,a*t,a*e))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===A.Null)return this.clone(this.type,0,t,0);const{length:e,nullCount:r}=this,i=new Uint8Array((t+63&-64)>>3).fill(255,0,e>>3);i[e>>3]=(1<0&&i.set(fu(this.offset,e,this.nullBitmap),0);const s=this.buffers;return s[Ur.VALIDITY]=i,this.clone(this.type,0,t,r+(t-e),s)}_sliceBuffers(t,e,r,i){let s;const{buffers:o}=this;return(s=o[Ur.TYPE])&&(o[Ur.TYPE]=s.subarray(t,t+e)),(s=o[Ur.OFFSET])&&(o[Ur.OFFSET]=s.subarray(t,t+e+1))||(s=o[Ur.DATA])&&(o[Ur.DATA]=i===6?s:s.subarray(r*t,r*(t+e))),o}_sliceChildren(t,e,r){return t.map(i=>i.slice(e,r))}}ee.prototype.children=Object.freeze([]);class Ss extends Rt{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){const{["type"]:e,["offset"]:r=0,["length"]:i=0}=t;return new ee(e,r,i,i)}visitBool(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length>>3,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitInt(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitFloat(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitUtf8(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.data),s=Ht(t.nullBitmap),o=rs(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new ee(e,r,a,l,[o,i,s])}visitLargeUtf8(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.data),s=Ht(t.nullBitmap),o=Gc(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new ee(e,r,a,l,[o,i,s])}visitBinary(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.data),s=Ht(t.nullBitmap),o=rs(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new ee(e,r,a,l,[o,i,s])}visitLargeBinary(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.data),s=Ht(t.nullBitmap),o=Gc(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new ee(e,r,a,l,[o,i,s])}visitFixedSizeBinary(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length/or(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitDate(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length/or(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitTimestamp(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length/or(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitTime(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length/or(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitDecimal(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length/or(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitList(t){const{["type"]:e,["offset"]:r=0,["child"]:i}=t,s=Ht(t.nullBitmap),o=rs(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new ee(e,r,a,l,[o,void 0,s],[i])}visitStruct(t){const{["type"]:e,["offset"]:r=0,["children"]:i=[]}=t,s=Ht(t.nullBitmap),{length:o=i.reduce((l,{length:c})=>Math.max(l,c),0),nullCount:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,void 0,s],i)}visitUnion(t){const{["type"]:e,["offset"]:r=0,["children"]:i=[]}=t,s=ie(e.ArrayType,t.typeIds),{["length"]:o=s.length,["nullCount"]:a=-1}=t;if(ct.isSparseUnion(e))return new ee(e,r,o,a,[void 0,void 0,void 0,s],i);const l=rs(t.valueOffsets);return new ee(e,r,o,a,[l,void 0,void 0,s],i)}visitDictionary(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.indices.ArrayType,t.data),{["dictionary"]:o=new ae([new Ss().visit({type:e.dictionary})])}=t,{["length"]:a=s.length,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new ee(e,r,a,l,[void 0,s,i],[],o)}visitInterval(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length/or(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitDuration(t){const{["type"]:e,["offset"]:r=0}=t,i=Ht(t.nullBitmap),s=ie(e.ArrayType,t.data),{["length"]:o=s.length,["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,s,i])}visitFixedSizeList(t){const{["type"]:e,["offset"]:r=0,["child"]:i=new Ss().visit({type:e.valueType})}=t,s=Ht(t.nullBitmap),{["length"]:o=i.length/or(e),["nullCount"]:a=t.nullBitmap?-1:0}=t;return new ee(e,r,o,a,[void 0,void 0,s],[i])}visitMap(t){const{["type"]:e,["offset"]:r=0,["child"]:i=new Ss().visit({type:e.childType})}=t,s=Ht(t.nullBitmap),o=rs(t.valueOffsets),{["length"]:a=o.length-1,["nullCount"]:l=t.nullBitmap?-1:0}=t;return new ee(e,r,a,l,[o,void 0,s],[i])}}const L_=new Ss;function Lt(n){return L_.visit(n)}class du{constructor(t=0,e){this.numChunks=t,this.getChunkIterator=e,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function Um(n){return n.reduce((t,e)=>t+e.nullCount,0)}function xm(n){return n.reduce((t,e,r)=>(t[r+1]=t[r]+e.length,t),new Uint32Array(n.length+1))}function Vm(n,t,e,r){const i=[];for(let s=-1,o=n.length;++s=r)break;if(e>=l+c)continue;if(l>=e&&l+c<=r){i.push(a);continue}const u=Math.max(0,e-l),f=Math.min(r-l,c);i.push(a.slice(u,f-u))}return i.length===0&&i.push(n[0].slice(0,0)),i}function lc(n,t,e,r){let i=0,s=0,o=t.length-1;do{if(i>=o-1)return e0?0:-1}function x_(n,t){const{nullBitmap:e}=n;if(!e||n.nullCount<=0)return-1;let r=0;for(const i of new ac(e,n.offset+(t||0),n.length,e,Rm)){if(!i)return r;++r}return-1}function Ot(n,t,e){if(t===void 0)return-1;if(t===null)switch(n.typeId){case A.Union:break;case A.Dictionary:break;default:return x_(n,e)}const r=cn.getVisitFn(n),i=Wi(t);for(let s=(e||0)-1,o=n.length;++s{const i=n.data[r];return i.values.subarray(0,i.length)[Symbol.iterator]()});let e=0;return new du(n.data.length,r=>{const s=n.data[r].length,o=n.slice(e,e+s);return e+=s,new V_(o)})}class V_{constructor(t){this.vector=t,this.index=0}next(){return this.indexa.data):t;if(s.length===0||s.some(a=>!(a instanceof ee)))throw new TypeError("Vector constructor expects an Array of Data instances.");const o=(e=s[0])===null||e===void 0?void 0:e.type;switch(s.length){case 0:this._offsets=[0];break;case 1:{const{get:a,set:l,indexOf:c}=$m[o.typeId],u=s[0];this.isValid=f=>cc(u,f),this.get=f=>a(u,f),this.set=(f,h)=>l(u,f,h),this.indexOf=f=>c(u,f),this._offsets=[0,u.length];break}default:Object.setPrototypeOf(this,Ym[o.typeId]),this._offsets=xm(s);break}this.data=s,this.type=o,this.stride=or(o),this.numChildren=(i=(r=o.children)===null||r===void 0?void 0:r.length)!==null&&i!==void 0?i:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,e)=>t+e.byteLength,0)}get nullable(){return R_(this.data)}get nullCount(){return Um(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return`${this.VectorName}<${this.type[Symbol.toStringTag]}>`}get VectorName(){return`${A[this.type.typeId]}Vector`}isValid(t){return!1}get(t){return null}at(t){return this.get(oc(t,this.length))}set(t,e){}indexOf(t,e){return-1}includes(t,e){return this.indexOf(t,e)>-1}[Symbol.iterator](){return uc.visit(this)}concat(...t){return new ae(this.data.concat(t.flatMap(e=>e.data).flat(Number.POSITIVE_INFINITY)))}slice(t,e){return new ae(Lm(this,t,e,({data:r,_offsets:i},s,o)=>Vm(r,i,s,o)))}toJSON(){return[...this]}toArray(){const{type:t,data:e,length:r,stride:i,ArrayType:s}=this;switch(t.typeId){case A.Int:case A.Float:case A.Decimal:case A.Time:case A.Timestamp:switch(e.length){case 0:return new s;case 1:return e[0].values.subarray(0,r*i);default:return e.reduce((o,{values:a,length:l})=>(o.array.set(a.subarray(0,l*i),o.offset),o.offset+=l*i,o),{array:new s(r*i),offset:0}).array}}return[...this]}toString(){return`[${[...this].join(",")}]`}getChild(t){var e;return this.getChildAt((e=this.type.children)===null||e===void 0?void 0:e.findIndex(r=>r.name===t))}getChildAt(t){return t>-1&&te[t])):null}get isMemoized(){return ct.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(ct.isDictionary(this.type)){const t=new ba(this.data[0].dictionary),e=this.data.map(r=>{const i=r.clone();return i.dictionary=t,i});return new ae(e)}return new ba(this)}unmemoize(){if(ct.isDictionary(this.type)&&this.isMemoized){const t=this.data[0].dictionary.unmemoize(),e=this.data.map(r=>{const i=r.clone();return i.dictionary=t,i});return new ae(e)}return this}}qm=Symbol.toStringTag;ae[qm]=(n=>{n.type=ct.prototype,n.data=[],n.length=0,n.stride=1,n.numChildren=0,n._offsets=new Uint32Array([0]),n[Symbol.isConcatSpreadable]=!0;const t=Object.keys(A).map(e=>A[e]).filter(e=>typeof e=="number"&&e!==A.NONE);for(const e of t){const r=cn.getVisitFnByTypeId(e),i=Sn.getVisitFnByTypeId(e),s=_a.getVisitFnByTypeId(e);$m[e]={get:r,set:i,indexOf:s},Ym[e]=Object.create(n,{isValid:{value:ya(cc)},get:{value:ya(cn.getVisitFnByTypeId(e))},set:{value:zm(Sn.getVisitFnByTypeId(e))},indexOf:{value:Wm(_a.getVisitFnByTypeId(e))}})}return"Vector"})(ae.prototype);class ba extends ae{constructor(t){super(t.data);const e=this.get,r=this.set,i=this.slice,s=new Array(this.length);Object.defineProperty(this,"get",{value(o){const a=s[o];if(a!==void 0)return a;const l=e.call(this,o);return s[o]=l,l}}),Object.defineProperty(this,"set",{value(o,a){r.call(this,o,a),s[o]=a}}),Object.defineProperty(this,"slice",{value:(o,a)=>new ba(i.call(this,o,a))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new ae(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}}class Bl{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(t,e,r,i){return t.prep(8,24),t.writeInt64(BigInt(i??0)),t.pad(4),t.writeInt32(r),t.writeInt64(BigInt(e??0)),t.offset()}}class fn{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsFooter(t,e){return(e||new fn).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,e){return t.setPosition(t.position()+te),(e||new fn).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):Pe.V1}schema(t){const e=this.bb.__offset(this.bb_pos,6);return e?(t||new xn).__init(this.bb.__indirect(this.bb_pos+e),this.bb):null}dictionaries(t,e){const r=this.bb.__offset(this.bb_pos,8);return r?(e||new Bl).__init(this.bb.__vector(this.bb_pos+r)+t*24,this.bb):null}dictionariesLength(){const t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,e){const r=this.bb.__offset(this.bb_pos,10);return r?(e||new Bl).__init(this.bb.__vector(this.bb_pos+r)+t*24,this.bb):null}recordBatchesLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,e){const r=this.bb.__offset(this.bb_pos,12);return r?(e||new Ce).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,Pe.V1)}static addSchema(t,e){t.addFieldOffset(1,e,0)}static addDictionaries(t,e){t.addFieldOffset(2,e,0)}static startDictionariesVector(t,e){t.startVector(24,e,8)}static addRecordBatches(t,e){t.addFieldOffset(3,e,0)}static startRecordBatchesVector(t,e){t.startVector(24,e,8)}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let r=e.length-1;r>=0;r--)t.addOffset(e[r]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,e){t.finish(e)}static finishSizePrefixedFooterBuffer(t,e){t.finish(e,void 0,!0)}}class Xt{constructor(t=[],e,r,i=Pe.V5){this.fields=t||[],this.metadata=e||new Map,r||(r=Pl(this.fields)),this.dictionaries=r,this.metadataVersion=i}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(t=>t.name)}toString(){return`Schema<{ ${this.fields.map((t,e)=>`${e}: ${t}`).join(", ")} }>`}select(t){const e=new Set(t),r=this.fields.filter(i=>e.has(i.name));return new Xt(r,this.metadata)}selectAt(t){const e=t.map(r=>this.fields[r]).filter(Boolean);return new Xt(e,this.metadata)}assign(...t){const e=t[0]instanceof Xt?t[0]:Array.isArray(t[0])?new Xt(t[0]):new Xt(t),r=[...this.fields],i=bo(bo(new Map,this.metadata),e.metadata),s=e.fields.filter(a=>{const l=r.findIndex(c=>c.name===a.name);return~l?(r[l]=a.clone({metadata:bo(bo(new Map,r[l].metadata),a.metadata)}))&&!1:!0}),o=Pl(s,new Map);return new Xt([...r,...s],i,new Map([...this.dictionaries,...o]))}}Xt.prototype.fields=null;Xt.prototype.metadata=null;Xt.prototype.dictionaries=null;class ge{static new(...t){let[e,r,i,s]=t;return t[0]&&typeof t[0]=="object"&&({name:e}=t[0],r===void 0&&(r=t[0].type),i===void 0&&(i=t[0].nullable),s===void 0&&(s=t[0].metadata)),new ge(`${e}`,r,i,s)}constructor(t,e,r=!1,i){this.name=t,this.type=e,this.nullable=r,this.metadata=i||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return`${this.name}: ${this.type}`}clone(...t){let[e,r,i,s]=t;return!t[0]||typeof t[0]!="object"?[e=this.name,r=this.type,i=this.nullable,s=this.metadata]=t:{name:e=this.name,type:r=this.type,nullable:i=this.nullable,metadata:s=this.metadata}=t[0],ge.new(e,r,i,s)}}ge.prototype.type=null;ge.prototype.name=null;ge.prototype.nullable=null;ge.prototype.metadata=null;function bo(n,t){return new Map([...n||new Map,...t||new Map])}function Pl(n,t=new Map){for(let e=-1,r=n.length;++e0&&Pl(s.children,t)}return t}var z_=yh,W_=Fi;class fc{static decode(t){t=new W_(Ht(t));const e=fn.getRootAsFooter(t),r=Xt.decode(e.schema(),new Map,e.version());return new H_(r,e)}static encode(t){const e=new z_,r=Xt.encode(e,t.schema);fn.startRecordBatchesVector(e,t.numRecordBatches);for(const o of[...t.recordBatches()].slice().reverse())Ri.encode(e,o);const i=e.endVector();fn.startDictionariesVector(e,t.numDictionaries);for(const o of[...t.dictionaryBatches()].slice().reverse())Ri.encode(e,o);const s=e.endVector();return fn.startFooter(e),fn.addSchema(e,r),fn.addVersion(e,Pe.V5),fn.addRecordBatches(e,i),fn.addDictionaries(e,s),fn.finishFooterBuffer(e,fn.endFooter(e)),e.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(t,e=Pe.V5,r,i){this.schema=t,this.version=e,r&&(this._recordBatches=r),i&&(this._dictionaryBatches=i)}*recordBatches(){for(let t,e=-1,r=this.numRecordBatches;++e=0&&t=0&&t=0&&t=0&&tthis._closedPromiseResolve=t)}get closed(){return this._closedPromise}cancel(t){return Dt(this,void 0,void 0,function*(){yield this.return(t)})}write(t){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(t):this.resolvers.shift().resolve({done:!1,value:t}))}abort(t){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:t}:this.resolvers.shift().reject({done:!0,value:t}))}close(){if(this._closedPromiseResolve){const{resolvers:t}=this;for(;t.length>0;)t.shift().resolve(we);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(t){return gn.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,t)}toNodeStream(t){return gn.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,t)}throw(t){return Dt(this,void 0,void 0,function*(){return yield this.abort(t),we})}return(t){return Dt(this,void 0,void 0,function*(){return yield this.close(),we})}read(t){return Dt(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return Dt(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(...t){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((e,r)=>{this.resolvers.push({resolve:e,reject:r})}):Promise.resolve(we)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}}class $_ extends q_{write(t){if((t=Ht(t)).byteLength>0)return super.write(t)}toString(t=!1){return t?wl(this.toUint8Array(!0)):this.toUint8Array(!1).then(wl)}toUint8Array(t=!1){return t?Gn(this._values)[0]:Dt(this,void 0,void 0,function*(){var e,r,i,s;const o=[];let a=0;try{for(var l=!0,c=Ai(this),u;u=yield c.next(),e=u.done,!e;l=!0){s=u.value,l=!1;const f=s;o.push(f),a+=f.byteLength}}catch(f){r={error:f}}finally{try{!l&&!e&&(i=c.return)&&(yield i.call(c))}finally{if(r)throw r.error}}return Gn(o,a)[0]})}}class va{constructor(t){t&&(this.source=new Y_(gn.fromIterable(t)))}[Symbol.iterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class Ui{constructor(t){t instanceof Ui?this.source=t.source:t instanceof $_?this.source=new Vr(gn.fromAsyncIterable(t)):mh(t)?this.source=new Vr(gn.fromNodeStream(t)):tc(t)?this.source=new Vr(gn.fromDOMStream(t)):dh(t)?this.source=new Vr(gn.fromDOMStream(t.body)):Na(t)?this.source=new Vr(gn.fromIterable(t)):xs(t)?this.source=new Vr(gn.fromAsyncIterable(t)):Zl(t)&&(this.source=new Vr(gn.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}}class Y_{constructor(t){this.source=t}cancel(t){this.return(t)}peek(t){return this.next(t,"peek").value}read(t){return this.next(t,"read").value}next(t,e="read"){return this.source.next({cmd:e,size:t})}throw(t){return Object.create(this.source.throw&&this.source.throw(t)||we)}return(t){return Object.create(this.source.return&&this.source.return(t)||we)}}class Vr{constructor(t){this.source=t,this._closedPromise=new Promise(e=>this._closedPromiseResolve=e)}cancel(t){return Dt(this,void 0,void 0,function*(){yield this.return(t)})}get closed(){return this._closedPromise}read(t){return Dt(this,void 0,void 0,function*(){return(yield this.next(t,"read")).value})}peek(t){return Dt(this,void 0,void 0,function*(){return(yield this.next(t,"peek")).value})}next(t){return Dt(this,arguments,void 0,function*(e,r="read"){return yield this.source.next({cmd:r,size:e})})}throw(t){return Dt(this,void 0,void 0,function*(){const e=this.source.throw&&(yield this.source.throw(t))||we;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}return(t){return Dt(this,void 0,void 0,function*(){const e=this.source.return&&(yield this.source.return(t))||we;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(e)})}}class mu extends va{constructor(t,e){super(),this.position=0,this.buffer=Ht(t),this.size=e===void 0?this.buffer.byteLength:e}readInt32(t){const{buffer:e,byteOffset:r}=this.readAt(t,4);return new DataView(e,r).getInt32(0,!0)}seek(t){return this.position=Math.min(t,this.size),t>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),r=new Uint32Array([t.buffer[1]>>>16,t.buffer[1]&65535,t.buffer[0]>>>16,t.buffer[0]&65535]);let i=e[3]*r[3];this.buffer[0]=i&65535;let s=i>>>16;return i=e[2]*r[3],s+=i,i=e[3]*r[2]>>>0,s+=i,this.buffer[0]+=s<<16,this.buffer[1]=s>>>0>>16,this.buffer[1]+=e[1]*r[3]+e[2]*r[2]+e[3]*r[1],this.buffer[1]+=e[0]*r[3]+e[1]*r[2]+e[2]*r[1]+e[3]*r[0]<<16,this}_plus(t){const e=this.buffer[0]+t.buffer[0]>>>0;this.buffer[1]+=t.buffer[1],e>>0&&++this.buffer[1],this.buffer[0]=e}lessThan(t){return this.buffer[1]>>0,e[2]=this.buffer[2]+t.buffer[2]>>>0,e[1]=this.buffer[1]+t.buffer[1]>>>0,e[0]=this.buffer[0]+t.buffer[0]>>>0,e[0]>>0&&++e[1],e[1]>>0&&++e[2],e[2]>>0&&++e[3],this.buffer[3]=e[3],this.buffer[2]=e[2],this.buffer[1]=e[1],this.buffer[0]=e[0],this}hex(){return`${Di(this.buffer[3])} ${Di(this.buffer[2])} ${Di(this.buffer[1])} ${Di(this.buffer[0])}`}static multiply(t,e){return new Vn(new Uint32Array(t.buffer)).times(e)}static add(t,e){return new Vn(new Uint32Array(t.buffer)).plus(e)}static from(t,e=new Uint32Array(4)){return Vn.fromString(typeof t=="string"?t:t.toString(),e)}static fromNumber(t,e=new Uint32Array(4)){return Vn.fromString(t.toString(),e)}static fromString(t,e=new Uint32Array(4)){const r=t.startsWith("-"),i=t.length,s=new Vn(e);for(let o=r?1:0;o0&&this.readData(t,r)||new Uint8Array(0)}readOffsets(t,e){return this.readData(t,e)}readTypeIds(t,e){return this.readData(t,e)}readData(t,{length:e,offset:r}=this.nextBufferRange()){return this.bytes.subarray(r,r+e)}readDictionary(t){return this.dictionaries.get(t.id)}}class J_ extends Qm{constructor(t,e,r,i,s){super(new Uint8Array(0),e,r,i,s),this.sources=t}readNullBitmap(t,e,{offset:r}=this.nextBufferRange()){return e<=0?new Uint8Array(0):Al(this.sources[r])}readOffsets(t,{offset:e}=this.nextBufferRange()){return ie(Uint8Array,ie(t.OffsetArrayType,this.sources[e]))}readTypeIds(t,{offset:e}=this.nextBufferRange()){return ie(Uint8Array,ie(t.ArrayType,this.sources[e]))}readData(t,{offset:e}=this.nextBufferRange()){const{sources:r}=this;return ct.isTimestamp(t)||(ct.isInt(t)||ct.isTime(t))&&t.bitWidth===64||ct.isDuration(t)||ct.isDate(t)&&t.unit===wn.MILLISECOND?ie(Uint8Array,rn.convertArray(r[e])):ct.isDecimal(t)?ie(Uint8Array,Vn.convertArray(r[e])):ct.isBinary(t)||ct.isLargeBinary(t)||ct.isFixedSizeBinary(t)?Q_(r[e]):ct.isBool(t)?Al(r[e]):ct.isUtf8(t)||ct.isLargeUtf8(t)?Xl(r[e].join("")):ie(Uint8Array,ie(t.ArrayType,r[e].map(i=>+i)))}}function Q_(n){const t=n.join(""),e=new Uint8Array(t.length/2);for(let r=0;r>1]=Number.parseInt(t.slice(r,r+2),16);return e}class pt extends Rt{compareSchemas(t,e){return t===e||e instanceof t.constructor&&this.compareManyFields(t.fields,e.fields)}compareManyFields(t,e){return t===e||Array.isArray(t)&&Array.isArray(e)&&t.length===e.length&&t.every((r,i)=>this.compareFields(r,e[i]))}compareFields(t,e){return t===e||e instanceof t.constructor&&t.name===e.name&&t.nullable===e.nullable&&this.visit(t.type,e.type)}}function Ze(n,t){return t instanceof n.constructor}function ni(n,t){return n===t||Ze(n,t)}function br(n,t){return n===t||Ze(n,t)&&n.bitWidth===t.bitWidth&&n.isSigned===t.isSigned}function Fa(n,t){return n===t||Ze(n,t)&&n.precision===t.precision}function G_(n,t){return n===t||Ze(n,t)&&n.byteWidth===t.byteWidth}function hc(n,t){return n===t||Ze(n,t)&&n.unit===t.unit}function to(n,t){return n===t||Ze(n,t)&&n.unit===t.unit&&n.timezone===t.timezone}function eo(n,t){return n===t||Ze(n,t)&&n.unit===t.unit&&n.bitWidth===t.bitWidth}function X_(n,t){return n===t||Ze(n,t)&&n.children.length===t.children.length&&Mr.compareManyFields(n.children,t.children)}function Z_(n,t){return n===t||Ze(n,t)&&n.children.length===t.children.length&&Mr.compareManyFields(n.children,t.children)}function mc(n,t){return n===t||Ze(n,t)&&n.mode===t.mode&&n.typeIds.every((e,r)=>e===t.typeIds[r])&&Mr.compareManyFields(n.children,t.children)}function tb(n,t){return n===t||Ze(n,t)&&n.id===t.id&&n.isOrdered===t.isOrdered&&Mr.visit(n.indices,t.indices)&&Mr.visit(n.dictionary,t.dictionary)}function pc(n,t){return n===t||Ze(n,t)&&n.unit===t.unit}function no(n,t){return n===t||Ze(n,t)&&n.unit===t.unit}function eb(n,t){return n===t||Ze(n,t)&&n.listSize===t.listSize&&n.children.length===t.children.length&&Mr.compareManyFields(n.children,t.children)}function nb(n,t){return n===t||Ze(n,t)&&n.keysSorted===t.keysSorted&&n.children.length===t.children.length&&Mr.compareManyFields(n.children,t.children)}pt.prototype.visitNull=ni;pt.prototype.visitBool=ni;pt.prototype.visitInt=br;pt.prototype.visitInt8=br;pt.prototype.visitInt16=br;pt.prototype.visitInt32=br;pt.prototype.visitInt64=br;pt.prototype.visitUint8=br;pt.prototype.visitUint16=br;pt.prototype.visitUint32=br;pt.prototype.visitUint64=br;pt.prototype.visitFloat=Fa;pt.prototype.visitFloat16=Fa;pt.prototype.visitFloat32=Fa;pt.prototype.visitFloat64=Fa;pt.prototype.visitUtf8=ni;pt.prototype.visitLargeUtf8=ni;pt.prototype.visitBinary=ni;pt.prototype.visitLargeBinary=ni;pt.prototype.visitFixedSizeBinary=G_;pt.prototype.visitDate=hc;pt.prototype.visitDateDay=hc;pt.prototype.visitDateMillisecond=hc;pt.prototype.visitTimestamp=to;pt.prototype.visitTimestampSecond=to;pt.prototype.visitTimestampMillisecond=to;pt.prototype.visitTimestampMicrosecond=to;pt.prototype.visitTimestampNanosecond=to;pt.prototype.visitTime=eo;pt.prototype.visitTimeSecond=eo;pt.prototype.visitTimeMillisecond=eo;pt.prototype.visitTimeMicrosecond=eo;pt.prototype.visitTimeNanosecond=eo;pt.prototype.visitDecimal=ni;pt.prototype.visitList=X_;pt.prototype.visitStruct=Z_;pt.prototype.visitUnion=mc;pt.prototype.visitDenseUnion=mc;pt.prototype.visitSparseUnion=mc;pt.prototype.visitDictionary=tb;pt.prototype.visitInterval=pc;pt.prototype.visitIntervalDayTime=pc;pt.prototype.visitIntervalYearMonth=pc;pt.prototype.visitDuration=no;pt.prototype.visitDurationSecond=no;pt.prototype.visitDurationMillisecond=no;pt.prototype.visitDurationMicrosecond=no;pt.prototype.visitDurationNanosecond=no;pt.prototype.visitFixedSizeList=eb;pt.prototype.visitMap=nb;const Mr=new pt;function rb(n,t){return Mr.compareSchemas(n,t)}function el(n,t){return ib(n,t.map(e=>e.data.concat()))}function ib(n,t){const e=[...n.fields],r=[],i={numBatches:t.reduce((f,h)=>Math.max(f,h.length),0)};let s=0,o=0,a=-1;const l=t.length;let c,u=[];for(;i.numBatches-- >0;){for(o=Number.POSITIVE_INFINITY,a=-1;++a0&&(r[s++]=Lt({type:new Xe(e),length:o,nullCount:0,children:u.slice()})))}return[n=n.assign(e),r.map(f=>new An(n,f))]}function sb(n,t,e,r,i){var s;const o=(t+63&-64)>>3;for(let a=-1,l=r.length;++a=t)u===t?e[a]=c:(e[a]=c.slice(0,t),i.numBatches=Math.max(i.numBatches,r[a].unshift(c.slice(t,u-t))));else{const f=n[a];n[a]=f.clone({nullable:!0}),e[a]=(s=c==null?void 0:c._changeLengthAndBackfillNullBitmap(t))!==null&&s!==void 0?s:Lt({type:f.type,length:t,nullCount:t,nullBitmap:new Uint8Array(o)})}}return e}var Gm;class bn{constructor(...t){var e,r;if(t.length===0)return this.batches=[],this.schema=new Xt([]),this._offsets=[0],this;let i,s;t[0]instanceof Xt&&(i=t.shift()),t.at(-1)instanceof Uint32Array&&(s=t.pop());const o=l=>{if(l){if(l instanceof An)return[l];if(l instanceof bn)return l.batches;if(l instanceof ee){if(l.type instanceof Xe)return[new An(new Xt(l.type.children),l)]}else{if(Array.isArray(l))return l.flatMap(c=>o(c));if(typeof l[Symbol.iterator]=="function")return[...l].flatMap(c=>o(c));if(typeof l=="object"){const c=Object.keys(l),u=c.map(d=>new ae([l[d]])),f=i??new Xt(c.map((d,g)=>new ge(String(d),u[g].type,u[g].nullable))),[,h]=el(f,u);return h.length===0?[new An(l)]:h}}}return[]},a=t.flatMap(l=>o(l));if(i=(r=i??((e=a[0])===null||e===void 0?void 0:e.schema))!==null&&r!==void 0?r:new Xt([]),!(i instanceof Xt))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(const l of a){if(!(l instanceof An))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!rb(i,l.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=i,this.batches=a,this._offsets=s??xm(this.data)}get data(){return this.batches.map(({data:t})=>t)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((t,e)=>t+e.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=Um(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(oc(t,this.numRows))}set(t,e){}indexOf(t,e){return-1}[Symbol.iterator](){return this.batches.length>0?uc.visit(new ae(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ + ${this.toArray().join(`, + `)} +]`}concat(...t){const e=this.schema,r=this.data.concat(t.flatMap(({data:i})=>i));return new bn(e,r.map(i=>new An(e,i)))}slice(t,e){const r=this.schema;[t,e]=Lm({length:this.numRows},t,e);const i=Vm(this.data,this._offsets,t,e);return new bn(r,i.map(s=>new An(r,s)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(e=>e.name===t))}getChildAt(t){if(t>-1&&tr.children[t]);if(e.length===0){const{type:r}=this.schema.fields[t],i=Lt({type:r,length:0,nullCount:0});e.push(i._changeLengthAndBackfillNullBitmap(this.numRows))}return new ae(e)}return null}setChild(t,e){var r;return this.setChildAt((r=this.schema.fields)===null||r===void 0?void 0:r.findIndex(i=>i.name===t),e)}setChildAt(t,e){let r=this.schema,i=[...this.batches];if(t>-1&&tthis.getChildAt(c));[s[t],a[t]]=[o,e],[r,i]=el(r,a)}return new bn(r,i)}select(t){const e=this.schema.fields.reduce((r,i,s)=>r.set(i.name,s),new Map);return this.selectAt(t.map(r=>e.get(r)).filter(r=>r>-1))}selectAt(t){const e=this.schema.selectAt(t),r=this.batches.map(i=>i.selectAt(t));return new bn(e,r)}assign(t){const e=this.schema.fields,[r,i]=t.schema.fields.reduce((a,l,c)=>{const[u,f]=a,h=e.findIndex(d=>d.name===l.name);return~h?f[h]=c:u.push(c),a},[[],[]]),s=this.schema.assign(t.schema),o=[...e.map((a,l)=>[l,i[l]]).map(([a,l])=>l===void 0?this.getChildAt(a):t.getChildAt(l)),...r.map(a=>t.getChildAt(a))].filter(Boolean);return new bn(...el(s,o))}}Gm=Symbol.toStringTag;bn[Gm]=(n=>(n.schema=null,n.batches=[],n._offsets=new Uint32Array([0]),n._nullCount=-1,n[Symbol.isConcatSpreadable]=!0,n.isValid=ya(cc),n.get=ya(cn.getVisitFn(A.Struct)),n.set=zm(Sn.getVisitFn(A.Struct)),n.indexOf=Wm(_a.getVisitFn(A.Struct)),"Table"))(bn.prototype);var Xm;let An=class _s{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof Xt))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=Lt({nullCount:0,type:new Xe(this.schema.fields),children:this.schema.fields.map(e=>Lt({type:e.type,nullCount:0}))})]=t,!(this.data instanceof ee))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=pu(this.schema,this.data.children);break}case 1:{const[e]=t,{fields:r,children:i,length:s}=Object.keys(e).reduce((l,c,u)=>(l.children[u]=e[c],l.length=Math.max(l.length,e[c].length),l.fields[u]=ge.new({name:c,type:e[c].type,nullable:!0}),l),{length:0,fields:new Array,children:new Array}),o=new Xt(r),a=Lt({type:new Xe(r),length:s,children:i,nullCount:0});[this.schema,this.data]=pu(o,a.children,s);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=Zm(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return cn.visit(this.data,t)}at(t){return this.get(oc(t,this.numRows))}set(t,e){return Sn.visit(this.data,t,e)}indexOf(t,e){return _a.visit(this.data,t,e)}[Symbol.iterator](){return uc.visit(new ae([this.data]))}toArray(){return[...this]}concat(...t){return new bn(this.schema,[this,...t])}slice(t,e){const[r]=new ae([this.data]).slice(t,e).data;return new _s(this.schema,r)}getChild(t){var e;return this.getChildAt((e=this.schema.fields)===null||e===void 0?void 0:e.findIndex(r=>r.name===t))}getChildAt(t){return t>-1&&ti.name===t),e)}setChildAt(t,e){let r=this.schema,i=this.data;if(t>-1&&ta.name===s);~o&&(i[o]=this.data.children[o])}return new _s(e,Lt({type:r,length:this.numRows,children:i}))}selectAt(t){const e=this.schema.selectAt(t),r=t.map(s=>this.data.children[s]).filter(Boolean),i=Lt({type:new Xe(e.fields),length:this.numRows,children:r});return new _s(e,i)}};Xm=Symbol.toStringTag;An[Xm]=(n=>(n._nullCount=-1,n[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(An.prototype);function pu(n,t,e=t.reduce((r,i)=>Math.max(r,i.length),0)){var r;const i=[...n.fields],s=[...t],o=(e+63&-64)>>3;for(const[a,l]of n.fields.entries()){const c=t[a];(!c||c.length!==e)&&(i[a]=l.clone({nullable:!0}),s[a]=(r=c==null?void 0:c._changeLengthAndBackfillNullBitmap(e))!==null&&r!==void 0?r:Lt({type:l.type,length:e,nullCount:e,nullBitmap:new Uint8Array(o)}))}return[n.assign(i),Lt({type:new Xe(i),length:e,children:s})]}function Zm(n,t,e=new Map){var r,i;if(((r=n==null?void 0:n.length)!==null&&r!==void 0?r:0)>0&&(n==null?void 0:n.length)===(t==null?void 0:t.length))for(let s=-1,o=n.length;++sLt({type:i.type})),r=Lt({type:new Xe(t.fields),nullCount:0,children:e});super(t,r)}}let Dr=class Un{constructor(){this.bb=null,this.bb_pos=0}__init(t,e){return this.bb_pos=t,this.bb=e,this}static getRootAsMessage(t,e){return(e||new Un).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,e){return t.setPosition(t.position()+te),(e||new Un).__init(t.readInt32(t.position())+t.position(),t)}version(){const t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):Pe.V1}headerType(){const t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):Gt.NONE}header(t){const e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__union(t,this.bb_pos+e):null}bodyLength(){const t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,e){const r=this.bb.__offset(this.bb_pos,12);return r?(e||new Ce).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+t*4),this.bb):null}customMetadataLength(){const t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,e){t.addFieldInt16(0,e,Pe.V1)}static addHeaderType(t,e){t.addFieldInt8(1,e,Gt.NONE)}static addHeader(t,e){t.addFieldOffset(2,e,0)}static addBodyLength(t,e){t.addFieldInt64(3,e,BigInt("0"))}static addCustomMetadata(t,e){t.addFieldOffset(4,e,0)}static createCustomMetadataVector(t,e){t.startVector(4,e.length,4);for(let r=e.length-1;r>=0;r--)t.addOffset(e[r]);return t.endVector()}static startCustomMetadataVector(t,e){t.startVector(4,e,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,e){t.finish(e)}static finishSizePrefixedMessageBuffer(t,e){t.finish(e,void 0,!0)}static createMessage(t,e,r,i,s,o){return Un.startMessage(t),Un.addVersion(t,e),Un.addHeaderType(t,r),Un.addHeader(t,i),Un.addBodyLength(t,s),Un.addCustomMetadata(t,o),Un.endMessage(t)}};class ob extends Rt{visit(t,e){return t==null||e==null?void 0:super.visit(t,e)}visitNull(t,e){return su.startNull(e),su.endNull(e)}visitInt(t,e){return dn.startInt(e),dn.addBitWidth(e,t.bitWidth),dn.addIsSigned(e,t.isSigned),dn.endInt(e)}visitFloat(t,e){return Hn.startFloatingPoint(e),Hn.addPrecision(e,t.precision),Hn.endFloatingPoint(e)}visitBinary(t,e){return tu.startBinary(e),tu.endBinary(e)}visitLargeBinary(t,e){return nu.startLargeBinary(e),nu.endLargeBinary(e)}visitBool(t,e){return eu.startBool(e),eu.endBool(e)}visitUtf8(t,e){return ou.startUtf8(e),ou.endUtf8(e)}visitLargeUtf8(t,e){return ru.startLargeUtf8(e),ru.endLargeUtf8(e)}visitDecimal(t,e){return gi.startDecimal(e),gi.addScale(e,t.scale),gi.addPrecision(e,t.precision),gi.addBitWidth(e,t.bitWidth),gi.endDecimal(e)}visitDate(t,e){return Fo.startDate(e),Fo.addUnit(e,t.unit),Fo.endDate(e)}visitTime(t,e){return yn.startTime(e),yn.addUnit(e,t.unit),yn.addBitWidth(e,t.bitWidth),yn.endTime(e)}visitTimestamp(t,e){const r=t.timezone&&e.createString(t.timezone)||void 0;return _n.startTimestamp(e),_n.addUnit(e,t.unit),r!==void 0&&_n.addTimezone(e,r),_n.endTimestamp(e)}visitInterval(t,e){return qn.startInterval(e),qn.addUnit(e,t.unit),qn.endInterval(e)}visitDuration(t,e){return jo.startDuration(e),jo.addUnit(e,t.unit),jo.endDuration(e)}visitList(t,e){return iu.startList(e),iu.endList(e)}visitStruct(t,e){return Gr.startStruct_(e),Gr.endStruct_(e)}visitUnion(t,e){sn.startTypeIdsVector(e,t.typeIds.length);const r=sn.createTypeIdsVector(e,t.typeIds);return sn.startUnion(e),sn.addMode(e,t.mode),sn.addTypeIds(e,r),sn.endUnion(e)}visitDictionary(t,e){const r=this.visit(t.indices,e);return lr.startDictionaryEncoding(e),lr.addId(e,BigInt(t.id)),lr.addIsOrdered(e,t.isOrdered),r!==void 0&&lr.addIndexType(e,r),lr.endDictionaryEncoding(e)}visitFixedSizeBinary(t,e){return Lo.startFixedSizeBinary(e),Lo.addByteWidth(e,t.byteWidth),Lo.endFixedSizeBinary(e)}visitFixedSizeList(t,e){return Ro.startFixedSizeList(e),Ro.addListSize(e,t.listSize),Ro.endFixedSizeList(e)}visitMap(t,e){return Uo.startMap(e),Uo.addKeysSorted(e,t.keysSorted),Uo.endMap(e)}}const nl=new ob;function ab(n,t=new Map){return new Xt(cb(n,t),Vo(n.metadata),t)}function ep(n){return new Mn(n.count,np(n.columns),rp(n.columns))}function lb(n){return new gr(ep(n.data),n.id,n.isDelta)}function cb(n,t){return(n.fields||[]).filter(Boolean).map(e=>ge.fromJSON(e,t))}function gu(n,t){return(n.children||[]).filter(Boolean).map(e=>ge.fromJSON(e,t))}function np(n){return(n||[]).reduce((t,e)=>[...t,new Hi(e.count,ub(e.VALIDITY)),...np(e.children)],[])}function rp(n,t=[]){for(let e=-1,r=(n||[]).length;++et+ +(e===0),0)}function fb(n,t){let e,r,i,s,o,a;return!t||!(s=n.dictionary)?(o=_u(n,gu(n,t)),i=new ge(n.name,o,n.nullable,Vo(n.metadata))):t.has(e=s.id)?(r=(r=s.indexType)?yu(r):new Hs,a=new Li(t.get(e),r,e,s.isOrdered),i=new ge(n.name,a,n.nullable,Vo(n.metadata))):(r=(r=s.indexType)?yu(r):new Hs,t.set(e,o=_u(n,gu(n,t))),a=new Li(o,r,e,s.isOrdered),i=new ge(n.name,a,n.nullable,Vo(n.metadata))),i||null}function Vo(n=[]){return new Map(n.map(({key:t,value:e})=>[t,e]))}function yu(n){return new ti(n.isSigned,n.bitWidth)}function _u(n,t){const e=n.type.name;switch(e){case"NONE":return new Pr;case"null":return new Pr;case"binary":return new ea;case"largebinary":return new na;case"utf8":return new ra;case"largeutf8":return new ia;case"bool":return new sa;case"list":return new da((t||[])[0]);case"struct":return new Xe(t||[]);case"struct_":return new Xe(t||[])}switch(e){case"int":{const r=n.type;return new ti(r.isSigned,r.bitWidth)}case"floatingpoint":{const r=n.type;return new ta(He[r.precision])}case"decimal":{const r=n.type;return new oa(r.scale,r.precision,r.bitWidth)}case"date":{const r=n.type;return new aa(wn[r.unit])}case"time":{const r=n.type;return new la(gt[r.unit],r.bitWidth)}case"timestamp":{const r=n.type;return new ca(gt[r.unit],r.timezone)}case"interval":{const r=n.type;return new ua(Xn[r.unit])}case"duration":{const r=n.type;return new fa(gt[r.unit])}case"union":{const r=n.type,[i,...s]=(r.mode+"").toLowerCase(),o=i.toUpperCase()+s.join("");return new ha(ln[o],r.typeIds||[],t||[])}case"fixedsizebinary":{const r=n.type;return new ma(r.byteWidth)}case"fixedsizelist":{const r=n.type;return new pa(r.listSize,(t||[])[0])}case"map":{const r=n.type;return new ga((t||[])[0],r.keysSorted)}}throw new Error(`Unrecognized type: "${e}"`)}var db=yh,hb=Fi;class Tn{static fromJSON(t,e){const r=new Tn(0,Pe.V5,e);return r._createHeader=mb(t,e),r}static decode(t){t=new hb(Ht(t));const e=Dr.getRootAsMessage(t),r=e.bodyLength(),i=e.version(),s=e.headerType(),o=new Tn(r,i,s);return o._createHeader=pb(e,s),o}static encode(t){const e=new db;let r=-1;return t.isSchema()?r=Xt.encode(e,t.header()):t.isRecordBatch()?r=Mn.encode(e,t.header()):t.isDictionaryBatch()&&(r=gr.encode(e,t.header())),Dr.startMessage(e),Dr.addVersion(e,Pe.V5),Dr.addHeader(e,r),Dr.addHeaderType(e,t.headerType),Dr.addBodyLength(e,BigInt(t.bodyLength)),Dr.finishMessageBuffer(e,Dr.endMessage(e)),e.asUint8Array()}static from(t,e=0){if(t instanceof Xt)return new Tn(0,Pe.V5,Gt.Schema,t);if(t instanceof Mn)return new Tn(e,Pe.V5,Gt.RecordBatch,t);if(t instanceof gr)return new Tn(e,Pe.V5,Gt.DictionaryBatch,t);throw new Error(`Unrecognized Message header: ${t}`)}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===Gt.Schema}isRecordBatch(){return this.headerType===Gt.RecordBatch}isDictionaryBatch(){return this.headerType===Gt.DictionaryBatch}constructor(t,e,r,i){this._version=e,this._headerType=r,this.body=new Uint8Array(0),i&&(this._createHeader=()=>i),this._bodyLength=pe(t)}}class Mn{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(t,e,r){this._nodes=e,this._buffers=r,this._length=pe(t)}}class gr{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(t,e,r=!1){this._data=t,this._isDelta=r,this._id=pe(e)}}class cr{constructor(t,e){this.offset=pe(t),this.length=pe(e)}}class Hi{constructor(t,e){this.length=pe(t),this.nullCount=pe(e)}}function mb(n,t){return()=>{switch(t){case Gt.Schema:return Xt.fromJSON(n);case Gt.RecordBatch:return Mn.fromJSON(n);case Gt.DictionaryBatch:return gr.fromJSON(n)}throw new Error(`Unrecognized Message type: { name: ${Gt[t]}, type: ${t} }`)}}function pb(n,t){return()=>{switch(t){case Gt.Schema:return Xt.decode(n.header(new xn),new Map,n.version());case Gt.RecordBatch:return Mn.decode(n.header(new sr),n.version());case Gt.DictionaryBatch:return gr.decode(n.header(new mi),n.version())}throw new Error(`Unrecognized Message type: { name: ${Gt[t]}, type: ${t} }`)}}ge.encode=kb;ge.decode=Ob;ge.fromJSON=fb;Xt.encode=Db;Xt.decode=gb;Xt.fromJSON=ab;Mn.encode=Eb;Mn.decode=yb;Mn.fromJSON=ep;gr.encode=Ab;gr.decode=_b;gr.fromJSON=lb;Hi.encode=Tb;Hi.decode=vb;cr.encode=Bb;cr.decode=bb;function gb(n,t=new Map,e=Pe.V5){const r=Ib(n,t);return new Xt(r,zo(n),t,e)}function yb(n,t=Pe.V5){if(n.compression()!==null)throw new Error("Record batch compression not implemented");return new Mn(n.length(),wb(n),Sb(n,t))}function _b(n,t=Pe.V5){return new gr(Mn.decode(n.data(),t),n.id(),n.isDelta())}function bb(n){return new cr(n.offset(),n.length())}function vb(n){return new Hi(n.length(),n.nullCount())}function wb(n){const t=[];for(let e,r=-1,i=-1,s=n.nodesLength();++rge.encode(n,s));xn.startFieldsVector(n,e.length);const r=xn.createFieldsVector(n,e),i=t.metadata&&t.metadata.size>0?xn.createCustomMetadataVector(n,[...t.metadata].map(([s,o])=>{const a=n.createString(`${s}`),l=n.createString(`${o}`);return Ce.startKeyValue(n),Ce.addKey(n,a),Ce.addValue(n,l),Ce.endKeyValue(n)})):-1;return xn.startSchema(n),xn.addFields(n,r),xn.addEndianness(n,Pb?ji.Little:ji.Big),i!==-1&&xn.addCustomMetadata(n,i),xn.endSchema(n)}function kb(n,t){let e=-1,r=-1,i=-1;const s=t.type;let o=t.typeId;ct.isDictionary(s)?(o=s.dictionary.typeId,i=nl.visit(s,n),r=nl.visit(s.dictionary,n)):r=nl.visit(s,n);const a=(s.children||[]).map(u=>ge.encode(n,u)),l=pn.createChildrenVector(n,a),c=t.metadata&&t.metadata.size>0?pn.createCustomMetadataVector(n,[...t.metadata].map(([u,f])=>{const h=n.createString(`${u}`),d=n.createString(`${f}`);return Ce.startKeyValue(n),Ce.addKey(n,h),Ce.addValue(n,d),Ce.endKeyValue(n)})):-1;return t.name&&(e=n.createString(t.name)),pn.startField(n),pn.addType(n,r),pn.addTypeType(n,o),pn.addChildren(n,l),pn.addNullable(n,!!t.nullable),e!==-1&&pn.addName(n,e),i!==-1&&pn.addDictionary(n,i),c!==-1&&pn.addCustomMetadata(n,c),pn.endField(n)}function Eb(n,t){const e=t.nodes||[],r=t.buffers||[];sr.startNodesVector(n,e.length);for(const o of e.slice().reverse())Hi.encode(n,o);const i=n.endVector();sr.startBuffersVector(n,r.length);for(const o of r.slice().reverse())cr.encode(n,o);const s=n.endVector();return sr.startRecordBatch(n),sr.addLength(n,BigInt(t.length)),sr.addNodes(n,i),sr.addBuffers(n,s),sr.endRecordBatch(n)}function Ab(n,t){const e=Mn.encode(n,t.data);return mi.startDictionaryBatch(n),mi.addId(n,BigInt(t.id)),mi.addIsDelta(n,t.isDelta),mi.addData(n,e),mi.endDictionaryBatch(n)}function Tb(n,t){return vh.createFieldNode(n,BigInt(t.length),BigInt(t.nullCount))}function Bb(n,t){return bh.createBuffer(n,BigInt(t.offset),BigInt(t.length))}const Pb=(()=>{const n=new ArrayBuffer(2);return new DataView(n).setInt16(0,256,!0),new Int16Array(n)[0]===256})(),gc=n=>`Expected ${Gt[n]} Message in stream, but was null or length 0.`,yc=n=>`Header pointer of flatbuffer-encoded ${Gt[n]} Message is null or length 0.`,ip=(n,t)=>`Expected to read ${n} metadata bytes, but only read ${t}.`,sp=(n,t)=>`Expected to read ${n} bytes for message body, but only read ${t}.`;class op{constructor(t){this.source=t instanceof va?t:new va(t)}[Symbol.iterator](){return this}next(){let t;return(t=this.readMetadataLength()).done||t.value===-1&&(t=this.readMetadataLength()).done||(t=this.readMetadata(t.value)).done?we:t}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(gc(t));return e.value}readMessageBody(t){if(t<=0)return new Uint8Array(0);const e=Ht(this.source.read(t));if(e.byteLength[...i,...s.VALIDITY&&[s.VALIDITY]||[],...s.TYPE_ID&&[s.TYPE_ID]||[],...s.OFFSET&&[s.OFFSET]||[],...s.DATA&&[s.DATA]||[],...e(s.children)],[])}}readMessage(t){let e;if((e=this.next()).done)return null;if(t!=null&&e.value.headerType!==t)throw new Error(gc(t));return e.value}readSchema(){const t=Gt.Schema,e=this.readMessage(t),r=e==null?void 0:e.header();if(!e||!r)throw new Error(yc(t));return r}}const ja=4,Ml="ARROW1",Sa=new Uint8Array(Ml.length);for(let n=0;nthis):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return gn.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return gn.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,e){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof fr?t:Sl(t)?Rb(t):fh(t)?Vb(t):xs(t)?Dt(this,void 0,void 0,function*(){return yield fr.from(yield t)}):dh(t)||tc(t)||mh(t)||Zl(t)?xb(new Ui(t)):Ub(new va(t))}static readAll(t){return t instanceof fr?t.isSync()?Su(t):Iu(t):Sl(t)||ArrayBuffer.isView(t)||Na(t)||uh(t)?Su(t):Iu(t)}}class Ia extends fr{constructor(t){super(t),this._impl=t}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return $n(this,arguments,function*(){yield Ut(yield*Mo(Ai(this[Symbol.iterator]())))})}}class Oa extends fr{constructor(t){super(t),this._impl=t}readAll(){return Dt(this,void 0,void 0,function*(){var t,e,r,i;const s=new Array;try{for(var o=!0,a=Ai(this),l;l=yield a.next(),t=l.done,!t;o=!0){i=l.value,o=!1;const c=i;s.push(c)}}catch(c){e={error:c}}finally{try{!o&&!t&&(r=a.return)&&(yield r.call(a))}finally{if(e)throw e.error}}return s})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}}class lp extends Ia{constructor(t){super(t),this._impl=t}}class Fb extends Oa{constructor(t){super(t),this._impl=t}}class cp{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(t=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=t}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(t){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=t,this.dictionaries=new Map,this}_loadRecordBatch(t,e){const r=this._loadVectors(t,e,this.schema.fields),i=Lt({type:new Xe(this.schema.fields),length:t.length,children:r});return new An(this.schema,i)}_loadDictionaryBatch(t,e){const{id:r,isDelta:i}=t,{dictionaries:s,schema:o}=this,a=s.get(r),l=o.dictionaries.get(r),c=this._loadVectors(t.data,e,[l]);return(a&&i?a.concat(new ae(c)):new ae(c)).memoize()}_loadVectors(t,e,r){return new Qm(e,t.nodes,t.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(r)}}class Da extends cp{constructor(t,e){super(e),this._reader=Sl(t)?new Nb(this._handle=t):new op(this._handle=t)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(t){return this.closed||(this.autoDestroy=fp(this,t),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(t):we}return(t){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(t):we}next(){if(this.closed)return we;let t;const{_reader:e}=this;for(;t=this._readNextMessageAndValidate();)if(t.isSchema())this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const r=t.header(),i=e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(r,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const r=t.header(),i=e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(r,i);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new tp(this.schema)}):this.return()}_readNextMessageAndValidate(t){return this._reader.readMessage(t)}}class ka extends cp{constructor(t,e){super(e),this._reader=new Mb(this._handle=t)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return Dt(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(t){return Dt(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=fp(this,t),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(t){return Dt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(t):we})}return(t){return Dt(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(t):we})}next(){return Dt(this,void 0,void 0,function*(){if(this.closed)return we;let t;const{_reader:e}=this;for(;t=yield this._readNextMessageAndValidate();)if(t.isSchema())yield this.reset(t.header());else if(t.isRecordBatch()){this._recordBatchIndex++;const r=t.header(),i=yield e.readMessageBody(t.bodyLength);return{done:!1,value:this._loadRecordBatch(r,i)}}else if(t.isDictionaryBatch()){this._dictionaryIndex++;const r=t.header(),i=yield e.readMessageBody(t.bodyLength),s=this._loadDictionaryBatch(r,i);this.dictionaries.set(r.id,s)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new tp(this.schema)}):yield this.return()})}_readNextMessageAndValidate(t){return Dt(this,void 0,void 0,function*(){return yield this._reader.readMessage(t)})}}class up extends Da{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(t,e){super(t instanceof mu?t:new mu(t),e)}isSync(){return!0}isFile(){return!0}open(t){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(const e of this._footer.dictionaryBatches())e&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(t)}readRecordBatch(t){var e;if(this.closed)return null;this._footer||this.open();const r=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(r&&this._handle.seek(r.offset)){const i=this._reader.readMessage(Gt.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null}_readDictionaryBatch(t){var e;const r=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(r&&this._handle.seek(r.offset)){const i=this._reader.readMessage(Gt.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}}_readFooter(){const{_handle:t}=this,e=t.size-ap,r=t.readInt32(e),i=t.readAt(e-r,r);return fc.decode(i)}_readNextMessageAndValidate(t){var e;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return Dt(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(const r of this._footer.dictionaryBatches())r&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield e.open.call(this,t)})}readRecordBatch(t){return Dt(this,void 0,void 0,function*(){var e;if(this.closed)return null;this._footer||(yield this.open());const r=(e=this._footer)===null||e===void 0?void 0:e.getRecordBatch(t);if(r&&(yield this._handle.seek(r.offset))){const i=yield this._reader.readMessage(Gt.RecordBatch);if(i!=null&&i.isRecordBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength);return this._loadRecordBatch(s,o)}}return null})}_readDictionaryBatch(t){return Dt(this,void 0,void 0,function*(){var e;const r=(e=this._footer)===null||e===void 0?void 0:e.getDictionaryBatch(t);if(r&&(yield this._handle.seek(r.offset))){const i=yield this._reader.readMessage(Gt.DictionaryBatch);if(i!=null&&i.isDictionaryBatch()){const s=i.header(),o=yield this._reader.readMessageBody(i.bodyLength),a=this._loadDictionaryBatch(s,o);this.dictionaries.set(s.id,a)}}})}_readFooter(){return Dt(this,void 0,void 0,function*(){const{_handle:t}=this;t._pending&&(yield t._pending);const e=t.size-ap,r=yield t.readInt32(e),i=yield t.readAt(e-r,r);return fc.decode(i)})}_readNextMessageAndValidate(t){return Dt(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?_c(t)?new lp(new up(n.read())):new Ia(new Da(n)):new Ia(new Da(function*(){}()))}function xb(n){return Dt(this,void 0,void 0,function*(){const t=yield n.peek(ro+7&-8);return t&&t.byteLength>=4?_c(t)?new lp(new up(yield n.read())):new Oa(new ka(n)):new Oa(new ka(function(){return $n(this,arguments,function*(){})}()))})}function Vb(n){return Dt(this,void 0,void 0,function*(){const{size:t}=yield n.stat(),e=new wa(n,t);return t>=Cb&&_c(yield e.readAt(0,ro+7&-8))?new Fb(new jb(e)):new Oa(new ka(e))})}function dp(n){const t=fr.from(n);return xs(t)?t.then(e=>dp(e)):t.isAsync()?t.readAll().then(e=>new bn(e)):new bn(t.readAll())}var hp={exports:{}};(function(n){(function(t){function e(v,k){var b=(v&65535)+(k&65535),C=(v>>16)+(k>>16)+(b>>16);return C<<16|b&65535}function r(v,k){return v<>>32-k}function i(v,k,b,C,F,T){return e(r(e(e(k,v),e(C,T)),F),b)}function s(v,k,b,C,F,T,j){return i(k&b|~k&C,v,k,F,T,j)}function o(v,k,b,C,F,T,j){return i(k&C|b&~C,v,k,F,T,j)}function a(v,k,b,C,F,T,j){return i(k^b^C,v,k,F,T,j)}function l(v,k,b,C,F,T,j){return i(b^(k|~C),v,k,F,T,j)}function c(v,k){v[k>>5]|=128<>>9<<4)+14]=k;var b,C,F,T,j,P=1732584193,B=-271733879,L=-1732584194,V=271733878;for(b=0;b>5]>>>k%32&255);return b}function f(v){var k,b=[];for(b[(v.length>>2)-1]=void 0,k=0;k>5]|=(v.charCodeAt(k/8)&255)<16&&(C=c(C,v.length*8)),b=0;b<16;b+=1)F[b]=C[b]^909522486,T[b]=C[b]^1549556828;return j=c(F.concat(f(k)),512+k.length*8),u(c(T.concat(j),640))}function g(v){var k="0123456789abcdef",b="",C,F;for(F=0;F>>4&15)+k.charAt(C&15);return b}function m(v){return unescape(encodeURIComponent(v))}function p(v){return h(m(v))}function _(v){return g(p(v))}function y(v,k){return d(m(v),m(k))}function S(v,k){return g(y(v,k))}function w(v,k,b){return k?b?y(k,v):S(k,v):b?p(v):_(v)}n.exports?n.exports=w:t.md5=w})(_g)})(hp);var zb=hp.exports;const Ou=bg(zb),mp=!0,Wb="always",Hb=async()=>{let n={};{const t=await fetch(zt("/data/manifest.json"));t.ok&&({renderedFiles:n}=await t.json())}await ws(vg),Object.keys(n??{}).length===0?console.warn('No sources found, execute "npm run sources" to generate'.trim()):(await ws(th,n),await ws(wg,Object.keys(n)))},Du=ws(Hb);async function qb(n,t,e){const r=await e(zt(`/api/${n}/${t}/all-queries.json`));if(!r.ok)return{};const i=await r.json(),s=await Promise.all(Object.entries(i).map(async([o,a])=>{const l=await e(zt(`/api/prerendered_queries/${a}.arrow`));if(!l.ok)return null;const c=await dp(l);return[o,Sg(c)]}));return Object.fromEntries(s.filter(Boolean))}const $b=["/settings","/explore"],ku=new Map,Yb=async({fetch:n,route:t,params:e,url:r})=>{var g,m,p;const[{customFormattingSettings:i},s,o]=await Promise.all([n(zt("/api/customFormattingSettings.json/GET.json")).then(_=>_.json()),n(zt("/api/pagesManifest.json")).then(_=>_.json()),n(zt(`/api/${t.id}/evidencemeta.json`)).then(_=>_.json()).catch(()=>({queries:[]}))]),a=Ou(t.id),l=Ou(Object.entries(e).sort().map(([_,y])=>`${_}${y}`).join("")),c=t.id&&$b.every(_=>!t.id.startsWith(_));let u={};const{inputs:f=Wg({label:"",value:"(SELECT NULL WHERE 0 /* An Input has not been set */)"})}=ku.get(r.pathname)??{};ku.has(r.pathname),c&&mp&&(u=await qb(a,l,n));function h(_,{query_name:y,callback:S=w=>w}={}){return(async()=>{await Du;const w=await Ig(_);return S(w)})()}let d=s;for(const _ of(t.id??"").split("/").slice(1)){if(d=d.children[_],!d)break;if((g=d.frontMatter)!=null&&g.title)d.title=d.frontMatter.title;else if((m=d.frontMatter)!=null&&m.breadcrumb){let{breadcrumb:y}=d.frontMatter;for(const[S,w]of Object.entries(e))y=y.replaceAll(`\${params.${S}}`,w);d.title=(p=(await h(y))[0])==null?void 0:p.breadcrumb}}return{__db:{query:h,async load(){return Du},async updateParquetURLs(_){const{renderedFiles:y}=JSON.parse(_);await ws(th,y)}},inputs:f,data:u,customFormattingSettings:i,isUserPage:c,evidencemeta:o,pagesManifest:s}},HI=Object.freeze(Object.defineProperty({__proto__:null,load:Yb,prerender:mp,trailingSlash:Wb},Symbol.toStringTag,{value:"Module"})),Kb={ltr:[...Yo,We.ARROW_RIGHT],rtl:[...Yo,We.ARROW_LEFT]},Jb={ltr:[We.ARROW_LEFT],rtl:[We.ARROW_RIGHT]},Eu=["menu","trigger"],Qb={arrowSize:8,positioning:{placement:"bottom"},preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,loop:!1,dir:"ltr",defaultOpen:!1,typeahead:!0,closeOnItemClick:!0,onOutsideClick:void 0};function Gb(n){const{name:t,selector:e}=kg(n.selector),{preventScroll:r,arrowSize:i,positioning:s,closeOnEscape:o,closeOnOutsideClick:a,portal:l,forceVisible:c,typeahead:u,loop:f,closeFocus:h,disableFocusFirstItem:d,closeOnItemClick:g,onOutsideClick:m}=n.rootOptions,p=n.rootOpen,_=n.rootActiveTrigger,y=n.nextFocusable,S=n.prevFocusable,w=Qe.writable(!1),v=Qe(ze(0)),k=Qe(ze(null)),b=Qe(ze("right")),C=Qe(ze(null)),F=Qe(us([b,k],([U,X])=>z=>U===(X==null?void 0:X.side)&&Xb(z,X==null?void 0:X.area))),{typed:T,handleTypeaheadSearch:j}=Hg(),P=No({...Jc(Eu),...n.ids}),B=Hc({open:p,forceVisible:c,activeTrigger:_}),L=un(t(),{stores:[B,l,P.menu,P.trigger],returned:([U,X,z,Z])=>({role:"menu",hidden:U?void 0:!0,style:es({display:U?void 0:"none"}),id:z,"aria-labelledby":Z,"data-state":U?"open":"closed","data-portal":Og(X),tabindex:-1}),action:U=>{let X=ns;const z=Rn([B,_,s,a,l,o],([rt,Wt,_e,xt,wt,St])=>{X(),!(!rt||!Wt)&&go().then(()=>{X(),ss(U,e),X=qc(U,{anchorElement:Wt,open:p,options:{floating:_e,modal:{closeOnInteractOutside:xt,shouldCloseOnInteractOutside:K=>{var it;return(it=m.get())==null||it(K),!(K.defaultPrevented||Bt(Wt)&&Wt.contains(K.target))},onClose:()=>{p.set(!1),Wt.focus()},open:rt},portal:$c(U,wt),escapeKeydown:St?void 0:null}}).destroy})}),Z=er(Yt(U,"keydown",rt=>{const Wt=rt.target,_e=rt.currentTarget;if(!Bt(Wt)||!Bt(_e)||!(Wt.closest('[role="menu"]')===_e))return;if(Uc.includes(rt.key)&&Tu(rt,f.get()??!1),rt.key===We.TAB){rt.preventDefault(),p.set(!1),Au(rt,y,S);return}const wt=rt.key.length===1;!(rt.ctrlKey||rt.altKey||rt.metaKey)&&wt&&u.get()===!0&&j(rt.key,$r(_e))}));return{destroy(){z(),Z(),X()}}}}),V=un(t("trigger"),{stores:[p,P.menu,P.trigger],returned:([U,X,z])=>({"aria-controls":X,"aria-expanded":U,"data-state":U?"open":"closed",id:z,tabindex:0}),action:U=>(vo(U),_.update(z=>z||U),{destroy:er(Yt(U,"click",z=>{const Z=p.get(),rt=z.currentTarget;Bt(rt)&&(le(rt),Z||z.preventDefault())}),Yt(U,"keydown",z=>{const Z=z.currentTarget;if(!Bt(Z)||!(Yo.includes(z.key)||z.key===We.ARROW_DOWN))return;z.preventDefault(),le(Z);const rt=Z.getAttribute("aria-controls");if(!rt)return;const Wt=document.getElementById(rt);if(!Wt)return;const _e=$r(Wt);_e.length&&Je(_e[0])}))})}),R=un(t("arrow"),{stores:i,returned:U=>({"data-arrow":!0,style:es({position:"absolute",width:`var(--arrow-size, ${U}px)`,height:`var(--arrow-size, ${U}px)`})})}),W=un(t("overlay"),{stores:[B],returned:([U])=>({hidden:U?void 0:!0,tabindex:-1,style:es({display:U?void 0:"none"}),"aria-hidden":"true","data-state":ev(U)}),action:U=>{let X=ns;if(o.get()){const Z=Dg(U,{handler:()=>{p.set(!1);const rt=_.get();rt&&rt.focus()}});Z&&Z.destroy&&(X=Z.destroy)}const z=Rn([l],([Z])=>{if(Z===null)return ns;const rt=$c(U,Z);return rt===null?ns:qg(U,rt).destroy});return{destroy(){X(),z()}}}}),D=un(t("item"),{returned:()=>({role:"menuitem",tabindex:-1,"data-orientation":"vertical"}),action:U=>(ss(U,e),vo(U),{destroy:er(Yt(U,"pointerdown",z=>{const Z=z.currentTarget;if(Bt(Z)&&nr(Z)){z.preventDefault();return}}),Yt(U,"click",z=>{const Z=z.currentTarget;if(Bt(Z)){if(nr(Z)){z.preventDefault();return}if(z.defaultPrevented){Je(Z);return}g.get()&&Oi(1).then(()=>{p.set(!1)})}}),Yt(U,"keydown",z=>{ri(z)}),Yt(U,"pointermove",z=>{wr(z)}),Yt(U,"pointerleave",z=>{Gi(z)}),Yt(U,"focusin",z=>{je(z)}),Yt(U,"focusout",z=>{tn(z)}))})}),J=un(t("group"),{returned:()=>U=>({role:"group","aria-labelledby":U})}),G=un(t("group-label"),{returned:()=>U=>({id:U})}),tt={defaultChecked:!1,disabled:!1},kt=U=>{const X={...tt,...U},z=X.checked??ze(X.defaultChecked??null),Z=Co(z,X.onCheckedChange),rt=ze(X.disabled),Wt=un(t("checkbox-item"),{stores:[Z,rt],returned:([wt,St])=>({role:"menuitemcheckbox",tabindex:-1,"data-orientation":"vertical","aria-checked":At(wt)?"mixed":wt?"true":"false","data-disabled":Ja(St),"data-state":Kt(wt)}),action:wt=>(ss(wt,e),vo(wt),{destroy:er(Yt(wt,"pointerdown",K=>{const it=K.currentTarget;if(Bt(it)&&nr(it)){K.preventDefault();return}}),Yt(wt,"click",K=>{const it=K.currentTarget;if(Bt(it)){if(nr(it)){K.preventDefault();return}if(K.defaultPrevented){Je(it);return}Z.update(ce=>At(ce)?!0:!ce),g.get()&&go().then(()=>{p.set(!1)})}}),Yt(wt,"keydown",K=>{ri(K)}),Yt(wt,"pointermove",K=>{const it=K.currentTarget;if(Bt(it)){if(nr(it)){en(K);return}wr(K,it)}}),Yt(wt,"pointerleave",K=>{Gi(K)}),Yt(wt,"focusin",K=>{je(K)}),Yt(wt,"focusout",K=>{tn(K)}))})}),_e=us(Z,wt=>wt===!0),xt=us(Z,wt=>wt==="indeterminate");return{elements:{checkboxItem:Wt},states:{checked:Z},helpers:{isChecked:_e,isIndeterminate:xt},options:{disabled:rt}}},Et=(U={})=>{const X=U.value??ze(U.defaultValue??null),z=Co(X,U.onValueChange),Z=un(t("radio-group"),{returned:()=>({role:"group"})}),rt={disabled:!1},Wt=un(t("radio-item"),{stores:[z],returned:([xt])=>wt=>{const{value:St,disabled:K}={...rt,...wt},it=xt===St;return{disabled:K,role:"menuitemradio","data-state":it?"checked":"unchecked","aria-checked":it,"data-disabled":Ja(K),"data-value":St,"data-orientation":"vertical",tabindex:-1}},action:xt=>(ss(xt,e),{destroy:er(Yt(xt,"pointerdown",St=>{const K=St.currentTarget;if(!Bt(K))return;const it=xt.dataset.value;if(xt.dataset.disabled||it===void 0){St.preventDefault();return}}),Yt(xt,"click",St=>{const K=St.currentTarget;if(!Bt(K))return;const it=xt.dataset.value;if(xt.dataset.disabled||it===void 0){St.preventDefault();return}if(St.defaultPrevented){if(!Bt(K))return;Je(K);return}z.set(it),g.get()&&go().then(()=>{p.set(!1)})}),Yt(xt,"keydown",St=>{ri(St)}),Yt(xt,"pointermove",St=>{const K=St.currentTarget;if(!Bt(K))return;const it=xt.dataset.value;if(xt.dataset.disabled||it===void 0){en(St);return}wr(St,K)}),Yt(xt,"pointerleave",St=>{Gi(St)}),Yt(xt,"focusin",St=>{je(St)}),Yt(xt,"focusout",St=>{tn(St)}))})}),_e=us(z,xt=>wt=>xt===wt);return{elements:{radioGroup:Z,radioItem:Wt},states:{value:z},helpers:{isChecked:_e}}},{elements:{root:Ft}}=$g({orientation:"horizontal"}),Y={...Qb,disabled:!1,positioning:{placement:"right-start",gutter:8}},ke=U=>{const X={...Y,...U},z=X.open??ze(!1),Z=Co(z,X==null?void 0:X.onOpenChange),rt=No(eh(X,"ids")),{positioning:Wt,arrowSize:_e,disabled:xt}=rt,wt=Qe(ze(null)),St=Qe(ze(null)),K=Qe(ze(0)),it=No({...Jc(Eu),...X.ids});xc(()=>{const Tt=document.getElementById(it.trigger.get());Tt&&wt.set(Tt)});const ce=Hc({open:Z,forceVisible:c,activeTrigger:wt}),Ye=un(t("submenu"),{stores:[ce,it.menu,it.trigger],returned:([Tt,Ee,Re])=>({role:"menu",hidden:Tt?void 0:!0,style:es({display:Tt?void 0:"none"}),id:Ee,"aria-labelledby":Re,"data-state":Tt?"open":"closed","data-id":Ee,tabindex:-1}),action:Tt=>{let Ee=ns;const Re=Rn([ce,Wt],([ut,Jt])=>{if(Ee(),!ut)return;const he=wt.get();he&&go().then(()=>{Ee();const be=Le(he);Ee=qc(Tt,{anchorElement:he,open:Z,options:{floating:Jt,portal:Bt(be)?be:void 0,modal:null,focusTrap:null,escapeKeydown:null}}).destroy})}),Nt=er(Yt(Tt,"keydown",ut=>{if(ut.key===We.ESCAPE)return;const Jt=ut.target,he=ut.currentTarget;if(!Bt(Jt)||!Bt(he)||!(Jt.closest('[role="menu"]')===he))return;if(Uc.includes(ut.key)){ut.stopImmediatePropagation(),Tu(ut,f.get()??!1);return}const Ln=Jb.ltr.includes(ut.key),Ne=ut.ctrlKey||ut.altKey||ut.metaKey,Ae=ut.key.length===1;if(Ln){const Te=wt.get();ut.preventDefault(),Z.update(()=>(Te&&Je(Te),!1));return}if(ut.key===We.TAB){ut.preventDefault(),p.set(!1),Au(ut,y,S);return}!Ne&&Ae&&u.get()===!0&&j(ut.key,$r(he))}),Yt(Tt,"pointermove",ut=>{Fn(ut)}),Yt(Tt,"focusout",ut=>{const Jt=wt.get();if(w.get()){const he=ut.target,be=document.getElementById(it.menu.get());if(!Bt(be)||!Bt(he))return;!be.contains(he)&&he!==Jt&&Z.set(!1)}else{const he=ut.currentTarget,be=ut.relatedTarget;if(!Bt(be)||!Bt(he))return;!he.contains(be)&&be!==Jt&&Z.set(!1)}}));return{destroy(){Re(),Ee(),Nt()}}}}),hn=un(t("subtrigger"),{stores:[Z,xt,it.menu,it.trigger],returned:([Tt,Ee,Re,Nt])=>({role:"menuitem",id:Nt,tabindex:-1,"aria-controls":Re,"aria-expanded":Tt,"data-state":Tt?"open":"closed","data-disabled":Ja(Ee),"aria-haspopop":"menu"}),action:Tt=>{ss(Tt,e),vo(Tt),wt.update(Nt=>Nt||Tt);const Ee=()=>{rl(St),window.clearTimeout(K.get()),k.set(null)},Re=er(Yt(Tt,"click",Nt=>{if(Nt.defaultPrevented)return;const ut=Nt.currentTarget;!Bt(ut)||nr(ut)||(Je(ut),Z.get()||Z.update(Jt=>Jt||(wt.set(ut),!Jt)))}),Yt(Tt,"keydown",Nt=>{const ut=T.get(),Jt=Nt.currentTarget;if(!(!Bt(Jt)||nr(Jt)||ut.length>0&&Nt.key===We.SPACE)&&Kb.ltr.includes(Nt.key)){if(!Z.get()){Jt.click(),Nt.preventDefault();return}const be=Jt.getAttribute("aria-controls");if(!be)return;const Ln=document.getElementById(be);if(!Bt(Ln))return;const Ne=$r(Ln)[0];Je(Ne)}}),Yt(Tt,"pointermove",Nt=>{if(!is(Nt)||(Cn(Nt),Nt.defaultPrevented))return;const ut=Nt.currentTarget;if(!Bt(ut))return;tv(it.menu.get())||Je(ut);const Jt=St.get();!Z.get()&&!Jt&&!nr(ut)&&St.set(window.setTimeout(()=>{Z.update(()=>(wt.set(ut),!0)),rl(St)},100))}),Yt(Tt,"pointerleave",Nt=>{if(!is(Nt))return;rl(St);const ut=document.getElementById(it.menu.get()),Jt=ut==null?void 0:ut.getBoundingClientRect();if(Jt){const he=ut==null?void 0:ut.dataset.side,be=he==="right",Ln=be?-5:5,Ne=Jt[be?"left":"right"],Ae=Jt[be?"right":"left"];k.set({area:[{x:Nt.clientX+Ln,y:Nt.clientY},{x:Ne,y:Jt.top},{x:Ae,y:Jt.top},{x:Ae,y:Jt.bottom},{x:Ne,y:Jt.bottom}],side:he}),window.clearTimeout(K.get()),K.set(window.setTimeout(()=>{k.set(null)},300))}else{if(vr(Nt),Nt.defaultPrevented)return;k.set(null)}}),Yt(Tt,"focusout",Nt=>{const ut=Nt.currentTarget;if(!Bt(ut))return;oi(ut);const Jt=Nt.relatedTarget;if(!Bt(Jt))return;const he=ut.getAttribute("aria-controls");if(!he)return;const be=document.getElementById(he);be&&!be.contains(Jt)&&Z.set(!1)}),Yt(Tt,"focusin",Nt=>{je(Nt)}));return{destroy(){Ee(),Re()}}}}),jn=un(t("subarrow"),{stores:_e,returned:Tt=>({"data-arrow":!0,style:es({position:"absolute",width:`var(--arrow-size, ${Tt}px)`,height:`var(--arrow-size, ${Tt}px)`})})});return Rn([p],([Tt])=>{Tt||(wt.set(null),Z.set(!1))}),Rn([k],([Tt])=>{!hi||Tt||window.clearTimeout(K.get())}),Rn([Z],([Tt])=>{if(hi&&(Tt&&w.get()&&Oi(1).then(()=>{const Ee=document.getElementById(it.menu.get());if(!Ee)return;const Re=$r(Ee);Re.length&&Je(Re[0])}),!Tt)){const Ee=C.get(),Re=document.getElementById(it.trigger.get());if(Ee&&Oi(1).then(()=>{const Nt=document.getElementById(it.menu.get());Nt&&Nt.contains(Ee)&&oi(Ee)}),!Re||document.activeElement===Re)return;oi(Re)}}),{ids:it,elements:{subTrigger:hn,subMenu:Ye,subArrow:jn},states:{subOpen:Z},options:rt}};xc(()=>{const U=document.getElementById(P.trigger.get());Bt(U)&&p.get()&&_.set(U);const X=[],z=()=>w.set(!1),Z=()=>{w.set(!0),X.push(er(xr(document,"pointerdown",z,{capture:!0,once:!0}),xr(document,"pointermove",z,{capture:!0,once:!0})))},rt=Wt=>{if(Wt.key===We.ESCAPE&&o.get()){p.set(!1);return}};return X.push(xr(document,"keydown",Z,{capture:!0})),X.push(xr(document,"keydown",rt)),()=>{X.forEach(Wt=>Wt())}}),Rn([p,C],([U,X])=>{!U&&X&&oi(X)}),Rn([p],([U])=>{if(hi&&!U){const X=_.get();if(!X)return;const z=h.get();!U&&X&&Yg({prop:z,defaultEl:X})}}),Rn([p,r],([U,X])=>{if(!hi)return;const z=[];return U&&X&&z.push(Kg()),Oi(1).then(()=>{const Z=document.getElementById(P.menu.get());if(Z&&U&&w.get()){if(d.get()){Je(Z);return}const rt=$r(Z);if(!rt.length)return;Je(rt[0])}}),()=>{z.forEach(Z=>Z())}}),Rn(p,U=>{if(!hi)return;const X=()=>w.set(!1),z=Z=>{if(w.set(!0),Z.key===We.ESCAPE&&U&&o.get()){p.set(!1);return}};return er(xr(document,"pointerdown",X,{capture:!0,once:!0}),xr(document,"pointermove",X,{capture:!0,once:!0}),xr(document,"keydown",z,{capture:!0}))});function le(U){p.update(X=>{const z=!X;return z&&(y.set(Jg(U)),S.set(Qg(U)),_.set(U)),z})}function je(U){const X=U.currentTarget;if(!Bt(X))return;const z=C.get();z&&oi(z),Gg(X),C.set(X)}function tn(U){const X=U.currentTarget;Bt(X)&&oi(X)}function Cn(U){Be(U)&&U.preventDefault()}function en(U){if(Be(U))return;const X=U.target;if(!Bt(X))return;const z=Le(X);z&&Je(z)}function vr(U){Be(U)&&U.preventDefault()}function Fn(U){if(!is(U))return;const X=U.target,z=U.currentTarget;if(!Bt(z)||!Bt(X))return;const Z=v.get(),rt=Z!==U.clientX;if(z.contains(X)&&rt){const Wt=U.clientX>Z?"right":"left";b.set(Wt),v.set(U.clientX)}}function wr(U,X=null){if(!is(U)||(Cn(U),U.defaultPrevented))return;if(X){Je(X);return}const z=U.currentTarget;Bt(z)&&Je(z)}function Gi(U){is(U)&&en(U)}function ri(U){if(T.get().length>0&&U.key===We.SPACE){U.preventDefault();return}if(Yo.includes(U.key)){U.preventDefault();const Z=U.currentTarget;if(!Bt(Z))return;Z.click()}}function At(U){return U==="indeterminate"}function Kt(U){return At(U)?"indeterminate":U?"checked":"unchecked"}function Be(U){return F.get()(U)}function Le(U){const X=U.closest('[role="menu"]');return Bt(X)?X:null}return{elements:{trigger:V,menu:L,overlay:W,item:D,group:J,groupLabel:G,arrow:R,separator:Ft},builders:{createCheckboxItem:kt,createSubmenu:ke,createMenuRadioGroup:Et},states:{open:p},helpers:{handleTypeaheadSearch:j},ids:P,options:n.rootOptions}}function Au(n,t,e){if(n.shiftKey){const r=e.get();r&&(n.preventDefault(),Oi(1).then(()=>r.focus()),e.set(null))}else{const r=t.get();r&&(n.preventDefault(),Oi(1).then(()=>r.focus()),t.set(null))}}function $r(n){return Array.from(n.querySelectorAll(`[data-melt-menu-id="${n.id}"]`)).filter(t=>Bt(t))}function vo(n){!n||!nr(n)||(n.setAttribute("data-disabled",""),n.setAttribute("aria-disabled","true"))}function rl(n){if(!hi)return;const t=n.get();t&&(window.clearTimeout(t),n.set(null))}function is(n){return n.pointerType==="mouse"}function ss(n,t){if(!n)return;const e=n.closest(`${t()}, ${t("submenu")}`);Bt(e)&&n.setAttribute("data-melt-menu-id",e.id)}function Tu(n,t){n.preventDefault();const e=document.activeElement,r=n.currentTarget;if(!Bt(e)||!Bt(r))return;const i=$r(r);if(!i.length)return;const s=i.filter(l=>!(l.hasAttribute("data-disabled")||l.getAttribute("disabled")==="true")),o=s.indexOf(e);let a;switch(n.key){case We.ARROW_DOWN:t?a=o0?o-1:s.length-1:a=o<0?s.length-1:o>0?o-1:0;break;case We.HOME:a=0;break;case We.END:a=s.length-1;break;default:return}Je(s[a])}function Xb(n,t){if(!t)return!1;const e={x:n.clientX,y:n.clientY};return Zb(e,t)}function Zb(n,t){const{x:e,y:r}=n;let i=!1;for(let s=0,o=t.length-1;sr!=u>r&&e<(c-a)*(r-l)/(u-l)+a&&(i=!i)}return i}function tv(n){const t=document.activeElement;if(!Bt(t))return!1;const e=t.closest(`[data-id="${n}"]`);return Bt(e)}function ev(n){return n?"open":"closed"}const nv={arrowSize:8,positioning:{placement:"bottom"},preventScroll:!0,closeOnEscape:!0,closeOnOutsideClick:!0,portal:void 0,loop:!1,dir:"ltr",defaultOpen:!1,forceVisible:!1,typeahead:!0,closeFocus:void 0,disableFocusFirstItem:!1,closeOnItemClick:!0,onOutsideClick:void 0};function rv(n){const t={...nv,...n},e=No(eh(t,"ids")),r=t.open??ze(t.defaultOpen),i=Co(r,t==null?void 0:t.onOpenChange),s=Qe(ze(null)),o=Qe(ze(null)),a=Qe(ze(null)),{elements:l,builders:c,ids:u,states:f,options:h}=Gb({rootOptions:e,rootOpen:i,rootActiveTrigger:Qe(s),nextFocusable:Qe(o),prevFocusable:Qe(a),selector:"dropdown-menu",removeScroll:!0,ids:t.ids});return{ids:u,elements:l,states:f,builders:c,options:h}}function iv(){return Eg(10)}function bc(){return{NAME:"menu",SUB_NAME:"menu-submenu",RADIO_GROUP_NAME:"menu-radiogroup",CHECKBOX_ITEM_NAME:"menu-checkboxitem",RADIO_ITEM_NAME:"menu-radioitem",GROUP_NAME:"menu-group",PARTS:["arrow","checkbox-indicator","checkbox-item","content","group","item","label","radio-group","radio-item","radio-indicator","separator","sub-content","sub-trigger","trigger"]}}function io(){const{NAME:n}=bc();return ty(n)}function sv(n){const{NAME:t,PARTS:e}=bc(),r=fy("menu",e),i={...rv({...dy(n),forceVisible:!0}),getAttrs:r};return oh(t,i),{...i,updateOption:hy(i.options)}}function ov(){const{GROUP_NAME:n}=bc(),{elements:{group:t},getAttrs:e}=io(),r=iv();return oh(n,r),{group:t,id:r,getAttrs:e}}function av(n){const e={...{side:"bottom",align:"center"},...n},{options:{positioning:r}}=io();Xg(r)(e)}const lv=n=>({builder:n&8}),Bu=n=>({builder:n[3]}),cv=n=>({builder:n&8}),Pu=n=>({builder:n[3]});function uv(n){let t=n[1]?"a":"div",e,r,i=(n[1]?"a":"div")&&il(n);return{c(){i&&i.c(),e=It()},l(s){i&&i.l(s),e=It()},m(s,o){i&&i.m(s,o),x(s,e,o),r=!0},p(s,o){s[1],t?Zt(t,s[1]?"a":"div")?(i.d(1),i=il(s),t=s[1]?"a":"div",i.c(),i.m(e.parentNode,e)):i.p(s,o):(i=il(s),t=s[1]?"a":"div",i.c(),i.m(e.parentNode,e))},i(s){r||(E(i,s),r=!0)},o(s){M(i,s),r=!1},d(s){s&&O(e),i&&i.d(s)}}}function fv(n){let t;const e=n[11].default,r=Se(e,n,n[10],Pu);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,s){r&&r.m(i,s),t=!0},p(i,s){r&&r.p&&(!t||s&1032)&&Ie(r,e,i,i[10],t?De(e,i[10],s,cv):Oe(i[10]),Pu)},i(i){t||(E(r,i),t=!0)},o(i){M(r,i),t=!1},d(i){r&&r.d(i)}}}function il(n){let t,e,r,i;const s=n[11].default,o=Se(s,n,n[10],Bu);let a=[{href:n[1]},n[3],n[6]],l={};for(let c=0;c{o[u]=null}),$t(),e=o[t],e?e.p(l,c):(e=o[t]=s[t](l),e.c()),E(e,1),e.m(r.parentNode,r))},i(l){i||(E(e),i=!0)},o(l){M(e),i=!1},d(l){l&&O(r),o[t].d(l)}}}function hv(n,t,e){let r,i;const s=["href","asChild","disabled","el"];let o=an(t,s),a,{$$slots:l={},$$scope:c}=t,{href:u=void 0}=t,{asChild:f=!1}=t,{disabled:h=!1}=t,{el:d=void 0}=t;const{elements:{item:g},getAttrs:m}=io();Me(n,g,S=>e(9,a=S));const p=Gl();function _(S){ir.call(this,n,S)}function y(S){zn[S?"unshift":"push"](()=>{d=S,e(0,d)})}return n.$$set=S=>{t=de(de({},t),ei(S)),e(6,o=an(t,s)),"href"in S&&e(1,u=S.href),"asChild"in S&&e(2,f=S.asChild),"disabled"in S&&e(7,h=S.disabled),"el"in S&&e(0,d=S.el),"$$scope"in S&&e(10,c=S.$$scope)},n.$$.update=()=>{n.$$.dirty&512&&e(3,r=a),n.$$.dirty&128&&e(8,i={...m("item"),...my(h)}),n.$$.dirty&264&&Object.assign(r,i)},[d,u,f,r,g,p,o,h,i,a,c,l,_,y]}class mv extends se{constructor(t){super(),oe(this,t,hv,dv,Zt,{href:1,asChild:2,disabled:7,el:0})}}const pv=n=>({builder:n&4}),Mu=n=>({builder:n[2]}),gv=n=>({builder:n&4}),Nu=n=>({builder:n[2]});function yv(n){let t,e,r,i;const s=n[7].default,o=Se(s,n,n[6],Mu);let a=[n[2],n[4]],l={};for(let c=0;c{o[u]=null}),$t(),e=o[t],e?e.p(l,c):(e=o[t]=s[t](l),e.c()),E(e,1),e.m(r.parentNode,r))},i(l){i||(E(e),i=!0)},o(l){M(e),i=!1},d(l){l&&O(r),o[t].d(l)}}}function vv(n,t,e){let r;const i=["asChild","el"];let s=an(t,i),o,{$$slots:a={},$$scope:l}=t,{asChild:c=!1}=t,{el:u=void 0}=t;const{group:f,id:h,getAttrs:d}=ov();Me(n,f,p=>e(5,o=p));const g=d("group");function m(p){zn[p?"unshift":"push"](()=>{u=p,e(0,u)})}return n.$$set=p=>{t=de(de({},t),ei(p)),e(4,s=an(t,i)),"asChild"in p&&e(1,c=p.asChild),"el"in p&&e(0,u=p.el),"$$scope"in p&&e(6,l=p.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&e(2,r=o(h)),n.$$.dirty&4&&Object.assign(r,g)},[u,c,r,f,s,o,l,a,m]}class wv extends se{constructor(t){super(),oe(this,t,vv,bv,Zt,{asChild:1,el:0})}}const Sv=n=>({ids:n&1}),Cu=n=>({ids:n[0]});function Iv(n){let t;const e=n[16].default,r=Se(e,n,n[15],Cu);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,s){r&&r.m(i,s),t=!0},p(i,[s]){r&&r.p&&(!t||s&32769)&&Ie(r,e,i,i[15],t?De(e,i[15],s,Sv):Oe(i[15]),Cu)},i(i){t||(E(r,i),t=!0)},o(i){M(r,i),t=!1},d(i){r&&r.d(i)}}}function Ov(n,t,e){let r,{$$slots:i={},$$scope:s}=t,{closeOnOutsideClick:o=void 0}=t,{closeOnEscape:a=void 0}=t,{portal:l=void 0}=t,{open:c=void 0}=t,{onOpenChange:u=void 0}=t,{preventScroll:f=void 0}=t,{loop:h=void 0}=t,{dir:d=void 0}=t,{typeahead:g=void 0}=t,{closeFocus:m=void 0}=t,{disableFocusFirstItem:p=void 0}=t,{closeOnItemClick:_=void 0}=t,{onOutsideClick:y=void 0}=t;const{states:{open:S},updateOption:w,ids:v}=sv({closeOnOutsideClick:o,closeOnEscape:a,portal:l,forceVisible:!0,defaultOpen:c,preventScroll:f,loop:h,dir:d,typeahead:g,closeFocus:m,disableFocusFirstItem:p,closeOnItemClick:_,onOutsideClick:y,onOpenChange:({next:b})=>(c!==b&&(u==null||u(b),e(2,c=b)),b)}),k=us([v.menu,v.trigger],([b,C])=>({menu:b,trigger:C}));return Me(n,k,b=>e(0,r=b)),n.$$set=b=>{"closeOnOutsideClick"in b&&e(3,o=b.closeOnOutsideClick),"closeOnEscape"in b&&e(4,a=b.closeOnEscape),"portal"in b&&e(5,l=b.portal),"open"in b&&e(2,c=b.open),"onOpenChange"in b&&e(6,u=b.onOpenChange),"preventScroll"in b&&e(7,f=b.preventScroll),"loop"in b&&e(8,h=b.loop),"dir"in b&&e(9,d=b.dir),"typeahead"in b&&e(10,g=b.typeahead),"closeFocus"in b&&e(11,m=b.closeFocus),"disableFocusFirstItem"in b&&e(12,p=b.disableFocusFirstItem),"closeOnItemClick"in b&&e(13,_=b.closeOnItemClick),"onOutsideClick"in b&&e(14,y=b.onOutsideClick),"$$scope"in b&&e(15,s=b.$$scope)},n.$$.update=()=>{n.$$.dirty&4&&c!==void 0&&S.set(c),n.$$.dirty&8&&w("closeOnOutsideClick",o),n.$$.dirty&16&&w("closeOnEscape",a),n.$$.dirty&32&&w("portal",l),n.$$.dirty&128&&w("preventScroll",f),n.$$.dirty&256&&w("loop",h),n.$$.dirty&512&&w("dir",d),n.$$.dirty&2048&&w("closeFocus",m),n.$$.dirty&4096&&w("disableFocusFirstItem",p),n.$$.dirty&1024&&w("typeahead",g),n.$$.dirty&8192&&w("closeOnItemClick",_),n.$$.dirty&16384&&w("onOutsideClick",y)},[r,k,c,o,a,l,u,f,h,d,g,m,p,_,y,s,i]}class Dv extends se{constructor(t){super(),oe(this,t,Ov,Iv,Zt,{closeOnOutsideClick:3,closeOnEscape:4,portal:5,open:2,onOpenChange:6,preventScroll:7,loop:8,dir:9,typeahead:10,closeFocus:11,disableFocusFirstItem:12,closeOnItemClick:13,onOutsideClick:14})}}const kv=n=>({builder:n[0]&256}),Fu=n=>({builder:n[8]}),Ev=n=>({builder:n[0]&256}),ju=n=>({builder:n[8]}),Av=n=>({builder:n[0]&256}),Lu=n=>({builder:n[8]}),Tv=n=>({builder:n[0]&256}),Ru=n=>({builder:n[8]}),Bv=n=>({builder:n[0]&256}),Uu=n=>({builder:n[8]}),Pv=n=>({builder:n[0]&256}),xu=n=>({builder:n[8]});function Mv(n){let t,e,r,i;const s=n[28].default,o=Se(s,n,n[27],Fu);let a=[n[8],n[13]],l={};for(let c=0;c{e=Zs(t,n[3],n[4]),e.start()})),r=!0)},o(u){M(a,u),r=!1},d(u){u&&O(t),a&&a.d(u),n[31](null),i=!1,yr(s)}}}function Fv(n){let t,e,r,i,s,o;const a=n[28].default,l=Se(a,n,n[27],Ru);let c=[n[8],n[13]],u={};for(let f=0;f{i&&(r&&r.end(1),e=Zs(t,n[3],n[4]),e.start())}),i=!0)},o(f){M(l,f),e&&e.invalidate(),f&&(r=Pa(t,n[5],n[6])),i=!1},d(f){f&&O(t),l&&l.d(f),n[30](null),f&&r&&r.end(),s=!1,yr(o)}}}function jv(n){let t,e,r,i,s;const o=n[28].default,a=Se(o,n,n[27],Uu);let l=[n[8],n[13]],c={};for(let u=0;u{r&&(e||(e=vn(t,n[1],n[2],!0)),e.run(1))}),r=!0)},o(u){M(a,u),u&&(e||(e=vn(t,n[1],n[2],!1)),e.run(0)),r=!1},d(u){u&&O(t),a&&a.d(u),n[29](null),u&&e&&e.end(),i=!1,yr(s)}}}function Lv(n){let t;const e=n[28].default,r=Se(e,n,n[27],xu);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,s){r&&r.m(i,s),t=!0},p(i,s){r&&r.p&&(!t||s[0]&134217984)&&Ie(r,e,i,i[27],t?De(e,i[27],s,Pv):Oe(i[27]),xu)},i(i){t||(E(r,i),t=!0)},o(i){M(r,i),t=!1},d(i){r&&r.d(i)}}}function Rv(n){let t,e,r,i;const s=[Lv,jv,Fv,Cv,Nv,Mv],o=[];function a(l,c){return l[7]&&l[9]?0:l[1]&&l[9]?1:l[3]&&l[5]&&l[9]?2:l[3]&&l[9]?3:l[5]&&l[9]?4:l[9]?5:-1}return~(t=a(n))&&(e=o[t]=s[t](n)),{c(){e&&e.c(),r=It()},l(l){e&&e.l(l),r=It()},m(l,c){~t&&o[t].m(l,c),x(l,r,c),i=!0},p(l,c){let u=t;t=a(l),t===u?~t&&o[t].p(l,c):(e&&(qt(),M(o[u],1,1,()=>{o[u]=null}),$t()),~t?(e=o[t],e?e.p(l,c):(e=o[t]=s[t](l),e.c()),E(e,1),e.m(r.parentNode,r)):e=null)},i(l){i||(E(e),i=!0)},o(l){M(e),i=!1},d(l){l&&O(r),~t&&o[t].d(l)}}}function Uv(n,t,e){let r;const i=["transition","transitionConfig","inTransition","inTransitionConfig","outTransition","outTransitionConfig","asChild","id","side","align","sideOffset","alignOffset","collisionPadding","avoidCollisions","collisionBoundary","sameWidth","fitViewport","strategy","overlap","el"];let s=an(t,i),o,a,{$$slots:l={},$$scope:c}=t,{transition:u=void 0}=t,{transitionConfig:f=void 0}=t,{inTransition:h=void 0}=t,{inTransitionConfig:d=void 0}=t,{outTransition:g=void 0}=t,{outTransitionConfig:m=void 0}=t,{asChild:p=!1}=t,{id:_=void 0}=t,{side:y="bottom"}=t,{align:S="center"}=t,{sideOffset:w=0}=t,{alignOffset:v=0}=t,{collisionPadding:k=8}=t,{avoidCollisions:b=!0}=t,{collisionBoundary:C=void 0}=t,{sameWidth:F=!1}=t,{fitViewport:T=!1}=t,{strategy:j="absolute"}=t,{overlap:P=!1}=t,{el:B=void 0}=t;const{elements:{menu:L},states:{open:V},ids:R,getAttrs:W}=io();Me(n,L,Y=>e(26,a=Y)),Me(n,V,Y=>e(9,o=Y));const D=Gl(),J=W("content");function G(Y){zn[Y?"unshift":"push"](()=>{B=Y,e(0,B)})}function tt(Y){zn[Y?"unshift":"push"](()=>{B=Y,e(0,B)})}function kt(Y){zn[Y?"unshift":"push"](()=>{B=Y,e(0,B)})}function Et(Y){zn[Y?"unshift":"push"](()=>{B=Y,e(0,B)})}function Ft(Y){zn[Y?"unshift":"push"](()=>{B=Y,e(0,B)})}return n.$$set=Y=>{t=de(de({},t),ei(Y)),e(13,s=an(t,i)),"transition"in Y&&e(1,u=Y.transition),"transitionConfig"in Y&&e(2,f=Y.transitionConfig),"inTransition"in Y&&e(3,h=Y.inTransition),"inTransitionConfig"in Y&&e(4,d=Y.inTransitionConfig),"outTransition"in Y&&e(5,g=Y.outTransition),"outTransitionConfig"in Y&&e(6,m=Y.outTransitionConfig),"asChild"in Y&&e(7,p=Y.asChild),"id"in Y&&e(14,_=Y.id),"side"in Y&&e(15,y=Y.side),"align"in Y&&e(16,S=Y.align),"sideOffset"in Y&&e(17,w=Y.sideOffset),"alignOffset"in Y&&e(18,v=Y.alignOffset),"collisionPadding"in Y&&e(19,k=Y.collisionPadding),"avoidCollisions"in Y&&e(20,b=Y.avoidCollisions),"collisionBoundary"in Y&&e(21,C=Y.collisionBoundary),"sameWidth"in Y&&e(22,F=Y.sameWidth),"fitViewport"in Y&&e(23,T=Y.fitViewport),"strategy"in Y&&e(24,j=Y.strategy),"overlap"in Y&&e(25,P=Y.overlap),"el"in Y&&e(0,B=Y.el),"$$scope"in Y&&e(27,c=Y.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&16384&&_&&R.menu.set(_),n.$$.dirty[0]&67108864&&e(8,r=a),n.$$.dirty[0]&256&&Object.assign(r,J),n.$$.dirty[0]&67076608&&o&&av({side:y,align:S,sideOffset:w,alignOffset:v,collisionPadding:k,avoidCollisions:b,collisionBoundary:C,sameWidth:F,fitViewport:T,strategy:j,overlap:P})},[B,u,f,h,d,g,m,p,r,o,L,V,D,s,_,y,S,w,v,k,b,C,F,T,j,P,a,c,l,G,tt,kt,Et,Ft]}class xv extends se{constructor(t){super(),oe(this,t,Uv,Rv,Zt,{transition:1,transitionConfig:2,inTransition:3,inTransitionConfig:4,outTransition:5,outTransitionConfig:6,asChild:7,id:14,side:15,align:16,sideOffset:17,alignOffset:18,collisionPadding:19,avoidCollisions:20,collisionBoundary:21,sameWidth:22,fitViewport:23,strategy:24,overlap:25,el:0},null,[-1,-1])}}const Vv=n=>({builder:n&4}),Vu=n=>({builder:n[2]}),zv=n=>({builder:n&4}),zu=n=>({builder:n[2]});function Wv(n){let t,e,r,i;const s=n[9].default,o=Se(s,n,n[8],Vu);let a=[n[2],{type:"button"},n[5]],l={};for(let c=0;c{o[u]=null}),$t(),e=o[t],e?e.p(l,c):(e=o[t]=s[t](l),e.c()),E(e,1),e.m(r.parentNode,r))},i(l){i||(E(e),i=!0)},o(l){M(e),i=!1},d(l){l&&O(r),o[t].d(l)}}}function $v(n,t,e){let r;const i=["asChild","id","el"];let s=an(t,i),o,{$$slots:a={},$$scope:l}=t,{asChild:c=!1}=t,{id:u=void 0}=t,{el:f=void 0}=t;const{elements:{trigger:h},ids:d,getAttrs:g}=io();Me(n,h,y=>e(7,o=y));const m=Gl(),p=g("trigger");function _(y){zn[y?"unshift":"push"](()=>{f=y,e(0,f)})}return n.$$set=y=>{t=de(de({},t),ei(y)),e(5,s=an(t,i)),"asChild"in y&&e(1,c=y.asChild),"id"in y&&e(6,u=y.id),"el"in y&&e(0,f=y.el),"$$scope"in y&&e(8,l=y.$$scope)},n.$$.update=()=>{n.$$.dirty&64&&u&&d.trigger.set(u),n.$$.dirty&128&&e(2,r=o),n.$$.dirty&4&&Object.assign(r,p)},[f,c,r,h,m,s,u,o,l,a,_]}class Yv extends se{constructor(t){super(),oe(this,t,$v,qv,Zt,{asChild:1,id:6,el:0})}}const sl=n=>n instanceof Date,vc=n=>Object.keys(n).length===0,dr=n=>n!=null&&typeof n=="object",wc=(n,...t)=>Object.prototype.hasOwnProperty.call(n,...t),ol=n=>dr(n)&&vc(n),Sc=()=>Object.create(null),pp=(n,t)=>n===t||!dr(n)||!dr(t)?{}:Object.keys(t).reduce((e,r)=>{if(wc(n,r)){const i=pp(n[r],t[r]);return dr(i)&&vc(i)||(e[r]=i),e}return e[r]=t[r],e},Sc()),gp=(n,t)=>n===t||!dr(n)||!dr(t)?{}:Object.keys(n).reduce((e,r)=>{if(wc(t,r)){const i=gp(n[r],t[r]);return dr(i)&&vc(i)||(e[r]=i),e}return e[r]=void 0,e},Sc()),yp=(n,t)=>n===t?{}:!dr(n)||!dr(t)?t:sl(n)||sl(t)?n.valueOf()==t.valueOf()?{}:t:Object.keys(t).reduce((e,r)=>{if(wc(n,r)){const i=yp(n[r],t[r]);return ol(i)&&!sl(i)&&(ol(n[r])||!ol(t[r]))||(e[r]=i),e}return e},Sc()),Kv=(n,t)=>({added:pp(n,t),deleted:gp(n,t),updated:yp(n,t)});var Gs,Xs,Ni,Ba;class Jv{constructor(){ts(this,Gs,[]);ts(this,Xs,{});ts(this,Ni,new Set);Ya(this,"subscribe",t=>(Or(this,Ni).add(t),t(this.generations),()=>Or(this,Ni).delete(t)));ts(this,Ba,0);Ya(this,"publish",()=>{if(Rc(this,Ba)._++>1e5)throw new Error("History published too many times.");Or(this,Ni).forEach(t=>t(this.generations))})}get generations(){return[...Or(this,Gs)]}push(t){const e=o=>{let a=Object.entries(o);a.sort((c,u)=>c[0].localeCompare(u[0]));const l=Object.fromEntries(a);return JSON.parse(JSON.stringify(l))},r=e(Or(this,Xs)),i=e(t),s=Kv(r,i);Or(this,Gs).push({...s,before:r,after:i,asof:new Date}),Ka(this,Xs,i),this.publish()}}Gs=new WeakMap,Xs=new WeakMap,Ni=new WeakMap,Ba=new WeakMap;function Wu(n){let t,e;return{c(){t=q("span"),e=Pt(n[1]),this.h()},l(r){t=$(r,"SPAN",{class:!0});var i=Q(t);e=Mt(i,n[1]),i.forEach(O),this.h()},h(){N(t,"class","cursor-pointer font-bold pr-8 flex items-center")},m(r,i){x(r,t,i),H(t,e)},p(r,i){i&2&&Fe(e,r[1])},d(r){r&&O(t)}}}function Qv(n){let t,e,r,i,s,o,a,l,c,u,f=n[1]&&Wu(n);return{c(){t=q("div"),f&&f.c(),e=et(),r=q("span"),i=Pt(n[2]),this.h()},l(h){t=$(h,"DIV",{role:!0,class:!0});var d=Q(t);f&&f.l(d),e=nt(d),r=$(d,"SPAN",{class:!0});var g=Q(r);i=Mt(g,n[2]),g.forEach(O),d.forEach(O),this.h()},h(){N(r,"class","cursor-pointer"),N(t,"role","none"),N(t,"class",s="print:hidden rounded py-1 px-3 my-4 mx-0 shadow-md text-xs font-mono flex justify-between transition-all duration-300 border "+(n[0]??"")+" svelte-118njox")},m(h,d){x(h,t,d),f&&f.m(t,null),H(t,e),H(t,r),H(r,i),l=!0,c||(u=[fe(t,"click",n[3]),fe(t,"keypress",n[3])],c=!0)},p(h,[d]){h[1]?f?f.p(h,d):(f=Wu(h),f.c(),f.m(t,e)):f&&(f.d(1),f=null),(!l||d&4)&&Fe(i,h[2]),(!l||d&1&&s!==(s="print:hidden rounded py-1 px-3 my-4 mx-0 shadow-md text-xs font-mono flex justify-between transition-all duration-300 border "+(h[0]??"")+" svelte-118njox"))&&N(t,"class",s)},i(h){l||(h&&Bn(()=>{l&&(a&&a.end(1),o=Zs(t,_l,{}),o.start())}),l=!0)},o(h){o&&o.invalidate(),h&&(a=Pa(t,Zr,{x:1e3,duration:1e3,delay:0,opacity:.8})),l=!1},d(h){h&&O(t),f&&f.d(),h&&a&&a.end(),c=!1,yr(u)}}}const Nl={error:"negative",success:"positive"},Gv=n=>Object.keys(Nl).includes(n),Xv=n=>Gv(n)?(console.warn(`[Toast] The status "${n}" is deprecated. Please use "${Nl[n]}" instead.`),Nl[n]):n;function Zv(n,t,e){let{id:r}=t,{status:i="info"}=t,{title:s}=t,{message:o}=t,{dismissable:a=!0}=t;const l=ey(),c=()=>{a&&l("dismiss",{id:r})};return n.$$set=u=>{"id"in u&&e(4,r=u.id),"status"in u&&e(0,i=u.status),"title"in u&&e(1,s=u.title),"message"in u&&e(2,o=u.message),"dismissable"in u&&e(5,a=u.dismissable)},n.$$.update=()=>{n.$$.dirty&1&&e(0,i=Xv(i))},[i,s,o,c,r,a]}class t0 extends se{constructor(t){super(),oe(this,t,Zv,Qv,Zt,{id:4,status:0,title:1,message:2,dismissable:5})}}function Hu(n,t,e){const r=n.slice();return r[2]=t[e],r}function qu(n,t){let e,r,i;const s=[t[2]];let o={};for(let a=0;aa[2].id;for(let a=0;ae(0,r=s)),[r,({detail:s})=>Vc.dismiss(s.id)]}class r0 extends se{constructor(t){super(),oe(this,t,n0,e0,Zt,{})}}const i0="/_app/immutable/assets/wordmark-white.C8ZS96Ri.png",s0="/_app/immutable/assets/wordmark-black.rfl-FBgf.png";function o0(n){let t,e,r,i,s;return{c(){t=q("img"),r=et(),i=q("img"),this.h()},l(o){t=$(o,"IMG",{src:!0,alt:!0,class:!0,href:!0}),r=nt(o),i=$(o,"IMG",{src:!0,alt:!0,class:!0,href:!0}),this.h()},h(){Jo(t.src,e=s0)||N(t,"src",e),N(t,"alt","Home"),N(t,"class","h-5 aspect-auto block dark:hidden"),N(t,"href",zt("/")),Jo(i.src,s=i0)||N(i,"src",s),N(i,"alt","Home"),N(i,"class","h-5 aspect-auto hidden dark:block"),N(i,"href",zt("/"))},m(o,a){x(o,t,a),x(o,r,a),x(o,i,a)},p:Qt,d(o){o&&(O(t),O(r),O(i))}}}function a0(n){let t;return{c(){t=Pt(n[1])},l(e){t=Mt(e,n[1])},m(e,r){x(e,t,r)},p(e,r){r&2&&Fe(t,e[1])},d(e){e&&O(t)}}}function l0(n){let t,e;return{c(){t=q("img"),this.h()},l(r){t=$(r,"IMG",{src:!0,alt:!0,class:!0,href:!0}),this.h()},h(){Jo(t.src,e=n[0])||N(t,"src",e),N(t,"alt","Home"),N(t,"class","h-5 aspect-auto"),N(t,"href",zt("/"))},m(r,i){x(r,t,i)},p(r,i){i&1&&!Jo(t.src,e=r[0])&&N(t,"src",e)},d(r){r&&O(t)}}}function c0(n){let t;function e(s,o){return s[0]?l0:s[1]?a0:o0}let r=e(n),i=r(n);return{c(){i.c(),t=It()},l(s){i.l(s),t=It()},m(s,o){i.m(s,o),x(s,t,o)},p(s,[o]){r===(r=e(s))&&i?i.p(s,o):(i.d(1),i=r(s),i&&(i.c(),i.m(t.parentNode,t)))},i:Qt,o:Qt,d(s){s&&O(t),i.d(s)}}}function u0(n,t,e){let{logo:r}=t,{title:i}=t;return n.$$set=s=>{"logo"in s&&e(0,r=s.logo),"title"in s&&e(1,i=s.title)},[r,i]}class Ic extends se{constructor(t){super(),oe(this,t,u0,c0,Zt,{logo:0,title:1})}}/*! @docsearch/js 3.8.0 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function Cl(){return Cl=Object.assign?Object.assign.bind():function(n){for(var t=1;t2&&(o.children=arguments.length>3?so.call(arguments,2):e),typeof n=="function"&&n.defaultProps!=null)for(s in n.defaultProps)o[s]===void 0&&(o[s]=n.defaultProps[s]);return Is(n,o,r,i,null)}function Is(n,t,e,r,i){var s={type:n,props:t,key:e,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++_p,__i:-1,__u:0};return i==null&&Ct.vnode!=null&&Ct.vnode(s),s}function hr(n){return n.children}function Kn(n,t){this.props=n,this.context=t}function Vi(n,t){if(t==null)return n.__?Vi(n.__,n.__i+1):null;for(var e;tt&&Jr.sort(Fl));Ea.__r=0}function Op(n,t,e,r,i,s,o,a,l,c,u){var f,h,d,g,m,p=r&&r.__k||wp,_=t.length;for(e.__d=l,function(y,S,w){var v,k,b,C,F,T=S.length,j=w.length,P=j,B=0;for(y.__k=[],v=0;v0?Is(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k).__=y,k.__b=y.__b+1,b=null,(F=k.__i=d0(k,w,C,P))!==-1&&(P--,(b=w[F])&&(b.__u|=131072)),b==null||b.__v===null?(F==-1&&B--,typeof k.type!="function"&&(k.__u|=65536)):F!==C&&(F==C-1?B--:F==C+1?B++:(F>C?B--:B++,k.__u|=65536))):k=y.__k[v]=null;if(P)for(v=0;v(l==null||131072&l.__u?0:1))for(;o>=0||a=0){if((l=t[o])&&!(131072&l.__u)&&i==l.key&&s===l.type)return o;o--}if(a2&&(a.children=arguments.length>3?so.call(arguments,2):e),Is(n.type,a,r||n.key,i||n.ref,null)}so=wp.slice,Ct={__e:function(n,t,e,r){for(var i,s,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(n)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(n,r||{}),o=i.__d),o)return i.__E=i}catch(a){n=a}throw n}},_p=0,Kn.prototype.setState=function(n,t){var e;e=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ur({},this.state),typeof n=="function"&&(n=n(ur({},e),this.props)),n&&ur(e,n),n!=null&&this.__v&&(t&&this._sb.push(t),Rl(this))},Kn.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),Rl(this))},Kn.prototype.render=hr,Jr=[],bp=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Fl=function(n,t){return n.__v.__b-t.__v.__b},Ea.__r=0,Oc=0,jl=Ku(!1),Ll=Ku(!0),vp=0;var Nr,me,al,Ju,zi=0,Tp=[],ve=Ct,Qu=ve.__b,Gu=ve.__r,Xu=ve.diffed,Zu=ve.__c,tf=ve.unmount,ef=ve.__;function qi(n,t){ve.__h&&ve.__h(me,n,zi||t),zi=0;var e=me.__H||(me.__H={__:[],__h:[]});return n>=e.__.length&&e.__.push({}),e.__[n]}function oo(n){return zi=1,Ec(jp,n)}function Ec(n,t,e){var r=qi(Nr++,2);if(r.t=n,!r.__c&&(r.__=[e?e(t):jp(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=me,!me.u)){var i=function(a,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!s||s.call(this,a,l,c);var f=!1;return u.forEach(function(h){if(h.__N){var d=h.__[0];h.__=h.__N,h.__N=void 0,d!==h.__[0]&&(f=!0)}}),!(!f&&r.__c.props===a)&&(!s||s.call(this,a,l,c))};me.u=!0;var s=me.shouldComponentUpdate,o=me.componentWillUpdate;me.componentWillUpdate=function(a,l,c){if(this.__e){var u=s;s=void 0,i(a,l,c),s=u}o&&o.call(this,a,l,c)},me.shouldComponentUpdate=i}return r.__N||r.__}function ao(n,t){var e=qi(Nr++,3);!ve.__s&&Ac(e.__H,t)&&(e.__=n,e.i=t,me.__H.__h.push(e))}function lo(n,t){var e=qi(Nr++,4);!ve.__s&&Ac(e.__H,t)&&(e.__=n,e.i=t,me.__h.push(e))}function Bp(n){return zi=5,Ra(function(){return{current:n}},[])}function Pp(n,t,e){zi=6,lo(function(){return typeof n=="function"?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},e==null?e:e.concat(n))}function Ra(n,t){var e=qi(Nr++,7);return Ac(e.__H,t)&&(e.__=n(),e.__H=t,e.__h=n),e.__}function Mp(n,t){return zi=8,Ra(function(){return n},t)}function Np(n){var t=me.context[n.__c],e=qi(Nr++,9);return e.c=n,t?(e.__==null&&(e.__=!0,t.sub(me)),t.props.value):n.__}function Cp(n,t){ve.useDebugValue&&ve.useDebugValue(t?t(n):n)}function Fp(){var n=qi(Nr++,11);if(!n.__){for(var t=me.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var e=t.__m||(t.__m=[0,0]);n.__="P"+e[0]+"-"+e[1]++}return n.__}function g0(){for(var n;n=Tp.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(Wo),n.__H.__h.forEach(Ul),n.__H.__h=[]}catch(t){n.__H.__h=[],ve.__e(t,n.__v)}}ve.__b=function(n){me=null,Qu&&Qu(n)},ve.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),ef&&ef(n,t)},ve.__r=function(n){Gu&&Gu(n),Nr=0;var t=(me=n.__c).__H;t&&(al===me?(t.__h=[],me.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0})):(t.__h.forEach(Wo),t.__h.forEach(Ul),t.__h=[],Nr=0)),al=me},ve.diffed=function(n){Xu&&Xu(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(Tp.push(t)!==1&&Ju===ve.requestAnimationFrame||((Ju=ve.requestAnimationFrame)||y0)(g0)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.i=void 0})),al=me=null},ve.__c=function(n,t){t.some(function(e){try{e.__h.forEach(Wo),e.__h=e.__h.filter(function(r){return!r.__||Ul(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],ve.__e(r,e.__v)}}),Zu&&Zu(n,t)},ve.unmount=function(n){tf&&tf(n);var t,e=n.__c;e&&e.__H&&(e.__H.__.forEach(function(r){try{Wo(r)}catch(i){t=i}}),e.__H=void 0,t&&ve.__e(t,e.__v))};var nf=typeof requestAnimationFrame=="function";function y0(n){var t,e=function(){clearTimeout(r),nf&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(e,100);nf&&(t=requestAnimationFrame(e))}function Wo(n){var t=me,e=n.__c;typeof e=="function"&&(n.__c=void 0,e()),me=t}function Ul(n){var t=me;n.__c=n.__(),me=t}function Ac(n,t){return!n||n.length!==t.length||t.some(function(e,r){return e!==n[r]})}function jp(n,t){return typeof t=="function"?t(n):t}function xl(n,t){for(var e in n)if(e!=="__source"&&!(e in t))return!0;for(var r in t)if(r!=="__source"&&n[r]!==t[r])return!0;return!1}function Vl(n,t){this.props=n,this.context=t}(Vl.prototype=new Kn).isPureReactComponent=!0,Vl.prototype.shouldComponentUpdate=function(n,t){return xl(this.props,n)||xl(this.state,t)};var rf=Ct.__b;Ct.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),rf&&rf(n)};var _0=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,sf=function(n,t){return n==null?null:mr(mr(n).map(t))},b0={map:sf,forEach:sf,count:function(n){return n?mr(n).length:0},only:function(n){var t=mr(n);if(t.length!==1)throw"Children.only";return t[0]},toArray:mr},v0=Ct.__e;Ct.__e=function(n,t,e,r){if(n.then){for(var i,s=t;s=s.__;)if((i=s.__c)&&i.__c)return t.__e==null&&(t.__e=e.__e,t.__k=e.__k),i.__c(n,t)}v0(n,t,e,r)};var of=Ct.unmount;function Lp(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),n.__c.__H=null),(n=function(r,i){for(var s in i)r[s]=i[s];return r}({},n)).__c!=null&&(n.__c.__P===e&&(n.__c.__P=t),n.__c=null),n.__k=n.__k&&n.__k.map(function(r){return Lp(r,t,e)})),n}function Rp(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(r){return Rp(r,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function Ho(){this.__u=0,this.t=null,this.__b=null}function Up(n){var t=n.__.__c;return t&&t.__a&&t.__a(n)}function bs(){this.u=null,this.o=null}Ct.unmount=function(n){var t=n.__c;t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),of&&of(n)},(Ho.prototype=new Kn).__c=function(n,t){var e=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(e);var i=Up(r.__v),s=!1,o=function(){s||(s=!0,e.__R=null,i?i(a):a())};e.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Rp(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(o,o)},Ho.prototype.componentWillUnmount=function(){this.t=[]},Ho.prototype.render=function(n,t){if(this.__b){if(this.__v.__k){var e=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Lp(this.__b,e,r.__O=r.__P)}this.__b=null}var i=t.__a&&Yn(hr,null,n.fallback);return i&&(i.__u&=-33),[Yn(hr,null,t.__a?null:n.children),i]};var af=function(n,t,e){if(++e[1]===e[0]&&n.o.delete(t),n.props.revealOrder&&(n.props.revealOrder[0]!=="t"||!n.o.size))for(e=n.u;e;){for(;e.length>3;)e.pop()();if(e[1]>>1,1),t.i.removeChild(r)}}),$s(Yn(w0,{context:t.context},n.__v),t.l)}function xp(n,t){var e=Yn(S0,{__v:n,i:t});return e.containerInfo=t,e}(bs.prototype=new Kn).__a=function(n){var t=this,e=Up(t.__v),r=t.o.get(n);return r[0]++,function(i){var s=function(){t.props.revealOrder?(r.push(i),af(t,n,r)):i()};e?e(s):s()}},bs.prototype.render=function(n){this.u=null,this.o=new Map;var t=mr(n.children);n.revealOrder&&n.revealOrder[0]==="b"&&t.reverse();for(var e=t.length;e--;)this.o.set(t[e],this.u=[1,0,this.u]);return n.children},bs.prototype.componentDidUpdate=bs.prototype.componentDidMount=function(){var n=this;this.o.forEach(function(t,e){af(n,e,t)})};var Vp=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,I0=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,O0=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,D0=/[A-Z0-9]/g,k0=typeof document<"u",E0=function(n){return(typeof Symbol<"u"&&ft(Symbol())=="symbol"?/fil|che|rad/:/fil|che|ra/).test(n)};function zp(n,t,e){return t.__k==null&&(t.textContent=""),$s(n,t),typeof e=="function"&&e(),n?n.__c:null}Kn.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(n){Object.defineProperty(Kn.prototype,n,{configurable:!0,get:function(){return this["UNSAFE_"+n]},set:function(t){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:t})}})});var lf=Ct.event;function A0(){}function T0(){return this.cancelBubble}function B0(){return this.defaultPrevented}Ct.event=function(n){return lf&&(n=lf(n)),n.persist=A0,n.isPropagationStopped=T0,n.isDefaultPrevented=B0,n.nativeEvent=n};var Tc,P0={enumerable:!1,configurable:!0,get:function(){return this.class}},cf=Ct.vnode;Ct.vnode=function(n){typeof n.type=="string"&&function(t){var e=t.props,r=t.type,i={},s=r.indexOf("-")===-1;for(var o in e){var a=e[o];if(!(o==="value"&&"defaultValue"in e&&a==null||k0&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var l=o.toLowerCase();o==="defaultValue"&&"value"in e&&e.value==null?o="value":o==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?o="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||E0(e.type)?l==="onfocus"?o="onfocusin":l==="onblur"?o="onfocusout":O0.test(o)&&(o=l):l=o="oninput":s&&I0.test(o)?o=o.replace(D0,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[o=l]&&(o="oninputCapture"),i[o]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=mr(e.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=mr(e.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",P0)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(n),n.$$typeof=Vp,cf&&cf(n)};var uf=Ct.__r;Ct.__r=function(n){uf&&uf(n),Tc=n.__c};var ff=Ct.diffed;Ct.diffed=function(n){ff&&ff(n);var t=n.props,e=n.__e;e!=null&&n.type==="textarea"&&"value"in t&&t.value!==e.value&&(e.value=t.value==null?"":t.value),Tc=null};var M0={ReactCurrentDispatcher:{current:{readContext:function(n){return Tc.__n[n.__c].props.value},useCallback:Mp,useContext:Np,useDebugValue:Cp,useDeferredValue:Hp,useEffect:ao,useId:Fp,useImperativeHandle:Pp,useInsertionEffect:$p,useLayoutEffect:lo,useMemo:Ra,useReducer:Ec,useRef:Bp,useState:oo,useSyncExternalStore:Yp,useTransition:qp}}};function So(n){return!!n&&n.$$typeof===Vp}function Wp(n){n()}function Hp(n){return n}function qp(){return[!1,Wp]}var $p=lo;function Yp(n,t){var e=t(),r=oo({h:{__:e,v:t}}),i=r[0].h,s=r[1];return lo(function(){i.__=e,i.v=t,ll(i)&&s({h:i})},[n,e,t]),ao(function(){return ll(i)&&s({h:i}),n(function(){ll(i)&&s({h:i})})},[n]),e}function ll(n){var t,e,r=n.v,i=n.__;try{var s=r();return!((t=i)===(e=s)&&(t!==0||1/t==1/e)||t!=t&&e!=e)}catch{return!0}}var I={useState:oo,useId:Fp,useReducer:Ec,useEffect:ao,useLayoutEffect:lo,useInsertionEffect:$p,useTransition:qp,useDeferredValue:Hp,useSyncExternalStore:Yp,startTransition:Wp,useRef:Bp,useImperativeHandle:Pp,useMemo:Ra,useCallback:Mp,useContext:Np,useDebugValue:Cp,version:"18.3.1",Children:b0,render:zp,hydrate:function(n,t,e){return Ap(n,t),typeof e=="function"&&e(),n?n.__c:null},unmountComponentAtNode:function(n){return!!n.__k&&($s(null,n),!0)},createPortal:xp,createElement:Yn,createContext:function(n,t){var e={__c:t="__cC"+vp++,__:n,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=new Set,(s={})[t]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.forEach(function(a){a.__e=!0,Rl(a)})},this.sub=function(o){i.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i&&i.delete(o),a&&a.call(o)}}),r.children}};return e.Provider.__=e.Consumer.contextType=e},createFactory:function(n){return Yn.bind(null,n)},cloneElement:function(n){return So(n)?p0.apply(null,arguments):n},createRef:function(){return{current:null}},Fragment:hr,isValidElement:So,isElement:So,isFragment:function(n){return So(n)&&n.type===hr},isMemo:function(n){return!!n&&!!n.displayName&&(typeof n.displayName=="string"||n.displayName instanceof String)&&n.displayName.startsWith("Memo(")},findDOMNode:function(n){return n&&(n.base||n.nodeType===1&&n)||null},Component:Kn,PureComponent:Vl,memo:function(n,t){function e(i){var s=this.props.ref,o=s==i.ref;return!o&&s&&(s.call?s(null):s.current=null),t?!t(this.props,i)||!o:xl(this.props,i)}function r(i){return this.shouldComponentUpdate=e,Yn(n,i)}return r.displayName="Memo("+(n.displayName||n.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r},forwardRef:function(n){function t(e){if(!("ref"in e))return n(e,null);var r=e.ref;delete e.ref;var i=n(e,r);return e.ref=r,i}return t.$$typeof=_0,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(n.displayName||n.name)+")",t},flushSync:function(n,t){return n(t)},unstable_batchedUpdates:function(n,t){return n(t)},StrictMode:hr,Suspense:Ho,SuspenseList:bs,lazy:function(n){var t,e,r;function i(s){if(t||(t=n()).then(function(o){e=o.default||o},function(o){r=o}),r)throw r;if(!e)throw t;return Yn(e,s)}return i.displayName="Lazy",i.__f=!0,i},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:M0};function zl(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,r=Array(t);e=0;--J){var G=this.tryEntries[J],tt=G.completion;if(G.tryLoc==="root")return D("end");if(G.tryLoc<=this.prev){var kt=r.call(G,"catchLoc"),Et=r.call(G,"finallyLoc");if(kt&&Et){if(this.prev=0;--D){var J=this.tryEntries[D];if(J.tryLoc<=this.prev&&r.call(J,"finallyLoc")&&this.prev=0;--W){var D=this.tryEntries[W];if(D.finallyLoc===R)return this.complete(D.completion,D.afterLoc),B(D),p}},catch:function(R){for(var W=this.tryEntries.length-1;W>=0;--W){var D=this.tryEntries[W];if(D.tryLoc===R){var J=D.completion;if(J.type==="throw"){var G=J.arg;B(D)}return G}}throw Error("illegal catch attempt")},delegateYield:function(R,W,D){return this.delegate={iterator:V(R),resultName:W,nextLoc:D},this.method==="next"&&(this.arg=n),p}},t}function Ks(n,t){return Ks=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,r){return e.__proto__=r,e},Ks(n,t)}function on(n,t){return function(e){if(Array.isArray(e))return e}(n)||function(e,r){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var s,o,a,l,c=[],u=!0,f=!1;try{if(a=(i=i.call(e)).next,r===0){if(Object(i)!==i)return;u=!1}else for(;!(u=(s=a.call(i)).done)&&(c.push(s.value),c.length!==r);u=!0);}catch(h){f=!0,o=h}finally{try{if(!u&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(f)throw o}}return c}}(n,t)||Kp(n,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Os(n){return function(t){if(Array.isArray(t))return zl(t)}(n)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(n)||Kp(n)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Kp(n,t){if(n){if(typeof n=="string")return zl(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?zl(n,t):void 0}}function Wl(n){var t=typeof Map=="function"?new Map:void 0;return Wl=function(e){if(e===null||!function(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}}(e))return e;if(typeof e!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(i,s,o){if(Bc())return Reflect.construct.apply(null,arguments);var a=[null];a.push.apply(a,s);var l=new(i.bind.apply(i,a));return o&&Ks(l,o.prototype),l}(e,arguments,Ys(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ks(r,e)},Wl(n)}function N0(){return I.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},I.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function Jp(){return I.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20","aria-hidden":"true"},I.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var C0=["translations"],ul="Ctrl",F0=I.forwardRef(function(n,t){var e=n.translations,r=e===void 0?{}:e,i=Jn(n,C0),s=r.buttonText,o=s===void 0?"Search":s,a=r.buttonAriaLabel,l=a===void 0?"Search":a,c=on(oo(null),2),u=c[0],f=c[1];ao(function(){typeof navigator<"u"&&(/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?f("⌘"):f(ul))},[]);var h=on(u===ul?[ul,"Ctrl",I.createElement(N0,null)]:["Meta","Command",u],3),d=h[0],g=h[1],m=h[2];return I.createElement("button",qe({type:"button",className:"DocSearch DocSearch-Button","aria-label":"".concat(l," (").concat(g,"+K)")},i,{ref:t}),I.createElement("span",{className:"DocSearch-Button-Container"},I.createElement(Jp,null),I.createElement("span",{className:"DocSearch-Button-Placeholder"},o)),I.createElement("span",{className:"DocSearch-Button-Keys"},u!==null&&I.createElement(I.Fragment,null,I.createElement(mf,{reactsToKey:d},m),I.createElement(mf,{reactsToKey:"k"},"K"))))});function mf(n){var t=n.reactsToKey,e=n.children,r=on(oo(!1),2),i=r[0],s=r[1];return ao(function(){if(t)return window.addEventListener("keydown",o),window.addEventListener("keyup",a),function(){window.removeEventListener("keydown",o),window.removeEventListener("keyup",a)};function o(l){l.key===t&&s(!0)}function a(l){l.key!==t&&l.key!=="Meta"||s(!1)}},[t]),I.createElement("kbd",{className:i?"DocSearch-Button-Key DocSearch-Button-Key--pressed":"DocSearch-Button-Key"},e)}function Qp(n,t){var e=void 0;return function(){for(var r=arguments.length,i=new Array(r),s=0;sn.length)&&(t=n.length);for(var e=0,r=new Array(t);en.length)&&(t=n.length);for(var e=0,r=new Array(t);e=0||(u[l]=o[l]);return u}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(i[e]=n[e])}return i}function _f(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function ki(n){for(var t=1;tn.length)&&(t=n.length);for(var e=0,r=new Array(t);e=3||g===2&&m>=4||g===1&&m>=10);function _(y,S,w){if(p&&w!==void 0){var v=w[0].__autocomplete_algoliaCredentials,k={"X-Algolia-Application-Id":v.appId,"X-Algolia-API-Key":v.apiKey};h.apply(void 0,[y].concat(Io(S),[{headers:k}]))}else h.apply(void 0,[y].concat(Io(S)))}return{init:function(y,S){h("init",{appId:y,apiKey:S})},setAuthenticatedUserToken:function(y){h("setAuthenticatedUserToken",y)},setUserToken:function(y){h("setUserToken",y)},clickedObjectIDsAfterSearch:function(){for(var y=arguments.length,S=new Array(y),w=0;w0&&_("clickedObjectIDsAfterSearch",Oo(S),S[0].items)},clickedObjectIDs:function(){for(var y=arguments.length,S=new Array(y),w=0;w0&&_("clickedObjectIDs",Oo(S),S[0].items)},clickedFilters:function(){for(var y=arguments.length,S=new Array(y),w=0;w0&&h.apply(void 0,["clickedFilters"].concat(S))},convertedObjectIDsAfterSearch:function(){for(var y=arguments.length,S=new Array(y),w=0;w0&&_("convertedObjectIDsAfterSearch",Oo(S),S[0].items)},convertedObjectIDs:function(){for(var y=arguments.length,S=new Array(y),w=0;w0&&_("convertedObjectIDs",Oo(S),S[0].items)},convertedFilters:function(){for(var y=arguments.length,S=new Array(y),w=0;w0&&h.apply(void 0,["convertedFilters"].concat(S))},viewedObjectIDs:function(){for(var y=arguments.length,S=new Array(y),w=0;w0&&S.reduce(function(v,k){var b=k.items,C=Xp(k,U0);return[].concat(Io(v),Io(function(F){for(var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,j=[],P=0;P0&&h.apply(void 0,["viewedFilters"].concat(S))}}}(l),u={current:[]},f=Qp(function(h){var d=h.state;if(d.isOpen){var g=d.collections.reduce(function(m,p){return[].concat(Ei(m),Ei(p.items))},[]).filter(os);Gp(u.current.map(function(m){return m.objectID}),g.map(function(m){return m.objectID}))||(u.current=g,g.length>0&&H0({onItemsChange:i,items:g,insights:c,state:d}))}},0);return{name:"aa.algoliaInsightsPlugin",subscribe:function(h){var d=h.setContext,g=h.onSelect,m=h.onActive,p=!1;function _(y){d({algoliaInsightsPlugin:{__algoliaSearchParameters:kn(kn({},a?{clickAnalytics:!0}:{}),y?{userToken:q0(y)}:{}),insights:c}})}l("addAlgoliaAgent","insights-plugin"),_(),l("onUserTokenChange",function(y){p||_(y)}),l("getUserToken",null,function(y,S){p||_(S)}),l("onAuthenticatedUserTokenChange",function(y){y?(p=!0,_(y)):(p=!1,l("getUserToken",null,function(S,w){return _(w)}))}),l("getAuthenticatedUserToken",null,function(y,S){S&&(p=!0,_(S))}),g(function(y){var S=y.item,w=y.state,v=y.event,k=y.source;os(S)&&s({state:w,event:v,insights:c,item:S,insightsEvents:[kn({eventName:"Item Selected"},gf({item:S,items:k.getItems().filter(os)}))]})}),m(function(y){var S=y.item,w=y.source,v=y.state,k=y.event;os(S)&&o({state:v,event:k,insights:c,item:S,insightsEvents:[kn({eventName:"Item Active"},gf({item:S,items:w.getItems().filter(os)}))]})})},onStateChange:function(h){var d=h.state;f({state:d})},__autocomplete_pluginOptions:n}}function wf(){var n,t=arguments.length>1?arguments[1]:void 0;return[].concat(Ei(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]),["autocomplete-internal"],Ei((n=t.algoliaInsightsPlugin)!==null&&n!==void 0&&n.__automaticInsights?["autocomplete-automatic"]:[]))}function q0(n){return typeof n=="number"?n.toString():n}function $o(n,t){var e=t;return{then:function(r,i){return $o(n.then(Do(r,e,n),Do(i,e,n)),e)},catch:function(r){return $o(n.catch(Do(r,e,n)),e)},finally:function(r){return r&&e.onCancelList.push(r),$o(n.finally(Do(r&&function(){return e.onCancelList=[],r()},e,n)),e)},cancel:function(){e.isCanceled=!0;var r=e.onCancelList;e.onCancelList=[],r.forEach(function(i){i()})},isCanceled:function(){return e.isCanceled===!0}}}function Sf(n){return $o(n,{isCanceled:!1,onCancelList:[]})}function Do(n,t,e){return n?function(r){return t.isCanceled?r:n(r)}:e}function If(n,t,e,r){if(!e)return null;if(n<0&&(t===null||r!==null&&t===0))return e+n;var i=(t===null?-1:t)+n;return i<=-1||i>=e?r===null?null:0:i}function Of(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function Df(n){for(var t=1;tn.length)&&(t=n.length);for(var e=0,r=new Array(t);en.length)&&(t=n.length);for(var e=0,r=new Array(t);e=0||(B[j]=F[j]);return B}(S,w);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(S);for(k=0;k=0||Object.prototype.propertyIsEnumerable.call(S,v)&&(b[v]=S[v])}return b}(n,Z0);as&&i.environment.clearTimeout(as);var c=l.setCollections,u=l.setIsOpen,f=l.setQuery,h=l.setActiveItemId,d=l.setStatus,g=l.setContext;if(f(s),h(i.defaultActiveItemId),!s&&i.openOnFocus===!1){var m,p=a.getState().collections.map(function(S){return zr(zr({},S),{},{items:[]})});d("idle"),c(p),u((m=r.isOpen)!==null&&m!==void 0?m:i.shouldPanelOpen({state:a.getState()}));var _=Sf(Cf(p).then(function(){return Promise.resolve()}));return a.pendingRequests.add(_)}d("loading"),as=i.environment.setTimeout(function(){d("stalled")},i.stallThreshold);var y=Sf(Cf(i.getSources(zr({query:s,refresh:o,state:a.getState()},l)).then(function(S){return Promise.all(S.map(function(w){return Promise.resolve(w.getItems(zr({query:s,refresh:o,state:a.getState()},l))).then(function(v){return function(k,b,C){if(T=k,!!(T!=null&&T.execute)){var F=k.requesterId==="algolia"?Object.assign.apply(Object,[{}].concat(eg(Object.keys(C.context).map(function(j){var P;return(P=C.context[j])===null||P===void 0?void 0:P.__algoliaSearchParameters})))):{};return ci(ci({},k),{},{requests:k.queries.map(function(j){return{query:k.requesterId==="algolia"?ci(ci({},j),{},{params:ci(ci({},F),j.params)}):j,sourceId:b,transformResponse:k.transformResponse}})})}var T;return{items:k,sourceId:b}}(v,w.sourceId,a.getState())})})).then(X0).then(function(w){var v,k=w.some(function(b){return function(C){return!Array.isArray(C)&&!!(C!=null&&C._automaticInsights)}(b.items)});return k&&g({algoliaInsightsPlugin:zr(zr({},((v=a.getState().context)===null||v===void 0?void 0:v.algoliaInsightsPlugin)||{}),{},{__automaticInsights:k})}),function(b,C,F){return C.map(function(T){var j,P=b.filter(function(R){return R.sourceId===T.sourceId}),B=P.map(function(R){return R.items}),L=P[0].transformResponse,V=L?L({results:j=B,hits:j.map(function(R){return R.hits}).filter(Boolean),facetHits:j.map(function(R){var W;return(W=R.facetHits)===null||W===void 0?void 0:W.map(function(D){return{label:D.value,count:D.count,_highlightResult:{label:{value:D.highlighted}}}})}).filter(Boolean)}):B;return T.onResolve({source:T,results:B,items:V,state:F.getState()}),V.every(Boolean),'The `getItems` function from source "'.concat(T.sourceId,'" must return an array of items but returned ').concat(JSON.stringify(void 0),`. + +Did you forget to return items? + +See: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems`),{source:T,items:V}})}(w,S,a)}).then(function(w){return function(v){var k=v.props,b=v.state,C=v.collections.reduce(function(T,j){return Eo(Eo({},T),{},tg({},j.source.sourceId,Eo(Eo({},j.source),{},{getItems:function(){return Js(j.items)}})))},{}),F=k.plugins.reduce(function(T,j){return j.reshape?j.reshape(T):T},{sourcesBySourceId:C,state:b}).sourcesBySourceId;return Js(k.reshape({sourcesBySourceId:F,sources:Object.values(F),state:b})).filter(Boolean).map(function(T){return{source:T,items:T.getItems()}})}({collections:w,props:i,state:a.getState()})})}))).then(function(S){var w;d("idle"),c(S);var v=i.shouldPanelOpen({state:a.getState()});u((w=r.isOpen)!==null&&w!==void 0?w:i.openOnFocus&&!s&&v||v);var k=Qr(a.getState());if(a.getState().activeItemId!==null&&k){var b=k.item,C=k.itemInputValue,F=k.itemUrl,T=k.source;T.onActive(zr({event:t,item:b,itemInputValue:C,itemUrl:F,refresh:o,source:T,state:a.getState()},l))}}).finally(function(){d("idle"),as&&i.environment.clearTimeout(as)});return a.pendingRequests.add(y)}function Cs(n){return Cs=typeof Symbol=="function"&&ft(Symbol.iterator)=="symbol"?function(t){return ft(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ft(t)},Cs(n)}var e1=["event","props","refresh","store"];function Ff(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function Hr(n){for(var t=1;t=0||(u[l]=o[l]);return u}(n,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(i[e]=n[e])}return i}function js(n){return js=typeof Symbol=="function"&&ft(Symbol.iterator)=="symbol"?function(t){return ft(t)}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":ft(t)},js(n)}function Lf(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),e.push.apply(e,r)}return e}function u1(n){for(var t=1;t0},reshape:function(m){return m.sources}},u),{},{id:(h=u.id)!==null&&h!==void 0?h:"autocomplete-".concat(j0++),plugins:g,initialState:li({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},u.initialState),onStateChange:function(m){var p;(p=u.onStateChange)===null||p===void 0||p.call(u,m),g.forEach(function(_){var y;return(y=_.onStateChange)===null||y===void 0?void 0:y.call(_,m)})},onSubmit:function(m){var p;(p=u.onSubmit)===null||p===void 0||p.call(u,m),g.forEach(function(_){var y;return(y=_.onSubmit)===null||y===void 0?void 0:y.call(_,m)})},onReset:function(m){var p;(p=u.onReset)===null||p===void 0||p.call(u,m),g.forEach(function(_){var y;return(y=_.onReset)===null||y===void 0?void 0:y.call(_,m)})},getSources:function(m){return Promise.all([].concat(function(p){return function(_){if(Array.isArray(_))return hl(_)}(p)||function(_){if(typeof Symbol<"u"&&_[Symbol.iterator]!=null||_["@@iterator"]!=null)return Array.from(_)}(p)||function(_,y){if(_){if(typeof _=="string")return hl(_,y);var S=Object.prototype.toString.call(_).slice(8,-1);return S==="Object"&&_.constructor&&(S=_.constructor.name),S==="Map"||S==="Set"?Array.from(_):S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S)?hl(_,y):void 0}}(p)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(g.map(function(p){return p.getSources})),[u.getSources]).filter(Boolean).map(function(p){return function(_,y){var S=[];return Promise.resolve(_(y)).then(function(w){return Promise.all(w.filter(function(v){return!!v}).map(function(v){if(v.sourceId,S.includes(v.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(v.sourceId)," is not unique."));S.push(v.sourceId);var k={getItemInputValue:function(C){return C.state.query},getItemUrl:function(){},onSelect:function(C){(0,C.setIsOpen)(!1)},onActive:qo,onResolve:qo};Object.keys(k).forEach(function(C){k[C].__default=!0});var b=Df(Df({},k),v);return Promise.resolve(b)}))})}(p,m)})).then(function(p){return Js(p)}).then(function(p){return p.map(function(_){return li(li({},_),{},{onSelect:function(y){_.onSelect(y),f.forEach(function(S){var w;return(w=S.onSelect)===null||w===void 0?void 0:w.call(S,y)})},onActive:function(y){_.onActive(y),f.forEach(function(S){var w;return(w=S.onActive)===null||w===void 0?void 0:w.call(S,y)})},onResolve:function(y){_.onResolve(y),f.forEach(function(S){var w;return(w=S.onResolve)===null||w===void 0?void 0:w.call(S,y)})}})})})},navigator:li({navigate:function(m){var p=m.itemUrl;d.location.assign(p)},navigateNewTab:function(m){var p=m.itemUrl,_=d.open(p,"_blank","noopener");_==null||_.focus()},navigateNewWindow:function(m){var p=m.itemUrl;d.open(p,"_blank","noopener")}},u.navigator)})}(n,t),r=function(u,f,h){var d,g=f.initialState;return{getState:function(){return g},dispatch:function(m,p){var _=function(y){for(var S=1;S=0||(Fn[en]=tn[en]);return Fn}(Et,Ft);if(Object.getOwnPropertySymbols){var je=Object.getOwnPropertySymbols(Et);for(ke=0;ke=0||Object.prototype.propertyIsEnumerable.call(Et,Y)&&(le[Y]=Et[Y])}return le}(T,e1);if(j.key==="ArrowUp"||j.key==="ArrowDown"){var R=function(){var Et=Qr(L.getState()),Ft=P.environment.document.getElementById(mn(P.id,"item-".concat(L.getState().activeItemId),Et==null?void 0:Et.source));Ft&&(Ft.scrollIntoViewIfNeeded?Ft.scrollIntoViewIfNeeded(!1):Ft.scrollIntoView(!1))},W=function(){var Et=Qr(L.getState());if(L.getState().activeItemId!==null&&Et){var Ft=Et.item,Y=Et.itemInputValue,ke=Et.itemUrl,le=Et.source;le.onActive(Hr({event:j,item:Ft,itemInputValue:Y,itemUrl:ke,refresh:B,source:le,state:L.getState()},V))}};j.preventDefault(),L.getState().isOpen===!1&&(P.openOnFocus||L.getState().query)?Wr(Hr({event:j,props:P,query:L.getState().query,refresh:B,store:L},V)).then(function(){L.dispatch(j.key,{nextActiveItemId:P.defaultActiveItemId}),W(),setTimeout(R,0)}):(L.dispatch(j.key,{}),W(),R())}else if(j.key==="Escape")j.preventDefault(),L.dispatch(j.key,null),L.pendingRequests.cancelAll();else if(j.key==="Tab")L.dispatch("blur",null),L.pendingRequests.cancelAll();else if(j.key==="Enter"){if(L.getState().activeItemId===null||L.getState().collections.every(function(Et){return Et.items.length===0}))return void(P.debug||L.pendingRequests.cancelAll());j.preventDefault();var D=Qr(L.getState()),J=D.item,G=D.itemInputValue,tt=D.itemUrl,kt=D.source;if(j.metaKey||j.ctrlKey)tt!==void 0&&(kt.onSelect(Hr({event:j,item:J,itemInputValue:G,itemUrl:tt,refresh:B,source:kt,state:L.getState()},V)),P.navigator.navigateNewTab({itemUrl:tt,item:J,state:L.getState()}));else if(j.shiftKey)tt!==void 0&&(kt.onSelect(Hr({event:j,item:J,itemInputValue:G,itemUrl:tt,refresh:B,source:kt,state:L.getState()},V)),P.navigator.navigateNewWindow({itemUrl:tt,item:J,state:L.getState()}));else if(!j.altKey){if(tt!==void 0)return kt.onSelect(Hr({event:j,item:J,itemInputValue:G,itemUrl:tt,refresh:B,source:kt,state:L.getState()},V)),void P.navigator.navigate({itemUrl:tt,item:J,state:L.getState()});Wr(Hr({event:j,nextState:{isOpen:!1},props:P,query:G,refresh:B,store:L},V)).then(function(){kt.onSelect(Hr({event:j,item:J,itemInputValue:G,itemUrl:tt,refresh:B,source:kt,state:L.getState()},V))})}}}(Ue({event:F,props:f,refresh:h,store:d},g))},onFocus:_,onBlur:qo,onClick:function(F){m.inputElement!==f.environment.document.activeElement||d.getState().isOpen||_(F)}},v)},getPanelProps:function(m){return Ue({onMouseDown:function(p){p.preventDefault()},onMouseLeave:function(){d.dispatch("mouseleave",null)}},m)},getListProps:function(m){var p=m||{},_=p.source,y=ui(p,a1);return Ue({role:"listbox","aria-labelledby":mn(f.id,"label"),id:mn(f.id,"list",_)},y)},getItemProps:function(m){var p=m.item,_=m.source,y=ui(m,l1);return Ue({id:mn(f.id,"item-".concat(p.__autocomplete_id),_),role:"option","aria-selected":d.getState().activeItemId===p.__autocomplete_id,onMouseMove:function(S){if(p.__autocomplete_id!==d.getState().activeItemId){d.dispatch("mousemove",p.__autocomplete_id);var w=Qr(d.getState());if(d.getState().activeItemId!==null&&w){var v=w.item,k=w.itemInputValue,b=w.itemUrl,C=w.source;C.onActive(Ue({event:S,item:v,itemInputValue:k,itemUrl:b,refresh:h,source:C,state:d.getState()},g))}}},onMouseDown:function(S){S.preventDefault()},onClick:function(S){var w=_.getItemInputValue({item:p,state:d.getState()}),v=_.getItemUrl({item:p,state:d.getState()});(v?Promise.resolve():Wr(Ue({event:S,nextState:{isOpen:!1},props:f,query:w,refresh:h,store:d},g))).then(function(){_.onSelect(Ue({event:S,item:p,itemInputValue:w,itemUrl:v,refresh:h,source:_,state:d.getState()},g))})}},y)}}}(qr({props:e,refresh:o,store:r,navigator:e.navigator},i));function o(){return Wr(qr({event:new Event("input"),nextState:{isOpen:r.getState().isOpen},props:e,navigator:e.navigator,query:r.getState().query,refresh:o,store:r},i))}function a(u){u.forEach(function(f){var h;return(h=f.subscribe)===null||h===void 0?void 0:h.call(f,qr(qr({},i),{},{navigator:e.navigator,refresh:o,onSelect:function(d){t.push({onSelect:d})},onActive:function(d){t.push({onActive:d})},onResolve:function(d){t.push({onResolve:d})}}))})}function l(){return e.plugins.some(function(u){return u.name==="aa.algoliaInsightsPlugin"})}if(e.insights&&!l()){var c=typeof e.insights=="boolean"?{}:e.insights;e.plugins.push(vf(c))}return a(e.plugins),function(u){var f,h,d=u.metadata,g=u.environment;if(!((f=g.navigator)===null||f===void 0||(h=f.userAgent)===null||h===void 0)&&h.includes("Algolia Crawler")){var m=g.document.createElement("meta"),p=g.document.querySelector("head");m.name="algolia:metadata",setTimeout(function(){m.content=JSON.stringify(d),p.appendChild(m)},0)}}({metadata:f1({plugins:e.plugins,options:n}),environment:e.environment}),qr(qr({refresh:o,navigator:e.navigator},s),i)}function g1(n){var t=n.translations,e=(t===void 0?{}:t).searchByText,r=e===void 0?"Search by":e;return I.createElement("a",{href:"https://www.algolia.com/ref/docsearch/?utm_source=".concat(window.location.hostname,"&utm_medium=referral&utm_content=powered_by&utm_campaign=docsearch"),target:"_blank",rel:"noopener noreferrer"},I.createElement("span",{className:"DocSearch-Label"},r),I.createElement("svg",{width:"77",height:"19","aria-label":"Algolia",role:"img",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 2196.2 500"},I.createElement("defs",null,I.createElement("style",null,".cls-1,.cls-2{fill:#003dff;}.cls-2{fill-rule:evenodd;}")),I.createElement("path",{className:"cls-2",d:"M1070.38,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),I.createElement("rect",{className:"cls-1",x:"1845.88",y:"104.73",width:"62.58",height:"277.9",rx:"5.9",ry:"5.9"}),I.createElement("path",{className:"cls-2",d:"M1851.78,71.38h50.77c3.26,0,5.9-2.64,5.9-5.9V5.9c0-3.62-3.24-6.39-6.82-5.83l-50.77,7.95c-2.87,.45-4.99,2.92-4.99,5.83v51.62c0,3.26,2.64,5.9,5.9,5.9Z"}),I.createElement("path",{className:"cls-2",d:"M1764.03,275.3V5.91c0-3.63-3.24-6.39-6.82-5.83l-50.46,7.94c-2.87,.45-4.99,2.93-4.99,5.84l.17,273.22c0,12.92,0,92.7,95.97,95.49,3.33,.1,6.09-2.58,6.09-5.91v-40.78c0-2.96-2.19-5.51-5.12-5.84-34.85-4.01-34.85-47.57-34.85-54.72Z"}),I.createElement("path",{className:"cls-2",d:"M1631.95,142.72c-11.14-12.25-24.83-21.65-40.78-28.31-15.92-6.53-33.26-9.85-52.07-9.85-18.78,0-36.15,3.17-51.92,9.85-15.59,6.66-29.29,16.05-40.76,28.31-11.47,12.23-20.38,26.87-26.76,44.03-6.38,17.17-9.24,37.37-9.24,58.36,0,20.99,3.19,36.87,9.55,54.21,6.38,17.32,15.14,32.11,26.45,44.36,11.29,12.23,24.83,21.62,40.6,28.46,15.77,6.83,40.12,10.33,52.4,10.48,12.25,0,36.78-3.82,52.7-10.48,15.92-6.68,29.46-16.23,40.78-28.46,11.29-12.25,20.05-27.04,26.25-44.36,6.22-17.34,9.24-33.22,9.24-54.21,0-20.99-3.34-41.19-10.03-58.36-6.38-17.17-15.14-31.8-26.43-44.03Zm-44.43,163.75c-11.47,15.75-27.56,23.7-48.09,23.7-20.55,0-36.63-7.8-48.1-23.7-11.47-15.75-17.21-34.01-17.21-61.2,0-26.89,5.59-49.14,17.06-64.87,11.45-15.75,27.54-23.52,48.07-23.52,20.55,0,36.63,7.78,48.09,23.52,11.47,15.57,17.36,37.98,17.36,64.87,0,27.19-5.72,45.3-17.19,61.2Z"}),I.createElement("path",{className:"cls-2",d:"M894.42,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),I.createElement("path",{className:"cls-2",d:"M2133.97,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-14.52,22.58-22.99,49.63-22.99,78.73,0,44.89,20.13,84.92,51.59,111.1,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47,1.23,0,2.46-.03,3.68-.09,.36-.02,.71-.05,1.07-.07,.87-.05,1.75-.11,2.62-.2,.34-.03,.68-.08,1.02-.12,.91-.1,1.82-.21,2.73-.34,.21-.03,.42-.07,.63-.1,32.89-5.07,61.56-30.82,70.9-62.81v57.83c0,3.26,2.64,5.9,5.9,5.9h50.42c3.26,0,5.9-2.64,5.9-5.9V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,206.92c-12.2,10.16-27.97,13.98-44.84,15.12-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-42.24,0-77.12-35.89-77.12-79.37,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33v142.83Z"}),I.createElement("path",{className:"cls-2",d:"M1314.05,104.73h-49.33c-48.36,0-90.91,25.48-115.75,64.1-11.79,18.34-19.6,39.64-22.11,62.59-.58,5.3-.88,10.68-.88,16.14s.31,11.15,.93,16.59c4.28,38.09,23.14,71.61,50.66,94.52,2.93,2.6,6.05,4.98,9.31,7.14,12.86,8.49,28.11,13.47,44.52,13.47h0c17.99,0,34.61-5.93,48.16-15.97,16.29-11.58,28.88-28.54,34.48-47.75v50.26h-.11v11.08c0,21.84-5.71,38.27-17.34,49.36-11.61,11.08-31.04,16.63-58.25,16.63-11.12,0-28.79-.59-46.6-2.41-2.83-.29-5.46,1.5-6.27,4.22l-12.78,43.11c-1.02,3.46,1.27,7.02,4.83,7.53,21.52,3.08,42.52,4.68,54.65,4.68,48.91,0,85.16-10.75,108.89-32.21,21.48-19.41,33.15-48.89,35.2-88.52V110.63c0-3.26-2.64-5.9-5.9-5.9h-56.32Zm0,64.1s.65,139.13,0,143.36c-12.08,9.77-27.11,13.59-43.49,14.7-.16,.01-.33,.03-.49,.04-1.12,.07-2.24,.1-3.36,.1-1.32,0-2.63-.03-3.94-.1-40.41-2.11-74.52-37.26-74.52-79.38,0-10.25,1.96-20.01,5.42-28.98,11.22-29.12,38.77-49.74,71.06-49.74h49.33Z"}),I.createElement("path",{className:"cls-1",d:"M249.83,0C113.3,0,2,110.09,.03,246.16c-2,138.19,110.12,252.7,248.33,253.5,42.68,.25,83.79-10.19,120.3-30.03,3.56-1.93,4.11-6.83,1.08-9.51l-23.38-20.72c-4.75-4.21-11.51-5.4-17.36-2.92-25.48,10.84-53.17,16.38-81.71,16.03-111.68-1.37-201.91-94.29-200.13-205.96,1.76-110.26,92-199.41,202.67-199.41h202.69V407.41l-115-102.18c-3.72-3.31-9.42-2.66-12.42,1.31-18.46,24.44-48.53,39.64-81.93,37.34-46.33-3.2-83.87-40.5-87.34-86.81-4.15-55.24,39.63-101.52,94-101.52,49.18,0,89.68,37.85,93.91,85.95,.38,4.28,2.31,8.27,5.52,11.12l29.95,26.55c3.4,3.01,8.79,1.17,9.63-3.3,2.16-11.55,2.92-23.58,2.07-35.92-4.82-70.34-61.8-126.93-132.17-131.26-80.68-4.97-148.13,58.14-150.27,137.25-2.09,77.1,61.08,143.56,138.19,145.26,32.19,.71,62.03-9.41,86.14-26.95l150.26,133.2c6.44,5.71,16.61,1.14,16.61-7.47V9.48C499.66,4.25,495.42,0,490.18,0H249.83Z"})))}function Bo(n){return I.createElement("svg",{width:"15",height:"15","aria-label":n.ariaLabel,role:"img"},I.createElement("g",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.2"},n.children))}function y1(n){var t=n.translations,e=t===void 0?{}:t,r=e.selectText,i=r===void 0?"to select":r,s=e.selectKeyAriaLabel,o=s===void 0?"Enter key":s,a=e.navigateText,l=a===void 0?"to navigate":a,c=e.navigateUpKeyAriaLabel,u=c===void 0?"Arrow up":c,f=e.navigateDownKeyAriaLabel,h=f===void 0?"Arrow down":f,d=e.closeText,g=d===void 0?"to close":d,m=e.closeKeyAriaLabel,p=m===void 0?"Escape key":m,_=e.searchByText,y=_===void 0?"Search by":_;return I.createElement(I.Fragment,null,I.createElement("div",{className:"DocSearch-Logo"},I.createElement(g1,{translations:{searchByText:y}})),I.createElement("ul",{className:"DocSearch-Commands"},I.createElement("li",null,I.createElement("kbd",{className:"DocSearch-Commands-Key"},I.createElement(Bo,{ariaLabel:o},I.createElement("path",{d:"M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3"}))),I.createElement("span",{className:"DocSearch-Label"},i)),I.createElement("li",null,I.createElement("kbd",{className:"DocSearch-Commands-Key"},I.createElement(Bo,{ariaLabel:h},I.createElement("path",{d:"M7.5 3.5v8M10.5 8.5l-3 3-3-3"}))),I.createElement("kbd",{className:"DocSearch-Commands-Key"},I.createElement(Bo,{ariaLabel:u},I.createElement("path",{d:"M7.5 11.5v-8M10.5 6.5l-3-3-3 3"}))),I.createElement("span",{className:"DocSearch-Label"},l)),I.createElement("li",null,I.createElement("kbd",{className:"DocSearch-Commands-Key"},I.createElement(Bo,{ariaLabel:p},I.createElement("path",{d:"M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956"}))),I.createElement("span",{className:"DocSearch-Label"},g))))}function _1(n){var t=n.hit,e=n.children;return I.createElement("a",{href:t.url},e)}function b1(){return I.createElement("svg",{viewBox:"0 0 38 38",stroke:"currentColor",strokeOpacity:".5"},I.createElement("g",{fill:"none",fillRule:"evenodd"},I.createElement("g",{transform:"translate(1 1)",strokeWidth:"2"},I.createElement("circle",{strokeOpacity:".3",cx:"18",cy:"18",r:"18"}),I.createElement("path",{d:"M36 18c0-9.94-8.06-18-18-18"},I.createElement("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})))))}function v1(){return I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},I.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("path",{d:"M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0"}),I.createElement("path",{d:"M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13"})))}function ql(){return I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},I.createElement("path",{d:"M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function w1(){return I.createElement("svg",{className:"DocSearch-Hit-Select-Icon",width:"20",height:"20",viewBox:"0 0 20 20"},I.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("path",{d:"M18 3v4c0 2-2 4-4 4H2"}),I.createElement("path",{d:"M8 17l-6-6 6-6"})))}var S1=function(){return I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},I.createElement("path",{d:"M17 6v12c0 .52-.2 1-1 1H4c-.7 0-1-.33-1-1V2c0-.55.42-1 1-1h8l5 5zM14 8h-3.13c-.51 0-.87-.34-.87-.87V4",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))};function I1(n){switch(n.type){case"lvl1":return I.createElement(S1,null);case"content":return I.createElement(D1,null);default:return I.createElement(O1,null)}}function O1(){return I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},I.createElement("path",{d:"M13 13h4-4V8H7v5h6v4-4H7V8H3h4V3v5h6V3v5h4-4v5zm-6 0v4-4H3h4z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}function D1(){return I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},I.createElement("path",{d:"M17 5H3h14zm0 5H3h14zm0 5H3h14z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function Vf(){return I.createElement("svg",{width:"20",height:"20",viewBox:"0 0 20 20"},I.createElement("path",{d:"M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinejoin:"round"}))}function k1(){return I.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("path",{d:"M19 4.8a16 16 0 00-2-1.2m-3.3-1.2A16 16 0 001.1 4.7M16.7 8a12 12 0 00-2.8-1.4M10 6a12 12 0 00-6.7 2M12.3 14.7a4 4 0 00-4.5 0M14.5 11.4A8 8 0 0010 10M3 16L18 2M10 18h0"}))}function E1(){return I.createElement("svg",{width:"40",height:"40",viewBox:"0 0 20 20",fill:"none",fillRule:"evenodd",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("path",{d:"M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2"}))}function A1(n){var t=n.translations,e=t===void 0?{}:t,r=e.titleText,i=r===void 0?"Unable to fetch results":r,s=e.helpText,o=s===void 0?"You might want to check your network connection.":s;return I.createElement("div",{className:"DocSearch-ErrorScreen"},I.createElement("div",{className:"DocSearch-Screen-Icon"},I.createElement(k1,null)),I.createElement("p",{className:"DocSearch-Title"},i),I.createElement("p",{className:"DocSearch-Help"},o))}var T1=["translations"];function B1(n){var t=n.translations,e=t===void 0?{}:t,r=Jn(n,T1),i=e.noResultsText,s=i===void 0?"No results for":i,o=e.suggestedQueryText,a=o===void 0?"Try searching for":o,l=e.reportMissingResultsText,c=l===void 0?"Believe this query should return results?":l,u=e.reportMissingResultsLinkText,f=u===void 0?"Let us know.":u,h=r.state.context.searchSuggestions;return I.createElement("div",{className:"DocSearch-NoResults"},I.createElement("div",{className:"DocSearch-Screen-Icon"},I.createElement(E1,null)),I.createElement("p",{className:"DocSearch-Title"},s,' "',I.createElement("strong",null,r.state.query),'"'),h&&h.length>0&&I.createElement("div",{className:"DocSearch-NoResults-Prefill-List"},I.createElement("p",{className:"DocSearch-Help"},a,":"),I.createElement("ul",null,h.slice(0,3).reduce(function(d,g){return[].concat(Os(d),[I.createElement("li",{key:g},I.createElement("button",{className:"DocSearch-Prefill",key:g,type:"button",onClick:function(){r.setQuery(g.toLowerCase()+" "),r.refresh(),r.inputRef.current.focus()}},g))])},[]))),r.getMissingResultsUrl&&I.createElement("p",{className:"DocSearch-Help"},"".concat(c," "),I.createElement("a",{href:r.getMissingResultsUrl({query:r.state.query}),target:"_blank",rel:"noopener noreferrer"},f)))}var P1=["hit","attribute","tagName"];function zf(n,t){return t.split(".").reduce(function(e,r){return e!=null&&e[r]?e[r]:null},n)}function fi(n){var t=n.hit,e=n.attribute,r=n.tagName;return Yn(r===void 0?"span":r,jt(jt({},Jn(n,P1)),{},{dangerouslySetInnerHTML:{__html:zf(t,"_snippetResult.".concat(e,".value"))||zf(t,e)}}))}function $l(n){return n.collection&&n.collection.items.length!==0?I.createElement("section",{className:"DocSearch-Hits"},I.createElement("div",{className:"DocSearch-Hit-source"},n.title),I.createElement("ul",n.getListProps(),n.collection.items.map(function(t,e){return I.createElement(M1,qe({key:[n.title,t.objectID].join(":"),item:t,index:e},n))}))):null}function M1(n){var t=n.item,e=n.index,r=n.renderIcon,i=n.renderAction,s=n.getItemProps,o=n.onItemClick,a=n.collection,l=n.hitComponent,c=on(I.useState(!1),2),u=c[0],f=c[1],h=on(I.useState(!1),2),d=h[0],g=h[1],m=I.useRef(null),p=l;return I.createElement("li",qe({className:["DocSearch-Hit",t.__docsearch_parent&&"DocSearch-Hit--Child",u&&"DocSearch-Hit--deleting",d&&"DocSearch-Hit--favoriting"].filter(Boolean).join(" "),onTransitionEnd:function(){m.current&&m.current()}},s({item:t,source:a.source,onClick:function(_){o(t,_)}})),I.createElement(p,{hit:t},I.createElement("div",{className:"DocSearch-Hit-Container"},r({item:t,index:e}),t.hierarchy[t.type]&&t.type==="lvl1"&&I.createElement("div",{className:"DocSearch-Hit-content-wrapper"},I.createElement(fi,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.lvl1"}),t.content&&I.createElement(fi,{className:"DocSearch-Hit-path",hit:t,attribute:"content"})),t.hierarchy[t.type]&&(t.type==="lvl2"||t.type==="lvl3"||t.type==="lvl4"||t.type==="lvl5"||t.type==="lvl6")&&I.createElement("div",{className:"DocSearch-Hit-content-wrapper"},I.createElement(fi,{className:"DocSearch-Hit-title",hit:t,attribute:"hierarchy.".concat(t.type)}),I.createElement(fi,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),t.type==="content"&&I.createElement("div",{className:"DocSearch-Hit-content-wrapper"},I.createElement(fi,{className:"DocSearch-Hit-title",hit:t,attribute:"content"}),I.createElement(fi,{className:"DocSearch-Hit-path",hit:t,attribute:"hierarchy.lvl1"})),i({item:t,runDeleteTransition:function(_){f(!0),m.current=_},runFavoriteTransition:function(_){g(!0),m.current=_}}))))}function Wf(n,t,e){return n.reduce(function(r,i){var s=t(i);return r.hasOwnProperty(s)||(r[s]=[]),r[s].length<(e||5)&&r[s].push(i),r},{})}function Hf(n){return n}function Po(n){return n.button===1||n.altKey||n.ctrlKey||n.metaKey||n.shiftKey}function N1(){}var rg=/(|<\/mark>)/g,C1=RegExp(rg.source);function ig(n){var t,e,r=n;if(!r.__docsearch_parent&&!n._highlightResult)return n.hierarchy.lvl0;var i=r.__docsearch_parent?(t=r.__docsearch_parent)===null||t===void 0||(t=t._highlightResult)===null||t===void 0||(t=t.hierarchy)===null||t===void 0?void 0:t.lvl0:(e=n._highlightResult)===null||e===void 0||(e=e.hierarchy)===null||e===void 0?void 0:e.lvl0;return i?i.value&&C1.test(i.value)?i.value.replace(rg,""):i.value:n.hierarchy.lvl0}function F1(n){return I.createElement("div",{className:"DocSearch-Dropdown-Container"},n.state.collections.map(function(t){if(t.items.length===0)return null;var e=ig(t.items[0]);return I.createElement($l,qe({},n,{key:t.source.sourceId,title:e,collection:t,renderIcon:function(r){var i,s=r.item,o=r.index;return I.createElement(I.Fragment,null,s.__docsearch_parent&&I.createElement("svg",{className:"DocSearch-Hit-Tree",viewBox:"0 0 24 54"},I.createElement("g",{stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"},s.__docsearch_parent!==((i=t.items[o+1])===null||i===void 0?void 0:i.__docsearch_parent)?I.createElement("path",{d:"M8 6v21M20 27H8.3"}):I.createElement("path",{d:"M8 6v42M20 27H8.3"}))),I.createElement("div",{className:"DocSearch-Hit-icon"},I.createElement(I1,{type:s.type})))},renderAction:function(){return I.createElement("div",{className:"DocSearch-Hit-action"},I.createElement(w1,null))}}))}),n.resultsFooterComponent&&I.createElement("section",{className:"DocSearch-HitsFooter"},I.createElement(n.resultsFooterComponent,{state:n.state})))}var j1=["translations"];function L1(n){var t=n.translations,e=t===void 0?{}:t,r=Jn(n,j1),i=e.recentSearchesTitle,s=i===void 0?"Recent":i,o=e.noRecentSearchesText,a=o===void 0?"No recent searches":o,l=e.saveRecentSearchButtonTitle,c=l===void 0?"Save this search":l,u=e.removeRecentSearchButtonTitle,f=u===void 0?"Remove this search from history":u,h=e.favoriteSearchesTitle,d=h===void 0?"Favorite":h,g=e.removeFavoriteSearchButtonTitle,m=g===void 0?"Remove this search from favorites":g;return r.state.status==="idle"&&r.hasCollections===!1?r.disableUserPersonalization?null:I.createElement("div",{className:"DocSearch-StartScreen"},I.createElement("p",{className:"DocSearch-Help"},a)):r.hasCollections===!1?null:I.createElement("div",{className:"DocSearch-Dropdown-Container"},I.createElement($l,qe({},r,{title:s,collection:r.state.collections[0],renderIcon:function(){return I.createElement("div",{className:"DocSearch-Hit-icon"},I.createElement(v1,null))},renderAction:function(p){var _=p.item,y=p.runFavoriteTransition,S=p.runDeleteTransition;return I.createElement(I.Fragment,null,I.createElement("div",{className:"DocSearch-Hit-action"},I.createElement("button",{className:"DocSearch-Hit-action-button",title:c,type:"submit",onClick:function(w){w.preventDefault(),w.stopPropagation(),y(function(){r.favoriteSearches.add(_),r.recentSearches.remove(_),r.refresh()})}},I.createElement(Vf,null))),I.createElement("div",{className:"DocSearch-Hit-action"},I.createElement("button",{className:"DocSearch-Hit-action-button",title:f,type:"submit",onClick:function(w){w.preventDefault(),w.stopPropagation(),S(function(){r.recentSearches.remove(_),r.refresh()})}},I.createElement(ql,null))))}})),I.createElement($l,qe({},r,{title:d,collection:r.state.collections[1],renderIcon:function(){return I.createElement("div",{className:"DocSearch-Hit-icon"},I.createElement(Vf,null))},renderAction:function(p){var _=p.item,y=p.runDeleteTransition;return I.createElement("div",{className:"DocSearch-Hit-action"},I.createElement("button",{className:"DocSearch-Hit-action-button",title:m,type:"submit",onClick:function(S){S.preventDefault(),S.stopPropagation(),y(function(){r.favoriteSearches.remove(_),r.refresh()})}},I.createElement(ql,null)))}})))}var R1=["translations"],U1=I.memo(function(n){var t=n.translations,e=t===void 0?{}:t,r=Jn(n,R1);if(r.state.status==="error")return I.createElement(A1,{translations:e==null?void 0:e.errorScreen});var i=r.state.collections.some(function(s){return s.items.length>0});return r.state.query?i===!1?I.createElement(B1,qe({},r,{translations:e==null?void 0:e.noResultsScreen})):I.createElement(F1,r):I.createElement(L1,qe({},r,{hasCollections:i,translations:e==null?void 0:e.startScreen}))},function(n,t){return t.state.status==="loading"||t.state.status==="stalled"}),x1=["translations"];function V1(n){var t=n.translations,e=t===void 0?{}:t,r=Jn(n,x1),i=e.resetButtonTitle,s=i===void 0?"Clear the query":i,o=e.resetButtonAriaLabel,a=o===void 0?"Clear the query":o,l=e.cancelButtonText,c=l===void 0?"Cancel":l,u=e.cancelButtonAriaLabel,f=u===void 0?"Cancel":u,h=e.searchInputLabel,d=h===void 0?"Search":h,g=r.getFormProps({inputElement:r.inputRef.current}).onReset;return I.useEffect(function(){r.autoFocus&&r.inputRef.current&&r.inputRef.current.focus()},[r.autoFocus,r.inputRef]),I.useEffect(function(){r.isFromSelection&&r.inputRef.current&&r.inputRef.current.select()},[r.isFromSelection,r.inputRef]),I.createElement(I.Fragment,null,I.createElement("form",{className:"DocSearch-Form",onSubmit:function(m){m.preventDefault()},onReset:g},I.createElement("label",qe({className:"DocSearch-MagnifierLabel"},r.getLabelProps()),I.createElement(Jp,null),I.createElement("span",{className:"DocSearch-VisuallyHiddenForAccessibility"},d)),I.createElement("div",{className:"DocSearch-LoadingIndicator"},I.createElement(b1,null)),I.createElement("input",qe({className:"DocSearch-Input",ref:r.inputRef},r.getInputProps({inputElement:r.inputRef.current,autoFocus:r.autoFocus,maxLength:64}))),I.createElement("button",{type:"reset",title:s,className:"DocSearch-Reset","aria-label":a,hidden:!r.state.query},I.createElement(ql,null))),I.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":f,onClick:r.onClose},c))}var z1=["_highlightResult","_snippetResult"];function qf(n){var t=n.key,e=n.limit,r=e===void 0?5:e,i=function(o){return function(){var a="__TEST_KEY__";try{return localStorage.setItem(a,""),localStorage.removeItem(a),!0}catch{return!1}}()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(a){return window.localStorage.setItem(o,JSON.stringify(a))},getItem:function(){var a=window.localStorage.getItem(o);return a?JSON.parse(a):[]}}}(t),s=i.getItem().slice(0,r);return{add:function(o){var a=o;a._highlightResult,a._snippetResult;var l=Jn(a,z1),c=s.findIndex(function(u){return u.objectID===l.objectID});c>-1&&s.splice(c,1),s.unshift(l),s=s.slice(0,r),i.setItem(s)},remove:function(o){s=s.filter(function(a){return a.objectID!==o.objectID}),i.setItem(s)},getAll:function(){return s}}}function W1(n){var t,e="algolia-client-js-".concat(n.key);function r(){return t===void 0&&(t=n.localStorage||window.localStorage),t}function i(){return JSON.parse(r().getItem(e)||"{}")}function s(o){r().setItem(e,JSON.stringify(o))}return{get:function(o,a){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var c,u,f;return c=n.timeToLive?1e3*n.timeToLive:null,u=i(),s(f=Object.fromEntries(Object.entries(u).filter(function(h){return on(h,2)[1].timestamp!==void 0}))),c&&s(Object.fromEntries(Object.entries(f).filter(function(h){var d=on(h,2)[1],g=new Date().getTime();return!(d.timestamp+c2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return i().then(function(o){return Promise.all([o,s.miss(o)])}).then(function(o){return on(o,1)[0]})},set:function(r,i){return Promise.resolve(i)},delete:function(r){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(r,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return e.get(r,i,s).catch(function(){return vs({caches:t}).get(r,i,s)})},set:function(r,i){return e.set(r,i).catch(function(){return vs({caches:t}).set(r,i)})},delete:function(r){return e.delete(r).catch(function(){return vs({caches:t}).delete(r)})},clear:function(){return e.clear().catch(function(){return vs({caches:t}).clear()})}}}function gl(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},s=JSON.stringify(e);if(s in t)return Promise.resolve(n.serializable?JSON.parse(t[s]):t[s]);var o=r();return o.then(function(a){return i.miss(a)}).then(function(){return o})},set:function(e,r){return t[JSON.stringify(e)]=n.serializable?JSON.stringify(r):r,Promise.resolve(r)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function H1(n){var t=n.algoliaAgents,e=n.client,r=n.version,i=function(s){var o={value:"Algolia for JavaScript (".concat(s,")"),add:function(a){var l="; ".concat(a.segment).concat(a.version!==void 0?" (".concat(a.version,")"):"");return o.value.indexOf(l)===-1&&(o.value="".concat(o.value).concat(l)),o}};return o}(r).add({segment:e,version:r});return t.forEach(function(s){return i.add(s)}),i}var $f=12e4;function Yf(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"up",e=Date.now();return jt(jt({},n),{},{status:t,lastUpdate:e,isUp:function(){return t==="up"||Date.now()-e>$f},isTimedOut:function(){return t==="timed out"&&Date.now()-e<=$f}})}var sg=function(){function n(t,e){var r;return Yi(this,n),Ji(r=$i(this,n,[t]),"name","AlgoliaError"),e&&(r.name=e),r}return Qi(n,Wl(Error)),Ki(n)}(),og=function(){function n(t,e,r){var i;return Yi(this,n),Ji(i=$i(this,n,[t,r]),"stackTrace",void 0),i.stackTrace=e,i}return Qi(n,sg),Ki(n)}(),q1=function(){function n(t){return Yi(this,n),$i(this,n,["Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",t,"RetryError"])}return Qi(n,og),Ki(n)}(),Yl=function(){function n(t,e,r){var i,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"ApiError";return Yi(this,n),Ji(i=$i(this,n,[t,r,s]),"status",void 0),i.status=e,i}return Qi(n,og),Ki(n)}(),$1=function(){function n(t,e){var r;return Yi(this,n),Ji(r=$i(this,n,[t,"DeserializationError"]),"response",void 0),r.response=e,r}return Qi(n,sg),Ki(n)}(),Y1=function(){function n(t,e,r,i){var s;return Yi(this,n),Ji(s=$i(this,n,[t,e,i,"DetailedApiError"]),"error",void 0),s.error=r,s}return Qi(n,Yl),Ki(n)}();function K1(n,t,e){var r,i=(r=e,Object.keys(r).filter(function(o){return r[o]!==void 0}).sort().map(function(o){return"".concat(o,"=").concat(encodeURIComponent(Object.prototype.toString.call(r[o])==="[object Array]"?r[o].join(","):r[o]).replace(/\+/g,"%20"))}).join("&")),s="".concat(n.protocol,"://").concat(n.url).concat(n.port?":".concat(n.port):"","/").concat(t.charAt(0)==="/"?t.substring(1):t);return i.length&&(s+="?".concat(i)),s}function J1(n,t){if(n.method!=="GET"&&(n.data!==void 0||t.data!==void 0)){var e=Array.isArray(n.data)?n.data:jt(jt({},n.data),t.data);return JSON.stringify(e)}}function Q1(n,t,e){var r=jt(jt(jt({Accept:"application/json"},n),t),e),i={};return Object.keys(r).forEach(function(s){var o=r[s];i[s.toLowerCase()]=o}),i}function G1(n){try{return JSON.parse(n.content)}catch(t){throw new $1(t.message,n)}}function X1(n,t){var e=n.content,r=n.status;try{var i=JSON.parse(e);return"error"in i?new Y1(i.message,r,i.error,t):new Yl(i.message,r,t)}catch{}return new Yl(e,r,t)}function Z1(n){return n.map(function(t){return ag(t)})}function ag(n){var t=n.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return jt(jt({},n),{},{request:jt(jt({},n.request),{},{headers:jt(jt({},n.request.headers),t)})})}var tw=["appId","apiKey","authMode","algoliaAgents"],ew=["params"],Kf="5.12.0";function nw(n){return[{url:"".concat(n,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(n,".algolia.net"),accept:"write",protocol:"https"}].concat(function(t){for(var e=t,r=t.length-1;r>0;r--){var i=Math.floor(Math.random()*(r+1)),s=t[r];e[r]=t[i],e[i]=s}return e}([{url:"".concat(n,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(n,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(n,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}var Kl="3.8.0",rw=["footer","searchBox"];function iw(n){var t=n.appId,e=n.apiKey,r=n.indexName,i=n.placeholder,s=i===void 0?"Search docs":i,o=n.searchParameters,a=n.maxResultsPerGroup,l=n.onClose,c=l===void 0?N1:l,u=n.transformItems,f=u===void 0?Hf:u,h=n.hitComponent,d=h===void 0?_1:h,g=n.resultsFooterComponent,m=g===void 0?function(){return null}:g,p=n.navigator,_=n.initialScrollY,y=_===void 0?0:_,S=n.transformSearchClient,w=S===void 0?Hf:S,v=n.disableUserPersonalization,k=v!==void 0&&v,b=n.initialQuery,C=b===void 0?"":b,F=n.translations,T=F===void 0?{}:F,j=n.getMissingResultsUrl,P=n.insights,B=P!==void 0&&P,L=T.footer,V=T.searchBox,R=Jn(T,rw),W=on(I.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),D=W[0],J=W[1],G=I.useRef(null),tt=I.useRef(null),kt=I.useRef(null),Et=I.useRef(null),Ft=I.useRef(null),Y=I.useRef(10),ke=I.useRef(typeof window<"u"?window.getSelection().toString().slice(0,64):"").current,le=I.useRef(C||ke).current,je=function(At,Kt,Be){return I.useMemo(function(){var Le=function(U,X){if(!U||typeof U!="string")throw new Error("`appId` is missing.");if(!X||typeof X!="string")throw new Error("`apiKey` is missing.");return function(z){var Z=z.appId,rt=z.apiKey,Wt=z.authMode,_e=z.algoliaAgents,xt=Jn(z,tw),wt=function(K,it){var ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"WithinHeaders",Ye={"x-algolia-api-key":it,"x-algolia-application-id":K};return{headers:function(){return ce==="WithinHeaders"?Ye:{}},queryParameters:function(){return ce==="WithinQueryParameters"?Ye:{}}}}(Z,rt,Wt),St=function(K){var it=K.hosts,ce=K.hostsCache,Ye=K.baseHeaders,hn=K.logger,jn=K.baseQueryParameters,Tt=K.algoliaAgent,Ee=K.timeouts,Re=K.requester,Nt=K.requestsCache,ut=K.responsesCache;function Jt(Ne){return he.apply(this,arguments)}function he(){return(he=cl(Yr().mark(function Ne(Ae){var Te,Zn,Ve,nn,Sr;return Yr().wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return tr.next=2,Promise.all(Ae.map(function(Ke){return ce.get(Ke,function(){return Promise.resolve(Yf(Ke))})}));case 2:return Te=tr.sent,Zn=Te.filter(function(Ke){return Ke.isUp()}),Ve=Te.filter(function(Ke){return Ke.isTimedOut()}),nn=[].concat(Os(Zn),Os(Ve)),Sr=nn.length>0?nn:Ae,tr.abrupt("return",{hosts:Sr,getTimeout:function(Ke,ii){return(Ve.length===0&&Ke===0?1:Ve.length+3+Ke)*ii}});case 8:case"end":return tr.stop()}},Ne)}))).apply(this,arguments)}function be(Ne,Ae){return Ln.apply(this,arguments)}function Ln(){return Ln=cl(Yr().mark(function Ne(Ae,Te){var Zn,Ve,nn,Sr,tr,Ke,ii,Ua,Rr,uo,xa,Pc,Va,za=arguments;return Yr().wrap(function(si){for(;;)switch(si.prev=si.next){case 0:if(Zn=!(za.length>2&&za[2]!==void 0)||za[2],Ve=[],nn=J1(Ae,Te),Sr=Q1(Ye,Ae.headers,Te.headers),tr=Ae.method==="GET"?jt(jt({},Ae.data),Te.data):{},Ke=jt(jt(jt({},jn),Ae.queryParameters),tr),Tt.value&&(Ke["x-algolia-agent"]=Tt.value),Te&&Te.queryParameters)for(ii=0,Ua=Object.keys(Te.queryParameters);ii1&&arguments[1]!==void 0?arguments[1]:{},Te=Ne.useReadTransporter||Ne.method==="GET";if(!Te)return be(Ne,Ae,Te);var Zn=function(){return be(Ne,Ae)};if((Ae.cacheable||Ne.cacheable)!==!0)return Zn();var Ve={request:Ne,requestOptions:Ae,transporter:{queryParameters:jn,headers:Ye}};return ut.get(Ve,function(){return Nt.get(Ve,function(){return Nt.set(Ve,Zn()).then(function(nn){return Promise.all([Nt.delete(Ve),nn])},function(nn){return Promise.all([Nt.delete(Ve),Promise.reject(nn)])}).then(function(nn){var Sr=on(nn,2);return Sr[0],Sr[1]})})},{miss:function(nn){return ut.set(Ve,nn)}})},requestsCache:Nt,responsesCache:ut}}(jt(jt({hosts:nw(Z)},xt),{},{algoliaAgent:H1({algoliaAgents:_e,client:"Lite",version:Kf}),baseHeaders:jt(jt({"content-type":"text/plain"},wt.headers()),xt.baseHeaders),baseQueryParameters:jt(jt({},wt.queryParameters()),xt.baseQueryParameters)}));return{transporter:St,appId:Z,clearCache:function(){return Promise.all([St.requestsCache.clear(),St.responsesCache.clear()]).then(function(){})},get _ua(){return St.algoliaAgent.value},addAlgoliaAgent:function(K,it){St.algoliaAgent.add({segment:K,version:it})},setClientApiKey:function(K){var it=K.apiKey;Wt&&Wt!=="WithinHeaders"?St.baseQueryParameters["x-algolia-api-key"]=it:St.baseHeaders["x-algolia-api-key"]=it},searchForHits:function(K,it){return this.search(K,it)},searchForFacets:function(K,it){return this.search(K,it)},customPost:function(K,it){var ce=K.path,Ye=K.parameters,hn=K.body;if(!ce)throw new Error("Parameter `path` is required when calling `customPost`.");var jn={method:"POST",path:"/{path}".replace("{path}",ce),queryParameters:Ye||{},headers:{},data:hn||{}};return St.request(jn,it)},getRecommendations:function(K,it){if(K&&Array.isArray(K)&&(K={requests:K}),!K)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!K.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");var ce={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:K,useReadTransporter:!0,cacheable:!0};return St.request(ce,it)},search:function(K,it){if(K&&Array.isArray(K)){var ce={requests:K.map(function(hn){var jn=hn.params,Tt=Jn(hn,ew);return Tt.type==="facet"?jt(jt(jt({},Tt),jn),{},{type:"facet"}):jt(jt(jt({},Tt),jn),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})})};K=ce}if(!K)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!K.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var Ye={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:K,useReadTransporter:!0,cacheable:!0};return St.request(Ye,it)}}}(jt({appId:U,apiKey:X,timeouts:{connect:1e3,read:2e3,write:3e4},logger:{debug:function(z,Z){return Promise.resolve()},info:function(z,Z){return Promise.resolve()},error:function(z,Z){return Promise.resolve()}},requester:{send:function(z){return new Promise(function(Z){var rt=new XMLHttpRequest;rt.open(z.method,z.url,!0),Object.keys(z.headers).forEach(function(wt){return rt.setRequestHeader(wt,z.headers[wt])});var Wt,_e=function(wt,St){return setTimeout(function(){rt.abort(),Z({status:0,content:St,isTimedOut:!0})},wt)},xt=_e(z.connectTimeout,"Connection timeout");rt.onreadystatechange=function(){rt.readyState>rt.OPENED&&Wt===void 0&&(clearTimeout(xt),Wt=_e(z.responseTimeout,"Socket timeout"))},rt.onerror=function(){rt.status===0&&(clearTimeout(xt),clearTimeout(Wt),Z({content:rt.responseText||"Network request failed",status:rt.status,isTimedOut:!1}))},rt.onload=function(){clearTimeout(xt),clearTimeout(Wt),Z({content:rt.responseText,status:rt.status,isTimedOut:!1})},rt.send(z.data)})}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:gl(),requestsCache:gl({serializable:!1}),hostsCache:vs({caches:[W1({key:"".concat(Kf,"-").concat(U)}),gl()]})},void 0))}(At,Kt);return Le.addAlgoliaAgent("docsearch",Kl),/docsearch.js \(.*\)/.test(Le.transporter.algoliaAgent.value)===!1&&Le.addAlgoliaAgent("docsearch-react",Kl),Be(Le)},[At,Kt,Be])}(t,e,w),tn=I.useRef(qf({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(r),limit:10})).current,Cn=I.useRef(qf({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(r),limit:tn.getAll().length===0?7:4})).current,en=I.useCallback(function(At){if(!k){var Kt=At.type==="content"?At.__docsearch_parent:At;Kt&&tn.getAll().findIndex(function(Be){return Be.objectID===Kt.objectID})===-1&&Cn.add(Kt)}},[tn,Cn,k]),vr=I.useCallback(function(At){if(D.context.algoliaInsightsPlugin&&At.__autocomplete_id){var Kt=At,Be={eventName:"Item Selected",index:Kt.__autocomplete_indexName,items:[Kt],positions:[At.__autocomplete_id],queryID:Kt.__autocomplete_queryID};D.context.algoliaInsightsPlugin.insights.clickedObjectIDsAfterSearch(Be)}},[D.context.algoliaInsightsPlugin]),Fn=I.useMemo(function(){return p1({id:"docsearch",defaultActiveItemId:0,placeholder:s,openOnFocus:!0,initialState:{query:le,context:{searchSuggestions:[]}},insights:B,navigator:p,onStateChange:function(At){J(At.state)},getSources:function(At){var Kt=At.query,Be=At.state,Le=At.setContext,U=At.setStatus;if(!Kt)return k?[]:[{sourceId:"recentSearches",onSelect:function(z){var Z=z.item,rt=z.event;en(Z),Po(rt)||c()},getItemUrl:function(z){return z.item.url},getItems:function(){return Cn.getAll()}},{sourceId:"favoriteSearches",onSelect:function(z){var Z=z.item,rt=z.event;en(Z),Po(rt)||c()},getItemUrl:function(z){return z.item.url},getItems:function(){return tn.getAll()}}];var X=!!B;return je.search({requests:[jt({query:Kt,indexName:r,attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(Y.current),"hierarchy.lvl2:".concat(Y.current),"hierarchy.lvl3:".concat(Y.current),"hierarchy.lvl4:".concat(Y.current),"hierarchy.lvl5:".concat(Y.current),"hierarchy.lvl6:".concat(Y.current),"content:".concat(Y.current)],snippetEllipsisText:"…",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20,clickAnalytics:X},o)]}).catch(function(z){throw z.name==="RetryError"&&U("error"),z}).then(function(z){var Z=z.results[0],rt=Z.hits,Wt=Z.nbHits,_e=Wf(rt,function(wt){return ig(wt)},a);Be.context.searchSuggestions.length0&&(ri(),Ft.current&&Ft.current.focus())},[le,ri]),I.useEffect(function(){function At(){if(tt.current){var Kt=.01*window.innerHeight;tt.current.style.setProperty("--docsearch-vh","".concat(Kt,"px"))}}return At(),window.addEventListener("resize",At),function(){window.removeEventListener("resize",At)}},[]),I.createElement("div",qe({ref:G},Gi({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",D.status==="stalled"&&"DocSearch-Container--Stalled",D.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(At){At.target===At.currentTarget&&c()}}),I.createElement("div",{className:"DocSearch-Modal",ref:tt},I.createElement("header",{className:"DocSearch-SearchBar",ref:kt},I.createElement(V1,qe({},Fn,{state:D,autoFocus:le.length===0,inputRef:Ft,isFromSelection:!!le&&le===ke,translations:V,onClose:c}))),I.createElement("div",{className:"DocSearch-Dropdown",ref:Et},I.createElement(U1,qe({},Fn,{indexName:r,state:D,hitComponent:d,resultsFooterComponent:m,disableUserPersonalization:k,recentSearches:Cn,favoriteSearches:tn,inputRef:Ft,translations:R,getMissingResultsUrl:j,onItemClick:function(At,Kt){vr(At),en(At),Po(Kt)||c()}}))),I.createElement("footer",{className:"DocSearch-Footer"},I.createElement(y1,{translations:L}))))}function sw(n){var t,e,r=I.useRef(null),i=on(I.useState(!1),2),s=i[0],o=i[1],a=on(I.useState((n==null?void 0:n.initialQuery)||void 0),2),l=a[0],c=a[1],u=I.useCallback(function(){o(!0)},[o]),f=I.useCallback(function(){o(!1),c(n==null?void 0:n.initialQuery)},[o,n.initialQuery]);return function(h){var d=h.isOpen,g=h.onOpen,m=h.onClose,p=h.onInput,_=h.searchButtonRef;I.useEffect(function(){function y(S){var w;if(S.code==="Escape"&&d||((w=S.key)===null||w===void 0?void 0:w.toLowerCase())==="k"&&(S.metaKey||S.ctrlKey)||!function(v){var k=v.target,b=k.tagName;return k.isContentEditable||b==="INPUT"||b==="SELECT"||b==="TEXTAREA"}(S)&&S.key==="/"&&!d)return S.preventDefault(),void(d?m():document.body.classList.contains("DocSearch--active")||g());_&&_.current===document.activeElement&&p&&/[a-zA-Z0-9]/.test(String.fromCharCode(S.keyCode))&&p(S)}return window.addEventListener("keydown",y),function(){window.removeEventListener("keydown",y)}},[d,g,m,p,_])}({isOpen:s,onOpen:u,onClose:f,onInput:I.useCallback(function(h){o(!0),c(h.key)},[o,c]),searchButtonRef:r}),I.createElement(I.Fragment,null,I.createElement(F0,{ref:r,translations:n==null||(t=n.translations)===null||t===void 0?void 0:t.button,onClick:u}),s&&xp(I.createElement(iw,qe({},n,{initialScrollY:window.scrollY,initialQuery:l,translations:n==null||(e=n.translations)===null||e===void 0?void 0:e.modal,onClose:f})),document.body))}function ow(n){zp(I.createElement(sw,Cl({},n,{transformSearchClient:function(t){return t.addAlgoliaAgent("docsearch.js",Kl),n.transformSearchClient?n.transformSearchClient(t):t}})),function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:window;return typeof t=="string"?e.document.querySelector(t):t}(n.container,n.environment))}function aw(n){let t;return{c(){t=q("div"),this.h()},l(e){t=$(e,"DIV",{id:!0}),Q(t).forEach(O),this.h()},h(){N(t,"id","docsearch")},m(e,r){x(e,t,r)},p:Qt,i:Qt,o:Qt,d(e){e&&O(t)}}}function lw(n,t,e){let{algolia:r}=t;return Xr(()=>{ow({container:"#docsearch",appId:r==null?void 0:r.appId,apiKey:r==null?void 0:r.apiKey,indexName:r==null?void 0:r.indexName})}),n.$$set=i=>{"algolia"in i&&e(0,r=i.algolia)},[r]}class cw extends se{constructor(t){super(),oe(this,t,lw,aw,Zt,{algolia:0})}}function uw(n){let t;const e=n[3].default,r=Se(e,n,n[11],null);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,s){r&&r.m(i,s),t=!0},p(i,s){r&&r.p&&(!t||s&2048)&&Ie(r,e,i,i[11],t?De(e,i[11],s,null):Oe(i[11]),null)},i(i){t||(E(r,i),t=!0)},o(i){M(r,i),t=!1},d(i){r&&r.d(i)}}}function fw(n){let t,e;const r=[{class:Ci("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-base-200 data-[disabled]:opacity-50",n[1]&&"pl-8",n[0])},n[2]];let i={$$slots:{default:[uw]},$$scope:{ctx:n}};for(let s=0;s{t=de(de({},t),ei(p)),e(2,i=an(t,r)),"class"in p&&e(0,a=p.class),"inset"in p&&e(1,l=p.inset),"$$scope"in p&&e(11,o=p.$$scope)},[a,l,i,s,c,u,f,h,d,g,m,o]}class Jl extends se{constructor(t){super(),oe(this,t,dw,fw,Zt,{class:0,inset:1})}}function hw(n){let t;const e=n[5].default,r=Se(e,n,n[7],null);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,s){r&&r.m(i,s),t=!0},p(i,s){r&&r.p&&(!t||s&128)&&Ie(r,e,i,i[7],t?De(e,i[7],s,null):Oe(i[7]),null)},i(i){t||(E(r,i),t=!0)},o(i){M(r,i),t=!1},d(i){r&&r.d(i)}}}function mw(n){let t,e;const r=[{transition:n[2]},{transitionConfig:n[3]},{sideOffset:n[1]},{class:Ci("z-50 min-w-[8rem] rounded-md border border-base-200 bg-popover p-1 shadow-md bg-base-100 focus:outline-none antialiased text-base-conetnt print:hidden",n[0])},n[4]];let i={$$slots:{default:[hw]},$$scope:{ctx:n}};for(let s=0;s{t=de(de({},t),ei(h)),e(4,i=an(t,r)),"class"in h&&e(0,a=h.class),"sideOffset"in h&&e(1,l=h.sideOffset),"transition"in h&&e(2,c=h.transition),"transitionConfig"in h&&e(3,u=h.transitionConfig),"$$scope"in h&&e(7,o=h.$$scope)},[a,l,c,u,i,s,f,o]}class gw extends se{constructor(t){super(),oe(this,t,pw,mw,Zt,{class:0,sideOffset:1,transition:2,transitionConfig:3})}}function yw(n){let t,e,r;const i=n[3].default,s=Se(i,n,n[2],null);let o=[{class:e=Ci("ml-auto text-xs tracking-widest opacity-60",n[0])},n[1]],a={};for(let l=0;l{t=de(de({},t),ei(l)),e(1,i=an(t,r)),"class"in l&&e(0,a=l.class),"$$scope"in l&&e(2,o=l.$$scope)},[a,i,o,s]}class lg extends se{constructor(t){super(),oe(this,t,_w,yw,Zt,{class:0})}}const bw=Dv,vw=Yv,ww=wv;function Sw(n){let t,e;return t=new On({props:{src:Mg,class:"h-6 w-6"}}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p:Qt,i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function Iw(n){let t,e;return t=new Zg({props:{builders:[n[14]],variant:"ghost",size:"sm",class:"px-1","aria-label":"Menu",$$slots:{default:[Sw]},$$scope:{ctx:n}}}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p(r,i){const s={};i&16384&&(s.builders=[r[14]]),i&32768&&(s.$$scope={dirty:i,ctx:r}),t.$set(s)},i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function Ow(n){let t;return{c(){t=Pt("⌘P")},l(e){t=Mt(e,"⌘P")},m(e,r){x(e,t,r)},d(e){e&&O(t)}}}function Dw(n){let t,e,r;return e=new lg({props:{$$slots:{default:[Ow]},$$scope:{ctx:n}}}),{c(){t=Pt(`Print PDF + `),st(e.$$.fragment)},l(i){t=Mt(i,`Print PDF + `),ot(e.$$.fragment,i)},m(i,s){x(i,t,s),at(e,i,s),r=!0},p(i,s){const o={};s&32768&&(o.$$scope={dirty:s,ctx:i}),e.$set(o)},i(i){r||(E(e.$$.fragment,i),r=!0)},o(i){M(e.$$.fragment,i),r=!1},d(i){i&&O(t),lt(e,i)}}}function kw(n){let t=n[2]?"Hide ":"Show ",e,r;return{c(){e=Pt(t),r=Pt(" Queries")},l(i){e=Mt(i,t),r=Mt(i," Queries")},m(i,s){x(i,e,s),x(i,r,s)},p(i,s){s&4&&t!==(t=i[2]?"Hide ":"Show ")&&Fe(e,t)},d(i){i&&(O(e),O(r))}}}function Ew(n){let t,e;return t=new Jl({props:{$$slots:{default:[Tw]},$$scope:{ctx:n}}}),t.$on("click",n[11]),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p(r,i){const s={};i&32771&&(s.$$scope={dirty:i,ctx:r}),t.$set(s)},i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function Aw(n){let t,e,r,i,s;return i=new On({props:{src:n[0],class:"h-4 w-4 ml-1"}}),{c(){t=q("span"),e=Pt(n[1]),r=et(),st(i.$$.fragment),this.h()},l(o){t=$(o,"SPAN",{class:!0});var a=Q(t);e=Mt(a,n[1]),a.forEach(O),r=nt(o),ot(i.$$.fragment,o),this.h()},h(){N(t,"class","text-xs leading-none")},m(o,a){x(o,t,a),H(t,e),x(o,r,a),at(i,o,a),s=!0},p(o,a){(!s||a&2)&&Fe(e,o[1]);const l={};a&1&&(l.src=o[0]),i.$set(l)},i(o){s||(E(i.$$.fragment,o),s=!0)},o(o){M(i.$$.fragment,o),s=!1},d(o){o&&(O(t),O(r)),lt(i,o)}}}function Tw(n){let t,e,r;return e=new lg({props:{class:"tracking-normal flex flex-row items-center",$$slots:{default:[Aw]},$$scope:{ctx:n}}}),{c(){t=Pt(`Appearance + `),st(e.$$.fragment)},l(i){t=Mt(i,`Appearance + `),ot(e.$$.fragment,i)},m(i,s){x(i,t,s),at(e,i,s),r=!0},p(i,s){const o={};s&32771&&(o.$$scope={dirty:s,ctx:i}),e.$set(o)},i(i){r||(E(e.$$.fragment,i),r=!0)},o(i){M(e.$$.fragment,i),r=!1},d(i){i&&O(t),lt(e,i)}}}function Bw(n){let t,e,r,i,s,o;t=new Jl({props:{$$slots:{default:[Dw]},$$scope:{ctx:n}}}),t.$on("click",n[3]),r=new Jl({props:{$$slots:{default:[kw]},$$scope:{ctx:n}}}),r.$on("click",n[10]);let a=n[7].appearance.switcher&&Ew(n);return{c(){st(t.$$.fragment),e=et(),st(r.$$.fragment),i=et(),a&&a.c(),s=It()},l(l){ot(t.$$.fragment,l),e=nt(l),ot(r.$$.fragment,l),i=nt(l),a&&a.l(l),s=It()},m(l,c){at(t,l,c),x(l,e,c),at(r,l,c),x(l,i,c),a&&a.m(l,c),x(l,s,c),o=!0},p(l,c){const u={};c&32768&&(u.$$scope={dirty:c,ctx:l}),t.$set(u);const f={};c&32772&&(f.$$scope={dirty:c,ctx:l}),r.$set(f),l[7].appearance.switcher&&a.p(l,c)},i(l){o||(E(t.$$.fragment,l),E(r.$$.fragment,l),E(a),o=!0)},o(l){M(t.$$.fragment,l),M(r.$$.fragment,l),M(a),o=!1},d(l){l&&(O(e),O(i),O(s)),lt(t,l),lt(r,l),a&&a.d(l)}}}function Pw(n){let t,e,r,i;t=new ww({props:{$$slots:{default:[Bw]},$$scope:{ctx:n}}});let s=vl;return{c(){st(t.$$.fragment),e=et(),r=It()},l(o){ot(t.$$.fragment,o),e=nt(o),r=It()},m(o,a){at(t,o,a),x(o,e,a),x(o,r,a),i=!0},p(o,a){const l={};a&32775&&(l.$$scope={dirty:a,ctx:o}),t.$set(l)},i(o){i||(E(t.$$.fragment,o),E(s),i=!0)},o(o){M(t.$$.fragment,o),M(s),i=!1},d(o){o&&(O(e),O(r)),lt(t,o)}}}function Mw(n){let t,e,r,i;return t=new vw({props:{asChild:!0,$$slots:{default:[Iw,({builder:s})=>({14:s}),({builder:s})=>s?16384:0]},$$scope:{ctx:n}}}),r=new gw({props:{class:"w-52 text-xs",$$slots:{default:[Pw]},$$scope:{ctx:n}}}),{c(){st(t.$$.fragment),e=et(),st(r.$$.fragment)},l(s){ot(t.$$.fragment,s),e=nt(s),ot(r.$$.fragment,s)},m(s,o){at(t,s,o),x(s,e,o),at(r,s,o),i=!0},p(s,o){const a={};o&49152&&(a.$$scope={dirty:o,ctx:s}),t.$set(a);const l={};o&32775&&(l.$$scope={dirty:o,ctx:s}),r.$set(l)},i(s){i||(E(t.$$.fragment,s),E(r.$$.fragment,s),i=!0)},o(s){M(t.$$.fragment,s),M(r.$$.fragment,s),i=!1},d(s){s&&O(e),lt(t,s),lt(r,s)}}}function Nw(n){let t,e;return t=new bw({props:{$$slots:{default:[Mw]},$$scope:{ctx:n}}}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p(r,[i]){const s={};i&32775&&(s.$$scope={dirty:i,ctx:r}),t.$set(s)},i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function Cw(n,t,e){let r,i,s,o,a;Me(n,zc,_=>e(2,a=_));const l=new Event("export-beforeprint"),c=new Event("export-afterprint");function u(){window.dispatchEvent(l),setTimeout(()=>window.print(),0),setTimeout(()=>window.dispatchEvent(c),0)}const{selectedAppearance:f,activeAppearance:h,cycleAppearance:d,themesConfig:g}=rh();Me(n,f,_=>e(9,o=_)),Me(n,h,_=>e(8,s=_));const m=_=>{_.preventDefault(),zc.update(y=>!y)},p=_=>{_.preventDefault(),d()};return n.$$.update=()=>{n.$$.dirty&512&&e(1,r=o==="system"?"System":o==="light"?"Light":"Dark"),n.$$.dirty&256&&e(0,i=s==="light"?Bg:Pg)},[i,r,a,u,f,h,d,g,s,o,m,p]}class Fw extends se{constructor(t){super(),oe(this,t,Cw,Nw,Zt,{})}}function jw(n){let t,e,r,i,s,o,a,l,c,u,f;const h=[Uw,Rw],d=[];function g(m,p){return m[0]?0:1}return r=g(n),i=d[r]=h[r](n),l=new Ic({props:{logo:n[2],title:n[1]}}),{c(){t=q("div"),e=q("button"),i.c(),o=et(),a=q("a"),st(l.$$.fragment),this.h()},l(m){t=$(m,"DIV",{class:!0});var p=Q(t);e=$(p,"BUTTON",{type:!0,class:!0});var _=Q(e);i.l(_),_.forEach(O),o=nt(p),a=$(p,"A",{href:!0,class:!0});var y=Q(a);ot(l.$$.fragment,y),y.forEach(O),p.forEach(O),this.h()},h(){N(e,"type","button"),N(e,"class",s="text-base-content hover:bg-base-200 rounded-lg p-1 transition-all duration-500 "+(n[7]==="hide"?"block":"md:hidden")),N(a,"href",zt("/")),N(a,"class","text-sm font-bold text-base-content hidden md:block"),N(t,"class","flex gap-x-4 items-center")},m(m,p){x(m,t,p),H(t,e),d[r].m(e,null),H(t,o),H(t,a),at(l,a,null),c=!0,u||(f=fe(e,"click",n[13]),u=!0)},p(m,p){let _=r;r=g(m),r!==_&&(qt(),M(d[_],1,1,()=>{d[_]=null}),$t(),i=d[r],i||(i=d[r]=h[r](m),i.c()),E(i,1),i.m(e,null)),(!c||p&128&&s!==(s="text-base-content hover:bg-base-200 rounded-lg p-1 transition-all duration-500 "+(m[7]==="hide"?"block":"md:hidden")))&&N(e,"class",s);const y={};p&4&&(y.logo=m[2]),p&2&&(y.title=m[1]),l.$set(y)},i(m){c||(E(i),E(l.$$.fragment,m),c=!0)},o(m){M(i),M(l.$$.fragment,m),c=!1},d(m){m&&O(t),d[r].d(),lt(l),u=!1,f()}}}function Lw(n){let t,e,r;return e=new Ic({props:{logo:n[2],title:n[1]}}),{c(){t=q("a"),st(e.$$.fragment),this.h()},l(i){t=$(i,"A",{href:!0,class:!0});var s=Q(t);ot(e.$$.fragment,s),s.forEach(O),this.h()},h(){N(t,"href",zt("/")),N(t,"class","block text-sm font-bold text-base-content")},m(i,s){x(i,t,s),at(e,t,null),r=!0},p(i,s){const o={};s&4&&(o.logo=i[2]),s&2&&(o.title=i[1]),e.$set(o)},i(i){r||(E(e.$$.fragment,i),r=!0)},o(i){M(e.$$.fragment,i),r=!1},d(i){i&&O(t),lt(e)}}}function Rw(n){let t,e="Open sidebar",r,i,s;return i=new On({props:{class:"w-5 h-5",src:Ng}}),{c(){t=q("span"),t.textContent=e,r=et(),st(i.$$.fragment),this.h()},l(o){t=$(o,"SPAN",{class:!0,"data-svelte-h":!0}),pr(t)!=="svelte-73kebv"&&(t.textContent=e),r=nt(o),ot(i.$$.fragment,o),this.h()},h(){N(t,"class","sr-only")},m(o,a){x(o,t,a),x(o,r,a),at(i,o,a),s=!0},i(o){s||(E(i.$$.fragment,o),s=!0)},o(o){M(i.$$.fragment,o),s=!1},d(o){o&&(O(t),O(r)),lt(i,o)}}}function Uw(n){let t,e="Close sidebar",r,i,s;return i=new On({props:{class:"w-5 h-5",src:Ko}}),{c(){t=q("span"),t.textContent=e,r=et(),st(i.$$.fragment),this.h()},l(o){t=$(o,"SPAN",{class:!0,"data-svelte-h":!0}),pr(t)!=="svelte-13q18xv"&&(t.textContent=e),r=nt(o),ot(i.$$.fragment,o),this.h()},h(){N(t,"class","sr-only")},m(o,a){x(o,t,a),x(o,r,a),at(i,o,a),s=!0},i(o){s||(E(i.$$.fragment,o),s=!0)},o(o){M(i.$$.fragment,o),s=!1},d(o){o&&(O(t),O(r)),lt(i,o)}}}function Jf(n){let t,e;return t=new cw({props:{algolia:n[8]}}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p(r,i){const s={};i&256&&(s.algolia=r[8]),t.$set(s)},i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function Qf(n){let t,e,r,i;return e=new On({props:{src:ay,class:"w-4 h-4 text-base-content"}}),{c(){t=q("a"),st(e.$$.fragment),this.h()},l(s){t=$(s,"A",{href:!0,class:!0,target:!0,rel:!0});var o=Q(t);ot(e.$$.fragment,o),o.forEach(O),this.h()},h(){N(t,"href",r=zt(n[9])),N(t,"class","hover:bg-base-200 rounded-lg p-2 transition-all duration-200"),N(t,"target","_blank"),N(t,"rel","noreferrer")},m(s,o){x(s,t,o),at(e,t,null),i=!0},p(s,o){(!i||o&512&&r!==(r=zt(s[9])))&&N(t,"href",r)},i(s){i||(E(e.$$.fragment,s),i=!0)},o(s){M(e.$$.fragment,s),i=!1},d(s){s&&O(t),lt(e)}}}function Gf(n){let t,e,r,i;return e=new On({props:{src:ly,class:"w-4 h-4 text-base-content"}}),{c(){t=q("a"),st(e.$$.fragment),this.h()},l(s){t=$(s,"A",{href:!0,class:!0,target:!0,rel:!0});var o=Q(t);ot(e.$$.fragment,o),o.forEach(O),this.h()},h(){N(t,"href",r=zt(n[10])),N(t,"class","hover:bg-base-200 rounded-lg p-2 transition-all duration-200"),N(t,"target","_blank"),N(t,"rel","noreferrer")},m(s,o){x(s,t,o),at(e,t,null),i=!0},p(s,o){(!i||o&1024&&r!==(r=zt(s[10])))&&N(t,"href",r)},i(s){i||(E(e.$$.fragment,s),i=!0)},o(s){M(e.$$.fragment,s),i=!1},d(s){s&&O(t),lt(e)}}}function Xf(n){let t,e,r;return e=new On({props:{src:cy,fill:"currentColor",class:"w-4 h-4 text-base-content "}}),{c(){t=q("a"),st(e.$$.fragment),this.h()},l(i){t=$(i,"A",{href:!0,class:!0,target:!0,rel:!0});var s=Q(t);ot(e.$$.fragment,s),s.forEach(O),this.h()},h(){N(t,"href",n[11]),N(t,"class","hover:bg-gray-50 rounded-lg p-2 transition-all duration-200"),N(t,"target","_blank"),N(t,"rel","noreferrer")},m(i,s){x(i,t,s),at(e,t,null),r=!0},p(i,s){(!r||s&2048)&&N(t,"href",i[11])},i(i){r||(E(e.$$.fragment,i),r=!0)},o(i){M(e.$$.fragment,i),r=!1},d(i){i&&O(t),lt(e)}}}function Zf(n){let t,e,r,i;return e=new On({props:{src:uy,class:"w-4 h-4 text-base-content "}}),{c(){t=q("a"),st(e.$$.fragment),this.h()},l(s){t=$(s,"A",{href:!0,class:!0,target:!0,rel:!0});var o=Q(t);ot(e.$$.fragment,o),o.forEach(O),this.h()},h(){N(t,"href",r=zt(n[12])),N(t,"class","hover:bg-base-200 rounded-lg p-2 transition-all duration-200"),N(t,"target","_blank"),N(t,"rel","noreferrer")},m(s,o){x(s,t,o),at(e,t,null),i=!0},p(s,o){(!i||o&4096&&r!==(r=zt(s[12])))&&N(t,"href",r)},i(s){i||(E(e.$$.fragment,s),i=!0)},o(s){M(e.$$.fragment,s),i=!1},d(s){s&&O(t),lt(e)}}}function td(n){let t,e;return t=new Fw({}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function xw(n){let t,e,r,i,s,o,a,l,c,u,f,h,d,g,m,p;const _=[Lw,jw],y=[];function S(T,j){return T[6]||T[7]==="never"?0:1}r=S(n),i=y[r]=_[r](n);let w=n[8]&&Jf(n),v=n[9]&&Qf(n),k=n[10]&&Gf(n),b=n[11]&&Xf(n),C=n[12]&&Zf(n),F=!n[3]&&td();return{c(){t=q("header"),e=q("div"),i.c(),s=et(),o=q("div"),w&&w.c(),a=et(),l=q("div"),v&&v.c(),c=et(),k&&k.c(),u=et(),b&&b.c(),f=et(),C&&C.c(),h=et(),d=q("div"),F&&F.c(),this.h()},l(T){t=$(T,"HEADER",{class:!0});var j=Q(t);e=$(j,"DIV",{class:!0,style:!0});var P=Q(e);i.l(P),s=nt(P),o=$(P,"DIV",{class:!0});var B=Q(o);w&&w.l(B),a=nt(B),l=$(B,"DIV",{class:!0});var L=Q(l);v&&v.l(L),c=nt(L),k&&k.l(L),u=nt(L),b&&b.l(L),f=nt(L),C&&C.l(L),L.forEach(O),h=nt(B),d=$(B,"DIV",{class:!0});var V=Q(d);F&&F.l(V),V.forEach(O),B.forEach(O),P.forEach(O),j.forEach(O),this.h()},h(){N(l,"class","flex gap-2 items-center"),N(d,"class","relative"),N(o,"class","flex gap-2 text-sm items-center"),N(e,"class",g=(n[4]?"max-w-full ":n[5]?"":" max-w-7xl ")+"mx-auto px-6 sm:px-8 md:px-12 flex flex-1 items-center justify-between"),Qo(e,"max-width",n[5]+"px"),N(t,"class",m="fixed w-full top-0 z-40 flex h-12 shrink-0 justify-start items-center gap-x-4 border-b border-base-300/50 bg-base-100/90 backdrop-blur print:hidden "+(n[7]==="hide"?"md:pl-8":""))},m(T,j){x(T,t,j),H(t,e),y[r].m(e,null),H(e,s),H(e,o),w&&w.m(o,null),H(o,a),H(o,l),v&&v.m(l,null),H(l,c),k&&k.m(l,null),H(l,u),b&&b.m(l,null),H(l,f),C&&C.m(l,null),H(o,h),H(o,d),F&&F.m(d,null),p=!0},p(T,[j]){let P=r;r=S(T),r===P?y[r].p(T,j):(qt(),M(y[P],1,1,()=>{y[P]=null}),$t(),i=y[r],i?i.p(T,j):(i=y[r]=_[r](T),i.c()),E(i,1),i.m(e,s)),T[8]?w?(w.p(T,j),j&256&&E(w,1)):(w=Jf(T),w.c(),E(w,1),w.m(o,a)):w&&(qt(),M(w,1,1,()=>{w=null}),$t()),T[9]?v?(v.p(T,j),j&512&&E(v,1)):(v=Qf(T),v.c(),E(v,1),v.m(l,c)):v&&(qt(),M(v,1,1,()=>{v=null}),$t()),T[10]?k?(k.p(T,j),j&1024&&E(k,1)):(k=Gf(T),k.c(),E(k,1),k.m(l,u)):k&&(qt(),M(k,1,1,()=>{k=null}),$t()),T[11]?b?(b.p(T,j),j&2048&&E(b,1)):(b=Xf(T),b.c(),E(b,1),b.m(l,f)):b&&(qt(),M(b,1,1,()=>{b=null}),$t()),T[12]?C?(C.p(T,j),j&4096&&E(C,1)):(C=Zf(T),C.c(),E(C,1),C.m(l,null)):C&&(qt(),M(C,1,1,()=>{C=null}),$t()),T[3]?F&&(qt(),M(F,1,1,()=>{F=null}),$t()):F?j&8&&E(F,1):(F=td(),F.c(),E(F,1),F.m(d,null)),(!p||j&48&&g!==(g=(T[4]?"max-w-full ":T[5]?"":" max-w-7xl ")+"mx-auto px-6 sm:px-8 md:px-12 flex flex-1 items-center justify-between"))&&N(e,"class",g),(!p||j&32)&&Qo(e,"max-width",T[5]+"px"),(!p||j&128&&m!==(m="fixed w-full top-0 z-40 flex h-12 shrink-0 justify-start items-center gap-x-4 border-b border-base-300/50 bg-base-100/90 backdrop-blur print:hidden "+(T[7]==="hide"?"md:pl-8":"")))&&N(t,"class",m)},i(T){p||(E(i),E(w),E(v),E(k),E(b),E(C),E(F),p=!0)},o(T){M(i),M(w),M(v),M(k),M(b),M(C),M(F),p=!1},d(T){T&&O(t),y[r].d(),w&&w.d(),v&&v.d(),k&&k.d(),b&&b.d(),C&&C.d(),F&&F.d()}}}function Vw(n,t,e){let{mobileSidebarOpen:r=void 0}=t,{title:i=void 0}=t,{logo:s=void 0}=t,{neverShowQueries:o=void 0}=t,{fullWidth:a=void 0}=t,{maxWidth:l=void 0}=t,{hideSidebar:c=void 0}=t,{sidebarFrontMatter:u=void 0}=t,{algolia:f=void 0}=t,{githubRepo:h=void 0}=t,{xProfile:d=void 0}=t,{blueskyProfile:g=void 0}=t,{slackCommunity:m=void 0}=t;const p=()=>{e(0,r=!r)};return n.$$set=_=>{"mobileSidebarOpen"in _&&e(0,r=_.mobileSidebarOpen),"title"in _&&e(1,i=_.title),"logo"in _&&e(2,s=_.logo),"neverShowQueries"in _&&e(3,o=_.neverShowQueries),"fullWidth"in _&&e(4,a=_.fullWidth),"maxWidth"in _&&e(5,l=_.maxWidth),"hideSidebar"in _&&e(6,c=_.hideSidebar),"sidebarFrontMatter"in _&&e(7,u=_.sidebarFrontMatter),"algolia"in _&&e(8,f=_.algolia),"githubRepo"in _&&e(9,h=_.githubRepo),"xProfile"in _&&e(10,d=_.xProfile),"blueskyProfile"in _&&e(11,g=_.blueskyProfile),"slackCommunity"in _&&e(12,m=_.slackCommunity)},[r,i,s,o,a,l,c,u,f,h,d,g,m,p]}class zw extends se{constructor(t){super(),oe(this,t,Vw,xw,Zt,{mobileSidebarOpen:0,title:1,logo:2,neverShowQueries:3,fullWidth:4,maxWidth:5,hideSidebar:6,sidebarFrontMatter:7,algolia:8,githubRepo:9,xProfile:10,blueskyProfile:11,slackCommunity:12})}}function Ww(n){return Xr(()=>{}),[]}class Hw extends se{constructor(t){super(),oe(this,t,Ww,null,Zt,{})}}function qw(n){let t,e='Loading...
',r;return{c(){t=q("div"),t.innerHTML=e,this.h()},l(i){t=$(i,"DIV",{role:!0,class:!0,"data-svelte-h":!0}),pr(t)!=="svelte-1u7962h"&&(t.innerHTML=e),this.h()},h(){N(t,"role","status"),N(t,"class","animate-pulse")},m(i,s){x(i,t,s)},p:Qt,i(i){i&&(r||Bn(()=>{r=Zs(t,Us,{}),r.start()}))},o:Qt,d(i){i&&O(t)}}}class $w extends se{constructor(t){super(),oe(this,t,null,qw,Zt,{})}}function Yw(n){let t,e;const r=n[1].default,i=Se(r,n,n[0],null);return{c(){t=q("span"),i&&i.c(),this.h()},l(s){t=$(s,"SPAN",{class:!0});var o=Q(t);i&&i.l(o),o.forEach(O),this.h()},h(){N(t,"class","rounded px-0.5 py-[1px] bg-positive/10 border border-positive/20 text-positive text-base sm:text-xs")},m(s,o){x(s,t,o),i&&i.m(t,null),e=!0},p(s,[o]){i&&i.p&&(!e||o&1)&&Ie(i,r,s,s[0],e?De(r,s[0],o,null):Oe(s[0]),null)},i(s){e||(E(i,s),e=!0)},o(s){M(i,s),e=!1},d(s){s&&O(t),i&&i.d(s)}}}function Kw(n,t,e){let{$$slots:r={},$$scope:i}=t;return n.$$set=s=>{"$$scope"in s&&e(0,i=s.$$scope)},[i,r]}class Lr extends se{constructor(t){super(),oe(this,t,Kw,Yw,Zt,{})}}function ed(n,t,e){const r=n.slice();return r[15]=t[e],r}function nd(n,t,e){const r=n.slice();return r[15]=t[e],r}function rd(n){const t=n.slice(),e=t[7].url.pathname.toUpperCase()===t[15].href.toUpperCase()+"/";return t[20]=e,t}function id(n,t,e){const r=n.slice();return r[15]=t[e],r}function sd(n){const t=n.slice(),e=t[7].url.pathname.toUpperCase()===t[15].href.toUpperCase()+"/";return t[20]=e,t}function od(n,t,e){const r=n.slice();return r[15]=t[e],r}function ad(n,t,e){const r=n.slice();return r[15]=t[e],r}function ld(n){const t=n.slice(),e=t[7].url.pathname.toUpperCase()===t[15].href.toUpperCase()+"/";return t[20]=e,t}function cd(n,t,e){const r=n.slice();return r[15]=t[e],r}function ud(n){const t=n.slice(),e=t[7].url.pathname.toUpperCase()===t[15].href.toUpperCase()+"/";return t[20]=e,t}function fd(n){let t,e,r,i,s,o,a,l,c,u,f,h,d="Close sidebar",g,m,p,_,y,S,w,v,k,b,C,F,T,j;l=new Ic({props:{logo:n[2],title:n[1]}}),m=new On({props:{src:Ko,class:"w-5 h-5"}});let P=ye(n[8]),B=[];for(let D=0;DM(B[D],1,1,()=>{B[D]=null});let V=ye(n[8]),R=[];for(let D=0;DM(R[D],1,1,()=>{R[D]=null});return{c(){t=q("div"),r=et(),i=q("div"),s=q("div"),o=q("div"),a=q("a"),st(l.$$.fragment),c=et(),u=q("span"),f=q("button"),h=q("span"),h.textContent=d,g=et(),st(m.$$.fragment),p=et(),_=q("div"),y=q("div"),S=q("a"),w=Pt(n[3]),v=et();for(let D=0;D{F&&(e||(e=vn(t,Us,{duration:100},!0)),e.run(1))}),E(l.$$.fragment,D),E(m.$$.fragment,D);for(let J=0;J{F&&(C&&C.end(1),b=Zs(i,Zr,{x:-50,duration:300}),b.start())}),F=!0}},o(D){D&&(e||(e=vn(t,Us,{duration:100},!1)),e.run(0)),M(l.$$.fragment,D),M(m.$$.fragment,D),B=B.filter(Boolean);for(let J=0;JM(f[d],1,1,()=>{f[d]=null});return{c(){t=q("div"),r.c(),i=et();for(let d=0;d0&&Xw(n);return{c(){r&&r.c(),t=It()},l(i){r&&r.l(i),t=It()},m(i,s){r&&r.m(i,s),x(i,t,s),e=!0},p(i,s){i[15].children.length>0&&r.p(i,s)},i(i){e||(E(r),e=!0)},o(i){M(r),e=!1},d(i){i&&O(t),r&&r.d(i)}}}function pd(n){let t,e,r,i,s,o,a,l=ye(n[8]),c=[];for(let g=0;gM(c[g],1,1,()=>{c[g]=null});let f=ye(n[8]),h=[];for(let g=0;gM(h[g],1,1,()=>{h[g]=null});return{c(){t=q("div"),e=q("div"),r=q("a"),i=Pt(n[3]),s=et();for(let g=0;gM(f[d],1,1,()=>{f[d]=null});return{c(){t=q("div"),r.c(),i=et();for(let d=0;d0&&f2(n);return{c(){r&&r.c(),t=It()},l(i){r&&r.l(i),t=It()},m(i,s){r&&r.m(i,s),x(i,t,s),e=!0},p(i,s){i[15].children.length>0&&r.p(i,s)},i(i){e||(E(r),e=!0)},o(i){M(r),e=!1},d(i){i&&O(t),r&&r.d(i)}}}function bd(n){let t,e='Built with Evidence';return{c(){t=q("div"),t.innerHTML=e,this.h()},l(r){t=$(r,"DIV",{class:!0,"data-svelte-h":!0}),pr(t)!=="svelte-fworv4"&&(t.innerHTML=e),this.h()},h(){N(t,"class","fixed bottom-0 text-xs py-2")},m(r,i){x(r,t,i)},d(r){r&&O(t)}}}function w2(n){let t,e,r,i,s,o=n[0]&&fd(n),a=!n[0]&&pd(n),l=n[4]&&bd();return{c(){o&&o.c(),t=et(),e=q("aside"),a&&a.c(),r=et(),l&&l.c(),this.h()},l(c){o&&o.l(c),t=nt(c),e=$(c,"ASIDE",{class:!0});var u=Q(e);a&&a.l(u),r=nt(u),l&&l.l(u),u.forEach(O),this.h()},h(){N(e,"class",i="w-48 flex-none "+(n[6]==="hide"?"hidden":"hidden md:flex"))},m(c,u){o&&o.m(c,u),x(c,t,u),x(c,e,u),a&&a.m(e,null),H(e,r),l&&l.m(e,null),s=!0},p(c,[u]){c[0]?o?(o.p(c,u),u&1&&E(o,1)):(o=fd(c),o.c(),E(o,1),o.m(t.parentNode,t)):o&&(qt(),M(o,1,1,()=>{o=null}),$t()),c[0]?a&&(qt(),M(a,1,1,()=>{a=null}),$t()):a?(a.p(c,u),u&1&&E(a,1)):(a=pd(c),a.c(),E(a,1),a.m(e,r)),c[4]?l||(l=bd(),l.c(),l.m(e,null)):l&&(l.d(1),l=null),(!s||u&64&&i!==(i="w-48 flex-none "+(c[6]==="hide"?"hidden":"hidden md:flex")))&&N(e,"class",i)},i(c){s||(E(o),E(a),s=!0)},o(c){M(o),M(a),s=!1},d(c){c&&(O(t),O(e)),o&&o.d(c),a&&a.d(),l&&l.d()}}}function cg(n){Object.keys(n.children).forEach(function(t){cg(n.children[t]),!n.children[t].label&&!n.children[t].href&&delete n.children[t]})}function ug(n){return n.children=Object.values(n.children).sort((t,e)=>{var r,i,s,o;return!isNaN((r=t.frontMatter)==null?void 0:r.sidebar_position)&&!isNaN((i=e.frontMatter)==null?void 0:i.sidebar_position)?t.frontMatter.sidebar_position-e.frontMatter.sidebar_position||t.label.localeCompare(e.label):isNaN((s=t.frontMatter)==null?void 0:s.sidebar_position)?isNaN((o=e.frontMatter)==null?void 0:o.sidebar_position)?t.label.localeCompare(e.label):1:-1}),n.children.forEach(ug),n}function S2(n,t,e){let r;Me(n,Ma,y=>e(7,r=y));let{fileTree:i=void 0}=t,{title:s=void 0}=t,{logo:o=void 0}=t,{homePageName:a=void 0}=t,{builtWithEvidence:l=void 0}=t,{hideHeader:c=!1}=t,{sidebarFrontMatter:u=void 0}=t;i=structuredClone(i),cg(i),i=ug(i);let f=i==null?void 0:i.children,{mobileSidebarOpen:h=!1}=t;ny(()=>{{let y=document.querySelector("#mobileScrollable");h?Fg(y):Cg(y)}});const d=()=>e(0,h=!1),g=()=>e(0,h=!1),m=()=>{e(0,h=!1)},p=()=>e(0,h=!1),_=()=>e(0,h=!1);return n.$$set=y=>{"fileTree"in y&&e(9,i=y.fileTree),"title"in y&&e(1,s=y.title),"logo"in y&&e(2,o=y.logo),"homePageName"in y&&e(3,a=y.homePageName),"builtWithEvidence"in y&&e(4,l=y.builtWithEvidence),"hideHeader"in y&&e(5,c=y.hideHeader),"sidebarFrontMatter"in y&&e(6,u=y.sidebarFrontMatter),"mobileSidebarOpen"in y&&e(0,h=y.mobileSidebarOpen)},[h,s,o,a,l,c,u,r,f,i,d,g,m,p,_]}class I2 extends se{constructor(t){super(),oe(this,t,S2,w2,Zt,{fileTree:9,title:1,logo:2,homePageName:3,builtWithEvidence:4,hideHeader:5,sidebarFrontMatter:6,mobileSidebarOpen:0})}}function vd(n,t,e){const r=n.slice();return r[4]=t[e],r}function wd(n){let t,e="On this page",r,i,s=ye(n[0]),o=[];for(let a=0;a1&&wd(n);return{c(){e&&e.c(),t=It()},l(r){e&&e.l(r),t=It()},m(r,i){e&&e.m(r,i),x(r,t,i)},p(r,[i]){r[0]&&r[0].length>1?e?e.p(r,i):(e=wd(r),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:Qt,o:Qt,d(r){r&&O(t),e&&e.d(r)}}}function D2(n,t,e){let r=[],i;function s(){e(0,r=Array.from(document.querySelectorAll("h1.markdown, h2.markdown, h3.markdown")))}function o(){return i=new MutationObserver(()=>{s()}),r.forEach(a=>{i.observe(a,{subtree:!0,characterData:!0,childList:!0})}),i}return Xr(()=>{s(),i=o()}),ry(()=>{i==null||i.disconnect()}),[r]}class k2 extends se{constructor(t){super(),oe(this,t,D2,O2,Zt,{})}}function Id(n){let t,e,r;return e=new k2({}),{c(){t=q("div"),st(e.$$.fragment),this.h()},l(i){t=$(i,"DIV",{class:!0});var s=Q(t);ot(e.$$.fragment,s),s.forEach(O),this.h()},h(){N(t,"class","fixed w-48 top-20 bottom-20 pl-4 px-3 overflow-auto pretty-scrollbar"),Br(t,"top-8",n[0])},m(i,s){x(i,t,s),at(e,t,null),r=!0},p(i,s){(!r||s&1)&&Br(t,"top-8",i[0])},i(i){r||(E(e.$$.fragment,i),r=!0)},o(i){M(e.$$.fragment,i),r=!1},d(i){i&&O(t),lt(e)}}}function E2(n){let t,e,r=!n[1]&&n[2].data.isUserPage&&Id(n);return{c(){t=q("aside"),r&&r.c(),this.h()},l(i){t=$(i,"ASIDE",{class:!0});var s=Q(t);r&&r.l(s),s.forEach(O),this.h()},h(){N(t,"class","hidden lg:block w-48")},m(i,s){x(i,t,s),r&&r.m(t,null),e=!0},p(i,[s]){!i[1]&&i[2].data.isUserPage?r?(r.p(i,s),s&6&&E(r,1)):(r=Id(i),r.c(),E(r,1),r.m(t,null)):r&&(qt(),M(r,1,1,()=>{r=null}),$t())},i(i){e||(E(r),e=!0)},o(i){M(r),e=!1},d(i){i&&O(t),r&&r.d()}}}function A2(n,t,e){let r,i;Me(n,ch,o=>e(1,r=o)),Me(n,Ma,o=>e(2,i=o));let{hideHeader:s=!1}=t;return n.$$set=o=>{"hideHeader"in o&&e(0,s=o.hideHeader)},[s,r,i]}class T2 extends se{constructor(t){super(),oe(this,t,A2,E2,Zt,{hideHeader:0})}}function Od(n,t,e){const r=n.slice();return r[3]=t[e],r[5]=e,r}function B2(n){let t,e=n[3].title+"",r,i,s;return{c(){t=q("a"),r=Pt(e),i=et(),this.h()},l(o){t=$(o,"A",{href:!0,class:!0});var a=Q(t);r=Mt(a,e),i=nt(a),a.forEach(O),this.h()},h(){N(t,"href",s=zt(n[3].href)),N(t,"class","hover:underline")},m(o,a){x(o,t,a),H(t,r),H(t,i)},p(o,a){a&1&&e!==(e=o[3].title+"")&&Fe(r,e),a&1&&s!==(s=zt(o[3].href))&&N(t,"href",s)},i:Qt,o:Qt,d(o){o&&O(t)}}}function P2(n){let t,e,r,i;t=new On({props:{src:jg,size:"12px",theme:"solid"}});function s(l,c){return l[3].href?N2:M2}let o=s(n),a=o(n);return{c(){st(t.$$.fragment),e=et(),a.c(),r=It()},l(l){ot(t.$$.fragment,l),e=nt(l),a.l(l),r=It()},m(l,c){at(t,l,c),x(l,e,c),a.m(l,c),x(l,r,c),i=!0},p(l,c){o===(o=s(l))&&a?a.p(l,c):(a.d(1),a=o(l),a&&(a.c(),a.m(r.parentNode,r)))},i(l){i||(E(t.$$.fragment,l),i=!0)},o(l){M(t.$$.fragment,l),i=!1},d(l){l&&(O(e),O(r)),lt(t,l),a.d(l)}}}function M2(n){let t,e=n[3].title+"",r;return{c(){t=q("span"),r=Pt(e),this.h()},l(i){t=$(i,"SPAN",{class:!0});var s=Q(t);r=Mt(s,e),s.forEach(O),this.h()},h(){N(t,"class","cursor-default")},m(i,s){x(i,t,s),H(t,r)},p(i,s){s&1&&e!==(e=i[3].title+"")&&Fe(r,e)},d(i){i&&O(t)}}}function N2(n){let t,e=n[3].title+"",r,i;return{c(){t=q("a"),r=Pt(e),this.h()},l(s){t=$(s,"A",{href:!0,class:!0});var o=Q(t);r=Mt(o,e),o.forEach(O),this.h()},h(){N(t,"href",i=zt(n[3].href)),N(t,"class","hover:underline")},m(s,o){x(s,t,o),H(t,r)},p(s,o){o&1&&e!==(e=s[3].title+"")&&Fe(r,e),o&1&&i!==(i=zt(s[3].href))&&N(t,"href",i)},d(s){s&&O(t)}}}function Dd(n){let t,e,r,i;const s=[P2,B2],o=[];function a(l,c){return l[5]>0?0:1}return t=a(n),e=o[t]=s[t](n),{c(){e.c(),r=It()},l(l){e.l(l),r=It()},m(l,c){o[t].m(l,c),x(l,r,c),i=!0},p(l,c){e.p(l,c)},i(l){i||(E(e),i=!0)},o(l){M(e),i=!1},d(l){l&&O(r),o[t].d(l)}}}function C2(n){let t,e,r,i=ye(n[0]),s=[];for(let a=0;aM(s[a],1,1,()=>{s[a]=null});return{c(){t=q("div"),e=q("div");for(let a=0;as.isTemplated),!r)return null;return r}function j2(n,t){const e=[{href:"/",title:"Home"}];n.forEach((r,i)=>{r!=""&&`/${r}`!==ih.deployment.basePath&&e.push({href:"/"+n.slice(0,i+1).join("/"),title:decodeURIComponent(r.replace(/_/g," ").replace(/-/g," "))})}),e.length>3&&e.splice(1,e.length-3,{href:e.slice(-3)[0].href,title:"..."});for(const r of e)if(r.href==="/")r.href=zt("/"),r.title="Home";else{const i=F2(r.href,t);!i||!i.isPage?r.href=null:r.title=i.title??r.title}return e}function L2(n,t,e){let r,i;Me(n,Ma,o=>e(2,i=o));let{fileTree:s}=t;return n.$$set=o=>{"fileTree"in o&&e(1,s=o.fileTree)},n.$$.update=()=>{n.$$.dirty&6&&e(0,r=j2(i.url.pathname.split("/").slice(1),s))},[r,s,i]}class R2 extends se{constructor(t){super(),oe(this,t,L2,C2,Zt,{fileTree:1})}}function kd(n){let t,e,r,i="Error",s,o,a,l,c,u='docs slack email',f,h,d;return{c(){t=q("div"),e=q("div"),r=q("h1"),r.textContent=i,s=et(),o=q("p"),a=Pt(n[1]),l=et(),c=q("div"),c.innerHTML=u,this.h()},l(g){t=$(g,"DIV",{class:!0});var m=Q(t);e=$(m,"DIV",{class:!0});var p=Q(e);r=$(p,"H1",{class:!0,"data-svelte-h":!0}),pr(r)!=="svelte-1wczc15"&&(r.textContent=i),s=nt(p),o=$(p,"P",{class:!0});var _=Q(o);a=Mt(_,n[1]),_.forEach(O),l=nt(p),c=$(p,"DIV",{class:!0,"data-svelte-h":!0}),pr(c)!=="svelte-vfh8n7"&&(c.innerHTML=u),p.forEach(O),m.forEach(O),this.h()},h(){N(r,"class","text-2xl font-bold tracking-wide border-b pb-4 border-base-300"),N(o,"class","text-xl mt-6 leading-relaxed select-text"),N(c,"class","absolute bottom-0 flex items-end gap-4 text-lg mb-6"),N(e,"class","relative min-w-full h-screen bg-gradient-to-b from-base-200 to-base-300 rounded-lg border-t-8 border-negative shadow-xl p-8"),N(t,"class","fixed flex flex-col z-50 h-screen w-screen bg-base-100/50 justify-center items-center py-20 px-10 sm:px-20 select-none backdrop-blur-sm")},m(g,m){x(g,t,m),H(t,e),H(e,r),H(e,s),H(e,o),H(o,a),H(e,l),H(e,c),d=!0},p(g,m){(!d||m&2)&&Fe(a,g[1])},i(g){d||(g&&Bn(()=>{d&&(f||(f=vn(e,Zr,{y:100,duration:300},!0)),f.run(1))}),g&&Bn(()=>{d&&(h||(h=vn(t,Us,{duration:100},!0)),h.run(1))}),d=!0)},o(g){g&&(f||(f=vn(e,Zr,{y:100,duration:300},!1)),f.run(0)),g&&(h||(h=vn(t,Us,{duration:100},!1)),h.run(0)),d=!1},d(g){g&&O(t),g&&f&&f.end(),g&&h&&h.end()}}}function U2(n){let t,e=n[0]&&kd(n);return{c(){e&&e.c(),t=It()},l(r){e&&e.l(r),t=It()},m(r,i){e&&e.m(r,i),x(r,t,i)},p(r,[i]){r[0]?e?(e.p(r,i),i&1&&E(e,1)):(e=kd(r),e.c(),E(e,1),e.m(t.parentNode,t)):e&&(qt(),M(e,1,1,()=>{e=null}),$t())},i(r){E(e)},o(r){M(e)},d(r){r&&O(t),e&&e.d(r)}}}function x2(n,t,e){return[!1,void 0]}class V2 extends se{constructor(t){super(),oe(this,t,x2,U2,Zt,{})}}function z2(n){let t,e=JSON.stringify(n[0],null,2)+"",r;return{c(){t=q("pre"),r=Pt(e),this.h()},l(i){t=$(i,"PRE",{class:!0});var s=Q(t);r=Mt(s,e),s.forEach(O),this.h()},h(){N(t,"class","text-xs px-2 py-2 bg-base-200 my-2")},m(i,s){x(i,t,s),H(t,r)},p(i,[s]){s&1&&e!==(e=JSON.stringify(i[0],null,2)+"")&&Fe(r,e)},i:Qt,o:Qt,d(i){i&&O(t)}}}function W2(n,t,e){let r;const i=sh();return Me(n,i,s=>e(0,r=s)),[r,i]}class H2 extends se{constructor(t){super(),oe(this,t,W2,z2,Zt,{})}}function q2(n){const t=[{type:"unchanged",content:"{"}],e=Lg(n.before,n.after);function r(s,o){return o.reduce((a,l)=>a==null?void 0:a[l],s)}function i(s,o){const a=Object.keys(s);a.forEach((l,c)=>{const u=r(n.added,o)??{},f=r(n.deleted,o)??{},h=r(n.updated,o)??{};let d="unchanged";l in u&&(d="added"),l in f&&(d="deleted"),l in h&&(d="updated");const g=(m,p=!1)=>{const _=`"${l}": `;let y=`${" ".repeat(o.length+1)}${p?"":_}${m}`;return c{let r;const i=$2[n];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function yl(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const K2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},J2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Q2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G2={date:yl({formats:K2,defaultWidth:"full"}),time:yl({formats:J2,defaultWidth:"full"}),dateTime:yl({formats:Q2,defaultWidth:"full"})},X2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Z2=(n,t,e,r)=>X2[n];function ls(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let i;if(r==="formatting"&&n.formattingValues){const o=n.defaultFormattingWidth||n.defaultWidth,a=e!=null&&e.width?String(e.width):o;i=n.formattingValues[a]||n.formattingValues[o]}else{const o=n.defaultWidth,a=e!=null&&e.width?String(e.width):n.defaultWidth;i=n.values[a]||n.values[o]}const s=n.argumentCallback?n.argumentCallback(t):t;return i[s]}}const tS={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},eS={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},nS={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rS={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},iS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},sS={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},oS=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},aS={ordinalNumber:oS,era:ls({values:tS,defaultWidth:"wide"}),quarter:ls({values:eS,defaultWidth:"wide",argumentCallback:n=>n-1}),month:ls({values:nS,defaultWidth:"wide"}),day:ls({values:rS,defaultWidth:"wide"}),dayPeriod:ls({values:iS,defaultWidth:"wide",formattingValues:sS,defaultFormattingWidth:"wide"})};function cs(n){return(t,e={})=>{const r=e.width,i=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=t.match(i);if(!s)return null;const o=s[0],a=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(a)?cS(a,f=>f.test(o)):lS(a,f=>f.test(o));let c;c=n.valueCallback?n.valueCallback(l):l,c=e.valueCallback?e.valueCallback(c):c;const u=t.slice(o.length);return{value:c,rest:u}}}function lS(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function cS(n,t){for(let e=0;e{const r=t.match(n.matchPattern);if(!r)return null;const i=r[0],s=t.match(n.parsePattern);if(!s)return null;let o=n.valueCallback?n.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;const a=t.slice(i.length);return{value:o,rest:a}}}const fS=/^(\d+)(th|st|nd|rd)?/i,dS=/\d+/i,hS={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},mS={any:[/^b/i,/^(a|c)/i]},pS={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gS={any:[/1/i,/2/i,/3/i,/4/i]},yS={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},_S={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},bS={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},vS={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},wS={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},SS={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},IS={ordinalNumber:uS({matchPattern:fS,parsePattern:dS,valueCallback:n=>parseInt(n,10)}),era:cs({matchPatterns:hS,defaultMatchWidth:"wide",parsePatterns:mS,defaultParseWidth:"any"}),quarter:cs({matchPatterns:pS,defaultMatchWidth:"wide",parsePatterns:gS,defaultParseWidth:"any",valueCallback:n=>n+1}),month:cs({matchPatterns:yS,defaultMatchWidth:"wide",parsePatterns:_S,defaultParseWidth:"any"}),day:cs({matchPatterns:bS,defaultMatchWidth:"wide",parsePatterns:vS,defaultParseWidth:"any"}),dayPeriod:cs({matchPatterns:wS,defaultMatchWidth:"any",parsePatterns:SS,defaultParseWidth:"any"})},fg={code:"en-US",formatDistance:Y2,formatLong:G2,formatRelative:Z2,localize:aS,match:IS,options:{weekStartsOn:0,firstWeekContainsDate:1}};let OS={};function co(){return OS}function DS(n){return t=>{const r=(n?Math[n]:Math.trunc)(t);return r===0?0:r}}function xe(n){const t=Object.prototype.toString.call(n);return n instanceof Date||typeof n=="object"&&t==="[object Date]"?new n.constructor(+n):typeof n=="number"||t==="[object Number]"||typeof n=="string"||t==="[object String]"?new Date(n):new Date(NaN)}function Aa(n){const t=xe(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function kS(n,t){const e=xe(n),r=xe(t),i=e.getTime()-r.getTime();return i<0?-1:i>0?1:i}const dg=6048e5,ES=864e5,Ed=6e4,Ad=525600,Td=43200,Bd=1440;function AS(n,t,e){const r=co(),i=(e==null?void 0:e.locale)??r.locale??fg,s=kS(n,t);if(isNaN(s))throw new RangeError("Invalid time value");const o=Object.assign({},e,{addSuffix:e==null?void 0:e.addSuffix,comparison:s});let a,l;s>0?(a=xe(t),l=xe(n)):(a=xe(n),l=xe(t));const c=DS((e==null?void 0:e.roundingMethod)??"round"),u=l.getTime()-a.getTime(),f=u/Ed,h=Aa(l)-Aa(a),d=(u-h)/Ed,g=e==null?void 0:e.unit;let m;if(g?m=g:f<1?m="second":f<60?m="minute":f=i.getTime()?e+1:t.getTime()>=o.getTime()?e:e-1}function NS(n){const t=hg(n),e=Cr(n,0);return e.setFullYear(t,0,4),e.setHours(0,0,0,0),Ta(e)}function CS(n){const t=xe(n),e=+Ta(t)-+NS(t);return Math.round(e/dg)+1}function mg(n,t){var u,f,h,d;const e=xe(n),r=e.getFullYear(),i=co(),s=(t==null?void 0:t.firstWeekContainsDate)??((f=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((d=(h=i.locale)==null?void 0:h.options)==null?void 0:d.firstWeekContainsDate)??1,o=Cr(n,0);o.setFullYear(r+1,0,s),o.setHours(0,0,0,0);const a=Qs(o,t),l=Cr(n,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const c=Qs(l,t);return e.getTime()>=a.getTime()?r+1:e.getTime()>=c.getTime()?r:r-1}function FS(n,t){var a,l,c,u;const e=co(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((u=(c=e.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,i=mg(n,t),s=Cr(n,0);return s.setFullYear(i,0,r),s.setHours(0,0,0,0),Qs(s,t)}function jS(n,t){const e=xe(n),r=+Qs(e,t)-+FS(e,t);return Math.round(r/dg)+1}function re(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const kr={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return re(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):re(e+1,2)},d(n,t){return re(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return re(n.getHours()%12||12,t.length)},H(n,t){return re(n.getHours(),t.length)},m(n,t){return re(n.getMinutes(),t.length)},s(n,t){return re(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),i=Math.trunc(r*Math.pow(10,e-3));return re(i,t.length)}},di={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Nd={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),i=r>0?r:1-r;return e.ordinalNumber(i,{unit:"year"})}return kr.y(n,t)},Y:function(n,t,e,r){const i=mg(n,r),s=i>0?i:1-i;if(t==="YY"){const o=s%100;return re(o,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):re(s,t.length)},R:function(n,t){const e=hg(n);return re(e,t.length)},u:function(n,t){const e=n.getFullYear();return re(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return re(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return re(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return kr.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return re(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const i=jS(n,r);return t==="wo"?e.ordinalNumber(i,{unit:"week"}):re(i,t.length)},I:function(n,t,e){const r=CS(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):re(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):kr.d(n,t)},D:function(n,t,e){const r=MS(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):re(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const i=n.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return re(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(i,{width:"short",context:"formatting"});case"eeee":default:return e.day(i,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const i=n.getDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return re(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(i,{width:"narrow",context:"standalone"});case"cccccc":return e.day(i,{width:"short",context:"standalone"});case"cccc":default:return e.day(i,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return re(i,t.length);case"io":return e.ordinalNumber(i,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const i=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let i;switch(r===12?i=di.noon:r===0?i=di.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let i;switch(r>=17?i=di.evening:r>=12?i=di.afternoon:r>=4?i=di.morning:i=di.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return kr.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):kr.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):re(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):re(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):kr.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):kr.s(n,t)},S:function(n,t){return kr.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Fd(r);case"XXXX":case"XX":return Kr(r);case"XXXXX":case"XXX":default:return Kr(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return Fd(r);case"xxxx":case"xx":return Kr(r);case"xxxxx":case"xxx":default:return Kr(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Cd(r,":");case"OOOO":default:return"GMT"+Kr(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Cd(r,":");case"zzzz":default:return"GMT"+Kr(r,":")}},t:function(n,t,e){const r=Math.trunc(n.getTime()/1e3);return re(r,t.length)},T:function(n,t,e){const r=n.getTime();return re(r,t.length)}};function Cd(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),i=Math.trunc(r/60),s=r%60;return s===0?e+String(i):e+String(i)+t+re(s,2)}function Fd(n,t){return n%60===0?(n>0?"-":"+")+re(Math.abs(n)/60,2):Kr(n,t)}function Kr(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),i=re(Math.trunc(r/60),2),s=re(r%60,2);return e+i+t+s}const jd=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},pg=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},LS=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],i=e[2];if(!i)return jd(n,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",jd(r,t)).replace("{{time}}",pg(i,t))},RS={p:pg,P:LS},US=/^D+$/,xS=/^Y+$/,VS=["D","DD","YY","YYYY"];function zS(n){return US.test(n)}function WS(n){return xS.test(n)}function HS(n,t,e){const r=qS(n,t,e);if(console.warn(r),VS.includes(n))throw new RangeError(r)}function qS(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function $S(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function YS(n){if(!$S(n)&&typeof n!="number")return!1;const t=xe(n);return!isNaN(Number(t))}const KS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,JS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,QS=/^'([^]*?)'?$/,GS=/''/g,XS=/[a-zA-Z]/;function Ld(n,t,e){var u,f,h,d;const r=co(),i=r.locale??fg,s=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,o=r.weekStartsOn??((d=(h=r.locale)==null?void 0:h.options)==null?void 0:d.weekStartsOn)??0,a=xe(n);if(!YS(a))throw new RangeError("Invalid time value");let l=t.match(JS).map(g=>{const m=g[0];if(m==="p"||m==="P"){const p=RS[m];return p(g,i.formatLong)}return g}).join("").match(KS).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const m=g[0];if(m==="'")return{isToken:!1,value:ZS(g)};if(Nd[m])return{isToken:!0,value:g};if(m.match(XS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:g}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:s,weekStartsOn:o,locale:i};return l.map(g=>{if(!g.isToken)return g.value;const m=g.value;(WS(m)||zS(m))&&HS(m,t,String(n));const p=Nd[m[0]];return p(a,m,i.localize,c)}).join("")}function ZS(n){const t=n.match(QS);return t?t[1].replace(GS,"'"):n}function Rd(n,t,e){const r=n.slice();return r[6]=t[e],r}function Ud(n){let t,e,r=n[4](n[6].type)+"",i,s,o,a,l,c=n[6].content+"",u,f,h;return{c(){t=q("div"),e=q("span"),i=Pt(r),o=et(),a=q("div"),l=q("pre"),u=Pt(c),h=et(),this.h()},l(d){t=$(d,"DIV",{class:!0});var g=Q(t);e=$(g,"SPAN",{class:!0});var m=Q(e);i=Mt(m,r),m.forEach(O),o=nt(g),a=$(g,"DIV",{class:!0});var p=Q(a);l=$(p,"PRE",{class:!0});var _=Q(l);u=Mt(_,c),_.forEach(O),p.forEach(O),h=nt(g),g.forEach(O),this.h()},h(){N(e,"class",s=n[3][n[6].type]+" px-1 select-none"),N(l,"class","whitespace-pre-wrap"),N(a,"class",f=n[3][n[6].type]+" selection:bg-black/15"),N(t,"class","group contents")},m(d,g){x(d,t,g),H(t,e),H(e,i),H(t,o),H(t,a),H(a,l),H(l,u),H(t,h)},p(d,g){g&2&&r!==(r=d[4](d[6].type)+"")&&Fe(i,r),g&2&&s!==(s=d[3][d[6].type]+" px-1 select-none")&&N(e,"class",s),g&2&&c!==(c=d[6].content+"")&&Fe(u,c),g&2&&f!==(f=d[3][d[6].type]+" selection:bg-black/15")&&N(a,"class",f)},d(d){d&&O(t)}}}function tI(n){let t,e,r,i,s,o=Ld(n[0].asof,"HH:mm:ss")+"",a,l,c,u,f=ye(n[1]),h=[];for(let d=0;d{switch(c){case"added":return"+";case"deleted":return"-";case"updated":return"~";case"unchanged":return" ";default:return"?"}},l=sy(null,c=>{c(Pd(s.asof,{addSuffix:!0,includeSeconds:!0}));const u=setInterval(()=>{c(Pd(s.asof,{addSuffix:!0,includeSeconds:!0}))},5e3);return()=>{clearInterval(u)}});return Me(n,l,c=>e(2,i=c)),n.$$set=c=>{"diffData"in c&&e(0,s=c.diffData)},n.$$.update=()=>{n.$$.dirty&1&&e(1,r=q2(s))},[s,r,i,o,a,l]}class nI extends se{constructor(t){super(),oe(this,t,eI,tI,Zt,{diffData:0})}}function xd(n,t,e){const r=n.slice();return r[2]=t[e],r}function Vd(n){let t,e,r,i;return e=new nI({props:{diffData:n[2]}}),{c(){t=q("div"),st(e.$$.fragment),r=et(),this.h()},l(s){t=$(s,"DIV",{class:!0});var o=Q(t);ot(e.$$.fragment,o),r=nt(o),o.forEach(O),this.h()},h(){N(t,"class","my-4")},m(s,o){x(s,t,o),at(e,t,null),H(t,r),i=!0},p(s,o){const a={};o&2&&(a.diffData=s[2]),e.$set(a)},i(s){i||(E(e.$$.fragment,s),i=!0)},o(s){M(e.$$.fragment,s),i=!1},d(s){s&&O(t),lt(e)}}}function rI(n){let t,e,r=ye(n[1].reverse()),i=[];for(let o=0;oM(i[o],1,1,()=>{i[o]=null});return{c(){for(let o=0;o(i(),i=iy(o,a=>e(1,r=a)),o);n.$$.on_destroy.push(()=>i());let{history:o}=t;return s(),n.$$set=a=>{"history"in a&&s(e(0,o=a.history))},[o,r]}class sI extends se{constructor(t){super(),oe(this,t,iI,rI,Zt,{history:0})}}function zd(n,t,e){const r=n.slice();return r[12]=t[e][0],r[13]=t[e][1],r}function Wd(n){let t,e,r,i,s,o="Evidence Dev Tools",a,l,c,u,f,h;return r=new On({props:{src:n[0]?Ko:bl,class:"w-4 h-4"}}),l=new py({props:{$$slots:{default:[cI]},$$scope:{ctx:n}}}),{c(){t=q("div"),e=q("button"),st(r.$$.fragment),i=et(),s=q("header"),s.textContent=o,a=et(),st(l.$$.fragment),this.h()},l(d){t=$(d,"DIV",{class:!0});var g=Q(t);e=$(g,"BUTTON",{class:!0});var m=Q(e);ot(r.$$.fragment,m),m.forEach(O),i=nt(g),s=$(g,"HEADER",{class:!0,"data-svelte-h":!0}),pr(s)!=="svelte-ekyf9x"&&(s.textContent=o),a=nt(g),ot(l.$$.fragment,g),g.forEach(O),this.h()},h(){N(e,"class","absolute right-4 top-4 rounded-full bg-info text-info-content w-8 h-8 flex items-center justify-center hover:brightness-110 z-30"),N(s,"class","text-xl font-bold mb-4"),N(t,"class","h-[calc(100vh-3rem)] w-96 bg-base-100 fixed overflow-auto right-0 top-12 px-4 py-4 z-10")},m(d,g){x(d,t,g),H(t,e),at(r,e,null),H(t,i),H(t,s),H(t,a),at(l,t,null),u=!0,f||(h=fe(e,"click",n[7]),f=!0)},p(d,g){const m={};g&1&&(m.src=d[0]?Ko:bl),r.$set(m);const p={};g&2054&&(p.$$scope={dirty:g,ctx:d}),l.$set(p)},i(d){u||(E(r.$$.fragment,d),E(l.$$.fragment,d),d&&Bn(()=>{u&&(c||(c=vn(t,Zr,{x:384,duration:250,delay:0},!0)),c.run(1))}),u=!0)},o(d){M(r.$$.fragment,d),M(l.$$.fragment,d),d&&(c||(c=vn(t,Zr,{x:384,duration:250,delay:0},!1)),c.run(0)),u=!1},d(d){d&&O(t),lt(r),lt(l),d&&c&&c.end(),f=!1,h()}}}function Hd(n,t){let e,r,i=t[13].id+"",s,o,a,l=t[13].hash+"",c,u,f,h;function d(){return t[8](t[13])}return{key:n,first:null,c(){e=q("button"),r=q("p"),s=Pt(i),o=et(),a=q("p"),c=Pt(l),u=et(),this.h()},l(g){e=$(g,"BUTTON",{class:!0});var m=Q(e);r=$(m,"P",{class:!0});var p=Q(r);s=Mt(p,i),p.forEach(O),o=nt(m),a=$(m,"P",{class:!0});var _=Q(a);c=Mt(_,l),_.forEach(O),u=nt(m),m.forEach(O),this.h()},h(){var g;N(r,"class","w-full text-left truncate"),N(a,"class","w-full text-right"),N(e,"class","flex justify-between w-full odd:bg-base-200/40 hover:bg-base-200"),Br(e,"bg-negative",t[13].error),Br(e,"bg-warning",(g=t[13].opts)==null?void 0:g.noResolve),this.first=e},m(g,m){x(g,e,m),H(e,r),H(r,s),H(e,o),H(e,a),H(a,c),H(e,u),f||(h=fe(e,"click",d),f=!0)},p(g,m){var p;t=g,m&4&&i!==(i=t[13].id+"")&&Fe(s,i),m&4&&l!==(l=t[13].hash+"")&&Fe(c,l),m&4&&Br(e,"bg-negative",t[13].error),m&4&&Br(e,"bg-warning",(p=t[13].opts)==null?void 0:p.noResolve)},d(g){g&&O(e),f=!1,h()}}}function qd(n){let t,e;return t=new zg({props:{query:n[1]}}),t.$on("close",n[9]),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p(r,i){const s={};i&2&&(s.query=r[1]),t.$set(s)},i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function oI(n){let t,e=[],r=new Map,i,s=Wc.isQuery(n[1]),o,a,l=ye(n[2].entries());const c=f=>f[12];for(let f=0;f{u=null}),$t())},i(f){a||(E(u),a=!0)},o(f){M(u),a=!1},d(f){f&&(O(t),O(i),O(o));for(let h=0;h{i&&(r||(r=vn(t,_l,{axis:"x"},!0)),r.run(1))}),i=!0)},o(a){M(e.$$.fragment,a),a&&(r||(r=vn(t,_l,{axis:"x"},!1)),r.run(0)),i=!1},d(a){a&&O(t),lt(e),a&&r&&r.end(),s=!1,o()}}}function fI(n){let t,e=xg(),r,i,s=n[0]&&Wd(n),o=e&&uI(n);const a=n[6].default,l=Se(a,n,n[11],null);return{c(){s&&s.c(),t=et(),o&&o.c(),r=et(),l&&l.c()},l(c){s&&s.l(c),t=nt(c),o&&o.l(c),r=nt(c),l&&l.l(c)},m(c,u){s&&s.m(c,u),x(c,t,u),o&&o.m(c,u),x(c,r,u),l&&l.m(c,u),i=!0},p(c,[u]){c[0]?s?(s.p(c,u),u&1&&E(s,1)):(s=Wd(c),s.c(),E(s,1),s.m(t.parentNode,t)):s&&(qt(),M(s,1,1,()=>{s=null}),$t()),e&&o.p(c,u),l&&l.p&&(!i||u&2048)&&Ie(l,a,c,c[11],i?De(a,c[11],u,null):Oe(c[11]),null)},i(c){i||(E(s),E(o),E(l,c),i=!0)},o(c){M(s),M(o),M(l,c),i=!1},d(c){c&&(O(t),O(r)),s&&s.d(c),o&&o.d(c),l&&l.d(c)}}}function dI(n,t,e){let r,i;Me(n,Rg,m=>e(2,i=m));let{$$slots:s={},$$scope:o}=t;Ug(ze({}));let a=!1,l;oy(()=>{}),Xr(()=>{const m=p=>{p.key==="Escape"&&(e(0,a=!1),p.stopPropagation()),p.key.toLowerCase()==="e"&&p.shiftKey&&(p.ctrlKey||p.metaKey)&&(e(0,a=!0),p.stopPropagation())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)});const c=sh();Me(n,c,m=>e(5,r=m));const u=new Jv,f=()=>e(0,a=!a),h=m=>e(1,l=m),d=()=>e(1,l=null),g=()=>e(0,a=!a);return n.$$set=m=>{"$$scope"in m&&e(11,o=m.$$scope)},n.$$.update=()=>{n.$$.dirty&32&&u.push(r)},[a,l,i,c,u,r,s,f,h,d,g,o]}class hI extends se{constructor(t){super(),oe(this,t,dI,fI,Zt,{})}}function mI(n){let t;const e=n[0].default,r=Se(e,n,n[1],null);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,s){r&&r.m(i,s),t=!0},p(i,s){r&&r.p&&(!t||s&2)&&Ie(r,e,i,i[1],t?De(e,i[1],s,null):Oe(i[1]),null)},i(i){t||(E(r,i),t=!0)},o(i){M(r,i),t=!1},d(i){r&&r.d(i)}}}function pI(n){let t,e;return t=new hI({props:{$$slots:{default:[gI]},$$scope:{ctx:n}}}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p(r,i){const s={};i&2&&(s.$$scope={dirty:i,ctx:r}),t.$set(s)},i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function gI(n){let t;const e=n[0].default,r=Se(e,n,n[1],null);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,s){r&&r.m(i,s),t=!0},p(i,s){r&&r.p&&(!t||s&2)&&Ie(r,e,i,i[1],t?De(e,i[1],s,null):Oe(i[1]),null)},i(i){t||(E(r,i),t=!0)},o(i){M(r,i),t=!1},d(i){r&&r.d(i)}}}function yI(n){let t,e,r,i;const s=[pI,mI],o=[];function a(l,c){return 1}return t=a(),e=o[t]=s[t](n),{c(){e.c(),r=It()},l(l){e.l(l),r=It()},m(l,c){o[t].m(l,c),x(l,r,c),i=!0},p(l,[c]){e.p(l,c)},i(l){i||(E(e),i=!0)},o(l){M(e),i=!1},d(l){l&&O(r),o[t].d(l)}}}function _I(n,t,e){let{$$slots:r={},$$scope:i}=t;return n.$$set=s=>{"$$scope"in s&&e(1,i=s.$$scope)},[r,i]}class bI extends se{constructor(t){super(),oe(this,t,_I,yI,Zt,{})}}const vI=n=>({}),$d=n=>({});function Yd(n){let t,e,r;function i(o){n[26](o)}let s={title:n[0],logo:n[1],neverShowQueries:n[2],fullWidth:n[3],maxWidth:n[11],hideSidebar:n[4],githubRepo:n[7],slackCommunity:n[10],xProfile:n[8],blueskyProfile:n[9],algolia:n[6],sidebarFrontMatter:n[16]};return n[19]!==void 0&&(s.mobileSidebarOpen=n[19]),t=new zw({props:s}),zn.push(()=>lh(t,"mobileSidebarOpen",i)),{c(){st(t.$$.fragment)},l(o){ot(t.$$.fragment,o)},m(o,a){at(t,o,a),r=!0},p(o,a){const l={};a&1&&(l.title=o[0]),a&2&&(l.logo=o[1]),a&4&&(l.neverShowQueries=o[2]),a&8&&(l.fullWidth=o[3]),a&2048&&(l.maxWidth=o[11]),a&16&&(l.hideSidebar=o[4]),a&128&&(l.githubRepo=o[7]),a&1024&&(l.slackCommunity=o[10]),a&256&&(l.xProfile=o[8]),a&512&&(l.blueskyProfile=o[9]),a&64&&(l.algolia=o[6]),a&65536&&(l.sidebarFrontMatter=o[16]),!e&&a&524288&&(e=!0,l.mobileSidebarOpen=o[19],ah(()=>e=!1)),t.$set(l)},i(o){r||(E(t.$$.fragment,o),r=!0)},o(o){M(t.$$.fragment,o),r=!1},d(o){lt(t,o)}}}function Kd(n){let t,e,r,i;function s(a){n[27](a)}let o={fileTree:n[21],title:n[0],logo:n[1],homePageName:n[12],builtWithEvidence:n[5],hideHeader:n[14],sidebarFrontMatter:n[16]};return n[19]!==void 0&&(o.mobileSidebarOpen=n[19]),e=new I2({props:o}),zn.push(()=>lh(e,"mobileSidebarOpen",s)),{c(){t=q("div"),st(e.$$.fragment),this.h()},l(a){t=$(a,"DIV",{class:!0});var l=Q(t);ot(e.$$.fragment,l),l.forEach(O),this.h()},h(){N(t,"class","print:hidden")},m(a,l){x(a,t,l),at(e,t,null),i=!0},p(a,l){const c={};l&1&&(c.title=a[0]),l&2&&(c.logo=a[1]),l&4096&&(c.homePageName=a[12]),l&32&&(c.builtWithEvidence=a[5]),l&16384&&(c.hideHeader=a[14]),l&65536&&(c.sidebarFrontMatter=a[16]),!r&&l&524288&&(r=!0,c.mobileSidebarOpen=a[19],ah(()=>r=!1)),e.$set(c)},i(a){i||(E(e.$$.fragment,a),i=!0)},o(a){M(e.$$.fragment,a),i=!1},d(a){a&&O(t),lt(e)}}}function Jd(n){let t,e,r=n[17].route.id!=="/settings"&&Qd(n);return{c(){t=q("div"),r&&r.c(),this.h()},l(i){t=$(i,"DIV",{class:!0});var s=Q(t);r&&r.l(s),s.forEach(O),this.h()},h(){N(t,"class","print:hidden")},m(i,s){x(i,t,s),r&&r.m(t,null),e=!0},p(i,s){i[17].route.id!=="/settings"?r?(r.p(i,s),s&131072&&E(r,1)):(r=Qd(i),r.c(),E(r,1),r.m(t,null)):r&&(qt(),M(r,1,1,()=>{r=null}),$t())},i(i){e||(E(r),e=!0)},o(i){M(r),e=!1},d(i){i&&O(t),r&&r.d()}}}function Qd(n){let t,e;return t=new R2({props:{fileTree:n[21]}}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p:Qt,i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function wI(n){let t,e;return t=new $w({}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p:Qt,i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function SI(n){let t,e;const r=n[25].content,i=Se(r,n,n[28],$d);return{c(){t=q("article"),i&&i.c(),this.h()},l(s){t=$(s,"ARTICLE",{id:!0,class:!0});var o=Q(t);i&&i.l(o),o.forEach(O),this.h()},h(){N(t,"id","evidence-main-article"),N(t,"class","select-text markdown pb-10")},m(s,o){x(s,t,o),i&&i.m(t,null),e=!0},p(s,o){i&&i.p&&(!e||o&268435456)&&Ie(i,r,s,s[28],e?De(r,s[28],o,vI):Oe(s[28]),$d)},i(s){e||(E(i,s),e=!0)},o(s){M(i,s),e=!1},d(s){s&&O(t),i&&i.d(s)}}}function Gd(n){let t,e,r;return e=new T2({props:{hideHeader:n[14]}}),{c(){t=q("div"),st(e.$$.fragment),this.h()},l(i){t=$(i,"DIV",{class:!0});var s=Q(t);ot(e.$$.fragment,s),s.forEach(O),this.h()},h(){N(t,"class","print:hidden")},m(i,s){x(i,t,s),at(e,t,null),r=!0},p(i,s){const o={};s&16384&&(o.hideHeader=i[14]),e.$set(o)},i(i){r||(E(e.$$.fragment,i),r=!0)},o(i){M(e.$$.fragment,i),r=!1},d(i){i&&O(t),lt(e)}}}function Xd(n){let t,e;return t=new Hw({}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function II(n){let t,e,r,i,s,o,a,l,c,u,f,h,d,g,m=!n[18]&&vl&&!n[17].url.pathname.startsWith("/settings"),p,_;e=new V2({});let y=!n[14]&&Yd(n),S=!n[4]&&n[16]!=="never"&&Kd(n),w=!n[13]&&Jd(n);const v=[SI,wI],k=[];function b(T,j){return T[18]?1:0}c=b(n),u=k[c]=v[c](n);let C=!n[15]&&Gd(n),F=m&&Xd();return{c(){t=q("div"),st(e.$$.fragment),r=et(),y&&y.c(),i=et(),s=q("div"),S&&S.c(),o=et(),a=q("main"),w&&w.c(),l=et(),u.c(),h=et(),C&&C.c(),g=et(),F&&F.c(),p=It(),this.h()},l(T){t=$(T,"DIV",{"data-sveltekit-preload-data":!0,class:!0});var j=Q(t);ot(e.$$.fragment,j),r=nt(j),y&&y.l(j),i=nt(j),s=$(j,"DIV",{class:!0,style:!0});var P=Q(s);S&&S.l(P),o=nt(P),a=$(P,"MAIN",{class:!0});var B=Q(a);w&&w.l(B),l=nt(B),u.l(B),B.forEach(O),h=nt(P),C&&C.l(P),P.forEach(O),j.forEach(O),g=nt(T),F&&F.l(T),p=It(),this.h()},h(){N(a,"class",f=(n[4]?"":"md:pl-8 ")+(n[15]?"":"md:pr-8 ")+(n[14]?n[13]?" mt-4 sm:mt-[26px] ":" mt-4 sm:mt-8 ":n[13]?" mt-16 sm:mt-[74px] ":" mt-16 sm:mt-20 ")+"flex-grow overflow-x-hidden print:px-0 print:mt-8"),N(s,"class",d=(n[3]?"max-w-full ":n[11]?"":" max-w-7xl ")+"print:w-[650px] print:md:w-[841px] mx-auto print:md:px-0 print:px-0 px-6 sm:px-8 md:px-12 flex justify-start"),Qo(s,"max-width",n[11]+"px"),N(t,"data-sveltekit-preload-data",n[20]),N(t,"class","antialiased")},m(T,j){x(T,t,j),at(e,t,null),H(t,r),y&&y.m(t,null),H(t,i),H(t,s),S&&S.m(s,null),H(s,o),H(s,a),w&&w.m(a,null),H(a,l),k[c].m(a,null),H(s,h),C&&C.m(s,null),x(T,g,j),F&&F.m(T,j),x(T,p,j),_=!0},p(T,j){T[14]?y&&(qt(),M(y,1,1,()=>{y=null}),$t()):y?(y.p(T,j),j&16384&&E(y,1)):(y=Yd(T),y.c(),E(y,1),y.m(t,i)),!T[4]&&T[16]!=="never"?S?(S.p(T,j),j&65552&&E(S,1)):(S=Kd(T),S.c(),E(S,1),S.m(s,o)):S&&(qt(),M(S,1,1,()=>{S=null}),$t()),T[13]?w&&(qt(),M(w,1,1,()=>{w=null}),$t()):w?(w.p(T,j),j&8192&&E(w,1)):(w=Jd(T),w.c(),E(w,1),w.m(a,l));let P=c;c=b(T),c===P?k[c].p(T,j):(qt(),M(k[P],1,1,()=>{k[P]=null}),$t(),u=k[c],u?u.p(T,j):(u=k[c]=v[c](T),u.c()),E(u,1),u.m(a,null)),(!_||j&57360&&f!==(f=(T[4]?"":"md:pl-8 ")+(T[15]?"":"md:pr-8 ")+(T[14]?T[13]?" mt-4 sm:mt-[26px] ":" mt-4 sm:mt-8 ":T[13]?" mt-16 sm:mt-[74px] ":" mt-16 sm:mt-20 ")+"flex-grow overflow-x-hidden print:px-0 print:mt-8"))&&N(a,"class",f),T[15]?C&&(qt(),M(C,1,1,()=>{C=null}),$t()):C?(C.p(T,j),j&32768&&E(C,1)):(C=Gd(T),C.c(),E(C,1),C.m(s,null)),(!_||j&2056&&d!==(d=(T[3]?"max-w-full ":T[11]?"":" max-w-7xl ")+"print:w-[650px] print:md:w-[841px] mx-auto print:md:px-0 print:px-0 px-6 sm:px-8 md:px-12 flex justify-start"))&&N(s,"class",d),(!_||j&2048)&&Qo(s,"max-width",T[11]+"px"),j&393216&&(m=!T[18]&&vl&&!T[17].url.pathname.startsWith("/settings")),m?F?j&393216&&E(F,1):(F=Xd(),F.c(),E(F,1),F.m(p.parentNode,p)):F&&(qt(),M(F,1,1,()=>{F=null}),$t())},i(T){_||(E(e.$$.fragment,T),E(y),E(S),E(w),E(u),E(C),E(F),_=!0)},o(T){M(e.$$.fragment,T),M(y),M(S),M(w),M(u),M(C),M(F),_=!1},d(T){T&&(O(t),O(g),O(p)),lt(e),y&&y.d(),S&&S.d(),w&&w.d(),k[c].d(),C&&C.d(),F&&F.d(T)}}}function OI(n){let t,e,r,i,s;const o=n[25].default,a=Se(o,n,n[28],null);return e=new r0({}),i=new bI({props:{$$slots:{default:[II]},$$scope:{ctx:n}}}),{c(){a&&a.c(),t=et(),st(e.$$.fragment),r=et(),st(i.$$.fragment)},l(l){a&&a.l(l),t=nt(l),ot(e.$$.fragment,l),r=nt(l),ot(i.$$.fragment,l)},m(l,c){a&&a.m(l,c),x(l,t,c),at(e,l,c),x(l,r,c),at(i,l,c),s=!0},p(l,[c]){a&&a.p&&(!s||c&268435456)&&Ie(a,o,l,l[28],s?De(o,l[28],c,null):Oe(l[28]),null);const u={};c&269484031&&(u.$$scope={dirty:c,ctx:l}),i.$set(u)},i(l){s||(E(a,l),E(e.$$.fragment,l),E(i.$$.fragment,l),s=!0)},o(l){M(a,l),M(e.$$.fragment,l),M(i.$$.fragment,l),s=!1},d(l){l&&(O(t),O(r)),a&&a.d(l),lt(e,l),lt(i,l)}}}function DI(n){const t=new Map;function e(r){if(r){if(r.href){const i=decodeURI(r.href);t.set(i,r)}Object.values(r.children).forEach(e)}}return e(n),t}function kI(n,t,e){let r,i,s,o,a;Me(n,Ma,D=>e(17,o=D)),Me(n,ch,D=>e(18,a=D));let{$$slots:l={},$$scope:c}=t;{const D=document.getElementById("__evidence_project_splash");D==null||D.remove()}let{data:u}=t,{title:f=void 0}=t,{logo:h=void 0}=t,{neverShowQueries:d=!1}=t,{fullWidth:g=!1}=t,{hideSidebar:m=!1}=t,{builtWithEvidence:p=!1}=t,{algolia:_=void 0}=t,{githubRepo:y=void 0}=t,{xProfile:S=void 0}=t,{blueskyProfile:w=void 0}=t,{slackCommunity:v=void 0}=t,{maxWidth:k=void 0}=t,{homePageName:b="Home"}=t,{hideBreadcrumbs:C=!1}=t,{hideHeader:F=!1}=t,{hideTOC:T=!1}=t;const j="hover";let P=!1,B=u==null?void 0:u.pagesManifest;Xr(async()=>{if(!("serviceWorker"in navigator))return;const D=await navigator.serviceWorker.register(zt("/fix-tprotocol-service-worker.js"),{scope:zt("/"),type:"classic"});console.debug("[fix-tprotocol-service-worker] Service Worker registered",{registration:D})});const{syncDataThemeAttribute:L,cycleAppearance:V}=rh();Xr(()=>{const D=J=>{J.key.toLowerCase()==="l"&&J.shiftKey&&(J.ctrlKey||J.metaKey)&&V()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)}),Xr(()=>L(document.querySelector("html")));function R(D){P=D,e(19,P),e(18,a)}function W(D){P=D,e(19,P),e(18,a)}return n.$$set=D=>{"data"in D&&e(22,u=D.data),"title"in D&&e(0,f=D.title),"logo"in D&&e(1,h=D.logo),"neverShowQueries"in D&&e(2,d=D.neverShowQueries),"fullWidth"in D&&e(3,g=D.fullWidth),"hideSidebar"in D&&e(4,m=D.hideSidebar),"builtWithEvidence"in D&&e(5,p=D.builtWithEvidence),"algolia"in D&&e(6,_=D.algolia),"githubRepo"in D&&e(7,y=D.githubRepo),"xProfile"in D&&e(8,S=D.xProfile),"blueskyProfile"in D&&e(9,w=D.blueskyProfile),"slackCommunity"in D&&e(10,v=D.slackCommunity),"maxWidth"in D&&e(11,k=D.maxWidth),"homePageName"in D&&e(12,b=D.homePageName),"hideBreadcrumbs"in D&&e(13,C=D.hideBreadcrumbs),"hideHeader"in D&&e(14,F=D.hideHeader),"hideTOC"in D&&e(15,T=D.hideTOC),"$$scope"in D&&e(28,c=D.$$scope)},n.$$.update=()=>{var D;n.$$.dirty&262144&&a&&e(19,P=!1),n.$$.dirty&16908288&&e(23,i=(D=r.get(o.route.id))==null?void 0:D.frontMatter),n.$$.dirty&8388608&&e(16,s=i==null?void 0:i.sidebar),n.$$.dirty&65536&&(["show","hide","never"].includes(s)||e(16,s=void 0))},e(24,r=DI(B)),[f,h,d,g,m,p,_,y,S,w,v,k,b,C,F,T,s,o,a,P,j,B,u,i,r,l,R,W,c]}class EI extends se{constructor(t){super(),oe(this,t,kI,OI,Zt,{data:22,title:0,logo:1,neverShowQueries:2,fullWidth:3,hideSidebar:4,builtWithEvidence:5,algolia:6,githubRepo:7,xProfile:8,blueskyProfile:9,slackCommunity:10,maxWidth:11,homePageName:12,hideBreadcrumbs:13,hideHeader:14,hideTOC:15})}}const AI=n=>({}),Zd=n=>({slot:"content"});function TI(n){let t;const e=n[1].default,r=Se(e,n,n[2],Zd);return{c(){r&&r.c()},l(i){r&&r.l(i)},m(i,s){r&&r.m(i,s),t=!0},p(i,s){r&&r.p&&(!t||s&4)&&Ie(r,e,i,i[2],t?De(e,i[2],s,AI):Oe(i[2]),Zd)},i(i){t||(E(r,i),t=!0)},o(i){M(r,i),t=!1},d(i){r&&r.d(i)}}}function BI(n){let t,e;return t=new EI({props:{data:n[0],githubRepo:"https://github.com/archiewood/nyc-taxi",$$slots:{content:[TI]},$$scope:{ctx:n}}}),{c(){st(t.$$.fragment)},l(r){ot(t.$$.fragment,r)},m(r,i){at(t,r,i),e=!0},p(r,[i]){const s={};i&1&&(s.data=r[0]),i&4&&(s.$$scope={dirty:i,ctx:r}),t.$set(s)},i(r){e||(E(t.$$.fragment,r),e=!0)},o(r){M(t.$$.fragment,r),e=!1},d(r){lt(t,r)}}}function PI(n,t,e){let{$$slots:r={},$$scope:i}=t,{data:s}=t;return n.$$set=o=>{"data"in o&&e(0,s=o.data),"$$scope"in o&&e(2,i=o.$$scope)},[s,r,i]}class qI extends se{constructor(t){super(),oe(this,t,PI,BI,Zt,{data:0})}}export{qI as component,HI as universal}; diff --git a/_app/immutable/nodes/1.DJ9Jibod.js b/_app/immutable/nodes/1.DJ9Jibod.js new file mode 100644 index 0000000000000000000000000000000000000000..ea4c128680c97020254627be9dad8391c31a416f --- /dev/null +++ b/_app/immutable/nodes/1.DJ9Jibod.js @@ -0,0 +1,8 @@ +import{s as J,e as m,a as x,d as _,g,c as T,f as u,j as h,k as d,l as p,B as M,H as A,I as Q,b as N,n as W,t as C,i as y,m as P,u as w}from"../chunks/scheduler.B2FSa8mv.js";import{S as K,i as L,c as I,a as S,m as j,t as v,g as D,b as E,d as U,e as H,f as z}from"../chunks/index.CzNnnxDZ.js";import{p as X}from"../chunks/stores.BQnhBgve.js";import{A as Y,a as Z}from"../chunks/AccordionItem.BAM5BvX8.js";import{I as tt,a as et,f as F}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import"../chunks/entry.CmEkywbK.js";function O(f){let t,n="Copied to clipboard",s,a;return{c(){t=m("p"),t.textContent=n,this.h()},l(o){t=_(o,"P",{class:!0,"data-svelte-h":!0}),A(t)!=="svelte-1srr0y3"&&(t.textContent=n),this.h()},h(){h(t,"class","absolute -bottom-14 right-0 text-sm bg-base-200 w-[17ch] text-center font-sans p-2 border border-base-300 rounded")},m(o,l){d(o,t,l),a=!0},i(o){a||(o&&Q(()=>{a&&(s||(s=z(t,F,{duration:250},!0)),s.run(1))}),a=!0)},o(o){o&&(s||(s=z(t,F,{duration:250},!1)),s.run(0)),a=!1},d(o){o&&u(t),o&&s&&s.end()}}}function st(f){let t,n,s,a,o,l,i,e=f[0]&&O();return a=new tt({props:{src:et,class:"w-4 h-4"}}),{c(){t=m("div"),e&&e.c(),n=x(),s=m("button"),I(a.$$.fragment),this.h()},l(r){t=_(r,"DIV",{class:!0});var c=g(t);e&&e.l(c),n=T(c),s=_(c,"BUTTON",{class:!0,title:!0});var k=g(s);S(a.$$.fragment,k),k.forEach(u),c.forEach(u),this.h()},h(){h(s,"class","bg-base-200 border border-base-300 rounded p-2 hover:bg-base-200/80 active:bg-base-200"),h(s,"title","Copy to Clipboard"),h(t,"class","relative")},m(r,c){d(r,t,c),e&&e.m(t,null),p(t,n),p(t,s),j(a,s,null),o=!0,l||(i=M(s,"click",f[1]),l=!0)},p(r,[c]){r[0]?e?c&1&&v(e,1):(e=O(),e.c(),v(e,1),e.m(t,n)):e&&(D(),E(e,1,1,()=>{e=null}),U())},i(r){o||(v(e),v(a.$$.fragment,r),o=!0)},o(r){E(e),E(a.$$.fragment,r),o=!1},d(r){r&&u(t),e&&e.d(),H(a),l=!1,i()}}}function rt(f,t,n){let{textToCopy:s=""}=t,a=!1;const o=()=>{navigator.clipboard.writeText(s),n(0,a=!0),setTimeout(()=>n(0,a=!1),1e3)};return f.$$set=l=>{"textToCopy"in l&&n(2,s=l.textToCopy)},[a,o,s]}class at extends K{constructor(t){super(),L(this,t,rt,st,J,{textToCopy:2})}}function nt(f){let t,n="Unknown Error Encountered",s,a,o,l=f[0].status+"",i;return{c(){t=m("h1"),t.textContent=n,s=x(),a=m("span"),o=C("HTTP "),i=C(l),this.h()},l(e){t=_(e,"H1",{"data-svelte-h":!0}),A(t)!=="svelte-blh3ny"&&(t.textContent=n),s=T(e),a=_(e,"SPAN",{class:!0});var r=g(a);o=y(r,"HTTP "),i=y(r,l),r.forEach(u),this.h()},h(){h(a,"class","font-mono text-base")},m(e,r){d(e,t,r),d(e,s,r),d(e,a,r),p(a,o),p(a,i)},p(e,r){r&1&&l!==(l=e[0].status+"")&&P(i,l)},i:w,o:w,d(e){e&&(u(t),u(s),u(a))}}}function ot(f){let t,n="Application Error",s,a,o,l,i=f[0].error.message&&R(f),e=(f[0].error.stack||f[0].error.cause)&&G(f);return{c(){t=m("h1"),t.textContent=n,s=x(),i&&i.c(),a=x(),e&&e.c(),o=N(),this.h()},l(r){t=_(r,"H1",{class:!0,"data-svelte-h":!0}),A(t)!=="svelte-zh66lr"&&(t.textContent=n),s=T(r),i&&i.l(r),a=T(r),e&&e.l(r),o=N(),this.h()},h(){h(t,"class","mt-0 mb-8 py-0")},m(r,c){d(r,t,c),d(r,s,c),i&&i.m(r,c),d(r,a,c),e&&e.m(r,c),d(r,o,c),l=!0},p(r,c){r[0].error.message?i?i.p(r,c):(i=R(r),i.c(),i.m(a.parentNode,a)):i&&(i.d(1),i=null),r[0].error.stack||r[0].error.cause?e?(e.p(r,c),c&1&&v(e,1)):(e=G(r),e.c(),v(e,1),e.m(o.parentNode,o)):e&&(D(),E(e,1,1,()=>{e=null}),U())},i(r){l||(v(e),l=!0)},o(r){E(e),l=!1},d(r){r&&(u(t),u(s),u(a),u(o)),i&&i.d(r),e&&e.d(r)}}}function lt(f){let t,n="Page Not Found",s,a,o,l=f[0].status+"",i,e,r,c=f[0].url.pathname+"",k,B;return{c(){t=m("h1"),t.textContent=n,s=x(),a=m("p"),o=m("span"),i=C(l),e=C(`: The page + `),r=m("span"),k=C(c),B=C(" can't be found in the project."),this.h()},l(b){t=_(b,"H1",{class:!0,"data-svelte-h":!0}),A(t)!=="svelte-s9jbdv"&&(t.textContent=n),s=T(b),a=_(b,"P",{});var $=g(a);o=_($,"SPAN",{class:!0});var V=g(o);i=y(V,l),V.forEach(u),e=y($,`: The page + `),r=_($,"SPAN",{class:!0});var q=g(r);k=y(q,c),q.forEach(u),B=y($," can't be found in the project."),$.forEach(u),this.h()},h(){h(t,"class","mt-0 mb-8 py-0"),h(o,"class","font-mono text-base"),h(r,"class","font-mono text-base bg-base-200")},m(b,$){d(b,t,$),d(b,s,$),d(b,a,$),p(a,o),p(o,i),p(a,e),p(a,r),p(r,k),p(a,B)},p(b,$){$&1&&l!==(l=b[0].status+"")&&P(i,l),$&1&&c!==(c=b[0].url.pathname+"")&&P(k,c)},i:w,o:w,d(b){b&&(u(t),u(s),u(a))}}}function R(f){let t,n,s=f[0].status+"",a,o,l=f[0].error.message+"",i;return{c(){t=m("p"),n=m("span"),a=C(s),o=C(":"),i=C(l),this.h()},l(e){t=_(e,"P",{class:!0});var r=g(t);n=_(r,"SPAN",{class:!0});var c=g(n);a=y(c,s),c.forEach(u),o=y(r,":"),i=y(r,l),r.forEach(u),this.h()},h(){h(n,"class","font-mono text-base"),h(t,"class","font-mono text-sm bg-base-200 px-2 py-2")},m(e,r){d(e,t,r),p(t,n),p(n,a),p(t,o),p(t,i)},p(e,r){r&1&&s!==(s=e[0].status+"")&&P(a,s),r&1&&l!==(l=e[0].error.message+"")&&P(i,l)},d(e){e&&u(t)}}}function G(f){let t,n;return t=new Y({props:{$$slots:{default:[ct]},$$scope:{ctx:f}}}),{c(){I(t.$$.fragment)},l(s){S(t.$$.fragment,s)},m(s,a){j(t,s,a),n=!0},p(s,a){const o={};a&10&&(o.$$scope={dirty:a,ctx:s}),t.$set(o)},i(s){n||(v(t.$$.fragment,s),n=!0)},o(s){E(t.$$.fragment,s),n=!1},d(s){H(t,s)}}}function it(f){let t,n,s,a,o,l,i;return s=new at({props:{textToCopy:f[1]}}),{c(){t=m("div"),n=m("span"),I(s.$$.fragment),a=x(),o=m("pre"),l=C(f[1]),this.h()},l(e){t=_(e,"DIV",{class:!0});var r=g(t);n=_(r,"SPAN",{class:!0});var c=g(n);S(s.$$.fragment,c),c.forEach(u),a=T(r),o=_(r,"PRE",{class:!0});var k=g(o);l=y(k,f[1]),k.forEach(u),r.forEach(u),this.h()},h(){h(n,"class","absolute top-2 right-2"),h(o,"class","font-mono text-sm bg-base-200 px-2 py-2 overflow-auto"),h(t,"class","relative")},m(e,r){d(e,t,r),p(t,n),j(s,n,null),p(t,a),p(t,o),p(o,l),i=!0},p(e,r){const c={};r&2&&(c.textToCopy=e[1]),s.$set(c),(!i||r&2)&&P(l,e[1])},i(e){i||(v(s.$$.fragment,e),i=!0)},o(e){E(s.$$.fragment,e),i=!1},d(e){e&&u(t),H(s)}}}function ct(f){let t,n;return t=new Z({props:{title:"Error Details",$$slots:{default:[it]},$$scope:{ctx:f}}}),{c(){I(t.$$.fragment)},l(s){S(t.$$.fragment,s)},m(s,a){j(t,s,a),n=!0},p(s,a){const o={};a&10&&(o.$$scope={dirty:a,ctx:s}),t.$set(o)},i(s){n||(v(t.$$.fragment,s),n=!0)},o(s){E(t.$$.fragment,s),n=!1},d(s){H(t,s)}}}function ft(f){let t,n,s,a;const o=[lt,ot,nt],l=[];function i(e,r){return e[0].status===404?0:e[0].status===500?1:2}return t=i(f),n=l[t]=o[t](f),{c(){n.c(),s=N()},l(e){n.l(e),s=N()},m(e,r){l[t].m(e,r),d(e,s,r),a=!0},p(e,[r]){let c=t;t=i(e),t===c?l[t].p(e,r):(D(),E(l[c],1,1,()=>{l[c]=null}),U(),n=l[t],n?n.p(e,r):(n=l[t]=o[t](e),n.c()),v(n,1),n.m(s.parentNode,s))},i(e){a||(v(n),a=!0)},o(e){E(n),a=!1},d(e){e&&u(s),l[t].d(e)}}}function ut(f,t,n){let s,a;W(f,X,l=>n(0,a=l));{const l=document.getElementById("__evidence_project_splash");l==null||l.remove()}const o=l=>{let i="";return l.stack&&(i+=l.stack),l.cause&&(i+=` + +Caused By: + `,i+=o(l.cause).split(` +`).join(` + `)),i};return f.$$.update=()=>{f.$$.dirty&1&&n(1,s=o(a.error))},[a,s]}class $t extends K{constructor(t){super(),L(this,t,ut,ft,J,{})}}export{$t as component}; diff --git a/_app/immutable/nodes/2.B_uyDmX-.js b/_app/immutable/nodes/2.B_uyDmX-.js new file mode 100644 index 0000000000000000000000000000000000000000..c72e12fa7dacfdd8c7b73387ea823cfbb31f04c4 --- /dev/null +++ b/_app/immutable/nodes/2.B_uyDmX-.js @@ -0,0 +1 @@ +import{d as e}from"../chunks/index.rV6zwFgL.js";import{component as p}from"./3.Ct4wDhpw.js";const o=e,r=e,t=e,s=Object.freeze(Object.defineProperty({__proto__:null,csr:r,prerender:t,ssr:o},Symbol.toStringTag,{value:"Module"}));export{p as component,s as universal}; diff --git a/_app/immutable/nodes/3.Ct4wDhpw.js b/_app/immutable/nodes/3.Ct4wDhpw.js new file mode 100644 index 0000000000000000000000000000000000000000..e270fa479ecf5a218e062d47d28a0a3ae3062d5c --- /dev/null +++ b/_app/immutable/nodes/3.Ct4wDhpw.js @@ -0,0 +1 @@ +import{s as l,z as i,D as r,E as u,F as f}from"../chunks/scheduler.B2FSa8mv.js";import{S as _,i as c,t as p,b as m}from"../chunks/index.CzNnnxDZ.js";function $(n){let s;const a=n[1].default,e=i(a,n,n[0],null);return{c(){e&&e.c()},l(t){e&&e.l(t)},m(t,o){e&&e.m(t,o),s=!0},p(t,[o]){e&&e.p&&(!s||o&1)&&r(e,a,t,t[0],s?f(a,t[0],o,null):u(t[0]),null)},i(t){s||(p(e,t),s=!0)},o(t){m(e,t),s=!1},d(t){e&&e.d(t)}}}function d(n,s,a){let{$$slots:e={},$$scope:t}=s;return n.$$set=o=>{"$$scope"in o&&a(0,t=o.$$scope)},[t,e]}class h extends _{constructor(s){super(),c(this,s,d,$,l,{})}}export{h as component}; diff --git a/_app/immutable/nodes/4.BbVuqJ42.js b/_app/immutable/nodes/4.BbVuqJ42.js new file mode 100644 index 0000000000000000000000000000000000000000..d59eb1d3ca4856aa8954ee82b6df6f03162f572a --- /dev/null +++ b/_app/immutable/nodes/4.BbVuqJ42.js @@ -0,0 +1,136 @@ +import{s as $e,z as bi,e as oe,d as fe,g as be,f as S,j as B,k as P,D as wi,E as ki,F as Ci,q as _i,b as Me,u as de,a8 as Ji,M as yt,T as z,J as ht,K as gt,a as Q,c as J,L as $i,H as qn,l as Oe,I as Yn,B as ct,a9 as dn,n as _t,a7 as xn,aa as Qt,ab as Zi,O as ci,P as mi,t as Bn,i as Nn,m as Kn,y as Qn,ad as Jn,h as Zn,o as vn,p as $n,r as er}from"../chunks/scheduler.B2FSa8mv.js";import{S as et,i as tt,t as L,b as E,j as tr,c as v,a as $,m as ee,g as Re,d as He,e as te}from"../chunks/index.CzNnnxDZ.js";import{O as Jt,R as en,S as Rn,U as ir,V as nr,W as tn,X as rr,g as $t,f as lr,Y as Hn,Z as sr,_ as Gt,$ as ar,a0 as or,a1 as xi,a2 as yn,a3 as hn,a4 as gn,a5 as Ki,a6 as fr,a7 as ve,a8 as mt,a9 as di,aa as dt,ab as Un,ac as pn,ad as Vn,ae as ur,Q as rt,K as cr,M as mr,af as dr,ag as yr,D as hr,e as gr,s as _r,p as br,ah as _n,ai as yi,r as bn,C as wr}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import{w as vi}from"../chunks/entry.CmEkywbK.js";import{h as Ye,p as kr}from"../chunks/button.DfeRvuoX.js";import{p as Cr}from"../chunks/stores.BQnhBgve.js";import{D as Sr,B as hi,A as Ar,Q as ei}from"../chunks/AreaMap.u3IdXB4f.js";function wn(n){return t=>t.map(i=>{var l;const r={},s=Object.keys(i);for(const a of s){const o=(l=n[a])!=null?l:a;r[o]=i[a]}return r})}function Tr(n,e){if(n.length===0||e.length===0)return{};const t=Object.keys(n[0]),i=Object.keys(e[0]),l={};for(const r of t)i.includes(r)&&(l[r]=r);return l}function Or(n,e,t){for(const i in t){const l=t[i];if(n[l]!==e[i])return!1}return!0}function Mr(n,e){return i=>{if(!n.length)return i;const l=Tr(i,n),r=Object.keys(n[0]);return i.flatMap(a=>{const o=n.filter(g=>Or(a,g,l));if(o.length)return o.map(g=>({...a,...g}));const f=Object.fromEntries(r.filter(g=>a[g]==null).map(g=>[g,void 0]));return{...a,...f}})}}function kn(n){return t=>{const i=t.map(l=>({...l}));for(const l in n){const r=n[l],s=typeof r=="function"?r(i):r,a=s!=null&&s[Symbol.iterator]&&typeof s!="string"?s:t.map(()=>s);let o=-1;for(const f of i)f[l]=a[++o]}return i}}function Lr(n){return t=>{const i=Fr(n),l=[];for(const r in i){const s=i[r];let a;typeof s=="function"?a=s(t):Array.isArray(s)?a=s:a=Array.from(new Set(t.map(o=>o[r]))),l.push(a.map(o=>({[r]:o})))}return Dr(l)}}function Dr(n){function e(i,l,r){if(!r.length&&l!=null){i.push(l);return}const s=r[0],a=r.slice(1);for(const o of s)e(i,{...l,...o},a)}const t=[];return e(t,null,n),t}function Fr(n){if(Array.isArray(n)){const e={};for(const t of n)e[t]=t;return e}else if(typeof n=="object")return n;return{[n]:n}}function zr(n){return t=>{const i=[];for(const l of t){const r={...l};for(const s in n)r[s]==null&&(r[s]=n[s]);i.push(r)}return i}}function Cn(n,e){return i=>{const l=Lr(n)(i),r=Mr(i)(l);return e?zr(e)(r):r}}function Sn(n,e,t){return n==null||e==null?void 0:e===0&&n===0?0:!t&&e===0?void 0:n/e}function An(n,e,t){const i=typeof n=="function"?n:a=>a[n],l=a=>a[e],{predicate:r,allowDivideByZero:s}={};return r==null?(a,o,f)=>{const g=l(a),_=i(a,o,f);return Sn(_,g,s)}:(a,o,f)=>{if(!r(a,o,f))return;const g=l(a),_=i(a,o,f);return Sn(_,g,s)}}function Ir(n){let e,t,i;const l=n[5].default,r=bi(l,n,n[4],null);return{c(){e=oe("div"),r&&r.c(),this.h()},l(s){e=fe(s,"DIV",{class:!0});var a=be(e);r&&r.l(a),a.forEach(S),this.h()},h(){B(e,"class",t="grid "+n[2][n[0]]+" "+n[3][n[1]])},m(s,a){P(s,e,a),r&&r.m(e,null),i=!0},p(s,[a]){r&&r.p&&(!i||a&16)&&wi(r,l,s,s[4],i?Ci(l,s[4],a,null):ki(s[4]),null),(!i||a&3&&t!==(t="grid "+s[2][s[0]]+" "+s[3][s[1]]))&&B(e,"class",t)},i(s){i||(L(r,s),i=!0)},o(s){E(r,s),i=!1},d(s){s&&S(e),r&&r.d(s)}}}function Er(n,e,t){let{$$slots:i={},$$scope:l}=e,{cols:r=2}=e,{gapSize:s="md"}=e;const a=Object.freeze({1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5",6:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6"}),o=Object.freeze({none:"gap-0",sm:"gap-2",md:"gap-4",lg:"gap-8"}),f=Object.freeze({none:0,sm:8,md:16,lg:32});let g=`grid-${Date.now()}-${Math.round(Math.random()*1e3)}`,_=f[s];return _i("gridConfig",{gridId:g,cols:r,gapWidth:_}),n.$$set=w=>{"cols"in w&&t(0,r=w.cols),"gapSize"in w&&t(1,s=w.gapSize),"$$scope"in w&&t(4,l=w.$$scope)},[r,s,a,o,l,i]}class jr extends et{constructor(e){super(),tt(this,e,Er,Ir,$e,{cols:0,gapSize:1})}}const qt=Symbol.for("__evidence-chart-window-debug__"),Pr=(n,e)=>{window[qt]||(window[qt]={}),window[qt][n]=e},Gr=n=>{window[qt]||(window[qt]={}),delete window[qt][n]},Pt=500,qr=(n,e)=>{var k;const t=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)&&n.clientWidth*3*n.clientHeight*3>16777215;Jt("light",en),Jt("dark",Rn);let i;const l=()=>{i=tn(n,e.theme,{renderer:t?"svg":e.renderer??"canvas"})};l(),Pr(i.id,i),e.connectGroup&&(i.group=e.connectGroup,ir(e.connectGroup));const r=()=>{if(e.seriesColors){const y=i.getOption();if(!y)return;const C={...y};for(const A of Object.keys(e.seriesColors)){const G=y.series.findIndex(M=>M.name===A);G!==-1&&(C.series[G]={...C.series[G],itemStyle:{...C.series[G].itemStyle,color:e.seriesColors[A]}})}i.setOption(C)}},s=()=>{e.echartsOptions&&i.setOption({...e.echartsOptions})},a=()=>{let y=[];if(e.seriesOptions){const C=e.config.series.reduce((A,{evidenceSeriesType:G},M)=>((G==="reference_line"||G==="reference_area"||G==="reference_point")&&A.push(M),A),[]);for(let A=0;A{i.resize({animation:{duration:Pt}}),w()},100);let _;window.ResizeObserver&&f?(_=new ResizeObserver(g),_.observe(f)):window.addEventListener("resize",g);const w=()=>{if(e.showAllXAxisLabels){const y=i.getOption();if(!y)return;const C=new Set(y.series.flatMap(M=>{var H;return(H=M.data)==null?void 0:H.map(X=>X[0])})),A=4/5,G=(n==null?void 0:n.clientWidth)??0;if(!e.swapXY){const M={xAxis:{axisLabel:{interval:0,overflow:"truncate",width:G*A/C.size}}};i.setOption(M)}}},D=y=>{y.theme!==e.theme&&(i.dispose(),e=y,l()),e=y,i.setOption({...e.config,animationDuration:Pt,animationDurationUpdate:Pt},!0),r(),s(),a(),i.resize({animation:{duration:Pt}}),w()};return g(),window[k=Symbol.for("chart renders")]??(window[k]=0),window[Symbol.for("chart renders")]++,{update(y){window[Symbol.for("chart renders")]++,D(y)},destroy(){_?_.unobserve(f):window.removeEventListener("resize",g),i.dispose(),Gr(i.id)}}},Br=(n,e)=>{Jt("light",en),Jt("dark",Rn),console.log("echartsCanvasDownloadAction",e.theme);const t=tn(n,e.theme,{renderer:"canvas"});e.config.animation=!1,t.setOption(e.config);const i=()=>{if(e.seriesColors){const f=t.getOption();if(!f)return;const g={...f};for(const _ of Object.keys(e.seriesColors)){const w=f.series.findIndex(D=>D.name===_);w!==-1&&(g.series[w]={...g.series[w],itemStyle:{...g.series[w].itemStyle,color:e.seriesColors[_]}})}t.setOption(g)}},l=()=>{e.echartsOptions&&t.setOption({...e.echartsOptions})},r=()=>{let f=[];if(e.seriesOptions){const g=e.config.series.reduce((_,{evidenceSeriesType:w},D)=>((w==="reference_line"||w==="reference_area"||w==="reference_point")&&_.push(D),_),[]);for(let _=0;_{Jt("evidence-light",en);const{config:t,ratio:i,echartsOptions:l,seriesOptions:r,seriesColors:s,isMap:a,extraHeight:o,width:f}=e;let g={renderer:"canvas"};a&&(g.height=f*.5+o,n&&n.parentNode&&(n.style.height=g.height+"px",n.parentNode.style.height=g.height+"px"));const _=tn(n,"evidence-light",g);t.animation=!1,_.setOption(t),l&&_.setOption(l);const w=()=>{if(s){const C=_.getOption();if(!C)return;const A={...C};for(const G of Object.keys(s)){const M=C.series.findIndex(H=>H.name===G);M!==-1&&(A.series[M]={...A.series[M],itemStyle:{...A.series[M].itemStyle,color:s[G]}})}_.setOption(A)}},D=()=>{l&&_.setOption({...l})},k=()=>{let C=[];if(r){const A=t.series.reduce((G,{evidenceSeriesType:M},H)=>((M==="reference_line"||M==="reference_area"||M==="reference_point")&&G.push(H),G),[]);for(let G=0;G`,e.config.animation=!0};function Nr(n){let e;function t(r,s){return r[9]?Ur:Hr}let i=t(n),l=i(n);return{c(){l.c(),e=Me()},l(r){l.l(r),e=Me()},m(r,s){l.m(r,s),P(r,e,s)},p(r,s){i===(i=t(r))&&l?l.p(r,s):(l.d(1),l=i(r),l&&(l.c(),l.m(e.parentNode,e)))},d(r){r&&S(e),l.d(r)}}}function Rr(n){let e,t,i,l;return{c(){e=oe("div"),this.h()},l(r){e=fe(r,"DIV",{class:!0,style:!0}),be(e).forEach(S),this.h()},h(){B(e,"class","chart"),z(e,"height",n[1]),z(e,"width",n[2]),z(e,"margin-left","0"),z(e,"margin-top","15px"),z(e,"margin-bottom","10px"),z(e,"overflow","visible"),z(e,"break-inside","avoid")},m(r,s){P(r,e,s),i||(l=ht(t=Zt.call(null,e,{config:n[0],ratio:2,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[13]})),i=!0)},p(r,s){s&2&&z(e,"height",r[1]),s&4&&z(e,"width",r[2]),t&>(t.update)&&s&8289&&t.update.call(null,{config:r[0],ratio:2,echartsOptions:r[5],seriesOptions:r[6],seriesColors:r[13]})},d(r){r&&S(e),i=!1,l()}}}function Hr(n){let e,t,i,l,r,s,a;return{c(){e=oe("div"),i=Q(),l=oe("div"),this.h()},l(o){e=fe(o,"DIV",{class:!0,style:!0}),be(e).forEach(S),i=J(o),l=fe(o,"DIV",{class:!0,style:!0}),be(l).forEach(S),this.h()},h(){B(e,"class","chart md:hidden"),z(e,"height",n[1]),z(e,"width","650px"),z(e,"margin-left","0"),z(e,"margin-top","15px"),z(e,"margin-bottom","10px"),z(e,"overflow","visible"),z(e,"break-inside","avoid"),B(l,"class","chart hidden md:block"),z(l,"height",n[1]),z(l,"width","841px"),z(l,"margin-left","0"),z(l,"margin-top","15px"),z(l,"margin-bottom","10px"),z(l,"overflow","visible"),z(l,"break-inside","avoid")},m(o,f){P(o,e,f),P(o,i,f),P(o,l,f),s||(a=[ht(t=Zt.call(null,e,{config:n[0],ratio:4,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[13],isMap:n[7],extraHeight:n[8],width:650})),ht(r=Zt.call(null,l,{config:n[0],ratio:4,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[13],isMap:n[7],extraHeight:n[8],width:841}))],s=!0)},p(o,f){f&2&&z(e,"height",o[1]),t&>(t.update)&&f&8673&&t.update.call(null,{config:o[0],ratio:4,echartsOptions:o[5],seriesOptions:o[6],seriesColors:o[13],isMap:o[7],extraHeight:o[8],width:650}),f&2&&z(l,"height",o[1]),r&>(r.update)&&f&8673&&r.update.call(null,{config:o[0],ratio:4,echartsOptions:o[5],seriesOptions:o[6],seriesColors:o[13],isMap:o[7],extraHeight:o[8],width:841})},d(o){o&&(S(e),S(i),S(l)),s=!1,$i(a)}}}function Ur(n){let e,t,i,l,r,s,a;return{c(){e=oe("div"),i=Q(),l=oe("div"),this.h()},l(o){e=fe(o,"DIV",{class:!0,style:!0}),be(e).forEach(S),i=J(o),l=fe(o,"DIV",{class:!0,style:!0}),be(l).forEach(S),this.h()},h(){B(e,"class","chart md:hidden"),z(e,"height",n[1]),z(e,"width",n[11]+"px"),z(e,"margin-left","0"),z(e,"margin-top","15px"),z(e,"margin-bottom","10px"),z(e,"overflow","visible"),z(e,"break-inside","avoid"),B(l,"class","chart hidden md:block"),z(l,"height",n[1]),z(l,"width",n[10]+"px"),z(l,"margin-left","0"),z(l,"margin-top","15px"),z(l,"margin-bottom","10px"),z(l,"overflow","visible"),z(l,"break-inside","avoid")},m(o,f){P(o,e,f),P(o,i,f),P(o,l,f),s||(a=[ht(t=Zt.call(null,e,{config:n[0],ratio:4,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[13],isMap:n[7],extraHeight:n[8],width:n[11]})),ht(r=Zt.call(null,l,{config:n[0],ratio:4,echartsOptions:n[5],seriesOptions:n[6],seriesColors:n[13],isMap:n[7],extraHeight:n[8],width:n[10]}))],s=!0)},p(o,f){f&2&&z(e,"height",o[1]),f&2048&&z(e,"width",o[11]+"px"),t&>(t.update)&&f&10721&&t.update.call(null,{config:o[0],ratio:4,echartsOptions:o[5],seriesOptions:o[6],seriesColors:o[13],isMap:o[7],extraHeight:o[8],width:o[11]}),f&2&&z(l,"height",o[1]),f&1024&&z(l,"width",o[10]+"px"),r&>(r.update)&&f&9697&&r.update.call(null,{config:o[0],ratio:4,echartsOptions:o[5],seriesOptions:o[6],seriesColors:o[13],isMap:o[7],extraHeight:o[8],width:o[10]})},d(o){o&&(S(e),S(i),S(l)),s=!1,$i(a)}}}function pr(n){let e;function t(r,s){if(r[3])return Rr;if(r[4])return Nr}let i=t(n),l=i&&i(n);return{c(){l&&l.c(),e=Me()},l(r){l&&l.l(r),e=Me()},m(r,s){l&&l.m(r,s),P(r,e,s)},p(r,[s]){i===(i=t(r))&&l?l.p(r,s):(l&&l.d(1),l=i&&i(r),l&&(l.c(),l.m(e.parentNode,e)))},i:de,o:de,d(r){r&&S(e),l&&l.d(r)}}}function Vr(n,e,t){let i,l,r,s,a,o,f=de,g=()=>(f(),f=yt(i,d=>t(13,o=d)),i);n.$$.on_destroy.push(()=>f());const{resolveColorsObject:_}=$t();let{config:w=void 0}=e,{height:D="291px"}=e,{width:k="100%"}=e,{copying:y=!1}=e,{printing:C=!1}=e,{echartsOptions:A=void 0}=e,{seriesOptions:G=void 0}=e,{seriesColors:M=void 0}=e,{isMap:H=!1}=e,{extraHeight:X=void 0}=e,Y=!1,ie,R;const N=Ji("gridConfig");return N&&(Y=!0,{cols:ie,gapWidth:R}=N),n.$$set=d=>{"config"in d&&t(0,w=d.config),"height"in d&&t(1,D=d.height),"width"in d&&t(2,k=d.width),"copying"in d&&t(3,y=d.copying),"printing"in d&&t(4,C=d.printing),"echartsOptions"in d&&t(5,A=d.echartsOptions),"seriesOptions"in d&&t(6,G=d.seriesOptions),"seriesColors"in d&&t(14,M=d.seriesColors),"isMap"in d&&t(7,H=d.isMap),"extraHeight"in d&&t(8,X=d.extraHeight)},n.$$.update=()=>{n.$$.dirty&16384&&g(t(12,i=_(M))),n.$$.dirty&32768&&t(18,l=Math.min(Number(ie),2)),n.$$.dirty&327680&&t(11,r=(650-Number(R)*(l-1))/l),n.$$.dirty&32768&&t(17,s=Math.min(Number(ie),3)),n.$$.dirty&196608&&t(10,a=(841-Number(R)*(s-1))/s)},[w,D,k,y,C,A,G,H,X,Y,a,r,i,o,M,ie,R,s,l]}class Xr extends et{constructor(e){super(),tt(this,e,Vr,pr,$e,{config:0,height:1,width:2,copying:3,printing:4,echartsOptions:5,seriesOptions:6,seriesColors:14,isMap:7,extraHeight:8})}}function Wr(n){let e,t,i="Loading...",l,r,s;return{c(){e=oe("div"),t=oe("span"),t.textContent=i,l=Q(),r=oe("div"),this.h()},l(a){e=fe(a,"DIV",{role:!0,class:!0});var o=be(e);t=fe(o,"SPAN",{class:!0,"data-svelte-h":!0}),qn(t)!=="svelte-1wtojot"&&(t.textContent=i),l=J(o),r=fe(o,"DIV",{class:!0,style:!0}),be(r).forEach(S),o.forEach(S),this.h()},h(){B(t,"class","sr-only"),B(r,"class","bg-base-100 rounded-md max-w-[100%]"),z(r,"height",n[0]),z(r,"margin-top","15px"),z(r,"margin-bottom","31px"),B(e,"role","status"),B(e,"class","animate-pulse")},m(a,o){P(a,e,o),Oe(e,t),Oe(e,l),Oe(e,r)},p(a,[o]){o&1&&z(r,"height",a[0])},i(a){a&&(s||Yn(()=>{s=tr(e,lr,{}),s.start()}))},o:de,d(a){a&&S(e)}}}function Yr(n,e,t){let{height:i="231px"}=e;return n.$$set=l=>{"height"in l&&t(0,i=l.height)},[i]}class xr extends et{constructor(e){super(),tt(this,e,Yr,Wr,$e,{height:0})}}function Tn(n){let e,t,i,l;const r=[Qr,Kr],s=[];function a(o,f){return 1}return e=a(),t=s[e]=r[e](n),{c(){t.c(),i=Me()},l(o){t.l(o),i=Me()},m(o,f){s[e].m(o,f),P(o,i,f),l=!0},p(o,f){t.p(o,f)},i(o){l||(L(t),l=!0)},o(o){E(t),l=!1},d(o){o&&S(i),s[e].d(o)}}}function Kr(n){let e,t,i,l;return{c(){e=oe("div"),this.h()},l(r){e=fe(r,"DIV",{class:!0,style:!0}),be(e).forEach(S),this.h()},h(){B(e,"class","chart svelte-19r8f8"),z(e,"height",n[3]),z(e,"width",n[4]),z(e,"margin-left","0"),z(e,"margin-top","15px"),z(e,"margin-bottom","10px"),z(e,"overflow","visible"),z(e,"display",n[14]?"none":"inherit")},m(r,s){P(r,e,s),i||(l=ht(t=qr.call(null,e,{config:n[0],...n[24],echartsOptions:n[9],seriesOptions:n[10],dispatch:n[23],renderer:n[6],connectGroup:n[12],seriesColors:n[18],theme:n[19]})),i=!0)},p(r,s){s[0]&8&&z(e,"height",r[3]),s[0]&16&&z(e,"width",r[4]),s[0]&16384&&z(e,"display",r[14]?"none":"inherit"),t&>(t.update)&&s[0]&17569345&&t.update.call(null,{config:r[0],...r[24],echartsOptions:r[9],seriesOptions:r[10],dispatch:r[23],renderer:r[6],connectGroup:r[12],seriesColors:r[18],theme:r[19]})},i:de,o:de,d(r){r&&S(e),i=!1,l()}}}function Qr(n){let e,t;return e=new xr({props:{height:n[3]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&8&&(r.height=i[3]),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function On(n){let e,t,i,l=n[8]&&Mn(n),r=n[5]&&n[7]&&Ln(n);return{c(){e=oe("div"),l&&l.c(),t=Q(),r&&r.c(),this.h()},l(s){e=fe(s,"DIV",{class:!0});var a=be(e);l&&l.l(a),t=J(a),r&&r.l(a),a.forEach(S),this.h()},h(){B(e,"class","chart-footer svelte-19r8f8")},m(s,a){P(s,e,a),l&&l.m(e,null),Oe(e,t),r&&r.m(e,null),i=!0},p(s,a){s[8]?l?(l.p(s,a),a[0]&256&&L(l,1)):(l=Mn(s),l.c(),L(l,1),l.m(e,t)):l&&(Re(),E(l,1,1,()=>{l=null}),He()),s[5]&&s[7]?r?(r.p(s,a),a[0]&160&&L(r,1)):(r=Ln(s),r.c(),L(r,1),r.m(e,null)):r&&(Re(),E(r,1,1,()=>{r=null}),He())},i(s){i||(L(l),L(r),i=!0)},o(s){E(l),E(r),i=!1},d(s){s&&S(e),l&&l.d(),r&&r.d()}}}function Mn(n){let e,t;return e=new Hn({props:{text:"Save Image",class:"download-button",downloadData:n[31],display:n[16],queryID:n[1],$$slots:{default:[Jr]},$$scope:{ctx:n}}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&8192&&(r.downloadData=i[31]),l[0]&65536&&(r.display=i[16]),l[0]&2&&(r.queryID=i[1]),l[1]&16&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Jr(n){let e,t,i,l;return{c(){e=ci("svg"),t=ci("rect"),i=ci("circle"),l=ci("path"),this.h()},l(r){e=mi(r,"svg",{xmlns:!0,width:!0,height:!0,viewBox:!0,fill:!0,stroke:!0,"stroke-width":!0,"stroke-linecap":!0,"stroke-linejoin":!0});var s=be(e);t=mi(s,"rect",{x:!0,y:!0,width:!0,height:!0,rx:!0}),be(t).forEach(S),i=mi(s,"circle",{cx:!0,cy:!0,r:!0}),be(i).forEach(S),l=mi(s,"path",{d:!0}),be(l).forEach(S),s.forEach(S),this.h()},h(){B(t,"x","3"),B(t,"y","3"),B(t,"width","18"),B(t,"height","18"),B(t,"rx","2"),B(i,"cx","8.5"),B(i,"cy","8.5"),B(i,"r","1.5"),B(l,"d","M20.4 14.5L16 10 4 20"),B(e,"xmlns","http://www.w3.org/2000/svg"),B(e,"width","12"),B(e,"height","12"),B(e,"viewBox","0 0 24 24"),B(e,"fill","none"),B(e,"stroke","#000"),B(e,"stroke-width","2"),B(e,"stroke-linecap","round"),B(e,"stroke-linejoin","round")},m(r,s){P(r,e,s),Oe(e,t),Oe(e,i),Oe(e,l)},p:de,d(r){r&&S(e)}}}function Ln(n){let e,t;return e=new Hn({props:{text:"Download Data",data:n[5],queryID:n[1],class:"download-button",display:n[16]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&32&&(r.data=i[5]),l[0]&2&&(r.queryID=i[1]),l[0]&65536&&(r.display=i[16]),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Dn(n){let e,t;return e=new sr({props:{source:JSON.stringify(n[0],void 0,3),copyToClipboard:!0,$$slots:{default:[Zr]},$$scope:{ctx:n}}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&1&&(r.source=JSON.stringify(i[0],void 0,3)),l[0]&1|l[1]&16&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Zr(n){let e=JSON.stringify(n[0],void 0,3)+"",t;return{c(){t=Bn(e)},l(i){t=Nn(i,e)},m(i,l){P(i,t,l)},p(i,l){l[0]&1&&e!==(e=JSON.stringify(i[0],void 0,3)+"")&&Kn(t,e)},d(i){i&&S(t)}}}function Fn(n){let e,t,i,l;return{c(){e=oe("div"),this.h()},l(r){e=fe(r,"DIV",{class:!0,style:!0}),be(e).forEach(S),this.h()},h(){B(e,"class","chart svelte-19r8f8"),z(e,"display","none"),z(e,"visibility","visible"),z(e,"height",n[3]),z(e,"width","666px"),z(e,"margin-left","0"),z(e,"margin-top","15px"),z(e,"margin-bottom","15px"),z(e,"overflow","visible")},m(r,s){P(r,e,s),i||(l=ht(t=Br.call(null,e,{config:n[0],...n[24],echartsOptions:n[9],seriesOptions:n[10],seriesColors:n[18],queryID:n[1],evidenceChartTitle:n[2],theme:n[19],backgroundColor:n[20].colors["base-100"]})),i=!0)},p(r,s){s[0]&8&&z(e,"height",r[3]),t&>(t.update)&&s[0]&18613767&&t.update.call(null,{config:r[0],...r[24],echartsOptions:r[9],seriesOptions:r[10],seriesColors:r[18],queryID:r[1],evidenceChartTitle:r[2],theme:r[19],backgroundColor:r[20].colors["base-100"]})},d(r){r&&S(e),i=!1,l()}}}function vr(n){let e,t,i,l,r,s,a,o,f,g,_=!n[15]&&Tn(n);i=new Xr({props:{config:n[0],height:n[3],width:n[4],copying:n[14],printing:n[15],echartsOptions:n[9],seriesOptions:n[10],seriesColors:n[17]}});let w=(n[7]||n[8])&&On(n),D=n[11]&&!n[15]&&Dn(n),k=n[13]&&Fn(n);return{c(){e=oe("div"),_&&_.c(),t=Q(),v(i.$$.fragment),l=Q(),w&&w.c(),r=Q(),D&&D.c(),s=Q(),k&&k.c(),a=Me(),this.h()},l(y){e=fe(y,"DIV",{role:!0,class:!0});var C=be(e);_&&_.l(C),t=J(C),$(i.$$.fragment,C),l=J(C),w&&w.l(C),r=J(C),D&&D.l(C),C.forEach(S),s=J(y),k&&k.l(y),a=Me(),this.h()},h(){B(e,"role","none"),B(e,"class","chart-container svelte-19r8f8")},m(y,C){P(y,e,C),_&&_.m(e,null),Oe(e,t),ee(i,e,null),Oe(e,l),w&&w.m(e,null),Oe(e,r),D&&D.m(e,null),P(y,s,C),k&&k.m(y,C),P(y,a,C),o=!0,f||(g=[ct(window,"copy",n[26]),ct(window,"beforeprint",n[27]),ct(window,"afterprint",n[28]),ct(window,"export-beforeprint",n[29]),ct(window,"export-afterprint",n[30]),ct(e,"mouseenter",n[32]),ct(e,"mouseleave",n[33])],f=!0)},p(y,C){y[15]?_&&(Re(),E(_,1,1,()=>{_=null}),He()):_?(_.p(y,C),C[0]&32768&&L(_,1)):(_=Tn(y),_.c(),L(_,1),_.m(e,t));const A={};C[0]&1&&(A.config=y[0]),C[0]&8&&(A.height=y[3]),C[0]&16&&(A.width=y[4]),C[0]&16384&&(A.copying=y[14]),C[0]&32768&&(A.printing=y[15]),C[0]&512&&(A.echartsOptions=y[9]),C[0]&1024&&(A.seriesOptions=y[10]),C[0]&131072&&(A.seriesColors=y[17]),i.$set(A),y[7]||y[8]?w?(w.p(y,C),C[0]&384&&L(w,1)):(w=On(y),w.c(),L(w,1),w.m(e,r)):w&&(Re(),E(w,1,1,()=>{w=null}),He()),y[11]&&!y[15]?D?(D.p(y,C),C[0]&34816&&L(D,1)):(D=Dn(y),D.c(),L(D,1),D.m(e,null)):D&&(Re(),E(D,1,1,()=>{D=null}),He()),y[13]?k?k.p(y,C):(k=Fn(y),k.c(),k.m(a.parentNode,a)):k&&(k.d(1),k=null)},i(y){o||(L(_),L(i.$$.fragment,y),L(w),L(D),o=!0)},o(y){E(_),E(i.$$.fragment,y),E(w),E(D),o=!1},d(y){y&&(S(e),S(s),S(a)),_&&_.d(),te(i),w&&w.d(),D&&D.d(),k&&k.d(y),f=!1,$i(g)}}}function $r(n,e,t){let i;const l=["config","queryID","evidenceChartTitle","height","width","data","renderer","downloadableData","downloadableImage","echartsOptions","seriesOptions","printEchartsConfig","seriesColors","connectGroup"];let r=dn(e,l),s,a=de,o=()=>(a(),a=yt(i,h=>t(18,s=h)),i),f,g;n.$$.on_destroy.push(()=>a());const{activeAppearance:_,theme:w,resolveColorsObject:D}=$t();_t(n,_,h=>t(19,f=h)),_t(n,w,h=>t(20,g=h));let{config:k=void 0}=e,{queryID:y=void 0}=e,{evidenceChartTitle:C=void 0}=e,{height:A="291px"}=e,{width:G="100%"}=e,{data:M}=e,{renderer:H=void 0}=e,{downloadableData:X=void 0}=e,{downloadableImage:Y=void 0}=e,{echartsOptions:ie=void 0}=e,{seriesOptions:R=void 0}=e,{printEchartsConfig:N}=e,{seriesColors:d=void 0}=e,{connectGroup:j=void 0}=e;const O=xn();let T=!1,F=!1,x=!1,K=!1;const ae=()=>{t(14,F=!0),Qn(),setTimeout(()=>{t(14,F=!1)},0)},le=()=>t(15,x=!0),U=()=>t(15,x=!1),p=()=>t(15,x=!0),V=()=>t(15,x=!1),I=()=>{t(13,T=!0),setTimeout(()=>{t(13,T=!1)},0)},W=()=>t(16,K=!0),u=()=>t(16,K=!1);return n.$$set=h=>{e=Qt(Qt({},e),Zi(h)),t(24,r=dn(e,l)),"config"in h&&t(0,k=h.config),"queryID"in h&&t(1,y=h.queryID),"evidenceChartTitle"in h&&t(2,C=h.evidenceChartTitle),"height"in h&&t(3,A=h.height),"width"in h&&t(4,G=h.width),"data"in h&&t(5,M=h.data),"renderer"in h&&t(6,H=h.renderer),"downloadableData"in h&&t(7,X=h.downloadableData),"downloadableImage"in h&&t(8,Y=h.downloadableImage),"echartsOptions"in h&&t(9,ie=h.echartsOptions),"seriesOptions"in h&&t(10,R=h.seriesOptions),"printEchartsConfig"in h&&t(11,N=h.printEchartsConfig),"seriesColors"in h&&t(25,d=h.seriesColors),"connectGroup"in h&&t(12,j=h.connectGroup)},n.$$.update=()=>{n.$$.dirty[0]&33554432&&o(t(17,i=D(d)))},[k,y,C,A,G,M,H,X,Y,ie,R,N,j,T,F,x,K,i,s,f,g,_,w,O,r,d,ae,le,U,p,V,I,W,u]}class el extends et{constructor(e){super(),tt(this,e,$r,vr,$e,{config:0,queryID:1,evidenceChartTitle:2,height:3,width:4,data:5,renderer:6,downloadableData:7,downloadableImage:8,echartsOptions:9,seriesOptions:10,printEchartsConfig:11,seriesColors:25,connectGroup:12},null,[-1,-1])}}function vt(n,e){const t=new Set(n.map(i=>i[e]));return Array.from(t)}function tl(n,e){return Gt(n,ar({count:or(e)}))[0].count}function il(n,e,t){let i;if(typeof t!="object")i=Gt(n,yn(e,kn({xTotal:hn(t)})),xi({percentOfX:An(t,"xTotal")}),wn({percentOfX:t+"_pct"}));else{i=Gt(n,xi({valueSum:0}));for(let l=0;l(i[e]{s[g]=null}),He(),t=s[e],t?t.p(o,f):(t=s[e]=r[e](o),t.c()),L(t,1),t.m(i.parentNode,i))},i(o){l||(L(t),l=!0)},o(o){E(t),l=!1},d(o){o&&S(i),s[e].d(o)}}}function sl(n,e,t){let i,l,r,s,a,o=de,f=()=>(o(),o=yt(r,m=>t(127,a=m)),r),g,_,w=de,D=()=>(w(),w=yt(l,m=>t(129,_=m)),l),k,y=de,C=()=>(y(),y=yt(i,m=>t(130,k=m)),i),A;n.$$.on_destroy.push(()=>o()),n.$$.on_destroy.push(()=>w()),n.$$.on_destroy.push(()=>y());let{$$slots:G={},$$scope:M}=e,H=vi({}),X=vi({});_t(n,X,m=>t(20,A=m));const{theme:Y,resolveColor:ie,resolveColorsObject:R,resolveColorPalette:N}=$t();_t(n,Y,m=>t(128,g=m));let{data:d=void 0}=e,{queryID:j=void 0}=e,{x:O=void 0}=e,{y:T=void 0}=e,{y2:F=void 0}=e,{series:x=void 0}=e,{size:K=void 0}=e,{tooltipTitle:ae=void 0}=e,{showAllXAxisLabels:le=!1}=e,{printEchartsConfig:U=!1}=e,p=!!T,V=!!O,{swapXY:I=!1}=e,{title:W=void 0}=e,{subtitle:u=void 0}=e,{chartType:h="Chart"}=e,{bubble:Z=!1}=e,{hist:ue=!1}=e,{boxplot:Le=!1}=e,ce,{xType:se=void 0}=e,{xAxisTitle:me="false"}=e,{xBaseline:ge=!0}=e,{xTickMarks:ye=!1}=e,{xGridlines:we=!1}=e,{xAxisLabels:ke=!0}=e,{sort:Se=!0}=e,{xFmt:Fe=void 0}=e,{xMin:je=void 0}=e,{xMax:ze=void 0}=e,{yLog:he=!1}=e,{yType:Pe=he===!0?"log":"value"}=e,{yLogBase:Ge=10}=e,{yAxisTitle:_e="false"}=e,{yBaseline:Ie=!1}=e,{yTickMarks:Ee=!1}=e,{yGridlines:De=!0}=e,{yAxisLabels:b=!0}=e,{yMin:Ae=void 0}=e,{yMax:lt=void 0}=e,{yScale:qe=!1}=e,{yFmt:it=void 0}=e,{yAxisColor:bt="true"}=e,{y2AxisTitle:Be="false"}=e,{y2Baseline:xe=!1}=e,{y2TickMarks:Ue=!1}=e,{y2Gridlines:pe=!0}=e,{y2AxisLabels:Ke=!0}=e,{y2Min:st=void 0}=e,{y2Max:wt=void 0}=e,{y2Scale:Qe=!1}=e,{y2Fmt:nt=void 0}=e,{y2AxisColor:kt="true"}=e,{sizeFmt:at=void 0}=e,{colorPalette:Ct="default"}=e,{legend:Te=void 0}=e,{echartsOptions:Bt=void 0}=e,{seriesOptions:Nt=void 0}=e,{seriesColors:St=void 0}=e,{stackType:c=void 0}=e,{stacked100:Rt=!1}=e,{chartAreaHeight:Ve}=e,{renderer:nn=void 0}=e,{downloadableData:Ht=!0}=e,{downloadableImage:Ut=!0}=e,{connectGroup:rn=void 0}=e,re,ti,ii=[],At=[],Si,pt,Xe,Ai,We,Ce,Je,ni,Ti,Vt,ri,Oi,li,Tt,Mi,Li,Xt,Ot,Di,Fi,zi,Ii,Ei,ji,Pi,Gi,qi,Bi,Ni,Mt,Wt,Yt,si,ai,Ri,Hi,Lt,Ui,pi,oi,ln,Vi,ot=[],Dt=!0,Ze=[],xt=[],Ne,fi,Xi,ft;return n.$$set=m=>{"data"in m&&t(0,d=m.data),"queryID"in m&&t(5,j=m.queryID),"x"in m&&t(23,O=m.x),"y"in m&&t(24,T=m.y),"y2"in m&&t(47,F=m.y2),"series"in m&&t(48,x=m.series),"size"in m&&t(49,K=m.size),"tooltipTitle"in m&&t(50,ae=m.tooltipTitle),"showAllXAxisLabels"in m&&t(6,le=m.showAllXAxisLabels),"printEchartsConfig"in m&&t(1,U=m.printEchartsConfig),"swapXY"in m&&t(2,I=m.swapXY),"title"in m&&t(7,W=m.title),"subtitle"in m&&t(51,u=m.subtitle),"chartType"in m&&t(8,h=m.chartType),"bubble"in m&&t(52,Z=m.bubble),"hist"in m&&t(53,ue=m.hist),"boxplot"in m&&t(54,Le=m.boxplot),"xType"in m&&t(25,se=m.xType),"xAxisTitle"in m&&t(26,me=m.xAxisTitle),"xBaseline"in m&&t(27,ge=m.xBaseline),"xTickMarks"in m&&t(28,ye=m.xTickMarks),"xGridlines"in m&&t(29,we=m.xGridlines),"xAxisLabels"in m&&t(30,ke=m.xAxisLabels),"sort"in m&&t(31,Se=m.sort),"xFmt"in m&&t(55,Fe=m.xFmt),"xMin"in m&&t(56,je=m.xMin),"xMax"in m&&t(57,ze=m.xMax),"yLog"in m&&t(32,he=m.yLog),"yType"in m&&t(58,Pe=m.yType),"yLogBase"in m&&t(59,Ge=m.yLogBase),"yAxisTitle"in m&&t(33,_e=m.yAxisTitle),"yBaseline"in m&&t(34,Ie=m.yBaseline),"yTickMarks"in m&&t(35,Ee=m.yTickMarks),"yGridlines"in m&&t(36,De=m.yGridlines),"yAxisLabels"in m&&t(37,b=m.yAxisLabels),"yMin"in m&&t(60,Ae=m.yMin),"yMax"in m&&t(61,lt=m.yMax),"yScale"in m&&t(38,qe=m.yScale),"yFmt"in m&&t(62,it=m.yFmt),"yAxisColor"in m&&t(63,bt=m.yAxisColor),"y2AxisTitle"in m&&t(39,Be=m.y2AxisTitle),"y2Baseline"in m&&t(40,xe=m.y2Baseline),"y2TickMarks"in m&&t(41,Ue=m.y2TickMarks),"y2Gridlines"in m&&t(42,pe=m.y2Gridlines),"y2AxisLabels"in m&&t(43,Ke=m.y2AxisLabels),"y2Min"in m&&t(64,st=m.y2Min),"y2Max"in m&&t(65,wt=m.y2Max),"y2Scale"in m&&t(44,Qe=m.y2Scale),"y2Fmt"in m&&t(66,nt=m.y2Fmt),"y2AxisColor"in m&&t(67,kt=m.y2AxisColor),"sizeFmt"in m&&t(68,at=m.sizeFmt),"colorPalette"in m&&t(69,Ct=m.colorPalette),"legend"in m&&t(45,Te=m.legend),"echartsOptions"in m&&t(9,Bt=m.echartsOptions),"seriesOptions"in m&&t(10,Nt=m.seriesOptions),"seriesColors"in m&&t(70,St=m.seriesColors),"stackType"in m&&t(71,c=m.stackType),"stacked100"in m&&t(72,Rt=m.stacked100),"chartAreaHeight"in m&&t(46,Ve=m.chartAreaHeight),"renderer"in m&&t(11,nn=m.renderer),"downloadableData"in m&&t(3,Ht=m.downloadableData),"downloadableImage"in m&&t(4,Ut=m.downloadableImage),"connectGroup"in m&&t(12,rn=m.connectGroup),"$$scope"in m&&t(131,M=m.$$scope)},n.$$.update=()=>{var m,sn,an,on,fn,un;if(n.$$.dirty[0]&2&&t(1,U=U==="true"||U===!0),n.$$.dirty[0]&4&&(I==="true"||I===!0?t(2,I=!0):t(2,I=!1)),n.$$.dirty[0]&134217728&&t(27,ge=ge==="true"||ge===!0),n.$$.dirty[0]&268435456&&t(28,ye=ye==="true"||ye===!0),n.$$.dirty[0]&536870912&&t(29,we=we==="true"||we===!0),n.$$.dirty[0]&1073741824&&t(30,ke=ke==="true"||ke===!0),n.$$.dirty[1]&1&&t(31,Se=Se==="true"||Se===!0),n.$$.dirty[1]&2&&t(32,he=he==="true"||he===!0),n.$$.dirty[1]&8&&t(34,Ie=Ie==="true"||Ie===!0),n.$$.dirty[1]&16&&t(35,Ee=Ee==="true"||Ee===!0),n.$$.dirty[1]&32&&t(36,De=De==="true"||De===!0),n.$$.dirty[1]&64&&t(37,b=b==="true"||b===!0),n.$$.dirty[1]&128&&t(38,qe=qe==="true"||qe===!0),n.$$.dirty[2]&2&&C(t(19,i=ie(bt))),n.$$.dirty[1]&512&&t(40,xe=xe==="true"||xe===!0),n.$$.dirty[1]&1024&&t(41,Ue=Ue==="true"||Ue===!0),n.$$.dirty[1]&2048&&t(42,pe=pe==="true"||pe===!0),n.$$.dirty[1]&4096&&t(43,Ke=Ke==="true"||Ke===!0),n.$$.dirty[1]&8192&&t(44,Qe=Qe==="true"||Qe===!0),n.$$.dirty[2]&32&&D(t(18,l=ie(kt))),n.$$.dirty[2]&128&&f(t(17,r=N(Ct))),n.$$.dirty[2]&256&&t(16,s=R(St)),n.$$.dirty[0]&8&&t(3,Ht=Ht==="true"||Ht===!0),n.$$.dirty[0]&16&&t(4,Ut=Ut==="true"||Ut===!0),n.$$.dirty[0]&2139120005|n.$$.dirty[1]&2147483647|n.$$.dirty[2]&2147483229|n.$$.dirty[3]&2147483647|n.$$.dirty[4]&127)try{if(t(14,fi=void 0),t(120,ot=[]),t(79,At=[]),t(122,Ze=[]),t(123,xt=[]),t(81,pt=[]),t(73,p=!!T),t(74,V=!!O),gn(d),t(76,re=Ki(d)),t(77,ti=Object.keys(re)),V||t(23,O=ti[0]),!p){t(78,ii=ti.filter(function(q){return![O,x,K].includes(q)}));for(let q=0;q1?At:At[0])}Z?t(75,ce={x:O,y:T,size:K}):ue?t(75,ce={x:O}):Le?t(75,ce={}):t(75,ce={x:O,y:T});for(let q in ce)ce[q]==null&&ot.push(q);if(ot.length===1)throw Error(new Intl.ListFormat().format(ot)+" is required");if(ot.length>1)throw Error(new Intl.ListFormat().format(ot)+" are required");if(Rt===!0&&T.includes("_pct")&&Dt===!1)if(typeof T=="object"){for(let q=0;qq.type==="date")),t(126,ft=ft.map(q=>q.id)),ft.length>0)for(let q=0;q1),Rt===!0&&he===!0)throw Error("Log axis cannot be used in a 100% stacked chart");if(c==="stacked"&&Yi>1&&he===!0)throw Error("Log axis cannot be used in a stacked chart");let zt;if(typeof T=="object"){zt=re[T[0]].columnUnitSummary.min;for(let q=0;q({...q,data:d,x:O,y:T,y2:F,series:x,swapXY:I,sort:Se,xType:se,xFormat:We,yFormat:Ce,y2Format:Je,sizeFormat:ni,xMismatch:Ai,size:K,yMin:Ae,y2Min:st,columnSummary:re,xAxisTitle:me,yAxisTitle:_e,y2AxisTitle:Be,tooltipTitle:ae,chartAreaHeight:Ve,chartType:h,yCount:Ft,y2Count:Wi})),t(91,Oi=vt(d,O));let mn;if(I?t(92,li={type:Pe,logBase:Ge,position:"top",axisLabel:{show:b,hideOverlap:!0,showMaxLabel:!0,formatter(q){return di(q,Ce,Vt)},margin:4},min:Ae,max:lt,scale:qe,splitLine:{show:De},axisLine:{show:Ie,onZero:!1},axisTick:{show:Ee},boundaryGap:!1,z:2}):t(92,li={type:se,min:je,max:ze,splitLine:{show:we},axisLine:{show:ge},axisTick:{show:ye},axisLabel:{show:ke,hideOverlap:!0,showMaxLabel:se==="category"||se==="value",formatter:se==="time"||se==="category"?!1:function(q){return di(q,We,Ti)},margin:6},scale:!0,z:2}),I?t(93,Tt={type:se,inverse:"true",splitLine:{show:we},axisLine:{show:ge},axisTick:{show:ye},axisLabel:{show:ke,hideOverlap:!0},scale:!0,min:je,max:ze,z:2}):(t(93,Tt={type:Pe,logBase:Ge,splitLine:{show:De},axisLine:{show:Ie,onZero:!1},axisTick:{show:Ee},axisLabel:{show:b,hideOverlap:!0,margin:4,formatter(q){return di(q,Ce,Vt)},color:F?k==="true"?a[0]:k!=="false"?k:void 0:void 0},name:_e,nameLocation:"end",nameTextStyle:{align:"left",verticalAlign:"top",padding:[0,5,0,0],color:F?k==="true"?a[0]:k!=="false"?k:void 0:void 0},nameGap:6,min:Ae,max:lt,scale:qe,boundaryGap:["0%","1%"],z:2}),mn={type:"value",show:!1,alignTicks:!0,splitLine:{show:pe},axisLine:{show:xe,onZero:!1},axisTick:{show:Ue},axisLabel:{show:Ke,hideOverlap:!0,margin:4,formatter(q){return di(q,Je,ri)},color:_==="true"?a[Kt]:_!=="false"?_:void 0},name:Be,nameLocation:"end",nameTextStyle:{align:"right",verticalAlign:"top",padding:[0,0,0,5],color:_==="true"?a[Kt]:_!=="false"?_:void 0},nameGap:6,min:st,max:wt,scale:Qe,boundaryGap:["0%","1%"],z:2},t(93,Tt=[Tt,mn])),Ve){if(t(46,Ve=Number(Ve)),isNaN(Ve))throw Error("chartAreaHeight must be a number");if(Ve<=0)throw Error("chartAreaHeight must be a positive number")}else t(46,Ve=180);t(96,Xt=!!W),t(97,Ot=!!u),t(98,Di=Te*(x!==null||typeof T=="object"&&T.length>1)),t(99,Fi=_e!==""&&I),t(100,zi=me!==""&&!I),t(101,Ii=15),t(102,Ei=13),t(103,ji=6*Ot),t(104,Pi=Xt*Ii+Ot*Ei+ji*Math.max(Xt,Ot)),t(105,Gi=10),t(106,qi=8),t(107,Bi=14),t(108,Ni=14),t(109,Mt=15),t(109,Mt=Mt*Di),t(110,Wt=7),t(110,Wt=Wt*Math.max(Xt,Ot)),t(111,Yt=Pi+Wt),t(112,si=Yt+Mt+Ni*Fi+Gi),t(113,ai=zi*Bi+qi),t(117,Ui=8),t(119,oi=1),I&&(t(118,pi=Oi.length),t(119,oi=Math.max(1,pi/Ui))),t(114,Ri=Ve*oi+si+ai),t(115,Hi=Yt+Mt+7),t(15,ln=Ri+"px"),t(13,Vi="100%"),t(116,Lt=I?_e:me),Lt!==""&&t(116,Lt=Lt+" →"),t(94,Mi={id:"horiz-axis-title",type:"text",style:{text:Lt,textAlign:"right",fill:g.colors["base-content-muted"]},cursor:"auto",right:I?"2%":"3%",top:I?Hi:null,bottom:I?null:"2%"}),t(95,Li={title:{text:W,subtext:u,subtextStyle:{width:Vi}},tooltip:{trigger:"axis",formatter(q){let It,Et,jt,ui;if(Yi>1){Et=q[0].value[I?1:0],It=`${dt(Et,We)}`;for(let ut=q.length-1;ut>=0;ut--)q[ut].seriesName!=="stackTotal"&&(jt=q[ut].value[I?0:1],It=It+`
${q[ut].marker} ${q[ut].seriesName}${dt(jt,Xn(q[ut].componentIndex,Ft,Wi)===0?Ce:Je)}`)}else se==="value"?(Et=q[0].value[I?1:0],jt=q[0].value[I?0:1],ui=q[0].seriesName,It=`${mt(O,We)}: ${dt(Et,We)}
${mt(ui,Ce)}: ${dt(jt,Ce)}`):(Et=q[0].value[I?1:0],jt=q[0].value[I?0:1],ui=q[0].seriesName,It=`${dt(Et,We)}
${mt(ui,Ce)}: ${dt(jt,Ce)}`);return It},confine:!0,axisPointer:{type:"shadow"},extraCssText:'box-shadow: 0 3px 6px rgba(0,0,0,.15); box-shadow: 0 2px 4px rgba(0,0,0,.12); z-index: 1; font-feature-settings: "cv02", "tnum";',order:"valueDesc"},legend:{show:Te,type:"scroll",top:Yt,padding:[0,0,0,0],data:[]},grid:{left:"0.5%",right:I?"4%":"3%",bottom:ai,top:si,containLabel:!0},xAxis:li,yAxis:Tt,series:[],animation:!0,graphic:Mi,color:a}),X.update(()=>Li)}catch(Ft){t(14,fi=Ft.message),console.error("\x1B[31m%s\x1B[0m",`Error in ${h}: ${Ft.message}`),H.update(Kt=>({...Kt,error:fi}))}n.$$.dirty[0]&1},_i(Un,H),_i(pn,X),[d,U,I,Ht,Ut,j,le,W,h,Bt,Nt,nn,rn,Vi,fi,ln,s,r,l,i,A,X,Y,O,T,se,me,ge,ye,we,ke,Se,he,_e,Ie,Ee,De,b,qe,Be,xe,Ue,pe,Ke,Qe,Te,Ve,F,x,K,ae,u,Z,ue,Le,Fe,je,ze,Pe,Ge,Ae,lt,it,bt,st,wt,nt,kt,at,Ct,St,c,Rt,p,V,ce,re,ti,ii,At,Si,pt,Xe,Ai,We,Ce,Je,ni,Ti,Vt,ri,Oi,li,Tt,Mi,Li,Xt,Ot,Di,Fi,zi,Ii,Ei,ji,Pi,Gi,qi,Bi,Ni,Mt,Wt,Yt,si,ai,Ri,Hi,Lt,Ui,pi,oi,ot,Dt,Ze,xt,Ne,Xi,ft,a,g,_,k,M,G]}class al extends et{constructor(e){super(),tt(this,e,sl,ll,$e,{data:0,queryID:5,x:23,y:24,y2:47,series:48,size:49,tooltipTitle:50,showAllXAxisLabels:6,printEchartsConfig:1,swapXY:2,title:7,subtitle:51,chartType:8,bubble:52,hist:53,boxplot:54,xType:25,xAxisTitle:26,xBaseline:27,xTickMarks:28,xGridlines:29,xAxisLabels:30,sort:31,xFmt:55,xMin:56,xMax:57,yLog:32,yType:58,yLogBase:59,yAxisTitle:33,yBaseline:34,yTickMarks:35,yGridlines:36,yAxisLabels:37,yMin:60,yMax:61,yScale:38,yFmt:62,yAxisColor:63,y2AxisTitle:39,y2Baseline:40,y2TickMarks:41,y2Gridlines:42,y2AxisLabels:43,y2Min:64,y2Max:65,y2Scale:44,y2Fmt:66,y2AxisColor:67,sizeFmt:68,colorPalette:69,legend:45,echartsOptions:9,seriesOptions:10,seriesColors:70,stackType:71,stacked100:72,chartAreaHeight:46,renderer:11,downloadableData:3,downloadableImage:4,connectGroup:12},null,[-1,-1,-1,-1,-1])}}function ol(n){let e;const t=n[6].default,i=bi(t,n,n[7],null);return{c(){i&&i.c()},l(l){i&&i.l(l)},m(l,r){i&&i.m(l,r),e=!0},p(l,r){i&&i.p&&(!e||r&128)&&wi(i,t,l,l[7],e?Ci(t,l[7],r,null):ki(l[7]),null)},i(l){e||(L(i,l),e=!0)},o(l){E(i,l),e=!1},d(l){i&&i.d(l)}}}function fl(n){let e,t;const i=[n[4],{data:rt.isQuery(n[10])?Array.from(n[10]):n[10]},{queryID:n[5]}];let l={$$slots:{default:[ol]},$$scope:{ctx:n}};for(let r=0;r({10:i}),({loaded:i})=>i?1024:0],empty:[ul],default:[fl,({loaded:i})=>({10:i}),({loaded:i})=>i?1024:0]},$$scope:{ctx:n}}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,[l]){const r={};l&1&&(r.data=i[0]),l&1182&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function dl(n,e,t){let i,{$$slots:l={},$$scope:r}=e,{data:s}=e;const a=rt.isQuery(s)?s.hash:void 0;let o=(s==null?void 0:s.hash)===a,{emptySet:f=void 0}=e,{emptyMessage:g=void 0}=e,_=s==null?void 0:s.id;return n.$$set=w=>{t(9,e=Qt(Qt({},e),Zi(w))),"data"in w&&t(0,s=w.data),"emptySet"in w&&t(1,f=w.emptySet),"emptyMessage"in w&&t(2,g=w.emptyMessage),"$$scope"in w&&t(7,r=w.$$scope)},n.$$.update=()=>{n.$$.dirty&1&&t(3,o=(s==null?void 0:s.hash)===a),t(4,i={...Object.fromEntries(Object.entries(e).filter(([,w])=>w!==void 0))})},e=Zi(e),[s,f,g,o,i,_,l,r]}class yl extends et{constructor(e){super(),tt(this,e,dl,ml,$e,{data:0,emptySet:1,emptyMessage:2})}}function hl(n,e,t,i,l,r,s,a,o,f,g=void 0,_=void 0,w=void 0,D=void 0){function k(d,j,O,T){let F={name:j,data:d,yAxisIndex:O};return F={...T,...F},F}let y,C,A,G=[],M,H,X,Y,ie;function R(d,j){const O=[];function T(x){return typeof x>"u"}function F(x,K){T(x)||(Array.isArray(x)?x.forEach(ae=>O.push([ae,K])):O.push([x,K]))}return F(d,0),F(j,1),O}let N=R(t,w);if(i!=null&&N.length===1)for(Y=vt(n,i),y=0;yd[i]===Y[y]),l?M=H.map(d=>[d[N[0][0]],a?d[e].toString():d[e]]):M=H.map(d=>[a?d[e].toString():d[e],d[N[0][0]]]),g){let d=H.map(j=>j[g]);M.forEach((j,O)=>j.push(d[O]))}if(_){let d=H.map(j=>j[_]);M.forEach((j,O)=>j.push(d[O]))}X=Y[y]??"null",ie=N[0][1],A=k(M,X,ie,r),G.push(A)}if(i!=null&&N.length>1)for(Y=vt(n,i),y=0;yd[i]===Y[y]),C=0;C[d[N[C][0]],a?d[e].toString():d[e]]):M=H.map(d=>[a?d[e].toString():d[e],d[N[C][0]]]),g){let d=H.map(j=>j[g]);M.forEach((j,O)=>j.push(d[O]))}if(_){let d=H.map(j=>j[_]);M.forEach((j,O)=>j.push(d[O]))}X=(Y[y]??"null")+" - "+o[N[C][0]].title,ie=N[C][1],A=k(M,X,ie,r),G.push(A)}if(i==null&&N.length>1)for(y=0;y[d[N[y][0]],a?d[e].toString():d[e]]):M=n.map(d=>[a?d[e].toString():d[e],d[N[y][0]]]),g){let d=n.map(j=>j[g]);M.forEach((j,O)=>j.push(d[O]))}if(_){let d=n.map(j=>j[_]);M.forEach((j,O)=>j.push(d[O]))}X=o[N[y][0]].title,ie=N[y][1],A=k(M,X,ie,r),G.push(A)}if(i==null&&N.length===1){if(l?M=n.map(d=>[d[N[0][0]],a?d[e].toString():d[e]]):M=n.map(d=>[a?d[e].toString():d[e],d[N[0][0]]]),g){let d=n.map(j=>j[g]);M.forEach((j,O)=>j.push(d[O]))}if(_){let d=n.map(j=>j[_]);M.forEach((j,O)=>j.push(d[O]))}X=o[N[0][0]].title,ie=N[0][1],A=k(M,X,ie,r),G.push(A)}return f&&G.sort((d,j)=>f.indexOf(d.name)-f.indexOf(j.name)),D&&G.forEach(d=>{d.name=yr(d.name,D)}),G}function gl(n){let e=[];for(let t=1;t=l&&(t=i=l):(t>l&&(t=l),iWn(t,i))/1e8;return e=Math.round((e+Number.EPSILON)*1e8)/1e8,e}function zn(n,e,t,i,l=!1,r=!1){var D;let s=!1;const a=n.map(k=>Object.assign({},k,{[e]:k[e]instanceof Date?(s=!0,k[e].toISOString()):k[e]})).filter(k=>k[e]!==void 0&&k[e]!==null),o=Array.from(a).reduce((k,y)=>(y[e]instanceof Date&&(y[e]=y[e].toISOString(),s=!0),i?(k[y[i]??"null"]||(k[y[i]??"null"]=[]),k[y[i]??"null"].push(y)):(k.default||(k.default=[]),k.default.push(y)),k),{}),f={};let g;const _=((D=a.find(k=>k&&k[e]!==null&&k[e]!==void 0))==null?void 0:D[e])??null;switch(typeof _){case"object":throw _===null?new Error(`Column '${e}' is entirely null. Column must contain at least one non-null value.`):new Error("Unexpected object property, expected string, date, or number");case"number":if(g=vt(a,e),r){const k=wl(g);f[e]=bl(g,k)}break;case"string":g=vt(a,e),f[e]=g;break}const w=[];for(const k of Object.values(o)){const y=i?{[i]:null}:{};if(l)if(t instanceof Array)for(let A=0;A({...k,[e]:new Date(k[e])})):w.flat()}function kl(n,e,t){let i,l,r,s,a,o,f,g,_,w,D,k,y,C,A,G,M=de,H=()=>(M(),M=yt(i,b=>t(44,G=b)),i),X,Y=de,ie=()=>(Y(),Y=yt(l,b=>t(45,X=b)),l),R;n.$$.on_destroy.push(()=>M()),n.$$.on_destroy.push(()=>Y());let N=Ji(Un);_t(n,N,b=>t(46,R=b));let d=Ji(pn);const{resolveColor:j}=$t();let{y:O=void 0}=e;const T=!!O;let{y2:F=void 0}=e;const x=!!F;let{series:K=void 0}=e;const ae=!!K;let{options:le=void 0}=e,{name:U=void 0}=e,{lineColor:p=void 0}=e,{lineWidth:V=2}=e,{lineType:I="solid"}=e,{lineOpacity:W=void 0}=e,{markers:u=!1}=e,{markerShape:h="circle"}=e,{markerSize:Z=8}=e,{labels:ue=!1}=e,{labelSize:Le=11}=e,{labelPosition:ce="top"}=e,{labelColor:se=void 0}=e,{labelFmt:me=void 0}=e,ge;me&&(ge=ve(me));let{yLabelFmt:ye=void 0}=e,we;ye&&(we=ve(ye));let{y2LabelFmt:ke=void 0}=e,Se;ke&&(Se=ve(ke));let{y2SeriesType:Fe=void 0}=e,{showAllLabels:je=!1}=e,{handleMissing:ze="gap"}=e,{step:he=!1}=e,{stepPosition:Pe="end"}=e,{seriesOrder:Ge=void 0}=e,{seriesLabelFmt:_e=void 0}=e;const Ie={above:"top",below:"bottom",middle:"inside"},Ee={above:"right",below:"left",middle:"inside"};let De=a?"right":"top";return Jn(()=>{d.update(b=>{if(a)b.yAxis={...b.yAxis,...A.xAxis},b.xAxis={...b.xAxis,...A.yAxis};else if(b.yAxis[0]={...b.yAxis[0],...A.yAxis},b.xAxis={...b.xAxis,...A.xAxis},F&&(b.yAxis[1]={...b.yAxis[1],show:!0},["line","bar","scatter"].includes(Fe)))for(let Ae=0;Ae<_;Ae++)b.series[g+Ae].type=Fe;return ue&&(b.axisPointer={triggerEmphasis:!1}),b})}),n.$$set=b=>{"y"in b&&t(3,O=b.y),"y2"in b&&t(4,F=b.y2),"series"in b&&t(5,K=b.series),"options"in b&&t(11,le=b.options),"name"in b&&t(6,U=b.name),"lineColor"in b&&t(12,p=b.lineColor),"lineWidth"in b&&t(13,V=b.lineWidth),"lineType"in b&&t(14,I=b.lineType),"lineOpacity"in b&&t(15,W=b.lineOpacity),"markers"in b&&t(7,u=b.markers),"markerShape"in b&&t(16,h=b.markerShape),"markerSize"in b&&t(17,Z=b.markerSize),"labels"in b&&t(8,ue=b.labels),"labelSize"in b&&t(18,Le=b.labelSize),"labelPosition"in b&&t(9,ce=b.labelPosition),"labelColor"in b&&t(19,se=b.labelColor),"labelFmt"in b&&t(20,me=b.labelFmt),"yLabelFmt"in b&&t(21,ye=b.yLabelFmt),"y2LabelFmt"in b&&t(22,ke=b.y2LabelFmt),"y2SeriesType"in b&&t(23,Fe=b.y2SeriesType),"showAllLabels"in b&&t(24,je=b.showAllLabels),"handleMissing"in b&&t(25,ze=b.handleMissing),"step"in b&&t(10,he=b.step),"stepPosition"in b&&t(26,Pe=b.stepPosition),"seriesOrder"in b&&t(27,Ge=b.seriesOrder),"seriesLabelFmt"in b&&t(28,_e=b.seriesLabelFmt)},n.$$.update=()=>{if(n.$$.dirty[0]&4096&&H(t(1,i=j(p))),n.$$.dirty[0]&128&&t(7,u=u==="true"||u===!0),n.$$.dirty[0]&256&&t(8,ue=ue==="true"||ue===!0),n.$$.dirty[0]&524288&&ie(t(0,l=j(se))),n.$$.dirty[0]&1024&&t(10,he=he==="true"||he===!0),n.$$.dirty[1]&32768&&t(41,r=R.data),n.$$.dirty[1]&32768&&t(40,s=R.x),n.$$.dirty[0]&8|n.$$.dirty[1]&32768&&t(3,O=T?O:R.y),n.$$.dirty[0]&16|n.$$.dirty[1]&32768&&t(4,F=x?F:R.y2),n.$$.dirty[1]&32768&&t(34,a=R.swapXY),n.$$.dirty[1]&32768&&t(43,o=R.yFormat),n.$$.dirty[1]&32768&&t(42,f=R.y2Format),n.$$.dirty[1]&32768&&t(32,g=R.yCount),n.$$.dirty[1]&32768&&t(33,_=R.y2Count),n.$$.dirty[1]&32768&&t(35,w=R.xType),n.$$.dirty[1]&32768&&t(38,D=R.xMismatch),n.$$.dirty[1]&32768&&t(37,k=R.columnSummary),n.$$.dirty[0]&32|n.$$.dirty[1]&32768&&t(5,K=ae?K:R.series),n.$$.dirty[0]&104|n.$$.dirty[1]&1600)if(!K&&typeof O!="object")t(6,U=U??mt(O,k[O].title));else try{t(41,r=zn(r,s,O,K))}catch(b){console.warn("Failed to complete data",{e:b}),t(41,r=[])}if(n.$$.dirty[0]&33554472|n.$$.dirty[1]&1536&&ze==="zero")try{t(41,r=zn(r,s,O,K,!0))}catch(b){console.warn("Failed to complete data",{e:b}),t(41,r=[])}n.$$.dirty[0]&512|n.$$.dirty[1]&8&&t(9,ce=(a?Ee[ce]:Ie[ce])??De),n.$$.dirty[0]&1728571264|n.$$.dirty[1]&30735&&t(39,y={type:"line",label:{show:ue,formatter(b){return b.value[a?0:1]===0?"":dt(b.value[a?0:1],[we??ge??o,Se??ge??f][Xn(b.componentIndex,g,_)])},fontSize:Le,color:X,position:ce,padding:3},labelLayout:{hideOverlap:!je},connectNulls:ze==="connect",emphasis:{focus:"series",endLabel:{show:!1},lineStyle:{opacity:1,width:3}},lineStyle:{width:parseInt(V),type:I,opacity:W},itemStyle:{color:G,opacity:W},showSymbol:ue||u,symbol:h,symbolSize:ue&&!u?0:Z,step:he?Pe:!1}),n.$$.dirty[0]&402653304|n.$$.dirty[1]&1992&&t(36,C=hl(r,s,O,K,a,y,U,D,k,Ge,void 0,void 0,F,_e)),n.$$.dirty[1]&32&&d.update(b=>(b.series.push(...C),b.legend.data.push(...C.map(Ae=>Ae.name.toString())),b)),n.$$.dirty[0]&2048&&le&&d.update(b=>({...b,...le})),n.$$.dirty[1]&16&&(A={yAxis:{boundaryGap:["0%","1%"]},xAxis:{boundaryGap:[w==="time"?"2%":"0%","2%"]}})},[l,i,N,O,F,K,U,u,ue,ce,he,le,p,V,I,W,h,Z,Le,se,me,ye,ke,Fe,je,ze,Pe,Ge,_e,ge,we,Se,g,_,a,w,C,k,D,y,s,r,f,o,G,X,R]}class Cl extends et{constructor(e){super(),tt(this,e,kl,null,$e,{y:3,y2:4,series:5,options:11,name:6,lineColor:12,lineWidth:13,lineType:14,lineOpacity:15,markers:7,markerShape:16,markerSize:17,labels:8,labelSize:18,labelPosition:9,labelColor:19,labelFmt:20,yLabelFmt:21,y2LabelFmt:22,y2SeriesType:23,showAllLabels:24,handleMissing:25,step:10,stepPosition:26,seriesOrder:27,seriesLabelFmt:28},null,[-1,-1])}}function Sl(n){let e,t,i;e=new Cl({props:{lineColor:n[70],lineWidth:n[38],lineOpacity:n[37],lineType:n[36],markers:n[40],markerShape:n[41],markerSize:n[42],handleMissing:n[43],step:n[44],stepPosition:n[45],labels:n[47],labelSize:n[48],labelPosition:n[49],labelColor:n[68],labelFmt:n[50],yLabelFmt:n[51],y2LabelFmt:n[52],showAllLabels:n[53],y2SeriesType:n[8],seriesOrder:n[62],seriesLabelFmt:n[64]}});const l=n[77].default,r=bi(l,n,n[78],null);return{c(){v(e.$$.fragment),t=Q(),r&&r.c()},l(s){$(e.$$.fragment,s),t=J(s),r&&r.l(s)},m(s,a){ee(e,s,a),P(s,t,a),r&&r.m(s,a),i=!0},p(s,a){const o={};a[2]&256&&(o.lineColor=s[70]),a[1]&128&&(o.lineWidth=s[38]),a[1]&64&&(o.lineOpacity=s[37]),a[1]&32&&(o.lineType=s[36]),a[1]&512&&(o.markers=s[40]),a[1]&1024&&(o.markerShape=s[41]),a[1]&2048&&(o.markerSize=s[42]),a[1]&4096&&(o.handleMissing=s[43]),a[1]&8192&&(o.step=s[44]),a[1]&16384&&(o.stepPosition=s[45]),a[1]&65536&&(o.labels=s[47]),a[1]&131072&&(o.labelSize=s[48]),a[1]&262144&&(o.labelPosition=s[49]),a[2]&64&&(o.labelColor=s[68]),a[1]&524288&&(o.labelFmt=s[50]),a[1]&1048576&&(o.yLabelFmt=s[51]),a[1]&2097152&&(o.y2LabelFmt=s[52]),a[1]&4194304&&(o.showAllLabels=s[53]),a[0]&256&&(o.y2SeriesType=s[8]),a[2]&1&&(o.seriesOrder=s[62]),a[2]&4&&(o.seriesLabelFmt=s[64]),e.$set(o),r&&r.p&&(!i||a[2]&65536)&&wi(r,l,s,s[78],i?Ci(l,s[78],a,null):ki(s[78]),null)},i(s){i||(L(e.$$.fragment,s),L(r,s),i=!0)},o(s){E(e.$$.fragment,s),E(r,s),i=!1},d(s){s&&S(t),te(e,s),r&&r.d(s)}}}function Al(n){let e,t;return e=new yl({props:{data:n[0],x:n[1],y:n[2],y2:n[3],xFmt:n[10],yFmt:n[9],y2Fmt:n[11],series:n[4],xType:n[5],yLog:n[6],yLogBase:n[7],legend:n[14],xAxisTitle:n[15],yAxisTitle:n[16],y2AxisTitle:n[17],xGridlines:n[18],yGridlines:n[19],y2Gridlines:n[20],xAxisLabels:n[21],yAxisLabels:n[22],y2AxisLabels:n[23],xBaseline:n[24],yBaseline:n[25],y2Baseline:n[26],xTickMarks:n[27],yTickMarks:n[28],y2TickMarks:n[29],yAxisColor:n[67],y2AxisColor:n[66],yMin:n[30],yMax:n[31],yScale:n[32],y2Min:n[33],y2Max:n[34],y2Scale:n[35],title:n[12],subtitle:n[13],chartType:"Line Chart",sort:n[46],chartAreaHeight:n[39],colorPalette:n[69],echartsOptions:n[54],seriesOptions:n[55],printEchartsConfig:n[56],emptySet:n[57],emptyMessage:n[58],renderer:n[59],downloadableData:n[60],downloadableImage:n[61],connectGroup:n[63],seriesColors:n[65],$$slots:{default:[Sl]},$$scope:{ctx:n}}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&1&&(r.data=i[0]),l[0]&2&&(r.x=i[1]),l[0]&4&&(r.y=i[2]),l[0]&8&&(r.y2=i[3]),l[0]&1024&&(r.xFmt=i[10]),l[0]&512&&(r.yFmt=i[9]),l[0]&2048&&(r.y2Fmt=i[11]),l[0]&16&&(r.series=i[4]),l[0]&32&&(r.xType=i[5]),l[0]&64&&(r.yLog=i[6]),l[0]&128&&(r.yLogBase=i[7]),l[0]&16384&&(r.legend=i[14]),l[0]&32768&&(r.xAxisTitle=i[15]),l[0]&65536&&(r.yAxisTitle=i[16]),l[0]&131072&&(r.y2AxisTitle=i[17]),l[0]&262144&&(r.xGridlines=i[18]),l[0]&524288&&(r.yGridlines=i[19]),l[0]&1048576&&(r.y2Gridlines=i[20]),l[0]&2097152&&(r.xAxisLabels=i[21]),l[0]&4194304&&(r.yAxisLabels=i[22]),l[0]&8388608&&(r.y2AxisLabels=i[23]),l[0]&16777216&&(r.xBaseline=i[24]),l[0]&33554432&&(r.yBaseline=i[25]),l[0]&67108864&&(r.y2Baseline=i[26]),l[0]&134217728&&(r.xTickMarks=i[27]),l[0]&268435456&&(r.yTickMarks=i[28]),l[0]&536870912&&(r.y2TickMarks=i[29]),l[2]&32&&(r.yAxisColor=i[67]),l[2]&16&&(r.y2AxisColor=i[66]),l[0]&1073741824&&(r.yMin=i[30]),l[1]&1&&(r.yMax=i[31]),l[1]&2&&(r.yScale=i[32]),l[1]&4&&(r.y2Min=i[33]),l[1]&8&&(r.y2Max=i[34]),l[1]&16&&(r.y2Scale=i[35]),l[0]&4096&&(r.title=i[12]),l[0]&8192&&(r.subtitle=i[13]),l[1]&32768&&(r.sort=i[46]),l[1]&256&&(r.chartAreaHeight=i[39]),l[2]&128&&(r.colorPalette=i[69]),l[1]&8388608&&(r.echartsOptions=i[54]),l[1]&16777216&&(r.seriesOptions=i[55]),l[1]&33554432&&(r.printEchartsConfig=i[56]),l[1]&67108864&&(r.emptySet=i[57]),l[1]&134217728&&(r.emptyMessage=i[58]),l[1]&268435456&&(r.renderer=i[59]),l[1]&536870912&&(r.downloadableData=i[60]),l[1]&1073741824&&(r.downloadableImage=i[61]),l[2]&2&&(r.connectGroup=i[63]),l[2]&8&&(r.seriesColors=i[65]),l[0]&256|l[1]&8355552|l[2]&65861&&(r.$$scope={dirty:l,ctx:i}),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Tl(n,e,t){let i,l,r,s,a,o,{$$slots:f={},$$scope:g}=e;const{resolveColor:_,resolveColorsObject:w,resolveColorPalette:D}=$t();let{data:k=void 0}=e,{x:y=void 0}=e,{y:C=void 0}=e,{y2:A=void 0}=e,{series:G=void 0}=e,{xType:M=void 0}=e,{yLog:H=void 0}=e,{yLogBase:X=void 0}=e,{y2SeriesType:Y=void 0}=e,{yFmt:ie=void 0}=e,{xFmt:R=void 0}=e,{y2Fmt:N=void 0}=e,{title:d=void 0}=e,{subtitle:j=void 0}=e,{legend:O=void 0}=e,{xAxisTitle:T=void 0}=e,{yAxisTitle:F=A?"true":void 0}=e,{y2AxisTitle:x=A?"true":void 0}=e,{xGridlines:K=void 0}=e,{yGridlines:ae=void 0}=e,{y2Gridlines:le=void 0}=e,{xAxisLabels:U=void 0}=e,{yAxisLabels:p=void 0}=e,{y2AxisLabels:V=void 0}=e,{xBaseline:I=void 0}=e,{yBaseline:W=void 0}=e,{y2Baseline:u=void 0}=e,{xTickMarks:h=void 0}=e,{yTickMarks:Z=void 0}=e,{y2TickMarks:ue=void 0}=e,{yMin:Le=void 0}=e,{yMax:ce=void 0}=e,{yScale:se=void 0}=e,{y2Min:me=void 0}=e,{y2Max:ge=void 0}=e,{y2Scale:ye=void 0}=e,{lineColor:we=void 0}=e,{lineType:ke=void 0}=e,{lineOpacity:Se=void 0}=e,{lineWidth:Fe=void 0}=e,{chartAreaHeight:je=void 0}=e,{markers:ze=void 0}=e,{markerShape:he=void 0}=e,{markerSize:Pe=void 0}=e,{handleMissing:Ge=void 0}=e,{step:_e=void 0}=e,{stepPosition:Ie=void 0}=e,{sort:Ee=void 0}=e,{colorPalette:De="default"}=e,{labels:b=void 0}=e,{labelSize:Ae=void 0}=e,{labelPosition:lt=void 0}=e,{labelColor:qe=void 0}=e,{labelFmt:it=void 0}=e,{yLabelFmt:bt=void 0}=e,{y2LabelFmt:Be=void 0}=e,{showAllLabels:xe=void 0}=e,{yAxisColor:Ue=void 0}=e,{y2AxisColor:pe=void 0}=e,{echartsOptions:Ke=void 0}=e,{seriesOptions:st=void 0}=e,{printEchartsConfig:wt=!1}=e,{emptySet:Qe=void 0}=e,{emptyMessage:nt=void 0}=e,{renderer:kt=void 0}=e,{downloadableData:at=void 0}=e,{downloadableImage:Ct=void 0}=e,{seriesColors:Te=void 0}=e,{seriesOrder:Bt=void 0}=e,{connectGroup:Nt=void 0}=e,{seriesLabelFmt:St=void 0}=e;return n.$$set=c=>{"data"in c&&t(0,k=c.data),"x"in c&&t(1,y=c.x),"y"in c&&t(2,C=c.y),"y2"in c&&t(3,A=c.y2),"series"in c&&t(4,G=c.series),"xType"in c&&t(5,M=c.xType),"yLog"in c&&t(6,H=c.yLog),"yLogBase"in c&&t(7,X=c.yLogBase),"y2SeriesType"in c&&t(8,Y=c.y2SeriesType),"yFmt"in c&&t(9,ie=c.yFmt),"xFmt"in c&&t(10,R=c.xFmt),"y2Fmt"in c&&t(11,N=c.y2Fmt),"title"in c&&t(12,d=c.title),"subtitle"in c&&t(13,j=c.subtitle),"legend"in c&&t(14,O=c.legend),"xAxisTitle"in c&&t(15,T=c.xAxisTitle),"yAxisTitle"in c&&t(16,F=c.yAxisTitle),"y2AxisTitle"in c&&t(17,x=c.y2AxisTitle),"xGridlines"in c&&t(18,K=c.xGridlines),"yGridlines"in c&&t(19,ae=c.yGridlines),"y2Gridlines"in c&&t(20,le=c.y2Gridlines),"xAxisLabels"in c&&t(21,U=c.xAxisLabels),"yAxisLabels"in c&&t(22,p=c.yAxisLabels),"y2AxisLabels"in c&&t(23,V=c.y2AxisLabels),"xBaseline"in c&&t(24,I=c.xBaseline),"yBaseline"in c&&t(25,W=c.yBaseline),"y2Baseline"in c&&t(26,u=c.y2Baseline),"xTickMarks"in c&&t(27,h=c.xTickMarks),"yTickMarks"in c&&t(28,Z=c.yTickMarks),"y2TickMarks"in c&&t(29,ue=c.y2TickMarks),"yMin"in c&&t(30,Le=c.yMin),"yMax"in c&&t(31,ce=c.yMax),"yScale"in c&&t(32,se=c.yScale),"y2Min"in c&&t(33,me=c.y2Min),"y2Max"in c&&t(34,ge=c.y2Max),"y2Scale"in c&&t(35,ye=c.y2Scale),"lineColor"in c&&t(71,we=c.lineColor),"lineType"in c&&t(36,ke=c.lineType),"lineOpacity"in c&&t(37,Se=c.lineOpacity),"lineWidth"in c&&t(38,Fe=c.lineWidth),"chartAreaHeight"in c&&t(39,je=c.chartAreaHeight),"markers"in c&&t(40,ze=c.markers),"markerShape"in c&&t(41,he=c.markerShape),"markerSize"in c&&t(42,Pe=c.markerSize),"handleMissing"in c&&t(43,Ge=c.handleMissing),"step"in c&&t(44,_e=c.step),"stepPosition"in c&&t(45,Ie=c.stepPosition),"sort"in c&&t(46,Ee=c.sort),"colorPalette"in c&&t(72,De=c.colorPalette),"labels"in c&&t(47,b=c.labels),"labelSize"in c&&t(48,Ae=c.labelSize),"labelPosition"in c&&t(49,lt=c.labelPosition),"labelColor"in c&&t(73,qe=c.labelColor),"labelFmt"in c&&t(50,it=c.labelFmt),"yLabelFmt"in c&&t(51,bt=c.yLabelFmt),"y2LabelFmt"in c&&t(52,Be=c.y2LabelFmt),"showAllLabels"in c&&t(53,xe=c.showAllLabels),"yAxisColor"in c&&t(74,Ue=c.yAxisColor),"y2AxisColor"in c&&t(75,pe=c.y2AxisColor),"echartsOptions"in c&&t(54,Ke=c.echartsOptions),"seriesOptions"in c&&t(55,st=c.seriesOptions),"printEchartsConfig"in c&&t(56,wt=c.printEchartsConfig),"emptySet"in c&&t(57,Qe=c.emptySet),"emptyMessage"in c&&t(58,nt=c.emptyMessage),"renderer"in c&&t(59,kt=c.renderer),"downloadableData"in c&&t(60,at=c.downloadableData),"downloadableImage"in c&&t(61,Ct=c.downloadableImage),"seriesColors"in c&&t(76,Te=c.seriesColors),"seriesOrder"in c&&t(62,Bt=c.seriesOrder),"connectGroup"in c&&t(63,Nt=c.connectGroup),"seriesLabelFmt"in c&&t(64,St=c.seriesLabelFmt),"$$scope"in c&&t(78,g=c.$$scope)},n.$$.update=()=>{n.$$.dirty[2]&512&&t(70,i=_(we)),n.$$.dirty[2]&1024&&t(69,l=D(De)),n.$$.dirty[2]&2048&&t(68,r=_(qe)),n.$$.dirty[2]&4096&&t(67,s=_(Ue)),n.$$.dirty[2]&8192&&t(66,a=_(pe)),n.$$.dirty[2]&16384&&t(65,o=w(Te))},[k,y,C,A,G,M,H,X,Y,ie,R,N,d,j,O,T,F,x,K,ae,le,U,p,V,I,W,u,h,Z,ue,Le,ce,se,me,ge,ye,ke,Se,Fe,je,ze,he,Pe,Ge,_e,Ie,Ee,b,Ae,lt,it,bt,Be,xe,Ke,st,wt,Qe,nt,kt,at,Ct,Bt,Nt,St,o,a,s,r,l,i,we,De,qe,Ue,pe,Te,f,g]}class gi extends et{constructor(e){super(),tt(this,e,Tl,Al,$e,{data:0,x:1,y:2,y2:3,series:4,xType:5,yLog:6,yLogBase:7,y2SeriesType:8,yFmt:9,xFmt:10,y2Fmt:11,title:12,subtitle:13,legend:14,xAxisTitle:15,yAxisTitle:16,y2AxisTitle:17,xGridlines:18,yGridlines:19,y2Gridlines:20,xAxisLabels:21,yAxisLabels:22,y2AxisLabels:23,xBaseline:24,yBaseline:25,y2Baseline:26,xTickMarks:27,yTickMarks:28,y2TickMarks:29,yMin:30,yMax:31,yScale:32,y2Min:33,y2Max:34,y2Scale:35,lineColor:71,lineType:36,lineOpacity:37,lineWidth:38,chartAreaHeight:39,markers:40,markerShape:41,markerSize:42,handleMissing:43,step:44,stepPosition:45,sort:46,colorPalette:72,labels:47,labelSize:48,labelPosition:49,labelColor:73,labelFmt:50,yLabelFmt:51,y2LabelFmt:52,showAllLabels:53,yAxisColor:74,y2AxisColor:75,echartsOptions:54,seriesOptions:55,printEchartsConfig:56,emptySet:57,emptyMessage:58,renderer:59,downloadableData:60,downloadableImage:61,seriesColors:76,seriesOrder:62,connectGroup:63,seriesLabelFmt:64},null,[-1,-1,-1])}}function Ol(n){let e,t=ne.title+"",i;return{c(){e=oe("h1"),i=Bn(t),this.h()},l(l){e=fe(l,"H1",{class:!0});var r=be(e);i=Nn(r,t),r.forEach(S),this.h()},h(){B(e,"class","title")},m(l,r){P(l,e,r),Oe(e,i)},p:de,d(l){l&&S(e)}}}function Ml(n){return{c(){this.h()},l(e){this.h()},h(){document.title="Evidence"},m:de,p:de,d:de}}function Ll(n){let e,t,i,l,r;return document.title=e=ne.title,{c(){t=Q(),i=oe("meta"),l=Q(),r=oe("meta"),this.h()},l(s){t=J(s),i=fe(s,"META",{property:!0,content:!0}),l=J(s),r=fe(s,"META",{name:!0,content:!0}),this.h()},h(){var s,a;B(i,"property","og:title"),B(i,"content",((s=ne.og)==null?void 0:s.title)??ne.title),B(r,"name","twitter:title"),B(r,"content",((a=ne.og)==null?void 0:a.title)??ne.title)},m(s,a){P(s,t,a),P(s,i,a),P(s,l,a),P(s,r,a)},p(s,a){a&0&&e!==(e=ne.title)&&(document.title=e)},d(s){s&&(S(t),S(i),S(l),S(r))}}}function Dl(n){var r,s;let e,t,i=(ne.description||((r=ne.og)==null?void 0:r.description))&&Fl(),l=((s=ne.og)==null?void 0:s.image)&&zl();return{c(){i&&i.c(),e=Q(),l&&l.c(),t=Me()},l(a){i&&i.l(a),e=J(a),l&&l.l(a),t=Me()},m(a,o){i&&i.m(a,o),P(a,e,o),l&&l.m(a,o),P(a,t,o)},p(a,o){var f,g;(ne.description||(f=ne.og)!=null&&f.description)&&i.p(a,o),(g=ne.og)!=null&&g.image&&l.p(a,o)},d(a){a&&(S(e),S(t)),i&&i.d(a),l&&l.d(a)}}}function Fl(n){let e,t,i,l,r;return{c(){e=oe("meta"),t=Q(),i=oe("meta"),l=Q(),r=oe("meta"),this.h()},l(s){e=fe(s,"META",{name:!0,content:!0}),t=J(s),i=fe(s,"META",{property:!0,content:!0}),l=J(s),r=fe(s,"META",{name:!0,content:!0}),this.h()},h(){var s,a,o;B(e,"name","description"),B(e,"content",ne.description??((s=ne.og)==null?void 0:s.description)),B(i,"property","og:description"),B(i,"content",((a=ne.og)==null?void 0:a.description)??ne.description),B(r,"name","twitter:description"),B(r,"content",((o=ne.og)==null?void 0:o.description)??ne.description)},m(s,a){P(s,e,a),P(s,t,a),P(s,i,a),P(s,l,a),P(s,r,a)},p:de,d(s){s&&(S(e),S(t),S(i),S(l),S(r))}}}function zl(n){let e,t,i;return{c(){e=oe("meta"),t=Q(),i=oe("meta"),this.h()},l(l){e=fe(l,"META",{property:!0,content:!0}),t=J(l),i=fe(l,"META",{name:!0,content:!0}),this.h()},h(){var l,r;B(e,"property","og:image"),B(e,"content",_n((l=ne.og)==null?void 0:l.image)),B(i,"name","twitter:image"),B(i,"content",_n((r=ne.og)==null?void 0:r.image))},m(l,r){P(l,e,r),P(l,t,r),P(l,i,r)},p:de,d(l){l&&(S(e),S(t),S(i))}}}function In(n){let e,t;return e=new ei({props:{queryID:"date_range",queryResult:n[0]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&1&&(r.queryResult=i[0]),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function En(n){let e,t;return e=new ei({props:{queryID:"aggregate_stats",queryResult:n[1]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&2&&(r.queryResult=i[1]),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function jn(n){let e,t;return e=new ei({props:{queryID:"fares_by_day",queryResult:n[2]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&4&&(r.queryResult=i[2]),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Il(n){let e,t,i,l,r,s,a,o;return e=new gi({props:{title:"Rides by Day",data:n[2],x:"day",y:"rides"}}),i=new gi({props:{title:"Fare Amount by Day",data:n[2],x:"day",y:"fare_amount",yFmt:"usd1m"}}),r=new gi({props:{title:"Trip Distance by Day",data:n[2],x:"day",y:"trip_distance"}}),a=new gi({props:{title:"Fare per Mile by Day",data:n[2],x:"day",y:"fare_per_mile"}}),{c(){v(e.$$.fragment),t=Q(),v(i.$$.fragment),l=Q(),v(r.$$.fragment),s=Q(),v(a.$$.fragment)},l(f){$(e.$$.fragment,f),t=J(f),$(i.$$.fragment,f),l=J(f),$(r.$$.fragment,f),s=J(f),$(a.$$.fragment,f)},m(f,g){ee(e,f,g),P(f,t,g),ee(i,f,g),P(f,l,g),ee(r,f,g),P(f,s,g),ee(a,f,g),o=!0},p(f,g){const _={};g[0]&4&&(_.data=f[2]),e.$set(_);const w={};g[0]&4&&(w.data=f[2]),i.$set(w);const D={};g[0]&4&&(D.data=f[2]),r.$set(D);const k={};g[0]&4&&(k.data=f[2]),a.$set(k)},i(f){o||(L(e.$$.fragment,f),L(i.$$.fragment,f),L(r.$$.fragment,f),L(a.$$.fragment,f),o=!0)},o(f){E(e.$$.fragment,f),E(i.$$.fragment,f),E(r.$$.fragment,f),E(a.$$.fragment,f),o=!1},d(f){f&&(S(t),S(l),S(s)),te(e,f),te(i,f),te(r,f),te(a,f)}}}function Pn(n){let e,t;return e=new ei({props:{queryID:"fares_by_pickup_location",queryResult:n[3]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&8&&(r.queryResult=i[3]),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function Gn(n){let e,t;return e=new ei({props:{queryID:"fares_by_pickup_borough",queryResult:n[4]}}),{c(){v(e.$$.fragment)},l(i){$(e.$$.fragment,i)},m(i,l){ee(e,i,l),t=!0},p(i,l){const r={};l[0]&16&&(r.queryResult=i[4]),e.$set(r)},i(i){t||(L(e.$$.fragment,i),t=!0)},o(i){E(e.$$.fragment,i),t=!1},d(i){te(e,i)}}}function El(n){let e,t,i,l,r,s,a,o;return e=new yi({props:{id:"borough"}}),i=new yi({props:{id:"rides",fmt:"num0"}}),r=new yi({props:{id:"fare_amount",fmt:"usd1m"}}),a=new yi({props:{id:"trip_distance",fmt:"num0"}}),{c(){v(e.$$.fragment),t=Q(),v(i.$$.fragment),l=Q(),v(r.$$.fragment),s=Q(),v(a.$$.fragment)},l(f){$(e.$$.fragment,f),t=J(f),$(i.$$.fragment,f),l=J(f),$(r.$$.fragment,f),s=J(f),$(a.$$.fragment,f)},m(f,g){ee(e,f,g),P(f,t,g),ee(i,f,g),P(f,l,g),ee(r,f,g),P(f,s,g),ee(a,f,g),o=!0},p:de,i(f){o||(L(e.$$.fragment,f),L(i.$$.fragment,f),L(r.$$.fragment,f),L(a.$$.fragment,f),o=!0)},o(f){E(e.$$.fragment,f),E(i.$$.fragment,f),E(r.$$.fragment,f),E(a.$$.fragment,f),o=!1},d(f){f&&(S(t),S(l),S(s)),te(e,f),te(i,f),te(r,f),te(a,f)}}}function jl(n){let e,t,i,l,r,s,a,o="This is an exploration of NYC taxi data in 2022. It includes a summary of the data, rides by day, and rides by pickup location.",f,g,_,w,D,k,y,C,A,G,M,H,X,Y,ie,R,N,d,j,O,T,F=typeof ne<"u"&&ne.title&&ne.hide_title!==!0&&Ol();function x(u,h){return typeof ne<"u"&&ne.title?Ll:Ml}let ae=x()(n),le=typeof ne=="object"&&Dl(),U=n[0]&&In(n);g=new Sr({props:{name:"date_range",data:n[0],dates:"day"}});let p=n[1]&&En(n);D=new hi({props:{data:n[1],value:"rides",fmt:"num0"}}),y=new hi({props:{data:n[1],value:"fare_amount",fmt:"usd1m"}}),A=new hi({props:{data:n[1],value:"trip_distance",fmt:'#,##0 "mi"'}}),M=new hi({props:{data:n[1],value:"fare_per_mile",fmt:"usd2"}});let V=n[2]&&jn(n);Y=new jr({props:{$$slots:{default:[Il]},$$scope:{ctx:n}}});let I=n[3]&&Pn(n);N=new Ar({props:{data:n[3],geoJsonUrl:"/taxi_zones.geojson",geoId:"objectid",areaCol:"pickup_location_id",value:"rides",valueFmt:"num0",title:"Rides by Pickup Location",labelCol:"zone",tooltip:[{id:"zone",showColumnName:!1,valueClass:"text-xl font-semibold"},{id:"borough",showColumnName:!1,valueClass:"text-sm text-gray-500"},{id:"rides",fmt:"num0",fieldClass:"text-[grey]",valueClass:"text-[green]"},{id:"fare_amount",fmt:"usd",fieldClass:"text-[grey]",valueClass:"text-[green]"},{id:"trip_distance",fmt:"num0",fieldClass:"text-[grey]",valueClass:"text-[green]"}]}});let W=n[4]&&Gn(n);return O=new hr({props:{data:n[4],link:"borough_link",$$slots:{default:[El]},$$scope:{ctx:n}}}),{c(){F&&F.c(),e=Q(),ae.c(),t=oe("meta"),i=oe("meta"),le&&le.c(),l=Me(),r=Q(),U&&U.c(),s=Q(),a=oe("p"),a.textContent=o,f=Q(),v(g.$$.fragment),_=Q(),p&&p.c(),w=Q(),v(D.$$.fragment),k=Q(),v(y.$$.fragment),C=Q(),v(A.$$.fragment),G=Q(),v(M.$$.fragment),H=Q(),V&&V.c(),X=Q(),v(Y.$$.fragment),ie=Q(),I&&I.c(),R=Q(),v(N.$$.fragment),d=Q(),W&&W.c(),j=Q(),v(O.$$.fragment),this.h()},l(u){F&&F.l(u),e=J(u);const h=Zn("svelte-6lktun",document.head);ae.l(h),t=fe(h,"META",{name:!0,content:!0}),i=fe(h,"META",{name:!0,content:!0}),le&&le.l(h),l=Me(),h.forEach(S),r=J(u),U&&U.l(u),s=J(u),a=fe(u,"P",{class:!0,"data-svelte-h":!0}),qn(a)!=="svelte-1oqfwol"&&(a.textContent=o),f=J(u),$(g.$$.fragment,u),_=J(u),p&&p.l(u),w=J(u),$(D.$$.fragment,u),k=J(u),$(y.$$.fragment,u),C=J(u),$(A.$$.fragment,u),G=J(u),$(M.$$.fragment,u),H=J(u),V&&V.l(u),X=J(u),$(Y.$$.fragment,u),ie=J(u),I&&I.l(u),R=J(u),$(N.$$.fragment,u),d=J(u),W&&W.l(u),j=J(u),$(O.$$.fragment,u),this.h()},h(){B(t,"name","twitter:card"),B(t,"content","summary"),B(i,"name","twitter:site"),B(i,"content","@evidence_dev"),B(a,"class","markdown")},m(u,h){F&&F.m(u,h),P(u,e,h),ae.m(document.head,null),Oe(document.head,t),Oe(document.head,i),le&&le.m(document.head,null),Oe(document.head,l),P(u,r,h),U&&U.m(u,h),P(u,s,h),P(u,a,h),P(u,f,h),ee(g,u,h),P(u,_,h),p&&p.m(u,h),P(u,w,h),ee(D,u,h),P(u,k,h),ee(y,u,h),P(u,C,h),ee(A,u,h),P(u,G,h),ee(M,u,h),P(u,H,h),V&&V.m(u,h),P(u,X,h),ee(Y,u,h),P(u,ie,h),I&&I.m(u,h),P(u,R,h),ee(N,u,h),P(u,d,h),W&&W.m(u,h),P(u,j,h),ee(O,u,h),T=!0},p(u,h){typeof ne<"u"&&ne.title&&ne.hide_title!==!0&&F.p(u,h),ae.p(u,h),typeof ne=="object"&&le.p(u,h),u[0]?U?(U.p(u,h),h[0]&1&&L(U,1)):(U=In(u),U.c(),L(U,1),U.m(s.parentNode,s)):U&&(Re(),E(U,1,1,()=>{U=null}),He());const Z={};h[0]&1&&(Z.data=u[0]),g.$set(Z),u[1]?p?(p.p(u,h),h[0]&2&&L(p,1)):(p=En(u),p.c(),L(p,1),p.m(w.parentNode,w)):p&&(Re(),E(p,1,1,()=>{p=null}),He());const ue={};h[0]&2&&(ue.data=u[1]),D.$set(ue);const Le={};h[0]&2&&(Le.data=u[1]),y.$set(Le);const ce={};h[0]&2&&(ce.data=u[1]),A.$set(ce);const se={};h[0]&2&&(se.data=u[1]),M.$set(se),u[2]?V?(V.p(u,h),h[0]&4&&L(V,1)):(V=jn(u),V.c(),L(V,1),V.m(X.parentNode,X)):V&&(Re(),E(V,1,1,()=>{V=null}),He());const me={};h[0]&4|h[1]&2048&&(me.$$scope={dirty:h,ctx:u}),Y.$set(me),u[3]?I?(I.p(u,h),h[0]&8&&L(I,1)):(I=Pn(u),I.c(),L(I,1),I.m(R.parentNode,R)):I&&(Re(),E(I,1,1,()=>{I=null}),He());const ge={};h[0]&8&&(ge.data=u[3]),N.$set(ge),u[4]?W?(W.p(u,h),h[0]&16&&L(W,1)):(W=Gn(u),W.c(),L(W,1),W.m(j.parentNode,j)):W&&(Re(),E(W,1,1,()=>{W=null}),He());const ye={};h[0]&16&&(ye.data=u[4]),h[1]&2048&&(ye.$$scope={dirty:h,ctx:u}),O.$set(ye)},i(u){T||(L(U),L(g.$$.fragment,u),L(p),L(D.$$.fragment,u),L(y.$$.fragment,u),L(A.$$.fragment,u),L(M.$$.fragment,u),L(V),L(Y.$$.fragment,u),L(I),L(N.$$.fragment,u),L(W),L(O.$$.fragment,u),T=!0)},o(u){E(U),E(g.$$.fragment,u),E(p),E(D.$$.fragment,u),E(y.$$.fragment,u),E(A.$$.fragment,u),E(M.$$.fragment,u),E(V),E(Y.$$.fragment,u),E(I),E(N.$$.fragment,u),E(W),E(O.$$.fragment,u),T=!1},d(u){u&&(S(e),S(r),S(s),S(a),S(f),S(_),S(w),S(k),S(C),S(G),S(H),S(X),S(ie),S(R),S(d),S(j)),F&&F.d(u),ae.d(u),S(t),S(i),le&&le.d(u),S(l),U&&U.d(u),te(g,u),p&&p.d(u),te(D,u),te(y,u),te(A,u),te(M,u),V&&V.d(u),te(Y,u),I&&I.d(u),te(N,u),W&&W.d(u),te(O,u)}}}const ne={title:"NYC Taxi Data 2022",sidebar:"never"};function Pl(n,e,t){let i,l;_t(n,Cr,Z=>t(28,i=Z)),_t(n,bn,Z=>t(33,l=Z));let{data:r}=e,{data:s={},customFormattingSettings:a,__db:o,inputs:f}=r;vn(bn,l="6666cd76f96956469e7be39d750cc7d9",l);let g=gr(vi(f));$n(g.subscribe(Z=>t(7,f=Z))),_i(wr,{getCustomFormats:()=>a.customFormats||[]});const _=(Z,ue)=>kr(o.query,Z,{query_name:ue});_r(_),i.params,er(()=>!0);let w={initialData:void 0,initialError:void 0},D=Ye`select * from taxi.dates`,k="select * from taxi.dates";s.date_range_data&&(s.date_range_data instanceof Error?w.initialError=s.date_range_data:w.initialData=s.date_range_data,s.date_range_columns&&(w.knownColumns=s.date_range_columns));let y,C=!1;const A=rt.createReactive({callback:Z=>{t(0,y=Z)},execFn:_},{id:"date_range",...w});A(k,{noResolve:D,...w}),globalThis[Symbol.for("date_range")]={get value(){return y}};let G={initialData:void 0,initialError:void 0},M=Ye`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary +where day between '${f.date_range.start}' and '${f.date_range.end}'`,H=`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary +where day between '${f.date_range.start}' and '${f.date_range.end}'`;s.aggregate_stats_data&&(s.aggregate_stats_data instanceof Error?G.initialError=s.aggregate_stats_data:G.initialData=s.aggregate_stats_data,s.aggregate_stats_columns&&(G.knownColumns=s.aggregate_stats_columns));let X,Y=!1;const ie=rt.createReactive({callback:Z=>{t(1,X=Z)},execFn:_},{id:"aggregate_stats",...G});ie(H,{noResolve:M,...G}),globalThis[Symbol.for("aggregate_stats")]={get value(){return X}};let R={initialData:void 0,initialError:void 0},N=Ye`select * +from taxi.daily +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by day`,d=`select * +from taxi.daily +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by day`;s.fares_by_day_data&&(s.fares_by_day_data instanceof Error?R.initialError=s.fares_by_day_data:R.initialData=s.fares_by_day_data,s.fares_by_day_columns&&(R.knownColumns=s.fares_by_day_columns));let j,O=!1;const T=rt.createReactive({callback:Z=>{t(2,j=Z)},execFn:_},{id:"fares_by_day",...R});T(d,{noResolve:N,...R}),globalThis[Symbol.for("fares_by_day")]={get value(){return j}};let F={initialData:void 0,initialError:void 0},x=Ye`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by rides desc`,K=`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by rides desc`;s.fares_by_pickup_location_data&&(s.fares_by_pickup_location_data instanceof Error?F.initialError=s.fares_by_pickup_location_data:F.initialData=s.fares_by_pickup_location_data,s.fares_by_pickup_location_columns&&(F.knownColumns=s.fares_by_pickup_location_columns));let ae,le=!1;const U=rt.createReactive({callback:Z=>{t(3,ae=Z)},execFn:_},{id:"fares_by_pickup_location",...F});U(K,{noResolve:x,...F}),globalThis[Symbol.for("fares_by_pickup_location")]={get value(){return ae}};let p={initialData:void 0,initialError:void 0},V=Ye`select + borough, + '/borough/' || borough as borough_link, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +and borough is not null +group by all +order by rides desc`,I=`select + borough, + '/borough/' || borough as borough_link, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +and borough is not null +group by all +order by rides desc`;s.fares_by_pickup_borough_data&&(s.fares_by_pickup_borough_data instanceof Error?p.initialError=s.fares_by_pickup_borough_data:p.initialData=s.fares_by_pickup_borough_data,s.fares_by_pickup_borough_columns&&(p.knownColumns=s.fares_by_pickup_borough_columns));let W,u=!1;const h=rt.createReactive({callback:Z=>{t(4,W=Z)},execFn:_},{id:"fares_by_pickup_borough",...p});return h(I,{noResolve:V,...p}),globalThis[Symbol.for("fares_by_pickup_borough")]={get value(){return W}},n.$$set=Z=>{"data"in Z&&t(5,r=Z.data)},n.$$.update=()=>{n.$$.dirty[0]&32&&t(6,{data:s={},customFormattingSettings:a,__db:o}=r,s),n.$$.dirty[0]&64&&br.set(Object.keys(s).length>0),n.$$.dirty[0]&268435456&&i.params,n.$$.dirty[0]&3840&&(D||!C?D||(A(k,{noResolve:D,...w}),t(11,C=!0)):A(k,{noResolve:D})),n.$$.dirty[0]&128&&t(13,M=Ye`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary +where day between '${f.date_range.start}' and '${f.date_range.end}'`),n.$$.dirty[0]&128&&t(14,H=`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary +where day between '${f.date_range.start}' and '${f.date_range.end}'`),n.$$.dirty[0]&61440&&(M||!Y?M||(ie(H,{noResolve:M,...G}),t(15,Y=!0)):ie(H,{noResolve:M})),n.$$.dirty[0]&128&&t(17,N=Ye`select * +from taxi.daily +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by day`),n.$$.dirty[0]&128&&t(18,d=`select * +from taxi.daily +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by day`),n.$$.dirty[0]&983040&&(N||!O?N||(T(d,{noResolve:N,...R}),t(19,O=!0)):T(d,{noResolve:N})),n.$$.dirty[0]&128&&t(21,x=Ye`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by rides desc`),n.$$.dirty[0]&128&&t(22,K=`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +group by all +order by rides desc`),n.$$.dirty[0]&15728640&&(x||!le?x||(U(K,{noResolve:x,...F}),t(23,le=!0)):U(K,{noResolve:x})),n.$$.dirty[0]&128&&t(25,V=Ye`select + borough, + '/borough/' || borough as borough_link, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +and borough is not null +group by all +order by rides desc`),n.$$.dirty[0]&128&&t(26,I=`select + borough, + '/borough/' || borough as borough_link, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${f.date_range.start}' and '${f.date_range.end}' +and borough is not null +group by all +order by rides desc`),n.$$.dirty[0]&251658240&&(V||!u?V||(h(I,{noResolve:V,...p}),t(27,u=!0)):h(I,{noResolve:V}))},t(9,D=Ye`select * from taxi.dates`),t(10,k="select * from taxi.dates"),[y,X,j,ae,W,r,s,f,w,D,k,C,G,M,H,Y,R,N,d,O,F,x,K,le,p,V,I,u,i]}class pl extends et{constructor(e){super(),tt(this,e,Pl,jl,$e,{data:5},null,[-1,-1])}}export{pl as component}; diff --git a/_app/immutable/nodes/5.DjysBRZq.js b/_app/immutable/nodes/5.DjysBRZq.js new file mode 100644 index 0000000000000000000000000000000000000000..2570f18a49a07cb9311f243557832570b131013c --- /dev/null +++ b/_app/immutable/nodes/5.DjysBRZq.js @@ -0,0 +1,81 @@ +import{s as ce,a as E,e as L,b as ie,t as ge,c as F,h as pe,d as X,f as c,g as _e,i as be,j as O,k as R,l as K,m as ye,n as le,o as $e,p as he,q as we,r as ke,u as W}from"../chunks/scheduler.B2FSa8mv.js";import{S as ve,i as ze,c as D,a as S,m as N,t as g,b,d as Z,e as H,g as ee}from"../chunks/index.CzNnnxDZ.js";import{e as Ce,s as Re,Q as ae,p as qe,r as ue,C as Ee}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import{w as Fe}from"../chunks/entry.CmEkywbK.js";import{h as G,p as Te}from"../chunks/button.DfeRvuoX.js";import{p as Ie}from"../chunks/stores.BQnhBgve.js";import{D as je,B as Y,A as xe,Q as te}from"../chunks/AreaMap.u3IdXB4f.js";function De(o){return{c(){this.h()},l(n){this.h()},h(){document.title="Evidence"},m:W,p:W,d:W}}function me(o){let n,r;return n=new te({props:{queryID:"date_range",queryResult:o[1]}}),{c(){D(n.$$.fragment)},l(a){S(n.$$.fragment,a)},m(a,m){N(n,a,m),r=!0},p(a,m){const d={};m&2&&(d.queryResult=a[1]),n.$set(d)},i(a){r||(g(n.$$.fragment,a),r=!0)},o(a){b(n.$$.fragment,a),r=!1},d(a){H(n,a)}}}function fe(o){let n,r;return n=new te({props:{queryID:"aggregate_stats",queryResult:o[2]}}),{c(){D(n.$$.fragment)},l(a){S(n.$$.fragment,a)},m(a,m){N(n,a,m),r=!0},p(a,m){const d={};m&4&&(d.queryResult=a[2]),n.$set(d)},i(a){r||(g(n.$$.fragment,a),r=!0)},o(a){b(n.$$.fragment,a),r=!1},d(a){H(n,a)}}}function de(o){let n,r;return n=new te({props:{queryID:"fares_by_pickup_location",queryResult:o[3]}}),{c(){D(n.$$.fragment)},l(a){S(n.$$.fragment,a)},m(a,m){N(n,a,m),r=!0},p(a,m){const d={};m&8&&(d.queryResult=a[3]),n.$set(d)},i(a){r||(g(n.$$.fragment,a),r=!0)},o(a){b(n.$$.fragment,a),r=!1},d(a){H(n,a)}}}function Se(o){let n,r,a,m,d,i,I,A=o[0].borough+"",_,V,q,f,k,y,$,M,v,Q,p,z,h,U,T,C,w;function j(e,t){return De}let x=j()(o),l=o[1]&&me(o);f=new je({props:{name:"date_range",data:o[1],dates:"day"}});let u=o[2]&&fe(o);$=new Y({props:{data:o[2],value:"rides",fmt:"num0"}}),v=new Y({props:{data:o[2],value:"fare_amount",fmt:"usd1m"}}),p=new Y({props:{data:o[2],value:"trip_distance",fmt:'#,##0 "mi"'}}),h=new Y({props:{data:o[2],value:"fare_per_mile",fmt:"usd2"}});let s=o[3]&&de(o);return C=new xe({props:{data:o[3],geoJsonUrl:"/taxi_zones.geojson",geoId:"objectid",areaCol:"pickup_location_id",value:"rides",valueFmt:"num0",title:"Rides by Pickup Location",labelCol:"zone",tooltip:[{id:"zone",showColumnName:!1,valueClass:"text-xl font-semibold"},{id:"borough",showColumnName:!1,valueClass:"text-sm text-gray-500"},{id:"rides",fmt:"num0",fieldClass:"text-[grey]",valueClass:"text-[green]"},{id:"fare_amount",fmt:"usd",fieldClass:"text-[grey]",valueClass:"text-[green]"},{id:"trip_distance",fmt:"num0",fieldClass:"text-[grey]",valueClass:"text-[green]"}]}}),{c(){n=E(),x.c(),r=L("meta"),a=L("meta"),m=ie(),d=E(),i=L("h1"),I=L("a"),_=ge(A),V=E(),l&&l.c(),q=E(),D(f.$$.fragment),k=E(),u&&u.c(),y=E(),D($.$$.fragment),M=E(),D(v.$$.fragment),Q=E(),D(p.$$.fragment),z=E(),D(h.$$.fragment),U=E(),s&&s.c(),T=E(),D(C.$$.fragment),this.h()},l(e){n=F(e);const t=pe("svelte-6lktun",document.head);x.l(t),r=X(t,"META",{name:!0,content:!0}),a=X(t,"META",{name:!0,content:!0}),m=ie(),t.forEach(c),d=F(e),i=X(e,"H1",{class:!0,id:!0});var P=_e(i);I=X(P,"A",{href:!0});var J=_e(I);_=be(J,A),J.forEach(c),P.forEach(c),V=F(e),l&&l.l(e),q=F(e),S(f.$$.fragment,e),k=F(e),u&&u.l(e),y=F(e),S($.$$.fragment,e),M=F(e),S(v.$$.fragment,e),Q=F(e),S(p.$$.fragment,e),z=F(e),S(h.$$.fragment,e),U=F(e),s&&s.l(e),T=F(e),S(C.$$.fragment,e),this.h()},h(){O(r,"name","twitter:card"),O(r,"content","summary"),O(a,"name","twitter:site"),O(a,"content","@evidence_dev"),O(I,"href","#paramsborough"),O(i,"class","markdown"),O(i,"id","paramsborough")},m(e,t){R(e,n,t),x.m(document.head,null),K(document.head,r),K(document.head,a),K(document.head,m),R(e,d,t),R(e,i,t),K(i,I),K(I,_),R(e,V,t),l&&l.m(e,t),R(e,q,t),N(f,e,t),R(e,k,t),u&&u.m(e,t),R(e,y,t),N($,e,t),R(e,M,t),N(v,e,t),R(e,Q,t),N(p,e,t),R(e,z,t),N(h,e,t),R(e,U,t),s&&s.m(e,t),R(e,T,t),N(C,e,t),w=!0},p(e,[t]){x.p(e,t),(!w||t&1)&&A!==(A=e[0].borough+"")&&ye(_,A),e[1]?l?(l.p(e,t),t&2&&g(l,1)):(l=me(e),l.c(),g(l,1),l.m(q.parentNode,q)):l&&(ee(),b(l,1,1,()=>{l=null}),Z());const P={};t&2&&(P.data=e[1]),f.$set(P),e[2]?u?(u.p(e,t),t&4&&g(u,1)):(u=fe(e),u.c(),g(u,1),u.m(y.parentNode,y)):u&&(ee(),b(u,1,1,()=>{u=null}),Z());const J={};t&4&&(J.data=e[2]),$.$set(J);const re={};t&4&&(re.data=e[2]),v.$set(re);const oe={};t&4&&(oe.data=e[2]),p.$set(oe);const se={};t&4&&(se.data=e[2]),h.$set(se),e[3]?s?(s.p(e,t),t&8&&g(s,1)):(s=de(e),s.c(),g(s,1),s.m(T.parentNode,T)):s&&(ee(),b(s,1,1,()=>{s=null}),Z());const ne={};t&8&&(ne.data=e[3]),C.$set(ne)},i(e){w||(g(l),g(f.$$.fragment,e),g(u),g($.$$.fragment,e),g(v.$$.fragment,e),g(p.$$.fragment,e),g(h.$$.fragment,e),g(s),g(C.$$.fragment,e),w=!0)},o(e){b(l),b(f.$$.fragment,e),b(u),b($.$$.fragment,e),b(v.$$.fragment,e),b(p.$$.fragment,e),b(h.$$.fragment,e),b(s),b(C.$$.fragment,e),w=!1},d(e){e&&(c(n),c(d),c(i),c(V),c(q),c(k),c(y),c(M),c(Q),c(z),c(U),c(T)),x.d(e),c(r),c(a),c(m),l&&l.d(e),H(f,e),u&&u.d(e),H($,e),H(v,e),H(p,e),H(h,e),s&&s.d(e),H(C,e)}}}function Ne(o,n,r){let a,m;le(o,Ie,s=>r(19,a=s)),le(o,ue,s=>r(23,m=s));let{data:d}=n,{data:i={},customFormattingSettings:I,__db:A,inputs:_}=d;$e(ue,m="4e049e3b2a8bb91efd330a1ee52e17df",m);let V=Ce(Fe(_));he(V.subscribe(s=>r(6,_=s))),we(Ee,{getCustomFormats:()=>I.customFormats||[]});const q=(s,e)=>Te(A.query,s,{query_name:e});Re(q);let f=a.params;ke(()=>!0);let k={initialData:void 0,initialError:void 0},y=G`select * from taxi.dates`,$="select * from taxi.dates";i.date_range_data&&(i.date_range_data instanceof Error?k.initialError=i.date_range_data:k.initialData=i.date_range_data,i.date_range_columns&&(k.knownColumns=i.date_range_columns));let M,v=!1;const Q=ae.createReactive({callback:s=>{r(1,M=s)},execFn:q},{id:"date_range",...k});Q($,{noResolve:y,...k}),globalThis[Symbol.for("date_range")]={get value(){return M}};let p={initialData:void 0,initialError:void 0},z=G`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary_borough +left join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}')`,h=`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary_borough +left join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}')`;i.aggregate_stats_data&&(i.aggregate_stats_data instanceof Error?p.initialError=i.aggregate_stats_data:p.initialData=i.aggregate_stats_data,i.aggregate_stats_columns&&(p.knownColumns=i.aggregate_stats_columns));let U,T=!1;const C=ae.createReactive({callback:s=>{r(2,U=s)},execFn:q},{id:"aggregate_stats",...p});C(h,{noResolve:z,...p}),globalThis[Symbol.for("aggregate_stats")]={get value(){return U}};let w={initialData:void 0,initialError:void 0},j=G`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}') +group by all +order by 1`,B=`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}') +group by all +order by 1`;i.fares_by_pickup_location_data&&(i.fares_by_pickup_location_data instanceof Error?w.initialError=i.fares_by_pickup_location_data:w.initialData=i.fares_by_pickup_location_data,i.fares_by_pickup_location_columns&&(w.knownColumns=i.fares_by_pickup_location_columns));let x,l=!1;const u=ae.createReactive({callback:s=>{r(3,x=s)},execFn:q},{id:"fares_by_pickup_location",...w});return u(B,{noResolve:j,...w}),globalThis[Symbol.for("fares_by_pickup_location")]={get value(){return x}},o.$$set=s=>{"data"in s&&r(4,d=s.data)},o.$$.update=()=>{o.$$.dirty&16&&r(5,{data:i={},customFormattingSettings:I,__db:A}=d,i),o.$$.dirty&32&&qe.set(Object.keys(i).length>0),o.$$.dirty&524288&&r(0,f=a.params),o.$$.dirty&1920&&(y||!v?y||(Q($,{noResolve:y,...k}),r(10,v=!0)):Q($,{noResolve:y})),o.$$.dirty&65&&r(12,z=G`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary_borough +left join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}')`),o.$$.dirty&65&&r(13,h=`select + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance, + sum(fare_amount)/sum(trip_distance) as fare_per_mile +from taxi.summary_borough +left join zones.zones z on taxi.summary_borough.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}')`),o.$$.dirty&30720&&(z||!T?z||(C(h,{noResolve:z,...p}),r(14,T=!0)):C(h,{noResolve:z})),o.$$.dirty&65&&r(16,j=G`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}') +group by all +order by 1`),o.$$.dirty&65&&r(17,B=`select + pickup_location_id, + zone, + borough, + sum(rides) as rides, + sum(fare_amount) as fare_amount, + sum(trip_distance) as trip_distance +from taxi.location l +left join zones.zones z on l.pickup_location_id = z.location_id +where day between '${_.date_range.start}' and '${_.date_range.end}' +and lower(borough) = lower('${f.borough}') +group by all +order by 1`),o.$$.dirty&491520&&(j||!l?j||(u(B,{noResolve:j,...w}),r(18,l=!0)):u(B,{noResolve:j}))},r(8,y=G`select * from taxi.dates`),r(9,$="select * from taxi.dates"),[f,M,U,x,d,i,_,k,y,$,v,p,z,h,T,w,j,B,l,a]}class Be extends ve{constructor(n){super(),ze(this,n,Ne,Se,ce,{data:4})}}export{Be as component}; diff --git a/_app/immutable/nodes/6.Jl8FJZCP.js b/_app/immutable/nodes/6.Jl8FJZCP.js new file mode 100644 index 0000000000000000000000000000000000000000..8c05edf2b4fe54abb6a368b83c980e515af595e7 --- /dev/null +++ b/_app/immutable/nodes/6.Jl8FJZCP.js @@ -0,0 +1 @@ +import{s as Y,e as C,a as q,d as R,H as ne,c as D,g as v,f as h,j as S,k,l as Q,J as le,B as T,K as re,L as ie,r as ae,n as oe,b as V,t as A,i as N,m as ue,I as fe,u as Z,M as ce,N as me}from"../chunks/scheduler.B2FSa8mv.js";import{S as $,i as x,t as p,g as j,b as E,d as L,c as I,a as H,m as P,e as z,f as M}from"../chunks/index.CzNnnxDZ.js";import{b as de,c as O,d as _e,g as he,E as J,h as K,i as be,D as ge,j as W}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import"../chunks/entry.CmEkywbK.js";import{B as F}from"../chunks/Button.DWcgwDfR.js";function G(r){let e,t,l,s,n;return t=new F({props:{size:"sm",outline:!0,icon:r[1]?J:K,$$slots:{default:[ye]},$$scope:{ctx:r}}}),t.$on("click",r[12]),s=new F({props:{size:"sm",variant:"positive",outline:!0,icon:be,$$slots:{default:[we]},$$scope:{ctx:r}}}),s.$on("click",r[13]),{c(){e=C("div"),I(t.$$.fragment),l=q(),I(s.$$.fragment),this.h()},l(i){e=R(i,"DIV",{class:!0});var m=v(e);H(t.$$.fragment,m),l=D(m),H(s.$$.fragment,m),m.forEach(h),this.h()},h(){S(e,"class","absolute bottom-2 right-2 z-10 flex gap-2")},m(i,m){k(i,e,m),P(t,e,null),Q(e,l),P(s,e,null),n=!0},p(i,m){const g={};m&2&&(g.icon=i[1]?J:K),m&131074&&(g.$$scope={dirty:m,ctx:i}),t.$set(g);const b={};m&131072&&(b.$$scope={dirty:m,ctx:i}),s.$set(b)},i(i){n||(p(t.$$.fragment,i),p(s.$$.fragment,i),n=!0)},o(i){E(t.$$.fragment,i),E(s.$$.fragment,i),n=!1},d(i){i&&h(e),z(t),z(s)}}}function pe(r){let e;return{c(){e=A("Show Results")},l(t){e=N(t,"Show Results")},m(t,l){k(t,e,l)},d(t){t&&h(e)}}}function ke(r){let e;return{c(){e=A("Hide Results")},l(t){e=N(t,"Hide Results")},m(t,l){k(t,e,l)},d(t){t&&h(e)}}}function ye(r){let e;function t(n,i){return n[1]?ke:pe}let l=t(r),s=l(r);return{c(){s.c(),e=V()},l(n){s.l(n),e=V()},m(n,i){s.m(n,i),k(n,e,i)},p(n,i){l!==(l=t(n))&&(s.d(1),s=l(n),s&&(s.c(),s.m(e.parentNode,e)))},d(n){n&&h(e),s.d(n)}}}function we(r){let e;return{c(){e=A("Submit")},l(t){e=N(t,"Submit")},m(t,l){k(t,e,l)},d(t){t&&h(e)}}}function U(r){let e,t=r[9].error+"",l;return{c(){e=C("pre"),l=A(t),this.h()},l(s){e=R(s,"PRE",{class:!0});var n=v(e);l=N(n,t),n.forEach(h),this.h()},h(){S(e,"class","text-negative text-xs font-mono")},m(s,n){k(s,e,n),Q(e,l)},p(s,n){n&512&&t!==(t=s[9].error+"")&&ue(l,t)},d(s){s&&h(e)}}}function X(r){let e,t,l,s;return t=new ge({props:{data:r[9]}}),{c(){e=C("div"),I(t.$$.fragment)},l(n){e=R(n,"DIV",{});var i=v(e);H(t.$$.fragment,i),i.forEach(h)},m(n,i){k(n,e,i),P(t,e,null),s=!0},p(n,i){const m={};i&512&&(m.data=n[9]),t.$set(m)},i(n){s||(p(t.$$.fragment,n),n&&fe(()=>{s&&(l||(l=M(e,W,{},!0)),l.run(1))}),s=!0)},o(n){E(t.$$.fragment,n),n&&(l||(l=M(e,W,{},!1)),l.run(0)),s=!1},d(n){n&&h(e),z(t),n&&l&&l.end()}}}function Ee(r){let e,t="SQL Console",l,s,n,i,m,g=r[9].error&&!r[2]&&!!r[4],b,y,_,w,a=!r[3]&&G(r),u=g&&U(r),f=r[1]&&X(r);return{c(){e=C("h1"),e.textContent=t,l=q(),s=C("section"),n=C("div"),a&&a.c(),m=q(),u&&u.c(),b=q(),f&&f.c(),this.h()},l(o){e=R(o,"H1",{class:!0,"data-svelte-h":!0}),ne(e)!=="svelte-7ylf69"&&(e.textContent=t),l=D(o),s=R(o,"SECTION",{class:!0,role:!0});var d=v(s);n=R(d,"DIV",{class:!0});var B=v(n);a&&a.l(B),B.forEach(h),m=D(d),u&&u.l(d),b=D(d),f&&f.l(d),d.forEach(h),this.h()},h(){S(e,"class","markdown"),S(n,"class","w-full relative rounded border border-base-300 min-h-[8rem] cursor-text"),S(s,"class","px-0 py-2 flex flex-col gap-2 min-h-[8rem] svelte-1bw0fbe"),S(s,"role","none")},m(o,d){k(o,e,d),k(o,l,d),k(o,s,d),Q(s,n),a&&a.m(n,null),r[14](n),Q(s,m),u&&u.m(s,null),Q(s,b),f&&f.m(s,null),y=!0,_||(w=[le(i=de.call(null,n,{...r[5],theme:r[8]})),T(s,"click",r[15]),T(s,"keydown",r[16])],_=!0)},p(o,[d]){o[3]?a&&(j(),E(a,1,1,()=>{a=null}),L()):a?(a.p(o,d),d&8&&p(a,1)):(a=G(o),a.c(),p(a,1),a.m(n,null)),i&&re(i.update)&&d&288&&i.update.call(null,{...o[5],theme:o[8]}),d&532&&(g=o[9].error&&!o[2]&&!!o[4]),g?u?u.p(o,d):(u=U(o),u.c(),u.m(s,b)):u&&(u.d(1),u=null),o[1]?f?(f.p(o,d),d&2&&p(f,1)):(f=X(o),f.c(),p(f,1),f.m(s,null)):f&&(j(),E(f,1,1,()=>{f=null}),L())},i(o){y||(p(a),p(f),y=!0)},o(o){E(a),E(f),y=!1},d(o){o&&(h(e),h(l),h(s)),a&&a.d(),r[14](null),u&&u.d(),f&&f.d(),_=!1,ie(w)}}}function Se(r,e,t){let l,s,n=Z,i=()=>(n(),n=ce(a,c=>t(9,s=c)),a);r.$$.on_destroy.push(()=>n());let{hideErrors:m=!1}=e,{initialQuery:g="select 'ABC' as category, 123 as num, 26400000 as sales_usd"}=e,{showResults:b=!0}=e,{disabled:y=!1}=e,_=g,w=_,{data:a=O(_)}=e;i();let u,f;ae(async()=>{a&&a.fetch(),t(5,f={initialState:g,disabled:y,schema:await _e(),onChange:c=>{c.docChanged&&w.trim()!==c.state.doc.toString().trim()&&t(6,w=c.state.doc.toString())},onSubmit:()=>(t(4,_=w.trim()),_.endsWith(";")&&t(4,_=_.substring(0,_.length-1)),t(1,b=!0),!0)})});const{theme:o}=he();oe(r,o,c=>t(8,l=c));const d=()=>t(1,b=!b),B=()=>{t(4,_=w),t(1,b=!0)};function ee(c){me[c?"unshift":"push"](()=>{u=c,t(7,u)})}const te=()=>u==null?void 0:u.focus(),se=c=>c.key==="Enter"&&(u==null?void 0:u.focus());return r.$$set=c=>{"hideErrors"in c&&t(2,m=c.hideErrors),"initialQuery"in c&&t(11,g=c.initialQuery),"showResults"in c&&t(1,b=c.showResults),"disabled"in c&&t(3,y=c.disabled),"data"in c&&i(t(0,a=c.data))},r.$$.update=()=>{r.$$.dirty&17&&_&&(i(t(0,a=O(_))),a.fetch()),r.$$.dirty&40&&f&&t(5,f.disabled=y,f)},[a,b,m,y,_,f,w,u,l,s,o,g,d,B,ee,te,se]}class Ce extends ${constructor(e){super(),x(this,e,Se,Ee,Y,{hideErrors:2,initialQuery:11,showResults:1,disabled:3,data:0})}}function Re(r){let e,t;return e=new Ce({}),{c(){I(e.$$.fragment)},l(l){H(e.$$.fragment,l)},m(l,s){P(e,l,s),t=!0},p:Z,i(l){t||(p(e.$$.fragment,l),t=!0)},o(l){E(e.$$.fragment,l),t=!1},d(l){z(e,l)}}}class Ie extends ${constructor(e){super(),x(this,e,null,Re,Y,{})}}export{Ie as component}; diff --git a/_app/immutable/nodes/7.KNtEiiIo.js b/_app/immutable/nodes/7.KNtEiiIo.js new file mode 100644 index 0000000000000000000000000000000000000000..20c6483141195187a7cef6413ff74226cb64f3e7 --- /dev/null +++ b/_app/immutable/nodes/7.KNtEiiIo.js @@ -0,0 +1,5 @@ +import{s as K,b as L,k,f as b,t as N,e as $,i as A,d as v,g as T,j as E,l as y,u as I,a as j,c as O,A as S,B as Q,H as B}from"../chunks/scheduler.B2FSa8mv.js";import{S as X,i as Y,t as g,b as w,g as P,d as R,c as q,a as D,m as M,e as U}from"../chunks/index.CzNnnxDZ.js";import{k as H,u as Z,I as x,l as te,o as ee,T as le,m as ne}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import"../chunks/entry.CmEkywbK.js";import{h as ae,u as oe}from"../chunks/await_block.Dveih0bk.js";function F(m,e,l){const t=m.slice();return t[8]=e[l][0],t[9]=e[l][1],t}function V(m,e,l){const t=m.slice();return t[12]=e[l][0],t[13]=e[l][1],t}function se(m){let e,l,t=m[16].message+"",n;return{c(){e=N(`An error was encountered while loading project schema. + + `),l=$("pre"),n=N(t),this.h()},l(c){e=A(c,`An error was encountered while loading project schema. + + `),l=v(c,"PRE",{class:!0});var u=T(l);n=A(u,t),u.forEach(b),this.h()},h(){E(l,"class","px-4 py-2 bg-negative")},m(c,u){k(c,e,u),k(c,l,u),y(l,n)},p:I,i:I,o:I,d(c){c&&(b(e),b(l))}}}function re(m){let e,l,t,n=[],c=new Map,u,h=H(Object.entries(m[7]));const i=o=>o[8];for(let o=0;oi[12];for(let i=0;i{s=null}),R())},i(f){a||(g(n.$$.fragment,f),g(s),a=!0)},o(f){w(n.$$.fragment,f),w(s),a=!1},d(f){f&&(b(l),b(i),b(o)),U(n),s&&s.d(f),_=!1,r()}}}function J(m,e){let l,t,n,c,u=e[8]+"",h,i,o,a,_,r;n=new x({props:{src:te,class:"w-5 h-5 mr-1"}});function p(){return e[4](e[8])}let s=e[1]===e[8]&&W(e);return{key:m,first:null,c(){l=$("li"),t=$("button"),q(n.$$.fragment),c=j(),h=N(u),i=j(),s&&s.c(),o=L(),this.h()},l(f){l=v(f,"LI",{class:!0});var d=T(l);t=v(d,"BUTTON",{class:!0});var C=T(t);D(n.$$.fragment,C),c=O(C),h=A(C,u),C.forEach(b),d.forEach(b),i=O(f),s&&s.l(f),o=L(),this.h()},h(){E(t,"class","bg-base-200 px-2 py-1 rounded font-bold flex w-full hover:bg-base-300 hover:text-base-content"),S(t,"bg-info",e[1]===e[8]),S(t,"text-info-content",e[1]===e[8]),E(l,"class","font-mono m-0 text-sm"),this.first=l},m(f,d){k(f,l,d),y(l,t),M(n,t,null),y(t,c),y(t,h),k(f,i,d),s&&s.m(f,d),k(f,o,d),a=!0,_||(r=Q(t,"click",p),_=!0)},p(f,d){e=f,(!a||d&6)&&S(t,"bg-info",e[1]===e[8]),(!a||d&6)&&S(t,"text-info-content",e[1]===e[8]),e[1]===e[8]?s?(s.p(e,d),d&2&&g(s,1)):(s=W(e),s.c(),g(s,1),s.m(o.parentNode,o)):s&&(P(),w(s,1,1,()=>{s=null}),R())},i(f){a||(g(n.$$.fragment,f),g(s),a=!0)},o(f){w(n.$$.fragment,f),w(s),a=!1},d(f){f&&(b(l),b(i),b(o)),U(n),s&&s.d(f),_=!1,r()}}}function ie(m){let e;return{c(){e=N("Loading Schema Information...")},l(l){e=A(l,"Loading Schema Information...")},m(l,t){k(l,e,t)},p:I,i:I,o:I,d(l){l&&b(e)}}}function ce(m){let e,l,t={ctx:m,current:null,token:null,hasCatch:!0,pending:ie,then:re,catch:se,value:7,error:16,blocks:[,,,]};return ae(m[2](),t),{c(){e=L(),t.block.c()},l(n){e=L(),t.block.l(n)},m(n,c){k(n,e,c),t.block.m(n,t.anchor=c),t.mount=()=>e.parentNode,t.anchor=e,l=!0},p(n,[c]){m=n,oe(t,m,c)},i(n){l||(g(t.block),l=!0)},o(n){for(let c=0;c<3;c+=1){const u=t.blocks[c];w(u)}l=!1},d(n){n&&b(e),t.block.d(n),t.token=null,t=null}}}function fe(m,e,l){let{data:t}=e,{__db:n}=t;async function c(){const a=await n.query("SELECT * FROM information_schema.tables WHERE table_catalog = 'memory' AND table_name != 'stats'"),_={};return await Promise.all(a.map(async r=>{const p=await n.query(`SELECT * FROM information_schema.columns WHERE table_name = '${r.table_name}' AND table_schema = '${r.table_schema}'`);_[r.table_schema]||(_[r.table_schema]={}),_[r.table_schema][r.table_name]={table:r,columns:p}})),_}let u="",h="";const i=a=>{l(1,h=h===a?"":a),l(0,u="")},o=a=>{l(0,u=u===a?"":a)};return m.$$set=a=>{"data"in a&&l(3,t=a.data)},[u,h,c,t,i,o]}class ue extends X{constructor(e){super(),Y(this,e,fe,ce,K,{data:3})}}function me(m){let e,l="Project Schema",t,n,c="This page details the tables and columns that are currently loaded in your project.",u,h,i="Sources",o,a,_;return a=new ue({props:{data:m[0]}}),{c(){e=$("h1"),e.textContent=l,t=j(),n=$("p"),n.textContent=c,u=j(),h=$("h2"),h.textContent=i,o=j(),q(a.$$.fragment),this.h()},l(r){e=v(r,"H1",{class:!0,"data-svelte-h":!0}),B(e)!=="svelte-15777oi"&&(e.textContent=l),t=O(r),n=v(r,"P",{class:!0,"data-svelte-h":!0}),B(n)!=="svelte-ak948l"&&(n.textContent=c),u=O(r),h=v(r,"H2",{class:!0,"data-svelte-h":!0}),B(h)!=="svelte-9qt1ro"&&(h.textContent=i),o=O(r),D(a.$$.fragment,r),this.h()},h(){E(e,"class","markdown"),E(n,"class","markdown"),E(h,"class","markdown")},m(r,p){k(r,e,p),k(r,t,p),k(r,n,p),k(r,u,p),k(r,h,p),k(r,o,p),M(a,r,p),_=!0},p(r,[p]){const s={};p&1&&(s.data=r[0]),a.$set(s)},i(r){_||(g(a.$$.fragment,r),_=!0)},o(r){w(a.$$.fragment,r),_=!1},d(r){r&&(b(e),b(t),b(n),b(u),b(h),b(o)),U(a,r)}}}function he(m,e,l){let{data:t}=e;return m.$$set=n=>{"data"in n&&l(0,t=n.data)},[t]}class ge extends X{constructor(e){super(),Y(this,e,he,me,K,{data:0})}}export{ge as component}; diff --git a/_app/immutable/nodes/8.7FYwEOQO.js b/_app/immutable/nodes/8.7FYwEOQO.js new file mode 100644 index 0000000000000000000000000000000000000000..365de1280d5a8211ba6c4dcddc30dc914f6e622e --- /dev/null +++ b/_app/immutable/nodes/8.7FYwEOQO.js @@ -0,0 +1,63 @@ +import{s as be,e as b,t as Z,a as M,d as y,g as D,i as Q,f as h,c as q,j as _,k as N,l as m,ag as ce,B as de,u as ee,L as Ye,m as he,N as Xe,H as K,I as Ae,A as Fe,ah as Ve,ai as es,aj as We,ak as Oe,a7 as vn,al as $t,b as me,am as bn,J as nl,Q as yn,R as kn,U as vs,K as ts,z as ll,D as il,E as rl,F as ol}from"../chunks/scheduler.B2FSa8mv.js";import{S as ye,i as ke,k as Ze,c as Y,a as X,m as z,t as F,f as Be,b as H,e as J,g as _e,d as ve,j as yt}from"../chunks/index.CzNnnxDZ.js";import{k as pe,ar as wn,j as He,as as Qe,at as Cn,au as ot,av as $n,aw as Tn,ax as Le,ay as rt,az as ss,aA as ns,aB as ls,aC as al,aD as et,aE as cl,aF as ul,aG as It,aH as Dt,aI as bs,aJ as fl,aK as ys,aL as ks,aM as Ot,aN as dl,aO as hl,aP as is,aQ as ml,aR as Ge,aS as wt,aT as Nt,aU as at,aV as ws,aW as pl,aX as gl,aY as _l,aZ as rs,a_ as jt,a$ as vl,b0 as bl,b1 as En,b2 as lt,b3 as Sn,b4 as yl,b5 as Pt,b6 as kl,b7 as In,b8 as wl,b9 as Cl,ba as $l,bb as Tl,bc as El,bd as Sl,be as Nn,bf as Il,bg as Nl,I as Me,l as Al,bh as Ll,bi as Ol,bj as kt,bk as An,bl as Pl,a as Dl,bm as ct,bn as ut,bo as jl,u as Ml,bp as ql,bq as os,ah as Xt,br as Fl,bs as Tt,bt as Ln,bu as On}from"../chunks/VennDiagram.svelte_svelte_type_style_lang.BvCrDgSx.js";import{p as Vl,i as Bl,a as Hl}from"../chunks/entry.CmEkywbK.js";import{B as ft}from"../chunks/Button.DWcgwDfR.js";import{s as Wt}from"../chunks/index.CqVitEmB.js";import{A as Rl,a as Ul}from"../chunks/AccordionItem.BAM5BvX8.js";import{C as Kl,P as Kt}from"../chunks/Prismjs.DElG_ecN.js";function Cs(l){let e,t;return{c(){e=b("span"),t=Z(l[1]),this.h()},l(s){e=y(s,"SPAN",{class:!0});var n=D(e);t=Q(n,l[1]),n.forEach(h),this.h()},h(){_(e,"class","text-negative font-bold text-sm")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&2&&he(t,s[1])},d(s){s&&h(e)}}}function xl(l){let e,t,s,n,i,r,o,a=l[1]&&Cs(l);return{c(){e=b("label"),t=Z(`Source name + `),s=b("input"),n=M(),i=b("div"),a&&a.c(),this.h()},l(c){e=y(c,"LABEL",{for:!0,class:!0});var u=D(e);t=Q(u,`Source name + `),s=y(u,"INPUT",{name:!0,class:!0}),u.forEach(h),n=q(c),i=y(c,"DIV",{class:!0});var f=D(i);a&&a.l(f),f.forEach(h),this.h()},h(){s.required=!0,_(s,"name","sourceName"),_(s,"class","rounded border border-base-300 bg-base-100 p-1 ml-auto w-2/3 align-middle text-sm"),_(e,"for","sourceName"),_(e,"class","flex justify-between w-full"),_(i,"class","flex justify-end w-full")},m(c,u){N(c,e,u),m(e,t),m(e,s),ce(s,l[0]),N(c,n,u),N(c,i,u),a&&a.m(i,null),r||(o=[de(s,"input",l[2]),de(s,"change",l[3])],r=!0)},p(c,[u]){u&1&&s.value!==c[0]&&ce(s,c[0]),c[1]?a?a.p(c,u):(a=Cs(c),a.c(),a.m(i,null)):a&&(a.d(1),a=null)},i:ee,o:ee,d(c){c&&(h(e),h(n),h(i)),a&&a.d(),r=!1,Ye(o)}}}const Gl=/^[\w_]+$/,Pn=(l,e)=>l.length<1?"Source name must be set.":Gl.test(l)?l&&e.some(t=>t.name===l)?`A source named ${l} already exists.`:"":"Source names can only contain letters, numbers, and underscores.";function Yl(l,e,t){let{sourceName:s}=e,{nameError:n}=e;function i(){s=this.value,t(0,s)}const r=()=>t(1,n="");return l.$$set=o=>{"sourceName"in o&&t(0,s=o.sourceName),"nameError"in o&&t(1,n=o.nameError)},[s,n,i,r]}class Dn extends ye{constructor(e){super(),ke(this,e,Yl,xl,be,{sourceName:0,nameError:1})}}function $s(l,e,t){const s=l.slice();s[11]=e[t][0],s[12]=e[t][1];const n=s[12].package.package.evidence.datasources;return s[13]=n,s}function Ts(l,e,t){const s=l.slice();return s[16]=e[t],s}function zl(l){let e,t=l[16]+"",s,n;return{c(){e=b("option"),s=Z(t),this.h()},l(i){e=y(i,"OPTION",{});var r=D(e);s=Q(r,t),r.forEach(h),this.h()},h(){e.__value=n=l[16],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s)},p(i,r){r&1&&t!==(t=i[16]+"")&&he(s,t),r&1&&n!==(n=i[16])&&(e.__value=n,ce(e,e.__value))},d(i){i&&h(e)}}}function Jl(l){let e;function t(i,r){return i[16].length?Wl:Xl}let s=t(l),n=s(l);return{c(){n.c(),e=me()},l(i){n.l(i),e=me()},m(i,r){n.m(i,r),N(i,e,r)},p(i,r){s===(s=t(i))&&n?n.p(i,r):(n.d(1),n=s(i),n&&(n.c(),n.m(e.parentNode,e)))},d(i){i&&h(e),n.d(i)}}}function Xl(l){return{c:ee,l:ee,m:ee,p:ee,d:ee}}function Wl(l){let e,t=l[16][0]+"",s,n;return{c(){e=b("option"),s=Z(t),this.h()},l(i){e=y(i,"OPTION",{});var r=D(e);s=Q(r,t),r.forEach(h),this.h()},h(){e.__value=n=l[16][0],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s)},p(i,r){r&1&&t!==(t=i[16][0]+"")&&he(s,t),r&1&&n!==(n=i[16][0])&&(e.__value=n,ce(e,e.__value))},d(i){i&&h(e)}}}function Es(l){let e,t;function s(r,o){return o&1&&(e=null),e==null&&(e=!!Array.isArray(r[16])),e?Jl:zl}let n=s(l,-1),i=n(l);return{c(){i.c(),t=me()},l(r){i.l(r),t=me()},m(r,o){i.m(r,o),N(r,t,o)},p(r,o){n===(n=s(r,o))&&i?i.p(r,o):(i.d(1),i=n(r),i&&(i.c(),i.m(t.parentNode,t)))},d(r){r&&h(t),i.d(r)}}}function Ss(l){let e,t,s=pe(l[13]),n=[];for(let i=0;iZe(f,"sourceName",R)),Xe.push(()=>Ze(f,"nameError",L)),v=new ft({props:{size:"md",icon:wn,variant:"positive",type:"submit",$$slots:{default:[Zl]},$$scope:{ctx:l}}}),{c(){e=b("div"),t=b("form"),s=b("h3"),s.textContent=n,i=M(),r=b("label"),o=Z(`Datasource Type + `),a=b("select");for(let S=0;S<$.length;S+=1)$[S].c();c=M(),u=b("div"),Y(f.$$.fragment),g=M(),k=b("div"),Y(v.$$.fragment),this.h()},l(S){e=y(S,"DIV",{class:!0});var I=D(e);t=y(I,"FORM",{class:!0});var O=D(t);s=y(O,"H3",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-1ooj2sn"&&(s.textContent=n),i=q(O),r=y(O,"LABEL",{for:!0,class:!0});var P=D(r);o=Q(P,`Datasource Type + `),a=y(P,"SELECT",{name:!0,class:!0});var T=D(a);for(let W=0;W<$.length;W+=1)$[W].l(T);T.forEach(h),P.forEach(h),c=q(O),u=y(O,"DIV",{});var B=D(u);X(f.$$.fragment,B),B.forEach(h),g=q(O),k=y(O,"DIV",{class:!0});var U=D(k);X(v.$$.fragment,U),U.forEach(h),O.forEach(h),I.forEach(h),this.h()},h(){_(s,"class","text-sm uppercase font-bold text-left"),a.required=!0,_(a,"name","sourceType"),_(a,"class","rounded border border-base-300 bg-base-100 p-1 ml-auto w-2/3 align-middle text-sm"),l[2]===void 0&&Ae(()=>l[7].call(a)),_(r,"for","sourceType"),_(r,"class","flex justify-between w-full"),_(k,"class","ml-auto"),_(t,"class","flex flex-col w-full gap-4"),_(e,"class","col-span-4 w-full flex justify-end items-end flex-col py-4 px-4 rounded"),Fe(e,"bg-base-200",!l[1])},m(S,I){N(S,e,I),m(e,t),m(t,s),m(t,i),m(t,r),m(r,o),m(r,a);for(let O=0;O<$.length;O+=1)$[O]&&$[O].m(a,null);Ve(a,l[2],!0),m(t,c),m(t,u),z(f,u,null),m(t,g),m(t,k),z(v,k,null),C=!0,E||(A=[de(a,"change",l[7]),de(t,"submit",es(l[5]))],E=!0)},p(S,[I]){if(I&1){j=pe(Object.entries(S[0]));let T;for(T=0;Td=!1)),!p&&I&16&&(p=!0,O.nameError=S[4],We(()=>p=!1)),f.$set(O);const P={};I&524288&&(P.$$scope={dirty:I,ctx:S}),v.$set(P),(!C||I&2)&&Fe(e,"bg-base-200",!S[1])},i(S){C||(F(f.$$.fragment,S),F(v.$$.fragment,S),S&&Ae(()=>{C&&(w||(w=Be(e,He,{},!0)),w.run(1))}),C=!0)},o(S){H(f.$$.fragment,S),H(v.$$.fragment,S),S&&(w||(w=Be(e,He,{},!1)),w.run(0)),C=!1},d(S){S&&h(e),Oe($,S),J(f),J(v),S&&w&&w.end(),E=!1,Ye(A)}}}function ei(l,e,t){let{availablePackages:s}=e,{ghost:n=!1}=e,{existingSources:i=[]}=e,r="",o="";const a=vn();let c="";function u(){t(4,c=Pn(o,i)),!c&&(a("newSource",{newSourceType:r,newSourceName:o}),t(3,o=""))}function f(){r=$t(this),t(2,r),t(0,s)}function d(g){o=g,t(3,o)}function p(g){c=g,t(4,c)}return l.$$set=g=>{"availablePackages"in g&&t(0,s=g.availablePackages),"ghost"in g&&t(1,n=g.ghost),"existingSources"in g&&t(6,i=g.existingSources)},[s,n,r,o,c,u,i,f,d,p]}class jn extends ye{constructor(e){super(),ke(this,e,ei,Ql,be,{availablePackages:0,ghost:1,existingSources:6})}}var ti={default:{a:{viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M9 5h-2a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-2"},{d:"M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v0a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z"},{d:"M9 17v-4"},{d:"M12 17v-1"},{d:"M15 17v-2"},{d:"M12 17v-1"}]}},si={default:{a:{viewBox:"0 0 200 200",style:"enable-background:new 0 0 791.9 221.6;"},path:[{fill:"currentColor",d:"M 13.53 126.114 C 13.53 126.114 64.492 162.546 67.591 164.363 C 70.582 166.179 74.963 166.606 78.808 165.111 C 82.655 163.615 85.54 160.196 86.395 156.777 C 87.356 153.358 99.002 91.819 99.002 91.819 C 99.108 90.964 99.428 88.507 98.147 86.156 C 96.331 82.951 92.271 81.242 88.638 82.31 C 85.754 83.165 84.258 85.302 83.83 86.049 C 83.19 87.224 82.014 89.148 79.877 90.857 C 78.275 92.139 76.672 92.887 75.924 93.208 C 69.407 95.879 62.142 93.635 57.975 88.293 C 55.411 84.981 50.817 83.699 46.757 85.302 C 42.697 86.904 40.347 91.071 40.667 95.238 C 41.415 101.862 37.676 108.486 31.052 111.156 C 27.526 112.546 23.787 112.546 20.475 111.477 C 19.727 111.263 17.056 110.623 14.385 112.118 C 11.073 113.828 9.363 117.887 10.218 121.52 C 10.859 123.978 12.783 125.58 13.53 126.114 Z",style:"transform-origin: 122.948px 117.753px;"},{fill:"currentColor",d:"M 98.467 46.305 C 98.467 46.305 116.63 106.349 117.912 109.554 C 119.194 112.866 122.399 115.858 126.352 117.032 C 130.306 118.101 134.686 117.247 137.463 115.11 C 140.242 112.973 187.143 71.412 187.143 71.412 C 187.785 70.879 189.494 69.062 189.922 66.391 C 190.455 62.759 188.212 58.912 184.793 57.523 C 182.015 56.455 179.451 57.203 178.703 57.523 C 177.528 58.057 175.391 58.805 172.72 58.912 C 170.583 59.019 168.981 58.592 168.126 58.378 C 161.395 56.455 156.908 50.259 156.908 43.528 C 156.802 39.361 154.023 35.515 149.857 34.339 C 145.583 33.164 141.203 34.98 138.959 38.506 C 135.434 44.275 128.489 47.16 121.651 45.237 C 118.019 44.168 115.027 41.925 113.104 39.04 C 112.57 38.399 110.86 36.263 107.869 35.728 C 104.236 35.087 100.283 37.224 98.788 40.536 C 97.612 43.1 98.254 45.451 98.467 46.305 Z",style:"transform-origin: 122.948px 117.753px;"}]}},ni={default:{a:{role:"img",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},title:[{}],path:[{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4"},{d:"M13.5 6.5l4 4"}]}};const Zt=Object.freeze(Object.defineProperty({__proto__:null,Clipboard:ti,Motherduck:si,Pencil:ni},Symbol.toStringTag,{value:"Module"}));function li(l){const e=JSON.parse(l);return e.data&&(e.data=Vl(e.data)),e}function xt(l){return HTMLElement.prototype.cloneNode.call(l)}function ii(l,e=()=>{}){const t=async({action:n,result:i,reset:r=!0,invalidateAll:o=!0})=>{i.type==="success"&&(r&&HTMLFormElement.prototype.reset.call(l),o&&await Bl()),(location.origin+location.pathname===n.origin+n.pathname||i.type==="redirect"||i.type==="error")&&Hl(i)};async function s(n){var k,v,w,C,E;if(((k=n.submitter)!=null&&k.hasAttribute("formmethod")?n.submitter.formMethod:xt(l).method)!=="post")return;n.preventDefault();const r=new URL((v=n.submitter)!=null&&v.hasAttribute("formaction")?n.submitter.formAction:xt(l).action),o=(w=n.submitter)!=null&&w.hasAttribute("formenctype")?n.submitter.formEnctype:xt(l).enctype,a=new FormData(l),c=(C=n.submitter)==null?void 0:C.getAttribute("name");c&&a.append(c,((E=n.submitter)==null?void 0:E.getAttribute("value"))??"");const u=new AbortController;let f=!1;const p=await e({action:r,cancel:()=>f=!0,controller:u,formData:a,formElement:l,submitter:n.submitter})??t;if(f)return;let g;try{const A=new Headers({accept:"application/json","x-sveltekit-action":"true"});o!=="multipart/form-data"&&A.set("Content-Type",/^(:?application\/x-www-form-urlencoded|text\/plain)$/.test(o)?o:"application/x-www-form-urlencoded");const j=o==="multipart/form-data"?a:new URLSearchParams(a),$=await fetch(r,{method:"POST",headers:A,cache:"no-store",body:j,signal:u.signal});g=li(await $.text()),g.type==="error"&&(g.status=$.status)}catch(A){if((A==null?void 0:A.name)==="AbortError")return;g={type:"error",error:A}}p({action:r,formData:a,formElement:l,update:A=>t({action:r,result:g,reset:A==null?void 0:A.reset,invalidateAll:A==null?void 0:A.invalidateAll}),result:g})}return HTMLFormElement.prototype.addEventListener.call(l,"submit",s),{destroy(){HTMLFormElement.prototype.removeEventListener.call(l,"submit",s)}}}const ht={collection:"map",default:!0,nodeClass:Qe,tag:"tag:yaml.org,2002:map",resolve(l,e){return Cn(l)||e("Expected a mapping for this tag"),l},createNode:(l,e,t)=>Qe.from(l,e,t)},mt={collection:"seq",default:!0,nodeClass:ot,tag:"tag:yaml.org,2002:seq",resolve(l,e){return $n(l)||e("Expected a sequence for this tag"),l},createNode:(l,e,t)=>ot.from(l,e,t)},Mt={identify:l=>typeof l=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:l=>l,stringify(l,e,t,s){return e=Object.assign({actualString:!0},e),Tn(l,e,t,s)}},qt={identify:l=>l==null,createNode:()=>new Le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Le(null),stringify:({source:l},e)=>typeof l=="string"&&qt.test.test(l)?l:e.options.nullStr},as={identify:l=>typeof l=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:l=>new Le(l[0]==="t"||l[0]==="T"),stringify({source:l,value:e},t){if(l&&as.test.test(l)){const s=l[0]==="t"||l[0]==="T";if(e===s)return l}return e?t.options.trueStr:t.options.falseStr}};function qe({format:l,minFractionDigits:e,tag:t,value:s}){if(typeof s=="bigint")return String(s);const n=typeof s=="number"?s:Number(s);if(!isFinite(n))return isNaN(n)?".nan":n<0?"-.inf":".inf";let i=JSON.stringify(s);if(!l&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(i)){let r=i.indexOf(".");r<0&&(r=i.length,i+=".");let o=e-(i.length-r-1);for(;o-- >0;)i+="0"}return i}const Mn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:l=>l.slice(-3).toLowerCase()==="nan"?NaN:l[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:qe},qn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:l=>parseFloat(l),stringify(l){const e=Number(l.value);return isFinite(e)?e.toExponential():qe(l)}},Fn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(l){const e=new Le(parseFloat(l)),t=l.indexOf(".");return t!==-1&&l[l.length-1]==="0"&&(e.minFractionDigits=l.length-t-1),e},stringify:qe},Ft=l=>typeof l=="bigint"||Number.isInteger(l),cs=(l,e,t,{intAsBigInt:s})=>s?BigInt(l):parseInt(l.substring(e),t);function Vn(l,e,t){const{value:s}=l;return Ft(s)&&s>=0?t+s.toString(e):qe(l)}const Bn={identify:l=>Ft(l)&&l>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(l,e,t)=>cs(l,2,8,t),stringify:l=>Vn(l,8,"0o")},Hn={identify:Ft,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(l,e,t)=>cs(l,0,10,t),stringify:qe},Rn={identify:l=>Ft(l)&&l>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(l,e,t)=>cs(l,2,16,t),stringify:l=>Vn(l,16,"0x")},ri=[ht,mt,Mt,qt,as,Bn,Hn,Rn,Mn,qn,Fn];function Is(l){return typeof l=="bigint"||Number.isInteger(l)}const At=({value:l})=>JSON.stringify(l),oi=[{identify:l=>typeof l=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:l=>l,stringify:At},{identify:l=>l==null,createNode:()=>new Le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:At},{identify:l=>typeof l=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:l=>l==="true",stringify:At},{identify:Is,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(l,e,{intAsBigInt:t})=>t?BigInt(l):parseInt(l,10),stringify:({value:l})=>Is(l)?l.toString():JSON.stringify(l)},{identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:l=>parseFloat(l),stringify:At}],ai={default:!0,tag:"",test:/^/,resolve(l,e){return e(`Unresolved plain scalar ${JSON.stringify(l)}`),l}},ci=[ht,mt].concat(oi,ai),us={identify:l=>l instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(l,e){if(typeof Buffer=="function")return Buffer.from(l,"base64");if(typeof atob=="function"){const t=atob(l.replace(/[\n\r]/g,"")),s=new Uint8Array(t.length);for(let n=0;nl===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Le(!0),stringify:Un},xn={identify:l=>l===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Le(!1),stringify:Un},ui={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:l=>l.slice(-3).toLowerCase()==="nan"?NaN:l[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:qe},fi={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:l=>parseFloat(l.replace(/_/g,"")),stringify(l){const e=Number(l.value);return isFinite(e)?e.toExponential():qe(l)}},di={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(l){const e=new Le(parseFloat(l.replace(/_/g,""))),t=l.indexOf(".");if(t!==-1){const s=l.substring(t+1).replace(/_/g,"");s[s.length-1]==="0"&&(e.minFractionDigits=s.length)}return e},stringify:qe},Et=l=>typeof l=="bigint"||Number.isInteger(l);function Vt(l,e,t,{intAsBigInt:s}){const n=l[0];if((n==="-"||n==="+")&&(e+=1),l=l.substring(e).replace(/_/g,""),s){switch(t){case 2:l=`0b${l}`;break;case 8:l=`0o${l}`;break;case 16:l=`0x${l}`;break}const r=BigInt(l);return n==="-"?BigInt(-1)*r:r}const i=parseInt(l,t);return n==="-"?-1*i:i}function fs(l,e,t){const{value:s}=l;if(Et(s)){const n=s.toString(e);return s<0?"-"+t+n.substr(1):t+n}return qe(l)}const hi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(l,e,t)=>Vt(l,2,2,t),stringify:l=>fs(l,2,"0b")},mi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(l,e,t)=>Vt(l,1,8,t),stringify:l=>fs(l,8,"0")},pi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(l,e,t)=>Vt(l,0,10,t),stringify:qe},gi={identify:Et,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(l,e,t)=>Vt(l,2,16,t),stringify:l=>fs(l,16,"0x")};function ds(l,e){const t=l[0],s=t==="-"||t==="+"?l.substring(1):l,n=r=>e?BigInt(r):Number(r),i=s.replace(/_/g,"").split(":").reduce((r,o)=>r*n(60)+n(o),n(0));return t==="-"?n(-1)*i:i}function Gn(l){let{value:e}=l,t=r=>r;if(typeof e=="bigint")t=r=>BigInt(r);else if(isNaN(e)||!isFinite(e))return qe(l);let s="";e<0&&(s="-",e*=t(-1));const n=t(60),i=[e%n];return e<60?i.unshift(0):(e=(e-i[0])/n,i.unshift(e%n),e>=60&&(e=(e-i[0])/n,i.unshift(e))),s+i.map(r=>String(r).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Yn={identify:l=>typeof l=="bigint"||Number.isInteger(l),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(l,e,{intAsBigInt:t})=>ds(l,t),stringify:Gn},zn={identify:l=>typeof l=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:l=>ds(l,!1),stringify:Gn},Bt={identify:l=>l instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(l){const e=l.match(Bt.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,s,n,i,r,o]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(t,s-1,n,i||0,r||0,o||0,a);const u=e[8];if(u&&u!=="Z"){let f=ds(u,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:l})=>l.toISOString().replace(/(T00:00:00)?\.000Z$/,"")},Ns=[ht,mt,Mt,qt,Kn,xn,hi,mi,pi,gi,ui,fi,di,us,rt,ss,ns,ls,Yn,zn,Bt],As=new Map([["core",ri],["failsafe",[ht,mt,Mt]],["json",ci],["yaml11",Ns],["yaml-1.1",Ns]]),Ls={binary:us,bool:as,float:Fn,floatExp:qn,floatNaN:Mn,floatTime:zn,int:Hn,intHex:Rn,intOct:Bn,intTime:Yn,map:ht,merge:rt,null:qt,omap:ss,pairs:ns,seq:mt,set:ls,timestamp:Bt},_i={"tag:yaml.org,2002:binary":us,"tag:yaml.org,2002:merge":rt,"tag:yaml.org,2002:omap":ss,"tag:yaml.org,2002:pairs":ns,"tag:yaml.org,2002:set":ls,"tag:yaml.org,2002:timestamp":Bt};function Gt(l,e,t){const s=As.get(e);if(s&&!l)return t&&!s.includes(rt)?s.concat(rt):s.slice();let n=s;if(!n)if(Array.isArray(l))n=[];else{const i=Array.from(As.keys()).filter(r=>r!=="yaml11").map(r=>JSON.stringify(r)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${i} or define customTags array`)}if(Array.isArray(l))for(const i of l)n=n.concat(i);else typeof l=="function"&&(n=l(n.slice()));return t&&(n=n.concat(rt)),n.reduce((i,r)=>{const o=typeof r=="string"?Ls[r]:r;if(!o){const a=JSON.stringify(r),c=Object.keys(Ls).map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown custom tag ${a}; use one of ${c}`)}return i.includes(o)||i.push(o),i},[])}const vi=(l,e)=>l.keye.key?1:0;class Ht{constructor({compat:e,customTags:t,merge:s,resolveKnownTags:n,schema:i,sortMapEntries:r,toStringDefaults:o}){this.compat=Array.isArray(e)?Gt(e,"compat"):e?Gt(null,e):null,this.name=typeof i=="string"&&i||"core",this.knownTags=n?_i:{},this.tags=Gt(t,this.name,s),this.toStringOptions=o??null,Object.defineProperty(this,al,{value:ht}),Object.defineProperty(this,et,{value:Mt}),Object.defineProperty(this,cl,{value:mt}),this.sortMapEntries=typeof r=="function"?r:r===!0?vi:null}clone(){const e=Object.create(Ht.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function bi(l,e){var a;const t=[];let s=e.directives===!0;if(e.directives!==!1&&l.directives){const c=l.directives.toString(l);c?(t.push(c),s=!0):l.directives.docStart&&(s=!0)}s&&t.push("---");const n=ul(l,e),{commentString:i}=n.options;if(l.commentBefore){t.length!==1&&t.unshift("");const c=i(l.commentBefore);t.unshift(It(c,""))}let r=!1,o=null;if(l.contents){if(Dt(l.contents)){if(l.contents.spaceBefore&&s&&t.push(""),l.contents.commentBefore){const f=i(l.contents.commentBefore);t.push(It(f,""))}n.forceBlockIndent=!!l.comment,o=l.contents.comment}const c=o?void 0:()=>r=!0;let u=bs(l.contents,n,()=>o=null,c);o&&(u+=fl(u,"",i(o))),(u[0]==="|"||u[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${u}`:t.push(u)}else t.push(bs(l.contents,n));if((a=l.directives)!=null&&a.docEnd)if(l.comment){const c=i(l.comment);c.includes(` +`)?(t.push("..."),t.push(It(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=l.comment;c&&r&&(c=c.replace(/^\n+/,"")),c&&((!r||o)&&t[t.length-1]!==""&&t.push(""),t.push(It(i(c),"")))}return t.join(` +`)+` +`}class pt{constructor(e,t,s){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,ys,{value:ks});let n=null;typeof t=="function"||Array.isArray(t)?n=t:s===void 0&&t&&(s=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},s);this.options=i;let{version:r}=i;s!=null&&s._directives?(this.directives=s._directives.atDocument(),this.directives.yaml.explicit&&(r=this.directives.yaml.version)):this.directives=new Ot({version:r}),this.setSchema(r,s),this.contents=e===void 0?null:this.createNode(e,n,s)}clone(){const e=Object.create(pt.prototype,{[ys]:{value:ks}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Dt(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){st(this.contents)&&this.contents.add(e)}addIn(e,t){st(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const s=dl(this);e.anchor=!t||s.has(t)?hl(t||"a",s):t}return new is(e.anchor)}createNode(e,t,s){let n;if(typeof t=="function")e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const v=C=>typeof C=="number"||C instanceof String||C instanceof Number,w=t.filter(v).map(String);w.length>0&&(t=t.concat(w)),n=t}else s===void 0&&t&&(s=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:r,flow:o,keepUndefined:a,onTagObj:c,tag:u}=s??{},{onAnchor:f,setAnchors:d,sourceObjects:p}=_l(this,r||"a"),g={aliasDuplicateObjects:i??!0,keepUndefined:a??!1,onAnchor:f,onTagObj:c,replacer:n,schema:this.schema,sourceObjects:p},k=ml(e,u,g);return o&&Ge(k)&&(k.flow=!0),d(),k}createPair(e,t,s={}){const n=this.createNode(e,null,s),i=this.createNode(t,null,s);return new wt(n,i)}delete(e){return st(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Nt(e)?this.contents==null?!1:(this.contents=null,!0):st(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return Ge(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Nt(e)?!t&&at(this.contents)?this.contents.value:this.contents:Ge(this.contents)?this.contents.getIn(e,t):void 0}has(e){return Ge(this.contents)?this.contents.has(e):!1}hasIn(e){return Nt(e)?this.contents!==void 0:Ge(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=ws(this.schema,[e],t):st(this.contents)&&this.contents.set(e,t)}setIn(e,t){Nt(e)?this.contents=t:this.contents==null?this.contents=ws(this.schema,Array.from(e),t):st(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let s;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ot({version:"1.1"}),s={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Ot({version:e}),s={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,s=null;break;default:{const n=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${n}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(s)this.schema=new Ht(Object.assign(s,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:s,maxAliasCount:n,onAnchor:i,reviver:r}={}){const o={anchors:new Map,doc:this,keep:!e,mapAsMap:s===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},a=pl(this.contents,t??"",o);if(typeof i=="function")for(const{count:c,res:u}of o.anchors.values())i(u,c);return typeof r=="function"?gl(r,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return bi(this,e)}}function st(l){if(Ge(l))return!0;throw new Error("Expected a YAML collection as document contents")}function dt(l,{flow:e,indicator:t,next:s,offset:n,onError:i,parentIndent:r,startOnNewline:o}){let a=!1,c=o,u=o,f="",d="",p=!1,g=!1,k=null,v=null,w=null,C=null,E=null,A=null,j=null;for(const L of l)switch(g&&(L.type!=="space"&&L.type!=="newline"&&L.type!=="comma"&&i(L.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),g=!1),k&&(c&&L.type!=="comment"&&L.type!=="newline"&&i(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),k=null),L.type){case"space":!e&&(t!=="doc-start"||(s==null?void 0:s.type)!=="flow-collection")&&L.source.includes(" ")&&(k=L),u=!0;break;case"comment":{u||i(L,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const V=L.source.substring(1)||" ";f?f+=d+V:f=V,d="",c=!1;break}case"newline":c?f?f+=L.source:a=!0:d+=L.source,c=!0,p=!0,(v||w)&&(C=L),u=!0;break;case"anchor":v&&i(L,"MULTIPLE_ANCHORS","A node can have at most one anchor"),L.source.endsWith(":")&&i(L.offset+L.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),v=L,j===null&&(j=L.offset),c=!1,u=!1,g=!0;break;case"tag":{w&&i(L,"MULTIPLE_TAGS","A node can have at most one tag"),w=L,j===null&&(j=L.offset),c=!1,u=!1,g=!0;break}case t:(v||w)&&i(L,"BAD_PROP_ORDER",`Anchors and tags must be after the ${L.source} indicator`),A&&i(L,"UNEXPECTED_TOKEN",`Unexpected ${L.source} in ${e??"collection"}`),A=L,c=t==="seq-item-ind"||t==="explicit-key-ind",u=!1;break;case"comma":if(e){E&&i(L,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),E=L,c=!1,u=!1;break}default:i(L,"UNEXPECTED_TOKEN",`Unexpected ${L.type} token`),c=!1,u=!1}const $=l[l.length-1],R=$?$.offset+$.source.length:n;return g&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!=="")&&i(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),k&&(c&&k.indent<=r||(s==null?void 0:s.type)==="block-map"||(s==null?void 0:s.type)==="block-seq")&&i(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:A,spaceBefore:a,comment:f,hasNewline:p,anchor:v,tag:w,newlineAfterProp:C,end:R,start:j??R}}function Ct(l){if(!l)return null;switch(l.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(l.source.includes(` +`))return!0;if(l.end){for(const e of l.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of l.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Ct(e.key)||Ct(e.value))return!0}return!1;default:return!0}}function Qt(l,e,t){if((e==null?void 0:e.type)==="flow-collection"){const s=e.end[0];s.indent===l&&(s.source==="]"||s.source==="}")&&Ct(e)&&t(s,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Jn(l,e,t){const{uniqueKeys:s}=l.options;if(s===!1)return!1;const n=typeof s=="function"?s:(i,r)=>i===r||at(i)&&at(r)&&i.value===r.value;return e.some(i=>n(i.key,t))}const Os="All mapping items must start at the same column";function yi({composeNode:l,composeEmptyNode:e},t,s,n,i){var u;const r=(i==null?void 0:i.nodeClass)??Qe,o=new r(t.schema);t.atRoot&&(t.atRoot=!1);let a=s.offset,c=null;for(const f of s.items){const{start:d,key:p,sep:g,value:k}=f,v=dt(d,{indicator:"explicit-key-ind",next:p??(g==null?void 0:g[0]),offset:a,onError:n,parentIndent:s.indent,startOnNewline:!0}),w=!v.found;if(w){if(p&&(p.type==="block-seq"?n(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==s.indent&&n(a,"BAD_INDENT",Os)),!v.anchor&&!v.tag&&!g){c=v.end,v.comment&&(o.comment?o.comment+=` +`+v.comment:o.comment=v.comment);continue}(v.newlineAfterProp||Ct(p))&&n(p??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((u=v.found)==null?void 0:u.indent)!==s.indent&&n(a,"BAD_INDENT",Os);t.atKey=!0;const C=v.end,E=p?l(t,p,v,n):e(t,C,d,null,v,n);t.schema.compat&&Qt(s.indent,p,n),t.atKey=!1,Jn(t,o.items,E)&&n(C,"DUPLICATE_KEY","Map keys must be unique");const A=dt(g??[],{indicator:"map-value-ind",next:k,offset:E.range[2],onError:n,parentIndent:s.indent,startOnNewline:!p||p.type==="block-scalar"});if(a=A.end,A.found){w&&((k==null?void 0:k.type)==="block-map"&&!A.hasNewline&&n(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&v.startl&&(l.type==="block-map"||l.type==="block-seq");function wi({composeNode:l,composeEmptyNode:e},t,s,n,i){const r=s.start.source==="{",o=r?"flow map":"flow sequence",a=(i==null?void 0:i.nodeClass)??(r?Qe:ot),c=new a(t.schema);c.flow=!0;const u=t.atRoot;u&&(t.atRoot=!1),t.atKey&&(t.atKey=!1);let f=s.offset+s.start.source.length;for(let v=0;v0){const v=jt(g,k,t.options.strict,n);v.comment&&(c.comment?c.comment+=` +`+v.comment:c.comment=v.comment),c.range=[s.offset,k,v.offset]}else c.range=[s.offset,k,k];return c}function Jt(l,e,t,s,n,i){const r=t.type==="block-map"?yi(l,e,t,s,i):t.type==="block-seq"?ki(l,e,t,s,i):wi(l,e,t,s,i),o=r.constructor;return n==="!"||n===o.tagName?(r.tag=o.tagName,r):(n&&(r.tag=n),r)}function Ci(l,e,t,s,n){var d;const i=s.tag,r=i?e.directives.tagName(i.source,p=>n(i,"TAG_RESOLVE_FAILED",p)):null;if(t.type==="block-seq"){const{anchor:p,newlineAfterProp:g}=s,k=p&&i?p.offset>i.offset?p:i:p??i;k&&(!g||g.offsetp.tag===r&&p.collection===o);if(!a){const p=e.schema.knownTags[r];if(p&&p.collection===o)e.schema.tags.push(Object.assign({},p,{default:!1})),a=p;else return p!=null&&p.collection?n(i,"BAD_COLLECTION_TYPE",`${p.tag} used for ${o} collection, but expects ${p.collection}`,!0):n(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,!0),Jt(l,e,t,n,r)}const c=Jt(l,e,t,n,r,a),u=((d=a.resolve)==null?void 0:d.call(a,c,p=>n(i,"TAG_RESOLVE_FAILED",p),e.options))??c,f=Dt(u)?u:new Le(u);return f.range=c.range,f.tag=r,a!=null&&a.format&&(f.format=a.format),f}function Xn(l,e,t,s){const{value:n,type:i,comment:r,range:o}=e.type==="block-scalar"?vl(l,e,s):bl(e,l.options.strict,s),a=t?l.directives.tagName(t.source,f=>s(t,"TAG_RESOLVE_FAILED",f)):null;let c;l.options.stringKeys&&l.atKey?c=l.schema[et]:a?c=$i(l.schema,n,a,t,s):e.type==="scalar"?c=Ti(l,n,e,s):c=l.schema[et];let u;try{const f=c.resolve(n,d=>s(t??e,"TAG_RESOLVE_FAILED",d),l.options);u=at(f)?f:new Le(f)}catch(f){const d=f instanceof Error?f.message:String(f);s(t??e,"TAG_RESOLVE_FAILED",d),u=new Le(n)}return u.range=o,u.source=n,i&&(u.type=i),a&&(u.tag=a),c.format&&(u.format=c.format),r&&(u.comment=r),u}function $i(l,e,t,s,n){var o;if(t==="!")return l[et];const i=[];for(const a of l.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)i.push(a);else return a;for(const a of i)if((o=a.test)!=null&&o.test(e))return a;const r=l.knownTags[t];return r&&!r.collection?(l.tags.push(Object.assign({},r,{default:!1,test:void 0})),r):(n(s,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),l[et])}function Ti({atKey:l,directives:e,schema:t},s,n,i){const r=t.tags.find(o=>{var a;return(o.default===!0||l&&o.default==="key")&&((a=o.test)==null?void 0:a.test(s))})||t[et];if(t.compat){const o=t.compat.find(a=>{var c;return a.default&&((c=a.test)==null?void 0:c.test(s))})??t[et];if(r.tag!==o.tag){const a=e.tagString(r.tag),c=e.tagString(o.tag),u=`Value may be parsed as either ${a} or ${c}`;i(n,"TAG_RESOLVE_FAILED",u,!0)}}return r}function Ei(l,e,t){if(e){t===null&&(t=e.length);for(let s=t-1;s>=0;--s){let n=e[s];switch(n.type){case"space":case"comment":case"newline":l-=n.source.length;continue}for(n=e[++s];(n==null?void 0:n.type)==="space";)l+=n.source.length,n=e[++s];break}}return l}const Si={composeNode:Wn,composeEmptyNode:hs};function Wn(l,e,t,s){const n=l.atKey,{spaceBefore:i,comment:r,anchor:o,tag:a}=t;let c,u=!0;switch(e.type){case"alias":c=Ii(l,e,s),(o||a)&&s(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Xn(l,e,a,s),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":c=Ci(Si,l,e,t,s),o&&(c.anchor=o.source.substring(1));break;default:{const f=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;s(e,"UNEXPECTED_TOKEN",f),c=hs(l,e.offset,void 0,null,t,s),u=!1}}return o&&c.anchor===""&&s(o,"BAD_ALIAS","Anchor cannot be an empty string"),n&&l.options.stringKeys&&(!at(c)||typeof c.value!="string"||c.tag&&c.tag!=="tag:yaml.org,2002:str")&&s(a??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),r&&(e.type==="scalar"&&e.source===""?c.comment=r:c.commentBefore=r),l.options.keepSourceTokens&&u&&(c.srcToken=e),c}function hs(l,e,t,s,{spaceBefore:n,comment:i,anchor:r,tag:o,end:a},c){const u={type:"scalar",offset:Ei(e,t,s),indent:-1,source:""},f=Xn(l,u,o,c);return r&&(f.anchor=r.source.substring(1),f.anchor===""&&c(r,"BAD_ALIAS","Anchor cannot be an empty string")),n&&(f.spaceBefore=!0),i&&(f.comment=i,f.range[2]=a),f}function Ii({options:l},{offset:e,source:t,end:s},n){const i=new is(t.substring(1));i.source===""&&n(e,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&n(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const r=e+t.length,o=jt(s,r,l.strict,n);return i.range=[e,r,o.offset],o.comment&&(i.comment=o.comment),i}function Ni(l,e,{offset:t,start:s,value:n,end:i},r){const o=Object.assign({_directives:e},l),a=new pt(void 0,o),c={atKey:!1,atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},u=dt(s,{indicator:"doc-start",next:n??(i==null?void 0:i[0]),offset:t,onError:r,parentIndent:0,startOnNewline:!0});u.found&&(a.directives.docStart=!0,n&&(n.type==="block-map"||n.type==="block-seq")&&!u.hasNewline&&r(u.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=n?Wn(c,n,u,r):hs(c,u.end,s,null,u,r);const f=a.contents.range[2],d=jt(i,f,!1,r);return d.comment&&(a.comment=d.comment),a.range=[t,f,d.offset],a}function bt(l){if(typeof l=="number")return[l,l+1];if(Array.isArray(l))return l.length===2?l:[l[0],l[1]];const{offset:e,source:t}=l;return[e,e+(typeof t=="string"?t.length:1)]}function Ps(l){var n;let e="",t=!1,s=!1;for(let i=0;i{const r=bt(t);i?this.warnings.push(new En(r,s,n)):this.errors.push(new lt(r,s,n))},this.directives=new Ot({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:s,afterEmptyLine:n}=Ps(this.prelude);if(s){const i=e.contents;if(t)e.comment=e.comment?`${e.comment} +${s}`:s;else if(n||e.directives.docStart||!i)e.commentBefore=s;else if(Ge(i)&&!i.flow&&i.items.length>0){let r=i.items[0];rs(r)&&(r=r.key);const o=r.commentBefore;r.commentBefore=o?`${s} +${o}`:s}else{const r=i.commentBefore;i.commentBefore=r?`${s} +${r}`:s}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Ps(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,s=-1){for(const n of e)yield*this.next(n);yield*this.end(t,s)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,s,n)=>{const i=bt(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",s,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=Ni(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,s=new lt(bt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(s):this.doc.errors.push(s);break}case"doc-end":{if(!this.doc){const s="Unexpected doc-end without preceding document";this.errors.push(new lt(bt(e),"UNEXPECTED_TOKEN",s));break}this.doc.directives.docEnd=!0;const t=jt(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const s=this.doc.comment;this.doc.comment=s?`${s} +${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new lt(bt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const s=Object.assign({_directives:this.directives},this.options),n=new pt(void 0,s);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),n.range=[0,t,t],this.decorate(n,!1),yield n}}}class Zn{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,s=this.lineStarts.length;for(;t>1;this.lineStarts[i]=0;)switch(l[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((t=l[++e])==null?void 0:t.type)==="space";);return l.splice(e,l.length)}function js(l){if(l.start.type==="flow-seq-start")for(const e of l.items)e.sep&&!e.value&&!Je(e.start,"explicit-key-ind")&&!Je(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,Qn(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class ps{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Sn,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const s of this.lexer.lex(e,t))yield*this.next(s);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const t=yl(e);if(t)if(t==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const s=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:s,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(!e||e.type!=="doc-end")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(!t)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield t;else{const s=this.peek(1);switch(t.type==="block-scalar"?t.indent="indent"in s?s.indent:0:t.type==="flow-collection"&&s.type==="document"&&(t.indent=0),t.type==="flow-collection"&&js(t),s.type){case"document":s.value=t;break;case"block-scalar":s.props.push(t);break;case"block-map":{const n=s.items[s.items.length-1];if(n.value){s.items.push({start:[],key:t,sep:[]}),this.onKeyLine=!0;return}else if(n.sep)n.value=t;else{Object.assign(n,{key:t,sep:[]}),this.onKeyLine=!n.explicitKey;return}break}case"block-seq":{const n=s.items[s.items.length-1];n.value?s.items.push({start:[],value:t}):n.value=t;break}case"flow-collection":{const n=s.items[s.items.length-1];!n||n.value?s.items.push({start:[],key:t,sep:[]}):n.sep?n.value=t:Object.assign(n,{key:t,sep:[]});return}default:yield*this.pop(),yield*this.pop(t)}if((s.type==="document"||s.type==="block-map"||s.type==="block-seq")&&(t.type==="block-map"||t.type==="block-seq")){const n=t.items[t.items.length-1];n&&!n.sep&&!n.value&&n.start.length>0&&Ds(n.start)===-1&&(t.indent===0||n.start.every(i=>i.type!=="comment"||i.indent=e.indent){const n=!this.onKeyLine&&this.indent===e.indent,i=n&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let r=[];if(i&&t.sep&&!t.value){const o=[];for(let a=0;ae.indent&&(o.length=0);break;default:o.length=0}}o.length>=2&&(r=t.sep.splice(o[1]))}switch(this.type){case"anchor":case"tag":i||t.value?(r.push(this.sourceToken),e.items.push({start:r}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):i||t.value?(r.push(this.sourceToken),e.items.push({start:r,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Je(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]});else if(Qn(t.key)&&!Je(t.sep,"newline")){const o=nt(t.start),a=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:a,sep:c}]})}else r.length>0?t.sep=t.sep.concat(r,this.sourceToken):t.sep.push(this.sourceToken);else if(Je(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const o=nt(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||i?e.items.push({start:r,key:null,sep:[this.sourceToken]}):Je(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);i||t.value?(e.items.push({start:r,key:o,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(o):(Object.assign(t,{key:o,sep:[]}),this.onKeyLine=!0);return}default:{const o=this.startBlockValue(e);if(o){n&&o.type!=="block-seq"&&e.items.push({start:r}),this.stack.push(o);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var s;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const n="end"in t.value?t.value.end:void 0,i=Array.isArray(n)?n[n.length-1]:void 0;(i==null?void 0:i.type)==="comment"?n==null||n.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const n=e.items[e.items.length-2],i=(s=n==null?void 0:n.value)==null?void 0:s.end;if(Array.isArray(i)){Array.prototype.push.apply(i,t.start),i.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||Je(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const n=this.startBlockValue(e);if(n){this.stack.push(n);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let s;do yield*this.pop(),s=this.peek(1);while(s&&s.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const s=this.startBlockValue(e);s?this.stack.push(s):(yield*this.pop(),yield*this.step())}else{const s=this.peek(2);if(s.type==="block-map"&&(this.type==="map-value-ind"&&s.indent===e.indent||this.type==="newline"&&!s.items[s.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&s.type!=="flow-collection"){const n=Lt(s),i=nt(n);js(e);const r=e.end.splice(1,e.end.length);r.push(this.sourceToken);const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:i,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(` +`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(` +`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Lt(e),s=nt(t);return s.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Lt(e),s=nt(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(s=>s.type==="newline"||s.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function el(l){const e=l.prettyErrors!==!1;return{lineCounter:l.lineCounter||e&&new Zn||null,prettyErrors:e}}function Ai(l,e={}){const{lineCounter:t,prettyErrors:s}=el(e),n=new ps(t==null?void 0:t.addNewLine),i=new ms(e),r=Array.from(i.compose(n.parse(l)));if(s&&t)for(const o of r)o.errors.forEach(Pt(l,t)),o.warnings.forEach(Pt(l,t));return r.length>0?r:Object.assign([],{empty:!0},i.streamInfo())}function tl(l,e={}){const{lineCounter:t,prettyErrors:s}=el(e),n=new ps(t==null?void 0:t.addNewLine),i=new ms(e);let r=null;for(const o of i.compose(n.parse(l),!0,l.length))if(!r)r=o;else if(r.options.logLevel!=="silent"){r.errors.push(new lt(o.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return s&&t&&(r.errors.forEach(Pt(l,t)),r.warnings.forEach(Pt(l,t))),r}function Li(l,e,t){let s;typeof e=="function"?s=e:t===void 0&&e&&typeof e=="object"&&(t=e);const n=tl(l,t);if(!n)return null;if(n.warnings.forEach(i=>kl(n.options.logLevel,i)),n.errors.length>0){if(n.options.logLevel!=="silent")throw n.errors[0];n.errors=[]}return n.toJS(Object.assign({reviver:s},t))}function Oi(l,e,t){let s=null;if(typeof e=="function"||Array.isArray(e)?s=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const n=Math.round(t);t=n<1?void 0:n>8?{indent:8}:{indent:n}}if(l===void 0){const{keepUndefined:n}=t??e??{};if(!n)return}return In(l)&&!s?l.toString(t):new pt(l,s,t).toString(t)}const Ms=Object.freeze(Object.defineProperty({__proto__:null,Alias:is,CST:wl,Composer:ms,Document:pt,Lexer:Sn,LineCounter:Zn,Pair:wt,Parser:ps,Scalar:Le,Schema:Ht,YAMLError:Cl,YAMLMap:Qe,YAMLParseError:lt,YAMLSeq:ot,YAMLWarning:En,isAlias:$l,isCollection:Ge,isDocument:In,isMap:Cn,isNode:Dt,isPair:rs,isScalar:at,isSeq:$n,parse:Li,parseAllDocuments:Ai,parseDocument:tl,stringify:Oi,visit:Tl,visitAsync:El},Symbol.toStringTag,{value:"Module"}));function qs(l,e,t){const s=l.slice();return s[23]=e[t],s}function Fs(l){let e,t;return e=new Nn({props:{$$slots:{default:[Pi]},$$scope:{ctx:l}}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&67108865&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Pi(l){let e=l[0].description+"",t;return{c(){t=Z(e)},l(s){t=Q(s,e)},m(s,n){N(s,t,n)},p(s,n){n&1&&e!==(e=s[0].description+"")&&he(t,e)},d(s){s&&h(t)}}}function Vs(l){let e,t="*";return{c(){e=b("sup"),e.textContent=t,this.h()},l(s){e=y(s,"SUP",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-3dq1r8"&&(e.textContent=t),this.h()},h(){_(e,"class","text-negative")},m(s,n){N(s,e,n)},d(s){s&&h(e)}}}function Di(l){let e,t,s;return{c(){e=b("input"),this.h()},l(n){e=y(n,"INPUT",{type:!0,class:!0}),this.h()},h(){e.disabled=l[6],_(e,"type","file"),_(e,"class","svelte-11j8m88")},m(n,i){N(n,e,i),t||(s=de(e,"change",l[8]),t=!0)},p(n,i){i&64&&(e.disabled=n[6])},d(n){n&&h(e),t=!1,s()}}}function ji(l){let e,t,s,n,i,r=pe(l[0].options),o=[];for(let a=0;al[20].call(e))},m(a,c){N(a,e,c),m(e,t);for(let u=0;uZe(t,"options",i)),{c(){e=b("section"),Y(t.$$.fragment),this.h()},l(a){e=y(a,"SECTION",{class:!0});var c=D(e);X(t.$$.fragment,c),c.forEach(h),this.h()},h(){_(e,"class","ml-4 flex flex-col gap-2 mt-2")},m(a,c){N(a,e,c),z(t,e,null),n=!0},p(a,c){var f;const u={};c&2&&(u.rootOptions=a[1]),c&4&&(u.reveal=a[2]),c&64&&(u.disabled=a[6]),c&17&&(u.optionSpec=(f=a[0].children)==null?void 0:f[a[4]]),!s&&c&8&&(s=!0,u.options=a[3],We(()=>s=!1)),t.$set(u)},i(a){n||(F(t.$$.fragment,a),n=!0)},o(a){H(t.$$.fragment,a),n=!1},d(a){a&&h(e),J(t)}}}function Ki(l){var R,L;let e,t,s,n,i,r,o,a,c,u,f,d,p,g,k=Object.keys(((L=(R=l[0])==null?void 0:R.children)==null?void 0:L[l[4]])??{}).length,v,w=l[0].description&&Fs(l),C=l[0].required&&Vs();function E(V,S){if(S&1&&(p=null),V[0].type==="string")return Vi;if(V[0].type==="multiline")return Fi;if(V[0].type==="boolean")return qi;if(V[0].type==="number")return Mi;if(p==null&&(p=!!(V[0].type==="select"&&Array.isArray(V[0].options))),p)return ji;if(V[0].type==="file")return Di}let A=E(l,-1),j=A&&A(l),$=k&&Hs(l);return{c(){e=b("div"),t=b("label"),s=b("div"),n=b("p"),w&&w.c(),i=M(),r=b("span"),o=Z(l[7]),a=M(),C&&C.c(),c=M(),u=b("p"),f=Z(l[5]),d=M(),j&&j.c(),g=M(),$&&$.c(),this.h()},l(V){e=y(V,"DIV",{class:!0});var S=D(e);t=y(S,"LABEL",{class:!0});var I=D(t);s=y(I,"DIV",{class:!0});var O=D(s);n=y(O,"P",{class:!0});var P=D(n);w&&w.l(P),i=q(P),r=y(P,"SPAN",{});var T=D(r);o=Q(T,l[7]),a=q(T),C&&C.l(T),T.forEach(h),P.forEach(h),c=q(O),u=y(O,"P",{class:!0});var B=D(u);f=Q(B,l[5]),B.forEach(h),O.forEach(h),d=q(I),j&&j.l(I),I.forEach(h),g=q(S),$&&$.l(S),S.forEach(h),this.h()},h(){_(n,"class","flex items-center gap-1"),_(u,"class","text-negative text-xs font-bold"),_(s,"class","mr-2 inline-flex flex-col gap-1"),_(t,"class","flex justify-between w-full items-start"),Fe(t,"h-11",l[0].type!=="multiline"),Fe(t,"h-auto",l[0].type==="multiline"),_(e,"class","w-full")},m(V,S){N(V,e,S),m(e,t),m(t,s),m(s,n),w&&w.m(n,null),m(n,i),m(n,r),m(r,o),m(r,a),C&&C.m(r,null),m(s,c),m(s,u),m(u,f),m(t,d),j&&j.m(t,null),m(e,g),$&&$.m(e,null),v=!0},p(V,[S]){var I,O;V[0].description?w?(w.p(V,S),S&1&&F(w,1)):(w=Fs(V),w.c(),F(w,1),w.m(n,i)):w&&(_e(),H(w,1,1,()=>{w=null}),ve()),(!v||S&128)&&he(o,V[7]),V[0].required?C||(C=Vs(),C.c(),C.m(r,null)):C&&(C.d(1),C=null),(!v||S&32)&&he(f,V[5]),A===(A=E(V,S))&&j?j.p(V,S):(j&&j.d(1),j=A&&A(V),j&&(j.c(),j.m(t,null))),(!v||S&1)&&Fe(t,"h-11",V[0].type!=="multiline"),(!v||S&1)&&Fe(t,"h-auto",V[0].type==="multiline"),S&17&&(k=Object.keys(((O=(I=V[0])==null?void 0:I.children)==null?void 0:O[V[4]])??{}).length),k?$?($.p(V,S),S&17&&F($,1)):($=Hs(V),$.c(),F($,1),$.m(e,null)):$&&(_e(),H($,1,1,()=>{$=null}),ve())},i(V){v||(F(w),F($),v=!0)},o(V){H(w),H($),v=!1},d(V){V&&h(e),w&&w.d(),C&&C.d(),j&&j.d(),$&&$.d()}}}function xi(l,e,t){let s,n,i,{spec:r}=e,{key:o}=e,{options:a}=e,{disabled:c}=e,{rootOptions:u}=e,{reveal:f}=e;const d=`_${o}`;let p,g;r.children?r.nest?(p=d,g=a[o]??{}):(p=o,g=a):(p=o,g={});let k=a[p],v={};async function w(S){if(!S.target)return;const{files:I}=S.target;if(!I)return;const[O]=I;switch(r.fileFormat){case"json":try{t(9,a[p]=await O.text().then(P=>JSON.parse(P)),a)}catch(P){t(5,C="Failed to parse YAML file"),console.warn(P)}break;case"yaml":try{t(9,a[p]=await O.text().then(P=>Ms.parse(P)),a)}catch(P){t(5,C="Failed to parse JSON file"),console.warn(P)}break;default:{const P=await O.text();try{t(9,a[p]=JSON.parse(P),a);break}catch{}try{t(9,a[p]=Ms.parse(P),a);break}catch{}t(9,a[p]=await O.text(),a);break}}}let C="";function E(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function A(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function j(){k=this.value,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function $(){k=this.checked,t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function R(){k=bn(this.value),t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function L(){k=$t(this),t(4,k),t(14,n),t(0,r),t(1,u),t(0,r)}function V(S){g=S,t(3,g),t(0,r),t(4,k),t(10,o),t(9,a),t(13,v),t(12,p),t(14,n),t(1,u)}return l.$$set=S=>{"spec"in S&&t(0,r=S.spec),"key"in S&&t(10,o=S.key),"options"in S&&t(9,a=S.options),"disabled"in S&&t(11,c=S.disabled),"rootOptions"in S&&t(1,u=S.rootOptions),"reveal"in S&&t(2,f=S.reveal)},l.$$.update=()=>{var S,I,O;if(l.$$.dirty&1025&&t(7,s=r.title??o),l.$$.dirty&3&&t(14,n=r.references?Sl.query(u,r.references):null),l.$$.dirty&16384&&n!=null&&n.length&&t(4,k=n[0]),l.$$.dirty&13849)if(r!=null&&r.children&&!Object.keys(r.children[k]??{}).length){if(t(9,a[o]=k,a),delete a[d],typeof g=="object")for(const P of Object.keys(v))delete g[P];else console.warn(`child_value_target was unexpectedly not an object ${g}`,{key:o,options:a,spec:r});t(13,v=((S=r==null?void 0:r.children)==null?void 0:S[k])??{})}else(I=r==null?void 0:r.children)!=null&&I[k]&&(r.nest?(t(12,p=d),typeof a[o]!="object"&&t(9,a[o]={},a),t(3,g=a[o])):(t(12,p=o),t(3,g=a)),t(9,a[p]=k,a),t(13,v=((O=r==null?void 0:r.children)==null?void 0:O[k])??{}));l.$$.dirty&4112&&t(9,a[p]=k,a),l.$$.dirty&18433&&t(6,i=c||r.forceReference||r.references&&n!==null)},[r,u,f,g,k,C,i,s,w,a,o,c,p,v,n,E,A,j,$,R,L,V]}class Gi extends ye{constructor(e){super(),ke(this,e,xi,Ki,be,{spec:0,key:10,options:9,disabled:11,rootOptions:1,reveal:2})}}function Rs(l,e,t){const s=l.slice();return s[6]=e[t][0],s[7]=e[t][1],s}function Us(l){let e,t,s;function n(r){l[5](r)}let i={reveal:l[4],disabled:l[2],key:l[6],spec:l[7],rootOptions:l[3]};return l[0]!==void 0&&(i.options=l[0]),e=new Gi({props:i}),Xe.push(()=>Ze(e,"options",n)),{c(){Y(e.$$.fragment)},l(r){X(e.$$.fragment,r)},m(r,o){z(e,r,o),s=!0},p(r,o){const a={};o&16&&(a.reveal=r[4]),o&4&&(a.disabled=r[2]),o&2&&(a.key=r[6]),o&2&&(a.spec=r[7]),o&8&&(a.rootOptions=r[3]),!t&&o&1&&(t=!0,a.options=r[0],We(()=>t=!1)),e.$set(a)},i(r){s||(F(e.$$.fragment,r),s=!0)},o(r){H(e.$$.fragment,r),s=!1},d(r){J(e,r)}}}function Yi(l){let e,t,s=pe(Object.entries(l[1])),n=[];for(let r=0;rH(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;r{"optionSpec"in c&&t(1,s=c.optionSpec),"options"in c&&t(0,n=c.options),"disabled"in c&&t(2,i=c.disabled),"rootOptions"in c&&t(3,r=c.rootOptions),"reveal"in c&&t(4,o=c.reveal)},[n,s,i,r,o,a]}class sl extends ye{constructor(e){super(),ke(this,e,zi,Yi,be,{optionSpec:1,options:0,disabled:2,rootOptions:3,reveal:4})}}function Ji(l){let e,t="Configuration Updated";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-cwyj9v"&&(e.textContent=t),this.h()},h(){_(e,"class","text-positive font-bold text-xs")},m(s,n){N(s,e,n)},p:ee,d(s){s&&h(e)}}}function Xi(l){let e,t;return{c(){e=b("p"),t=Z(l[3]),this.h()},l(s){e=y(s,"P",{class:!0});var n=D(e);t=Q(n,l[3]),n.forEach(h),this.h()},h(){_(e,"class","text-negative font-bold text-xs")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&8&&he(t,s[3])},d(s){s&&h(e)}}}function Ks(l){let e,t,s,n="Source Options",i,r,o,a;function c(f){l[15](f)}let u={reveal:l[2],disabled:l[4]||l[7],rootOptions:l[0].options,optionSpec:l[1].options};return l[0].options!==void 0&&(u.options=l[0].options),r=new sl({props:u}),Xe.push(()=>Ze(r,"options",c)),{c(){e=b("hr"),t=M(),s=b("h4"),s.textContent=n,i=M(),Y(r.$$.fragment),this.h()},l(f){e=y(f,"HR",{}),t=q(f),s=y(f,"H4",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-sfnd7i"&&(s.textContent=n),i=q(f),X(r.$$.fragment,f),this.h()},h(){_(s,"class","text-xs uppercase font-bold")},m(f,d){N(f,e,d),N(f,t,d),N(f,s,d),N(f,i,d),z(r,f,d),a=!0},p(f,d){const p={};d&4&&(p.reveal=f[2]),d&144&&(p.disabled=f[4]||f[7]),d&1&&(p.rootOptions=f[0].options),d&2&&(p.optionSpec=f[1].options),!o&&d&1&&(o=!0,p.options=f[0].options,We(()=>o=!1)),r.$set(p)},i(f){a||(F(r.$$.fragment,f),a=!0)},o(f){H(r.$$.fragment,f),a=!1},d(f){f&&(h(e),h(t),h(s),h(i)),J(r,f)}}}function Wi(l){let e,t="Connection Successful!";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-owd79t"&&(e.textContent=t),this.h()},h(){_(e,"class","text-positive font-bold text-xs")},m(s,n){N(s,e,n)},p:ee,d(s){s&&h(e)}}}function Zi(l){let e,t;return{c(){e=b("p"),t=Z(l[6]),this.h()},l(s){e=y(s,"P",{class:!0});var n=D(e);t=Q(n,l[6]),n.forEach(h),this.h()},h(){_(e,"class","text-negative font-bold text-xs")},m(s,n){N(s,e,n),m(e,t)},p(s,n){n&64&&he(t,s[6])},d(s){s&&h(e)}}}function Qi(l){let e=l[7]?"Loading...":"Test Connection",t;return{c(){t=Z(e)},l(s){t=Q(s,e)},m(s,n){N(s,t,n)},p(s,n){n&128&&e!==(e=s[7]?"Loading...":"Test Connection")&&he(t,e)},d(s){s&&h(t)}}}function er(l){let e;return{c(){e=Z("Confirm Changes")},l(t){e=Q(t,"Confirm Changes")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function tr(l){let e,t,s,n=l[0].name+"",i,r,o,a,c,u="Source Info",f,d,p,g,k,v,w,C,E,A,j,$,R,L,V=Object.keys(l[1].options).length,S,I,O,P,T,B,U,W,x,G,se,ne;function $e(te,le){if(te[3])return Xi;if(te[5])return Ji}let Ee=$e(l),ae=Ee&&Ee(l);function Se(te){l[12](te)}function ie(te){l[13](te)}let ue={};l[0].name!==void 0&&(ue.sourceName=l[0].name),l[9]!==void 0&&(ue.nameError=l[9]),d=new Dn({props:ue}),Xe.push(()=>Ze(d,"sourceName",Se)),Xe.push(()=>Ze(d,"nameError",ie));let oe=V&&Ks(l);function we(te,le){if(te[6])return Zi;if(te[8])return Wi}let Ce=we(l),re=Ce&&Ce(l);return U=new ft({props:{outline:!0,size:"md",formaction:"?/testSource",disabled:l[7]||l[4],icon:Il,$$slots:{default:[Qi]},$$scope:{ctx:l}}}),x=new ft({props:{variant:"positive",icon:wn,size:"md",disabled:l[4]||l[7],type:"submit",$$slots:{default:[er]},$$scope:{ctx:l}}}),{c(){e=b("form"),t=b("h3"),s=Z("Configure "),i=Z(n),r=M(),o=b("section"),ae&&ae.c(),a=M(),c=b("h4"),c.textContent=u,f=M(),Y(d.$$.fragment),k=M(),v=b("label"),w=Z(`Source Type + `),C=b("input"),A=M(),j=b("label"),$=Z(`Reveal Secret Values + `),R=b("input"),L=M(),oe&&oe.c(),S=M(),I=b("input"),P=M(),T=b("div"),re&&re.c(),B=M(),Y(U.$$.fragment),W=M(),Y(x.$$.fragment),this.h()},l(te){e=y(te,"FORM",{action:!0,method:!0,class:!0});var le=D(e);t=y(le,"H3",{class:!0});var Ne=D(t);s=Q(Ne,"Configure "),i=Q(Ne,n),Ne.forEach(h),r=q(le),o=y(le,"SECTION",{class:!0});var Te=D(o);ae&&ae.l(Te),a=q(Te),c=y(Te,"H4",{class:!0,"data-svelte-h":!0}),K(c)!=="svelte-1xu9nu4"&&(c.textContent=u),f=q(Te),X(d.$$.fragment,Te),k=q(Te),v=y(Te,"LABEL",{class:!0});var De=D(v);w=Q(De,`Source Type + `),C=y(De,"INPUT",{class:!0}),De.forEach(h),A=q(Te),j=y(Te,"LABEL",{class:!0});var je=D(j);$=Q(je,`Reveal Secret Values + `),R=y(je,"INPUT",{type:!0,class:!0}),je.forEach(h),L=q(Te),oe&&oe.l(Te),Te.forEach(h),S=q(le),I=y(le,"INPUT",{type:!0,name:!0}),P=q(le),T=y(le,"DIV",{class:!0});var Re=D(T);re&&re.l(Re),B=q(Re),X(U.$$.fragment,Re),W=q(Re),X(x.$$.fragment,Re),Re.forEach(h),le.forEach(h),this.h()},h(){_(t,"class","text-sm uppercase font-bold"),_(c,"class","text-xs uppercase font-bold"),C.disabled=!0,C.value=E=l[0].type,_(C,"class","rounded border border-base-300 p-1 ml-auto w-2/3 bg-base-100 align-middle text-sm"),_(v,"class","flex justify-between"),_(R,"type","checkbox"),_(R,"class","rounded border border-base-300 p-1 ml-auto w-5 bg-base-100 align-middle text-sm"),_(j,"class","flex justify-between"),_(o,"class","flex flex-col gap-2"),_(I,"type","hidden"),I.value=O=JSON.stringify(l[0]),_(I,"name","source"),_(T,"class","flex gap-2 justify-end items-center mt-4"),_(e,"action","?/updateSource"),_(e,"method","POST"),_(e,"class","w-full bg-base-200 px-4 py-2 rounded")},m(te,le){N(te,e,le),m(e,t),m(t,s),m(t,i),m(e,r),m(e,o),ae&&ae.m(o,null),m(o,a),m(o,c),m(o,f),z(d,o,null),m(o,k),m(o,v),m(v,w),m(v,C),m(o,A),m(o,j),m(j,$),m(j,R),R.checked=l[2],m(o,L),oe&&oe.m(o,null),m(e,S),m(e,I),m(e,P),m(e,T),re&&re.m(T,null),m(T,B),z(U,T,null),m(T,W),z(x,T,null),G=!0,se||(ne=[de(R,"change",l[14]),nl(ii.call(null,e,l[10]))],se=!0)},p(te,[le]){(!G||le&1)&&n!==(n=te[0].name+"")&&he(i,n),Ee===(Ee=$e(te))&&ae?ae.p(te,le):(ae&&ae.d(1),ae=Ee&&Ee(te),ae&&(ae.c(),ae.m(o,a)));const Ne={};!p&&le&1&&(p=!0,Ne.sourceName=te[0].name,We(()=>p=!1)),!g&&le&512&&(g=!0,Ne.nameError=te[9],We(()=>g=!1)),d.$set(Ne),(!G||le&1&&E!==(E=te[0].type)&&C.value!==E)&&(C.value=E),le&4&&(R.checked=te[2]),le&2&&(V=Object.keys(te[1].options).length),V?oe?(oe.p(te,le),le&2&&F(oe,1)):(oe=Ks(te),oe.c(),F(oe,1),oe.m(o,null)):oe&&(_e(),H(oe,1,1,()=>{oe=null}),ve()),(!G||le&1&&O!==(O=JSON.stringify(te[0])))&&(I.value=O),Ce===(Ce=we(te))&&re?re.p(te,le):(re&&re.d(1),re=Ce&&Ce(te),re&&(re.c(),re.m(T,B)));const Te={};le&144&&(Te.disabled=te[7]||te[4]),le&131200&&(Te.$$scope={dirty:le,ctx:te}),U.$set(Te);const De={};le&144&&(De.disabled=te[4]||te[7]),le&131072&&(De.$$scope={dirty:le,ctx:te}),x.$set(De)},i(te){G||(F(d.$$.fragment,te),F(oe),F(U.$$.fragment,te),F(x.$$.fragment,te),G=!0)},o(te){H(d.$$.fragment,te),H(oe),H(U.$$.fragment,te),H(x.$$.fragment,te),G=!1},d(te){te&&h(e),ae&&ae.d(),J(d),oe&&oe.d(),re&&re.d(),J(U),J(x),se=!1,Ye(ne)}}}function sr(l,e,t){let{sourcePlugin:s}=e,{source:n}=e,{sources:i}=e;const r=vn();let o;n.initialName=n.name;let a="",c=!1,u=!1,f="",d=!1,p=!1,g="";const k=({action:A,cancel:j})=>{if(t(4,c=!1),t(7,d=!1),t(9,g=Pn(n.name,i.filter($=>$!==n))),g){j();return}switch(A.search){case"?/updateSource":t(4,c=!0),t(3,a=""),t(5,u=!1);break;case"?/testSource":t(7,d=!0),t(6,f=""),t(8,p=!1);break}return({result:$,action:R})=>{var L;if($.type==="failure"){if(typeof $.data=="string")t(3,a=$.data);else if(typeof $.data=="object"&&"message"in $.data)switch(R.search){case"?/updateSource":t(3,a=$.data.message);break;case"?/testSource":t(6,f=$.data.message);break}else t(3,a="Error saving datasource.");t(4,c=!1),t(5,u=!1),t(7,d=!1),t(8,p=!1);return}switch(R.search){case"?/updateSource":$.type==="success"&&Object.assign(n,(L=$.data)==null?void 0:L.updatedSource),t(4,c=!1),t(5,u=!0),r("sourceUpdated",n);break;case"?/testSource":$.type==="success"&&t(6,f=""),t(7,d=!1),t(8,p=!0);break}}};function v(A){l.$$.not_equal(n.name,A)&&(n.name=A,t(0,n))}function w(A){g=A,t(9,g)}function C(){o=this.checked,t(2,o)}function E(A){l.$$.not_equal(n.options,A)&&(n.options=A,t(0,n))}return l.$$set=A=>{"sourcePlugin"in A&&t(1,s=A.sourcePlugin),"source"in A&&t(0,n=A.source),"sources"in A&&t(11,i=A.sources)},[n,s,o,a,c,u,f,d,p,g,k,i,v,w,C,E]}class nr extends ye{constructor(e){super(),ke(this,e,sr,tr,be,{sourcePlugin:1,source:0,sources:11})}}function lr(l){let e,t;return e=new Me({props:{src:Al,class:"w-6 h-6"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function ir(l){let e,t;return e=new Me({props:{src:Ll,class:"w-6 h-6 text-negative"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function rr(l){let e,t;return e=new Me({props:{src:Zt[l[4]],class:"w-6 h-6"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&16&&(i.src=Zt[s[4]]),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function or(l){let e,t;return e=new Me({props:{src:Wt[l[4]],class:"w-6 h-6"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&16&&(i.src=Wt[s[4]]),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function xs(l){let e,t,s=l[0].type+"",n,i,r,o,a;return o=new Nn({props:{$$slots:{default:[ar]},$$scope:{ctx:l}}}),{c(){e=b("p"),t=Z("No connector for "),n=Z(s),i=Z(" is available"),r=M(),Y(o.$$.fragment),this.h()},l(c){e=y(c,"P",{class:!0});var u=D(e);t=Q(u,"No connector for "),n=Q(u,s),i=Q(u," is available"),u.forEach(h),r=q(c),X(o.$$.fragment,c),this.h()},h(){_(e,"class","text-negative font-bold")},m(c,u){N(c,e,u),m(e,t),m(e,n),m(e,i),N(c,r,u),z(o,c,u),a=!0},p(c,u){(!a||u&1)&&s!==(s=c[0].type+"")&&he(n,s);const f={};u&2048&&(f.$$scope={dirty:u,ctx:c}),o.$set(f)},i(c){a||(F(o.$$.fragment,c),a=!0)},o(c){H(o.$$.fragment,c),a=!1},d(c){c&&(h(e),h(r)),J(o,c)}}}function ar(l){let e;return{c(){e=Z("Make sure you have installed it, and included it in your evidence.plugins.yaml file")},l(t){e=Q(t,"Make sure you have installed it, and included it in your evidence.plugins.yaml file")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function cr(l){let e;return{c(){e=Z("Edit")},l(t){e=Q(t,"Edit")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function Gs(l){let e,t,s,n;return t=new nr({props:{sources:l[1],source:l[0],sourcePlugin:l[2]}}),t.$on("sourceUpdated",l[10]),{c(){e=b("div"),Y(t.$$.fragment),this.h()},l(i){e=y(i,"DIV",{class:!0});var r=D(e);X(t.$$.fragment,r),r.forEach(h),this.h()},h(){_(e,"class","col-span-4")},m(i,r){N(i,e,r),z(t,e,null),n=!0},p(i,r){const o={};r&2&&(o.sources=i[1]),r&1&&(o.source=i[0]),r&4&&(o.sourcePlugin=i[2]),t.$set(o)},i(i){n||(F(t.$$.fragment,i),i&&Ae(()=>{n&&(s||(s=Be(e,He,{},!0)),s.run(1))}),n=!0)},o(i){H(t.$$.fragment,i),i&&(s||(s=Be(e,He,{},!1)),s.run(0)),n=!1},d(i){i&&h(e),J(t),i&&s&&s.end()}}}function ur(l){let e,t,s,n,i,r,o,a=l[0].name+"",c,u,f,d,p=l[0].type+"",g,k,v,w,C,E,A,j,$;const R=[or,rr,ir,lr],L=[];function V(O,P){return P&16&&(t=null),P&16&&(s=null),t==null&&(t=!!O[5](O[4])),t?0:(s==null&&(s=!!O[6](O[4])),s?1:O[2]?3:2)}n=V(l,-1),i=L[n]=R[n](l);let S=!l[2]&&xs(l);E=new ft({props:{size:"md",icon:Nl,disabled:!l[2],$$slots:{default:[cr]},$$scope:{ctx:l}}}),E.$on("click",l[9]);let I=l[3]&&Gs(l);return{c(){e=b("div"),i.c(),r=M(),o=b("p"),c=Z(a),u=M(),f=b("div"),d=b("p"),g=Z(p),v=M(),S&&S.c(),w=M(),C=b("div"),Y(E.$$.fragment),A=M(),I&&I.c(),j=me(),this.h()},l(O){e=y(O,"DIV",{class:!0});var P=D(e);i.l(P),r=q(P),o=y(P,"P",{});var T=D(o);c=Q(T,a),T.forEach(h),u=q(P),f=y(P,"DIV",{class:!0});var B=D(f);d=y(B,"P",{title:!0});var U=D(d);g=Q(U,p),U.forEach(h),v=q(B),S&&S.l(B),B.forEach(h),w=q(P),C=y(P,"DIV",{class:!0});var W=D(C);X(E.$$.fragment,W),W.forEach(h),P.forEach(h),A=q(O),I&&I.l(O),j=me(),this.h()},h(){var O;_(d,"title",k=(O=l[2])==null?void 0:O.package.package.name),_(f,"class","flex gap-2 items-center"),_(C,"class","flex justify-end"),_(e,"class","contents text-xs odd:bg-base-300")},m(O,P){N(O,e,P),L[n].m(e,null),m(e,r),m(e,o),m(o,c),m(e,u),m(e,f),m(f,d),m(d,g),m(f,v),S&&S.m(f,null),m(e,w),m(e,C),z(E,C,null),N(O,A,P),I&&I.m(O,P),N(O,j,P),$=!0},p(O,[P]){var U;let T=n;n=V(O,P),n===T?L[n].p(O,P):(_e(),H(L[T],1,1,()=>{L[T]=null}),ve(),i=L[n],i?i.p(O,P):(i=L[n]=R[n](O),i.c()),F(i,1),i.m(e,r)),(!$||P&1)&&a!==(a=O[0].name+"")&&he(c,a),(!$||P&1)&&p!==(p=O[0].type+"")&&he(g,p),(!$||P&4&&k!==(k=(U=O[2])==null?void 0:U.package.package.name))&&_(d,"title",k),O[2]?S&&(_e(),H(S,1,1,()=>{S=null}),ve()):S?(S.p(O,P),P&4&&F(S,1)):(S=xs(O),S.c(),F(S,1),S.m(f,null));const B={};P&4&&(B.disabled=!O[2]),P&2048&&(B.$$scope={dirty:P,ctx:O}),E.$set(B),O[3]?I?(I.p(O,P),P&8&&F(I,1)):(I=Gs(O),I.c(),F(I,1),I.m(j.parentNode,j)):I&&(_e(),H(I,1,1,()=>{I=null}),ve())},i(O){$||(F(i),F(S),F(E.$$.fragment,O),F(I),$=!0)},o(O){H(i),H(S),H(E.$$.fragment,O),H(I),$=!1},d(O){O&&(h(e),h(A),h(j)),L[n].d(),S&&S.d(),J(E),I&&I.d(O)}}}function fr(l,e,t){let s,n,{source:i}=e,{sources:r}=e,{availableSourcePlugins:o}=e,{startOpen:a=!1}=e,c=a;const u=g=>typeof g<"u"&&g in Wt,f=g=>typeof g<"u"&&g in Zt,d=()=>t(3,c=!c),p=g=>t(0,i=g.detail);return l.$$set=g=>{"source"in g&&t(0,i=g.source),"sources"in g&&t(1,r=g.sources),"availableSourcePlugins"in g&&t(7,o=g.availableSourcePlugins),"startOpen"in g&&t(8,a=g.startOpen)},l.$$.update=()=>{l.$$.dirty&129&&t(2,s=o==null?void 0:o[i.type]),l.$$.dirty&4&&t(4,n=s==null?void 0:s.package.package.evidence.icon)},[i,r,s,c,n,u,f,o,a,d,p]}class dr extends ye{constructor(e){super(),ke(this,e,fr,ur,be,{source:0,sources:1,availableSourcePlugins:7,startOpen:8})}}function Ys(l,e,t){const s=l.slice();return s[8]=e[t],s}function zs(l,e,t){const s=l.slice();return s[11]=e[t],s}function hr(l){let e,t,s;return t=new jn({props:{ghost:!0,availablePackages:l[5]}}),t.$on("newSource",l[6]),{c(){e=b("section"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SECTION",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","col-span-4")},m(n,i){N(n,e,i),z(t,e,null),s=!0},p(n,i){const r={};i&32&&(r.availablePackages=n[5]),t.$set(r)},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function mr(l){let e,t='

Name

Type

',s,n,i,r,o,a,c,u,f=l[4].length&&Js(l),d=pe(l[1]),p=[];for(let v=0;vH(p[v],1,1,()=>{p[v]=null});o=new ft({props:{icon:Ol,size:"md",variant:"positive",$$slots:{default:[pr]},$$scope:{ctx:l}}}),o.$on("click",l[7]);let k=l[2]&&Zs(l);return{c(){e=b("div"),e.innerHTML=t,s=M(),f&&f.c(),n=M();for(let v=0;v{k=null}),ve())},i(v){if(!u){for(let w=0;wConfiguring Data Sources →`,g;const k=[mr,hr],v=[];function w(C,E){return C[1].length>0?0:1}return o=w(l),a=v[o]=k[o](l),{c(){e=b("section"),t=b("div"),s=b("h2"),s.textContent=n,i=M(),r=b("div"),a.c(),c=M(),u=b("div"),f=M(),d=b("div"),d.innerHTML=p,this.h()},l(C){e=y(C,"SECTION",{class:!0});var E=D(e);t=y(E,"DIV",{class:!0});var A=D(t);s=y(A,"H2",{class:!0,"data-svelte-h":!0}),K(s)!=="svelte-timue1"&&(s.textContent=n),i=q(A),r=y(A,"DIV",{class:!0});var j=D(r);a.l(j),j.forEach(h),c=q(A),u=y(A,"DIV",{}),D(u).forEach(h),A.forEach(h),f=q(E),d=y(E,"DIV",{class:!0,"data-svelte-h":!0}),K(d)!=="svelte-1gscl52"&&(d.innerHTML=p),E.forEach(h),this.h()},h(){_(s,"class","font-semibold text-lg mb-2"),_(r,"class","grid grid-rows-auto source-config-table gap-x-2 gap-y-2 justify-center items-center w-full svelte-2j5e0k"),_(t,"class","p-3 rounded-t w-full border-base-300 border-t border-l border-r"),_(d,"class","p-4 rounded-b w-full bg-base-200 text-sm border-[1px] border-base-300"),_(e,"class","w-full mt-8")},m(C,E){N(C,e,E),m(e,t),m(t,s),m(t,i),m(t,r),v[o].m(r,null),m(t,c),m(t,u),m(e,f),m(e,d),g=!0},p(C,[E]){let A=o;o=w(C),o===A?v[o].p(C,E):(_e(),H(v[A],1,1,()=>{v[A]=null}),ve(),a=v[o],a?a.p(C,E):(a=v[o]=k[o](C),a.c()),F(a,1),a.m(r,null))},i(C){g||(F(a),g=!0)},o(C){H(a),g=!1},d(C){C&&h(e),v[o].d()}}}function _r(l,e,t){let s,{availableSourcePlugins:n={}}=e,{sources:i=[]}=e,r=i.length===0,o;function a(f){const{newSourceType:d,newSourceName:p}=f.detail;d&&(i.push({name:p,type:d,options:{},environmentVariables:{}}),t(3,o=p),t(2,r=!1))}let c=[];const u=()=>t(2,r=!r);return l.$$set=f=>{"availableSourcePlugins"in f&&t(0,n=f.availableSourcePlugins),"sources"in f&&t(1,i=f.sources)},l.$$.update=()=>{if(l.$$.dirty&1&&t(5,s=Object.values(n).reduce((f,d)=>{const p=d.package.package;return f[p.name]||(f[p.name]=d),f},{})),l.$$.dirty&2&&i.length){const f=i.reduce((d,p)=>(d.sourceNames.has(p.name)&&d.duplicateNames.add(p.name),d.sourceNames.add(p.name),d),{sourceNames:new Set,duplicateNames:new Set});t(4,c=Array.from(f.duplicateNames))}},[n,i,r,o,c,s,a,u]}class vr extends ye{constructor(e){super(),ke(this,e,_r,gr,be,{availableSourcePlugins:0,sources:1})}}function br(l){let e,t="Deploying to Evidence Cloud",s,n,i="Evidence Cloud allows you to:",r,o,a,c,u,f="<",d,p,g=">",k,v,w,C,E="Authenticate users",A,j,$="Schedule updates to your data",R,L,V="Re-build when you push changes to your project",S,I,O='';return{c(){e=b("h2"),e.textContent=t,s=M(),n=b("p"),n.textContent=i,r=M(),o=b("ul"),a=b("li"),c=Z("Host your project at "),u=b("code"),d=Z(f),p=Z("project-name"),k=Z(g),v=Z(".evidence.app"),w=M(),C=b("li"),C.textContent=E,A=M(),j=b("li"),j.textContent=$,R=M(),L=b("li"),L.textContent=V,S=M(),I=b("div"),I.innerHTML=O,this.h()},l(P){e=y(P,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-18vqxr8"&&(e.textContent=t),s=q(P),n=y(P,"P",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1p7rrak"&&(n.textContent=i),r=q(P),o=y(P,"UL",{class:!0});var T=D(o);a=y(T,"LI",{class:!0});var B=D(a);c=Q(B,"Host your project at "),u=y(B,"CODE",{});var U=D(u);d=Q(U,f),p=Q(U,"project-name"),k=Q(U,g),v=Q(U,".evidence.app"),U.forEach(h),B.forEach(h),w=q(T),C=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-19f0lwd"&&(C.textContent=E),A=q(T),j=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(j)!=="svelte-lawnhl"&&(j.textContent=$),R=q(T),L=y(T,"LI",{class:!0,"data-svelte-h":!0}),K(L)!=="svelte-1q65sxp"&&(L.textContent=V),T.forEach(h),S=q(P),I=y(P,"DIV",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-1827t5n"&&(I.innerHTML=O),this.h()},h(){_(e,"class","svelte-lmhsq3"),_(n,"class","svelte-lmhsq3"),_(a,"class","svelte-lmhsq3"),_(C,"class","svelte-lmhsq3"),_(j,"class","svelte-lmhsq3"),_(L,"class","svelte-lmhsq3"),_(o,"class","svelte-lmhsq3"),_(I,"class","new-format-buttons my-3 svelte-lmhsq3")},m(P,T){N(P,e,T),N(P,s,T),N(P,n,T),N(P,r,T),N(P,o,T),m(o,a),m(a,c),m(a,u),m(u,d),m(u,p),m(u,k),m(u,v),m(o,w),m(o,C),m(o,A),m(o,j),m(o,R),m(o,L),N(P,S,T),N(P,I,T)},p:ee,i:ee,o:ee,d(P){P&&(h(e),h(s),h(n),h(r),h(o),h(S),h(I))}}}class yr extends ye{constructor(e){super(),ke(this,e,null,br,be,{})}}function kr(l){let e,t,s=(l[1]?"····················":l[0])+"",n;return{c(){e=b("span"),t=new yn(!1),this.h()},l(i){e=y(i,"SPAN",{});var r=D(e);t=kn(r,!1),r.forEach(h),this.h()},h(){t.a=null,Fe(e,"text-xs",l[2])},m(i,r){N(i,e,r),t.m(s,e)},p(i,r){r&3&&s!==(s=(i[1]?"····················":i[0])+"")&&t.p(s),r&4&&Fe(e,"text-xs",i[2])},i(i){i&&(n||Ae(()=>{n=yt(e,kt,{}),n.start()}))},o:ee,d(i){i&&h(e)}}}function wr(l){let e,t="Copied",s;return{c(){e=b("span"),e.textContent=t},l(n){e=y(n,"SPAN",{"data-svelte-h":!0}),K(e)!=="svelte-18eylsc"&&(e.textContent=t)},m(n,i){N(n,e,i)},p:ee,i(n){n&&(s||Ae(()=>{s=yt(e,kt,{}),s.start()}))},o:ee,d(n){n&&h(e)}}}function Cr(l){let e,t;return e=new An({props:{class:"bx--snippet__icon"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function $r(l){let e,t;return e=new An({props:{class:"bx--snippet__icon"}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Tr(l){let e,t,s,n,i,r,o,a,c;function u(v,w){return v[4]?wr:kr}let f=u(l),d=f(l);const p=[$r,Cr],g=[];function k(v,w){return v[4]?0:1}return i=k(l),r=g[i]=p[i](l),{c(){e=b("button"),t=b("span"),d.c(),s=M(),n=b("div"),r.c(),this.h()},l(v){e=y(v,"BUTTON",{type:!0,class:!0});var w=D(e);t=y(w,"SPAN",{class:!0});var C=D(t);d.l(C),C.forEach(h),s=q(w),n=y(w,"DIV",{class:!0});var E=D(n);r.l(E),E.forEach(h),w.forEach(h),this.h()},h(){_(t,"class","var-value svelte-exlw3k"),_(n,"class","w-4 h-4"),_(e,"type","button"),_(e,"class","container h-6 w-6 svelte-exlw3k"),Fe(e,"copied",l[4])},m(v,w){N(v,e,w),m(e,t),d.m(t,null),m(e,s),m(e,n),g[i].m(n,null),o=!0,a||(c=de(e,"click",l[5]),a=!0)},p(v,[w]){f===(f=u(v))&&d?d.p(v,w):(d.d(1),d=f(v),d&&(d.c(),F(d,1),d.m(t,null)));let C=i;i=k(v),i!==C&&(_e(),H(g[C],1,1,()=>{g[C]=null}),ve(),r=g[i],r||(r=g[i]=p[i](v),r.c()),F(r,1),r.m(n,null)),(!o||w&16)&&Fe(e,"copied",v[4])},i(v){o||(F(d),F(r),o=!0)},o(v){H(r),o=!1},d(v){v&&h(e),d.d(),g[i].d(),a=!1,c()}}}function Er(l,e,t){let{text:s=void 0}=e,{hideText:n=!1}=e,{small:i=!1}=e,r=!1;const o=function(){t(4,r=!1)};let{copy:a=async u=>{try{r||(await navigator.clipboard.writeText(u),t(4,r=!0),setTimeout(o,2e3))}catch{}}}=e;const c=()=>{s!==void 0&&a(s)};return l.$$set=u=>{"text"in u&&t(0,s=u.text),"hideText"in u&&t(1,n=u.hideText),"small"in u&&t(2,i=u.small),"copy"in u&&t(3,a=u.copy)},[s,n,i,a,r,c]}class Ke extends ye{constructor(e){super(),ke(this,e,Er,Tr,be,{text:0,hideText:1,small:2,copy:3})}}function Sr(l){let e,t="Deploying to Netlify",s,n,i='
  • Start a new netlify project →
  • Choose the repo containing this project
  • Update the site settings to match those below
  • ',r,o,a="Basic Build Settings",c,u,f,d="Build command",p,g,k,v,w,C,E="Publish directory",A,j,$,R,L,V="Advanced Build Settings",S,I,O=`Click 'Show Advanced' add your + environment variables.`,P;return k=new Ke({props:{text:"npm run sources && npm run build"}}),$=new Ke({props:{text:"build/"}}),{c(){e=b("h2"),e.textContent=t,s=M(),n=b("ol"),n.innerHTML=i,r=M(),o=b("div"),o.textContent=a,c=M(),u=b("div"),f=b("span"),f.textContent=d,p=M(),g=b("div"),Y(k.$$.fragment),v=M(),w=b("div"),C=b("span"),C.textContent=E,A=M(),j=b("div"),Y($.$$.fragment),R=M(),L=b("div"),L.textContent=V,S=M(),I=b("p"),I.innerHTML=O,this.h()},l(T){e=y(T,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-a8hbx"&&(e.textContent=t),s=q(T),n=y(T,"OL",{"data-svelte-h":!0}),K(n)!=="svelte-1krc6dk"&&(n.innerHTML=i),r=q(T),o=y(T,"DIV",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-dxwvxl"&&(o.textContent=a),c=q(T),u=y(T,"DIV",{class:!0});var B=D(u);f=y(B,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-1fx13w6"&&(f.textContent=d),p=q(B),g=y(B,"DIV",{class:!0});var U=D(g);X(k.$$.fragment,U),U.forEach(h),B.forEach(h),v=q(T),w=y(T,"DIV",{class:!0});var W=D(w);C=y(W,"SPAN",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-pc7ih"&&(C.textContent=E),A=q(W),j=y(W,"DIV",{class:!0});var x=D(j);X($.$$.fragment,x),x.forEach(h),W.forEach(h),R=q(T),L=y(T,"DIV",{class:!0,"data-svelte-h":!0}),K(L)!=="svelte-1rcjgh9"&&(L.textContent=V),S=q(T),I=y(T,"P",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-9upacm"&&(I.innerHTML=O),this.h()},h(){_(e,"class","svelte-uhtp23"),_(o,"class","separator svelte-uhtp23"),_(f,"class","setting svelte-uhtp23"),_(g,"class","setting-value svelte-uhtp23"),_(u,"class","setting-row svelte-uhtp23"),_(C,"class","setting svelte-uhtp23"),_(j,"class","setting-value svelte-uhtp23"),_(w,"class","setting-row svelte-uhtp23"),_(L,"class","separator svelte-uhtp23"),_(I,"class","svelte-uhtp23")},m(T,B){N(T,e,B),N(T,s,B),N(T,n,B),N(T,r,B),N(T,o,B),N(T,c,B),N(T,u,B),m(u,f),m(u,p),m(u,g),z(k,g,null),N(T,v,B),N(T,w,B),m(w,C),m(w,A),m(w,j),z($,j,null),N(T,R,B),N(T,L,B),N(T,S,B),N(T,I,B),P=!0},i(T){P||(F(k.$$.fragment,T),F($.$$.fragment,T),P=!0)},o(T){H(k.$$.fragment,T),H($.$$.fragment,T),P=!1},d(T){T&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(v),h(w),h(R),h(L),h(S),h(I)),J(k),J($)}}}function Ir(l){let e,t="You'll need to set up a git repo before deploying to netlify.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-drfbb5"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-uhtp23")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Nr(l){let e,t="You'll need to connect to at least one datasource before deploying to netlify.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1wqvgt"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-uhtp23")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Ar(l){let e,t,s,n;const i=[Nr,Ir,Sr],r=[];function o(a,c){return a[1].length?a[0].gitRepo?2:1:0}return e=o(l),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){let u=e;e=o(a),e!==u&&(_e(),H(r[u],1,1,()=>{r[u]=null}),ve(),t=r[e],t||(t=r[e]=i[e](a),t.c()),F(t,1),t.m(s.parentNode,s))},i(a){n||(F(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function Lr(l,e,t){let{settings:s}=e,{sources:n}=e;return l.$$set=i=>{"settings"in i&&t(0,s=i.settings),"sources"in i&&t(1,n=i.sources)},[s,n]}class Or extends ye{constructor(e){super(),ke(this,e,Lr,Ar,be,{settings:0,sources:1})}}function Pr(l){let e,t="Deploying to Vercel",s,n,i='
  • Start a new Vercel project →
  • Choose the repo containing this project
  • Configure your project to match the settings below
  • ',r,o,a="Build and Output Settings",c,u,f,d="Build Command",p,g,k,v,w,C,E="Output Directory",A,j,$,R,L,V,S="Install Command",I,O,P,T;return k=new Ke({props:{text:"npm run sources && npm run build"}}),$=new Ke({props:{text:"build/"}}),P=new Ke({props:{text:"npm install"}}),{c(){e=b("h2"),e.textContent=t,s=M(),n=b("ol"),n.innerHTML=i,r=M(),o=b("div"),o.textContent=a,c=M(),u=b("div"),f=b("span"),f.textContent=d,p=M(),g=b("div"),Y(k.$$.fragment),v=M(),w=b("div"),C=b("span"),C.textContent=E,A=M(),j=b("div"),Y($.$$.fragment),R=M(),L=b("div"),V=b("span"),V.textContent=S,I=M(),O=b("div"),Y(P.$$.fragment),this.h()},l(B){e=y(B,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-ly0hw5"&&(e.textContent=t),s=q(B),n=y(B,"OL",{"data-svelte-h":!0}),K(n)!=="svelte-13j0dqb"&&(n.innerHTML=i),r=q(B),o=y(B,"DIV",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-fbi9z5"&&(o.textContent=a),c=q(B),u=y(B,"DIV",{class:!0});var U=D(u);f=y(U,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-2ttm1i"&&(f.textContent=d),p=q(U),g=y(U,"DIV",{class:!0});var W=D(g);X(k.$$.fragment,W),W.forEach(h),U.forEach(h),v=q(B),w=y(B,"DIV",{class:!0});var x=D(w);C=y(x,"SPAN",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-wq73qv"&&(C.textContent=E),A=q(x),j=y(x,"DIV",{class:!0});var G=D(j);X($.$$.fragment,G),G.forEach(h),x.forEach(h),R=q(B),L=y(B,"DIV",{class:!0});var se=D(L);V=y(se,"SPAN",{class:!0,"data-svelte-h":!0}),K(V)!=="svelte-xn7157"&&(V.textContent=S),I=q(se),O=y(se,"DIV",{class:!0});var ne=D(O);X(P.$$.fragment,ne),ne.forEach(h),se.forEach(h),this.h()},h(){_(e,"class","svelte-1ifbe9h"),_(o,"class","separator svelte-1ifbe9h"),_(f,"class","setting svelte-1ifbe9h"),_(g,"class","setting-value svelte-1ifbe9h"),_(u,"class","setting-row svelte-1ifbe9h"),_(C,"class","setting svelte-1ifbe9h"),_(j,"class","setting-value svelte-1ifbe9h"),_(w,"class","setting-row svelte-1ifbe9h"),_(V,"class","setting svelte-1ifbe9h"),_(O,"class","setting-value svelte-1ifbe9h"),_(L,"class","setting-row svelte-1ifbe9h")},m(B,U){N(B,e,U),N(B,s,U),N(B,n,U),N(B,r,U),N(B,o,U),N(B,c,U),N(B,u,U),m(u,f),m(u,p),m(u,g),z(k,g,null),N(B,v,U),N(B,w,U),m(w,C),m(w,A),m(w,j),z($,j,null),N(B,R,U),N(B,L,U),m(L,V),m(L,I),m(L,O),z(P,O,null),T=!0},i(B){T||(F(k.$$.fragment,B),F($.$$.fragment,B),F(P.$$.fragment,B),T=!0)},o(B){H(k.$$.fragment,B),H($.$$.fragment,B),H(P.$$.fragment,B),T=!1},d(B){B&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(v),h(w),h(R),h(L)),J(k),J($),J(P)}}}function Dr(l){let e,t="You'll need to set up a git repo before deploying to Vercel.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1urjqdt"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-1ifbe9h")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function jr(l){let e,t="You'll need to connect to at least one datasource before deploying to Vercel.";return{c(){e=b("p"),e.textContent=t,this.h()},l(s){e=y(s,"P",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1evai4d"&&(e.textContent=t),this.h()},h(){_(e,"class","svelte-1ifbe9h")},m(s,n){N(s,e,n)},i:ee,o:ee,d(s){s&&h(e)}}}function Mr(l){let e,t,s,n;const i=[jr,Dr,Pr],r=[];function o(a,c){return a[1].length?a[0].gitRepo?2:1:0}return e=o(l),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){let u=e;e=o(a),e!==u&&(_e(),H(r[u],1,1,()=>{r[u]=null}),ve(),t=r[e],t||(t=r[e]=i[e](a),t.c()),F(t,1),t.m(s.parentNode,s))},i(a){n||(F(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function qr(l,e,t){let{settings:s}=e,{sources:n}=e;return l.$$set=i=>{"settings"in i&&t(0,s=i.settings),"sources"in i&&t(1,n=i.sources)},[s,n]}class Fr extends ye{constructor(e){super(),ke(this,e,qr,Mr,be,{settings:0,sources:1})}}function Vr(l){let e,t="Deploying your Project",s,n,i="In production, Evidence functions like a static site generator:",r,o,a=`
  • Running npm run build will build a static site in the /build directory + using the credentials in the datasource connections panel, which you can host in a variety of environments
  • `,c,u,f="Building Your Project",d,p,g,k="Build command",v,w,C,E,A,j,$="Publish directory",R,L,V,S;return C=new Ke({props:{text:"npm run sources && npm run build"}}),V=new Ke({props:{text:"build/"}}),{c(){e=b("h2"),e.textContent=t,s=M(),n=b("p"),n.textContent=i,r=M(),o=b("ol"),o.innerHTML=a,c=M(),u=b("div"),u.textContent=f,d=M(),p=b("div"),g=b("span"),g.textContent=k,v=M(),w=b("div"),Y(C.$$.fragment),E=M(),A=b("div"),j=b("span"),j.textContent=$,R=M(),L=b("div"),Y(V.$$.fragment),this.h()},l(I){e=y(I,"H2",{class:!0,"data-svelte-h":!0}),K(e)!=="svelte-1bt7a83"&&(e.textContent=t),s=q(I),n=y(I,"P",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1gcreas"&&(n.textContent=i),r=q(I),o=y(I,"OL",{"data-svelte-h":!0}),K(o)!=="svelte-1dvvhh6"&&(o.innerHTML=a),c=q(I),u=y(I,"DIV",{class:!0,"data-svelte-h":!0}),K(u)!=="svelte-1sj8kng"&&(u.textContent=f),d=q(I),p=y(I,"DIV",{class:!0});var O=D(p);g=y(O,"SPAN",{class:!0,"data-svelte-h":!0}),K(g)!=="svelte-1fx13w6"&&(g.textContent=k),v=q(O),w=y(O,"DIV",{class:!0});var P=D(w);X(C.$$.fragment,P),P.forEach(h),O.forEach(h),E=q(I),A=y(I,"DIV",{class:!0});var T=D(A);j=y(T,"SPAN",{class:!0,"data-svelte-h":!0}),K(j)!=="svelte-pc7ih"&&(j.textContent=$),R=q(T),L=y(T,"DIV",{class:!0});var B=D(L);X(V.$$.fragment,B),B.forEach(h),T.forEach(h),this.h()},h(){_(e,"class","svelte-oz5mco"),_(n,"class","svelte-oz5mco"),_(u,"class","separator svelte-oz5mco"),_(g,"class","setting svelte-oz5mco"),_(w,"class","setting-value svelte-oz5mco"),_(p,"class","setting-row svelte-oz5mco"),_(j,"class","setting svelte-oz5mco"),_(L,"class","setting-value svelte-oz5mco"),_(A,"class","setting-row svelte-oz5mco")},m(I,O){N(I,e,O),N(I,s,O),N(I,n,O),N(I,r,O),N(I,o,O),N(I,c,O),N(I,u,O),N(I,d,O),N(I,p,O),m(p,g),m(p,v),m(p,w),z(C,w,null),N(I,E,O),N(I,A,O),m(A,j),m(A,R),m(A,L),z(V,L,null),S=!0},p:ee,i(I){S||(F(C.$$.fragment,I),F(V.$$.fragment,I),S=!0)},o(I){H(C.$$.fragment,I),H(V.$$.fragment,I),S=!1},d(I){I&&(h(e),h(s),h(n),h(r),h(o),h(c),h(u),h(d),h(p),h(E),h(A)),J(C),J(V)}}}class Br extends ye{constructor(e){super(),ke(this,e,null,Vr,be,{})}}function Qs(l,e,t){const s=l.slice();return s[3]=e[t],s}function en(l,e,t){const s=l.slice();return s[6]=e[t][0],s[7]=e[t][1],s}function Hr(l){let e,t;return e=new Rl({props:{$$slots:{default:[Gr]},$$scope:{ctx:l}}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&1025&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function Rr(l){let e,t,s,n=`GCloud authentication isn't supported in cloud deployments, as it needs access to a browser. Set + up one of the other authentication options for a deployment.`;return{c(){e=b("hr"),t=M(),s=b("p"),s.textContent=n},l(i){e=y(i,"HR",{}),t=q(i),s=y(i,"P",{"data-svelte-h":!0}),K(s)!=="svelte-x2laf0"&&(s.textContent=n)},m(i,r){N(i,e,r),N(i,t,r),N(i,s,r)},p:ee,i:ee,o:ee,d(i){i&&(h(e),h(t),h(s))}}}function Ur(l){let e,t,s,n=`External browser authentication isn't supported in cloud deployments, as it needs access to a + browser. Set up one of the other authentication options for a deployment.`;return{c(){e=b("hr"),t=M(),s=b("p"),s.textContent=n},l(i){e=y(i,"HR",{}),t=q(i),s=y(i,"P",{"data-svelte-h":!0}),K(s)!=="svelte-1m8xj5p"&&(s.textContent=n)},m(i,r){N(i,e,r),N(i,t,r),N(i,s,r)},p:ee,i:ee,o:ee,d(i){i&&(h(e),h(t),h(s))}}}function Kr(l){let e;return{c(){e=Z("Copy All")},l(t){e=Q(t,"Copy All")},m(t,s){N(t,e,s)},d(t){t&&h(e)}}}function tn(l){let e,t,s,n,i,r,o,a;return s=new Ke({props:{text:l[6]}}),r=new Ke({props:{text:l[7],hideText:!0}}),{c(){e=b("div"),t=b("div"),Y(s.$$.fragment),n=M(),i=b("div"),Y(r.$$.fragment),o=M(),this.h()},l(c){e=y(c,"DIV",{class:!0});var u=D(e);t=y(u,"DIV",{class:!0});var f=D(t);X(s.$$.fragment,f),f.forEach(h),n=q(u),i=y(u,"DIV",{class:!0});var d=D(i);X(r.$$.fragment,d),d.forEach(h),o=q(u),u.forEach(h),this.h()},h(){_(t,"class","var-name svelte-jy9xey"),_(i,"class","var-value svelte-jy9xey"),_(e,"class","environment-variable svelte-jy9xey")},m(c,u){N(c,e,u),m(e,t),z(s,t,null),m(e,n),m(e,i),z(r,i,null),m(e,o),a=!0},p(c,u){const f={};u&1&&(f.text=c[6]),s.$set(f);const d={};u&1&&(d.text=c[7]),r.$set(d)},i(c){a||(F(s.$$.fragment,c),F(r.$$.fragment,c),a=!0)},o(c){H(s.$$.fragment,c),H(r.$$.fragment,c),a=!1},d(c){c&&h(e),J(s),J(r)}}}function sn(l){let e,t,s=pe(Object.entries(l[3].environmentVariables)),n=[];for(let r=0;rH(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;rH(u[d],1,1,()=>{u[d]=null});return{c(){e=b("div"),Y(t.$$.fragment),s=M(),n=b("div"),n.innerHTML=i,r=M();for(let d=0;duse different environment variable values.`,s,n,i,r,o;const a=[Ur,Rr,Hr],c=[];function u(f,d){return f[1].authenticator==="externalbrowser"?0:f[1].authenticator==="gcloud-cli"?1:2}return n=u(l),i=c[n]=a[n](l),{c(){e=b("p"),e.innerHTML=t,s=M(),i.c(),r=me()},l(f){e=y(f,"P",{"data-svelte-h":!0}),K(e)!=="svelte-14iladh"&&(e.innerHTML=t),s=q(f),i.l(f),r=me()},m(f,d){N(f,e,d),N(f,s,d),c[n].m(f,d),N(f,r,d),o=!0},p(f,[d]){i.p(f,d)},i(f){o||(F(i),o=!0)},o(f){H(i),o=!1},d(f){f&&(h(e),h(s),h(r)),c[n].d(f)}}}function zr(l,e,t){let{sources:s}=e,n={};function i(){const r=s.reduce((o,a)=>[o,Object.entries(a.environmentVariables).map(([c,u])=>`${c}="${u.replace(/\\n/g,` +`)}"`).join(` +`)].join(` +`),"");navigator.clipboard.writeText(r),Pl.add({title:"",status:"positive",message:"Copied environment variables to clipboard"})}return l.$$set=r=>{"sources"in r&&t(0,s=r.sources)},[s,n,i]}class Jr extends ye{constructor(e){super(),ke(this,e,zr,Yr,be,{sources:0})}}function nn(l,e,t){const s=l.slice();return s[5]=e[t],s}function ln(l){let e,t=l[5].name+"",s,n;return{c(){e=b("option"),s=Z(t),n=M(),this.h()},l(i){e=y(i,"OPTION",{});var r=D(e);s=Q(r,t),n=q(r),r.forEach(h),this.h()},h(){e.__value=l[5],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s),m(e,n)},p:ee,d(i){i&&h(e)}}}function rn(l){let e,t,s,n;var i=l[2].FormComponent;function r(o,a){return{props:{settings:o[0],sources:o[1]}}}return i&&(t=vs(i,r(l))),{c(){e=b("div"),t&&Y(t.$$.fragment),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=D(e);t&&X(t.$$.fragment,a),a.forEach(h),this.h()},h(){_(e,"class","panel svelte-1ukb5v1")},m(o,a){N(o,e,a),t&&z(t,e,null),n=!0},p(o,a){if(a&4&&i!==(i=o[2].FormComponent)){if(t){_e();const c=t;H(c.$$.fragment,1,0,()=>{J(c,1)}),ve()}i?(t=vs(i,r(o)),Y(t.$$.fragment),F(t.$$.fragment,1),z(t,e,null)):t=null}else if(i){const c={};a&1&&(c.settings=o[0]),a&2&&(c.sources=o[1]),t.$set(c)}},i(o){n||(t&&F(t.$$.fragment,o),o&&Ae(()=>{n&&(s||(s=Be(e,He,{},!0)),s.run(1))}),n=!0)},o(o){t&&H(t.$$.fragment,o),o&&(s||(s=Be(e,He,{},!1)),s.run(0)),n=!1},d(o){o&&h(e),t&&J(t),o&&s&&s.end()}}}function Xr(l){let e,t,s,n,i="Deployment",r,o,a=`Evidence projects can be deployed to a variety of cloud environments. The easiest way to + deploy your project is with Evidence Cloud.`,c,u,f="Environment Variables",d,p,g,k,v,w="Deployment Environment",C,E,A,j,$,R='Learn more about Deploying your Project →',L,V,S;g=new Jr({props:{sources:l[1]}});let I=pe(l[3]),O=[];for(let T=0;Tl[4].call(E)),_(s,"class","panel svelte-1ukb5v1"),_(t,"class","deploy-settings-box svelte-1ukb5v1"),_($,"class","svelte-1ukb5v1"),_(e,"id","deploy"),_(e,"class","svelte-1ukb5v1")},m(T,B){N(T,e,B),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),m(s,u),m(s,d),m(s,p),z(g,p,null),m(s,k),m(s,v),m(s,C),m(s,E);for(let U=0;U{P=null}),ve())},i(T){L||(F(g.$$.fragment,T),F(P),L=!0)},o(T){H(g.$$.fragment,T),H(P),L=!1},d(T){T&&h(e),J(g),Oe(O,T),P&&P.d(),V=!1,S()}}}function Wr(l,e,t){let{settings:s}=e,{sources:n}=e,i=[{id:"evidence",name:"Evidence Cloud",FormComponent:yr},{id:"netlify",name:"Netlify",FormComponent:Or},{id:"vercel",name:"Vercel",FormComponent:Fr},{id:"other",name:"Self-host (other)",FormComponent:Br}],r=i[0];function o(){r=$t(this),t(2,r),t(3,i)}return l.$$set=a=>{"settings"in a&&t(0,s=a.settings),"sources"in a&&t(1,n=a.sources)},[s,n,r,i,o]}class Zr extends ye{constructor(e){super(),ke(this,e,Wr,Xr,be,{settings:0,sources:1})}}function on(l,e,t){const s=l.slice();return s[2]=e[t],s[3]=e,s[4]=t,s}function an(l){let e,t,s=l[2].formatTag+"",n,i,r,o=l[2].formatCode+"",a,c,u,f,d,p,g,k,v=ct(l[2])+"",w,C,E,A;function j(){l[1].call(f,l[3],l[4])}return{c(){e=b("tr"),t=b("td"),n=Z(s),i=M(),r=b("td"),a=Z(o),c=M(),u=b("td"),f=b("input"),g=M(),k=b("td"),w=Z(v),C=M(),this.h()},l($){e=y($,"TR",{});var R=D(e);t=y(R,"TD",{class:!0});var L=D(t);n=Q(L,s),L.forEach(h),i=q(R),r=y(R,"TD",{class:!0});var V=D(r);a=Q(V,o),V.forEach(h),c=q(R),u=y(R,"TD",{class:!0});var S=D(u);f=y(S,"INPUT",{id:!0,placeholder:!0,class:!0}),S.forEach(h),g=q(R),k=y(R,"TD",{class:!0});var I=D(k);w=Q(I,v),I.forEach(h),C=q(R),R.forEach(h),this.h()},h(){_(t,"class","svelte-51mr58"),_(r,"class","svelte-51mr58"),_(f,"id",d="id_format_row"+l[2].formatTag),_(f,"placeholder",p=l[2].exampleInput||ut(l[2].valueType)),_(f,"class","align_left input_box svelte-51mr58"),_(u,"class","svelte-51mr58"),_(k,"class","align_right svelte-51mr58")},m($,R){N($,e,R),m(e,t),m(t,n),m(e,i),m(e,r),m(r,a),m(e,c),m(e,u),m(u,f),ce(f,l[2].userInput),m(e,g),m(e,k),m(k,w),m(e,C),E||(A=[de(f,"input",j),de(f,"blur",function(){ts(l[2].userInput=void 0)&&(l[2].userInput=void 0).apply(this,arguments)})],E=!0)},p($,R){l=$,R&1&&s!==(s=l[2].formatTag+"")&&he(n,s),R&1&&o!==(o=l[2].formatCode+"")&&he(a,o),R&1&&d!==(d="id_format_row"+l[2].formatTag)&&_(f,"id",d),R&1&&p!==(p=l[2].exampleInput||ut(l[2].valueType))&&_(f,"placeholder",p),R&1&&f.value!==l[2].userInput&&ce(f,l[2].userInput),R&1&&v!==(v=ct(l[2])+"")&&he(w,v)},d($){$&&h(e),E=!1,Ye(A)}}}function Qr(l){let e,t,s='Format Name Format Code Example Input Example Output',n,i=pe(l[0]),r=[];for(let o=0;o{"formats"in i&&t(0,s=i.formats)},[s,n]}class gs extends ye{constructor(e){super(),ke(this,e,eo,Qr,be,{formats:0})}}function cn(l){let e,t,s,n;const i=l[4].default,r=ll(i,l,l[3],null);return{c(){e=b("div"),r&&r.c(),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=D(e);r&&r.l(a),a.forEach(h),this.h()},h(){_(e,"class","collapsibleContents svelte-16b384t"),e.hidden=t=!l[0]},m(o,a){N(o,e,a),r&&r.m(e,null),n=!0},p(o,a){r&&r.p&&(!n||a&8)&&il(r,i,o,o[3],n?ol(i,o[3],a,null):rl(o[3]),null),(!n||a&1&&t!==(t=!o[0]))&&(e.hidden=t)},i(o){n||(F(r,o),o&&Ae(()=>{n&&(s||(s=Be(e,He,{},!0)),s.run(1))}),n=!0)},o(o){H(r,o),o&&(s||(s=Be(e,He,{},!1)),s.run(0)),n=!1},d(o){o&&h(e),r&&r.d(o),o&&s&&s.end()}}}function to(l){let e,t,s,n,i,r,o,a,c,u,f;o=new Kl({props:{toggled:l[0],size:"16"}});let d=l[0]&&cn(l);return{c(){e=b("div"),t=b("collapsibleHeader"),s=b("button"),n=b("h3"),i=Z(l[1]),r=M(),Y(o.$$.fragment),a=M(),d&&d.c(),this.h()},l(p){e=y(p,"DIV",{class:!0});var g=D(e);t=y(g,"COLLAPSIBLEHEADER",{class:!0});var k=D(t);s=y(k,"BUTTON",{"area-expanded":!0,class:!0});var v=D(s);n=y(v,"H3",{class:!0});var w=D(n);i=Q(w,l[1]),w.forEach(h),r=q(v),X(o.$$.fragment,v),v.forEach(h),k.forEach(h),a=q(g),d&&d.l(g),g.forEach(h),this.h()},h(){_(n,"class","svelte-16b384t"),_(s,"area-expanded",l[0]),_(s,"class","svelte-16b384t"),_(t,"class","svelte-16b384t"),_(e,"class","collapsibleSection svelte-16b384t")},m(p,g){N(p,e,g),m(e,t),m(t,s),m(s,n),m(n,i),m(s,r),z(o,s,null),m(e,a),d&&d.m(e,null),c=!0,u||(f=de(s,"click",es(l[2])),u=!0)},p(p,[g]){(!c||g&2)&&he(i,p[1]);const k={};g&1&&(k.toggled=p[0]),o.$set(k),(!c||g&1)&&_(s,"area-expanded",p[0]),p[0]?d?(d.p(p,g),g&1&&F(d,1)):(d=cn(p),d.c(),F(d,1),d.m(e,null)):d&&(_e(),H(d,1,1,()=>{d=null}),ve())},i(p){c||(F(o.$$.fragment,p),F(d),c=!0)},o(p){H(o.$$.fragment,p),H(d),c=!1},d(p){p&&h(e),J(o),d&&d.d(),u=!1,f()}}}function so(l,e,t){let{$$slots:s={},$$scope:n}=e,{headerText:i}=e,{expanded:r=!0}=e,o=()=>{t(0,r=!r)};return l.$$set=a=>{"headerText"in a&&t(1,i=a.headerText),"expanded"in a&&t(0,r=a.expanded),"$$scope"in a&&t(3,n=a.$$scope)},[r,i,o,n,s]}class it extends ye{constructor(e){super(),ke(this,e,so,to,be,{headerText:1,expanded:0})}}function un(l,e,t){const s=l.slice();return s[5]=e[t],s[6]=e,s[7]=t,s}function no(l,e,t){const s=l.slice();return s[8]=e[t],s}function lo(l){let e,t=l[8].displayName+"",s;return{c(){e=b("option"),s=Z(t),this.h()},l(n){e=y(n,"OPTION",{name:!0,id:!0});var i=D(e);s=Q(i,t),i.forEach(h),this.h()},h(){_(e,"name",l[8].primaryCode),_(e,"id",l[8].primaryCode),e.__value=l[8].primaryCode,ce(e,e.__value)},m(n,i){N(n,e,i),m(e,s)},p:ee,d(n){n&&h(e)}}}function fn(l){let e,t,s,n='Format Name Format Code Example Input Example Output',i,r=[],o=new Map,a,c,u=pe(l[0].filter(l[3]));const f=d=>d[5].formatTag;for(let d=0;d{c&&(a||(a=Be(e,He,{},!0)),a.run(1))}),c=!0}},o(d){d&&(a||(a=Be(e,He,{},!1)),a.run(0)),c=!1},d(d){d&&h(e);for(let p=0;p{r=yt(s,kt,{}),r.start()})),S&&(f||Ae(()=>{f=yt(a,kt,{}),f.start()})),S&&(j||Ae(()=>{j=yt(C,kt,{}),j.start()}))},o:ee,d(S){S&&h(t),R=!1,Ye(L)}}}function io(l){let e,t,s="Choose a currency",n,i,r,o,a,c=pe(jl),u=[];for(let d=0;dl[2].call(e))},m(d,p){N(d,e,p),m(e,t),m(e,n);for(let g=0;g{f=null}),ve())},i(d){F(f)},o(d){H(f)},d(d){d&&(h(e),h(i),h(r)),Oe(u,d),f&&f.d(d),o=!1,a()}}}function ro(l,e,t){let{formats:s}=e,n="Choose a currency";function i(){n=$t(this),t(1,n)}const r=a=>a.parentFormat===n;function o(a,c){a[c].userInput=this.value,t(0,s),t(1,n)}return l.$$set=a=>{"formats"in a&&t(0,s=a.formats)},[s,n,i,r,o]}class oo extends ye{constructor(e){super(),ke(this,e,ro,io,be,{formats:0})}}function hn(l,e,t){const s=l.slice();return s[4]=e[t],s[5]=e,s[6]=t,s}function mn(l){let e,t,s=l[4].formatTag+"",n,i,r,o=l[4].formatCode+"",a,c,u,f,d,p,g,k,v=ct(l[4])+"",w,C,E,A,j,$,R,L,V,S;function I(){l[2].call(f,l[5],l[6])}$=new Me({props:{src:os}});function O(){return l[3](l[4])}return{c(){e=b("tr"),t=b("td"),n=Z(s),i=M(),r=b("td"),a=Z(o),c=M(),u=b("td"),f=b("input"),g=M(),k=b("td"),w=Z(v),C=M(),E=b("td"),A=b("button"),j=b("div"),Y($.$$.fragment),R=M(),this.h()},l(P){e=y(P,"TR",{});var T=D(e);t=y(T,"TD",{class:!0});var B=D(t);n=Q(B,s),B.forEach(h),i=q(T),r=y(T,"TD",{class:!0});var U=D(r);a=Q(U,o),U.forEach(h),c=q(T),u=y(T,"TD",{class:!0});var W=D(u);f=y(W,"INPUT",{id:!0,placeholder:!0,class:!0}),W.forEach(h),g=q(T),k=y(T,"TD",{class:!0});var x=D(k);w=Q(x,v),x.forEach(h),C=q(T),E=y(T,"TD",{class:!0});var G=D(E);A=y(G,"BUTTON",{type:!0,tooltip:!0,class:!0});var se=D(A);j=y(se,"DIV",{class:!0});var ne=D(j);X($.$$.fragment,ne),ne.forEach(h),se.forEach(h),G.forEach(h),R=q(T),T.forEach(h),this.h()},h(){_(t,"class","svelte-1dnj419"),_(r,"class","svelte-1dnj419"),_(f,"id",d="id_format_row"+l[4].formatTag),_(f,"placeholder",p=l[4].exampleInput||ut(l[4].valueType)),_(f,"class","align_left input_box svelte-1dnj419"),_(u,"class","svelte-1dnj419"),_(k,"class","align_right svelte-1dnj419"),_(j,"class","deleteIcon svelte-1dnj419"),_(A,"type","button"),_(A,"tooltip","Remove"),_(A,"class","mb-0.5 svelte-1dnj419"),_(E,"class","svelte-1dnj419")},m(P,T){N(P,e,T),m(e,t),m(t,n),m(e,i),m(e,r),m(r,a),m(e,c),m(e,u),m(u,f),ce(f,l[4].userInput),m(e,g),m(e,k),m(k,w),m(e,C),m(e,E),m(E,A),m(A,j),z($,j,null),m(e,R),L=!0,V||(S=[de(f,"input",I),de(f,"blur",function(){ts(l[4].userInput=void 0)&&(l[4].userInput=void 0).apply(this,arguments)}),de(A,"click",O)],V=!0)},p(P,T){l=P,(!L||T&1)&&s!==(s=l[4].formatTag+"")&&he(n,s),(!L||T&1)&&o!==(o=l[4].formatCode+"")&&he(a,o),(!L||T&1&&d!==(d="id_format_row"+l[4].formatTag))&&_(f,"id",d),(!L||T&1&&p!==(p=l[4].exampleInput||ut(l[4].valueType)))&&_(f,"placeholder",p),T&1&&f.value!==l[4].userInput&&ce(f,l[4].userInput),(!L||T&1)&&v!==(v=ct(l[4])+"")&&he(w,v)},i(P){L||(F($.$$.fragment,P),L=!0)},o(P){H($.$$.fragment,P),L=!1},d(P){P&&h(e),J($),V=!1,Ye(S)}}}function ao(l){let e,t,s='Format Name Format Code Example Input Example Output ',n,i,r=pe(l[0]),o=[];for(let c=0;cH(o[c],1,1,()=>{o[c]=null});return{c(){e=b("table"),t=b("thead"),t.innerHTML=s,n=M();for(let c=0;cn(o);return l.$$set=o=>{"formats"in o&&t(0,s=o.formats),"deleteHandler"in o&&t(1,n=o.deleteHandler)},[s,n,i,r]}class uo extends ye{constructor(e){super(),ke(this,e,co,ao,be,{formats:0,deleteHandler:1})}}function pn(l,e,t){const s=l.slice();return s[14]=e[t],s}function gn(l){let e,t;return e=new it({props:{headerText:"Saved Custom Formats",expanded:!1,$$slots:{default:[fo]},$$scope:{ctx:l}}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&131073&&(i.$$scope={dirty:n,ctx:s}),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function fo(l){let e,t;return e=new uo({props:{formats:l[0].customFormats,deleteHandler:l[6]}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p(s,n){const i={};n&1&&(i.formats=s[0].customFormats),e.$set(i)},i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function _n(l){let e,t=l[14]+"",s,n;return{c(){e=b("option"),s=Z(t),n=M(),this.h()},l(i){e=y(i,"OPTION",{});var r=D(e);s=Q(r,t),n=q(r),r.forEach(h),this.h()},h(){e.__value=l[14],ce(e,e.__value)},m(i,r){N(i,e,r),m(e,s),m(e,n)},p:ee,d(i){i&&h(e)}}}function ho(l){let e,t,s,n,i="Value Type",r,o,a,c,u,f="Format Name",d,p,g,k,v,w="Format Code",C,E,A,j,$,R,L,V,S,I,O,P,T,B,U=l[0].customFormats&&l[0].customFormats.length>0&&gn(l),W=pe(l[5]),x=[];for(let G=0;Gl[9].call(o)),_(s,"class","input-item svelte-ylbsw4"),_(u,"for","formatTag"),_(u,"class","svelte-ylbsw4"),_(p,"id","formatTag"),_(p,"type","text"),_(p,"placeholder","myformat"),_(p,"class","svelte-ylbsw4"),_(c,"class","input-item svelte-ylbsw4"),_(v,"for","formatCode"),_(v,"class","svelte-ylbsw4"),_(E,"id","formatCode"),_(E,"type","text"),_(E,"placeholder",A=l[3]==="date"?"mm/dd/yyyy":"$#,##0.0"),_(E,"class","svelte-ylbsw4"),_(k,"class","input-item svelte-ylbsw4"),_(R,"id","submitCustomFormatButton"),_(R,"type","submit"),R.disabled=V=!(l[1]&&l[2]),_(R,"class","svelte-ylbsw4"),_($,"class","new-format-buttons svelte-ylbsw4"),O.a=null,_(I,"class","error svelte-ylbsw4"),_(t,"autocomplete","off"),_(t,"class","addFormatForm")},m(G,se){U&&U.m(G,se),N(G,e,se),N(G,t,se),m(t,s),m(s,n),m(s,r),m(s,o);for(let ne=0;ne0?U?(U.p(G,se),se&1&&F(U,1)):(U=gn(G),U.c(),F(U,1),U.m(e.parentNode,e)):U&&(_e(),H(U,1,1,()=>{U=null}),ve()),se&32){W=pe(G[5]);let ne;for(ne=0;ne0)t(4,c=w.join("
    "));else{let E=await(await fetch(Xt("/api/customFormattingSettings.json"),{method:"POST",body:JSON.stringify({newCustomFormat:{formatTag:r,formatCode:o,valueType:a}})})).json();E?(t(0,n=E),d()):t(4,c=`Unable to create new custom format ${r}`)}}function d(){t(1,r=""),t(2,o=""),t(3,a="number"),t(4,c="")}function p(){var j;let w=[];/^[a-zA-Z][a-zA-Z0-9]*$/.test(r)||w.push(`"${r}" is not a valid format name. The format name should always start with a letter and only contain letters and numbers.`);let C=10,E,A;a==="date"&&(C=new Date);try{E=Fl.format(o,C)}catch($){A=$}return E||w.push(`Format "${o}" is invalid for type "${a}".`),A&&w.push(A),(s.find($=>$.formatTag===r)||(j=n.customFormats)!=null&&j.find($=>$.formatTag===r))&&w.push(`The format name "${r}"" is already assigned to an existing format.`),w}function g(){a=$t(this),t(3,a),t(5,i)}function k(){r=this.value,t(1,r)}function v(){o=this.value,t(2,o)}return l.$$set=w=>{"builtInFormats"in w&&t(8,s=w.builtInFormats),"customFormattingSettings"in w&&t(0,n=w.customFormattingSettings)},[n,r,o,a,c,i,u,f,s,g,k,v]}class po extends ye{constructor(e){super(),ke(this,e,mo,ho,be,{builtInFormats:8,customFormattingSettings:0})}}function go(l){let e,t;return e=new gs({props:{formats:Tt.filter(ko)}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function _o(l){let e,t;return e=new oo({props:{formats:Tt.filter(wo)}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function vo(l){let e,t;return e=new gs({props:{formats:Tt.filter(Co)}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function bo(l){let e,t;return e=new gs({props:{formats:Tt.filter($o)}}),{c(){Y(e.$$.fragment)},l(s){X(e.$$.fragment,s)},m(s,n){z(e,s,n),t=!0},p:ee,i(s){t||(F(e.$$.fragment,s),t=!0)},o(s){H(e.$$.fragment,s),t=!1},d(s){J(e,s)}}}function yo(l){let e,t,s,n,i="Value Formatting",r,o,a=`Evidence supports built-in formats (like usd and pct) and + Excel-style formats (like $#,##0.0). The easiest way to apply these formats is + using component props. For example:`,c,u,f="In the Value component, you can use the fmt prop",d,p,g,k,v,w,C,E="In charts, you can use the xFmt and yFmt props",A,j,$,R,L,V,S,I=`You can also set formats within your SQL queries using SQL format tags. Use these by + aliasing your column names and appending a format. For example:`,O,P,T,B,U,W,x,G,se="Built-in Formats",ne,$e,Ee="All built-in formats are listed below for reference.",ae,Se,ie,ue,oe,we,Ce,re,te,le,Ne,Te="Custom Formats",De,je,Re='Add new formats to your project. Custom formats use excel-style format codes.',Rt,xe,Ut,ze,_s='Learn more about formatting in Evidence →',St;return g=new Kt({props:{code:l[3]}}),$=new Kt({props:{code:l[2]}}),T=new Kt({props:{code:l[1]}}),Se=new it({props:{headerText:"Dates",expanded:!1,$$slots:{default:[go]},$$scope:{ctx:l}}}),ue=new it({props:{headerText:"Currencies",expanded:!1,$$slots:{default:[_o]},$$scope:{ctx:l}}}),we=new it({props:{headerText:"Numbers",expanded:!1,$$slots:{default:[vo]},$$scope:{ctx:l}}}),re=new it({props:{headerText:"Percentages",expanded:!1,$$slots:{default:[bo]},$$scope:{ctx:l}}}),xe=new po({props:{builtInFormats:Tt,customFormattingSettings:l[0]}}),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=M(),o=b("p"),o.innerHTML=a,c=M(),u=b("p"),u.innerHTML=f,d=M(),p=b("div"),Y(g.$$.fragment),k=M(),v=b("br"),w=M(),C=b("p"),C.innerHTML=E,A=M(),j=b("div"),Y($.$$.fragment),R=M(),L=b("br"),V=M(),S=b("p"),S.textContent=I,O=M(),P=b("div"),Y(T.$$.fragment),B=M(),U=b("p"),W=M(),x=b("div"),G=b("h2"),G.textContent=se,ne=M(),$e=b("p"),$e.textContent=Ee,ae=M(),Y(Se.$$.fragment),ie=M(),Y(ue.$$.fragment),oe=M(),Y(we.$$.fragment),Ce=M(),Y(re.$$.fragment),te=M(),le=b("div"),Ne=b("h2"),Ne.textContent=Te,De=M(),je=b("p"),je.innerHTML=Re,Rt=M(),Y(xe.$$.fragment),Ut=M(),ze=b("footer"),ze.innerHTML=_s,this.h()},l(fe){e=y(fe,"FORM",{id:!0,class:!0});var Ie=D(e);t=y(Ie,"DIV",{class:!0});var Ue=D(t);s=y(Ue,"DIV",{class:!0});var ge=D(s);n=y(ge,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-1pt91sq"&&(n.textContent=i),r=q(ge),o=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-y867uy"&&(o.innerHTML=a),c=q(ge),u=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(u)!=="svelte-1b5sps4"&&(u.innerHTML=f),d=q(ge),p=y(ge,"DIV",{class:!0});var gt=D(p);X(g.$$.fragment,gt),gt.forEach(h),k=q(ge),v=y(ge,"BR",{}),w=q(ge),C=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(C)!=="svelte-1uln7kb"&&(C.innerHTML=E),A=q(ge),j=y(ge,"DIV",{class:!0});var _t=D(j);X($.$$.fragment,_t),_t.forEach(h),R=q(ge),L=y(ge,"BR",{}),V=q(ge),S=y(ge,"P",{class:!0,"data-svelte-h":!0}),K(S)!=="svelte-146t22d"&&(S.textContent=I),O=q(ge),P=y(ge,"DIV",{class:!0});var vt=D(P);X(T.$$.fragment,vt),vt.forEach(h),B=q(ge),U=y(ge,"P",{class:!0}),D(U).forEach(h),ge.forEach(h),W=q(Ue),x=y(Ue,"DIV",{class:!0});var Pe=D(x);G=y(Pe,"H2",{class:!0,"data-svelte-h":!0}),K(G)!=="svelte-ef4j4e"&&(G.textContent=se),ne=q(Pe),$e=y(Pe,"P",{class:!0,"data-svelte-h":!0}),K($e)!=="svelte-1uuy1j1"&&($e.textContent=Ee),ae=q(Pe),X(Se.$$.fragment,Pe),ie=q(Pe),X(ue.$$.fragment,Pe),oe=q(Pe),X(we.$$.fragment,Pe),Ce=q(Pe),X(re.$$.fragment,Pe),Pe.forEach(h),te=q(Ue),le=y(Ue,"DIV",{class:!0});var tt=D(le);Ne=y(tt,"H2",{class:!0,"data-svelte-h":!0}),K(Ne)!=="svelte-1avfhcl"&&(Ne.textContent=Te),De=q(tt),je=y(tt,"P",{class:!0,"data-svelte-h":!0}),K(je)!=="svelte-zf74ph"&&(je.innerHTML=Re),Rt=q(tt),X(xe.$$.fragment,tt),tt.forEach(h),Ue.forEach(h),Ut=q(Ie),ze=y(Ie,"FOOTER",{class:!0,"data-svelte-h":!0}),K(ze)!=="svelte-104hjhg"&&(ze.innerHTML=_s),Ie.forEach(h),this.h()},h(){_(n,"class","svelte-q2acau"),_(o,"class","svelte-q2acau"),_(u,"class","svelte-q2acau"),_(p,"class","code-container p-2 svelte-q2acau"),_(C,"class","svelte-q2acau"),_(j,"class","code-container p-2 svelte-q2acau"),_(S,"class","svelte-q2acau"),_(P,"class","code-container p-2 svelte-q2acau"),_(U,"class","svelte-q2acau"),_(s,"class","panel svelte-q2acau"),_(G,"class","svelte-q2acau"),_($e,"class","svelte-q2acau"),_(x,"class","panel svelte-q2acau"),_(Ne,"class","svelte-q2acau"),_(je,"class","svelte-q2acau"),_(le,"class","panel svelte-q2acau"),_(t,"class","formatting-settings-box svelte-q2acau"),_(ze,"class","svelte-q2acau"),_(e,"id","formatting"),_(e,"class","svelte-q2acau")},m(fe,Ie){N(fe,e,Ie),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),m(s,u),m(s,d),m(s,p),z(g,p,null),m(s,k),m(s,v),m(s,w),m(s,C),m(s,A),m(s,j),z($,j,null),m(s,R),m(s,L),m(s,V),m(s,S),m(s,O),m(s,P),z(T,P,null),m(s,B),m(s,U),m(t,W),m(t,x),m(x,G),m(x,ne),m(x,$e),m(x,ae),z(Se,x,null),m(x,ie),z(ue,x,null),m(x,oe),z(we,x,null),m(x,Ce),z(re,x,null),m(t,te),m(t,le),m(le,Ne),m(le,De),m(le,je),m(le,Rt),z(xe,le,null),m(e,Ut),m(e,ze),St=!0},p(fe,[Ie]){const Ue={};Ie&16&&(Ue.$$scope={dirty:Ie,ctx:fe}),Se.$set(Ue);const ge={};Ie&16&&(ge.$$scope={dirty:Ie,ctx:fe}),ue.$set(ge);const gt={};Ie&16&&(gt.$$scope={dirty:Ie,ctx:fe}),we.$set(gt);const _t={};Ie&16&&(_t.$$scope={dirty:Ie,ctx:fe}),re.$set(_t);const vt={};Ie&1&&(vt.customFormattingSettings=fe[0]),xe.$set(vt)},i(fe){St||(F(g.$$.fragment,fe),F($.$$.fragment,fe),F(T.$$.fragment,fe),F(Se.$$.fragment,fe),F(ue.$$.fragment,fe),F(we.$$.fragment,fe),F(re.$$.fragment,fe),F(xe.$$.fragment,fe),St=!0)},o(fe){H(g.$$.fragment,fe),H($.$$.fragment,fe),H(T.$$.fragment,fe),H(Se.$$.fragment,fe),H(ue.$$.fragment,fe),H(we.$$.fragment,fe),H(re.$$.fragment,fe),H(xe.$$.fragment,fe),St=!1},d(fe){fe&&h(e),J(g),J($),J(T),J(Se),J(ue),J(we),J(re),J(xe)}}}const ko=l=>l.formatCategory==="date",wo=l=>l.formatCategory==="currency",Co=l=>l.formatCategory==="number",$o=l=>l.formatCategory==="percent";function To(l,e,t){let{customFormattingSettings:s}=e,n=`select + growth as growth_pct, -- formatted as a percentage + sales as sales_usd -- formatted as US dollars +from table`,i=``,r="";return l.$$set=o=>{"customFormattingSettings"in o&&t(0,s=o.customFormattingSettings)},[s,n,i,r]}class Eo extends ye{constructor(e){super(),ke(this,e,To,yo,be,{customFormattingSettings:0})}}function So(l){let e,t,s="Each time you run a query, we get the following pieces of information:",n,i,r="
  • A random identifier that is stored in .evidence/customization/.profile.json
  • An anonymized identifier based on the git repository you're using for the project
  • Whether your project is running in development or build mode
  • Whether your query returned from the cache, from your datasource, or returned an error
  • The type of Evidence datasource connectors you are using (postgres, snowflake, etc.)
  • The operating system your project is running on (windows, mac, etc.)
  • ",o,a,c="Sharing anonymous usage data is one of the best ways you can support Evidence.",u,f,d,p="Share anonymous usage data",g,k,v,w,C,E,A;return{c(){e=b("div"),t=b("p"),t.textContent=s,n=M(),i=b("ol"),i.innerHTML=r,o=M(),a=b("p"),a.textContent=c,u=M(),f=b("div"),d=b("label"),d.textContent=p,g=M(),k=b("label"),v=b("input"),w=M(),C=b("span"),this.h()},l(j){e=y(j,"DIV",{});var $=D(e);t=y($,"P",{class:!0,"data-svelte-h":!0}),K(t)!=="svelte-5h9nz3"&&(t.textContent=s),n=q($),i=y($,"OL",{class:!0,"data-svelte-h":!0}),K(i)!=="svelte-1yd05qf"&&(i.innerHTML=r),o=q($),a=y($,"P",{class:!0,"data-svelte-h":!0}),K(a)!=="svelte-1o2o3k3"&&(a.textContent=c),u=q($),f=y($,"DIV",{class:!0});var R=D(f);d=y(R,"LABEL",{for:!0,class:!0,"data-svelte-h":!0}),K(d)!=="svelte-2u0hrt"&&(d.textContent=p),g=q(R),k=y(R,"LABEL",{class:!0});var L=D(k);v=y(L,"INPUT",{type:!0,id:!0,class:!0}),w=q(L),C=y(L,"SPAN",{class:!0}),D(C).forEach(h),L.forEach(h),R.forEach(h),$.forEach(h),this.h()},h(){_(t,"class","svelte-kgapno"),_(i,"class","list-decimal px-8"),_(a,"class","svelte-kgapno"),_(d,"for","telemetry-toggle"),_(d,"class","svelte-kgapno"),_(v,"type","checkbox"),_(v,"id","telemetry-toggle"),_(v,"class","svelte-kgapno"),_(C,"class","slider svelte-kgapno"),_(k,"class","switch svelte-kgapno"),_(f,"class","input-item svelte-kgapno")},m(j,$){N(j,e,$),m(e,t),m(e,n),m(e,i),m(e,o),m(e,a),m(e,u),m(e,f),m(f,d),m(f,g),m(f,k),m(k,v),v.checked=l[0],m(k,w),m(k,C),E||(A=[de(v,"change",l[3]),de(v,"change",l[1])],E=!0)},p(j,$){$&1&&(v.checked=j[0])},d(j){j&&h(e),E=!1,Ye(A)}}}function Io(l){let e,t,s,n,i="Telemetry",r,o,a=`Evidence collects anonymous usage data to help us understand how often the tool is being + used.`,c,u,f,d,p='The source code for our telemetry can be found here →',g;return u=new it({props:{headerText:"More",expanded:!1,$$slots:{default:[So]},$$scope:{ctx:l}}}),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=M(),o=b("p"),o.textContent=a,c=M(),Y(u.$$.fragment),f=M(),d=b("footer"),d.innerHTML=p,this.h()},l(k){e=y(k,"FORM",{id:!0,class:!0});var v=D(e);t=y(v,"DIV",{class:!0});var w=D(t);s=y(w,"DIV",{class:!0});var C=D(s);n=y(C,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-picrrj"&&(n.textContent=i),r=q(C),o=y(C,"P",{class:!0,"data-svelte-h":!0}),K(o)!=="svelte-1tknaya"&&(o.textContent=a),c=q(C),X(u.$$.fragment,C),C.forEach(h),w.forEach(h),f=q(v),d=y(v,"FOOTER",{class:!0,"data-svelte-h":!0}),K(d)!=="svelte-ichbwf"&&(d.innerHTML=p),v.forEach(h),this.h()},h(){_(n,"class","svelte-kgapno"),_(o,"class","svelte-kgapno"),_(s,"class","panel svelte-kgapno"),_(t,"class","telemetry-settings-box svelte-kgapno"),_(d,"class","svelte-kgapno"),_(e,"id","telemetry"),_(e,"class","svelte-kgapno")},m(k,v){N(k,e,v),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),m(s,c),z(u,s,null),m(e,f),m(e,d),g=!0},p(k,[v]){const w={};v&17&&(w.$$scope={dirty:v,ctx:k}),u.$set(w)},i(k){g||(F(u.$$.fragment,k),g=!0)},o(k){H(u.$$.fragment,k),g=!1},d(k){k&&h(e),J(u)}}}function No(l,e,t){let{settings:s}=e,n=(s.send_anonymous_usage_stats??"yes")==="yes";async function i(){t(2,s.send_anonymous_usage_stats=n?"yes":"no",s),await fetch(Xt("/api/settings.json"),{method:"POST",body:JSON.stringify({settings:s})})}function r(){n=this.checked,t(0,n)}return l.$$set=o=>{"settings"in o&&t(2,s=o.settings)},[n,i,s,r]}class Ao extends ye{constructor(e){super(),ke(this,e,No,Io,be,{settings:2})}}function Lo(l){let e,t,s;return t=new Me({props:{src:os,theme:"filled",class:"h-6 w-6 text-negative"}}),{c(){e=b("span"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitx-icon svelte-1xfec5")},m(n,i){N(n,e,i),z(t,e,null),s=!0},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Oo(l){let e,t,s;return t=new Me({props:{src:Ln,theme:"filled",class:"h-6 w-6 text-positive"}}),{c(){e=b("span"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitcheck-icon svelte-1xfec5")},m(n,i){N(n,e,i),z(t,e,null),s=!0},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Po(l){let e,t,s,n,i="Use your code editor to initialize a repo or run `git init` in a terminal",r;return t=new Me({props:{src:On,class:"h-5 w-5 pb-0.5"}}),{c(){e=b("span"),Y(t.$$.fragment),s=M(),n=b("span"),n.textContent=i,this.h()},l(o){e=y(o,"SPAN",{class:!0});var a=D(e);X(t.$$.fragment,a),s=q(a),n=y(a,"SPAN",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-qlaf2o"&&(n.textContent=i),a.forEach(h),this.h()},h(){_(n,"class","info-msg svelte-1xfec5"),_(e,"class","help-icon svelte-1xfec5")},m(o,a){N(o,e,a),z(t,e,null),m(e,s),m(e,n),r=!0},p:ee,i(o){r||(F(t.$$.fragment,o),r=!0)},o(o){H(t.$$.fragment,o),r=!1},d(o){o&&h(e),J(t)}}}function Do(l){let e,t,s,n=l[0].localGitRepo+"",i;return{c(){e=b("div"),t=b("span"),s=Z("Tracking "),i=Z(n),this.h()},l(r){e=y(r,"DIV",{class:!0});var o=D(e);t=y(o,"SPAN",{class:!0});var a=D(t);s=Q(a,"Tracking "),i=Q(a,n),a.forEach(h),o.forEach(h),this.h()},h(){_(t,"class","repo-location svelte-1xfec5"),_(e,"class","result-msg svelte-1xfec5")},m(r,o){N(r,e,o),m(e,t),m(t,s),m(t,i)},p(r,o){o&1&&n!==(n=r[0].localGitRepo+"")&&he(i,n)},i:ee,o:ee,d(r){r&&h(e)}}}function jo(l){let e,t,s;return t=new Me({props:{src:os,theme:"filled",class:"h-6 w-6 text-negative"}}),{c(){e=b("span"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitx-icon svelte-1xfec5")},m(n,i){N(n,e,i),z(t,e,null),s=!0},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function Mo(l){let e,t,s;return t=new Me({props:{src:Ln,theme:"filled",class:"h-6 w-6 text-positive"}}),{c(){e=b("span"),Y(t.$$.fragment),this.h()},l(n){e=y(n,"SPAN",{class:!0});var i=D(e);X(t.$$.fragment,i),i.forEach(h),this.h()},h(){_(e,"class","gitcheck-icon svelte-1xfec5")},m(n,i){N(n,e,i),z(t,e,null),s=!0},i(n){s||(F(t.$$.fragment,n),s=!0)},o(n){H(t.$$.fragment,n),s=!1},d(n){n&&h(e),J(t)}}}function qo(l){let e,t,s,n,i="Publish your git repo to a platform like GitHub or GitLab",r;return t=new Me({props:{src:On,class:"h-5 w-5 pb-0.5"}}),{c(){e=b("span"),Y(t.$$.fragment),s=M(),n=b("span"),n.textContent=i,this.h()},l(o){e=y(o,"SPAN",{class:!0});var a=D(e);X(t.$$.fragment,a),s=q(a),n=y(a,"SPAN",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-mv1gko"&&(n.textContent=i),a.forEach(h),this.h()},h(){_(n,"class","info-msg svelte-1xfec5"),_(e,"class","help-icon svelte-1xfec5")},m(o,a){N(o,e,a),z(t,e,null),m(e,s),m(e,n),r=!0},p:ee,i(o){r||(F(t.$$.fragment,o),r=!0)},o(o){H(t.$$.fragment,o),r=!1},d(o){o&&h(e),J(t)}}}function Fo(l){let e,t,s,n=l[0].gitRepo.replace(".git","")+"",i,r;return{c(){e=b("div"),t=b("a"),s=b("span"),i=Z(n),this.h()},l(o){e=y(o,"DIV",{class:!0});var a=D(e);t=y(a,"A",{href:!0,target:!0,rel:!0});var c=D(t);s=y(c,"SPAN",{class:!0});var u=D(s);i=Q(u,n),u.forEach(h),c.forEach(h),a.forEach(h),this.h()},h(){_(s,"class","repo-location svelte-1xfec5"),_(t,"href",r=l[0].gitRepo.replace(".git","")),_(t,"target","_blank"),_(t,"rel","noreferrer"),_(e,"class","result-msg svelte-1xfec5")},m(o,a){N(o,e,a),m(e,t),m(t,s),m(s,i)},p(o,a){a&1&&n!==(n=o[0].gitRepo.replace(".git","")+"")&&he(i,n),a&1&&r!==(r=o[0].gitRepo.replace(".git",""))&&_(t,"href",r)},i:ee,o:ee,d(o){o&&h(e)}}}function Vo(l){let e,t,s,n,i="Version Control",r,o,a,c,u,f,d="Local Git Repo",p,g,k,v,w,C,E,A,j,$="Git Repo Published",R,L,V,S,I,O='Learn more about Setting Up Version Control →',P;const T=[Oo,Lo],B=[];function U(ie,ue){return ie[0].localGitRepo?0:1}a=U(l),c=B[a]=T[a](l);const W=[Do,Po],x=[];function G(ie,ue){return ie[0].localGitRepo?0:1}g=G(l),k=x[g]=W[g](l);const se=[Mo,jo],ne=[];function $e(ie,ue){return ie[0].gitRepo?0:1}C=$e(l),E=ne[C]=se[C](l);const Ee=[Fo,qo],ae=[];function Se(ie,ue){return ie[0].gitRepo?0:1}return L=Se(l),V=ae[L]=Ee[L](l),{c(){e=b("form"),t=b("div"),s=b("div"),n=b("h2"),n.textContent=i,r=Z(` + Use version control to keep track of changes to your project. A published git repo is needed if + you want to deploy your Evidence project online. + + `),o=b("div"),c.c(),u=M(),f=b("span"),f.textContent=d,p=M(),k.c(),v=M(),w=b("div"),E.c(),A=M(),j=b("span"),j.textContent=$,R=M(),V.c(),S=M(),I=b("footer"),I.innerHTML=O,this.h()},l(ie){e=y(ie,"FORM",{id:!0,class:!0});var ue=D(e);t=y(ue,"DIV",{class:!0});var oe=D(t);s=y(oe,"DIV",{class:!0});var we=D(s);n=y(we,"H2",{class:!0,"data-svelte-h":!0}),K(n)!=="svelte-n9hgtt"&&(n.textContent=i),r=Q(we,` + Use version control to keep track of changes to your project. A published git repo is needed if + you want to deploy your Evidence project online. + + `),o=y(we,"DIV",{class:!0});var Ce=D(o);c.l(Ce),u=q(Ce),f=y(Ce,"SPAN",{class:!0,"data-svelte-h":!0}),K(f)!=="svelte-moy7v6"&&(f.textContent=d),p=q(Ce),k.l(Ce),Ce.forEach(h),v=q(we),w=y(we,"DIV",{class:!0});var re=D(w);E.l(re),A=q(re),j=y(re,"SPAN",{class:!0,"data-svelte-h":!0}),K(j)!=="svelte-1wsobt7"&&(j.textContent=$),R=q(re),V.l(re),re.forEach(h),we.forEach(h),oe.forEach(h),S=q(ue),I=y(ue,"FOOTER",{class:!0,"data-svelte-h":!0}),K(I)!=="svelte-1e01ncp"&&(I.innerHTML=O),ue.forEach(h),this.h()},h(){_(n,"class","svelte-1xfec5"),_(f,"class","item-label svelte-1xfec5"),_(o,"class","git-item svelte-1xfec5"),_(j,"class","item-label svelte-1xfec5"),_(w,"class","git-item svelte-1xfec5"),_(s,"class","panel svelte-1xfec5"),_(t,"class","version-control-box svelte-1xfec5"),_(I,"class","svelte-1xfec5"),_(e,"id","version-control"),_(e,"class","svelte-1xfec5")},m(ie,ue){N(ie,e,ue),m(e,t),m(t,s),m(s,n),m(s,r),m(s,o),B[a].m(o,null),m(o,u),m(o,f),m(o,p),x[g].m(o,null),m(s,v),m(s,w),ne[C].m(w,null),m(w,A),m(w,j),m(w,R),ae[L].m(w,null),m(e,S),m(e,I),P=!0},p(ie,[ue]){let oe=a;a=U(ie),a!==oe&&(_e(),H(B[oe],1,1,()=>{B[oe]=null}),ve(),c=B[a],c||(c=B[a]=T[a](ie),c.c()),F(c,1),c.m(o,u));let we=g;g=G(ie),g===we?x[g].p(ie,ue):(_e(),H(x[we],1,1,()=>{x[we]=null}),ve(),k=x[g],k?k.p(ie,ue):(k=x[g]=W[g](ie),k.c()),F(k,1),k.m(o,null));let Ce=C;C=$e(ie),C!==Ce&&(_e(),H(ne[Ce],1,1,()=>{ne[Ce]=null}),ve(),E=ne[C],E||(E=ne[C]=se[C](ie),E.c()),F(E,1),E.m(w,A));let re=L;L=Se(ie),L===re?ae[L].p(ie,ue):(_e(),H(ae[re],1,1,()=>{ae[re]=null}),ve(),V=ae[L],V?V.p(ie,ue):(V=ae[L]=Ee[L](ie),V.c()),F(V,1),V.m(w,null))},i(ie){P||(F(c),F(k),F(E),F(V),P=!0)},o(ie){H(c),H(k),H(E),H(V),P=!1},d(ie){ie&&h(e),B[a].d(),x[g].d(),ne[C].d(),ae[L].d()}}}function Bo(l,e,t){let{settings:s}=e;return l.$$set=n=>{"settings"in n&&t(0,s=n.settings)},[s]}class Ho extends ye{constructor(e){super(),ke(this,e,Bo,Vo,be,{settings:0})}}const Ro=async({fetch:l,data:e})=>({...e,settings:{},gitIgnore:""}),ta=Object.freeze(Object.defineProperty({__proto__:null,load:Ro},Symbol.toStringTag,{value:"Module"}));function Uo(l){let e,t="Settings are only available in development mode.";return{c(){e=b("p"),e.textContent=t},l(s){e=y(s,"P",{"data-svelte-h":!0}),K(e)!=="svelte-591hpj"&&(e.textContent=t)},m(s,n){N(s,e,n)},p:ee,i:ee,o:ee,d(s){s&&h(e)}}}function Ko(l){let e,t,s,n,i,r,o,a,c,u,f,d,p;return t=new Ho({props:{settings:l[0]}}),n=new vr({props:{availableSourcePlugins:l[3],sources:l[2]}}),r=new Zr({props:{settings:l[0],sources:l[2]}}),a=new Eo({props:{customFormattingSettings:l[1]}}),u=new Ao({props:{settings:l[0]}}),{c(){e=b("div"),Y(t.$$.fragment),s=M(),Y(n.$$.fragment),i=M(),Y(r.$$.fragment),o=M(),Y(a.$$.fragment),c=M(),Y(u.$$.fragment),f=M(),d=b("br"),this.h()},l(g){e=y(g,"DIV",{class:!0});var k=D(e);X(t.$$.fragment,k),s=q(k),X(n.$$.fragment,k),i=q(k),X(r.$$.fragment,k),o=q(k),X(a.$$.fragment,k),c=q(k),X(u.$$.fragment,k),k.forEach(h),f=q(g),d=y(g,"BR",{}),this.h()},h(){_(e,"class","mt-12")},m(g,k){N(g,e,k),z(t,e,null),m(e,s),z(n,e,null),m(e,i),z(r,e,null),m(e,o),z(a,e,null),m(e,c),z(u,e,null),N(g,f,k),N(g,d,k),p=!0},p(g,k){const v={};k&1&&(v.settings=g[0]),t.$set(v);const w={};k&8&&(w.availableSourcePlugins=g[3]),k&4&&(w.sources=g[2]),n.$set(w);const C={};k&1&&(C.settings=g[0]),k&4&&(C.sources=g[2]),r.$set(C);const E={};k&2&&(E.customFormattingSettings=g[1]),a.$set(E);const A={};k&1&&(A.settings=g[0]),u.$set(A)},i(g){p||(F(t.$$.fragment,g),F(n.$$.fragment,g),F(r.$$.fragment,g),F(a.$$.fragment,g),F(u.$$.fragment,g),p=!0)},o(g){H(t.$$.fragment,g),H(n.$$.fragment,g),H(r.$$.fragment,g),H(a.$$.fragment,g),H(u.$$.fragment,g),p=!1},d(g){g&&(h(e),h(f),h(d)),J(t),J(n),J(r),J(a),J(u)}}}function xo(l){let e,t,s,n;const i=[Ko,Uo],r=[];function o(a,c){return 1}return e=o(),t=r[e]=i[e](l),{c(){t.c(),s=me()},l(a){t.l(a),s=me()},m(a,c){r[e].m(a,c),N(a,s,c),n=!0},p(a,[c]){t.p(a,c)},i(a){n||(F(t),n=!0)},o(a){H(t),n=!1},d(a){a&&h(s),r[e].d(a)}}}function Go(l,e,t){let{data:s}=e,{settings:n,customFormattingSettings:i,sources:r,plugins:o}=s;return l.$$set=a=>{"data"in a&&t(4,s=a.data)},l.$$.update=()=>{l.$$.dirty&16&&t(0,{settings:n,customFormattingSettings:i,sources:r,plugins:o}=s,n,(t(1,i),t(4,s)),(t(2,r),t(4,s)),(t(3,o),t(4,s)))},[n,i,r,o,s]}class sa extends ye{constructor(e){super(),ke(this,e,Go,xo,be,{data:4})}}export{sa as component,ta as universal}; diff --git a/_app/immutable/workers/duckdb-browser-eh.worker-fevVEjXW.js b/_app/immutable/workers/duckdb-browser-eh.worker-fevVEjXW.js new file mode 100644 index 0000000000000000000000000000000000000000..fa67943f9a83c97aa7a6b02f81a569e8afb8cbb1 --- /dev/null +++ b/_app/immutable/workers/duckdb-browser-eh.worker-fevVEjXW.js @@ -0,0 +1,53 @@ +(function(){"use strict";var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(()=>{var Vc=Object.create,xi=Object.defineProperty,zc=Object.getOwnPropertyDescriptor,jc=Object.getOwnPropertyNames,$c=Object.getPrototypeOf,qc=Object.prototype.hasOwnProperty,ha=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),xn=(e=>typeof commonjsRequire<"u"?commonjsRequire:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof commonjsRequire<"u"?commonjsRequire:t)[r]}):e)(function(e){if(typeof commonjsRequire<"u")return commonjsRequire.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),fr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pr=(e,t)=>{for(var r in t)xi(e,r,{get:t[r],enumerable:!0})},Co=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of jc(t))!qc.call(e,a)&&a!==r&&xi(e,a,{get:()=>t[a],enumerable:!(n=zc(t,a))||n.enumerable});return e},Mo=(e,t,r)=>(r=e!=null?Vc($c(e)):{},Co(!e||!e.__esModule?xi(r,"default",{value:e,enumerable:!0}):r,e)),Xc=e=>Co(xi({},"__esModule",{value:!0}),e),Qc=function(e,t){this[0]=e,this[1]=t},Cr=e=>{var t=e[ha("asyncIterator")],r=!1,n,a={};return t==null?(t=e[ha("iterator")](),n=l=>a[l]=c=>t[l](c)):(t=t.call(e),n=l=>a[l]=c=>{if(r){if(r=!1,l==="throw")throw c;return c}return r=!0,{done:!1,value:new Qc(new Promise(u=>{var _=t[l](c);if(!(_ instanceof Object))throw TypeError("Object expected");u(_)}),1)}}),a[ha("iterator")]=()=>a,n("next"),"throw"in t?n("throw"):a.throw=l=>{throw l},"return"in t&&n("return"),a},yo=fr(()=>{}),So=fr(()=>{}),Fc=fr(()=>{}),Eo=fr((e,t)=>{t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),Tc=fr((exports,module)=>{var DuckDB=(()=>{var o,_scriptName=typeof document<"u"?(o=document.currentScript)==null?void 0:o.src:void 0;return typeof __filename<"u"&&(_scriptName=_scriptName||__filename),function(moduleArg={}){var moduleRtn,Module=moduleArg,readyPromiseResolve,readyPromiseReject,readyPromise=new Promise((e,t)=>{readyPromiseResolve=e,readyPromiseReject=t}),ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer",moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(e,t)=>{throw t},scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=yo(),nodePath=So();scriptDirectory=__dirname+"/",readBinary=e=>{e=isFileURI(e)?new URL(e):nodePath.normalize(e);var t=fs.readFileSync(e);return t},readAsync=(e,t=!0)=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),new Promise((r,n)=>{fs.readFile(e,t?void 0:"utf8",(a,l)=>{a?n(a):r(t?l.buffer:l)})})),!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=(e,t)=>{throw process.exitCode=e,t}}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:typeof document<"u"&&document.currentScript&&(scriptDirectory=document.currentScript.src),_scriptName&&(scriptDirectory=_scriptName),scriptDirectory.startsWith("blob:")?scriptDirectory="":scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1),ENVIRONMENT_IS_WORKER&&(readBinary=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),readAsync=e=>fetch(e,{credentials:"same-origin"}).then(t=>t.ok?t.arrayBuffer():Promise.reject(new Error(t.status+" : "+t.url))));var out=Module.print||console.log.bind(console),err=Module.printErr||console.error.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary=Module.wasmBinary,wasmMemory,ABORT=!1,EXITSTATUS;function assert(e,t){e||abort(t)}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var INITIAL_MEMORY=Module.INITIAL_MEMORY||16777216;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:65536})}updateMemoryViews();var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),!Module.noFSInit&&!FS.initialized&&FS.init(),FS.ignorePermissions=!1,SOCKFS.root=FS.mount(SOCKFS,{},null),PIPEFS.root=FS.mount(PIPEFS,{},null),callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}var runDependencies=0,dependenciesFulfilled=null;function addRunDependency(e){var t;runDependencies++,(t=Module.monitorRunDependencies)==null||t.call(Module,runDependencies)}function removeRunDependency(e){var t;if(runDependencies--,(t=Module.monitorRunDependencies)==null||t.call(Module,runDependencies),runDependencies==0&&dependenciesFulfilled){var r=dependenciesFulfilled;dependenciesFulfilled=null,r()}}function abort(e){var t;(t=Module.onAbort)==null||t.call(Module,e),e="Aborted("+e+")",err(e),ABORT=!0,e+=". Build with -sASSERTIONS for more info.",runtimeInitialized&&___trap();var r=new WebAssembly.RuntimeError(e);throw readyPromiseReject(r),r}var dataURIPrefix="data:application/octet-stream;base64,",isDataURI=e=>e.startsWith(dataURIPrefix),isFileURI=e=>e.startsWith("file://");function findWasmBinary(){var e="./duckdb-eh.wasm";return isDataURI(e)?e:locateFile(e)}var wasmBinaryFile;function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(e){return wasmBinary?Promise.resolve().then(()=>getBinarySync(e)):readAsync(e).then(t=>new Uint8Array(t),()=>getBinarySync(e))}function instantiateArrayBuffer(e,t,r){return getBinaryPromise(e).then(n=>WebAssembly.instantiate(n,t)).then(r,n=>{err("failed to asynchronously prepare wasm: ".concat(n)),abort(n)})}function instantiateAsync(e,t,r,n){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(t)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(a=>{var l=WebAssembly.instantiateStreaming(a,r);return l.then(n,function(c){return err("wasm streaming compile failed: ".concat(c)),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(t,r,n)})}):instantiateArrayBuffer(t,r,n)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}function createWasm(){var e=getWasmImports();function t(n,a){wasmExports=n.exports,wasmExports=relocateExports(wasmExports,1024);var l=getDylinkMetadata(a);return l.neededDynlibs&&(dynamicLibraries=l.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports),LDSO.init(),loadDylibs(),wasmExports=applySignatureConversions(wasmExports),addOnInit(wasmExports.__wasm_call_ctors),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),removeRunDependency(),wasmExports}addRunDependency();function r(n){t(n.instance,n.module)}if(Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(n){err("Module.instantiateWasm callback failed with error: ".concat(n)),readyPromiseReject(n)}return wasmBinaryFile!=null||(wasmBinaryFile=findWasmBinary()),instantiateAsync(wasmBinary,wasmBinaryFile,e,r).catch(readyPromiseReject),{}}var tempDouble,tempI64,ASM_CONSTS={2182024:(e,t)=>{var r=typeof runtime=="object"&&runtime&&typeof runtime.whereToLoad=="function"&&runtime.whereToLoad?runtime.whereToLoad(UTF8ToString(e)):UTF8ToString(t),n=lengthBytesUTF8(r)+1,a=_malloc(n);return stringToUTF8(r,a,n),a},2182390:(e,t)=>{var r=UTF8ToString(e);if(typeof XMLHttpRequest>"u"){let S=Fc(),P=So(),T=yo();var n=r.split("/"),a=n.length,l=P.join(S.homedir(),".duckdb/extensions/"+n[a-4]+"/"+n[a-3]+"/"+n[a-2]+"/"),c=P.join(l,n[a-1]);try{if(T.existsSync(l)||T.mkdirSync(l,{recursive:!0}),T.existsSync(c))d=T.readFileSync(c);else{let A=new Int32Array(new SharedArrayBuffer(8));var u=xn("node:worker_threads").Worker,_=new u("const {Worker,isMainThread,parentPort,workerData,} = require('node:worker_threads');var times = 0;var SAB = 23;var Z = 0; async function ZZZ(e) {var x = await fetch(e);var res = await x.arrayBuffer();Atomics.store(SAB, 1, res.byteLength);Atomics.store(SAB, 0, 1);Atomics.notify(SAB, 1);Atomics.notify(SAB, 0);Z = res;};parentPort.on('message', function(event) {if (times == 0) {times++;SAB = event;} else if (times == 1) {times++; ZZZ(event);} else {const a = new Uint8Array(Z);const b = new Uint8Array(event.buffer);var K = Z.byteLength;for (var i = 0; i < K; i++) {b[i] = a[i];}Atomics.notify(event, 0);Atomics.store(SAB, 0, 2);Atomics.notify(SAB, 0);}});",{eval:!0}),d;A[0]=0,A[2]=4,_.postMessage(A),_.postMessage(r),Atomics.wait(A,0,0);let M=new Int32Array(new SharedArrayBuffer(A[1]+3-(A[1]+3)%4));_.postMessage(M),Atomics.wait(A,0,1);var p=new Uint8Array(M.buffer,0,A[1]);d=p,_.terminate(),T.writeFileSync(c,d)}}catch(A){return console.log("Error fetching module",A),0}}else{let S=new XMLHttpRequest;if(S.open("GET",r,!1),S.responseType="arraybuffer",S.send(null),S.status!=200)return 0;d=S.response}for(var f=WebAssembly.validate(d),m=d.byteLength,g=_malloc(m+4),h=new Uint8Array(d),y=0;y{if(!e)return AL.alcErr=40964,1},2185079:e=>{if(!AL.currentCtx)return err("alGetProcAddress() called without a valid context"),1;if(!e)return AL.currentCtx.err=40963,1}};function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit(".concat(e,")"),this.status=e}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,t){var r=GOT[t];return r||(r=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(t)||(r.required=!0),r}},callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(Module)},UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,UTF8ArrayToString=(e,t,r)=>{t>>>=0;for(var n=t+r,a=t;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,a));for(var l="";t>10,56320|d&1023)}}return l},getDylinkMetadata=e=>{var t=0,r=0;function n(){return e[t++]}function a(){for(var k=0,x=1;;){var O=e[t++];if(k+=(O&127)*x,x*=128,!(O&128))break}return k}function l(){var k=a();return t+=k,UTF8ArrayToString(e,t-k,k)}function c(k,x){if(k)throw new Error(x)}var u="dylink.0";if(e instanceof WebAssembly.Module){var _=WebAssembly.Module.customSections(e,u);_.length===0&&(u="dylink",_=WebAssembly.Module.customSections(e,u)),c(_.length===0,"need dylink section"),e=new Uint8Array(_[0]),r=e.length}else{var d=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),p=d[0]==1836278016;c(!p,"need to see wasm magic number"),c(e[8]!==0,"need the dylink section to be first"),t=9;var f=a();r=t+f,u=l()}var m={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(u=="dylink"){m.memorySize=a(),m.memoryAlign=a(),m.tableSize=a(),m.tableAlign=a();for(var g=a(),h=0;h{var n={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=n,t!=null&&(LDSO.loadedLibsByHandle[t]=n),n},LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=2323520,alignMemory=(e,t)=>Math.ceil(e/t)*t,getMemory=e=>{if(runtimeInitialized)return _calloc(e,1);var t=___heap_base,r=t+alignMemory(e,16);return ___heap_base=r,GOT.__heap_base.value=r,t},isInternalSym=e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),uleb128Encode=(e,t)=>{e<128?t.push(e):t.push(e%128|128,e>>7)},sigToWasmTypes=e=>{for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:e[0]=="v"?[]:[t[e[0]]]},n=1;n{var r=e.slice(0,1),n=e.slice(1),a={i:127,p:127,j:126,f:125,d:124,e:111};t.push(96),uleb128Encode(n.length,t);for(var l=0;l{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(sigToWasmTypes(t),e);var r=[1];generateFuncType(t,r);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(r.length,n),n.push(...r),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var a=new WebAssembly.Module(new Uint8Array(n)),l=new WebAssembly.Instance(a,{e:{f:e}}),c=l.exports.f;return c},wasmTable=new WebAssembly.Table({initial:24633,element:"anyfunc"}),getWasmTableEntry=e=>wasmTable.get(e),updateTableMap=(e,t)=>{if(functionsInTableMap)for(var r=e;r(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),freeTableIndexes=[],getEmptyTableSlot=()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(e){throw e instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":e}return wasmTable.length-1},setWasmTableEntry=(e,t)=>wasmTable.set(e,t),addFunction=(e,t)=>{var r=getFunctionAddress(e);if(r)return r;var n=getEmptyTableSlot();try{setWasmTableEntry(n,e)}catch(l){if(!(l instanceof TypeError))throw l;var a=convertJsFunctionToWasm(e,t);setWasmTableEntry(n,a)}return functionsInTableMap.set(e,n),n},updateGOT=(e,t)=>{for(var r in e)if(!isInternalSym(r)){var n=e[r];r.startsWith("orig$")&&(r=r.split("$")[1],t=!0),GOT[r]||(GOT[r]=new WebAssembly.Global({value:"i32",mutable:!0})),(t||GOT[r].value==0)&&(typeof n=="function"?GOT[r].value=addFunction(n):typeof n=="number"?GOT[r].value=n:err("unhandled export type for '".concat(r,"': ").concat(typeof n)))}},relocateExports=(e,t,r)=>{var n={};for(var a in e){var l=e[a];typeof l=="object"&&(l=l.value),typeof l=="number"&&(l+=t),n[a]=l}return updateGOT(n,r),n},isSymbolDefined=e=>{var t=wasmImports[e];return!(!t||t.stub)},resolveGlobalSymbol=(e,t=!1)=>{var r;return t&&"orig$"+e in wasmImports&&(e="orig$"+e),isSymbolDefined(e)&&(r=wasmImports[e]),{sym:r,name:e}},UTF8ToString=(e,t)=>(e>>>=0,e?UTF8ArrayToString(HEAPU8,e,t):""),loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);currentModuleWeakSymbols=metadata.weakImports;function loadModule(){var firstLoad=!handle||!HEAP8[handle+8>>>0];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8>>>0]=1,HEAPU32[handle+12>>>2>>>0]=memoryBase,HEAP32[handle+16>>>2>>>0]=metadata.memorySize,HEAPU32[handle+20>>>2>>>0]=tableBase,HEAP32[handle+24>>>2>>>0]=metadata.tableSize)}else memoryBase=HEAPU32[handle+12>>>2>>>0],tableBase=HEAPU32[handle+20>>>2>>>0];var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length;tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub)return wasmImports[t];if(!(t in e)){var r;e[t]=(...n)=>(r||(r=resolveSymbol(t)),r(...n))}return e[t]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func="(".concat(args,") => { ").concat(body," };");ASM_CONSTS[start]=eval(func)}if("__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start ").concat(body,";");moduleExports[name]=eval(func)}for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then(e=>postInstantiation(e.module,e.instance))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return flags.loadAsync?metadata.neededDynlibs.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},mergeLibSymbols=(e,t)=>{registerDynCallSymbols(e);for(var[r,n]of Object.entries(e))(a=>{isSymbolDefined(a)||(wasmImports[a]=n)})(r)},asyncLoad=(e,t,r,n)=>{var a=n?"":"al ".concat(e);readAsync(e).then(l=>{t(new Uint8Array(l)),a&&removeRunDependency()},l=>{if(r)r();else throw'Loading data file "'.concat(e,'" failed.')}),a&&addRunDependency()},preloadPlugins=Module.preloadPlugins||[],registerWasmPlugin=()=>{var e={promiseChainEnd:Promise.resolve(),canHandle:t=>!Module.noWasmDecoding&&t.endsWith(".so"),handle:(t,r,n,a)=>{e.promiseChainEnd=e.promiseChainEnd.then(()=>loadWebAssemblyModule(t,{loadAsync:!0,nodelete:!0},r,{})).then(l=>{preloadedWasm[r]=l,n(t)},l=>{err("failed to instantiate wasm: ".concat(r,": ").concat(l)),a()})}};preloadPlugins.push(e)},preloadedWasm={},registerDynCallSymbols=e=>{for(var[t,r]of Object.entries(e))t.startsWith("dynCall_")&&!Module.hasOwnProperty(t)&&(Module[t]=r)};function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,n){var a=LDSO.loadedLibsByName[e];if(a)return t.global?a.global||(a.global=!0,mergeLibSymbols(a.exports)):(r&&Object.assign(r,a.exports),registerDynCallSymbols(a.exports)),t.nodelete&&a.refcount!==1/0&&(a.refcount=1/0),a.refcount++,n&&(LDSO.loadedLibsByHandle[n]=a),t.loadAsync?Promise.resolve(!0):!0;a=newDSO(e,n,"loading"),a.refcount=t.nodelete?1/0:1,a.global=t.global;function l(){if(n){var _=HEAPU32[n+28>>>2>>>0],d=HEAPU32[n+32>>>2>>>0];if(_&&d){var p=HEAP8.slice(_,_+d);return t.loadAsync?Promise.resolve(p):p}}var f=locateFile(e);if(t.loadAsync)return new Promise((m,g)=>asyncLoad(f,m,g));if(!readBinary)throw new Error("".concat(f,": file not found, and synchronous loading of external files is not available"));return readBinary(f)}function c(){var _=preloadedWasm[e];return _?t.loadAsync?Promise.resolve(_):_:t.loadAsync?l().then(d=>loadWebAssemblyModule(d,t,e,r,n)):loadWebAssemblyModule(l(),t,e,r,n)}function u(_){a.global?mergeLibSymbols(_):r&&(Object.assign(r,_),registerDynCallSymbols(_)),a.exports=_}return t.loadAsync?c().then(_=>(u(_),!0)):(u(c()),!0)}var reportUndefinedSymbols=()=>{for(var[e,t]of Object.entries(GOT))if(t.value==0){var r=resolveGlobalSymbol(e,!0).sym;if(!r&&!t.required)continue;if(typeof r=="function")t.value=addFunction(r,r.sig);else if(typeof r=="number")t.value=r;else throw new Error("bad export type for '".concat(e,"': ").concat(typeof r))}},loadDylibs=()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency(),dynamicLibraries.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})),Promise.resolve()).then(()=>{reportUndefinedSymbols(),removeRunDependency()})},noExitRuntime=Module.noExitRuntime||!0;function __ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm(...e){return wasmImports._ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm(...e)}__ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm.stub=!0;var convertI32PairToI53Checked=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+t*4294967296:NaN;function ___assert_fail(e,t,r,n){e>>>=0,t>>>=0,n>>>=0,abort("Assertion failed: ".concat(UTF8ToString(e),", at: ")+[t?UTF8ToString(t):"unknown filename",r,n?UTF8ToString(n):"unknown function"])}___assert_fail.sig="vppip";var ___c_longjmp=new WebAssembly.Tag({parameters:["i32"]});function ___call_sighandler(e,t){return e>>>=0,getWasmTableEntry(e)(t)}___call_sighandler.sig="vpi";var ___cpp_exception=new WebAssembly.Tag({parameters:["i32"]}),___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=2323520,___stack_low=2257984,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},2323520),PATH={isAbs:e=>e.charAt(0)==="/",splitPath:e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return t.exec(e).slice(1)},normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var a=e[n];a==="."?e.splice(n,1):a===".."?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=PATH.isAbs(e),r=e.substr(-1)==="/";return e=PATH.normalizeArray(e.split("/").filter(n=>!!n),!t).join("/"),!e&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=PATH.splitPath(e),r=t[0],n=t[1];return!r&&!n?".":(n&&(n=n.substr(0,n.length-1)),r+n)},basename:e=>{if(e==="/")return"/";e=PATH.normalize(e),e=e.replace(/\/$/,"");var t=e.lastIndexOf("/");return t===-1?e:e.substr(t+1)},join:(...e)=>PATH.normalize(e.join("/")),join2:(e,t)=>PATH.normalize(e+"/"+t)},initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return n=>crypto.getRandomValues(n);if(ENVIRONMENT_IS_NODE)try{var e=xn("crypto"),t=e.randomFillSync;if(t)return n=>e.randomFillSync(n);var r=e.randomBytes;return n=>(n.set(r(n.byteLength)),n)}catch{}abort("initRandomDevice")},randomFill=e=>(randomFill=initRandomFill())(e),PATH_FS={resolve:(...e)=>{for(var t="",r=!1,n=e.length-1;n>=-1&&!r;n--){var a=n>=0?e[n]:FS.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";t=a+"/"+t,r=PATH.isAbs(a)}return t=PATH.normalizeArray(t.split("/").filter(l=>!!l),!r).join("/"),(r?"/":"")+t||"."},relative:(e,t)=>{e=PATH_FS.resolve(e).substr(1),t=PATH_FS.resolve(t).substr(1);function r(d){for(var p=0;p=0&&d[f]==="";f--);return p>f?[]:d.slice(p,f-p+1)}for(var n=r(e.split("/")),a=r(t.split("/")),l=Math.min(n.length,a.length),c=l,u=0;u{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},stringToUTF8Array=(e,t,r,n)=>{if(r>>>=0,!(n>0))return 0;for(var a=r,l=r+n-1,c=0;c=55296&&u<=57343){var _=e.charCodeAt(++c);u=65536+((u&1023)<<10)|_&1023}if(u<=127){if(r>=l)break;t[r++>>>0]=u}else if(u<=2047){if(r+1>=l)break;t[r++>>>0]=192|u>>6,t[r++>>>0]=128|u&63}else if(u<=65535){if(r+2>=l)break;t[r++>>>0]=224|u>>12,t[r++>>>0]=128|u>>6&63,t[r++>>>0]=128|u&63}else{if(r+3>=l)break;t[r++>>>0]=240|u>>18,t[r++>>>0]=128|u>>12&63,t[r++>>>0]=128|u>>6&63,t[r++>>>0]=128|u&63}}return t[r>>>0]=0,r-a};function intArrayFromString(e,t,r){var n=lengthBytesUTF8(e)+1,a=new Array(n),l=stringToUTF8Array(e,a,0,a.length);return t&&(a.length=l),a}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var e=null;if(ENVIRONMENT_IS_NODE){var t=256,r=Buffer.alloc(t),n=0,a=process.stdin.fd;try{n=fs.readSync(a,r,0,t)}catch(l){if(l.toString().includes("EOF"))n=0;else throw l}n>0&&(e=r.slice(0,n).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(e=window.prompt("Input: "),e!==null&&(e+=` +`));if(!e)return null;FS_stdin_getChar_buffer=intArrayFromString(e,!0)}return FS_stdin_getChar_buffer.shift()},TTY={ttys:[],init(){},shutdown(){},register(e,t){TTY.ttys[e]={input:[],output:[],ops:t},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open(e){var t=TTY.ttys[e.node.rdev];if(!t)throw new FS.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,a){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(60);for(var l=0,c=0;c0&&(out(UTF8ArrayToString(e.output,0)),e.output=[])},ioctl_tcgets(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(e,t,r){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,t){t===null||t===10?(err(UTF8ArrayToString(e.output,0)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(err(UTF8ArrayToString(e.output,0)),e.output=[])}}},zeroMemory=(e,t)=>(HEAPU8.fill(0,e,e+t),e),mmapAlloc=e=>{e=alignMemory(e,65536);var t=_emscripten_builtin_memalign(65536,e);return t?zeroMemory(t,e):0},MEMFS={ops_table:null,mount(e){return MEMFS.createNode(null,"/",16895,0)},createNode(e,t,r,n){if(FS.isBlkdev(r)||FS.isFIFO(r))throw new FS.ErrnoError(63);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var a=FS.createNode(e,t,r,n);return FS.isDir(a.mode)?(a.node_ops=MEMFS.ops_table.dir.node,a.stream_ops=MEMFS.ops_table.dir.stream,a.contents={}):FS.isFile(a.mode)?(a.node_ops=MEMFS.ops_table.file.node,a.stream_ops=MEMFS.ops_table.file.stream,a.usedBytes=0,a.contents=null):FS.isLink(a.mode)?(a.node_ops=MEMFS.ops_table.link.node,a.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(a.mode)&&(a.node_ops=MEMFS.ops_table.chrdev.node,a.stream_ops=MEMFS.ops_table.chrdev.stream),a.timestamp=Date.now(),e&&(e.contents[t]=a,e.timestamp=a.timestamp),a},getFileDataAsTypedArray(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){var n=1048576;t=Math.max(t,r*(r>>0),r!=0&&(t=Math.max(t,256));var a=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(a.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(t==0)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=FS.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,FS.isDir(e.mode)?t.size=4096:FS.isFile(e.mode)?t.size=e.usedBytes:FS.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){t.mode!==void 0&&(e.mode=t.mode),t.timestamp!==void 0&&(e.timestamp=t.timestamp),t.size!==void 0&&MEMFS.resizeFileStorage(e,t.size)},lookup(e,t){throw FS.genericErrors[44]},mknod(e,t,r,n){return MEMFS.createNode(e,t,r,n)},rename(e,t,r){if(FS.isDir(e.mode)){var n;try{n=FS.lookupNode(t,r)}catch{}if(n)for(var a in n.contents)throw new FS.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=FS.lookupNode(e,t);for(var n in r.contents)throw new FS.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r of Object.keys(e.contents))t.push(r);return t},symlink(e,t,r){var n=MEMFS.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!FS.isLink(e.mode))throw new FS.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,a){var l=e.node.contents;if(a>=e.node.usedBytes)return 0;var c=Math.min(e.node.usedBytes-a,n);if(c>8&&l.subarray)t.set(l.subarray(a,a+c),r);else for(var u=0;u0||r+t>>0))}return{ptr:l,allocated:c}},msync(e,t,r,n,a){return MEMFS.stream_ops.write(e,t,0,n,r,!1),0}}},FS_createDataFile=(e,t,r,n,a,l)=>{FS.createDataFile(e,t,r,n,a,l)},FS_handledByPreloadPlugin=(e,t,r,n)=>{typeof Browser<"u"&&Browser.init();var a=!1;return preloadPlugins.forEach(l=>{a||l.canHandle(t)&&(l.handle(e,t,r,n),a=!0)}),a},FS_createPreloadedFile=(e,t,r,n,a,l,c,u,_,d)=>{var p=t?PATH_FS.resolve(PATH.join2(e,t)):e;function f(m){function g(h){d==null||d(),u||FS_createDataFile(e,t,h,n,a,_),l==null||l(),removeRunDependency()}FS_handledByPreloadPlugin(m,p,g,()=>{c==null||c(),removeRunDependency()})||g(m)}addRunDependency(),typeof r=="string"?asyncLoad(r,f,c):f(r)},FS_modeStringToFlags=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},r=t[e];if(typeof r>"u")throw new Error("Unknown file open mode: ".concat(e));return r},FS_getMode=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(e){this.name="ErrnoError",this.errno=e}},genericErrors:{},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(e){this.node=e}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n,this.readMode=365,this.writeMode=146}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return FS.isDir(this.mode)}get isDevice(){return FS.isChrdev(this.mode)}},lookupPath(e,t={}){if(e=PATH_FS.resolve(e),!e)return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};if(t=Object.assign(r,t),t.recurse_count>8)throw new FS.ErrnoError(32);for(var n=e.split("/").filter(f=>!!f),a=FS.root,l="/",c=0;c40)throw new FS.ErrnoError(32)}}return{path:l,node:a}},getPath(e){for(var t;;){if(FS.isRoot(e)){var r=e.mount.mountpoint;return t?r[r.length-1]!=="/"?"".concat(r,"/").concat(t):r+t:r}t=t?"".concat(e.name,"/").concat(t):e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%FS.nameTable.length},hashAddNode(e){var t=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[t],FS.nameTable[t]=e},hashRemoveNode(e){var t=FS.hashName(e.parent.id,e.name);if(FS.nameTable[t]===e)FS.nameTable[t]=e.name_next;else for(var r=FS.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=FS.mayLookup(e);if(r)throw new FS.ErrnoError(r);for(var n=FS.hashName(e.id,t),a=FS.nameTable[n];a;a=a.name_next){var l=a.name;if(a.parent.id===e.id&&l===t)return a}return FS.lookup(e,t)},createNode(e,t,r,n){var a=new FS.FSNode(e,t,r,n);return FS.hashAddNode(a),a},destroyNode(e){FS.hashRemoveNode(e)},isRoot(e){return e===e.parent},isMountpoint(e){return!!e.mounted},isFile(e){return(e&61440)===32768},isDir(e){return(e&61440)===16384},isLink(e){return(e&61440)===40960},isChrdev(e){return(e&61440)===8192},isBlkdev(e){return(e&61440)===24576},isFIFO(e){return(e&61440)===4096},isSocket(e){return(e&49152)===49152},flagsToPermissionString(e){var t=["r","w","rw"][e&3];return e&512&&(t+="w"),t},nodePermissions(e,t){return FS.ignorePermissions?0:t.includes("r")&&!(e.mode&292)||t.includes("w")&&!(e.mode&146)||t.includes("x")&&!(e.mode&73)?2:0},mayLookup(e){if(!FS.isDir(e.mode))return 54;var t=FS.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{var r=FS.lookupNode(e,t);return 20}catch{}return FS.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=FS.lookupNode(e,t)}catch(l){return l.errno}var a=FS.nodePermissions(e,"wx");if(a)return a;if(r){if(!FS.isDir(n.mode))return 54;if(FS.isRoot(n)||FS.getPath(n)===FS.cwd())return 10}else if(FS.isDir(n.mode))return 31;return 0},mayOpen(e,t){return e?FS.isLink(e.mode)?32:FS.isDir(e.mode)&&(FS.flagsToPermissionString(t)!=="r"||t&512)?31:FS.nodePermissions(e,FS.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=FS.MAX_OPEN_FDS;e++)if(!FS.streams[e])return e;throw new FS.ErrnoError(33)},getStreamChecked(e){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(8);return t},getStream:e=>FS.streams[e],createStream(e,t=-1){return e=Object.assign(new FS.FSStream,e),t==-1&&(t=FS.nextfd()),e.fd=t,FS.streams[t]=e,e},closeStream(e){FS.streams[e]=null},dupStream(e,t=-1){var r,n,a=FS.createStream(e,t);return(n=(r=a.stream_ops)==null?void 0:r.dup)==null||n.call(r,a),a},chrdev_stream_ops:{open(e){var t,r,n=FS.getDevice(e.node.rdev);e.stream_ops=n.stream_ops,(r=(t=e.stream_ops).open)==null||r.call(t,e)},llseek(){throw new FS.ErrnoError(70)}},major:e=>e>>8,minor:e=>e&255,makedev:(e,t)=>e<<8|t,registerDevice(e,t){FS.devices[e]={stream_ops:t}},getDevice:e=>FS.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push(...n.mounts)}return t},syncfs(e,t){typeof e=="function"&&(t=e,e=!1),FS.syncFSRequests++,FS.syncFSRequests>1&&err("warning: ".concat(FS.syncFSRequests," FS.syncfs operations in flight at once, probably just doing extra work"));var r=FS.getMounts(FS.root.mount),n=0;function a(c){return FS.syncFSRequests--,t(c)}function l(c){if(c)return l.errored?void 0:(l.errored=!0,a(c));++n>=r.length&&a(null)}r.forEach(c=>{if(!c.type.syncfs)return l(null);c.type.syncfs(c,e,l)})},mount(e,t,r){var n=r==="/",a=!r,l;if(n&&FS.root)throw new FS.ErrnoError(10);if(!n&&!a){var c=FS.lookupPath(r,{follow_mount:!1});if(r=c.path,l=c.node,FS.isMountpoint(l))throw new FS.ErrnoError(10);if(!FS.isDir(l.mode))throw new FS.ErrnoError(54)}var u={type:e,opts:t,mountpoint:r,mounts:[]},_=e.mount(u);return _.mount=u,u.root=_,n?FS.root=_:l&&(l.mounted=u,l.mount&&l.mount.mounts.push(u)),_},unmount(e){var t=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(t.node))throw new FS.ErrnoError(28);var r=t.node,n=r.mounted,a=FS.getMounts(n);Object.keys(FS.nameTable).forEach(c=>{for(var u=FS.nameTable[c];u;){var _=u.name_next;a.includes(u.mount)&&FS.destroyNode(u),u=_}}),r.mounted=null;var l=r.mount.mounts.indexOf(n);r.mount.mounts.splice(l,1)},lookup(e,t){return e.node_ops.lookup(e,t)},mknod(e,t,r){var n=FS.lookupPath(e,{parent:!0}),a=n.node,l=PATH.basename(e);if(!l||l==="."||l==="..")throw new FS.ErrnoError(28);var c=FS.mayCreate(a,l);if(c)throw new FS.ErrnoError(c);if(!a.node_ops.mknod)throw new FS.ErrnoError(63);return a.node_ops.mknod(a,l,t,r)},create(e,t){return t=t!==void 0?t:438,t&=4095,t|=32768,FS.mknod(e,t,0)},mkdir(e,t){return t=t!==void 0?t:511,t&=1023,t|=16384,FS.mknod(e,t,0)},mkdirTree(e,t){for(var r=e.split("/"),n="",a=0;a"u"&&(r=t,t=438),t|=8192,FS.mknod(e,t,r)},symlink(e,t){if(!PATH_FS.resolve(e))throw new FS.ErrnoError(44);var r=FS.lookupPath(t,{parent:!0}),n=r.node;if(!n)throw new FS.ErrnoError(44);var a=PATH.basename(t),l=FS.mayCreate(n,a);if(l)throw new FS.ErrnoError(l);if(!n.node_ops.symlink)throw new FS.ErrnoError(63);return n.node_ops.symlink(n,a,e)},rename(e,t){var r=PATH.dirname(e),n=PATH.dirname(t),a=PATH.basename(e),l=PATH.basename(t),c,u,_;if(c=FS.lookupPath(e,{parent:!0}),u=c.node,c=FS.lookupPath(t,{parent:!0}),_=c.node,!u||!_)throw new FS.ErrnoError(44);if(u.mount!==_.mount)throw new FS.ErrnoError(75);var d=FS.lookupNode(u,a),p=PATH_FS.relative(e,n);if(p.charAt(0)!==".")throw new FS.ErrnoError(28);if(p=PATH_FS.relative(t,r),p.charAt(0)!==".")throw new FS.ErrnoError(55);var f;try{f=FS.lookupNode(_,l)}catch{}if(d!==f){var m=FS.isDir(d.mode),g=FS.mayDelete(u,a,m);if(g)throw new FS.ErrnoError(g);if(g=f?FS.mayDelete(_,l,m):FS.mayCreate(_,l),g)throw new FS.ErrnoError(g);if(!u.node_ops.rename)throw new FS.ErrnoError(63);if(FS.isMountpoint(d)||f&&FS.isMountpoint(f))throw new FS.ErrnoError(10);if(_!==u&&(g=FS.nodePermissions(u,"w"),g))throw new FS.ErrnoError(g);FS.hashRemoveNode(d);try{u.node_ops.rename(d,_,l),d.parent=_}catch(h){throw h}finally{FS.hashAddNode(d)}}},rmdir(e){var t=FS.lookupPath(e,{parent:!0}),r=t.node,n=PATH.basename(e),a=FS.lookupNode(r,n),l=FS.mayDelete(r,n,!0);if(l)throw new FS.ErrnoError(l);if(!r.node_ops.rmdir)throw new FS.ErrnoError(63);if(FS.isMountpoint(a))throw new FS.ErrnoError(10);r.node_ops.rmdir(r,n),FS.destroyNode(a)},readdir(e){var t=FS.lookupPath(e,{follow:!0}),r=t.node;if(!r.node_ops.readdir)throw new FS.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var t=FS.lookupPath(e,{parent:!0}),r=t.node;if(!r)throw new FS.ErrnoError(44);var n=PATH.basename(e),a=FS.lookupNode(r,n),l=FS.mayDelete(r,n,!1);if(l)throw new FS.ErrnoError(l);if(!r.node_ops.unlink)throw new FS.ErrnoError(63);if(FS.isMountpoint(a))throw new FS.ErrnoError(10);r.node_ops.unlink(r,n),FS.destroyNode(a)},readlink(e){var t=FS.lookupPath(e),r=t.node;if(!r)throw new FS.ErrnoError(44);if(!r.node_ops.readlink)throw new FS.ErrnoError(28);return PATH_FS.resolve(FS.getPath(r.parent),r.node_ops.readlink(r))},stat(e,t){var r=FS.lookupPath(e,{follow:!t}),n=r.node;if(!n)throw new FS.ErrnoError(44);if(!n.node_ops.getattr)throw new FS.ErrnoError(63);return n.node_ops.getattr(n)},lstat(e){return FS.stat(e,!0)},chmod(e,t,r){var n;if(typeof e=="string"){var a=FS.lookupPath(e,{follow:!r});n=a.node}else n=e;if(!n.node_ops.setattr)throw new FS.ErrnoError(63);n.node_ops.setattr(n,{mode:t&4095|n.mode&-4096,timestamp:Date.now()})},lchmod(e,t){FS.chmod(e,t,!0)},fchmod(e,t){var r=FS.getStreamChecked(e);FS.chmod(r.node,t)},chown(e,t,r,n){var a;if(typeof e=="string"){var l=FS.lookupPath(e,{follow:!n});a=l.node}else a=e;if(!a.node_ops.setattr)throw new FS.ErrnoError(63);a.node_ops.setattr(a,{timestamp:Date.now()})},lchown(e,t,r){FS.chown(e,t,r,!0)},fchown(e,t,r){var n=FS.getStreamChecked(e);FS.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new FS.ErrnoError(28);var r;if(typeof e=="string"){var n=FS.lookupPath(e,{follow:!0});r=n.node}else r=e;if(!r.node_ops.setattr)throw new FS.ErrnoError(63);if(FS.isDir(r.mode))throw new FS.ErrnoError(31);if(!FS.isFile(r.mode))throw new FS.ErrnoError(28);var a=FS.nodePermissions(r,"w");if(a)throw new FS.ErrnoError(a);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=FS.getStreamChecked(e);if(!(r.flags&2097155))throw new FS.ErrnoError(28);FS.truncate(r.node,t)},utime(e,t,r){var n=FS.lookupPath(e,{follow:!0}),a=n.node;a.node_ops.setattr(a,{timestamp:Math.max(t,r)})},open(e,t,r){if(e==="")throw new FS.ErrnoError(44);t=typeof t=="string"?FS_modeStringToFlags(t):t,t&64?(r=typeof r>"u"?438:r,r=r&4095|32768):r=0;var n;if(typeof e=="object")n=e;else{e=PATH.normalize(e);try{var a=FS.lookupPath(e,{follow:!(t&131072)});n=a.node}catch{}}var l=!1;if(t&64)if(n){if(t&128)throw new FS.ErrnoError(20)}else n=FS.mknod(e,r,0),l=!0;if(!n)throw new FS.ErrnoError(44);if(FS.isChrdev(n.mode)&&(t&=-513),t&65536&&!FS.isDir(n.mode))throw new FS.ErrnoError(54);if(!l){var c=FS.mayOpen(n,t);if(c)throw new FS.ErrnoError(c)}t&512&&!l&&FS.truncate(n,0),t&=-131713;var u=FS.createStream({node:n,path:FS.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),Module.logReadFiles&&!(t&1)&&(e in FS.readFiles||(FS.readFiles[e]=1)),u},close(e){if(FS.isClosed(e))throw new FS.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(t){throw t}finally{FS.closeStream(e.fd)}e.fd=null},isClosed(e){return e.fd===null},llseek(e,t,r){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new FS.ErrnoError(70);if(r!=0&&r!=1&&r!=2)throw new FS.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,a){if(n<0||a<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if((e.flags&2097155)===1)throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.read)throw new FS.ErrnoError(28);var l=typeof a<"u";if(!l)a=e.position;else if(!e.seekable)throw new FS.ErrnoError(70);var c=e.stream_ops.read(e,t,r,n,a);return l||(e.position+=c),c},write(e,t,r,n,a,l){if(n<0||a<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!(e.flags&2097155))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.write)throw new FS.ErrnoError(28);e.seekable&&e.flags&1024&&FS.llseek(e,0,2);var c=typeof a<"u";if(!c)a=e.position;else if(!e.seekable)throw new FS.ErrnoError(70);var u=e.stream_ops.write(e,t,r,n,a,l);return c||(e.position+=u),u},allocate(e,t,r){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(t<0||r<=0)throw new FS.ErrnoError(28);if(!(e.flags&2097155))throw new FS.ErrnoError(8);if(!FS.isFile(e.node.mode)&&!FS.isDir(e.node.mode))throw new FS.ErrnoError(43);if(!e.stream_ops.allocate)throw new FS.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,a){if(n&2&&!(a&2)&&(e.flags&2097155)!==2)throw new FS.ErrnoError(2);if((e.flags&2097155)===1)throw new FS.ErrnoError(2);if(!e.stream_ops.mmap)throw new FS.ErrnoError(43);if(!t)throw new FS.ErrnoError(28);return e.stream_ops.mmap(e,t,r,n,a)},msync(e,t,r,n,a){return e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,a):0},ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new FS.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary",t.encoding!=="utf8"&&t.encoding!=="binary")throw new Error('Invalid encoding type "'.concat(t.encoding,'"'));var r,n=FS.open(e,t.flags),a=FS.stat(e),l=a.size,c=new Uint8Array(l);return FS.read(n,c,0,l,0),t.encoding==="utf8"?r=UTF8ArrayToString(c,0):t.encoding==="binary"&&(r=c),FS.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=FS.open(e,r.flags,r.mode);if(typeof t=="string"){var a=new Uint8Array(lengthBytesUTF8(t)+1),l=stringToUTF8Array(t,a,0,a.length);FS.write(n,a,0,l,void 0,r.canOwn)}else if(ArrayBuffer.isView(t))FS.write(n,t,0,t.byteLength,void 0,r.canOwn);else throw new Error("Unsupported data type");FS.close(n)},cwd:()=>FS.currentPath,chdir(e){var t=FS.lookupPath(e,{follow:!0});if(t.node===null)throw new FS.ErrnoError(44);if(!FS.isDir(t.node.mode))throw new FS.ErrnoError(54);var r=FS.nodePermissions(t.node,"x");if(r)throw new FS.ErrnoError(r);FS.currentPath=t.path},createDefaultDirectories(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(n,a,l,c,u)=>c}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(t===0&&(t=randomFill(e).byteLength),e[--t]);FS.createDevice("/dev","random",r),FS.createDevice("/dev","urandom",r),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var e=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd"),FS.mount({mount(){var t=FS.createNode(e,"fd",16895,73);return t.node_ops={lookup(r,n){var a=+n,l=FS.getStreamChecked(a),c={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>l.path}};return c.parent=c,c}},t}},{},"/proc/self/fd")},createStandardStreams(e,t,r){e?FS.createDevice("/dev","stdin",e):FS.symlink("/dev/tty","/dev/stdin"),t?FS.createDevice("/dev","stdout",null,t):FS.symlink("/dev/tty","/dev/stdout"),r?FS.createDevice("/dev","stderr",null,r):FS.symlink("/dev/tty1","/dev/stderr"),FS.open("/dev/stdin",0),FS.open("/dev/stdout",1),FS.open("/dev/stderr",1)},staticInit(){[44].forEach(e=>{FS.genericErrors[e]=new FS.ErrnoError(e),FS.genericErrors[e].stack=""}),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS}},init(e,t,r){FS.initialized=!0,e!=null||(e=Module.stdin),t!=null||(t=Module.stdout),r!=null||(r=Module.stderr),FS.createStandardStreams(e,t,r)},quit(){FS.initialized=!1;for(var e=0;ethis.length-1||g<0)){var h=g%this.chunkSize,y=g/this.chunkSize|0;return this.getter(y)[h]}}setDataGetter(g){this.getter=g}cacheLength(){var g=new XMLHttpRequest;if(g.open("HEAD",r,!1),g.send(null),!(g.status>=200&&g.status<300||g.status===304))throw new Error("Couldn't load "+r+". Status: "+g.status);var h=Number(g.getResponseHeader("Content-length")),y,b=(y=g.getResponseHeader("Accept-Ranges"))&&y==="bytes",S=(y=g.getResponseHeader("Content-Encoding"))&&y==="gzip",P=1024*1024;b||(P=h);var T=(M,Q)=>{if(M>Q)throw new Error("invalid range ("+M+", "+Q+") or no bytes requested!");if(Q>h-1)throw new Error("only "+h+" bytes available! programmer error!");var F=new XMLHttpRequest;if(F.open("GET",r,!1),h!==P&&F.setRequestHeader("Range","bytes="+M+"-"+Q),F.responseType="arraybuffer",F.overrideMimeType&&F.overrideMimeType("text/plain; charset=x-user-defined"),F.send(null),!(F.status>=200&&F.status<300||F.status===304))throw new Error("Couldn't load "+r+". Status: "+F.status);return F.response!==void 0?new Uint8Array(F.response||[]):intArrayFromString(F.responseText||"",!0)},A=this;A.setDataGetter(M=>{var Q=M*P,F=(M+1)*P-1;if(F=Math.min(F,h-1),typeof A.chunks[M]>"u"&&(A.chunks[M]=T(Q,F)),typeof A.chunks[M]>"u")throw new Error("doXHR failed!");return A.chunks[M]}),(S||!h)&&(P=h=1,h=this.getter(0).length,P=h,out("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=h,this._chunkSize=P,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var c=new l,u={isDevice:!1,contents:c}}else var u={isDevice:!1,url:r};var _=FS.createFile(e,t,u,n,a);u.contents?_.contents=u.contents:u.url&&(_.contents=null,_.url=u.url),Object.defineProperties(_,{usedBytes:{get:function(){return this.contents.length}}});var d={},p=Object.keys(_.stream_ops);p.forEach(m=>{var g=_.stream_ops[m];d[m]=(...h)=>(FS.forceLoadFile(_),g(...h))});function f(m,g,h,y,b){var S=m.node.contents;if(b>=S.length)return 0;var P=Math.min(S.length-b,y);if(S.slice)for(var T=0;T(FS.forceLoadFile(_),f(m,g,h,y,b)),d.mmap=(m,g,h,y,b)=>{FS.forceLoadFile(_);var S=mmapAlloc(g);if(!S)throw new FS.ErrnoError(48);return f(m,HEAP8,S,g,h),{ptr:S,allocated:!0}},_.stream_ops=d,_}},SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(PATH.isAbs(t))return t;var n;if(e===-100)n=FS.cwd();else{var a=SYSCALLS.getStreamFromFD(e);n=a.path}if(t.length==0){if(!r)throw new FS.ErrnoError(44);return n}return PATH.join2(n,t)},doStat(e,t,r){var n=e(t);HEAP32[r>>>2>>>0]=n.dev,HEAP32[r+4>>>2>>>0]=n.mode,HEAPU32[r+8>>>2>>>0]=n.nlink,HEAP32[r+12>>>2>>>0]=n.uid,HEAP32[r+16>>>2>>>0]=n.gid,HEAP32[r+20>>>2>>>0]=n.rdev,tempI64=[n.size>>>0,(tempDouble=n.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+24>>>2>>>0]=tempI64[0],HEAP32[r+28>>>2>>>0]=tempI64[1],HEAP32[r+32>>>2>>>0]=4096,HEAP32[r+36>>>2>>>0]=n.blocks;var a=n.atime.getTime(),l=n.mtime.getTime(),c=n.ctime.getTime();return tempI64=[Math.floor(a/1e3)>>>0,(tempDouble=Math.floor(a/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+40>>>2>>>0]=tempI64[0],HEAP32[r+44>>>2>>>0]=tempI64[1],HEAPU32[r+48>>>2>>>0]=a%1e3*1e3*1e3,tempI64=[Math.floor(l/1e3)>>>0,(tempDouble=Math.floor(l/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+56>>>2>>>0]=tempI64[0],HEAP32[r+60>>>2>>>0]=tempI64[1],HEAPU32[r+64>>>2>>>0]=l%1e3*1e3*1e3,tempI64=[Math.floor(c/1e3)>>>0,(tempDouble=Math.floor(c/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+72>>>2>>>0]=tempI64[0],HEAP32[r+76>>>2>>>0]=tempI64[1],HEAPU32[r+80>>>2>>>0]=c%1e3*1e3*1e3,tempI64=[n.ino>>>0,(tempDouble=n.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+88>>>2>>>0]=tempI64[0],HEAP32[r+92>>>2>>>0]=tempI64[1],0},doMsync(e,t,r,n,a){if(!FS.isFile(t.node.mode))throw new FS.ErrnoError(43);if(n&2)return 0;var l=HEAPU8.slice(e,e+r);FS.msync(t,l,a,r,n)},getStreamFromFD(e){var t=FS.getStreamChecked(e);return t},varargs:void 0,getStr(e){var t=UTF8ToString(e);return t}};function ___syscall__newselect(e,t,r,n,a){t>>>=0,r>>>=0,n>>>=0,a>>>=0;try{for(var l=0,c=t?HEAP32[t>>>2>>>0]:0,u=t?HEAP32[t+4>>>2>>>0]:0,_=r?HEAP32[r>>>2>>>0]:0,d=r?HEAP32[r+4>>>2>>>0]:0,p=n?HEAP32[n>>>2>>>0]:0,f=n?HEAP32[n+4>>>2>>>0]:0,m=0,g=0,h=0,y=0,b=0,S=0,P=(t?HEAP32[t>>>2>>>0]:0)|(r?HEAP32[r>>>2>>>0]:0)|(n?HEAP32[n>>>2>>>0]:0),T=(t?HEAP32[t+4>>>2>>>0]:0)|(r?HEAP32[r+4>>>2>>>0]:0)|(n?HEAP32[n+4>>>2>>>0]:0),A=function(k,x,O,D){return k<32?x&D:O&D},M=0;M>>2>>>0]:0,L=t?HEAP32[a+4>>>2>>>0]:0;w=(C+L/1e6)*1e3}E=F.stream_ops.poll(F,w)}E&1&&A(M,c,u,Q)&&(M<32?m=m|Q:g=g|Q,l++),E&4&&A(M,_,d,Q)&&(M<32?h=h|Q:y=y|Q,l++),E&2&&A(M,p,f,Q)&&(M<32?b=b|Q:S=S|Q,l++)}}return t&&(HEAP32[t>>>2>>>0]=m,HEAP32[t+4>>>2>>>0]=g),r&&(HEAP32[r>>>2>>>0]=h,HEAP32[r+4>>>2>>>0]=y),n&&(HEAP32[n>>>2>>>0]=b,HEAP32[n+4>>>2>>>0]=S),l}catch(k){if(typeof FS>"u"||k.name!=="ErrnoError")throw k;return-k.errno}}___syscall__newselect.sig="iipppp";var SOCKFS={mount(e){return Module.websocket=Module.websocket&&typeof Module.websocket=="object"?Module.websocket:{},Module.websocket._callbacks={},Module.websocket.on=function(t,r){return typeof r=="function"&&(this._callbacks[t]=r),this},Module.websocket.emit=function(t,r){typeof this._callbacks[t]=="function"&&this._callbacks[t].call(this,r)},FS.createNode(null,"/",16895,0)},createSocket(e,t,r){t&=-526337;var n=t==1;if(n&&r&&r!=6)throw new FS.ErrnoError(66);var a={family:e,type:t,protocol:r,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops},l=SOCKFS.nextname(),c=FS.createNode(SOCKFS.root,l,49152,0);c.sock=a;var u=FS.createStream({path:l,node:c,flags:2,seekable:!1,stream_ops:SOCKFS.stream_ops});return a.stream=u,a},getSocket(e){var t=FS.getStream(e);return!t||!FS.isSocket(t.node.mode)?null:t.node.sock},stream_ops:{poll(e){var t=e.node.sock;return t.sock_ops.poll(t)},ioctl(e,t,r){var n=e.node.sock;return n.sock_ops.ioctl(n,t,r)},read(e,t,r,n,a){var l=e.node.sock,c=l.sock_ops.recvmsg(l,n);return c?(t.set(c.buffer,r),c.buffer.length):0},write(e,t,r,n,a){var l=e.node.sock;return l.sock_ops.sendmsg(l,t,r,n)},close(e){var t=e.node.sock;t.sock_ops.close(t)}},nextname(){return SOCKFS.nextname.current||(SOCKFS.nextname.current=0),"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer(e,t,r){var n;if(typeof t=="object"&&(n=t,t=null,r=null),n)if(n._socket)t=n._socket.remoteAddress,r=n._socket.remotePort;else{var a=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!a)throw new Error("WebSocket URL must be in the format ws(s)://address:port");t=a[1],r=parseInt(a[2],10)}else try{var l=Module.websocket&&typeof Module.websocket=="object",c="ws:#".replace("#","//");if(l&&typeof Module.websocket.url=="string"&&(c=Module.websocket.url),c==="ws://"||c==="wss://"){var u=t.split("/");c=c+u[0]+":"+r+"/"+u.slice(1).join("/")}var _="binary";l&&typeof Module.websocket.subprotocol=="string"&&(_=Module.websocket.subprotocol);var d=void 0;_!=="null"&&(_=_.replace(/^ +| +$/g,"").split(/ *, */),d=_),l&&Module.websocket.subprotocol===null&&(_="null",d=void 0);var p;ENVIRONMENT_IS_NODE?p=Eo():p=WebSocket,n=new p(c,d),n.binaryType="arraybuffer"}catch{throw new FS.ErrnoError(23)}var f={addr:t,port:r,socket:n,dgram_send_queue:[]};return SOCKFS.websocket_sock_ops.addPeer(e,f),SOCKFS.websocket_sock_ops.handlePeerEvents(e,f),e.type===2&&typeof e.sport<"u"&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,112,111,114,116,(e.sport&65280)>>8,e.sport&255])),f},getPeer(e,t,r){return e.peers[t+":"+r]},addPeer(e,t){e.peers[t.addr+":"+t.port]=t},removePeer(e,t){delete e.peers[t.addr+":"+t.port]},handlePeerEvents(e,t){var r=!0,n=function(){Module.websocket.emit("open",e.stream.fd);try{for(var l=t.dgram_send_queue.shift();l;)t.socket.send(l),l=t.dgram_send_queue.shift()}catch{t.socket.close()}};function a(l){if(typeof l=="string"){var c=new TextEncoder;l=c.encode(l)}else{if(assert(l.byteLength!==void 0),l.byteLength==0)return;l=new Uint8Array(l)}var u=r;if(r=!1,u&&l.length===10&&l[0]===255&&l[1]===255&&l[2]===255&&l[3]===255&&l[4]===112&&l[5]===111&&l[6]===114&&l[7]===116){var _=l[8]<<8|l[9];SOCKFS.websocket_sock_ops.removePeer(e,t),t.port=_,SOCKFS.websocket_sock_ops.addPeer(e,t);return}e.recv_queue.push({addr:t.addr,port:t.port,data:l}),Module.websocket.emit("message",e.stream.fd)}ENVIRONMENT_IS_NODE?(t.socket.on("open",n),t.socket.on("message",function(l,c){c&&a(new Uint8Array(l).buffer)}),t.socket.on("close",function(){Module.websocket.emit("close",e.stream.fd)}),t.socket.on("error",function(l){e.error=14,Module.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})):(t.socket.onopen=n,t.socket.onclose=function(){Module.websocket.emit("close",e.stream.fd)},t.socket.onmessage=function(l){a(l.data)},t.socket.onerror=function(l){e.error=14,Module.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll(e){if(e.type===1&&e.server)return e.pending.length?65:0;var t=0,r=e.type===1?SOCKFS.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!r||r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=65),(!r||r&&r.socket.readyState===r.socket.OPEN)&&(t|=4),(r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=16),t},ioctl(e,t,r){switch(t){case 21531:var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),HEAP32[r>>>2>>>0]=n,0;default:return 28}},close(e){if(e.server){try{e.server.close()}catch{}e.server=null}for(var t=Object.keys(e.peers),r=0;r{var t=SOCKFS.getSocket(e);if(!t)throw new FS.ErrnoError(8);return t},inetPton4=e=>{for(var t=e.split("."),r=0;r<4;r++){var n=Number(t[r]);if(isNaN(n))return null;t[r]=n}return(t[0]|t[1]<<8|t[2]<<16|t[3]<<24)>>>0},jstoi_q=e=>parseInt(e),inetPton6=e=>{var t,r,n,a,l=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,c=[];if(!l.test(e))return null;if(e==="::")return[0,0,0,0,0,0,0,0];for(e.startsWith("::")?e=e.replace("::","Z:"):e=e.replace("::",":Z:"),e.indexOf(".")>0?(e=e.replace(new RegExp("[.]","g"),":"),t=e.split(":"),t[t.length-4]=jstoi_q(t[t.length-4])+jstoi_q(t[t.length-3])*256,t[t.length-3]=jstoi_q(t[t.length-2])+jstoi_q(t[t.length-1])*256,t=t.slice(0,t.length-2)):t=e.split(":"),n=0,a=0,r=0;r{switch(t){case 2:r=inetPton4(r),zeroMemory(e,16),a&&(HEAP32[a>>>2>>>0]=16),HEAP16[e>>>1>>>0]=t,HEAP32[e+4>>>2>>>0]=r,HEAP16[e+2>>>1>>>0]=_htons(n);break;case 10:r=inetPton6(r),zeroMemory(e,28),a&&(HEAP32[a>>>2>>>0]=28),HEAP32[e>>>2>>>0]=t,HEAP32[e+8>>>2>>>0]=r[0],HEAP32[e+12>>>2>>>0]=r[1],HEAP32[e+16>>>2>>>0]=r[2],HEAP32[e+20>>>2>>>0]=r[3],HEAP16[e+2>>>1>>>0]=_htons(n);break;default:return 5}return 0},DNS={address_map:{id:1,addrs:{},names:{}},lookup_name(e){var t=inetPton4(e);if(t!==null||(t=inetPton6(e),t!==null))return e;var r;if(DNS.address_map.addrs[e])r=DNS.address_map.addrs[e];else{var n=DNS.address_map.id++;assert(n<65535,"exceeded max address mappings of 65535"),r="172.29."+(n&255)+"."+(n&65280),DNS.address_map.names[r]=e,DNS.address_map.addrs[e]=r}return r},lookup_addr(e){return DNS.address_map.names[e]?DNS.address_map.names[e]:null}};function ___syscall_accept4(e,t,r,n,a,l){t>>>=0,r>>>=0;try{var c=getSocketFromFD(e),u=c.sock_ops.accept(c);if(t)var _=writeSockaddr(t,u.family,DNS.lookup_name(u.daddr),u.dport,r);return u.stream.fd}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_accept4.sig="iippiii";var inetNtop4=e=>(e&255)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255),inetNtop6=e=>{var t="",r=0,n=0,a=0,l=0,c=0,u=0,_=[e[0]&65535,e[0]>>16,e[1]&65535,e[1]>>16,e[2]&65535,e[2]>>16,e[3]&65535,e[3]>>16],d=!0,p="";for(u=0;u<5;u++)if(_[u]!==0){d=!1;break}if(d){if(p=inetNtop4(_[6]|_[7]<<16),_[5]===-1)return t="::ffff:",t+=p,t;if(_[5]===0)return t="::",p==="0.0.0.0"&&(p=""),p==="0.0.0.1"&&(p="1"),t+=p,t}for(r=0;r<8;r++)_[r]===0&&(r-a>1&&(c=0),a=r,c++),c>n&&(n=c,l=r-n+1);for(r=0;r<8;r++){if(n>1&&_[r]===0&&r>=l&&r{var r=HEAP16[e>>>1>>>0],n=_ntohs(HEAPU16[e+2>>>1>>>0]),a;switch(r){case 2:if(t!==16)return{errno:28};a=HEAP32[e+4>>>2>>>0],a=inetNtop4(a);break;case 10:if(t!==28)return{errno:28};a=[HEAP32[e+8>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+16>>>2>>>0],HEAP32[e+20>>>2>>>0]],a=inetNtop6(a);break;default:return{errno:5}}return{family:r,addr:a,port:n}},getSocketAddress=(e,t)=>{var r=readSockaddr(e,t);if(r.errno)throw new FS.ErrnoError(r.errno);return r.addr=DNS.lookup_addr(r.addr)||r.addr,r};function ___syscall_bind(e,t,r,n,a,l){t>>>=0,r>>>=0;try{var c=getSocketFromFD(e),u=getSocketAddress(t,r);return c.sock_ops.bind(c,u.addr,u.port),0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_bind.sig="iippiii";function ___syscall_chdir(e){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.chdir(e),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_chdir.sig="ip";function ___syscall_chmod(e,t){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.chmod(e,t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_chmod.sig="ipi";function ___syscall_connect(e,t,r,n,a,l){t>>>=0,r>>>=0;try{var c=getSocketFromFD(e),u=getSocketAddress(t,r);return c.sock_ops.connect(c,u.addr,u.port),0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_connect.sig="iippiii";function ___syscall_dup(e){try{var t=SYSCALLS.getStreamFromFD(e);return FS.dupStream(t).fd}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_dup.sig="ii";function ___syscall_dup3(e,t,r){try{var n=SYSCALLS.getStreamFromFD(e);if(n.fd===t)return-28;if(t<0||t>=FS.MAX_OPEN_FDS)return-8;var a=FS.getStream(t);return a&&FS.close(a),FS.dupStream(n,t).fd}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_dup3.sig="iiii";function ___syscall_faccessat(e,t,r,n){t>>>=0;try{if(t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),r&-8)return-28;var a=FS.lookupPath(t,{follow:!0}),l=a.node;if(!l)return-44;var c="";return r&4&&(c+="r"),r&2&&(c+="w"),r&1&&(c+="x"),c&&FS.nodePermissions(l,c)?-2:0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_faccessat.sig="iipii";var ___syscall_fadvise64=(e,t,r,n)=>0;___syscall_fadvise64.sig="iiiiiii";function ___syscall_fallocate(e,t,r,n,a,l){var c=convertI32PairToI53Checked(r,n),u=convertI32PairToI53Checked(a,l);try{if(isNaN(c))return 61;var _=SYSCALLS.getStreamFromFD(e);return FS.allocate(_,c,u),0}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_fallocate.sig="iiiiiii";function ___syscall_fchdir(e){try{var t=SYSCALLS.getStreamFromFD(e);return FS.chdir(t.path),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_fchdir.sig="ii";function ___syscall_fchmod(e,t){try{return FS.fchmod(e,t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_fchmod.sig="iii";function ___syscall_fchmodat2(e,t,r,n){t>>>=0;try{var a=n&256;return t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),FS.chmod(t,r,a),0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_fchmodat2.sig="iipii";function ___syscall_fchown32(e,t,r){try{return FS.fchown(e,t,r),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_fchown32.sig="iiii";function ___syscall_fchownat(e,t,r,n,a){t>>>=0;try{t=SYSCALLS.getStr(t);var l=a&256;return a=a&-257,t=SYSCALLS.calculateAt(e,t),(l?FS.lchown:FS.chown)(t,r,n),0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_fchownat.sig="iipiii";function syscallGetVarargI(){var e=HEAP32[+SYSCALLS.varargs>>>2>>>0];return SYSCALLS.varargs+=4,e}var syscallGetVarargP=syscallGetVarargI;function ___syscall_fcntl64(e,t,r){r>>>=0,SYSCALLS.varargs=r;try{var n=SYSCALLS.getStreamFromFD(e);switch(t){case 0:{var a=syscallGetVarargI();if(a<0)return-28;for(;FS.streams[a];)a++;var l;return l=FS.dupStream(n,a),l.fd}case 1:case 2:return 0;case 3:return n.flags;case 4:{var a=syscallGetVarargI();return n.flags|=a,0}case 12:{var a=syscallGetVarargP(),c=0;return HEAP16[a+c>>>1>>>0]=2,0}case 13:case 14:return 0}return-28}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_fcntl64.sig="iiip";function ___syscall_fdatasync(e){try{var t=SYSCALLS.getStreamFromFD(e);return 0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_fdatasync.sig="ii";function ___syscall_fstat64(e,t){t>>>=0;try{var r=SYSCALLS.getStreamFromFD(e);return SYSCALLS.doStat(FS.stat,r.path,t)}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_fstat64.sig="iip";function ___syscall_statfs64(e,t,r){e>>>=0,r>>>=0;try{return e=SYSCALLS.getStr(e),HEAP32[r+4>>>2>>>0]=4096,HEAP32[r+40>>>2>>>0]=4096,HEAP32[r+8>>>2>>>0]=1e6,HEAP32[r+12>>>2>>>0]=5e5,HEAP32[r+16>>>2>>>0]=5e5,HEAP32[r+20>>>2>>>0]=FS.nextInode,HEAP32[r+24>>>2>>>0]=1e6,HEAP32[r+28>>>2>>>0]=42,HEAP32[r+44>>>2>>>0]=2,HEAP32[r+36>>>2>>>0]=255,0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_statfs64.sig="ippp";function ___syscall_fstatfs64(e,t,r){t>>>=0,r>>>=0;try{var n=SYSCALLS.getStreamFromFD(e);return ___syscall_statfs64(0,t,r)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_fstatfs64.sig="iipp";function ___syscall_ftruncate64(e,t,r){var n=convertI32PairToI53Checked(t,r);try{return isNaN(n)?61:(FS.ftruncate(e,n),0)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_ftruncate64.sig="iiii";var stringToUTF8=(e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r);function ___syscall_getcwd(e,t){e>>>=0,t>>>=0;try{if(t===0)return-28;var r=FS.cwd(),n=lengthBytesUTF8(r)+1;return t"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_getcwd.sig="ipp";function ___syscall_getdents64(e,t,r){t>>>=0,r>>>=0;try{var n=SYSCALLS.getStreamFromFD(e);n.getdents||(n.getdents=FS.readdir(n.path));for(var a=280,l=0,c=FS.llseek(n,0,1),u=Math.floor(c/a);u>>0,(tempDouble=_,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+l>>>2>>>0]=tempI64[0],HEAP32[t+l+4>>>2>>>0]=tempI64[1],tempI64=[(u+1)*a>>>0,(tempDouble=(u+1)*a,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+l+8>>>2>>>0]=tempI64[0],HEAP32[t+l+12>>>2>>>0]=tempI64[1],HEAP16[t+l+16>>>1>>>0]=280,HEAP8[t+l+18>>>0]=d,stringToUTF8(p,t+l+19,256),l+=a,u+=1}return FS.llseek(n,u*a,0),l}catch(g){if(typeof FS>"u"||g.name!=="ErrnoError")throw g;return-g.errno}}___syscall_getdents64.sig="iipp";function ___syscall_getpeername(e,t,r,n,a,l){t>>>=0,r>>>=0;try{var c=getSocketFromFD(e);if(!c.daddr)return-53;var u=writeSockaddr(t,c.family,DNS.lookup_name(c.daddr),c.dport,r);return 0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_getpeername.sig="iippiii";function ___syscall_getsockname(e,t,r,n,a,l){t>>>=0,r>>>=0;try{var c=getSocketFromFD(e),u=writeSockaddr(t,c.family,DNS.lookup_name(c.saddr||"0.0.0.0"),c.sport,r);return 0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_getsockname.sig="iippiii";function ___syscall_getsockopt(e,t,r,n,a,l){n>>>=0,a>>>=0;try{var c=getSocketFromFD(e);return t===1&&r===4?(HEAP32[n>>>2>>>0]=c.error,HEAP32[a>>>2>>>0]=4,c.error=null,0):-50}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_getsockopt.sig="iiiippi";function ___syscall_ioctl(e,t,r){r>>>=0,SYSCALLS.varargs=r;try{var n=SYSCALLS.getStreamFromFD(e);switch(t){case 21509:return n.tty?0:-59;case 21505:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var a=n.tty.ops.ioctl_tcgets(n),l=syscallGetVarargP();HEAP32[l>>>2>>>0]=a.c_iflag||0,HEAP32[l+4>>>2>>>0]=a.c_oflag||0,HEAP32[l+8>>>2>>>0]=a.c_cflag||0,HEAP32[l+12>>>2>>>0]=a.c_lflag||0;for(var c=0;c<32;c++)HEAP8[l+c+17>>>0]=a.c_cc[c]||0;return 0}return 0}case 21510:case 21511:case 21512:return n.tty?0:-59;case 21506:case 21507:case 21508:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){for(var l=syscallGetVarargP(),u=HEAP32[l>>>2>>>0],_=HEAP32[l+4>>>2>>>0],d=HEAP32[l+8>>>2>>>0],p=HEAP32[l+12>>>2>>>0],f=[],c=0;c<32;c++)f.push(HEAP8[l+c+17>>>0]);return n.tty.ops.ioctl_tcsets(n.tty,t,{c_iflag:u,c_oflag:_,c_cflag:d,c_lflag:p,c_cc:f})}return 0}case 21519:{if(!n.tty)return-59;var l=syscallGetVarargP();return HEAP32[l>>>2>>>0]=0,0}case 21520:return n.tty?-28:-59;case 21531:{var l=syscallGetVarargP();return FS.ioctl(n,t,l)}case 21523:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var m=n.tty.ops.ioctl_tiocgwinsz(n.tty),l=syscallGetVarargP();HEAP16[l>>>1>>>0]=m[0],HEAP16[l+2>>>1>>>0]=m[1]}return 0}case 21524:return n.tty?0:-59;case 21515:return n.tty?0:-59;default:return-28}}catch(g){if(typeof FS>"u"||g.name!=="ErrnoError")throw g;return-g.errno}}___syscall_ioctl.sig="iiip";function ___syscall_listen(e,t){try{var r=getSocketFromFD(e);return r.sock_ops.listen(r,t),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_listen.sig="iiiiiii";function ___syscall_lstat64(e,t){e>>>=0,t>>>=0;try{return e=SYSCALLS.getStr(e),SYSCALLS.doStat(FS.lstat,e,t)}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_lstat64.sig="ipp";function ___syscall_mkdirat(e,t,r){t>>>=0;try{return t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),t=PATH.normalize(t),t[t.length-1]==="/"&&(t=t.substr(0,t.length-1)),FS.mkdir(t,r,0),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_mkdirat.sig="iipi";function ___syscall_mknodat(e,t,r,n){t>>>=0;try{switch(t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),r&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return FS.mknod(t,r,n),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_mknodat.sig="iipii";function ___syscall_newfstatat(e,t,r,n){t>>>=0,r>>>=0;try{t=SYSCALLS.getStr(t);var a=n&256,l=n&4096;return n=n&-6401,t=SYSCALLS.calculateAt(e,t,l),SYSCALLS.doStat(a?FS.lstat:FS.stat,t,r)}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}___syscall_newfstatat.sig="iippi";function ___syscall_openat(e,t,r,n){t>>>=0,n>>>=0,SYSCALLS.varargs=n;try{t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t);var a=n?syscallGetVarargI():0;return FS.open(t,r,a).fd}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_openat.sig="iipip";var PIPEFS={BUCKET_BUFFER_SIZE:8192,mount(e){return FS.createNode(null,"/",16895,0)},createPipe(){var e={buckets:[],refcnt:2};e.buckets.push({buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var t=PIPEFS.nextname(),r=PIPEFS.nextname(),n=FS.createNode(PIPEFS.root,t,4096,0),a=FS.createNode(PIPEFS.root,r,4096,0);n.pipe=e,a.pipe=e;var l=FS.createStream({path:t,node:n,flags:0,seekable:!1,stream_ops:PIPEFS.stream_ops});n.stream=l;var c=FS.createStream({path:r,node:a,flags:1,seekable:!1,stream_ops:PIPEFS.stream_ops});return a.stream=c,{readable_fd:l.fd,writable_fd:c.fd}},stream_ops:{poll(e){var t=e.node.pipe;if((e.flags&2097155)===1)return 260;if(t.buckets.length>0)for(var r=0;r0)return 65}return 0},ioctl(e,t,r){return 28},fsync(e){return 28},read(e,t,r,n,a){for(var l=e.node.pipe,c=0,u=0;u=u)return _.buffer.set(c,_.offset),_.offset+=u,u;d>0&&(_.buffer.set(c.subarray(0,d),_.offset),_.offset+=d,c=c.subarray(d,c.byteLength));for(var p=c.byteLength/PIPEFS.BUCKET_BUFFER_SIZE|0,f=c.byteLength%PIPEFS.BUCKET_BUFFER_SIZE,m=0;m0){var g={buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:c.byteLength,roffset:0};l.buckets.push(g),g.buffer.set(c)}return u},close(e){var t=e.node.pipe;t.refcnt--,t.refcnt===0&&(t.buckets=null)}},nextname(){return PIPEFS.nextname.current||(PIPEFS.nextname.current=0),"pipe["+PIPEFS.nextname.current+++"]"}};function ___syscall_pipe(e){e>>>=0;try{if(e==0)throw new FS.ErrnoError(21);var t=PIPEFS.createPipe();return HEAP32[e>>>2>>>0]=t.readable_fd,HEAP32[e+4>>>2>>>0]=t.writable_fd,0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_pipe.sig="ip";function ___syscall_poll(e,t,r){e>>>=0;try{for(var n=0,a=0;a>>2>>>0],u=HEAP16[l+4>>>1>>>0],_=32,d=FS.getStream(c);d&&(_=SYSCALLS.DEFAULT_POLLMASK,d.stream_ops.poll&&(_=d.stream_ops.poll(d,-1))),_&=u|8|16,_&&n++,HEAP16[l+6>>>1>>>0]=_}return n}catch(p){if(typeof FS>"u"||p.name!=="ErrnoError")throw p;return-p.errno}}___syscall_poll.sig="ipii";function ___syscall_readlinkat(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;try{if(t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),n<=0)return-28;var a=FS.readlink(t),l=Math.min(n,lengthBytesUTF8(a)),c=HEAP8[r+l>>>0];return stringToUTF8(a,r,n+1),HEAP8[r+l>>>0]=c,l}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_readlinkat.sig="iippp";function ___syscall_recvfrom(e,t,r,n,a,l){t>>>=0,r>>>=0,a>>>=0,l>>>=0;try{var c=getSocketFromFD(e),u=c.sock_ops.recvmsg(c,r);if(!u)return 0;if(a)var _=writeSockaddr(a,c.family,DNS.lookup_name(u.addr),u.port,l);return HEAPU8.set(u.buffer,t>>>0),u.buffer.byteLength}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_recvfrom.sig="iippipp";function ___syscall_recvmsg(e,t,r,n,a,l){t>>>=0;try{for(var c=getSocketFromFD(e),u=HEAPU32[t+8>>>2>>>0],_=HEAP32[t+12>>>2>>>0],d=0,p=0;p<_;p++)d+=HEAP32[u+(8*p+4)>>>2>>>0];var f=c.sock_ops.recvmsg(c,d);if(!f)return 0;var m=HEAPU32[t>>>2>>>0];if(m)var g=writeSockaddr(m,c.family,DNS.lookup_name(f.addr),f.port);for(var h=0,y=f.buffer.byteLength,p=0;y>0&&p<_;p++){var b=HEAPU32[u+(8*p+0)>>>2>>>0],S=HEAP32[u+(8*p+4)>>>2>>>0];if(S){var P=Math.min(S,y),T=f.buffer.subarray(h,h+P);HEAPU8.set(T,b+h>>>0),h+=P,y-=P}}return h}catch(A){if(typeof FS>"u"||A.name!=="ErrnoError")throw A;return-A.errno}}___syscall_recvmsg.sig="iipiiii";function ___syscall_renameat(e,t,r,n){t>>>=0,n>>>=0;try{return t=SYSCALLS.getStr(t),n=SYSCALLS.getStr(n),t=SYSCALLS.calculateAt(e,t),n=SYSCALLS.calculateAt(r,n),FS.rename(t,n),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_renameat.sig="iipip";function ___syscall_rmdir(e){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.rmdir(e),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_rmdir.sig="ip";function ___syscall_sendmsg(e,t,r,n,a,l){t>>>=0;try{var c=getSocketFromFD(e),u=HEAPU32[t+8>>>2>>>0],_=HEAP32[t+12>>>2>>>0],d,p,f=HEAPU32[t>>>2>>>0],m=HEAP32[t+4>>>2>>>0];if(f){var g=readSockaddr(f,m);if(g.errno)return-g.errno;p=g.port,d=DNS.lookup_addr(g.addr)||g.addr}for(var h=0,y=0;y<_;y++)h+=HEAP32[u+(8*y+4)>>>2>>>0];for(var b=new Uint8Array(h),S=0,y=0;y<_;y++)for(var P=HEAPU32[u+(8*y+0)>>>2>>>0],T=HEAP32[u+(8*y+4)>>>2>>>0],A=0;A>>0];return c.sock_ops.sendmsg(c,b,0,h,d,p)}catch(M){if(typeof FS>"u"||M.name!=="ErrnoError")throw M;return-M.errno}}___syscall_sendmsg.sig="iipippi";function ___syscall_sendto(e,t,r,n,a,l){t>>>=0,r>>>=0,a>>>=0,l>>>=0;try{var c=getSocketFromFD(e);if(!a)return FS.write(c.stream,HEAP8,t,r);var u=getSocketAddress(a,l);return c.sock_ops.sendmsg(c,HEAP8,t,r,u.addr,u.port)}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_sendto.sig="iippipp";function ___syscall_socket(e,t,r){try{var n=SOCKFS.createSocket(e,t,r);return n.stream.fd}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_socket.sig="iiiiiii";function ___syscall_stat64(e,t){e>>>=0,t>>>=0;try{return e=SYSCALLS.getStr(e),SYSCALLS.doStat(FS.stat,e,t)}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_stat64.sig="ipp";function ___syscall_symlink(e,t){e>>>=0,t>>>=0;try{return e=SYSCALLS.getStr(e),t=SYSCALLS.getStr(t),FS.symlink(e,t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_symlink.sig="ipp";function ___syscall_symlinkat(e,t,r){e>>>=0,r>>>=0;try{return r=SYSCALLS.calculateAt(t,r),FS.symlink(e,r),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_symlinkat.sig="ipip";function ___syscall_truncate64(e,t,r){e>>>=0;var n=convertI32PairToI53Checked(t,r);try{return isNaN(n)?61:(e=SYSCALLS.getStr(e),FS.truncate(e,n),0)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_truncate64.sig="ipii";function ___syscall_unlinkat(e,t,r){t>>>=0;try{return t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),r===0?FS.unlink(t):r===512?FS.rmdir(t):abort("Invalid flags passed to unlinkat"),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_unlinkat.sig="iipi";var readI53FromI64=e=>HEAPU32[e>>>2>>>0]+HEAP32[e+4>>>2>>>0]*4294967296;function ___syscall_utimensat(e,t,r,n){t>>>=0,r>>>=0;try{t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t,!0);var a=Date.now(),l,c;if(!r)l=a,c=a;else{var u=readI53FromI64(r),_=HEAP32[r+8>>>2>>>0];_==1073741823?l=a:_==1073741822?l=-1:l=u*1e3+_/1e6,r+=16,u=readI53FromI64(r),_=HEAP32[r+8>>>2>>>0],_==1073741823?c=a:_==1073741822?c=-1:c=u*1e3+_/1e6}return(c!=-1||l!=-1)&&FS.utime(t,l,c),0}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_utimensat.sig="iippi";var ___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=()=>{abort("")};__abort_js.sig="v";var ENV={},stackAlloc=e=>__emscripten_stack_alloc(e),stringToUTF8OnStack=e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},stackSave=()=>_emscripten_stack_get_current(),stackRestore=e=>__emscripten_stack_restore(e),dlSetError=e=>{var t=stackSave(),r=stringToUTF8OnStack(e);___dl_seterr(r,0),stackRestore(t)},dlopenInternal=(e,t)=>{var r=UTF8ToString(e+36),n=HEAP32[e+4>>>2>>>0];r=PATH.normalize(r);var a=!!(n&256),l=a?null:{},c={global:a,nodelete:!!(n&4096),loadAsync:t.loadAsync};if(t.loadAsync)return loadDynamicLibrary(r,c,l,e);try{return loadDynamicLibrary(r,c,l,e)}catch(u){return dlSetError("Could not load dynamic lib: ".concat(r,` +`).concat(u)),0}};function __dlopen_js(e){return e>>>=0,dlopenInternal(e,{loadAsync:!1})}__dlopen_js.sig="pp";function __dlsym_js(e,t,r){e>>>=0,t>>>=0,r>>>=0,t=UTF8ToString(t);var n,a,l=LDSO.loadedLibsByHandle[e];if(!l.exports.hasOwnProperty(t)||l.exports[t].stub)return dlSetError('Tried to lookup unknown symbol "'.concat(t,'" in dynamic lib: ').concat(l.name)),0;a=Object.keys(l.exports).indexOf(t);var c="orig$"+t;if(n=l.exports[c],n?a=Object.keys(l.exports).indexOf(c):n=l.exports[t],typeof n=="function"){var u=getFunctionAddress(n);u?n=u:(n=addFunction(n,n.sig),HEAPU32[r>>>2>>>0]=a)}return n}__dlsym_js.sig="pppp";function __embind_register_bigint(e,t,r,n,a){}__embind_register_bigint.sig="vpppiiii";var embind_init_charCodes=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);embind_charCodes=e},embind_charCodes,readLatin1String=e=>{for(var t="",r=e;HEAPU8[r>>>0];)t+=embind_charCodes[HEAPU8[r++>>>0]];return t},awaitingDependencies={},registeredTypes={},typeDependencies={},BindingError,throwBindingError=e=>{throw new BindingError(e)},InternalError,throwInternalError=e=>{throw new InternalError(e)},whenDependentTypesAreResolved=(e,t,r)=>{e.forEach(u=>typeDependencies[u]=t);function n(u){var _=r(u);_.length!==e.length&&throwInternalError("Mismatched type converter count");for(var d=0;d{registeredTypes.hasOwnProperty(u)?a[_]=registeredTypes[u]:(l.push(u),awaitingDependencies.hasOwnProperty(u)||(awaitingDependencies[u]=[]),awaitingDependencies[u].push(()=>{a[_]=registeredTypes[u],++c,c===l.length&&n(a)}))}),l.length===0&&n(a)};function sharedRegisterType(e,t,r={}){var n=t.name;if(e||throwBindingError('type "'.concat(n,'" must have a positive integer typeid pointer')),registeredTypes.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;throwBindingError("Cannot register type '".concat(n,"' twice"))}if(registeredTypes[e]=t,delete typeDependencies[e],awaitingDependencies.hasOwnProperty(e)){var a=awaitingDependencies[e];delete awaitingDependencies[e],a.forEach(l=>l())}}function registerType(e,t,r={}){return sharedRegisterType(e,t,r)}var GenericWireTypeSize=8;function __embind_register_bool(e,t,r,n){e>>>=0,t>>>=0,t=readLatin1String(t),registerType(e,{name:t,fromWireType:function(a){return!!a},toWireType:function(a,l){return l?r:n},argPackAdvance:GenericWireTypeSize,readValueFromPointer:function(a){return this.fromWireType(HEAPU8[a>>>0])},destructorFunction:null})}__embind_register_bool.sig="vppii";var emval_freelist=[],emval_handles=[];function __emval_decref(e){e>>>=0,e>9&&--emval_handles[e+1]===0&&(emval_handles[e]=void 0,emval_freelist.push(e))}__emval_decref.sig="vp";var count_emval_handles=()=>emval_handles.length/2-5-emval_freelist.length,init_emval=()=>{emval_handles.push(0,1,void 0,1,null,1,!0,1,!1,1),Module.count_emval_handles=count_emval_handles},Emval={toValue:e=>(e||throwBindingError("Cannot use deleted val. handle = "+e),emval_handles[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=emval_freelist.pop()||emval_handles.length;return emval_handles[t]=e,emval_handles[t+1]=1,t}}}};function readPointer(e){return this.fromWireType(HEAPU32[e>>>2>>>0])}var EmValType={name:"emscripten::val",fromWireType:e=>{var t=Emval.toValue(e);return __emval_decref(e),t},toWireType:(e,t)=>Emval.toHandle(t),argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction:null};function __embind_register_emval(e){return e>>>=0,registerType(e,EmValType)}__embind_register_emval.sig="vp";var embindRepr=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},floatReadValueFromPointer=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(HEAPF32[r>>>2>>>0])};case 8:return function(r){return this.fromWireType(HEAPF64[r>>>3>>>0])};default:throw new TypeError("invalid float width (".concat(t,"): ").concat(e))}},__embind_register_float=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,t=readLatin1String(t),registerType(e,{name:t,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:GenericWireTypeSize,readValueFromPointer:floatReadValueFromPointer(t,r),destructorFunction:null})};__embind_register_float.sig="vppp";var integerReadValueFromPointer=(e,t,r)=>{switch(t){case 1:return r?n=>HEAP8[n>>>0]:n=>HEAPU8[n>>>0];case 2:return r?n=>HEAP16[n>>>1>>>0]:n=>HEAPU16[n>>>1>>>0];case 4:return r?n=>HEAP32[n>>>2>>>0]:n=>HEAPU32[n>>>2>>>0];default:throw new TypeError("invalid integer width (".concat(t,"): ").concat(e))}};function __embind_register_integer(e,t,r,n,a){e>>>=0,t>>>=0,r>>>=0,t=readLatin1String(t);var l=p=>p;if(n===0){var c=32-8*r;l=p=>p<>>c}var u=t.includes("unsigned"),_=(p,f)=>{},d;u?d=function(p,f){return _(f,this.name),f>>>0}:d=function(p,f){return _(f,this.name),f},registerType(e,{name:t,fromWireType:l,toWireType:d,argPackAdvance:GenericWireTypeSize,readValueFromPointer:integerReadValueFromPointer(t,r,n!==0),destructorFunction:null})}__embind_register_integer.sig="vpppii";function __embind_register_memory_view(e,t,r){e>>>=0,r>>>=0;var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[t];function l(c){var u=HEAPU32[c>>>2>>>0],_=HEAPU32[c+4>>>2>>>0];return new a(HEAP8.buffer,_,u)}r=readLatin1String(r),registerType(e,{name:r,fromWireType:l,argPackAdvance:GenericWireTypeSize,readValueFromPointer:l},{ignoreDuplicateRegistrations:!0})}__embind_register_memory_view.sig="vpip";function __embind_register_std_string(e,t){e>>>=0,t>>>=0,t=readLatin1String(t);var r=t==="std::string";registerType(e,{name:t,fromWireType(n){var a=HEAPU32[n>>>2>>>0],l=n+4,c;if(r)for(var u=l,_=0;_<=a;++_){var d=l+_;if(_==a||HEAPU8[d>>>0]==0){var p=d-u,f=UTF8ToString(u,p);c===void 0?c=f:(c+="\0",c+=f),u=d+1}}else{for(var m=new Array(a),_=0;_>>0]);c=m.join("")}return _free(n),c},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var l,c=typeof a=="string";c||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||throwBindingError("Cannot pass non-string to std::string"),r&&c?l=lengthBytesUTF8(a):l=a.length;var u=_malloc(4+l+1),_=u+4;if(HEAPU32[u>>>2>>>0]=l,r&&c)stringToUTF8(a,_,l+1);else if(c)for(var d=0;d255&&(_free(_),throwBindingError("String has UTF-16 code units that do not fit in 8 bits")),HEAPU8[_+d>>>0]=p}else for(var d=0;d>>0]=a[d];return n!==null&&n.push(_free,u),u},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction(n){_free(n)}})}__embind_register_std_string.sig="vpp";var UTF16Decoder=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,UTF16ToString=(e,t)=>{for(var r=e,n=r>>1,a=n+t/2;!(n>=a)&&HEAPU16[n>>>0];)++n;if(r=n<<1,r-e>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(e>>>0,r>>>0));for(var l="",c=0;!(c>=t/2);++c){var u=HEAP16[e+c*2>>>1>>>0];if(u==0)break;l+=String.fromCharCode(u)}return l},stringToUTF16=(e,t,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=t,a=r>>1>>>0]=c,t+=2}return HEAP16[t>>>1>>>0]=0,t-n},lengthBytesUTF16=e=>e.length*2,UTF32ToString=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var a=HEAP32[e+r*4>>>2>>>0];if(a==0)break;if(++r,a>=65536){var l=a-65536;n+=String.fromCharCode(55296|l>>10,56320|l&1023)}else n+=String.fromCharCode(a)}return n},stringToUTF32=(e,t,r)=>{if(t>>>=0,r!=null||(r=2147483647),r<4)return 0;for(var n=t,a=n+r-4,l=0;l=55296&&c<=57343){var u=e.charCodeAt(++l);c=65536+((c&1023)<<10)|u&1023}if(HEAP32[t>>>2>>>0]=c,t+=4,t+4>a)break}return HEAP32[t>>>2>>>0]=0,t-n},lengthBytesUTF32=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},__embind_register_std_wstring=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,r=readLatin1String(r);var n,a,l,c;t===2?(n=UTF16ToString,a=stringToUTF16,c=lengthBytesUTF16,l=u=>HEAPU16[u>>>1>>>0]):t===4&&(n=UTF32ToString,a=stringToUTF32,c=lengthBytesUTF32,l=u=>HEAPU32[u>>>2>>>0]),registerType(e,{name:r,fromWireType:u=>{for(var _=HEAPU32[u>>>2>>>0],d,p=u+4,f=0;f<=_;++f){var m=u+4+f*t;if(f==_||l(m)==0){var g=m-p,h=n(p,g);d===void 0?d=h:(d+="\0",d+=h),p=m+t}}return _free(u),d},toWireType:(u,_)=>{typeof _!="string"&&throwBindingError("Cannot pass non-string to C++ string type ".concat(r));var d=c(_),p=_malloc(4+d+t);return HEAPU32[p>>>2>>>0]=d/t,a(_,p+4,d+t),u!==null&&u.push(_free,p),p},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction(u){_free(u)}})};__embind_register_std_wstring.sig="vppp";var __embind_register_void=function(e,t){e>>>=0,t>>>=0,t=readLatin1String(t),registerType(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})};__embind_register_void.sig="vpp";var handleException=e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},runtimeKeepaliveCounter=0,keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0,_proc_exit=e=>{var t;EXITSTATUS=e,keepRuntimeAlive()||((t=Module.onExit)==null||t.call(Module,e),ABORT=!0),quit_(e,new ExitStatus(e))};_proc_exit.sig="vi";var exitJS=(e,t)=>{EXITSTATUS=e,_proc_exit(e)},_exit=exitJS;_exit.sig="vi";var maybeExit=()=>{if(!keepRuntimeAlive())try{_exit(EXITSTATUS)}catch(e){handleException(e)}},callUserCallback=e=>{if(!ABORT)try{e(),maybeExit()}catch(t){handleException(t)}};function __emscripten_dlopen_js(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;function a(u){var _=UTF8ToString(e+36);dlSetError("'Could not load dynamic lib: ".concat(_,` +`).concat(u)),callUserCallback(()=>getWasmTableEntry(r)(e,n))}function l(){callUserCallback(()=>getWasmTableEntry(t)(e,n))}var c=dlopenInternal(e,{loadAsync:!0});c?c.then(l,a):a()}__emscripten_dlopen_js.sig="vpppp";var nowIsMonotonic=1,__emscripten_get_now_is_monotonic=()=>nowIsMonotonic;__emscripten_get_now_is_monotonic.sig="i";var getExecutableName=()=>thisProgram||"./this.program";function __emscripten_get_progname(e,t){e>>>=0,stringToUTF8(getExecutableName(),e,t)}__emscripten_get_progname.sig="vpi";function __emscripten_lookup_name(e){e>>>=0;var t=UTF8ToString(e);return inetPton4(DNS.lookup_name(t))}__emscripten_lookup_name.sig="ip";function __emscripten_memcpy_js(e,t,r){return e>>>=0,t>>>=0,r>>>=0,HEAPU8.copyWithin(e>>>0,t>>>0,t+r>>>0)}__emscripten_memcpy_js.sig="vppp";var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=!1,runtimeKeepaliveCounter=0};__emscripten_runtime_keepalive_clear.sig="v";function __emscripten_set_offscreencanvas_size(e,t,r){return-1}__emscripten_set_offscreencanvas_size.sig="ipii";function __emscripten_system(e){if(e>>>=0,ENVIRONMENT_IS_NODE){if(!e)return 1;var t=UTF8ToString(e);if(!t.length)return 0;var r=["child_process"].map(xn),n=r.spawnSync(t,[],{shell:!0,stdio:"inherit"}),a=(c,u)=>c<<8|u;if(n.status===null){var l=c=>{switch(c){case"SIGHUP":return 1;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15;default:return 2}};return a(0,l(n.signal))}return a(n.status,0)}return e?-52:0}__emscripten_system.sig="ip";function __gmtime_js(e,t,r){var n=convertI32PairToI53Checked(e,t);r>>>=0;var a=new Date(n*1e3);HEAP32[r>>>2>>>0]=a.getUTCSeconds(),HEAP32[r+4>>>2>>>0]=a.getUTCMinutes(),HEAP32[r+8>>>2>>>0]=a.getUTCHours(),HEAP32[r+12>>>2>>>0]=a.getUTCDate(),HEAP32[r+16>>>2>>>0]=a.getUTCMonth(),HEAP32[r+20>>>2>>>0]=a.getUTCFullYear()-1900,HEAP32[r+24>>>2>>>0]=a.getUTCDay();var l=Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0),c=(a.getTime()-l)/(1e3*60*60*24)|0;HEAP32[r+28>>>2>>>0]=c}__gmtime_js.sig="viip";var isLeapYear=e=>e%4===0&&(e%100!==0||e%400===0),MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335],MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334],ydayFromDate=e=>{var t=isLeapYear(e.getFullYear()),r=t?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE,n=r[e.getMonth()]+e.getDate()-1;return n};function __localtime_js(e,t,r){var n=convertI32PairToI53Checked(e,t);r>>>=0;var a=new Date(n*1e3);HEAP32[r>>>2>>>0]=a.getSeconds(),HEAP32[r+4>>>2>>>0]=a.getMinutes(),HEAP32[r+8>>>2>>>0]=a.getHours(),HEAP32[r+12>>>2>>>0]=a.getDate(),HEAP32[r+16>>>2>>>0]=a.getMonth(),HEAP32[r+20>>>2>>>0]=a.getFullYear()-1900,HEAP32[r+24>>>2>>>0]=a.getDay();var l=ydayFromDate(a)|0;HEAP32[r+28>>>2>>>0]=l,HEAP32[r+36>>>2>>>0]=-(a.getTimezoneOffset()*60);var c=new Date(a.getFullYear(),0,1),u=new Date(a.getFullYear(),6,1).getTimezoneOffset(),_=c.getTimezoneOffset(),d=(u!=_&&a.getTimezoneOffset()==Math.min(_,u))|0;HEAP32[r+32>>>2>>>0]=d}__localtime_js.sig="viip";var setTempRet0=e=>__emscripten_tempret_set(e),_setTempRet0=setTempRet0;Module._setTempRet0=_setTempRet0;var __mktime_js=function(e){e>>>=0;var t=(()=>{var r=new Date(HEAP32[e+20>>>2>>>0]+1900,HEAP32[e+16>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+8>>>2>>>0],HEAP32[e+4>>>2>>>0],HEAP32[e>>>2>>>0],0),n=HEAP32[e+32>>>2>>>0],a=r.getTimezoneOffset(),l=new Date(r.getFullYear(),0,1),c=new Date(r.getFullYear(),6,1).getTimezoneOffset(),u=l.getTimezoneOffset(),_=Math.min(u,c);if(n<0)HEAP32[e+32>>>2>>>0]=+(c!=u&&_==a);else if(n>0!=(_==a)){var d=Math.max(u,c),p=n>0?_:d;r.setTime(r.getTime()+(p-a)*6e4)}HEAP32[e+24>>>2>>>0]=r.getDay();var f=ydayFromDate(r)|0;HEAP32[e+28>>>2>>>0]=f,HEAP32[e>>>2>>>0]=r.getSeconds(),HEAP32[e+4>>>2>>>0]=r.getMinutes(),HEAP32[e+8>>>2>>>0]=r.getHours(),HEAP32[e+12>>>2>>>0]=r.getDate(),HEAP32[e+16>>>2>>>0]=r.getMonth(),HEAP32[e+20>>>2>>>0]=r.getYear();var m=r.getTime();return isNaN(m)?-1:m/1e3})();return setTempRet0((tempDouble=t,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),t>>>0};__mktime_js.sig="ip";function __mmap_js(e,t,r,n,a,l,c,u){e>>>=0;var _=convertI32PairToI53Checked(a,l);c>>>=0,u>>>=0;try{if(isNaN(_))return 61;var d=SYSCALLS.getStreamFromFD(n),p=FS.mmap(d,e,_,t,r),f=p.ptr;return HEAP32[c>>>2>>>0]=p.allocated,HEAPU32[u>>>2>>>0]=f,0}catch(m){if(typeof FS>"u"||m.name!=="ErrnoError")throw m;return-m.errno}}__mmap_js.sig="ipiiiiipp";function __msync_js(e,t,r,n,a,l,c){e>>>=0,t>>>=0;var u=convertI32PairToI53Checked(l,c);try{return isNaN(u)?61:(SYSCALLS.doMsync(e,SYSCALLS.getStreamFromFD(a),t,n,u),0)}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}__msync_js.sig="ippiiiii";function __munmap_js(e,t,r,n,a,l,c){e>>>=0,t>>>=0;var u=convertI32PairToI53Checked(l,c);try{var _=SYSCALLS.getStreamFromFD(a);r&2&&SYSCALLS.doMsync(e,_,t,n,u)}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}__munmap_js.sig="ippiiiii";var timers={},_emscripten_get_now=()=>performance.now();_emscripten_get_now.sig="d";var __setitimer_js=(e,t)=>{if(timers[e]&&(clearTimeout(timers[e].id),delete timers[e]),!t)return 0;var r=setTimeout(()=>{delete timers[e],callUserCallback(()=>__emscripten_timeout(e,_emscripten_get_now()))},t);return timers[e]={id:r,timeout_ms:t},0};__setitimer_js.sig="iid";var __timegm_js=function(e){e>>>=0;var t=(()=>{var r=Date.UTC(HEAP32[e+20>>>2>>>0]+1900,HEAP32[e+16>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+8>>>2>>>0],HEAP32[e+4>>>2>>>0],HEAP32[e>>>2>>>0],0),n=new Date(r);HEAP32[e+24>>>2>>>0]=n.getUTCDay();var a=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),l=(n.getTime()-a)/(1e3*60*60*24)|0;return HEAP32[e+28>>>2>>>0]=l,n.getTime()/1e3})();return setTempRet0((tempDouble=t,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),t>>>0};__timegm_js.sig="ip";var __tzset_js=function(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=new Date().getFullYear(),l=new Date(a,0,1),c=new Date(a,6,1),u=l.getTimezoneOffset(),_=c.getTimezoneOffset(),d=Math.max(u,_);HEAPU32[e>>>2>>>0]=d*60,HEAP32[t>>>2>>>0]=+(u!=_);var p=g=>{var h=g>=0?"-":"+",y=Math.abs(g),b=String(Math.floor(y/60)).padStart(2,"0"),S=String(y%60).padStart(2,"0");return"UTC".concat(h).concat(b).concat(S)},f=p(u),m=p(_);_{if(MainLoop.timingMode=e,MainLoop.timingValue=t,!MainLoop.func)return 1;if(MainLoop.running||(MainLoop.running=!0),e==0)MainLoop.scheduler=function(){var l=Math.max(0,MainLoop.tickStartTime+t-_emscripten_get_now())|0;setTimeout(MainLoop.runner,l)},MainLoop.method="timeout";else if(e==1)MainLoop.scheduler=function(){MainLoop.requestAnimationFrame(MainLoop.runner)},MainLoop.method="rAF";else if(e==2){if(typeof MainLoop.setImmediate>"u")if(typeof setImmediate>"u"){var r=[],n="setimmediate",a=l=>{(l.data===n||l.data.target===n)&&(l.stopPropagation(),r.shift()())};addEventListener("message",a,!0),MainLoop.setImmediate=l=>{r.push(l),ENVIRONMENT_IS_WORKER?(Module.setImmediates!=null||(Module.setImmediates=[]),Module.setImmediates.push(l),postMessage({target:n})):postMessage(n,"*")}}else MainLoop.setImmediate=setImmediate;MainLoop.scheduler=function(){MainLoop.setImmediate(MainLoop.runner)},MainLoop.method="immediate"}return 0};_emscripten_set_main_loop_timing.sig="iii";var setMainLoop=(e,t,r,n,a)=>{MainLoop.func=e,MainLoop.arg=n;var l=MainLoop.currentlyRunningMainloop;function c(){return l0){var u=MainLoop.queue.shift();if(u.func(u.arg),MainLoop.remainingBlockers){var _=MainLoop.remainingBlockers,d=_%1==0?_-1:Math.floor(_);u.counted?MainLoop.remainingBlockers=d:(d=d+.5,MainLoop.remainingBlockers=(8*_+d)/9)}if(MainLoop.updateStatus(),!c())return;setTimeout(MainLoop.runner,0);return}if(c()){if(MainLoop.currentFrameNumber=MainLoop.currentFrameNumber+1|0,MainLoop.timingMode==1&&MainLoop.timingValue>1&&MainLoop.currentFrameNumber%MainLoop.timingValue!=0){MainLoop.scheduler();return}else MainLoop.timingMode==0&&(MainLoop.tickStartTime=_emscripten_get_now());MainLoop.runIter(e),c()&&MainLoop.scheduler()}}},a||(t&&t>0?_emscripten_set_main_loop_timing(0,1e3/t):_emscripten_set_main_loop_timing(1,1),MainLoop.scheduler()),r)throw"unwind"},MainLoop={running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],preMainLoop:[],postMainLoop:[],pause(){MainLoop.scheduler=null,MainLoop.currentlyRunningMainloop++},resume(){MainLoop.currentlyRunningMainloop++;var e=MainLoop.timingMode,t=MainLoop.timingValue,r=MainLoop.func;MainLoop.func=null,setMainLoop(r,0,!1,MainLoop.arg,!0),_emscripten_set_main_loop_timing(e,t),MainLoop.scheduler()},updateStatus(){var e,t;if(Module.setStatus){var r=Module.statusMessage||"Please wait...",n=(e=MainLoop.remainingBlockers)!=null?e:0,a=(t=MainLoop.expectedBlockers)!=null?t:0;n?n=MainLoop.nextRAF;)MainLoop.nextRAF+=1e3/60;var r=Math.max(MainLoop.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame(e){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(e);return}var t=MainLoop.fakeRequestAnimationFrame;t(e)}},AL={QUEUE_INTERVAL:25,QUEUE_LOOKAHEAD:.1,DEVICE_NAME:"Emscripten OpenAL",CAPTURE_DEVICE_NAME:"Emscripten OpenAL capture",ALC_EXTENSIONS:{ALC_SOFT_pause_device:!0,ALC_SOFT_HRTF:!0},AL_EXTENSIONS:{AL_EXT_float32:!0,AL_SOFT_loop_points:!0,AL_SOFT_source_length:!0,AL_EXT_source_distance_model:!0,AL_SOFT_source_spatialize:!0},_alcErr:0,alcErr:0,deviceRefCounts:{},alcStringCache:{},paused:!1,stringCache:{},contexts:{},currentCtx:null,buffers:{0:{id:0,refCount:0,audioBuf:null,frequency:0,bytesPerSample:2,channels:1,length:0}},paramArray:[],_nextId:1,newId:()=>AL.freeIds.length>0?AL.freeIds.pop():AL._nextId++,freeIds:[],scheduleContextAudio:e=>{if(!(MainLoop.timingMode===1&&document.visibilityState!="visible"))for(var t in e.sources)AL.scheduleSourceAudio(e.sources[t])},scheduleSourceAudio:(e,t)=>{if(!(MainLoop.timingMode===1&&document.visibilityState!="visible")&&e.state===4114){for(var r=AL.updateSourceTime(e),n=e.bufStartTime,a=e.bufOffset,l=e.bufsProcessed,c=0;c=e.bufQueue.length)if(e.looping)l%=e.bufQueue.length;else break;var p=e.bufQueue[l%e.bufQueue.length];if(p.length===0){if(d++,d===e.bufQueue.length)break}else{var u=e.context.audioCtx.createBufferSource();u.buffer=p.audioBuf,u.playbackRate.value=e.playbackRate,(p.audioBuf._loopStart||p.audioBuf._loopEnd)&&(u.loopStart=p.audioBuf._loopStart,u.loopEnd=p.audioBuf._loopEnd);var f=0;e.type===4136&&e.looping?(f=Number.POSITIVE_INFINITY,u.loop=!0,p.audioBuf._loopStart&&(u.loopStart=p.audioBuf._loopStart),p.audioBuf._loopEnd&&(u.loopEnd=p.audioBuf._loopEnd)):f=(p.audioBuf.duration-a)/e.playbackRate,u._startOffset=a,u._duration=f,u._skipCount=d,d=0,u.connect(e.gain),typeof u.start<"u"?(n=Math.max(n,e.context.audioCtx.currentTime),u.start(n,a)):typeof u.noteOn<"u"&&(n=Math.max(n,e.context.audioCtx.currentTime),u.noteOn(n)),u._startTime=n,e.audioQueue.push(u),n+=f}a=0,l++}}},updateSourceTime:e=>{var t=e.context.audioCtx.currentTime;if(e.state!==4114)return t;isFinite(e.bufStartTime)||(e.bufStartTime=t-e.bufOffset/e.playbackRate,e.bufOffset=0);for(var r=0;e.audioQueue.length;){var n=e.audioQueue[0];if(e.bufsProcessed+=n._skipCount,r=n._startTime+n._duration,t=e.bufQueue.length&&!e.looping)AL.setSourceState(e,4116);else if(e.type===4136&&e.looping){var a=e.bufQueue[0];if(a.length===0)e.bufOffset=0;else{var l=(t-e.bufStartTime)*e.playbackRate,c=a.audioBuf._loopStart||0,u=a.audioBuf._loopEnd||a.audioBuf.duration;u<=c&&(u=a.audioBuf.duration),l0&&(e.bufStartTime+=Math.floor((t-e.bufStartTime)/_)*_)}for(var d=0;d=e.bufQueue.length)if(e.looping)e.bufsProcessed%=e.bufQueue.length;else{AL.setSourceState(e,4116);break}var a=e.bufQueue[e.bufsProcessed];if(a.length>0){if(r=e.bufStartTime+a.audioBuf.duration/e.playbackRate,t{AL.updateSourceTime(e);for(var t=1;t1&&(e.audioQueue.length=1)},stopSourceAudio:e=>{for(var t=0;t{t===4114?((e.state===4114||e.state==4116)&&(e.bufsProcessed=0,e.bufOffset=0),AL.stopSourceAudio(e),e.state=4114,e.bufStartTime=Number.NEGATIVE_INFINITY,AL.scheduleSourceAudio(e)):t===4115?e.state===4114&&(AL.updateSourceTime(e),AL.stopSourceAudio(e),e.state=4115):t===4116?e.state!==4113&&(e.state=4116,e.bufsProcessed=e.bufQueue.length,e.bufStartTime=Number.NEGATIVE_INFINITY,e.bufOffset=0,AL.stopSourceAudio(e)):t===4113&&e.state!==4113&&(e.state=4113,e.bufsProcessed=0,e.bufStartTime=Number.NEGATIVE_INFINITY,e.bufOffset=0,AL.stopSourceAudio(e))},initSourcePanner:e=>{if(e.type!==4144){for(var t=AL.buffers[0],r=0;r{for(var t in e.sources)AL.updateSourceGlobal(e.sources[t])},updateSourceGlobal:e=>{var t=e.panner;if(t){t.refDistance=e.refDistance,t.maxDistance=e.maxDistance,t.rolloffFactor=e.rolloffFactor,t.panningModel=e.context.hrtf?"HRTF":"equalpower";var r=e.context.sourceDistanceModel?e.distanceModel:e.context.distanceModel;switch(r){case 0:t.distanceModel="inverse",t.refDistance=340282e33;break;case 53249:case 53250:t.distanceModel="inverse";break;case 53251:case 53252:t.distanceModel="linear";break;case 53253:case 53254:t.distanceModel="exponential";break}}},updateListenerSpace:e=>{var t=e.audioCtx.listener;t.positionX?(t.positionX.value=e.listener.position[0],t.positionY.value=e.listener.position[1],t.positionZ.value=e.listener.position[2]):t.setPosition(e.listener.position[0],e.listener.position[1],e.listener.position[2]),t.forwardX?(t.forwardX.value=e.listener.direction[0],t.forwardY.value=e.listener.direction[1],t.forwardZ.value=e.listener.direction[2],t.upX.value=e.listener.up[0],t.upY.value=e.listener.up[1],t.upZ.value=e.listener.up[2]):t.setOrientation(e.listener.direction[0],e.listener.direction[1],e.listener.direction[2],e.listener.up[0],e.listener.up[1],e.listener.up[2]);for(var r in e.sources)AL.updateSourceSpace(e.sources[r])},updateSourceSpace:e=>{if(e.panner){var t=e.panner,r=e.position[0],n=e.position[1],a=e.position[2],l=e.direction[0],c=e.direction[1],u=e.direction[2],_=e.context.listener,d=_.position[0],p=_.position[1],f=_.position[2];if(e.relative){var m=-_.direction[0],g=-_.direction[1],h=-_.direction[2],y=_.up[0],b=_.up[1],S=_.up[2],P=(To,xo,Wi)=>{var Rd=Math.sqrt(To*To+xo*xo+Wi*Wi);return Rd{if(e.state===4114){AL.cancelPendingSourceAudio(e);var t=e.audioQueue[0];if(!t)return;var r;e.type===4136&&e.looping?r=Number.POSITIVE_INFINITY:r=(t.buffer.duration-t._startOffset)/e.playbackRate,t._duration=r,t.playbackRate.value=e.playbackRate,AL.scheduleSourceAudio(e)}},sourceDuration:e=>{for(var t=0,r=0;r{AL.updateSourceTime(e);for(var t=0,r=0;r{var r=e.state==4114;if(r&&AL.setSourceState(e,4113),e.bufQueue[e.bufsProcessed].audioBuf!==null){for(e.bufsProcessed=0;t>e.bufQueue[e.bufsProcessed].audioBuf.duration;)t-=e.bufQueue[e.bufsProcessed].audioBuf.duration,e.bufsProcessed++;e.bufOffset=t}r&&AL.setSourceState(e,4114)},getGlobalParam:(e,t)=>{if(!AL.currentCtx)return null;switch(t){case 49152:return AL.currentCtx.dopplerFactor;case 49155:return AL.currentCtx.speedOfSound;case 53248:return AL.currentCtx.distanceModel;default:return AL.currentCtx.err=40962,null}},setGlobalParam:(e,t,r)=>{if(AL.currentCtx)switch(t){case 49152:if(!Number.isFinite(r)||r<0){AL.currentCtx.err=40963;return}AL.currentCtx.dopplerFactor=r,AL.updateListenerSpace(AL.currentCtx);break;case 49155:if(!Number.isFinite(r)||r<=0){AL.currentCtx.err=40963;return}AL.currentCtx.speedOfSound=r,AL.updateListenerSpace(AL.currentCtx);break;case 53248:switch(r){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:AL.currentCtx.distanceModel=r,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},getListenerParam:(e,t)=>{if(!AL.currentCtx)return null;switch(t){case 4100:return AL.currentCtx.listener.position;case 4102:return AL.currentCtx.listener.velocity;case 4111:return AL.currentCtx.listener.direction.concat(AL.currentCtx.listener.up);case 4106:return AL.currentCtx.gain.gain.value;default:return AL.currentCtx.err=40962,null}},setListenerParam:(e,t,r)=>{if(AL.currentCtx){if(r===null){AL.currentCtx.err=40962;return}var n=AL.currentCtx.listener;switch(t){case 4100:if(!Number.isFinite(r[0])||!Number.isFinite(r[1])||!Number.isFinite(r[2])){AL.currentCtx.err=40963;return}n.position[0]=r[0],n.position[1]=r[1],n.position[2]=r[2],AL.updateListenerSpace(AL.currentCtx);break;case 4102:if(!Number.isFinite(r[0])||!Number.isFinite(r[1])||!Number.isFinite(r[2])){AL.currentCtx.err=40963;return}n.velocity[0]=r[0],n.velocity[1]=r[1],n.velocity[2]=r[2],AL.updateListenerSpace(AL.currentCtx);break;case 4106:if(!Number.isFinite(r)||r<0){AL.currentCtx.err=40963;return}AL.currentCtx.gain.gain.value=r;break;case 4111:if(!Number.isFinite(r[0])||!Number.isFinite(r[1])||!Number.isFinite(r[2])||!Number.isFinite(r[3])||!Number.isFinite(r[4])||!Number.isFinite(r[5])){AL.currentCtx.err=40963;return}n.direction[0]=r[0],n.direction[1]=r[1],n.direction[2]=r[2],n.up[0]=r[3],n.up[1]=r[4],n.up[2]=r[5],AL.updateListenerSpace(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}}},getBufferParam:(e,t,r)=>{if(AL.currentCtx){var n=AL.buffers[t];if(!n||t===0){AL.currentCtx.err=40961;return}switch(r){case 8193:return n.frequency;case 8194:return n.bytesPerSample*8;case 8195:return n.channels;case 8196:return n.length*n.bytesPerSample*n.channels;case 8213:return n.length===0?[0,0]:[(n.audioBuf._loopStart||0)*n.frequency,(n.audioBuf._loopEnd||n.length)*n.frequency];default:return AL.currentCtx.err=40962,null}}},setBufferParam:(e,t,r,n)=>{if(AL.currentCtx){var a=AL.buffers[t];if(!a||t===0){AL.currentCtx.err=40961;return}if(n===null){AL.currentCtx.err=40962;return}switch(r){case 8196:if(n!==0){AL.currentCtx.err=40963;return}break;case 8213:if(n[0]<0||n[0]>a.length||n[1]<0||n[1]>a.Length||n[0]>=n[1]){AL.currentCtx.err=40963;return}if(a.refCount>0){AL.currentCtx.err=40964;return}a.audioBuf&&(a.audioBuf._loopStart=n[0]/a.frequency,a.audioBuf._loopEnd=n[1]/a.frequency);break;default:AL.currentCtx.err=40962;return}}},getSourceParam:(e,t,r)=>{if(!AL.currentCtx)return null;var n=AL.currentCtx.sources[t];if(!n)return AL.currentCtx.err=40961,null;switch(r){case 514:return n.relative;case 4097:return n.coneInnerAngle;case 4098:return n.coneOuterAngle;case 4099:return n.pitch;case 4100:return n.position;case 4101:return n.direction;case 4102:return n.velocity;case 4103:return n.looping;case 4105:return n.type===4136?n.bufQueue[0].id:0;case 4106:return n.gain.gain.value;case 4109:return n.minGain;case 4110:return n.maxGain;case 4112:return n.state;case 4117:return n.bufQueue.length===1&&n.bufQueue[0].id===0?0:n.bufQueue.length;case 4118:return n.bufQueue.length===1&&n.bufQueue[0].id===0||n.looping?0:n.bufsProcessed;case 4128:return n.refDistance;case 4129:return n.rolloffFactor;case 4130:return n.coneOuterGain;case 4131:return n.maxDistance;case 4132:return AL.sourceTell(n);case 4133:var a=AL.sourceTell(n);return a>0&&(a*=n.bufQueue[0].frequency),a;case 4134:var a=AL.sourceTell(n);return a>0&&(a*=n.bufQueue[0].frequency*n.bufQueue[0].bytesPerSample),a;case 4135:return n.type;case 4628:return n.spatialize;case 8201:for(var l=0,c=0,u=0;u{if(AL.currentCtx){var a=AL.currentCtx.sources[t];if(!a){AL.currentCtx.err=40961;return}if(n===null){AL.currentCtx.err=40962;return}switch(r){case 514:if(n===1)a.relative=!0,AL.updateSourceSpace(a);else if(n===0)a.relative=!1,AL.updateSourceSpace(a);else{AL.currentCtx.err=40963;return}break;case 4097:if(!Number.isFinite(n)){AL.currentCtx.err=40963;return}a.coneInnerAngle=n,a.panner&&(a.panner.coneInnerAngle=n%360);break;case 4098:if(!Number.isFinite(n)){AL.currentCtx.err=40963;return}a.coneOuterAngle=n,a.panner&&(a.panner.coneOuterAngle=n%360);break;case 4099:if(!Number.isFinite(n)||n<=0){AL.currentCtx.err=40963;return}if(a.pitch===n)break;a.pitch=n,AL.updateSourceRate(a);break;case 4100:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.position[0]=n[0],a.position[1]=n[1],a.position[2]=n[2],AL.updateSourceSpace(a);break;case 4101:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.direction[0]=n[0],a.direction[1]=n[1],a.direction[2]=n[2],AL.updateSourceSpace(a);break;case 4102:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.velocity[0]=n[0],a.velocity[1]=n[1],a.velocity[2]=n[2],AL.updateSourceSpace(a);break;case 4103:if(n===1){if(a.looping=!0,AL.updateSourceTime(a),a.type===4136&&a.audioQueue.length>0){var l=a.audioQueue[0];l.loop=!0,l._duration=Number.POSITIVE_INFINITY}}else if(n===0){a.looping=!1;var c=AL.updateSourceTime(a);if(a.type===4136&&a.audioQueue.length>0){var l=a.audioQueue[0];l.loop=!1,l._duration=a.bufQueue[0].audioBuf.duration/a.playbackRate,l._startTime=c-a.bufOffset/a.playbackRate}}else{AL.currentCtx.err=40963;return}break;case 4105:if(a.state===4114||a.state===4115){AL.currentCtx.err=40964;return}if(n===0){for(var u in a.bufQueue)a.bufQueue[u].refCount--;a.bufQueue.length=1,a.bufQueue[0]=AL.buffers[0],a.bufsProcessed=0,a.type=4144}else{var _=AL.buffers[n];if(!_){AL.currentCtx.err=40963;return}for(var u in a.bufQueue)a.bufQueue[u].refCount--;a.bufQueue.length=0,_.refCount++,a.bufQueue=[_],a.bufsProcessed=0,a.type=4136}AL.initSourcePanner(a),AL.scheduleSourceAudio(a);break;case 4106:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.gain.gain.value=n;break;case 4109:if(!Number.isFinite(n)||n<0||n>Math.min(a.maxGain,1)){AL.currentCtx.err=40963;return}a.minGain=n;break;case 4110:if(!Number.isFinite(n)||n1){AL.currentCtx.err=40963;return}a.maxGain=n;break;case 4128:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.refDistance=n,a.panner&&(a.panner.refDistance=n);break;case 4129:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.rolloffFactor=n,a.panner&&(a.panner.rolloffFactor=n);break;case 4130:if(!Number.isFinite(n)||n<0||n>1){AL.currentCtx.err=40963;return}a.coneOuterGain=n,a.panner&&(a.panner.coneOuterGain=n);break;case 4131:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.maxDistance=n,a.panner&&(a.panner.maxDistance=n);break;case 4132:if(n<0||n>AL.sourceDuration(a)){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4133:var f=AL.sourceDuration(a);if(f>0){var d;for(var p in a.bufQueue)if(p){d=a.bufQueue[p].frequency;break}n/=d}if(n<0||n>f){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4134:var f=AL.sourceDuration(a);if(f>0){var m;for(var p in a.bufQueue)if(p){var _=a.bufQueue[p];m=_.frequency*_.bytesPerSample*_.channels;break}n/=m}if(n<0||n>f){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4628:if(n!==0&&n!==1&&n!==2){AL.currentCtx.err=40963;return}a.spatialize=n,AL.initSourcePanner(a);break;case 8201:case 8202:case 8203:AL.currentCtx.err=40964;break;case 53248:switch(n){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:a.distanceModel=n,AL.currentCtx.sourceDistanceModel&&AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}}},captures:{},sharedCaptureAudioCtx:null,requireValidCaptureDevice:(e,t)=>{if(e===0)return AL.alcErr=40961,null;var r=AL.captures[e];if(!r)return AL.alcErr=40961,null;var n=r.mediaStreamError;return n?(AL.alcErr=40961,null):r}},_alBuffer3f=(e,t,r,n,a)=>{AL.setBufferParam("alBuffer3f",e,t,null)};_alBuffer3f.sig="viifff";var _alBuffer3i=(e,t,r,n,a)=>{AL.setBufferParam("alBuffer3i",e,t,null)};_alBuffer3i.sig="viiiii";function _alBufferData(e,t,r,n,a){if(r>>>=0,!!AL.currentCtx){var l=AL.buffers[e];if(!l){AL.currentCtx.err=40963;return}if(a<=0){AL.currentCtx.err=40963;return}var c=null;try{switch(t){case 4352:if(n>0){c=AL.currentCtx.audioCtx.createBuffer(1,n,a);for(var u=c.getChannelData(0),_=0;_>>0]*.0078125-1}l.bytesPerSample=1,l.channels=1,l.length=n;break;case 4353:if(n>0){c=AL.currentCtx.audioCtx.createBuffer(1,n>>1,a);var u=c.getChannelData(0);r>>=1;for(var _=0;_>1;++_)u[_]=HEAP16[r++>>>0]*30517578125e-15}l.bytesPerSample=2,l.channels=1,l.length=n>>1;break;case 4354:if(n>0){c=AL.currentCtx.audioCtx.createBuffer(2,n>>1,a);for(var u=c.getChannelData(0),d=c.getChannelData(1),_=0;_>1;++_)u[_]=HEAPU8[r++>>>0]*.0078125-1,d[_]=HEAPU8[r++>>>0]*.0078125-1}l.bytesPerSample=1,l.channels=2,l.length=n>>1;break;case 4355:if(n>0){c=AL.currentCtx.audioCtx.createBuffer(2,n>>2,a);var u=c.getChannelData(0),d=c.getChannelData(1);r>>=1;for(var _=0;_>2;++_)u[_]=HEAP16[r++>>>0]*30517578125e-15,d[_]=HEAP16[r++>>>0]*30517578125e-15}l.bytesPerSample=2,l.channels=2,l.length=n>>2;break;case 65552:if(n>0){c=AL.currentCtx.audioCtx.createBuffer(1,n>>2,a);var u=c.getChannelData(0);r>>=2;for(var _=0;_>2;++_)u[_]=HEAPF32[r++>>>0]}l.bytesPerSample=4,l.channels=1,l.length=n>>2;break;case 65553:if(n>0){c=AL.currentCtx.audioCtx.createBuffer(2,n>>3,a);var u=c.getChannelData(0),d=c.getChannelData(1);r>>=2;for(var _=0;_>3;++_)u[_]=HEAPF32[r++>>>0],d[_]=HEAPF32[r++>>>0]}l.bytesPerSample=4,l.channels=2,l.length=n>>3;break;default:AL.currentCtx.err=40963;return}l.frequency=a,l.audioBuf=c}catch{AL.currentCtx.err=40963;return}}}_alBufferData.sig="viipii";var _alBufferf=(e,t,r)=>{AL.setBufferParam("alBufferf",e,t,null)};_alBufferf.sig="viif";function _alBufferfv(e,t,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}AL.setBufferParam("alBufferfv",e,t,null)}}_alBufferfv.sig="viip";var _alBufferi=(e,t,r)=>{AL.setBufferParam("alBufferi",e,t,null)};_alBufferi.sig="viii";function _alBufferiv(e,t,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(t){case 8213:AL.paramArray[0]=HEAP32[r>>>2>>>0],AL.paramArray[1]=HEAP32[r+4>>>2>>>0],AL.setBufferParam("alBufferiv",e,t,AL.paramArray);break;default:AL.setBufferParam("alBufferiv",e,t,null);break}}}_alBufferiv.sig="viip";function _alDeleteBuffers(e,t){if(t>>>=0,!!AL.currentCtx){for(var r=0;r>>2>>>0];if(n!==0){if(!AL.buffers[n]){AL.currentCtx.err=40961;return}if(AL.buffers[n].refCount){AL.currentCtx.err=40964;return}}}for(var r=0;r>>2>>>0];n!==0&&(AL.deviceRefCounts[AL.buffers[n].deviceId]--,delete AL.buffers[n],AL.freeIds.push(n))}}}_alDeleteBuffers.sig="vip";var _alSourcei=(e,t,r)=>{switch(t){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:AL.setSourceParam("alSourcei",e,t,r);break;default:AL.setSourceParam("alSourcei",e,t,null);break}};_alSourcei.sig="viii";function _alDeleteSources(e,t){if(t>>>=0,!!AL.currentCtx){for(var r=0;r>>2>>>0];if(!AL.currentCtx.sources[n]){AL.currentCtx.err=40961;return}}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4116),_alSourcei(n,4105,0),delete AL.currentCtx.sources[n],AL.freeIds.push(n)}}}_alDeleteSources.sig="vip";var _alDisable=e=>{if(AL.currentCtx)switch(e){case 512:AL.currentCtx.sourceDistanceModel=!1,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}};_alDisable.sig="vi";var _alDistanceModel=e=>{AL.setGlobalParam("alDistanceModel",53248,e)};_alDistanceModel.sig="vi";var _alDopplerFactor=e=>{AL.setGlobalParam("alDopplerFactor",49152,e)};_alDopplerFactor.sig="vf";var _alDopplerVelocity=e=>{if(warnOnce("alDopplerVelocity() is deprecated, and only kept for compatibility with OpenAL 1.0. Use alSpeedOfSound() instead."),!!AL.currentCtx&&e<=0){AL.currentCtx.err=40963;return}};_alDopplerVelocity.sig="vf";var _alEnable=e=>{if(AL.currentCtx)switch(e){case 512:AL.currentCtx.sourceDistanceModel=!0,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}};_alEnable.sig="vi";function _alGenBuffers(e,t){if(t>>>=0,!!AL.currentCtx)for(var r=0;r>>2>>>0]=n.id}}_alGenBuffers.sig="vip";function _alGenSources(e,t){if(t>>>=0,!!AL.currentCtx)for(var r=0;r>>2>>>0]=a.id}}_alGenSources.sig="vip";var _alGetBoolean=e=>{var t=AL.getGlobalParam("alGetBoolean",e);if(t===null)return 0;switch(e){case 49152:case 49155:case 53248:return t!==0?1:0;default:return AL.currentCtx.err=40962,0}};_alGetBoolean.sig="ii";function _alGetBooleanv(e,t){t>>>=0;var r=AL.getGlobalParam("alGetBooleanv",e);if(!(r===null||!t))switch(e){case 49152:case 49155:case 53248:HEAP8[t>>>0]=r;break;default:AL.currentCtx.err=40962;return}}_alGetBooleanv.sig="vip";function _alGetBuffer3f(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0;var l=AL.getBufferParam("alGetBuffer3f",e,t);if(l!==null){if(!r||!n||!a){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBuffer3f.sig="viippp";function _alGetBuffer3i(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0;var l=AL.getBufferParam("alGetBuffer3i",e,t);if(l!==null){if(!r||!n||!a){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBuffer3i.sig="viippp";function _alGetBufferf(e,t,r){r>>>=0;var n=AL.getBufferParam("alGetBufferf",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBufferf.sig="viip";function _alGetBufferfv(e,t,r){r>>>=0;var n=AL.getBufferParam("alGetBufferfv",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBufferfv.sig="viip";function _alGetBufferi(e,t,r){r>>>=0;var n=AL.getBufferParam("alGetBufferi",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 8193:case 8194:case 8195:case 8196:HEAP32[r>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetBufferi.sig="viip";function _alGetBufferiv(e,t,r){r>>>=0;var n=AL.getBufferParam("alGetBufferiv",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 8193:case 8194:case 8195:case 8196:HEAP32[r>>>2>>>0]=n;break;case 8213:HEAP32[r>>>2>>>0]=n[0],HEAP32[r+4>>>2>>>0]=n[1];break;default:AL.currentCtx.err=40962;return}}}_alGetBufferiv.sig="viip";var _alGetDouble=e=>{var t=AL.getGlobalParam("alGetDouble",e);if(t===null)return 0;switch(e){case 49152:case 49155:case 53248:return t;default:return AL.currentCtx.err=40962,0}};_alGetDouble.sig="di";function _alGetDoublev(e,t){t>>>=0;var r=AL.getGlobalParam("alGetDoublev",e);if(!(r===null||!t))switch(e){case 49152:case 49155:case 53248:HEAPF64[t>>>3>>>0]=r;break;default:AL.currentCtx.err=40962;return}}_alGetDoublev.sig="vip";function _alGetEnumValue(e){if(e>>>=0,!AL.currentCtx)return 0;if(!e)return AL.currentCtx.err=40963,0;var t=UTF8ToString(e);switch(t){case"AL_BITS":return 8194;case"AL_BUFFER":return 4105;case"AL_BUFFERS_PROCESSED":return 4118;case"AL_BUFFERS_QUEUED":return 4117;case"AL_BYTE_OFFSET":return 4134;case"AL_CHANNELS":return 8195;case"AL_CONE_INNER_ANGLE":return 4097;case"AL_CONE_OUTER_ANGLE":return 4098;case"AL_CONE_OUTER_GAIN":return 4130;case"AL_DIRECTION":return 4101;case"AL_DISTANCE_MODEL":return 53248;case"AL_DOPPLER_FACTOR":return 49152;case"AL_DOPPLER_VELOCITY":return 49153;case"AL_EXPONENT_DISTANCE":return 53253;case"AL_EXPONENT_DISTANCE_CLAMPED":return 53254;case"AL_EXTENSIONS":return 45060;case"AL_FORMAT_MONO16":return 4353;case"AL_FORMAT_MONO8":return 4352;case"AL_FORMAT_STEREO16":return 4355;case"AL_FORMAT_STEREO8":return 4354;case"AL_FREQUENCY":return 8193;case"AL_GAIN":return 4106;case"AL_INITIAL":return 4113;case"AL_INVALID":return-1;case"AL_ILLEGAL_ENUM":case"AL_INVALID_ENUM":return 40962;case"AL_INVALID_NAME":return 40961;case"AL_ILLEGAL_COMMAND":case"AL_INVALID_OPERATION":return 40964;case"AL_INVALID_VALUE":return 40963;case"AL_INVERSE_DISTANCE":return 53249;case"AL_INVERSE_DISTANCE_CLAMPED":return 53250;case"AL_LINEAR_DISTANCE":return 53251;case"AL_LINEAR_DISTANCE_CLAMPED":return 53252;case"AL_LOOPING":return 4103;case"AL_MAX_DISTANCE":return 4131;case"AL_MAX_GAIN":return 4110;case"AL_MIN_GAIN":return 4109;case"AL_NONE":return 0;case"AL_NO_ERROR":return 0;case"AL_ORIENTATION":return 4111;case"AL_OUT_OF_MEMORY":return 40965;case"AL_PAUSED":return 4115;case"AL_PENDING":return 8209;case"AL_PITCH":return 4099;case"AL_PLAYING":return 4114;case"AL_POSITION":return 4100;case"AL_PROCESSED":return 8210;case"AL_REFERENCE_DISTANCE":return 4128;case"AL_RENDERER":return 45059;case"AL_ROLLOFF_FACTOR":return 4129;case"AL_SAMPLE_OFFSET":return 4133;case"AL_SEC_OFFSET":return 4132;case"AL_SIZE":return 8196;case"AL_SOURCE_RELATIVE":return 514;case"AL_SOURCE_STATE":return 4112;case"AL_SOURCE_TYPE":return 4135;case"AL_SPEED_OF_SOUND":return 49155;case"AL_STATIC":return 4136;case"AL_STOPPED":return 4116;case"AL_STREAMING":return 4137;case"AL_UNDETERMINED":return 4144;case"AL_UNUSED":return 8208;case"AL_VELOCITY":return 4102;case"AL_VENDOR":return 45057;case"AL_VERSION":return 45058;case"AL_AUTO_SOFT":return 2;case"AL_SOURCE_DISTANCE_MODEL":return 512;case"AL_SOURCE_SPATIALIZE_SOFT":return 4628;case"AL_LOOP_POINTS_SOFT":return 8213;case"AL_BYTE_LENGTH_SOFT":return 8201;case"AL_SAMPLE_LENGTH_SOFT":return 8202;case"AL_SEC_LENGTH_SOFT":return 8203;case"AL_FORMAT_MONO_FLOAT32":return 65552;case"AL_FORMAT_STEREO_FLOAT32":return 65553;default:return AL.currentCtx.err=40963,0}}_alGetEnumValue.sig="ip";var _alGetError=()=>{if(!AL.currentCtx)return 40964;var e=AL.currentCtx.err;return AL.currentCtx.err=0,e};_alGetError.sig="i";var _alGetFloat=e=>{var t=AL.getGlobalParam("alGetFloat",e);if(t===null)return 0;switch(e){case 49152:case 49155:case 53248:return t;default:return 0}};_alGetFloat.sig="fi";function _alGetFloatv(e,t){t>>>=0;var r=AL.getGlobalParam("alGetFloatv",e);if(!(r===null||!t))switch(e){case 49152:case 49155:case 53248:HEAPF32[t>>>2>>>0]=r;break;default:AL.currentCtx.err=40962;return}}_alGetFloatv.sig="vip";var _alGetInteger=e=>{var t=AL.getGlobalParam("alGetInteger",e);if(t===null)return 0;switch(e){case 49152:case 49155:case 53248:return t;default:return AL.currentCtx.err=40962,0}};_alGetInteger.sig="ii";function _alGetIntegerv(e,t){t>>>=0;var r=AL.getGlobalParam("alGetIntegerv",e);if(!(r===null||!t))switch(e){case 49152:case 49155:case 53248:HEAP32[t>>>2>>>0]=r;break;default:AL.currentCtx.err=40962;return}}_alGetIntegerv.sig="vip";function _alGetListener3f(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;var a=AL.getListenerParam("alGetListener3f",e);if(a!==null){if(!t||!r||!n){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAPF32[t>>>2>>>0]=a[0],HEAPF32[r>>>2>>>0]=a[1],HEAPF32[n>>>2>>>0]=a[2];break;default:AL.currentCtx.err=40962;return}}}_alGetListener3f.sig="vippp";function _alGetListener3i(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;var a=AL.getListenerParam("alGetListener3i",e);if(a!==null){if(!t||!r||!n){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAP32[t>>>2>>>0]=a[0],HEAP32[r>>>2>>>0]=a[1],HEAP32[n>>>2>>>0]=a[2];break;default:AL.currentCtx.err=40962;return}}}_alGetListener3i.sig="vippp";function _alGetListenerf(e,t){t>>>=0;var r=AL.getListenerParam("alGetListenerf",e);if(r!==null){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4106:HEAPF32[t>>>2>>>0]=r;break;default:AL.currentCtx.err=40962;return}}}_alGetListenerf.sig="vip";function _alGetListenerfv(e,t){t>>>=0;var r=AL.getListenerParam("alGetListenerfv",e);if(r!==null){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAPF32[t>>>2>>>0]=r[0],HEAPF32[t+4>>>2>>>0]=r[1],HEAPF32[t+8>>>2>>>0]=r[2];break;case 4111:HEAPF32[t>>>2>>>0]=r[0],HEAPF32[t+4>>>2>>>0]=r[1],HEAPF32[t+8>>>2>>>0]=r[2],HEAPF32[t+12>>>2>>>0]=r[3],HEAPF32[t+16>>>2>>>0]=r[4],HEAPF32[t+20>>>2>>>0]=r[5];break;default:AL.currentCtx.err=40962;return}}}_alGetListenerfv.sig="vip";function _alGetListeneri(e,t){t>>>=0;var r=AL.getListenerParam("alGetListeneri",e);if(r!==null){if(!t){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetListeneri.sig="vip";function _alGetListeneriv(e,t){t>>>=0;var r=AL.getListenerParam("alGetListeneriv",e);if(r!==null){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAP32[t>>>2>>>0]=r[0],HEAP32[t+4>>>2>>>0]=r[1],HEAP32[t+8>>>2>>>0]=r[2];break;case 4111:HEAP32[t>>>2>>>0]=r[0],HEAP32[t+4>>>2>>>0]=r[1],HEAP32[t+8>>>2>>>0]=r[2],HEAP32[t+12>>>2>>>0]=r[3],HEAP32[t+16>>>2>>>0]=r[4],HEAP32[t+20>>>2>>>0]=r[5];break;default:AL.currentCtx.err=40962;return}}}_alGetListeneriv.sig="vip";function _alGetSource3f(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0;var l=AL.getSourceParam("alGetSource3f",e,t);if(l!==null){if(!r||!n||!a){AL.currentCtx.err=40963;return}switch(t){case 4100:case 4101:case 4102:HEAPF32[r>>>2>>>0]=l[0],HEAPF32[n>>>2>>>0]=l[1],HEAPF32[a>>>2>>>0]=l[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSource3f.sig="viippp";function _alGetSource3i(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0;var l=AL.getSourceParam("alGetSource3i",e,t);if(l!==null){if(!r||!n||!a){AL.currentCtx.err=40963;return}switch(t){case 4100:case 4101:case 4102:HEAP32[r>>>2>>>0]=l[0],HEAP32[n>>>2>>>0]=l[1],HEAP32[a>>>2>>>0]=l[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSource3i.sig="viippp";function _alGetSourcef(e,t,r){r>>>=0;var n=AL.getSourceParam("alGetSourcef",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:HEAPF32[r>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetSourcef.sig="viip";function _alGetSourcefv(e,t,r){r>>>=0;var n=AL.getSourceParam("alGetSourcefv",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:HEAPF32[r>>>2>>>0]=n[0];break;case 4100:case 4101:case 4102:HEAPF32[r>>>2>>>0]=n[0],HEAPF32[r+4>>>2>>>0]=n[1],HEAPF32[r+8>>>2>>>0]=n[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSourcefv.sig="viip";function _alGetSourcei(e,t,r){r>>>=0;var n=AL.getSourceParam("alGetSourcei",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[r>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetSourcei.sig="viip";function _alGetSourceiv(e,t,r){r>>>=0;var n=AL.getSourceParam("alGetSourceiv",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[r>>>2>>>0]=n;break;case 4100:case 4101:case 4102:HEAP32[r>>>2>>>0]=n[0],HEAP32[r+4>>>2>>>0]=n[1],HEAP32[r+8>>>2>>>0]=n[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSourceiv.sig="viip";var stringToNewUTF8=e=>{var t=lengthBytesUTF8(e)+1,r=_malloc(t);return r&&stringToUTF8(e,r,t),r};function _alGetString(e){if(AL.stringCache[e])return AL.stringCache[e];var t;switch(e){case 0:t="No Error";break;case 40961:t="Invalid Name";break;case 40962:t="Invalid Enum";break;case 40963:t="Invalid Value";break;case 40964:t="Invalid Operation";break;case 40965:t="Out of Memory";break;case 45057:t="Emscripten";break;case 45058:t="1.1";break;case 45059:t="WebAudio";break;case 45060:t=Object.keys(AL.AL_EXTENSIONS).join(" ");break;default:return AL.currentCtx&&(AL.currentCtx.err=40962),0}return t=stringToNewUTF8(t),AL.stringCache[e]=t,t}_alGetString.sig="pi";var _alIsBuffer=e=>!(!AL.currentCtx||e>AL.buffers.length||!AL.buffers[e]);_alIsBuffer.sig="ii";var _alIsEnabled=e=>{if(!AL.currentCtx)return 0;switch(e){case 512:return AL.currentCtx.sourceDistanceModel?0:1;default:return AL.currentCtx.err=40962,0}};_alIsEnabled.sig="ii";function _alIsExtensionPresent(e){e>>>=0;var t=UTF8ToString(e);return AL.AL_EXTENSIONS[t]?1:0}_alIsExtensionPresent.sig="ip";var _alIsSource=e=>!(!AL.currentCtx||!AL.currentCtx.sources[e]);_alIsSource.sig="ii";var _alListener3f=(e,t,r,n)=>{switch(e){case 4100:case 4102:AL.paramArray[0]=t,AL.paramArray[1]=r,AL.paramArray[2]=n,AL.setListenerParam("alListener3f",e,AL.paramArray);break;default:AL.setListenerParam("alListener3f",e,null);break}};_alListener3f.sig="vifff";var _alListener3i=(e,t,r,n)=>{switch(e){case 4100:case 4102:AL.paramArray[0]=t,AL.paramArray[1]=r,AL.paramArray[2]=n,AL.setListenerParam("alListener3i",e,AL.paramArray);break;default:AL.setListenerParam("alListener3i",e,null);break}};_alListener3i.sig="viiii";var _alListenerf=(e,t)=>{switch(e){case 4106:AL.setListenerParam("alListenerf",e,t);break;default:AL.setListenerParam("alListenerf",e,null);break}};_alListenerf.sig="vif";function _alListenerfv(e,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:AL.paramArray[0]=HEAPF32[t>>>2>>>0],AL.paramArray[1]=HEAPF32[t+4>>>2>>>0],AL.paramArray[2]=HEAPF32[t+8>>>2>>>0],AL.setListenerParam("alListenerfv",e,AL.paramArray);break;case 4111:AL.paramArray[0]=HEAPF32[t>>>2>>>0],AL.paramArray[1]=HEAPF32[t+4>>>2>>>0],AL.paramArray[2]=HEAPF32[t+8>>>2>>>0],AL.paramArray[3]=HEAPF32[t+12>>>2>>>0],AL.paramArray[4]=HEAPF32[t+16>>>2>>>0],AL.paramArray[5]=HEAPF32[t+20>>>2>>>0],AL.setListenerParam("alListenerfv",e,AL.paramArray);break;default:AL.setListenerParam("alListenerfv",e,null);break}}}_alListenerfv.sig="vip";var _alListeneri=(e,t)=>{AL.setListenerParam("alListeneri",e,null)};_alListeneri.sig="vii";function _alListeneriv(e,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:AL.paramArray[0]=HEAP32[t>>>2>>>0],AL.paramArray[1]=HEAP32[t+4>>>2>>>0],AL.paramArray[2]=HEAP32[t+8>>>2>>>0],AL.setListenerParam("alListeneriv",e,AL.paramArray);break;case 4111:AL.paramArray[0]=HEAP32[t>>>2>>>0],AL.paramArray[1]=HEAP32[t+4>>>2>>>0],AL.paramArray[2]=HEAP32[t+8>>>2>>>0],AL.paramArray[3]=HEAP32[t+12>>>2>>>0],AL.paramArray[4]=HEAP32[t+16>>>2>>>0],AL.paramArray[5]=HEAP32[t+20>>>2>>>0],AL.setListenerParam("alListeneriv",e,AL.paramArray);break;default:AL.setListenerParam("alListeneriv",e,null);break}}}_alListeneriv.sig="vip";var _alSource3f=(e,t,r,n,a)=>{switch(t){case 4100:case 4101:case 4102:AL.paramArray[0]=r,AL.paramArray[1]=n,AL.paramArray[2]=a,AL.setSourceParam("alSource3f",e,t,AL.paramArray);break;default:AL.setSourceParam("alSource3f",e,t,null);break}};_alSource3f.sig="viifff";var _alSource3i=(e,t,r,n,a)=>{switch(t){case 4100:case 4101:case 4102:AL.paramArray[0]=r,AL.paramArray[1]=n,AL.paramArray[2]=a,AL.setSourceParam("alSource3i",e,t,AL.paramArray);break;default:AL.setSourceParam("alSource3i",e,t,null);break}};_alSource3i.sig="viiiii";var _alSourcePause=e=>{if(AL.currentCtx){var t=AL.currentCtx.sources[e];if(!t){AL.currentCtx.err=40961;return}AL.setSourceState(t,4115)}};_alSourcePause.sig="vi";function _alSourcePausev(e,t){if(t>>>=0,!!AL.currentCtx){t||(AL.currentCtx.err=40963);for(var r=0;r>>2>>>0]]){AL.currentCtx.err=40961;return}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4115)}}}_alSourcePausev.sig="vip";var _alSourcePlay=e=>{if(AL.currentCtx){var t=AL.currentCtx.sources[e];if(!t){AL.currentCtx.err=40961;return}AL.setSourceState(t,4114)}};_alSourcePlay.sig="vi";function _alSourcePlayv(e,t){if(t>>>=0,!!AL.currentCtx){t||(AL.currentCtx.err=40963);for(var r=0;r>>2>>>0]]){AL.currentCtx.err=40961;return}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4114)}}}_alSourcePlayv.sig="vip";function _alSourceQueueBuffers(e,t,r){if(r>>>=0,!!AL.currentCtx){var n=AL.currentCtx.sources[e];if(!n){AL.currentCtx.err=40961;return}if(n.type===4136){AL.currentCtx.err=40964;return}if(t!==0){for(var a=AL.buffers[0],l=0;l>>2>>>0],u=AL.buffers[c];if(!u){AL.currentCtx.err=40961;return}a.id!==0&&(u.frequency!==a.frequency||u.bytesPerSample!==a.bytesPerSample||u.channels!==a.channels)&&(AL.currentCtx.err=40964)}n.bufQueue.length===1&&n.bufQueue[0].id===0&&(n.bufQueue.length=0),n.type=4137;for(var l=0;l>>2>>>0],u=AL.buffers[c];u.refCount++,n.bufQueue.push(u)}n.looping&&AL.cancelPendingSourceAudio(n),AL.initSourcePanner(n),AL.scheduleSourceAudio(n)}}}_alSourceQueueBuffers.sig="viip";var _alSourceRewind=e=>{if(AL.currentCtx){var t=AL.currentCtx.sources[e];if(!t){AL.currentCtx.err=40961;return}AL.setSourceState(t,4116),AL.setSourceState(t,4113)}};_alSourceRewind.sig="vi";function _alSourceRewindv(e,t){if(t>>>=0,!!AL.currentCtx){t||(AL.currentCtx.err=40963);for(var r=0;r>>2>>>0]]){AL.currentCtx.err=40961;return}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4113)}}}_alSourceRewindv.sig="vip";var _alSourceStop=e=>{if(AL.currentCtx){var t=AL.currentCtx.sources[e];if(!t){AL.currentCtx.err=40961;return}AL.setSourceState(t,4116)}};_alSourceStop.sig="vi";function _alSourceStopv(e,t){if(t>>>=0,!!AL.currentCtx){t||(AL.currentCtx.err=40963);for(var r=0;r>>2>>>0]]){AL.currentCtx.err=40961;return}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4116)}}}_alSourceStopv.sig="vip";function _alSourceUnqueueBuffers(e,t,r){if(r>>>=0,!!AL.currentCtx){var n=AL.currentCtx.sources[e];if(!n){AL.currentCtx.err=40961;return}if(t>(n.bufQueue.length===1&&n.bufQueue[0].id===0?0:n.bufsProcessed)){AL.currentCtx.err=40963;return}if(t!==0){for(var a=0;a>>2>>>0]=l.id,n.bufsProcessed--}n.bufQueue.length===0&&n.bufQueue.push(AL.buffers[0]),AL.initSourcePanner(n),AL.scheduleSourceAudio(n)}}}_alSourceUnqueueBuffers.sig="viip";var _alSourcef=(e,t,r)=>{switch(t){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:AL.setSourceParam("alSourcef",e,t,r);break;default:AL.setSourceParam("alSourcef",e,t,null);break}};_alSourcef.sig="viif";function _alSourcefv(e,t,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(t){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:var n=HEAPF32[r>>>2>>>0];AL.setSourceParam("alSourcefv",e,t,n);break;case 4100:case 4101:case 4102:AL.paramArray[0]=HEAPF32[r>>>2>>>0],AL.paramArray[1]=HEAPF32[r+4>>>2>>>0],AL.paramArray[2]=HEAPF32[r+8>>>2>>>0],AL.setSourceParam("alSourcefv",e,t,AL.paramArray);break;default:AL.setSourceParam("alSourcefv",e,t,null);break}}}_alSourcefv.sig="viip";function _alSourceiv(e,t,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(t){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:var n=HEAP32[r>>>2>>>0];AL.setSourceParam("alSourceiv",e,t,n);break;case 4100:case 4101:case 4102:AL.paramArray[0]=HEAP32[r>>>2>>>0],AL.paramArray[1]=HEAP32[r+4>>>2>>>0],AL.paramArray[2]=HEAP32[r+8>>>2>>>0],AL.setSourceParam("alSourceiv",e,t,AL.paramArray);break;default:AL.setSourceParam("alSourceiv",e,t,null);break}}}_alSourceiv.sig="viip";var _alSpeedOfSound=e=>{AL.setGlobalParam("alSpeedOfSound",49155,e)};_alSpeedOfSound.sig="vf";var _alcCaptureCloseDevice=function(e){var t,r,n,a;e>>>=0;var l=AL.requireValidCaptureDevice(e,"alcCaptureCloseDevice");return l?(delete AL.captures[e],AL.freeIds.push(e),(t=l.mediaStreamSourceNode)==null||t.disconnect(),(r=l.mergerNode)==null||r.disconnect(),(n=l.splitterNode)==null||n.disconnect(),(a=l.scriptProcessorNode)==null||a.disconnect(),l.mediaStream&&l.mediaStream.getTracks().forEach(c=>c.stop()),delete l.buffers,l.capturedFrameCount=0,l.isCapturing=!1,!0):!1};_alcCaptureCloseDevice.sig="ip";var listenOnce=(e,t,r)=>{e.addEventListener(t,r,{once:!0})},autoResumeAudioContext=(e,t)=>{t||(t=[document,document.getElementById("canvas")]),["keydown","mousedown","touchstart"].forEach(r=>{t.forEach(n=>{n&&listenOnce(n,r,()=>{e.state==="suspended"&&e.resume()})})})};function _alcCaptureOpenDevice(e,t,r,n){var a;e>>>=0;var l=AL.CAPTURE_DEVICE_NAME;if(e!==0&&(l=UTF8ToString(e),l!==AL.CAPTURE_DEVICE_NAME))return AL.alcErr=40965,0;if(n<0)return AL.alcErr=40964,0;navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var c=navigator.getUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia;if(!c)return AL.alcErr=40965,0;var u=window.AudioContext||window.webkitAudioContext;if(!AL.sharedCaptureAudioCtx)try{AL.sharedCaptureAudioCtx=new u}catch{return AL.alcErr=40965,0}autoResumeAudioContext(AL.sharedCaptureAudioCtx);var _;switch(r){case 65552:case 4353:case 4352:_=1;break;case 65553:case 4355:case 4354:_=2;break;default:return AL.alcErr=40964,0}function d(A){return new Float32Array(A)}function p(A){return new Int16Array(A)}function f(A){return new Uint8Array(A)}var m,g;switch(r){case 65552:case 65553:m="f32",g=d;break;case 4353:case 4355:m="i16",g=p;break;case 4352:case 4354:m="u8",g=f;break}var h=[];try{for(var y=0;y<_;++y)h[y]=g(n)}catch{return AL.alcErr=40965,0}var b={audioCtx:AL.sharedCaptureAudioCtx,deviceName:l,requestedSampleRate:t,requestedSampleType:m,outputChannelCount:_,inputChannelCount:null,mediaStreamError:null,mediaStreamSourceNode:null,mediaStream:null,mergerNode:null,splitterNode:null,scriptProcessorNode:null,isCapturing:!1,buffers:h,get bufferFrameCapacity(){return h[0].length},capturePlayhead:0,captureReadhead:0,capturedFrameCount:0},S=A=>{b.mediaStreamError=A},P=A=>{b.mediaStreamSourceNode=b.audioCtx.createMediaStreamSource(A),b.mediaStream=A;var M=1;switch(b.mediaStreamSourceNode.channelCountMode){case"max":M=_;break;case"clamped-max":M=Math.min(_,b.mediaStreamSourceNode.channelCount);break;case"explicit":M=b.mediaStreamSourceNode.channelCount;break}b.inputChannelCount=M;var Q=512;b.scriptProcessorNode=b.audioCtx.createScriptProcessor(Q,M,_),M>_?(b.mergerNode=b.audioCtx.createChannelMerger(M),b.mediaStreamSourceNode.connect(b.mergerNode),b.mergerNode.connect(b.scriptProcessorNode)):M<_?(b.splitterNode=b.audioCtx.createChannelSplitter(_),b.mediaStreamSourceNode.connect(b.splitterNode),b.splitterNode.connect(b.scriptProcessorNode)):b.mediaStreamSourceNode.connect(b.scriptProcessorNode),b.scriptProcessorNode.connect(b.audioCtx.destination),b.scriptProcessorNode.onaudioprocess=F=>{if(b.isCapturing){var E=b,w=F.inputBuffer;switch(r){case 65552:for(var C=w.getChannelData(0),L=0;L>>=0,t>>>=0;var n=AL.requireValidCaptureDevice(e,"alcCaptureSamples");if(!n)return;var a=n.requestedSampleRate,l=n.audioCtx.sampleRate,c=l/a;if(r<0||r>n.capturedFrameCount/c){AL.alcErr=40964;return}function u(T,A){HEAPF32[t+4*T>>>2>>>0]=A}function _(T,A){HEAP16[t+2*T>>>1>>>0]=A}function d(T,A){HEAP8[t+T>>>0]=A}var p;switch(n.requestedSampleType){case"f32":p=u;break;case"i16":p=_;break;case"u8":p=d;break;default:return}if(Math.floor(c)==c)for(var f=0,m=0;m>>=0;var t=AL.requireValidCaptureDevice(e,"alcCaptureStart");t&&(t.isCapturing||(t.isCapturing=!0,t.capturedFrameCount=0,t.capturePlayhead=0))}_alcCaptureStart.sig="vp";function _alcCaptureStop(e){e>>>=0;var t=AL.requireValidCaptureDevice(e,"alcCaptureStop");t&&(t.isCapturing=!1)}_alcCaptureStop.sig="vp";function _alcCloseDevice(e){return e>>>=0,!(e in AL.deviceRefCounts)||AL.deviceRefCounts[e]>0?0:(delete AL.deviceRefCounts[e],AL.freeIds.push(e),1)}_alcCloseDevice.sig="ip";function _alcCreateContext(e,t){if(e>>>=0,t>>>=0,!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;var r=null,n=[],a=null;if(t>>=2,t)for(var l=0,c=0;l=HEAP32[t++>>>0],n.push(l),l!==0;)switch(c=HEAP32[t++>>>0],n.push(c),l){case 4103:r||(r={}),r.sampleRate=c;break;case 4112:case 4113:break;case 6546:switch(c){case 0:a=!1;break;case 1:a=!0;break;case 2:break;default:return AL.alcErr=40964,0}break;case 6550:if(c!==0)return AL.alcErr=40964,0;break;default:return AL.alcErr=40964,0}var u=window.AudioContext||window.webkitAudioContext,_=null;try{r?_=new u(r):_=new u}catch(g){return g.name==="NotSupportedError"?AL.alcErr=40964:AL.alcErr=40961,0}autoResumeAudioContext(_),typeof _.createGain>"u"&&(_.createGain=_.createGainNode);var d=_.createGain();d.connect(_.destination);var p={deviceId:e,id:AL.newId(),attrs:n,audioCtx:_,listener:{position:[0,0,0],velocity:[0,0,0],direction:[0,0,0],up:[0,0,0]},sources:[],interval:setInterval(()=>AL.scheduleContextAudio(p),AL.QUEUE_INTERVAL),gain:d,distanceModel:53250,speedOfSound:343.3,dopplerFactor:1,sourceDistanceModel:!1,hrtf:a||!1,_err:0,get err(){return this._err},set err(g){(this._err===0||g===0)&&(this._err=g)}};if(AL.deviceRefCounts[e]++,AL.contexts[p.id]=p,a!==null)for(var f in AL.contexts){var m=AL.contexts[f];m.deviceId===e&&(m.hrtf=a,AL.updateContextGlobal(m))}return p.id}_alcCreateContext.sig="ppp";function _alcDestroyContext(e){e>>>=0;var t=AL.contexts[e];if(AL.currentCtx===t){AL.alcErr=40962;return}AL.contexts[e].interval&&clearInterval(AL.contexts[e].interval),AL.deviceRefCounts[t.deviceId]--,delete AL.contexts[e],AL.freeIds.push(e)}_alcDestroyContext.sig="vp";function _alcGetContextsDevice(e){return e>>>=0,e in AL.contexts?AL.contexts[e].deviceId:0}_alcGetContextsDevice.sig="pp";function _alcGetCurrentContext(){return AL.currentCtx!==null?AL.currentCtx.id:0}_alcGetCurrentContext.sig="p";function _alcGetEnumValue(e,t){if(e>>>=0,t>>>=0,e!==0&&!(e in AL.deviceRefCounts))return 0;if(!t)return AL.alcErr=40964,0;var r=UTF8ToString(t);switch(r){case"ALC_NO_ERROR":return 0;case"ALC_INVALID_DEVICE":return 40961;case"ALC_INVALID_CONTEXT":return 40962;case"ALC_INVALID_ENUM":return 40963;case"ALC_INVALID_VALUE":return 40964;case"ALC_OUT_OF_MEMORY":return 40965;case"ALC_MAJOR_VERSION":return 4096;case"ALC_MINOR_VERSION":return 4097;case"ALC_ATTRIBUTES_SIZE":return 4098;case"ALC_ALL_ATTRIBUTES":return 4099;case"ALC_DEFAULT_DEVICE_SPECIFIER":return 4100;case"ALC_DEVICE_SPECIFIER":return 4101;case"ALC_EXTENSIONS":return 4102;case"ALC_FREQUENCY":return 4103;case"ALC_REFRESH":return 4104;case"ALC_SYNC":return 4105;case"ALC_MONO_SOURCES":return 4112;case"ALC_STEREO_SOURCES":return 4113;case"ALC_CAPTURE_DEVICE_SPECIFIER":return 784;case"ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER":return 785;case"ALC_CAPTURE_SAMPLES":return 786;case"ALC_HRTF_SOFT":return 6546;case"ALC_HRTF_ID_SOFT":return 6550;case"ALC_DONT_CARE_SOFT":return 2;case"ALC_HRTF_STATUS_SOFT":return 6547;case"ALC_NUM_HRTF_SPECIFIERS_SOFT":return 6548;case"ALC_HRTF_SPECIFIER_SOFT":return 6549;case"ALC_HRTF_DISABLED_SOFT":return 0;case"ALC_HRTF_ENABLED_SOFT":return 1;case"ALC_HRTF_DENIED_SOFT":return 2;case"ALC_HRTF_REQUIRED_SOFT":return 3;case"ALC_HRTF_HEADPHONES_DETECTED_SOFT":return 4;case"ALC_HRTF_UNSUPPORTED_FORMAT_SOFT":return 5;default:return AL.alcErr=40964,0}}_alcGetEnumValue.sig="ipp";function _alcGetError(e){var t=AL.alcErr;return AL.alcErr=0,t}_alcGetError.sig="ip";function _alcGetIntegerv(e,t,r,n){if(e>>>=0,n>>>=0,!(r===0||!n))switch(t){case 4096:HEAP32[n>>>2>>>0]=1;break;case 4097:HEAP32[n>>>2>>>0]=1;break;case 4098:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=AL.currentCtx.attrs.length;break;case 4099:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}for(var a=0;a>>2>>>0]=AL.currentCtx.attrs[a];break;case 4103:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=AL.currentCtx.audioCtx.sampleRate;break;case 4112:case 4113:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=2147483647;break;case 6546:case 6547:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}var l=0;for(var c in AL.contexts){var u=AL.contexts[c];u.deviceId===e&&(l=u.hrtf?1:0)}HEAP32[n>>>2>>>0]=l;break;case 6548:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}HEAP32[n>>>2>>>0]=1;break;case 131075:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=1;case 786:var _=AL.requireValidCaptureDevice(e,"alcGetIntegerv");if(!_)return;var d=_.capturedFrameCount,p=_.requestedSampleRate,f=_.audioCtx.sampleRate,m=Math.floor(d*(p/f));HEAP32[n>>>2>>>0]=m;break;default:AL.alcErr=40963;return}}_alcGetIntegerv.sig="vpiip";function _alcGetString(e,t){if(e>>>=0,AL.alcStringCache[t])return AL.alcStringCache[t];var r;switch(t){case 0:r="No Error";break;case 40961:r="Invalid Device";break;case 40962:r="Invalid Context";break;case 40963:r="Invalid Enum";break;case 40964:r="Invalid Value";break;case 40965:r="Out of Memory";break;case 4100:if(typeof AudioContext<"u"||typeof webkitAudioContext<"u")r=AL.DEVICE_NAME;else return 0;break;case 4101:typeof AudioContext<"u"||typeof webkitAudioContext<"u"?r=AL.DEVICE_NAME+"\0":r="\0";break;case 785:r=AL.CAPTURE_DEVICE_NAME;break;case 784:if(e===0)r=AL.CAPTURE_DEVICE_NAME+"\0";else{var n=AL.requireValidCaptureDevice(e,"alcGetString");if(!n)return 0;r=n.deviceName}break;case 4102:if(!e)return AL.alcErr=40961,0;r=Object.keys(AL.ALC_EXTENSIONS).join(" ");break;default:return AL.alcErr=40963,0}return r=stringToNewUTF8(r),AL.alcStringCache[t]=r,r}_alcGetString.sig="ppi";function _alcIsExtensionPresent(e,t){t>>>=0;var r=UTF8ToString(t);return AL.ALC_EXTENSIONS[r]?1:0}_alcIsExtensionPresent.sig="ipp";function _alcMakeContextCurrent(e){return e>>>=0,e===0?AL.currentCtx=null:AL.currentCtx=AL.contexts[e],1}_alcMakeContextCurrent.sig="ip";function _alcOpenDevice(e){if(e>>>=0,e){var t=UTF8ToString(e);if(t!==AL.DEVICE_NAME)return 0}if(typeof AudioContext<"u"||typeof webkitAudioContext<"u"){var r=AL.newId();return AL.deviceRefCounts[r]=0,r}return 0}_alcOpenDevice.sig="pp";function _alcProcessContext(e){}_alcProcessContext.sig="vp";function _alcSuspendContext(e){}_alcSuspendContext.sig="vp";function _duckdb_web_fs_directory_create(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.createDirectory(Module,e,t)}_duckdb_web_fs_directory_create.sig="vpi";function _duckdb_web_fs_directory_exists(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkDirectory(Module,e,t)}_duckdb_web_fs_directory_exists.sig="ipi";function _duckdb_web_fs_directory_list_files(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.listDirectoryEntries(Module,e,t)}_duckdb_web_fs_directory_list_files.sig="ipi";function _duckdb_web_fs_directory_remove(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.removeDirectory(Module,e,t)}_duckdb_web_fs_directory_remove.sig="vpi";function _duckdb_web_fs_file_close(e){return globalThis.DUCKDB_RUNTIME.closeFile(Module,e)}_duckdb_web_fs_file_close.sig="vi";function _duckdb_web_fs_file_exists(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkFile(Module,e,t)}_duckdb_web_fs_file_exists.sig="ipi";function _duckdb_web_fs_file_get_last_modified_time(e){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(Module,e)}_duckdb_web_fs_file_get_last_modified_time.sig="ii";function _duckdb_web_fs_file_move(e,t,r,n){return e>>>=0,r>>>=0,globalThis.DUCKDB_RUNTIME.moveFile(Module,e,t,r,n)}_duckdb_web_fs_file_move.sig="vpipi";function _duckdb_web_fs_file_open(e,t){return globalThis.DUCKDB_RUNTIME.openFile(Module,e,t)}_duckdb_web_fs_file_open.sig="pii";function _duckdb_web_fs_file_read(e,t,r,n){return t>>>=0,globalThis.DUCKDB_RUNTIME.readFile(Module,e,t,r,n)}_duckdb_web_fs_file_read.sig="iipid";function _duckdb_web_fs_file_truncate(e,t){return globalThis.DUCKDB_RUNTIME.truncateFile(Module,e,t)}_duckdb_web_fs_file_truncate.sig="vid";function _duckdb_web_fs_file_write(e,t,r,n){return t>>>=0,globalThis.DUCKDB_RUNTIME.writeFile(Module,e,t,r,n)}_duckdb_web_fs_file_write.sig="iipid";function _duckdb_web_fs_get_default_data_protocol(e){return globalThis.DUCKDB_RUNTIME.getDefaultDataProtocol(e)}_duckdb_web_fs_get_default_data_protocol.sig="i";function _duckdb_web_fs_glob(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.glob(Module,e,t)}_duckdb_web_fs_glob.sig="vpi";function _duckdb_web_test_platform_feature(e){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(Module,e)}_duckdb_web_test_platform_feature.sig="ii";function _duckdb_web_udf_scalar_call(e,t,r,n,a,l){return e>>>=0,r>>>=0,a>>>=0,globalThis.DUCKDB_RUNTIME.callScalarUDF(Module,e,t,r,n,a,l)}_duckdb_web_udf_scalar_call.sig="vpipipi";var _emscripten_alcDevicePauseSOFT=e=>{if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.paused){AL.paused=!0;for(var t in AL.contexts){var r=AL.contexts[t];r.deviceId===e&&(r.audioCtx.suspend(),clearInterval(r.interval),r.interval=null)}}};_emscripten_alcDevicePauseSOFT.sig="vi";var _emscripten_alcDeviceResumeSOFT=e=>{if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(AL.paused){AL.paused=!1;for(var t in AL.contexts){var r=AL.contexts[t];r.deviceId===e&&(r.interval=setInterval(()=>AL.scheduleContextAudio(r),AL.QUEUE_INTERVAL),r.audioCtx.resume())}}};_emscripten_alcDeviceResumeSOFT.sig="vi";var _emscripten_alcGetStringiSOFT=(e,t,r)=>{if(!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;if(AL.alcStringCache[t])return AL.alcStringCache[t];var n;switch(t){case 6549:if(r===0)n="Web Audio HRTF";else return AL.alcErr=40964,0;break;default:return r!==0?(AL.alcErr=40963,0):_alcGetString(e,t)}return n=stringToNewUTF8(n),AL.alcStringCache[t]=n,n};_emscripten_alcGetStringiSOFT.sig="iiii";var _emscripten_alcResetDeviceSOFT=(e,t)=>{if(!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;var r=null;if(t>>=2,t)for(var n=0,a=0;n=HEAP32[t++>>>0],n!==0;)switch(a=HEAP32[t++>>>0],n){case 6546:a===1?r=!0:a===0&&(r=!1);break}if(r!==null)for(var l in AL.contexts){var c=AL.contexts[l];c.deviceId===e&&(c.hrtf=r,AL.updateContextGlobal(c))}return 1};_emscripten_alcResetDeviceSOFT.sig="iii";var readEmAsmArgsArray=[],readEmAsmArgs=(e,t)=>{readEmAsmArgsArray.length=0;for(var r;r=HEAPU8[e++>>>0];){var n=r!=105;n&=r!=112,t+=n&&t%8?4:0,readEmAsmArgsArray.push(r==112?HEAPU32[t>>>2>>>0]:r==105?HEAP32[t>>>2>>>0]:HEAPF64[t>>>3>>>0]),t+=n?8:4}return readEmAsmArgsArray},runEmAsmFunction=(e,t,r)=>{var n=readEmAsmArgs(t,r);return ASM_CONSTS[e](...n)};function _emscripten_asm_const_int(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runEmAsmFunction(e,t,r)}_emscripten_asm_const_int.sig="ippp";function _emscripten_asm_const_ptr(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runEmAsmFunction(e,t,r)}_emscripten_asm_const_ptr.sig="pppp";function _emscripten_console_error(e){e>>>=0,console.error(UTF8ToString(e))}_emscripten_console_error.sig="vp";function _emscripten_console_log(e){e>>>=0,console.log(UTF8ToString(e))}_emscripten_console_log.sig="vp";function _emscripten_console_trace(e){e>>>=0,console.trace(UTF8ToString(e))}_emscripten_console_trace.sig="vp";function _emscripten_console_warn(e){e>>>=0,console.warn(UTF8ToString(e))}_emscripten_console_warn.sig="vp";var _emscripten_date_now=()=>Date.now();_emscripten_date_now.sig="d";function _emscripten_err(e){return e>>>=0,err(UTF8ToString(e))}_emscripten_err.sig="vp";var getHeapMax=()=>4294901760;function _emscripten_get_heap_max(){return getHeapMax()}_emscripten_get_heap_max.sig="p";var _emscripten_get_now_res=()=>ENVIRONMENT_IS_NODE?1:1e3;_emscripten_get_now_res.sig="d";var GLctx,webgl_enable_ANGLE_instanced_arrays=e=>{var t=e.getExtension("ANGLE_instanced_arrays");if(t)return e.vertexAttribDivisor=(r,n)=>t.vertexAttribDivisorANGLE(r,n),e.drawArraysInstanced=(r,n,a,l)=>t.drawArraysInstancedANGLE(r,n,a,l),e.drawElementsInstanced=(r,n,a,l,c)=>t.drawElementsInstancedANGLE(r,n,a,l,c),1},webgl_enable_OES_vertex_array_object=e=>{var t=e.getExtension("OES_vertex_array_object");if(t)return e.createVertexArray=()=>t.createVertexArrayOES(),e.deleteVertexArray=r=>t.deleteVertexArrayOES(r),e.bindVertexArray=r=>t.bindVertexArrayOES(r),e.isVertexArray=r=>t.isVertexArrayOES(r),1},webgl_enable_WEBGL_draw_buffers=e=>{var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=(r,n)=>t.drawBuffersWEBGL(r,n),1},webgl_enable_EXT_polygon_offset_clamp=e=>!!(e.extPolygonOffsetClamp=e.getExtension("EXT_polygon_offset_clamp")),webgl_enable_EXT_clip_control=e=>!!(e.extClipControl=e.getExtension("EXT_clip_control")),webgl_enable_WEBGL_polygon_mode=e=>!!(e.webglPolygonMode=e.getExtension("WEBGL_polygon_mode")),webgl_enable_WEBGL_multi_draw=e=>!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw")),getEmscriptenSupportedExtensions=e=>{var t=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_disjoint_timer_query","EXT_frag_depth","EXT_shader_texture_lod","EXT_sRGB","OES_element_index_uint","OES_fbo_render_mipmap","OES_standard_derivatives","OES_texture_float","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_depth_texture","WEBGL_draw_buffers","EXT_clip_control","EXT_color_buffer_half_float","EXT_depth_clamp","EXT_float_blend","EXT_polygon_offset_clamp","EXT_texture_compression_bptc","EXT_texture_compression_rgtc","EXT_texture_filter_anisotropic","KHR_parallel_shader_compile","OES_texture_float_linear","WEBGL_blend_func_extended","WEBGL_compressed_texture_astc","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_debug_renderer_info","WEBGL_debug_shaders","WEBGL_lose_context","WEBGL_multi_draw","WEBGL_polygon_mode"];return(e.getSupportedExtensions()||[]).filter(r=>t.includes(r))},GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],stringCache:{},unpackAlignment:4,unpackRowLength:0,recordError:e=>{GL.lastError||(GL.lastError=e)},getNewId:e=>{for(var t=GL.counter++,r=e.length;r{for(var a=0;a>>2>>>0]=c}},getSource:(e,t,r,n)=>{for(var a="",l=0;l>>2>>>0]:void 0;a+=UTF8ToString(HEAPU32[r+l*4>>>2>>>0],c)}return a},createContext:(e,t)=>{if(!e.getContextSafariWebGL2Fixed){let a=function(l,c){var u=e.getContextSafariWebGL2Fixed(l,c);return l=="webgl"==u instanceof WebGLRenderingContext?u:null};e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=a}var r=e.getContext("webgl",t);if(!r)return 0;var n=GL.registerContext(r,t);return n},registerContext:(e,t)=>{var r=GL.getNewId(GL.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),GL.contexts[r]=n,(typeof t.enableExtensionsByDefault>"u"||t.enableExtensionsByDefault)&&GL.initExtensions(n),r},makeContextCurrent:e=>{var t;return GL.currentContext=GL.contexts[e],Module.ctx=GLctx=(t=GL.currentContext)==null?void 0:t.GLctx,!(e&&!GLctx)},getContext:e=>GL.contexts[e],deleteContext:e=>{GL.currentContext===GL.contexts[e]&&(GL.currentContext=null),typeof JSEvents=="object"&&JSEvents.removeAllHandlersOnTarget(GL.contexts[e].GLctx.canvas),GL.contexts[e]&&GL.contexts[e].GLctx.canvas&&(GL.contexts[e].GLctx.canvas.GLctxObject=void 0),GL.contexts[e]=null},initExtensions:e=>{if(e||(e=GL.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;webgl_enable_WEBGL_multi_draw(t),webgl_enable_EXT_polygon_offset_clamp(t),webgl_enable_EXT_clip_control(t),webgl_enable_WEBGL_polygon_mode(t),webgl_enable_ANGLE_instanced_arrays(t),webgl_enable_OES_vertex_array_object(t),webgl_enable_WEBGL_draw_buffers(t),t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query"),getEmscriptenSupportedExtensions(t).forEach(r=>{!r.includes("lose_context")&&!r.includes("debug")&&t.getExtension(r)})}}},_glActiveTexture=e=>GLctx.activeTexture(e);_glActiveTexture.sig="vi";var _emscripten_glActiveTexture=_glActiveTexture;_emscripten_glActiveTexture.sig="vi";var _glAttachShader=(e,t)=>{GLctx.attachShader(GL.programs[e],GL.shaders[t])};_glAttachShader.sig="vii";var _emscripten_glAttachShader=_glAttachShader;_emscripten_glAttachShader.sig="vii";var _glBeginQueryEXT=(e,t)=>{GLctx.disjointTimerQueryExt.beginQueryEXT(e,GL.queries[t])};_glBeginQueryEXT.sig="vii";var _emscripten_glBeginQueryEXT=_glBeginQueryEXT;function _glBindAttribLocation(e,t,r){r>>>=0,GLctx.bindAttribLocation(GL.programs[e],t,UTF8ToString(r))}_glBindAttribLocation.sig="viip";var _emscripten_glBindAttribLocation=_glBindAttribLocation;_emscripten_glBindAttribLocation.sig="viip";var _glBindBuffer=(e,t)=>{GLctx.bindBuffer(e,GL.buffers[t])};_glBindBuffer.sig="vii";var _emscripten_glBindBuffer=_glBindBuffer;_emscripten_glBindBuffer.sig="vii";var _glBindFramebuffer=(e,t)=>{GLctx.bindFramebuffer(e,GL.framebuffers[t])};_glBindFramebuffer.sig="vii";var _emscripten_glBindFramebuffer=_glBindFramebuffer;_emscripten_glBindFramebuffer.sig="vii";var _glBindRenderbuffer=(e,t)=>{GLctx.bindRenderbuffer(e,GL.renderbuffers[t])};_glBindRenderbuffer.sig="vii";var _emscripten_glBindRenderbuffer=_glBindRenderbuffer;_emscripten_glBindRenderbuffer.sig="vii";var _glBindTexture=(e,t)=>{GLctx.bindTexture(e,GL.textures[t])};_glBindTexture.sig="vii";var _emscripten_glBindTexture=_glBindTexture;_emscripten_glBindTexture.sig="vii";var _glBindVertexArray=e=>{GLctx.bindVertexArray(GL.vaos[e])};_glBindVertexArray.sig="vi";var _glBindVertexArrayOES=_glBindVertexArray;_glBindVertexArrayOES.sig="vi";var _emscripten_glBindVertexArrayOES=_glBindVertexArrayOES;_emscripten_glBindVertexArrayOES.sig="vi";var _glBlendColor=(e,t,r,n)=>GLctx.blendColor(e,t,r,n);_glBlendColor.sig="vffff";var _emscripten_glBlendColor=_glBlendColor;_emscripten_glBlendColor.sig="vffff";var _glBlendEquation=e=>GLctx.blendEquation(e);_glBlendEquation.sig="vi";var _emscripten_glBlendEquation=_glBlendEquation;_emscripten_glBlendEquation.sig="vi";var _glBlendEquationSeparate=(e,t)=>GLctx.blendEquationSeparate(e,t);_glBlendEquationSeparate.sig="vii";var _emscripten_glBlendEquationSeparate=_glBlendEquationSeparate;_emscripten_glBlendEquationSeparate.sig="vii";var _glBlendFunc=(e,t)=>GLctx.blendFunc(e,t);_glBlendFunc.sig="vii";var _emscripten_glBlendFunc=_glBlendFunc;_emscripten_glBlendFunc.sig="vii";var _glBlendFuncSeparate=(e,t,r,n)=>GLctx.blendFuncSeparate(e,t,r,n);_glBlendFuncSeparate.sig="viiii";var _emscripten_glBlendFuncSeparate=_glBlendFuncSeparate;_emscripten_glBlendFuncSeparate.sig="viiii";function _glBufferData(e,t,r,n){t>>>=0,r>>>=0,GLctx.bufferData(e,r?HEAPU8.subarray(r>>>0,r+t>>>0):t,n)}_glBufferData.sig="vippi";var _emscripten_glBufferData=_glBufferData;_emscripten_glBufferData.sig="vippi";function _glBufferSubData(e,t,r,n){t>>>=0,r>>>=0,n>>>=0,GLctx.bufferSubData(e,t,HEAPU8.subarray(n>>>0,n+r>>>0))}_glBufferSubData.sig="vippp";var _emscripten_glBufferSubData=_glBufferSubData;_emscripten_glBufferSubData.sig="vippp";var _glCheckFramebufferStatus=e=>GLctx.checkFramebufferStatus(e);_glCheckFramebufferStatus.sig="ii";var _emscripten_glCheckFramebufferStatus=_glCheckFramebufferStatus;_emscripten_glCheckFramebufferStatus.sig="ii";var _glClear=e=>GLctx.clear(e);_glClear.sig="vi";var _emscripten_glClear=_glClear;_emscripten_glClear.sig="vi";var _glClearColor=(e,t,r,n)=>GLctx.clearColor(e,t,r,n);_glClearColor.sig="vffff";var _emscripten_glClearColor=_glClearColor;_emscripten_glClearColor.sig="vffff";var _glClearDepthf=e=>GLctx.clearDepth(e);_glClearDepthf.sig="vf";var _emscripten_glClearDepthf=_glClearDepthf;_emscripten_glClearDepthf.sig="vf";var _glClearStencil=e=>GLctx.clearStencil(e);_glClearStencil.sig="vi";var _emscripten_glClearStencil=_glClearStencil;_emscripten_glClearStencil.sig="vi";var _glClipControlEXT=(e,t)=>{GLctx.extClipControl.clipControlEXT(e,t)};_glClipControlEXT.sig="vii";var _emscripten_glClipControlEXT=_glClipControlEXT,_glColorMask=(e,t,r,n)=>{GLctx.colorMask(!!e,!!t,!!r,!!n)};_glColorMask.sig="viiii";var _emscripten_glColorMask=_glColorMask;_emscripten_glColorMask.sig="viiii";var _glCompileShader=e=>{GLctx.compileShader(GL.shaders[e])};_glCompileShader.sig="vi";var _emscripten_glCompileShader=_glCompileShader;_emscripten_glCompileShader.sig="vi";function _glCompressedTexImage2D(e,t,r,n,a,l,c,u){u>>>=0,GLctx.compressedTexImage2D(e,t,r,n,a,l,HEAPU8.subarray(u>>>0,u+c>>>0))}_glCompressedTexImage2D.sig="viiiiiiip";var _emscripten_glCompressedTexImage2D=_glCompressedTexImage2D;_emscripten_glCompressedTexImage2D.sig="viiiiiiip";function _glCompressedTexSubImage2D(e,t,r,n,a,l,c,u,_){_>>>=0,GLctx.compressedTexSubImage2D(e,t,r,n,a,l,c,HEAPU8.subarray(_>>>0,_+u>>>0))}_glCompressedTexSubImage2D.sig="viiiiiiiip";var _emscripten_glCompressedTexSubImage2D=_glCompressedTexSubImage2D;_emscripten_glCompressedTexSubImage2D.sig="viiiiiiiip";var _glCopyTexImage2D=(e,t,r,n,a,l,c,u)=>GLctx.copyTexImage2D(e,t,r,n,a,l,c,u);_glCopyTexImage2D.sig="viiiiiiii";var _emscripten_glCopyTexImage2D=_glCopyTexImage2D;_emscripten_glCopyTexImage2D.sig="viiiiiiii";var _glCopyTexSubImage2D=(e,t,r,n,a,l,c,u)=>GLctx.copyTexSubImage2D(e,t,r,n,a,l,c,u);_glCopyTexSubImage2D.sig="viiiiiiii";var _emscripten_glCopyTexSubImage2D=_glCopyTexSubImage2D;_emscripten_glCopyTexSubImage2D.sig="viiiiiiii";var _glCreateProgram=()=>{var e=GL.getNewId(GL.programs),t=GLctx.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,GL.programs[e]=t,e};_glCreateProgram.sig="i";var _emscripten_glCreateProgram=_glCreateProgram;_emscripten_glCreateProgram.sig="i";var _glCreateShader=e=>{var t=GL.getNewId(GL.shaders);return GL.shaders[t]=GLctx.createShader(e),t};_glCreateShader.sig="ii";var _emscripten_glCreateShader=_glCreateShader;_emscripten_glCreateShader.sig="ii";var _glCullFace=e=>GLctx.cullFace(e);_glCullFace.sig="vi";var _emscripten_glCullFace=_glCullFace;_emscripten_glCullFace.sig="vi";function _glDeleteBuffers(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.buffers[n];a&&(GLctx.deleteBuffer(a),a.name=0,GL.buffers[n]=null)}}_glDeleteBuffers.sig="vip";var _emscripten_glDeleteBuffers=_glDeleteBuffers;_emscripten_glDeleteBuffers.sig="vip";function _glDeleteFramebuffers(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.framebuffers[n];a&&(GLctx.deleteFramebuffer(a),a.name=0,GL.framebuffers[n]=null)}}_glDeleteFramebuffers.sig="vip";var _emscripten_glDeleteFramebuffers=_glDeleteFramebuffers;_emscripten_glDeleteFramebuffers.sig="vip";var _glDeleteProgram=e=>{if(e){var t=GL.programs[e];if(!t){GL.recordError(1281);return}GLctx.deleteProgram(t),t.name=0,GL.programs[e]=null}};_glDeleteProgram.sig="vi";var _emscripten_glDeleteProgram=_glDeleteProgram;_emscripten_glDeleteProgram.sig="vi";function _glDeleteQueriesEXT(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.queries[n];a&&(GLctx.disjointTimerQueryExt.deleteQueryEXT(a),GL.queries[n]=null)}}_glDeleteQueriesEXT.sig="vip";var _emscripten_glDeleteQueriesEXT=_glDeleteQueriesEXT;function _glDeleteRenderbuffers(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.renderbuffers[n];a&&(GLctx.deleteRenderbuffer(a),a.name=0,GL.renderbuffers[n]=null)}}_glDeleteRenderbuffers.sig="vip";var _emscripten_glDeleteRenderbuffers=_glDeleteRenderbuffers;_emscripten_glDeleteRenderbuffers.sig="vip";var _glDeleteShader=e=>{if(e){var t=GL.shaders[e];if(!t){GL.recordError(1281);return}GLctx.deleteShader(t),GL.shaders[e]=null}};_glDeleteShader.sig="vi";var _emscripten_glDeleteShader=_glDeleteShader;_emscripten_glDeleteShader.sig="vi";function _glDeleteTextures(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.textures[n];a&&(GLctx.deleteTexture(a),a.name=0,GL.textures[n]=null)}}_glDeleteTextures.sig="vip";var _emscripten_glDeleteTextures=_glDeleteTextures;_emscripten_glDeleteTextures.sig="vip";function _glDeleteVertexArrays(e,t){t>>>=0;for(var r=0;r>>2>>>0];GLctx.deleteVertexArray(GL.vaos[n]),GL.vaos[n]=null}}_glDeleteVertexArrays.sig="vip";var _glDeleteVertexArraysOES=_glDeleteVertexArrays;_glDeleteVertexArraysOES.sig="vip";var _emscripten_glDeleteVertexArraysOES=_glDeleteVertexArraysOES;_emscripten_glDeleteVertexArraysOES.sig="vip";var _glDepthFunc=e=>GLctx.depthFunc(e);_glDepthFunc.sig="vi";var _emscripten_glDepthFunc=_glDepthFunc;_emscripten_glDepthFunc.sig="vi";var _glDepthMask=e=>{GLctx.depthMask(!!e)};_glDepthMask.sig="vi";var _emscripten_glDepthMask=_glDepthMask;_emscripten_glDepthMask.sig="vi";var _glDepthRangef=(e,t)=>GLctx.depthRange(e,t);_glDepthRangef.sig="vff";var _emscripten_glDepthRangef=_glDepthRangef;_emscripten_glDepthRangef.sig="vff";var _glDetachShader=(e,t)=>{GLctx.detachShader(GL.programs[e],GL.shaders[t])};_glDetachShader.sig="vii";var _emscripten_glDetachShader=_glDetachShader;_emscripten_glDetachShader.sig="vii";var _glDisable=e=>GLctx.disable(e);_glDisable.sig="vi";var _emscripten_glDisable=_glDisable;_emscripten_glDisable.sig="vi";var _glDisableVertexAttribArray=e=>{GLctx.disableVertexAttribArray(e)};_glDisableVertexAttribArray.sig="vi";var _emscripten_glDisableVertexAttribArray=_glDisableVertexAttribArray;_emscripten_glDisableVertexAttribArray.sig="vi";var _glDrawArrays=(e,t,r)=>{GLctx.drawArrays(e,t,r)};_glDrawArrays.sig="viii";var _emscripten_glDrawArrays=_glDrawArrays;_emscripten_glDrawArrays.sig="viii";var _glDrawArraysInstanced=(e,t,r,n)=>{GLctx.drawArraysInstanced(e,t,r,n)};_glDrawArraysInstanced.sig="viiii";var _glDrawArraysInstancedANGLE=_glDrawArraysInstanced,_emscripten_glDrawArraysInstancedANGLE=_glDrawArraysInstancedANGLE,tempFixedLengthArray=[];function _glDrawBuffers(e,t){t>>>=0;for(var r=tempFixedLengthArray[e],n=0;n>>2>>>0];GLctx.drawBuffers(r)}_glDrawBuffers.sig="vip";var _glDrawBuffersWEBGL=_glDrawBuffers,_emscripten_glDrawBuffersWEBGL=_glDrawBuffersWEBGL;function _glDrawElements(e,t,r,n){n>>>=0,GLctx.drawElements(e,t,r,n)}_glDrawElements.sig="viiip";var _emscripten_glDrawElements=_glDrawElements;_emscripten_glDrawElements.sig="viiip";function _glDrawElementsInstanced(e,t,r,n,a){n>>>=0,GLctx.drawElementsInstanced(e,t,r,n,a)}_glDrawElementsInstanced.sig="viiipi";var _glDrawElementsInstancedANGLE=_glDrawElementsInstanced,_emscripten_glDrawElementsInstancedANGLE=_glDrawElementsInstancedANGLE,_glEnable=e=>GLctx.enable(e);_glEnable.sig="vi";var _emscripten_glEnable=_glEnable;_emscripten_glEnable.sig="vi";var _glEnableVertexAttribArray=e=>{GLctx.enableVertexAttribArray(e)};_glEnableVertexAttribArray.sig="vi";var _emscripten_glEnableVertexAttribArray=_glEnableVertexAttribArray;_emscripten_glEnableVertexAttribArray.sig="vi";var _glEndQueryEXT=e=>{GLctx.disjointTimerQueryExt.endQueryEXT(e)};_glEndQueryEXT.sig="vi";var _emscripten_glEndQueryEXT=_glEndQueryEXT,_glFinish=()=>GLctx.finish();_glFinish.sig="v";var _emscripten_glFinish=_glFinish;_emscripten_glFinish.sig="v";var _glFlush=()=>GLctx.flush();_glFlush.sig="v";var _emscripten_glFlush=_glFlush;_emscripten_glFlush.sig="v";var _glFramebufferRenderbuffer=(e,t,r,n)=>{GLctx.framebufferRenderbuffer(e,t,r,GL.renderbuffers[n])};_glFramebufferRenderbuffer.sig="viiii";var _emscripten_glFramebufferRenderbuffer=_glFramebufferRenderbuffer;_emscripten_glFramebufferRenderbuffer.sig="viiii";var _glFramebufferTexture2D=(e,t,r,n,a)=>{GLctx.framebufferTexture2D(e,t,r,GL.textures[n],a)};_glFramebufferTexture2D.sig="viiiii";var _emscripten_glFramebufferTexture2D=_glFramebufferTexture2D;_emscripten_glFramebufferTexture2D.sig="viiiii";var _glFrontFace=e=>GLctx.frontFace(e);_glFrontFace.sig="vi";var _emscripten_glFrontFace=_glFrontFace;_emscripten_glFrontFace.sig="vi";function _glGenBuffers(e,t){t>>>=0,GL.genObject(e,t,"createBuffer",GL.buffers)}_glGenBuffers.sig="vip";var _emscripten_glGenBuffers=_glGenBuffers;_emscripten_glGenBuffers.sig="vip";function _glGenFramebuffers(e,t){t>>>=0,GL.genObject(e,t,"createFramebuffer",GL.framebuffers)}_glGenFramebuffers.sig="vip";var _emscripten_glGenFramebuffers=_glGenFramebuffers;_emscripten_glGenFramebuffers.sig="vip";function _glGenQueriesEXT(e,t){t>>>=0;for(var r=0;r>>2>>>0]=0;return}var a=GL.getNewId(GL.queries);n.name=a,GL.queries[a]=n,HEAP32[t+r*4>>>2>>>0]=a}}_glGenQueriesEXT.sig="vip";var _emscripten_glGenQueriesEXT=_glGenQueriesEXT;function _glGenRenderbuffers(e,t){t>>>=0,GL.genObject(e,t,"createRenderbuffer",GL.renderbuffers)}_glGenRenderbuffers.sig="vip";var _emscripten_glGenRenderbuffers=_glGenRenderbuffers;_emscripten_glGenRenderbuffers.sig="vip";function _glGenTextures(e,t){t>>>=0,GL.genObject(e,t,"createTexture",GL.textures)}_glGenTextures.sig="vip";var _emscripten_glGenTextures=_glGenTextures;_emscripten_glGenTextures.sig="vip";function _glGenVertexArrays(e,t){t>>>=0,GL.genObject(e,t,"createVertexArray",GL.vaos)}_glGenVertexArrays.sig="vip";var _glGenVertexArraysOES=_glGenVertexArrays;_glGenVertexArraysOES.sig="vip";var _emscripten_glGenVertexArraysOES=_glGenVertexArraysOES;_emscripten_glGenVertexArraysOES.sig="vip";var _glGenerateMipmap=e=>GLctx.generateMipmap(e);_glGenerateMipmap.sig="vi";var _emscripten_glGenerateMipmap=_glGenerateMipmap;_emscripten_glGenerateMipmap.sig="vi";var __glGetActiveAttribOrUniform=(e,t,r,n,a,l,c,u)=>{t=GL.programs[t];var _=GLctx[e](t,r);if(_){var d=u&&stringToUTF8(_.name,u,n);a&&(HEAP32[a>>>2>>>0]=d),l&&(HEAP32[l>>>2>>>0]=_.size),c&&(HEAP32[c>>>2>>>0]=_.type)}};function _glGetActiveAttrib(e,t,r,n,a,l,c){n>>>=0,a>>>=0,l>>>=0,c>>>=0,__glGetActiveAttribOrUniform("getActiveAttrib",e,t,r,n,a,l,c)}_glGetActiveAttrib.sig="viiipppp";var _emscripten_glGetActiveAttrib=_glGetActiveAttrib;_emscripten_glGetActiveAttrib.sig="viiipppp";function _glGetActiveUniform(e,t,r,n,a,l,c){n>>>=0,a>>>=0,l>>>=0,c>>>=0,__glGetActiveAttribOrUniform("getActiveUniform",e,t,r,n,a,l,c)}_glGetActiveUniform.sig="viiipppp";var _emscripten_glGetActiveUniform=_glGetActiveUniform;_emscripten_glGetActiveUniform.sig="viiipppp";function _glGetAttachedShaders(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getAttachedShaders(GL.programs[e]),l=a.length;l>t&&(l=t),HEAP32[r>>>2>>>0]=l;for(var c=0;c>>2>>>0]=u}}_glGetAttachedShaders.sig="viipp";var _emscripten_glGetAttachedShaders=_glGetAttachedShaders;_emscripten_glGetAttachedShaders.sig="viipp";function _glGetAttribLocation(e,t){return t>>>=0,GLctx.getAttribLocation(GL.programs[e],UTF8ToString(t))}_glGetAttribLocation.sig="iip";var _emscripten_glGetAttribLocation=_glGetAttribLocation;_emscripten_glGetAttribLocation.sig="iip";var writeI53ToI64=(e,t)=>{HEAPU32[e>>>2>>>0]=t;var r=HEAPU32[e>>>2>>>0];HEAPU32[e+4>>>2>>>0]=(t-r)/4294967296},emscriptenWebGLGet=(e,t,r)=>{if(!t){GL.recordError(1281);return}var n=void 0;switch(e){case 36346:n=1;break;case 36344:r!=0&&r!=1&&GL.recordError(1280);return;case 36345:n=0;break;case 34466:var a=GLctx.getParameter(34467);n=a?a.length:0;break}if(n===void 0){var l=GLctx.getParameter(e);switch(typeof l){case"number":n=l;break;case"boolean":n=l?1:0;break;case"string":GL.recordError(1280);return;case"object":if(l===null)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{n=0;break}default:{GL.recordError(1280);return}}else if(l instanceof Float32Array||l instanceof Uint32Array||l instanceof Int32Array||l instanceof Array){for(var c=0;c>>2>>>0]=l[c];break;case 2:HEAPF32[t+c*4>>>2>>>0]=l[c];break;case 4:HEAP8[t+c>>>0]=l[c]?1:0;break}return}else try{n=l.name|0}catch(u){GL.recordError(1280),err("GL_INVALID_ENUM in glGet".concat(r,"v: Unknown object returned from WebGL getParameter(").concat(e,")! (error: ").concat(u,")"));return}break;default:GL.recordError(1280),err("GL_INVALID_ENUM in glGet".concat(r,"v: Native code calling glGet").concat(r,"v(").concat(e,") and it returns ").concat(l," of type ").concat(typeof l,"!"));return}}switch(r){case 1:writeI53ToI64(t,n);break;case 0:HEAP32[t>>>2>>>0]=n;break;case 2:HEAPF32[t>>>2>>>0]=n;break;case 4:HEAP8[t>>>0]=n?1:0;break}};function _glGetBooleanv(e,t){return t>>>=0,emscriptenWebGLGet(e,t,4)}_glGetBooleanv.sig="vip";var _emscripten_glGetBooleanv=_glGetBooleanv;_emscripten_glGetBooleanv.sig="vip";function _glGetBufferParameteriv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.getBufferParameter(e,t)}_glGetBufferParameteriv.sig="viip";var _emscripten_glGetBufferParameteriv=_glGetBufferParameteriv;_emscripten_glGetBufferParameteriv.sig="viip";var _glGetError=()=>{var e=GLctx.getError()||GL.lastError;return GL.lastError=0,e};_glGetError.sig="i";var _emscripten_glGetError=_glGetError;_emscripten_glGetError.sig="i";function _glGetFloatv(e,t){return t>>>=0,emscriptenWebGLGet(e,t,2)}_glGetFloatv.sig="vip";var _emscripten_glGetFloatv=_glGetFloatv;_emscripten_glGetFloatv.sig="vip";function _glGetFramebufferAttachmentParameteriv(e,t,r,n){n>>>=0;var a=GLctx.getFramebufferAttachmentParameter(e,t,r);(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)&&(a=a.name|0),HEAP32[n>>>2>>>0]=a}_glGetFramebufferAttachmentParameteriv.sig="viiip";var _emscripten_glGetFramebufferAttachmentParameteriv=_glGetFramebufferAttachmentParameteriv;_emscripten_glGetFramebufferAttachmentParameteriv.sig="viiip";function _glGetIntegerv(e,t){return t>>>=0,emscriptenWebGLGet(e,t,0)}_glGetIntegerv.sig="vip";var _emscripten_glGetIntegerv=_glGetIntegerv;_emscripten_glGetIntegerv.sig="vip";function _glGetProgramInfoLog(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getProgramInfoLog(GL.programs[e]);a===null&&(a="(unknown error)");var l=t>0&&n?stringToUTF8(a,n,t):0;r&&(HEAP32[r>>>2>>>0]=l)}_glGetProgramInfoLog.sig="viipp";var _emscripten_glGetProgramInfoLog=_glGetProgramInfoLog;_emscripten_glGetProgramInfoLog.sig="viipp";function _glGetProgramiv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}if(e>=GL.counter){GL.recordError(1281);return}if(e=GL.programs[e],t==35716){var n=GLctx.getProgramInfoLog(e);n===null&&(n="(unknown error)"),HEAP32[r>>>2>>>0]=n.length+1}else if(t==35719){if(!e.maxUniformLength)for(var a=GLctx.getProgramParameter(e,35718),l=0;l>>2>>>0]=e.maxUniformLength}else if(t==35722){if(!e.maxAttributeLength)for(var c=GLctx.getProgramParameter(e,35721),l=0;l>>2>>>0]=e.maxAttributeLength}else if(t==35381){if(!e.maxUniformBlockNameLength)for(var u=GLctx.getProgramParameter(e,35382),l=0;l>>2>>>0]=e.maxUniformBlockNameLength}else HEAP32[r>>>2>>>0]=GLctx.getProgramParameter(e,t)}_glGetProgramiv.sig="viip";var _emscripten_glGetProgramiv=_glGetProgramiv;_emscripten_glGetProgramiv.sig="viip";function _glGetQueryObjecti64vEXT(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}var n=GL.queries[e],a;a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(n,t);var l;typeof a=="boolean"?l=a?1:0:l=a,writeI53ToI64(r,l)}_glGetQueryObjecti64vEXT.sig="viip";var _emscripten_glGetQueryObjecti64vEXT=_glGetQueryObjecti64vEXT;function _glGetQueryObjectivEXT(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}var n=GL.queries[e],a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(n,t),l;typeof a=="boolean"?l=a?1:0:l=a,HEAP32[r>>>2>>>0]=l}_glGetQueryObjectivEXT.sig="viip";var _emscripten_glGetQueryObjectivEXT=_glGetQueryObjectivEXT,_glGetQueryObjectui64vEXT=_glGetQueryObjecti64vEXT,_emscripten_glGetQueryObjectui64vEXT=_glGetQueryObjectui64vEXT,_glGetQueryObjectuivEXT=_glGetQueryObjectivEXT,_emscripten_glGetQueryObjectuivEXT=_glGetQueryObjectuivEXT;function _glGetQueryivEXT(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.disjointTimerQueryExt.getQueryEXT(e,t)}_glGetQueryivEXT.sig="viip";var _emscripten_glGetQueryivEXT=_glGetQueryivEXT;function _glGetRenderbufferParameteriv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.getRenderbufferParameter(e,t)}_glGetRenderbufferParameteriv.sig="viip";var _emscripten_glGetRenderbufferParameteriv=_glGetRenderbufferParameteriv;_emscripten_glGetRenderbufferParameteriv.sig="viip";function _glGetShaderInfoLog(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getShaderInfoLog(GL.shaders[e]);a===null&&(a="(unknown error)");var l=t>0&&n?stringToUTF8(a,n,t):0;r&&(HEAP32[r>>>2>>>0]=l)}_glGetShaderInfoLog.sig="viipp";var _emscripten_glGetShaderInfoLog=_glGetShaderInfoLog;_emscripten_glGetShaderInfoLog.sig="viipp";function _glGetShaderPrecisionFormat(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getShaderPrecisionFormat(e,t);HEAP32[r>>>2>>>0]=a.rangeMin,HEAP32[r+4>>>2>>>0]=a.rangeMax,HEAP32[n>>>2>>>0]=a.precision}_glGetShaderPrecisionFormat.sig="viipp";var _emscripten_glGetShaderPrecisionFormat=_glGetShaderPrecisionFormat;_emscripten_glGetShaderPrecisionFormat.sig="viipp";function _glGetShaderSource(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getShaderSource(GL.shaders[e]);if(a){var l=t>0&&n?stringToUTF8(a,n,t):0;r&&(HEAP32[r>>>2>>>0]=l)}}_glGetShaderSource.sig="viipp";var _emscripten_glGetShaderSource=_glGetShaderSource;_emscripten_glGetShaderSource.sig="viipp";function _glGetShaderiv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}if(t==35716){var n=GLctx.getShaderInfoLog(GL.shaders[e]);n===null&&(n="(unknown error)");var a=n?n.length+1:0;HEAP32[r>>>2>>>0]=a}else if(t==35720){var l=GLctx.getShaderSource(GL.shaders[e]),c=l?l.length+1:0;HEAP32[r>>>2>>>0]=c}else HEAP32[r>>>2>>>0]=GLctx.getShaderParameter(GL.shaders[e],t)}_glGetShaderiv.sig="viip";var _emscripten_glGetShaderiv=_glGetShaderiv;_emscripten_glGetShaderiv.sig="viip";var webglGetExtensions=function e(){var t=getEmscriptenSupportedExtensions(GLctx);return t=t.concat(t.map(r=>"GL_"+r)),t};function _glGetString(e){var t=GL.stringCache[e];if(!t){switch(e){case 7939:t=stringToNewUTF8(webglGetExtensions().join(" "));break;case 7936:case 7937:case 37445:case 37446:var r=GLctx.getParameter(e);r||GL.recordError(1280),t=r?stringToNewUTF8(r):0;break;case 7938:var n=GLctx.getParameter(7938),a="OpenGL ES 2.0 (".concat(n,")");t=stringToNewUTF8(a);break;case 35724:var l=GLctx.getParameter(35724),c=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/,u=l.match(c);u!==null&&(u[1].length==3&&(u[1]=u[1]+"0"),l="OpenGL ES GLSL ES ".concat(u[1]," (").concat(l,")")),t=stringToNewUTF8(l);break;default:GL.recordError(1280)}GL.stringCache[e]=t}return t}_glGetString.sig="pi";var _emscripten_glGetString=_glGetString;_emscripten_glGetString.sig="pi";function _glGetTexParameterfv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAPF32[r>>>2>>>0]=GLctx.getTexParameter(e,t)}_glGetTexParameterfv.sig="viip";var _emscripten_glGetTexParameterfv=_glGetTexParameterfv;_emscripten_glGetTexParameterfv.sig="viip";function _glGetTexParameteriv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.getTexParameter(e,t)}_glGetTexParameteriv.sig="viip";var _emscripten_glGetTexParameteriv=_glGetTexParameteriv;_emscripten_glGetTexParameteriv.sig="viip";var webglGetLeftBracePos=e=>e.slice(-1)=="]"&&e.lastIndexOf("["),webglPrepareUniformLocationsBeforeFirstUse=e=>{var t=e.uniformLocsById,r=e.uniformSizeAndIdsByName,n,a;if(!t){e.uniformLocsById=t={},e.uniformArrayNamesById={};var l=GLctx.getProgramParameter(e,35718);for(n=0;n0?u.slice(0,d):u,f=e.uniformIdCounter;for(e.uniformIdCounter+=_,r[p]=[_,f],a=0;a<_;++a)t[f]=a,e.uniformArrayNamesById[f++]=p}}};function _glGetUniformLocation(e,t){if(t>>>=0,t=UTF8ToString(t),e=GL.programs[e]){webglPrepareUniformLocationsBeforeFirstUse(e);var r=e.uniformLocsById,n=0,a=t,l=webglGetLeftBracePos(t);l>0&&(n=jstoi_q(t.slice(l+1))>>>0,a=t.slice(0,l));var c=e.uniformSizeAndIdsByName[a];if(c&&n{var t=GLctx.currentProgram;if(t){var r=t.uniformLocsById[e];return typeof r=="number"&&(t.uniformLocsById[e]=r=GLctx.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"[".concat(r,"]"):""))),r}else GL.recordError(1282)},emscriptenWebGLGetUniform=(e,t,r,n)=>{if(!r){GL.recordError(1281);return}e=GL.programs[e],webglPrepareUniformLocationsBeforeFirstUse(e);var a=GLctx.getUniform(e,webglGetUniformLocation(t));if(typeof a=="number"||typeof a=="boolean")switch(n){case 0:HEAP32[r>>>2>>>0]=a;break;case 2:HEAPF32[r>>>2>>>0]=a;break}else for(var l=0;l>>2>>>0]=a[l];break;case 2:HEAPF32[r+l*4>>>2>>>0]=a[l];break}};function _glGetUniformfv(e,t,r){r>>>=0,emscriptenWebGLGetUniform(e,t,r,2)}_glGetUniformfv.sig="viip";var _emscripten_glGetUniformfv=_glGetUniformfv;_emscripten_glGetUniformfv.sig="viip";function _glGetUniformiv(e,t,r){r>>>=0,emscriptenWebGLGetUniform(e,t,r,0)}_glGetUniformiv.sig="viip";var _emscripten_glGetUniformiv=_glGetUniformiv;_emscripten_glGetUniformiv.sig="viip";function _glGetVertexAttribPointerv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.getVertexAttribOffset(e,t)}_glGetVertexAttribPointerv.sig="viip";var _emscripten_glGetVertexAttribPointerv=_glGetVertexAttribPointerv;_emscripten_glGetVertexAttribPointerv.sig="viip";var emscriptenWebGLGetVertexAttrib=(e,t,r,n)=>{if(!r){GL.recordError(1281);return}var a=GLctx.getVertexAttrib(e,t);if(t==34975)HEAP32[r>>>2>>>0]=a&&a.name;else if(typeof a=="number"||typeof a=="boolean")switch(n){case 0:HEAP32[r>>>2>>>0]=a;break;case 2:HEAPF32[r>>>2>>>0]=a;break;case 5:HEAP32[r>>>2>>>0]=Math.fround(a);break}else for(var l=0;l>>2>>>0]=a[l];break;case 2:HEAPF32[r+l*4>>>2>>>0]=a[l];break;case 5:HEAP32[r+l*4>>>2>>>0]=Math.fround(a[l]);break}};function _glGetVertexAttribfv(e,t,r){r>>>=0,emscriptenWebGLGetVertexAttrib(e,t,r,2)}_glGetVertexAttribfv.sig="viip";var _emscripten_glGetVertexAttribfv=_glGetVertexAttribfv;_emscripten_glGetVertexAttribfv.sig="viip";function _glGetVertexAttribiv(e,t,r){r>>>=0,emscriptenWebGLGetVertexAttrib(e,t,r,5)}_glGetVertexAttribiv.sig="viip";var _emscripten_glGetVertexAttribiv=_glGetVertexAttribiv;_emscripten_glGetVertexAttribiv.sig="viip";var _glHint=(e,t)=>GLctx.hint(e,t);_glHint.sig="vii";var _emscripten_glHint=_glHint;_emscripten_glHint.sig="vii";var _glIsBuffer=e=>{var t=GL.buffers[e];return t?GLctx.isBuffer(t):0};_glIsBuffer.sig="ii";var _emscripten_glIsBuffer=_glIsBuffer;_emscripten_glIsBuffer.sig="ii";var _glIsEnabled=e=>GLctx.isEnabled(e);_glIsEnabled.sig="ii";var _emscripten_glIsEnabled=_glIsEnabled;_emscripten_glIsEnabled.sig="ii";var _glIsFramebuffer=e=>{var t=GL.framebuffers[e];return t?GLctx.isFramebuffer(t):0};_glIsFramebuffer.sig="ii";var _emscripten_glIsFramebuffer=_glIsFramebuffer;_emscripten_glIsFramebuffer.sig="ii";var _glIsProgram=e=>(e=GL.programs[e],e?GLctx.isProgram(e):0);_glIsProgram.sig="ii";var _emscripten_glIsProgram=_glIsProgram;_emscripten_glIsProgram.sig="ii";var _glIsQueryEXT=e=>{var t=GL.queries[e];return t?GLctx.disjointTimerQueryExt.isQueryEXT(t):0};_glIsQueryEXT.sig="ii";var _emscripten_glIsQueryEXT=_glIsQueryEXT,_glIsRenderbuffer=e=>{var t=GL.renderbuffers[e];return t?GLctx.isRenderbuffer(t):0};_glIsRenderbuffer.sig="ii";var _emscripten_glIsRenderbuffer=_glIsRenderbuffer;_emscripten_glIsRenderbuffer.sig="ii";var _glIsShader=e=>{var t=GL.shaders[e];return t?GLctx.isShader(t):0};_glIsShader.sig="ii";var _emscripten_glIsShader=_glIsShader;_emscripten_glIsShader.sig="ii";var _glIsTexture=e=>{var t=GL.textures[e];return t?GLctx.isTexture(t):0};_glIsTexture.sig="ii";var _emscripten_glIsTexture=_glIsTexture;_emscripten_glIsTexture.sig="ii";var _glIsVertexArray=e=>{var t=GL.vaos[e];return t?GLctx.isVertexArray(t):0};_glIsVertexArray.sig="ii";var _glIsVertexArrayOES=_glIsVertexArray;_glIsVertexArrayOES.sig="ii";var _emscripten_glIsVertexArrayOES=_glIsVertexArrayOES;_emscripten_glIsVertexArrayOES.sig="ii";var _glLineWidth=e=>GLctx.lineWidth(e);_glLineWidth.sig="vf";var _emscripten_glLineWidth=_glLineWidth;_emscripten_glLineWidth.sig="vf";var _glLinkProgram=e=>{e=GL.programs[e],GLctx.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}};_glLinkProgram.sig="vi";var _emscripten_glLinkProgram=_glLinkProgram;_emscripten_glLinkProgram.sig="vi";var _glPixelStorei=(e,t)=>{e==3317?GL.unpackAlignment=t:e==3314&&(GL.unpackRowLength=t),GLctx.pixelStorei(e,t)};_glPixelStorei.sig="vii";var _emscripten_glPixelStorei=_glPixelStorei;_emscripten_glPixelStorei.sig="vii";var _glPolygonModeWEBGL=(e,t)=>{GLctx.webglPolygonMode.polygonModeWEBGL(e,t)};_glPolygonModeWEBGL.sig="vii";var _emscripten_glPolygonModeWEBGL=_glPolygonModeWEBGL,_glPolygonOffset=(e,t)=>GLctx.polygonOffset(e,t);_glPolygonOffset.sig="vff";var _emscripten_glPolygonOffset=_glPolygonOffset;_emscripten_glPolygonOffset.sig="vff";var _glPolygonOffsetClampEXT=(e,t,r)=>{GLctx.extPolygonOffsetClamp.polygonOffsetClampEXT(e,t,r)};_glPolygonOffsetClampEXT.sig="vfff";var _emscripten_glPolygonOffsetClampEXT=_glPolygonOffsetClampEXT,_glQueryCounterEXT=(e,t)=>{GLctx.disjointTimerQueryExt.queryCounterEXT(GL.queries[e],t)};_glQueryCounterEXT.sig="vii";var _emscripten_glQueryCounterEXT=_glQueryCounterEXT,computeUnpackAlignedImageSize=(e,t,r)=>{function n(c,u){return c+u-1&-u}var a=(GL.unpackRowLength||e)*r,l=n(a,GL.unpackAlignment);return t*l},colorChannelsInGlTextureFormat=e=>{var t={5:3,6:4,8:2,29502:3,29504:4};return t[e-6402]||1},heapObjectForWebGLType=e=>(e-=5120,e==1?HEAPU8:e==4?HEAP32:e==6?HEAPF32:e==5||e==28922?HEAPU32:HEAPU16),toTypedArrayIndex=(e,t)=>e>>>31-Math.clz32(t.BYTES_PER_ELEMENT),emscriptenWebGLGetTexPixelData=(e,t,r,n,a,l)=>{var c=heapObjectForWebGLType(e),u=colorChannelsInGlTextureFormat(t)*c.BYTES_PER_ELEMENT,_=computeUnpackAlignedImageSize(r,n,u);return c.subarray(toTypedArrayIndex(a,c)>>>0,toTypedArrayIndex(a+_,c)>>>0)};function _glReadPixels(e,t,r,n,a,l,c){c>>>=0;var u=emscriptenWebGLGetTexPixelData(l,a,r,n,c);if(!u){GL.recordError(1280);return}GLctx.readPixels(e,t,r,n,a,l,u)}_glReadPixels.sig="viiiiiip";var _emscripten_glReadPixels=_glReadPixels;_emscripten_glReadPixels.sig="viiiiiip";var _glReleaseShaderCompiler=()=>{};_glReleaseShaderCompiler.sig="v";var _emscripten_glReleaseShaderCompiler=_glReleaseShaderCompiler;_emscripten_glReleaseShaderCompiler.sig="v";var _glRenderbufferStorage=(e,t,r,n)=>GLctx.renderbufferStorage(e,t,r,n);_glRenderbufferStorage.sig="viiii";var _emscripten_glRenderbufferStorage=_glRenderbufferStorage;_emscripten_glRenderbufferStorage.sig="viiii";var _glSampleCoverage=(e,t)=>{GLctx.sampleCoverage(e,!!t)};_glSampleCoverage.sig="vfi";var _emscripten_glSampleCoverage=_glSampleCoverage;_emscripten_glSampleCoverage.sig="vfi";var _glScissor=(e,t,r,n)=>GLctx.scissor(e,t,r,n);_glScissor.sig="viiii";var _emscripten_glScissor=_glScissor;_emscripten_glScissor.sig="viiii";function _glShaderBinary(e,t,r,n,a){GL.recordError(1280)}_glShaderBinary.sig="vipipi";var _emscripten_glShaderBinary=_glShaderBinary;_emscripten_glShaderBinary.sig="vipipi";function _glShaderSource(e,t,r,n){r>>>=0,n>>>=0;var a=GL.getSource(e,t,r,n);GLctx.shaderSource(GL.shaders[e],a)}_glShaderSource.sig="viipp";var _emscripten_glShaderSource=_glShaderSource;_emscripten_glShaderSource.sig="viipp";var _glStencilFunc=(e,t,r)=>GLctx.stencilFunc(e,t,r);_glStencilFunc.sig="viii";var _emscripten_glStencilFunc=_glStencilFunc;_emscripten_glStencilFunc.sig="viii";var _glStencilFuncSeparate=(e,t,r,n)=>GLctx.stencilFuncSeparate(e,t,r,n);_glStencilFuncSeparate.sig="viiii";var _emscripten_glStencilFuncSeparate=_glStencilFuncSeparate;_emscripten_glStencilFuncSeparate.sig="viiii";var _glStencilMask=e=>GLctx.stencilMask(e);_glStencilMask.sig="vi";var _emscripten_glStencilMask=_glStencilMask;_emscripten_glStencilMask.sig="vi";var _glStencilMaskSeparate=(e,t)=>GLctx.stencilMaskSeparate(e,t);_glStencilMaskSeparate.sig="vii";var _emscripten_glStencilMaskSeparate=_glStencilMaskSeparate;_emscripten_glStencilMaskSeparate.sig="vii";var _glStencilOp=(e,t,r)=>GLctx.stencilOp(e,t,r);_glStencilOp.sig="viii";var _emscripten_glStencilOp=_glStencilOp;_emscripten_glStencilOp.sig="viii";var _glStencilOpSeparate=(e,t,r,n)=>GLctx.stencilOpSeparate(e,t,r,n);_glStencilOpSeparate.sig="viiii";var _emscripten_glStencilOpSeparate=_glStencilOpSeparate;_emscripten_glStencilOpSeparate.sig="viiii";function _glTexImage2D(e,t,r,n,a,l,c,u,_){_>>>=0;var d=_?emscriptenWebGLGetTexPixelData(u,c,n,a,_):null;GLctx.texImage2D(e,t,r,n,a,l,c,u,d)}_glTexImage2D.sig="viiiiiiiip";var _emscripten_glTexImage2D=_glTexImage2D;_emscripten_glTexImage2D.sig="viiiiiiiip";var _glTexParameterf=(e,t,r)=>GLctx.texParameterf(e,t,r);_glTexParameterf.sig="viif";var _emscripten_glTexParameterf=_glTexParameterf;_emscripten_glTexParameterf.sig="viif";function _glTexParameterfv(e,t,r){r>>>=0;var n=HEAPF32[r>>>2>>>0];GLctx.texParameterf(e,t,n)}_glTexParameterfv.sig="viip";var _emscripten_glTexParameterfv=_glTexParameterfv;_emscripten_glTexParameterfv.sig="viip";var _glTexParameteri=(e,t,r)=>GLctx.texParameteri(e,t,r);_glTexParameteri.sig="viii";var _emscripten_glTexParameteri=_glTexParameteri;_emscripten_glTexParameteri.sig="viii";function _glTexParameteriv(e,t,r){r>>>=0;var n=HEAP32[r>>>2>>>0];GLctx.texParameteri(e,t,n)}_glTexParameteriv.sig="viip";var _emscripten_glTexParameteriv=_glTexParameteriv;_emscripten_glTexParameteriv.sig="viip";function _glTexSubImage2D(e,t,r,n,a,l,c,u,_){_>>>=0;var d=_?emscriptenWebGLGetTexPixelData(u,c,a,l,_):null;GLctx.texSubImage2D(e,t,r,n,a,l,c,u,d)}_glTexSubImage2D.sig="viiiiiiiip";var _emscripten_glTexSubImage2D=_glTexSubImage2D;_emscripten_glTexSubImage2D.sig="viiiiiiiip";var _glUniform1f=(e,t)=>{GLctx.uniform1f(webglGetUniformLocation(e),t)};_glUniform1f.sig="vif";var _emscripten_glUniform1f=_glUniform1f;_emscripten_glUniform1f.sig="vif";var miniTempWebGLFloatBuffers=[];function _glUniform1fv(e,t,r){if(r>>>=0,t<=288)for(var a=miniTempWebGLFloatBuffers[t],n=0;n>>2>>>0];else var a=HEAPF32.subarray(r>>>2>>>0,r+t*4>>>2>>>0);GLctx.uniform1fv(webglGetUniformLocation(e),a)}_glUniform1fv.sig="viip";var _emscripten_glUniform1fv=_glUniform1fv;_emscripten_glUniform1fv.sig="viip";var _glUniform1i=(e,t)=>{GLctx.uniform1i(webglGetUniformLocation(e),t)};_glUniform1i.sig="vii";var _emscripten_glUniform1i=_glUniform1i;_emscripten_glUniform1i.sig="vii";var miniTempWebGLIntBuffers=[];function _glUniform1iv(e,t,r){if(r>>>=0,t<=288)for(var a=miniTempWebGLIntBuffers[t],n=0;n>>2>>>0];else var a=HEAP32.subarray(r>>>2>>>0,r+t*4>>>2>>>0);GLctx.uniform1iv(webglGetUniformLocation(e),a)}_glUniform1iv.sig="viip";var _emscripten_glUniform1iv=_glUniform1iv;_emscripten_glUniform1iv.sig="viip";var _glUniform2f=(e,t,r)=>{GLctx.uniform2f(webglGetUniformLocation(e),t,r)};_glUniform2f.sig="viff";var _emscripten_glUniform2f=_glUniform2f;_emscripten_glUniform2f.sig="viff";function _glUniform2fv(e,t,r){if(r>>>=0,t<=144){t*=2;for(var a=miniTempWebGLFloatBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAPF32[r+(4*n+4)>>>2>>>0]}else var a=HEAPF32.subarray(r>>>2>>>0,r+t*8>>>2>>>0);GLctx.uniform2fv(webglGetUniformLocation(e),a)}_glUniform2fv.sig="viip";var _emscripten_glUniform2fv=_glUniform2fv;_emscripten_glUniform2fv.sig="viip";var _glUniform2i=(e,t,r)=>{GLctx.uniform2i(webglGetUniformLocation(e),t,r)};_glUniform2i.sig="viii";var _emscripten_glUniform2i=_glUniform2i;_emscripten_glUniform2i.sig="viii";function _glUniform2iv(e,t,r){if(r>>>=0,t<=144){t*=2;for(var a=miniTempWebGLIntBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAP32[r+(4*n+4)>>>2>>>0]}else var a=HEAP32.subarray(r>>>2>>>0,r+t*8>>>2>>>0);GLctx.uniform2iv(webglGetUniformLocation(e),a)}_glUniform2iv.sig="viip";var _emscripten_glUniform2iv=_glUniform2iv;_emscripten_glUniform2iv.sig="viip";var _glUniform3f=(e,t,r,n)=>{GLctx.uniform3f(webglGetUniformLocation(e),t,r,n)};_glUniform3f.sig="vifff";var _emscripten_glUniform3f=_glUniform3f;_emscripten_glUniform3f.sig="vifff";function _glUniform3fv(e,t,r){if(r>>>=0,t<=96){t*=3;for(var a=miniTempWebGLFloatBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAPF32[r+(4*n+4)>>>2>>>0],a[n+2]=HEAPF32[r+(4*n+8)>>>2>>>0]}else var a=HEAPF32.subarray(r>>>2>>>0,r+t*12>>>2>>>0);GLctx.uniform3fv(webglGetUniformLocation(e),a)}_glUniform3fv.sig="viip";var _emscripten_glUniform3fv=_glUniform3fv;_emscripten_glUniform3fv.sig="viip";var _glUniform3i=(e,t,r,n)=>{GLctx.uniform3i(webglGetUniformLocation(e),t,r,n)};_glUniform3i.sig="viiii";var _emscripten_glUniform3i=_glUniform3i;_emscripten_glUniform3i.sig="viiii";function _glUniform3iv(e,t,r){if(r>>>=0,t<=96){t*=3;for(var a=miniTempWebGLIntBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAP32[r+(4*n+4)>>>2>>>0],a[n+2]=HEAP32[r+(4*n+8)>>>2>>>0]}else var a=HEAP32.subarray(r>>>2>>>0,r+t*12>>>2>>>0);GLctx.uniform3iv(webglGetUniformLocation(e),a)}_glUniform3iv.sig="viip";var _emscripten_glUniform3iv=_glUniform3iv;_emscripten_glUniform3iv.sig="viip";var _glUniform4f=(e,t,r,n,a)=>{GLctx.uniform4f(webglGetUniformLocation(e),t,r,n,a)};_glUniform4f.sig="viffff";var _emscripten_glUniform4f=_glUniform4f;_emscripten_glUniform4f.sig="viffff";function _glUniform4fv(e,t,r){if(r>>>=0,t<=72){var c=miniTempWebGLFloatBuffers[4*t],n=HEAPF32;r=r>>>2,t*=4;for(var a=0;a>>0],c[a+1]=n[l+1>>>0],c[a+2]=n[l+2>>>0],c[a+3]=n[l+3>>>0]}}else var c=HEAPF32.subarray(r>>>2>>>0,r+t*16>>>2>>>0);GLctx.uniform4fv(webglGetUniformLocation(e),c)}_glUniform4fv.sig="viip";var _emscripten_glUniform4fv=_glUniform4fv;_emscripten_glUniform4fv.sig="viip";var _glUniform4i=(e,t,r,n,a)=>{GLctx.uniform4i(webglGetUniformLocation(e),t,r,n,a)};_glUniform4i.sig="viiiii";var _emscripten_glUniform4i=_glUniform4i;_emscripten_glUniform4i.sig="viiiii";function _glUniform4iv(e,t,r){if(r>>>=0,t<=72){t*=4;for(var a=miniTempWebGLIntBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAP32[r+(4*n+4)>>>2>>>0],a[n+2]=HEAP32[r+(4*n+8)>>>2>>>0],a[n+3]=HEAP32[r+(4*n+12)>>>2>>>0]}else var a=HEAP32.subarray(r>>>2>>>0,r+t*16>>>2>>>0);GLctx.uniform4iv(webglGetUniformLocation(e),a)}_glUniform4iv.sig="viip";var _emscripten_glUniform4iv=_glUniform4iv;_emscripten_glUniform4iv.sig="viip";function _glUniformMatrix2fv(e,t,r,n){if(n>>>=0,t<=72){t*=4;for(var l=miniTempWebGLFloatBuffers[t],a=0;a>>2>>>0],l[a+1]=HEAPF32[n+(4*a+4)>>>2>>>0],l[a+2]=HEAPF32[n+(4*a+8)>>>2>>>0],l[a+3]=HEAPF32[n+(4*a+12)>>>2>>>0]}else var l=HEAPF32.subarray(n>>>2>>>0,n+t*16>>>2>>>0);GLctx.uniformMatrix2fv(webglGetUniformLocation(e),!!r,l)}_glUniformMatrix2fv.sig="viiip";var _emscripten_glUniformMatrix2fv=_glUniformMatrix2fv;_emscripten_glUniformMatrix2fv.sig="viiip";function _glUniformMatrix3fv(e,t,r,n){if(n>>>=0,t<=32){t*=9;for(var l=miniTempWebGLFloatBuffers[t],a=0;a>>2>>>0],l[a+1]=HEAPF32[n+(4*a+4)>>>2>>>0],l[a+2]=HEAPF32[n+(4*a+8)>>>2>>>0],l[a+3]=HEAPF32[n+(4*a+12)>>>2>>>0],l[a+4]=HEAPF32[n+(4*a+16)>>>2>>>0],l[a+5]=HEAPF32[n+(4*a+20)>>>2>>>0],l[a+6]=HEAPF32[n+(4*a+24)>>>2>>>0],l[a+7]=HEAPF32[n+(4*a+28)>>>2>>>0],l[a+8]=HEAPF32[n+(4*a+32)>>>2>>>0]}else var l=HEAPF32.subarray(n>>>2>>>0,n+t*36>>>2>>>0);GLctx.uniformMatrix3fv(webglGetUniformLocation(e),!!r,l)}_glUniformMatrix3fv.sig="viiip";var _emscripten_glUniformMatrix3fv=_glUniformMatrix3fv;_emscripten_glUniformMatrix3fv.sig="viiip";function _glUniformMatrix4fv(e,t,r,n){if(n>>>=0,t<=18){var u=miniTempWebGLFloatBuffers[16*t],a=HEAPF32;n=n>>>2,t*=16;for(var l=0;l>>0],u[l+1]=a[c+1>>>0],u[l+2]=a[c+2>>>0],u[l+3]=a[c+3>>>0],u[l+4]=a[c+4>>>0],u[l+5]=a[c+5>>>0],u[l+6]=a[c+6>>>0],u[l+7]=a[c+7>>>0],u[l+8]=a[c+8>>>0],u[l+9]=a[c+9>>>0],u[l+10]=a[c+10>>>0],u[l+11]=a[c+11>>>0],u[l+12]=a[c+12>>>0],u[l+13]=a[c+13>>>0],u[l+14]=a[c+14>>>0],u[l+15]=a[c+15>>>0]}}else var u=HEAPF32.subarray(n>>>2>>>0,n+t*64>>>2>>>0);GLctx.uniformMatrix4fv(webglGetUniformLocation(e),!!r,u)}_glUniformMatrix4fv.sig="viiip";var _emscripten_glUniformMatrix4fv=_glUniformMatrix4fv;_emscripten_glUniformMatrix4fv.sig="viiip";var _glUseProgram=e=>{e=GL.programs[e],GLctx.useProgram(e),GLctx.currentProgram=e};_glUseProgram.sig="vi";var _emscripten_glUseProgram=_glUseProgram;_emscripten_glUseProgram.sig="vi";var _glValidateProgram=e=>{GLctx.validateProgram(GL.programs[e])};_glValidateProgram.sig="vi";var _emscripten_glValidateProgram=_glValidateProgram;_emscripten_glValidateProgram.sig="vi";var _glVertexAttrib1f=(e,t)=>GLctx.vertexAttrib1f(e,t);_glVertexAttrib1f.sig="vif";var _emscripten_glVertexAttrib1f=_glVertexAttrib1f;_emscripten_glVertexAttrib1f.sig="vif";function _glVertexAttrib1fv(e,t){t>>>=0,GLctx.vertexAttrib1f(e,HEAPF32[t>>>2])}_glVertexAttrib1fv.sig="vip";var _emscripten_glVertexAttrib1fv=_glVertexAttrib1fv;_emscripten_glVertexAttrib1fv.sig="vip";var _glVertexAttrib2f=(e,t,r)=>GLctx.vertexAttrib2f(e,t,r);_glVertexAttrib2f.sig="viff";var _emscripten_glVertexAttrib2f=_glVertexAttrib2f;_emscripten_glVertexAttrib2f.sig="viff";function _glVertexAttrib2fv(e,t){t>>>=0,GLctx.vertexAttrib2f(e,HEAPF32[t>>>2],HEAPF32[t+4>>>2])}_glVertexAttrib2fv.sig="vip";var _emscripten_glVertexAttrib2fv=_glVertexAttrib2fv;_emscripten_glVertexAttrib2fv.sig="vip";var _glVertexAttrib3f=(e,t,r,n)=>GLctx.vertexAttrib3f(e,t,r,n);_glVertexAttrib3f.sig="vifff";var _emscripten_glVertexAttrib3f=_glVertexAttrib3f;_emscripten_glVertexAttrib3f.sig="vifff";function _glVertexAttrib3fv(e,t){t>>>=0,GLctx.vertexAttrib3f(e,HEAPF32[t>>>2],HEAPF32[t+4>>>2],HEAPF32[t+8>>>2])}_glVertexAttrib3fv.sig="vip";var _emscripten_glVertexAttrib3fv=_glVertexAttrib3fv;_emscripten_glVertexAttrib3fv.sig="vip";var _glVertexAttrib4f=(e,t,r,n,a)=>GLctx.vertexAttrib4f(e,t,r,n,a);_glVertexAttrib4f.sig="viffff";var _emscripten_glVertexAttrib4f=_glVertexAttrib4f;_emscripten_glVertexAttrib4f.sig="viffff";function _glVertexAttrib4fv(e,t){t>>>=0,GLctx.vertexAttrib4f(e,HEAPF32[t>>>2],HEAPF32[t+4>>>2],HEAPF32[t+8>>>2],HEAPF32[t+12>>>2])}_glVertexAttrib4fv.sig="vip";var _emscripten_glVertexAttrib4fv=_glVertexAttrib4fv;_emscripten_glVertexAttrib4fv.sig="vip";var _glVertexAttribDivisor=(e,t)=>{GLctx.vertexAttribDivisor(e,t)};_glVertexAttribDivisor.sig="vii";var _glVertexAttribDivisorANGLE=_glVertexAttribDivisor,_emscripten_glVertexAttribDivisorANGLE=_glVertexAttribDivisorANGLE;function _glVertexAttribPointer(e,t,r,n,a,l){l>>>=0,GLctx.vertexAttribPointer(e,t,r,!!n,a,l)}_glVertexAttribPointer.sig="viiiiip";var _emscripten_glVertexAttribPointer=_glVertexAttribPointer;_emscripten_glVertexAttribPointer.sig="viiiiip";var _glViewport=(e,t,r,n)=>GLctx.viewport(e,t,r,n);_glViewport.sig="viiii";var _emscripten_glViewport=_glViewport;_emscripten_glViewport.sig="viiii";function _emscripten_out(e){return e>>>=0,out(UTF8ToString(e))}_emscripten_out.sig="vp";class HandleAllocator{constructor(){this.allocated=[void 0],this.freelist=[]}get(t){return this.allocated[t]}has(t){return this.allocated[t]!==void 0}allocate(t){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=t,r}free(t){this.allocated[t]=void 0,this.freelist.push(t)}}var promiseMap=new HandleAllocator,makePromise=()=>{var e={};return e.promise=new Promise((t,r)=>{e.reject=r,e.resolve=t}),e.id=promiseMap.allocate(e),e};function _emscripten_promise_create(){return makePromise().id}_emscripten_promise_create.sig="p";function _emscripten_promise_destroy(e){e>>>=0,promiseMap.free(e)}_emscripten_promise_destroy.sig="vp";var getPromise=e=>promiseMap.get(e).promise;function _emscripten_promise_resolve(e,t,r){e>>>=0,r>>>=0;var n=promiseMap.get(e);switch(t){case 0:n.resolve(r);return;case 1:n.resolve(getPromise(r));return;case 2:n.resolve(getPromise(r)),_emscripten_promise_destroy(r);return;case 3:n.reject(r);return}}_emscripten_promise_resolve.sig="vpip";var growMemory=e=>{var t=wasmMemory.buffer,r=(e-t.byteLength+65535)/65536;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}};function _emscripten_resize_heap(e){e>>>=0;var t=HEAPU8.length,r=getHeapMax();if(e>r)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);a=Math.min(a,e+100663296);var l=Math.min(r,alignMemory(Math.max(e,a),65536)),c=growMemory(l);if(c)return!0}return!1}_emscripten_resize_heap.sig="ip";function _emscripten_wget_data(e,t,r,n){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_wget_data"}_emscripten_wget_data.sig="vpppp";var getEnvStrings=()=>{if(!getEnvStrings.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:getExecutableName()};for(var r in ENV)ENV[r]===void 0?delete t[r]:t[r]=ENV[r];var n=[];for(var r in t)n.push("".concat(r,"=").concat(t[r]));getEnvStrings.strings=n}return getEnvStrings.strings},stringToAscii=(e,t)=>{for(var r=0;r>>0]=e.charCodeAt(r);HEAP8[t>>>0]=0},_environ_get=function(e,t){e>>>=0,t>>>=0;var r=0;return getEnvStrings().forEach((n,a)=>{var l=t+r;HEAPU32[e+a*4>>>2>>>0]=l,stringToAscii(n,l),r+=n.length+1}),0};_environ_get.sig="ipp";var _environ_sizes_get=function(e,t){e>>>=0,t>>>=0;var r=getEnvStrings();HEAPU32[e>>>2>>>0]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),HEAPU32[t>>>2>>>0]=n,0};_environ_sizes_get.sig="ipp";function _fd_close(e){try{var t=SYSCALLS.getStreamFromFD(e);return FS.close(t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return r.errno}}_fd_close.sig="ii";function _fd_fdstat_get(e,t){t>>>=0;try{var r=0,n=0,a=0,l=SYSCALLS.getStreamFromFD(e),c=l.tty?2:FS.isDir(l.mode)?3:FS.isLink(l.mode)?7:4;return HEAP8[t>>>0]=c,HEAP16[t+2>>>1>>>0]=a,tempI64=[r>>>0,(tempDouble=r,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+8>>>2>>>0]=tempI64[0],HEAP32[t+12>>>2>>>0]=tempI64[1],tempI64=[n>>>0,(tempDouble=n,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+16>>>2>>>0]=tempI64[0],HEAP32[t+20>>>2>>>0]=tempI64[1],0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return u.errno}}_fd_fdstat_get.sig="iip";var doReadv=(e,t,r,n)=>{for(var a=0,l=0;l>>2>>>0],u=HEAPU32[t+4>>>2>>>0];t+=8;var _=FS.read(e,HEAP8,c,u,n);if(_<0)return-1;if(a+=_,_>>=0,r>>>=0;var c=convertI32PairToI53Checked(n,a);l>>>=0;try{if(isNaN(c))return 61;var u=SYSCALLS.getStreamFromFD(e),_=doReadv(u,t,r,c);return HEAPU32[l>>>2>>>0]=_,0}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return d.errno}}_fd_pread.sig="iippiip";var doWritev=(e,t,r,n)=>{for(var a=0,l=0;l>>2>>>0],u=HEAPU32[t+4>>>2>>>0];t+=8;var _=FS.write(e,HEAP8,c,u,n);if(_<0)return-1;if(a+=_,_>>=0,r>>>=0;var c=convertI32PairToI53Checked(n,a);l>>>=0;try{if(isNaN(c))return 61;var u=SYSCALLS.getStreamFromFD(e),_=doWritev(u,t,r,c);return HEAPU32[l>>>2>>>0]=_,0}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return d.errno}}_fd_pwrite.sig="iippiip";function _fd_read(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;try{var a=SYSCALLS.getStreamFromFD(e),l=doReadv(a,t,r);return HEAPU32[n>>>2>>>0]=l,0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return c.errno}}_fd_read.sig="iippp";function _fd_seek(e,t,r,n,a){var l=convertI32PairToI53Checked(t,r);a>>>=0;try{if(isNaN(l))return 61;var c=SYSCALLS.getStreamFromFD(e);return FS.llseek(c,l,n),tempI64=[c.position>>>0,(tempDouble=c.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[a>>>2>>>0]=tempI64[0],HEAP32[a+4>>>2>>>0]=tempI64[1],c.getdents&&l===0&&n===0&&(c.getdents=null),0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return u.errno}}_fd_seek.sig="iiiiip";function _fd_sync(e){var t;try{var r=SYSCALLS.getStreamFromFD(e);return(t=r.stream_ops)!=null&&t.fsync?r.stream_ops.fsync(r):0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return n.errno}}_fd_sync.sig="ii";function _fd_write(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;try{var a=SYSCALLS.getStreamFromFD(e),l=doWritev(a,t,r);return HEAPU32[n>>>2>>>0]=l,0}catch(c){if(typeof FS>"u"||c.name!=="ErrnoError")throw c;return c.errno}}_fd_write.sig="iippp";function _getaddrinfo(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=0,l=0,c=0,u=0,_=0,d=0,p;function f(m,g,h,y,b,S){var P,T,A,M;return T=m===10?28:16,b=m===10?inetNtop6(b):inetNtop4(b),P=_malloc(T),M=writeSockaddr(P,m,b,S),assert(!M),A=_malloc(32),HEAP32[A+4>>>2>>>0]=m,HEAP32[A+8>>>2>>>0]=g,HEAP32[A+12>>>2>>>0]=h,HEAPU32[A+24>>>2>>>0]=y,HEAPU32[A+20>>>2>>>0]=P,m===10?HEAP32[A+16>>>2>>>0]=28:HEAP32[A+16>>>2>>>0]=16,HEAP32[A+28>>>2>>>0]=0,A}if(r&&(c=HEAP32[r>>>2>>>0],u=HEAP32[r+4>>>2>>>0],_=HEAP32[r+8>>>2>>>0],d=HEAP32[r+12>>>2>>>0]),_&&!d&&(d=_===2?17:6),!_&&d&&(_=d===17?2:1),d===0&&(d=6),_===0&&(_=1),!e&&!t)return-2;if(c&-1088||r!==0&&HEAP32[r>>>2>>>0]&2&&!e)return-1;if(c&32)return-2;if(_!==0&&_!==1&&_!==2)return-7;if(u!==0&&u!==2&&u!==10)return-6;if(t&&(t=UTF8ToString(t),l=parseInt(t,10),isNaN(l)))return c&1024?-2:-8;if(!e)return u===0&&(u=2),c&1||(u===2?a=_htonl(2130706433):a=[0,0,0,1]),p=f(u,_,d,null,a,l),HEAPU32[n>>>2>>>0]=p,0;if(e=UTF8ToString(e),a=inetPton4(e),a!==null)if(u===0||u===2)u=2;else if(u===10&&c&8)a=[0,0,_htonl(65535),a],u=10;else return-2;else if(a=inetPton6(e),a!==null)if(u===0||u===10)u=10;else return-2;return a!=null?(p=f(u,_,d,e,a,l),HEAPU32[n>>>2>>>0]=p,0):c&4?-2:(e=DNS.lookup_name(e),a=inetPton4(e),u===0?u=2:u===10&&(a=[0,0,_htonl(65535),a]),p=f(u,_,d,null,a,l),HEAPU32[n>>>2>>>0]=p,0)}_getaddrinfo.sig="ipppp";function _getentropy(e,t){return e>>>=0,t>>>=0,randomFill(HEAPU8.subarray(e>>>0,e+t>>>0)),0}_getentropy.sig="ipp";function _getnameinfo(e,t,r,n,a,l,c){e>>>=0,r>>>=0,a>>>=0;var u=readSockaddr(e,t);if(u.errno)return-6;var _=u.port,d=u.addr,p=!1;if(r&&n){var f;if(c&1||!(f=DNS.lookup_addr(d))){if(c&8)return-2}else d=f;var m=stringToUTF8(d,r,n);m+1>=n&&(p=!0)}if(a&&l){_=""+_;var m=stringToUTF8(_,a,l);m+1>=l&&(p=!0)}return p?-12:0}_getnameinfo.sig="ipipipii";function _pthread_kill(...e){return wasmImports.pthread_kill(...e)}_pthread_kill.stub=!0;var arraySum=(e,t)=>{for(var r=0,n=0;n<=t;r+=e[n++]);return r},MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31],addDays=(e,t)=>{for(var r=new Date(e.getTime());t>0;){var n=isLeapYear(r.getFullYear()),a=r.getMonth(),l=(n?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[a];if(t>l-r.getDate())t-=l-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+t),r}return r};function _strptime(e,t,r){e>>>=0,t>>>=0,r>>>=0;for(var n=UTF8ToString(t),a="\\!@#$^&*()+=-[]/{}|:<>?,.",l=0,c=a.length;lu[X]||I).replace(/%(.)/g,(I,X)=>{let oe=_[X];return oe?(m.push(X),"(".concat(oe,")")):X}).replace(/\s+/g,"\\s*"),h=new RegExp("^"+g,"i").exec(UTF8ToString(e));function y(){function I(X,oe,Ee){return typeof X!="number"||isNaN(X)?oe:X>=oe?X<=Ee?X:Ee:oe}return{year:I(HEAP32[r+20>>>2>>>0]+1900,1970,9999),month:I(HEAP32[r+16>>>2>>>0],0,11),day:I(HEAP32[r+12>>>2>>>0],1,31),hour:I(HEAP32[r+8>>>2>>>0],0,23),min:I(HEAP32[r+4>>>2>>>0],0,59),sec:I(HEAP32[r>>>2>>>0],0,59),gmtoff:0}}if(h){var b=y(),S,P=I=>{var X=m.indexOf(I);if(X>=0)return h[X+1]};if((S=P("S"))&&(b.sec=jstoi_q(S)),(S=P("M"))&&(b.min=jstoi_q(S)),S=P("H"))b.hour=jstoi_q(S);else if(S=P("I")){var T=jstoi_q(S);(S=P("p"))&&(T+=S.toUpperCase()[0]==="P"?12:0),b.hour=T}if(S=P("Y"))b.year=jstoi_q(S);else if(S=P("y")){var A=jstoi_q(S);(S=P("C"))?A+=jstoi_q(S)*100:A+=A<69?2e3:1900,b.year=A}if((S=P("m"))?b.month=jstoi_q(S)-1:(S=P("b"))&&(b.month=d[S.substring(0,3).toUpperCase()]||0),S=P("d"))b.day=jstoi_q(S);else if(S=P("j"))for(var M=jstoi_q(S),Q=isLeapYear(b.year),F=0;F<12;++F){var E=arraySum(Q?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,F-1);M<=E+(Q?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[F]&&(b.day=M-E)}else if(S=P("a")){var w=S.substring(0,3).toUpperCase();if(S=P("U")){var C=p[w],L=jstoi_q(S),k=new Date(b.year,0,1),x;k.getDay()===0?x=addDays(k,C+7*(L-1)):x=addDays(k,7-k.getDay()+C+7*(L-1)),b.day=x.getDate(),b.month=x.getMonth()}else if(S=P("W")){var C=f[w],L=jstoi_q(S),k=new Date(b.year,0,1),x;k.getDay()===1?x=addDays(k,C+7*(L-1)):x=addDays(k,7-k.getDay()+1+C+7*(L-1)),b.day=x.getDate(),b.month=x.getMonth()}}if(S=P("z"))if(S.toLowerCase()==="z")b.gmtoff=0;else{var O=S.match(/^((?:\-|\+)\d\d):?(\d\d)?/);b.gmtoff=O[1]*3600,O[2]&&(b.gmtoff+=b.gmtoff>0?O[2]*60:-O[2]*60)}var D=new Date(b.year,b.month,b.day,b.hour,b.min,b.sec,0);return HEAP32[r>>>2>>>0]=D.getSeconds(),HEAP32[r+4>>>2>>>0]=D.getMinutes(),HEAP32[r+8>>>2>>>0]=D.getHours(),HEAP32[r+12>>>2>>>0]=D.getDate(),HEAP32[r+16>>>2>>>0]=D.getMonth(),HEAP32[r+20>>>2>>>0]=D.getFullYear()-1900,HEAP32[r+24>>>2>>>0]=D.getDay(),HEAP32[r+28>>>2>>>0]=arraySum(isLeapYear(D.getFullYear())?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,D.getMonth()-1)+D.getDate()-1,HEAP32[r+32>>>2>>>0]=0,HEAP32[r+36>>>2>>>0]=b.gmtoff,e+intArrayFromString(h[0]).length-1}return 0}_strptime.sig="pppp";var getCFunc=e=>{var t=Module["_"+e];return t},writeArrayToMemory=(e,t)=>{HEAP8.set(e,t>>>0)},ccall=(e,t,r,n,a)=>{var l={string:h=>{var y=0;return h!=null&&h!==0&&(y=stringToUTF8OnStack(h)),y},array:h=>{var y=stackAlloc(h.length);return writeArrayToMemory(h,y),y}};function c(h){return t==="string"?UTF8ToString(h):t==="boolean"?!!h:h}var u=getCFunc(e),_=[],d=0;if(n)for(var p=0;p(e>>>0)+t*4294967296,convertU32PairToI53=(e,t)=>(e>>>0)+(t>>>0)*4294967296,getTempRet0=e=>__emscripten_tempret_get(),_stackAlloc=stackAlloc,_stackSave=stackSave,_stackRestore=stackSave,_getTempRet0=getTempRet0;Module._getTempRet0=_getTempRet0;function _emscripten_notify_memory_growth(e){updateMemoryViews()}_emscripten_notify_memory_growth.sig="vp";var Protocols={list:[],map:{}},_setprotoent=e=>{function t(l,c,u){var _=_malloc(l.length+1);stringToAscii(l,_);for(var d=0,p=u.length,f=_malloc((p+1)*4),m=0;m>>2>>>0]=h}HEAPU32[f+d>>>2>>>0]=0;var y=_malloc(12);return HEAPU32[y>>>2>>>0]=_,HEAPU32[y+4>>>2>>>0]=f,HEAP32[y+8>>>2>>>0]=c,y}var r=Protocols.list,n=Protocols.map;if(r.length===0){var a=t("tcp",6,["TCP"]);r.push(a),n.tcp=n[6]=a,a=t("udp",17,["UDP"]),r.push(a),n.udp=n[17]=a}_setprotoent.index=0};_setprotoent.sig="vi";var _endprotoent=()=>{};_endprotoent.sig="v";function _getprotoent(e){if(_setprotoent.index===Protocols.list.length)return 0;var t=Protocols.list[_setprotoent.index++];return t}_getprotoent.sig="p";function _getprotobyname(e){e>>>=0,e=UTF8ToString(e),_setprotoent();var t=Protocols.map[e];return t}_getprotobyname.sig="pp";function _getprotobynumber(e){_setprotoent();var t=Protocols.map[e];return t}_getprotobynumber.sig="pi";function _emscripten_run_script(ptr){ptr>>>=0,eval(UTF8ToString(ptr))}_emscripten_run_script.sig="vp";function _emscripten_run_script_int(ptr){return ptr>>>=0,eval(UTF8ToString(ptr))|0}_emscripten_run_script_int.sig="ip";function _emscripten_run_script_string(ptr){ptr>>>=0;var s=eval(UTF8ToString(ptr));if(s==null)return 0;s+="";var me=_emscripten_run_script_string,len=lengthBytesUTF8(s);return(!me.bufferSize||me.bufferSizeMath.random();_emscripten_random.sig="f";var warnOnce=e=>{warnOnce.shown||(warnOnce.shown={}),warnOnce.shown[e]||(warnOnce.shown[e]=1,ENVIRONMENT_IS_NODE&&(e="warning: "+e),err(e))};function jsStackTrace(){return new Error().stack.toString()}function getCallstack(e){var t=jsStackTrace(),r=t.lastIndexOf("_emscripten_log"),n=t.lastIndexOf("_emscripten_get_callstack"),a=t.indexOf(` +`,Math.max(r,n))+1;t=t.slice(a),e&8&&typeof emscripten_source_map>"u"&&(warnOnce('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e^=8,e|=16);var l=t.split(` +`);t="";var c=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),u=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),_=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var d in l){var p=l[d],f="",m="",g=0,h=0,y=_.exec(p);if(y&&y.length==5)f=y[1],m=y[2],g=y[3],h=y[4];else if(y=c.exec(p)||u.exec(p),y&&y.length>=4)f=y[1],m=y[2],g=y[3],h=y[4]|0;else{t+=p+` +`;continue}var b=!1;if(e&8){var S=emscripten_source_map.originalPositionFor({line:g,column:h});b=S==null?void 0:S.source,b&&(e&64&&(S.source=S.source.substring(S.source.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=" at ".concat(f," (").concat(S.source,":").concat(S.line,":").concat(S.column,`) +`))}(e&16||!b)&&(e&64&&(m=m.substring(m.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=(b?" = ".concat(f):" at ".concat(f))+" (".concat(m,":").concat(g,":").concat(h,`) +`))}return t=t.replace(/\s+$/,""),t}var emscriptenLog=(e,t)=>{e&24&&(t=t.replace(/\s+$/,""),t+=(t.length>0?` +`:"")+getCallstack(e)),e&1?e&4?console.error(t):e&2?console.warn(t):e&512?console.info(t):e&256?console.debug(t):console.log(t):e&6?err(t):out(t)},reallyNegative=e=>e<0||e===0&&1/e===-1/0,reSign=(e,t)=>{if(e<=0)return e;var r=t<=32?Math.abs(1<=r&&(t<=32||e>r)&&(e=-2*r+e),e},unSign=(e,t)=>e>=0?e:t<=32?2*Math.abs(1<{for(var t=e;HEAPU8[t>>>0];)++t;return t-e},formatString=(e,t)=>{var r=e,n=t;function a(_e,Z){return(Z==="double"||Z==="i64")&&_e&7&&(_e+=4),_e}function l(_e){var Z;return n=a(n,_e),_e==="double"?(Z=HEAPF64[n>>>3>>>0],n+=8):_e=="i64"?(Z=[HEAP32[n>>>2>>>0],HEAP32[n+4>>>2>>>0]],n+=8):(_e="i32",Z=HEAP32[n>>>2>>>0],n+=4),Z}for(var c=[],u,_,d;;){var p=r;if(u=HEAP8[r>>>0],u===0)break;if(_=HEAP8[r+1>>>0],u==37){var f=!1,m=!1,g=!1,h=!1,y=!1;e:for(;;){switch(_){case 43:f=!0;break;case 45:m=!0;break;case 35:g=!0;break;case 48:if(h)break e;h=!0;break;case 32:y=!0;break;default:break e}r++,_=HEAP8[r+1>>>0]}var b=0;if(_==42)b=l("i32"),r++,_=HEAP8[r+1>>>0];else for(;_>=48&&_<=57;)b=b*10+(_-48),r++,_=HEAP8[r+1>>>0];var S=!1,P=-1;if(_==46){if(P=0,S=!0,r++,_=HEAP8[r+1>>>0],_==42)P=l("i32"),r++;else for(;;){var T=HEAP8[r+1>>>0];if(T<48||T>57)break;P=P*10+(T-48),r++}_=HEAP8[r+1>>>0]}P<0&&(P=6,S=!1);var A;switch(String.fromCharCode(_)){case"h":var M=HEAP8[r+2>>>0];M==104?(r++,A=1):A=2;break;case"l":var M=HEAP8[r+2>>>0];M==108?(r++,A=8):A=4;break;case"L":case"q":case"j":A=8;break;case"z":case"t":case"I":A=4;break;default:A=null}switch(A&&r++,_=HEAP8[r+1>>>0],String.fromCharCode(_)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var Q=_==100||_==105;A=A||4,d=l("i"+A*8);var F;if(A==8&&(d=_==117?convertU32PairToI53(d[0],d[1]):convertI32PairToI53(d[0],d[1])),A<=4){var E=Math.pow(256,A)-1;d=(Q?reSign:unSign)(d&E,A*8)}var w=Math.abs(d),C="";if(_==100||_==105)F=reSign(d,8*A).toString(10);else if(_==117)F=unSign(d,8*A).toString(10),d=Math.abs(d);else if(_==111)F=(g?"0":"")+w.toString(8);else if(_==120||_==88){if(C=g&&d!=0?"0x":"",d<0){d=-d,F=(w-1).toString(16);for(var L=[],k=0;k=0&&(f?C="+"+C:y&&(C=" "+C)),F.charAt(0)=="-"&&(C="-"+C,F=F.substr(1));C.length+F.lengthc.push(_e.charCodeAt(0)));break}case"f":case"F":case"e":case"E":case"g":case"G":{d=l("double");var F;if(isNaN(d))F="nan",h=!1;else if(!isFinite(d))F=(d<0?"-":"")+"inf",h=!1;else{var x=!1,O=Math.min(P,20);if(_==103||_==71){x=!0,P=P||1;var D=parseInt(d.toExponential(O).split("e")[1],10);P>D&&D>=-4?(_=(_==103?"f":"F").charCodeAt(0),P-=D+1):(_=(_==103?"e":"E").charCodeAt(0),P--),O=Math.min(P,20)}_==101||_==69?(F=d.toExponential(O),/[eE][-+]\d$/.test(F)&&(F=F.slice(0,-1)+"0"+F.slice(-1))):(_==102||_==70)&&(F=d.toFixed(O),d===0&&reallyNegative(d)&&(F="-"+F));var I=F.split("e");if(x&&!g)for(;I[0].length>1&&I[0].includes(".")&&(I[0].slice(-1)=="0"||I[0].slice(-1)==".");)I[0]=I[0].slice(0,-1);else for(g&&F.indexOf(".")==-1&&(I[0]+=".");P>O++;)I[0]+="0";F=I[0]+(I.length>1?"e"+I[1]:""),_==69&&(F=F.toUpperCase()),d>=0&&(f?F="+"+F:y&&(F=" "+F))}for(;F.lengthc.push(Z.charCodeAt(0)));break}case"s":{var X=l("i8*"),oe=X?strLen(X):6;if(S&&(oe=Math.min(oe,P)),!m)for(;oe>>0]);else c=c.concat(intArrayFromString("(null)".substr(0,oe),!0));if(m)for(;oe0;)c.push(32);m||c.push(l("i8"));break}case"n":{var Ee=l("i32*");HEAP32[Ee>>>2>>>0]=c.length;break}case"%":{c.push(u);break}default:for(var k=p;k>>0])}r+=2}else c.push(u),r+=1}return c};function _emscripten_log(e,t,r){t>>>=0,r>>>=0;var n=formatString(t,r),a=UTF8ArrayToString(n,0);emscriptenLog(e,a)}_emscripten_log.sig="vipp";function _emscripten_get_compiler_setting(e){throw"You must build with -sRETAIN_COMPILER_SETTINGS for getCompilerSetting or emscripten_get_compiler_setting to work"}_emscripten_get_compiler_setting.sig="pp";var _emscripten_has_asyncify=()=>0;_emscripten_has_asyncify.sig="i";function _emscripten_debugger(){debugger}_emscripten_debugger.sig="v";function _emscripten_print_double(e,t,r){t>>>=0;var n=e+"";return t?stringToUTF8(n,t,r):lengthBytesUTF8(n)}_emscripten_print_double.sig="idpi";function _emscripten_asm_const_double(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runEmAsmFunction(e,t,r)}_emscripten_asm_const_double.sig="dppp";var runMainThreadEmAsm=(e,t,r,n)=>{var a=readEmAsmArgs(t,r);return ASM_CONSTS[e](...a)};function _emscripten_asm_const_int_sync_on_main_thread(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runMainThreadEmAsm(e,t,r)}_emscripten_asm_const_int_sync_on_main_thread.sig="ippp";function _emscripten_asm_const_ptr_sync_on_main_thread(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runMainThreadEmAsm(e,t,r)}_emscripten_asm_const_ptr_sync_on_main_thread.sig="pppp";var _emscripten_asm_const_double_sync_on_main_thread=_emscripten_asm_const_int_sync_on_main_thread;_emscripten_asm_const_double_sync_on_main_thread.sig="dppp";function _emscripten_asm_const_async_on_main_thread(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runMainThreadEmAsm(e,t,r)}_emscripten_asm_const_async_on_main_thread.sig="vppp";function __Unwind_Backtrace(e,t){e>>>=0,t>>>=0;for(var r=getCallstack(),n=r.split(` +`),a=0;a>>=0,err("Warning: _Unwind_RaiseException is not correctly implemented"),___cxa_throw(e,0,0)}Module.__Unwind_RaiseException=__Unwind_RaiseException,__Unwind_RaiseException.sig="ip";function __Unwind_DeleteException(e){err("TODO: Unwind_DeleteException")}Module.__Unwind_DeleteException=__Unwind_DeleteException,__Unwind_DeleteException.sig="vp";var createDyncallWrapper=e=>{var t=[],r=[0,97,115,109,1,0,0,0];t.push(r);var n=[e[0].replace("j","i"),"i",e.slice(1).replace(/j/g,"ii")].join(""),a=[3];generateFuncType(n,a),generateFuncType(e,a),generateFuncType("vi",a);var l=[1];uleb128Encode(a.length,l),l.push(...a),t.push(l);var c=[2,15,2,1,101,1,116,1,112,0,0,1,101,1,114,0,2];t.push(c);var u=[3,2,1,0];t.push(u);var _=[7,5,1,1,102,0,1];t.push(_);var d=[];e[0]==="j"?d=[1,1,126]:d.push(0);function p(T){d.push(32),uleb128Encode(T,d)}for(var f=1,m=1;m{e=e.replace(/p/g,"i"),"dynCall_"+e in Module||(Module["dynCall_"+e]=createDyncallWrapper(e));var n=Module["dynCall_"+e];return n(t,...r)},dynCall=(e,t,r=[])=>{if(e.includes("j"))return dynCallLegacy(e,t,r);var n=getWasmTableEntry(t)(...r);return e[0]=="p"?n>>>0:n},getDynCaller=(e,t)=>(...r)=>dynCall(e,t,r),_emscripten_exit_with_live_runtime=()=>{throw"unwind"};_emscripten_exit_with_live_runtime.sig="v";var _emscripten_force_exit=e=>{__emscripten_runtime_keepalive_clear(),_exit(e)};_emscripten_force_exit.sig="vi";function _emscripten_outn(e,t){return e>>>=0,t>>>=0,out(UTF8ToString(e,t))}_emscripten_outn.sig="vpp";function _emscripten_errn(e,t){return e>>>=0,t>>>=0,err(UTF8ToString(e,t))}_emscripten_errn.sig="vpp";var _emscripten_throw_number=e=>{throw e};_emscripten_throw_number.sig="vd";function _emscripten_throw_string(e){throw e>>>=0,UTF8ToString(e)}_emscripten_throw_string.sig="vp";var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};runtimeKeepalivePush.sig="v";var runtimeKeepalivePop=()=>{runtimeKeepaliveCounter-=1};runtimeKeepalivePop.sig="v";var _emscripten_runtime_keepalive_push=runtimeKeepalivePush;_emscripten_runtime_keepalive_push.sig="v";var _emscripten_runtime_keepalive_pop=runtimeKeepalivePop;_emscripten_runtime_keepalive_pop.sig="v";var _emscripten_runtime_keepalive_check=keepRuntimeAlive;_emscripten_runtime_keepalive_check.sig="i";var ___global_base=1024;function __emscripten_fs_load_embedded_files(e){e>>>=0;do{var t=HEAPU32[e>>>2>>>0];e+=4;var r=HEAPU32[e>>>2>>>0];e+=4;var n=HEAPU32[e>>>2>>>0];e+=4;var a=UTF8ToString(t);FS.createPath("/",PATH.dirname(a),!0,!0),FS.createDataFile(a,null,HEAP8.subarray(n>>>0,n+r>>>0),!0,!0,!0)}while(HEAPU32[e>>>2>>>0])}__emscripten_fs_load_embedded_files.sig="vp";var POINTER_SIZE=4,_emscripten_math_cbrt=Math.cbrt;_emscripten_math_cbrt.sig="dd";var _emscripten_math_pow=Math.pow;_emscripten_math_pow.sig="ddd";var _emscripten_math_random=Math.random;_emscripten_math_random.sig="d";var _emscripten_math_sign=Math.sign;_emscripten_math_sign.sig="dd";var _emscripten_math_sqrt=Math.sqrt;_emscripten_math_sqrt.sig="dd";var _emscripten_math_exp=Math.exp;_emscripten_math_exp.sig="dd";var _emscripten_math_expm1=Math.expm1;_emscripten_math_expm1.sig="dd";var _emscripten_math_fmod=(e,t)=>e%t;_emscripten_math_fmod.sig="ddd";var _emscripten_math_log=Math.log;_emscripten_math_log.sig="dd";var _emscripten_math_log1p=Math.log1p;_emscripten_math_log1p.sig="dd";var _emscripten_math_log10=Math.log10;_emscripten_math_log10.sig="dd";var _emscripten_math_log2=Math.log2;_emscripten_math_log2.sig="dd";var _emscripten_math_round=Math.round;_emscripten_math_round.sig="dd";var _emscripten_math_acos=Math.acos;_emscripten_math_acos.sig="dd";var _emscripten_math_acosh=Math.acosh;_emscripten_math_acosh.sig="dd";var _emscripten_math_asin=Math.asin;_emscripten_math_asin.sig="dd";var _emscripten_math_asinh=Math.asinh;_emscripten_math_asinh.sig="dd";var _emscripten_math_atan=Math.atan;_emscripten_math_atan.sig="dd";var _emscripten_math_atanh=Math.atanh;_emscripten_math_atanh.sig="dd";var _emscripten_math_atan2=Math.atan2;_emscripten_math_atan2.sig="ddd";var _emscripten_math_cos=Math.cos;_emscripten_math_cos.sig="dd";var _emscripten_math_cosh=Math.cosh;_emscripten_math_cosh.sig="dd";function _emscripten_math_hypot(e,t){t>>>=0;for(var r=[],n=0;n>>3>>>0]);return Math.hypot(...r)}_emscripten_math_hypot.sig="dip";var _emscripten_math_sin=Math.sin;_emscripten_math_sin.sig="dd";var _emscripten_math_sinh=Math.sinh;_emscripten_math_sinh.sig="dd";var _emscripten_math_tan=Math.tan;_emscripten_math_tan.sig="dd";var _emscripten_math_tanh=Math.tanh;_emscripten_math_tanh.sig="dd";var JSEvents={removeAllEventListeners(){for(;JSEvents.eventHandlers.length;)JSEvents._removeHandler(JSEvents.eventHandlers.length-1);JSEvents.deferredCalls=[]},inEventHandler:0,deferredCalls:[],deferCall(e,t,r){function n(l,c){if(l.length!=c.length)return!1;for(var u in l)if(l[u]!=c[u])return!1;return!0}for(var a of JSEvents.deferredCalls)if(a.targetFunction==e&&n(a.argsList,r))return;JSEvents.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),JSEvents.deferredCalls.sort((l,c)=>l.precedencet.targetFunction!=e)},canPerformEventHandlerRequests(){return navigator.userActivation?navigator.userActivation.isActive:JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls(){if(JSEvents.canPerformEventHandlerRequests()){var e=JSEvents.deferredCalls;JSEvents.deferredCalls=[];for(var t of e)t.targetFunction(...t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:(e,t)=>{for(var r=0;re>2?UTF8ToString(e):e,specialHTMLTargets=[0,typeof document<"u"?document:0,typeof window<"u"?window:0],findEventTarget=e=>{e=maybeCStringToJsString(e);var t=specialHTMLTargets[e]||(typeof document<"u"?document.querySelector(e):void 0);return t},registerKeyEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.keyEvent||(JSEvents.keyEvent=_malloc(160));var u=d=>{var p=JSEvents.keyEvent;HEAPF64[p>>>3>>>0]=d.timeStamp;var f=p>>>2;HEAP32[f+2>>>0]=d.location,HEAP8[p+12>>>0]=d.ctrlKey,HEAP8[p+13>>>0]=d.shiftKey,HEAP8[p+14>>>0]=d.altKey,HEAP8[p+15>>>0]=d.metaKey,HEAP8[p+16>>>0]=d.repeat,HEAP32[f+5>>>0]=d.charCode,HEAP32[f+6>>>0]=d.keyCode,HEAP32[f+7>>>0]=d.which,stringToUTF8(d.key||"",p+32,32),stringToUTF8(d.code||"",p+64,32),stringToUTF8(d.char||"",p+96,32),stringToUTF8(d.locale||"",p+128,32),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)},findCanvasEventTarget=findEventTarget;function _emscripten_set_keypress_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerKeyEventCallback(e,t,r,n,1,"keypress")}_emscripten_set_keypress_callback_on_thread.sig="ippipp";function _emscripten_set_keydown_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerKeyEventCallback(e,t,r,n,2,"keydown")}_emscripten_set_keydown_callback_on_thread.sig="ippipp";function _emscripten_set_keyup_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerKeyEventCallback(e,t,r,n,3,"keyup")}_emscripten_set_keyup_callback_on_thread.sig="ippipp";var getBoundingClientRect=e=>specialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{left:0,top:0},fillMouseEventData=(e,t,r)=>{HEAPF64[e>>>3>>>0]=t.timeStamp;var n=e>>>2;HEAP32[n+2>>>0]=t.screenX,HEAP32[n+3>>>0]=t.screenY,HEAP32[n+4>>>0]=t.clientX,HEAP32[n+5>>>0]=t.clientY,HEAP8[e+24>>>0]=t.ctrlKey,HEAP8[e+25>>>0]=t.shiftKey,HEAP8[e+26>>>0]=t.altKey,HEAP8[e+27>>>0]=t.metaKey,HEAP16[n*2+14>>>0]=t.button,HEAP16[n*2+15>>>0]=t.buttons,HEAP32[n+8>>>0]=t.movementX,HEAP32[n+9>>>0]=t.movementY;var a=getBoundingClientRect(r);HEAP32[n+10>>>0]=t.clientX-(a.left|0),HEAP32[n+11>>>0]=t.clientY-(a.top|0)},registerMouseEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.mouseEvent||(JSEvents.mouseEvent=_malloc(64)),e=findEventTarget(e);var u=(d=event)=>{fillMouseEventData(JSEvents.mouseEvent,d,e),getWasmTableEntry(n)(a,JSEvents.mouseEvent,t)&&d.preventDefault()},_={target:e,allowsDeferredCalls:l!="mousemove"&&l!="mouseenter"&&l!="mouseleave",eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_click_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,4,"click")}_emscripten_set_click_callback_on_thread.sig="ippipp";function _emscripten_set_mousedown_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,5,"mousedown")}_emscripten_set_mousedown_callback_on_thread.sig="ippipp";function _emscripten_set_mouseup_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,6,"mouseup")}_emscripten_set_mouseup_callback_on_thread.sig="ippipp";function _emscripten_set_dblclick_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,7,"dblclick")}_emscripten_set_dblclick_callback_on_thread.sig="ippipp";function _emscripten_set_mousemove_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,8,"mousemove")}_emscripten_set_mousemove_callback_on_thread.sig="ippipp";function _emscripten_set_mouseenter_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,33,"mouseenter")}_emscripten_set_mouseenter_callback_on_thread.sig="ippipp";function _emscripten_set_mouseleave_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,34,"mouseleave")}_emscripten_set_mouseleave_callback_on_thread.sig="ippipp";function _emscripten_set_mouseover_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,35,"mouseover")}_emscripten_set_mouseover_callback_on_thread.sig="ippipp";function _emscripten_set_mouseout_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,36,"mouseout")}_emscripten_set_mouseout_callback_on_thread.sig="ippipp";function _emscripten_get_mouse_status(e){return e>>>=0,JSEvents.mouseEvent?(HEAP8.set(HEAP8.subarray(JSEvents.mouseEvent>>>0,JSEvents.mouseEvent+64>>>0),e>>>0),0):-7}_emscripten_get_mouse_status.sig="ip";var registerWheelEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.wheelEvent||(JSEvents.wheelEvent=_malloc(96));var u=(d=event)=>{var p=JSEvents.wheelEvent;fillMouseEventData(p,d,e),HEAPF64[p+64>>>3>>>0]=d.deltaX,HEAPF64[p+72>>>3>>>0]=d.deltaY,HEAPF64[p+80>>>3>>>0]=d.deltaZ,HEAP32[p+88>>>2>>>0]=d.deltaMode,getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,allowsDeferredCalls:!0,eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_wheel_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,e=findEventTarget(e),e?typeof e.onwheel<"u"?registerWheelEventCallback(e,t,r,n,9,"wheel"):-1:-4}_emscripten_set_wheel_callback_on_thread.sig="ippipp";var registerUiEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.uiEvent||(JSEvents.uiEvent=_malloc(36)),e=findEventTarget(e);var u=(d=event)=>{if(d.target==e){var p=document.body;if(p){var f=JSEvents.uiEvent;HEAP32[f>>>2>>>0]=0,HEAP32[f+4>>>2>>>0]=p.clientWidth,HEAP32[f+8>>>2>>>0]=p.clientHeight,HEAP32[f+12>>>2>>>0]=innerWidth,HEAP32[f+16>>>2>>>0]=innerHeight,HEAP32[f+20>>>2>>>0]=outerWidth,HEAP32[f+24>>>2>>>0]=outerHeight,HEAP32[f+28>>>2>>>0]=pageXOffset|0,HEAP32[f+32>>>2>>>0]=pageYOffset|0,getWasmTableEntry(n)(a,f,t)&&d.preventDefault()}}},_={target:e,eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_resize_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerUiEventCallback(e,t,r,n,10,"resize")}_emscripten_set_resize_callback_on_thread.sig="ippipp";function _emscripten_set_scroll_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerUiEventCallback(e,t,r,n,11,"scroll")}_emscripten_set_scroll_callback_on_thread.sig="ippipp";var registerFocusEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.focusEvent||(JSEvents.focusEvent=_malloc(256));var u=(d=event)=>{var p=JSEvents.getNodeNameForTarget(d.target),f=d.target.id?d.target.id:"",m=JSEvents.focusEvent;stringToUTF8(p,m+0,128),stringToUTF8(f,m+128,128),getWasmTableEntry(n)(a,m,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_blur_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerFocusEventCallback(e,t,r,n,12,"blur")}_emscripten_set_blur_callback_on_thread.sig="ippipp";function _emscripten_set_focus_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerFocusEventCallback(e,t,r,n,13,"focus")}_emscripten_set_focus_callback_on_thread.sig="ippipp";function _emscripten_set_focusin_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerFocusEventCallback(e,t,r,n,14,"focusin")}_emscripten_set_focusin_callback_on_thread.sig="ippipp";function _emscripten_set_focusout_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerFocusEventCallback(e,t,r,n,15,"focusout")}_emscripten_set_focusout_callback_on_thread.sig="ippipp";var fillDeviceOrientationEventData=(e,t,r)=>{HEAPF64[e>>>3>>>0]=t.alpha,HEAPF64[e+8>>>3>>>0]=t.beta,HEAPF64[e+16>>>3>>>0]=t.gamma,HEAP8[e+24>>>0]=t.absolute},registerDeviceOrientationEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.deviceOrientationEvent||(JSEvents.deviceOrientationEvent=_malloc(32));var u=(d=event)=>{fillDeviceOrientationEventData(JSEvents.deviceOrientationEvent,d),getWasmTableEntry(n)(a,JSEvents.deviceOrientationEvent,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_deviceorientation_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,registerDeviceOrientationEventCallback(2,e,t,r,16,"deviceorientation")}_emscripten_set_deviceorientation_callback_on_thread.sig="ipipp";function _emscripten_get_deviceorientation_status(e){return e>>>=0,JSEvents.deviceOrientationEvent?(HEAP32.set(HEAP32.subarray(JSEvents.deviceOrientationEvent>>>0,32),e>>>0),0):-7}_emscripten_get_deviceorientation_status.sig="ip";var fillDeviceMotionEventData=(e,t,r)=>{var n=t.acceleration,a=t.accelerationIncludingGravity,l=t.rotationRate;n=n||{},a=a||{},l=l||{},HEAPF64[e>>>3>>>0]=n.x,HEAPF64[e+8>>>3>>>0]=n.y,HEAPF64[e+16>>>3>>>0]=n.z,HEAPF64[e+24>>>3>>>0]=a.x,HEAPF64[e+32>>>3>>>0]=a.y,HEAPF64[e+40>>>3>>>0]=a.z,HEAPF64[e+48>>>3>>>0]=l.alpha,HEAPF64[e+56>>>3>>>0]=l.beta,HEAPF64[e+64>>>3>>>0]=l.gamma},registerDeviceMotionEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.deviceMotionEvent||(JSEvents.deviceMotionEvent=_malloc(80));var u=(d=event)=>{fillDeviceMotionEventData(JSEvents.deviceMotionEvent,d),getWasmTableEntry(n)(a,JSEvents.deviceMotionEvent,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_devicemotion_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,registerDeviceMotionEventCallback(2,e,t,r,17,"devicemotion")}_emscripten_set_devicemotion_callback_on_thread.sig="ipipp";function _emscripten_get_devicemotion_status(e){return e>>>=0,JSEvents.deviceMotionEvent?(HEAP32.set(HEAP32.subarray(JSEvents.deviceMotionEvent>>>0,80),e>>>0),0):-7}_emscripten_get_devicemotion_status.sig="ip";var screenOrientation=()=>{if(window.screen)return screen.orientation||screen.mozOrientation||screen.webkitOrientation},fillOrientationChangeEventData=e=>{var t=["portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"],r=["portrait","portrait","landscape","landscape"],n=0,a=0,l=screenOrientation();typeof l=="object"?(n=t.indexOf(l.type),n<0&&(n=r.indexOf(l.type)),n>=0&&(n=1<>>2>>>0]=n,HEAP32[e+4>>>2>>>0]=a},registerOrientationChangeEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.orientationChangeEvent||(JSEvents.orientationChangeEvent=_malloc(8));var u=(d=event)=>{var p=JSEvents.orientationChangeEvent;fillOrientationChangeEventData(p),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_orientationchange_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,!window.screen||!screen.orientation?-1:registerOrientationChangeEventCallback(screen.orientation,e,t,r,18,"change")}_emscripten_set_orientationchange_callback_on_thread.sig="ipipp";function _emscripten_get_orientation_status(e){return e>>>=0,!screenOrientation()&&typeof orientation>"u"?-1:(fillOrientationChangeEventData(e),0)}_emscripten_get_orientation_status.sig="ip";var _emscripten_lock_orientation=e=>{var t=[];e&1&&t.push("portrait-primary"),e&2&&t.push("portrait-secondary"),e&4&&t.push("landscape-primary"),e&8&&t.push("landscape-secondary");var r;if(screen.lockOrientation)r=screen.lockOrientation(t);else if(screen.mozLockOrientation)r=screen.mozLockOrientation(t);else if(screen.webkitLockOrientation)r=screen.webkitLockOrientation(t);else return-1;return r?0:-6};_emscripten_lock_orientation.sig="ii";var _emscripten_unlock_orientation=()=>{if(screen.unlockOrientation)screen.unlockOrientation();else if(screen.mozUnlockOrientation)screen.mozUnlockOrientation();else if(screen.webkitUnlockOrientation)screen.webkitUnlockOrientation();else return-1;return 0};_emscripten_unlock_orientation.sig="i";var fillFullscreenChangeEventData=e=>{var t=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,r=!!t;HEAP8[e>>>0]=r,HEAP8[e+1>>>0]=JSEvents.fullscreenEnabled();var n=r?t:JSEvents.previousFullscreenElement,a=JSEvents.getNodeNameForTarget(n),l=(n==null?void 0:n.id)||"";stringToUTF8(a,e+2,128),stringToUTF8(l,e+130,128),HEAP32[e+260>>>2>>>0]=n?n.clientWidth:0,HEAP32[e+264>>>2>>>0]=n?n.clientHeight:0,HEAP32[e+268>>>2>>>0]=screen.width,HEAP32[e+272>>>2>>>0]=screen.height,r&&(JSEvents.previousFullscreenElement=t)},registerFullscreenChangeEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.fullscreenChangeEvent||(JSEvents.fullscreenChangeEvent=_malloc(276));var u=(d=event)=>{var p=JSEvents.fullscreenChangeEvent;fillFullscreenChangeEventData(p),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_fullscreenchange_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,JSEvents.fullscreenEnabled()?(e=findEventTarget(e),e?(registerFullscreenChangeEventCallback(e,t,r,n,19,"webkitfullscreenchange"),registerFullscreenChangeEventCallback(e,t,r,n,19,"fullscreenchange")):-4):-1}_emscripten_set_fullscreenchange_callback_on_thread.sig="ippipp";function _emscripten_get_fullscreen_status(e){return e>>>=0,JSEvents.fullscreenEnabled()?(fillFullscreenChangeEventData(e),0):-1}_emscripten_get_fullscreen_status.sig="ip";function _emscripten_get_canvas_element_size(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=findCanvasEventTarget(e);if(!n)return-4;HEAP32[t>>>2>>>0]=n.width,HEAP32[r>>>2>>>0]=n.height}_emscripten_get_canvas_element_size.sig="ippp";var getCanvasElementSize=e=>{var t=stackSave(),r=stackAlloc(8),n=r+4,a=stringToUTF8OnStack(e.id);_emscripten_get_canvas_element_size(a,r,n);var l=[HEAP32[r>>>2>>>0],HEAP32[n>>>2>>>0]];return stackRestore(t),l};function _emscripten_set_canvas_element_size(e,t,r){e>>>=0;var n=findCanvasEventTarget(e);return n?(n.width=t,n.height=r,0):-4}_emscripten_set_canvas_element_size.sig="ipii";var setCanvasElementSize=(e,t,r)=>{if(!e.controlTransferredOffscreen)e.width=t,e.height=r;else{var n=stackSave(),a=stringToUTF8OnStack(e.id);_emscripten_set_canvas_element_size(a,t,r),stackRestore(n)}},registerRestoreOldStyle=e=>{var t=getCanvasElementSize(e),r=t[0],n=t[1],a=e.style.width,l=e.style.height,c=e.style.backgroundColor,u=document.body.style.backgroundColor,_=e.style.paddingLeft,d=e.style.paddingRight,p=e.style.paddingTop,f=e.style.paddingBottom,m=e.style.marginLeft,g=e.style.marginRight,h=e.style.marginTop,y=e.style.marginBottom,b=document.body.style.margin,S=document.documentElement.style.overflow,P=document.body.scroll,T=e.style.imageRendering;function A(){var M=document.fullscreenElement||document.webkitFullscreenElement;M||(document.removeEventListener("fullscreenchange",A),document.removeEventListener("webkitfullscreenchange",A),setCanvasElementSize(e,r,n),e.style.width=a,e.style.height=l,e.style.backgroundColor=c,u||(document.body.style.backgroundColor="white"),document.body.style.backgroundColor=u,e.style.paddingLeft=_,e.style.paddingRight=d,e.style.paddingTop=p,e.style.paddingBottom=f,e.style.marginLeft=m,e.style.marginRight=g,e.style.marginTop=h,e.style.marginBottom=y,document.body.style.margin=b,document.documentElement.style.overflow=S,document.body.scroll=P,e.style.imageRendering=T,e.GLctxObject&&e.GLctxObject.GLctx.viewport(0,0,r,n),currentFullscreenStrategy.canvasResizedCallback&&getWasmTableEntry(currentFullscreenStrategy.canvasResizedCallback)(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData))}return document.addEventListener("fullscreenchange",A),document.addEventListener("webkitfullscreenchange",A),A},setLetterbox=(e,t,r)=>{e.style.paddingLeft=e.style.paddingRight=r+"px",e.style.paddingTop=e.style.paddingBottom=t+"px"},JSEvents_resizeCanvasForFullscreen=(e,t)=>{var r,n,a=registerRestoreOldStyle(e),l=t.softFullscreen?innerWidth:screen.width,c=t.softFullscreen?innerHeight:screen.height,u=getBoundingClientRect(e),_=u.width,d=u.height,p=getCanvasElementSize(e),f=p[0],m=p[1];if(t.scaleMode==3)setLetterbox(e,(c-d)/2,(l-_)/2),l=_,c=d;else if(t.scaleMode==2)if(l*m{if((t.scaleMode!=0||t.canvasResolutionScaleMode!=0)&&JSEvents_resizeCanvasForFullscreen(e,t),e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);else return JSEvents.fullscreenEnabled()?-3:-1;return currentFullscreenStrategy=t,t.canvasResizedCallback&&getWasmTableEntry(t.canvasResizedCallback)(37,0,t.canvasResizedCallbackUserData),0},hideEverythingExceptGivenElement=e=>{for(var t=e,r=t.parentNode,n=[];t!=document.body;){for(var a=r.children,l=0;l{for(var t of e)t.node.style.display=t.displayState},currentFullscreenStrategy={},restoreOldWindowedStyle=null,softFullscreenResizeWebGLRenderTarget=()=>{var e=devicePixelRatio,t=currentFullscreenStrategy.canvasResolutionScaleMode==2,r=currentFullscreenStrategy.scaleMode==2,n=currentFullscreenStrategy.canvasResolutionScaleMode!=0,a=currentFullscreenStrategy.scaleMode==3,l=t?Math.round(innerWidth*e):innerWidth,c=t?Math.round(innerHeight*e):innerHeight,u=l,_=c,d=currentFullscreenStrategy.target,p=getCanvasElementSize(d),f=p[0],m=p[1],g;if(r&&(u*mf*_&&(u=_*f/m|0),g=(c-_)/2|0),n&&(setCanvasElementSize(d,u,_),d.GLctxObject&&d.GLctxObject.GLctx.viewport(0,0,u,_)),t&&(g/=e,u/=e,_/=e,u=Math.round(u*1e4)/1e4,_=Math.round(_*1e4)/1e4,g=Math.round(g*1e4)/1e4),a){var h=(innerHeight-jstoi_q(d.style.height))/2,y=(innerWidth-jstoi_q(d.style.width))/2;setLetterbox(d,h,y)}else{d.style.width=u+"px",d.style.height=_+"px";var y=(innerWidth-u)/2;setLetterbox(d,g,y)}!a&¤tFullscreenStrategy.canvasResizedCallback&&getWasmTableEntry(currentFullscreenStrategy.canvasResizedCallback)(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData)},doRequestFullscreen=(e,t)=>JSEvents.fullscreenEnabled()?(e=findEventTarget(e),e?!e.requestFullscreen&&!e.webkitRequestFullscreen?-3:JSEvents.canPerformEventHandlerRequests()?JSEvents_requestFullscreen(e,t):t.deferUntilInEventHandler?(JSEvents.deferCall(JSEvents_requestFullscreen,1,[e,t]),1):-2:-4):-1;function _emscripten_request_fullscreen(e,t){e>>>=0;var r={scaleMode:0,canvasResolutionScaleMode:0,filteringMode:0,deferUntilInEventHandler:t,canvasResizedCallbackTargetThread:2};return doRequestFullscreen(e,r)}_emscripten_request_fullscreen.sig="ipi";function _emscripten_request_fullscreen_strategy(e,t,r){e>>>=0,r>>>=0;var n={scaleMode:HEAP32[r>>>2>>>0],canvasResolutionScaleMode:HEAP32[r+4>>>2>>>0],filteringMode:HEAP32[r+8>>>2>>>0],deferUntilInEventHandler:t,canvasResizedCallback:HEAP32[r+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[r+16>>>2>>>0]};return doRequestFullscreen(e,n)}_emscripten_request_fullscreen_strategy.sig="ipip";function _emscripten_enter_soft_fullscreen(e,t){if(e>>>=0,t>>>=0,e=findEventTarget(e),!e)return-4;var r={scaleMode:HEAP32[t>>>2>>>0],canvasResolutionScaleMode:HEAP32[t+4>>>2>>>0],filteringMode:HEAP32[t+8>>>2>>>0],canvasResizedCallback:HEAP32[t+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[t+16>>>2>>>0],target:e,softFullscreen:!0},n=JSEvents_resizeCanvasForFullscreen(e,r);document.documentElement.style.overflow="hidden",document.body.scroll="no",document.body.style.margin="0px";var a=hideEverythingExceptGivenElement(e);function l(){n(),restoreHiddenElements(a),removeEventListener("resize",softFullscreenResizeWebGLRenderTarget),r.canvasResizedCallback&&getWasmTableEntry(r.canvasResizedCallback)(37,0,r.canvasResizedCallbackUserData),currentFullscreenStrategy=0}return restoreOldWindowedStyle=l,currentFullscreenStrategy=r,addEventListener("resize",softFullscreenResizeWebGLRenderTarget),r.canvasResizedCallback&&getWasmTableEntry(r.canvasResizedCallback)(37,0,r.canvasResizedCallbackUserData),0}_emscripten_enter_soft_fullscreen.sig="ipp";var _emscripten_exit_soft_fullscreen=()=>(restoreOldWindowedStyle==null||restoreOldWindowedStyle(),restoreOldWindowedStyle=null,0);_emscripten_exit_soft_fullscreen.sig="i";var _emscripten_exit_fullscreen=()=>{if(!JSEvents.fullscreenEnabled())return-1;JSEvents.removeDeferredCalls(JSEvents_requestFullscreen);var e=specialHTMLTargets[1];if(e.exitFullscreen)e.fullscreenElement&&e.exitFullscreen();else if(e.webkitExitFullscreen)e.webkitFullscreenElement&&e.webkitExitFullscreen();else return-1;return 0};_emscripten_exit_fullscreen.sig="i";var fillPointerlockChangeEventData=e=>{var t=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement,r=!!t;HEAP8[e>>>0]=r;var n=JSEvents.getNodeNameForTarget(t),a=(t==null?void 0:t.id)||"";stringToUTF8(n,e+1,128),stringToUTF8(a,e+129,128)},registerPointerlockChangeEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.pointerlockChangeEvent||(JSEvents.pointerlockChangeEvent=_malloc(257));var u=(d=event)=>{var p=JSEvents.pointerlockChangeEvent;fillPointerlockChangeEventData(p),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_pointerlockchange_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,!document||!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:(e=findEventTarget(e),e?(registerPointerlockChangeEventCallback(e,t,r,n,20,"mozpointerlockchange"),registerPointerlockChangeEventCallback(e,t,r,n,20,"webkitpointerlockchange"),registerPointerlockChangeEventCallback(e,t,r,n,20,"mspointerlockchange"),registerPointerlockChangeEventCallback(e,t,r,n,20,"pointerlockchange")):-4)}_emscripten_set_pointerlockchange_callback_on_thread.sig="ippipp";var registerPointerlockErrorEventCallback=(e,t,r,n,a,l,c)=>{var u=(d=event)=>{getWasmTableEntry(n)(a,0,t)&&d.preventDefault()},_={target:e,eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_pointerlockerror_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,!document||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:(e=findEventTarget(e),e?(registerPointerlockErrorEventCallback(e,t,r,n,38,"mozpointerlockerror"),registerPointerlockErrorEventCallback(e,t,r,n,38,"webkitpointerlockerror"),registerPointerlockErrorEventCallback(e,t,r,n,38,"mspointerlockerror"),registerPointerlockErrorEventCallback(e,t,r,n,38,"pointerlockerror")):-4)}_emscripten_set_pointerlockerror_callback_on_thread.sig="ippipp";function _emscripten_get_pointerlock_status(e){return e>>>=0,e&&fillPointerlockChangeEventData(e),!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:0}_emscripten_get_pointerlock_status.sig="ip";var requestPointerLock=e=>{if(e.requestPointerLock)e.requestPointerLock();else return document.body.requestPointerLock?-3:-1;return 0};function _emscripten_request_pointerlock(e,t){return e>>>=0,e=findEventTarget(e),e?e.requestPointerLock?JSEvents.canPerformEventHandlerRequests()?requestPointerLock(e):t?(JSEvents.deferCall(requestPointerLock,2,[e]),1):-2:-1:-4}_emscripten_request_pointerlock.sig="ipi";var _emscripten_exit_pointerlock=()=>{if(JSEvents.removeDeferredCalls(requestPointerLock),document.exitPointerLock)document.exitPointerLock();else return-1;return 0};_emscripten_exit_pointerlock.sig="i";var _emscripten_vibrate=e=>navigator.vibrate?(navigator.vibrate(e),0):-1;_emscripten_vibrate.sig="ii";function _emscripten_vibrate_pattern(e,t){if(e>>>=0,!navigator.vibrate)return-1;for(var r=[],n=0;n>>2>>>0];r.push(a)}return navigator.vibrate(r),0}_emscripten_vibrate_pattern.sig="ipi";var fillVisibilityChangeEventData=e=>{var t=["hidden","visible","prerender","unloaded"],r=t.indexOf(document.visibilityState);HEAP8[e>>>0]=document.hidden,HEAP32[e+4>>>2>>>0]=r},registerVisibilityChangeEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.visibilityChangeEvent||(JSEvents.visibilityChangeEvent=_malloc(8));var u=(d=event)=>{var p=JSEvents.visibilityChangeEvent;fillVisibilityChangeEventData(p),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_visibilitychange_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,specialHTMLTargets[1]?registerVisibilityChangeEventCallback(specialHTMLTargets[1],e,t,r,21,"visibilitychange"):-4}_emscripten_set_visibilitychange_callback_on_thread.sig="ipipp";function _emscripten_get_visibility_status(e){return e>>>=0,typeof document.visibilityState>"u"&&typeof document.hidden>"u"?-1:(fillVisibilityChangeEventData(e),0)}_emscripten_get_visibility_status.sig="ip";var registerTouchEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.touchEvent||(JSEvents.touchEvent=_malloc(1552)),e=findEventTarget(e);var u=d=>{var p={},f=d.touches;for(let S of f)S.isChanged=S.onTarget=0,p[S.identifier]=S;for(let S of d.changedTouches)S.isChanged=1,p[S.identifier]=S;for(let S of d.targetTouches)p[S.identifier].onTarget=1;var m=JSEvents.touchEvent;HEAPF64[m>>>3>>>0]=d.timeStamp,HEAP8[m+12>>>0]=d.ctrlKey,HEAP8[m+13>>>0]=d.shiftKey,HEAP8[m+14>>>0]=d.altKey,HEAP8[m+15>>>0]=d.metaKey;var g=m+16,h=getBoundingClientRect(e),y=0;for(let S of Object.values(p)){var b=g>>>2;if(HEAP32[b+0>>>0]=S.identifier,HEAP32[b+1>>>0]=S.screenX,HEAP32[b+2>>>0]=S.screenY,HEAP32[b+3>>>0]=S.clientX,HEAP32[b+4>>>0]=S.clientY,HEAP32[b+5>>>0]=S.pageX,HEAP32[b+6>>>0]=S.pageY,HEAP8[g+28>>>0]=S.isChanged,HEAP8[g+29>>>0]=S.onTarget,HEAP32[b+8>>>0]=S.clientX-(h.left|0),HEAP32[b+9>>>0]=S.clientY-(h.top|0),g+=48,++y>31)break}HEAP32[m+8>>>2>>>0]=y,getWasmTableEntry(n)(a,m,t)&&d.preventDefault()},_={target:e,allowsDeferredCalls:l=="touchstart"||l=="touchend",eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_touchstart_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerTouchEventCallback(e,t,r,n,22,"touchstart")}_emscripten_set_touchstart_callback_on_thread.sig="ippipp";function _emscripten_set_touchend_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerTouchEventCallback(e,t,r,n,23,"touchend")}_emscripten_set_touchend_callback_on_thread.sig="ippipp";function _emscripten_set_touchmove_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerTouchEventCallback(e,t,r,n,24,"touchmove")}_emscripten_set_touchmove_callback_on_thread.sig="ippipp";function _emscripten_set_touchcancel_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerTouchEventCallback(e,t,r,n,25,"touchcancel")}_emscripten_set_touchcancel_callback_on_thread.sig="ippipp";var fillGamepadEventData=(e,t)=>{HEAPF64[e>>>3>>>0]=t.timestamp;for(var r=0;r>>3>>>0]=t.axes[r];for(var r=0;r>>3>>>0]=t.buttons[r].value:HEAPF64[e+r*8+528>>>3>>>0]=t.buttons[r];for(var r=0;r>>0]=t.buttons[r].pressed:HEAP8[e+r+1040>>>0]=t.buttons[r]==1;HEAP8[e+1104>>>0]=t.connected,HEAP32[e+1108>>>2>>>0]=t.index,HEAP32[e+8>>>2>>>0]=t.axes.length,HEAP32[e+12>>>2>>>0]=t.buttons.length,stringToUTF8(t.id,e+1112,64),stringToUTF8(t.mapping,e+1176,64)},registerGamepadEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.gamepadEvent||(JSEvents.gamepadEvent=_malloc(1240));var u=(d=event)=>{var p=JSEvents.gamepadEvent;fillGamepadEventData(p,d.gamepad),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:findEventTarget(e),allowsDeferredCalls:!0,eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)},_emscripten_sample_gamepad_data=()=>{try{if(navigator.getGamepads)return(JSEvents.lastGamepadState=navigator.getGamepads())?0:-1}catch{navigator.getGamepads=null}return-1};_emscripten_sample_gamepad_data.sig="i";function _emscripten_set_gamepadconnected_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,_emscripten_sample_gamepad_data()?-1:registerGamepadEventCallback(2,e,t,r,26,"gamepadconnected")}_emscripten_set_gamepadconnected_callback_on_thread.sig="ipipp";function _emscripten_set_gamepaddisconnected_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,_emscripten_sample_gamepad_data()?-1:registerGamepadEventCallback(2,e,t,r,27,"gamepaddisconnected")}_emscripten_set_gamepaddisconnected_callback_on_thread.sig="ipipp";var _emscripten_get_num_gamepads=()=>JSEvents.lastGamepadState.length;_emscripten_get_num_gamepads.sig="i";function _emscripten_get_gamepad_status(e,t){return t>>>=0,e<0||e>=JSEvents.lastGamepadState.length?-5:JSEvents.lastGamepadState[e]?(fillGamepadEventData(t,JSEvents.lastGamepadState[e]),0):-7}_emscripten_get_gamepad_status.sig="iip";var registerBeforeUnloadEventCallback=(e,t,r,n,a,l)=>{var c=(_=event)=>{var d=getWasmTableEntry(n)(a,0,t);if(d&&(d=UTF8ToString(d)),d)return _.preventDefault(),_.returnValue=d,d},u={target:findEventTarget(e),eventTypeString:l,callbackfunc:n,handlerFunc:c,useCapture:r};return JSEvents.registerOrRemoveHandler(u)};function _emscripten_set_beforeunload_callback_on_thread(e,t,r){return e>>>=0,t>>>=0,r>>>=0,typeof onbeforeunload>"u"?-1:r!==1?-5:registerBeforeUnloadEventCallback(2,e,!0,t,28,"beforeunload")}_emscripten_set_beforeunload_callback_on_thread.sig="ippp";var fillBatteryEventData=(e,t)=>{HEAPF64[e>>>3>>>0]=t.chargingTime,HEAPF64[e+8>>>3>>>0]=t.dischargingTime,HEAPF64[e+16>>>3>>>0]=t.level,HEAP8[e+24>>>0]=t.charging},battery=()=>navigator.battery||navigator.mozBattery||navigator.webkitBattery,registerBatteryEventCallback=(e,t,r,n,a,l,c)=>{JSEvents.batteryEvent||(JSEvents.batteryEvent=_malloc(32));var u=(d=event)=>{var p=JSEvents.batteryEvent;fillBatteryEventData(p,battery()),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_batterychargingchange_callback_on_thread(e,t,r){return e>>>=0,t>>>=0,battery()?registerBatteryEventCallback(battery(),e,!0,t,29,"chargingchange"):-1}_emscripten_set_batterychargingchange_callback_on_thread.sig="ippp";function _emscripten_set_batterylevelchange_callback_on_thread(e,t,r){return e>>>=0,t>>>=0,battery()?registerBatteryEventCallback(battery(),e,!0,t,30,"levelchange"):-1}_emscripten_set_batterylevelchange_callback_on_thread.sig="ippp";function _emscripten_get_battery_status(e){return e>>>=0,battery()?(fillBatteryEventData(e,battery()),0):-1}_emscripten_get_battery_status.sig="ip";function _emscripten_set_element_css_size(e,t,r){return e>>>=0,e=findEventTarget(e),e?(e.style.width=t+"px",e.style.height=r+"px",0):-4}_emscripten_set_element_css_size.sig="ipdd";function _emscripten_get_element_css_size(e,t,r){if(e>>>=0,t>>>=0,r>>>=0,e=findEventTarget(e),!e)return-4;var n=getBoundingClientRect(e);return HEAPF64[t>>>3>>>0]=n.width,HEAPF64[r>>>3>>>0]=n.height,0}_emscripten_get_element_css_size.sig="ippp";var _emscripten_html5_remove_all_event_listeners=()=>JSEvents.removeAllEventListeners();_emscripten_html5_remove_all_event_listeners.sig="v";var _emscripten_request_animation_frame=function(e,t){return e>>>=0,t>>>=0,requestAnimationFrame(r=>getWasmTableEntry(e)(r,t))};_emscripten_request_animation_frame.sig="ipp";var _emscripten_cancel_animation_frame=e=>cancelAnimationFrame(e);_emscripten_cancel_animation_frame.sig="vi";function _emscripten_request_animation_frame_loop(e,t){e>>>=0,t>>>=0;function r(n){getWasmTableEntry(e)(n,t)&&requestAnimationFrame(r)}return requestAnimationFrame(r)}_emscripten_request_animation_frame_loop.sig="vpp";var _emscripten_performance_now=()=>performance.now();_emscripten_performance_now.sig="d";var _emscripten_get_device_pixel_ratio=()=>typeof devicePixelRatio=="number"&&devicePixelRatio||1;_emscripten_get_device_pixel_ratio.sig="d";function _emscripten_get_callstack(e,t,r){t>>>=0;var n=getCallstack(e);if(!t||r<=0)return lengthBytesUTF8(n)+1;var a=stringToUTF8(n,t,r);return a+1}_emscripten_get_callstack.sig="iipi";var convertFrameToPC=e=>(abort("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER"),0);function _emscripten_return_address(e){var t=jsStackTrace().split(` +`);return t[0]=="Error"&&t.shift(),t[e+3],convertFrameToPC()}_emscripten_return_address.sig="pi";var UNWIND_CACHE={},saveInUnwindCache=e=>{e.forEach(t=>{convertFrameToPC()})};function _emscripten_stack_snapshot(){var e=jsStackTrace().split(` +`);return e[0]=="Error"&&e.shift(),saveInUnwindCache(e),UNWIND_CACHE.last_addr=convertFrameToPC(e[3]),UNWIND_CACHE.last_stack=e,UNWIND_CACHE.last_addr}_emscripten_stack_snapshot.sig="p";function _emscripten_stack_unwind_buffer(e,t,r){e>>>=0,t>>>=0;var n;UNWIND_CACHE.last_addr==e?n=UNWIND_CACHE.last_stack:(n=jsStackTrace().split(` +`),n[0]=="Error"&&n.shift(),saveInUnwindCache(n));for(var a=3;n[a]&&convertFrameToPC(n[a])!=e;)++a;for(var l=0;l>>2>>>0]=convertFrameToPC(n[l+a]);return l}_emscripten_stack_unwind_buffer.sig="ippi";function _emscripten_pc_get_function(e){return abort("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER"),0}_emscripten_pc_get_function.sig="pp";var convertPCtoSourceLocation=e=>{if(UNWIND_CACHE.last_get_source_pc==e)return UNWIND_CACHE.last_source;var t,r;if(!r){var n=UNWIND_CACHE[e];if(!n)return null;(t=/\((.*):(\d+):(\d+)\)$/.exec(n))?r={file:t[1],line:t[2],column:t[3]}:(t=/@(.*):(\d+):(\d+)/.exec(n))&&(r={file:t[1],line:t[2],column:t[3]})}return UNWIND_CACHE.last_get_source_pc=e,UNWIND_CACHE.last_source=r,r};function _emscripten_pc_get_file(e){e>>>=0;var t=convertPCtoSourceLocation(e);return t?(_emscripten_pc_get_file.ret&&_free(_emscripten_pc_get_file.ret),_emscripten_pc_get_file.ret=stringToNewUTF8(t.file),_emscripten_pc_get_file.ret):0}_emscripten_pc_get_file.sig="pp";function _emscripten_pc_get_line(e){e>>>=0;var t=convertPCtoSourceLocation(e);return t?t.line:0}_emscripten_pc_get_line.sig="ip";function _emscripten_pc_get_column(e){e>>>=0;var t=convertPCtoSourceLocation(e);return t&&t.column||0}_emscripten_pc_get_column.sig="ip";var _sched_yield=()=>0;Module._sched_yield=_sched_yield,_sched_yield.sig="i";function _random_get(e,t){e>>>=0,t>>>=0;try{return _getentropy(e,t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return r.errno}}_random_get.sig="ipp";var checkWasiClock=e=>e==0||e==1||e==2||e==3;function _clock_time_get(e,t,r,n){if(n>>>=0,!checkWasiClock(e))return 28;var a;e===0?a=Date.now():a=_emscripten_get_now();var l=Math.round(a*1e3*1e3);return HEAP32[n>>>2>>>0]=l>>>0,HEAP32[n+4>>>2>>>0]=l/Math.pow(2,32)>>>0,0}_clock_time_get.sig="iiiip";function _clock_res_get(e,t){if(t>>>=0,!checkWasiClock(e))return 28;var r;return e===0?r=1e6:r=_emscripten_get_now_res(),HEAP32[t>>>2>>>0]=r>>>0,HEAP32[t+4>>>2>>>0]=r/Math.pow(2,32)>>>0,0}_clock_res_get.sig="iip";var _emscripten_unwind_to_js_event_loop=()=>{throw"unwind"};_emscripten_unwind_to_js_event_loop.sig="v";var safeSetTimeout=(e,t)=>setTimeout(()=>{callUserCallback(e)},t),setImmediateWrapped=e=>{setImmediateWrapped.mapping||(setImmediateWrapped.mapping=[]);var t=setImmediateWrapped.mapping.length;return setImmediateWrapped.mapping[t]=setImmediate(()=>{setImmediateWrapped.mapping[t]=void 0,e()}),t},clearImmediateWrapped=e=>{clearImmediate(setImmediateWrapped.mapping[e]),setImmediateWrapped.mapping[e]=void 0},_emscripten_set_immediate=function(e,t){return e>>>=0,t>>>=0,emSetImmediate(()=>{callUserCallback(()=>getWasmTableEntry(e)(t))})};_emscripten_set_immediate.sig="ipp";var _emscripten_clear_immediate=e=>{emClearImmediate(e)};_emscripten_clear_immediate.sig="vi";var _emscripten_set_immediate_loop=function(e,t){e>>>=0,t>>>=0;function r(){callUserCallback(()=>{getWasmTableEntry(e)(t)&&emSetImmediate(r)})}emSetImmediate(r)};_emscripten_set_immediate_loop.sig="vpp";var _emscripten_set_timeout=function(e,t,r){return e>>>=0,r>>>=0,safeSetTimeout(()=>getWasmTableEntry(e)(r),t)};_emscripten_set_timeout.sig="ipdp";var _emscripten_clear_timeout=clearTimeout;_emscripten_clear_timeout.sig="vi";var _emscripten_set_timeout_loop=function(e,t,r){e>>>=0,r>>>=0;function n(){var a=_emscripten_get_now(),l=a+t;callUserCallback(()=>{getWasmTableEntry(e)(a,r)&&setTimeout(n,l-_emscripten_get_now())})}return setTimeout(n,0)};_emscripten_set_timeout_loop.sig="vpdp";var _emscripten_set_interval=function(e,t,r){return e>>>=0,r>>>=0,setInterval(()=>{callUserCallback(()=>getWasmTableEntry(e)(r))},t)};_emscripten_set_interval.sig="ipdp";var _emscripten_clear_interval=e=>{clearInterval(e)};_emscripten_clear_interval.sig="vi";var registerPostMainLoop=e=>{typeof MainLoop<"u"&&MainLoop.postMainLoop.push(e)};function _emscripten_get_main_loop_timing(e,t){e>>>=0,t>>>=0,e&&(HEAP32[e>>>2>>>0]=MainLoop.timingMode),t&&(HEAP32[t>>>2>>>0]=MainLoop.timingValue)}_emscripten_get_main_loop_timing.sig="vpp";function _emscripten_set_main_loop(e,t,r){e>>>=0;var n=getWasmTableEntry(e);setMainLoop(n,t,r)}_emscripten_set_main_loop.sig="vpii";var _emscripten_set_main_loop_arg=function(e,t,r,n){e>>>=0,t>>>=0;var a=()=>getWasmTableEntry(e)(t);setMainLoop(a,r,n,t)};_emscripten_set_main_loop_arg.sig="vppii";var _emscripten_cancel_main_loop=()=>{MainLoop.pause(),MainLoop.func=null};_emscripten_cancel_main_loop.sig="v";var _emscripten_pause_main_loop=()=>{MainLoop.pause()};_emscripten_pause_main_loop.sig="v";var _emscripten_resume_main_loop=()=>{MainLoop.resume()};_emscripten_resume_main_loop.sig="v";var __emscripten_push_main_loop_blocker=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,MainLoop.queue.push({func:()=>{getWasmTableEntry(e)(t)},name:UTF8ToString(r),counted:!0}),MainLoop.updateStatus()};__emscripten_push_main_loop_blocker.sig="vppp";var __emscripten_push_uncounted_main_loop_blocker=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,MainLoop.queue.push({func:()=>{getWasmTableEntry(e)(t)},name:UTF8ToString(r),counted:!1}),MainLoop.updateStatus()};__emscripten_push_uncounted_main_loop_blocker.sig="vppp";var _emscripten_set_main_loop_expected_blockers=e=>{MainLoop.expectedBlockers=e,MainLoop.remainingBlockers=e,MainLoop.updateStatus()};_emscripten_set_main_loop_expected_blockers.sig="vi";var idsToPromises=(e,t)=>{for(var r=[],n=0;n>>2>>>0];r[n]=getPromise(a)}return r},makePromiseCallback=(e,t)=>r=>{var n=stackSave(),a=stackAlloc(POINTER_SIZE);HEAPU32[a>>>2>>>0]=0;try{var l=getWasmTableEntry(e)(a,t,r),c=HEAPU32[a>>>2>>>0]}catch(_){throw typeof _!="number"?0:_}finally{stackRestore(n)}switch(l){case 0:return c;case 1:return getPromise(c);case 2:var u=getPromise(c);return _emscripten_promise_destroy(c),u;case 3:throw c}};function _emscripten_promise_then(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=getPromise(e),l=promiseMap.allocate({promise:a.then(makePromiseCallback(t,n),makePromiseCallback(r,n))});return l}_emscripten_promise_then.sig="ppppp";var _emscripten_promise_all=function(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=idsToPromises(e,r),a=promiseMap.allocate({promise:Promise.all(n).then(l=>{if(t)for(var c=0;c>>2>>>0]=u}return t})});return a};_emscripten_promise_all.sig="pppp";var setPromiseResult=(e,t,r)=>{var n=t?0:3;HEAP32[e>>>2>>>0]=n,HEAPU32[e+4>>>2>>>0]=r},_emscripten_promise_all_settled=function(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=idsToPromises(e,r),a=promiseMap.allocate({promise:Promise.allSettled(n).then(l=>{if(t)for(var c=t,u=0;u>>=0,t>>>=0,r>>>=0;var n=idsToPromises(e,r),a=promiseMap.allocate({promise:Promise.any(n).catch(l=>{if(t)for(var c=0;c>>2>>>0]=l.errors[c];throw t})});return a};_emscripten_promise_any.sig="pppp";function _emscripten_promise_race(e,t){e>>>=0,t>>>=0;var r=idsToPromises(e,t),n=promiseMap.allocate({promise:Promise.race(r)});return n}_emscripten_promise_race.sig="ppp";function _emscripten_promise_await(e,t){abort("emscripten_promise_await is only available with ASYNCIFY")}_emscripten_promise_await.sig="vpp";var Browser={useWebGL:!1,isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init(){if(Browser.initted)return;Browser.initted=!0;var e={};e.canHandle=function(a){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp|webp)$/i.test(a)},e.handle=function(a,l,c,u){var _=new Blob([a],{type:Browser.getMimetype(l)});_.size!==a.length&&(_=new Blob([new Uint8Array(a).buffer],{type:Browser.getMimetype(l)}));var d=URL.createObjectURL(_),p=new Image;p.onload=()=>{var f=document.createElement("canvas");f.width=p.width,f.height=p.height;var m=f.getContext("2d");m.drawImage(p,0,0),preloadedImages[l]=f,URL.revokeObjectURL(d),c==null||c(a)},p.onerror=f=>{err("Image ".concat(d," could not be decoded")),u==null||u()},p.src=d},preloadPlugins.push(e);var t={};t.canHandle=function(a){return!Module.noAudioDecoding&&a.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},t.handle=function(a,l,c,u){var _=!1;function d(g){_||(_=!0,preloadedAudios[l]=g,c==null||c(a))}var p=new Blob([a],{type:Browser.getMimetype(l)}),f=URL.createObjectURL(p),m=new Audio;m.addEventListener("canplaythrough",()=>d(m),!1),m.onerror=function(g){if(_)return;err("warning: browser could not fully decode audio ".concat(l,", trying slower base64 approach"));function h(y){for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S="=",P="",T=0,A=0,M=0;M=6;){var Q=T>>A-6&63;A-=6,P+=b[Q]}return A==2?(P+=b[(T&3)<<4],P+=S+S):A==4&&(P+=b[(T&15)<<2],P+=S),P}m.src="data:audio/x-"+l.substr(-3)+";base64,"+h(a),d(m)},m.src=f,safeSetTimeout(()=>{d(m)},1e4)},preloadPlugins.push(t);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var n=Module.canvas;n&&(n.requestPointerLock=n.requestPointerLock||n.mozRequestPointerLock||n.webkitRequestPointerLock||n.msRequestPointerLock||(()=>{}),n.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),n.exitPointerLock=n.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",r,!1),document.addEventListener("mozpointerlockchange",r,!1),document.addEventListener("webkitpointerlockchange",r,!1),document.addEventListener("mspointerlockchange",r,!1),Module.elementPointerLock&&n.addEventListener("click",a=>{!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext(e,t,r,n){if(t&&Module.ctx&&e==Module.canvas)return Module.ctx;var a,l;if(t){var c={antialias:!1,alpha:!1,majorVersion:1};if(n)for(var u in n)c[u]=n[u];typeof GL<"u"&&(l=GL.createContext(e,c),l&&(a=GL.getContext(l).GLctx))}else a=e.getContext("2d");return a?(r&&(Module.ctx=a,t&&GL.makeContextCurrent(l),Browser.useWebGL=t,Browser.moduleContextCreatedCallbacks.forEach(_=>_()),Browser.init()),a):null},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen(e,t){Browser.lockPointer=e,Browser.resizeCanvas=t,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1);var r=Module.canvas;function n(){var l,c;Browser.isFullscreen=!1;var u=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===u?(r.exitFullscreen=Browser.exitFullscreen,Browser.lockPointer&&r.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas?Browser.setFullscreenCanvasSize():Browser.updateCanvasDimensions(r)):(u.parentNode.insertBefore(r,u),u.parentNode.removeChild(u),Browser.resizeCanvas?Browser.setWindowedCanvasSize():Browser.updateCanvasDimensions(r)),(l=Module.onFullScreen)==null||l.call(Module,Browser.isFullscreen),(c=Module.onFullscreen)==null||c.call(Module,Browser.isFullscreen)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var a=document.createElement("div");r.parentNode.insertBefore(a,r),a.appendChild(r),a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullscreen?()=>a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(a.webkitRequestFullScreen?()=>a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null),a.requestFullscreen()},exitFullscreen(){if(!Browser.isFullscreen)return!1;var e=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||(()=>{});return e.apply(document,[]),!0},safeSetTimeout(e,t){return safeSetTimeout(e,t)},getMimetype(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta(e){var t=0;switch(e.type){case"DOMMouseScroll":t=e.detail/3;break;case"mousewheel":t=e.wheelDelta/120;break;case"wheel":switch(t=e.deltaY,e.deltaMode){case 0:t/=100;break;case 1:t/=3;break;case 2:t*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return t},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseCoords(e,t){var r=Module.canvas.getBoundingClientRect(),n=Module.canvas.width,a=Module.canvas.height,l=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,c=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset,u=e-(l+r.left),_=t-(c+r.top);return u=u*(n/r.width),_=_*(a/r.height),{x:u,y:_}},setMouseCoords(e,t){let{x:r,y:n}=Browser.calculateMouseCoords(e,t);Browser.mouseMovementX=r-Browser.mouseX,Browser.mouseMovementY=n-Browser.mouseY,Browser.mouseX=r,Browser.mouseY=n},calculateMouseEvent(e){if(Browser.pointerLock)e.type!="mousemove"&&"mozMovementX"in e?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(e),Browser.mouseMovementY=Browser.getMovementY(e)),Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY;else{if(e.type==="touchstart"||e.type==="touchend"||e.type==="touchmove"){var t=e.touch;if(t===void 0)return;var r=Browser.calculateMouseCoords(t.pageX,t.pageY);if(e.type==="touchstart")Browser.lastTouches[t.identifier]=r,Browser.touches[t.identifier]=r;else if(e.type==="touchend"||e.type==="touchmove"){var n=Browser.touches[t.identifier];n||(n=r),Browser.lastTouches[t.identifier]=n,Browser.touches[t.identifier]=r}return}Browser.setMouseCoords(e.pageX,e.pageY)}},resizeListeners:[],updateResizeListeners(){var e=Module.canvas;Browser.resizeListeners.forEach(t=>t(e.width,e.height))},setCanvasSize(e,t,r){var n=Module.canvas;Browser.updateCanvasDimensions(n,e,t),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen>>>2>>>0];e=e|8388608,HEAP32[SDL.screen>>>2>>>0]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},setWindowedCanvasSize(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen>>>2>>>0];e=e&-8388609,HEAP32[SDL.screen>>>2>>>0]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},updateCanvasDimensions(e,t,r){t&&r?(e.widthNative=t,e.heightNative=r):(t=e.widthNative,r=e.heightNative);var n=t,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(n/a>>=0,t>>>=0,r>>>=0;var n=UTF8ToString(e),a=FS.analyzePath(n);return a.exists?(FS.createPreloadedFile(PATH.dirname(n),PATH.basename(n),new Uint8Array(a.object.contents),!0,!0,()=>{t&&getWasmTableEntry(t)(e)},()=>{r&&getWasmTableEntry(r)(e)},!0),0):-1};_emscripten_run_preload_plugins.sig="ippp";var Browser_asyncPrepareDataCounter=0,_emscripten_run_preload_plugins_data=function(e,t,r,n,a,l){e>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0;var c=UTF8ToString(r),u="prepare_data_"+Browser_asyncPrepareDataCounter+++"."+c,_=stringToNewUTF8(u);FS.createPreloadedFile("/",u,HEAPU8.subarray(e>>>0,e+t>>>0),!0,!0,()=>{a&&getWasmTableEntry(a)(n,_)},()=>{l&&getWasmTableEntry(l)(n)},!0)};_emscripten_run_preload_plugins_data.sig="vpipppp";var _emscripten_async_run_script=function(e,t){e>>>=0,safeSetTimeout(()=>_emscripten_run_script(e),t)};_emscripten_async_run_script.sig="vpi";var _emscripten_async_load_script=function(url,onload,onerror){url>>>=0,onload>>>=0,onerror>>>=0,url=UTF8ToString(url);var loadDone=()=>{if(onload){var e=()=>callUserCallback(getWasmTableEntry(onload));runDependencies>0?dependenciesFulfilled=e:e()}},loadError=()=>{onerror&&callUserCallback(getWasmTableEntry(onerror))};if(ENVIRONMENT_IS_NODE){readAsync(url,!1).then(data=>{eval(data),loadDone()},loadError);return}var script=document.createElement("script");script.onload=loadDone,script.onerror=loadError,script.src=url,document.body.appendChild(script)};_emscripten_async_load_script.sig="vppp";var safeRequestAnimationFrame=e=>MainLoop.requestAnimationFrame(()=>{callUserCallback(e)});function _emscripten_async_call(e,t,r){e>>>=0,t>>>=0;function n(){getWasmTableEntry(e)(t)}r>=0||ENVIRONMENT_IS_NODE?safeSetTimeout(n,r):safeRequestAnimationFrame(n)}_emscripten_async_call.sig="vppi";function _emscripten_get_window_title(){var e=256;return _emscripten_get_window_title.buffer||(_emscripten_get_window_title.buffer=_malloc(e)),stringToUTF8(document.title,_emscripten_get_window_title.buffer,e),_emscripten_get_window_title.buffer}_emscripten_get_window_title.sig="p";function _emscripten_set_window_title(e){return e>>>=0,document.title=UTF8ToString(e)}_emscripten_set_window_title.sig="vp";function _emscripten_get_screen_size(e,t){e>>>=0,t>>>=0,HEAP32[e>>>2>>>0]=screen.width,HEAP32[t>>>2>>>0]=screen.height}_emscripten_get_screen_size.sig="vpp";var _emscripten_hide_mouse=()=>{for(var e=document.styleSheets[0],t=e.cssRules,r=0;r{Browser.setCanvasSize(e,t)};_emscripten_set_canvas_size.sig="vii";function _emscripten_get_canvas_size(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=Module.canvas;HEAP32[e>>>2>>>0]=n.width,HEAP32[t>>>2>>>0]=n.height,HEAP32[r>>>2>>>0]=Browser.isFullscreen?1:0}_emscripten_get_canvas_size.sig="vppp";function _emscripten_create_worker(e){e>>>=0,e=UTF8ToString(e);var t=Browser.workers.length,r={worker:new Worker(e),callbacks:[],awaited:0,buffer:0,bufferSize:0};return r.worker.onmessage=function(n){if(!ABORT){var a=Browser.workers[t];if(a){var l=n.data.callbackId,c=a.callbacks[l];if(c){n.data.finalResponse&&(a.awaited--,a.callbacks[l]=null);var u=n.data.data;u?(u.byteLength||(u=new Uint8Array(u)),(!a.buffer||a.bufferSize>>0),c.func(a.buffer,u.length,c.arg)):c.func(0,0,c.arg)}}}},Browser.workers.push(r),t}_emscripten_create_worker.sig="ip";var _emscripten_destroy_worker=e=>{var t=Browser.workers[e];t.worker.terminate(),t.buffer&&_free(t.buffer),Browser.workers[e]=null};_emscripten_destroy_worker.sig="vi";function _emscripten_call_worker(e,t,r,n,a,l){t>>>=0,r>>>=0,a>>>=0,l>>>=0,t=UTF8ToString(t);var c=Browser.workers[e],u=-1;a&&(u=c.callbacks.length,c.callbacks.push({func:getWasmTableEntry(a),arg:l}),c.awaited++);var _={funcName:t,callbackId:u,data:r?new Uint8Array(HEAPU8.subarray(r>>>0,r+n>>>0)):0};r?c.worker.postMessage(_,[_.data.buffer]):c.worker.postMessage(_)}_emscripten_call_worker.sig="vippipp";var _emscripten_get_worker_queue_size=e=>{var t=Browser.workers[e];return t?t.awaited:-1};_emscripten_get_worker_queue_size.sig="ii";var getPreloadedImageData=(e,t,r)=>{e=PATH_FS.resolve(e);var n=preloadedImages[e];if(!n)return 0;var a=n.getContext("2d"),l=a.getImageData(0,0,n.width,n.height),c=_malloc(n.width*n.height*4);return HEAPU8.set(l.data,c>>>0),HEAP32[t>>>2>>>0]=n.width,HEAP32[r>>>2>>>0]=n.height,c};function _emscripten_get_preloaded_image_data(e,t,r){return e>>>=0,t>>>=0,r>>>=0,getPreloadedImageData(UTF8ToString(e),t,r)}_emscripten_get_preloaded_image_data.sig="pppp";function _emscripten_get_preloaded_image_data_from_FILE(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=_fileno(e),a=FS.getStream(n);return a?getPreloadedImageData(a.path,t,r):0}_emscripten_get_preloaded_image_data_from_FILE.sig="pppp";var wget={wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle(){var e=wget.nextWgetRequestHandle;return wget.nextWgetRequestHandle++,e}},FS_mkdirTree=(e,t)=>FS.mkdirTree(e,t),FS_unlink=e=>FS.unlink(e),_emscripten_async_wget=function(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=UTF8ToString(e),l=UTF8ToString(t);l=PATH_FS.resolve(l);function c(_){_&&callUserCallback(()=>{var d=stackSave();getWasmTableEntry(_)(stringToUTF8OnStack(l)),stackRestore(d)})}var u=PATH.dirname(l);FS_createPreloadedFile(u,PATH.basename(l),a,!0,!0,()=>c(r),()=>c(n),!1,!1,()=>{try{FS_unlink(l)}catch{}FS_mkdirTree(u)})};_emscripten_async_wget.sig="vpppp";var _emscripten_async_wget_data=function(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0,asyncLoad(UTF8ToString(e),a=>{callUserCallback(()=>{var l=_malloc(a.length);HEAPU8.set(a,l>>>0),getWasmTableEntry(r)(t,l,a.length),_free(l)})},()=>{n&&callUserCallback(()=>{getWasmTableEntry(n)(t)})},!0)};_emscripten_async_wget_data.sig="vpppp";var _emscripten_async_wget2=function(e,t,r,n,a,l,c,u){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0,c>>>=0,u>>>=0;var _=UTF8ToString(e),d=UTF8ToString(t);d=PATH_FS.resolve(d);var p=UTF8ToString(r),f=UTF8ToString(n),m=d.lastIndexOf("/"),g=new XMLHttpRequest;g.open(p,_,!0),g.responseType="arraybuffer";var h=wget.getNextWgetRequestHandle(),y=PATH.dirname(d);return g.onload=b=>{if(g.status>=200&&g.status<300){try{FS.unlink(d)}catch{}if(FS.mkdirTree(y),FS.createDataFile(d.substr(0,m),d.substr(m+1),new Uint8Array(g.response),!0,!0,!1),l){var S=stackSave();getWasmTableEntry(l)(h,a,stringToUTF8OnStack(d)),stackRestore(S)}}else c&&getWasmTableEntry(c)(h,a,g.status);delete wget.wgetRequests[h]},g.onerror=b=>{c&&getWasmTableEntry(c)(h,a,g.status),delete wget.wgetRequests[h]},g.onprogress=b=>{if(b.lengthComputable||b.lengthComputable===void 0&&b.total!=0){var S=b.loaded/b.total*100;u&&getWasmTableEntry(u)(h,a,S)}},g.onabort=b=>{delete wget.wgetRequests[h]},p=="POST"?(g.setRequestHeader("Content-type","application/x-www-form-urlencoded"),g.send(f)):g.send(null),wget.wgetRequests[h]=g,h};_emscripten_async_wget2.sig="ipppppppp";function _emscripten_async_wget2_data(e,t,r,n,a,l,c,u){e>>>=0,t>>>=0,r>>>=0,n>>>=0,l>>>=0,c>>>=0,u>>>=0;var _=UTF8ToString(e),d=UTF8ToString(t),p=UTF8ToString(r),f=new XMLHttpRequest;f.open(d,_,!0),f.responseType="arraybuffer";var m=wget.getNextWgetRequestHandle();function g(){if(c){var h=stackSave(),y=0;f.statusText&&(y=stringToUTF8OnStack(f.statusText)),getWasmTableEntry(c)(m,n,f.status,y),stackRestore(h)}}return f.onload=h=>{if(f.status>=200&&f.status<300||f.status===0&&_.substr(0,4).toLowerCase()!="http"){var y=new Uint8Array(f.response),b=_malloc(y.length);HEAPU8.set(y,b>>>0),l&&getWasmTableEntry(l)(m,n,b,y.length),a&&_free(b)}else g();delete wget.wgetRequests[m]},f.onerror=h=>{g(),delete wget.wgetRequests[m]},f.onprogress=h=>{u&&getWasmTableEntry(u)(m,n,h.loaded,h.lengthComputable||h.lengthComputable===void 0?h.total:0)},f.onabort=h=>{delete wget.wgetRequests[m]},d=="POST"?(f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),f.send(p)):f.send(null),wget.wgetRequests[m]=f,m}_emscripten_async_wget2_data.sig="ippppippp";var _emscripten_async_wget2_abort=e=>{var t=wget.wgetRequests[e];t==null||t.abort()};_emscripten_async_wget2_abort.sig="vi";function ___asctime_r(e,t){e>>>=0,t>>>=0;var r={tm_sec:HEAP32[e>>>2>>>0],tm_min:HEAP32[e+4>>>2>>>0],tm_hour:HEAP32[e+8>>>2>>>0],tm_mday:HEAP32[e+12>>>2>>>0],tm_mon:HEAP32[e+16>>>2>>>0],tm_year:HEAP32[e+20>>>2>>>0],tm_wday:HEAP32[e+24>>>2>>>0]},n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],l=n[r.tm_wday]+" "+a[r.tm_mon]+(r.tm_mday<10?" ":" ")+r.tm_mday+(r.tm_hour<10?" 0":" ")+r.tm_hour+(r.tm_min<10?":0":":")+r.tm_min+(r.tm_sec<10?":0":":")+r.tm_sec+" "+(1900+r.tm_year)+` +`;return stringToUTF8(l,t,26),t}___asctime_r.sig="ppp";function _strptime_l(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,_strptime(e,t,r)}_strptime_l.sig="ppppp";function ___syscall_shutdown(e,t){try{return getSocketFromFD(e),-52}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}Module.___syscall_shutdown=___syscall_shutdown,___syscall_shutdown.sig="iiiiiii";function __dlsym_catchup_js(e,t){e>>>=0;var r=LDSO.loadedLibsByHandle[e],n=r.exports,a=Object.keys(n)[t],l=n[a],c=addFunction(l,l.sig);return c}__dlsym_catchup_js.sig="ppi",FS.createPath,FS.createDevice,FS.readFile,FS.createLazyFile;var _setNetworkCallback=(e,t,r)=>{function n(a){try{if(e==="error"){var l=stackSave(),c=stringToUTF8OnStack(a[2]);getWasmTableEntry(r)(a[0],a[1],c,t),stackRestore(l)}else getWasmTableEntry(r)(a,t)}catch(u){if(!(u instanceof ExitStatus))throw u&&typeof u=="object"&&u.stack&&err("exception thrown: "+[u,u.stack]),u}}Module.websocket.on(e,r?n:null)};function _emscripten_set_socket_error_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("error",e,t)}_emscripten_set_socket_error_callback.sig="vpp";function _emscripten_set_socket_open_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("open",e,t)}_emscripten_set_socket_open_callback.sig="vpp";function _emscripten_set_socket_listen_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("listen",e,t)}_emscripten_set_socket_listen_callback.sig="vpp";function _emscripten_set_socket_connection_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("connection",e,t)}_emscripten_set_socket_connection_callback.sig="vpp";function _emscripten_set_socket_message_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("message",e,t)}_emscripten_set_socket_message_callback.sig="vpp";function _emscripten_set_socket_close_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("close",e,t)}_emscripten_set_socket_close_callback.sig="vpp";function _emscripten_webgl_enable_ANGLE_instanced_arrays(e){return e>>>=0,webgl_enable_ANGLE_instanced_arrays(GL.contexts[e].GLctx)}_emscripten_webgl_enable_ANGLE_instanced_arrays.sig="ip";function _emscripten_webgl_enable_OES_vertex_array_object(e){return e>>>=0,webgl_enable_OES_vertex_array_object(GL.contexts[e].GLctx)}_emscripten_webgl_enable_OES_vertex_array_object.sig="ip";function _emscripten_webgl_enable_WEBGL_draw_buffers(e){return e>>>=0,webgl_enable_WEBGL_draw_buffers(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_draw_buffers.sig="ip";function _emscripten_webgl_enable_WEBGL_multi_draw(e){return e>>>=0,webgl_enable_WEBGL_multi_draw(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_multi_draw.sig="ip";function _emscripten_webgl_enable_EXT_polygon_offset_clamp(e){return e>>>=0,webgl_enable_EXT_polygon_offset_clamp(GL.contexts[e].GLctx)}_emscripten_webgl_enable_EXT_polygon_offset_clamp.sig="ip";function _emscripten_webgl_enable_EXT_clip_control(e){return e>>>=0,webgl_enable_EXT_clip_control(GL.contexts[e].GLctx)}_emscripten_webgl_enable_EXT_clip_control.sig="ip";function _emscripten_webgl_enable_WEBGL_polygon_mode(e){return e>>>=0,webgl_enable_WEBGL_polygon_mode(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_polygon_mode.sig="ip";function _glVertexPointer(e,t,r,n){throw"Legacy GL function (glVertexPointer) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."}_glVertexPointer.sig="viiip";var _glMatrixMode=()=>{throw"Legacy GL function (glMatrixMode) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glMatrixMode.sig="vi";var _glBegin=()=>{throw"Legacy GL function (glBegin) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glBegin.sig="vi";var _glLoadIdentity=()=>{throw"Legacy GL function (glLoadIdentity) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glLoadIdentity.sig="v";var _glVertexAttribDivisorNV=_glVertexAttribDivisor,_glDrawArraysInstancedNV=_glDrawArraysInstanced,_glDrawElementsInstancedNV=_glDrawElementsInstanced,_glVertexAttribDivisorEXT=_glVertexAttribDivisor,_glDrawArraysInstancedEXT=_glDrawArraysInstanced,_glDrawElementsInstancedEXT=_glDrawElementsInstanced,_glVertexAttribDivisorARB=_glVertexAttribDivisor,_glDrawArraysInstancedARB=_glDrawArraysInstanced,_glDrawElementsInstancedARB=_glDrawElementsInstanced,_glDrawBuffersEXT=_glDrawBuffers;function _glMultiDrawArraysWEBGL(e,t,r,n){t>>>=0,r>>>=0,GLctx.multiDrawWebgl.multiDrawArraysWEBGL(e,HEAP32,t>>>2,HEAP32,r>>>2,n)}_glMultiDrawArraysWEBGL.sig="vippi";var _glMultiDrawArrays=_glMultiDrawArraysWEBGL;_glMultiDrawArrays.sig="vippi";var _glMultiDrawArraysANGLE=_glMultiDrawArraysWEBGL;function _glMultiDrawArraysInstancedWEBGL(e,t,r,n,a){t>>>=0,r>>>=0,n>>>=0,GLctx.multiDrawWebgl.multiDrawArraysInstancedWEBGL(e,HEAP32,t>>>2,HEAP32,r>>>2,HEAP32,n>>>2,a)}_glMultiDrawArraysInstancedWEBGL.sig="vipppi";var _glMultiDrawArraysInstancedANGLE=_glMultiDrawArraysInstancedWEBGL;function _glMultiDrawElementsWEBGL(e,t,r,n,a){t>>>=0,n>>>=0,GLctx.multiDrawWebgl.multiDrawElementsWEBGL(e,HEAP32,t>>>2,r,HEAP32,n>>>2,a)}_glMultiDrawElementsWEBGL.sig="vipipi";var _glMultiDrawElements=_glMultiDrawElementsWEBGL;_glMultiDrawElements.sig="vipipi";var _glMultiDrawElementsANGLE=_glMultiDrawElementsWEBGL;function _glMultiDrawElementsInstancedWEBGL(e,t,r,n,a,l){t>>>=0,n>>>=0,a>>>=0,GLctx.multiDrawWebgl.multiDrawElementsInstancedWEBGL(e,HEAP32,t>>>2,r,HEAP32,n>>>2,HEAP32,a>>>2,l)}_glMultiDrawElementsInstancedWEBGL.sig="vipippi";var _glMultiDrawElementsInstancedANGLE=_glMultiDrawElementsInstancedWEBGL,_glClearDepth=e=>GLctx.clearDepth(e);_glClearDepth.sig="vd";var _glDepthRange=(e,t)=>GLctx.depthRange(e,t);_glDepthRange.sig="vdd";var _emscripten_glGenVertexArrays=_glGenVertexArrays;_emscripten_glGenVertexArrays.sig="vip";var _emscripten_glDeleteVertexArrays=_glDeleteVertexArrays;_emscripten_glDeleteVertexArrays.sig="vip";var _emscripten_glBindVertexArray=_glBindVertexArray;_emscripten_glBindVertexArray.sig="vi";var _emscripten_glIsVertexArray=_glIsVertexArray;_emscripten_glIsVertexArray.sig="ii";var _emscripten_glVertexPointer=_glVertexPointer;_emscripten_glVertexPointer.sig="viiip";var _emscripten_glMatrixMode=_glMatrixMode;_emscripten_glMatrixMode.sig="vi";var _emscripten_glBegin=_glBegin;_emscripten_glBegin.sig="vi";var _emscripten_glLoadIdentity=_glLoadIdentity;_emscripten_glLoadIdentity.sig="v";var _emscripten_glVertexAttribDivisor=_glVertexAttribDivisor;_emscripten_glVertexAttribDivisor.sig="vii";var _emscripten_glDrawArraysInstanced=_glDrawArraysInstanced;_emscripten_glDrawArraysInstanced.sig="viiii";var _emscripten_glDrawElementsInstanced=_glDrawElementsInstanced;_emscripten_glDrawElementsInstanced.sig="viiipi";var _emscripten_glVertexAttribDivisorNV=_glVertexAttribDivisorNV,_emscripten_glDrawArraysInstancedNV=_glDrawArraysInstancedNV,_emscripten_glDrawElementsInstancedNV=_glDrawElementsInstancedNV,_emscripten_glVertexAttribDivisorEXT=_glVertexAttribDivisorEXT,_emscripten_glDrawArraysInstancedEXT=_glDrawArraysInstancedEXT,_emscripten_glDrawElementsInstancedEXT=_glDrawElementsInstancedEXT,_emscripten_glVertexAttribDivisorARB=_glVertexAttribDivisorARB,_emscripten_glDrawArraysInstancedARB=_glDrawArraysInstancedARB,_emscripten_glDrawElementsInstancedARB=_glDrawElementsInstancedARB,_emscripten_glDrawBuffers=_glDrawBuffers;_emscripten_glDrawBuffers.sig="vip";var _emscripten_glDrawBuffersEXT=_glDrawBuffersEXT,_emscripten_glMultiDrawArrays=_glMultiDrawArrays;_emscripten_glMultiDrawArrays.sig="vippi";var _emscripten_glMultiDrawArraysANGLE=_glMultiDrawArraysANGLE,_emscripten_glMultiDrawArraysWEBGL=_glMultiDrawArraysWEBGL,_emscripten_glMultiDrawArraysInstancedANGLE=_glMultiDrawArraysInstancedANGLE,_emscripten_glMultiDrawArraysInstancedWEBGL=_glMultiDrawArraysInstancedWEBGL,_emscripten_glMultiDrawElements=_glMultiDrawElements;_emscripten_glMultiDrawElements.sig="vipipi";var _emscripten_glMultiDrawElementsANGLE=_glMultiDrawElementsANGLE,_emscripten_glMultiDrawElementsWEBGL=_glMultiDrawElementsWEBGL,_emscripten_glMultiDrawElementsInstancedANGLE=_glMultiDrawElementsInstancedANGLE,_emscripten_glMultiDrawElementsInstancedWEBGL=_glMultiDrawElementsInstancedWEBGL,_emscripten_glClearDepth=_glClearDepth;_emscripten_glClearDepth.sig="vd";var _emscripten_glDepthRange=_glDepthRange;_emscripten_glDepthRange.sig="vdd";var writeGLArray=(e,t,r,n)=>{var a=e.length,l=r>>2;for(var u=0;u>>0]=e[u];return a},webglPowerPreferences=["default","low-power","high-performance"];function _emscripten_webgl_do_create_context(e,t){e>>>=0,t>>>=0;var r=t>>>2,n=HEAP32[r+2>>>0],a={alpha:!!HEAP8[t+0>>>0],depth:!!HEAP8[t+1>>>0],stencil:!!HEAP8[t+2>>>0],antialias:!!HEAP8[t+3>>>0],premultipliedAlpha:!!HEAP8[t+4>>>0],preserveDrawingBuffer:!!HEAP8[t+5>>>0],powerPreference:webglPowerPreferences[n],failIfMajorPerformanceCaveat:!!HEAP8[t+12>>>0],majorVersion:HEAP32[r+4>>>0],minorVersion:HEAP32[r+5>>>0],enableExtensionsByDefault:HEAP8[t+24>>>0],explicitSwapControl:HEAP8[t+25>>>0],proxyContextToMainThread:HEAP32[r+7>>>0],renderViaOffscreenBackBuffer:HEAP8[t+32>>>0]},l=findCanvasEventTarget(e);if(!l||a.explicitSwapControl)return 0;var c=GL.createContext(l,a);return c}_emscripten_webgl_do_create_context.sig="ppp";var _emscripten_webgl_create_context=_emscripten_webgl_do_create_context;_emscripten_webgl_create_context.sig="ppp";function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}_emscripten_webgl_do_get_current_context.sig="p";var _emscripten_webgl_get_current_context=_emscripten_webgl_do_get_current_context;_emscripten_webgl_get_current_context.sig="p";var _emscripten_webgl_do_commit_frame=()=>!GL.currentContext||!GL.currentContext.GLctx||!GL.currentContext.attributes.explicitSwapControl?-3:0;_emscripten_webgl_do_commit_frame.sig="i";var _emscripten_webgl_commit_frame=_emscripten_webgl_do_commit_frame;_emscripten_webgl_commit_frame.sig="i";function _emscripten_webgl_make_context_current(e){e>>>=0;var t=GL.makeContextCurrent(e);return t?0:-5}_emscripten_webgl_make_context_current.sig="ip";function _emscripten_webgl_get_drawing_buffer_size(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=GL.getContext(e);return!n||!n.GLctx||!t||!r?-5:(HEAP32[t>>>2>>>0]=n.GLctx.drawingBufferWidth,HEAP32[r>>>2>>>0]=n.GLctx.drawingBufferHeight,0)}_emscripten_webgl_get_drawing_buffer_size.sig="ippp";function _emscripten_webgl_get_context_attributes(e,t){if(e>>>=0,t>>>=0,!t)return-5;if(e=GL.contexts[e],!e)return-3;var r=e.GLctx;if(!r)return-3;r=r.getContextAttributes(),HEAP8[t>>>0]=r.alpha,HEAP8[t+1>>>0]=r.depth,HEAP8[t+2>>>0]=r.stencil,HEAP8[t+3>>>0]=r.antialias,HEAP8[t+4>>>0]=r.premultipliedAlpha,HEAP8[t+5>>>0]=r.preserveDrawingBuffer;var n=r.powerPreference&&webglPowerPreferences.indexOf(r.powerPreference);return HEAP32[t+8>>>2>>>0]=n,HEAP8[t+12>>>0]=r.failIfMajorPerformanceCaveat,HEAP32[t+16>>>2>>>0]=e.version,HEAP32[t+20>>>2>>>0]=0,HEAP8[t+24>>>0]=e.attributes.enableExtensionsByDefault,0}_emscripten_webgl_get_context_attributes.sig="ipp";function _emscripten_webgl_destroy_context(e){e>>>=0,GL.currentContext==e&&(GL.currentContext=0),GL.deleteContext(e)}_emscripten_webgl_destroy_context.sig="ip";function _emscripten_webgl_enable_extension(e,t){e>>>=0,t>>>=0;var r=GL.getContext(e),n=UTF8ToString(t);n.startsWith("GL_")&&(n=n.substr(3)),n=="ANGLE_instanced_arrays"&&webgl_enable_ANGLE_instanced_arrays(GLctx),n=="OES_vertex_array_object"&&webgl_enable_OES_vertex_array_object(GLctx),n=="WEBGL_draw_buffers"&&webgl_enable_WEBGL_draw_buffers(GLctx),n=="WEBGL_multi_draw"&&webgl_enable_WEBGL_multi_draw(GLctx),n=="EXT_polygon_offset_clamp"&&webgl_enable_EXT_polygon_offset_clamp(GLctx),n=="EXT_clip_control"&&webgl_enable_EXT_clip_control(GLctx),n=="WEBGL_polygon_mode"&&webgl_enable_WEBGL_polygon_mode(GLctx);var a=r.GLctx.getExtension(n);return!!a}_emscripten_webgl_enable_extension.sig="ipp";var _emscripten_supports_offscreencanvas=()=>0;_emscripten_supports_offscreencanvas.sig="i";var registerWebGlEventCallback=(e,t,r,n,a,l,c)=>{var u=(d=event)=>{getWasmTableEntry(n)(a,0,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:l,callbackfunc:n,handlerFunc:u,useCapture:r};JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_webglcontextlost_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerWebGlEventCallback(e,t,r,n,31,"webglcontextlost"),0}_emscripten_set_webglcontextlost_callback_on_thread.sig="ippipp";function _emscripten_set_webglcontextrestored_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerWebGlEventCallback(e,t,r,n,32,"webglcontextrestored"),0}_emscripten_set_webglcontextrestored_callback_on_thread.sig="ippipp";function _emscripten_is_webgl_context_lost(e){return e>>>=0,!GL.contexts[e]||GL.contexts[e].GLctx.isContextLost()}_emscripten_is_webgl_context_lost.sig="ip";function _emscripten_webgl_get_supported_extensions(){return stringToNewUTF8(GLctx.getSupportedExtensions().join(" "))}_emscripten_webgl_get_supported_extensions.sig="p";var _emscripten_webgl_get_program_parameter_d=(e,t)=>GLctx.getProgramParameter(GL.programs[e],t);_emscripten_webgl_get_program_parameter_d.sig="dii";function _emscripten_webgl_get_program_info_log_utf8(e){return stringToNewUTF8(GLctx.getProgramInfoLog(GL.programs[e]))}_emscripten_webgl_get_program_info_log_utf8.sig="pi";var _emscripten_webgl_get_shader_parameter_d=(e,t)=>GLctx.getShaderParameter(GL.shaders[e],t);_emscripten_webgl_get_shader_parameter_d.sig="dii";function _emscripten_webgl_get_shader_info_log_utf8(e){return stringToNewUTF8(GLctx.getShaderInfoLog(GL.shaders[e]))}_emscripten_webgl_get_shader_info_log_utf8.sig="pi";function _emscripten_webgl_get_shader_source_utf8(e){return stringToNewUTF8(GLctx.getShaderSource(GL.shaders[e]))}_emscripten_webgl_get_shader_source_utf8.sig="pi";var _emscripten_webgl_get_vertex_attrib_d=(e,t)=>GLctx.getVertexAttrib(e,t);_emscripten_webgl_get_vertex_attrib_d.sig="dii";var _emscripten_webgl_get_vertex_attrib_o=(e,t)=>{var r=GLctx.getVertexAttrib(e,t);return r==null?void 0:r.name};_emscripten_webgl_get_vertex_attrib_o.sig="iii";function _emscripten_webgl_get_vertex_attrib_v(e,t,r,n,a){return r>>>=0,writeGLArray(GLctx.getVertexAttrib(e,t),r,n,a)}_emscripten_webgl_get_vertex_attrib_v.sig="iiipii";var _emscripten_webgl_get_uniform_d=(e,t)=>GLctx.getUniform(GL.programs[e],webglGetUniformLocation(t));_emscripten_webgl_get_uniform_d.sig="dii";function _emscripten_webgl_get_uniform_v(e,t,r,n,a){return r>>>=0,writeGLArray(GLctx.getUniform(GL.programs[e],webglGetUniformLocation(t)),r,n,a)}_emscripten_webgl_get_uniform_v.sig="iiipii";function _emscripten_webgl_get_parameter_v(e,t,r,n){return t>>>=0,writeGLArray(GLctx.getParameter(e),t,r,n)}_emscripten_webgl_get_parameter_v.sig="iipii";var _emscripten_webgl_get_parameter_d=e=>GLctx.getParameter(e);_emscripten_webgl_get_parameter_d.sig="di";var _emscripten_webgl_get_parameter_o=e=>{var t=GLctx.getParameter(e);return t==null?void 0:t.name};_emscripten_webgl_get_parameter_o.sig="ii";function _emscripten_webgl_get_parameter_utf8(e){return stringToNewUTF8(GLctx.getParameter(e))}_emscripten_webgl_get_parameter_utf8.sig="pi";function _emscripten_webgl_get_parameter_i64v(e,t){return t>>>=0,writeI53ToI64(t,GLctx.getParameter(e))}_emscripten_webgl_get_parameter_i64v.sig="vip";var _glutPostRedisplay=()=>{GLUT.displayFunc&&!GLUT.requestedAnimationFrame&&(GLUT.requestedAnimationFrame=!0,MainLoop.requestAnimationFrame(()=>{GLUT.requestedAnimationFrame=!1,MainLoop.runIter(()=>getWasmTableEntry(GLUT.displayFunc)())}))};_glutPostRedisplay.sig="v";var GLUT={initTime:null,idleFunc:null,displayFunc:null,keyboardFunc:null,keyboardUpFunc:null,specialFunc:null,specialUpFunc:null,reshapeFunc:null,motionFunc:null,passiveMotionFunc:null,mouseFunc:null,buttons:0,modifiers:0,initWindowWidth:256,initWindowHeight:256,initDisplayMode:18,windowX:0,windowY:0,windowWidth:0,windowHeight:0,requestedAnimationFrame:!1,saveModifiers:e=>{GLUT.modifiers=0,e.shiftKey&&(GLUT.modifiers+=1),e.ctrlKey&&(GLUT.modifiers+=2),e.altKey&&(GLUT.modifiers+=4)},onMousemove:e=>{var t=Browser.mouseX,r=Browser.mouseY;Browser.calculateMouseEvent(e);var n=Browser.mouseX,a=Browser.mouseY;n==t&&a==r||(GLUT.buttons==0&&e.target==Module.canvas&&GLUT.passiveMotionFunc?(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.passiveMotionFunc)(t,r)):GLUT.buttons!=0&&GLUT.motionFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.motionFunc)(t,r)))},getSpecialKey:e=>{var t=null;switch(e){case 8:t=120;break;case 46:t=111;break;case 112:t=1;break;case 113:t=2;break;case 114:t=3;break;case 115:t=4;break;case 116:t=5;break;case 117:t=6;break;case 118:t=7;break;case 119:t=8;break;case 120:t=9;break;case 121:t=10;break;case 122:t=11;break;case 123:t=12;break;case 37:t=100;break;case 38:t=101;break;case 39:t=102;break;case 40:t=103;break;case 33:t=104;break;case 34:t=105;break;case 36:t=106;break;case 35:t=107;break;case 45:t=108;break;case 16:case 5:t=112;break;case 6:t=113;break;case 17:case 3:t=114;break;case 4:t=115;break;case 18:case 2:t=116;break;case 1:t=117;break}return t},getASCIIKey:e=>{if(e.ctrlKey||e.altKey||e.metaKey)return null;var t=e.keyCode;if(48<=t&&t<=57)return t;if(65<=t&&t<=90)return e.shiftKey?t:t+32;if(96<=t&&t<=105)return t-48;if(106<=t&&t<=111)return t-106+42;switch(t){case 9:case 13:case 27:case 32:case 61:return t}var r=e.shiftKey;switch(t){case 186:return r?58:59;case 187:return r?43:61;case 188:return r?60:44;case 189:return r?95:45;case 190:return r?62:46;case 191:return r?63:47;case 219:return r?123:91;case 220:return r?124:47;case 221:return r?125:93;case 222:return r?34:39}return null},onKeydown:e=>{if(GLUT.specialFunc||GLUT.keyboardFunc){var t=GLUT.getSpecialKey(e.keyCode);t!==null?GLUT.specialFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.specialFunc)(t,Browser.mouseX,Browser.mouseY)):(t=GLUT.getASCIIKey(e),t!==null&&GLUT.keyboardFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.keyboardFunc)(t,Browser.mouseX,Browser.mouseY)))}},onKeyup:e=>{if(GLUT.specialUpFunc||GLUT.keyboardUpFunc){var t=GLUT.getSpecialKey(e.keyCode);t!==null?GLUT.specialUpFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.specialUpFunc)(t,Browser.mouseX,Browser.mouseY)):(t=GLUT.getASCIIKey(e),t!==null&&GLUT.keyboardUpFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.keyboardUpFunc)(t,Browser.mouseX,Browser.mouseY)))}},touchHandler:e=>{if(e.target==Module.canvas){var t=e.changedTouches,r=t[0],n="";switch(e.type){case"touchstart":n="mousedown";break;case"touchmove":n="mousemove";break;case"touchend":n="mouseup";break;default:return}var a=document.createEvent("MouseEvent");a.initMouseEvent(n,!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),r.target.dispatchEvent(a),e.preventDefault()}},onMouseButtonDown:e=>{if(Browser.calculateMouseEvent(e),GLUT.buttons|=1<{Browser.calculateMouseEvent(e),GLUT.buttons&=~(1<{Browser.calculateMouseEvent(e);var t=-Browser.getMouseWheelDelta(e);t=t==0?0:t>0?Math.max(t,1):Math.min(t,-1);var r=3;t<0&&(r=4),GLUT.mouseFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.mouseFunc)(r,0,Browser.mouseX,Browser.mouseY))},onFullscreenEventChange:e=>{var t,r;document.fullscreen||document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen?(t=screen.width,r=screen.height):(t=GLUT.windowWidth,r=GLUT.windowHeight,document.removeEventListener("fullscreenchange",GLUT.onFullscreenEventChange,!0),document.removeEventListener("mozfullscreenchange",GLUT.onFullscreenEventChange,!0),document.removeEventListener("webkitfullscreenchange",GLUT.onFullscreenEventChange,!0)),Browser.setCanvasSize(t,r,!0),GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(t,r),_glutPostRedisplay()}},_glutGetModifiers=()=>GLUT.modifiers;_glutGetModifiers.sig="i";function _glutInit(e,t){GLUT.initTime=Date.now();var r="ontouchstart"in document.documentElement;r&&(window.addEventListener("touchmove",GLUT.touchHandler,!0),window.addEventListener("touchstart",GLUT.touchHandler,!0),window.addEventListener("touchend",GLUT.touchHandler,!0)),window.addEventListener("keydown",GLUT.onKeydown,!0),window.addEventListener("keyup",GLUT.onKeyup,!0),window.addEventListener("mousemove",GLUT.onMousemove,!0),window.addEventListener("mousedown",GLUT.onMouseButtonDown,!0),window.addEventListener("mouseup",GLUT.onMouseButtonUp,!0),window.addEventListener("mousewheel",GLUT.onMouseWheel,!0),window.addEventListener("DOMMouseScroll",GLUT.onMouseWheel,!0),Browser.resizeListeners.push((n,a)=>{GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(n,a)})}_glutInit.sig="vpp";var _glutInitWindowSize=(e,t)=>{Browser.setCanvasSize(GLUT.initWindowWidth=e,GLUT.initWindowHeight=t)};_glutInitWindowSize.sig="vii";var _glutInitWindowPosition=(e,t)=>{};_glutInitWindowPosition.sig="vii";var _glutGet=e=>{switch(e){case 100:return 0;case 101:return 0;case 102:return Module.canvas.width;case 103:return Module.canvas.height;case 200:return Module.canvas.width;case 201:return Module.canvas.height;case 500:return 0;case 501:return 0;case 502:return GLUT.initWindowWidth;case 503:return GLUT.initWindowHeight;case 700:var t=Date.now();return t-GLUT.initTime;case 105:return Module.ctx.getContextAttributes().stencil?8:0;case 106:return Module.ctx.getContextAttributes().depth?8:0;case 110:return Module.ctx.getContextAttributes().alpha?8:0;case 120:return Module.ctx.getContextAttributes().antialias?1:0;default:throw"glutGet("+e+") not implemented yet"}};_glutGet.sig="ii";function _glutIdleFunc(e){e>>>=0;function t(){GLUT.idleFunc&&(getWasmTableEntry(GLUT.idleFunc)(),safeSetTimeout(t,4))}GLUT.idleFunc||safeSetTimeout(t,0),GLUT.idleFunc=e}_glutIdleFunc.sig="vp";var _glutTimerFunc=function(e,t,r){return t>>>=0,safeSetTimeout(()=>getWasmTableEntry(t)(r),e)};_glutTimerFunc.sig="vipi";function _glutDisplayFunc(e){e>>>=0,GLUT.displayFunc=e}_glutDisplayFunc.sig="vp";function _glutKeyboardFunc(e){e>>>=0,GLUT.keyboardFunc=e}_glutKeyboardFunc.sig="vp";function _glutKeyboardUpFunc(e){e>>>=0,GLUT.keyboardUpFunc=e}_glutKeyboardUpFunc.sig="vp";function _glutSpecialFunc(e){e>>>=0,GLUT.specialFunc=e}_glutSpecialFunc.sig="vp";function _glutSpecialUpFunc(e){e>>>=0,GLUT.specialUpFunc=e}_glutSpecialUpFunc.sig="vp";function _glutReshapeFunc(e){e>>>=0,GLUT.reshapeFunc=e}_glutReshapeFunc.sig="vp";function _glutMotionFunc(e){e>>>=0,GLUT.motionFunc=e}_glutMotionFunc.sig="vp";function _glutPassiveMotionFunc(e){e>>>=0,GLUT.passiveMotionFunc=e}_glutPassiveMotionFunc.sig="vp";function _glutMouseFunc(e){e>>>=0,GLUT.mouseFunc=e}_glutMouseFunc.sig="vp";var _glutSetCursor=e=>{var t="auto";switch(e){case 0:break;case 1:break;case 2:t="pointer";break;case 3:break;case 4:t="help";break;case 5:break;case 6:break;case 7:t="wait";break;case 8:t="text";break;case 9:case 102:t="crosshair";break;case 10:t="ns-resize";break;case 11:t="ew-resize";break;case 12:t="n-resize";break;case 13:t="s-resize";break;case 14:t="w-resize";break;case 15:t="e-resize";break;case 16:t="nw-resize";break;case 17:t="ne-resize";break;case 18:t="se-resize";break;case 19:t="sw-resize";break;case 100:break;case 101:t="none";break;default:throw"glutSetCursor: Unknown cursor type: "+e}Module.canvas.style.cursor=t};_glutSetCursor.sig="vi";function _glutCreateWindow(e){var t={antialias:(GLUT.initDisplayMode&128)!=0,depth:(GLUT.initDisplayMode&16)!=0,stencil:(GLUT.initDisplayMode&32)!=0,alpha:(GLUT.initDisplayMode&8)!=0};return Module.ctx=Browser.createContext(Module.canvas,!0,!0,t),Module.ctx?1:0}_glutCreateWindow.sig="ip";var _glutDestroyWindow=e=>(delete Module.ctx,1);_glutDestroyWindow.sig="vi";var _glutReshapeWindow=(e,t)=>{Browser.exitFullscreen(),Browser.setCanvasSize(e,t,!0),GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(e,t),_glutPostRedisplay()};_glutReshapeWindow.sig="vii";var _glutPositionWindow=(e,t)=>{Browser.exitFullscreen(),_glutPostRedisplay()};_glutPositionWindow.sig="vii";var _glutFullScreen=()=>{GLUT.windowX=0,GLUT.windowY=0,GLUT.windowWidth=Module.canvas.width,GLUT.windowHeight=Module.canvas.height,document.addEventListener("fullscreenchange",GLUT.onFullscreenEventChange,!0),document.addEventListener("mozfullscreenchange",GLUT.onFullscreenEventChange,!0),document.addEventListener("webkitfullscreenchange",GLUT.onFullscreenEventChange,!0),Browser.requestFullscreen(!1,!1)};_glutFullScreen.sig="v";var _glutInitDisplayMode=e=>GLUT.initDisplayMode=e;_glutInitDisplayMode.sig="vi";var _glutSwapBuffers=()=>{};_glutSwapBuffers.sig="v";var _glutMainLoop=()=>{throw _glutReshapeWindow(Module.canvas.width,Module.canvas.height),_glutPostRedisplay(),"unwind"};_glutMainLoop.sig="v";function _XOpenDisplay(e){return 1}_XOpenDisplay.sig="pp";function _XCreateWindow(e,t,r,n,a,l,c,u,_,d,p,f){return Browser.setCanvasSize(a,l),2}_XCreateWindow.sig="pppiiiiiiippp";function _XChangeWindowAttributes(e,t,r,n){}_XChangeWindowAttributes.sig="ipppp";function _XSetWMHints(e,t,r){}_XSetWMHints.sig="ippp";function _XMapWindow(e,t){}_XMapWindow.sig="ipp";function _XStoreName(e,t,r){}_XStoreName.sig="ippp";function _XInternAtom(e,t,r){return 0}_XInternAtom.sig="pppi";function _XSendEvent(e,t,r,n,a){}_XSendEvent.sig="ippipp";function _XPending(e){return 0}_XPending.sig="ip";var EGL={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode(e){EGL.errorCode=e},chooseConfig(e,t,r,n,a){if(e!=62e3)return EGL.setErrorCode(12296),0;if(t)for(;;){var l=HEAP32[t>>>2>>>0];if(l==12321){var c=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.alpha=c>0}else if(l==12325){var u=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.depth=u>0}else if(l==12326){var _=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.stencil=_>0}else if(l==12337){var d=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.antialias=d>0}else if(l==12338){var d=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.antialias=d==1}else if(l==12544){var p=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.lowLatency=p!=12547}else if(l==12344)break;t+=8}return(!r||!n)&&!a?(EGL.setErrorCode(12300),0):(a&&(HEAP32[a>>>2>>>0]=1),r&&n>0&&(HEAPU32[r>>>2>>>0]=62002),EGL.setErrorCode(12288),1)}};function _eglGetDisplay(e){return e>>>=0,EGL.setErrorCode(12288),e!=0&&e!=1?0:62e3}_eglGetDisplay.sig="pp";function _eglInitialize(e,t,r){return e>>>=0,t>>>=0,r>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(t&&(HEAP32[t>>>2>>>0]=1),r&&(HEAP32[r>>>2>>>0]=4),EGL.defaultDisplayInitialized=!0,EGL.setErrorCode(12288),1)}_eglInitialize.sig="ippp";function _eglTerminate(e){return e>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(EGL.currentContext=0,EGL.currentReadSurface=0,EGL.currentDrawSurface=0,EGL.defaultDisplayInitialized=!1,EGL.setErrorCode(12288),1)}_eglTerminate.sig="ip";function _eglGetConfigs(e,t,r,n){return e>>>=0,t>>>=0,n>>>=0,EGL.chooseConfig(e,0,t,r,n)}_eglGetConfigs.sig="ippip";function _eglChooseConfig(e,t,r,n,a){return e>>>=0,t>>>=0,r>>>=0,a>>>=0,EGL.chooseConfig(e,t,r,n,a)}_eglChooseConfig.sig="ipppip";function _eglGetConfigAttrib(e,t,r,n){if(e>>>=0,t>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(t!=62002)return EGL.setErrorCode(12293),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),r){case 12320:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.alpha?32:24,1;case 12321:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.alpha?8:0,1;case 12322:return HEAP32[n>>>2>>>0]=8,1;case 12323:return HEAP32[n>>>2>>>0]=8,1;case 12324:return HEAP32[n>>>2>>>0]=8,1;case 12325:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.depth?24:0,1;case 12326:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.stencil?8:0,1;case 12327:return HEAP32[n>>>2>>>0]=12344,1;case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12329:return HEAP32[n>>>2>>>0]=0,1;case 12330:return HEAP32[n>>>2>>>0]=4096,1;case 12331:return HEAP32[n>>>2>>>0]=16777216,1;case 12332:return HEAP32[n>>>2>>>0]=4096,1;case 12333:return HEAP32[n>>>2>>>0]=0,1;case 12334:return HEAP32[n>>>2>>>0]=0,1;case 12335:return HEAP32[n>>>2>>>0]=12344,1;case 12337:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.antialias?4:0,1;case 12338:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.antialias?1:0,1;case 12339:return HEAP32[n>>>2>>>0]=4,1;case 12340:return HEAP32[n>>>2>>>0]=12344,1;case 12341:case 12342:case 12343:return HEAP32[n>>>2>>>0]=-1,1;case 12345:case 12346:return HEAP32[n>>>2>>>0]=0,1;case 12347:return HEAP32[n>>>2>>>0]=0,1;case 12348:return HEAP32[n>>>2>>>0]=1,1;case 12349:case 12350:return HEAP32[n>>>2>>>0]=0,1;case 12351:return HEAP32[n>>>2>>>0]=12430,1;case 12352:return HEAP32[n>>>2>>>0]=4,1;case 12354:return HEAP32[n>>>2>>>0]=0,1;default:return EGL.setErrorCode(12292),0}}_eglGetConfigAttrib.sig="ippip";function _eglCreateWindowSurface(e,t,r,n){return e>>>=0,t>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):t!=62002?(EGL.setErrorCode(12293),0):(EGL.setErrorCode(12288),62006)}_eglCreateWindowSurface.sig="pppip";function _eglDestroySurface(e,t){return e>>>=0,t>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):t!=62006?(EGL.setErrorCode(12301),1):(EGL.currentReadSurface==t&&(EGL.currentReadSurface=0),EGL.currentDrawSurface==t&&(EGL.currentDrawSurface=0),EGL.setErrorCode(12288),1)}_eglDestroySurface.sig="ipp";function _eglCreateContext(e,t,r,n){if(e>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;for(var a=1;;){var l=HEAP32[n>>>2>>>0];if(l==12440)a=HEAP32[n+4>>>2>>>0];else{if(l==12344)break;return EGL.setErrorCode(12292),0}n+=8}return a!=2?(EGL.setErrorCode(12293),0):(EGL.contextAttributes.majorVersion=a-1,EGL.contextAttributes.minorVersion=0,EGL.context=GL.createContext(Module.canvas,EGL.contextAttributes),EGL.context!=0?(EGL.setErrorCode(12288),GL.makeContextCurrent(EGL.context),Browser.useWebGL=!0,Browser.moduleContextCreatedCallbacks.forEach(c=>c()),GL.makeContextCurrent(null),62004):(EGL.setErrorCode(12297),0))}_eglCreateContext.sig="ppppp";function _eglDestroyContext(e,t){return e>>>=0,t>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):t!=62004?(EGL.setErrorCode(12294),0):(GL.deleteContext(EGL.context),EGL.setErrorCode(12288),EGL.currentContext==t&&(EGL.currentContext=0),1)}_eglDestroyContext.sig="ipp";function _eglQuerySurface(e,t,r,n){if(e>>>=0,t>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(t!=62006)return EGL.setErrorCode(12301),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),r){case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12376:return 1;case 12375:return HEAP32[n>>>2>>>0]=Module.canvas.width,1;case 12374:return HEAP32[n>>>2>>>0]=Module.canvas.height,1;case 12432:return HEAP32[n>>>2>>>0]=-1,1;case 12433:return HEAP32[n>>>2>>>0]=-1,1;case 12434:return HEAP32[n>>>2>>>0]=-1,1;case 12422:return HEAP32[n>>>2>>>0]=12420,1;case 12441:return HEAP32[n>>>2>>>0]=12442,1;case 12435:return HEAP32[n>>>2>>>0]=12437,1;case 12416:case 12417:case 12418:case 12419:return 1;default:return EGL.setErrorCode(12292),0}}_eglQuerySurface.sig="ippip";function _eglQueryContext(e,t,r,n){if(e>>>=0,t>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(t!=62004)return EGL.setErrorCode(12294),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),r){case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12439:return HEAP32[n>>>2>>>0]=12448,1;case 12440:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.majorVersion+1,1;case 12422:return HEAP32[n>>>2>>>0]=12420,1;default:return EGL.setErrorCode(12292),0}}_eglQueryContext.sig="ippip";var _eglGetError=()=>EGL.errorCode;_eglGetError.sig="i";function _eglQueryString(e,t){if(e>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(EGL.setErrorCode(12288),EGL.stringCache[t])return EGL.stringCache[t];var r;switch(t){case 12371:r=stringToNewUTF8("Emscripten");break;case 12372:r=stringToNewUTF8("1.4 Emscripten EGL");break;case 12373:r=stringToNewUTF8("");break;case 12429:r=stringToNewUTF8("OpenGL_ES");break;default:return EGL.setErrorCode(12300),0}return EGL.stringCache[t]=r,r}_eglQueryString.sig="ppi";var _eglBindAPI=e=>e==12448?(EGL.setErrorCode(12288),1):(EGL.setErrorCode(12300),0);_eglBindAPI.sig="ii";var _eglQueryAPI=()=>(EGL.setErrorCode(12288),12448);_eglQueryAPI.sig="i";var _eglWaitClient=()=>(EGL.setErrorCode(12288),1);_eglWaitClient.sig="i";var _eglWaitNative=e=>(EGL.setErrorCode(12288),1);_eglWaitNative.sig="ii";var _eglWaitGL=_eglWaitClient;_eglWaitGL.sig="i";function _eglSwapInterval(e,t){return e>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(t==0?_emscripten_set_main_loop_timing(0,0):_emscripten_set_main_loop_timing(1,t),EGL.setErrorCode(12288),1)}_eglSwapInterval.sig="ipi";function _eglMakeCurrent(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):n!=0&&n!=62004?(EGL.setErrorCode(12294),0):r!=0&&r!=62006||t!=0&&t!=62006?(EGL.setErrorCode(12301),0):(GL.makeContextCurrent(n?EGL.context:null),EGL.currentContext=n,EGL.currentDrawSurface=t,EGL.currentReadSurface=r,EGL.setErrorCode(12288),1)}_eglMakeCurrent.sig="ipppp";function _eglGetCurrentContext(){return EGL.currentContext}_eglGetCurrentContext.sig="p";function _eglGetCurrentSurface(e){return e==12378?EGL.currentReadSurface:e==12377?EGL.currentDrawSurface:(EGL.setErrorCode(12300),0)}_eglGetCurrentSurface.sig="pi";function _eglGetCurrentDisplay(){return EGL.currentContext?62e3:0}_eglGetCurrentDisplay.sig="p";function _eglSwapBuffers(e,t){if(!EGL.defaultDisplayInitialized)EGL.setErrorCode(12289);else if(!Module.ctx)EGL.setErrorCode(12290);else if(Module.ctx.isContextLost())EGL.setErrorCode(12302);else return EGL.setErrorCode(12288),1;return 0}_eglSwapBuffers.sig="ipp";var _eglReleaseThread=()=>(EGL.currentContext=0,EGL.currentReadSurface=0,EGL.currentDrawSurface=0,EGL.setErrorCode(12288),1);_eglReleaseThread.sig="i";function _uuid_clear(e){return e>>>=0,zeroMemory(e,16)}_uuid_clear.sig="vp";function _uuid_compare(e,t){return e>>>=0,t>>>=0,_memcmp(e,t,16)}_uuid_compare.sig="ipp";function _uuid_copy(e,t){return e>>>=0,t>>>=0,_memcpy(e,t,16)}_uuid_copy.sig="vpp";function _uuid_generate(e){e>>>=0;var t=null;if(ENVIRONMENT_IS_NODE)try{var r=xn("crypto").randomBytes;t=r(16)}catch{}else ENVIRONMENT_IS_WEB&&typeof window.crypto<"u"&&typeof window.crypto.getRandomValues<"u"&&(t=new Uint8Array(16),window.crypto.getRandomValues(t));if(!t){t=new Array(16);for(var n=new Date().getTime(),a=0;a<16;a++){var l=(n+Math.random()*256)%256|0;n=n/256|0,t[a]=l}}t[6]=t[6]&15|64,t[8]=t[8]&63|128,writeArrayToMemory(t,e)}_uuid_generate.sig="vp";function _uuid_is_null(e){e>>>=0;for(var t=0;t<4;t++,e=e+4|0){var r=HEAP32[e>>>2>>>0];if(r)return 0}return 1}_uuid_is_null.sig="ip";function _uuid_parse(e,t){if(e>>>=0,t>>>=0,e=UTF8ToString(e),e.length===36){var r=0,n=new Array(16);return e.toLowerCase().replace(/[0-9a-f]{2}/g,function(a){r<16&&(n[r++]=parseInt(a,16))}),r<16?-1:(writeArrayToMemory(n,t),0)}return-1}_uuid_parse.sig="ipp";function _uuid_unparse(e,t,r){e>>>=0,t>>>=0;var n=0,a="xxxx-xx-xx-xx-xxxxxx".replace(/[x]/g,function(l){var c=r?HEAPU8[e+n>>>0].toString(16).toUpperCase():HEAPU8[e+n>>>0].toString(16);return c=c.length===1?"0"+c:c,n++,c});stringToUTF8(a,t,37)}_uuid_unparse.sig="vpp";function _uuid_unparse_lower(e,t){e>>>=0,t>>>=0,_uuid_unparse(e,t)}_uuid_unparse_lower.sig="vpp";function _uuid_unparse_upper(e,t){e>>>=0,t>>>=0,_uuid_unparse(e,t,!0)}_uuid_unparse_upper.sig="vpp";function _uuid_type(e){return 4}_uuid_type.sig="ip";function _uuid_variant(e){return 1}_uuid_variant.sig="ip";var GLEW={isLinaroFork:1,extensions:null,error:{0:null,1:null,2:null,3:null,4:null,5:null,6:null,7:null,8:null},version:{1:null,2:null,3:null,4:null},errorStringConstantFromCode(e){switch(e){case 4:return"OpenGL ES lib expected, found OpenGL lib";case 5:return"OpenGL lib expected, found OpenGL ES lib";case 6:return"Missing EGL version";case 7:return"EGL 1.1 and up are supported"}switch(e){case 0:return"No error";case 1:return"Missing GL version";case 2:return"GL 1.1 and up are supported";case 3:return"GLX 1.2 and up are supported";default:return null}},errorString(e){if(!GLEW.error[e]){var t=GLEW.errorStringConstantFromCode(e);t||(t="Unknown error",e=8),GLEW.error[e]=stringToNewUTF8(t)}return GLEW.error[e]},versionStringConstantFromCode(e){switch(e){case 1:return"1.10.0";case 2:return"1";case 3:return"10";case 4:return"0";default:return null}},versionString(e){if(!GLEW.version[e]){var t=GLEW.versionStringConstantFromCode(e);if(!t)return 0;GLEW.version[e]=stringToNewUTF8(t)}return GLEW.version[e]},extensionIsSupported(e){return GLEW.extensions||(GLEW.extensions=webglGetExtensions()),GLEW.extensions.includes(e)?1:GLEW.extensions.includes("GL_"+e)}},_glewInit=()=>0;_glewInit.sig="i";function _glewIsSupported(e){e>>>=0;for(var t=UTF8ToString(e).split(" "),r=0;r>>=0,GLEW.extensionIsSupported(UTF8ToString(e))}_glewGetExtension.sig="ip";function _glewGetErrorString(e){return GLEW.errorString(e)}_glewGetErrorString.sig="pi";function _glewGetString(e){return GLEW.versionString(e)}_glewGetString.sig="pi";var IDBStore={indexedDB(){if(typeof indexedDB<"u")return indexedDB;var e=null;return typeof window=="object"&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),assert(e,"IDBStore used, but indexedDB not supported"),e},DB_VERSION:22,DB_STORE_NAME:"FILE_DATA",dbs:{},blobs:[0],getDB(e,t){var r=IDBStore.dbs[e];if(r)return t(null,r);var n;try{n=IDBStore.indexedDB().open(e,IDBStore.DB_VERSION)}catch(a){return t(a)}n.onupgradeneeded=a=>{var l=a.target.result,c=a.target.transaction;l.objectStoreNames.contains(IDBStore.DB_STORE_NAME)?c.objectStore(IDBStore.DB_STORE_NAME):l.createObjectStore(IDBStore.DB_STORE_NAME)},n.onsuccess=()=>{r=n.result,IDBStore.dbs[e]=r,t(null,r)},n.onerror=function(a){t(a.target.error||"unknown error"),a.preventDefault()}},getStore(e,t,r){IDBStore.getDB(e,(n,a)=>{if(n)return r(n);var l=a.transaction([IDBStore.DB_STORE_NAME],t);l.onerror=u=>{r(u.target.error||"unknown error"),u.preventDefault()};var c=l.objectStore(IDBStore.DB_STORE_NAME);r(null,c)})},getFile(e,t,r){IDBStore.getStore(e,"readonly",(n,a)=>{if(n)return r(n);var l=a.get(t);l.onsuccess=c=>{var u=c.target.result;return u?r(null,u):r("file ".concat(t," not found"))},l.onerror=r})},setFile(e,t,r,n){IDBStore.getStore(e,"readwrite",(a,l)=>{if(a)return n(a);var c=l.put(r,t);c.onsuccess=u=>n(),c.onerror=n})},deleteFile(e,t,r){IDBStore.getStore(e,"readwrite",(n,a)=>{if(n)return r(n);var l=a.delete(t);l.onsuccess=c=>r(),l.onerror=r})},existsFile(e,t,r){IDBStore.getStore(e,"readonly",(n,a)=>{if(n)return r(n);var l=a.count(t);l.onsuccess=c=>r(null,c.target.result>0),l.onerror=r})},clearStore(e,t){IDBStore.getStore(e,"readwrite",(r,n)=>{if(r)return t(r);var a=n.clear();a.onsuccess=l=>t(),a.onerror=t})}},_emscripten_idb_async_load=function(e,t,r,n,a){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,IDBStore.getFile(UTF8ToString(e),UTF8ToString(t),(l,c)=>{callUserCallback(()=>{if(l){a&&getWasmTableEntry(a)(r);return}var u=_malloc(c.length);HEAPU8.set(c,u>>>0),getWasmTableEntry(n)(r,u,c.length),_free(u)})})};_emscripten_idb_async_load.sig="vppppp";var _emscripten_idb_async_store=function(e,t,r,n,a,l,c){e>>>=0,t>>>=0,r>>>=0,a>>>=0,l>>>=0,c>>>=0,IDBStore.setFile(UTF8ToString(e),UTF8ToString(t),new Uint8Array(HEAPU8.subarray(r>>>0,r+n>>>0)),u=>{callUserCallback(()=>{if(u){c&&getWasmTableEntry(c)(a);return}l&&getWasmTableEntry(l)(a)})})};_emscripten_idb_async_store.sig="vpppippp";var _emscripten_idb_async_delete=function(e,t,r,n,a){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,IDBStore.deleteFile(UTF8ToString(e),UTF8ToString(t),l=>{callUserCallback(()=>{if(l){a&&getWasmTableEntry(a)(r);return}n&&getWasmTableEntry(n)(r)})})};_emscripten_idb_async_delete.sig="vppppp";var _emscripten_idb_async_exists=function(e,t,r,n,a){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,IDBStore.existsFile(UTF8ToString(e),UTF8ToString(t),(l,c)=>{callUserCallback(()=>{if(l){a&&getWasmTableEntry(a)(r);return}n&&getWasmTableEntry(n)(r,c)})})};_emscripten_idb_async_exists.sig="vppppp";var _emscripten_idb_async_clear=function(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0,IDBStore.clearStore(UTF8ToString(e),a=>{callUserCallback(()=>{if(a){n&&getWasmTableEntry(n)(t);return}r&&getWasmTableEntry(r)(t)})})};_emscripten_idb_async_clear.sig="vpppp";function _emscripten_idb_load(e,t,r,n,a){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_load, etc."}_emscripten_idb_load.sig="vppppp";function _emscripten_idb_store(e,t,r,n,a){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_store, etc."}_emscripten_idb_store.sig="vpppip";function _emscripten_idb_delete(e,t,r){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_delete, etc."}_emscripten_idb_delete.sig="vppp";function _emscripten_idb_exists(e,t,r,n){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_exists, etc."}_emscripten_idb_exists.sig="vpppp";function _emscripten_idb_clear(e,t){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_clear, etc."}_emscripten_idb_clear.sig="vpp";var _emscripten_sleep=()=>{throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep"};_emscripten_sleep.sig="vi";function _emscripten_wget(e,t){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_wget"}Module._emscripten_wget=_emscripten_wget,_emscripten_wget.sig="ipp";function _emscripten_scan_registers(e){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_scan_registers"}_emscripten_scan_registers.sig="vp";function _emscripten_fiber_swap(e,t){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_fiber_swap"}_emscripten_fiber_swap.sig="vpp";var _SDL_GetTicks=()=>Date.now()-SDL.startTime|0;_SDL_GetTicks.sig="i";function _SDL_LockSurface(e){e>>>=0;var t=SDL.surfaces[e];if(t.locked++,t.locked>1||(t.buffer||(t.buffer=_malloc(t.width*t.height*4),HEAPU32[e+20>>>2>>>0]=t.buffer),HEAPU32[e+20>>>2>>>0]=t.buffer,e==SDL.screen&&Module.screenIsReadOnly&&t.image))return 0;if(t.image=t.ctx.getImageData(0,0,t.width,t.height),e==SDL.screen&&SDL.defaults.opaqueFrontBuffer)for(var r=t.image.data,n=r.length,a=0;a>>0)}return 0}_SDL_LockSurface.sig="ip";var SDL={defaults:{width:320,height:200,copyOnLock:!0,discardOnLock:!1,opaqueFrontBuffer:!0},version:null,surfaces:{},canvasPool:[],events:[],fonts:[null],audios:[null],rwops:[null],music:{audio:null,volume:1},mixerFrequency:22050,mixerFormat:32784,mixerNumChannels:2,mixerChunkSize:1024,channelMinimumNumber:0,GL:!1,glAttributes:{0:3,1:3,2:2,3:0,4:0,5:1,6:16,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:1,16:0,17:0,18:0},keyboardState:null,keyboardMap:{},canRequestFullscreen:!1,isRequestingFullscreen:!1,textInput:!1,unicode:!1,ttfContext:null,audio:null,startTime:null,initFlags:0,buttonState:0,modState:0,DOMButtons:[0,0,0],DOMEventToSDLEvent:{},TOUCH_DEFAULT_ID:0,eventHandler:null,eventHandlerContext:null,eventHandlerTemp:0,keyCodes:{16:1249,17:1248,18:1250,20:1081,33:1099,34:1102,35:1101,36:1098,37:1104,38:1106,39:1103,40:1105,44:316,45:1097,46:127,91:1251,93:1125,96:1122,97:1113,98:1114,99:1115,100:1116,101:1117,102:1118,103:1119,104:1120,105:1121,106:1109,107:1111,109:1110,110:1123,111:1108,112:1082,113:1083,114:1084,115:1085,116:1086,117:1087,118:1088,119:1089,120:1090,121:1091,122:1092,123:1093,124:1128,125:1129,126:1130,127:1131,128:1132,129:1133,130:1134,131:1135,132:1136,133:1137,134:1138,135:1139,144:1107,160:94,161:33,162:34,163:35,164:36,165:37,166:38,167:95,168:40,169:41,170:42,171:43,172:124,173:45,174:123,175:125,176:126,181:127,182:129,183:128,188:44,190:46,191:47,192:96,219:91,220:92,221:93,222:39,224:1251},scanCodes:{8:42,9:43,13:40,27:41,32:44,35:204,39:53,44:54,46:55,47:56,48:39,49:30,50:31,51:32,52:33,53:34,54:35,55:36,56:37,57:38,58:203,59:51,61:46,91:47,92:49,93:48,96:52,97:4,98:5,99:6,100:7,101:8,102:9,103:10,104:11,105:12,106:13,107:14,108:15,109:16,110:17,111:18,112:19,113:20,114:21,115:22,116:23,117:24,118:25,119:26,120:27,121:28,122:29,127:76,305:224,308:226,316:70},loadRect(e){return{x:HEAP32[e>>>2>>>0],y:HEAP32[e+4>>>2>>>0],w:HEAP32[e+8>>>2>>>0],h:HEAP32[e+12>>>2>>>0]}},updateRect(e,t){HEAP32[e>>>2>>>0]=t.x,HEAP32[e+4>>>2>>>0]=t.y,HEAP32[e+8>>>2>>>0]=t.w,HEAP32[e+12>>>2>>>0]=t.h},intersectionOfRects(e,t){var r=Math.max(e.x,t.x),n=Math.max(e.y,t.y),a=Math.min(e.x+e.w,t.x+t.w),l=Math.min(e.y+e.h,t.y+t.h);return{x:r,y:n,w:Math.max(r,a)-r,h:Math.max(n,l)-n}},checkPixelFormat(e){},loadColorToCSSRGB(e){var t=HEAP32[e>>>2>>>0];return"rgb("+(t&255)+","+(t>>8&255)+","+(t>>16&255)+")"},loadColorToCSSRGBA(e){var t=HEAP32[e>>>2>>>0];return"rgba("+(t&255)+","+(t>>8&255)+","+(t>>16&255)+","+(t>>24&255)/255+")"},translateColorToCSSRGBA:e=>"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>>24)/255+")",translateRGBAToCSSRGBA:(e,t,r,n)=>"rgba("+(e&255)+","+(t&255)+","+(r&255)+","+(n&255)/255+")",translateRGBAToColor:(e,t,r,n)=>e|t<<8|r<<16|n<<24,makeSurface(e,t,r,n,a,l,c,u,_){var d=r&1,p=r&2097152,f=r&67108864,m=_malloc(60),g=_malloc(44),h=p?1:4,y=0;!d&&!f&&(y=_malloc(e*t*4)),HEAP32[m>>>2>>>0]=r,HEAPU32[m+4>>>2>>>0]=g,HEAP32[m+8>>>2>>>0]=e,HEAP32[m+12>>>2>>>0]=t,HEAP32[m+16>>>2>>>0]=e*h,HEAPU32[m+20>>>2>>>0]=y,HEAP32[m+36>>>2>>>0]=0,HEAP32[m+40>>>2>>>0]=0,HEAP32[m+44>>>2>>>0]=Module.canvas.width,HEAP32[m+48>>>2>>>0]=Module.canvas.height,HEAP32[m+56>>>2>>>0]=1,HEAP32[g>>>2>>>0]=-2042224636,HEAP32[g+4>>>2>>>0]=0,HEAP8[g+8>>>0]=h*8,HEAP8[g+9>>>0]=h,HEAP32[g+12>>>2>>>0]=l||255,HEAP32[g+16>>>2>>>0]=c||65280,HEAP32[g+20>>>2>>>0]=u||16711680,HEAP32[g+24>>>2>>>0]=_||4278190080,SDL.GL=SDL.GL||f;var b;n?b=Module.canvas:(SDL.canvasPool.length>0?b=SDL.canvasPool.pop():b=document.createElement("canvas"),b.width=e,b.height=t);var S={antialias:SDL.glAttributes[13]!=0&&SDL.glAttributes[14]>1,depth:SDL.glAttributes[6]>0,stencil:SDL.glAttributes[7]>0,alpha:SDL.glAttributes[3]>0},P=Browser.createContext(b,f,n,S);return SDL.surfaces[m]={width:e,height:t,canvas:b,ctx:P,surf:m,buffer:y,pixelFormat:g,alpha:255,flags:r,locked:0,usePageCanvas:n,source:a,isFlagSet:T=>r&T},m},copyIndexedColorData(e,t,r,n,a){if(e.colors){var l=Module.canvas.width,c=Module.canvas.height,u=t||0,_=r||0,d=(n||l-u)+u,p=(a||c-_)+_,f=e.buffer;e.image.data32||(e.image.data32=new Uint32Array(e.image.data.buffer));for(var m=e.image.data32,g=e.colors32,h=_;h>>0]]}},freeSurface(e){var t=e+56,r=HEAP32[t>>>2>>>0];if(r>1){HEAP32[t>>>2>>>0]=r-1;return}var n=SDL.surfaces[e];!n.usePageCanvas&&n.canvas&&SDL.canvasPool.push(n.canvas),n.buffer&&_free(n.buffer),_free(n.pixelFormat),_free(e),SDL.surfaces[e]=null,e===SDL.screen&&(SDL.screen=null)},blitSurface(e,t,r,n,a){var l=SDL.surfaces[e],c=SDL.surfaces[r],u,_;if(t?u=SDL.loadRect(t):u={x:0,y:0,w:l.width,h:l.height},n?_=SDL.loadRect(n):_={x:0,y:0,w:l.width,h:l.height},c.clipRect){var d=!a||u.w===0?1:u.w/_.w,p=!a||u.h===0?1:u.h/_.h;_=SDL.intersectionOfRects(c.clipRect,_),u.w=_.w*d,u.h=_.h*p,n&&SDL.updateRect(n,_)}var f,m;if(a?(f=_.w,m=_.h):(f=u.w,m=u.h),u.w===0||u.h===0||f===0||m===0)return 0;var g=c.ctx.globalAlpha;return c.ctx.globalAlpha=l.alpha/255,c.ctx.drawImage(l.canvas,u.x,u.y,u.w,u.h,_.x,_.y,f,m),c.ctx.globalAlpha=g,r!=SDL.screen&&(warnOnce("WARNING: copying canvas data to memory for compatibility"),_SDL_LockSurface(r),c.locked--),0},downFingers:{},savedKeydown:null,receiveEvent(e){function t(){for(var p in SDL.keyboardMap)SDL.events.push({type:"keyup",keyCode:SDL.keyboardMap[p]})}switch(e.type){case"touchstart":case"touchmove":{e.preventDefault();var r=[];if(e.type==="touchstart")for(var n=0;n0?Math.max(_,1):Math.min(_,-1);var d=_>0?3:4;SDL.events.push({type:"mousedown",button:d,pageX:e.pageX,pageY:e.pageY}),SDL.events.push({type:"mouseup",button:d,pageX:e.pageX,pageY:e.pageY}),SDL.events.push({type:"wheel",deltaX:0,deltaY:_}),e.preventDefault();break;case"mousemove":if(SDL.DOMButtons[0]===1&&SDL.events.push({type:"touchmove",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),Browser.pointerLock&&("mozMovementX"in e&&(e.movementX=e.mozMovementX,e.movementY=e.mozMovementY),e.movementX==0&&e.movementY==0)){e.preventDefault();return}case"keydown":case"keyup":case"keypress":case"mousedown":case"mouseup":if((e.type!=="keydown"||!SDL.unicode&&!SDL.textInput||e.keyCode===8||e.keyCode===9)&&e.preventDefault(),e.type=="mousedown")SDL.DOMButtons[e.button]=1,SDL.events.push({type:"touchstart",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}});else if(e.type=="mouseup"){if(!SDL.DOMButtons[e.button])return;SDL.events.push({type:"touchend",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),SDL.DOMButtons[e.button]=0}e.type==="keydown"||e.type==="mousedown"?SDL.canRequestFullscreen=!0:(e.type==="keyup"||e.type==="mouseup")&&(SDL.isRequestingFullscreen&&(Module.requestFullscreen(!0,!0),SDL.isRequestingFullscreen=!1),SDL.canRequestFullscreen=!1),e.type==="keypress"&&SDL.savedKeydown?(SDL.savedKeydown.keypressCharCode=e.charCode,SDL.savedKeydown=null):e.type==="keydown"&&(SDL.savedKeydown=e),(e.type!=="keypress"||SDL.textInput)&&SDL.events.push(e);break;case"mouseout":for(var n=0;n<3;n++)SDL.DOMButtons[n]&&(SDL.events.push({type:"mouseup",button:n,pageX:e.pageX,pageY:e.pageY}),SDL.DOMButtons[n]=0);e.preventDefault();break;case"focus":SDL.events.push(e),e.preventDefault();break;case"blur":SDL.events.push(e),t(),e.preventDefault();break;case"visibilitychange":SDL.events.push({type:"visibilitychange",visible:!document.hidden}),t(),e.preventDefault();break;case"unload":MainLoop.runner&&(SDL.events.push(e),MainLoop.runner());return;case"resize":SDL.events.push(e),e.preventDefault&&e.preventDefault();break}SDL.events.length>=1e4&&(err("SDL event queue full, dropping events"),SDL.events=SDL.events.slice(0,1e4)),SDL.flushEventsToHandler()},lookupKeyCodeForEvent(e){var t=e.keyCode;return t>=65&&t<=90?t+=32:(t=SDL.keyCodes[e.keyCode]||e.keyCode,e.location===2&&t>=1248&&t<=1251&&(t+=4)),t},handleEvent(e){if(!e.handled)switch(e.handled=!0,e.type){case"touchstart":case"touchend":case"touchmove":{Browser.calculateMouseEvent(e);break}case"keydown":case"keyup":{var t=e.type==="keydown",r=SDL.lookupKeyCodeForEvent(e);HEAP8[SDL.keyboardState+r>>>0]=t,SDL.modState=(HEAP8[SDL.keyboardState+1248>>>0]?64:0)|(HEAP8[SDL.keyboardState+1249>>>0]?1:0)|(HEAP8[SDL.keyboardState+1250>>>0]?256:0)|(HEAP8[SDL.keyboardState+1252>>>0]?128:0)|(HEAP8[SDL.keyboardState+1253>>>0]?2:0)|(HEAP8[SDL.keyboardState+1254>>>0]?512:0),t?SDL.keyboardMap[r]=e.keyCode:delete SDL.keyboardMap[r];break}case"mousedown":case"mouseup":e.type=="mousedown"?SDL.buttonState|=1<0;)if(SDL.makeCEvent(SDL.events.shift(),e)!==!1)return 1;return 0}return SDL.events.length>0},makeCEvent(e,t){if(typeof e=="number"){_memcpy(t,e,28),_free(e);return}switch(SDL.handleEvent(e),e.type){case"keydown":case"keyup":{var r=e.type==="keydown",n=SDL.lookupKeyCodeForEvent(e),a;n>=1024?a=n-1024:a=SDL.scanCodes[n]||n,HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[t+8>>>0]=r?1:0,HEAP8[t+9>>>0]=0,HEAP32[t+12>>>2>>>0]=a,HEAP32[t+16>>>2>>>0]=n,HEAP16[t+20>>>1>>>0]=SDL.modState,HEAP32[t+24>>>2>>>0]=e.keypressCharCode||n;break}case"keypress":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type];for(var l=intArrayFromString(String.fromCharCode(e.charCode)),c=0;c>>0]=l[c];break}case"mousedown":case"mouseup":case"mousemove":{if(e.type!="mousemove"){var r=e.type==="mousedown";HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP32[t+8>>>2>>>0]=0,HEAP32[t+12>>>2>>>0]=0,HEAP8[t+16>>>0]=e.button+1,HEAP8[t+17>>>0]=r?1:0,HEAP32[t+20>>>2>>>0]=Browser.mouseX,HEAP32[t+24>>>2>>>0]=Browser.mouseY}else HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP32[t+8>>>2>>>0]=0,HEAP32[t+12>>>2>>>0]=0,HEAP32[t+16>>>2>>>0]=SDL.buttonState,HEAP32[t+20>>>2>>>0]=Browser.mouseX,HEAP32[t+24>>>2>>>0]=Browser.mouseY,HEAP32[t+28>>>2>>>0]=Browser.mouseMovementX,HEAP32[t+32>>>2>>>0]=Browser.mouseMovementY;break}case"wheel":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+16>>>2>>>0]=e.deltaX,HEAP32[t+20>>>2>>>0]=e.deltaY;break}case"touchstart":case"touchend":case"touchmove":{var u=e.touch;if(!Browser.touches[u.identifier])break;var _=Module.canvas.width,d=Module.canvas.height,p=Browser.touches[u.identifier].x/_,f=Browser.touches[u.identifier].y/d,m=Browser.lastTouches[u.identifier].x/_,g=Browser.lastTouches[u.identifier].y/d,h=p-m,y=f-g;if(u.deviceID===void 0&&(u.deviceID=SDL.TOUCH_DEFAULT_ID),h===0&&y===0&&e.type==="touchmove")return!1;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=_SDL_GetTicks(),tempI64=[u.deviceID>>>0,(tempDouble=u.deviceID,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+8>>>2>>>0]=tempI64[0],HEAP32[t+12>>>2>>>0]=tempI64[1],tempI64=[u.identifier>>>0,(tempDouble=u.identifier,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+16>>>2>>>0]=tempI64[0],HEAP32[t+20>>>2>>>0]=tempI64[1],HEAPF32[t+24>>>2>>>0]=p,HEAPF32[t+28>>>2>>>0]=f,HEAPF32[t+32>>>2>>>0]=h,HEAPF32[t+36>>>2>>>0]=y,u.force!==void 0?HEAPF32[t+40>>>2>>>0]=u.force:HEAPF32[t+40>>>2>>>0]=e.type=="touchend"?0:1;break}case"unload":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type];break}case"resize":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=e.w,HEAP32[t+8>>>2>>>0]=e.h;break}case"joystick_button_up":case"joystick_button_down":{var b=e.type==="joystick_button_up"?0:1;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[t+4>>>0]=e.index,HEAP8[t+5>>>0]=e.button,HEAP8[t+6>>>0]=b;break}case"joystick_axis_motion":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[t+4>>>0]=e.index,HEAP8[t+5>>>0]=e.axis,HEAP32[t+8>>>2>>>0]=SDL.joystickAxisValueConversion(e.value);break}case"focus":{var S=12;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP8[t+8>>>0]=S;break}case"blur":{var P=13;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP8[t+8>>>0]=P;break}case"visibilitychange":{var T=1,A=2,M=e.visible?T:A;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP8[t+8>>>0]=M;break}default:throw"Unhandled SDL event: "+e.type}},makeFontString(e,t){return t.charAt(0)!="'"&&t.charAt(0)!='"'&&(t='"'+t+'"'),e+"px "+t+", serif"},estimateTextWidth(e,t){var r=e.size,n=SDL.makeFontString(r,e.name),a=SDL.ttfContext;a.font=n;var l=a.measureText(t).width|0;return l},allocateChannels(e){if(!(SDL.numChannels&&SDL.numChannels>=e&&e!=0)){SDL.numChannels=e,SDL.channels=[];for(var t=0;t{e.paused||SDL.playWebAudio(e)});return}e.webAudioNode=SDL.audioContext.createBufferSource(),e.webAudioNode.buffer=t.decodedBuffer,e.webAudioNode.loop=e.loop,e.webAudioNode.onended=e.onended,e.webAudioPannerNode=SDL.audioContext.createPanner(),e.webAudioPannerNode.setPosition(0,0,-.5),e.webAudioPannerNode.panningModel="equalpower",e.webAudioGainNode=SDL.audioContext.createGain(),e.webAudioGainNode.gain.value=e.volume,e.webAudioNode.connect(e.webAudioPannerNode),e.webAudioPannerNode.connect(e.webAudioGainNode),e.webAudioGainNode.connect(SDL.audioContext.destination),e.webAudioNode.start(0,e.currentPosition),e.startTime=SDL.audioContext.currentTime-e.currentPosition}catch(r){err("playWebAudio failed: ".concat(r))}},pauseWebAudio(e){if(e){if(e.webAudioNode)try{e.currentPosition=(SDL.audioContext.currentTime-e.startTime)%e.resource.webAudio.decodedBuffer.duration,e.webAudioNode.onended=void 0,e.webAudioNode.stop(0),e.webAudioNode=void 0}catch(t){err("pauseWebAudio failed: ".concat(t))}e.paused=!0}},openAudioContext(){SDL.audioContext||(typeof AudioContext<"u"?SDL.audioContext=new AudioContext:typeof webkitAudioContext<"u"&&(SDL.audioContext=new webkitAudioContext))},webAudioAvailable:()=>!!SDL.audioContext,fillWebAudioBufferFromHeap(e,t,r){for(var n=SDL.audio,a=n.channels,l=0;l>>1>>>0]/32768;else if(n.format==8)for(var u=0;u>>0];c[u]=(_>=0?_-128:_+128)/128}else if(n.format==33056)for(var u=0;u>>2>>>0];else throw"Invalid SDL audio format "+n.format+"!"}},joystickEventState:1,lastJoystickState:{},joystickNamePool:{},recordJoystickState(e,t){for(var r=new Array(t.buttons.length),n=0;n0},queryJoysticks(){for(var e in SDL.lastJoystickState){var t=SDL.getGamepad(e-1),r=SDL.lastJoystickState[e];if(typeof t>"u"||t===null)return;if(typeof t.timestamp!="number"||t.timestamp!=r.timestamp||!t.timestamp){var n;for(n=0;ne&&e>=0?t[e]:null}};function _SDL_Linked_Version(){return SDL.version===null&&(SDL.version=_malloc(3),HEAP8[SDL.version>>>0]=1,HEAP8[SDL.version+1>>>0]=3,HEAP8[SDL.version+2>>>0]=0),SDL.version}_SDL_Linked_Version.sig="p";var _SDL_Init=e=>{if(SDL.startTime=Date.now(),SDL.initFlags=e,!Module.doNotCaptureKeyboard){var t=Module.keyboardListeningElement||document;t.addEventListener("keydown",SDL.receiveEvent),t.addEventListener("keyup",SDL.receiveEvent),t.addEventListener("keypress",SDL.receiveEvent),window.addEventListener("focus",SDL.receiveEvent),window.addEventListener("blur",SDL.receiveEvent),document.addEventListener("visibilitychange",SDL.receiveEvent)}return window.addEventListener("unload",SDL.receiveEvent),SDL.keyboardState=_calloc(65536,1),SDL.DOMEventToSDLEvent.keydown=768,SDL.DOMEventToSDLEvent.keyup=769,SDL.DOMEventToSDLEvent.keypress=771,SDL.DOMEventToSDLEvent.mousedown=1025,SDL.DOMEventToSDLEvent.mouseup=1026,SDL.DOMEventToSDLEvent.mousemove=1024,SDL.DOMEventToSDLEvent.wheel=1027,SDL.DOMEventToSDLEvent.touchstart=1792,SDL.DOMEventToSDLEvent.touchend=1793,SDL.DOMEventToSDLEvent.touchmove=1794,SDL.DOMEventToSDLEvent.unload=256,SDL.DOMEventToSDLEvent.resize=28673,SDL.DOMEventToSDLEvent.visibilitychange=512,SDL.DOMEventToSDLEvent.focus=512,SDL.DOMEventToSDLEvent.blur=512,SDL.DOMEventToSDLEvent.joystick_axis_motion=1536,SDL.DOMEventToSDLEvent.joystick_button_down=1539,SDL.DOMEventToSDLEvent.joystick_button_up=1540,0};_SDL_Init.sig="ii";var _SDL_WasInit=e=>(SDL.startTime===null&&_SDL_Init(0),1);_SDL_WasInit.sig="ii";function _SDL_GetVideoInfo(){var e=_calloc(20,1);return HEAP32[e+12>>>2>>>0]=Module.canvas.width,HEAP32[e+16>>>2>>>0]=Module.canvas.height,e}_SDL_GetVideoInfo.sig="p";function _SDL_ListModes(e,t){return-1}_SDL_ListModes.sig="ppi";var _SDL_VideoModeOK=(e,t,r,n)=>r;_SDL_VideoModeOK.sig="iiiii";function _SDL_VideoDriverName(e,t){if(e>>>=0,SDL.startTime===null)return 0;var r=[101,109,115,99,114,105,112,116,101,110,95,115,100,108,95,100,114,105,118,101,114],n=0,a=r.length;for(t<=a&&(a=t-1);n>>0]=l,n++}return HEAP8[e+n>>>0]=0,e}_SDL_VideoDriverName.sig="ppi";var _SDL_AudioDriverName=_SDL_VideoDriverName;_SDL_AudioDriverName.sig="ppi";var _SDL_SetVideoMode=function(e,t,r,n){["touchstart","touchend","touchmove","mousedown","mouseup","mousemove","mousewheel","wheel","mouseout","DOMMouseScroll"].forEach(l=>Module.canvas.addEventListener(l,SDL.receiveEvent,!0));var a=Module.canvas;return e==0&&t==0&&(e=a.width,t=a.height),SDL.addedResizeListener||(SDL.addedResizeListener=!0,Browser.resizeListeners.push((l,c)=>{SDL.settingVideoMode||SDL.receiveEvent({type:"resize",w:l,h:c})})),SDL.settingVideoMode=!0,Browser.setCanvasSize(e,t),SDL.settingVideoMode=!1,SDL.screen&&(SDL.freeSurface(SDL.screen),assert(!SDL.screen)),SDL.GL&&(n=n|67108864),SDL.screen=SDL.makeSurface(e,t,n,!0,"screen"),SDL.screen};_SDL_SetVideoMode.sig="piiii";function _SDL_GetVideoSurface(){return SDL.screen}_SDL_GetVideoSurface.sig="p";var _SDL_AudioQuit=()=>{for(var e=0;eout("SDL_VideoQuit called (and ignored)");_SDL_VideoQuit.sig="v";var _SDL_QuitSubSystem=e=>out("SDL_QuitSubSystem called (and ignored)");_SDL_QuitSubSystem.sig="vi";var _SDL_Quit=()=>{_SDL_AudioQuit(),out("SDL_Quit called (and ignored)")};_SDL_Quit.sig="v";function _SDL_UnlockSurface(e){e>>>=0,assert(!SDL.GL);var t=SDL.surfaces[e];if(!(!t.locked||--t.locked>0)){if(t.isFlagSet(2097152))SDL.copyIndexedColorData(t);else if(t.colors)for(var r=Module.canvas.width,n=Module.canvas.height,a=t.buffer,l=t.image.data,c=t.colors,u=0;u>>0]*4,f=_+d*4;l[f]=c[p],l[f+1]=c[p+1],l[f+2]=c[p+2]}a+=r*3}else{var l=t.image.data,m=t.buffer;assert(m%4==0,"Invalid buffer offset: "+m);var g=m>>>2,h=0,y=e==SDL.screen,b;if(typeof CanvasPixelArray<"u"&&l instanceof CanvasPixelArray)for(b=l.length;h>>0];l[h]=p&255,l[h+1]=p>>8&255,l[h+2]=p>>16&255,l[h+3]=y?255:p>>24&255,g++,h+=4}else{var S=new Uint32Array(l.buffer);if(y&&SDL.defaults.opaqueFrontBuffer){b=S.length,S.set(HEAP32.subarray(g>>>0,g+b>>>0));var P=new Uint8Array(l.buffer),T=3,A=T+4*b;if(b%8==0)for(;T>>0,g+S.length>>>0))}}t.ctx.putImageData(t.image,0,0)}}_SDL_UnlockSurface.sig="vp";function _SDL_Flip(e){}_SDL_Flip.sig="ip";function _SDL_UpdateRect(e,t,r,n,a){}_SDL_UpdateRect.sig="vpiiii";function _SDL_UpdateRects(e,t,r){}_SDL_UpdateRects.sig="vpip";var _SDL_Delay=e=>{ENVIRONMENT_IS_WORKER||abort("SDL_Delay called on the main thread! Potential infinite loop, quitting. (consider building with async support like ASYNCIFY)")};_SDL_Delay.sig="vi";function _SDL_WM_SetCaption(e,t){e>>>=0,t>>>=0,e&&_emscripten_set_window_title(e),t&&(t=UTF8ToString(t))}_SDL_WM_SetCaption.sig="vpp";var _SDL_EnableKeyRepeat=(e,t)=>{};_SDL_EnableKeyRepeat.sig="iii";function _SDL_GetKeyboardState(e){return e>>>=0,e&&(HEAP32[e>>>2>>>0]=65536),SDL.keyboardState}_SDL_GetKeyboardState.sig="pp";var _SDL_GetKeyState=()=>_SDL_GetKeyboardState(0);function _SDL_GetKeyName(e){return SDL.keyName||(SDL.keyName=stringToNewUTF8("unknown key")),SDL.keyName}_SDL_GetKeyName.sig="pi";var _SDL_GetModState=()=>SDL.modState;_SDL_GetModState.sig="i";function _SDL_GetMouseState(e,t){return e>>>=0,t>>>=0,e&&(HEAP32[e>>>2>>>0]=Browser.mouseX),t&&(HEAP32[t>>>2>>>0]=Browser.mouseY),SDL.buttonState}_SDL_GetMouseState.sig="ipp";var _SDL_WarpMouse=(e,t)=>{};_SDL_WarpMouse.sig="vii";var _SDL_ShowCursor=e=>{switch(e){case 0:return Browser.isFullscreen?(Module.canvas.requestPointerLock(),0):1;case 1:return Module.canvas.exitPointerLock(),1;case-1:return!Browser.pointerLock;default:err("SDL_ShowCursor called with unknown toggle parameter value: ".concat(e));break}};_SDL_ShowCursor.sig="ii";function _SDL_GetError(){return SDL.errorMessage||(SDL.errorMessage=stringToNewUTF8("unknown SDL-emscripten error")),SDL.errorMessage}_SDL_GetError.sig="p";function _SDL_SetError(e,t){}_SDL_SetError.sig="vpp";function _SDL_CreateRGBSurface(e,t,r,n,a,l,c,u){return SDL.makeSurface(t,r,e,!1,"CreateRGBSurface",a,l,c,u)}_SDL_CreateRGBSurface.sig="piiiiiiii";function _SDL_CreateRGBSurfaceFrom(e,t,r,n,a,l,c,u,_){e>>>=0;var d=SDL.makeSurface(t,r,0,!1,"CreateRGBSurfaceFrom",l,c,u,_);if(n!==32)return err("TODO: Partially unimplemented SDL_CreateRGBSurfaceFrom called!"),d;for(var p=SDL.surfaces[d],f=p.ctx.createImageData(t,r),m=t*4,g=0;g>>0];return p.ctx.putImageData(f,0,0),d}_SDL_CreateRGBSurfaceFrom.sig="ppiiiiiiii";function _SDL_ConvertSurface(e,t,r){e>>>=0;var n=SDL.surfaces[e],a=SDL.makeSurface(n.width,n.height,n.flags,!1,"copy:"+n.source),l=SDL.surfaces[a];return l.ctx.globalCompositeOperation="copy",l.ctx.drawImage(n.canvas,0,0),l.ctx.globalCompositeOperation=n.ctx.globalCompositeOperation,a}_SDL_ConvertSurface.sig="pppi";function _SDL_DisplayFormatAlpha(e){return e>>>=0,_SDL_ConvertSurface(e)}_SDL_DisplayFormatAlpha.sig="pp";function _SDL_FreeSurface(e){e>>>=0,e&&SDL.freeSurface(e)}_SDL_FreeSurface.sig="vp";function _SDL_UpperBlit(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,SDL.blitSurface(e,t,r,n,!1)}_SDL_UpperBlit.sig="ipppp";function _SDL_UpperBlitScaled(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,SDL.blitSurface(e,t,r,n,!0)}_SDL_UpperBlitScaled.sig="ipppp";var _SDL_LowerBlit=_SDL_UpperBlit;_SDL_LowerBlit.sig="ipppp";var _SDL_LowerBlitScaled=_SDL_UpperBlitScaled;_SDL_LowerBlitScaled.sig="ipppp";function _SDL_GetClipRect(e,t){e>>>=0,t>>>=0,assert(t);var r=SDL.surfaces[e],n=r.clipRect||{x:0,y:0,w:r.width,h:r.height};SDL.updateRect(t,n)}_SDL_GetClipRect.sig="vpp";function _SDL_SetClipRect(e,t){e>>>=0,t>>>=0;var r=SDL.surfaces[e];t?r.clipRect=SDL.intersectionOfRects({x:0,y:0,w:r.width,h:r.height},SDL.loadRect(t)):delete r.clipRect}_SDL_SetClipRect.sig="ipp";function _SDL_FillRect(e,t,r){e>>>=0,t>>>=0;var n=SDL.surfaces[e];assert(!n.locked),n.isFlagSet(2097152)&&(r=n.colors32[r]);var a=t?SDL.loadRect(t):{x:0,y:0,w:n.width,h:n.height};return n.clipRect&&(a=SDL.intersectionOfRects(n.clipRect,a),t&&SDL.updateRect(t,a)),n.ctx.save(),n.ctx.fillStyle=SDL.translateColorToCSSRGBA(r),n.ctx.fillRect(a.x,a.y,a.w,a.h),n.ctx.restore(),0}_SDL_FillRect.sig="ippi";function _zoomSurface(e,t,r,n){e>>>=0;var a=SDL.surfaces[e],l=a.width*t,c=a.height*r,u=SDL.makeSurface(Math.abs(l),Math.abs(c),a.flags,!1,"zoomSurface"),_=SDL.surfaces[u];return t>=0&&r>=0?_.ctx.drawImage(a.canvas,0,0,l,c):(_.ctx.save(),_.ctx.scale(t<0?-1:1,r<0?-1:1),_.ctx.drawImage(a.canvas,l<0?l:0,c<0?c:0,Math.abs(l),Math.abs(c)),_.ctx.restore()),u}_zoomSurface.sig="ppddi";function _rotozoomSurface(e,t,r,n){if(e>>>=0,t%360===0)return _zoomSurface(e,r,r);var a=SDL.surfaces[e],l=a.width*r,c=a.height*r,u=Math.ceil(Math.sqrt(Math.pow(l,2)+Math.pow(c,2))),_=SDL.makeSurface(u,u,a.flags,!1,"rotozoomSurface"),d=SDL.surfaces[_];return d.ctx.translate(u/2,u/2),d.ctx.rotate(-t*Math.PI/180),d.ctx.drawImage(a.canvas,-l/2,-c/2,l,c),_}_rotozoomSurface.sig="ppddi";function _SDL_SetAlpha(e,t,r){e>>>=0;var n=SDL.surfaces[e];n.alpha=r,t&65536||(n.alpha=255)}_SDL_SetAlpha.sig="ipii";function _SDL_SetColorKey(e,t,r){return warnOnce("SDL_SetColorKey is a no-op for performance reasons"),0}_SDL_SetColorKey.sig="ipii";function _SDL_PollEvent(e){return e>>>=0,SDL.pollEvent(e)}_SDL_PollEvent.sig="ip";function _SDL_PushEvent(e){e>>>=0;var t=_malloc(28);return _memcpy(t,e,28),SDL.events.push(t),0}_SDL_PushEvent.sig="ip";function _SDL_PeepEvents(e,t,r,n,a){switch(e>>>=0,r){case 2:{assert(t==1);for(var l=0,c=0;lSDL.events.forEach(SDL.handleEvent);_SDL_PumpEvents.sig="v";function _emscripten_SDL_SetEventHandler(e,t){e>>>=0,t>>>=0,SDL.eventHandler=e,SDL.eventHandlerContext=t,SDL.eventHandlerTemp||(SDL.eventHandlerTemp=_malloc(28))}_emscripten_SDL_SetEventHandler.sig="vpp";function _SDL_SetColors(e,t,r,n){e>>>=0,t>>>=0;var a=SDL.surfaces[e];if(!a.colors){var l=new ArrayBuffer(1024);a.colors=new Uint8Array(l),a.colors32=new Uint32Array(l)}for(var c=0;c>>0],a.colors[u+1]=HEAPU8[t+(c*4+1)>>>0],a.colors[u+2]=HEAPU8[t+(c*4+2)>>>0],a.colors[u+3]=255}return 1}_SDL_SetColors.sig="ippii";function _SDL_SetPalette(e,t,r,n,a){return e>>>=0,r>>>=0,_SDL_SetColors(e,r,n,a)}_SDL_SetPalette.sig="ipipii";function _SDL_MapRGB(e,t,r,n){return t&255|(r&255)<<8|(n&255)<<16|4278190080}_SDL_MapRGB.sig="ipiii";function _SDL_MapRGBA(e,t,r,n,a){return t&255|(r&255)<<8|(n&255)<<16|(a&255)<<24}_SDL_MapRGBA.sig="ipiiii";function _SDL_GetRGB(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0,r&&(HEAP8[r>>>0]=e&255),n&&(HEAP8[n>>>0]=e>>8&255),a&&(HEAP8[a>>>0]=e>>16&255)}_SDL_GetRGB.sig="vipppp";function _SDL_GetRGBA(e,t,r,n,a,l){r>>>=0,n>>>=0,a>>>=0,l>>>=0,r&&(HEAP8[r>>>0]=e&255),n&&(HEAP8[n>>>0]=e>>8&255),a&&(HEAP8[a>>>0]=e>>16&255),l&&(HEAP8[l>>>0]=e>>24&255)}_SDL_GetRGBA.sig="vippppp";var _SDL_GetAppState=()=>{var e=0;return Browser.pointerLock&&(e|=1),document.hasFocus()&&(e|=2),e|=4,e};_SDL_GetAppState.sig="i";var _SDL_WM_GrabInput=()=>{};_SDL_WM_GrabInput.sig="ii";function _SDL_WM_ToggleFullScreen(e){return Browser.exitFullscreen()?1:SDL.canRequestFullscreen?(SDL.isRequestingFullscreen=!0,1):0}_SDL_WM_ToggleFullScreen.sig="ip";var _IMG_Init=e=>e;_IMG_Init.sig="ii";function _SDL_FreeRW(e){for(e>>>=0,SDL.rwops[e]=null;SDL.rwops.length>0&&SDL.rwops[SDL.rwops.length-1]===null;)SDL.rwops.pop()}_SDL_FreeRW.sig="vp";var _IMG_Load_RW=function(e,t){e>>>=0;var r=stackSave();try{var n=()=>{stackRestore(r),c&&t&&_SDL_FreeRW(e)},a=A=>{var M=n;n=()=>{M(),A()}},l=(A,M)=>{var Q=stackAlloc(4),F=stackAlloc(4),E=stackAlloc(4),w=Module["_"+A](...M,Q,F,E,0);return w?(a(()=>Module._stbi_image_free(w)),{rawData:!0,data:w,width:HEAP32[Q>>>2>>>0],height:HEAP32[F>>>2>>>0],size:HEAP32[Q>>>2>>>0]*HEAP32[F>>>2>>>0]*HEAP32[E>>>2>>>0],bpp:HEAP32[E>>>2>>>0]}):null},c=SDL.rwops[e];if(c===void 0)return 0;var u,_=c.filename;if(_===void 0)return warnOnce("Only file names that have been preloaded are supported for IMG_Load_RW. Consider using STB_IMAGE=1 if you want synchronous image decoding (see settings.js), or package files with --use-preload-plugins"),0;if(!u)if(_=PATH_FS.resolve(_),u=preloadedImages[_],u)Module.freePreloadedMediaOnUse&&(preloadedImages[_]=null);else return u===null&&err("Trying to reuse preloaded image, but freePreloadedMediaOnUse is set!"),warnOnce("Cannot find preloaded image "+_),warnOnce("Cannot find preloaded image "+_+". Consider using STB_IMAGE=1 if you want synchronous image decoding (see settings.js), or package files with --use-preload-plugins"),0;var d=SDL.makeSurface(u.width,u.height,0,!1,"load:"+_),p=SDL.surfaces[d];if(p.ctx.globalCompositeOperation="copy",!u.rawData)p.ctx.drawImage(u,0,0,u.width,u.height,0,0,u.width,u.height);else{var f=p.ctx.getImageData(0,0,p.width,p.height);if(u.bpp==4)f.data.set(HEAPU8.subarray(u.data>>>0,u.data+u.size>>>0));else if(u.bpp==3)for(var m=u.size/3,g=f.data,h=u.data,y=0,b=0;b>>0],g[y++]=HEAPU8[h++>>>0],g[y++]=HEAPU8[h++>>>0],g[y++]=255;else if(u.bpp==2)for(var m=u.size,g=f.data,h=u.data,y=0,b=0;b>>0],P=HEAPU8[h++>>>0];g[y++]=S,g[y++]=S,g[y++]=S,g[y++]=P}else if(u.bpp==1)for(var m=u.size,g=f.data,h=u.data,y=0,b=0;b>>0];g[y++]=T,g[y++]=T,g[y++]=T,g[y++]=255}else return err("cannot handle bpp ".concat(u.bpp)),0;p.ctx.putImageData(f,0,0)}return p.ctx.globalCompositeOperation="source-over",_SDL_LockSurface(d),p.locked--,SDL.GL&&(p.canvas=p.ctx=null),d}finally{n()}};_IMG_Load_RW.sig="ppi";var _SDL_LoadBMP_RW=_IMG_Load_RW;_SDL_LoadBMP_RW.sig="ppi";function _SDL_RWFromFile(e,t){e>>>=0;var r=SDL.rwops.length,n=UTF8ToString(e);return SDL.rwops.push({filename:n,mimetype:Browser.getMimetype(n)}),r}_SDL_RWFromFile.sig="ppp";function _IMG_Load(e){e>>>=0;var t=_SDL_RWFromFile(e),r=_IMG_Load_RW(t,1);return r}_IMG_Load.sig="pp";var _IMG_Quit=()=>out("IMG_Quit called (and ignored)");_IMG_Quit.sig="v";function _SDL_OpenAudio(e,t){e>>>=0,t>>>=0;try{if(SDL.audio={freq:HEAPU32[e>>>2>>>0],format:HEAPU16[e+4>>>1>>>0],channels:HEAPU8[e+6>>>0],samples:HEAPU16[e+8>>>1>>>0],callback:HEAPU32[e+16>>>2>>>0],userdata:HEAPU32[e+20>>>2>>>0],paused:!0,timer:null},SDL.audio.format==8)SDL.audio.silence=128;else if(SDL.audio.format==32784)SDL.audio.silence=0;else if(SDL.audio.format==33056)SDL.audio.silence=0;else throw"Invalid SDL audio format "+SDL.audio.format+"!";if(SDL.audio.freq<=0)throw"Unsupported sound frequency "+SDL.audio.freq+"!";if(SDL.audio.freq<=22050)SDL.audio.freq=22050;else if(SDL.audio.freq<=32e3)SDL.audio.freq=32e3;else if(SDL.audio.freq<=44100)SDL.audio.freq=44100;else if(SDL.audio.freq<=48e3)SDL.audio.freq=48e3;else if(SDL.audio.freq<=96e3)SDL.audio.freq=96e3;else throw"Unsupported sound frequency ".concat(SDL.audio.freq,"!");if(SDL.audio.channels==0)SDL.audio.channels=1;else{if(SDL.audio.channels<0||SDL.audio.channels>32)throw"Unsupported number of audio channels for SDL audio: ".concat(SDL.audio.channels,"!");SDL.audio.channels!=1&&SDL.audio.channels!=2&&out("Warning: Using untested number of audio channels ".concat(SDL.audio.channels))}if(SDL.audio.samples<128||SDL.audio.samples>524288)throw"Unsupported audio callback buffer size ".concat(SDL.audio.samples,"!");if(SDL.audio.samples&SDL.audio.samples-1)throw"Audio callback buffer size ".concat(SDL.audio.samples," must be a power-of-two!");var r=SDL.audio.samples*SDL.audio.channels;if(SDL.audio.format==8)SDL.audio.bytesPerSample=1;else if(SDL.audio.format==32784)SDL.audio.bytesPerSample=2;else if(SDL.audio.format==33056)SDL.audio.bytesPerSample=4;else throw"Invalid SDL audio format ".concat(SDL.audio.format,"!");if(SDL.audio.bufferSize=r*SDL.audio.bytesPerSample,SDL.audio.bufferDurationSecs=SDL.audio.bufferSize/SDL.audio.bytesPerSample/SDL.audio.channels/SDL.audio.freq,SDL.audio.bufferingDelay=.05,SDL.audio.buffer=_malloc(SDL.audio.bufferSize),SDL.audio.numSimultaneouslyQueuedBuffers=Module.SDL_numSimultaneouslyQueuedBuffers||5,SDL.audio.queueNewAudioData=()=>{if(SDL.audio)for(var n=0;n=SDL.audio.bufferingDelay+SDL.audio.bufferDurationSecs*SDL.audio.numSimultaneouslyQueuedBuffers)return;getWasmTableEntry(SDL.audio.callback)(SDL.audio.userdata,SDL.audio.buffer,SDL.audio.bufferSize),SDL.audio.pushAudio(SDL.audio.buffer,SDL.audio.bufferSize)}},SDL.audio.caller=()=>{if(SDL.audio){--SDL.audio.numAudioTimersPending,SDL.audio.queueNewAudioData();var n=SDL.audio.nextPlayTime-SDL.audioContext.currentTime,a=SDL.audio.bufferDurationSecs/2;SDL.audio.numAudioTimersPending{try{if(SDL.audio.paused)return;var l=a/SDL.audio.bytesPerSample,c=l/SDL.audio.channels;if(c!=SDL.audio.samples)throw"Received mismatching audio buffer size!";var u=SDL.audioContext.createBufferSource(),_=SDL.audioContext.createBuffer(SDL.audio.channels,c,SDL.audio.freq);u.connect(SDL.audioContext.destination),SDL.fillWebAudioBufferFromHeap(n,c,_),u.buffer=_;var d=SDL.audioContext.currentTime,p=Math.max(d+SDL.audio.bufferingDelay,SDL.audio.nextPlayTime);typeof u.start<"u"?u.start(p):typeof u.noteOn<"u"&&u.noteOn(p),SDL.audio.nextPlayTime=p+SDL.audio.bufferDurationSecs}catch(f){err("Web Audio API error playing back audio: ".concat(f.toString()))}},t&&(HEAP32[t>>>2>>>0]=SDL.audio.freq,HEAP16[t+4>>>1>>>0]=SDL.audio.format,HEAP8[t+6>>>0]=SDL.audio.channels,HEAP8[t+7>>>0]=SDL.audio.silence,HEAP16[t+8>>>1>>>0]=SDL.audio.samples,HEAPU32[t+16>>>2>>>0]=SDL.audio.callback,HEAPU32[t+20>>>2>>>0]=SDL.audio.userdata),SDL.allocateChannels(32)}catch(n){err('Initializing SDL audio threw an exception: "'.concat(n.toString(),'"! Continuing without audio')),SDL.audio=null,SDL.allocateChannels(0),t&&(HEAP32[t>>>2>>>0]=0,HEAP16[t+4>>>1>>>0]=0,HEAP8[t+6>>>0]=0,HEAP8[t+7>>>0]=0,HEAP16[t+8>>>1>>>0]=0,HEAPU32[t+16>>>2>>>0]=0,HEAPU32[t+20>>>2>>>0]=0)}return SDL.audio?0:-1}_SDL_OpenAudio.sig="ipp";var _SDL_PauseAudio=e=>{SDL.audio&&(e?SDL.audio.timer!==void 0&&(clearTimeout(SDL.audio.timer),SDL.audio.numAudioTimersPending=0,SDL.audio.timer=void 0):SDL.audio.timer||(SDL.audio.numAudioTimersPending=1,SDL.audio.timer=safeSetTimeout(SDL.audio.caller,1)),SDL.audio.paused=e)};_SDL_PauseAudio.sig="vi";var _SDL_CloseAudio=()=>{SDL.audio&&(SDL.audio.callbackRemover&&(SDL.audio.callbackRemover(),SDL.audio.callbackRemover=null),_SDL_PauseAudio(1),_free(SDL.audio.buffer),SDL.audio=null,SDL.allocateChannels(0))};_SDL_CloseAudio.sig="v";var _SDL_LockAudio=()=>{};_SDL_LockAudio.sig="v";var _SDL_UnlockAudio=()=>{};_SDL_UnlockAudio.sig="v";function _SDL_CreateMutex(){return 0}_SDL_CreateMutex.sig="p";function _SDL_mutexP(e){return 0}_SDL_mutexP.sig="ip";function _SDL_mutexV(e){return 0}_SDL_mutexV.sig="ip";function _SDL_DestroyMutex(e){}_SDL_DestroyMutex.sig="vp";function _SDL_CreateCond(){return 0}_SDL_CreateCond.sig="p";function _SDL_CondSignal(e){}_SDL_CondSignal.sig="ip";function _SDL_CondWait(e,t){}_SDL_CondWait.sig="ipp";function _SDL_DestroyCond(e){}_SDL_DestroyCond.sig="vp";var _SDL_StartTextInput=()=>{SDL.textInput=!0};_SDL_StartTextInput.sig="v";var _SDL_StopTextInput=()=>{SDL.textInput=!1};_SDL_StopTextInput.sig="v";var _Mix_Init=e=>e?8:0;_Mix_Init.sig="ii";var _Mix_Quit=()=>{};_Mix_Quit.sig="v";var _Mix_OpenAudio=(e,t,r,n)=>(SDL.openAudioContext(),autoResumeAudioContext(SDL.audioContext),SDL.allocateChannels(32),SDL.mixerFrequency=e,SDL.mixerFormat=t,SDL.mixerNumChannels=r,SDL.mixerChunkSize=n,0);_Mix_OpenAudio.sig="iiiii";var _Mix_CloseAudio=_SDL_CloseAudio;_Mix_CloseAudio.sig="v";var _Mix_AllocateChannels=e=>(SDL.allocateChannels(e),e);_Mix_AllocateChannels.sig="ii";function _Mix_ChannelFinished(e){e>>>=0,SDL.channelFinished=e}_Mix_ChannelFinished.sig="vp";var _Mix_Volume=(e,t)=>{if(e==-1){for(var r=0;r(t/=255,r/=255,SDL.setPannerPosition(SDL.channels[e],r-t,0,.1),1);_Mix_SetPanning.sig="iiii";function _Mix_LoadWAV_RW(e,t){e>>>=0;var r=SDL.rwops[e];if(r===void 0)return 0;var n="",a,l,c;if(r.filename!==void 0){n=PATH_FS.resolve(r.filename);var u=preloadedAudios[n];if(!u){u===null&&err("Trying to reuse preloaded audio, but freePreloadedMediaOnUse is set!"),Module.noAudioDecoding||warnOnce("Cannot find preloaded audio "+n);try{c=FS.readFile(n)}catch{return err("Couldn't find file for: ".concat(n)),0}}Module.freePreloadedMediaOnUse&&(preloadedAudios[n]=null),a=u}else if(r.bytes!==void 0)SDL.webAudioAvailable()?c=HEAPU8.buffer.slice(r.bytes,r.bytes+r.count):c=HEAPU8.subarray(r.bytes>>>0,r.bytes+r.count>>>0);else return 0;var _=c&&(c.buffer||c),d=Module.SDL_canPlayWithWebAudio===void 0||Module.SDL_canPlayWithWebAudio(n,_);if(c!==void 0&&SDL.webAudioAvailable()&&d){a=void 0,l={},l.onDecodeComplete=[];var p=h=>{l.decodedBuffer=h,l.onDecodeComplete.forEach(y=>y()),l.onDecodeComplete=void 0};SDL.audioContext.decodeAudioData(_,p)}else if(a===void 0&&c){var f=new Blob([c],{type:r.mimetype}),m=URL.createObjectURL(f);a=new Audio,a.src=m,a.mozAudioChannelType="content"}var g=SDL.audios.length;return SDL.audios.push({source:n,audio:a,webAudio:l}),g}_Mix_LoadWAV_RW.sig="ppi";function _Mix_LoadWAV(e){e>>>=0;var t=_SDL_RWFromFile(e),r=_Mix_LoadWAV_RW(t);return _SDL_FreeRW(t),r}_Mix_LoadWAV.sig="pp";function _Mix_QuickLoad_RAW(e,t){e>>>=0;for(var r,n,a=t>>1,l=new Float32Array(a),c=0;c>>1>>>0]/32768;SDL.webAudioAvailable()?(n={},n.decodedBuffer=l):(r=new Audio,r.mozAudioChannelType="content",r.numChannels=SDL.mixerNumChannels,r.frequency=SDL.mixerFrequency);var u=SDL.audios.length;return SDL.audios.push({source:"",audio:r,webAudio:n,buffer:l}),u}_Mix_QuickLoad_RAW.sig="ppi";function _Mix_FreeChunk(e){e>>>=0,SDL.audios[e]=null}_Mix_FreeChunk.sig="vp";var _Mix_ReserveChannels=e=>{SDL.channelMinimumNumber=e};_Mix_ReserveChannels.sig="ii";function _Mix_PlayChannelTimed(e,t,r,n){t>>>=0,assert(n==-1);var a=SDL.audios[t];if(!a||!a.audio&&!a.webAudio)return-1;if(e==-1){for(var l=SDL.channelMinimumNumber;l0;_Mix_FadingChannel.sig="ii";var _Mix_HaltChannel=e=>{function t(n){var a=SDL.channels[n];a.audio&&(a.audio.pause(),a.audio=null),SDL.channelFinished&&getWasmTableEntry(SDL.channelFinished)(n)}if(e!=-1)t(e);else for(var r=0;r{var e=SDL.music.audio;return e&&(e.src=e.src,e.currentPosition=0,e.pause()),SDL.music.audio=null,SDL.hookMusicFinished&&getWasmTableEntry(SDL.hookMusicFinished)(),0};_Mix_HaltMusic.sig="i";function _Mix_HookMusicFinished(e){e>>>=0,SDL.hookMusicFinished=e,SDL.music.audio&&(SDL.music.audio.onended=_Mix_HaltMusic)}_Mix_HookMusicFinished.sig="vp";var _Mix_VolumeMusic=e=>SDL.setGetVolume(SDL.music,e);_Mix_VolumeMusic.sig="ii";function _Mix_LoadMUS_RW(e){return e>>>=0,_Mix_LoadWAV_RW(e)}_Mix_LoadMUS_RW.sig="pp";function _Mix_LoadMUS(e){e>>>=0;var t=_SDL_RWFromFile(e),r=_Mix_LoadMUS_RW(t);return _SDL_FreeRW(t),r}_Mix_LoadMUS.sig="pp";var _Mix_FreeMusic=_Mix_FreeChunk;_Mix_FreeMusic.sig="vp";function _Mix_PlayMusic(e,t){e>>>=0,SDL.music.audio&&(SDL.music.audio.paused||err("Music is already playing. ".concat(SDL.music.source)),SDL.music.audio.pause());var r=SDL.audios[e],n;return r.webAudio?(n={},n.resource=r,n.paused=!1,n.currentPosition=0,n.play=function(){SDL.playWebAudio(this)},n.pause=function(){SDL.pauseWebAudio(this)}):r.audio&&(n=r.audio),n.onended=function(){SDL.music.audio==this&&_Mix_HaltMusic()},n.loop=t!=0&&t!=1,n.volume=SDL.music.volume,SDL.music.audio=n,n.play(),0}_Mix_PlayMusic.sig="ipi";var _Mix_PauseMusic=()=>{var e=SDL.music.audio;e==null||e.pause()};_Mix_PauseMusic.sig="v";var _Mix_ResumeMusic=()=>{var e=SDL.music.audio;e==null||e.play()};_Mix_ResumeMusic.sig="v";var _Mix_FadeInMusicPos=_Mix_PlayMusic;_Mix_FadeInMusicPos.sig="ipiid";var _Mix_FadeOutMusic=_Mix_HaltMusic;_Mix_FadeOutMusic.sig="ii";var _Mix_PlayingMusic=()=>SDL.music.audio&&!SDL.music.audio.paused?1:0;_Mix_PlayingMusic.sig="i";var _Mix_Playing=e=>{if(e===-1){for(var t=0,r=0;r{if(e===-1){for(var t=0;t{var t;if(e===-1){for(var r=0,n=0;n{var e;return(e=SDL.music.audio)!=null&&e.paused?1:0};_Mix_PausedMusic.sig="i";var _Mix_Resume=e=>{if(e===-1){for(var t=0;t{try{var e=new OffscreenCanvas(0,0);if(SDL.ttfContext=e.getContext("2d"),typeof SDL.ttfContext.measureText!="function")throw"bad context"}catch{var t=document.createElement("canvas");SDL.ttfContext=t.getContext("2d")}return 0};_TTF_Init.sig="i";function _TTF_OpenFont(e,t){e>>>=0,e=PATH.normalize(UTF8ToString(e));var r=SDL.fonts.length;return SDL.fonts.push({name:e,size:t}),r}_TTF_OpenFont.sig="ppi";function _TTF_CloseFont(e){e>>>=0,SDL.fonts[e]=null}_TTF_CloseFont.sig="vp";function _TTF_RenderText_Solid(e,t,r){e>>>=0,t>>>=0,r>>>=0,t=UTF8ToString(t)||" ";var n=SDL.fonts[e],a=SDL.estimateTextWidth(n,t),l=n.size;r=SDL.loadColorToCSSRGB(r);var c=SDL.makeFontString(l,n.name),u=SDL.makeSurface(a,l,0,!1,"text:"+t),_=SDL.surfaces[u];return _.ctx.save(),_.ctx.fillStyle=r,_.ctx.font=c,_.ctx.textBaseline="bottom",_.ctx.fillText(t,0,l|0),_.ctx.restore(),u}_TTF_RenderText_Solid.sig="pppp";var _TTF_RenderText_Blended=_TTF_RenderText_Solid;_TTF_RenderText_Blended.sig="pppp";var _TTF_RenderText_Shaded=_TTF_RenderText_Solid;_TTF_RenderText_Shaded.sig="ppppp";var _TTF_RenderUTF8_Solid=_TTF_RenderText_Solid;_TTF_RenderUTF8_Solid.sig="pppp";function _TTF_SizeText(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=SDL.fonts[e];return r&&(HEAP32[r>>>2>>>0]=SDL.estimateTextWidth(a,UTF8ToString(t))),n&&(HEAP32[n>>>2>>>0]=a.size),0}_TTF_SizeText.sig="ipppp";var _TTF_SizeUTF8=_TTF_SizeText;_TTF_SizeUTF8.sig="ipppp";function _TTF_GlyphMetrics(e,t,r,n,a,l,c){e>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0,c>>>=0;var u=SDL.fonts[e],_=SDL.estimateTextWidth(u,String.fromCharCode(t));c&&(HEAP32[c>>>2>>>0]=_),r&&(HEAP32[r>>>2>>>0]=0),n&&(HEAP32[n>>>2>>>0]=_),a&&(HEAP32[a>>>2>>>0]=0),l&&(HEAP32[l>>>2>>>0]=u.size)}_TTF_GlyphMetrics.sig="ipippppp";function _TTF_FontAscent(e){e>>>=0;var t=SDL.fonts[e];return t.size*.98|0}_TTF_FontAscent.sig="ip";function _TTF_FontDescent(e){e>>>=0;var t=SDL.fonts[e];return t.size*.02|0}_TTF_FontDescent.sig="ip";function _TTF_FontHeight(e){e>>>=0;var t=SDL.fonts[e];return t.size}_TTF_FontHeight.sig="ip";var _TTF_FontLineSkip=_TTF_FontHeight;_TTF_FontLineSkip.sig="ip";var _TTF_Quit=()=>out("TTF_Quit called (and ignored)");_TTF_Quit.sig="v";var SDL_gfx={drawRectangle:(e,t,r,n,a,l,c)=>{t=t<<16>>16,r=r<<16>>16,n=n<<16>>16,a=a<<16>>16;var u=SDL.surfaces[e];assert(!u.locked);var _=t{t=t<<16>>16,r=r<<16>>16,n=n<<16>>16,a=a<<16>>16;var c=SDL.surfaces[e];assert(!c.locked),c.ctx.save(),c.ctx.strokeStyle=l,c.ctx.beginPath(),c.ctx.moveTo(t,r),c.ctx.lineTo(n,a),c.ctx.stroke(),c.ctx.restore()},drawEllipse:(e,t,r,n,a,l,c)=>{t=t<<16>>16,r=r<<16>>16,n=n<<16>>16,a=a<<16>>16;var u=SDL.surfaces[e];assert(!u.locked),u.ctx.save(),u.ctx.beginPath(),u.ctx.translate(t,r),u.ctx.scale(n,a),u.ctx.arc(0,0,1,0,2*Math.PI),u.ctx.restore(),u.ctx.save(),u.ctx[l+"Style"]=c,u.ctx[l](),u.ctx.restore()},translateColorToCSSRGBA:e=>"rgba(".concat(e>>>24,",").concat(e>>16&255,",").concat(e>>8&255,",").concat(e&255,")")};function _boxColor(e,t,r,n,a,l){return e>>>=0,SDL_gfx.drawRectangle(e,t,r,n,a,"fill",SDL_gfx.translateColorToCSSRGBA(l))}_boxColor.sig="ipiiiii";function _boxRGBA(e,t,r,n,a,l,c,u,_){return e>>>=0,SDL_gfx.drawRectangle(e,t,r,n,a,"fill",SDL.translateRGBAToCSSRGBA(l,c,u,_))}_boxRGBA.sig="ipiiiiiiii";function _rectangleColor(e,t,r,n,a,l){return e>>>=0,SDL_gfx.drawRectangle(e,t,r,n,a,"stroke",SDL_gfx.translateColorToCSSRGBA(l))}_rectangleColor.sig="ipiiiii";function _rectangleRGBA(e,t,r,n,a,l,c,u,_){return e>>>=0,SDL_gfx.drawRectangle(e,t,r,n,a,"stroke",SDL.translateRGBAToCSSRGBA(l,c,u,_))}_rectangleRGBA.sig="ipiiiiiiii";function _ellipseColor(e,t,r,n,a,l){return e>>>=0,SDL_gfx.drawEllipse(e,t,r,n,a,"stroke",SDL_gfx.translateColorToCSSRGBA(l))}_ellipseColor.sig="ipiiiii";function _ellipseRGBA(e,t,r,n,a,l,c,u,_){return e>>>=0,SDL_gfx.drawEllipse(e,t,r,n,a,"stroke",SDL.translateRGBAToCSSRGBA(l,c,u,_))}_ellipseRGBA.sig="ipiiiiiiii";function _filledEllipseColor(e,t,r,n,a,l){return e>>>=0,SDL_gfx.drawEllipse(e,t,r,n,a,"fill",SDL_gfx.translateColorToCSSRGBA(l))}_filledEllipseColor.sig="ipiiiii";function _filledEllipseRGBA(e,t,r,n,a,l,c,u,_){return e>>>=0,SDL_gfx.drawEllipse(e,t,r,n,a,"fill",SDL.translateRGBAToCSSRGBA(l,c,u,_))}_filledEllipseRGBA.sig="ipiiiiiiii";function _lineColor(e,t,r,n,a,l){return e>>>=0,SDL_gfx.drawLine(e,t,r,n,a,SDL_gfx.translateColorToCSSRGBA(l))}_lineColor.sig="ipiiiii";function _lineRGBA(e,t,r,n,a,l,c,u,_){return e>>>=0,SDL_gfx.drawLine(e,t,r,n,a,SDL.translateRGBAToCSSRGBA(l,c,u,_))}_lineRGBA.sig="ipiiiiiiii";function _pixelRGBA(e,t,r,n,a,l,c){return e>>>=0,_boxRGBA(e,t,r,t,r,n,a,l,c)}_pixelRGBA.sig="ipiiiiii";var _SDL_GL_SetAttribute=(e,t)=>{e in SDL.glAttributes||abort("Unknown SDL GL attribute ("+e+"). Please check if your SDL version is supported."),SDL.glAttributes[e]=t};_SDL_GL_SetAttribute.sig="iii";function _SDL_GL_GetAttribute(e,t){return t>>>=0,e in SDL.glAttributes||abort("Unknown SDL GL attribute ("+e+"). Please check if your SDL version is supported."),t&&(HEAP32[t>>>2>>>0]=SDL.glAttributes[e]),0}_SDL_GL_GetAttribute.sig="iip";var _SDL_GL_SwapBuffers=()=>{var e;(e=Browser.doSwapBuffers)==null||e.call(Browser)};_SDL_GL_SwapBuffers.sig="v";function _SDL_GL_ExtensionSupported(e){return e>>>=0,Module.ctx.getExtension(e)|0}_SDL_GL_ExtensionSupported.sig="ip";function _SDL_DestroyWindow(e){}_SDL_DestroyWindow.sig="vp";function _SDL_DestroyRenderer(e){}_SDL_DestroyRenderer.sig="vp";function _SDL_GetWindowFlags(e){return Browser.isFullscreen?1:0}_SDL_GetWindowFlags.sig="ip";function _SDL_GL_SwapWindow(e){}_SDL_GL_SwapWindow.sig="vp";function _SDL_GL_MakeCurrent(e,t){}_SDL_GL_MakeCurrent.sig="ipp";function _SDL_GL_DeleteContext(e){}_SDL_GL_DeleteContext.sig="vp";var _SDL_GL_GetSwapInterval=()=>MainLoop.timingMode==1?MainLoop.timingValue:0;_SDL_GL_GetSwapInterval.sig="i";var _SDL_GL_SetSwapInterval=e=>{_emscripten_set_main_loop_timing(1,e)};_SDL_GL_SetSwapInterval.sig="ii";function _SDL_SetWindowTitle(e,t){t>>>=0,t&&(document.title=UTF8ToString(t))}_SDL_SetWindowTitle.sig="vpp";function _SDL_GetWindowSize(e,t,r){t>>>=0,r>>>=0;var n=Module.canvas.width,a=Module.canvas.height;t&&(HEAP32[t>>>2>>>0]=n),r&&(HEAP32[r>>>2>>>0]=a)}_SDL_GetWindowSize.sig="vppp";function _SDL_LogSetOutputFunction(e,t){}_SDL_LogSetOutputFunction.sig="vpp";function _SDL_SetWindowFullscreen(e,t){return Browser.isFullscreen?(Module.canvas.exitFullscreen(),1):0}_SDL_SetWindowFullscreen.sig="ipi";var _SDL_ClearError=()=>{};_SDL_ClearError.sig="v";var _SDL_SetGamma=(e,t,r)=>-1;_SDL_SetGamma.sig="ifff";function _SDL_SetGammaRamp(e,t,r){return-1}_SDL_SetGammaRamp.sig="ippp";var _SDL_NumJoysticks=()=>{for(var e=0,t=SDL.getGamepads(),r=0;rSDL.lastJoystickState.hasOwnProperty(e+1)?1:0;_SDL_JoystickOpened.sig="ii";function _SDL_JoystickIndex(e){return e>>>=0,e-1}_SDL_JoystickIndex.sig="ip";function _SDL_JoystickNumAxes(e){e>>>=0;var t=SDL.getGamepad(e-1);return t?t.axes.length:0}_SDL_JoystickNumAxes.sig="ip";function _SDL_JoystickNumBalls(e){return 0}_SDL_JoystickNumBalls.sig="ip";function _SDL_JoystickNumHats(e){return 0}_SDL_JoystickNumHats.sig="ip";function _SDL_JoystickNumButtons(e){e>>>=0;var t=SDL.getGamepad(e-1);return t?t.buttons.length:0}_SDL_JoystickNumButtons.sig="ip";var _SDL_JoystickUpdate=()=>SDL.queryJoysticks();_SDL_JoystickUpdate.sig="v";var _SDL_JoystickEventState=e=>e<0?SDL.joystickEventState:SDL.joystickEventState=e;_SDL_JoystickEventState.sig="ii";function _SDL_JoystickGetAxis(e,t){e>>>=0;var r=SDL.getGamepad(e-1);return r&&r.axes.length>t?SDL.joystickAxisValueConversion(r.axes[t]):0}_SDL_JoystickGetAxis.sig="ipi";function _SDL_JoystickGetHat(e,t){return 0}_SDL_JoystickGetHat.sig="ipi";function _SDL_JoystickGetBall(e,t,r,n){return-1}_SDL_JoystickGetBall.sig="ipipp";function _SDL_JoystickGetButton(e,t){e>>>=0;var r=SDL.getGamepad(e-1);return r&&r.buttons.length>t&&SDL.getJoystickButtonState(r.buttons[t])?1:0}_SDL_JoystickGetButton.sig="ipi";function _SDL_JoystickClose(e){e>>>=0,delete SDL.lastJoystickState[e]}_SDL_JoystickClose.sig="vp";var _SDL_InitSubSystem=e=>0;_SDL_InitSubSystem.sig="ii";function _SDL_RWFromConstMem(e,t){e>>>=0;var r=SDL.rwops.length;return SDL.rwops.push({bytes:e,count:t}),r}_SDL_RWFromConstMem.sig="ppi";var _SDL_RWFromMem=_SDL_RWFromConstMem;_SDL_RWFromMem.sig="ppi";var _SDL_GetNumAudioDrivers=()=>1;_SDL_GetNumAudioDrivers.sig="i";function _SDL_GetCurrentAudioDriver(){return stringToNewUTF8("Emscripten Audio")}_SDL_GetCurrentAudioDriver.sig="p";var _SDL_GetScancodeFromKey=e=>SDL.scanCodes[e];_SDL_GetScancodeFromKey.sig="ii";function _SDL_GetAudioDriver(e){return _SDL_GetCurrentAudioDriver()}_SDL_GetAudioDriver.sig="pi";var _SDL_EnableUNICODE=e=>{var t=SDL.unicode||0;return SDL.unicode=e,t};_SDL_EnableUNICODE.sig="ii";var _SDL_AddTimer=function(e,t,r){return t>>>=0,r>>>=0,safeSetTimeout(()=>getWasmTableEntry(t)(e,r),e)};_SDL_AddTimer.sig="iipp";var _SDL_RemoveTimer=e=>(clearTimeout(e),!0);_SDL_RemoveTimer.sig="ii";function _SDL_CreateThread(e,t,r,n){throw"SDL threads cannot be supported in the web platform because they assume shared state. See emscripten_create_worker etc. for a message-passing concurrency model that does let you run code in another thread."}_SDL_CreateThread.sig="ppp";function _SDL_WaitThread(e,t){throw"SDL_WaitThread"}_SDL_WaitThread.sig="vpp";function _SDL_GetThreadID(e){throw"SDL_GetThreadID"}_SDL_GetThreadID.sig="pp";function _SDL_ThreadID(){return 0}_SDL_ThreadID.sig="p";function _SDL_AllocRW(){throw"SDL_AllocRW: TODO"}_SDL_AllocRW.sig="p";function _SDL_CondBroadcast(e){throw"SDL_CondBroadcast: TODO"}_SDL_CondBroadcast.sig="ip";function _SDL_CondWaitTimeout(e,t,r){throw"SDL_CondWaitTimeout: TODO"}_SDL_CondWaitTimeout.sig="ippi";var _SDL_WM_IconifyWindow=()=>{throw"SDL_WM_IconifyWindow TODO"};_SDL_WM_IconifyWindow.sig="i";function _Mix_SetPostMix(e,t){return warnOnce("Mix_SetPostMix: TODO")}_Mix_SetPostMix.sig="vpp";function _Mix_VolumeChunk(e,t){throw"Mix_VolumeChunk: TODO"}_Mix_VolumeChunk.sig="ipi";var _Mix_SetPosition=(e,t,r)=>{throw"Mix_SetPosition: TODO"};_Mix_SetPosition.sig="iiii";function _Mix_QuerySpec(e,t,r){throw"Mix_QuerySpec: TODO"}_Mix_QuerySpec.sig="ippp";function _Mix_FadeInChannelTimed(e,t,r,n,a){throw"Mix_FadeInChannelTimed"}_Mix_FadeInChannelTimed.sig="iipiii";var _Mix_FadeOutChannel=()=>{throw"Mix_FadeOutChannel"};_Mix_FadeOutChannel.sig="iii";function _Mix_Linked_Version(){throw"Mix_Linked_Version: TODO"}_Mix_Linked_Version.sig="p";function _SDL_SaveBMP_RW(e,t,r){throw"SDL_SaveBMP_RW: TODO"}_SDL_SaveBMP_RW.sig="ippi";function _SDL_WM_SetIcon(e,t){}_SDL_WM_SetIcon.sig="vpp";var _SDL_HasRDTSC=()=>0;_SDL_HasRDTSC.sig="i";var _SDL_HasMMX=()=>0;_SDL_HasMMX.sig="i";var _SDL_HasMMXExt=()=>0;_SDL_HasMMXExt.sig="i";var _SDL_Has3DNow=()=>0;_SDL_Has3DNow.sig="i";var _SDL_Has3DNowExt=()=>0;_SDL_Has3DNowExt.sig="i";var _SDL_HasSSE=()=>0;_SDL_HasSSE.sig="i";var _SDL_HasSSE2=()=>0;_SDL_HasSSE2.sig="i";var _SDL_HasAltiVec=()=>0;_SDL_HasAltiVec.sig="i";var _emscripten_is_main_browser_thread=()=>!ENVIRONMENT_IS_WORKER,tupleRegistrations={},structRegistrations={},getTypeName=e=>{var t=___getTypeName(e),r=readLatin1String(t);return _free(t),r},getFunctionName=e=>{e=e.trim();let t=e.indexOf("(");return t!==-1?e.substr(0,t):e},heap32VectorToArray=(e,t)=>{for(var r=[],n=0;n>>2>>>0]);return r},requireRegisteredType=(e,t)=>{var r=registeredTypes[e];return r===void 0&&throwBindingError("".concat(t," has unknown type ").concat(getTypeName(e))),r};function usesDestructorStack(e){for(var t=1;tObject.defineProperty(t,"name",{value:e}),extendError=(e,t)=>{var r=createNamedFunction(t,function(n){this.name=t,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` +`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:"".concat(this.name,": ").concat(this.message)},r},UnboundTypeError,PureVirtualError,EmValOptionalType=Object.assign({optional:!0},EmValType),registeredInstances={},getInheritedInstanceCount=()=>Object.keys(registeredInstances).length,getLiveInheritedInstances=()=>{var e=[];for(var t in registeredInstances)registeredInstances.hasOwnProperty(t)&&e.push(registeredInstances[t]);return e},deletionQueue=[],flushPendingDeletes=()=>{for(;deletionQueue.length;){var e=deletionQueue.pop();e.$$.deleteScheduled=!1,e.delete()}},delayFunction,setDelayFunction=e=>{delayFunction=e,deletionQueue.length&&delayFunction&&delayFunction(flushPendingDeletes)},init_embind=()=>{Module.getInheritedInstanceCount=getInheritedInstanceCount,Module.getLiveInheritedInstances=getLiveInheritedInstances,Module.flushPendingDeletes=flushPendingDeletes,Module.setDelayFunction=setDelayFunction},throwUnboundTypeError=(e,t)=>{var r=[],n={};function a(l){if(!n[l]&&!registeredTypes[l]){if(typeDependencies[l]){typeDependencies[l].forEach(a);return}r.push(l),n[l]=!0}}throw t.forEach(a),new UnboundTypeError("".concat(e,": ")+r.map(getTypeName).join([", "]))},ensureOverloadTable=(e,t,r)=>{if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(...a){return e[t].overloadTable.hasOwnProperty(a.length)||throwBindingError("Function '".concat(r,"' called with an invalid number of arguments (").concat(a.length,") - expects one of (").concat(e[t].overloadTable,")!")),e[t].overloadTable[a.length].apply(this,a)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},exposePublicSymbol=(e,t,r)=>{Module.hasOwnProperty(e)?((r===void 0||Module[e].overloadTable!==void 0&&Module[e].overloadTable[r]!==void 0)&&throwBindingError("Cannot register public name '".concat(e,"' twice")),ensureOverloadTable(Module,e,e),Module.hasOwnProperty(r)&&throwBindingError("Cannot register multiple overloads of a function with the same number of arguments (".concat(r,")!")),Module[e].overloadTable[r]=t):(Module[e]=t,r!==void 0&&(Module[e].numArguments=r))},replacePublicSymbol=(e,t,r)=>{Module.hasOwnProperty(e)||throwInternalError("Replacing nonexistent public symbol"),Module[e].overloadTable!==void 0&&r!==void 0?Module[e].overloadTable[r]=t:(Module[e]=t,Module[e].argCount=r)},getBasestPointer=(e,t)=>{for(t===void 0&&throwBindingError("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},registerInheritedInstance=(e,t,r)=>{t=getBasestPointer(e,t),registeredInstances.hasOwnProperty(t)?throwBindingError("Tried to register registered instance: ".concat(t)):registeredInstances[t]=r},unregisterInheritedInstance=(e,t)=>{t=getBasestPointer(e,t),registeredInstances.hasOwnProperty(t)?delete registeredInstances[t]:throwBindingError("Tried to unregister unregistered instance: ".concat(t))},getInheritedInstance=(e,t)=>(t=getBasestPointer(e,t),registeredInstances[t]),registeredPointers={},enumReadValueFromPointer=(e,t,r)=>{switch(t){case 1:return r?function(n){return this.fromWireType(HEAP8[n>>>0])}:function(n){return this.fromWireType(HEAPU8[n>>>0])};case 2:return r?function(n){return this.fromWireType(HEAP16[n>>>1>>>0])}:function(n){return this.fromWireType(HEAPU16[n>>>1>>>0])};case 4:return r?function(n){return this.fromWireType(HEAP32[n>>>2>>>0])}:function(n){return this.fromWireType(HEAPU32[n>>>2>>>0])};default:throw new TypeError("invalid integer width (".concat(t,"): ").concat(e))}};function __embind_register_user_type(e,t){e>>>=0,__embind_register_emval(e)}__embind_register_user_type.sig="vpp";function __embind_register_optional(e,t){e>>>=0,registerType(e,EmValOptionalType)}__embind_register_optional.sig="vpp";var runDestructors=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t)}};function newFunc(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type ".concat(typeof e," which is not a function"));var r=createNamedFunction(e.name||"unknownFunctionName",function(){});r.prototype=e.prototype;var n=new r,a=e.apply(n,t);return a instanceof Object?a:n}function craftInvokerFunction(e,t,r,n,a,l){var c=t.length;c<2&&throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var u=t[1]!==null&&r!==null,_=usesDestructorStack(t),d=t[0].name!=="void",p=c-2,f=[e,throwBindingError,n,a,runDestructors,t[0],t[1]],m=0;m{e=readLatin1String(e);function r(){return e.includes("j")||e.includes("p")?getDynCaller(e,t):getWasmTableEntry(t)}var n=r();return typeof n!="function"&&throwBindingError("unknown function pointer with signature ".concat(e,": ").concat(t)),n};function __embind_register_function(e,t,r,n,a,l,c,u){e>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0;var _=heap32VectorToArray(t,r);e=readLatin1String(e),e=getFunctionName(e),a=embind__requireFunction(n,a),exposePublicSymbol(e,function(){throwUnboundTypeError("Cannot call ".concat(e," due to unbound types"),_)},t-1),whenDependentTypesAreResolved([],_,d=>{var p=[d[0],null].concat(d.slice(1));return replacePublicSymbol(e,craftInvokerFunction(e,p,null,a,l,c),t-1),[]})}__embind_register_function.sig="vpippppii";function __embind_register_value_array(e,t,r,n,a,l){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0,tupleRegistrations[e]={name:readLatin1String(t),rawConstructor:embind__requireFunction(r,n),rawDestructor:embind__requireFunction(a,l),elements:[]}}__embind_register_value_array.sig="vpppppp";function __embind_register_value_array_element(e,t,r,n,a,l,c,u,_){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0,c>>>=0,u>>>=0,_>>>=0,tupleRegistrations[e].elements.push({getterReturnType:t,getter:embind__requireFunction(r,n),getterContext:a,setterArgumentType:l,setter:embind__requireFunction(c,u),setterContext:_})}__embind_register_value_array_element.sig="vppppppppp";var __embind_finalize_value_array=function(e){e>>>=0;var t=tupleRegistrations[e];delete tupleRegistrations[e];var r=t.elements,n=r.length,a=r.map(u=>u.getterReturnType).concat(r.map(u=>u.setterArgumentType)),l=t.rawConstructor,c=t.rawDestructor;whenDependentTypesAreResolved([e],a,u=>(r.forEach((_,d)=>{var p=u[d],f=_.getter,m=_.getterContext,g=u[d+n],h=_.setter,y=_.setterContext;_.read=b=>p.fromWireType(f(m,b)),_.write=(b,S)=>{var P=[];h(y,b,g.toWireType(P,S)),runDestructors(P)}}),[{name:t.name,fromWireType:_=>{for(var d=new Array(n),p=0;p{if(n!==d.length)throw new TypeError("Incorrect number of tuple elements for ".concat(t.name,": expected=").concat(n,", actual=").concat(d.length));for(var p=l(),f=0;f>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0,structRegistrations[e]={name:readLatin1String(t),rawConstructor:embind__requireFunction(r,n),rawDestructor:embind__requireFunction(a,l),fields:[]}}__embind_register_value_object.sig="vpppppp";function __embind_register_value_object_field(e,t,r,n,a,l,c,u,_,d){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0,c>>>=0,u>>>=0,_>>>=0,d>>>=0,structRegistrations[e].fields.push({fieldName:readLatin1String(t),getterReturnType:r,getter:embind__requireFunction(n,a),getterContext:l,setterArgumentType:c,setter:embind__requireFunction(u,_),setterContext:d})}__embind_register_value_object_field.sig="vpppppppppp";var __embind_finalize_value_object=function(e){e>>>=0;var t=structRegistrations[e];delete structRegistrations[e];var r=t.rawConstructor,n=t.rawDestructor,a=t.fields,l=a.map(c=>c.getterReturnType).concat(a.map(c=>c.setterArgumentType));whenDependentTypesAreResolved([e],l,c=>{var u={};return a.forEach((_,d)=>{var p=_.fieldName,f=c[d],m=_.getter,g=_.getterContext,h=c[d+a.length],y=_.setter,b=_.setterContext;u[p]={read:S=>f.fromWireType(m(g,S)),write:(S,P)=>{var T=[];y(b,S,h.toWireType(T,P)),runDestructors(T)}}}),[{name:t.name,fromWireType:_=>{var d={};for(var p in u)d[p]=u[p].read(_);return n(_),d},toWireType:(_,d)=>{for(var p in u)if(!(p in d))throw new TypeError('Missing field: "'.concat(p,'"'));var f=r();for(p in u)u[p].write(f,d[p]);return _!==null&&_.push(n,f),f},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction:n}]})};__embind_finalize_value_object.sig="vp";var upcastPointer=(e,t,r)=>{for(;t!==r;)t.upcast||throwBindingError("Expected null or instance of ".concat(r.name,", got an instance of ").concat(t.name)),e=t.upcast(e),t=t.baseClass;return e};function genericPointerToWireType(e,t){var r;if(t===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&throwBindingError('Cannot pass "'.concat(embindRepr(t),'" as a ').concat(this.name)),t.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name)),!this.isConst&&t.$$.ptrType.isConst&&throwBindingError("Cannot convert argument of type ".concat(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name," to parameter type ").concat(this.name));var n=t.$$.ptrType.registeredClass;if(r=upcastPointer(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&throwBindingError("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:throwBindingError("Cannot convert argument of type ".concat(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name," to parameter type ").concat(this.name));break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var a=t.clone();r=this.rawShare(r,Emval.toHandle(()=>a.delete())),e!==null&&e.push(this.rawDestructor,r)}break;default:throwBindingError("Unsupporting sharing policy")}return r}function constNoSmartPtrRawPointerToWireType(e,t){if(t===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),0;t.$$||throwBindingError('Cannot pass "'.concat(embindRepr(t),'" as a ').concat(this.name)),t.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name));var r=t.$$.ptrType.registeredClass,n=upcastPointer(t.$$.ptr,r,this.registeredClass);return n}function nonConstNoSmartPtrRawPointerToWireType(e,t){if(t===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),0;t.$$||throwBindingError('Cannot pass "'.concat(embindRepr(t),'" as a ').concat(this.name)),t.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name)),t.$$.ptrType.isConst&&throwBindingError("Cannot convert argument of type ".concat(t.$$.ptrType.name," to parameter type ").concat(this.name));var r=t.$$.ptrType.registeredClass,n=upcastPointer(t.$$.ptr,r,this.registeredClass);return n}function RegisteredPointer(e,t,r,n,a,l,c,u,_,d,p){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=l,this.sharingPolicy=c,this.rawGetPointee=u,this.rawConstructor=_,this.rawShare=d,this.rawDestructor=p,!a&&t.baseClass===void 0?n?(this.toWireType=constNoSmartPtrRawPointerToWireType,this.destructorFunction=null):(this.toWireType=nonConstNoSmartPtrRawPointerToWireType,this.destructorFunction=null):this.toWireType=genericPointerToWireType}var downcastPointer=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var n=downcastPointer(e,t,r.baseClass);return n===null?null:r.downcast(n)},finalizationRegistry=!1,detachFinalizer=e=>{},runDestructor=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},releaseClassHandle=e=>{e.count.value-=1;var t=e.count.value===0;t&&runDestructor(e)},attachFinalizer=e=>typeof FinalizationRegistry>"u"?(attachFinalizer=t=>t,e):(finalizationRegistry=new FinalizationRegistry(t=>{releaseClassHandle(t.$$)}),attachFinalizer=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var a={$$:r};finalizationRegistry.register(t,a,t)}return t},detachFinalizer=t=>finalizationRegistry.unregister(t),attachFinalizer(e)),makeClassHandle=(e,t)=>{(!t.ptrType||!t.ptr)&&throwInternalError("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&throwInternalError("Both smartPtrType and smartPtr must be specified"),t.count={value:1},attachFinalizer(Object.create(e,{$$:{value:t,writable:!0}}))};function RegisteredPointer_fromWireType(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=getInheritedInstance(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var l=this.registeredClass.getActualType(t),c=registeredPointers[l];if(!c)return a.call(this);var u;this.isConst?u=c.constPointerType:u=c.pointerType;var _=downcastPointer(t,this.registeredClass,u.registeredClass);return _===null?a.call(this):this.isSmartPointer?makeClassHandle(u.registeredClass.instancePrototype,{ptrType:u,ptr:_,smartPtrType:this,smartPtr:e}):makeClassHandle(u.registeredClass.instancePrototype,{ptrType:u,ptr:_})}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)==null||t.call(this,e)},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,fromWireType:RegisteredPointer_fromWireType})};function ClassHandle(){}var shallowCopyInternalPointer=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),throwInstanceAlreadyDeleted=e=>{function t(r){return r.$$.ptrType.registeredClass.name}throwBindingError(t(e)+" instance already deleted")},init_ClassHandle=()=>{Object.assign(ClassHandle.prototype,{isAliasOf(e){if(!(this instanceof ClassHandle)||!(e instanceof ClassHandle))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,a=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return t===n&&r===a},clone(){if(this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&throwBindingError("Object already scheduled for deletion"),detachFinalizer(this),releaseClassHandle(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&throwBindingError("Object already scheduled for deletion"),deletionQueue.push(this),deletionQueue.length===1&&delayFunction&&delayFunction(flushPendingDeletes),this.$$.deleteScheduled=!0,this}})};function RegisteredClass(e,t,r,n,a,l,c,u){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=l,this.upcast=c,this.downcast=u,this.pureVirtualFunctions=[]}var char_0=48,char_9=57,makeLegalFunctionName=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=char_0&&t<=char_9?"_".concat(e):e};function __embind_register_class(e,t,r,n,a,l,c,u,_,d,p,f,m){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0,c>>>=0,u>>>=0,_>>>=0,d>>>=0,p>>>=0,f>>>=0,m>>>=0,p=readLatin1String(p),l=embind__requireFunction(a,l),u&&(u=embind__requireFunction(c,u)),d&&(d=embind__requireFunction(_,d)),m=embind__requireFunction(f,m);var g=makeLegalFunctionName(p);exposePublicSymbol(g,function(){throwUnboundTypeError("Cannot construct ".concat(p," due to unbound types"),[n])}),whenDependentTypesAreResolved([e,t,r],n?[n]:[],h=>{var y;h=h[0];var b,S;n?(b=h.registeredClass,S=b.instancePrototype):S=ClassHandle.prototype;var P=createNamedFunction(p,function(...E){if(Object.getPrototypeOf(this)!==T)throw new BindingError("Use 'new' to construct "+p);if(A.constructor_body===void 0)throw new BindingError(p+" has no accessible constructor");var w=A.constructor_body[E.length];if(w===void 0)throw new BindingError("Tried to invoke ctor of ".concat(p," with invalid number of parameters (").concat(E.length,") - expected (").concat(Object.keys(A.constructor_body).toString(),") parameters instead!"));return w.apply(this,E)}),T=Object.create(S,{constructor:{value:P}});P.prototype=T;var A=new RegisteredClass(p,P,T,m,b,l,u,d);A.baseClass&&((y=A.baseClass).__derivedClasses!=null||(y.__derivedClasses=[]),A.baseClass.__derivedClasses.push(A));var M=new RegisteredPointer(p,A,!0,!1,!1),Q=new RegisteredPointer(p+"*",A,!1,!1,!1),F=new RegisteredPointer(p+" const*",A,!1,!0,!1);return registeredPointers[e]={pointerType:Q,constPointerType:F},replacePublicSymbol(g,P),[M,Q,F]})}__embind_register_class.sig="vppppppppppppp";var __embind_register_class_constructor=function(e,t,r,n,a,l){e>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0;var c=heap32VectorToArray(t,r);a=embind__requireFunction(n,a),whenDependentTypesAreResolved([],[e],u=>{u=u[0];var _="constructor ".concat(u.name);if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[t-1]!==void 0)throw new BindingError("Cannot register multiple constructors with identical number of parameters (".concat(t-1,") for class '").concat(u.name,"'! Overload resolution is currently only performed using the parameter count, not actual type info!"));return u.registeredClass.constructor_body[t-1]=()=>{throwUnboundTypeError("Cannot construct ".concat(u.name," due to unbound types"),c)},whenDependentTypesAreResolved([],c,d=>(d.splice(1,0,null),u.registeredClass.constructor_body[t-1]=craftInvokerFunction(_,d,null,a,l),[])),[]})};__embind_register_class_constructor.sig="vpipppp";var validateThis=(e,t,r)=>(e instanceof Object||throwBindingError("".concat(r,' with invalid "this": ').concat(e)),e instanceof t.registeredClass.constructor||throwBindingError("".concat(r,' incompatible with "this" of type ').concat(e.constructor.name)),e.$$.ptr||throwBindingError("cannot call emscripten binding method ".concat(r," on deleted object")),upcastPointer(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass)),__embind_register_class_function=function(e,t,r,n,a,l,c,u,_,d){e>>>=0,t>>>=0,n>>>=0,a>>>=0,l>>>=0,c>>>=0;var p=heap32VectorToArray(r,n);t=readLatin1String(t),t=getFunctionName(t),l=embind__requireFunction(a,l),whenDependentTypesAreResolved([],[e],f=>{f=f[0];var m="".concat(f.name,".").concat(t);t.startsWith("@@")&&(t=Symbol[t.substring(2)]),u&&f.registeredClass.pureVirtualFunctions.push(t);function g(){throwUnboundTypeError("Cannot call ".concat(m," due to unbound types"),p)}var h=f.registeredClass.instancePrototype,y=h[t];return y===void 0||y.overloadTable===void 0&&y.className!==f.name&&y.argCount===r-2?(g.argCount=r-2,g.className=f.name,h[t]=g):(ensureOverloadTable(h,t,m),h[t].overloadTable[r-2]=g),whenDependentTypesAreResolved([],p,b=>{var S=craftInvokerFunction(m,b,f,l,c,_);return h[t].overloadTable===void 0?(S.argCount=r-2,h[t]=S):h[t].overloadTable[r-2]=S,[]}),[]})};__embind_register_class_function.sig="vppippppiii";var __embind_register_class_property=function(e,t,r,n,a,l,c,u,_,d){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0,c>>>=0,u>>>=0,_>>>=0,d>>>=0,t=readLatin1String(t),a=embind__requireFunction(n,a),whenDependentTypesAreResolved([],[e],p=>{p=p[0];var f="".concat(p.name,".").concat(t),m={get(){throwUnboundTypeError("Cannot access ".concat(f," due to unbound types"),[r,c])},enumerable:!0,configurable:!0};return _?m.set=()=>throwUnboundTypeError("Cannot access ".concat(f," due to unbound types"),[r,c]):m.set=g=>throwBindingError(f+" is a read-only property"),Object.defineProperty(p.registeredClass.instancePrototype,t,m),whenDependentTypesAreResolved([],_?[r,c]:[r],g=>{var h=g[0],y={get(){var S=validateThis(this,p,f+" getter");return h.fromWireType(a(l,S))},enumerable:!0};if(_){_=embind__requireFunction(u,_);var b=g[1];y.set=function(S){var P=validateThis(this,p,f+" setter"),T=[];_(d,P,b.toWireType(T,S)),runDestructors(T)}}return Object.defineProperty(p.registeredClass.instancePrototype,t,y),[]}),[]})};__embind_register_class_property.sig="vpppppppppp";var __embind_register_class_class_function=function(e,t,r,n,a,l,c,u,_){e>>>=0,t>>>=0,n>>>=0,a>>>=0,l>>>=0,c>>>=0;var d=heap32VectorToArray(r,n);t=readLatin1String(t),t=getFunctionName(t),l=embind__requireFunction(a,l),whenDependentTypesAreResolved([],[e],p=>{p=p[0];var f="".concat(p.name,".").concat(t);function m(){throwUnboundTypeError("Cannot call ".concat(f," due to unbound types"),d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var g=p.registeredClass.constructor;return g[t]===void 0?(m.argCount=r-1,g[t]=m):(ensureOverloadTable(g,t,f),g[t].overloadTable[r-1]=m),whenDependentTypesAreResolved([],d,h=>{var y=[h[0],null].concat(h.slice(1)),b=craftInvokerFunction(f,y,null,l,c,u);if(g[t].overloadTable===void 0?(b.argCount=r-1,g[t]=b):g[t].overloadTable[r-1]=b,p.registeredClass.__derivedClasses)for(let S of p.registeredClass.__derivedClasses)S.constructor.hasOwnProperty(t)||(S.constructor[t]=b);return[]}),[]})};__embind_register_class_class_function.sig="vppippppii";var __embind_register_class_class_property=function(e,t,r,n,a,l,c,u){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,l>>>=0,c>>>=0,u>>>=0,t=readLatin1String(t),l=embind__requireFunction(a,l),whenDependentTypesAreResolved([],[e],_=>{_=_[0];var d="".concat(_.name,".").concat(t),p={get(){throwUnboundTypeError("Cannot access ".concat(d," due to unbound types"),[r])},enumerable:!0,configurable:!0};return u?p.set=()=>{throwUnboundTypeError("Cannot access ".concat(d," due to unbound types"),[r])}:p.set=f=>{throwBindingError("".concat(d," is a read-only property"))},Object.defineProperty(_.registeredClass.constructor,t,p),whenDependentTypesAreResolved([],[r],f=>{f=f[0];var m={get(){return f.fromWireType(l(n))},enumerable:!0};return u&&(u=embind__requireFunction(c,u),m.set=g=>{var h=[];u(n,f.toWireType(h,g)),runDestructors(h)}),Object.defineProperty(_.registeredClass.constructor,t,m),[]}),[]})};__embind_register_class_class_property.sig="vpppppppp";function __embind_create_inheriting_constructor(e,t,r){e>>>=0,t>>>=0,r>>>=0,e=readLatin1String(e),t=requireRegisteredType(t,"wrapper"),r=Emval.toValue(r);var n=t.registeredClass,a=n.instancePrototype,l=n.baseClass,c=l.instancePrototype,u=n.baseClass.constructor,_=createNamedFunction(e,function(...d){n.baseClass.pureVirtualFunctions.forEach((function(p){if(this[p]===c[p])throw new PureVirtualError("Pure virtual function ".concat(p," must be implemented in JavaScript"))}).bind(this)),Object.defineProperty(this,"__parent",{value:a}),this.__construct(...d)});return a.__construct=function(...d){this===a&&throwBindingError("Pass correct 'this' to __construct");var p=u.implement(this,...d);detachFinalizer(p);var f=p.$$;p.notifyOnDestruction(),f.preservePointerOnDelete=!0,Object.defineProperties(this,{$$:{value:f}}),attachFinalizer(this),registerInheritedInstance(n,f.ptr,this)},a.__destruct=function(){this===a&&throwBindingError("Pass correct 'this' to __destruct"),detachFinalizer(this),unregisterInheritedInstance(n,this.$$.ptr)},_.prototype=Object.create(a),Object.assign(_.prototype,r),Emval.toHandle(_)}__embind_create_inheriting_constructor.sig="pppp";var __embind_register_smart_ptr=function(e,t,r,n,a,l,c,u,_,d,p,f){e>>>=0,t>>>=0,r>>>=0,a>>>=0,l>>>=0,c>>>=0,u>>>=0,_>>>=0,d>>>=0,p>>>=0,f>>>=0,r=readLatin1String(r),l=embind__requireFunction(a,l),u=embind__requireFunction(c,u),d=embind__requireFunction(_,d),f=embind__requireFunction(p,f),whenDependentTypesAreResolved([e],[t],m=>{m=m[0];var g=new RegisteredPointer(r,m.registeredClass,!1,!1,!0,m,n,l,u,d,f);return[g]})};__embind_register_smart_ptr.sig="vpppipppppppp";function __embind_register_enum(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,t=readLatin1String(t);function a(){}a.values={},registerType(e,{name:t,constructor:a,fromWireType:function(l){return this.constructor.values[l]},toWireType:(l,c)=>c.value,argPackAdvance:GenericWireTypeSize,readValueFromPointer:enumReadValueFromPointer(t,r,n),destructorFunction:null}),exposePublicSymbol(t,a)}__embind_register_enum.sig="vpppi";function __embind_register_enum_value(e,t,r){e>>>=0,t>>>=0;var n=requireRegisteredType(e,"enum");t=readLatin1String(t);var a=n.constructor,l=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:createNamedFunction("".concat(n.name,"_").concat(t),function(){})}});a.values[r]=l,a[t]=l}__embind_register_enum_value.sig="vppi";var __embind_register_constant=function(e,t,r){e>>>=0,t>>>=0,e=readLatin1String(e),whenDependentTypesAreResolved([],[t],n=>(n=n[0],Module[e]=n.fromWireType(r),[]))};__embind_register_constant.sig="vppd";var emval_symbols={};function __emval_register_symbol(e){e>>>=0,emval_symbols[e]=readLatin1String(e)}__emval_register_symbol.sig="vp";var getStringOrSymbol=e=>{var t=emval_symbols[e];return t===void 0?readLatin1String(e):t};function __emval_incref(e){e>>>=0,e>9&&(emval_handles[e+1]+=1)}__emval_incref.sig="vp";function __emval_run_destructors(e){e>>>=0;var t=Emval.toValue(e);runDestructors(t),__emval_decref(e)}__emval_run_destructors.sig="vp";function __emval_new_array(){return Emval.toHandle([])}__emval_new_array.sig="p";function __emval_new_array_from_memory_view(e){e>>>=0,e=Emval.toValue(e);for(var t=new Array(e.length),r=0;r>>=0,Emval.toHandle(getStringOrSymbol(e))}__emval_new_cstring.sig="pp";function __emval_new_u8string(e){return e>>>=0,Emval.toHandle(UTF8ToString(e))}__emval_new_u8string.sig="pp";function __emval_new_u16string(e){return e>>>=0,Emval.toHandle(UTF16ToString(e))}__emval_new_u16string.sig="pp";function __emval_take_value(e,t){e>>>=0,t>>>=0,e=requireRegisteredType(e,"_emval_take_value");var r=e.readValueFromPointer(t);return Emval.toHandle(r)}__emval_take_value.sig="ppp";var emval_get_global=()=>typeof globalThis=="object"?globalThis:function(){return Function}()("return this")();function __emval_get_global(e){return e>>>=0,e===0?Emval.toHandle(emval_get_global()):(e=getStringOrSymbol(e),Emval.toHandle(emval_get_global()[e]))}__emval_get_global.sig="pp";function __emval_get_module_property(e){return e>>>=0,e=getStringOrSymbol(e),Emval.toHandle(Module[e])}__emval_get_module_property.sig="pp";function __emval_get_property(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),Emval.toHandle(e[t])}__emval_get_property.sig="ppp";function __emval_set_property(e,t,r){e>>>=0,t>>>=0,r>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),r=Emval.toValue(r),e[t]=r}__emval_set_property.sig="vppp";var emval_returnValue=(e,t,r)=>{var n=[],a=e.toWireType(n,r);return n.length&&(HEAPU32[t>>>2>>>0]=Emval.toHandle(n)),a};function __emval_as(e,t,r){return e>>>=0,t>>>=0,r>>>=0,e=Emval.toValue(e),t=requireRegisteredType(t,"emval::as"),emval_returnValue(t,r,e)}__emval_as.sig="dppp";function __emval_as_int64(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=requireRegisteredType(t,"emval::as"),t.toWireType(null,e)}__emval_as_int64.sig="ipp";function __emval_as_uint64(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=requireRegisteredType(t,"emval::as"),t.toWireType(null,e)}__emval_as_uint64.sig="ipp";function __emval_equals(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e==t}__emval_equals.sig="ipp";function __emval_strictly_equals(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e===t}__emval_strictly_equals.sig="ipp";function __emval_greater_than(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e>t}__emval_greater_than.sig="ipp";function __emval_less_than(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e>>=0,e=Emval.toValue(e),!e}__emval_not.sig="ip";var emval_methodCallers=[];function __emval_call(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,e=emval_methodCallers[e],t=Emval.toValue(t),e(null,t,r,n)}__emval_call.sig="dpppp";var emval_lookupTypes=(e,t)=>{for(var r=new Array(e),n=0;n>>2>>>0],"parameter "+n);return r},emval_addMethodCaller=e=>{var t=emval_methodCallers.length;return emval_methodCallers.push(e),t};function __emval_get_method_caller(e,t,r){t>>>=0;var n=emval_lookupTypes(e,t),a=n.shift();e--;var l=`return function (obj, func, destructorsRef, args) { +`,c=0,u=[];r===0&&u.push("obj");for(var _=["retType"],d=[a],p=0;ph.name).join(", "),") => ").concat(a.name,">");return emval_addMethodCaller(createNamedFunction(g,m))}__emval_get_method_caller.sig="pipi";function __emval_call_method(e,t,r,n,a){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,e=emval_methodCallers[e],t=Emval.toValue(t),r=getStringOrSymbol(r),e(t,t[r],n,a)}__emval_call_method.sig="dppppp";function __emval_typeof(e){return e>>>=0,e=Emval.toValue(e),Emval.toHandle(typeof e)}__emval_typeof.sig="pp";function __emval_instanceof(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e instanceof t}__emval_instanceof.sig="ipp";function __emval_is_number(e){return e>>>=0,e=Emval.toValue(e),typeof e=="number"}__emval_is_number.sig="ip";function __emval_is_string(e){return e>>>=0,e=Emval.toValue(e),typeof e=="string"}__emval_is_string.sig="ip";function __emval_in(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e in t}__emval_in.sig="ipp";function __emval_delete(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),delete e[t]}__emval_delete.sig="ipp";function __emval_throw(e){throw e>>>=0,e=Emval.toValue(e),e}__emval_throw.sig="ip";function __emval_iter_begin(e){return e>>>=0,e=Emval.toValue(e),Emval.toHandle(e[Symbol.iterator]())}__emval_iter_begin.sig="pp";function __emval_iter_next(e){e>>>=0,e=Emval.toValue(e);var t=e.next();return t.done?0:Emval.toHandle(t.value)}__emval_iter_next.sig="pp";var __emval_coro_suspend=function(e,t){e>>>=0,t>>>=0,Emval.toValue(e).then(r=>{__emval_coro_resume(t,Emval.toHandle(r))})};__emval_coro_suspend.sig="vpp";var __emval_coro_make_promise=function(e,t){return e>>>=0,t>>>=0,Emval.toHandle(new Promise((r,n)=>{let a=()=>{try{___cxa_rethrow()}catch(l){n(l)}};HEAPU32[e>>>2>>>0]=Emval.toHandle(r),HEAPU32[t>>>2>>>0]=Emval.toHandle(a)}))};__emval_coro_make_promise.sig="ppp";function _duckdb_web_fs_file_sync(e){return globalThis.DUCKDB_RUNTIME.syncFile(Module,e)}_duckdb_web_fs_file_sync.sig="vi";function _duckdb_web_fs_file_remove(e,t){return globalThis.DUCKDB_RUNTIME.removeFile(Module,e,t)}registerWasmPlugin(),FS.createPreloadedFile=FS_createPreloadedFile,FS.staticInit(),embind_init_charCodes(),BindingError=Module.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},InternalError=Module.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},init_emval(),Module.requestAnimationFrame=MainLoop.requestAnimationFrame,Module.pauseMainLoop=MainLoop.pause,Module.resumeMainLoop=MainLoop.resume,MainLoop.init();for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));for(var miniTempWebGLFloatBuffersStorage=new Float32Array(288),i=0;i<=288;++i)miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i);for(var miniTempWebGLIntBuffersStorage=new Int32Array(288),i=0;i<=288;++i)miniTempWebGLIntBuffers[i]=miniTempWebGLIntBuffersStorage.subarray(0,i);var emSetImmediate,emClearImmediate;if(typeof setImmediate<"u")emSetImmediate=setImmediateWrapped,emClearImmediate=clearImmediateWrapped;else if(typeof addEventListener=="function"){var __setImmediate_id_counter=0,__setImmediate_queue=[],__setImmediate_message_id="_si",__setImmediate_cb=e=>{e.data===__setImmediate_message_id&&(e.stopPropagation(),__setImmediate_queue.shift()(),++__setImmediate_id_counter)};addEventListener("message",__setImmediate_cb,!0),emSetImmediate=e=>(postMessage(__setImmediate_message_id,"*"),__setImmediate_id_counter+__setImmediate_queue.push(e)-1),emClearImmediate=e=>{var t=e-__setImmediate_id_counter;t>=0&&t<__setImmediate_queue.length&&(__setImmediate_queue[t]=()=>{})}}Module.requestFullscreen=Browser.requestFullscreen,Module.setCanvasSize=Browser.setCanvasSize,Module.getUserMedia=Browser.getUserMedia,Module.createContext=Browser.createContext;var preloadedImages={},preloadedAudios={};registerPostMainLoop(()=>{var e,t;return(t=(e=SDL.audio)==null?void 0:e.queueNewAudioData)==null?void 0:t.call(e)}),UnboundTypeError=Module.UnboundTypeError=extendError(Error,"UnboundTypeError"),PureVirtualError=Module.PureVirtualError=extendError(Error,"PureVirtualError"),init_embind(),init_RegisteredPointer(),init_ClassHandle();var wasmImports={IMG_Init:_IMG_Init,IMG_Load:_IMG_Load,IMG_Load_RW:_IMG_Load_RW,IMG_Quit:_IMG_Quit,Mix_AllocateChannels:_Mix_AllocateChannels,Mix_ChannelFinished:_Mix_ChannelFinished,Mix_CloseAudio:_Mix_CloseAudio,Mix_FadeInChannelTimed:_Mix_FadeInChannelTimed,Mix_FadeInMusicPos:_Mix_FadeInMusicPos,Mix_FadeOutChannel:_Mix_FadeOutChannel,Mix_FadeOutMusic:_Mix_FadeOutMusic,Mix_FadingChannel:_Mix_FadingChannel,Mix_FreeChunk:_Mix_FreeChunk,Mix_FreeMusic:_Mix_FreeMusic,Mix_HaltChannel:_Mix_HaltChannel,Mix_HaltMusic:_Mix_HaltMusic,Mix_HookMusicFinished:_Mix_HookMusicFinished,Mix_Init:_Mix_Init,Mix_Linked_Version:_Mix_Linked_Version,Mix_LoadMUS:_Mix_LoadMUS,Mix_LoadMUS_RW:_Mix_LoadMUS_RW,Mix_LoadWAV:_Mix_LoadWAV,Mix_LoadWAV_RW:_Mix_LoadWAV_RW,Mix_OpenAudio:_Mix_OpenAudio,Mix_Pause:_Mix_Pause,Mix_PauseMusic:_Mix_PauseMusic,Mix_Paused:_Mix_Paused,Mix_PausedMusic:_Mix_PausedMusic,Mix_PlayChannelTimed:_Mix_PlayChannelTimed,Mix_PlayMusic:_Mix_PlayMusic,Mix_Playing:_Mix_Playing,Mix_PlayingMusic:_Mix_PlayingMusic,Mix_QuerySpec:_Mix_QuerySpec,Mix_QuickLoad_RAW:_Mix_QuickLoad_RAW,Mix_Quit:_Mix_Quit,Mix_ReserveChannels:_Mix_ReserveChannels,Mix_Resume:_Mix_Resume,Mix_ResumeMusic:_Mix_ResumeMusic,Mix_SetPanning:_Mix_SetPanning,Mix_SetPosition:_Mix_SetPosition,Mix_SetPostMix:_Mix_SetPostMix,Mix_Volume:_Mix_Volume,Mix_VolumeChunk:_Mix_VolumeChunk,Mix_VolumeMusic:_Mix_VolumeMusic,SDL_AddTimer:_SDL_AddTimer,SDL_AllocRW:_SDL_AllocRW,SDL_AudioDriverName:_SDL_AudioDriverName,SDL_AudioQuit:_SDL_AudioQuit,SDL_ClearError:_SDL_ClearError,SDL_CloseAudio:_SDL_CloseAudio,SDL_CondBroadcast:_SDL_CondBroadcast,SDL_CondSignal:_SDL_CondSignal,SDL_CondWait:_SDL_CondWait,SDL_CondWaitTimeout:_SDL_CondWaitTimeout,SDL_ConvertSurface:_SDL_ConvertSurface,SDL_CreateCond:_SDL_CreateCond,SDL_CreateMutex:_SDL_CreateMutex,SDL_CreateRGBSurface:_SDL_CreateRGBSurface,SDL_CreateRGBSurfaceFrom:_SDL_CreateRGBSurfaceFrom,SDL_CreateThread:_SDL_CreateThread,SDL_Delay:_SDL_Delay,SDL_DestroyCond:_SDL_DestroyCond,SDL_DestroyMutex:_SDL_DestroyMutex,SDL_DestroyRenderer:_SDL_DestroyRenderer,SDL_DestroyWindow:_SDL_DestroyWindow,SDL_DisplayFormatAlpha:_SDL_DisplayFormatAlpha,SDL_EnableKeyRepeat:_SDL_EnableKeyRepeat,SDL_EnableUNICODE:_SDL_EnableUNICODE,SDL_FillRect:_SDL_FillRect,SDL_Flip:_SDL_Flip,SDL_FreeRW:_SDL_FreeRW,SDL_FreeSurface:_SDL_FreeSurface,SDL_GL_DeleteContext:_SDL_GL_DeleteContext,SDL_GL_ExtensionSupported:_SDL_GL_ExtensionSupported,SDL_GL_GetAttribute:_SDL_GL_GetAttribute,SDL_GL_GetSwapInterval:_SDL_GL_GetSwapInterval,SDL_GL_MakeCurrent:_SDL_GL_MakeCurrent,SDL_GL_SetAttribute:_SDL_GL_SetAttribute,SDL_GL_SetSwapInterval:_SDL_GL_SetSwapInterval,SDL_GL_SwapBuffers:_SDL_GL_SwapBuffers,SDL_GL_SwapWindow:_SDL_GL_SwapWindow,SDL_GetAppState:_SDL_GetAppState,SDL_GetAudioDriver:_SDL_GetAudioDriver,SDL_GetClipRect:_SDL_GetClipRect,SDL_GetCurrentAudioDriver:_SDL_GetCurrentAudioDriver,SDL_GetError:_SDL_GetError,SDL_GetKeyName:_SDL_GetKeyName,SDL_GetKeyState:_SDL_GetKeyState,SDL_GetKeyboardState:_SDL_GetKeyboardState,SDL_GetModState:_SDL_GetModState,SDL_GetMouseState:_SDL_GetMouseState,SDL_GetNumAudioDrivers:_SDL_GetNumAudioDrivers,SDL_GetRGB:_SDL_GetRGB,SDL_GetRGBA:_SDL_GetRGBA,SDL_GetScancodeFromKey:_SDL_GetScancodeFromKey,SDL_GetThreadID:_SDL_GetThreadID,SDL_GetTicks:_SDL_GetTicks,SDL_GetVideoInfo:_SDL_GetVideoInfo,SDL_GetVideoSurface:_SDL_GetVideoSurface,SDL_GetWindowFlags:_SDL_GetWindowFlags,SDL_GetWindowSize:_SDL_GetWindowSize,SDL_Has3DNow:_SDL_Has3DNow,SDL_Has3DNowExt:_SDL_Has3DNowExt,SDL_HasAltiVec:_SDL_HasAltiVec,SDL_HasMMX:_SDL_HasMMX,SDL_HasMMXExt:_SDL_HasMMXExt,SDL_HasRDTSC:_SDL_HasRDTSC,SDL_HasSSE:_SDL_HasSSE,SDL_HasSSE2:_SDL_HasSSE2,SDL_Init:_SDL_Init,SDL_InitSubSystem:_SDL_InitSubSystem,SDL_JoystickClose:_SDL_JoystickClose,SDL_JoystickEventState:_SDL_JoystickEventState,SDL_JoystickGetAxis:_SDL_JoystickGetAxis,SDL_JoystickGetBall:_SDL_JoystickGetBall,SDL_JoystickGetButton:_SDL_JoystickGetButton,SDL_JoystickGetHat:_SDL_JoystickGetHat,SDL_JoystickIndex:_SDL_JoystickIndex,SDL_JoystickName:_SDL_JoystickName,SDL_JoystickNumAxes:_SDL_JoystickNumAxes,SDL_JoystickNumBalls:_SDL_JoystickNumBalls,SDL_JoystickNumButtons:_SDL_JoystickNumButtons,SDL_JoystickNumHats:_SDL_JoystickNumHats,SDL_JoystickOpen:_SDL_JoystickOpen,SDL_JoystickOpened:_SDL_JoystickOpened,SDL_JoystickUpdate:_SDL_JoystickUpdate,SDL_Linked_Version:_SDL_Linked_Version,SDL_ListModes:_SDL_ListModes,SDL_LoadBMP_RW:_SDL_LoadBMP_RW,SDL_LockAudio:_SDL_LockAudio,SDL_LockSurface:_SDL_LockSurface,SDL_LogSetOutputFunction:_SDL_LogSetOutputFunction,SDL_LowerBlit:_SDL_LowerBlit,SDL_LowerBlitScaled:_SDL_LowerBlitScaled,SDL_MapRGB:_SDL_MapRGB,SDL_MapRGBA:_SDL_MapRGBA,SDL_NumJoysticks:_SDL_NumJoysticks,SDL_OpenAudio:_SDL_OpenAudio,SDL_PauseAudio:_SDL_PauseAudio,SDL_PeepEvents:_SDL_PeepEvents,SDL_PollEvent:_SDL_PollEvent,SDL_PumpEvents:_SDL_PumpEvents,SDL_PushEvent:_SDL_PushEvent,SDL_Quit:_SDL_Quit,SDL_QuitSubSystem:_SDL_QuitSubSystem,SDL_RWFromConstMem:_SDL_RWFromConstMem,SDL_RWFromFile:_SDL_RWFromFile,SDL_RWFromMem:_SDL_RWFromMem,SDL_RemoveTimer:_SDL_RemoveTimer,SDL_SaveBMP_RW:_SDL_SaveBMP_RW,SDL_SetAlpha:_SDL_SetAlpha,SDL_SetClipRect:_SDL_SetClipRect,SDL_SetColorKey:_SDL_SetColorKey,SDL_SetColors:_SDL_SetColors,SDL_SetError:_SDL_SetError,SDL_SetGamma:_SDL_SetGamma,SDL_SetGammaRamp:_SDL_SetGammaRamp,SDL_SetPalette:_SDL_SetPalette,SDL_SetVideoMode:_SDL_SetVideoMode,SDL_SetWindowFullscreen:_SDL_SetWindowFullscreen,SDL_SetWindowTitle:_SDL_SetWindowTitle,SDL_ShowCursor:_SDL_ShowCursor,SDL_StartTextInput:_SDL_StartTextInput,SDL_StopTextInput:_SDL_StopTextInput,SDL_ThreadID:_SDL_ThreadID,SDL_UnlockAudio:_SDL_UnlockAudio,SDL_UnlockSurface:_SDL_UnlockSurface,SDL_UpdateRect:_SDL_UpdateRect,SDL_UpdateRects:_SDL_UpdateRects,SDL_UpperBlit:_SDL_UpperBlit,SDL_UpperBlitScaled:_SDL_UpperBlitScaled,SDL_VideoDriverName:_SDL_VideoDriverName,SDL_VideoModeOK:_SDL_VideoModeOK,SDL_VideoQuit:_SDL_VideoQuit,SDL_WM_GrabInput:_SDL_WM_GrabInput,SDL_WM_IconifyWindow:_SDL_WM_IconifyWindow,SDL_WM_SetCaption:_SDL_WM_SetCaption,SDL_WM_SetIcon:_SDL_WM_SetIcon,SDL_WM_ToggleFullScreen:_SDL_WM_ToggleFullScreen,SDL_WaitThread:_SDL_WaitThread,SDL_WarpMouse:_SDL_WarpMouse,SDL_WasInit:_SDL_WasInit,SDL_mutexP:_SDL_mutexP,SDL_mutexV:_SDL_mutexV,TTF_CloseFont:_TTF_CloseFont,TTF_FontAscent:_TTF_FontAscent,TTF_FontDescent:_TTF_FontDescent,TTF_FontHeight:_TTF_FontHeight,TTF_FontLineSkip:_TTF_FontLineSkip,TTF_GlyphMetrics:_TTF_GlyphMetrics,TTF_Init:_TTF_Init,TTF_OpenFont:_TTF_OpenFont,TTF_Quit:_TTF_Quit,TTF_RenderText_Blended:_TTF_RenderText_Blended,TTF_RenderText_Shaded:_TTF_RenderText_Shaded,TTF_RenderText_Solid:_TTF_RenderText_Solid,TTF_RenderUTF8_Solid:_TTF_RenderUTF8_Solid,TTF_SizeText:_TTF_SizeText,TTF_SizeUTF8:_TTF_SizeUTF8,XChangeWindowAttributes:_XChangeWindowAttributes,XCreateWindow:_XCreateWindow,XInternAtom:_XInternAtom,XMapWindow:_XMapWindow,XOpenDisplay:_XOpenDisplay,XPending:_XPending,XSendEvent:_XSendEvent,XSetWMHints:_XSetWMHints,XStoreName:_XStoreName,_Unwind_Backtrace:__Unwind_Backtrace,_Unwind_FindEnclosingFunction:__Unwind_FindEnclosingFunction,_Unwind_GetIPInfo:__Unwind_GetIPInfo,_ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm:__ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm,__asctime_r:___asctime_r,__assert_fail:___assert_fail,__c_longjmp:___c_longjmp,__call_sighandler:___call_sighandler,__cpp_exception:___cpp_exception,__global_base:___global_base,__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__syscall__newselect:___syscall__newselect,__syscall_accept4:___syscall_accept4,__syscall_bind:___syscall_bind,__syscall_chdir:___syscall_chdir,__syscall_chmod:___syscall_chmod,__syscall_connect:___syscall_connect,__syscall_dup:___syscall_dup,__syscall_dup3:___syscall_dup3,__syscall_faccessat:___syscall_faccessat,__syscall_fadvise64:___syscall_fadvise64,__syscall_fallocate:___syscall_fallocate,__syscall_fchdir:___syscall_fchdir,__syscall_fchmod:___syscall_fchmod,__syscall_fchmodat2:___syscall_fchmodat2,__syscall_fchown32:___syscall_fchown32,__syscall_fchownat:___syscall_fchownat,__syscall_fcntl64:___syscall_fcntl64,__syscall_fdatasync:___syscall_fdatasync,__syscall_fstat64:___syscall_fstat64,__syscall_fstatfs64:___syscall_fstatfs64,__syscall_ftruncate64:___syscall_ftruncate64,__syscall_getcwd:___syscall_getcwd,__syscall_getdents64:___syscall_getdents64,__syscall_getpeername:___syscall_getpeername,__syscall_getsockname:___syscall_getsockname,__syscall_getsockopt:___syscall_getsockopt,__syscall_ioctl:___syscall_ioctl,__syscall_listen:___syscall_listen,__syscall_lstat64:___syscall_lstat64,__syscall_mkdirat:___syscall_mkdirat,__syscall_mknodat:___syscall_mknodat,__syscall_newfstatat:___syscall_newfstatat,__syscall_openat:___syscall_openat,__syscall_pipe:___syscall_pipe,__syscall_poll:___syscall_poll,__syscall_readlinkat:___syscall_readlinkat,__syscall_recvfrom:___syscall_recvfrom,__syscall_recvmsg:___syscall_recvmsg,__syscall_renameat:___syscall_renameat,__syscall_rmdir:___syscall_rmdir,__syscall_sendmsg:___syscall_sendmsg,__syscall_sendto:___syscall_sendto,__syscall_socket:___syscall_socket,__syscall_stat64:___syscall_stat64,__syscall_statfs64:___syscall_statfs64,__syscall_symlink:___syscall_symlink,__syscall_symlinkat:___syscall_symlinkat,__syscall_truncate64:___syscall_truncate64,__syscall_unlinkat:___syscall_unlinkat,__syscall_utimensat:___syscall_utimensat,__table_base:___table_base,_abort_js:__abort_js,_dlopen_js:__dlopen_js,_dlsym_catchup_js:__dlsym_catchup_js,_dlsym_js:__dlsym_js,_embind_create_inheriting_constructor:__embind_create_inheriting_constructor,_embind_finalize_value_array:__embind_finalize_value_array,_embind_finalize_value_object:__embind_finalize_value_object,_embind_register_bigint:__embind_register_bigint,_embind_register_bool:__embind_register_bool,_embind_register_class:__embind_register_class,_embind_register_class_class_function:__embind_register_class_class_function,_embind_register_class_class_property:__embind_register_class_class_property,_embind_register_class_constructor:__embind_register_class_constructor,_embind_register_class_function:__embind_register_class_function,_embind_register_class_property:__embind_register_class_property,_embind_register_constant:__embind_register_constant,_embind_register_emval:__embind_register_emval,_embind_register_enum:__embind_register_enum,_embind_register_enum_value:__embind_register_enum_value,_embind_register_float:__embind_register_float,_embind_register_function:__embind_register_function,_embind_register_integer:__embind_register_integer,_embind_register_memory_view:__embind_register_memory_view,_embind_register_optional:__embind_register_optional,_embind_register_smart_ptr:__embind_register_smart_ptr,_embind_register_std_string:__embind_register_std_string,_embind_register_std_wstring:__embind_register_std_wstring,_embind_register_user_type:__embind_register_user_type,_embind_register_value_array:__embind_register_value_array,_embind_register_value_array_element:__embind_register_value_array_element,_embind_register_value_object:__embind_register_value_object,_embind_register_value_object_field:__embind_register_value_object_field,_embind_register_void:__embind_register_void,_emscripten_dlopen_js:__emscripten_dlopen_js,_emscripten_fs_load_embedded_files:__emscripten_fs_load_embedded_files,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_get_progname:__emscripten_get_progname,_emscripten_lookup_name:__emscripten_lookup_name,_emscripten_memcpy_js:__emscripten_memcpy_js,_emscripten_push_main_loop_blocker:__emscripten_push_main_loop_blocker,_emscripten_push_uncounted_main_loop_blocker:__emscripten_push_uncounted_main_loop_blocker,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_emscripten_set_offscreencanvas_size:__emscripten_set_offscreencanvas_size,_emscripten_system:__emscripten_system,_emval_as:__emval_as,_emval_as_int64:__emval_as_int64,_emval_as_uint64:__emval_as_uint64,_emval_call:__emval_call,_emval_call_method:__emval_call_method,_emval_coro_make_promise:__emval_coro_make_promise,_emval_coro_suspend:__emval_coro_suspend,_emval_decref:__emval_decref,_emval_delete:__emval_delete,_emval_equals:__emval_equals,_emval_get_global:__emval_get_global,_emval_get_method_caller:__emval_get_method_caller,_emval_get_module_property:__emval_get_module_property,_emval_get_property:__emval_get_property,_emval_greater_than:__emval_greater_than,_emval_in:__emval_in,_emval_incref:__emval_incref,_emval_instanceof:__emval_instanceof,_emval_is_number:__emval_is_number,_emval_is_string:__emval_is_string,_emval_iter_begin:__emval_iter_begin,_emval_iter_next:__emval_iter_next,_emval_less_than:__emval_less_than,_emval_new_array:__emval_new_array,_emval_new_array_from_memory_view:__emval_new_array_from_memory_view,_emval_new_cstring:__emval_new_cstring,_emval_new_object:__emval_new_object,_emval_new_u16string:__emval_new_u16string,_emval_new_u8string:__emval_new_u8string,_emval_not:__emval_not,_emval_register_symbol:__emval_register_symbol,_emval_run_destructors:__emval_run_destructors,_emval_set_property:__emval_set_property,_emval_strictly_equals:__emval_strictly_equals,_emval_take_value:__emval_take_value,_emval_throw:__emval_throw,_emval_typeof:__emval_typeof,_glGetActiveAttribOrUniform:__glGetActiveAttribOrUniform,_gmtime_js:__gmtime_js,_localtime_js:__localtime_js,_mktime_js:__mktime_js,_mmap_js:__mmap_js,_msync_js:__msync_js,_munmap_js:__munmap_js,_setitimer_js:__setitimer_js,_timegm_js:__timegm_js,_tzset_js:__tzset_js,alBuffer3f:_alBuffer3f,alBuffer3i:_alBuffer3i,alBufferData:_alBufferData,alBufferf:_alBufferf,alBufferfv:_alBufferfv,alBufferi:_alBufferi,alBufferiv:_alBufferiv,alDeleteBuffers:_alDeleteBuffers,alDeleteSources:_alDeleteSources,alDisable:_alDisable,alDistanceModel:_alDistanceModel,alDopplerFactor:_alDopplerFactor,alDopplerVelocity:_alDopplerVelocity,alEnable:_alEnable,alGenBuffers:_alGenBuffers,alGenSources:_alGenSources,alGetBoolean:_alGetBoolean,alGetBooleanv:_alGetBooleanv,alGetBuffer3f:_alGetBuffer3f,alGetBuffer3i:_alGetBuffer3i,alGetBufferf:_alGetBufferf,alGetBufferfv:_alGetBufferfv,alGetBufferi:_alGetBufferi,alGetBufferiv:_alGetBufferiv,alGetDouble:_alGetDouble,alGetDoublev:_alGetDoublev,alGetEnumValue:_alGetEnumValue,alGetError:_alGetError,alGetFloat:_alGetFloat,alGetFloatv:_alGetFloatv,alGetInteger:_alGetInteger,alGetIntegerv:_alGetIntegerv,alGetListener3f:_alGetListener3f,alGetListener3i:_alGetListener3i,alGetListenerf:_alGetListenerf,alGetListenerfv:_alGetListenerfv,alGetListeneri:_alGetListeneri,alGetListeneriv:_alGetListeneriv,alGetSource3f:_alGetSource3f,alGetSource3i:_alGetSource3i,alGetSourcef:_alGetSourcef,alGetSourcefv:_alGetSourcefv,alGetSourcei:_alGetSourcei,alGetSourceiv:_alGetSourceiv,alGetString:_alGetString,alIsBuffer:_alIsBuffer,alIsEnabled:_alIsEnabled,alIsExtensionPresent:_alIsExtensionPresent,alIsSource:_alIsSource,alListener3f:_alListener3f,alListener3i:_alListener3i,alListenerf:_alListenerf,alListenerfv:_alListenerfv,alListeneri:_alListeneri,alListeneriv:_alListeneriv,alSource3f:_alSource3f,alSource3i:_alSource3i,alSourcePause:_alSourcePause,alSourcePausev:_alSourcePausev,alSourcePlay:_alSourcePlay,alSourcePlayv:_alSourcePlayv,alSourceQueueBuffers:_alSourceQueueBuffers,alSourceRewind:_alSourceRewind,alSourceRewindv:_alSourceRewindv,alSourceStop:_alSourceStop,alSourceStopv:_alSourceStopv,alSourceUnqueueBuffers:_alSourceUnqueueBuffers,alSourcef:_alSourcef,alSourcefv:_alSourcefv,alSourcei:_alSourcei,alSourceiv:_alSourceiv,alSpeedOfSound:_alSpeedOfSound,alcCaptureCloseDevice:_alcCaptureCloseDevice,alcCaptureOpenDevice:_alcCaptureOpenDevice,alcCaptureSamples:_alcCaptureSamples,alcCaptureStart:_alcCaptureStart,alcCaptureStop:_alcCaptureStop,alcCloseDevice:_alcCloseDevice,alcCreateContext:_alcCreateContext,alcDestroyContext:_alcDestroyContext,alcGetContextsDevice:_alcGetContextsDevice,alcGetCurrentContext:_alcGetCurrentContext,alcGetEnumValue:_alcGetEnumValue,alcGetError:_alcGetError,alcGetIntegerv:_alcGetIntegerv,alcGetString:_alcGetString,alcIsExtensionPresent:_alcIsExtensionPresent,alcMakeContextCurrent:_alcMakeContextCurrent,alcOpenDevice:_alcOpenDevice,alcProcessContext:_alcProcessContext,alcSuspendContext:_alcSuspendContext,boxColor:_boxColor,boxRGBA:_boxRGBA,clock_res_get:_clock_res_get,clock_time_get:_clock_time_get,duckdb_web_fs_directory_create:_duckdb_web_fs_directory_create,duckdb_web_fs_directory_exists:_duckdb_web_fs_directory_exists,duckdb_web_fs_directory_list_files:_duckdb_web_fs_directory_list_files,duckdb_web_fs_directory_remove:_duckdb_web_fs_directory_remove,duckdb_web_fs_file_close:_duckdb_web_fs_file_close,duckdb_web_fs_file_exists:_duckdb_web_fs_file_exists,duckdb_web_fs_file_get_last_modified_time:_duckdb_web_fs_file_get_last_modified_time,duckdb_web_fs_file_move:_duckdb_web_fs_file_move,duckdb_web_fs_file_open:_duckdb_web_fs_file_open,duckdb_web_fs_file_read:_duckdb_web_fs_file_read,duckdb_web_fs_file_remove:_duckdb_web_fs_file_remove,duckdb_web_fs_file_sync:_duckdb_web_fs_file_sync,duckdb_web_fs_file_truncate:_duckdb_web_fs_file_truncate,duckdb_web_fs_file_write:_duckdb_web_fs_file_write,duckdb_web_fs_get_default_data_protocol:_duckdb_web_fs_get_default_data_protocol,duckdb_web_fs_glob:_duckdb_web_fs_glob,duckdb_web_test_platform_feature:_duckdb_web_test_platform_feature,duckdb_web_udf_scalar_call:_duckdb_web_udf_scalar_call,eglBindAPI:_eglBindAPI,eglChooseConfig:_eglChooseConfig,eglCreateContext:_eglCreateContext,eglCreateWindowSurface:_eglCreateWindowSurface,eglDestroyContext:_eglDestroyContext,eglDestroySurface:_eglDestroySurface,eglGetConfigAttrib:_eglGetConfigAttrib,eglGetConfigs:_eglGetConfigs,eglGetCurrentContext:_eglGetCurrentContext,eglGetCurrentDisplay:_eglGetCurrentDisplay,eglGetCurrentSurface:_eglGetCurrentSurface,eglGetDisplay:_eglGetDisplay,eglGetError:_eglGetError,eglInitialize:_eglInitialize,eglMakeCurrent:_eglMakeCurrent,eglQueryAPI:_eglQueryAPI,eglQueryContext:_eglQueryContext,eglQueryString:_eglQueryString,eglQuerySurface:_eglQuerySurface,eglReleaseThread:_eglReleaseThread,eglSwapBuffers:_eglSwapBuffers,eglSwapInterval:_eglSwapInterval,eglTerminate:_eglTerminate,eglWaitClient:_eglWaitClient,eglWaitGL:_eglWaitGL,eglWaitNative:_eglWaitNative,ellipseColor:_ellipseColor,ellipseRGBA:_ellipseRGBA,emscripten_SDL_SetEventHandler:_emscripten_SDL_SetEventHandler,emscripten_alcDevicePauseSOFT:_emscripten_alcDevicePauseSOFT,emscripten_alcDeviceResumeSOFT:_emscripten_alcDeviceResumeSOFT,emscripten_alcGetStringiSOFT:_emscripten_alcGetStringiSOFT,emscripten_alcResetDeviceSOFT:_emscripten_alcResetDeviceSOFT,emscripten_asm_const_async_on_main_thread:_emscripten_asm_const_async_on_main_thread,emscripten_asm_const_double:_emscripten_asm_const_double,emscripten_asm_const_double_sync_on_main_thread:_emscripten_asm_const_double_sync_on_main_thread,emscripten_asm_const_int:_emscripten_asm_const_int,emscripten_asm_const_int_sync_on_main_thread:_emscripten_asm_const_int_sync_on_main_thread,emscripten_asm_const_ptr:_emscripten_asm_const_ptr,emscripten_asm_const_ptr_sync_on_main_thread:_emscripten_asm_const_ptr_sync_on_main_thread,emscripten_async_call:_emscripten_async_call,emscripten_async_load_script:_emscripten_async_load_script,emscripten_async_run_script:_emscripten_async_run_script,emscripten_async_wget:_emscripten_async_wget,emscripten_async_wget2:_emscripten_async_wget2,emscripten_async_wget2_abort:_emscripten_async_wget2_abort,emscripten_async_wget2_data:_emscripten_async_wget2_data,emscripten_async_wget_data:_emscripten_async_wget_data,emscripten_call_worker:_emscripten_call_worker,emscripten_cancel_animation_frame:_emscripten_cancel_animation_frame,emscripten_cancel_main_loop:_emscripten_cancel_main_loop,emscripten_clear_immediate:_emscripten_clear_immediate,emscripten_clear_interval:_emscripten_clear_interval,emscripten_clear_timeout:_emscripten_clear_timeout,emscripten_console_error:_emscripten_console_error,emscripten_console_log:_emscripten_console_log,emscripten_console_trace:_emscripten_console_trace,emscripten_console_warn:_emscripten_console_warn,emscripten_create_worker:_emscripten_create_worker,emscripten_date_now:_emscripten_date_now,emscripten_debugger:_emscripten_debugger,emscripten_destroy_worker:_emscripten_destroy_worker,emscripten_enter_soft_fullscreen:_emscripten_enter_soft_fullscreen,emscripten_err:_emscripten_err,emscripten_errn:_emscripten_errn,emscripten_exit_fullscreen:_emscripten_exit_fullscreen,emscripten_exit_pointerlock:_emscripten_exit_pointerlock,emscripten_exit_soft_fullscreen:_emscripten_exit_soft_fullscreen,emscripten_exit_with_live_runtime:_emscripten_exit_with_live_runtime,emscripten_fiber_swap:_emscripten_fiber_swap,emscripten_force_exit:_emscripten_force_exit,emscripten_get_battery_status:_emscripten_get_battery_status,emscripten_get_callstack:_emscripten_get_callstack,emscripten_get_canvas_element_size:_emscripten_get_canvas_element_size,emscripten_get_canvas_size:_emscripten_get_canvas_size,emscripten_get_compiler_setting:_emscripten_get_compiler_setting,emscripten_get_device_pixel_ratio:_emscripten_get_device_pixel_ratio,emscripten_get_devicemotion_status:_emscripten_get_devicemotion_status,emscripten_get_deviceorientation_status:_emscripten_get_deviceorientation_status,emscripten_get_element_css_size:_emscripten_get_element_css_size,emscripten_get_fullscreen_status:_emscripten_get_fullscreen_status,emscripten_get_gamepad_status:_emscripten_get_gamepad_status,emscripten_get_heap_max:_emscripten_get_heap_max,emscripten_get_main_loop_timing:_emscripten_get_main_loop_timing,emscripten_get_mouse_status:_emscripten_get_mouse_status,emscripten_get_now:_emscripten_get_now,emscripten_get_now_res:_emscripten_get_now_res,emscripten_get_num_gamepads:_emscripten_get_num_gamepads,emscripten_get_orientation_status:_emscripten_get_orientation_status,emscripten_get_pointerlock_status:_emscripten_get_pointerlock_status,emscripten_get_preloaded_image_data:_emscripten_get_preloaded_image_data,emscripten_get_preloaded_image_data_from_FILE:_emscripten_get_preloaded_image_data_from_FILE,emscripten_get_screen_size:_emscripten_get_screen_size,emscripten_get_visibility_status:_emscripten_get_visibility_status,emscripten_get_window_title:_emscripten_get_window_title,emscripten_get_worker_queue_size:_emscripten_get_worker_queue_size,emscripten_glActiveTexture:_emscripten_glActiveTexture,emscripten_glAttachShader:_emscripten_glAttachShader,emscripten_glBegin:_emscripten_glBegin,emscripten_glBeginQueryEXT:_emscripten_glBeginQueryEXT,emscripten_glBindAttribLocation:_emscripten_glBindAttribLocation,emscripten_glBindBuffer:_emscripten_glBindBuffer,emscripten_glBindFramebuffer:_emscripten_glBindFramebuffer,emscripten_glBindRenderbuffer:_emscripten_glBindRenderbuffer,emscripten_glBindTexture:_emscripten_glBindTexture,emscripten_glBindVertexArray:_emscripten_glBindVertexArray,emscripten_glBindVertexArrayOES:_emscripten_glBindVertexArrayOES,emscripten_glBlendColor:_emscripten_glBlendColor,emscripten_glBlendEquation:_emscripten_glBlendEquation,emscripten_glBlendEquationSeparate:_emscripten_glBlendEquationSeparate,emscripten_glBlendFunc:_emscripten_glBlendFunc,emscripten_glBlendFuncSeparate:_emscripten_glBlendFuncSeparate,emscripten_glBufferData:_emscripten_glBufferData,emscripten_glBufferSubData:_emscripten_glBufferSubData,emscripten_glCheckFramebufferStatus:_emscripten_glCheckFramebufferStatus,emscripten_glClear:_emscripten_glClear,emscripten_glClearColor:_emscripten_glClearColor,emscripten_glClearDepth:_emscripten_glClearDepth,emscripten_glClearDepthf:_emscripten_glClearDepthf,emscripten_glClearStencil:_emscripten_glClearStencil,emscripten_glClipControlEXT:_emscripten_glClipControlEXT,emscripten_glColorMask:_emscripten_glColorMask,emscripten_glCompileShader:_emscripten_glCompileShader,emscripten_glCompressedTexImage2D:_emscripten_glCompressedTexImage2D,emscripten_glCompressedTexSubImage2D:_emscripten_glCompressedTexSubImage2D,emscripten_glCopyTexImage2D:_emscripten_glCopyTexImage2D,emscripten_glCopyTexSubImage2D:_emscripten_glCopyTexSubImage2D,emscripten_glCreateProgram:_emscripten_glCreateProgram,emscripten_glCreateShader:_emscripten_glCreateShader,emscripten_glCullFace:_emscripten_glCullFace,emscripten_glDeleteBuffers:_emscripten_glDeleteBuffers,emscripten_glDeleteFramebuffers:_emscripten_glDeleteFramebuffers,emscripten_glDeleteProgram:_emscripten_glDeleteProgram,emscripten_glDeleteQueriesEXT:_emscripten_glDeleteQueriesEXT,emscripten_glDeleteRenderbuffers:_emscripten_glDeleteRenderbuffers,emscripten_glDeleteShader:_emscripten_glDeleteShader,emscripten_glDeleteTextures:_emscripten_glDeleteTextures,emscripten_glDeleteVertexArrays:_emscripten_glDeleteVertexArrays,emscripten_glDeleteVertexArraysOES:_emscripten_glDeleteVertexArraysOES,emscripten_glDepthFunc:_emscripten_glDepthFunc,emscripten_glDepthMask:_emscripten_glDepthMask,emscripten_glDepthRange:_emscripten_glDepthRange,emscripten_glDepthRangef:_emscripten_glDepthRangef,emscripten_glDetachShader:_emscripten_glDetachShader,emscripten_glDisable:_emscripten_glDisable,emscripten_glDisableVertexAttribArray:_emscripten_glDisableVertexAttribArray,emscripten_glDrawArrays:_emscripten_glDrawArrays,emscripten_glDrawArraysInstanced:_emscripten_glDrawArraysInstanced,emscripten_glDrawArraysInstancedANGLE:_emscripten_glDrawArraysInstancedANGLE,emscripten_glDrawArraysInstancedARB:_emscripten_glDrawArraysInstancedARB,emscripten_glDrawArraysInstancedEXT:_emscripten_glDrawArraysInstancedEXT,emscripten_glDrawArraysInstancedNV:_emscripten_glDrawArraysInstancedNV,emscripten_glDrawBuffers:_emscripten_glDrawBuffers,emscripten_glDrawBuffersEXT:_emscripten_glDrawBuffersEXT,emscripten_glDrawBuffersWEBGL:_emscripten_glDrawBuffersWEBGL,emscripten_glDrawElements:_emscripten_glDrawElements,emscripten_glDrawElementsInstanced:_emscripten_glDrawElementsInstanced,emscripten_glDrawElementsInstancedANGLE:_emscripten_glDrawElementsInstancedANGLE,emscripten_glDrawElementsInstancedARB:_emscripten_glDrawElementsInstancedARB,emscripten_glDrawElementsInstancedEXT:_emscripten_glDrawElementsInstancedEXT,emscripten_glDrawElementsInstancedNV:_emscripten_glDrawElementsInstancedNV,emscripten_glEnable:_emscripten_glEnable,emscripten_glEnableVertexAttribArray:_emscripten_glEnableVertexAttribArray,emscripten_glEndQueryEXT:_emscripten_glEndQueryEXT,emscripten_glFinish:_emscripten_glFinish,emscripten_glFlush:_emscripten_glFlush,emscripten_glFramebufferRenderbuffer:_emscripten_glFramebufferRenderbuffer,emscripten_glFramebufferTexture2D:_emscripten_glFramebufferTexture2D,emscripten_glFrontFace:_emscripten_glFrontFace,emscripten_glGenBuffers:_emscripten_glGenBuffers,emscripten_glGenFramebuffers:_emscripten_glGenFramebuffers,emscripten_glGenQueriesEXT:_emscripten_glGenQueriesEXT,emscripten_glGenRenderbuffers:_emscripten_glGenRenderbuffers,emscripten_glGenTextures:_emscripten_glGenTextures,emscripten_glGenVertexArrays:_emscripten_glGenVertexArrays,emscripten_glGenVertexArraysOES:_emscripten_glGenVertexArraysOES,emscripten_glGenerateMipmap:_emscripten_glGenerateMipmap,emscripten_glGetActiveAttrib:_emscripten_glGetActiveAttrib,emscripten_glGetActiveUniform:_emscripten_glGetActiveUniform,emscripten_glGetAttachedShaders:_emscripten_glGetAttachedShaders,emscripten_glGetAttribLocation:_emscripten_glGetAttribLocation,emscripten_glGetBooleanv:_emscripten_glGetBooleanv,emscripten_glGetBufferParameteriv:_emscripten_glGetBufferParameteriv,emscripten_glGetError:_emscripten_glGetError,emscripten_glGetFloatv:_emscripten_glGetFloatv,emscripten_glGetFramebufferAttachmentParameteriv:_emscripten_glGetFramebufferAttachmentParameteriv,emscripten_glGetIntegerv:_emscripten_glGetIntegerv,emscripten_glGetProgramInfoLog:_emscripten_glGetProgramInfoLog,emscripten_glGetProgramiv:_emscripten_glGetProgramiv,emscripten_glGetQueryObjecti64vEXT:_emscripten_glGetQueryObjecti64vEXT,emscripten_glGetQueryObjectivEXT:_emscripten_glGetQueryObjectivEXT,emscripten_glGetQueryObjectui64vEXT:_emscripten_glGetQueryObjectui64vEXT,emscripten_glGetQueryObjectuivEXT:_emscripten_glGetQueryObjectuivEXT,emscripten_glGetQueryivEXT:_emscripten_glGetQueryivEXT,emscripten_glGetRenderbufferParameteriv:_emscripten_glGetRenderbufferParameteriv,emscripten_glGetShaderInfoLog:_emscripten_glGetShaderInfoLog,emscripten_glGetShaderPrecisionFormat:_emscripten_glGetShaderPrecisionFormat,emscripten_glGetShaderSource:_emscripten_glGetShaderSource,emscripten_glGetShaderiv:_emscripten_glGetShaderiv,emscripten_glGetString:_emscripten_glGetString,emscripten_glGetTexParameterfv:_emscripten_glGetTexParameterfv,emscripten_glGetTexParameteriv:_emscripten_glGetTexParameteriv,emscripten_glGetUniformLocation:_emscripten_glGetUniformLocation,emscripten_glGetUniformfv:_emscripten_glGetUniformfv,emscripten_glGetUniformiv:_emscripten_glGetUniformiv,emscripten_glGetVertexAttribPointerv:_emscripten_glGetVertexAttribPointerv,emscripten_glGetVertexAttribfv:_emscripten_glGetVertexAttribfv,emscripten_glGetVertexAttribiv:_emscripten_glGetVertexAttribiv,emscripten_glHint:_emscripten_glHint,emscripten_glIsBuffer:_emscripten_glIsBuffer,emscripten_glIsEnabled:_emscripten_glIsEnabled,emscripten_glIsFramebuffer:_emscripten_glIsFramebuffer,emscripten_glIsProgram:_emscripten_glIsProgram,emscripten_glIsQueryEXT:_emscripten_glIsQueryEXT,emscripten_glIsRenderbuffer:_emscripten_glIsRenderbuffer,emscripten_glIsShader:_emscripten_glIsShader,emscripten_glIsTexture:_emscripten_glIsTexture,emscripten_glIsVertexArray:_emscripten_glIsVertexArray,emscripten_glIsVertexArrayOES:_emscripten_glIsVertexArrayOES,emscripten_glLineWidth:_emscripten_glLineWidth,emscripten_glLinkProgram:_emscripten_glLinkProgram,emscripten_glLoadIdentity:_emscripten_glLoadIdentity,emscripten_glMatrixMode:_emscripten_glMatrixMode,emscripten_glMultiDrawArrays:_emscripten_glMultiDrawArrays,emscripten_glMultiDrawArraysANGLE:_emscripten_glMultiDrawArraysANGLE,emscripten_glMultiDrawArraysInstancedANGLE:_emscripten_glMultiDrawArraysInstancedANGLE,emscripten_glMultiDrawArraysInstancedWEBGL:_emscripten_glMultiDrawArraysInstancedWEBGL,emscripten_glMultiDrawArraysWEBGL:_emscripten_glMultiDrawArraysWEBGL,emscripten_glMultiDrawElements:_emscripten_glMultiDrawElements,emscripten_glMultiDrawElementsANGLE:_emscripten_glMultiDrawElementsANGLE,emscripten_glMultiDrawElementsInstancedANGLE:_emscripten_glMultiDrawElementsInstancedANGLE,emscripten_glMultiDrawElementsInstancedWEBGL:_emscripten_glMultiDrawElementsInstancedWEBGL,emscripten_glMultiDrawElementsWEBGL:_emscripten_glMultiDrawElementsWEBGL,emscripten_glPixelStorei:_emscripten_glPixelStorei,emscripten_glPolygonModeWEBGL:_emscripten_glPolygonModeWEBGL,emscripten_glPolygonOffset:_emscripten_glPolygonOffset,emscripten_glPolygonOffsetClampEXT:_emscripten_glPolygonOffsetClampEXT,emscripten_glQueryCounterEXT:_emscripten_glQueryCounterEXT,emscripten_glReadPixels:_emscripten_glReadPixels,emscripten_glReleaseShaderCompiler:_emscripten_glReleaseShaderCompiler,emscripten_glRenderbufferStorage:_emscripten_glRenderbufferStorage,emscripten_glSampleCoverage:_emscripten_glSampleCoverage,emscripten_glScissor:_emscripten_glScissor,emscripten_glShaderBinary:_emscripten_glShaderBinary,emscripten_glShaderSource:_emscripten_glShaderSource,emscripten_glStencilFunc:_emscripten_glStencilFunc,emscripten_glStencilFuncSeparate:_emscripten_glStencilFuncSeparate,emscripten_glStencilMask:_emscripten_glStencilMask,emscripten_glStencilMaskSeparate:_emscripten_glStencilMaskSeparate,emscripten_glStencilOp:_emscripten_glStencilOp,emscripten_glStencilOpSeparate:_emscripten_glStencilOpSeparate,emscripten_glTexImage2D:_emscripten_glTexImage2D,emscripten_glTexParameterf:_emscripten_glTexParameterf,emscripten_glTexParameterfv:_emscripten_glTexParameterfv,emscripten_glTexParameteri:_emscripten_glTexParameteri,emscripten_glTexParameteriv:_emscripten_glTexParameteriv,emscripten_glTexSubImage2D:_emscripten_glTexSubImage2D,emscripten_glUniform1f:_emscripten_glUniform1f,emscripten_glUniform1fv:_emscripten_glUniform1fv,emscripten_glUniform1i:_emscripten_glUniform1i,emscripten_glUniform1iv:_emscripten_glUniform1iv,emscripten_glUniform2f:_emscripten_glUniform2f,emscripten_glUniform2fv:_emscripten_glUniform2fv,emscripten_glUniform2i:_emscripten_glUniform2i,emscripten_glUniform2iv:_emscripten_glUniform2iv,emscripten_glUniform3f:_emscripten_glUniform3f,emscripten_glUniform3fv:_emscripten_glUniform3fv,emscripten_glUniform3i:_emscripten_glUniform3i,emscripten_glUniform3iv:_emscripten_glUniform3iv,emscripten_glUniform4f:_emscripten_glUniform4f,emscripten_glUniform4fv:_emscripten_glUniform4fv,emscripten_glUniform4i:_emscripten_glUniform4i,emscripten_glUniform4iv:_emscripten_glUniform4iv,emscripten_glUniformMatrix2fv:_emscripten_glUniformMatrix2fv,emscripten_glUniformMatrix3fv:_emscripten_glUniformMatrix3fv,emscripten_glUniformMatrix4fv:_emscripten_glUniformMatrix4fv,emscripten_glUseProgram:_emscripten_glUseProgram,emscripten_glValidateProgram:_emscripten_glValidateProgram,emscripten_glVertexAttrib1f:_emscripten_glVertexAttrib1f,emscripten_glVertexAttrib1fv:_emscripten_glVertexAttrib1fv,emscripten_glVertexAttrib2f:_emscripten_glVertexAttrib2f,emscripten_glVertexAttrib2fv:_emscripten_glVertexAttrib2fv,emscripten_glVertexAttrib3f:_emscripten_glVertexAttrib3f,emscripten_glVertexAttrib3fv:_emscripten_glVertexAttrib3fv,emscripten_glVertexAttrib4f:_emscripten_glVertexAttrib4f,emscripten_glVertexAttrib4fv:_emscripten_glVertexAttrib4fv,emscripten_glVertexAttribDivisor:_emscripten_glVertexAttribDivisor,emscripten_glVertexAttribDivisorANGLE:_emscripten_glVertexAttribDivisorANGLE,emscripten_glVertexAttribDivisorARB:_emscripten_glVertexAttribDivisorARB,emscripten_glVertexAttribDivisorEXT:_emscripten_glVertexAttribDivisorEXT,emscripten_glVertexAttribDivisorNV:_emscripten_glVertexAttribDivisorNV,emscripten_glVertexAttribPointer:_emscripten_glVertexAttribPointer,emscripten_glVertexPointer:_emscripten_glVertexPointer,emscripten_glViewport:_emscripten_glViewport,emscripten_has_asyncify:_emscripten_has_asyncify,emscripten_hide_mouse:_emscripten_hide_mouse,emscripten_html5_remove_all_event_listeners:_emscripten_html5_remove_all_event_listeners,emscripten_idb_async_clear:_emscripten_idb_async_clear,emscripten_idb_async_delete:_emscripten_idb_async_delete,emscripten_idb_async_exists:_emscripten_idb_async_exists,emscripten_idb_async_load:_emscripten_idb_async_load,emscripten_idb_async_store:_emscripten_idb_async_store,emscripten_idb_clear:_emscripten_idb_clear,emscripten_idb_delete:_emscripten_idb_delete,emscripten_idb_exists:_emscripten_idb_exists,emscripten_idb_load:_emscripten_idb_load,emscripten_idb_store:_emscripten_idb_store,emscripten_is_main_browser_thread:_emscripten_is_main_browser_thread,emscripten_is_webgl_context_lost:_emscripten_is_webgl_context_lost,emscripten_lock_orientation:_emscripten_lock_orientation,emscripten_log:_emscripten_log,emscripten_math_acos:_emscripten_math_acos,emscripten_math_acosh:_emscripten_math_acosh,emscripten_math_asin:_emscripten_math_asin,emscripten_math_asinh:_emscripten_math_asinh,emscripten_math_atan:_emscripten_math_atan,emscripten_math_atan2:_emscripten_math_atan2,emscripten_math_atanh:_emscripten_math_atanh,emscripten_math_cbrt:_emscripten_math_cbrt,emscripten_math_cos:_emscripten_math_cos,emscripten_math_cosh:_emscripten_math_cosh,emscripten_math_exp:_emscripten_math_exp,emscripten_math_expm1:_emscripten_math_expm1,emscripten_math_fmod:_emscripten_math_fmod,emscripten_math_hypot:_emscripten_math_hypot,emscripten_math_log:_emscripten_math_log,emscripten_math_log10:_emscripten_math_log10,emscripten_math_log1p:_emscripten_math_log1p,emscripten_math_log2:_emscripten_math_log2,emscripten_math_pow:_emscripten_math_pow,emscripten_math_random:_emscripten_math_random,emscripten_math_round:_emscripten_math_round,emscripten_math_sign:_emscripten_math_sign,emscripten_math_sin:_emscripten_math_sin,emscripten_math_sinh:_emscripten_math_sinh,emscripten_math_sqrt:_emscripten_math_sqrt,emscripten_math_tan:_emscripten_math_tan,emscripten_math_tanh:_emscripten_math_tanh,emscripten_notify_memory_growth:_emscripten_notify_memory_growth,emscripten_out:_emscripten_out,emscripten_outn:_emscripten_outn,emscripten_pause_main_loop:_emscripten_pause_main_loop,emscripten_pc_get_column:_emscripten_pc_get_column,emscripten_pc_get_file:_emscripten_pc_get_file,emscripten_pc_get_function:_emscripten_pc_get_function,emscripten_pc_get_line:_emscripten_pc_get_line,emscripten_performance_now:_emscripten_performance_now,emscripten_print_double:_emscripten_print_double,emscripten_promise_all:_emscripten_promise_all,emscripten_promise_all_settled:_emscripten_promise_all_settled,emscripten_promise_any:_emscripten_promise_any,emscripten_promise_await:_emscripten_promise_await,emscripten_promise_create:_emscripten_promise_create,emscripten_promise_destroy:_emscripten_promise_destroy,emscripten_promise_race:_emscripten_promise_race,emscripten_promise_resolve:_emscripten_promise_resolve,emscripten_promise_then:_emscripten_promise_then,emscripten_random:_emscripten_random,emscripten_request_animation_frame:_emscripten_request_animation_frame,emscripten_request_animation_frame_loop:_emscripten_request_animation_frame_loop,emscripten_request_fullscreen:_emscripten_request_fullscreen,emscripten_request_fullscreen_strategy:_emscripten_request_fullscreen_strategy,emscripten_request_pointerlock:_emscripten_request_pointerlock,emscripten_resize_heap:_emscripten_resize_heap,emscripten_resume_main_loop:_emscripten_resume_main_loop,emscripten_return_address:_emscripten_return_address,emscripten_run_preload_plugins:_emscripten_run_preload_plugins,emscripten_run_preload_plugins_data:_emscripten_run_preload_plugins_data,emscripten_run_script:_emscripten_run_script,emscripten_run_script_int:_emscripten_run_script_int,emscripten_run_script_string:_emscripten_run_script_string,emscripten_runtime_keepalive_check:_emscripten_runtime_keepalive_check,emscripten_runtime_keepalive_pop:_emscripten_runtime_keepalive_pop,emscripten_runtime_keepalive_push:_emscripten_runtime_keepalive_push,emscripten_sample_gamepad_data:_emscripten_sample_gamepad_data,emscripten_scan_registers:_emscripten_scan_registers,emscripten_set_batterychargingchange_callback_on_thread:_emscripten_set_batterychargingchange_callback_on_thread,emscripten_set_batterylevelchange_callback_on_thread:_emscripten_set_batterylevelchange_callback_on_thread,emscripten_set_beforeunload_callback_on_thread:_emscripten_set_beforeunload_callback_on_thread,emscripten_set_blur_callback_on_thread:_emscripten_set_blur_callback_on_thread,emscripten_set_canvas_element_size:_emscripten_set_canvas_element_size,emscripten_set_canvas_size:_emscripten_set_canvas_size,emscripten_set_click_callback_on_thread:_emscripten_set_click_callback_on_thread,emscripten_set_dblclick_callback_on_thread:_emscripten_set_dblclick_callback_on_thread,emscripten_set_devicemotion_callback_on_thread:_emscripten_set_devicemotion_callback_on_thread,emscripten_set_deviceorientation_callback_on_thread:_emscripten_set_deviceorientation_callback_on_thread,emscripten_set_element_css_size:_emscripten_set_element_css_size,emscripten_set_focus_callback_on_thread:_emscripten_set_focus_callback_on_thread,emscripten_set_focusin_callback_on_thread:_emscripten_set_focusin_callback_on_thread,emscripten_set_focusout_callback_on_thread:_emscripten_set_focusout_callback_on_thread,emscripten_set_fullscreenchange_callback_on_thread:_emscripten_set_fullscreenchange_callback_on_thread,emscripten_set_gamepadconnected_callback_on_thread:_emscripten_set_gamepadconnected_callback_on_thread,emscripten_set_gamepaddisconnected_callback_on_thread:_emscripten_set_gamepaddisconnected_callback_on_thread,emscripten_set_immediate:_emscripten_set_immediate,emscripten_set_immediate_loop:_emscripten_set_immediate_loop,emscripten_set_interval:_emscripten_set_interval,emscripten_set_keydown_callback_on_thread:_emscripten_set_keydown_callback_on_thread,emscripten_set_keypress_callback_on_thread:_emscripten_set_keypress_callback_on_thread,emscripten_set_keyup_callback_on_thread:_emscripten_set_keyup_callback_on_thread,emscripten_set_main_loop:_emscripten_set_main_loop,emscripten_set_main_loop_arg:_emscripten_set_main_loop_arg,emscripten_set_main_loop_expected_blockers:_emscripten_set_main_loop_expected_blockers,emscripten_set_main_loop_timing:_emscripten_set_main_loop_timing,emscripten_set_mousedown_callback_on_thread:_emscripten_set_mousedown_callback_on_thread,emscripten_set_mouseenter_callback_on_thread:_emscripten_set_mouseenter_callback_on_thread,emscripten_set_mouseleave_callback_on_thread:_emscripten_set_mouseleave_callback_on_thread,emscripten_set_mousemove_callback_on_thread:_emscripten_set_mousemove_callback_on_thread,emscripten_set_mouseout_callback_on_thread:_emscripten_set_mouseout_callback_on_thread,emscripten_set_mouseover_callback_on_thread:_emscripten_set_mouseover_callback_on_thread,emscripten_set_mouseup_callback_on_thread:_emscripten_set_mouseup_callback_on_thread,emscripten_set_orientationchange_callback_on_thread:_emscripten_set_orientationchange_callback_on_thread,emscripten_set_pointerlockchange_callback_on_thread:_emscripten_set_pointerlockchange_callback_on_thread,emscripten_set_pointerlockerror_callback_on_thread:_emscripten_set_pointerlockerror_callback_on_thread,emscripten_set_resize_callback_on_thread:_emscripten_set_resize_callback_on_thread,emscripten_set_scroll_callback_on_thread:_emscripten_set_scroll_callback_on_thread,emscripten_set_socket_close_callback:_emscripten_set_socket_close_callback,emscripten_set_socket_connection_callback:_emscripten_set_socket_connection_callback,emscripten_set_socket_error_callback:_emscripten_set_socket_error_callback,emscripten_set_socket_listen_callback:_emscripten_set_socket_listen_callback,emscripten_set_socket_message_callback:_emscripten_set_socket_message_callback,emscripten_set_socket_open_callback:_emscripten_set_socket_open_callback,emscripten_set_timeout:_emscripten_set_timeout,emscripten_set_timeout_loop:_emscripten_set_timeout_loop,emscripten_set_touchcancel_callback_on_thread:_emscripten_set_touchcancel_callback_on_thread,emscripten_set_touchend_callback_on_thread:_emscripten_set_touchend_callback_on_thread,emscripten_set_touchmove_callback_on_thread:_emscripten_set_touchmove_callback_on_thread,emscripten_set_touchstart_callback_on_thread:_emscripten_set_touchstart_callback_on_thread,emscripten_set_visibilitychange_callback_on_thread:_emscripten_set_visibilitychange_callback_on_thread,emscripten_set_webglcontextlost_callback_on_thread:_emscripten_set_webglcontextlost_callback_on_thread,emscripten_set_webglcontextrestored_callback_on_thread:_emscripten_set_webglcontextrestored_callback_on_thread,emscripten_set_wheel_callback_on_thread:_emscripten_set_wheel_callback_on_thread,emscripten_set_window_title:_emscripten_set_window_title,emscripten_sleep:_emscripten_sleep,emscripten_stack_snapshot:_emscripten_stack_snapshot,emscripten_stack_unwind_buffer:_emscripten_stack_unwind_buffer,emscripten_supports_offscreencanvas:_emscripten_supports_offscreencanvas,emscripten_throw_number:_emscripten_throw_number,emscripten_throw_string:_emscripten_throw_string,emscripten_unlock_orientation:_emscripten_unlock_orientation,emscripten_unwind_to_js_event_loop:_emscripten_unwind_to_js_event_loop,emscripten_vibrate:_emscripten_vibrate,emscripten_vibrate_pattern:_emscripten_vibrate_pattern,emscripten_webgl_commit_frame:_emscripten_webgl_commit_frame,emscripten_webgl_create_context:_emscripten_webgl_create_context,emscripten_webgl_destroy_context:_emscripten_webgl_destroy_context,emscripten_webgl_do_commit_frame:_emscripten_webgl_do_commit_frame,emscripten_webgl_do_create_context:_emscripten_webgl_do_create_context,emscripten_webgl_do_get_current_context:_emscripten_webgl_do_get_current_context,emscripten_webgl_enable_ANGLE_instanced_arrays:_emscripten_webgl_enable_ANGLE_instanced_arrays,emscripten_webgl_enable_EXT_clip_control:_emscripten_webgl_enable_EXT_clip_control,emscripten_webgl_enable_EXT_polygon_offset_clamp:_emscripten_webgl_enable_EXT_polygon_offset_clamp,emscripten_webgl_enable_OES_vertex_array_object:_emscripten_webgl_enable_OES_vertex_array_object,emscripten_webgl_enable_WEBGL_draw_buffers:_emscripten_webgl_enable_WEBGL_draw_buffers,emscripten_webgl_enable_WEBGL_multi_draw:_emscripten_webgl_enable_WEBGL_multi_draw,emscripten_webgl_enable_WEBGL_polygon_mode:_emscripten_webgl_enable_WEBGL_polygon_mode,emscripten_webgl_enable_extension:_emscripten_webgl_enable_extension,emscripten_webgl_get_context_attributes:_emscripten_webgl_get_context_attributes,emscripten_webgl_get_current_context:_emscripten_webgl_get_current_context,emscripten_webgl_get_drawing_buffer_size:_emscripten_webgl_get_drawing_buffer_size,emscripten_webgl_get_parameter_d:_emscripten_webgl_get_parameter_d,emscripten_webgl_get_parameter_i64v:_emscripten_webgl_get_parameter_i64v,emscripten_webgl_get_parameter_o:_emscripten_webgl_get_parameter_o,emscripten_webgl_get_parameter_utf8:_emscripten_webgl_get_parameter_utf8,emscripten_webgl_get_parameter_v:_emscripten_webgl_get_parameter_v,emscripten_webgl_get_program_info_log_utf8:_emscripten_webgl_get_program_info_log_utf8,emscripten_webgl_get_program_parameter_d:_emscripten_webgl_get_program_parameter_d,emscripten_webgl_get_shader_info_log_utf8:_emscripten_webgl_get_shader_info_log_utf8,emscripten_webgl_get_shader_parameter_d:_emscripten_webgl_get_shader_parameter_d,emscripten_webgl_get_shader_source_utf8:_emscripten_webgl_get_shader_source_utf8,emscripten_webgl_get_supported_extensions:_emscripten_webgl_get_supported_extensions,emscripten_webgl_get_uniform_d:_emscripten_webgl_get_uniform_d,emscripten_webgl_get_uniform_v:_emscripten_webgl_get_uniform_v,emscripten_webgl_get_vertex_attrib_d:_emscripten_webgl_get_vertex_attrib_d,emscripten_webgl_get_vertex_attrib_o:_emscripten_webgl_get_vertex_attrib_o,emscripten_webgl_get_vertex_attrib_v:_emscripten_webgl_get_vertex_attrib_v,emscripten_webgl_make_context_current:_emscripten_webgl_make_context_current,emscripten_wget_data:_emscripten_wget_data,endprotoent:_endprotoent,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,exit:_exit,fd_close:_fd_close,fd_fdstat_get:_fd_fdstat_get,fd_pread:_fd_pread,fd_pwrite:_fd_pwrite,fd_read:_fd_read,fd_seek:_fd_seek,fd_sync:_fd_sync,fd_write:_fd_write,filledEllipseColor:_filledEllipseColor,filledEllipseRGBA:_filledEllipseRGBA,getaddrinfo:_getaddrinfo,getentropy:_getentropy,getnameinfo:_getnameinfo,getprotobyname:_getprotobyname,getprotobynumber:_getprotobynumber,getprotoent:_getprotoent,glActiveTexture:_glActiveTexture,glAttachShader:_glAttachShader,glBegin:_glBegin,glBeginQueryEXT:_glBeginQueryEXT,glBindAttribLocation:_glBindAttribLocation,glBindBuffer:_glBindBuffer,glBindFramebuffer:_glBindFramebuffer,glBindRenderbuffer:_glBindRenderbuffer,glBindTexture:_glBindTexture,glBindVertexArray:_glBindVertexArray,glBindVertexArrayOES:_glBindVertexArrayOES,glBlendColor:_glBlendColor,glBlendEquation:_glBlendEquation,glBlendEquationSeparate:_glBlendEquationSeparate,glBlendFunc:_glBlendFunc,glBlendFuncSeparate:_glBlendFuncSeparate,glBufferData:_glBufferData,glBufferSubData:_glBufferSubData,glCheckFramebufferStatus:_glCheckFramebufferStatus,glClear:_glClear,glClearColor:_glClearColor,glClearDepth:_glClearDepth,glClearDepthf:_glClearDepthf,glClearStencil:_glClearStencil,glClipControlEXT:_glClipControlEXT,glColorMask:_glColorMask,glCompileShader:_glCompileShader,glCompressedTexImage2D:_glCompressedTexImage2D,glCompressedTexSubImage2D:_glCompressedTexSubImage2D,glCopyTexImage2D:_glCopyTexImage2D,glCopyTexSubImage2D:_glCopyTexSubImage2D,glCreateProgram:_glCreateProgram,glCreateShader:_glCreateShader,glCullFace:_glCullFace,glDeleteBuffers:_glDeleteBuffers,glDeleteFramebuffers:_glDeleteFramebuffers,glDeleteProgram:_glDeleteProgram,glDeleteQueriesEXT:_glDeleteQueriesEXT,glDeleteRenderbuffers:_glDeleteRenderbuffers,glDeleteShader:_glDeleteShader,glDeleteTextures:_glDeleteTextures,glDeleteVertexArrays:_glDeleteVertexArrays,glDeleteVertexArraysOES:_glDeleteVertexArraysOES,glDepthFunc:_glDepthFunc,glDepthMask:_glDepthMask,glDepthRange:_glDepthRange,glDepthRangef:_glDepthRangef,glDetachShader:_glDetachShader,glDisable:_glDisable,glDisableVertexAttribArray:_glDisableVertexAttribArray,glDrawArrays:_glDrawArrays,glDrawArraysInstanced:_glDrawArraysInstanced,glDrawArraysInstancedANGLE:_glDrawArraysInstancedANGLE,glDrawArraysInstancedARB:_glDrawArraysInstancedARB,glDrawArraysInstancedEXT:_glDrawArraysInstancedEXT,glDrawArraysInstancedNV:_glDrawArraysInstancedNV,glDrawBuffers:_glDrawBuffers,glDrawBuffersEXT:_glDrawBuffersEXT,glDrawBuffersWEBGL:_glDrawBuffersWEBGL,glDrawElements:_glDrawElements,glDrawElementsInstanced:_glDrawElementsInstanced,glDrawElementsInstancedANGLE:_glDrawElementsInstancedANGLE,glDrawElementsInstancedARB:_glDrawElementsInstancedARB,glDrawElementsInstancedEXT:_glDrawElementsInstancedEXT,glDrawElementsInstancedNV:_glDrawElementsInstancedNV,glEnable:_glEnable,glEnableVertexAttribArray:_glEnableVertexAttribArray,glEndQueryEXT:_glEndQueryEXT,glFinish:_glFinish,glFlush:_glFlush,glFramebufferRenderbuffer:_glFramebufferRenderbuffer,glFramebufferTexture2D:_glFramebufferTexture2D,glFrontFace:_glFrontFace,glGenBuffers:_glGenBuffers,glGenFramebuffers:_glGenFramebuffers,glGenQueriesEXT:_glGenQueriesEXT,glGenRenderbuffers:_glGenRenderbuffers,glGenTextures:_glGenTextures,glGenVertexArrays:_glGenVertexArrays,glGenVertexArraysOES:_glGenVertexArraysOES,glGenerateMipmap:_glGenerateMipmap,glGetActiveAttrib:_glGetActiveAttrib,glGetActiveUniform:_glGetActiveUniform,glGetAttachedShaders:_glGetAttachedShaders,glGetAttribLocation:_glGetAttribLocation,glGetBooleanv:_glGetBooleanv,glGetBufferParameteriv:_glGetBufferParameteriv,glGetError:_glGetError,glGetFloatv:_glGetFloatv,glGetFramebufferAttachmentParameteriv:_glGetFramebufferAttachmentParameteriv,glGetIntegerv:_glGetIntegerv,glGetProgramInfoLog:_glGetProgramInfoLog,glGetProgramiv:_glGetProgramiv,glGetQueryObjecti64vEXT:_glGetQueryObjecti64vEXT,glGetQueryObjectivEXT:_glGetQueryObjectivEXT,glGetQueryObjectui64vEXT:_glGetQueryObjectui64vEXT,glGetQueryObjectuivEXT:_glGetQueryObjectuivEXT,glGetQueryivEXT:_glGetQueryivEXT,glGetRenderbufferParameteriv:_glGetRenderbufferParameteriv,glGetShaderInfoLog:_glGetShaderInfoLog,glGetShaderPrecisionFormat:_glGetShaderPrecisionFormat,glGetShaderSource:_glGetShaderSource,glGetShaderiv:_glGetShaderiv,glGetString:_glGetString,glGetTexParameterfv:_glGetTexParameterfv,glGetTexParameteriv:_glGetTexParameteriv,glGetUniformLocation:_glGetUniformLocation,glGetUniformfv:_glGetUniformfv,glGetUniformiv:_glGetUniformiv,glGetVertexAttribPointerv:_glGetVertexAttribPointerv,glGetVertexAttribfv:_glGetVertexAttribfv,glGetVertexAttribiv:_glGetVertexAttribiv,glHint:_glHint,glIsBuffer:_glIsBuffer,glIsEnabled:_glIsEnabled,glIsFramebuffer:_glIsFramebuffer,glIsProgram:_glIsProgram,glIsQueryEXT:_glIsQueryEXT,glIsRenderbuffer:_glIsRenderbuffer,glIsShader:_glIsShader,glIsTexture:_glIsTexture,glIsVertexArray:_glIsVertexArray,glIsVertexArrayOES:_glIsVertexArrayOES,glLineWidth:_glLineWidth,glLinkProgram:_glLinkProgram,glLoadIdentity:_glLoadIdentity,glMatrixMode:_glMatrixMode,glMultiDrawArrays:_glMultiDrawArrays,glMultiDrawArraysANGLE:_glMultiDrawArraysANGLE,glMultiDrawArraysInstancedANGLE:_glMultiDrawArraysInstancedANGLE,glMultiDrawArraysInstancedWEBGL:_glMultiDrawArraysInstancedWEBGL,glMultiDrawArraysWEBGL:_glMultiDrawArraysWEBGL,glMultiDrawElements:_glMultiDrawElements,glMultiDrawElementsANGLE:_glMultiDrawElementsANGLE,glMultiDrawElementsInstancedANGLE:_glMultiDrawElementsInstancedANGLE,glMultiDrawElementsInstancedWEBGL:_glMultiDrawElementsInstancedWEBGL,glMultiDrawElementsWEBGL:_glMultiDrawElementsWEBGL,glPixelStorei:_glPixelStorei,glPolygonModeWEBGL:_glPolygonModeWEBGL,glPolygonOffset:_glPolygonOffset,glPolygonOffsetClampEXT:_glPolygonOffsetClampEXT,glQueryCounterEXT:_glQueryCounterEXT,glReadPixels:_glReadPixels,glReleaseShaderCompiler:_glReleaseShaderCompiler,glRenderbufferStorage:_glRenderbufferStorage,glSampleCoverage:_glSampleCoverage,glScissor:_glScissor,glShaderBinary:_glShaderBinary,glShaderSource:_glShaderSource,glStencilFunc:_glStencilFunc,glStencilFuncSeparate:_glStencilFuncSeparate,glStencilMask:_glStencilMask,glStencilMaskSeparate:_glStencilMaskSeparate,glStencilOp:_glStencilOp,glStencilOpSeparate:_glStencilOpSeparate,glTexImage2D:_glTexImage2D,glTexParameterf:_glTexParameterf,glTexParameterfv:_glTexParameterfv,glTexParameteri:_glTexParameteri,glTexParameteriv:_glTexParameteriv,glTexSubImage2D:_glTexSubImage2D,glUniform1f:_glUniform1f,glUniform1fv:_glUniform1fv,glUniform1i:_glUniform1i,glUniform1iv:_glUniform1iv,glUniform2f:_glUniform2f,glUniform2fv:_glUniform2fv,glUniform2i:_glUniform2i,glUniform2iv:_glUniform2iv,glUniform3f:_glUniform3f,glUniform3fv:_glUniform3fv,glUniform3i:_glUniform3i,glUniform3iv:_glUniform3iv,glUniform4f:_glUniform4f,glUniform4fv:_glUniform4fv,glUniform4i:_glUniform4i,glUniform4iv:_glUniform4iv,glUniformMatrix2fv:_glUniformMatrix2fv,glUniformMatrix3fv:_glUniformMatrix3fv,glUniformMatrix4fv:_glUniformMatrix4fv,glUseProgram:_glUseProgram,glValidateProgram:_glValidateProgram,glVertexAttrib1f:_glVertexAttrib1f,glVertexAttrib1fv:_glVertexAttrib1fv,glVertexAttrib2f:_glVertexAttrib2f,glVertexAttrib2fv:_glVertexAttrib2fv,glVertexAttrib3f:_glVertexAttrib3f,glVertexAttrib3fv:_glVertexAttrib3fv,glVertexAttrib4f:_glVertexAttrib4f,glVertexAttrib4fv:_glVertexAttrib4fv,glVertexAttribDivisor:_glVertexAttribDivisor,glVertexAttribDivisorANGLE:_glVertexAttribDivisorANGLE,glVertexAttribDivisorARB:_glVertexAttribDivisorARB,glVertexAttribDivisorEXT:_glVertexAttribDivisorEXT,glVertexAttribDivisorNV:_glVertexAttribDivisorNV,glVertexAttribPointer:_glVertexAttribPointer,glVertexPointer:_glVertexPointer,glViewport:_glViewport,glewGetErrorString:_glewGetErrorString,glewGetExtension:_glewGetExtension,glewGetString:_glewGetString,glewInit:_glewInit,glewIsSupported:_glewIsSupported,glutCreateWindow:_glutCreateWindow,glutDestroyWindow:_glutDestroyWindow,glutDisplayFunc:_glutDisplayFunc,glutFullScreen:_glutFullScreen,glutGet:_glutGet,glutGetModifiers:_glutGetModifiers,glutIdleFunc:_glutIdleFunc,glutInit:_glutInit,glutInitDisplayMode:_glutInitDisplayMode,glutInitWindowPosition:_glutInitWindowPosition,glutInitWindowSize:_glutInitWindowSize,glutKeyboardFunc:_glutKeyboardFunc,glutKeyboardUpFunc:_glutKeyboardUpFunc,glutMainLoop:_glutMainLoop,glutMotionFunc:_glutMotionFunc,glutMouseFunc:_glutMouseFunc,glutPassiveMotionFunc:_glutPassiveMotionFunc,glutPositionWindow:_glutPositionWindow,glutPostRedisplay:_glutPostRedisplay,glutReshapeFunc:_glutReshapeFunc,glutReshapeWindow:_glutReshapeWindow,glutSetCursor:_glutSetCursor,glutSpecialFunc:_glutSpecialFunc,glutSpecialUpFunc:_glutSpecialUpFunc,glutSwapBuffers:_glutSwapBuffers,glutTimerFunc:_glutTimerFunc,lineColor:_lineColor,lineRGBA:_lineRGBA,memory:wasmMemory,pixelRGBA:_pixelRGBA,proc_exit:_proc_exit,pthread_kill:_pthread_kill,random_get:_random_get,rectangleColor:_rectangleColor,rectangleRGBA:_rectangleRGBA,rotozoomSurface:_rotozoomSurface,setNetworkCallback:_setNetworkCallback,setprotoent:_setprotoent,stackAlloc:_stackAlloc,stackRestore:_stackRestore,stackSave:_stackSave,strptime:_strptime,strptime_l:_strptime_l,uuid_clear:_uuid_clear,uuid_compare:_uuid_compare,uuid_copy:_uuid_copy,uuid_generate:_uuid_generate,uuid_is_null:_uuid_is_null,uuid_parse:_uuid_parse,uuid_type:_uuid_type,uuid_unparse:_uuid_unparse,uuid_unparse_lower:_uuid_unparse_lower,uuid_unparse_upper:_uuid_unparse_upper,uuid_variant:_uuid_variant,zoomSurface:_zoomSurface},wasmExports=createWasm(),__emval_coro_resume=(e,t)=>(__emval_coro_resume=wasmExports._emval_coro_resume)(e,t);Module._main=(e,t)=>(Module._main=wasmExports.main)(e,t),Module._duckdb_web_fs_glob_add_path=e=>(Module._duckdb_web_fs_glob_add_path=wasmExports.duckdb_web_fs_glob_add_path)(e),Module._duckdb_web_clear_response=()=>(Module._duckdb_web_clear_response=wasmExports.duckdb_web_clear_response)(),Module._duckdb_web_fail_with=e=>(Module._duckdb_web_fail_with=wasmExports.duckdb_web_fail_with)(e),Module._duckdb_web_reset=e=>(Module._duckdb_web_reset=wasmExports.duckdb_web_reset)(e),Module._duckdb_web_connect=()=>(Module._duckdb_web_connect=wasmExports.duckdb_web_connect)(),Module._duckdb_web_disconnect=e=>(Module._duckdb_web_disconnect=wasmExports.duckdb_web_disconnect)(e),Module._duckdb_web_flush_files=()=>(Module._duckdb_web_flush_files=wasmExports.duckdb_web_flush_files)(),Module._duckdb_web_flush_file=e=>(Module._duckdb_web_flush_file=wasmExports.duckdb_web_flush_file)(e),Module._duckdb_web_open=(e,t)=>(Module._duckdb_web_open=wasmExports.duckdb_web_open)(e,t),Module._duckdb_web_get_global_file_info=(e,t)=>(Module._duckdb_web_get_global_file_info=wasmExports.duckdb_web_get_global_file_info)(e,t),Module._duckdb_web_collect_file_stats=(e,t,r)=>(Module._duckdb_web_collect_file_stats=wasmExports.duckdb_web_collect_file_stats)(e,t,r),Module._duckdb_web_export_file_stats=(e,t)=>(Module._duckdb_web_export_file_stats=wasmExports.duckdb_web_export_file_stats)(e,t),Module._duckdb_web_fs_drop_file=(e,t)=>(Module._duckdb_web_fs_drop_file=wasmExports.duckdb_web_fs_drop_file)(e,t),Module._duckdb_web_fs_drop_files=e=>(Module._duckdb_web_fs_drop_files=wasmExports.duckdb_web_fs_drop_files)(e),Module._duckdb_web_fs_glob_file_infos=(e,t)=>(Module._duckdb_web_fs_glob_file_infos=wasmExports.duckdb_web_fs_glob_file_infos)(e,t),Module._duckdb_web_fs_get_file_info_by_id=(e,t,r)=>(Module._duckdb_web_fs_get_file_info_by_id=wasmExports.duckdb_web_fs_get_file_info_by_id)(e,t,r),Module._duckdb_web_fs_get_file_info_by_name=(e,t,r)=>(Module._duckdb_web_fs_get_file_info_by_name=wasmExports.duckdb_web_fs_get_file_info_by_name)(e,t,r),Module._duckdb_web_fs_register_file_url=(e,t,r,n,a)=>(Module._duckdb_web_fs_register_file_url=wasmExports.duckdb_web_fs_register_file_url)(e,t,r,n,a),Module._duckdb_web_fs_register_file_buffer=(e,t,r,n)=>(Module._duckdb_web_fs_register_file_buffer=wasmExports.duckdb_web_fs_register_file_buffer)(e,t,r,n),Module._duckdb_web_copy_file_to_buffer=(e,t)=>(Module._duckdb_web_copy_file_to_buffer=wasmExports.duckdb_web_copy_file_to_buffer)(e,t),Module._duckdb_web_copy_file_to_path=(e,t,r)=>(Module._duckdb_web_copy_file_to_path=wasmExports.duckdb_web_copy_file_to_path)(e,t,r),Module._duckdb_web_get_version=e=>(Module._duckdb_web_get_version=wasmExports.duckdb_web_get_version)(e),Module._duckdb_web_get_feature_flags=()=>(Module._duckdb_web_get_feature_flags=wasmExports.duckdb_web_get_feature_flags)(),Module._duckdb_web_tokenize=(e,t)=>(Module._duckdb_web_tokenize=wasmExports.duckdb_web_tokenize)(e,t),Module._duckdb_web_udf_scalar_create=(e,t,r)=>(Module._duckdb_web_udf_scalar_create=wasmExports.duckdb_web_udf_scalar_create)(e,t,r),Module._duckdb_web_prepared_create=(e,t,r)=>(Module._duckdb_web_prepared_create=wasmExports.duckdb_web_prepared_create)(e,t,r),Module._duckdb_web_prepared_close=(e,t,r)=>(Module._duckdb_web_prepared_close=wasmExports.duckdb_web_prepared_close)(e,t,r),Module._duckdb_web_prepared_run=(e,t,r,n)=>(Module._duckdb_web_prepared_run=wasmExports.duckdb_web_prepared_run)(e,t,r,n),Module._duckdb_web_prepared_send=(e,t,r,n)=>(Module._duckdb_web_prepared_send=wasmExports.duckdb_web_prepared_send)(e,t,r,n),Module._duckdb_web_query_run=(e,t,r)=>(Module._duckdb_web_query_run=wasmExports.duckdb_web_query_run)(e,t,r),Module._duckdb_web_query_run_buffer=(e,t,r,n)=>(Module._duckdb_web_query_run_buffer=wasmExports.duckdb_web_query_run_buffer)(e,t,r,n),Module._duckdb_web_pending_query_start=(e,t,r)=>(Module._duckdb_web_pending_query_start=wasmExports.duckdb_web_pending_query_start)(e,t,r),Module._duckdb_web_pending_query_poll=(e,t,r)=>(Module._duckdb_web_pending_query_poll=wasmExports.duckdb_web_pending_query_poll)(e,t,r),Module._duckdb_web_pending_query_cancel=(e,t)=>(Module._duckdb_web_pending_query_cancel=wasmExports.duckdb_web_pending_query_cancel)(e,t),Module._duckdb_web_query_fetch_results=(e,t)=>(Module._duckdb_web_query_fetch_results=wasmExports.duckdb_web_query_fetch_results)(e,t),Module._duckdb_web_get_tablenames=(e,t,r)=>(Module._duckdb_web_get_tablenames=wasmExports.duckdb_web_get_tablenames)(e,t,r),Module._duckdb_web_insert_arrow_from_ipc_stream=(e,t,r,n,a)=>(Module._duckdb_web_insert_arrow_from_ipc_stream=wasmExports.duckdb_web_insert_arrow_from_ipc_stream)(e,t,r,n,a),Module._duckdb_web_insert_csv_from_path=(e,t,r,n)=>(Module._duckdb_web_insert_csv_from_path=wasmExports.duckdb_web_insert_csv_from_path)(e,t,r,n),Module._duckdb_web_insert_json_from_path=(e,t,r,n)=>(Module._duckdb_web_insert_json_from_path=wasmExports.duckdb_web_insert_json_from_path)(e,t,r,n);var ___dl_seterr=(e,t)=>(___dl_seterr=wasmExports.__dl_seterr)(e,t),__emscripten_timeout=(e,t)=>(__emscripten_timeout=wasmExports._emscripten_timeout)(e,t),_malloc=Module._malloc=e=>(_malloc=Module._malloc=wasmExports.malloc)(e),_free=Module._free=e=>(_free=Module._free=wasmExports.free)(e),_calloc=Module._calloc=(e,t)=>(_calloc=Module._calloc=wasmExports.calloc)(e,t),_emscripten_builtin_memalign=(e,t)=>(_emscripten_builtin_memalign=wasmExports.emscripten_builtin_memalign)(e,t),__emscripten_tempret_set=e=>(__emscripten_tempret_set=wasmExports._emscripten_tempret_set)(e),__emscripten_tempret_get=()=>(__emscripten_tempret_get=wasmExports._emscripten_tempret_get)(),__emscripten_stack_restore=e=>(__emscripten_stack_restore=wasmExports._emscripten_stack_restore)(e),__emscripten_stack_alloc=e=>(__emscripten_stack_alloc=wasmExports._emscripten_stack_alloc)(e),_emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports.emscripten_stack_get_current)();function applySignatureConversions(e){e=Object.assign({},e);var t=u=>_=>u(_)>>>0,r=u=>()=>u()>>>0,n=u=>(_,d,p)=>u(_,d,p)>>>0,a=u=>(_,d)=>u(_,d)>>>0,l=u=>_=>u(_)>>>0,c=u=>_=>u(_)>>>0;return e.__getTypeName=t(e.__getTypeName),e.pthread_self=r(e.pthread_self),e.memcpy=n(e.memcpy),e.malloc=t(e.malloc),e.calloc=a(e.calloc),e.__errno_location=r(e.__errno_location),e.strerror=l(e.strerror),e.emscripten_builtin_malloc=t(e.emscripten_builtin_malloc),e.emscripten_stack_get_base=r(e.emscripten_stack_get_base),e.emscripten_stack_get_end=r(e.emscripten_stack_get_end),e.emscripten_builtin_memalign=a(e.emscripten_builtin_memalign),e.emscripten_stack_get_current=r(e.emscripten_stack_get_current),e.emscripten_main_runtime_thread_id=r(e.emscripten_main_runtime_thread_id),e.sbrk=c(e.sbrk),e.memalign=a(e.memalign),e.emscripten_builtin_calloc=a(e.emscripten_builtin_calloc),e._emscripten_stack_alloc=t(e._emscripten_stack_alloc),e.__cxa_get_exception_ptr=t(e.__cxa_get_exception_ptr),e}Module.stackSave=stackSave,Module.stackRestore=stackRestore,Module.stackAlloc=stackAlloc,Module.ccall=ccall;var calledRun;dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)};function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,n=stackAlloc((r+1)*4),a=n;e.forEach(c=>{HEAPU32[a>>>2>>>0]=stringToUTF8OnStack(c),a+=4}),HEAPU32[a>>>2>>>0]=0;try{var l=t(r,n);return exitJS(l,!0),l}catch(c){return handleException(c)}}}function run(e=arguments_){if(runDependencies>0||(preRun(),runDependencies>0))return;function t(){var r;calledRun||(calledRun=!0,Module.calledRun=!0,!ABORT&&(initRuntime(),preMain(),readyPromiseResolve(Module),(r=Module.onRuntimeInitialized)==null||r.call(Module),shouldRunNow&&callMain(e),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>Module.setStatus(""),1),t()},1)):t()}if(Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),run(),moduleRtn=readyPromise,moduleRtn}})();typeof exports=="object"&&typeof module=="object"&&(module.exports=DuckDB)}),Gc=fr(()=>{}),Uc=fr(()=>{}),Oc=fr((e,t)=>{(function(){var r="input is invalid type",n=typeof window=="object",a=n?window:{};a.JS_SHA256_NO_WINDOW&&(n=!1);var l=!n&&typeof self=="object",c=!a.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;c?a=commonjsGlobal:l&&(a=self);var u=!a.JS_SHA256_NO_COMMON_JS&&typeof t=="object"&&t.exports,_=!1,d=!a.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[-2147483648,8388608,32768,128],m=[24,16,8,0],g=[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],h=["hex","array","digest","arrayBuffer"],y=[];(a.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(E){return Object.prototype.toString.call(E)==="[object Array]"}),d&&(a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(E){return typeof E=="object"&&E.buffer&&E.buffer.constructor===ArrayBuffer});var b=function(E,w){return function(C){return new M(w,!0).update(C)[E]()}},S=function(E){var w=b("hex",E);c&&(w=P(w,E)),w.create=function(){return new M(E)},w.update=function(k){return w.create().update(k)};for(var C=0;C>>2]|=E[k]<>>2]|=L<>>2]|=(192|L>>>6)<>>2]|=(128|L&63)<=57344?(D[x>>>2]|=(224|L>>>12)<>>2]|=(128|L>>>6&63)<>>2]|=(128|L&63)<>>2]|=(240|L>>>18)<>>2]|=(128|L>>>12&63)<>>2]|=(128|L>>>6&63)<>>2]|=(128|L&63)<=64?(this.block=D[16],this.start=x-64,this.hash(),this.hashed=!0):this.start=x}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},M.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var E=this.blocks,w=this.lastByteIndex;E[16]=this.block,E[w>>>2]|=f[w&3],this.block=E[16],w>=56&&(this.hashed||this.hash(),E[0]=this.block,E[16]=E[1]=E[2]=E[3]=E[4]=E[5]=E[6]=E[7]=E[8]=E[9]=E[10]=E[11]=E[12]=E[13]=E[14]=E[15]=0),E[14]=this.hBytes<<3|this.bytes>>>29,E[15]=this.bytes<<3,this.hash()}},M.prototype.hash=function(){var E=this.h0,w=this.h1,C=this.h2,L=this.h3,k=this.h4,x=this.h5,O=this.h6,D=this.h7,I=this.blocks,X,oe,Ee,_e,Z,ke,Fe,pt,To,xo,Wi;for(X=16;X<64;++X)Z=I[X-15],oe=(Z>>>7|Z<<25)^(Z>>>18|Z<<14)^Z>>>3,Z=I[X-2],Ee=(Z>>>17|Z<<15)^(Z>>>19|Z<<13)^Z>>>10,I[X]=I[X-16]+oe+I[X-7]+Ee<<0;for(Wi=w&C,X=0;X<64;X+=4)this.first?(this.is224?(pt=300032,Z=I[0]-1413257819,D=Z-150054599<<0,L=Z+24177077<<0):(pt=704751109,Z=I[0]-210244248,D=Z-1521486534<<0,L=Z+143694565<<0),this.first=!1):(oe=(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10),Ee=(k>>>6|k<<26)^(k>>>11|k<<21)^(k>>>25|k<<7),pt=E&w,_e=pt^E&C^Wi,Fe=k&x^~k&O,Z=D+Ee+Fe+g[X]+I[X],ke=oe+_e,D=L+Z<<0,L=Z+ke<<0),oe=(L>>>2|L<<30)^(L>>>13|L<<19)^(L>>>22|L<<10),Ee=(D>>>6|D<<26)^(D>>>11|D<<21)^(D>>>25|D<<7),To=L&E,_e=To^L&w^pt,Fe=D&k^~D&x,Z=O+Ee+Fe+g[X+1]+I[X+1],ke=oe+_e,O=C+Z<<0,C=Z+ke<<0,oe=(C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10),Ee=(O>>>6|O<<26)^(O>>>11|O<<21)^(O>>>25|O<<7),xo=C&L,_e=xo^C&E^To,Fe=O&D^~O&k,Z=x+Ee+Fe+g[X+2]+I[X+2],ke=oe+_e,x=w+Z<<0,w=Z+ke<<0,oe=(w>>>2|w<<30)^(w>>>13|w<<19)^(w>>>22|w<<10),Ee=(x>>>6|x<<26)^(x>>>11|x<<21)^(x>>>25|x<<7),Wi=w&C,_e=Wi^w&L^xo,Fe=x&O^~x&D,Z=k+Ee+Fe+g[X+3]+I[X+3],ke=oe+_e,k=E+Z<<0,E=Z+ke<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+E<<0,this.h1=this.h1+w<<0,this.h2=this.h2+C<<0,this.h3=this.h3+L<<0,this.h4=this.h4+k<<0,this.h5=this.h5+x<<0,this.h6=this.h6+O<<0,this.h7=this.h7+D<<0},M.prototype.hex=function(){this.finalize();var E=this.h0,w=this.h1,C=this.h2,L=this.h3,k=this.h4,x=this.h5,O=this.h6,D=this.h7,I=p[E>>>28&15]+p[E>>>24&15]+p[E>>>20&15]+p[E>>>16&15]+p[E>>>12&15]+p[E>>>8&15]+p[E>>>4&15]+p[E&15]+p[w>>>28&15]+p[w>>>24&15]+p[w>>>20&15]+p[w>>>16&15]+p[w>>>12&15]+p[w>>>8&15]+p[w>>>4&15]+p[w&15]+p[C>>>28&15]+p[C>>>24&15]+p[C>>>20&15]+p[C>>>16&15]+p[C>>>12&15]+p[C>>>8&15]+p[C>>>4&15]+p[C&15]+p[L>>>28&15]+p[L>>>24&15]+p[L>>>20&15]+p[L>>>16&15]+p[L>>>12&15]+p[L>>>8&15]+p[L>>>4&15]+p[L&15]+p[k>>>28&15]+p[k>>>24&15]+p[k>>>20&15]+p[k>>>16&15]+p[k>>>12&15]+p[k>>>8&15]+p[k>>>4&15]+p[k&15]+p[x>>>28&15]+p[x>>>24&15]+p[x>>>20&15]+p[x>>>16&15]+p[x>>>12&15]+p[x>>>8&15]+p[x>>>4&15]+p[x&15]+p[O>>>28&15]+p[O>>>24&15]+p[O>>>20&15]+p[O>>>16&15]+p[O>>>12&15]+p[O>>>8&15]+p[O>>>4&15]+p[O&15];return this.is224||(I+=p[D>>>28&15]+p[D>>>24&15]+p[D>>>20&15]+p[D>>>16&15]+p[D>>>12&15]+p[D>>>8&15]+p[D>>>4&15]+p[D&15]),I},M.prototype.toString=M.prototype.hex,M.prototype.digest=function(){this.finalize();var E=this.h0,w=this.h1,C=this.h2,L=this.h3,k=this.h4,x=this.h5,O=this.h6,D=this.h7,I=[E>>>24&255,E>>>16&255,E>>>8&255,E&255,w>>>24&255,w>>>16&255,w>>>8&255,w&255,C>>>24&255,C>>>16&255,C>>>8&255,C&255,L>>>24&255,L>>>16&255,L>>>8&255,L&255,k>>>24&255,k>>>16&255,k>>>8&255,k&255,x>>>24&255,x>>>16&255,x>>>8&255,x&255,O>>>24&255,O>>>16&255,O>>>8&255,O&255];return this.is224||I.push(D>>>24&255,D>>>16&255,D>>>8&255,D&255),I},M.prototype.array=M.prototype.digest,M.prototype.arrayBuffer=function(){this.finalize();var E=new ArrayBuffer(this.is224?28:32),w=new DataView(E);return w.setUint32(0,this.h0),w.setUint32(4,this.h1),w.setUint32(8,this.h2),w.setUint32(12,this.h3),w.setUint32(16,this.h4),w.setUint32(20,this.h5),w.setUint32(24,this.h6),this.is224||w.setUint32(28,this.h7),E};function Q(E,w,C){var L,k=typeof E;if(k==="string"){var x=[],O=E.length,D=0,I;for(L=0;L>>6,x[D++]=128|I&63):I<55296||I>=57344?(x[D++]=224|I>>>12,x[D++]=128|I>>>6&63,x[D++]=128|I&63):(I=65536+((I&1023)<<10|E.charCodeAt(++L)&1023),x[D++]=240|I>>>18,x[D++]=128|I>>>12&63,x[D++]=128|I>>>6&63,x[D++]=128|I&63);E=x}else if(k==="object"){if(E===null)throw new Error(r);if(d&&E.constructor===ArrayBuffer)E=new Uint8Array(E);else if(!Array.isArray(E)&&(!d||!ArrayBuffer.isView(E)))throw new Error(r)}else throw new Error(r);E.length>64&&(E=new M(w,!0).update(E).array());var X=[],oe=[];for(L=0;L<64;++L){var Ee=E[L]||0;X[L]=92^Ee,oe[L]=54^Ee}M.call(this,w,C),this.update(oe),this.oKeyPad=X,this.inner=!0,this.sharedMemory=C}Q.prototype=new M,Q.prototype.finalize=function(){if(M.prototype.finalize.call(this),this.inner){this.inner=!1;var E=this.array();M.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(E),M.prototype.finalize.call(this)}};var F=S();F.sha256=F,F.sha224=S(!0),F.sha256.hmac=A(),F.sha224.hmac=A(!0),u?t.exports=F:(a.sha256=F.sha256,a.sha224=F.sha224)})()}),Ed={};pr(Ed,{registerWorker:()=>Wc});function Bo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ee(e){return this instanceof ee?(this.v=e,this):new ee(e)}function Qe(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),a,l=[];return a={},c("next"),c("throw"),c("return"),a[Symbol.asyncIterator]=function(){return this},a;function c(m){n[m]&&(a[m]=function(g){return new Promise(function(h,y){l.push([m,g,h,y])>1||u(m,g)})})}function u(m,g){try{_(n[m](g))}catch(h){f(l[0][3],h)}}function _(m){m.value instanceof ee?Promise.resolve(m.value.v).then(d,p):f(l[0][2],m)}function d(m){u("next",m)}function p(m){u("throw",m)}function f(m,g){m(g),l.shift(),l.length&&u(l[0][0],l[0][1])}}function en(e){var t,r;return t={},n("next"),n("throw",function(a){throw a}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(a,l){t[a]=e[a]?function(c){return(r=!r)?{value:ee(e[a](c)),done:!1}:l?l(c):c}:l}}function ut(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof ko=="function"?ko(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(l){r[l]=e[l]&&function(c){return new Promise(function(u,_){c=e[l](c),a(u,_,c.done,c.value)})}}function a(l,c,u,_){Promise.resolve(_).then(function(d){l({value:d,done:u})},c)}}var wa={};pr(wa,{compareArrayLike:()=>Ea,joinUint8Arrays:()=>Ye,memcpy:()=>In,rebaseValueOffsets:()=>Gi,toArrayBufferView:()=>re,toArrayBufferViewAsyncIterator:()=>ft,toArrayBufferViewIterator:()=>Pt,toBigInt64Array:()=>Bi,toBigUint64Array:()=>iu,toFloat32Array:()=>su,toFloat32ArrayAsyncIterator:()=>Su,toFloat32ArrayIterator:()=>fu,toFloat64Array:()=>au,toFloat64ArrayAsyncIterator:()=>Eu,toFloat64ArrayIterator:()=>pu,toInt16Array:()=>tu,toInt16ArrayAsyncIterator:()=>hu,toInt16ArrayIterator:()=>cu,toInt32Array:()=>Mr,toInt32ArrayAsyncIterator:()=>vu,toInt32ArrayIterator:()=>uu,toInt8Array:()=>eu,toInt8ArrayAsyncIterator:()=>gu,toInt8ArrayIterator:()=>lu,toUint16Array:()=>ru,toUint16ArrayAsyncIterator:()=>bu,toUint16ArrayIterator:()=>_u,toUint32Array:()=>nu,toUint32ArrayAsyncIterator:()=>yu,toUint32ArrayIterator:()=>du,toUint8Array:()=>j,toUint8ArrayAsyncIterator:()=>Sa,toUint8ArrayIterator:()=>ya,toUint8ClampedArray:()=>ou,toUint8ClampedArrayAsyncIterator:()=>wu,toUint8ClampedArrayIterator:()=>mu});var Yc=new TextDecoder("utf-8"),Tn=e=>Yc.decode(e),Jc=new TextEncoder,Tt=e=>Jc.encode(e),Kc=e=>typeof e=="number",Go=e=>typeof e=="boolean",Pe=e=>typeof e=="function",He=e=>e!=null&&Object(e)===e,_t=e=>He(e)&&Pe(e.then),dt=e=>He(e)&&Pe(e[Symbol.iterator]),rt=e=>He(e)&&Pe(e[Symbol.asyncIterator]),Ti=e=>He(e)&&He(e.schema),Pi=e=>He(e)&&"done"in e&&"value"in e,Ii=e=>He(e)&&Pe(e.stat)&&Kc(e.fd),Ci=e=>He(e)&&Pn(e.body),Mi=e=>"_getDOMStream"in e&&"_getNodeStream"in e,Uo=e=>He(e)&&Pe(e.abort)&&Pe(e.getWriter)&&!Mi(e),Pn=e=>He(e)&&Pe(e.cancel)&&Pe(e.getReader)&&!Mi(e),Oo=e=>He(e)&&Pe(e.end)&&Pe(e.write)&&Go(e.writable)&&!Mi(e),ki=e=>He(e)&&Pe(e.read)&&Pe(e.pipe)&&Go(e.readable)&&!Mi(e),Ro=e=>He(e)&&Pe(e.clear)&&Pe(e.bytes)&&Pe(e.position)&&Pe(e.setPosition)&&Pe(e.capacity)&&Pe(e.getBufferIdentifier)&&Pe(e.createLong),ba=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function Zc(e){let t=e[0]?[e[0]]:[],r,n,a,l;for(let c,u,_=0,d=0,p=e.length;++_p+f.byteLength,0),a,l,c,u=0,_=-1,d=Math.min(t||Number.POSITIVE_INFINITY,n);for(let p=r.length;++_re(Int8Array,e),tu=e=>re(Int16Array,e),Mr=e=>re(Int32Array,e),Bi=e=>re(BigInt64Array,e),j=e=>re(Uint8Array,e),ru=e=>re(Uint16Array,e),nu=e=>re(Uint32Array,e),iu=e=>re(BigUint64Array,e),su=e=>re(Float32Array,e),au=e=>re(Float64Array,e),ou=e=>re(Uint8ClampedArray,e),va=e=>(e.next(),e);function*Pt(e,t){let r=function*(a){yield a},n=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof ba?r(t):dt(t)?t:r(t);return yield*Cr(va(function*(a){let l=null;do l=a.next(yield re(e,l));while(!l.done)}(n[Symbol.iterator]()))),new e}var lu=e=>Pt(Int8Array,e),cu=e=>Pt(Int16Array,e),uu=e=>Pt(Int32Array,e),ya=e=>Pt(Uint8Array,e),_u=e=>Pt(Uint16Array,e),du=e=>Pt(Uint32Array,e),fu=e=>Pt(Float32Array,e),pu=e=>Pt(Float64Array,e),mu=e=>Pt(Uint8ClampedArray,e);function ft(e,t){return Qe(this,arguments,function*(){if(_t(t))return yield ee(yield ee(yield*Cr(en(ut(ft(e,yield ee(t)))))));let r=function(l){return Qe(this,arguments,function*(){yield yield ee(yield ee(l))})},n=function(l){return Qe(this,arguments,function*(){yield ee(yield*Cr(en(ut(va(function*(c){let u=null;do u=c.next(yield u==null?void 0:u.value);while(!u.done)}(l[Symbol.iterator]()))))))})},a=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof ba?r(t):dt(t)?n(t):rt(t)?t:r(t);return yield ee(yield*Cr(en(ut(va(function(l){return Qe(this,arguments,function*(){let c=null;do c=yield ee(l.next(yield yield ee(re(e,c))));while(!c.done)})}(a[Symbol.asyncIterator]())))))),yield ee(new e)})}var gu=e=>ft(Int8Array,e),hu=e=>ft(Int16Array,e),vu=e=>ft(Int32Array,e),Sa=e=>ft(Uint8Array,e),bu=e=>ft(Uint16Array,e),yu=e=>ft(Uint32Array,e),Su=e=>ft(Float32Array,e),Eu=e=>ft(Float64Array,e),wu=e=>ft(Uint8ClampedArray,e);function Gi(e,t,r){if(e!==0){r=r.slice(0,t);for(let n=-1,a=r.length;++n0)do if(e[r]!==t[r])return!1;while(++r(e.next(),e);function*Lu(e){let t,r=!1,n=[],a,l,c,u=0;function _(){return l==="peek"?Ye(n,c)[0]:([a,n,u]=Ye(n,c),a)}({cmd:l,size:c}=(yield null)||{cmd:"read",size:0});let d=ya(e)[Symbol.iterator]();try{do if({done:t,value:a}=Number.isNaN(c-u)?d.next():d.next(c-u),!t&&a.byteLength>0&&(n.push(a),u+=a.byteLength),t||c<=u)do({cmd:l,size:c}=yield _());while(c0&&(n.push(a),u+=a.byteLength),t||c<=u)do({cmd:l,size:c}=yield yield ee(_()));while(c0&&(n.push(j(a)),u+=a.byteLength),t||c<=u)do({cmd:l,size:c}=yield yield ee(_()));while(c{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return B(this,void 0,void 0,function*(){let{reader:t,source:r}=this;t&&(yield t.cancel(e).catch(()=>{})),r&&r.locked&&this.releaseLock()})}read(e){return B(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=yield this.reader.read();return!t.done&&(t.value=j(t)),t})}},La=(e,t)=>{let r=a=>n([t,a]),n;return[t,r,new Promise(a=>(n=a)&&e.once(t,r))]};function Fu(e){return Qe(this,arguments,function*(){let t=[],r="error",n=!1,a=null,l,c,u=0,_=[],d;function p(){return l==="peek"?Ye(_,c)[0]:([d,_,u]=Ye(_,c),d)}if({cmd:l,size:c}=(yield yield ee(null))||{cmd:"read",size:0},e.isTTY)return yield yield ee(new Uint8Array(0)),yield ee(null);try{t[0]=La(e,"end"),t[1]=La(e,"error");do{if(t[2]=La(e,"readable"),[r,a]=yield ee(Promise.race(t.map(m=>m[2]))),r==="error")break;if((n=r==="end")||(Number.isFinite(c-u)?(d=j(e.read(c-u)),d.byteLength0&&(_.push(d),u+=d.byteLength)),n||c<=u)do({cmd:l,size:c}=yield yield ee(p()));while(c{for(let[b,S]of m)e.off(b,S);try{let b=e.destroy;b&&b.call(e,g),g=void 0}catch(b){g=b||g}finally{g!=null?y(g):h()}})}})}var ue;(function(e){e[e.V1=0]="V1",e[e.V2=1]="V2",e[e.V3=2]="V3",e[e.V4=3]="V4",e[e.V5=4]="V5"})(ue||(ue={}));var ge;(function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"})(ge||(ge={}));var pe;(function(e){e[e.HALF=0]="HALF",e[e.SINGLE=1]="SINGLE",e[e.DOUBLE=2]="DOUBLE"})(pe||(pe={}));var Ae;(function(e){e[e.DAY=0]="DAY",e[e.MILLISECOND=1]="MILLISECOND"})(Ae||(Ae={}));var U;(function(e){e[e.SECOND=0]="SECOND",e[e.MILLISECOND=1]="MILLISECOND",e[e.MICROSECOND=2]="MICROSECOND",e[e.NANOSECOND=3]="NANOSECOND"})(U||(U={}));var Ie;(function(e){e[e.YEAR_MONTH=0]="YEAR_MONTH",e[e.DAY_TIME=1]="DAY_TIME",e[e.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Ie||(Ie={}));var It=new Int32Array(2),Oi=new Float32Array(It.buffer),Ri=new Float64Array(It.buffer),tn=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1,Cn;(function(e){e[e.UTF8_BYTES=1]="UTF8_BYTES",e[e.UTF16_STRING=2]="UTF16_STRING"})(Cn||(Cn={}));var Je=class Od{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new Od(new Uint8Array(t))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<>8}writeUint16(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8}writeInt32(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8,this.bytes_[t+2]=r>>16,this.bytes_[t+3]=r>>24}writeUint32(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8,this.bytes_[t+2]=r>>16,this.bytes_[t+3]=r>>24}writeInt64(t,r){this.writeInt32(t,Number(BigInt.asIntN(32,r))),this.writeInt32(t+4,Number(BigInt.asIntN(32,r>>BigInt(32))))}writeUint64(t,r){this.writeUint32(t,Number(BigInt.asUintN(32,r))),this.writeUint32(t+4,Number(BigInt.asUintN(32,r>>BigInt(32))))}writeFloat32(t,r){Oi[0]=r,this.writeInt32(t,It[0])}writeFloat64(t,r){Ri[0]=r,this.writeInt32(t,It[tn?0:1]),this.writeInt32(t+4,It[tn?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);let n=~(this.bb.capacity()-this.space+r)+1&t-1;for(;this.space=0&&this.vtable[r]==0;r--);let n=r+1;for(;r>=0;r--)this.addInt16(this.vtable[r]!=0?t-this.vtable[r]:0);let a=2;this.addInt16(t-this.object_start);let l=(n+a)*2;this.addInt16(l);let c=0,u=this.space;e:for(r=0;r=0;c--)this.writeInt8(l.charCodeAt(c))}this.prep(this.minalign,4+a),this.addOffset(t),a&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(t,r){this.finish(t,r,!0)}requiredField(t,r){let n=this.bb.capacity()-t,a=n-this.bb.readInt32(n);if(!(r=0;n--)t.addInt32(r[n]);return t.endVector()}static startTypeIdsVector(t,r){t.startVector(4,r,4)}static endUnion(t){return t.endObject()}static createUnion(t,r,n){return Ji.startUnion(t),Ji.addMode(t,r),Ji.addTypeIds(t,n),Ji.endUnion(t)}},Vn=class Td{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsUtf8(t,r){return(r||new Td).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,r){return t.setPosition(t.position()+4),(r||new Td).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(t){return Td.startUtf8(t),Td.endUtf8(t)}},he;(function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.FloatingPoint=3]="FloatingPoint",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct_=13]="Struct_",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Duration=18]="Duration",e[e.LargeBinary=19]="LargeBinary",e[e.LargeUtf8=20]="LargeUtf8",e[e.LargeList=21]="LargeList",e[e.RunEndEncoded=22]="RunEndEncoded"})(he||(he={}));var Re=class xd{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsField(t,r){return(r||new xd).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,r){return t.setPosition(t.position()+4),(r||new xd).__init(t.readInt32(t.position())+t.position(),t)}name(t){let r=this.bb.__offset(this.bb_pos,4);return r?this.bb.__string(this.bb_pos+r,t):null}nullable(){let t=this.bb.__offset(this.bb_pos,6);return t?!!this.bb.readInt8(this.bb_pos+t):!1}typeType(){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readUint8(this.bb_pos+t):he.NONE}type(t){let r=this.bb.__offset(this.bb_pos,10);return r?this.bb.__union(t,this.bb_pos+r):null}dictionary(t){let r=this.bb.__offset(this.bb_pos,12);return r?(t||new Ct).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}children(t,r){let n=this.bb.__offset(this.bb_pos,14);return n?(r||new xd).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}childrenLength(){let t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,r){let n=this.bb.__offset(this.bb_pos,16);return n?(r||new Ce).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,r){t.addFieldOffset(0,r,0)}static addNullable(t,r){t.addFieldInt8(1,+r,0)}static addTypeType(t,r){t.addFieldInt8(2,r,he.NONE)}static addType(t,r){t.addFieldOffset(3,r,0)}static addDictionary(t,r){t.addFieldOffset(4,r,0)}static addChildren(t,r){t.addFieldOffset(5,r,0)}static createChildrenVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startChildrenVector(t,r){t.startVector(4,r,4)}static addCustomMetadata(t,r){t.addFieldOffset(6,r,0)}static createCustomMetadataVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startCustomMetadataVector(t,r){t.startVector(4,r,4)}static endField(t){return t.endObject()}},ze=class dr{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsSchema(t,r){return(r||new dr).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,r){return t.setPosition(t.position()+4),(r||new dr).__init(t.readInt32(t.position())+t.position(),t)}endianness(){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):mr.Little}fields(t,r){let n=this.bb.__offset(this.bb_pos,6);return n?(r||new Re).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}fieldsLength(){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,r){let n=this.bb.__offset(this.bb_pos,8);return n?(r||new Ce).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){let r=this.bb.__offset(this.bb_pos,10);return r?this.bb.readInt64(this.bb.__vector(this.bb_pos+r)+t*8):BigInt(0)}featuresLength(){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,r){t.addFieldInt16(0,r,mr.Little)}static addFields(t,r){t.addFieldOffset(1,r,0)}static createFieldsVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startFieldsVector(t,r){t.startVector(4,r,4)}static addCustomMetadata(t,r){t.addFieldOffset(2,r,0)}static createCustomMetadataVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startCustomMetadataVector(t,r){t.startVector(4,r,4)}static addFeatures(t,r){t.addFieldOffset(3,r,0)}static createFeaturesVector(t,r){t.startVector(8,r.length,8);for(let n=r.length-1;n>=0;n--)t.addInt64(r[n]);return t.endVector()}static startFeaturesVector(t,r){t.startVector(8,r,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,r){t.finish(r)}static finishSizePrefixedSchemaBuffer(t,r){t.finish(r,void 0,!0)}static createSchema(t,r,n,a,l){return dr.startSchema(t),dr.addEndianness(t,r),dr.addFields(t,n),dr.addCustomMetadata(t,a),dr.addFeatures(t,l),dr.endSchema(t)}},ie;(function(e){e[e.NONE=0]="NONE",e[e.Schema=1]="Schema",e[e.DictionaryBatch=2]="DictionaryBatch",e[e.RecordBatch=3]="RecordBatch",e[e.Tensor=4]="Tensor",e[e.SparseTensor=5]="SparseTensor"})(ie||(ie={}));var v;(function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Duration=18]="Duration",e[e.LargeBinary=19]="LargeBinary",e[e.LargeUtf8=20]="LargeUtf8",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth",e[e.DurationSecond=-27]="DurationSecond",e[e.DurationMillisecond=-28]="DurationMillisecond",e[e.DurationMicrosecond=-29]="DurationMicrosecond",e[e.DurationNanosecond=-30]="DurationNanosecond"})(v||(v={}));var it;(function(e){e[e.OFFSET=0]="OFFSET",e[e.DATA=1]="DATA",e[e.VALIDITY=2]="VALIDITY",e[e.TYPE=3]="TYPE"})(it||(it={}));var ja={};pr(ja,{clampRange:()=>qn,createElementComparator:()=>Dr,wrapIndex:()=>Br});var Da={};pr(Da,{valueToString:()=>ht});function ht(e){if(e===null)return"null";if(e===void 0)return"undefined";switch(typeof e){case"number":return"".concat(e);case"bigint":return"".concat(e);case"string":return'"'.concat(e,'"')}return typeof e[Symbol.toPrimitive]=="function"?e[Symbol.toPrimitive]("string"):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?"[".concat([...e].map(t=>ht(t)),"]"):"[".concat(e,"]"):ArrayBuffer.isView(e)?"[".concat(e,"]"):JSON.stringify(e,(t,r)=>typeof r=="bigint"?"".concat(r):r)}var Pa={};pr(Pa,{BN:()=>jn,bigNumToBigInt:()=>No,bigNumToNumber:()=>Ta,bigNumToString:()=>on,isArrowBigNumSymbol:()=>Ho});function ae(e){if(typeof e=="bigint"&&(eNumber.MAX_SAFE_INTEGER))throw new TypeError("".concat(e," is not safe to convert to a number."));return Number(e)}function Fa(e,t){return ae(e/t)+ae(e%t)/ae(t)}var Ho=Symbol.for("isArrowBigNum");function vt(e,...t){return t.length===0?Object.setPrototypeOf(re(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}vt.prototype[Ho]=!0,vt.prototype.toJSON=function(){return'"'.concat(on(this),'"')},vt.prototype.valueOf=function(e){return Ta(this,e)},vt.prototype.toString=function(){return on(this)},vt.prototype[Symbol.toPrimitive]=function(e="default"){switch(e){case"number":return Ta(this);case"string":return on(this);case"default":return No(this)}return on(this)};function sn(...e){return vt.apply(this,e)}function an(...e){return vt.apply(this,e)}function zn(...e){return vt.apply(this,e)}Object.setPrototypeOf(sn.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(an.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(zn.prototype,Object.create(Uint32Array.prototype)),Object.assign(sn.prototype,vt.prototype,{constructor:sn,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(an.prototype,vt.prototype,{constructor:an,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(zn.prototype,vt.prototype,{constructor:zn,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});var xu=BigInt(4294967296)*BigInt(4294967296),Tu=xu-BigInt(1);function Ta(e,t){let{buffer:r,byteOffset:n,byteLength:a,signed:l}=e,c=new BigUint64Array(r,n,a/8),u=l&&c.at(-1)&BigInt(1)<=0)return xa(e);t=t.slice();let r=1;for(let a=0;a(e.children=null,e.ArrayType=Array,e.OffsetArrayType=Int32Array,e[Symbol.toStringTag]="DataType"))(G.prototype);var Ne=class extends G{constructor(){super(v.Null)}toString(){return"Null"}};Vo=Symbol.toStringTag,Ne[Vo]=(e=>e[Symbol.toStringTag]="Null")(Ne.prototype);var Me=class extends G{constructor(e,t){super(v.Int),this.isSigned=e,this.bitWidth=t}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}toString(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}};zo=Symbol.toStringTag,Me[zo]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"))(Me.prototype);var kt=class extends Me{constructor(){super(!0,32)}get ArrayType(){return Int32Array}};Object.defineProperty(kt.prototype,"ArrayType",{value:Int32Array});var st=class extends G{constructor(e){super(v.Float),this.precision=e}get ArrayType(){switch(this.precision){case pe.HALF:return Uint16Array;case pe.SINGLE:return Float32Array;case pe.DOUBLE:return Float64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}toString(){return"Float".concat(this.precision<<5||16)}};jo=Symbol.toStringTag,st[jo]=(e=>(e.precision=null,e[Symbol.toStringTag]="Float"))(st.prototype);var Vt=class extends G{constructor(){super(v.Binary)}toString(){return"Binary"}};$o=Symbol.toStringTag,Vt[$o]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"))(Vt.prototype);var zt=class extends G{constructor(){super(v.LargeBinary)}toString(){return"LargeBinary"}};qo=Symbol.toStringTag,zt[qo]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]="LargeBinary"))(zt.prototype);var jt=class extends G{constructor(){super(v.Utf8)}toString(){return"Utf8"}};Xo=Symbol.toStringTag,jt[Xo]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"))(jt.prototype);var $t=class extends G{constructor(){super(v.LargeUtf8)}toString(){return"LargeUtf8"}};Qo=Symbol.toStringTag,$t[Qo]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]="LargeUtf8"))($t.prototype);var qt=class extends G{constructor(){super(v.Bool)}toString(){return"Bool"}};Yo=Symbol.toStringTag,qt[Yo]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"))(qt.prototype);var Xt=class extends G{constructor(e,t,r=128){super(v.Decimal),this.scale=e,this.precision=t,this.bitWidth=r}toString(){return"Decimal[".concat(this.precision,"e").concat(this.scale>0?"+":"").concat(this.scale,"]")}};Jo=Symbol.toStringTag,Xt[Jo]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"))(Xt.prototype);var Qt=class extends G{constructor(e){super(v.Date),this.unit=e}toString(){return"Date".concat((this.unit+1)*32,"<").concat(Ae[this.unit],">")}get ArrayType(){return this.unit===Ae.DAY?Int32Array:BigInt64Array}};Ko=Symbol.toStringTag,Qt[Ko]=(e=>(e.unit=null,e[Symbol.toStringTag]="Date"))(Qt.prototype);var Yt=class extends G{constructor(e,t){super(v.Time),this.unit=e,this.bitWidth=t}toString(){return"Time".concat(this.bitWidth,"<").concat(U[this.unit],">")}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}};Zo=Symbol.toStringTag,Yt[Zo]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]="Time"))(Yt.prototype);var Jt=class extends G{constructor(e,t){super(v.Timestamp),this.unit=e,this.timezone=t}toString(){return"Timestamp<".concat(U[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}};el=Symbol.toStringTag,Jt[el]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]="Timestamp"))(Jt.prototype);var Kt=class extends G{constructor(e){super(v.Interval),this.unit=e}toString(){return"Interval<".concat(Ie[this.unit],">")}};tl=Symbol.toStringTag,Kt[tl]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"))(Kt.prototype);var Zt=class extends G{constructor(e){super(v.Duration),this.unit=e}toString(){return"Duration<".concat(U[this.unit],">")}};rl=Symbol.toStringTag,Zt[rl]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]="Duration"))(Zt.prototype);var bt=class extends G{constructor(e){super(v.List),this.children=[e]}toString(){return"List<".concat(this.valueType,">")}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};nl=Symbol.toStringTag,bt[nl]=(e=>(e.children=null,e[Symbol.toStringTag]="List"))(bt.prototype);var ve=class extends G{constructor(e){super(v.Struct),this.children=e}toString(){return"Struct<{".concat(this.children.map(e=>"".concat(e.name,":").concat(e.type)).join(", "),"}>")}};il=Symbol.toStringTag,ve[il]=(e=>(e.children=null,e[Symbol.toStringTag]="Struct"))(ve.prototype);var yt=class extends G{constructor(e,t,r){super(v.Union),this.mode=e,this.children=r,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,a,l)=>(n[a]=l)&&n||n,Object.create(null))}toString(){return"".concat(this[Symbol.toStringTag],"<").concat(this.children.map(e=>"".concat(e.type)).join(" | "),">")}};sl=Symbol.toStringTag,yt[sl]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"))(yt.prototype);var er=class extends G{constructor(e){super(v.FixedSizeBinary),this.byteWidth=e}toString(){return"FixedSizeBinary[".concat(this.byteWidth,"]")}};al=Symbol.toStringTag,er[al]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"))(er.prototype);var St=class extends G{constructor(e,t){super(v.FixedSizeList),this.listSize=e,this.children=[t]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}};ol=Symbol.toStringTag,St[ol]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"))(St.prototype);var Et=class extends G{constructor(e,t=!1){var r,n,a;if(super(v.Map),this.children=[e],this.keysSorted=t,e&&(e.name="entries",!((r=e==null?void 0:e.type)===null||r===void 0)&&r.children)){let l=(n=e==null?void 0:e.type)===null||n===void 0?void 0:n.children[0];l&&(l.name="key");let c=(a=e==null?void 0:e.type)===null||a===void 0?void 0:a.children[1];c&&(c.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return"Map<{".concat(this.children[0].type.children.map(e=>"".concat(e.name,":").concat(e.type)).join(", "),"}>")}};ll=Symbol.toStringTag,Et[ll]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"))(Et.prototype);var Pu=(e=>()=>++e)(-1),Ze=class extends G{constructor(e,t,r,n){super(v.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=r==null?Pu():ae(r)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return"Dictionary<".concat(this.indices,", ").concat(this.dictionary,">")}};cl=Symbol.toStringTag,Ze[cl]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"))(Ze.prototype);function et(e){let t=e;switch(e.typeId){case v.Decimal:return e.bitWidth/32;case v.Interval:return 1+t.unit;case v.FixedSizeList:return t.listSize;case v.FixedSizeBinary:return t.byteWidth;default:return 1}}var R=class{visitMany(e,...t){return e.map((r,n)=>this.visit(r,...t.map(a=>a[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return Iu(this,e,t)}getVisitFnByTypeId(e,t=!0){return ln(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function Iu(e,t,r=!0){return typeof t=="number"?ln(e,t,r):typeof t=="string"&&t in v?ln(e,v[t],r):t&&t instanceof G?ln(e,ul(t),r):t!=null&&t.type&&t.type instanceof G?ln(e,ul(t.type),r):ln(e,v.NONE,r)}function ln(e,t,r=!0){let n=null;switch(t){case v.Null:n=e.visitNull;break;case v.Bool:n=e.visitBool;break;case v.Int:n=e.visitInt;break;case v.Int8:n=e.visitInt8||e.visitInt;break;case v.Int16:n=e.visitInt16||e.visitInt;break;case v.Int32:n=e.visitInt32||e.visitInt;break;case v.Int64:n=e.visitInt64||e.visitInt;break;case v.Uint8:n=e.visitUint8||e.visitInt;break;case v.Uint16:n=e.visitUint16||e.visitInt;break;case v.Uint32:n=e.visitUint32||e.visitInt;break;case v.Uint64:n=e.visitUint64||e.visitInt;break;case v.Float:n=e.visitFloat;break;case v.Float16:n=e.visitFloat16||e.visitFloat;break;case v.Float32:n=e.visitFloat32||e.visitFloat;break;case v.Float64:n=e.visitFloat64||e.visitFloat;break;case v.Utf8:n=e.visitUtf8;break;case v.LargeUtf8:n=e.visitLargeUtf8;break;case v.Binary:n=e.visitBinary;break;case v.LargeBinary:n=e.visitLargeBinary;break;case v.FixedSizeBinary:n=e.visitFixedSizeBinary;break;case v.Date:n=e.visitDate;break;case v.DateDay:n=e.visitDateDay||e.visitDate;break;case v.DateMillisecond:n=e.visitDateMillisecond||e.visitDate;break;case v.Timestamp:n=e.visitTimestamp;break;case v.TimestampSecond:n=e.visitTimestampSecond||e.visitTimestamp;break;case v.TimestampMillisecond:n=e.visitTimestampMillisecond||e.visitTimestamp;break;case v.TimestampMicrosecond:n=e.visitTimestampMicrosecond||e.visitTimestamp;break;case v.TimestampNanosecond:n=e.visitTimestampNanosecond||e.visitTimestamp;break;case v.Time:n=e.visitTime;break;case v.TimeSecond:n=e.visitTimeSecond||e.visitTime;break;case v.TimeMillisecond:n=e.visitTimeMillisecond||e.visitTime;break;case v.TimeMicrosecond:n=e.visitTimeMicrosecond||e.visitTime;break;case v.TimeNanosecond:n=e.visitTimeNanosecond||e.visitTime;break;case v.Decimal:n=e.visitDecimal;break;case v.List:n=e.visitList;break;case v.Struct:n=e.visitStruct;break;case v.Union:n=e.visitUnion;break;case v.DenseUnion:n=e.visitDenseUnion||e.visitUnion;break;case v.SparseUnion:n=e.visitSparseUnion||e.visitUnion;break;case v.Dictionary:n=e.visitDictionary;break;case v.Interval:n=e.visitInterval;break;case v.IntervalDayTime:n=e.visitIntervalDayTime||e.visitInterval;break;case v.IntervalYearMonth:n=e.visitIntervalYearMonth||e.visitInterval;break;case v.Duration:n=e.visitDuration;break;case v.DurationSecond:n=e.visitDurationSecond||e.visitDuration;break;case v.DurationMillisecond:n=e.visitDurationMillisecond||e.visitDuration;break;case v.DurationMicrosecond:n=e.visitDurationMicrosecond||e.visitDuration;break;case v.DurationNanosecond:n=e.visitDurationNanosecond||e.visitDuration;break;case v.FixedSizeList:n=e.visitFixedSizeList;break;case v.Map:n=e.visitMap;break}if(typeof n=="function")return n;if(!r)return()=>null;throw new Error("Unrecognized type '".concat(v[t],"'"))}function ul(e){switch(e.typeId){case v.Null:return v.Null;case v.Int:{let{bitWidth:t,isSigned:r}=e;switch(t){case 8:return r?v.Int8:v.Uint8;case 16:return r?v.Int16:v.Uint16;case 32:return r?v.Int32:v.Uint32;case 64:return r?v.Int64:v.Uint64}return v.Int}case v.Float:switch(e.precision){case pe.HALF:return v.Float16;case pe.SINGLE:return v.Float32;case pe.DOUBLE:return v.Float64}return v.Float;case v.Binary:return v.Binary;case v.LargeBinary:return v.LargeBinary;case v.Utf8:return v.Utf8;case v.LargeUtf8:return v.LargeUtf8;case v.Bool:return v.Bool;case v.Decimal:return v.Decimal;case v.Time:switch(e.unit){case U.SECOND:return v.TimeSecond;case U.MILLISECOND:return v.TimeMillisecond;case U.MICROSECOND:return v.TimeMicrosecond;case U.NANOSECOND:return v.TimeNanosecond}return v.Time;case v.Timestamp:switch(e.unit){case U.SECOND:return v.TimestampSecond;case U.MILLISECOND:return v.TimestampMillisecond;case U.MICROSECOND:return v.TimestampMicrosecond;case U.NANOSECOND:return v.TimestampNanosecond}return v.Timestamp;case v.Date:switch(e.unit){case Ae.DAY:return v.DateDay;case Ae.MILLISECOND:return v.DateMillisecond}return v.Date;case v.Interval:switch(e.unit){case Ie.DAY_TIME:return v.IntervalDayTime;case Ie.YEAR_MONTH:return v.IntervalYearMonth}return v.Interval;case v.Duration:switch(e.unit){case U.SECOND:return v.DurationSecond;case U.MILLISECOND:return v.DurationMillisecond;case U.MICROSECOND:return v.DurationMicrosecond;case U.NANOSECOND:return v.DurationNanosecond}return v.Duration;case v.Map:return v.Map;case v.List:return v.List;case v.Struct:return v.Struct;case v.Union:switch(e.mode){case ge.Dense:return v.DenseUnion;case ge.Sparse:return v.SparseUnion}return v.Union;case v.FixedSizeBinary:return v.FixedSizeBinary;case v.FixedSizeList:return v.FixedSizeList;case v.Dictionary:return v.Dictionary}throw new Error("Unrecognized type '".concat(v[e.typeId],"'"))}R.prototype.visitInt8=null,R.prototype.visitInt16=null,R.prototype.visitInt32=null,R.prototype.visitInt64=null,R.prototype.visitUint8=null,R.prototype.visitUint16=null,R.prototype.visitUint32=null,R.prototype.visitUint64=null,R.prototype.visitFloat16=null,R.prototype.visitFloat32=null,R.prototype.visitFloat64=null,R.prototype.visitDateDay=null,R.prototype.visitDateMillisecond=null,R.prototype.visitTimestampSecond=null,R.prototype.visitTimestampMillisecond=null,R.prototype.visitTimestampMicrosecond=null,R.prototype.visitTimestampNanosecond=null,R.prototype.visitTimeSecond=null,R.prototype.visitTimeMillisecond=null,R.prototype.visitTimeMicrosecond=null,R.prototype.visitTimeNanosecond=null,R.prototype.visitDenseUnion=null,R.prototype.visitSparseUnion=null,R.prototype.visitIntervalDayTime=null,R.prototype.visitIntervalYearMonth=null,R.prototype.visitDuration=null,R.prototype.visitDurationSecond=null,R.prototype.visitDurationMillisecond=null,R.prototype.visitDurationMicrosecond=null,R.prototype.visitDurationNanosecond=null;var Ia={};pr(Ia,{float64ToUint16:()=>$n,uint16ToFloat64:()=>Ki});var _l=new Float64Array(1),cn=new Uint32Array(_l.buffer);function Ki(e){let t=(e&31744)>>10,r=(e&1023)/1024,n=Math.pow(-1,(e&32768)>>15);switch(t){case 31:return n*(r?Number.NaN:1/0);case 0:return n*(r?6103515625e-14*r:0)}return n*Math.pow(2,t-15)*(1+r)}function $n(e){if(e!==e)return 32256;_l[0]=e;let t=(cn[1]&2147483648)>>16&65535,r=cn[1]&2146435072,n=0;return r>=1089470464?cn[0]>0?r=31744:(r=(r&2080374784)>>16,n=(cn[1]&1048575)>>10):r<=1056964608?(n=1048576+(cn[1]&1048575),n=1048576+(n<<(r>>20)-998)>>21,r=0):(r=r-1056964608>>10,n=(cn[1]&1048575)+512>>10),t|r|n&65535}var z=class extends R{};function Y(e){return(t,r,n)=>{if(t.setValid(r,n!=null))return e(t,r,n)}}var Cu=(e,t,r)=>{e[t]=Math.floor(r/864e5)},dl=(e,t,r,n)=>{if(r+1{let a=e+r;n?t[a>>3]|=1<>3]&=~(1<{e[t]=r},Ca=({values:e},t,r)=>{e[t]=r},fl=({values:e},t,r)=>{e[t]=$n(r)},ku=(e,t,r)=>{switch(e.type.precision){case pe.HALF:return fl(e,t,r);case pe.SINGLE:case pe.DOUBLE:return Ca(e,t,r)}},Zi=({values:e},t,r)=>{Cu(e,t,r.valueOf())},es=({values:e},t,r)=>{e[t]=BigInt(r)},Ma=({stride:e,values:t},r,n)=>{t.set(n.subarray(0,e),e*r)},pl=({values:e,valueOffsets:t},r,n)=>dl(e,t,r,n),ml=({values:e,valueOffsets:t},r,n)=>dl(e,t,r,Tt(n)),ka=(e,t,r)=>{e.type.unit===Ae.DAY?Zi(e,t,r):es(e,t,r)},ts=({values:e},t,r)=>{e[t]=BigInt(r/1e3)},rs=({values:e},t,r)=>{e[t]=BigInt(r)},ns=({values:e},t,r)=>{e[t]=BigInt(r*1e3)},is=({values:e},t,r)=>{e[t]=BigInt(r*1e6)},Ba=(e,t,r)=>{switch(e.type.unit){case U.SECOND:return ts(e,t,r);case U.MILLISECOND:return rs(e,t,r);case U.MICROSECOND:return ns(e,t,r);case U.NANOSECOND:return is(e,t,r)}},ss=({values:e},t,r)=>{e[t]=r},as=({values:e},t,r)=>{e[t]=r},os=({values:e},t,r)=>{e[t]=r},ls=({values:e},t,r)=>{e[t]=r},Ga=(e,t,r)=>{switch(e.type.unit){case U.SECOND:return ss(e,t,r);case U.MILLISECOND:return as(e,t,r);case U.MICROSECOND:return os(e,t,r);case U.NANOSECOND:return ls(e,t,r)}},Ua=({values:e,stride:t},r,n)=>{e.set(n.subarray(0,t),t*r)},Bu=(e,t,r)=>{let n=e.children[0],a=e.valueOffsets,l=Ge.getVisitFn(n);if(Array.isArray(r))for(let c=-1,u=a[t],_=a[t+1];u<_;)l(n,u++,r[++c]);else for(let c=-1,u=a[t],_=a[t+1];u<_;)l(n,u++,r.get(++c))},Gu=(e,t,r)=>{let n=e.children[0],{valueOffsets:a}=e,l=Ge.getVisitFn(n),{[t]:c,[t+1]:u}=a,_=r instanceof Map?r.entries():Object.entries(r);for(let d of _)if(l(n,c,d),++c>=u)break},Uu=(e,t)=>(r,n,a,l)=>n&&r(n,e,t[l]),Ou=(e,t)=>(r,n,a,l)=>n&&r(n,e,t.get(l)),Ru=(e,t)=>(r,n,a,l)=>n&&r(n,e,t.get(a.name)),Hu=(e,t)=>(r,n,a,l)=>n&&r(n,e,t[a.name]),Nu=(e,t,r)=>{let n=e.type.children.map(l=>Ge.getVisitFn(l.type)),a=r instanceof Map?Ru(t,r):r instanceof se?Ou(t,r):Array.isArray(r)?Uu(t,r):Hu(t,r);e.type.children.forEach((l,c)=>a(n[c],e.children[c],l,c))},Wu=(e,t,r)=>{e.type.mode===ge.Dense?gl(e,t,r):hl(e,t,r)},gl=(e,t,r)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],a=e.children[n];Ge.visit(a,e.valueOffsets[t],r)},hl=(e,t,r)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],a=e.children[n];Ge.visit(a,t,r)},Vu=(e,t,r)=>{var n;(n=e.dictionary)===null||n===void 0||n.set(e.values[t],r)},Oa=(e,t,r)=>{e.type.unit===Ie.DAY_TIME?cs(e,t,r):us(e,t,r)},cs=({values:e},t,r)=>{e.set(r.subarray(0,2),2*t)},us=({values:e},t,r)=>{e[t]=r[0]*12+r[1]%12},_s=({values:e},t,r)=>{e[t]=r},ds=({values:e},t,r)=>{e[t]=r},ps=({values:e},t,r)=>{e[t]=r},ms=({values:e},t,r)=>{e[t]=r},Ra=(e,t,r)=>{switch(e.type.unit){case U.SECOND:return _s(e,t,r);case U.MILLISECOND:return ds(e,t,r);case U.MICROSECOND:return ps(e,t,r);case U.NANOSECOND:return ms(e,t,r)}},zu=(e,t,r)=>{let{stride:n}=e,a=e.children[0],l=Ge.getVisitFn(a);if(Array.isArray(r))for(let c=-1,u=t*n;++c"".concat(ht(e),": ").concat(ht(t))).join(", "),"}")}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Ha(this[wt],this[un])}},Ha=class{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return et.name)}has(e,t){return e[wt].type.children.findIndex(r=>r.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[wt].type.children.findIndex(r=>r.name===t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let r=e[wt].type.children.findIndex(n=>n.name===t);if(r!==-1){let n=xe.visit(e[wt].children[r],e[un]);return Reflect.set(e,t,n),n}}set(e,t,r){let n=e[wt].type.children.findIndex(a=>a.name===t);return n!==-1?(Ge.visit(e[wt].children[n],e[un],r),Reflect.set(e,t,r)):Reflect.has(e,t)||typeof t=="symbol"?Reflect.set(e,t,r):!1}},H=class extends R{};function $(e){return(t,r)=>t.getValid(r)?e(t,r):null}var ju=(e,t)=>864e5*e[t],$u=(e,t)=>null,vl=(e,t,r)=>{if(r+1>=t.length)return null;let n=ae(t[r]),a=ae(t[r+1]);return e.subarray(n,a)},qu=({offset:e,values:t},r)=>{let n=e+r;return(t[n>>3]&1<ju(e,t),yl=({values:e},t)=>ae(e[t]),Lr=({stride:e,values:t},r)=>t[e*r],Xu=({stride:e,values:t},r)=>Ki(t[e*r]),Sl=({values:e},t)=>e[t],Qu=({stride:e,values:t},r)=>t.subarray(e*r,e*(r+1)),El=({values:e,valueOffsets:t},r)=>vl(e,t,r),wl=({values:e,valueOffsets:t},r)=>{let n=vl(e,t,r);return n!==null?Tn(n):null},Yu=({values:e},t)=>e[t],Ju=({type:e,values:t},r)=>e.precision!==pe.HALF?t[r]:Ki(t[r]),Ku=(e,t)=>e.type.unit===Ae.DAY?bl(e,t):yl(e,t),Ll=({values:e},t)=>1e3*ae(e[t]),Al=({values:e},t)=>ae(e[t]),Dl=({values:e},t)=>Fa(e[t],BigInt(1e3)),Fl=({values:e},t)=>Fa(e[t],BigInt(1e6)),Zu=(e,t)=>{switch(e.type.unit){case U.SECOND:return Ll(e,t);case U.MILLISECOND:return Al(e,t);case U.MICROSECOND:return Dl(e,t);case U.NANOSECOND:return Fl(e,t)}},xl=({values:e},t)=>e[t],Tl=({values:e},t)=>e[t],Pl=({values:e},t)=>e[t],Il=({values:e},t)=>e[t],e_=(e,t)=>{switch(e.type.unit){case U.SECOND:return xl(e,t);case U.MILLISECOND:return Tl(e,t);case U.MICROSECOND:return Pl(e,t);case U.NANOSECOND:return Il(e,t)}},t_=({values:e,stride:t},r)=>jn.decimal(e.subarray(t*r,t*(r+1))),r_=(e,t)=>{let{valueOffsets:r,stride:n,children:a}=e,{[t*n]:l,[t*n+1]:c}=r,u=a[0].slice(l,c-l);return new se([u])},n_=(e,t)=>{let{valueOffsets:r,children:n}=e,{[t]:a,[t+1]:l}=r,c=n[0];return new Bt(c.slice(a,l-a))},i_=(e,t)=>new wr(e,t),s_=(e,t)=>e.type.mode===ge.Dense?Cl(e,t):Ml(e,t),Cl=(e,t)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],n=e.children[r];return xe.visit(n,e.valueOffsets[t])},Ml=(e,t)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],n=e.children[r];return xe.visit(n,t)},a_=(e,t)=>{var r;return(r=e.dictionary)===null||r===void 0?void 0:r.get(e.values[t])},o_=(e,t)=>e.type.unit===Ie.DAY_TIME?kl(e,t):Bl(e,t),kl=({values:e},t)=>e.subarray(2*t,2*(t+1)),Bl=({values:e},t)=>{let r=e[t],n=new Int32Array(2);return n[0]=Math.trunc(r/12),n[1]=Math.trunc(r%12),n},Gl=({values:e},t)=>e[t],Ul=({values:e},t)=>e[t],Ol=({values:e},t)=>e[t],Rl=({values:e},t)=>e[t],l_=(e,t)=>{switch(e.type.unit){case U.SECOND:return Gl(e,t);case U.MILLISECOND:return Ul(e,t);case U.MICROSECOND:return Ol(e,t);case U.NANOSECOND:return Rl(e,t)}},c_=(e,t)=>{let{stride:r,children:n}=e,a=n[0].slice(t*r,r);return new se([a])};H.prototype.visitNull=$($u),H.prototype.visitBool=$(qu),H.prototype.visitInt=$(Yu),H.prototype.visitInt8=$(Lr),H.prototype.visitInt16=$(Lr),H.prototype.visitInt32=$(Lr),H.prototype.visitInt64=$(Sl),H.prototype.visitUint8=$(Lr),H.prototype.visitUint16=$(Lr),H.prototype.visitUint32=$(Lr),H.prototype.visitUint64=$(Sl),H.prototype.visitFloat=$(Ju),H.prototype.visitFloat16=$(Xu),H.prototype.visitFloat32=$(Lr),H.prototype.visitFloat64=$(Lr),H.prototype.visitUtf8=$(wl),H.prototype.visitLargeUtf8=$(wl),H.prototype.visitBinary=$(El),H.prototype.visitLargeBinary=$(El),H.prototype.visitFixedSizeBinary=$(Qu),H.prototype.visitDate=$(Ku),H.prototype.visitDateDay=$(bl),H.prototype.visitDateMillisecond=$(yl),H.prototype.visitTimestamp=$(Zu),H.prototype.visitTimestampSecond=$(Ll),H.prototype.visitTimestampMillisecond=$(Al),H.prototype.visitTimestampMicrosecond=$(Dl),H.prototype.visitTimestampNanosecond=$(Fl),H.prototype.visitTime=$(e_),H.prototype.visitTimeSecond=$(xl),H.prototype.visitTimeMillisecond=$(Tl),H.prototype.visitTimeMicrosecond=$(Pl),H.prototype.visitTimeNanosecond=$(Il),H.prototype.visitDecimal=$(t_),H.prototype.visitList=$(r_),H.prototype.visitStruct=$(i_),H.prototype.visitUnion=$(s_),H.prototype.visitDenseUnion=$(Cl),H.prototype.visitSparseUnion=$(Ml),H.prototype.visitDictionary=$(a_),H.prototype.visitInterval=$(o_),H.prototype.visitIntervalDayTime=$(kl),H.prototype.visitIntervalYearMonth=$(Bl),H.prototype.visitDuration=$(l_),H.prototype.visitDurationSecond=$(Gl),H.prototype.visitDurationMillisecond=$(Ul),H.prototype.visitDurationMicrosecond=$(Ol),H.prototype.visitDurationNanosecond=$(Rl),H.prototype.visitFixedSizeList=$(c_),H.prototype.visitMap=$(n_);var xe=new H,Ar=Symbol.for("keys"),dn=Symbol.for("vals"),_n=Symbol.for("kKeysAsStrings"),Wa=Symbol.for("_kKeysAsStrings"),Bt=class{constructor(e){return this[Ar]=new se([e.children[0]]).memoize(),this[dn]=e.children[1],new Proxy(this,new za)}get[_n](){return this[Wa]||(this[Wa]=Array.from(this[Ar].toArray(),String))}[Symbol.iterator](){return new Va(this[Ar],this[dn])}get size(){return this[Ar].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[Ar],t=this[dn],r={};for(let n=-1,a=e.length;++n"".concat(ht(e),": ").concat(ht(t))).join(", "),"}")}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},Va=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),xe.visit(this.vals,e)]})}},za=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[_n]}has(e,t){return e[_n].includes(t)}getOwnPropertyDescriptor(e,t){if(e[_n].indexOf(t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let r=e[_n].indexOf(t);if(r!==-1){let n=xe.visit(Reflect.get(e,dn),r);return Reflect.set(e,t,n),n}}set(e,t,r){let n=e[_n].indexOf(t);return n!==-1?(Ge.visit(Reflect.get(e,dn),n,r),Reflect.set(e,t,r)):Reflect.has(e,t)?Reflect.set(e,t,r):!1}};Object.defineProperties(Bt.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Ar]:{writable:!0,enumerable:!1,configurable:!1,value:null},[dn]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Wa]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var Hl;function qn(e,t,r,n){let{length:a=0}=e,l=typeof t!="number"?0:t,c=typeof r!="number"?a:r;return l<0&&(l=(l%a+a)%a),c<0&&(c=(c%a+a)%a),ca&&(c=a),n?n(e,l,c):[l,c]}var Br=(e,t)=>e<0?t+e:e,Nl=e=>e!==e;function Dr(e){if(typeof e!="object"||e===null)return Nl(e)?Nl:t=>t===e;if(e instanceof Date){let t=e.valueOf();return r=>r instanceof Date?r.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?Ea(e,t):!1:e instanceof Map?__(e):Array.isArray(e)?u_(e):e instanceof se?d_(e):f_(e,!0)}function u_(e){let t=[];for(let r=-1,n=e.length;++r!1;let n=[];for(let a=-1,l=r.length;++a{if(!r||typeof r!="object")return!1;switch(r.constructor){case Array:return p_(e,r);case Map:return Wl(e,r,r.keys());case Bt:case wr:case Object:case void 0:return Wl(e,r,t||Object.keys(r))}return r instanceof se?m_(e,r):!1}}function p_(e,t){let r=e.length;if(t.length!==r)return!1;for(let n=-1;++nGr,getBit:()=>Vl,getBool:()=>vs,packBools:()=>Or,popcnt_array:()=>zl,popcnt_bit_range:()=>Xn,popcnt_uint32:()=>hs,setBool:()=>g_,truncateBitmap:()=>Ur});function vs(e,t,r,n){return(r&1<>n}function g_(e,t,r){return r?!!(e[t>>3]|=1<>3]&=~(1<0||r.byteLength>3):Or(new Gr(r,e,t,null,vs)).subarray(0,n)),a}return r}function Or(e){let t=[],r=0,n=0,a=0;for(let c of e)c&&(a|=1<0)&&(t[r++]=a);let l=new Uint8Array(t.length+7&-8);return l.set(t),l}var Gr=class{constructor(e,t,r,n,a){this.bytes=e,this.length=r,this.context=n,this.get=a,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,a=t+(t%8===0?0:8-t%8);return Xn(e,t,a)+Xn(e,n,r)+zl(e,a>>3,n-a>>3)}function zl(e,t,r){let n=0,a=Math.trunc(t),l=new DataView(e.buffer,e.byteOffset,e.byteLength),c=r===void 0?e.byteLength:a+r;for(;c-a>=4;)n+=hs(l.getUint32(a)),a+=4;for(;c-a>=2;)n+=hs(l.getUint16(a)),a+=2;for(;c-a>=1;)n+=hs(l.getUint8(a)),a+=1;return n}function hs(e){let t=Math.trunc(e);return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}var h_=-1,ce=class Bd{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:t}=this;return G.isSparseUnion(t)?this.children.some(r=>r.nullable):G.isDenseUnion(t)?this.children.some(r=>r.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0,{valueOffsets:r,values:n,nullBitmap:a,typeIds:l}=this;return r&&(t+=r.byteLength),n&&(t+=n.byteLength),a&&(t+=a.byteLength),l&&(t+=l.byteLength),this.children.reduce((c,u)=>c+u.byteLength,t)}get nullCount(){if(G.isUnion(this.type))return this.children.reduce((n,a)=>n+a.nullCount,0);let t=this._nullCount,r;return t<=h_&&(r=this.nullBitmap)&&(this._nullCount=t=r.length===0?0:this.length-Xn(r,this.offset,this.offset+this.length)),t}constructor(t,r,n,a,l,c=[],u){this.type=t,this.children=c,this.dictionary=u,this.offset=Math.floor(Math.max(r||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(a||0,-1));let _;l instanceof Bd?(this.stride=l.stride,this.values=l.values,this.typeIds=l.typeIds,this.nullBitmap=l.nullBitmap,this.valueOffsets=l.valueOffsets):(this.stride=et(t),l&&((_=l[0])&&(this.valueOffsets=_),(_=l[1])&&(this.values=_),(_=l[2])&&(this.nullBitmap=_),(_=l[3])&&(this.typeIds=_)))}getValid(t){let{type:r}=this;if(G.isUnion(r)){let n=r,a=this.children[n.typeIdToChildIndex[this.typeIds[t]]],l=n.mode===ge.Dense?this.valueOffsets[t]:t;return a.getValid(l)}if(this.nullable&&this.nullCount>0){let n=this.offset+t;return(this.nullBitmap[n>>3]&1<>3;(!l||l.byteLength<=p)&&(l=new Uint8Array((c+u+63&-64)>>3).fill(255),this.nullCount>0?(l.set(Ur(c,u,this.nullBitmap),0),Object.assign(this,{nullBitmap:l})):Object.assign(this,{nullBitmap:l,_nullCount:0}));let f=l[p];n=(f&d)!==0,l[p]=r?f|d:f&~d}return n!==!!r&&(this._nullCount=this.nullCount+(r?-1:1)),r}clone(t=this.type,r=this.offset,n=this.length,a=this._nullCount,l=this,c=this.children){return new Bd(t,r,n,a,l,c,this.dictionary)}slice(t,r){let{stride:n,typeId:a,children:l}=this,c=+(this._nullCount===0)-1,u=a===16?n:1,_=this._sliceBuffers(t,r,n,a);return this.clone(this.type,this.offset+t,r,c,_,l.length===0||this.valueOffsets?l:this._sliceChildren(l,u*t,u*r))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===v.Null)return this.clone(this.type,0,t,0);let{length:r,nullCount:n}=this,a=new Uint8Array((t+63&-64)>>3).fill(255,0,r>>3);a[r>>3]=(1<0&&a.set(Ur(this.offset,r,this.nullBitmap),0);let l=this.buffers;return l[it.VALIDITY]=a,this.clone(this.type,0,t,n+(t-r),l)}_sliceBuffers(t,r,n,a){let l,{buffers:c}=this;return(l=c[it.TYPE])&&(c[it.TYPE]=l.subarray(t,t+r)),(l=c[it.OFFSET])&&(c[it.OFFSET]=l.subarray(t,t+r+1))||(l=c[it.DATA])&&(c[it.DATA]=a===6?l:l.subarray(n*t,n*(t+r))),c}_sliceChildren(t,r,n){return t.map(a=>a.slice(r,n))}};ce.prototype.children=Object.freeze([]);var qa=class Pd extends R{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){let{["type"]:r,["offset"]:n=0,["length"]:a=0}=t;return new ce(r,n,a,a)}visitBool(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length>>3,["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitInt(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length,["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitFloat(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length,["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitUtf8(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.data),l=j(t.nullBitmap),c=Mr(t.valueOffsets),{["length"]:u=c.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new ce(r,n,u,_,[c,a,l])}visitLargeUtf8(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.data),l=j(t.nullBitmap),c=Bi(t.valueOffsets),{["length"]:u=c.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new ce(r,n,u,_,[c,a,l])}visitBinary(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.data),l=j(t.nullBitmap),c=Mr(t.valueOffsets),{["length"]:u=c.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new ce(r,n,u,_,[c,a,l])}visitLargeBinary(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.data),l=j(t.nullBitmap),c=Bi(t.valueOffsets),{["length"]:u=c.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new ce(r,n,u,_,[c,a,l])}visitFixedSizeBinary(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitDate(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitTimestamp(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitTime(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitDecimal(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitList(t){let{["type"]:r,["offset"]:n=0,["child"]:a}=t,l=j(t.nullBitmap),c=Mr(t.valueOffsets),{["length"]:u=c.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new ce(r,n,u,_,[c,void 0,l],[a])}visitStruct(t){let{["type"]:r,["offset"]:n=0,["children"]:a=[]}=t,l=j(t.nullBitmap),{length:c=a.reduce((_,{length:d})=>Math.max(_,d),0),nullCount:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,void 0,l],a)}visitUnion(t){let{["type"]:r,["offset"]:n=0,["children"]:a=[]}=t,l=re(r.ArrayType,t.typeIds),{["length"]:c=l.length,["nullCount"]:u=-1}=t;if(G.isSparseUnion(r))return new ce(r,n,c,u,[void 0,void 0,void 0,l],a);let _=Mr(t.valueOffsets);return new ce(r,n,c,u,[_,void 0,void 0,l],a)}visitDictionary(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.indices.ArrayType,t.data),{["dictionary"]:c=new se([new Pd().visit({type:r.dictionary})])}=t,{["length"]:u=l.length,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new ce(r,n,u,_,[void 0,l,a],[],c)}visitInterval(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitDuration(t){let{["type"]:r,["offset"]:n=0}=t,a=j(t.nullBitmap),l=re(r.ArrayType,t.data),{["length"]:c=l.length,["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,l,a])}visitFixedSizeList(t){let{["type"]:r,["offset"]:n=0,["child"]:a=new Pd().visit({type:r.valueType})}=t,l=j(t.nullBitmap),{["length"]:c=a.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new ce(r,n,c,u,[void 0,void 0,l],[a])}visitMap(t){let{["type"]:r,["offset"]:n=0,["child"]:a=new Pd().visit({type:r.childType})}=t,l=j(t.nullBitmap),c=Mr(t.valueOffsets),{["length"]:u=c.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new ce(r,n,u,_,[c,void 0,l],[a])}},v_=new qa;function J(e){return v_.visit(e)}var Qn=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function bs(e){return e.reduce((t,r)=>t+r.nullCount,0)}function ys(e){return e.reduce((t,r,n)=>(t[n+1]=t[n]+r.length,t),new Uint32Array(e.length+1))}function Ss(e,t,r,n){let a=[];for(let l=-1,c=e.length;++l=n)break;if(r>=_+d)continue;if(_>=r&&_+d<=n){a.push(u);continue}let p=Math.max(0,r-_),f=Math.min(n-_,d);a.push(u.slice(p,f-p))}return a.length===0&&a.push(e[0].slice(0,0)),a}function Xa(e,t,r,n){let a=0,l=0,c=t.length-1;do{if(a>=c-1)return r0?0:-1}function y_(e,t){let{nullBitmap:r}=e;if(!r||e.nullCount<=0)return-1;let n=0;for(let a of new Gr(r,e.offset+(t||0),e.length,r,vs)){if(!a)return n;++n}return-1}function K(e,t,r){if(t===void 0)return-1;if(t===null)switch(e.typeId){case v.Union:break;case v.Dictionary:break;default:return y_(e,r)}let n=xe.getVisitFn(e),a=Dr(t);for(let l=(r||0)-1,c=e.length;++l{let a=e.data[n];return a.values.subarray(0,a.length)[Symbol.iterator]()});let r=0;return new Qn(e.data.length,n=>{let a=e.data[n].length,l=e.slice(r,r+a);return r+=a,new Qa(l)})}var Qa=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexu.data):t;if(l.length===0||l.some(u=>!(u instanceof ce)))throw new TypeError("Vector constructor expects an Array of Data instances.");let c=(r=l[0])===null||r===void 0?void 0:r.type;switch(l.length){case 0:this._offsets=[0];break;case 1:{let{get:u,set:_,indexOf:d}=Xl[c.typeId],p=l[0];this.isValid=f=>Yn(p,f),this.get=f=>u(p,f),this.set=(f,m)=>_(p,f,m),this.indexOf=f=>d(p,f),this._offsets=[0,p.length];break}default:Object.setPrototypeOf(this,Ql[c.typeId]),this._offsets=ys(l);break}this.data=l,this.type=c,this.stride=et(c),this.numChildren=(a=(n=c.children)===null||n===void 0?void 0:n.length)!==null&&a!==void 0?a:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,r)=>t+r.byteLength,0)}get nullable(){return jl(this.data)}get nullCount(){return bs(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return"".concat(this.VectorName,"<").concat(this.type[Symbol.toStringTag],">")}get VectorName(){return"".concat(v[this.type.typeId],"Vector")}isValid(t){return!1}get(t){return null}at(t){return this.get(Br(t,this.length))}set(t,r){}indexOf(t,r){return-1}includes(t,r){return this.indexOf(t,r)>-1}[Symbol.iterator](){return pn.visit(this)}concat(...t){return new Qi(this.data.concat(t.flatMap(r=>r.data).flat(Number.POSITIVE_INFINITY)))}slice(t,r){return new Qi(qn(this,t,r,({data:n,_offsets:a},l,c)=>Ss(n,a,l,c)))}toJSON(){return[...this]}toArray(){let{type:t,data:r,length:n,stride:a,ArrayType:l}=this;switch(t.typeId){case v.Int:case v.Float:case v.Decimal:case v.Time:case v.Timestamp:switch(r.length){case 0:return new l;case 1:return r[0].values.subarray(0,n*a);default:return r.reduce((c,{values:u,length:_})=>(c.array.set(u.subarray(0,_*a),c.offset),c.offset+=_*a,c),{array:new l(n*a),offset:0}).array}}return[...this]}toString(){return"[".concat([...this].join(","),"]")}getChild(t){var r;return this.getChildAt((r=this.type.children)===null||r===void 0?void 0:r.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&tr[t])):null}get isMemoized(){return G.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(G.isDictionary(this.type)){let t=new Ls(this.data[0].dictionary),r=this.data.map(n=>{let a=n.clone();return a.dictionary=t,a});return new Qi(r)}return new Ls(this)}unmemoize(){if(G.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize(),r=this.data.map(n=>{let a=n.clone();return a.dictionary=t,a});return new Qi(r)}return this}};ql=Symbol.toStringTag,se[ql]=(e=>{e.type=G.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(v).map(r=>v[r]).filter(r=>typeof r=="number"&&r!==v.NONE);for(let r of t){let n=xe.getVisitFnByTypeId(r),a=Ge.getVisitFnByTypeId(r),l=Rr.getVisitFnByTypeId(r);Xl[r]={get:n,set:a,indexOf:l},Ql[r]=Object.create(e,{isValid:{value:fn(Yn)},get:{value:fn(xe.getVisitFnByTypeId(r))},set:{value:Es(Ge.getVisitFnByTypeId(r))},indexOf:{value:ws(Rr.getVisitFnByTypeId(r))}})}return"Vector"})(se.prototype);var Ls=class Wd extends se{constructor(t){super(t.data);let r=this.get,n=this.set,a=this.slice,l=new Array(this.length);Object.defineProperty(this,"get",{value(c){let u=l[c];if(u!==void 0)return u;let _=r.call(this,c);return l[c]=_,_}}),Object.defineProperty(this,"set",{value(c,u){n.call(this,c,u),l[c]=u}}),Object.defineProperty(this,"slice",{value:(c,u)=>new Wd(a.call(this,c,u))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new se(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}};function Yl(e){if(!e||e.length<=0)return function(n){return!0};let t="",r=e.filter(n=>n===n);return r.length>0&&(t=` + switch (x) {`.concat(r.map(n=>` + case `.concat(S_(n),":")).join(""),` + return false; + }`)),e.length!==r.length&&(t=`if (x !== x) return false; +`.concat(t)),new Function("x","".concat(t,` +return true;`))}function S_(e){return typeof e!="bigint"?ht(e):"".concat(ht(e),"n")}function Ya(e,t){let r=Math.ceil(e)*t-1;return(r-r%64+64||64)/t}function Jl(e,t=0){return e.length>=t?e.subarray(0,t):In(new e.constructor(t),e,0)}var Lt=class{constructor(e,t=0,r=1){this.length=Math.ceil(t/r),this.buffer=new e(this.length),this.stride=r,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e}get byteLength(){return Math.ceil(this.length*this.stride)*this.BYTES_PER_ELEMENT}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let t=this.stride,r=this.length*t,n=this.buffer.length;r>=n&&this._resize(n===0?Ya(r*1,this.BYTES_PER_ELEMENT):Ya(r*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=Ya(e*this.stride,this.BYTES_PER_ELEMENT);let t=Jl(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this.buffer=new this.ArrayType,this}_resize(e){return this.buffer=Jl(this.buffer,e)}},rr=class extends Lt{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}},mn=class extends rr{constructor(){super(Uint8Array,0,1/8),this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){let{buffer:r}=this.reserve(e-this.length+1),n=e>>3,a=e%8,l=r[n]>>a&1;return t?l===0&&(r[n]|=1<=0&&n.fill(n[r],r,e),n[e]=n[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,this.BYTES_PER_ELEMENT>4?BigInt(0):0),super.flush(e+1)}},Se=class{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=et(e),this._nulls=new mn,t&&t.length>0&&(this._isValid=Yl(t))}toVector(){return new se([this.flush()])}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0,{_offsets:t,_values:r,_nulls:n,_typeIds:a,children:l}=this;return t&&(e+=t.byteLength),r&&(e+=r.byteLength),n&&(e+=n.byteLength),a&&(e+=a.byteLength),l.reduce((c,u)=>c+u.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((t,r)=>t+r.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t="".concat(this.numChildren)){throw new Error('Cannot append children to non-nested type "'.concat(this.type,'"'))}getChildAt(e){return this.children[e]||null}flush(){let e,t,r,n,{type:a,length:l,nullCount:c,_typeIds:u,_offsets:_,_values:d,_nulls:p}=this;(t=u==null?void 0:u.flush(l))?n=_==null?void 0:_.flush(l):(n=_==null?void 0:_.flush(l))?e=d==null?void 0:d.flush(_.last()):e=d==null?void 0:d.flush(l),c>0&&(r=p==null?void 0:p.flush(l));let f=this.children.map(m=>m.flush());return this.clear(),J({type:a,length:l,nullCount:c,children:f,child:f[0],data:e,typeIds:t,nullBitmap:r,valueOffsets:n})}finish(){this.finished=!0;for(let e of this.children)e.finish();return this}clear(){var e,t,r,n;this.length=0,(e=this._nulls)===null||e===void 0||e.clear(),(t=this._values)===null||t===void 0||t.clear(),(r=this._offsets)===null||r===void 0||r.clear(),(n=this._typeIds)===null||n===void 0||n.clear();for(let a of this.children)a.clear();return this}};Se.prototype.length=1,Se.prototype.stride=1,Se.prototype.children=null,Se.prototype.finished=!1,Se.prototype.nullValues=null,Se.prototype._isValid=()=>!0;var Te=class extends Se{constructor(e){super(e),this._values=new rr(this.ArrayType,0,this.stride)}setValue(e,t){let r=this._values;return r.reserve(e-r.length+1),super.setValue(e,t)}},je=class extends Se{constructor(e){super(e),this._pendingLength=0,this._offsets=new gn(e.type)}setValue(e,t){let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t instanceof Bt?t[Ar].length:t.length,r.set(e,t)}setValid(e,t){return super.setValid(e,t)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}},Hr=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,t,r,n){return e.prep(8,24),e.writeInt64(BigInt(n??0)),e.pad(4),e.writeInt32(r),e.writeInt64(BigInt(t??0)),e.offset()}},tt=class Ud{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsFooter(t,r){return(r||new Ud).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,r){return t.setPosition(t.position()+4),(r||new Ud).__init(t.readInt32(t.position())+t.position(),t)}version(){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):ue.V1}schema(t){let r=this.bb.__offset(this.bb_pos,6);return r?(t||new ze).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}dictionaries(t,r){let n=this.bb.__offset(this.bb_pos,8);return n?(r||new Hr).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}dictionariesLength(){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,r){let n=this.bb.__offset(this.bb_pos,10);return n?(r||new Hr).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}recordBatchesLength(){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,r){let n=this.bb.__offset(this.bb_pos,12);return n?(r||new Ce).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,r){t.addFieldInt16(0,r,ue.V1)}static addSchema(t,r){t.addFieldOffset(1,r,0)}static addDictionaries(t,r){t.addFieldOffset(2,r,0)}static startDictionariesVector(t,r){t.startVector(24,r,8)}static addRecordBatches(t,r){t.addFieldOffset(3,r,0)}static startRecordBatchesVector(t,r){t.startVector(24,r,8)}static addCustomMetadata(t,r){t.addFieldOffset(4,r,0)}static createCustomMetadataVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startCustomMetadataVector(t,r){t.startVector(4,r,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,r){t.finish(r)}static finishSizePrefixedFooterBuffer(t,r){t.finish(r,void 0,!0)}},de=class $i{constructor(t=[],r,n,a=ue.V5){this.fields=t||[],this.metadata=r||new Map,n||(n=Ja(this.fields)),this.dictionaries=n,this.metadataVersion=a}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(t=>t.name)}toString(){return"Schema<{ ".concat(this.fields.map((t,r)=>"".concat(r,": ").concat(t)).join(", ")," }>")}select(t){let r=new Set(t),n=this.fields.filter(a=>r.has(a.name));return new $i(n,this.metadata)}selectAt(t){let r=t.map(n=>this.fields[n]).filter(Boolean);return new $i(r,this.metadata)}assign(...t){let r=t[0]instanceof $i?t[0]:Array.isArray(t[0])?new $i(t[0]):new $i(t),n=[...this.fields],a=As(As(new Map,this.metadata),r.metadata),l=r.fields.filter(u=>{let _=n.findIndex(d=>d.name===u.name);return~_?(n[_]=u.clone({metadata:As(As(new Map,n[_].metadata),u.metadata)}))&&!1:!0}),c=Ja(l,new Map);return new $i([...n,...l],a,new Map([...this.dictionaries,...c]))}};de.prototype.fields=null,de.prototype.metadata=null,de.prototype.dictionaries=null;var ne=class Hd{static new(...t){let[r,n,a,l]=t;return t[0]&&typeof t[0]=="object"&&({name:r}=t[0],n===void 0&&(n=t[0].type),a===void 0&&(a=t[0].nullable),l===void 0&&(l=t[0].metadata)),new Hd("".concat(r),n,a,l)}constructor(t,r,n=!1,a){this.name=t,this.type=r,this.nullable=n,this.metadata=a||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return"".concat(this.name,": ").concat(this.type)}clone(...t){let[r,n,a,l]=t;return!t[0]||typeof t[0]!="object"?[r=this.name,n=this.type,a=this.nullable,l=this.metadata]=t:{name:r=this.name,type:n=this.type,nullable:a=this.nullable,metadata:l=this.metadata}=t[0],Hd.new(r,n,a,l)}};ne.prototype.type=null,ne.prototype.name=null,ne.prototype.nullable=null,ne.prototype.metadata=null;function As(e,t){return new Map([...e||new Map,...t||new Map])}function Ja(e,t=new Map){for(let r=-1,n=e.length;++r0&&Ja(a.children,t)}return t}var E_=kr,w_=Je,nr=class{static decode(e){e=new w_(j(e));let t=tt.getRootAsFooter(e),r=de.decode(t.schema(),new Map,t.version());return new Ka(r,t)}static encode(e){let t=new E_,r=de.encode(t,e.schema);tt.startRecordBatchesVector(t,e.numRecordBatches);for(let l of[...e.recordBatches()].slice().reverse())ir.encode(t,l);let n=t.endVector();tt.startDictionariesVector(t,e.numDictionaries);for(let l of[...e.dictionaryBatches()].slice().reverse())ir.encode(t,l);let a=t.endVector();return tt.startFooter(t),tt.addSchema(t,r),tt.addVersion(t,ue.V5),tt.addRecordBatches(t,n),tt.addDictionaries(t,a),tt.finishFooterBuffer(t,tt.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=ue.V5,r,n){this.schema=e,this.version=t,r&&(this._recordBatches=r),n&&(this._dictionaryBatches=n)}*recordBatches(){for(let e,t=-1,r=this.numRecordBatches;++t=0&&e=0&&e=0&&e=0&&ethis._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return B(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(be);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Be.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Be.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return B(this,void 0,void 0,function*(){return yield this.abort(e),be})}return(e){return B(this,void 0,void 0,function*(){return yield this.close(),be})}read(e){return B(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return B(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,r)=>{this.resolvers.push({resolve:t,reject:r})}):Promise.resolve(be)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}},Gt=class extends Ds{write(e){if((e=j(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Tn(this.toUint8Array(!0)):this.toUint8Array(!1).then(Tn)}toUint8Array(e=!1){return e?Ye(this._values)[0]:B(this,void 0,void 0,function*(){var t,r,n,a;let l=[],c=0;try{for(var u=!0,_=ut(this),d;d=yield _.next(),t=d.done,!t;u=!0){a=d.value,u=!1;let p=a;l.push(p),c+=p.byteLength}}catch(p){r={error:p}}finally{try{!u&&!t&&(n=_.return)&&(yield n.call(_))}finally{if(r)throw r.error}}return Ye(l,c)[0]})}},Ut=class{constructor(e){e&&(this.source=new Za(Be.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},at=class jd{constructor(t){t instanceof jd?this.source=t.source:t instanceof Gt?this.source=new sr(Be.fromAsyncIterable(t)):ki(t)?this.source=new sr(Be.fromNodeStream(t)):Pn(t)?this.source=new sr(Be.fromDOMStream(t)):Ci(t)?this.source=new sr(Be.fromDOMStream(t.body)):dt(t)?this.source=new sr(Be.fromIterable(t)):_t(t)?this.source=new sr(Be.fromAsyncIterable(t)):rt(t)&&(this.source=new sr(Be.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}},Za=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||be)}return(e){return Object.create(this.source.return&&this.source.return(e)||be)}},sr=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return B(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return B(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return B(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e){return B(this,arguments,void 0,function*(t,r="read"){return yield this.source.next({cmd:r,size:t})})}throw(e){return B(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||be;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return B(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||be;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},Kn=class extends Ut{constructor(e,t){super(),this.position=0,this.buffer=j(e),this.size=t===void 0?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:r}=this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),eZn,Int128:()=>ei,Int64:()=>ar,Uint64:()=>Le});function hn(e){return e<0&&(e=4294967295+e+1),"0x".concat(e.toString(16))}var vn=8,eo=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],Zn=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),r=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*r[3];this.buffer[0]=n&65535;let a=n>>>16;return n=t[2]*r[3],a+=n,n=t[3]*r[2]>>>0,a+=n,this.buffer[0]+=a<<16,this.buffer[1]=a>>>0>>16,this.buffer[1]+=t[1]*r[3]+t[2]*r[2]+t[3]*r[1],this.buffer[1]+=t[0]*r[3]+t[1]*r[2]+t[2]*r[1]+t[3]*r[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,r[2]=this.buffer[2]+t.buffer[2]>>>0,r[1]=this.buffer[1]+t.buffer[1]>>>0,r[0]=this.buffer[0]+t.buffer[0]>>>0,r[0]>>0&&++r[1],r[1]>>0&&++r[2],r[2]>>0&&++r[3],this.buffer[3]=r[3],this.buffer[2]=r[2],this.buffer[1]=r[1],this.buffer[0]=r[0],this}hex(){return"".concat(hn(this.buffer[3])," ").concat(hn(this.buffer[2])," ").concat(hn(this.buffer[1])," ").concat(hn(this.buffer[0]))}static multiply(t,r){return new Hi(new Uint32Array(t.buffer)).times(r)}static add(t,r){return new Hi(new Uint32Array(t.buffer)).plus(r)}static from(t,r=new Uint32Array(4)){return Hi.fromString(typeof t=="string"?t:t.toString(),r)}static fromNumber(t,r=new Uint32Array(4)){return Hi.fromString(t.toString(),r)}static fromString(t,r=new Uint32Array(4)){let n=t.startsWith("-"),a=t.length,l=new Hi(r);for(let c=n?1:0;c0&&this.readData(e,r)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:r}=this.nextBufferRange()){return this.bytes.subarray(r,r+t)}readDictionary(e){return this.dictionaries.get(e.id)}},Fs=class extends ti{constructor(e,t,r,n,a){super(new Uint8Array(0),t,r,n,a),this.sources=e}readNullBitmap(e,t,{offset:r}=this.nextBufferRange()){return t<=0?new Uint8Array(0):Or(this.sources[r])}readOffsets(e,{offset:t}=this.nextBufferRange()){return re(Uint8Array,re(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return re(Uint8Array,re(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:r}=this;return G.isTimestamp(e)||(G.isInt(e)||G.isTime(e))&&e.bitWidth===64||G.isDuration(e)||G.isDate(e)&&e.unit===Ae.MILLISECOND?re(Uint8Array,ar.convertArray(r[t])):G.isDecimal(e)?re(Uint8Array,ei.convertArray(r[t])):G.isBinary(e)||G.isLargeBinary(e)||G.isFixedSizeBinary(e)?L_(r[t]):G.isBool(e)?Or(r[t]):G.isUtf8(e)||G.isLargeUtf8(e)?Tt(r[t].join("")):re(Uint8Array,re(e.ArrayType,r[t].map(n=>+n)))}};function L_(e){let t=e.join(""),r=new Uint8Array(t.length/2);for(let n=0;n>1]=Number.parseInt(t.slice(n,n+2),16);return r}var bn=class extends je{constructor(e){super(e),this._values=new Lt(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,j(t))}_flushPending(e,t){let r=this._offsets,n=this._values.reserve(t).buffer,a=0;for(let[l,c]of e)if(c===void 0)r.set(l,0);else{let u=c.length;n.set(c,a),r.set(l,u),a+=u}}},yn=class extends je{constructor(e){super(e),this._values=new Lt(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,j(t))}_flushPending(e,t){let r=this._offsets,n=this._values.reserve(t).buffer,a=0;for(let[l,c]of e)if(c===void 0)r.set(l,BigInt(0));else{let u=c.length;n.set(c,a),r.set(l,BigInt(u)),a+=u}}},xs=class extends Se{constructor(e){super(e),this._values=new mn}setValue(e,t){this._values.set(e,+t)}},Wr=class extends Te{};Wr.prototype._setValue=ka;var ri=class extends Wr{};ri.prototype._setValue=Zi;var ni=class extends Wr{};ni.prototype._setValue=es;var ii=class extends Te{};ii.prototype._setValue=Ua;var Ts=class extends Se{constructor({type:e,nullValues:t,dictionaryHashFunction:r}){super({type:new Ze(e.dictionary,e.indices,e.id,e.isOrdered)}),this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=Vr({type:this.type.indices,nullValues:t}),this.dictionary=Vr({type:this.type.dictionary,nullValues:null}),typeof r=="function"&&(this.valueToKey=r)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){let r=this.indices;return t=r.setValid(e,t),this.length=r.length,t}setValue(e,t){let r=this._keysToIndices,n=this.valueToKey(t),a=r[n];return a===void 0&&(r[n]=a=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,a)}flush(){let e=this.type,t=this._dictionary,r=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(r):r,this.finished||(this._dictionaryOffset+=r.length),this._dictionary=n.dictionary,this.clear(),n}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return typeof e=="string"?e:"".concat(e)}},si=class extends Te{};si.prototype._setValue=Ma;var Ps=class extends Se{setValue(e,t){let[r]=this.children,n=e*this.stride;for(let a=-1,l=t.length;++a0)throw new Error("FixedSizeListBuilder can only have one child.");let r=this.children.push(e);return this.type=new St(this.type.listSize,new ne(t,e.type,!0)),r}},zr=class extends Te{setValue(e,t){this._values.set(e,t)}},Is=class extends zr{setValue(e,t){super.setValue(e,$n(t))}},Cs=class extends zr{},Ms=class extends zr{},jr=class extends Te{};jr.prototype._setValue=Oa;var ai=class extends jr{};ai.prototype._setValue=cs;var oi=class extends jr{};oi.prototype._setValue=us;var or=class extends Te{};or.prototype._setValue=Ra;var li=class extends or{};li.prototype._setValue=_s;var ci=class extends or{};ci.prototype._setValue=ds;var ui=class extends or{};ui.prototype._setValue=ps;var _i=class extends or{};_i.prototype._setValue=ms;var ot=class extends Te{setValue(e,t){this._values.set(e,t)}},ks=class extends ot{},Bs=class extends ot{},Gs=class extends ot{},Us=class extends ot{},Os=class extends ot{},Rs=class extends ot{},Hs=class extends ot{},Ns=class extends ot{},Ws=class extends je{constructor(e){super(e),this._offsets=new gn(e.type)}addChild(e,t="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new bt(new ne(t,e.type,!0)),this.numChildren-1}_flushPending(e){let t=this._offsets,[r]=this.children;for(let[n,a]of e)if(typeof a>"u")t.set(n,0);else{let l=a,c=l.length,u=t.set(n,c).buffer[n];for(let _=-1;++_0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new Et(new ne(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,[r]=this.children;for(let[n,a]of e)if(a===void 0)t.set(n,0);else{let{[n]:l,[n+1]:c}=t.set(n,a.size).buffer;for(let u of a.entries())if(r.set(l,u),++l>=c)break}}},zs=class extends Se{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}},js=class extends Se{setValue(e,t){let{children:r,type:n}=this;switch(Array.isArray(t)||t.constructor){case!0:return n.children.forEach((a,l)=>r[l].set(e,t[l]));case Map:return n.children.forEach((a,l)=>r[l].set(e,t.get(a.name)));default:return n.children.forEach((a,l)=>r[l].set(e,t[a.name]))}}setValid(e,t){return super.setValid(e,t)||this.children.forEach(r=>r.setValid(e,t)),t}addChild(e,t="".concat(this.numChildren)){let r=this.children.push(e);return this.type=new ve([...this.type.children,new ne(t,e.type,!0)]),r}},lr=class extends Te{};lr.prototype._setValue=Ba;var di=class extends lr{};di.prototype._setValue=ts;var fi=class extends lr{};fi.prototype._setValue=rs;var pi=class extends lr{};pi.prototype._setValue=ns;var mi=class extends lr{};mi.prototype._setValue=is;var cr=class extends Te{};cr.prototype._setValue=Ga;var gi=class extends cr{};gi.prototype._setValue=ss;var hi=class extends cr{};hi.prototype._setValue=as;var vi=class extends cr{};vi.prototype._setValue=os;var bi=class extends cr{};bi.prototype._setValue=ls;var Sn=class extends Se{constructor(e){super(e),this._typeIds=new rr(Int8Array,0,1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,r){return r===void 0&&(r=this._valueToChildTypeId(this,t,e)),this.setValue(e,t,r),this}setValue(e,t,r){this._typeIds.set(e,r);let n=this.type.typeIdToChildIndex[r],a=this.children[n];a==null||a.set(e,t)}addChild(e,t="".concat(this.children.length)){let r=this.children.push(e),{type:{children:n,mode:a,typeIds:l}}=this,c=[...n,new ne(t,e.type)];return this.type=new yt(a,[...l,r],c),r}_valueToChildTypeId(e,t,r){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}},$s=class extends Sn{},qs=class extends Sn{constructor(e){super(e),this._offsets=new rr(Int32Array)}setValue(e,t,r){let n=this._typeIds.set(e,r).buffer[e],a=this.getChildAt(this.type.typeIdToChildIndex[n]),l=this._offsets.set(e,a.length).buffer[e];a==null||a.set(l,t)}},yi=class extends je{constructor(e){super(e),this._values=new Lt(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,Tt(t))}_flushPending(e,t){}};yi.prototype._flushPending=bn.prototype._flushPending;var Si=class extends je{constructor(e){super(e),this._values=new Lt(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,Tt(t))}_flushPending(e,t){}};Si.prototype._flushPending=yn.prototype._flushPending;var ro=class extends R{visitNull(){return zs}visitBool(){return xs}visitInt(){return ot}visitInt8(){return ks}visitInt16(){return Bs}visitInt32(){return Gs}visitInt64(){return Us}visitUint8(){return Os}visitUint16(){return Rs}visitUint32(){return Hs}visitUint64(){return Ns}visitFloat(){return zr}visitFloat16(){return Is}visitFloat32(){return Cs}visitFloat64(){return Ms}visitUtf8(){return yi}visitLargeUtf8(){return Si}visitBinary(){return bn}visitLargeBinary(){return yn}visitFixedSizeBinary(){return si}visitDate(){return Wr}visitDateDay(){return ri}visitDateMillisecond(){return ni}visitTimestamp(){return lr}visitTimestampSecond(){return di}visitTimestampMillisecond(){return fi}visitTimestampMicrosecond(){return pi}visitTimestampNanosecond(){return mi}visitTime(){return cr}visitTimeSecond(){return gi}visitTimeMillisecond(){return hi}visitTimeMicrosecond(){return vi}visitTimeNanosecond(){return bi}visitDecimal(){return ii}visitList(){return Ws}visitStruct(){return js}visitUnion(){return Sn}visitDenseUnion(){return qs}visitSparseUnion(){return $s}visitDictionary(){return Ts}visitInterval(){return jr}visitIntervalDayTime(){return ai}visitIntervalYearMonth(){return oi}visitDuration(){return or}visitDurationSecond(){return li}visitDurationMillisecond(){return ci}visitDurationMicrosecond(){return ui}visitDurationNanosecond(){return _i}visitFixedSizeList(){return Ps}visitMap(){return Vs}},Kl=new ro,V=class extends R{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((r,n)=>this.compareFields(r,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};function We(e,t){return t instanceof e.constructor}function $r(e,t){return e===t||We(e,t)}function ur(e,t){return e===t||We(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function Xs(e,t){return e===t||We(e,t)&&e.precision===t.precision}function A_(e,t){return e===t||We(e,t)&&e.byteWidth===t.byteWidth}function no(e,t){return e===t||We(e,t)&&e.unit===t.unit}function Ei(e,t){return e===t||We(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function wi(e,t){return e===t||We(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function D_(e,t){return e===t||We(e,t)&&e.children.length===t.children.length&&Ot.compareManyFields(e.children,t.children)}function F_(e,t){return e===t||We(e,t)&&e.children.length===t.children.length&&Ot.compareManyFields(e.children,t.children)}function io(e,t){return e===t||We(e,t)&&e.mode===t.mode&&e.typeIds.every((r,n)=>r===t.typeIds[n])&&Ot.compareManyFields(e.children,t.children)}function x_(e,t){return e===t||We(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&Ot.visit(e.indices,t.indices)&&Ot.visit(e.dictionary,t.dictionary)}function so(e,t){return e===t||We(e,t)&&e.unit===t.unit}function Li(e,t){return e===t||We(e,t)&&e.unit===t.unit}function T_(e,t){return e===t||We(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&Ot.compareManyFields(e.children,t.children)}function P_(e,t){return e===t||We(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&Ot.compareManyFields(e.children,t.children)}V.prototype.visitNull=$r,V.prototype.visitBool=$r,V.prototype.visitInt=ur,V.prototype.visitInt8=ur,V.prototype.visitInt16=ur,V.prototype.visitInt32=ur,V.prototype.visitInt64=ur,V.prototype.visitUint8=ur,V.prototype.visitUint16=ur,V.prototype.visitUint32=ur,V.prototype.visitUint64=ur,V.prototype.visitFloat=Xs,V.prototype.visitFloat16=Xs,V.prototype.visitFloat32=Xs,V.prototype.visitFloat64=Xs,V.prototype.visitUtf8=$r,V.prototype.visitLargeUtf8=$r,V.prototype.visitBinary=$r,V.prototype.visitLargeBinary=$r,V.prototype.visitFixedSizeBinary=A_,V.prototype.visitDate=no,V.prototype.visitDateDay=no,V.prototype.visitDateMillisecond=no,V.prototype.visitTimestamp=Ei,V.prototype.visitTimestampSecond=Ei,V.prototype.visitTimestampMillisecond=Ei,V.prototype.visitTimestampMicrosecond=Ei,V.prototype.visitTimestampNanosecond=Ei,V.prototype.visitTime=wi,V.prototype.visitTimeSecond=wi,V.prototype.visitTimeMillisecond=wi,V.prototype.visitTimeMicrosecond=wi,V.prototype.visitTimeNanosecond=wi,V.prototype.visitDecimal=$r,V.prototype.visitList=D_,V.prototype.visitStruct=F_,V.prototype.visitUnion=io,V.prototype.visitDenseUnion=io,V.prototype.visitSparseUnion=io,V.prototype.visitDictionary=x_,V.prototype.visitInterval=so,V.prototype.visitIntervalDayTime=so,V.prototype.visitIntervalYearMonth=so,V.prototype.visitDuration=Li,V.prototype.visitDurationSecond=Li,V.prototype.visitDurationMillisecond=Li,V.prototype.visitDurationMicrosecond=Li,V.prototype.visitDurationNanosecond=Li,V.prototype.visitFixedSizeList=T_,V.prototype.visitMap=P_;var Ot=new V;function qr(e,t){return Ot.compareSchemas(e,t)}function Zl(e,t){return Ot.compareFields(e,t)}function ec(e,t){return Ot.visit(e,t)}function Vr(e){let t=e.type,r=new(Kl.getVisitFn(t)())(e);if(t.children&&t.children.length>0){let n=e.children||[],a={nullValues:e.nullValues},l=Array.isArray(n)?(c,u)=>n[u]||a:({name:c})=>n[c]||a;for(let[c,u]of t.children.entries()){let{type:_}=u,d=l(u,c);r.children.push(Vr(Object.assign(Object.assign({},d),{type:_})))}}return r}function Qs(e,t){return I_(e,t.map(r=>r.data.concat()))}function I_(e,t){let r=[...e.fields],n=[],a={numBatches:t.reduce((f,m)=>Math.max(f,m.length),0)},l=0,c=0,u=-1,_=t.length,d,p=[];for(;a.numBatches-- >0;){for(c=Number.POSITIVE_INFINITY,u=-1;++u<_;)p[u]=d=t[u].shift(),c=Math.min(c,d?d.length:c);Number.isFinite(c)&&(p=C_(r,c,p,t,a),c>0&&(n[l++]=J({type:new ve(r),length:c,nullCount:0,children:p.slice()})))}return[e=e.assign(r),n.map(f=>new De(e,f))]}function C_(e,t,r,n,a){var l;let c=(t+63&-64)>>3;for(let u=-1,_=n.length;++u<_;){let d=r[u],p=d==null?void 0:d.length;if(p>=t)p===t?r[u]=d:(r[u]=d.slice(0,t),a.numBatches=Math.max(a.numBatches,n[u].unshift(d.slice(t,p-t))));else{let f=e[u];e[u]=f.clone({nullable:!0}),r[u]=(l=d==null?void 0:d._changeLengthAndBackfillNullBitmap(t))!==null&&l!==void 0?l:J({type:f.type,length:t,nullCount:t,nullBitmap:new Uint8Array(c)})}}return r}var tc,Ve=class ga{constructor(...t){var r,n;if(t.length===0)return this.batches=[],this.schema=new de([]),this._offsets=[0],this;let a,l;t[0]instanceof de&&(a=t.shift()),t.at(-1)instanceof Uint32Array&&(l=t.pop());let c=_=>{if(_){if(_ instanceof De)return[_];if(_ instanceof ga)return _.batches;if(_ instanceof ce){if(_.type instanceof ve)return[new De(new de(_.type.children),_)]}else{if(Array.isArray(_))return _.flatMap(d=>c(d));if(typeof _[Symbol.iterator]=="function")return[..._].flatMap(d=>c(d));if(typeof _=="object"){let d=Object.keys(_),p=d.map(g=>new se([_[g]])),f=a??new de(d.map((g,h)=>new ne(String(g),p[h].type,p[h].nullable))),[,m]=Qs(f,p);return m.length===0?[new De(_)]:m}}}return[]},u=t.flatMap(_=>c(_));if(a=(n=a??((r=u[0])===null||r===void 0?void 0:r.schema))!==null&&n!==void 0?n:new de([]),!(a instanceof de))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(let _ of u){if(!(_ instanceof De))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!qr(a,_.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=a,this.batches=u,this._offsets=l??ys(this.data)}get data(){return this.batches.map(({data:t})=>t)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((t,r)=>t+r.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=bs(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(Br(t,this.numRows))}set(t,r){}indexOf(t,r){return-1}[Symbol.iterator](){return this.batches.length>0?pn.visit(new se(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ + `.concat(this.toArray().join(`, + `),` +]`)}concat(...t){let r=this.schema,n=this.data.concat(t.flatMap(({data:a})=>a));return new ga(r,n.map(a=>new De(r,a)))}slice(t,r){let n=this.schema;[t,r]=qn({length:this.numRows},t,r);let a=Ss(this.data,this._offsets,t,r);return new ga(n,a.map(l=>new De(n,l)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(r=>r.name===t))}getChildAt(t){if(t>-1&&tn.children[t]);if(r.length===0){let{type:n}=this.schema.fields[t],a=J({type:n,length:0,nullCount:0});r.push(a._changeLengthAndBackfillNullBitmap(this.numRows))}return new se(r)}return null}setChild(t,r){var n;return this.setChildAt((n=this.schema.fields)===null||n===void 0?void 0:n.findIndex(a=>a.name===t),r)}setChildAt(t,r){let n=this.schema,a=[...this.batches];if(t>-1&&tthis.getChildAt(d));[l[t],u[t]]=[c,r],[n,a]=Qs(n,u)}return new ga(n,a)}select(t){let r=this.schema.fields.reduce((n,a,l)=>n.set(a.name,l),new Map);return this.selectAt(t.map(n=>r.get(n)).filter(n=>n>-1))}selectAt(t){let r=this.schema.selectAt(t),n=this.batches.map(a=>a.selectAt(t));return new ga(r,n)}assign(t){let r=this.schema.fields,[n,a]=t.schema.fields.reduce((u,_,d)=>{let[p,f]=u,m=r.findIndex(g=>g.name===_.name);return~m?f[m]=d:p.push(d),u},[[],[]]),l=this.schema.assign(t.schema),c=[...r.map((u,_)=>[_,a[_]]).map(([u,_])=>_===void 0?this.getChildAt(u):t.getChildAt(_)),...n.map(u=>t.getChildAt(u))].filter(Boolean);return new ga(...Qs(l,c))}};tc=Symbol.toStringTag,Ve[tc]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=fn(Yn),e.get=fn(xe.getVisitFn(v.Struct)),e.set=Es(Ge.getVisitFn(v.Struct)),e.indexOf=ws(Rr.getVisitFn(v.Struct)),"Table"))(Ve.prototype);var nc,De=class Fd{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof de))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=J({nullCount:0,type:new ve(this.schema.fields),children:this.schema.fields.map(r=>J({type:r.type,nullCount:0}))})]=t,!(this.data instanceof ce))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=rc(this.schema,this.data.children);break}case 1:{let[r]=t,{fields:n,children:a,length:l}=Object.keys(r).reduce((_,d,p)=>(_.children[p]=r[d],_.length=Math.max(_.length,r[d].length),_.fields[p]=ne.new({name:d,type:r[d].type,nullable:!0}),_),{length:0,fields:new Array,children:new Array}),c=new de(n),u=J({type:new ve(n),length:l,children:a,nullCount:0});[this.schema,this.data]=rc(c,u.children,l);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=ic(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return xe.visit(this.data,t)}at(t){return this.get(Br(t,this.numRows))}set(t,r){return Ge.visit(this.data,t,r)}indexOf(t,r){return Rr.visit(this.data,t,r)}[Symbol.iterator](){return pn.visit(new se([this.data]))}toArray(){return[...this]}concat(...t){return new Ve(this.schema,[this,...t])}slice(t,r){let[n]=new se([this.data]).slice(t,r).data;return new Fd(this.schema,n)}getChild(t){var r;return this.getChildAt((r=this.schema.fields)===null||r===void 0?void 0:r.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&ta.name===t),r)}setChildAt(t,r){let n=this.schema,a=this.data;if(t>-1&&tu.name===l);~c&&(a[c]=this.data.children[c])}return new Fd(r,J({type:n,length:this.numRows,children:a}))}selectAt(t){let r=this.schema.selectAt(t),n=t.map(l=>this.data.children[l]).filter(Boolean),a=J({type:new ve(r.fields),length:this.numRows,children:n});return new Fd(r,a)}};nc=Symbol.toStringTag,De[nc]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(De.prototype);function rc(e,t,r=t.reduce((n,a)=>Math.max(n,a.length),0)){var n;let a=[...e.fields],l=[...t],c=(r+63&-64)>>3;for(let[u,_]of e.fields.entries()){let d=t[u];(!d||d.length!==r)&&(a[u]=_.clone({nullable:!0}),l[u]=(n=d==null?void 0:d._changeLengthAndBackfillNullBitmap(r))!==null&&n!==void 0?n:J({type:_.type,length:r,nullCount:r,nullBitmap:new Uint8Array(c)}))}return[e.assign(a),J({type:new ve(a),length:r,children:l})]}function ic(e,t,r=new Map){var n,a;if(((n=e==null?void 0:e.length)!==null&&n!==void 0?n:0)>0&&(e==null?void 0:e.length)===(t==null?void 0:t.length))for(let l=-1,c=e.length;++lJ({type:n.type})),r=J({type:new ve(e.fields),nullCount:0,children:t});super(e,r)}},At=class nt{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsMessage(t,r){return(r||new nt).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,r){return t.setPosition(t.position()+4),(r||new nt).__init(t.readInt32(t.position())+t.position(),t)}version(){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):ue.V1}headerType(){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):ie.NONE}header(t){let r=this.bb.__offset(this.bb_pos,8);return r?this.bb.__union(t,this.bb_pos+r):null}bodyLength(){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,r){let n=this.bb.__offset(this.bb_pos,12);return n?(r||new Ce).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,r){t.addFieldInt16(0,r,ue.V1)}static addHeaderType(t,r){t.addFieldInt8(1,r,ie.NONE)}static addHeader(t,r){t.addFieldOffset(2,r,0)}static addBodyLength(t,r){t.addFieldInt64(3,r,BigInt("0"))}static addCustomMetadata(t,r){t.addFieldOffset(4,r,0)}static createCustomMetadataVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startCustomMetadataVector(t,r){t.startVector(4,r,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,r){t.finish(r)}static finishSizePrefixedMessageBuffer(t,r){t.finish(r,void 0,!0)}static createMessage(t,r,n,a,l,c){return nt.startMessage(t),nt.addVersion(t,r),nt.addHeaderType(t,n),nt.addHeader(t,a),nt.addBodyLength(t,l),nt.addCustomMetadata(t,c),nt.endMessage(t)}},ao=class extends R{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return Nn.startNull(t),Nn.endNull(t)}visitInt(e,t){return mt.startInt(t),mt.addBitWidth(t,e.bitWidth),mt.addIsSigned(t,e.isSigned),mt.endInt(t)}visitFloat(e,t){return yr.startFloatingPoint(t),yr.addPrecision(t,e.precision),yr.endFloatingPoint(t)}visitBinary(e,t){return Gn.startBinary(t),Gn.endBinary(t)}visitLargeBinary(e,t){return On.startLargeBinary(t),On.endLargeBinary(t)}visitBool(e,t){return Un.startBool(t),Un.endBool(t)}visitUtf8(e,t){return Vn.startUtf8(t),Vn.endUtf8(t)}visitLargeUtf8(e,t){return Rn.startLargeUtf8(t),Rn.endLargeUtf8(t)}visitDecimal(e,t){return Mt.startDecimal(t),Mt.addScale(t,e.scale),Mt.addPrecision(t,e.precision),Mt.addBitWidth(t,e.bitWidth),Mt.endDecimal(t)}visitDate(e,t){return gr.startDate(t),gr.addUnit(t,e.unit),gr.endDate(t)}visitTime(e,t){return Nt.startTime(t),Nt.addUnit(t,e.unit),Nt.addBitWidth(t,e.bitWidth),Nt.endTime(t)}visitTimestamp(e,t){let r=e.timezone&&t.createString(e.timezone)||void 0;return Wt.startTimestamp(t),Wt.addUnit(t,e.unit),r!==void 0&&Wt.addTimezone(t,r),Wt.endTimestamp(t)}visitInterval(e,t){return Sr.startInterval(t),Sr.addUnit(t,e.unit),Sr.endInterval(t)}visitDuration(e,t){return hr.startDuration(t),hr.addUnit(t,e.unit),hr.endDuration(t)}visitList(e,t){return Hn.startList(t),Hn.endList(t)}visitStruct(e,t){return Wn.startStruct_(t),Wn.endStruct_(t)}visitUnion(e,t){gt.startTypeIdsVector(t,e.typeIds.length);let r=gt.createTypeIdsVector(t,e.typeIds);return gt.startUnion(t),gt.addMode(t,e.mode),gt.addTypeIds(t,r),gt.endUnion(t)}visitDictionary(e,t){let r=this.visit(e.indices,t);return Ct.startDictionaryEncoding(t),Ct.addId(t,BigInt(e.id)),Ct.addIsOrdered(t,e.isOrdered),r!==void 0&&Ct.addIndexType(t,r),Ct.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return vr.startFixedSizeBinary(t),vr.addByteWidth(t,e.byteWidth),vr.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return br.startFixedSizeList(t),br.addListSize(t,e.listSize),br.endFixedSizeList(t)}visitMap(e,t){return Er.startMap(t),Er.addKeysSorted(t,e.keysSorted),Er.endMap(t)}},Ys=new ao;function lc(e,t=new Map){return new de(k_(e,t),Js(e.metadata),t)}function oo(e){return new Ue(e.count,uc(e.columns),_c(e.columns))}function cc(e){return new qe(oo(e.data),e.id,e.isDelta)}function k_(e,t){return(e.fields||[]).filter(Boolean).map(r=>ne.fromJSON(r,t))}function sc(e,t){return(e.children||[]).filter(Boolean).map(r=>ne.fromJSON(r,t))}function uc(e){return(e||[]).reduce((t,r)=>[...t,new lt(r.count,B_(r.VALIDITY)),...uc(r.children)],[])}function _c(e,t=[]){for(let r=-1,n=(e||[]).length;++rt+ +(r===0),0)}function dc(e,t){let r,n,a,l,c,u;return!t||!(l=e.dictionary)?(c=oc(e,sc(e,t)),a=new ne(e.name,c,e.nullable,Js(e.metadata))):t.has(r=l.id)?(n=(n=l.indexType)?ac(n):new kt,u=new Ze(t.get(r),n,r,l.isOrdered),a=new ne(e.name,u,e.nullable,Js(e.metadata))):(n=(n=l.indexType)?ac(n):new kt,t.set(r,c=oc(e,sc(e,t))),u=new Ze(c,n,r,l.isOrdered),a=new ne(e.name,u,e.nullable,Js(e.metadata))),a||null}function Js(e=[]){return new Map(e.map(({key:t,value:r})=>[t,r]))}function ac(e){return new Me(e.isSigned,e.bitWidth)}function oc(e,t){let r=e.type.name;switch(r){case"NONE":return new Ne;case"null":return new Ne;case"binary":return new Vt;case"largebinary":return new zt;case"utf8":return new jt;case"largeutf8":return new $t;case"bool":return new qt;case"list":return new bt((t||[])[0]);case"struct":return new ve(t||[]);case"struct_":return new ve(t||[])}switch(r){case"int":{let n=e.type;return new Me(n.isSigned,n.bitWidth)}case"floatingpoint":{let n=e.type;return new st(pe[n.precision])}case"decimal":{let n=e.type;return new Xt(n.scale,n.precision,n.bitWidth)}case"date":{let n=e.type;return new Qt(Ae[n.unit])}case"time":{let n=e.type;return new Yt(U[n.unit],n.bitWidth)}case"timestamp":{let n=e.type;return new Jt(U[n.unit],n.timezone)}case"interval":{let n=e.type;return new Kt(Ie[n.unit])}case"duration":{let n=e.type;return new Zt(U[n.unit])}case"union":{let n=e.type,[a,...l]=(n.mode+"").toLowerCase(),c=a.toUpperCase()+l.join("");return new yt(ge[c],n.typeIds||[],t||[])}case"fixedsizebinary":{let n=e.type;return new er(n.byteWidth)}case"fixedsizelist":{let n=e.type;return new St(n.listSize,(t||[])[0])}case"map":{let n=e.type;return new Et((t||[])[0],n.keysSorted)}}throw new Error('Unrecognized type: "'.concat(r,'"'))}var G_=kr,U_=Je,Xe=class dd{static fromJSON(t,r){let n=new dd(0,ue.V5,r);return n._createHeader=O_(t,r),n}static decode(t){t=new U_(j(t));let r=At.getRootAsMessage(t),n=r.bodyLength(),a=r.version(),l=r.headerType(),c=new dd(n,a,l);return c._createHeader=R_(r,l),c}static encode(t){let r=new G_,n=-1;return t.isSchema()?n=de.encode(r,t.header()):t.isRecordBatch()?n=Ue.encode(r,t.header()):t.isDictionaryBatch()&&(n=qe.encode(r,t.header())),At.startMessage(r),At.addVersion(r,ue.V5),At.addHeader(r,n),At.addHeaderType(r,t.headerType),At.addBodyLength(r,BigInt(t.bodyLength)),At.finishMessageBuffer(r,At.endMessage(r)),r.asUint8Array()}static from(t,r=0){if(t instanceof de)return new dd(0,ue.V5,ie.Schema,t);if(t instanceof Ue)return new dd(r,ue.V5,ie.RecordBatch,t);if(t instanceof qe)return new dd(r,ue.V5,ie.DictionaryBatch,t);throw new Error("Unrecognized Message header: ".concat(t))}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===ie.Schema}isRecordBatch(){return this.headerType===ie.RecordBatch}isDictionaryBatch(){return this.headerType===ie.DictionaryBatch}constructor(t,r,n,a){this._version=r,this._headerType=n,this.body=new Uint8Array(0),a&&(this._createHeader=()=>a),this._bodyLength=ae(t)}},Ue=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,r){this._nodes=t,this._buffers=r,this._length=ae(e)}},qe=class{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,t,r=!1){this._data=e,this._isDelta=r,this._id=ae(t)}},$e=class{constructor(e,t){this.offset=ae(e),this.length=ae(t)}},lt=class{constructor(e,t){this.length=ae(e),this.nullCount=ae(t)}};function O_(e,t){return()=>{switch(t){case ie.Schema:return de.fromJSON(e);case ie.RecordBatch:return Ue.fromJSON(e);case ie.DictionaryBatch:return qe.fromJSON(e)}throw new Error("Unrecognized Message type: { name: ".concat(ie[t],", type: ").concat(t," }"))}}function R_(e,t){return()=>{switch(t){case ie.Schema:return de.decode(e.header(new ze),new Map,e.version());case ie.RecordBatch:return Ue.decode(e.header(new Ke),e.version());case ie.DictionaryBatch:return qe.decode(e.header(new Ht),e.version())}throw new Error("Unrecognized Message type: { name: ".concat(ie[t],", type: ").concat(t," }"))}}ne.encode=Y_,ne.decode=X_,ne.fromJSON=dc,de.encode=Q_,de.decode=H_,de.fromJSON=lc,Ue.encode=J_,Ue.decode=N_,Ue.fromJSON=oo,qe.encode=K_,qe.decode=W_,qe.fromJSON=cc,lt.encode=Z_,lt.decode=z_,$e.encode=ed,$e.decode=V_;function H_(e,t=new Map,r=ue.V5){let n=q_(e,t);return new de(n,Ks(e),t,r)}function N_(e,t=ue.V5){if(e.compression()!==null)throw new Error("Record batch compression not implemented");return new Ue(e.length(),j_(e),$_(e,t))}function W_(e,t=ue.V5){return new qe(Ue.decode(e.data(),t),e.id(),e.isDelta())}function V_(e){return new $e(e.offset(),e.length())}function z_(e){return new lt(e.length(),e.nullCount())}function j_(e){let t=[];for(let r,n=-1,a=-1,l=e.nodesLength();++nne.encode(e,l));ze.startFieldsVector(e,r.length);let n=ze.createFieldsVector(e,r),a=t.metadata&&t.metadata.size>0?ze.createCustomMetadataVector(e,[...t.metadata].map(([l,c])=>{let u=e.createString("".concat(l)),_=e.createString("".concat(c));return Ce.startKeyValue(e),Ce.addKey(e,u),Ce.addValue(e,_),Ce.endKeyValue(e)})):-1;return ze.startSchema(e),ze.addFields(e,n),ze.addEndianness(e,td?mr.Little:mr.Big),a!==-1&&ze.addCustomMetadata(e,a),ze.endSchema(e)}function Y_(e,t){let r=-1,n=-1,a=-1,l=t.type,c=t.typeId;G.isDictionary(l)?(c=l.dictionary.typeId,a=Ys.visit(l,e),n=Ys.visit(l.dictionary,e)):n=Ys.visit(l,e);let u=(l.children||[]).map(p=>ne.encode(e,p)),_=Re.createChildrenVector(e,u),d=t.metadata&&t.metadata.size>0?Re.createCustomMetadataVector(e,[...t.metadata].map(([p,f])=>{let m=e.createString("".concat(p)),g=e.createString("".concat(f));return Ce.startKeyValue(e),Ce.addKey(e,m),Ce.addValue(e,g),Ce.endKeyValue(e)})):-1;return t.name&&(r=e.createString(t.name)),Re.startField(e),Re.addType(e,n),Re.addTypeType(e,c),Re.addChildren(e,_),Re.addNullable(e,!!t.nullable),r!==-1&&Re.addName(e,r),a!==-1&&Re.addDictionary(e,a),d!==-1&&Re.addCustomMetadata(e,d),Re.endField(e)}function J_(e,t){let r=t.nodes||[],n=t.buffers||[];Ke.startNodesVector(e,r.length);for(let c of r.slice().reverse())lt.encode(e,c);let a=e.endVector();Ke.startBuffersVector(e,n.length);for(let c of n.slice().reverse())$e.encode(e,c);let l=e.endVector();return Ke.startRecordBatch(e),Ke.addLength(e,BigInt(t.length)),Ke.addNodes(e,a),Ke.addBuffers(e,l),Ke.endRecordBatch(e)}function K_(e,t){let r=Ue.encode(e,t.data);return Ht.startDictionaryBatch(e),Ht.addId(e,BigInt(t.id)),Ht.addIsDelta(e,t.isDelta),Ht.addData(e,r),Ht.endDictionaryBatch(e)}function Z_(e,t){return nn.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function ed(e,t){return rn.createBuffer(e,BigInt(t.offset),BigInt(t.length))}var td=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),co=e=>"Expected ".concat(ie[e]," Message in stream, but was null or length 0."),uo=e=>"Header pointer of flatbuffer-encoded ".concat(ie[e]," Message is null or length 0."),gc=(e,t)=>"Expected to read ".concat(e," metadata bytes, but only read ").concat(t,"."),hc=(e,t)=>"Expected to read ".concat(e," bytes for message body, but only read ").concat(t,"."),En=class{constructor(e){this.source=e instanceof Ut?e:new Ut(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?be:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(co(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=j(this.source.read(e));if(t.byteLength[...n,...a.VALIDITY&&[a.VALIDITY]||[],...a.TYPE_ID&&[a.TYPE_ID]||[],...a.OFFSET&&[a.OFFSET]||[],...a.DATA&&[a.DATA]||[],...t(a.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(co(e));return t.value}readSchema(){let e=ie.Schema,t=this.readMessage(e),r=t==null?void 0:t.header();if(!t||!r)throw new Error(uo(e));return r}},Zs=4,lo="ARROW1",wn=new Uint8Array(lo.length);for(let e=0;ethis):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Be.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Be.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,r){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof kd?t:Ti(t)?nd(t):Ii(t)?ad(t):_t(t)?B(this,void 0,void 0,function*(){return yield kd.from(yield t)}):Ci(t)||Pn(t)||ki(t)||rt(t)?sd(new at(t)):id(new Ut(t))}static readAll(t){return t instanceof kd?t.isSync()?bc(t):yc(t):Ti(t)||ArrayBuffer.isView(t)||dt(t)||Pi(t)?bc(t):yc(t)}},Rt=class extends Oe{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Qe(this,arguments,function*(){yield ee(yield*Cr(en(ut(this[Symbol.iterator]()))))})}},xr=class extends Oe{constructor(e){super(e),this._impl=e}readAll(){return B(this,void 0,void 0,function*(){var e,t,r,n;let a=new Array;try{for(var l=!0,c=ut(this),u;u=yield c.next(),e=u.done,!e;l=!0){n=u.value,l=!1;let _=n;a.push(_)}}catch(_){t={error:_}}finally{try{!l&&!e&&(r=c.return)&&(yield r.call(c))}finally{if(t)throw t.error}}return a})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},Tr=class extends Rt{constructor(e){super(e),this._impl=e}},Fi=class extends xr{constructor(e){super(e),this._impl=e}},ta=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){let r=this._loadVectors(e,t,this.schema.fields),n=J({type:new ve(this.schema.fields),length:e.length,children:r});return new De(this.schema,n)}_loadDictionaryBatch(e,t){let{id:r,isDelta:n}=e,{dictionaries:a,schema:l}=this,c=a.get(r),u=l.dictionaries.get(r),_=this._loadVectors(e.data,t,[u]);return(c&&n?c.concat(new se(_)):new se(_)).memoize()}_loadVectors(e,t,r){return new ti(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(r)}},An=class extends ta{constructor(e,t){super(t),this._reader=Ti(e)?new Di(this._handle=e):new En(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Sc(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):be}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):be}next(){if(this.closed)return be;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(r,n)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Xr(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Dn=class extends ta{constructor(e,t){super(t),this._reader=new Ai(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return B(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return B(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Sc(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return B(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):be})}return(e){return B(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):be})}next(){return B(this,void 0,void 0,function*(){if(this.closed)return be;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(r,n)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Xr(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return B(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},ra=class extends An{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof Kn?e:new Kn(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();let r=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(r&&this._handle.seek(r.offset)){let n=this._reader.readMessage(ie.RecordBatch);if(n!=null&&n.isRecordBatch()){let a=n.header(),l=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(a,l)}}return null}_readDictionaryBatch(e){var t;let r=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(r&&this._handle.seek(r.offset)){let n=this._reader.readMessage(ie.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){let a=n.header(),l=this._reader.readMessageBody(n.bodyLength),c=this._loadDictionaryBatch(a,l);this.dictionaries.set(a.id,c)}}}_readFooter(){let{_handle:e}=this,t=e.size-_o,r=e.readInt32(t),n=e.readAt(t-r,r);return nr.decode(n)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return B(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return B(this,void 0,void 0,function*(){var t;if(this.closed)return null;this._footer||(yield this.open());let r=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(r&&(yield this._handle.seek(r.offset))){let n=yield this._reader.readMessage(ie.RecordBatch);if(n!=null&&n.isRecordBatch()){let a=n.header(),l=yield this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(a,l)}}return null})}_readDictionaryBatch(e){return B(this,void 0,void 0,function*(){var t;let r=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(r&&(yield this._handle.seek(r.offset))){let n=yield this._reader.readMessage(ie.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){let a=n.header(),l=yield this._reader.readMessageBody(n.bodyLength),c=this._loadDictionaryBatch(a,l);this.dictionaries.set(a.id,c)}}})}_readFooter(){return B(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-_o,r=yield e.readInt32(t),n=yield e.readAt(t-r,r);return nr.decode(n)})}_readNextMessageAndValidate(e){return B(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?ea(t)?new Tr(new ra(e.read())):new Rt(new An(e)):new Rt(new An(function*(){}()))}function sd(e){return B(this,void 0,void 0,function*(){let t=yield e.peek(Ln+7&-8);return t&&t.byteLength>=4?ea(t)?new Tr(new ra(yield e.read())):new xr(new Dn(e)):new xr(new Dn(function(){return Qe(this,arguments,function*(){})}()))})}function ad(e){return B(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),r=new Fr(e,t);return t>=vc&&ea(yield r.readAt(0,Ln+7&-8))?new Fi(new fo(r)):new xr(new Dn(r))})}var we=class qd extends R{static assemble(...t){let r=a=>a.flatMap(l=>Array.isArray(l)?r(l):l instanceof De?l.data.children:l.data),n=new qd;return n.visitMany(r(t)),n}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof se)return this.visitMany(t.data),this;let{type:r}=t;if(!G.isDictionary(r)){let{length:n}=t;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(G.isUnion(r))this.nodes.push(new lt(n,0));else{let{nullCount:a}=t;G.isNull(r)||Dt.call(this,a<=0?new Uint8Array(0):Ur(t.offset,n,t.nullBitmap)),this.nodes.push(new lt(n,a))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};function Dt(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new $e(this._byteLength,t)),this._byteLength+=t,this}function od(e){var t;let{type:r,length:n,typeIds:a,valueOffsets:l}=e;if(Dt.call(this,a),r.mode===ge.Sparse)return mo.call(this,e);if(r.mode===ge.Dense){if(e.offset<=0)return Dt.call(this,l),mo.call(this,e);{let c=new Int32Array(n),u=Object.create(null),_=Object.create(null);for(let d,p,f=-1;++f{let f=r.typeIds[p],m=u[f],g=_[f];return d.slice(m,Math.min(n,g))}))}}return this}function ld(e){let t;return e.nullCount>=e.length?Dt.call(this,new Uint8Array(0)):(t=e.values)instanceof Uint8Array?Dt.call(this,Ur(e.offset,e.length,t)):Dt.call(this,Or(e.values))}function _r(e){return Dt.call(this,e.values.subarray(0,e.length*e.stride))}function na(e){let{length:t,values:r,valueOffsets:n}=e,a=ae(n[0]),l=ae(n[t]),c=Math.min(l-a,r.byteLength-a);return Dt.call(this,Gi(-a,t+1,n)),Dt.call(this,r.subarray(a,a+c)),this}function go(e){let{length:t,valueOffsets:r}=e;if(r){let{[0]:n,[t]:a}=r;return Dt.call(this,Gi(-n,t+1,r)),this.visit(e.children[0].slice(n,a-n))}return this.visit(e.children[0])}function mo(e){return this.visitMany(e.type.children.map((t,r)=>e.children[r]).filter(Boolean))[0]}we.prototype.visitBool=ld,we.prototype.visitInt=_r,we.prototype.visitFloat=_r,we.prototype.visitUtf8=na,we.prototype.visitLargeUtf8=na,we.prototype.visitBinary=na,we.prototype.visitLargeBinary=na,we.prototype.visitFixedSizeBinary=_r,we.prototype.visitDate=_r,we.prototype.visitTimestamp=_r,we.prototype.visitTime=_r,we.prototype.visitDecimal=_r,we.prototype.visitList=go,we.prototype.visitStruct=mo,we.prototype.visitUnion=od,we.prototype.visitInterval=_r,we.prototype.visitDuration=_r,we.prototype.visitFixedSizeList=go,we.prototype.visitMap=go;var Qr=class extends Nr{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}constructor(e){super(),this._position=0,this._started=!1,this._sink=new Gt,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,He(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return _t(e)?e.then(t=>this.writeAll(t)):rt(e)?vo(this,e):ho(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof Gt?this._sink=e:(this._sink=new Gt,e&&Uo(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&Oo(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!t||!qr(t,this._schema))&&(t==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof Ve&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof De&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!qr(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof De?e instanceof Xr||this._writeRecordBatch(e):e instanceof Ve?this.writeAll(e.batches):dt(e)&&this.writeAll(e)}_writeMessage(e,t=8){let r=t-1,n=Xe.encode(e),a=n.byteLength,l=this._writeLegacyIpcFormat?4:8,c=a+l+r&~r,u=c-a-l;return e.headerType===ie.RecordBatch?this._recordBatchBlocks.push(new ir(c,e.bodyLength,this._position)):e.headerType===ie.DictionaryBatch&&this._dictionaryBlocks.push(new ir(c,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(c-l)),a>0&&this._write(n),this._writePadding(u)}_write(e){if(this._started){let t=j(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(Xe.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(wn)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:r,bufferRegions:n,buffers:a}=we.assemble(e),l=new Ue(e.numRows,r,n),c=Xe.from(l,t);return this._writeDictionaries(e)._writeMessage(c)._writeBodyBuffers(a)}_writeDictionaryBatch(e,t,r=!1){let{byteLength:n,nodes:a,bufferRegions:l,buffers:c}=we.assemble(new se([e])),u=new Ue(e.length,a,l),_=new qe(u,t,r),d=Xe.from(_,n);return this._writeMessage(d)._writeBodyBuffers(c)}_writeBodyBuffers(e){let t,r,n;for(let a=-1,l=e.length;++a0&&(this._write(t),(n=(r+7&-8)-r)>0&&this._writePadding(n));return this}_writeDictionaries(e){var t,r;for(let[n,a]of e.dictionaries){let l=(t=a==null?void 0:a.data)!==null&&t!==void 0?t:[],c=this._seenDictionaries.get(n),u=(r=this._dictionaryDeltaOffsets.get(n))!==null&&r!==void 0?r:0;if(!c||c.data[0]!==l[0])for(let[_,d]of l.entries())this._writeDictionaryBatch(d,n,_>0);else if(un.writeAll(a)):rt(t)?vo(n,t):ho(n,t)}},Jr=class Xd extends Qr{static writeAll(t){let r=new Xd;return _t(t)?t.then(n=>r.writeAll(n)):rt(t)?vo(r,t):ho(r,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,r,n=!1){if(!n&&this._seenDictionaries.has(r))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,r,n)}_writeFooter(t){let r=nr.encode(new nr(t,ue.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(r)._write(Int32Array.of(r.byteLength))._writeMagic()}};function ho(e,t){let r=t;t instanceof Ve&&(r=t.batches,e.reset(void 0,t.schema));for(let n of r)e.write(n);return e.finish()}function vo(e,t){return B(this,void 0,void 0,function*(){var r,n,a,l,c,u,_;try{for(r=!0,n=ut(t);a=yield n.next(),l=a.done,!l;r=!0){_=a.value,r=!1;let d=_;e.write(d)}}catch(d){c={error:d}}finally{try{!r&&!l&&(u=n.return)&&(yield u.call(n))}finally{if(c)throw c.error}}return e.finish()})}function Ec(e,t){if(rt(e))return ud(e,t);if(dt(e))return cd(e,t);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}function cd(e,t){let r=null,n=(t==null?void 0:t.type)==="bytes"||!1,a=(t==null?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(c){l(c,r||(r=e[Symbol.iterator]()))},pull(c){r?l(c,r):c.close()},cancel(){(r!=null&&r.return&&r.return()||!0)&&(r=null)}}),Object.assign({highWaterMark:n?a:void 0},t));function l(c,u){let _,d=null,p=c.desiredSize||null;for(;!(d=u.next(n?p:null)).done;)if(ArrayBuffer.isView(d.value)&&(_=j(d.value))&&(p!=null&&n&&(p=p-_.byteLength+1),d.value=_),c.enqueue(d.value),p!=null&&--p<=0)return;c.close()}}function ud(e,t){let r=null,n=(t==null?void 0:t.type)==="bytes"||!1,a=(t==null?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(c){return B(this,void 0,void 0,function*(){yield l(c,r||(r=e[Symbol.asyncIterator]()))})},pull(c){return B(this,void 0,void 0,function*(){r?yield l(c,r):c.close()})},cancel(){return B(this,void 0,void 0,function*(){(r!=null&&r.return&&(yield r.return())||!0)&&(r=null)})}}),Object.assign({highWaterMark:n?a:void 0},t));function l(c,u){return B(this,void 0,void 0,function*(){let _,d=null,p=c.desiredSize||null;for(;!(d=yield u.next(n?p:null)).done;)if(ArrayBuffer.isView(d.value)&&(_=j(d.value))&&(p!=null&&n&&(p=p-_.byteLength+1),d.value=_),c.enqueue(d.value),p!=null&&--p<=0)return;c.close()})}}function Ac(e){return new bo(e)}var bo=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:r,["queueingStrategy"]:n="count"}=e,a=Bo(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=Vr(a),this._getSize=n!=="bytes"?wc:Lc;let{["highWaterMark"]:l=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:c=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:u=>{this._maybeFlush(this._builder,this._controller=u)},start:u=>{this._maybeFlush(this._builder,this._controller=u)}},{highWaterMark:l,size:n!=="bytes"?wc:Lc}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:c,size:u=>this._writeValueAndReturnChunkSize(u)})}_writeValueAndReturnChunkSize(e){let t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){t!=null&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,t==null?e.close():e.enqueue(t)}},wc=e=>{var t;return(t=e==null?void 0:e.length)!==null&&t!==void 0?t:0},Lc=e=>{var t;return(t=e==null?void 0:e.byteLength)!==null&&t!==void 0?t:0};function ia(e,t){let r=new Gt,n=null,a=new ReadableStream({cancel(){return B(this,void 0,void 0,function*(){yield r.close()})},start(u){return B(this,void 0,void 0,function*(){yield c(u,n||(n=yield l()))})},pull(u){return B(this,void 0,void 0,function*(){n?yield c(u,n):u.close()})}});return{writable:new WritableStream(r,Object.assign({highWaterMark:Math.pow(2,14)},e)),readable:a};function l(){return B(this,void 0,void 0,function*(){return yield(yield Oe.from(r)).open(t)})}function c(u,_){return B(this,void 0,void 0,function*(){let d=u.desiredSize,p=null;for(;!(p=yield _.next()).done;)if(u.enqueue(p.value),d!=null&&--d<=0)return;u.close()})}}function sa(e,t){let r=new this(e),n=new at(r),a=new ReadableStream({cancel(){return B(this,void 0,void 0,function*(){yield n.cancel()})},pull(c){return B(this,void 0,void 0,function*(){yield l(c)})},start(c){return B(this,void 0,void 0,function*(){yield l(c)})}},Object.assign({highWaterMark:Math.pow(2,14)},t));return{writable:new WritableStream(r,e),readable:a};function l(c){return B(this,void 0,void 0,function*(){let u=null,_=c.desiredSize;for(;u=yield n.read(_||null);)if(c.enqueue(u),_!=null&&(_-=u.byteLength)<=0)return;c.close()})}}function aa(e,t="stream"){return(t==="stream"?Yr:Jr).writeAll(e).toUint8Array(!0)}Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Pa),to),$a),Ia),wa),ja),Da),{compareSchemas:qr,compareFields:Zl,compareTypes:ec}),Be.toDOMStream=Ec,Se.throughDOM=Ac,Oe.throughDOM=ia,Tr.throughDOM=ia,Rt.throughDOM=ia,Qr.throughDOM=sa,Jr.throughDOM=sa,Yr.throughDOM=sa;function Fn(e){switch(e.typeId){case v.Binary:return{sqlType:"binary"};case v.Bool:return{sqlType:"bool"};case v.Date:return{sqlType:"date"};case v.DateDay:return{sqlType:"date32[d]"};case v.DateMillisecond:return{sqlType:"date64[ms]"};case v.Decimal:{let t=e;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case v.Float:return{sqlType:"float"};case v.Float16:return{sqlType:"float16"};case v.Float32:return{sqlType:"float32"};case v.Float64:return{sqlType:"float64"};case v.Int:return{sqlType:"int32"};case v.Int16:return{sqlType:"int16"};case v.Int32:return{sqlType:"int32"};case v.Int64:return{sqlType:"int64"};case v.Uint16:return{sqlType:"uint16"};case v.Uint32:return{sqlType:"uint32"};case v.Uint64:return{sqlType:"uint64"};case v.Uint8:return{sqlType:"uint8"};case v.IntervalDayTime:return{sqlType:"interval[dt]"};case v.IntervalYearMonth:return{sqlType:"interval[m]"};case v.List:return{sqlType:"list",valueType:Fn(e.valueType)};case v.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:e.byteWidth};case v.Null:return{sqlType:"null"};case v.Utf8:return{sqlType:"utf8"};case v.Struct:return{sqlType:"struct",fields:e.children.map(t=>oa(t.name,t.type))};case v.Map:{let t=e;return{sqlType:"map",keyType:Fn(t.keyType),valueType:Fn(t.valueType)}}case v.Time:return{sqlType:"time[s]"};case v.TimeMicrosecond:return{sqlType:"time[us]"};case v.TimeMillisecond:return{sqlType:"time[ms]"};case v.TimeNanosecond:return{sqlType:"time[ns]"};case v.TimeSecond:return{sqlType:"time[s]"};case v.Timestamp:return{sqlType:"timestamp",timezone:e.timezone||void 0};case v.TimestampSecond:return{sqlType:"timestamp[s]",timezone:e.timezone||void 0};case v.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:e.timezone||void 0};case v.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:e.timezone||void 0};case v.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(e.toString()))}function oa(e,t){let r=Fn(t);return r.name=e,r}var la=class{constructor(){this._bindings=null,this._nextMessageId=0}log(e){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:"LOG",data:e},[])}sendOK(e){this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"OK",data:null},[])}failWith(e,t){let r={name:t.name,message:t.message,stack:t.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"ERROR",data:r},[])}async onMessage(e){switch(e.type){case"PING":this.sendOK(e);return;case"INSTANTIATE":this._bindings!=null&&this.failWith(e,new Error("duckdb already initialized"));try{this._bindings=await this.instantiate(e.data[0],e.data[1],t=>{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"INSTANTIATE_PROGRESS",data:t},[])}),this.sendOK(e)}catch(t){console.log(t),this._bindings=null,this.failWith(e,t)}return}if(!this._bindings)return this.failWith(e,new Error("duckdb is not initialized"));try{switch(e.type){case"GET_VERSION":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"VERSION_STRING",data:this._bindings.getVersion()},[]);break;case"GET_FEATURE_FLAGS":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FEATURE_FLAGS",data:this._bindings.getFeatureFlags()},[]);break;case"RESET":this._bindings.reset(),this.sendOK(e);break;case"OPEN":this._bindings.open(e.data),this.sendOK(e);break;case"DROP_FILE":this._bindings.dropFile(e.data),this.sendOK(e);break;case"DROP_FILES":this._bindings.dropFiles(),this.sendOK(e);break;case"FLUSH_FILES":this._bindings.flushFiles(),this.sendOK(e);break;case"CONNECT":{let t=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"CONNECTION_INFO",data:t.useUnsafe((r,n)=>n)},[]);break}case"DISCONNECT":this._bindings.disconnect(e.data),this.sendOK(e);break;case"CREATE_PREPARED":{let t=this._bindings.createPrepared(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"PREPARED_STATEMENT_ID",data:t},[]);break}case"CLOSE_PREPARED":{this._bindings.closePrepared(e.data[0],e.data[1]),this.sendOK(e);break}case"RUN_PREPARED":{let t=this._bindings.runPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"RUN_QUERY":{let t=this._bindings.runQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"SEND_PREPARED":{let t=this._bindings.sendPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_HEADER",data:t},[t.buffer]);break}case"START_PENDING_QUERY":{let t=this._bindings.startPendingQuery(e.data[0],e.data[1]),r=[];t&&r.push(t.buffer),this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_HEADER_OR_NULL",data:t},r);break}case"POLL_PENDING_QUERY":{let t=this._bindings.pollPendingQuery(e.data),r=[];t&&r.push(t.buffer),this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_HEADER_OR_NULL",data:t},r);break}case"CANCEL_PENDING_QUERY":{let t=this._bindings.cancelPendingQuery(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"SUCCESS",data:t},[]);break}case"FETCH_QUERY_RESULTS":{let t=this._bindings.fetchQueryResults(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_CHUNK",data:t},[t.buffer]);break}case"GET_TABLE_NAMES":{let t=this._bindings.getTableNames(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"TABLE_NAMES",data:t},[]);break}case"GLOB_FILE_INFOS":{let t=this._bindings.globFiles(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_INFOS",data:t},[]);break}case"REGISTER_FILE_URL":this._bindings.registerFileURL(e.data[0],e.data[1],e.data[2],e.data[3]),this.sendOK(e);break;case"REGISTER_FILE_BUFFER":this._bindings.registerFileBuffer(e.data[0],e.data[1]),this.sendOK(e);break;case"REGISTER_FILE_HANDLE":this._bindings.registerFileHandle(e.data[0],e.data[1],e.data[2],e.data[3]),this.sendOK(e);break;case"COPY_FILE_TO_PATH":this._bindings.copyFileToPath(e.data[0],e.data[1]),this.sendOK(e);break;case"COPY_FILE_TO_BUFFER":{let t=this._bindings.copyFileToBuffer(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_BUFFER",data:t},[]);break}case"COLLECT_FILE_STATISTICS":this._bindings.collectFileStatistics(e.data[0],e.data[1]),this.sendOK(e);break;case"EXPORT_FILE_STATISTICS":{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_STATISTICS",data:this._bindings.exportFileStatistics(e.data)},[]);break}case"INSERT_ARROW_FROM_IPC_STREAM":{this._bindings.insertArrowFromIPCStream(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_CSV_FROM_PATH":{this._bindings.insertCSVFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_JSON_FROM_PATH":{this._bindings.insertJSONFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"TOKENIZE":{let t=this._bindings.tokenize(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"SCRIPT_TOKENS",data:t},[]);break}}}catch(t){return console.log(t),this.failWith(e,t)}}},Bc=Mo(Tc()),ca=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),r=Oe.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),new Ve(r)}async send(e){let t=this._bindings.startPendingQuery(this._conn,e);for(;t==null;)t=await new Promise((a,l)=>{try{a(this._bindings.pollPendingQuery(this._conn))}catch(c){console.log(c),l(c)}});let r=new ua(this._bindings,this._conn,t),n=Oe.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}cancelSent(){return this._bindings.cancelPendingQuery(this._conn)}getTableNames(e){return this._bindings.getTableNames(this._conn,e)}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new wo(this._bindings,this._conn,t)}createScalarFunction(e,t,r){this._bindings.createScalarFunction(this._conn,e,t,r)}insertArrowTable(e,t){let r=aa(e,"stream");this.insertArrowFromIPCStream(r,t)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},ua=class{constructor(e,t,r){this.bindings=e,this.conn=t,this.header=r,this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},wo=class{constructor(e,t,r){this.bindings=e,this.connectionId=t,this.statementId=r}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),r=Oe.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),new Ve(r)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),r=new ua(this.bindings,this.connectionId,t),n=Oe.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}},Cc=new TextEncoder,Pc=new TextDecoder("utf-8");function Lo(e,t,r){let n=Cc.encode(r),a=e._malloc(n.byteLength),l=e.HEAPU8.subarray(a,a+n.byteLength);l.set(n),e.HEAPF64[(t>>3)+0]=1,e.HEAPF64[(t>>3)+1]=a,e.HEAPF64[(t>>3)+2]=l.byteLength}function Do(e){switch(e){case"UINT8":case"INT8":return 1;case"INT32":case"FLOAT":return 4;case"INT64":case"UINT64":case"DOUBLE":case"VARCHAR":return 8;default:return 0}}function Ao(e,t,r,n){let a=e.HEAPU8.subarray(t,t+n*Do(r));switch(r){case"UINT8":return new Uint8Array(a.buffer,a.byteOffset,n);case"INT8":return new Int8Array(a.buffer,a.byteOffset,n);case"INT32":return new Int32Array(a.buffer,a.byteOffset,n);case"FLOAT":return new Float32Array(a.buffer,a.byteOffset,n);case"DOUBLE":return new Float64Array(a.buffer,a.byteOffset,n);case"VARCHAR":return new Float64Array(a.buffer,a.byteOffset,n);default:return new Array(0)}}function Ic(e,t,r){let n=e.HEAPU8.subarray(t,t+r);return new Uint8Array(n.buffer,n.byteOffset,r)}function _a(e,t,r){let n=e.HEAPU8.subarray(t,t+r*8);return new Float64Array(n.buffer,n.byteOffset,r)}function Mc(e,t,r,n,a,l,c,u){try{let _=e._udfFunctions.get(n);if(!_){Lo(t,r,"Unknown UDF with id: "+n);return}let d=Pc.decode(t.HEAPU8.subarray(a,a+l)),p=JSON.parse(d),f=_a(t,c,u/8),m=w=>{var C;let L=null;switch(w.validityBuffer!==void 0&&(L=Ic(t,f[w.validityBuffer],p.rows)),w.physicalType){case"VARCHAR":{if(w.dataBuffer===null||w.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for VARCHAR argument");if(w.lengthBuffer===null||w.lengthBuffer===void 0)throw new Error("malformed data view, expected data length buffer for VARCHAR argument");let k=Ao(t,f[w.dataBuffer],w.physicalType,p.rows),x=[],O=_a(t,f[w.lengthBuffer],p.rows);for(let D=0;Dx[D]}case"STRUCT":{let k={},x=[];for(let O=0;O<(((C=w.children)==null?void 0:C.length)||0);++O){let D=w.children[O],I=m(D);x.push(X=>{k[D.name]=I(X)})}return L!=null?O=>{if(!L[O])return null;for(let D of x)D(O);return k}:O=>{for(let D of x)D(O);return k}}default:{if(w.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for argument of type: "+w.physicalType);let k=Ao(t,f[w.dataBuffer],w.physicalType,p.rows);return L!=null?x=>L[x]?k[x]:null:x=>k[x]}}},g=[];for(let w=0;w>3)+0]=0,t.HEAPF64[(r>>3)+1]=F,t.HEAPF64[(r>>3)+2]=0}catch(_){Lo(t,r,_.toString())}}function gd(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}var hd=gd();function ct(e,t){console.error("FAIL WITH: ".concat(t)),e.ccall("duckdb_web_fail_with",null,["string"],[t])}function Kr(e,t,r){let n=e.HEAPU8.subarray(t,t+r),a=new Uint8Array(new ArrayBuffer(n.byteLength));return a.set(n),a}function te(e,t,r){return hd(e.HEAPU8.subarray(t,t+r))}function fe(e,t,r,n){let a=e.stackSave(),l=e.stackAlloc(3*8);r.unshift("number"),n.unshift(l),e.ccall(t,null,r,n);let c=e.HEAPF64[(l>>3)+0],u=e.HEAPF64[(l>>3)+1],_=e.HEAPF64[(l>>3)+2];return e.stackRestore(a),[c,u,_]}function ye(e){e.ccall("duckdb_web_clear_response",null,[],[])}var da=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),r=new Uint8Array(new ArrayBuffer(e.byteLength));r.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=r}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}},kc=new TextEncoder,fa=class{constructor(e,t){this._instance=null,this._initPromise=null,this._initPromiseResolver=()=>{},this.onInstantiationProgress=[],this._logger=e,this._runtime=t,this._nextUDFId=1}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(e=t=>{}){return this._instance!=null?this:(this._initPromise!=null&&(this.onInstantiationProgress.push(e),await this._initPromise),this._initPromise=new Promise(t=>{this._initPromiseResolver=t}),this.onInstantiationProgress=[e],this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this.onInstantiationProgress=this.onInstantiationProgress.filter(t=>t!=e),globalThis.DUCKDB_BINDINGS=this,this)}open(e){let[t,r,n]=fe(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==0)throw new Error(te(this.mod,r,n));ye(this.mod)}reset(){let[e,t,r]=fe(this.mod,"duckdb_web_reset",[],[]);if(e!==0)throw new Error(te(this.mod,t,r));ye(this.mod)}getVersion(){let[e,t,r]=fe(this.mod,"duckdb_web_get_version",[],[]);if(e!==0)throw new Error(te(this.mod,t,r));let n=te(this.mod,t,r);return ye(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,r,n]=fe(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));let a=te(this.mod,r,n);return ye(this.mod),JSON.parse(a)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new ca(this,e)}disconnect(e){if(this.mod.ccall("duckdb_web_disconnect",null,["number"],[e]),this.pthread)for(let t of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])t.postMessage({cmd:"dropUDFFunctions",connectionId:e})}runQuery(e,t){let r=kc.encode(t),n=this.mod._malloc(r.length);this.mod.HEAPU8.subarray(n,n+r.length).set(r);let[a,l,c]=fe(this.mod,"duckdb_web_query_run_buffer",["number","number","number"],[e,n,r.length]);if(a!==0)throw new Error(te(this.mod,l,c));let u=Kr(this.mod,l,c);return ye(this.mod),this.mod._free(n),u}startPendingQuery(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_pending_query_start",["number","string"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));if(n==0)return null;let l=Kr(this.mod,n,a);return ye(this.mod),l}pollPendingQuery(e){let[t,r,n]=fe(this.mod,"duckdb_web_pending_query_poll",["number"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));if(r==0)return null;let a=Kr(this.mod,r,n);return ye(this.mod),a}cancelPendingQuery(e){return this.mod.ccall("duckdb_web_pending_query_cancel","boolean",["number"],[e])}fetchQueryResults(e){let[t,r,n]=fe(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));let a=Kr(this.mod,r,n);return ye(this.mod),a}getTableNames(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_get_tablenames",["number","string"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));let l=te(this.mod,n,a);return ye(this.mod),JSON.parse(l)}createScalarFunction(e,t,r,n){let a={functionId:this._nextUDFId,name:t,returnType:Fn(r)},l={functionId:a.functionId,connectionId:e,name:t,returnType:r,func:n};this._nextUDFId+=1;let[c,u,_]=fe(this.mod,"duckdb_web_udf_scalar_create",["number","string"],[e,JSON.stringify(a)]);if(c!==0)throw new Error(te(this.mod,u,_));if(ye(this.mod),globalThis.DUCKDB_RUNTIME._udfFunctions=(globalThis.DUCKDB_RUNTIME._udfFunctions||new Map).set(l.functionId,l),this.pthread)for(let d of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])d.postMessage({cmd:"registerUDFFunction",udf:l})}createPrepared(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));return ye(this.mod),n}closePrepared(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));ye(this.mod)}runPrepared(e,t,r){let[n,a,l]=fe(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(te(this.mod,a,l));let c=Kr(this.mod,a,l);return ye(this.mod),c}sendPrepared(e,t,r){let[n,a,l]=fe(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(te(this.mod,a,l));let c=Kr(this.mod,a,l);return ye(this.mod),c}insertArrowFromIPCStream(e,t,r){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let a=r?JSON.stringify(r):"",[l,c,u]=fe(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,a]);if(l!==0)throw new Error(te(this.mod,c,u))}insertCSVFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let _ in r.columns)r.columnsFlat.push(oa(_,r.columns[_]))}let n={...r};n.columns=n.columnsFlat,delete n.columnsFlat;let a=JSON.stringify(n),[l,c,u]=fe(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,a]);if(l!==0)throw new Error(te(this.mod,c,u))}insertJSONFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let _ in r.columns)r.columnsFlat.push(oa(_,r.columns[_]))}let n={...r};n.columns=n.columnsFlat,delete n.columnsFlat;let a=JSON.stringify(n),[l,c,u]=fe(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,a]);if(l!==0)throw new Error(te(this.mod,c,u))}globFiles(e){let[t,r,n]=fe(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));let a=te(this.mod,r,n);ye(this.mod);let l=JSON.parse(a);return l??[]}registerFileURL(e,t,r,n=!1){t===void 0&&(t=e);let[a,l,c]=fe(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t,r,n]);if(a!==0)throw new Error(te(this.mod,l,c));ye(this.mod)}registerFileText(e,t){let r=kc.encode(t);this.registerFileBuffer(e,r)}registerFileBuffer(e,t){let r=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(r,r+t.length).set(t);let[n,a,l]=fe(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,r,t.length]);if(n!==0)throw new Error(te(this.mod,a,l));ye(this.mod)}registerFileHandle(e,t,r,n){let[a,l,c]=fe(this.mod,"duckdb_web_fs_register_file_url",["string","string","number","boolean"],[e,e,r,n]);if(a!==0)throw new Error(te(this.mod,l,c));if(ye(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let u of this.pthread.runningWorkers)u.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let u of this.pthread.unusedWorkers)u.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){let[t,r,n]=fe(this.mod,"duckdb_web_fs_drop_file",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));ye(this.mod)}dropFiles(){let[e,t,r]=fe(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==0)throw new Error(te(this.mod,t,r));ye(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));ye(this.mod)}copyFileToBuffer(e){let[t,r,n]=fe(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));let a=this.mod.HEAPU8.subarray(r,r+n),l=new Uint8Array(a.length);return l.set(a),ye(this.mod),l}collectFileStatistics(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a))}exportFileStatistics(e){let[t,r,n]=fe(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));return new da(this.mod.HEAPU8.subarray(r,r+n))}},pa=class extends fa{constructor(e,t,r,n){super(e,t),this.mainModuleURL=r,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error("WASM instantiation requested unexpected file: prefix=".concat(t," path=").concat(e))}instantiateWasm(e,t){globalThis.DUCKDB_RUNTIME=this._runtime;let r=this.onInstantiationProgress;if(WebAssembly.instantiateStreaming)if(typeof TransformStream=="function"){let n=(async()=>{var a;let l=new Request(this.mainModuleURL),c=await fetch(l),u=c.headers.get("content-length"),_=u&&parseInt(u,10)||0,d=new Date,p={startedAt:d,updatedAt:d,bytesTotal:_||0,bytesLoaded:0},f={transform(g,h){p.bytesLoaded+=g.byteLength;let y=new Date;if(y.getTime()-p.updatedAt.getTime()<20){p.updatedAt=y,h.enqueue(g);return}for(let b of r)b(p);h.enqueue(g)}},m=new TransformStream(f);return new Response((a=c.body)==null?void 0:a.pipeThrough(m),c)})();WebAssembly.instantiateStreaming(n,e).then(a=>{t(a.instance,a.module)})}else{console.warn("instantiating without progress handler since transform streams are unavailable");let n=new Request(this.mainModuleURL);WebAssembly.instantiateStreaming(fetch(n),e).then(a=>{t(a.instance,a.module)})}else if(typeof XMLHttpRequest=="function"){let n=new XMLHttpRequest,a=this.mainModuleURL,l=new Date,c={startedAt:l,updatedAt:l,bytesTotal:0,bytesLoaded:0};n.open("GET",a),n.responseType="arraybuffer",n.onerror=u=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to load WASM: "+u}),new Error(u.toString())},n.onprogress=u=>{c.bytesTotal=u.total,c.bytesLoaded=u.loaded;let _=new Date;if(_.getTime()-c.updatedAt.getTime()<20){c.updatedAt=_;return}for(let d of r)d(c)},n.onload=()=>{WebAssembly.instantiate(n.response,e).then(u=>{t(u.instance,u.module)}).catch(u=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to instantiate WASM: "+u}),new Error(u)})},n.send()}else console.warn("instantiating with manual fetch since streaming instantiation and xhrs are unavailable"),(async()=>{let n=new Request(this.mainModuleURL),a=await(await fetch(n)).arrayBuffer();WebAssembly.instantiate(a,e).then(l=>{t(l.instance,l.module)})})();return[]}},ma=class extends pa{constructor(e,t,r,n=null){super(e,t,r,n)}instantiateImpl(e){return(0,Bc.default)({...e,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}},Pr=Mo(Oc()),Rc=function(e,t,r){var n;if((n=e==null?void 0:e.endpoint)!=null&&n.startsWith("http")){let a="".concat(e==null?void 0:e.endpoint),l=a.indexOf("://")+3;return a.substring(l)}else return e!=null&&e.endpoint?"".concat(r,".").concat(e==null?void 0:e.endpoint):"".concat(r,".s3.amazonaws.com")};function vd(e,t,r){var n,a,l,c;let u=Hc(t),_=u.path;return Nc(e)&&(_="/".concat(u.bucket).concat(_)),{url:_,query:"",host:Rc(e,t,u.bucket),region:(n=e==null?void 0:e.region)!=null?n:"",service:"s3",method:r,accessKeyId:(a=e==null?void 0:e.accessKeyId)!=null?a:"",secretAccessKey:(l=e==null?void 0:e.secretAccessKey)!=null?l:"",sessionToken:(c=e==null?void 0:e.sessionToken)!=null?c:"",dateNow:new Date().toISOString().replace(/-/g,"").split("T")[0],datetimeNow:new Date().toISOString().replace(/-/g,"").replace(/:/g,"").split(".")[0]+"Z"}}function bd(e,t=!1){let r="0123456789ABCDEF",n="";for(let a=0;a="A"&&l<="Z"||l>="a"&&l<="z"||l>="0"&&l<="9"||l=="_"||l=="-"||l=="~"||l=="."?n+=l:l=="/"?t?n+="%2F":n+=l:(n+="%",n+=r[l.charCodeAt(0)>>4],n+=r[l.charCodeAt(0)&15])}return n}function yd(e,t=null){var r;let n=(r=t==null?void 0:t.contentHash)!=null?r:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",a=new Map;a.set("x-amz-date",e.datetimeNow),a.set("x-amz-content-sha256",n),e.sessionToken&&a.set("x-amz-security-token",e.sessionToken);let l="";t!=null&&t.contentType&&(l+="content-type;"),l+="host;x-amz-content-sha256;x-amz-date",e.sessionToken&&(l+=";x-amz-security-token");let c=e.method+` +`+bd(e.url)+` +`+e.query;t!=null&&t.contentType&&(c+=` +content-type:`+(t==null?void 0:t.contentType)),c+=` +host:`+e.host+` +x-amz-content-sha256:`+n+` +x-amz-date:`+e.datetimeNow,e.sessionToken&&e.sessionToken.length>0&&(c+=` +x-amz-security-token:`+e.sessionToken),c+=` + +`+l+` +`+n;let u=(0,Pr.sha256)(c),_=`AWS4-HMAC-SHA256 +`+e.datetimeNow+` +`+e.dateNow+"/"+e.region+"/"+e.service+`/aws4_request +`+u,d="AWS4"+e.secretAccessKey,p=Pr.sha256.hmac.arrayBuffer(d,e.dateNow),f=Pr.sha256.hmac.arrayBuffer(p,e.region),m=Pr.sha256.hmac.arrayBuffer(f,e.service),g=Pr.sha256.hmac.arrayBuffer(m,"aws4_request"),h=Pr.sha256.hmac(g,_);return a.set("Authorization","AWS4-HMAC-SHA256 Credential="+e.accessKeyId+"/"+e.dateNow+"/"+e.region+"/"+e.service+"/aws4_request, SignedHeaders="+l+", Signature="+h),a}var Sd=function(e,t,r,n=null,a=null){let l=vd(e,t,r),c={contentType:n,contentHash:a?Pr.sha256.hex(a):null};return yd(l,c)};function Ft(e,t,r,n,a=null,l=null){(t!=null&&t.accessKeyId||t!=null&&t.sessionToken)&&(Sd(t,r,n,a,l).forEach((c,u)=>{e.setRequestHeader(u,c)}),a&&e.setRequestHeader("content-type",a))}function Hc(e){if(e.indexOf("s3://")!=0)throw new Error("URL needs to start with s3://");let t=e.indexOf("/",5);if(t==-1)throw new Error("URL needs to contain a '/' after the host");let r=e.substring(5,t);if(!r)throw new Error("URL needs to contain a bucket name");let n=e.substring(t);if(!n)throw new Error("URL needs to contain key");return{bucket:r,path:n}}function Nc(e){var t;return!!((t=e==null?void 0:e.endpoint)!=null&&t.startsWith("http"))}function xt(e,t){let r=Hc(t);return Nc(e)?"".concat(e==null?void 0:e.endpoint,"/").concat(r.bucket)+r.path:"https://"+Rc(e,t,r.bucket)+r.path}var le={_files:new Map,_fileInfoCache:new Map,_udfFunctions:new Map,_globalFileInfo:null,getFileInfo(e,t){try{let r=le._fileInfoCache.get(t),[n,a,l]=fe(e,"duckdb_web_fs_get_file_info_by_id",["number","number"],[t,(r==null?void 0:r.cacheEpoch)||0]);if(n!==0)return null;if(l===0)return r;let c=te(e,a,l);ye(e);try{let u=JSON.parse(c);if(u==null)return null;let _={...u,blob:null};return le._fileInfoCache.set(t,_),_}catch(u){return console.warn(u),null}}catch(r){return console.log(r),null}},getGlobalFileInfo(e){var t;try{let[r,n,a]=fe(e,"duckdb_web_get_global_file_info",["number"],[((t=le._globalFileInfo)==null?void 0:t.cacheEpoch)||0]);if(r!==0)return null;if(a===0)return le._globalFileInfo;let l=te(e,n,a);ye(e);let c=JSON.parse(l);return c==null?null:(le._globalFileInfo={...c,blob:null},le._globalFileInfo)}catch(r){return console.log(r),null}},testPlatformFeature:(e,t)=>{switch(t){case 1:return typeof BigInt64Array<"u";default:return console.warn("test for unknown feature: ".concat(t)),!1}},getDefaultDataProtocol(e){return 2},openFile:(e,t,r)=>{var n,a;try{le._fileInfoCache.delete(t);let l=le.getFileInfo(e,t);switch(l==null?void 0:l.dataProtocol){case 4:case 5:{if(r&1&&r&2)throw new Error("Opening file ".concat(l.fileName," failed: cannot open file with both read and write flags set"));if(r&32)throw new Error("Opening file ".concat(l.fileName," failed: appending to HTTP/S3 files is not supported"));if(r&2){let _=new XMLHttpRequest;if(l.dataProtocol==5?(_.open("HEAD",xt(l.s3Config,l.dataUrl),!1),Ft(_,l.s3Config,l.dataUrl,"HEAD")):_.open("HEAD",l.dataUrl,!1),_.send(null),_.status!=200&&_.status!=404)throw new Error("Opening file ".concat(l.fileName," failed: Unexpected return status from server (").concat(_.status,")"));if(_.status==404&&!(r&8||r&16))throw new Error("Opening file ".concat(l.fileName," failed: Cannot write to non-existent file without FILE_FLAGS_FILE_CREATE or FILE_FLAGS_FILE_CREATE_NEW flag."));let d=e._malloc(1),p=new Uint8Array;e.HEAPU8.set(p,d);let f=e._malloc(2*8);return e.HEAPF64[(f>>3)+0]=1,e.HEAPF64[(f>>3)+1]=d,f}else if(!(r&1))throw new Error("Opening file ".concat(l.fileName," failed: unsupported file flags: ").concat(r));let c=null,u=null;if(l.reliableHeadRequests||!l.allowFullHttpReads)try{let _=new XMLHttpRequest;if(l.dataProtocol==5?(_.open("HEAD",xt(l.s3Config,l.dataUrl),!1),Ft(_,l.s3Config,l.dataUrl,"HEAD")):_.open("HEAD",l.dataUrl,!1),_.setRequestHeader("Range","bytes=0-"),_.send(null),c=_.getResponseHeader("Content-Length"),c!==null&&_.status==206){let d=e._malloc(16);return e.HEAPF64[(d>>3)+0]=+c,e.HEAPF64[(d>>3)+1]=0,d}}catch(_){u=_,console.warn("HEAD request with range header failed: ".concat(_))}if(l.allowFullHttpReads){{let d=new XMLHttpRequest;l.dataProtocol==5?(d.open("GET",xt(l.s3Config,l.dataUrl),!1),Ft(d,l.s3Config,l.dataUrl,"GET")):d.open("GET",l.dataUrl,!1),d.responseType="arraybuffer",d.setRequestHeader("Range","bytes=0-0"),d.send(null);let p=(n=d.getResponseHeader("Content-Range"))==null?void 0:n.split("/")[1],f=d.getResponseHeader("Content-Length"),m=null;if(p!==void 0)m=p;else if(!l.reliableHeadRequests){let g=new XMLHttpRequest;l.dataProtocol==5?(g.open("HEAD",xt(l.s3Config,l.dataUrl),!1),Ft(g,l.s3Config,l.dataUrl,"HEAD")):g.open("HEAD",l.dataUrl,!1),g.setRequestHeader("Range","bytes=0-"),g.send(null),c=g.getResponseHeader("Content-Length"),c!==null&&+c>1&&(m=c)}if(d.status==206&&f!==null&&+f==1&&m!==null){let g=e._malloc(16);return e.HEAPF64[(g>>3)+0]=+m,e.HEAPF64[(g>>3)+1]=0,g}if(d.status==200&&f!==null&&c!==null&&+f==+c){console.warn("fall back to full HTTP read for: ".concat(l.dataUrl));let g=e._malloc(d.response.byteLength),h=new Uint8Array(d.response,0,d.response.byteLength);e.HEAPU8.set(h,g);let y=e._malloc(2*8);return e.HEAPF64[(y>>3)+0]=d.response.byteLength,e.HEAPF64[(y>>3)+1]=g,y}}console.warn("falling back to full HTTP read for: ".concat(l.dataUrl));let _=new XMLHttpRequest;if(l.dataProtocol==5?(_.open("GET",xt(l.s3Config,l.dataUrl),!1),Ft(_,l.s3Config,l.dataUrl,"GET")):_.open("GET",l.dataUrl,!1),_.responseType="arraybuffer",_.send(null),_.status==200){let d=e._malloc(_.response.byteLength),p=new Uint8Array(_.response,0,_.response.byteLength);e.HEAPU8.set(p,d);let f=e._malloc(2*8);return e.HEAPF64[(f>>3)+0]=_.response.byteLength,e.HEAPF64[(f>>3)+1]=d,f}}if(u!=null)throw new Error("Reading file ".concat(l.fileName," failed with error: ").concat(u));return 0}case 2:{let c=(a=le._files)==null?void 0:a.get(l.fileName);if(c){let d=e._malloc(16);return e.HEAPF64[(d>>3)+0]=c.size,e.HEAPF64[(d>>3)+1]=0,d}console.warn("Buffering missing file: ".concat(l.fileName));let u=e._malloc(2*8),_=e._malloc(1);return e.HEAPF64[(u>>3)+0]=1,e.HEAPF64[(u>>3)+1]=_,u}}}catch(l){console.error(l.toString()),ct(e,l.toString())}return 0},glob:(e,t,r)=>{var n;try{let a=te(e,t,r);if(a.startsWith("http")||a.startsWith("s3://")){let l=new XMLHttpRequest;if(a.startsWith("s3://")){let c=le.getGlobalFileInfo(e);l.open("HEAD",xt(c==null?void 0:c.s3Config,a),!1),Ft(l,c==null?void 0:c.s3Config,a,"HEAD")}else l.open("HEAD",a,!1);if(l.send(null),l.status!=200&&l.status!==206){if(!((n=le.getGlobalFileInfo(e))!=null&&n.allowFullHttpReads))return ct(e,"HEAD request failed: ".concat(a,", with full http reads are disabled")),0;let c=new XMLHttpRequest;if(a.startsWith("s3://")){let _=le.getGlobalFileInfo(e);c.open("GET",xt(_==null?void 0:_.s3Config,a),!1),Ft(c,_==null?void 0:_.s3Config,a,"HEAD")}else c.open("GET",a,!1);if(c.setRequestHeader("Range","bytes=0-0"),c.send(null),c.status!=200&&c.status!==206)return ct(e,"HEAD and GET requests failed: ".concat(a)),0;let u=c.getResponseHeader("Content-Length");u&&+u>1&&console.warn("Range request for ".concat(a," did not return a partial response: ").concat(c.status,' "').concat(c.statusText,'"'))}e.ccall("duckdb_web_fs_glob_add_path",null,["string"],[a])}}catch(a){return console.log(a),ct(e,a.toString()),0}},checkFile:(e,t,r)=>{try{let n=te(e,t,r);if(n.startsWith("http")||n.startsWith("s3://")){let a=new XMLHttpRequest;if(n.startsWith("s3://")){let l=le.getGlobalFileInfo(e);a.open("HEAD",xt(l==null?void 0:l.s3Config,n),!1),Ft(a,l==null?void 0:l.s3Config,n,"HEAD")}else a.open("HEAD",n,!1);return a.send(null),a.status==206||a.status==200}}catch(n){return console.log(n),!1}return!1},syncFile:(e,t)=>{},closeFile:(e,t)=>{var r;let n=le.getFileInfo(e,t);switch(le._fileInfoCache.delete(t),n==null?void 0:n.dataProtocol){case 0:case 4:case 5:break;case 1:case 2:return;case 3:{let a=(r=le._files)==null?void 0:r.get(n.fileName);if(!a)throw new Error("No OPFS access handle registered with name: ".concat(n.fileName));return a.flush()}}},truncateFile:(e,t,r)=>{var n;let a=le.getFileInfo(e,t);switch(a==null?void 0:a.dataProtocol){case 4:ct(e,"Cannot truncate a http file");return;case 5:ct(e,"Cannot truncate an s3 file");return;case 0:case 1:case 2:ct(e,"truncateFile not implemented");return;case 3:{let l=(n=le._files)==null?void 0:n.get(a.fileName);if(!l)throw new Error("No OPFS access handle registered with name: ".concat(a.fileName));return l.truncate(r)}}return 0},readFile(e,t,r,n,a){var l,c;if(n==0)return 0;try{let u=le.getFileInfo(e,t);switch(u==null?void 0:u.dataProtocol){case 4:case 5:{if(!u.dataUrl)throw new Error("Missing data URL for file ".concat(t));try{let _=new XMLHttpRequest;if(u.dataProtocol==5?(_.open("GET",xt(u==null?void 0:u.s3Config,u.dataUrl),!1),Ft(_,u==null?void 0:u.s3Config,u.dataUrl,"GET")):_.open("GET",u.dataUrl,!1),_.responseType="arraybuffer",_.setRequestHeader("Range","bytes=".concat(a,"-").concat(a+n-1)),_.send(null),_.status==206||_.status==200&&n==_.response.byteLength&&a==0){let d=new Uint8Array(_.response,0,Math.min(_.response.byteLength,n));return e.HEAPU8.set(d,r),d.byteLength}else if(_.status==200){console.warn("Range request for ".concat(u.dataUrl," did not return a partial response: ").concat(_.status,' "').concat(_.statusText,'"'));let d=new Uint8Array(_.response,a,Math.min(_.response.byteLength-a,n));return e.HEAPU8.set(d,r),d.byteLength}else throw new Error("Range request for ".concat(u.dataUrl," did returned non-success status: ").concat(_.status,' "').concat(_.statusText,'"'))}catch(_){throw console.log(_),new Error("Range request for ".concat(u.dataUrl," failed with error: ").concat(_,'"'))}}case 2:{let _=(l=le._files)==null?void 0:l.get(u.fileName);if(!_)throw new Error("No HTML5 file registered with name: ".concat(u.fileName));let d=_.slice(a,a+n),p=new Uint8Array(new FileReaderSync().readAsArrayBuffer(d));return e.HEAPU8.set(p,r),p.byteLength}case 3:{let _=(c=le._files)==null?void 0:c.get(u.fileName);if(!_)throw new Error("No OPFS access handle registered with name: ".concat(u.fileName));let d=e.HEAPU8.subarray(r,r+n);return _.read(d,{at:a})}}return 0}catch(u){return console.log(u),ct(e,u.toString()),0}},writeFile:(e,t,r,n,a)=>{var l;let c=le.getFileInfo(e,t);switch(c==null?void 0:c.dataProtocol){case 4:return ct(e,"Cannot write to HTTP file"),0;case 5:{let u=e.HEAPU8.subarray(r,r+n),_=new XMLHttpRequest;return _.open("PUT",xt(c==null?void 0:c.s3Config,c.dataUrl),!1),Ft(_,c==null?void 0:c.s3Config,c.dataUrl,"PUT","",u),_.send(u),_.status!==200?(ct(e,"Failed writing file: HTTP "+_.status),0):n}case 2:return ct(e,"cannot write using the html5 file reader api"),0;case 3:{let u=(l=le._files)==null?void 0:l.get(c.fileName);if(!u)throw new Error("No OPFS access handle registered with name: ".concat(c.fileName));let _=e.HEAPU8.subarray(r,r+n);return u.write(_,{at:a})}}return 0},getLastFileModificationTime:(e,t)=>{var r;let n=le.getFileInfo(e,t);switch(n==null?void 0:n.dataProtocol){case 2:{if(!((r=le._files)!=null&&r.get(n.fileName)))throw Error("No handle available for file: ".concat(n.fileName));return 0}case 4:case 5:return new Date().getTime()}return 0},checkDirectory:(e,t,r)=>{let n=te(e,t,r);return console.log("checkDirectory: ".concat(n)),!1},createDirectory:(e,t,r)=>{let n=te(e,t,r);console.log("createDirectory: ".concat(n))},removeDirectory:(e,t,r)=>{let n=te(e,t,r);console.log("removeDirectory: ".concat(n))},listDirectoryEntries:(e,t,r)=>{let n=te(e,t,r);return console.log("listDirectoryEntries: ".concat(n)),!1},moveFile:(e,t,r,n,a)=>{var l,c;let u=te(e,t,r),_=te(e,n,a),d=(l=le._files)==null?void 0:l.get(u);d!==void 0&&(le._files.delete(d),le._files.set(_,d));for(let[p,f]of((c=le._fileInfoCache)==null?void 0:c.entries())||[])if(f.dataUrl==u){le._fileInfoCache.delete(p);break}return!0},removeFile:(e,t,r)=>{},callScalarUDF:(e,t,r,n,a,l,c)=>{Mc(le,e,t,r,n,a,l,c)}},Fo=class extends la{postMessage(e,t){globalThis.postMessage(e,t)}async instantiate(e,t,r){return await new ma(this,le,e,t).instantiate(r)}};function Wc(){let e=new Fo;globalThis.onmessage=async t=>{await e.onMessage(t.data)}}return Wc(),Xc(Ed)})()})(); diff --git a/_app/immutable/workers/duckdb-browser-mvp.worker-C3M52Bw4.js b/_app/immutable/workers/duckdb-browser-mvp.worker-C3M52Bw4.js new file mode 100644 index 0000000000000000000000000000000000000000..1736d9093dba3b2786655d46f9065aeb599015b2 --- /dev/null +++ b/_app/immutable/workers/duckdb-browser-mvp.worker-C3M52Bw4.js @@ -0,0 +1,53 @@ +(function(){"use strict";var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(()=>{var Wl=Object.create,Tn=Object.defineProperty,Vl=Object.getOwnPropertyDescriptor,zl=Object.getOwnPropertyNames,$l=Object.getPrototypeOf,ql=Object.prototype.hasOwnProperty,ga=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),ki=(e=>typeof commonjsRequire<"u"?commonjsRequire:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof commonjsRequire<"u"?commonjsRequire:t)[r]}):e)(function(e){if(typeof commonjsRequire<"u")return commonjsRequire.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),fr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pr=(e,t)=>{for(var r in t)Tn(e,r,{get:t[r],enumerable:!0})},Mo=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of zl(t))!ql.call(e,a)&&a!==r&&Tn(e,a,{get:()=>t[a],enumerable:!(n=Vl(t,a))||n.enumerable});return e},Po=(e,t,r)=>(r=e!=null?Wl($l(e)):{},Mo(!e||!e.__esModule?Tn(r,"default",{value:e,enumerable:!0}):r,e)),Xl=e=>Mo(Tn({},"__esModule",{value:!0}),e),Ql=function(e,t){this[0]=e,this[1]=t},Mr=e=>{var t=e[ga("asyncIterator")],r=!1,n,a={};return t==null?(t=e[ga("iterator")](),n=o=>a[o]=l=>t[o](l)):(t=t.call(e),n=o=>a[o]=l=>{if(r){if(r=!1,o==="throw")throw l;return l}return r=!0,{done:!1,value:new Ql(new Promise(u=>{var _=t[o](l);if(!(_ instanceof Object))throw TypeError("Object expected");u(_)}),1)}}),a[ga("iterator")]=()=>a,n("next"),"throw"in t?n("throw"):a.throw=o=>{throw o},"return"in t&&n("return"),a},bo=fr(()=>{}),So=fr(()=>{}),kl=fr(()=>{}),wo=fr((e,t)=>{t.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}),Fl=fr((exports,module)=>{var DuckDB=(()=>{var c,_scriptName=typeof document<"u"?(c=document.currentScript)==null?void 0:c.src:void 0;return typeof __filename<"u"&&(_scriptName=_scriptName||__filename),function(moduleArg={}){var moduleRtn,Module=moduleArg,readyPromiseResolve,readyPromiseReject,readyPromise=new Promise((e,t)=>{readyPromiseResolve=e,readyPromiseReject=t}),ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer",moduleOverrides=Object.assign({},Module),arguments_=[],thisProgram="./this.program",quit_=(e,t)=>{throw t},scriptDirectory="";function locateFile(e){return Module.locateFile?Module.locateFile(e,scriptDirectory):scriptDirectory+e}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=bo(),nodePath=So();scriptDirectory=__dirname+"/",readBinary=e=>{e=isFileURI(e)?new URL(e):nodePath.normalize(e);var t=fs.readFileSync(e);return t},readAsync=(e,t=!0)=>(e=isFileURI(e)?new URL(e):nodePath.normalize(e),new Promise((r,n)=>{fs.readFile(e,t?void 0:"utf8",(a,o)=>{a?n(a):r(t?o.buffer:o)})})),!Module.thisProgram&&process.argv.length>1&&(thisProgram=process.argv[1].replace(/\\/g,"/")),arguments_=process.argv.slice(2),quit_=(e,t)=>{throw process.exitCode=e,t}}else(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:typeof document<"u"&&document.currentScript&&(scriptDirectory=document.currentScript.src),_scriptName&&(scriptDirectory=_scriptName),scriptDirectory.startsWith("blob:")?scriptDirectory="":scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1),ENVIRONMENT_IS_WORKER&&(readBinary=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),readAsync=e=>fetch(e,{credentials:"same-origin"}).then(t=>t.ok?t.arrayBuffer():Promise.reject(new Error(t.status+" : "+t.url))));var out=Module.print||console.log.bind(console),err=Module.printErr||console.error.bind(console);Object.assign(Module,moduleOverrides),moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram);var dynamicLibraries=Module.dynamicLibraries||[],wasmBinary=Module.wasmBinary,wasmMemory,ABORT=!1,EXITSTATUS;function assert(e,t){e||abort(t)}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var e=wasmMemory.buffer;Module.HEAP8=HEAP8=new Int8Array(e),Module.HEAP16=HEAP16=new Int16Array(e),Module.HEAPU8=HEAPU8=new Uint8Array(e),Module.HEAPU16=HEAPU16=new Uint16Array(e),Module.HEAP32=HEAP32=new Int32Array(e),Module.HEAPU32=HEAPU32=new Uint32Array(e),Module.HEAPF32=HEAPF32=new Float32Array(e),Module.HEAPF64=HEAPF64=new Float64Array(e)}if(Module.wasmMemory)wasmMemory=Module.wasmMemory;else{var INITIAL_MEMORY=Module.INITIAL_MEMORY||16777216;wasmMemory=new WebAssembly.Memory({initial:INITIAL_MEMORY/65536,maximum:65536})}updateMemoryViews();var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],__RELOC_FUNCS__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,callRuntimeCallbacks(__RELOC_FUNCS__),!Module.noFSInit&&!FS.initialized&&FS.init(),FS.ignorePermissions=!1,SOCKFS.root=FS.mount(SOCKFS,{},null),PIPEFS.root=FS.mount(PIPEFS,{},null),callRuntimeCallbacks(__ATINIT__)}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(e){__ATPRERUN__.unshift(e)}function addOnInit(e){__ATINIT__.unshift(e)}function addOnPostRun(e){__ATPOSTRUN__.unshift(e)}var runDependencies=0,dependenciesFulfilled=null;function addRunDependency(e){var t;runDependencies++,(t=Module.monitorRunDependencies)==null||t.call(Module,runDependencies)}function removeRunDependency(e){var t;if(runDependencies--,(t=Module.monitorRunDependencies)==null||t.call(Module,runDependencies),runDependencies==0&&dependenciesFulfilled){var r=dependenciesFulfilled;dependenciesFulfilled=null,r()}}function abort(e){var t;(t=Module.onAbort)==null||t.call(Module,e),e="Aborted("+e+")",err(e),ABORT=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw readyPromiseReject(r),r}var dataURIPrefix="data:application/octet-stream;base64,",isDataURI=e=>e.startsWith(dataURIPrefix),isFileURI=e=>e.startsWith("file://");function findWasmBinary(){var e="./duckdb-mvp.wasm";return isDataURI(e)?e:locateFile(e)}var wasmBinaryFile;function getBinarySync(e){if(e==wasmBinaryFile&&wasmBinary)return new Uint8Array(wasmBinary);if(readBinary)return readBinary(e);throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(e){return wasmBinary?Promise.resolve().then(()=>getBinarySync(e)):readAsync(e).then(t=>new Uint8Array(t),()=>getBinarySync(e))}function instantiateArrayBuffer(e,t,r){return getBinaryPromise(e).then(n=>WebAssembly.instantiate(n,t)).then(r,n=>{err("failed to asynchronously prepare wasm: ".concat(n)),abort(n)})}function instantiateAsync(e,t,r,n){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(t)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(l){return err("wasm streaming compile failed: ".concat(l)),err("falling back to ArrayBuffer instantiation"),instantiateArrayBuffer(t,r,n)})}):instantiateArrayBuffer(t,r,n)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports,"GOT.mem":new Proxy(wasmImports,GOTHandler),"GOT.func":new Proxy(wasmImports,GOTHandler)}}function createWasm(){var e=getWasmImports();function t(n,a){wasmExports=n.exports,wasmExports=relocateExports(wasmExports,1024);var o=getDylinkMetadata(a);return o.neededDynlibs&&(dynamicLibraries=o.neededDynlibs.concat(dynamicLibraries)),mergeLibSymbols(wasmExports),LDSO.init(),loadDylibs(),wasmExports=applySignatureConversions(wasmExports),addOnInit(wasmExports.__wasm_call_ctors),__RELOC_FUNCS__.push(wasmExports.__wasm_apply_data_relocs),removeRunDependency(),wasmExports}addRunDependency();function r(n){t(n.instance,n.module)}if(Module.instantiateWasm)try{return Module.instantiateWasm(e,t)}catch(n){err("Module.instantiateWasm callback failed with error: ".concat(n)),readyPromiseReject(n)}return wasmBinaryFile!=null||(wasmBinaryFile=findWasmBinary()),instantiateAsync(wasmBinary,wasmBinaryFile,e,r).catch(readyPromiseReject),{}}var tempDouble,tempI64,ASM_CONSTS={2179464:(e,t)=>{var r=typeof runtime=="object"&&runtime&&typeof runtime.whereToLoad=="function"&&runtime.whereToLoad?runtime.whereToLoad(UTF8ToString(e)):UTF8ToString(t),n=lengthBytesUTF8(r)+1,a=_malloc(n);return stringToUTF8(r,a,n),a},2179830:(e,t)=>{var r=UTF8ToString(e);if(typeof XMLHttpRequest>"u"){let S=kl(),L=So(),T=bo();var n=r.split("/"),a=n.length,o=L.join(S.homedir(),".duckdb/extensions/"+n[a-4]+"/"+n[a-3]+"/"+n[a-2]+"/"),l=L.join(o,n[a-1]);try{if(T.existsSync(o)||T.mkdirSync(o,{recursive:!0}),T.existsSync(l))d=T.readFileSync(l);else{let A=new Int32Array(new SharedArrayBuffer(8));var u=ki("node:worker_threads").Worker,_=new u("const {Worker,isMainThread,parentPort,workerData,} = require('node:worker_threads');var times = 0;var SAB = 23;var Z = 0; async function ZZZ(e) {var x = await fetch(e);var res = await x.arrayBuffer();Atomics.store(SAB, 1, res.byteLength);Atomics.store(SAB, 0, 1);Atomics.notify(SAB, 1);Atomics.notify(SAB, 0);Z = res;};parentPort.on('message', function(event) {if (times == 0) {times++;SAB = event;} else if (times == 1) {times++; ZZZ(event);} else {const a = new Uint8Array(Z);const b = new Uint8Array(event.buffer);var K = Z.byteLength;for (var i = 0; i < K; i++) {b[i] = a[i];}Atomics.notify(event, 0);Atomics.store(SAB, 0, 2);Atomics.notify(SAB, 0);}});",{eval:!0}),d;A[0]=0,A[2]=4,_.postMessage(A),_.postMessage(r),Atomics.wait(A,0,0);let M=new Int32Array(new SharedArrayBuffer(A[1]+3-(A[1]+3)%4));_.postMessage(M),Atomics.wait(A,0,1);var p=new Uint8Array(M.buffer,0,A[1]);d=p,_.terminate(),T.writeFileSync(l,d)}}catch(A){return console.log("Error fetching module",A),0}}else{let S=new XMLHttpRequest;if(S.open("GET",r,!1),S.responseType="arraybuffer",S.send(null),S.status!=200)return 0;d=S.response}for(var f=WebAssembly.validate(d),m=d.byteLength,h=_malloc(m+4),g=new Uint8Array(d),b=0;b{if(!e)return AL.alcErr=40964,1},2182519:e=>{if(!AL.currentCtx)return err("alGetProcAddress() called without a valid context"),1;if(!e)return AL.currentCtx.err=40963,1}};function ExitStatus(e){this.name="ExitStatus",this.message="Program terminated with exit(".concat(e,")"),this.status=e}var GOT={},currentModuleWeakSymbols=new Set([]),GOTHandler={get(e,t){var r=GOT[t];return r||(r=GOT[t]=new WebAssembly.Global({value:"i32",mutable:!0})),currentModuleWeakSymbols.has(t)||(r.required=!0),r}},callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(Module)},UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder:void 0,UTF8ArrayToString=(e,t,r)=>{t>>>=0;for(var n=t+r,a=t;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&UTF8Decoder)return UTF8Decoder.decode(e.subarray(t,a));for(var o="";t>10,56320|d&1023)}}return o},getDylinkMetadata=e=>{var t=0,r=0;function n(){return e[t++]}function a(){for(var C=0,F=1;;){var U=e[t++];if(C+=(U&127)*F,F*=128,!(U&128))break}return C}function o(){var C=a();return t+=C,UTF8ArrayToString(e,t-C,C)}function l(C,F){if(C)throw new Error(F)}var u="dylink.0";if(e instanceof WebAssembly.Module){var _=WebAssembly.Module.customSections(e,u);_.length===0&&(u="dylink",_=WebAssembly.Module.customSections(e,u)),l(_.length===0,"need dylink section"),e=new Uint8Array(_[0]),r=e.length}else{var d=new Uint32Array(new Uint8Array(e.subarray(0,24)).buffer),p=d[0]==1836278016;l(!p,"need to see wasm magic number"),l(e[8]!==0,"need the dylink section to be first"),t=9;var f=a();r=t+f,u=o()}var m={neededDynlibs:[],tlsExports:new Set,weakImports:new Set};if(u=="dylink"){m.memorySize=a(),m.memoryAlign=a(),m.tableSize=a(),m.tableAlign=a();for(var h=a(),g=0;g{var n={refcount:1/0,name:e,exports:r,global:!0};return LDSO.loadedLibsByName[e]=n,t!=null&&(LDSO.loadedLibsByHandle[t]=n),n},LDSO={loadedLibsByName:{},loadedLibsByHandle:{},init(){newDSO("__main__",0,wasmImports)}},___heap_base=2320944,alignMemory=(e,t)=>Math.ceil(e/t)*t,getMemory=e=>{if(runtimeInitialized)return _calloc(e,1);var t=___heap_base,r=t+alignMemory(e,16);return ___heap_base=r,GOT.__heap_base.value=r,t},isInternalSym=e=>["__cpp_exception","__c_longjmp","__wasm_apply_data_relocs","__dso_handle","__tls_size","__tls_align","__set_stack_limits","_emscripten_tls_init","__wasm_init_tls","__wasm_call_ctors","__start_em_asm","__stop_em_asm","__start_em_js","__stop_em_js"].includes(e)||e.startsWith("__em_js__"),uleb128Encode=(e,t)=>{e<128?t.push(e):t.push(e%128|128,e>>7)},sigToWasmTypes=e=>{for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:e[0]=="v"?[]:[t[e[0]]]},n=1;n{var r=e.slice(0,1),n=e.slice(1),a={i:127,p:127,j:126,f:125,d:124,e:111};t.push(96),uleb128Encode(n.length,t);for(var o=0;o{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(sigToWasmTypes(t),e);var r=[1];generateFuncType(t,r);var n=[0,97,115,109,1,0,0,0,1];uleb128Encode(r.length,n),n.push(...r),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var a=new WebAssembly.Module(new Uint8Array(n)),o=new WebAssembly.Instance(a,{e:{f:e}}),l=o.exports.f;return l},wasmTable=new WebAssembly.Table({initial:42010,element:"anyfunc"}),getWasmTableEntry=e=>wasmTable.get(e),updateTableMap=(e,t)=>{if(functionsInTableMap)for(var r=e;r(functionsInTableMap||(functionsInTableMap=new WeakMap,updateTableMap(0,wasmTable.length)),functionsInTableMap.get(e)||0),freeTableIndexes=[],getEmptyTableSlot=()=>{if(freeTableIndexes.length)return freeTableIndexes.pop();try{wasmTable.grow(1)}catch(e){throw e instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":e}return wasmTable.length-1},setWasmTableEntry=(e,t)=>wasmTable.set(e,t),addFunction=(e,t)=>{var r=getFunctionAddress(e);if(r)return r;var n=getEmptyTableSlot();try{setWasmTableEntry(n,e)}catch(o){if(!(o instanceof TypeError))throw o;var a=convertJsFunctionToWasm(e,t);setWasmTableEntry(n,a)}return functionsInTableMap.set(e,n),n},updateGOT=(e,t)=>{for(var r in e)if(!isInternalSym(r)){var n=e[r];r.startsWith("orig$")&&(r=r.split("$")[1],t=!0),GOT[r]||(GOT[r]=new WebAssembly.Global({value:"i32",mutable:!0})),(t||GOT[r].value==0)&&(typeof n=="function"?GOT[r].value=addFunction(n):typeof n=="number"?GOT[r].value=n:err("unhandled export type for '".concat(r,"': ").concat(typeof n)))}},relocateExports=(e,t,r)=>{var n={};for(var a in e){var o=e[a];typeof o=="object"&&(o=o.value),typeof o=="number"&&(o+=t),n[a]=o}return updateGOT(n,r),n},isSymbolDefined=e=>{var t=wasmImports[e];return!(!t||t.stub)},setTempRet0=e=>__emscripten_tempret_set(e),_setTempRet0=setTempRet0;Module._setTempRet0=_setTempRet0;var createDyncallWrapper=e=>{var t=[],r=[0,97,115,109,1,0,0,0];t.push(r);var n=[e[0].replace("j","i"),"i",e.slice(1).replace(/j/g,"ii")].join(""),a=[3];generateFuncType(n,a),generateFuncType(e,a),generateFuncType("vi",a);var o=[1];uleb128Encode(a.length,o),o.push(...a),t.push(o);var l=[2,15,2,1,101,1,116,1,112,0,0,1,101,1,114,0,2];t.push(l);var u=[3,2,1,0];t.push(u);var _=[7,5,1,1,102,0,1];t.push(_);var d=[];e[0]==="j"?d=[1,1,126]:d.push(0);function p(T){d.push(32),uleb128Encode(T,d)}for(var f=1,m=1;m{e=e.replace(/p/g,"i"),"dynCall_"+e in Module||(Module["dynCall_"+e]=createDyncallWrapper(e));var n=Module["dynCall_"+e];return n(t,...r)},dynCall=(e,t,r=[])=>{if(e.includes("j"))return dynCallLegacy(e,t,r);var n=getWasmTableEntry(t)(...r);return e[0]=="p"?n>>>0:n},stackSave=()=>_emscripten_stack_get_current(),stackRestore=e=>__emscripten_stack_restore(e),createInvokeFunction=e=>(t,...r)=>{var n=stackSave();try{return dynCall(e,t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}},resolveGlobalSymbol=(e,t=!1)=>{var r;return t&&"orig$"+e in wasmImports&&(e="orig$"+e),isSymbolDefined(e)?r=wasmImports[e]:e.startsWith("invoke_")?r=wasmImports[e]=createInvokeFunction(e.split("_")[1]):e.startsWith("__cxa_find_matching_catch_")&&(r=wasmImports[e]=(...n)=>{var a=findMatchingCatch(n);return a}),{sym:r,name:e}},UTF8ToString=(e,t)=>(e>>>=0,e?UTF8ArrayToString(HEAPU8,e,t):""),loadWebAssemblyModule=(binary,flags,libName,localScope,handle)=>{var metadata=getDylinkMetadata(binary);currentModuleWeakSymbols=metadata.weakImports;function loadModule(){var firstLoad=!handle||!HEAP8[handle+8>>>0];if(firstLoad){var memAlign=Math.pow(2,metadata.memoryAlign),memoryBase=metadata.memorySize?alignMemory(getMemory(metadata.memorySize+memAlign),memAlign):0,tableBase=metadata.tableSize?wasmTable.length:0;handle&&(HEAP8[handle+8>>>0]=1,HEAPU32[handle+12>>>2>>>0]=memoryBase,HEAP32[handle+16>>>2>>>0]=metadata.memorySize,HEAPU32[handle+20>>>2>>>0]=tableBase,HEAP32[handle+24>>>2>>>0]=metadata.tableSize)}else memoryBase=HEAPU32[handle+12>>>2>>>0],tableBase=HEAPU32[handle+20>>>2>>>0];var tableGrowthNeeded=tableBase+metadata.tableSize-wasmTable.length;tableGrowthNeeded>0&&wasmTable.grow(tableGrowthNeeded);var moduleExports;function resolveSymbol(e){var t=resolveGlobalSymbol(e).sym;return!t&&localScope&&(t=localScope[e]),t||(t=moduleExports[e]),t}var proxyHandler={get(e,t){switch(t){case"__memory_base":return memoryBase;case"__table_base":return tableBase}if(t in wasmImports&&!wasmImports[t].stub)return wasmImports[t];if(!(t in e)){var r;e[t]=(...n)=>(r||(r=resolveSymbol(t)),r(...n))}return e[t]}},proxy=new Proxy({},proxyHandler),info={"GOT.mem":new Proxy({},GOTHandler),"GOT.func":new Proxy({},GOTHandler),env:proxy,wasi_snapshot_preview1:proxy};function postInstantiation(module,instance){updateTableMap(tableBase,metadata.tableSize),moduleExports=relocateExports(instance.exports,memoryBase),flags.allowUndefined||reportUndefinedSymbols();function addEmAsm(addr,body){for(var args=[],arity=0;arity<16&&body.indexOf("$"+arity)!=-1;arity++)args.push("$"+arity);args=args.join(",");var func="(".concat(args,") => { ").concat(body," };");ASM_CONSTS[start]=eval(func)}if("__start_em_asm"in moduleExports)for(var start=moduleExports.__start_em_asm,stop=moduleExports.__stop_em_asm;start ").concat(body,";");moduleExports[name]=eval(func)}for(var name in moduleExports)if(name.startsWith("__em_js__")){var start=moduleExports[name],jsString=UTF8ToString(start),parts=jsString.split("<::>");addEmJs(name.replace("__em_js__",""),parts[0],parts[1]),delete moduleExports[name]}var applyRelocs=moduleExports.__wasm_apply_data_relocs;applyRelocs&&(runtimeInitialized?applyRelocs():__RELOC_FUNCS__.push(applyRelocs));var init=moduleExports.__wasm_call_ctors;return init&&(runtimeInitialized?init():__ATINIT__.push(init)),moduleExports}if(flags.loadAsync){if(binary instanceof WebAssembly.Module){var instance=new WebAssembly.Instance(binary,info);return Promise.resolve(postInstantiation(binary,instance))}return WebAssembly.instantiate(binary,info).then(e=>postInstantiation(e.module,e.instance))}var module=binary instanceof WebAssembly.Module?binary:new WebAssembly.Module(binary),instance=new WebAssembly.Instance(module,info);return postInstantiation(module,instance)}return flags.loadAsync?metadata.neededDynlibs.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,flags,localScope)),Promise.resolve()).then(loadModule):(metadata.neededDynlibs.forEach(e=>loadDynamicLibrary(e,flags,localScope)),loadModule())},mergeLibSymbols=(e,t)=>{registerDynCallSymbols(e);for(var[r,n]of Object.entries(e))(a=>{isSymbolDefined(a)||(wasmImports[a]=n)})(r)},asyncLoad=(e,t,r,n)=>{var a=n?"":"al ".concat(e);readAsync(e).then(o=>{t(new Uint8Array(o)),a&&removeRunDependency()},o=>{if(r)r();else throw'Loading data file "'.concat(e,'" failed.')}),a&&addRunDependency()},preloadPlugins=Module.preloadPlugins||[],registerWasmPlugin=()=>{var e={promiseChainEnd:Promise.resolve(),canHandle:t=>!Module.noWasmDecoding&&t.endsWith(".so"),handle:(t,r,n,a)=>{e.promiseChainEnd=e.promiseChainEnd.then(()=>loadWebAssemblyModule(t,{loadAsync:!0,nodelete:!0},r,{})).then(o=>{preloadedWasm[r]=o,n(t)},o=>{err("failed to instantiate wasm: ".concat(r,": ").concat(o)),a()})}};preloadPlugins.push(e)},preloadedWasm={},registerDynCallSymbols=e=>{for(var[t,r]of Object.entries(e))t.startsWith("dynCall_")&&!Module.hasOwnProperty(t)&&(Module[t]=r)};function loadDynamicLibrary(e,t={global:!0,nodelete:!0},r,n){var a=LDSO.loadedLibsByName[e];if(a)return t.global?a.global||(a.global=!0,mergeLibSymbols(a.exports)):(r&&Object.assign(r,a.exports),registerDynCallSymbols(a.exports)),t.nodelete&&a.refcount!==1/0&&(a.refcount=1/0),a.refcount++,n&&(LDSO.loadedLibsByHandle[n]=a),t.loadAsync?Promise.resolve(!0):!0;a=newDSO(e,n,"loading"),a.refcount=t.nodelete?1/0:1,a.global=t.global;function o(){if(n){var _=HEAPU32[n+28>>>2>>>0],d=HEAPU32[n+32>>>2>>>0];if(_&&d){var p=HEAP8.slice(_,_+d);return t.loadAsync?Promise.resolve(p):p}}var f=locateFile(e);if(t.loadAsync)return new Promise((m,h)=>asyncLoad(f,m,h));if(!readBinary)throw new Error("".concat(f,": file not found, and synchronous loading of external files is not available"));return readBinary(f)}function l(){var _=preloadedWasm[e];return _?t.loadAsync?Promise.resolve(_):_:t.loadAsync?o().then(d=>loadWebAssemblyModule(d,t,e,r,n)):loadWebAssemblyModule(o(),t,e,r,n)}function u(_){a.global?mergeLibSymbols(_):r&&(Object.assign(r,_),registerDynCallSymbols(_)),a.exports=_}return t.loadAsync?l().then(_=>(u(_),!0)):(u(l()),!0)}var reportUndefinedSymbols=()=>{for(var[e,t]of Object.entries(GOT))if(t.value==0){var r=resolveGlobalSymbol(e,!0).sym;if(!r&&!t.required)continue;if(typeof r=="function")t.value=addFunction(r,r.sig);else if(typeof r=="number")t.value=r;else throw new Error("bad export type for '".concat(e,"': ").concat(typeof r))}},loadDylibs=()=>{if(!dynamicLibraries.length){reportUndefinedSymbols();return}addRunDependency(),dynamicLibraries.reduce((e,t)=>e.then(()=>loadDynamicLibrary(t,{loadAsync:!0,global:!0,nodelete:!0,allowUndefined:!0})),Promise.resolve()).then(()=>{reportUndefinedSymbols(),removeRunDependency()})},noExitRuntime=Module.noExitRuntime||!0;function __ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm(...e){return wasmImports._ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm(...e)}__ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm.stub=!0;var convertI32PairToI53Checked=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+t*4294967296:NaN;function ___assert_fail(e,t,r,n){e>>>=0,t>>>=0,n>>>=0,abort("Assertion failed: ".concat(UTF8ToString(e),", at: ")+[t?UTF8ToString(t):"unknown filename",r,n?UTF8ToString(n):"unknown function"])}___assert_fail.sig="vppip";function ___call_sighandler(e,t){return e>>>=0,getWasmTableEntry(e)(t)}___call_sighandler.sig="vpi";var exceptionCaught=[],uncaughtExceptionCount=0;function ___cxa_begin_catch(e){e>>>=0;var t=new ExceptionInfo(e);return t.get_caught()||(t.set_caught(!0),uncaughtExceptionCount--),t.set_rethrown(!1),exceptionCaught.push(t),___cxa_increment_exception_refcount(e),___cxa_get_exception_ptr(e)}___cxa_begin_catch.sig="pp";function ___cxa_current_primary_exception(){if(!exceptionCaught.length)return 0;var e=exceptionCaught[exceptionCaught.length-1];return ___cxa_increment_exception_refcount(e.excPtr),e.excPtr}___cxa_current_primary_exception.sig="p";var exceptionLast=0,___cxa_end_catch=()=>{_setThrew(0,0);var e=exceptionCaught.pop();___cxa_decrement_exception_refcount(e.excPtr),exceptionLast=0};___cxa_end_catch.sig="v";class ExceptionInfo{constructor(t){this.excPtr=t,this.ptr=t-24}set_type(t){HEAPU32[this.ptr+4>>>2>>>0]=t}get_type(){return HEAPU32[this.ptr+4>>>2>>>0]}set_destructor(t){HEAPU32[this.ptr+8>>>2>>>0]=t}get_destructor(){return HEAPU32[this.ptr+8>>>2>>>0]}set_caught(t){t=t?1:0,HEAP8[this.ptr+12>>>0]=t}get_caught(){return HEAP8[this.ptr+12>>>0]!=0}set_rethrown(t){t=t?1:0,HEAP8[this.ptr+13>>>0]=t}get_rethrown(){return HEAP8[this.ptr+13>>>0]!=0}init(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r)}set_adjusted_ptr(t){HEAPU32[this.ptr+16>>>2>>>0]=t}get_adjusted_ptr(){return HEAPU32[this.ptr+16>>>2>>>0]}}function ___resumeException(e){throw e>>>=0,exceptionLast||(exceptionLast=e),exceptionLast}___resumeException.sig="vp";var findMatchingCatch=e=>{var t=exceptionLast;if(!t)return setTempRet0(0),0;var r=new ExceptionInfo(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return setTempRet0(0),t;for(var a of e){if(a===0||a===n)break;var o=r.ptr+16;if(___cxa_can_catch(a,n,o))return setTempRet0(a),t}return setTempRet0(n),t};function ___cxa_find_matching_catch_2(){return findMatchingCatch([])}___cxa_find_matching_catch_2.sig="p";function ___cxa_find_matching_catch_3(e){return e>>>=0,findMatchingCatch([e])}___cxa_find_matching_catch_3.sig="pp";function ___cxa_find_matching_catch_4(e,t){return e>>>=0,t>>>=0,findMatchingCatch([e,t])}___cxa_find_matching_catch_4.sig="ppp";var ___cxa_rethrow=()=>{var e=exceptionCaught.pop();e||abort("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(exceptionCaught.push(e),e.set_rethrown(!0),e.set_caught(!1),uncaughtExceptionCount++),exceptionLast=t,exceptionLast};___cxa_rethrow.sig="v";function ___cxa_rethrow_primary_exception(e){if(e>>>=0,!!e){var t=new ExceptionInfo(e);exceptionCaught.push(t),t.set_rethrown(!0),___cxa_rethrow()}}___cxa_rethrow_primary_exception.sig="vp";function ___cxa_throw(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=new ExceptionInfo(e);throw n.init(t,r),exceptionLast=e,uncaughtExceptionCount++,exceptionLast}___cxa_throw.sig="vppp";var ___cxa_uncaught_exceptions=()=>uncaughtExceptionCount;___cxa_uncaught_exceptions.sig="i";var ___memory_base=new WebAssembly.Global({value:"i32",mutable:!1},1024),___stack_high=2320944,___stack_low=2255408,___stack_pointer=new WebAssembly.Global({value:"i32",mutable:!0},2320944),PATH={isAbs:e=>e.charAt(0)==="/",splitPath:e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return t.exec(e).slice(1)},normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var a=e[n];a==="."?e.splice(n,1):a===".."?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=PATH.isAbs(e),r=e.substr(-1)==="/";return e=PATH.normalizeArray(e.split("/").filter(n=>!!n),!t).join("/"),!e&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=PATH.splitPath(e),r=t[0],n=t[1];return!r&&!n?".":(n&&(n=n.substr(0,n.length-1)),r+n)},basename:e=>{if(e==="/")return"/";e=PATH.normalize(e),e=e.replace(/\/$/,"");var t=e.lastIndexOf("/");return t===-1?e:e.substr(t+1)},join:(...e)=>PATH.normalize(e.join("/")),join2:(e,t)=>PATH.normalize(e+"/"+t)},initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return n=>crypto.getRandomValues(n);if(ENVIRONMENT_IS_NODE)try{var e=ki("crypto"),t=e.randomFillSync;if(t)return n=>e.randomFillSync(n);var r=e.randomBytes;return n=>(n.set(r(n.byteLength)),n)}catch{}abort("initRandomDevice")},randomFill=e=>(randomFill=initRandomFill())(e),PATH_FS={resolve:(...e)=>{for(var t="",r=!1,n=e.length-1;n>=-1&&!r;n--){var a=n>=0?e[n]:FS.cwd();if(typeof a!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";t=a+"/"+t,r=PATH.isAbs(a)}return t=PATH.normalizeArray(t.split("/").filter(o=>!!o),!r).join("/"),(r?"/":"")+t||"."},relative:(e,t)=>{e=PATH_FS.resolve(e).substr(1),t=PATH_FS.resolve(t).substr(1);function r(d){for(var p=0;p=0&&d[f]==="";f--);return p>f?[]:d.slice(p,f-p+1)}for(var n=r(e.split("/")),a=r(t.split("/")),o=Math.min(n.length,a.length),l=o,u=0;u{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},stringToUTF8Array=(e,t,r,n)=>{if(r>>>=0,!(n>0))return 0;for(var a=r,o=r+n-1,l=0;l=55296&&u<=57343){var _=e.charCodeAt(++l);u=65536+((u&1023)<<10)|_&1023}if(u<=127){if(r>=o)break;t[r++>>>0]=u}else if(u<=2047){if(r+1>=o)break;t[r++>>>0]=192|u>>6,t[r++>>>0]=128|u&63}else if(u<=65535){if(r+2>=o)break;t[r++>>>0]=224|u>>12,t[r++>>>0]=128|u>>6&63,t[r++>>>0]=128|u&63}else{if(r+3>=o)break;t[r++>>>0]=240|u>>18,t[r++>>>0]=128|u>>12&63,t[r++>>>0]=128|u>>6&63,t[r++>>>0]=128|u&63}}return t[r>>>0]=0,r-a};function intArrayFromString(e,t,r){var n=lengthBytesUTF8(e)+1,a=new Array(n),o=stringToUTF8Array(e,a,0,a.length);return t&&(a.length=o),a}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var e=null;if(ENVIRONMENT_IS_NODE){var t=256,r=Buffer.alloc(t),n=0,a=process.stdin.fd;try{n=fs.readSync(a,r,0,t)}catch(o){if(o.toString().includes("EOF"))n=0;else throw o}n>0&&(e=r.slice(0,n).toString("utf-8"))}else typeof window<"u"&&typeof window.prompt=="function"&&(e=window.prompt("Input: "),e!==null&&(e+=` +`));if(!e)return null;FS_stdin_getChar_buffer=intArrayFromString(e,!0)}return FS_stdin_getChar_buffer.shift()},TTY={ttys:[],init(){},shutdown(){},register(e,t){TTY.ttys[e]={input:[],output:[],ops:t},FS.registerDevice(e,TTY.stream_ops)},stream_ops:{open(e){var t=TTY.ttys[e.node.rdev];if(!t)throw new FS.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,a){if(!e.tty||!e.tty.ops.get_char)throw new FS.ErrnoError(60);for(var o=0,l=0;l0&&(out(UTF8ArrayToString(e.output,0)),e.output=[])},ioctl_tcgets(e){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(e,t,r){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,t){t===null||t===10?(err(UTF8ArrayToString(e.output,0)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(err(UTF8ArrayToString(e.output,0)),e.output=[])}}},zeroMemory=(e,t)=>(HEAPU8.fill(0,e,e+t),e),mmapAlloc=e=>{e=alignMemory(e,65536);var t=_emscripten_builtin_memalign(65536,e);return t?zeroMemory(t,e):0},MEMFS={ops_table:null,mount(e){return MEMFS.createNode(null,"/",16895,0)},createNode(e,t,r,n){if(FS.isBlkdev(r)||FS.isFIFO(r))throw new FS.ErrnoError(63);MEMFS.ops_table||(MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}});var a=FS.createNode(e,t,r,n);return FS.isDir(a.mode)?(a.node_ops=MEMFS.ops_table.dir.node,a.stream_ops=MEMFS.ops_table.dir.stream,a.contents={}):FS.isFile(a.mode)?(a.node_ops=MEMFS.ops_table.file.node,a.stream_ops=MEMFS.ops_table.file.stream,a.usedBytes=0,a.contents=null):FS.isLink(a.mode)?(a.node_ops=MEMFS.ops_table.link.node,a.stream_ops=MEMFS.ops_table.link.stream):FS.isChrdev(a.mode)&&(a.node_ops=MEMFS.ops_table.chrdev.node,a.stream_ops=MEMFS.ops_table.chrdev.stream),a.timestamp=Date.now(),e&&(e.contents[t]=a,e.timestamp=a.timestamp),a},getFileDataAsTypedArray(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){var n=1048576;t=Math.max(t,r*(r>>0),r!=0&&(t=Math.max(t,256));var a=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(a.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(t==0)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=FS.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,FS.isDir(e.mode)?t.size=4096:FS.isFile(e.mode)?t.size=e.usedBytes:FS.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){t.mode!==void 0&&(e.mode=t.mode),t.timestamp!==void 0&&(e.timestamp=t.timestamp),t.size!==void 0&&MEMFS.resizeFileStorage(e,t.size)},lookup(e,t){throw FS.genericErrors[44]},mknod(e,t,r,n){return MEMFS.createNode(e,t,r,n)},rename(e,t,r){if(FS.isDir(e.mode)){var n;try{n=FS.lookupNode(t,r)}catch{}if(n)for(var a in n.contents)throw new FS.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=FS.lookupNode(e,t);for(var n in r.contents)throw new FS.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r of Object.keys(e.contents))t.push(r);return t},symlink(e,t,r){var n=MEMFS.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!FS.isLink(e.mode))throw new FS.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,a){var o=e.node.contents;if(a>=e.node.usedBytes)return 0;var l=Math.min(e.node.usedBytes-a,n);if(l>8&&o.subarray)t.set(o.subarray(a,a+l),r);else for(var u=0;u0||r+t>>0))}return{ptr:o,allocated:l}},msync(e,t,r,n,a){return MEMFS.stream_ops.write(e,t,0,n,r,!1),0}}},FS_createDataFile=(e,t,r,n,a,o)=>{FS.createDataFile(e,t,r,n,a,o)},FS_handledByPreloadPlugin=(e,t,r,n)=>{typeof Browser<"u"&&Browser.init();var a=!1;return preloadPlugins.forEach(o=>{a||o.canHandle(t)&&(o.handle(e,t,r,n),a=!0)}),a},FS_createPreloadedFile=(e,t,r,n,a,o,l,u,_,d)=>{var p=t?PATH_FS.resolve(PATH.join2(e,t)):e;function f(m){function h(g){d==null||d(),u||FS_createDataFile(e,t,g,n,a,_),o==null||o(),removeRunDependency()}FS_handledByPreloadPlugin(m,p,h,()=>{l==null||l(),removeRunDependency()})||h(m)}addRunDependency(),typeof r=="string"?asyncLoad(r,f,l):f(r)},FS_modeStringToFlags=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},r=t[e];if(typeof r>"u")throw new Error("Unknown file open mode: ".concat(e));return r},FS_getMode=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(e){this.name="ErrnoError",this.errno=e}},genericErrors:{},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(e){this.node=e}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=FS.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n,this.readMode=365,this.writeMode=146}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return FS.isDir(this.mode)}get isDevice(){return FS.isChrdev(this.mode)}},lookupPath(e,t={}){if(e=PATH_FS.resolve(e),!e)return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};if(t=Object.assign(r,t),t.recurse_count>8)throw new FS.ErrnoError(32);for(var n=e.split("/").filter(f=>!!f),a=FS.root,o="/",l=0;l40)throw new FS.ErrnoError(32)}}return{path:o,node:a}},getPath(e){for(var t;;){if(FS.isRoot(e)){var r=e.mount.mountpoint;return t?r[r.length-1]!=="/"?"".concat(r,"/").concat(t):r+t:r}t=t?"".concat(e.name,"/").concat(t):e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%FS.nameTable.length},hashAddNode(e){var t=FS.hashName(e.parent.id,e.name);e.name_next=FS.nameTable[t],FS.nameTable[t]=e},hashRemoveNode(e){var t=FS.hashName(e.parent.id,e.name);if(FS.nameTable[t]===e)FS.nameTable[t]=e.name_next;else for(var r=FS.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=FS.mayLookup(e);if(r)throw new FS.ErrnoError(r);for(var n=FS.hashName(e.id,t),a=FS.nameTable[n];a;a=a.name_next){var o=a.name;if(a.parent.id===e.id&&o===t)return a}return FS.lookup(e,t)},createNode(e,t,r,n){var a=new FS.FSNode(e,t,r,n);return FS.hashAddNode(a),a},destroyNode(e){FS.hashRemoveNode(e)},isRoot(e){return e===e.parent},isMountpoint(e){return!!e.mounted},isFile(e){return(e&61440)===32768},isDir(e){return(e&61440)===16384},isLink(e){return(e&61440)===40960},isChrdev(e){return(e&61440)===8192},isBlkdev(e){return(e&61440)===24576},isFIFO(e){return(e&61440)===4096},isSocket(e){return(e&49152)===49152},flagsToPermissionString(e){var t=["r","w","rw"][e&3];return e&512&&(t+="w"),t},nodePermissions(e,t){return FS.ignorePermissions?0:t.includes("r")&&!(e.mode&292)||t.includes("w")&&!(e.mode&146)||t.includes("x")&&!(e.mode&73)?2:0},mayLookup(e){if(!FS.isDir(e.mode))return 54;var t=FS.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{var r=FS.lookupNode(e,t);return 20}catch{}return FS.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=FS.lookupNode(e,t)}catch(o){return o.errno}var a=FS.nodePermissions(e,"wx");if(a)return a;if(r){if(!FS.isDir(n.mode))return 54;if(FS.isRoot(n)||FS.getPath(n)===FS.cwd())return 10}else if(FS.isDir(n.mode))return 31;return 0},mayOpen(e,t){return e?FS.isLink(e.mode)?32:FS.isDir(e.mode)&&(FS.flagsToPermissionString(t)!=="r"||t&512)?31:FS.nodePermissions(e,FS.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=FS.MAX_OPEN_FDS;e++)if(!FS.streams[e])return e;throw new FS.ErrnoError(33)},getStreamChecked(e){var t=FS.getStream(e);if(!t)throw new FS.ErrnoError(8);return t},getStream:e=>FS.streams[e],createStream(e,t=-1){return e=Object.assign(new FS.FSStream,e),t==-1&&(t=FS.nextfd()),e.fd=t,FS.streams[t]=e,e},closeStream(e){FS.streams[e]=null},dupStream(e,t=-1){var r,n,a=FS.createStream(e,t);return(n=(r=a.stream_ops)==null?void 0:r.dup)==null||n.call(r,a),a},chrdev_stream_ops:{open(e){var t,r,n=FS.getDevice(e.node.rdev);e.stream_ops=n.stream_ops,(r=(t=e.stream_ops).open)==null||r.call(t,e)},llseek(){throw new FS.ErrnoError(70)}},major:e=>e>>8,minor:e=>e&255,makedev:(e,t)=>e<<8|t,registerDevice(e,t){FS.devices[e]={stream_ops:t}},getDevice:e=>FS.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push(...n.mounts)}return t},syncfs(e,t){typeof e=="function"&&(t=e,e=!1),FS.syncFSRequests++,FS.syncFSRequests>1&&err("warning: ".concat(FS.syncFSRequests," FS.syncfs operations in flight at once, probably just doing extra work"));var r=FS.getMounts(FS.root.mount),n=0;function a(l){return FS.syncFSRequests--,t(l)}function o(l){if(l)return o.errored?void 0:(o.errored=!0,a(l));++n>=r.length&&a(null)}r.forEach(l=>{if(!l.type.syncfs)return o(null);l.type.syncfs(l,e,o)})},mount(e,t,r){var n=r==="/",a=!r,o;if(n&&FS.root)throw new FS.ErrnoError(10);if(!n&&!a){var l=FS.lookupPath(r,{follow_mount:!1});if(r=l.path,o=l.node,FS.isMountpoint(o))throw new FS.ErrnoError(10);if(!FS.isDir(o.mode))throw new FS.ErrnoError(54)}var u={type:e,opts:t,mountpoint:r,mounts:[]},_=e.mount(u);return _.mount=u,u.root=_,n?FS.root=_:o&&(o.mounted=u,o.mount&&o.mount.mounts.push(u)),_},unmount(e){var t=FS.lookupPath(e,{follow_mount:!1});if(!FS.isMountpoint(t.node))throw new FS.ErrnoError(28);var r=t.node,n=r.mounted,a=FS.getMounts(n);Object.keys(FS.nameTable).forEach(l=>{for(var u=FS.nameTable[l];u;){var _=u.name_next;a.includes(u.mount)&&FS.destroyNode(u),u=_}}),r.mounted=null;var o=r.mount.mounts.indexOf(n);r.mount.mounts.splice(o,1)},lookup(e,t){return e.node_ops.lookup(e,t)},mknod(e,t,r){var n=FS.lookupPath(e,{parent:!0}),a=n.node,o=PATH.basename(e);if(!o||o==="."||o==="..")throw new FS.ErrnoError(28);var l=FS.mayCreate(a,o);if(l)throw new FS.ErrnoError(l);if(!a.node_ops.mknod)throw new FS.ErrnoError(63);return a.node_ops.mknod(a,o,t,r)},create(e,t){return t=t!==void 0?t:438,t&=4095,t|=32768,FS.mknod(e,t,0)},mkdir(e,t){return t=t!==void 0?t:511,t&=1023,t|=16384,FS.mknod(e,t,0)},mkdirTree(e,t){for(var r=e.split("/"),n="",a=0;a"u"&&(r=t,t=438),t|=8192,FS.mknod(e,t,r)},symlink(e,t){if(!PATH_FS.resolve(e))throw new FS.ErrnoError(44);var r=FS.lookupPath(t,{parent:!0}),n=r.node;if(!n)throw new FS.ErrnoError(44);var a=PATH.basename(t),o=FS.mayCreate(n,a);if(o)throw new FS.ErrnoError(o);if(!n.node_ops.symlink)throw new FS.ErrnoError(63);return n.node_ops.symlink(n,a,e)},rename(e,t){var r=PATH.dirname(e),n=PATH.dirname(t),a=PATH.basename(e),o=PATH.basename(t),l,u,_;if(l=FS.lookupPath(e,{parent:!0}),u=l.node,l=FS.lookupPath(t,{parent:!0}),_=l.node,!u||!_)throw new FS.ErrnoError(44);if(u.mount!==_.mount)throw new FS.ErrnoError(75);var d=FS.lookupNode(u,a),p=PATH_FS.relative(e,n);if(p.charAt(0)!==".")throw new FS.ErrnoError(28);if(p=PATH_FS.relative(t,r),p.charAt(0)!==".")throw new FS.ErrnoError(55);var f;try{f=FS.lookupNode(_,o)}catch{}if(d!==f){var m=FS.isDir(d.mode),h=FS.mayDelete(u,a,m);if(h)throw new FS.ErrnoError(h);if(h=f?FS.mayDelete(_,o,m):FS.mayCreate(_,o),h)throw new FS.ErrnoError(h);if(!u.node_ops.rename)throw new FS.ErrnoError(63);if(FS.isMountpoint(d)||f&&FS.isMountpoint(f))throw new FS.ErrnoError(10);if(_!==u&&(h=FS.nodePermissions(u,"w"),h))throw new FS.ErrnoError(h);FS.hashRemoveNode(d);try{u.node_ops.rename(d,_,o),d.parent=_}catch(g){throw g}finally{FS.hashAddNode(d)}}},rmdir(e){var t=FS.lookupPath(e,{parent:!0}),r=t.node,n=PATH.basename(e),a=FS.lookupNode(r,n),o=FS.mayDelete(r,n,!0);if(o)throw new FS.ErrnoError(o);if(!r.node_ops.rmdir)throw new FS.ErrnoError(63);if(FS.isMountpoint(a))throw new FS.ErrnoError(10);r.node_ops.rmdir(r,n),FS.destroyNode(a)},readdir(e){var t=FS.lookupPath(e,{follow:!0}),r=t.node;if(!r.node_ops.readdir)throw new FS.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var t=FS.lookupPath(e,{parent:!0}),r=t.node;if(!r)throw new FS.ErrnoError(44);var n=PATH.basename(e),a=FS.lookupNode(r,n),o=FS.mayDelete(r,n,!1);if(o)throw new FS.ErrnoError(o);if(!r.node_ops.unlink)throw new FS.ErrnoError(63);if(FS.isMountpoint(a))throw new FS.ErrnoError(10);r.node_ops.unlink(r,n),FS.destroyNode(a)},readlink(e){var t=FS.lookupPath(e),r=t.node;if(!r)throw new FS.ErrnoError(44);if(!r.node_ops.readlink)throw new FS.ErrnoError(28);return PATH_FS.resolve(FS.getPath(r.parent),r.node_ops.readlink(r))},stat(e,t){var r=FS.lookupPath(e,{follow:!t}),n=r.node;if(!n)throw new FS.ErrnoError(44);if(!n.node_ops.getattr)throw new FS.ErrnoError(63);return n.node_ops.getattr(n)},lstat(e){return FS.stat(e,!0)},chmod(e,t,r){var n;if(typeof e=="string"){var a=FS.lookupPath(e,{follow:!r});n=a.node}else n=e;if(!n.node_ops.setattr)throw new FS.ErrnoError(63);n.node_ops.setattr(n,{mode:t&4095|n.mode&-4096,timestamp:Date.now()})},lchmod(e,t){FS.chmod(e,t,!0)},fchmod(e,t){var r=FS.getStreamChecked(e);FS.chmod(r.node,t)},chown(e,t,r,n){var a;if(typeof e=="string"){var o=FS.lookupPath(e,{follow:!n});a=o.node}else a=e;if(!a.node_ops.setattr)throw new FS.ErrnoError(63);a.node_ops.setattr(a,{timestamp:Date.now()})},lchown(e,t,r){FS.chown(e,t,r,!0)},fchown(e,t,r){var n=FS.getStreamChecked(e);FS.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new FS.ErrnoError(28);var r;if(typeof e=="string"){var n=FS.lookupPath(e,{follow:!0});r=n.node}else r=e;if(!r.node_ops.setattr)throw new FS.ErrnoError(63);if(FS.isDir(r.mode))throw new FS.ErrnoError(31);if(!FS.isFile(r.mode))throw new FS.ErrnoError(28);var a=FS.nodePermissions(r,"w");if(a)throw new FS.ErrnoError(a);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=FS.getStreamChecked(e);if(!(r.flags&2097155))throw new FS.ErrnoError(28);FS.truncate(r.node,t)},utime(e,t,r){var n=FS.lookupPath(e,{follow:!0}),a=n.node;a.node_ops.setattr(a,{timestamp:Math.max(t,r)})},open(e,t,r){if(e==="")throw new FS.ErrnoError(44);t=typeof t=="string"?FS_modeStringToFlags(t):t,t&64?(r=typeof r>"u"?438:r,r=r&4095|32768):r=0;var n;if(typeof e=="object")n=e;else{e=PATH.normalize(e);try{var a=FS.lookupPath(e,{follow:!(t&131072)});n=a.node}catch{}}var o=!1;if(t&64)if(n){if(t&128)throw new FS.ErrnoError(20)}else n=FS.mknod(e,r,0),o=!0;if(!n)throw new FS.ErrnoError(44);if(FS.isChrdev(n.mode)&&(t&=-513),t&65536&&!FS.isDir(n.mode))throw new FS.ErrnoError(54);if(!o){var l=FS.mayOpen(n,t);if(l)throw new FS.ErrnoError(l)}t&512&&!o&&FS.truncate(n,0),t&=-131713;var u=FS.createStream({node:n,path:FS.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return u.stream_ops.open&&u.stream_ops.open(u),Module.logReadFiles&&!(t&1)&&(e in FS.readFiles||(FS.readFiles[e]=1)),u},close(e){if(FS.isClosed(e))throw new FS.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(t){throw t}finally{FS.closeStream(e.fd)}e.fd=null},isClosed(e){return e.fd===null},llseek(e,t,r){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new FS.ErrnoError(70);if(r!=0&&r!=1&&r!=2)throw new FS.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,a){if(n<0||a<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if((e.flags&2097155)===1)throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.read)throw new FS.ErrnoError(28);var o=typeof a<"u";if(!o)a=e.position;else if(!e.seekable)throw new FS.ErrnoError(70);var l=e.stream_ops.read(e,t,r,n,a);return o||(e.position+=l),l},write(e,t,r,n,a,o){if(n<0||a<0)throw new FS.ErrnoError(28);if(FS.isClosed(e))throw new FS.ErrnoError(8);if(!(e.flags&2097155))throw new FS.ErrnoError(8);if(FS.isDir(e.node.mode))throw new FS.ErrnoError(31);if(!e.stream_ops.write)throw new FS.ErrnoError(28);e.seekable&&e.flags&1024&&FS.llseek(e,0,2);var l=typeof a<"u";if(!l)a=e.position;else if(!e.seekable)throw new FS.ErrnoError(70);var u=e.stream_ops.write(e,t,r,n,a,o);return l||(e.position+=u),u},allocate(e,t,r){if(FS.isClosed(e))throw new FS.ErrnoError(8);if(t<0||r<=0)throw new FS.ErrnoError(28);if(!(e.flags&2097155))throw new FS.ErrnoError(8);if(!FS.isFile(e.node.mode)&&!FS.isDir(e.node.mode))throw new FS.ErrnoError(43);if(!e.stream_ops.allocate)throw new FS.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,a){if(n&2&&!(a&2)&&(e.flags&2097155)!==2)throw new FS.ErrnoError(2);if((e.flags&2097155)===1)throw new FS.ErrnoError(2);if(!e.stream_ops.mmap)throw new FS.ErrnoError(43);if(!t)throw new FS.ErrnoError(28);return e.stream_ops.mmap(e,t,r,n,a)},msync(e,t,r,n,a){return e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,a):0},ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new FS.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary",t.encoding!=="utf8"&&t.encoding!=="binary")throw new Error('Invalid encoding type "'.concat(t.encoding,'"'));var r,n=FS.open(e,t.flags),a=FS.stat(e),o=a.size,l=new Uint8Array(o);return FS.read(n,l,0,o,0),t.encoding==="utf8"?r=UTF8ArrayToString(l,0):t.encoding==="binary"&&(r=l),FS.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=FS.open(e,r.flags,r.mode);if(typeof t=="string"){var a=new Uint8Array(lengthBytesUTF8(t)+1),o=stringToUTF8Array(t,a,0,a.length);FS.write(n,a,0,o,void 0,r.canOwn)}else if(ArrayBuffer.isView(t))FS.write(n,t,0,t.byteLength,void 0,r.canOwn);else throw new Error("Unsupported data type");FS.close(n)},cwd:()=>FS.currentPath,chdir(e){var t=FS.lookupPath(e,{follow:!0});if(t.node===null)throw new FS.ErrnoError(44);if(!FS.isDir(t.node.mode))throw new FS.ErrnoError(54);var r=FS.nodePermissions(t.node,"x");if(r)throw new FS.ErrnoError(r);FS.currentPath=t.path},createDefaultDirectories(){FS.mkdir("/tmp"),FS.mkdir("/home"),FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev"),FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(n,a,o,l,u)=>l}),FS.mkdev("/dev/null",FS.makedev(1,3)),TTY.register(FS.makedev(5,0),TTY.default_tty_ops),TTY.register(FS.makedev(6,0),TTY.default_tty1_ops),FS.mkdev("/dev/tty",FS.makedev(5,0)),FS.mkdev("/dev/tty1",FS.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(t===0&&(t=randomFill(e).byteLength),e[--t]);FS.createDevice("/dev","random",r),FS.createDevice("/dev","urandom",r),FS.mkdir("/dev/shm"),FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var e=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd"),FS.mount({mount(){var t=FS.createNode(e,"fd",16895,73);return t.node_ops={lookup(r,n){var a=+n,o=FS.getStreamChecked(a),l={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>o.path}};return l.parent=l,l}},t}},{},"/proc/self/fd")},createStandardStreams(e,t,r){e?FS.createDevice("/dev","stdin",e):FS.symlink("/dev/tty","/dev/stdin"),t?FS.createDevice("/dev","stdout",null,t):FS.symlink("/dev/tty","/dev/stdout"),r?FS.createDevice("/dev","stderr",null,r):FS.symlink("/dev/tty1","/dev/stderr"),FS.open("/dev/stdin",0),FS.open("/dev/stdout",1),FS.open("/dev/stderr",1)},staticInit(){[44].forEach(e=>{FS.genericErrors[e]=new FS.ErrnoError(e),FS.genericErrors[e].stack=""}),FS.nameTable=new Array(4096),FS.mount(MEMFS,{},"/"),FS.createDefaultDirectories(),FS.createDefaultDevices(),FS.createSpecialDirectories(),FS.filesystems={MEMFS}},init(e,t,r){FS.initialized=!0,e!=null||(e=Module.stdin),t!=null||(t=Module.stdout),r!=null||(r=Module.stderr),FS.createStandardStreams(e,t,r)},quit(){FS.initialized=!1;for(var e=0;ethis.length-1||h<0)){var g=h%this.chunkSize,b=h/this.chunkSize|0;return this.getter(b)[g]}}setDataGetter(h){this.getter=h}cacheLength(){var h=new XMLHttpRequest;if(h.open("HEAD",r,!1),h.send(null),!(h.status>=200&&h.status<300||h.status===304))throw new Error("Couldn't load "+r+". Status: "+h.status);var g=Number(h.getResponseHeader("Content-length")),b,v=(b=h.getResponseHeader("Accept-Ranges"))&&b==="bytes",S=(b=h.getResponseHeader("Content-Encoding"))&&b==="gzip",L=1024*1024;v||(L=g);var T=(M,X)=>{if(M>X)throw new Error("invalid range ("+M+", "+X+") or no bytes requested!");if(X>g-1)throw new Error("only "+g+" bytes available! programmer error!");var x=new XMLHttpRequest;if(x.open("GET",r,!1),g!==L&&x.setRequestHeader("Range","bytes="+M+"-"+X),x.responseType="arraybuffer",x.overrideMimeType&&x.overrideMimeType("text/plain; charset=x-user-defined"),x.send(null),!(x.status>=200&&x.status<300||x.status===304))throw new Error("Couldn't load "+r+". Status: "+x.status);return x.response!==void 0?new Uint8Array(x.response||[]):intArrayFromString(x.responseText||"",!0)},A=this;A.setDataGetter(M=>{var X=M*L,x=(M+1)*L-1;if(x=Math.min(x,g-1),typeof A.chunks[M]>"u"&&(A.chunks[M]=T(X,x)),typeof A.chunks[M]>"u")throw new Error("doXHR failed!");return A.chunks[M]}),(S||!g)&&(L=g=1,g=this.getter(0).length,L=g,out("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=g,this._chunkSize=L,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var l=new o,u={isDevice:!1,contents:l}}else var u={isDevice:!1,url:r};var _=FS.createFile(e,t,u,n,a);u.contents?_.contents=u.contents:u.url&&(_.contents=null,_.url=u.url),Object.defineProperties(_,{usedBytes:{get:function(){return this.contents.length}}});var d={},p=Object.keys(_.stream_ops);p.forEach(m=>{var h=_.stream_ops[m];d[m]=(...g)=>(FS.forceLoadFile(_),h(...g))});function f(m,h,g,b,v){var S=m.node.contents;if(v>=S.length)return 0;var L=Math.min(S.length-v,b);if(S.slice)for(var T=0;T(FS.forceLoadFile(_),f(m,h,g,b,v)),d.mmap=(m,h,g,b,v)=>{FS.forceLoadFile(_);var S=mmapAlloc(h);if(!S)throw new FS.ErrnoError(48);return f(m,HEAP8,S,h,g),{ptr:S,allocated:!0}},_.stream_ops=d,_}},SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(PATH.isAbs(t))return t;var n;if(e===-100)n=FS.cwd();else{var a=SYSCALLS.getStreamFromFD(e);n=a.path}if(t.length==0){if(!r)throw new FS.ErrnoError(44);return n}return PATH.join2(n,t)},doStat(e,t,r){var n=e(t);HEAP32[r>>>2>>>0]=n.dev,HEAP32[r+4>>>2>>>0]=n.mode,HEAPU32[r+8>>>2>>>0]=n.nlink,HEAP32[r+12>>>2>>>0]=n.uid,HEAP32[r+16>>>2>>>0]=n.gid,HEAP32[r+20>>>2>>>0]=n.rdev,tempI64=[n.size>>>0,(tempDouble=n.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+24>>>2>>>0]=tempI64[0],HEAP32[r+28>>>2>>>0]=tempI64[1],HEAP32[r+32>>>2>>>0]=4096,HEAP32[r+36>>>2>>>0]=n.blocks;var a=n.atime.getTime(),o=n.mtime.getTime(),l=n.ctime.getTime();return tempI64=[Math.floor(a/1e3)>>>0,(tempDouble=Math.floor(a/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+40>>>2>>>0]=tempI64[0],HEAP32[r+44>>>2>>>0]=tempI64[1],HEAPU32[r+48>>>2>>>0]=a%1e3*1e3*1e3,tempI64=[Math.floor(o/1e3)>>>0,(tempDouble=Math.floor(o/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+56>>>2>>>0]=tempI64[0],HEAP32[r+60>>>2>>>0]=tempI64[1],HEAPU32[r+64>>>2>>>0]=o%1e3*1e3*1e3,tempI64=[Math.floor(l/1e3)>>>0,(tempDouble=Math.floor(l/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+72>>>2>>>0]=tempI64[0],HEAP32[r+76>>>2>>>0]=tempI64[1],HEAPU32[r+80>>>2>>>0]=l%1e3*1e3*1e3,tempI64=[n.ino>>>0,(tempDouble=n.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[r+88>>>2>>>0]=tempI64[0],HEAP32[r+92>>>2>>>0]=tempI64[1],0},doMsync(e,t,r,n,a){if(!FS.isFile(t.node.mode))throw new FS.ErrnoError(43);if(n&2)return 0;var o=HEAPU8.slice(e,e+r);FS.msync(t,o,a,r,n)},getStreamFromFD(e){var t=FS.getStreamChecked(e);return t},varargs:void 0,getStr(e){var t=UTF8ToString(e);return t}};function ___syscall__newselect(e,t,r,n,a){t>>>=0,r>>>=0,n>>>=0,a>>>=0;try{for(var o=0,l=t?HEAP32[t>>>2>>>0]:0,u=t?HEAP32[t+4>>>2>>>0]:0,_=r?HEAP32[r>>>2>>>0]:0,d=r?HEAP32[r+4>>>2>>>0]:0,p=n?HEAP32[n>>>2>>>0]:0,f=n?HEAP32[n+4>>>2>>>0]:0,m=0,h=0,g=0,b=0,v=0,S=0,L=(t?HEAP32[t>>>2>>>0]:0)|(r?HEAP32[r>>>2>>>0]:0)|(n?HEAP32[n>>>2>>>0]:0),T=(t?HEAP32[t+4>>>2>>>0]:0)|(r?HEAP32[r+4>>>2>>>0]:0)|(n?HEAP32[n+4>>>2>>>0]:0),A=function(C,F,U,D){return C<32?F&D:U&D},M=0;M>>2>>>0]:0,k=t?HEAP32[a+4>>>2>>>0]:0;E=(P+k/1e6)*1e3}w=x.stream_ops.poll(x,E)}w&1&&A(M,l,u,X)&&(M<32?m=m|X:h=h|X,o++),w&4&&A(M,_,d,X)&&(M<32?g=g|X:b=b|X,o++),w&2&&A(M,p,f,X)&&(M<32?v=v|X:S=S|X,o++)}}return t&&(HEAP32[t>>>2>>>0]=m,HEAP32[t+4>>>2>>>0]=h),r&&(HEAP32[r>>>2>>>0]=g,HEAP32[r+4>>>2>>>0]=b),n&&(HEAP32[n>>>2>>>0]=v,HEAP32[n+4>>>2>>>0]=S),o}catch(C){if(typeof FS>"u"||C.name!=="ErrnoError")throw C;return-C.errno}}___syscall__newselect.sig="iipppp";var SOCKFS={mount(e){return Module.websocket=Module.websocket&&typeof Module.websocket=="object"?Module.websocket:{},Module.websocket._callbacks={},Module.websocket.on=function(t,r){return typeof r=="function"&&(this._callbacks[t]=r),this},Module.websocket.emit=function(t,r){typeof this._callbacks[t]=="function"&&this._callbacks[t].call(this,r)},FS.createNode(null,"/",16895,0)},createSocket(e,t,r){t&=-526337;var n=t==1;if(n&&r&&r!=6)throw new FS.ErrnoError(66);var a={family:e,type:t,protocol:r,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops},o=SOCKFS.nextname(),l=FS.createNode(SOCKFS.root,o,49152,0);l.sock=a;var u=FS.createStream({path:o,node:l,flags:2,seekable:!1,stream_ops:SOCKFS.stream_ops});return a.stream=u,a},getSocket(e){var t=FS.getStream(e);return!t||!FS.isSocket(t.node.mode)?null:t.node.sock},stream_ops:{poll(e){var t=e.node.sock;return t.sock_ops.poll(t)},ioctl(e,t,r){var n=e.node.sock;return n.sock_ops.ioctl(n,t,r)},read(e,t,r,n,a){var o=e.node.sock,l=o.sock_ops.recvmsg(o,n);return l?(t.set(l.buffer,r),l.buffer.length):0},write(e,t,r,n,a){var o=e.node.sock;return o.sock_ops.sendmsg(o,t,r,n)},close(e){var t=e.node.sock;t.sock_ops.close(t)}},nextname(){return SOCKFS.nextname.current||(SOCKFS.nextname.current=0),"socket["+SOCKFS.nextname.current+++"]"},websocket_sock_ops:{createPeer(e,t,r){var n;if(typeof t=="object"&&(n=t,t=null,r=null),n)if(n._socket)t=n._socket.remoteAddress,r=n._socket.remotePort;else{var a=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!a)throw new Error("WebSocket URL must be in the format ws(s)://address:port");t=a[1],r=parseInt(a[2],10)}else try{var o=Module.websocket&&typeof Module.websocket=="object",l="ws:#".replace("#","//");if(o&&typeof Module.websocket.url=="string"&&(l=Module.websocket.url),l==="ws://"||l==="wss://"){var u=t.split("/");l=l+u[0]+":"+r+"/"+u.slice(1).join("/")}var _="binary";o&&typeof Module.websocket.subprotocol=="string"&&(_=Module.websocket.subprotocol);var d=void 0;_!=="null"&&(_=_.replace(/^ +| +$/g,"").split(/ *, */),d=_),o&&Module.websocket.subprotocol===null&&(_="null",d=void 0);var p;ENVIRONMENT_IS_NODE?p=wo():p=WebSocket,n=new p(l,d),n.binaryType="arraybuffer"}catch{throw new FS.ErrnoError(23)}var f={addr:t,port:r,socket:n,dgram_send_queue:[]};return SOCKFS.websocket_sock_ops.addPeer(e,f),SOCKFS.websocket_sock_ops.handlePeerEvents(e,f),e.type===2&&typeof e.sport<"u"&&f.dgram_send_queue.push(new Uint8Array([255,255,255,255,112,111,114,116,(e.sport&65280)>>8,e.sport&255])),f},getPeer(e,t,r){return e.peers[t+":"+r]},addPeer(e,t){e.peers[t.addr+":"+t.port]=t},removePeer(e,t){delete e.peers[t.addr+":"+t.port]},handlePeerEvents(e,t){var r=!0,n=function(){Module.websocket.emit("open",e.stream.fd);try{for(var o=t.dgram_send_queue.shift();o;)t.socket.send(o),o=t.dgram_send_queue.shift()}catch{t.socket.close()}};function a(o){if(typeof o=="string"){var l=new TextEncoder;o=l.encode(o)}else{if(assert(o.byteLength!==void 0),o.byteLength==0)return;o=new Uint8Array(o)}var u=r;if(r=!1,u&&o.length===10&&o[0]===255&&o[1]===255&&o[2]===255&&o[3]===255&&o[4]===112&&o[5]===111&&o[6]===114&&o[7]===116){var _=o[8]<<8|o[9];SOCKFS.websocket_sock_ops.removePeer(e,t),t.port=_,SOCKFS.websocket_sock_ops.addPeer(e,t);return}e.recv_queue.push({addr:t.addr,port:t.port,data:o}),Module.websocket.emit("message",e.stream.fd)}ENVIRONMENT_IS_NODE?(t.socket.on("open",n),t.socket.on("message",function(o,l){l&&a(new Uint8Array(o).buffer)}),t.socket.on("close",function(){Module.websocket.emit("close",e.stream.fd)}),t.socket.on("error",function(o){e.error=14,Module.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})):(t.socket.onopen=n,t.socket.onclose=function(){Module.websocket.emit("close",e.stream.fd)},t.socket.onmessage=function(o){a(o.data)},t.socket.onerror=function(o){e.error=14,Module.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])})},poll(e){if(e.type===1&&e.server)return e.pending.length?65:0;var t=0,r=e.type===1?SOCKFS.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!r||r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=65),(!r||r&&r.socket.readyState===r.socket.OPEN)&&(t|=4),(r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=16),t},ioctl(e,t,r){switch(t){case 21531:var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),HEAP32[r>>>2>>>0]=n,0;default:return 28}},close(e){if(e.server){try{e.server.close()}catch{}e.server=null}for(var t=Object.keys(e.peers),r=0;r{var t=SOCKFS.getSocket(e);if(!t)throw new FS.ErrnoError(8);return t},inetPton4=e=>{for(var t=e.split("."),r=0;r<4;r++){var n=Number(t[r]);if(isNaN(n))return null;t[r]=n}return(t[0]|t[1]<<8|t[2]<<16|t[3]<<24)>>>0},jstoi_q=e=>parseInt(e),inetPton6=e=>{var t,r,n,a,o=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,l=[];if(!o.test(e))return null;if(e==="::")return[0,0,0,0,0,0,0,0];for(e.startsWith("::")?e=e.replace("::","Z:"):e=e.replace("::",":Z:"),e.indexOf(".")>0?(e=e.replace(new RegExp("[.]","g"),":"),t=e.split(":"),t[t.length-4]=jstoi_q(t[t.length-4])+jstoi_q(t[t.length-3])*256,t[t.length-3]=jstoi_q(t[t.length-2])+jstoi_q(t[t.length-1])*256,t=t.slice(0,t.length-2)):t=e.split(":"),n=0,a=0,r=0;r{switch(t){case 2:r=inetPton4(r),zeroMemory(e,16),a&&(HEAP32[a>>>2>>>0]=16),HEAP16[e>>>1>>>0]=t,HEAP32[e+4>>>2>>>0]=r,HEAP16[e+2>>>1>>>0]=_htons(n);break;case 10:r=inetPton6(r),zeroMemory(e,28),a&&(HEAP32[a>>>2>>>0]=28),HEAP32[e>>>2>>>0]=t,HEAP32[e+8>>>2>>>0]=r[0],HEAP32[e+12>>>2>>>0]=r[1],HEAP32[e+16>>>2>>>0]=r[2],HEAP32[e+20>>>2>>>0]=r[3],HEAP16[e+2>>>1>>>0]=_htons(n);break;default:return 5}return 0},DNS={address_map:{id:1,addrs:{},names:{}},lookup_name(e){var t=inetPton4(e);if(t!==null||(t=inetPton6(e),t!==null))return e;var r;if(DNS.address_map.addrs[e])r=DNS.address_map.addrs[e];else{var n=DNS.address_map.id++;assert(n<65535,"exceeded max address mappings of 65535"),r="172.29."+(n&255)+"."+(n&65280),DNS.address_map.names[r]=e,DNS.address_map.addrs[e]=r}return r},lookup_addr(e){return DNS.address_map.names[e]?DNS.address_map.names[e]:null}};function ___syscall_accept4(e,t,r,n,a,o){t>>>=0,r>>>=0;try{var l=getSocketFromFD(e),u=l.sock_ops.accept(l);if(t)var _=writeSockaddr(t,u.family,DNS.lookup_name(u.daddr),u.dport,r);return u.stream.fd}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_accept4.sig="iippiii";var inetNtop4=e=>(e&255)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255),inetNtop6=e=>{var t="",r=0,n=0,a=0,o=0,l=0,u=0,_=[e[0]&65535,e[0]>>16,e[1]&65535,e[1]>>16,e[2]&65535,e[2]>>16,e[3]&65535,e[3]>>16],d=!0,p="";for(u=0;u<5;u++)if(_[u]!==0){d=!1;break}if(d){if(p=inetNtop4(_[6]|_[7]<<16),_[5]===-1)return t="::ffff:",t+=p,t;if(_[5]===0)return t="::",p==="0.0.0.0"&&(p=""),p==="0.0.0.1"&&(p="1"),t+=p,t}for(r=0;r<8;r++)_[r]===0&&(r-a>1&&(l=0),a=r,l++),l>n&&(n=l,o=r-n+1);for(r=0;r<8;r++){if(n>1&&_[r]===0&&r>=o&&r{var r=HEAP16[e>>>1>>>0],n=_ntohs(HEAPU16[e+2>>>1>>>0]),a;switch(r){case 2:if(t!==16)return{errno:28};a=HEAP32[e+4>>>2>>>0],a=inetNtop4(a);break;case 10:if(t!==28)return{errno:28};a=[HEAP32[e+8>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+16>>>2>>>0],HEAP32[e+20>>>2>>>0]],a=inetNtop6(a);break;default:return{errno:5}}return{family:r,addr:a,port:n}},getSocketAddress=(e,t)=>{var r=readSockaddr(e,t);if(r.errno)throw new FS.ErrnoError(r.errno);return r.addr=DNS.lookup_addr(r.addr)||r.addr,r};function ___syscall_bind(e,t,r,n,a,o){t>>>=0,r>>>=0;try{var l=getSocketFromFD(e),u=getSocketAddress(t,r);return l.sock_ops.bind(l,u.addr,u.port),0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_bind.sig="iippiii";function ___syscall_chdir(e){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.chdir(e),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_chdir.sig="ip";function ___syscall_chmod(e,t){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.chmod(e,t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_chmod.sig="ipi";function ___syscall_connect(e,t,r,n,a,o){t>>>=0,r>>>=0;try{var l=getSocketFromFD(e),u=getSocketAddress(t,r);return l.sock_ops.connect(l,u.addr,u.port),0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_connect.sig="iippiii";function ___syscall_dup(e){try{var t=SYSCALLS.getStreamFromFD(e);return FS.dupStream(t).fd}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_dup.sig="ii";function ___syscall_dup3(e,t,r){try{var n=SYSCALLS.getStreamFromFD(e);if(n.fd===t)return-28;if(t<0||t>=FS.MAX_OPEN_FDS)return-8;var a=FS.getStream(t);return a&&FS.close(a),FS.dupStream(n,t).fd}catch(o){if(typeof FS>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}___syscall_dup3.sig="iiii";function ___syscall_faccessat(e,t,r,n){t>>>=0;try{if(t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),r&-8)return-28;var a=FS.lookupPath(t,{follow:!0}),o=a.node;if(!o)return-44;var l="";return r&4&&(l+="r"),r&2&&(l+="w"),r&1&&(l+="x"),l&&FS.nodePermissions(o,l)?-2:0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_faccessat.sig="iipii";var ___syscall_fadvise64=(e,t,r,n)=>0;___syscall_fadvise64.sig="iiiiiii";function ___syscall_fallocate(e,t,r,n,a,o){var l=convertI32PairToI53Checked(r,n),u=convertI32PairToI53Checked(a,o);try{if(isNaN(l))return 61;var _=SYSCALLS.getStreamFromFD(e);return FS.allocate(_,l,u),0}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_fallocate.sig="iiiiiii";function ___syscall_fchdir(e){try{var t=SYSCALLS.getStreamFromFD(e);return FS.chdir(t.path),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_fchdir.sig="ii";function ___syscall_fchmod(e,t){try{return FS.fchmod(e,t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_fchmod.sig="iii";function ___syscall_fchmodat2(e,t,r,n){t>>>=0;try{var a=n&256;return t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),FS.chmod(t,r,a),0}catch(o){if(typeof FS>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}___syscall_fchmodat2.sig="iipii";function ___syscall_fchown32(e,t,r){try{return FS.fchown(e,t,r),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_fchown32.sig="iiii";function ___syscall_fchownat(e,t,r,n,a){t>>>=0;try{t=SYSCALLS.getStr(t);var o=a&256;return a=a&-257,t=SYSCALLS.calculateAt(e,t),(o?FS.lchown:FS.chown)(t,r,n),0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_fchownat.sig="iipiii";function syscallGetVarargI(){var e=HEAP32[+SYSCALLS.varargs>>>2>>>0];return SYSCALLS.varargs+=4,e}var syscallGetVarargP=syscallGetVarargI;function ___syscall_fcntl64(e,t,r){r>>>=0,SYSCALLS.varargs=r;try{var n=SYSCALLS.getStreamFromFD(e);switch(t){case 0:{var a=syscallGetVarargI();if(a<0)return-28;for(;FS.streams[a];)a++;var o;return o=FS.dupStream(n,a),o.fd}case 1:case 2:return 0;case 3:return n.flags;case 4:{var a=syscallGetVarargI();return n.flags|=a,0}case 12:{var a=syscallGetVarargP(),l=0;return HEAP16[a+l>>>1>>>0]=2,0}case 13:case 14:return 0}return-28}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_fcntl64.sig="iiip";function ___syscall_fdatasync(e){try{var t=SYSCALLS.getStreamFromFD(e);return 0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_fdatasync.sig="ii";function ___syscall_fstat64(e,t){t>>>=0;try{var r=SYSCALLS.getStreamFromFD(e);return SYSCALLS.doStat(FS.stat,r.path,t)}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_fstat64.sig="iip";function ___syscall_statfs64(e,t,r){e>>>=0,r>>>=0;try{return e=SYSCALLS.getStr(e),HEAP32[r+4>>>2>>>0]=4096,HEAP32[r+40>>>2>>>0]=4096,HEAP32[r+8>>>2>>>0]=1e6,HEAP32[r+12>>>2>>>0]=5e5,HEAP32[r+16>>>2>>>0]=5e5,HEAP32[r+20>>>2>>>0]=FS.nextInode,HEAP32[r+24>>>2>>>0]=1e6,HEAP32[r+28>>>2>>>0]=42,HEAP32[r+44>>>2>>>0]=2,HEAP32[r+36>>>2>>>0]=255,0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_statfs64.sig="ippp";function ___syscall_fstatfs64(e,t,r){t>>>=0,r>>>=0;try{var n=SYSCALLS.getStreamFromFD(e);return ___syscall_statfs64(0,t,r)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_fstatfs64.sig="iipp";function ___syscall_ftruncate64(e,t,r){var n=convertI32PairToI53Checked(t,r);try{return isNaN(n)?61:(FS.ftruncate(e,n),0)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_ftruncate64.sig="iiii";var stringToUTF8=(e,t,r)=>stringToUTF8Array(e,HEAPU8,t,r);function ___syscall_getcwd(e,t){e>>>=0,t>>>=0;try{if(t===0)return-28;var r=FS.cwd(),n=lengthBytesUTF8(r)+1;return t"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_getcwd.sig="ipp";function ___syscall_getdents64(e,t,r){t>>>=0,r>>>=0;try{var n=SYSCALLS.getStreamFromFD(e);n.getdents||(n.getdents=FS.readdir(n.path));for(var a=280,o=0,l=FS.llseek(n,0,1),u=Math.floor(l/a);u>>0,(tempDouble=_,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+o>>>2>>>0]=tempI64[0],HEAP32[t+o+4>>>2>>>0]=tempI64[1],tempI64=[(u+1)*a>>>0,(tempDouble=(u+1)*a,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+o+8>>>2>>>0]=tempI64[0],HEAP32[t+o+12>>>2>>>0]=tempI64[1],HEAP16[t+o+16>>>1>>>0]=280,HEAP8[t+o+18>>>0]=d,stringToUTF8(p,t+o+19,256),o+=a,u+=1}return FS.llseek(n,u*a,0),o}catch(h){if(typeof FS>"u"||h.name!=="ErrnoError")throw h;return-h.errno}}___syscall_getdents64.sig="iipp";function ___syscall_getpeername(e,t,r,n,a,o){t>>>=0,r>>>=0;try{var l=getSocketFromFD(e);if(!l.daddr)return-53;var u=writeSockaddr(t,l.family,DNS.lookup_name(l.daddr),l.dport,r);return 0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_getpeername.sig="iippiii";function ___syscall_getsockname(e,t,r,n,a,o){t>>>=0,r>>>=0;try{var l=getSocketFromFD(e),u=writeSockaddr(t,l.family,DNS.lookup_name(l.saddr||"0.0.0.0"),l.sport,r);return 0}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_getsockname.sig="iippiii";function ___syscall_getsockopt(e,t,r,n,a,o){n>>>=0,a>>>=0;try{var l=getSocketFromFD(e);return t===1&&r===4?(HEAP32[n>>>2>>>0]=l.error,HEAP32[a>>>2>>>0]=4,l.error=null,0):-50}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_getsockopt.sig="iiiippi";function ___syscall_ioctl(e,t,r){r>>>=0,SYSCALLS.varargs=r;try{var n=SYSCALLS.getStreamFromFD(e);switch(t){case 21509:return n.tty?0:-59;case 21505:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var a=n.tty.ops.ioctl_tcgets(n),o=syscallGetVarargP();HEAP32[o>>>2>>>0]=a.c_iflag||0,HEAP32[o+4>>>2>>>0]=a.c_oflag||0,HEAP32[o+8>>>2>>>0]=a.c_cflag||0,HEAP32[o+12>>>2>>>0]=a.c_lflag||0;for(var l=0;l<32;l++)HEAP8[o+l+17>>>0]=a.c_cc[l]||0;return 0}return 0}case 21510:case 21511:case 21512:return n.tty?0:-59;case 21506:case 21507:case 21508:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){for(var o=syscallGetVarargP(),u=HEAP32[o>>>2>>>0],_=HEAP32[o+4>>>2>>>0],d=HEAP32[o+8>>>2>>>0],p=HEAP32[o+12>>>2>>>0],f=[],l=0;l<32;l++)f.push(HEAP8[o+l+17>>>0]);return n.tty.ops.ioctl_tcsets(n.tty,t,{c_iflag:u,c_oflag:_,c_cflag:d,c_lflag:p,c_cc:f})}return 0}case 21519:{if(!n.tty)return-59;var o=syscallGetVarargP();return HEAP32[o>>>2>>>0]=0,0}case 21520:return n.tty?-28:-59;case 21531:{var o=syscallGetVarargP();return FS.ioctl(n,t,o)}case 21523:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var m=n.tty.ops.ioctl_tiocgwinsz(n.tty),o=syscallGetVarargP();HEAP16[o>>>1>>>0]=m[0],HEAP16[o+2>>>1>>>0]=m[1]}return 0}case 21524:return n.tty?0:-59;case 21515:return n.tty?0:-59;default:return-28}}catch(h){if(typeof FS>"u"||h.name!=="ErrnoError")throw h;return-h.errno}}___syscall_ioctl.sig="iiip";function ___syscall_listen(e,t){try{var r=getSocketFromFD(e);return r.sock_ops.listen(r,t),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_listen.sig="iiiiiii";function ___syscall_lstat64(e,t){e>>>=0,t>>>=0;try{return e=SYSCALLS.getStr(e),SYSCALLS.doStat(FS.lstat,e,t)}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_lstat64.sig="ipp";function ___syscall_mkdirat(e,t,r){t>>>=0;try{return t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),t=PATH.normalize(t),t[t.length-1]==="/"&&(t=t.substr(0,t.length-1)),FS.mkdir(t,r,0),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_mkdirat.sig="iipi";function ___syscall_mknodat(e,t,r,n){t>>>=0;try{switch(t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),r&61440){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return FS.mknod(t,r,n),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_mknodat.sig="iipii";function ___syscall_newfstatat(e,t,r,n){t>>>=0,r>>>=0;try{t=SYSCALLS.getStr(t);var a=n&256,o=n&4096;return n=n&-6401,t=SYSCALLS.calculateAt(e,t,o),SYSCALLS.doStat(a?FS.lstat:FS.stat,t,r)}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return-l.errno}}___syscall_newfstatat.sig="iippi";function ___syscall_openat(e,t,r,n){t>>>=0,n>>>=0,SYSCALLS.varargs=n;try{t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t);var a=n?syscallGetVarargI():0;return FS.open(t,r,a).fd}catch(o){if(typeof FS>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}___syscall_openat.sig="iipip";var PIPEFS={BUCKET_BUFFER_SIZE:8192,mount(e){return FS.createNode(null,"/",16895,0)},createPipe(){var e={buckets:[],refcnt:2};e.buckets.push({buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var t=PIPEFS.nextname(),r=PIPEFS.nextname(),n=FS.createNode(PIPEFS.root,t,4096,0),a=FS.createNode(PIPEFS.root,r,4096,0);n.pipe=e,a.pipe=e;var o=FS.createStream({path:t,node:n,flags:0,seekable:!1,stream_ops:PIPEFS.stream_ops});n.stream=o;var l=FS.createStream({path:r,node:a,flags:1,seekable:!1,stream_ops:PIPEFS.stream_ops});return a.stream=l,{readable_fd:o.fd,writable_fd:l.fd}},stream_ops:{poll(e){var t=e.node.pipe;if((e.flags&2097155)===1)return 260;if(t.buckets.length>0)for(var r=0;r0)return 65}return 0},ioctl(e,t,r){return 28},fsync(e){return 28},read(e,t,r,n,a){for(var o=e.node.pipe,l=0,u=0;u=u)return _.buffer.set(l,_.offset),_.offset+=u,u;d>0&&(_.buffer.set(l.subarray(0,d),_.offset),_.offset+=d,l=l.subarray(d,l.byteLength));for(var p=l.byteLength/PIPEFS.BUCKET_BUFFER_SIZE|0,f=l.byteLength%PIPEFS.BUCKET_BUFFER_SIZE,m=0;m0){var h={buffer:new Uint8Array(PIPEFS.BUCKET_BUFFER_SIZE),offset:l.byteLength,roffset:0};o.buckets.push(h),h.buffer.set(l)}return u},close(e){var t=e.node.pipe;t.refcnt--,t.refcnt===0&&(t.buckets=null)}},nextname(){return PIPEFS.nextname.current||(PIPEFS.nextname.current=0),"pipe["+PIPEFS.nextname.current+++"]"}};function ___syscall_pipe(e){e>>>=0;try{if(e==0)throw new FS.ErrnoError(21);var t=PIPEFS.createPipe();return HEAP32[e>>>2>>>0]=t.readable_fd,HEAP32[e+4>>>2>>>0]=t.writable_fd,0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_pipe.sig="ip";function ___syscall_poll(e,t,r){e>>>=0;try{for(var n=0,a=0;a>>2>>>0],u=HEAP16[o+4>>>1>>>0],_=32,d=FS.getStream(l);d&&(_=SYSCALLS.DEFAULT_POLLMASK,d.stream_ops.poll&&(_=d.stream_ops.poll(d,-1))),_&=u|8|16,_&&n++,HEAP16[o+6>>>1>>>0]=_}return n}catch(p){if(typeof FS>"u"||p.name!=="ErrnoError")throw p;return-p.errno}}___syscall_poll.sig="ipii";function ___syscall_readlinkat(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;try{if(t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),n<=0)return-28;var a=FS.readlink(t),o=Math.min(n,lengthBytesUTF8(a)),l=HEAP8[r+o>>>0];return stringToUTF8(a,r,n+1),HEAP8[r+o>>>0]=l,o}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}___syscall_readlinkat.sig="iippp";function ___syscall_recvfrom(e,t,r,n,a,o){t>>>=0,r>>>=0,a>>>=0,o>>>=0;try{var l=getSocketFromFD(e),u=l.sock_ops.recvmsg(l,r);if(!u)return 0;if(a)var _=writeSockaddr(a,l.family,DNS.lookup_name(u.addr),u.port,o);return HEAPU8.set(u.buffer,t>>>0),u.buffer.byteLength}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_recvfrom.sig="iippipp";function ___syscall_recvmsg(e,t,r,n,a,o){t>>>=0;try{for(var l=getSocketFromFD(e),u=HEAPU32[t+8>>>2>>>0],_=HEAP32[t+12>>>2>>>0],d=0,p=0;p<_;p++)d+=HEAP32[u+(8*p+4)>>>2>>>0];var f=l.sock_ops.recvmsg(l,d);if(!f)return 0;var m=HEAPU32[t>>>2>>>0];if(m)var h=writeSockaddr(m,l.family,DNS.lookup_name(f.addr),f.port);for(var g=0,b=f.buffer.byteLength,p=0;b>0&&p<_;p++){var v=HEAPU32[u+(8*p+0)>>>2>>>0],S=HEAP32[u+(8*p+4)>>>2>>>0];if(S){var L=Math.min(S,b),T=f.buffer.subarray(g,g+L);HEAPU8.set(T,v+g>>>0),g+=L,b-=L}}return g}catch(A){if(typeof FS>"u"||A.name!=="ErrnoError")throw A;return-A.errno}}___syscall_recvmsg.sig="iipiiii";function ___syscall_renameat(e,t,r,n){t>>>=0,n>>>=0;try{return t=SYSCALLS.getStr(t),n=SYSCALLS.getStr(n),t=SYSCALLS.calculateAt(e,t),n=SYSCALLS.calculateAt(r,n),FS.rename(t,n),0}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_renameat.sig="iipip";function ___syscall_rmdir(e){e>>>=0;try{return e=SYSCALLS.getStr(e),FS.rmdir(e),0}catch(t){if(typeof FS>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}___syscall_rmdir.sig="ip";function ___syscall_sendmsg(e,t,r,n,a,o){t>>>=0;try{var l=getSocketFromFD(e),u=HEAPU32[t+8>>>2>>>0],_=HEAP32[t+12>>>2>>>0],d,p,f=HEAPU32[t>>>2>>>0],m=HEAP32[t+4>>>2>>>0];if(f){var h=readSockaddr(f,m);if(h.errno)return-h.errno;p=h.port,d=DNS.lookup_addr(h.addr)||h.addr}for(var g=0,b=0;b<_;b++)g+=HEAP32[u+(8*b+4)>>>2>>>0];for(var v=new Uint8Array(g),S=0,b=0;b<_;b++)for(var L=HEAPU32[u+(8*b+0)>>>2>>>0],T=HEAP32[u+(8*b+4)>>>2>>>0],A=0;A>>0];return l.sock_ops.sendmsg(l,v,0,g,d,p)}catch(M){if(typeof FS>"u"||M.name!=="ErrnoError")throw M;return-M.errno}}___syscall_sendmsg.sig="iipippi";function ___syscall_sendto(e,t,r,n,a,o){t>>>=0,r>>>=0,a>>>=0,o>>>=0;try{var l=getSocketFromFD(e);if(!a)return FS.write(l.stream,HEAP8,t,r);var u=getSocketAddress(a,o);return l.sock_ops.sendmsg(l,HEAP8,t,r,u.addr,u.port)}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}___syscall_sendto.sig="iippipp";function ___syscall_socket(e,t,r){try{var n=SOCKFS.createSocket(e,t,r);return n.stream.fd}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_socket.sig="iiiiiii";function ___syscall_stat64(e,t){e>>>=0,t>>>=0;try{return e=SYSCALLS.getStr(e),SYSCALLS.doStat(FS.stat,e,t)}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_stat64.sig="ipp";function ___syscall_symlink(e,t){e>>>=0,t>>>=0;try{return e=SYSCALLS.getStr(e),t=SYSCALLS.getStr(t),FS.symlink(e,t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}___syscall_symlink.sig="ipp";function ___syscall_symlinkat(e,t,r){e>>>=0,r>>>=0;try{return r=SYSCALLS.calculateAt(t,r),FS.symlink(e,r),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_symlinkat.sig="ipip";function ___syscall_truncate64(e,t,r){e>>>=0;var n=convertI32PairToI53Checked(t,r);try{return isNaN(n)?61:(e=SYSCALLS.getStr(e),FS.truncate(e,n),0)}catch(a){if(typeof FS>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}___syscall_truncate64.sig="ipii";function ___syscall_unlinkat(e,t,r){t>>>=0;try{return t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t),r===0?FS.unlink(t):r===512?FS.rmdir(t):abort("Invalid flags passed to unlinkat"),0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}___syscall_unlinkat.sig="iipi";var readI53FromI64=e=>HEAPU32[e>>>2>>>0]+HEAP32[e+4>>>2>>>0]*4294967296;function ___syscall_utimensat(e,t,r,n){t>>>=0,r>>>=0;try{t=SYSCALLS.getStr(t),t=SYSCALLS.calculateAt(e,t,!0);var a=Date.now(),o,l;if(!r)o=a,l=a;else{var u=readI53FromI64(r),_=HEAP32[r+8>>>2>>>0];_==1073741823?o=a:_==1073741822?o=-1:o=u*1e3+_/1e6,r+=16,u=readI53FromI64(r),_=HEAP32[r+8>>>2>>>0],_==1073741823?l=a:_==1073741822?l=-1:l=u*1e3+_/1e6}return(l!=-1||o!=-1)&&FS.utime(t,o,l),0}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}___syscall_utimensat.sig="iippi";var ___table_base=new WebAssembly.Global({value:"i32",mutable:!1},1),__abort_js=()=>{abort("")};__abort_js.sig="v";var ENV={},stackAlloc=e=>__emscripten_stack_alloc(e),stringToUTF8OnStack=e=>{var t=lengthBytesUTF8(e)+1,r=stackAlloc(t);return stringToUTF8(e,r,t),r},dlSetError=e=>{var t=stackSave(),r=stringToUTF8OnStack(e);___dl_seterr(r,0),stackRestore(t)},dlopenInternal=(e,t)=>{var r=UTF8ToString(e+36),n=HEAP32[e+4>>>2>>>0];r=PATH.normalize(r);var a=!!(n&256),o=a?null:{},l={global:a,nodelete:!!(n&4096),loadAsync:t.loadAsync};if(t.loadAsync)return loadDynamicLibrary(r,l,o,e);try{return loadDynamicLibrary(r,l,o,e)}catch(u){return dlSetError("Could not load dynamic lib: ".concat(r,` +`).concat(u)),0}};function __dlopen_js(e){return e>>>=0,dlopenInternal(e,{loadAsync:!1})}__dlopen_js.sig="pp";function __dlsym_js(e,t,r){e>>>=0,t>>>=0,r>>>=0,t=UTF8ToString(t);var n,a,o=LDSO.loadedLibsByHandle[e];if(!o.exports.hasOwnProperty(t)||o.exports[t].stub)return dlSetError('Tried to lookup unknown symbol "'.concat(t,'" in dynamic lib: ').concat(o.name)),0;a=Object.keys(o.exports).indexOf(t);var l="orig$"+t;if(n=o.exports[l],n?a=Object.keys(o.exports).indexOf(l):n=o.exports[t],typeof n=="function"){var u=getFunctionAddress(n);u?n=u:(n=addFunction(n,n.sig),HEAPU32[r>>>2>>>0]=a)}return n}__dlsym_js.sig="pppp";function __embind_register_bigint(e,t,r,n,a){}__embind_register_bigint.sig="vpppiiii";var embind_init_charCodes=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);embind_charCodes=e},embind_charCodes,readLatin1String=e=>{for(var t="",r=e;HEAPU8[r>>>0];)t+=embind_charCodes[HEAPU8[r++>>>0]];return t},awaitingDependencies={},registeredTypes={},typeDependencies={},BindingError,throwBindingError=e=>{throw new BindingError(e)},InternalError,throwInternalError=e=>{throw new InternalError(e)},whenDependentTypesAreResolved=(e,t,r)=>{e.forEach(u=>typeDependencies[u]=t);function n(u){var _=r(u);_.length!==e.length&&throwInternalError("Mismatched type converter count");for(var d=0;d{registeredTypes.hasOwnProperty(u)?a[_]=registeredTypes[u]:(o.push(u),awaitingDependencies.hasOwnProperty(u)||(awaitingDependencies[u]=[]),awaitingDependencies[u].push(()=>{a[_]=registeredTypes[u],++l,l===o.length&&n(a)}))}),o.length===0&&n(a)};function sharedRegisterType(e,t,r={}){var n=t.name;if(e||throwBindingError('type "'.concat(n,'" must have a positive integer typeid pointer')),registeredTypes.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;throwBindingError("Cannot register type '".concat(n,"' twice"))}if(registeredTypes[e]=t,delete typeDependencies[e],awaitingDependencies.hasOwnProperty(e)){var a=awaitingDependencies[e];delete awaitingDependencies[e],a.forEach(o=>o())}}function registerType(e,t,r={}){return sharedRegisterType(e,t,r)}var GenericWireTypeSize=8;function __embind_register_bool(e,t,r,n){e>>>=0,t>>>=0,t=readLatin1String(t),registerType(e,{name:t,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:GenericWireTypeSize,readValueFromPointer:function(a){return this.fromWireType(HEAPU8[a>>>0])},destructorFunction:null})}__embind_register_bool.sig="vppii";var emval_freelist=[],emval_handles=[];function __emval_decref(e){e>>>=0,e>9&&--emval_handles[e+1]===0&&(emval_handles[e]=void 0,emval_freelist.push(e))}__emval_decref.sig="vp";var count_emval_handles=()=>emval_handles.length/2-5-emval_freelist.length,init_emval=()=>{emval_handles.push(0,1,void 0,1,null,1,!0,1,!1,1),Module.count_emval_handles=count_emval_handles},Emval={toValue:e=>(e||throwBindingError("Cannot use deleted val. handle = "+e),emval_handles[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=emval_freelist.pop()||emval_handles.length;return emval_handles[t]=e,emval_handles[t+1]=1,t}}}};function readPointer(e){return this.fromWireType(HEAPU32[e>>>2>>>0])}var EmValType={name:"emscripten::val",fromWireType:e=>{var t=Emval.toValue(e);return __emval_decref(e),t},toWireType:(e,t)=>Emval.toHandle(t),argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction:null};function __embind_register_emval(e){return e>>>=0,registerType(e,EmValType)}__embind_register_emval.sig="vp";var embindRepr=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},floatReadValueFromPointer=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(HEAPF32[r>>>2>>>0])};case 8:return function(r){return this.fromWireType(HEAPF64[r>>>3>>>0])};default:throw new TypeError("invalid float width (".concat(t,"): ").concat(e))}},__embind_register_float=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,t=readLatin1String(t),registerType(e,{name:t,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:GenericWireTypeSize,readValueFromPointer:floatReadValueFromPointer(t,r),destructorFunction:null})};__embind_register_float.sig="vppp";var integerReadValueFromPointer=(e,t,r)=>{switch(t){case 1:return r?n=>HEAP8[n>>>0]:n=>HEAPU8[n>>>0];case 2:return r?n=>HEAP16[n>>>1>>>0]:n=>HEAPU16[n>>>1>>>0];case 4:return r?n=>HEAP32[n>>>2>>>0]:n=>HEAPU32[n>>>2>>>0];default:throw new TypeError("invalid integer width (".concat(t,"): ").concat(e))}};function __embind_register_integer(e,t,r,n,a){e>>>=0,t>>>=0,r>>>=0,t=readLatin1String(t);var o=p=>p;if(n===0){var l=32-8*r;o=p=>p<>>l}var u=t.includes("unsigned"),_=(p,f)=>{},d;u?d=function(p,f){return _(f,this.name),f>>>0}:d=function(p,f){return _(f,this.name),f},registerType(e,{name:t,fromWireType:o,toWireType:d,argPackAdvance:GenericWireTypeSize,readValueFromPointer:integerReadValueFromPointer(t,r,n!==0),destructorFunction:null})}__embind_register_integer.sig="vpppii";function __embind_register_memory_view(e,t,r){e>>>=0,r>>>=0;var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[t];function o(l){var u=HEAPU32[l>>>2>>>0],_=HEAPU32[l+4>>>2>>>0];return new a(HEAP8.buffer,_,u)}r=readLatin1String(r),registerType(e,{name:r,fromWireType:o,argPackAdvance:GenericWireTypeSize,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}__embind_register_memory_view.sig="vpip";function __embind_register_std_string(e,t){e>>>=0,t>>>=0,t=readLatin1String(t);var r=t==="std::string";registerType(e,{name:t,fromWireType(n){var a=HEAPU32[n>>>2>>>0],o=n+4,l;if(r)for(var u=o,_=0;_<=a;++_){var d=o+_;if(_==a||HEAPU8[d>>>0]==0){var p=d-u,f=UTF8ToString(u,p);l===void 0?l=f:(l+="\0",l+=f),u=d+1}}else{for(var m=new Array(a),_=0;_>>0]);l=m.join("")}return _free(n),l},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,l=typeof a=="string";l||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||throwBindingError("Cannot pass non-string to std::string"),r&&l?o=lengthBytesUTF8(a):o=a.length;var u=_malloc(4+o+1),_=u+4;if(HEAPU32[u>>>2>>>0]=o,r&&l)stringToUTF8(a,_,o+1);else if(l)for(var d=0;d255&&(_free(_),throwBindingError("String has UTF-16 code units that do not fit in 8 bits")),HEAPU8[_+d>>>0]=p}else for(var d=0;d>>0]=a[d];return n!==null&&n.push(_free,u),u},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction(n){_free(n)}})}__embind_register_std_string.sig="vpp";var UTF16Decoder=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,UTF16ToString=(e,t)=>{for(var r=e,n=r>>1,a=n+t/2;!(n>=a)&&HEAPU16[n>>>0];)++n;if(r=n<<1,r-e>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(e>>>0,r>>>0));for(var o="",l=0;!(l>=t/2);++l){var u=HEAP16[e+l*2>>>1>>>0];if(u==0)break;o+=String.fromCharCode(u)}return o},stringToUTF16=(e,t,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=t,a=r>>1>>>0]=l,t+=2}return HEAP16[t>>>1>>>0]=0,t-n},lengthBytesUTF16=e=>e.length*2,UTF32ToString=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var a=HEAP32[e+r*4>>>2>>>0];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},stringToUTF32=(e,t,r)=>{if(t>>>=0,r!=null||(r=2147483647),r<4)return 0;for(var n=t,a=n+r-4,o=0;o=55296&&l<=57343){var u=e.charCodeAt(++o);l=65536+((l&1023)<<10)|u&1023}if(HEAP32[t>>>2>>>0]=l,t+=4,t+4>a)break}return HEAP32[t>>>2>>>0]=0,t-n},lengthBytesUTF32=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},__embind_register_std_wstring=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,r=readLatin1String(r);var n,a,o,l;t===2?(n=UTF16ToString,a=stringToUTF16,l=lengthBytesUTF16,o=u=>HEAPU16[u>>>1>>>0]):t===4&&(n=UTF32ToString,a=stringToUTF32,l=lengthBytesUTF32,o=u=>HEAPU32[u>>>2>>>0]),registerType(e,{name:r,fromWireType:u=>{for(var _=HEAPU32[u>>>2>>>0],d,p=u+4,f=0;f<=_;++f){var m=u+4+f*t;if(f==_||o(m)==0){var h=m-p,g=n(p,h);d===void 0?d=g:(d+="\0",d+=g),p=m+t}}return _free(u),d},toWireType:(u,_)=>{typeof _!="string"&&throwBindingError("Cannot pass non-string to C++ string type ".concat(r));var d=l(_),p=_malloc(4+d+t);return HEAPU32[p>>>2>>>0]=d/t,a(_,p+4,d+t),u!==null&&u.push(_free,p),p},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction(u){_free(u)}})};__embind_register_std_wstring.sig="vppp";var __embind_register_void=function(e,t){e>>>=0,t>>>=0,t=readLatin1String(t),registerType(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})};__embind_register_void.sig="vpp";var handleException=e=>{if(e instanceof ExitStatus||e=="unwind")return EXITSTATUS;quit_(1,e)},runtimeKeepaliveCounter=0,keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0,_proc_exit=e=>{var t;EXITSTATUS=e,keepRuntimeAlive()||((t=Module.onExit)==null||t.call(Module,e),ABORT=!0),quit_(e,new ExitStatus(e))};_proc_exit.sig="vi";var exitJS=(e,t)=>{EXITSTATUS=e,_proc_exit(e)},_exit=exitJS;_exit.sig="vi";var maybeExit=()=>{if(!keepRuntimeAlive())try{_exit(EXITSTATUS)}catch(e){handleException(e)}},callUserCallback=e=>{if(!ABORT)try{e(),maybeExit()}catch(t){handleException(t)}};function __emscripten_dlopen_js(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;function a(u){var _=UTF8ToString(e+36);dlSetError("'Could not load dynamic lib: ".concat(_,` +`).concat(u)),callUserCallback(()=>getWasmTableEntry(r)(e,n))}function o(){callUserCallback(()=>getWasmTableEntry(t)(e,n))}var l=dlopenInternal(e,{loadAsync:!0});l?l.then(o,a):a()}__emscripten_dlopen_js.sig="vpppp";var nowIsMonotonic=1,__emscripten_get_now_is_monotonic=()=>nowIsMonotonic;__emscripten_get_now_is_monotonic.sig="i";var getExecutableName=()=>thisProgram||"./this.program";function __emscripten_get_progname(e,t){e>>>=0,stringToUTF8(getExecutableName(),e,t)}__emscripten_get_progname.sig="vpi";function __emscripten_lookup_name(e){e>>>=0;var t=UTF8ToString(e);return inetPton4(DNS.lookup_name(t))}__emscripten_lookup_name.sig="ip";function __emscripten_memcpy_js(e,t,r){return e>>>=0,t>>>=0,r>>>=0,HEAPU8.copyWithin(e>>>0,t>>>0,t+r>>>0)}__emscripten_memcpy_js.sig="vppp";var __emscripten_runtime_keepalive_clear=()=>{noExitRuntime=!1,runtimeKeepaliveCounter=0};__emscripten_runtime_keepalive_clear.sig="v";function __emscripten_set_offscreencanvas_size(e,t,r){return-1}__emscripten_set_offscreencanvas_size.sig="ipii";function __emscripten_system(e){if(e>>>=0,ENVIRONMENT_IS_NODE){if(!e)return 1;var t=UTF8ToString(e);if(!t.length)return 0;var r=["child_process"].map(ki),n=r.spawnSync(t,[],{shell:!0,stdio:"inherit"}),a=(l,u)=>l<<8|u;if(n.status===null){var o=l=>{switch(l){case"SIGHUP":return 1;case"SIGQUIT":return 3;case"SIGFPE":return 8;case"SIGKILL":return 9;case"SIGALRM":return 14;case"SIGTERM":return 15;default:return 2}};return a(0,o(n.signal))}return a(n.status,0)}return e?-52:0}__emscripten_system.sig="ip";var __emscripten_throw_longjmp=()=>{throw 1/0};__emscripten_throw_longjmp.sig="v";function __gmtime_js(e,t,r){var n=convertI32PairToI53Checked(e,t);r>>>=0;var a=new Date(n*1e3);HEAP32[r>>>2>>>0]=a.getUTCSeconds(),HEAP32[r+4>>>2>>>0]=a.getUTCMinutes(),HEAP32[r+8>>>2>>>0]=a.getUTCHours(),HEAP32[r+12>>>2>>>0]=a.getUTCDate(),HEAP32[r+16>>>2>>>0]=a.getUTCMonth(),HEAP32[r+20>>>2>>>0]=a.getUTCFullYear()-1900,HEAP32[r+24>>>2>>>0]=a.getUTCDay();var o=Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0),l=(a.getTime()-o)/(1e3*60*60*24)|0;HEAP32[r+28>>>2>>>0]=l}__gmtime_js.sig="viip";var isLeapYear=e=>e%4===0&&(e%100!==0||e%400===0),MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335],MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334],ydayFromDate=e=>{var t=isLeapYear(e.getFullYear()),r=t?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE,n=r[e.getMonth()]+e.getDate()-1;return n};function __localtime_js(e,t,r){var n=convertI32PairToI53Checked(e,t);r>>>=0;var a=new Date(n*1e3);HEAP32[r>>>2>>>0]=a.getSeconds(),HEAP32[r+4>>>2>>>0]=a.getMinutes(),HEAP32[r+8>>>2>>>0]=a.getHours(),HEAP32[r+12>>>2>>>0]=a.getDate(),HEAP32[r+16>>>2>>>0]=a.getMonth(),HEAP32[r+20>>>2>>>0]=a.getFullYear()-1900,HEAP32[r+24>>>2>>>0]=a.getDay();var o=ydayFromDate(a)|0;HEAP32[r+28>>>2>>>0]=o,HEAP32[r+36>>>2>>>0]=-(a.getTimezoneOffset()*60);var l=new Date(a.getFullYear(),0,1),u=new Date(a.getFullYear(),6,1).getTimezoneOffset(),_=l.getTimezoneOffset(),d=(u!=_&&a.getTimezoneOffset()==Math.min(_,u))|0;HEAP32[r+32>>>2>>>0]=d}__localtime_js.sig="viip";var __mktime_js=function(e){e>>>=0;var t=(()=>{var r=new Date(HEAP32[e+20>>>2>>>0]+1900,HEAP32[e+16>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+8>>>2>>>0],HEAP32[e+4>>>2>>>0],HEAP32[e>>>2>>>0],0),n=HEAP32[e+32>>>2>>>0],a=r.getTimezoneOffset(),o=new Date(r.getFullYear(),0,1),l=new Date(r.getFullYear(),6,1).getTimezoneOffset(),u=o.getTimezoneOffset(),_=Math.min(u,l);if(n<0)HEAP32[e+32>>>2>>>0]=+(l!=u&&_==a);else if(n>0!=(_==a)){var d=Math.max(u,l),p=n>0?_:d;r.setTime(r.getTime()+(p-a)*6e4)}HEAP32[e+24>>>2>>>0]=r.getDay();var f=ydayFromDate(r)|0;HEAP32[e+28>>>2>>>0]=f,HEAP32[e>>>2>>>0]=r.getSeconds(),HEAP32[e+4>>>2>>>0]=r.getMinutes(),HEAP32[e+8>>>2>>>0]=r.getHours(),HEAP32[e+12>>>2>>>0]=r.getDate(),HEAP32[e+16>>>2>>>0]=r.getMonth(),HEAP32[e+20>>>2>>>0]=r.getYear();var m=r.getTime();return isNaN(m)?-1:m/1e3})();return setTempRet0((tempDouble=t,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),t>>>0};__mktime_js.sig="ip";function __mmap_js(e,t,r,n,a,o,l,u){e>>>=0;var _=convertI32PairToI53Checked(a,o);l>>>=0,u>>>=0;try{if(isNaN(_))return 61;var d=SYSCALLS.getStreamFromFD(n),p=FS.mmap(d,e,_,t,r),f=p.ptr;return HEAP32[l>>>2>>>0]=p.allocated,HEAPU32[u>>>2>>>0]=f,0}catch(m){if(typeof FS>"u"||m.name!=="ErrnoError")throw m;return-m.errno}}__mmap_js.sig="ipiiiiipp";function __msync_js(e,t,r,n,a,o,l){e>>>=0,t>>>=0;var u=convertI32PairToI53Checked(o,l);try{return isNaN(u)?61:(SYSCALLS.doMsync(e,SYSCALLS.getStreamFromFD(a),t,n,u),0)}catch(_){if(typeof FS>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}__msync_js.sig="ippiiiii";function __munmap_js(e,t,r,n,a,o,l){e>>>=0,t>>>=0;var u=convertI32PairToI53Checked(o,l);try{var _=SYSCALLS.getStreamFromFD(a);r&2&&SYSCALLS.doMsync(e,_,t,n,u)}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}__munmap_js.sig="ippiiiii";var timers={},_emscripten_get_now=()=>performance.now();_emscripten_get_now.sig="d";var __setitimer_js=(e,t)=>{if(timers[e]&&(clearTimeout(timers[e].id),delete timers[e]),!t)return 0;var r=setTimeout(()=>{delete timers[e],callUserCallback(()=>__emscripten_timeout(e,_emscripten_get_now()))},t);return timers[e]={id:r,timeout_ms:t},0};__setitimer_js.sig="iid";var __timegm_js=function(e){e>>>=0;var t=(()=>{var r=Date.UTC(HEAP32[e+20>>>2>>>0]+1900,HEAP32[e+16>>>2>>>0],HEAP32[e+12>>>2>>>0],HEAP32[e+8>>>2>>>0],HEAP32[e+4>>>2>>>0],HEAP32[e>>>2>>>0],0),n=new Date(r);HEAP32[e+24>>>2>>>0]=n.getUTCDay();var a=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),o=(n.getTime()-a)/(1e3*60*60*24)|0;return HEAP32[e+28>>>2>>>0]=o,n.getTime()/1e3})();return setTempRet0((tempDouble=t,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)),t>>>0};__timegm_js.sig="ip";var __tzset_js=function(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=new Date().getFullYear(),o=new Date(a,0,1),l=new Date(a,6,1),u=o.getTimezoneOffset(),_=l.getTimezoneOffset(),d=Math.max(u,_);HEAPU32[e>>>2>>>0]=d*60,HEAP32[t>>>2>>>0]=+(u!=_);var p=h=>{var g=h>=0?"-":"+",b=Math.abs(h),v=String(Math.floor(b/60)).padStart(2,"0"),S=String(b%60).padStart(2,"0");return"UTC".concat(g).concat(v).concat(S)},f=p(u),m=p(_);_{if(MainLoop.timingMode=e,MainLoop.timingValue=t,!MainLoop.func)return 1;if(MainLoop.running||(MainLoop.running=!0),e==0)MainLoop.scheduler=function(){var o=Math.max(0,MainLoop.tickStartTime+t-_emscripten_get_now())|0;setTimeout(MainLoop.runner,o)},MainLoop.method="timeout";else if(e==1)MainLoop.scheduler=function(){MainLoop.requestAnimationFrame(MainLoop.runner)},MainLoop.method="rAF";else if(e==2){if(typeof MainLoop.setImmediate>"u")if(typeof setImmediate>"u"){var r=[],n="setimmediate",a=o=>{(o.data===n||o.data.target===n)&&(o.stopPropagation(),r.shift()())};addEventListener("message",a,!0),MainLoop.setImmediate=o=>{r.push(o),ENVIRONMENT_IS_WORKER?(Module.setImmediates!=null||(Module.setImmediates=[]),Module.setImmediates.push(o),postMessage({target:n})):postMessage(n,"*")}}else MainLoop.setImmediate=setImmediate;MainLoop.scheduler=function(){MainLoop.setImmediate(MainLoop.runner)},MainLoop.method="immediate"}return 0};_emscripten_set_main_loop_timing.sig="iii";var setMainLoop=(e,t,r,n,a)=>{MainLoop.func=e,MainLoop.arg=n;var o=MainLoop.currentlyRunningMainloop;function l(){return o0){var u=MainLoop.queue.shift();if(u.func(u.arg),MainLoop.remainingBlockers){var _=MainLoop.remainingBlockers,d=_%1==0?_-1:Math.floor(_);u.counted?MainLoop.remainingBlockers=d:(d=d+.5,MainLoop.remainingBlockers=(8*_+d)/9)}if(MainLoop.updateStatus(),!l())return;setTimeout(MainLoop.runner,0);return}if(l()){if(MainLoop.currentFrameNumber=MainLoop.currentFrameNumber+1|0,MainLoop.timingMode==1&&MainLoop.timingValue>1&&MainLoop.currentFrameNumber%MainLoop.timingValue!=0){MainLoop.scheduler();return}else MainLoop.timingMode==0&&(MainLoop.tickStartTime=_emscripten_get_now());MainLoop.runIter(e),l()&&MainLoop.scheduler()}}},a||(t&&t>0?_emscripten_set_main_loop_timing(0,1e3/t):_emscripten_set_main_loop_timing(1,1),MainLoop.scheduler()),r)throw"unwind"},MainLoop={running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],preMainLoop:[],postMainLoop:[],pause(){MainLoop.scheduler=null,MainLoop.currentlyRunningMainloop++},resume(){MainLoop.currentlyRunningMainloop++;var e=MainLoop.timingMode,t=MainLoop.timingValue,r=MainLoop.func;MainLoop.func=null,setMainLoop(r,0,!1,MainLoop.arg,!0),_emscripten_set_main_loop_timing(e,t),MainLoop.scheduler()},updateStatus(){var e,t;if(Module.setStatus){var r=Module.statusMessage||"Please wait...",n=(e=MainLoop.remainingBlockers)!=null?e:0,a=(t=MainLoop.expectedBlockers)!=null?t:0;n?n=MainLoop.nextRAF;)MainLoop.nextRAF+=1e3/60;var r=Math.max(MainLoop.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame(e){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(e);return}var t=MainLoop.fakeRequestAnimationFrame;t(e)}},AL={QUEUE_INTERVAL:25,QUEUE_LOOKAHEAD:.1,DEVICE_NAME:"Emscripten OpenAL",CAPTURE_DEVICE_NAME:"Emscripten OpenAL capture",ALC_EXTENSIONS:{ALC_SOFT_pause_device:!0,ALC_SOFT_HRTF:!0},AL_EXTENSIONS:{AL_EXT_float32:!0,AL_SOFT_loop_points:!0,AL_SOFT_source_length:!0,AL_EXT_source_distance_model:!0,AL_SOFT_source_spatialize:!0},_alcErr:0,alcErr:0,deviceRefCounts:{},alcStringCache:{},paused:!1,stringCache:{},contexts:{},currentCtx:null,buffers:{0:{id:0,refCount:0,audioBuf:null,frequency:0,bytesPerSample:2,channels:1,length:0}},paramArray:[],_nextId:1,newId:()=>AL.freeIds.length>0?AL.freeIds.pop():AL._nextId++,freeIds:[],scheduleContextAudio:e=>{if(!(MainLoop.timingMode===1&&document.visibilityState!="visible"))for(var t in e.sources)AL.scheduleSourceAudio(e.sources[t])},scheduleSourceAudio:(e,t)=>{if(!(MainLoop.timingMode===1&&document.visibilityState!="visible")&&e.state===4114){for(var r=AL.updateSourceTime(e),n=e.bufStartTime,a=e.bufOffset,o=e.bufsProcessed,l=0;l=e.bufQueue.length)if(e.looping)o%=e.bufQueue.length;else break;var p=e.bufQueue[o%e.bufQueue.length];if(p.length===0){if(d++,d===e.bufQueue.length)break}else{var u=e.context.audioCtx.createBufferSource();u.buffer=p.audioBuf,u.playbackRate.value=e.playbackRate,(p.audioBuf._loopStart||p.audioBuf._loopEnd)&&(u.loopStart=p.audioBuf._loopStart,u.loopEnd=p.audioBuf._loopEnd);var f=0;e.type===4136&&e.looping?(f=Number.POSITIVE_INFINITY,u.loop=!0,p.audioBuf._loopStart&&(u.loopStart=p.audioBuf._loopStart),p.audioBuf._loopEnd&&(u.loopEnd=p.audioBuf._loopEnd)):f=(p.audioBuf.duration-a)/e.playbackRate,u._startOffset=a,u._duration=f,u._skipCount=d,d=0,u.connect(e.gain),typeof u.start<"u"?(n=Math.max(n,e.context.audioCtx.currentTime),u.start(n,a)):typeof u.noteOn<"u"&&(n=Math.max(n,e.context.audioCtx.currentTime),u.noteOn(n)),u._startTime=n,e.audioQueue.push(u),n+=f}a=0,o++}}},updateSourceTime:e=>{var t=e.context.audioCtx.currentTime;if(e.state!==4114)return t;isFinite(e.bufStartTime)||(e.bufStartTime=t-e.bufOffset/e.playbackRate,e.bufOffset=0);for(var r=0;e.audioQueue.length;){var n=e.audioQueue[0];if(e.bufsProcessed+=n._skipCount,r=n._startTime+n._duration,t=e.bufQueue.length&&!e.looping)AL.setSourceState(e,4116);else if(e.type===4136&&e.looping){var a=e.bufQueue[0];if(a.length===0)e.bufOffset=0;else{var o=(t-e.bufStartTime)*e.playbackRate,l=a.audioBuf._loopStart||0,u=a.audioBuf._loopEnd||a.audioBuf.duration;u<=l&&(u=a.audioBuf.duration),o0&&(e.bufStartTime+=Math.floor((t-e.bufStartTime)/_)*_)}for(var d=0;d=e.bufQueue.length)if(e.looping)e.bufsProcessed%=e.bufQueue.length;else{AL.setSourceState(e,4116);break}var a=e.bufQueue[e.bufsProcessed];if(a.length>0){if(r=e.bufStartTime+a.audioBuf.duration/e.playbackRate,t{AL.updateSourceTime(e);for(var t=1;t1&&(e.audioQueue.length=1)},stopSourceAudio:e=>{for(var t=0;t{t===4114?((e.state===4114||e.state==4116)&&(e.bufsProcessed=0,e.bufOffset=0),AL.stopSourceAudio(e),e.state=4114,e.bufStartTime=Number.NEGATIVE_INFINITY,AL.scheduleSourceAudio(e)):t===4115?e.state===4114&&(AL.updateSourceTime(e),AL.stopSourceAudio(e),e.state=4115):t===4116?e.state!==4113&&(e.state=4116,e.bufsProcessed=e.bufQueue.length,e.bufStartTime=Number.NEGATIVE_INFINITY,e.bufOffset=0,AL.stopSourceAudio(e)):t===4113&&e.state!==4113&&(e.state=4113,e.bufsProcessed=0,e.bufStartTime=Number.NEGATIVE_INFINITY,e.bufOffset=0,AL.stopSourceAudio(e))},initSourcePanner:e=>{if(e.type!==4144){for(var t=AL.buffers[0],r=0;r{for(var t in e.sources)AL.updateSourceGlobal(e.sources[t])},updateSourceGlobal:e=>{var t=e.panner;if(t){t.refDistance=e.refDistance,t.maxDistance=e.maxDistance,t.rolloffFactor=e.rolloffFactor,t.panningModel=e.context.hrtf?"HRTF":"equalpower";var r=e.context.sourceDistanceModel?e.distanceModel:e.context.distanceModel;switch(r){case 0:t.distanceModel="inverse",t.refDistance=340282e33;break;case 53249:case 53250:t.distanceModel="inverse";break;case 53251:case 53252:t.distanceModel="linear";break;case 53253:case 53254:t.distanceModel="exponential";break}}},updateListenerSpace:e=>{var t=e.audioCtx.listener;t.positionX?(t.positionX.value=e.listener.position[0],t.positionY.value=e.listener.position[1],t.positionZ.value=e.listener.position[2]):t.setPosition(e.listener.position[0],e.listener.position[1],e.listener.position[2]),t.forwardX?(t.forwardX.value=e.listener.direction[0],t.forwardY.value=e.listener.direction[1],t.forwardZ.value=e.listener.direction[2],t.upX.value=e.listener.up[0],t.upY.value=e.listener.up[1],t.upZ.value=e.listener.up[2]):t.setOrientation(e.listener.direction[0],e.listener.direction[1],e.listener.direction[2],e.listener.up[0],e.listener.up[1],e.listener.up[2]);for(var r in e.sources)AL.updateSourceSpace(e.sources[r])},updateSourceSpace:e=>{if(e.panner){var t=e.panner,r=e.position[0],n=e.position[1],a=e.position[2],o=e.direction[0],l=e.direction[1],u=e.direction[2],_=e.context.listener,d=_.position[0],p=_.position[1],f=_.position[2];if(e.relative){var m=-_.direction[0],h=-_.direction[1],g=-_.direction[2],b=_.up[0],v=_.up[1],S=_.up[2],L=(To,xo,Wn)=>{var Ud=Math.sqrt(To*To+xo*xo+Wn*Wn);return Ud{if(e.state===4114){AL.cancelPendingSourceAudio(e);var t=e.audioQueue[0];if(!t)return;var r;e.type===4136&&e.looping?r=Number.POSITIVE_INFINITY:r=(t.buffer.duration-t._startOffset)/e.playbackRate,t._duration=r,t.playbackRate.value=e.playbackRate,AL.scheduleSourceAudio(e)}},sourceDuration:e=>{for(var t=0,r=0;r{AL.updateSourceTime(e);for(var t=0,r=0;r{var r=e.state==4114;if(r&&AL.setSourceState(e,4113),e.bufQueue[e.bufsProcessed].audioBuf!==null){for(e.bufsProcessed=0;t>e.bufQueue[e.bufsProcessed].audioBuf.duration;)t-=e.bufQueue[e.bufsProcessed].audioBuf.duration,e.bufsProcessed++;e.bufOffset=t}r&&AL.setSourceState(e,4114)},getGlobalParam:(e,t)=>{if(!AL.currentCtx)return null;switch(t){case 49152:return AL.currentCtx.dopplerFactor;case 49155:return AL.currentCtx.speedOfSound;case 53248:return AL.currentCtx.distanceModel;default:return AL.currentCtx.err=40962,null}},setGlobalParam:(e,t,r)=>{if(AL.currentCtx)switch(t){case 49152:if(!Number.isFinite(r)||r<0){AL.currentCtx.err=40963;return}AL.currentCtx.dopplerFactor=r,AL.updateListenerSpace(AL.currentCtx);break;case 49155:if(!Number.isFinite(r)||r<=0){AL.currentCtx.err=40963;return}AL.currentCtx.speedOfSound=r,AL.updateListenerSpace(AL.currentCtx);break;case 53248:switch(r){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:AL.currentCtx.distanceModel=r,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}},getListenerParam:(e,t)=>{if(!AL.currentCtx)return null;switch(t){case 4100:return AL.currentCtx.listener.position;case 4102:return AL.currentCtx.listener.velocity;case 4111:return AL.currentCtx.listener.direction.concat(AL.currentCtx.listener.up);case 4106:return AL.currentCtx.gain.gain.value;default:return AL.currentCtx.err=40962,null}},setListenerParam:(e,t,r)=>{if(AL.currentCtx){if(r===null){AL.currentCtx.err=40962;return}var n=AL.currentCtx.listener;switch(t){case 4100:if(!Number.isFinite(r[0])||!Number.isFinite(r[1])||!Number.isFinite(r[2])){AL.currentCtx.err=40963;return}n.position[0]=r[0],n.position[1]=r[1],n.position[2]=r[2],AL.updateListenerSpace(AL.currentCtx);break;case 4102:if(!Number.isFinite(r[0])||!Number.isFinite(r[1])||!Number.isFinite(r[2])){AL.currentCtx.err=40963;return}n.velocity[0]=r[0],n.velocity[1]=r[1],n.velocity[2]=r[2],AL.updateListenerSpace(AL.currentCtx);break;case 4106:if(!Number.isFinite(r)||r<0){AL.currentCtx.err=40963;return}AL.currentCtx.gain.gain.value=r;break;case 4111:if(!Number.isFinite(r[0])||!Number.isFinite(r[1])||!Number.isFinite(r[2])||!Number.isFinite(r[3])||!Number.isFinite(r[4])||!Number.isFinite(r[5])){AL.currentCtx.err=40963;return}n.direction[0]=r[0],n.direction[1]=r[1],n.direction[2]=r[2],n.up[0]=r[3],n.up[1]=r[4],n.up[2]=r[5],AL.updateListenerSpace(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}}},getBufferParam:(e,t,r)=>{if(AL.currentCtx){var n=AL.buffers[t];if(!n||t===0){AL.currentCtx.err=40961;return}switch(r){case 8193:return n.frequency;case 8194:return n.bytesPerSample*8;case 8195:return n.channels;case 8196:return n.length*n.bytesPerSample*n.channels;case 8213:return n.length===0?[0,0]:[(n.audioBuf._loopStart||0)*n.frequency,(n.audioBuf._loopEnd||n.length)*n.frequency];default:return AL.currentCtx.err=40962,null}}},setBufferParam:(e,t,r,n)=>{if(AL.currentCtx){var a=AL.buffers[t];if(!a||t===0){AL.currentCtx.err=40961;return}if(n===null){AL.currentCtx.err=40962;return}switch(r){case 8196:if(n!==0){AL.currentCtx.err=40963;return}break;case 8213:if(n[0]<0||n[0]>a.length||n[1]<0||n[1]>a.Length||n[0]>=n[1]){AL.currentCtx.err=40963;return}if(a.refCount>0){AL.currentCtx.err=40964;return}a.audioBuf&&(a.audioBuf._loopStart=n[0]/a.frequency,a.audioBuf._loopEnd=n[1]/a.frequency);break;default:AL.currentCtx.err=40962;return}}},getSourceParam:(e,t,r)=>{if(!AL.currentCtx)return null;var n=AL.currentCtx.sources[t];if(!n)return AL.currentCtx.err=40961,null;switch(r){case 514:return n.relative;case 4097:return n.coneInnerAngle;case 4098:return n.coneOuterAngle;case 4099:return n.pitch;case 4100:return n.position;case 4101:return n.direction;case 4102:return n.velocity;case 4103:return n.looping;case 4105:return n.type===4136?n.bufQueue[0].id:0;case 4106:return n.gain.gain.value;case 4109:return n.minGain;case 4110:return n.maxGain;case 4112:return n.state;case 4117:return n.bufQueue.length===1&&n.bufQueue[0].id===0?0:n.bufQueue.length;case 4118:return n.bufQueue.length===1&&n.bufQueue[0].id===0||n.looping?0:n.bufsProcessed;case 4128:return n.refDistance;case 4129:return n.rolloffFactor;case 4130:return n.coneOuterGain;case 4131:return n.maxDistance;case 4132:return AL.sourceTell(n);case 4133:var a=AL.sourceTell(n);return a>0&&(a*=n.bufQueue[0].frequency),a;case 4134:var a=AL.sourceTell(n);return a>0&&(a*=n.bufQueue[0].frequency*n.bufQueue[0].bytesPerSample),a;case 4135:return n.type;case 4628:return n.spatialize;case 8201:for(var o=0,l=0,u=0;u{if(AL.currentCtx){var a=AL.currentCtx.sources[t];if(!a){AL.currentCtx.err=40961;return}if(n===null){AL.currentCtx.err=40962;return}switch(r){case 514:if(n===1)a.relative=!0,AL.updateSourceSpace(a);else if(n===0)a.relative=!1,AL.updateSourceSpace(a);else{AL.currentCtx.err=40963;return}break;case 4097:if(!Number.isFinite(n)){AL.currentCtx.err=40963;return}a.coneInnerAngle=n,a.panner&&(a.panner.coneInnerAngle=n%360);break;case 4098:if(!Number.isFinite(n)){AL.currentCtx.err=40963;return}a.coneOuterAngle=n,a.panner&&(a.panner.coneOuterAngle=n%360);break;case 4099:if(!Number.isFinite(n)||n<=0){AL.currentCtx.err=40963;return}if(a.pitch===n)break;a.pitch=n,AL.updateSourceRate(a);break;case 4100:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.position[0]=n[0],a.position[1]=n[1],a.position[2]=n[2],AL.updateSourceSpace(a);break;case 4101:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.direction[0]=n[0],a.direction[1]=n[1],a.direction[2]=n[2],AL.updateSourceSpace(a);break;case 4102:if(!Number.isFinite(n[0])||!Number.isFinite(n[1])||!Number.isFinite(n[2])){AL.currentCtx.err=40963;return}a.velocity[0]=n[0],a.velocity[1]=n[1],a.velocity[2]=n[2],AL.updateSourceSpace(a);break;case 4103:if(n===1){if(a.looping=!0,AL.updateSourceTime(a),a.type===4136&&a.audioQueue.length>0){var o=a.audioQueue[0];o.loop=!0,o._duration=Number.POSITIVE_INFINITY}}else if(n===0){a.looping=!1;var l=AL.updateSourceTime(a);if(a.type===4136&&a.audioQueue.length>0){var o=a.audioQueue[0];o.loop=!1,o._duration=a.bufQueue[0].audioBuf.duration/a.playbackRate,o._startTime=l-a.bufOffset/a.playbackRate}}else{AL.currentCtx.err=40963;return}break;case 4105:if(a.state===4114||a.state===4115){AL.currentCtx.err=40964;return}if(n===0){for(var u in a.bufQueue)a.bufQueue[u].refCount--;a.bufQueue.length=1,a.bufQueue[0]=AL.buffers[0],a.bufsProcessed=0,a.type=4144}else{var _=AL.buffers[n];if(!_){AL.currentCtx.err=40963;return}for(var u in a.bufQueue)a.bufQueue[u].refCount--;a.bufQueue.length=0,_.refCount++,a.bufQueue=[_],a.bufsProcessed=0,a.type=4136}AL.initSourcePanner(a),AL.scheduleSourceAudio(a);break;case 4106:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.gain.gain.value=n;break;case 4109:if(!Number.isFinite(n)||n<0||n>Math.min(a.maxGain,1)){AL.currentCtx.err=40963;return}a.minGain=n;break;case 4110:if(!Number.isFinite(n)||n1){AL.currentCtx.err=40963;return}a.maxGain=n;break;case 4128:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.refDistance=n,a.panner&&(a.panner.refDistance=n);break;case 4129:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.rolloffFactor=n,a.panner&&(a.panner.rolloffFactor=n);break;case 4130:if(!Number.isFinite(n)||n<0||n>1){AL.currentCtx.err=40963;return}a.coneOuterGain=n,a.panner&&(a.panner.coneOuterGain=n);break;case 4131:if(!Number.isFinite(n)||n<0){AL.currentCtx.err=40963;return}a.maxDistance=n,a.panner&&(a.panner.maxDistance=n);break;case 4132:if(n<0||n>AL.sourceDuration(a)){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4133:var f=AL.sourceDuration(a);if(f>0){var d;for(var p in a.bufQueue)if(p){d=a.bufQueue[p].frequency;break}n/=d}if(n<0||n>f){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4134:var f=AL.sourceDuration(a);if(f>0){var m;for(var p in a.bufQueue)if(p){var _=a.bufQueue[p];m=_.frequency*_.bytesPerSample*_.channels;break}n/=m}if(n<0||n>f){AL.currentCtx.err=40963;return}AL.sourceSeek(a,n);break;case 4628:if(n!==0&&n!==1&&n!==2){AL.currentCtx.err=40963;return}a.spatialize=n,AL.initSourcePanner(a);break;case 8201:case 8202:case 8203:AL.currentCtx.err=40964;break;case 53248:switch(n){case 0:case 53249:case 53250:case 53251:case 53252:case 53253:case 53254:a.distanceModel=n,AL.currentCtx.sourceDistanceModel&&AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40963;return}break;default:AL.currentCtx.err=40962;return}}},captures:{},sharedCaptureAudioCtx:null,requireValidCaptureDevice:(e,t)=>{if(e===0)return AL.alcErr=40961,null;var r=AL.captures[e];if(!r)return AL.alcErr=40961,null;var n=r.mediaStreamError;return n?(AL.alcErr=40961,null):r}},_alBuffer3f=(e,t,r,n,a)=>{AL.setBufferParam("alBuffer3f",e,t,null)};_alBuffer3f.sig="viifff";var _alBuffer3i=(e,t,r,n,a)=>{AL.setBufferParam("alBuffer3i",e,t,null)};_alBuffer3i.sig="viiiii";function _alBufferData(e,t,r,n,a){if(r>>>=0,!!AL.currentCtx){var o=AL.buffers[e];if(!o){AL.currentCtx.err=40963;return}if(a<=0){AL.currentCtx.err=40963;return}var l=null;try{switch(t){case 4352:if(n>0){l=AL.currentCtx.audioCtx.createBuffer(1,n,a);for(var u=l.getChannelData(0),_=0;_>>0]*.0078125-1}o.bytesPerSample=1,o.channels=1,o.length=n;break;case 4353:if(n>0){l=AL.currentCtx.audioCtx.createBuffer(1,n>>1,a);var u=l.getChannelData(0);r>>=1;for(var _=0;_>1;++_)u[_]=HEAP16[r++>>>0]*30517578125e-15}o.bytesPerSample=2,o.channels=1,o.length=n>>1;break;case 4354:if(n>0){l=AL.currentCtx.audioCtx.createBuffer(2,n>>1,a);for(var u=l.getChannelData(0),d=l.getChannelData(1),_=0;_>1;++_)u[_]=HEAPU8[r++>>>0]*.0078125-1,d[_]=HEAPU8[r++>>>0]*.0078125-1}o.bytesPerSample=1,o.channels=2,o.length=n>>1;break;case 4355:if(n>0){l=AL.currentCtx.audioCtx.createBuffer(2,n>>2,a);var u=l.getChannelData(0),d=l.getChannelData(1);r>>=1;for(var _=0;_>2;++_)u[_]=HEAP16[r++>>>0]*30517578125e-15,d[_]=HEAP16[r++>>>0]*30517578125e-15}o.bytesPerSample=2,o.channels=2,o.length=n>>2;break;case 65552:if(n>0){l=AL.currentCtx.audioCtx.createBuffer(1,n>>2,a);var u=l.getChannelData(0);r>>=2;for(var _=0;_>2;++_)u[_]=HEAPF32[r++>>>0]}o.bytesPerSample=4,o.channels=1,o.length=n>>2;break;case 65553:if(n>0){l=AL.currentCtx.audioCtx.createBuffer(2,n>>3,a);var u=l.getChannelData(0),d=l.getChannelData(1);r>>=2;for(var _=0;_>3;++_)u[_]=HEAPF32[r++>>>0],d[_]=HEAPF32[r++>>>0]}o.bytesPerSample=4,o.channels=2,o.length=n>>3;break;default:AL.currentCtx.err=40963;return}o.frequency=a,o.audioBuf=l}catch{AL.currentCtx.err=40963;return}}}_alBufferData.sig="viipii";var _alBufferf=(e,t,r)=>{AL.setBufferParam("alBufferf",e,t,null)};_alBufferf.sig="viif";function _alBufferfv(e,t,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}AL.setBufferParam("alBufferfv",e,t,null)}}_alBufferfv.sig="viip";var _alBufferi=(e,t,r)=>{AL.setBufferParam("alBufferi",e,t,null)};_alBufferi.sig="viii";function _alBufferiv(e,t,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(t){case 8213:AL.paramArray[0]=HEAP32[r>>>2>>>0],AL.paramArray[1]=HEAP32[r+4>>>2>>>0],AL.setBufferParam("alBufferiv",e,t,AL.paramArray);break;default:AL.setBufferParam("alBufferiv",e,t,null);break}}}_alBufferiv.sig="viip";function _alDeleteBuffers(e,t){if(t>>>=0,!!AL.currentCtx){for(var r=0;r>>2>>>0];if(n!==0){if(!AL.buffers[n]){AL.currentCtx.err=40961;return}if(AL.buffers[n].refCount){AL.currentCtx.err=40964;return}}}for(var r=0;r>>2>>>0];n!==0&&(AL.deviceRefCounts[AL.buffers[n].deviceId]--,delete AL.buffers[n],AL.freeIds.push(n))}}}_alDeleteBuffers.sig="vip";var _alSourcei=(e,t,r)=>{switch(t){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:AL.setSourceParam("alSourcei",e,t,r);break;default:AL.setSourceParam("alSourcei",e,t,null);break}};_alSourcei.sig="viii";function _alDeleteSources(e,t){if(t>>>=0,!!AL.currentCtx){for(var r=0;r>>2>>>0];if(!AL.currentCtx.sources[n]){AL.currentCtx.err=40961;return}}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4116),_alSourcei(n,4105,0),delete AL.currentCtx.sources[n],AL.freeIds.push(n)}}}_alDeleteSources.sig="vip";var _alDisable=e=>{if(AL.currentCtx)switch(e){case 512:AL.currentCtx.sourceDistanceModel=!1,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}};_alDisable.sig="vi";var _alDistanceModel=e=>{AL.setGlobalParam("alDistanceModel",53248,e)};_alDistanceModel.sig="vi";var _alDopplerFactor=e=>{AL.setGlobalParam("alDopplerFactor",49152,e)};_alDopplerFactor.sig="vf";var _alDopplerVelocity=e=>{if(warnOnce("alDopplerVelocity() is deprecated, and only kept for compatibility with OpenAL 1.0. Use alSpeedOfSound() instead."),!!AL.currentCtx&&e<=0){AL.currentCtx.err=40963;return}};_alDopplerVelocity.sig="vf";var _alEnable=e=>{if(AL.currentCtx)switch(e){case 512:AL.currentCtx.sourceDistanceModel=!0,AL.updateContextGlobal(AL.currentCtx);break;default:AL.currentCtx.err=40962;return}};_alEnable.sig="vi";function _alGenBuffers(e,t){if(t>>>=0,!!AL.currentCtx)for(var r=0;r>>2>>>0]=n.id}}_alGenBuffers.sig="vip";function _alGenSources(e,t){if(t>>>=0,!!AL.currentCtx)for(var r=0;r>>2>>>0]=a.id}}_alGenSources.sig="vip";var _alGetBoolean=e=>{var t=AL.getGlobalParam("alGetBoolean",e);if(t===null)return 0;switch(e){case 49152:case 49155:case 53248:return t!==0?1:0;default:return AL.currentCtx.err=40962,0}};_alGetBoolean.sig="ii";function _alGetBooleanv(e,t){t>>>=0;var r=AL.getGlobalParam("alGetBooleanv",e);if(!(r===null||!t))switch(e){case 49152:case 49155:case 53248:HEAP8[t>>>0]=r;break;default:AL.currentCtx.err=40962;return}}_alGetBooleanv.sig="vip";function _alGetBuffer3f(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0;var o=AL.getBufferParam("alGetBuffer3f",e,t);if(o!==null){if(!r||!n||!a){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBuffer3f.sig="viippp";function _alGetBuffer3i(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0;var o=AL.getBufferParam("alGetBuffer3i",e,t);if(o!==null){if(!r||!n||!a){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBuffer3i.sig="viippp";function _alGetBufferf(e,t,r){r>>>=0;var n=AL.getBufferParam("alGetBufferf",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBufferf.sig="viip";function _alGetBufferfv(e,t,r){r>>>=0;var n=AL.getBufferParam("alGetBufferfv",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetBufferfv.sig="viip";function _alGetBufferi(e,t,r){r>>>=0;var n=AL.getBufferParam("alGetBufferi",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 8193:case 8194:case 8195:case 8196:HEAP32[r>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetBufferi.sig="viip";function _alGetBufferiv(e,t,r){r>>>=0;var n=AL.getBufferParam("alGetBufferiv",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 8193:case 8194:case 8195:case 8196:HEAP32[r>>>2>>>0]=n;break;case 8213:HEAP32[r>>>2>>>0]=n[0],HEAP32[r+4>>>2>>>0]=n[1];break;default:AL.currentCtx.err=40962;return}}}_alGetBufferiv.sig="viip";var _alGetDouble=e=>{var t=AL.getGlobalParam("alGetDouble",e);if(t===null)return 0;switch(e){case 49152:case 49155:case 53248:return t;default:return AL.currentCtx.err=40962,0}};_alGetDouble.sig="di";function _alGetDoublev(e,t){t>>>=0;var r=AL.getGlobalParam("alGetDoublev",e);if(!(r===null||!t))switch(e){case 49152:case 49155:case 53248:HEAPF64[t>>>3>>>0]=r;break;default:AL.currentCtx.err=40962;return}}_alGetDoublev.sig="vip";function _alGetEnumValue(e){if(e>>>=0,!AL.currentCtx)return 0;if(!e)return AL.currentCtx.err=40963,0;var t=UTF8ToString(e);switch(t){case"AL_BITS":return 8194;case"AL_BUFFER":return 4105;case"AL_BUFFERS_PROCESSED":return 4118;case"AL_BUFFERS_QUEUED":return 4117;case"AL_BYTE_OFFSET":return 4134;case"AL_CHANNELS":return 8195;case"AL_CONE_INNER_ANGLE":return 4097;case"AL_CONE_OUTER_ANGLE":return 4098;case"AL_CONE_OUTER_GAIN":return 4130;case"AL_DIRECTION":return 4101;case"AL_DISTANCE_MODEL":return 53248;case"AL_DOPPLER_FACTOR":return 49152;case"AL_DOPPLER_VELOCITY":return 49153;case"AL_EXPONENT_DISTANCE":return 53253;case"AL_EXPONENT_DISTANCE_CLAMPED":return 53254;case"AL_EXTENSIONS":return 45060;case"AL_FORMAT_MONO16":return 4353;case"AL_FORMAT_MONO8":return 4352;case"AL_FORMAT_STEREO16":return 4355;case"AL_FORMAT_STEREO8":return 4354;case"AL_FREQUENCY":return 8193;case"AL_GAIN":return 4106;case"AL_INITIAL":return 4113;case"AL_INVALID":return-1;case"AL_ILLEGAL_ENUM":case"AL_INVALID_ENUM":return 40962;case"AL_INVALID_NAME":return 40961;case"AL_ILLEGAL_COMMAND":case"AL_INVALID_OPERATION":return 40964;case"AL_INVALID_VALUE":return 40963;case"AL_INVERSE_DISTANCE":return 53249;case"AL_INVERSE_DISTANCE_CLAMPED":return 53250;case"AL_LINEAR_DISTANCE":return 53251;case"AL_LINEAR_DISTANCE_CLAMPED":return 53252;case"AL_LOOPING":return 4103;case"AL_MAX_DISTANCE":return 4131;case"AL_MAX_GAIN":return 4110;case"AL_MIN_GAIN":return 4109;case"AL_NONE":return 0;case"AL_NO_ERROR":return 0;case"AL_ORIENTATION":return 4111;case"AL_OUT_OF_MEMORY":return 40965;case"AL_PAUSED":return 4115;case"AL_PENDING":return 8209;case"AL_PITCH":return 4099;case"AL_PLAYING":return 4114;case"AL_POSITION":return 4100;case"AL_PROCESSED":return 8210;case"AL_REFERENCE_DISTANCE":return 4128;case"AL_RENDERER":return 45059;case"AL_ROLLOFF_FACTOR":return 4129;case"AL_SAMPLE_OFFSET":return 4133;case"AL_SEC_OFFSET":return 4132;case"AL_SIZE":return 8196;case"AL_SOURCE_RELATIVE":return 514;case"AL_SOURCE_STATE":return 4112;case"AL_SOURCE_TYPE":return 4135;case"AL_SPEED_OF_SOUND":return 49155;case"AL_STATIC":return 4136;case"AL_STOPPED":return 4116;case"AL_STREAMING":return 4137;case"AL_UNDETERMINED":return 4144;case"AL_UNUSED":return 8208;case"AL_VELOCITY":return 4102;case"AL_VENDOR":return 45057;case"AL_VERSION":return 45058;case"AL_AUTO_SOFT":return 2;case"AL_SOURCE_DISTANCE_MODEL":return 512;case"AL_SOURCE_SPATIALIZE_SOFT":return 4628;case"AL_LOOP_POINTS_SOFT":return 8213;case"AL_BYTE_LENGTH_SOFT":return 8201;case"AL_SAMPLE_LENGTH_SOFT":return 8202;case"AL_SEC_LENGTH_SOFT":return 8203;case"AL_FORMAT_MONO_FLOAT32":return 65552;case"AL_FORMAT_STEREO_FLOAT32":return 65553;default:return AL.currentCtx.err=40963,0}}_alGetEnumValue.sig="ip";var _alGetError=()=>{if(!AL.currentCtx)return 40964;var e=AL.currentCtx.err;return AL.currentCtx.err=0,e};_alGetError.sig="i";var _alGetFloat=e=>{var t=AL.getGlobalParam("alGetFloat",e);if(t===null)return 0;switch(e){case 49152:case 49155:case 53248:return t;default:return 0}};_alGetFloat.sig="fi";function _alGetFloatv(e,t){t>>>=0;var r=AL.getGlobalParam("alGetFloatv",e);if(!(r===null||!t))switch(e){case 49152:case 49155:case 53248:HEAPF32[t>>>2>>>0]=r;break;default:AL.currentCtx.err=40962;return}}_alGetFloatv.sig="vip";var _alGetInteger=e=>{var t=AL.getGlobalParam("alGetInteger",e);if(t===null)return 0;switch(e){case 49152:case 49155:case 53248:return t;default:return AL.currentCtx.err=40962,0}};_alGetInteger.sig="ii";function _alGetIntegerv(e,t){t>>>=0;var r=AL.getGlobalParam("alGetIntegerv",e);if(!(r===null||!t))switch(e){case 49152:case 49155:case 53248:HEAP32[t>>>2>>>0]=r;break;default:AL.currentCtx.err=40962;return}}_alGetIntegerv.sig="vip";function _alGetListener3f(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;var a=AL.getListenerParam("alGetListener3f",e);if(a!==null){if(!t||!r||!n){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAPF32[t>>>2>>>0]=a[0],HEAPF32[r>>>2>>>0]=a[1],HEAPF32[n>>>2>>>0]=a[2];break;default:AL.currentCtx.err=40962;return}}}_alGetListener3f.sig="vippp";function _alGetListener3i(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;var a=AL.getListenerParam("alGetListener3i",e);if(a!==null){if(!t||!r||!n){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAP32[t>>>2>>>0]=a[0],HEAP32[r>>>2>>>0]=a[1],HEAP32[n>>>2>>>0]=a[2];break;default:AL.currentCtx.err=40962;return}}}_alGetListener3i.sig="vippp";function _alGetListenerf(e,t){t>>>=0;var r=AL.getListenerParam("alGetListenerf",e);if(r!==null){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4106:HEAPF32[t>>>2>>>0]=r;break;default:AL.currentCtx.err=40962;return}}}_alGetListenerf.sig="vip";function _alGetListenerfv(e,t){t>>>=0;var r=AL.getListenerParam("alGetListenerfv",e);if(r!==null){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAPF32[t>>>2>>>0]=r[0],HEAPF32[t+4>>>2>>>0]=r[1],HEAPF32[t+8>>>2>>>0]=r[2];break;case 4111:HEAPF32[t>>>2>>>0]=r[0],HEAPF32[t+4>>>2>>>0]=r[1],HEAPF32[t+8>>>2>>>0]=r[2],HEAPF32[t+12>>>2>>>0]=r[3],HEAPF32[t+16>>>2>>>0]=r[4],HEAPF32[t+20>>>2>>>0]=r[5];break;default:AL.currentCtx.err=40962;return}}}_alGetListenerfv.sig="vip";function _alGetListeneri(e,t){t>>>=0;var r=AL.getListenerParam("alGetListeneri",e);if(r!==null){if(!t){AL.currentCtx.err=40963;return}AL.currentCtx.err=40962}}_alGetListeneri.sig="vip";function _alGetListeneriv(e,t){t>>>=0;var r=AL.getListenerParam("alGetListeneriv",e);if(r!==null){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:HEAP32[t>>>2>>>0]=r[0],HEAP32[t+4>>>2>>>0]=r[1],HEAP32[t+8>>>2>>>0]=r[2];break;case 4111:HEAP32[t>>>2>>>0]=r[0],HEAP32[t+4>>>2>>>0]=r[1],HEAP32[t+8>>>2>>>0]=r[2],HEAP32[t+12>>>2>>>0]=r[3],HEAP32[t+16>>>2>>>0]=r[4],HEAP32[t+20>>>2>>>0]=r[5];break;default:AL.currentCtx.err=40962;return}}}_alGetListeneriv.sig="vip";function _alGetSource3f(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0;var o=AL.getSourceParam("alGetSource3f",e,t);if(o!==null){if(!r||!n||!a){AL.currentCtx.err=40963;return}switch(t){case 4100:case 4101:case 4102:HEAPF32[r>>>2>>>0]=o[0],HEAPF32[n>>>2>>>0]=o[1],HEAPF32[a>>>2>>>0]=o[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSource3f.sig="viippp";function _alGetSource3i(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0;var o=AL.getSourceParam("alGetSource3i",e,t);if(o!==null){if(!r||!n||!a){AL.currentCtx.err=40963;return}switch(t){case 4100:case 4101:case 4102:HEAP32[r>>>2>>>0]=o[0],HEAP32[n>>>2>>>0]=o[1],HEAP32[a>>>2>>>0]=o[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSource3i.sig="viippp";function _alGetSourcef(e,t,r){r>>>=0;var n=AL.getSourceParam("alGetSourcef",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:HEAPF32[r>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetSourcef.sig="viip";function _alGetSourcefv(e,t,r){r>>>=0;var n=AL.getSourceParam("alGetSourcefv",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:HEAPF32[r>>>2>>>0]=n[0];break;case 4100:case 4101:case 4102:HEAPF32[r>>>2>>>0]=n[0],HEAPF32[r+4>>>2>>>0]=n[1],HEAPF32[r+8>>>2>>>0]=n[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSourcefv.sig="viip";function _alGetSourcei(e,t,r){r>>>=0;var n=AL.getSourceParam("alGetSourcei",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[r>>>2>>>0]=n;break;default:AL.currentCtx.err=40962;return}}}_alGetSourcei.sig="viip";function _alGetSourceiv(e,t,r){r>>>=0;var n=AL.getSourceParam("alGetSourceiv",e,t);if(n!==null){if(!r){AL.currentCtx.err=40963;return}switch(t){case 514:case 4097:case 4098:case 4103:case 4105:case 4112:case 4117:case 4118:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4135:case 4628:case 8201:case 8202:case 53248:HEAP32[r>>>2>>>0]=n;break;case 4100:case 4101:case 4102:HEAP32[r>>>2>>>0]=n[0],HEAP32[r+4>>>2>>>0]=n[1],HEAP32[r+8>>>2>>>0]=n[2];break;default:AL.currentCtx.err=40962;return}}}_alGetSourceiv.sig="viip";var stringToNewUTF8=e=>{var t=lengthBytesUTF8(e)+1,r=_malloc(t);return r&&stringToUTF8(e,r,t),r};function _alGetString(e){if(AL.stringCache[e])return AL.stringCache[e];var t;switch(e){case 0:t="No Error";break;case 40961:t="Invalid Name";break;case 40962:t="Invalid Enum";break;case 40963:t="Invalid Value";break;case 40964:t="Invalid Operation";break;case 40965:t="Out of Memory";break;case 45057:t="Emscripten";break;case 45058:t="1.1";break;case 45059:t="WebAudio";break;case 45060:t=Object.keys(AL.AL_EXTENSIONS).join(" ");break;default:return AL.currentCtx&&(AL.currentCtx.err=40962),0}return t=stringToNewUTF8(t),AL.stringCache[e]=t,t}_alGetString.sig="pi";var _alIsBuffer=e=>!(!AL.currentCtx||e>AL.buffers.length||!AL.buffers[e]);_alIsBuffer.sig="ii";var _alIsEnabled=e=>{if(!AL.currentCtx)return 0;switch(e){case 512:return AL.currentCtx.sourceDistanceModel?0:1;default:return AL.currentCtx.err=40962,0}};_alIsEnabled.sig="ii";function _alIsExtensionPresent(e){e>>>=0;var t=UTF8ToString(e);return AL.AL_EXTENSIONS[t]?1:0}_alIsExtensionPresent.sig="ip";var _alIsSource=e=>!(!AL.currentCtx||!AL.currentCtx.sources[e]);_alIsSource.sig="ii";var _alListener3f=(e,t,r,n)=>{switch(e){case 4100:case 4102:AL.paramArray[0]=t,AL.paramArray[1]=r,AL.paramArray[2]=n,AL.setListenerParam("alListener3f",e,AL.paramArray);break;default:AL.setListenerParam("alListener3f",e,null);break}};_alListener3f.sig="vifff";var _alListener3i=(e,t,r,n)=>{switch(e){case 4100:case 4102:AL.paramArray[0]=t,AL.paramArray[1]=r,AL.paramArray[2]=n,AL.setListenerParam("alListener3i",e,AL.paramArray);break;default:AL.setListenerParam("alListener3i",e,null);break}};_alListener3i.sig="viiii";var _alListenerf=(e,t)=>{switch(e){case 4106:AL.setListenerParam("alListenerf",e,t);break;default:AL.setListenerParam("alListenerf",e,null);break}};_alListenerf.sig="vif";function _alListenerfv(e,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:AL.paramArray[0]=HEAPF32[t>>>2>>>0],AL.paramArray[1]=HEAPF32[t+4>>>2>>>0],AL.paramArray[2]=HEAPF32[t+8>>>2>>>0],AL.setListenerParam("alListenerfv",e,AL.paramArray);break;case 4111:AL.paramArray[0]=HEAPF32[t>>>2>>>0],AL.paramArray[1]=HEAPF32[t+4>>>2>>>0],AL.paramArray[2]=HEAPF32[t+8>>>2>>>0],AL.paramArray[3]=HEAPF32[t+12>>>2>>>0],AL.paramArray[4]=HEAPF32[t+16>>>2>>>0],AL.paramArray[5]=HEAPF32[t+20>>>2>>>0],AL.setListenerParam("alListenerfv",e,AL.paramArray);break;default:AL.setListenerParam("alListenerfv",e,null);break}}}_alListenerfv.sig="vip";var _alListeneri=(e,t)=>{AL.setListenerParam("alListeneri",e,null)};_alListeneri.sig="vii";function _alListeneriv(e,t){if(t>>>=0,!!AL.currentCtx){if(!t){AL.currentCtx.err=40963;return}switch(e){case 4100:case 4102:AL.paramArray[0]=HEAP32[t>>>2>>>0],AL.paramArray[1]=HEAP32[t+4>>>2>>>0],AL.paramArray[2]=HEAP32[t+8>>>2>>>0],AL.setListenerParam("alListeneriv",e,AL.paramArray);break;case 4111:AL.paramArray[0]=HEAP32[t>>>2>>>0],AL.paramArray[1]=HEAP32[t+4>>>2>>>0],AL.paramArray[2]=HEAP32[t+8>>>2>>>0],AL.paramArray[3]=HEAP32[t+12>>>2>>>0],AL.paramArray[4]=HEAP32[t+16>>>2>>>0],AL.paramArray[5]=HEAP32[t+20>>>2>>>0],AL.setListenerParam("alListeneriv",e,AL.paramArray);break;default:AL.setListenerParam("alListeneriv",e,null);break}}}_alListeneriv.sig="vip";var _alSource3f=(e,t,r,n,a)=>{switch(t){case 4100:case 4101:case 4102:AL.paramArray[0]=r,AL.paramArray[1]=n,AL.paramArray[2]=a,AL.setSourceParam("alSource3f",e,t,AL.paramArray);break;default:AL.setSourceParam("alSource3f",e,t,null);break}};_alSource3f.sig="viifff";var _alSource3i=(e,t,r,n,a)=>{switch(t){case 4100:case 4101:case 4102:AL.paramArray[0]=r,AL.paramArray[1]=n,AL.paramArray[2]=a,AL.setSourceParam("alSource3i",e,t,AL.paramArray);break;default:AL.setSourceParam("alSource3i",e,t,null);break}};_alSource3i.sig="viiiii";var _alSourcePause=e=>{if(AL.currentCtx){var t=AL.currentCtx.sources[e];if(!t){AL.currentCtx.err=40961;return}AL.setSourceState(t,4115)}};_alSourcePause.sig="vi";function _alSourcePausev(e,t){if(t>>>=0,!!AL.currentCtx){t||(AL.currentCtx.err=40963);for(var r=0;r>>2>>>0]]){AL.currentCtx.err=40961;return}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4115)}}}_alSourcePausev.sig="vip";var _alSourcePlay=e=>{if(AL.currentCtx){var t=AL.currentCtx.sources[e];if(!t){AL.currentCtx.err=40961;return}AL.setSourceState(t,4114)}};_alSourcePlay.sig="vi";function _alSourcePlayv(e,t){if(t>>>=0,!!AL.currentCtx){t||(AL.currentCtx.err=40963);for(var r=0;r>>2>>>0]]){AL.currentCtx.err=40961;return}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4114)}}}_alSourcePlayv.sig="vip";function _alSourceQueueBuffers(e,t,r){if(r>>>=0,!!AL.currentCtx){var n=AL.currentCtx.sources[e];if(!n){AL.currentCtx.err=40961;return}if(n.type===4136){AL.currentCtx.err=40964;return}if(t!==0){for(var a=AL.buffers[0],o=0;o>>2>>>0],u=AL.buffers[l];if(!u){AL.currentCtx.err=40961;return}a.id!==0&&(u.frequency!==a.frequency||u.bytesPerSample!==a.bytesPerSample||u.channels!==a.channels)&&(AL.currentCtx.err=40964)}n.bufQueue.length===1&&n.bufQueue[0].id===0&&(n.bufQueue.length=0),n.type=4137;for(var o=0;o>>2>>>0],u=AL.buffers[l];u.refCount++,n.bufQueue.push(u)}n.looping&&AL.cancelPendingSourceAudio(n),AL.initSourcePanner(n),AL.scheduleSourceAudio(n)}}}_alSourceQueueBuffers.sig="viip";var _alSourceRewind=e=>{if(AL.currentCtx){var t=AL.currentCtx.sources[e];if(!t){AL.currentCtx.err=40961;return}AL.setSourceState(t,4116),AL.setSourceState(t,4113)}};_alSourceRewind.sig="vi";function _alSourceRewindv(e,t){if(t>>>=0,!!AL.currentCtx){t||(AL.currentCtx.err=40963);for(var r=0;r>>2>>>0]]){AL.currentCtx.err=40961;return}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4113)}}}_alSourceRewindv.sig="vip";var _alSourceStop=e=>{if(AL.currentCtx){var t=AL.currentCtx.sources[e];if(!t){AL.currentCtx.err=40961;return}AL.setSourceState(t,4116)}};_alSourceStop.sig="vi";function _alSourceStopv(e,t){if(t>>>=0,!!AL.currentCtx){t||(AL.currentCtx.err=40963);for(var r=0;r>>2>>>0]]){AL.currentCtx.err=40961;return}for(var r=0;r>>2>>>0];AL.setSourceState(AL.currentCtx.sources[n],4116)}}}_alSourceStopv.sig="vip";function _alSourceUnqueueBuffers(e,t,r){if(r>>>=0,!!AL.currentCtx){var n=AL.currentCtx.sources[e];if(!n){AL.currentCtx.err=40961;return}if(t>(n.bufQueue.length===1&&n.bufQueue[0].id===0?0:n.bufsProcessed)){AL.currentCtx.err=40963;return}if(t!==0){for(var a=0;a>>2>>>0]=o.id,n.bufsProcessed--}n.bufQueue.length===0&&n.bufQueue.push(AL.buffers[0]),AL.initSourcePanner(n),AL.scheduleSourceAudio(n)}}}_alSourceUnqueueBuffers.sig="viip";var _alSourcef=(e,t,r)=>{switch(t){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:AL.setSourceParam("alSourcef",e,t,r);break;default:AL.setSourceParam("alSourcef",e,t,null);break}};_alSourcef.sig="viif";function _alSourcefv(e,t,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(t){case 4097:case 4098:case 4099:case 4106:case 4109:case 4110:case 4128:case 4129:case 4130:case 4131:case 4132:case 4133:case 4134:case 8203:var n=HEAPF32[r>>>2>>>0];AL.setSourceParam("alSourcefv",e,t,n);break;case 4100:case 4101:case 4102:AL.paramArray[0]=HEAPF32[r>>>2>>>0],AL.paramArray[1]=HEAPF32[r+4>>>2>>>0],AL.paramArray[2]=HEAPF32[r+8>>>2>>>0],AL.setSourceParam("alSourcefv",e,t,AL.paramArray);break;default:AL.setSourceParam("alSourcefv",e,t,null);break}}}_alSourcefv.sig="viip";function _alSourceiv(e,t,r){if(r>>>=0,!!AL.currentCtx){if(!r){AL.currentCtx.err=40963;return}switch(t){case 514:case 4097:case 4098:case 4103:case 4105:case 4128:case 4129:case 4131:case 4132:case 4133:case 4134:case 4628:case 8201:case 8202:case 53248:var n=HEAP32[r>>>2>>>0];AL.setSourceParam("alSourceiv",e,t,n);break;case 4100:case 4101:case 4102:AL.paramArray[0]=HEAP32[r>>>2>>>0],AL.paramArray[1]=HEAP32[r+4>>>2>>>0],AL.paramArray[2]=HEAP32[r+8>>>2>>>0],AL.setSourceParam("alSourceiv",e,t,AL.paramArray);break;default:AL.setSourceParam("alSourceiv",e,t,null);break}}}_alSourceiv.sig="viip";var _alSpeedOfSound=e=>{AL.setGlobalParam("alSpeedOfSound",49155,e)};_alSpeedOfSound.sig="vf";var _alcCaptureCloseDevice=function(e){var t,r,n,a;e>>>=0;var o=AL.requireValidCaptureDevice(e,"alcCaptureCloseDevice");return o?(delete AL.captures[e],AL.freeIds.push(e),(t=o.mediaStreamSourceNode)==null||t.disconnect(),(r=o.mergerNode)==null||r.disconnect(),(n=o.splitterNode)==null||n.disconnect(),(a=o.scriptProcessorNode)==null||a.disconnect(),o.mediaStream&&o.mediaStream.getTracks().forEach(l=>l.stop()),delete o.buffers,o.capturedFrameCount=0,o.isCapturing=!1,!0):!1};_alcCaptureCloseDevice.sig="ip";var listenOnce=(e,t,r)=>{e.addEventListener(t,r,{once:!0})},autoResumeAudioContext=(e,t)=>{t||(t=[document,document.getElementById("canvas")]),["keydown","mousedown","touchstart"].forEach(r=>{t.forEach(n=>{n&&listenOnce(n,r,()=>{e.state==="suspended"&&e.resume()})})})};function _alcCaptureOpenDevice(e,t,r,n){var a;e>>>=0;var o=AL.CAPTURE_DEVICE_NAME;if(e!==0&&(o=UTF8ToString(e),o!==AL.CAPTURE_DEVICE_NAME))return AL.alcErr=40965,0;if(n<0)return AL.alcErr=40964,0;navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia;var l=navigator.getUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia;if(!l)return AL.alcErr=40965,0;var u=window.AudioContext||window.webkitAudioContext;if(!AL.sharedCaptureAudioCtx)try{AL.sharedCaptureAudioCtx=new u}catch{return AL.alcErr=40965,0}autoResumeAudioContext(AL.sharedCaptureAudioCtx);var _;switch(r){case 65552:case 4353:case 4352:_=1;break;case 65553:case 4355:case 4354:_=2;break;default:return AL.alcErr=40964,0}function d(A){return new Float32Array(A)}function p(A){return new Int16Array(A)}function f(A){return new Uint8Array(A)}var m,h;switch(r){case 65552:case 65553:m="f32",h=d;break;case 4353:case 4355:m="i16",h=p;break;case 4352:case 4354:m="u8",h=f;break}var g=[];try{for(var b=0;b<_;++b)g[b]=h(n)}catch{return AL.alcErr=40965,0}var v={audioCtx:AL.sharedCaptureAudioCtx,deviceName:o,requestedSampleRate:t,requestedSampleType:m,outputChannelCount:_,inputChannelCount:null,mediaStreamError:null,mediaStreamSourceNode:null,mediaStream:null,mergerNode:null,splitterNode:null,scriptProcessorNode:null,isCapturing:!1,buffers:g,get bufferFrameCapacity(){return g[0].length},capturePlayhead:0,captureReadhead:0,capturedFrameCount:0},S=A=>{v.mediaStreamError=A},L=A=>{v.mediaStreamSourceNode=v.audioCtx.createMediaStreamSource(A),v.mediaStream=A;var M=1;switch(v.mediaStreamSourceNode.channelCountMode){case"max":M=_;break;case"clamped-max":M=Math.min(_,v.mediaStreamSourceNode.channelCount);break;case"explicit":M=v.mediaStreamSourceNode.channelCount;break}v.inputChannelCount=M;var X=512;v.scriptProcessorNode=v.audioCtx.createScriptProcessor(X,M,_),M>_?(v.mergerNode=v.audioCtx.createChannelMerger(M),v.mediaStreamSourceNode.connect(v.mergerNode),v.mergerNode.connect(v.scriptProcessorNode)):M<_?(v.splitterNode=v.audioCtx.createChannelSplitter(_),v.mediaStreamSourceNode.connect(v.splitterNode),v.splitterNode.connect(v.scriptProcessorNode)):v.mediaStreamSourceNode.connect(v.scriptProcessorNode),v.scriptProcessorNode.connect(v.audioCtx.destination),v.scriptProcessorNode.onaudioprocess=x=>{if(v.isCapturing){var w=v,E=x.inputBuffer;switch(r){case 65552:for(var P=E.getChannelData(0),k=0;k>>=0,t>>>=0;var n=AL.requireValidCaptureDevice(e,"alcCaptureSamples");if(!n)return;var a=n.requestedSampleRate,o=n.audioCtx.sampleRate,l=o/a;if(r<0||r>n.capturedFrameCount/l){AL.alcErr=40964;return}function u(T,A){HEAPF32[t+4*T>>>2>>>0]=A}function _(T,A){HEAP16[t+2*T>>>1>>>0]=A}function d(T,A){HEAP8[t+T>>>0]=A}var p;switch(n.requestedSampleType){case"f32":p=u;break;case"i16":p=_;break;case"u8":p=d;break;default:return}if(Math.floor(l)==l)for(var f=0,m=0;m>>=0;var t=AL.requireValidCaptureDevice(e,"alcCaptureStart");t&&(t.isCapturing||(t.isCapturing=!0,t.capturedFrameCount=0,t.capturePlayhead=0))}_alcCaptureStart.sig="vp";function _alcCaptureStop(e){e>>>=0;var t=AL.requireValidCaptureDevice(e,"alcCaptureStop");t&&(t.isCapturing=!1)}_alcCaptureStop.sig="vp";function _alcCloseDevice(e){return e>>>=0,!(e in AL.deviceRefCounts)||AL.deviceRefCounts[e]>0?0:(delete AL.deviceRefCounts[e],AL.freeIds.push(e),1)}_alcCloseDevice.sig="ip";function _alcCreateContext(e,t){if(e>>>=0,t>>>=0,!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;var r=null,n=[],a=null;if(t>>=2,t)for(var o=0,l=0;o=HEAP32[t++>>>0],n.push(o),o!==0;)switch(l=HEAP32[t++>>>0],n.push(l),o){case 4103:r||(r={}),r.sampleRate=l;break;case 4112:case 4113:break;case 6546:switch(l){case 0:a=!1;break;case 1:a=!0;break;case 2:break;default:return AL.alcErr=40964,0}break;case 6550:if(l!==0)return AL.alcErr=40964,0;break;default:return AL.alcErr=40964,0}var u=window.AudioContext||window.webkitAudioContext,_=null;try{r?_=new u(r):_=new u}catch(h){return h.name==="NotSupportedError"?AL.alcErr=40964:AL.alcErr=40961,0}autoResumeAudioContext(_),typeof _.createGain>"u"&&(_.createGain=_.createGainNode);var d=_.createGain();d.connect(_.destination);var p={deviceId:e,id:AL.newId(),attrs:n,audioCtx:_,listener:{position:[0,0,0],velocity:[0,0,0],direction:[0,0,0],up:[0,0,0]},sources:[],interval:setInterval(()=>AL.scheduleContextAudio(p),AL.QUEUE_INTERVAL),gain:d,distanceModel:53250,speedOfSound:343.3,dopplerFactor:1,sourceDistanceModel:!1,hrtf:a||!1,_err:0,get err(){return this._err},set err(h){(this._err===0||h===0)&&(this._err=h)}};if(AL.deviceRefCounts[e]++,AL.contexts[p.id]=p,a!==null)for(var f in AL.contexts){var m=AL.contexts[f];m.deviceId===e&&(m.hrtf=a,AL.updateContextGlobal(m))}return p.id}_alcCreateContext.sig="ppp";function _alcDestroyContext(e){e>>>=0;var t=AL.contexts[e];if(AL.currentCtx===t){AL.alcErr=40962;return}AL.contexts[e].interval&&clearInterval(AL.contexts[e].interval),AL.deviceRefCounts[t.deviceId]--,delete AL.contexts[e],AL.freeIds.push(e)}_alcDestroyContext.sig="vp";function _alcGetContextsDevice(e){return e>>>=0,e in AL.contexts?AL.contexts[e].deviceId:0}_alcGetContextsDevice.sig="pp";function _alcGetCurrentContext(){return AL.currentCtx!==null?AL.currentCtx.id:0}_alcGetCurrentContext.sig="p";function _alcGetEnumValue(e,t){if(e>>>=0,t>>>=0,e!==0&&!(e in AL.deviceRefCounts))return 0;if(!t)return AL.alcErr=40964,0;var r=UTF8ToString(t);switch(r){case"ALC_NO_ERROR":return 0;case"ALC_INVALID_DEVICE":return 40961;case"ALC_INVALID_CONTEXT":return 40962;case"ALC_INVALID_ENUM":return 40963;case"ALC_INVALID_VALUE":return 40964;case"ALC_OUT_OF_MEMORY":return 40965;case"ALC_MAJOR_VERSION":return 4096;case"ALC_MINOR_VERSION":return 4097;case"ALC_ATTRIBUTES_SIZE":return 4098;case"ALC_ALL_ATTRIBUTES":return 4099;case"ALC_DEFAULT_DEVICE_SPECIFIER":return 4100;case"ALC_DEVICE_SPECIFIER":return 4101;case"ALC_EXTENSIONS":return 4102;case"ALC_FREQUENCY":return 4103;case"ALC_REFRESH":return 4104;case"ALC_SYNC":return 4105;case"ALC_MONO_SOURCES":return 4112;case"ALC_STEREO_SOURCES":return 4113;case"ALC_CAPTURE_DEVICE_SPECIFIER":return 784;case"ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER":return 785;case"ALC_CAPTURE_SAMPLES":return 786;case"ALC_HRTF_SOFT":return 6546;case"ALC_HRTF_ID_SOFT":return 6550;case"ALC_DONT_CARE_SOFT":return 2;case"ALC_HRTF_STATUS_SOFT":return 6547;case"ALC_NUM_HRTF_SPECIFIERS_SOFT":return 6548;case"ALC_HRTF_SPECIFIER_SOFT":return 6549;case"ALC_HRTF_DISABLED_SOFT":return 0;case"ALC_HRTF_ENABLED_SOFT":return 1;case"ALC_HRTF_DENIED_SOFT":return 2;case"ALC_HRTF_REQUIRED_SOFT":return 3;case"ALC_HRTF_HEADPHONES_DETECTED_SOFT":return 4;case"ALC_HRTF_UNSUPPORTED_FORMAT_SOFT":return 5;default:return AL.alcErr=40964,0}}_alcGetEnumValue.sig="ipp";function _alcGetError(e){var t=AL.alcErr;return AL.alcErr=0,t}_alcGetError.sig="ip";function _alcGetIntegerv(e,t,r,n){if(e>>>=0,n>>>=0,!(r===0||!n))switch(t){case 4096:HEAP32[n>>>2>>>0]=1;break;case 4097:HEAP32[n>>>2>>>0]=1;break;case 4098:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=AL.currentCtx.attrs.length;break;case 4099:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}for(var a=0;a>>2>>>0]=AL.currentCtx.attrs[a];break;case 4103:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=AL.currentCtx.audioCtx.sampleRate;break;case 4112:case 4113:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=2147483647;break;case 6546:case 6547:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}var o=0;for(var l in AL.contexts){var u=AL.contexts[l];u.deviceId===e&&(o=u.hrtf?1:0)}HEAP32[n>>>2>>>0]=o;break;case 6548:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}HEAP32[n>>>2>>>0]=1;break;case 131075:if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.currentCtx){AL.alcErr=40962;return}HEAP32[n>>>2>>>0]=1;case 786:var _=AL.requireValidCaptureDevice(e,"alcGetIntegerv");if(!_)return;var d=_.capturedFrameCount,p=_.requestedSampleRate,f=_.audioCtx.sampleRate,m=Math.floor(d*(p/f));HEAP32[n>>>2>>>0]=m;break;default:AL.alcErr=40963;return}}_alcGetIntegerv.sig="vpiip";function _alcGetString(e,t){if(e>>>=0,AL.alcStringCache[t])return AL.alcStringCache[t];var r;switch(t){case 0:r="No Error";break;case 40961:r="Invalid Device";break;case 40962:r="Invalid Context";break;case 40963:r="Invalid Enum";break;case 40964:r="Invalid Value";break;case 40965:r="Out of Memory";break;case 4100:if(typeof AudioContext<"u"||typeof webkitAudioContext<"u")r=AL.DEVICE_NAME;else return 0;break;case 4101:typeof AudioContext<"u"||typeof webkitAudioContext<"u"?r=AL.DEVICE_NAME+"\0":r="\0";break;case 785:r=AL.CAPTURE_DEVICE_NAME;break;case 784:if(e===0)r=AL.CAPTURE_DEVICE_NAME+"\0";else{var n=AL.requireValidCaptureDevice(e,"alcGetString");if(!n)return 0;r=n.deviceName}break;case 4102:if(!e)return AL.alcErr=40961,0;r=Object.keys(AL.ALC_EXTENSIONS).join(" ");break;default:return AL.alcErr=40963,0}return r=stringToNewUTF8(r),AL.alcStringCache[t]=r,r}_alcGetString.sig="ppi";function _alcIsExtensionPresent(e,t){t>>>=0;var r=UTF8ToString(t);return AL.ALC_EXTENSIONS[r]?1:0}_alcIsExtensionPresent.sig="ipp";function _alcMakeContextCurrent(e){return e>>>=0,e===0?AL.currentCtx=null:AL.currentCtx=AL.contexts[e],1}_alcMakeContextCurrent.sig="ip";function _alcOpenDevice(e){if(e>>>=0,e){var t=UTF8ToString(e);if(t!==AL.DEVICE_NAME)return 0}if(typeof AudioContext<"u"||typeof webkitAudioContext<"u"){var r=AL.newId();return AL.deviceRefCounts[r]=0,r}return 0}_alcOpenDevice.sig="pp";function _alcProcessContext(e){}_alcProcessContext.sig="vp";function _alcSuspendContext(e){}_alcSuspendContext.sig="vp";function _duckdb_web_fs_directory_create(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.createDirectory(Module,e,t)}_duckdb_web_fs_directory_create.sig="vpi";function _duckdb_web_fs_directory_exists(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkDirectory(Module,e,t)}_duckdb_web_fs_directory_exists.sig="ipi";function _duckdb_web_fs_directory_list_files(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.listDirectoryEntries(Module,e,t)}_duckdb_web_fs_directory_list_files.sig="ipi";function _duckdb_web_fs_directory_remove(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.removeDirectory(Module,e,t)}_duckdb_web_fs_directory_remove.sig="vpi";function _duckdb_web_fs_file_close(e){return globalThis.DUCKDB_RUNTIME.closeFile(Module,e)}_duckdb_web_fs_file_close.sig="vi";function _duckdb_web_fs_file_exists(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.checkFile(Module,e,t)}_duckdb_web_fs_file_exists.sig="ipi";function _duckdb_web_fs_file_get_last_modified_time(e){return globalThis.DUCKDB_RUNTIME.getLastFileModificationTime(Module,e)}_duckdb_web_fs_file_get_last_modified_time.sig="ii";function _duckdb_web_fs_file_move(e,t,r,n){return e>>>=0,r>>>=0,globalThis.DUCKDB_RUNTIME.moveFile(Module,e,t,r,n)}_duckdb_web_fs_file_move.sig="vpipi";function _duckdb_web_fs_file_open(e,t){return globalThis.DUCKDB_RUNTIME.openFile(Module,e,t)}_duckdb_web_fs_file_open.sig="pii";function _duckdb_web_fs_file_read(e,t,r,n){return t>>>=0,globalThis.DUCKDB_RUNTIME.readFile(Module,e,t,r,n)}_duckdb_web_fs_file_read.sig="iipid";function _duckdb_web_fs_file_truncate(e,t){return globalThis.DUCKDB_RUNTIME.truncateFile(Module,e,t)}_duckdb_web_fs_file_truncate.sig="vid";function _duckdb_web_fs_file_write(e,t,r,n){return t>>>=0,globalThis.DUCKDB_RUNTIME.writeFile(Module,e,t,r,n)}_duckdb_web_fs_file_write.sig="iipid";function _duckdb_web_fs_get_default_data_protocol(e){return globalThis.DUCKDB_RUNTIME.getDefaultDataProtocol(e)}_duckdb_web_fs_get_default_data_protocol.sig="i";function _duckdb_web_fs_glob(e,t){return e>>>=0,globalThis.DUCKDB_RUNTIME.glob(Module,e,t)}_duckdb_web_fs_glob.sig="vpi";function _duckdb_web_test_platform_feature(e){return globalThis.DUCKDB_RUNTIME.testPlatformFeature(Module,e)}_duckdb_web_test_platform_feature.sig="ii";function _duckdb_web_udf_scalar_call(e,t,r,n,a,o){return e>>>=0,r>>>=0,a>>>=0,globalThis.DUCKDB_RUNTIME.callScalarUDF(Module,e,t,r,n,a,o)}_duckdb_web_udf_scalar_call.sig="vpipipi";var _emscripten_alcDevicePauseSOFT=e=>{if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(!AL.paused){AL.paused=!0;for(var t in AL.contexts){var r=AL.contexts[t];r.deviceId===e&&(r.audioCtx.suspend(),clearInterval(r.interval),r.interval=null)}}};_emscripten_alcDevicePauseSOFT.sig="vi";var _emscripten_alcDeviceResumeSOFT=e=>{if(!(e in AL.deviceRefCounts)){AL.alcErr=40961;return}if(AL.paused){AL.paused=!1;for(var t in AL.contexts){var r=AL.contexts[t];r.deviceId===e&&(r.interval=setInterval(()=>AL.scheduleContextAudio(r),AL.QUEUE_INTERVAL),r.audioCtx.resume())}}};_emscripten_alcDeviceResumeSOFT.sig="vi";var _emscripten_alcGetStringiSOFT=(e,t,r)=>{if(!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;if(AL.alcStringCache[t])return AL.alcStringCache[t];var n;switch(t){case 6549:if(r===0)n="Web Audio HRTF";else return AL.alcErr=40964,0;break;default:return r!==0?(AL.alcErr=40963,0):_alcGetString(e,t)}return n=stringToNewUTF8(n),AL.alcStringCache[t]=n,n};_emscripten_alcGetStringiSOFT.sig="iiii";var _emscripten_alcResetDeviceSOFT=(e,t)=>{if(!(e in AL.deviceRefCounts))return AL.alcErr=40961,0;var r=null;if(t>>=2,t)for(var n=0,a=0;n=HEAP32[t++>>>0],n!==0;)switch(a=HEAP32[t++>>>0],n){case 6546:a===1?r=!0:a===0&&(r=!1);break}if(r!==null)for(var o in AL.contexts){var l=AL.contexts[o];l.deviceId===e&&(l.hrtf=r,AL.updateContextGlobal(l))}return 1};_emscripten_alcResetDeviceSOFT.sig="iii";var readEmAsmArgsArray=[],readEmAsmArgs=(e,t)=>{readEmAsmArgsArray.length=0;for(var r;r=HEAPU8[e++>>>0];){var n=r!=105;n&=r!=112,t+=n&&t%8?4:0,readEmAsmArgsArray.push(r==112?HEAPU32[t>>>2>>>0]:r==105?HEAP32[t>>>2>>>0]:HEAPF64[t>>>3>>>0]),t+=n?8:4}return readEmAsmArgsArray},runEmAsmFunction=(e,t,r)=>{var n=readEmAsmArgs(t,r);return ASM_CONSTS[e](...n)};function _emscripten_asm_const_int(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runEmAsmFunction(e,t,r)}_emscripten_asm_const_int.sig="ippp";function _emscripten_asm_const_ptr(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runEmAsmFunction(e,t,r)}_emscripten_asm_const_ptr.sig="pppp";function _emscripten_console_error(e){e>>>=0,console.error(UTF8ToString(e))}_emscripten_console_error.sig="vp";function _emscripten_console_log(e){e>>>=0,console.log(UTF8ToString(e))}_emscripten_console_log.sig="vp";function _emscripten_console_trace(e){e>>>=0,console.trace(UTF8ToString(e))}_emscripten_console_trace.sig="vp";function _emscripten_console_warn(e){e>>>=0,console.warn(UTF8ToString(e))}_emscripten_console_warn.sig="vp";var _emscripten_date_now=()=>Date.now();_emscripten_date_now.sig="d";function _emscripten_err(e){return e>>>=0,err(UTF8ToString(e))}_emscripten_err.sig="vp";var getHeapMax=()=>4294901760;function _emscripten_get_heap_max(){return getHeapMax()}_emscripten_get_heap_max.sig="p";var _emscripten_get_now_res=()=>ENVIRONMENT_IS_NODE?1:1e3;_emscripten_get_now_res.sig="d";var GLctx,webgl_enable_ANGLE_instanced_arrays=e=>{var t=e.getExtension("ANGLE_instanced_arrays");if(t)return e.vertexAttribDivisor=(r,n)=>t.vertexAttribDivisorANGLE(r,n),e.drawArraysInstanced=(r,n,a,o)=>t.drawArraysInstancedANGLE(r,n,a,o),e.drawElementsInstanced=(r,n,a,o,l)=>t.drawElementsInstancedANGLE(r,n,a,o,l),1},webgl_enable_OES_vertex_array_object=e=>{var t=e.getExtension("OES_vertex_array_object");if(t)return e.createVertexArray=()=>t.createVertexArrayOES(),e.deleteVertexArray=r=>t.deleteVertexArrayOES(r),e.bindVertexArray=r=>t.bindVertexArrayOES(r),e.isVertexArray=r=>t.isVertexArrayOES(r),1},webgl_enable_WEBGL_draw_buffers=e=>{var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=(r,n)=>t.drawBuffersWEBGL(r,n),1},webgl_enable_EXT_polygon_offset_clamp=e=>!!(e.extPolygonOffsetClamp=e.getExtension("EXT_polygon_offset_clamp")),webgl_enable_EXT_clip_control=e=>!!(e.extClipControl=e.getExtension("EXT_clip_control")),webgl_enable_WEBGL_polygon_mode=e=>!!(e.webglPolygonMode=e.getExtension("WEBGL_polygon_mode")),webgl_enable_WEBGL_multi_draw=e=>!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw")),getEmscriptenSupportedExtensions=e=>{var t=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_disjoint_timer_query","EXT_frag_depth","EXT_shader_texture_lod","EXT_sRGB","OES_element_index_uint","OES_fbo_render_mipmap","OES_standard_derivatives","OES_texture_float","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_depth_texture","WEBGL_draw_buffers","EXT_clip_control","EXT_color_buffer_half_float","EXT_depth_clamp","EXT_float_blend","EXT_polygon_offset_clamp","EXT_texture_compression_bptc","EXT_texture_compression_rgtc","EXT_texture_filter_anisotropic","KHR_parallel_shader_compile","OES_texture_float_linear","WEBGL_blend_func_extended","WEBGL_compressed_texture_astc","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_debug_renderer_info","WEBGL_debug_shaders","WEBGL_lose_context","WEBGL_multi_draw","WEBGL_polygon_mode"];return(e.getSupportedExtensions()||[]).filter(r=>t.includes(r))},GL={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],stringCache:{},unpackAlignment:4,unpackRowLength:0,recordError:e=>{GL.lastError||(GL.lastError=e)},getNewId:e=>{for(var t=GL.counter++,r=e.length;r{for(var a=0;a>>2>>>0]=l}},getSource:(e,t,r,n)=>{for(var a="",o=0;o>>2>>>0]:void 0;a+=UTF8ToString(HEAPU32[r+o*4>>>2>>>0],l)}return a},createContext:(e,t)=>{if(!e.getContextSafariWebGL2Fixed){let a=function(o,l){var u=e.getContextSafariWebGL2Fixed(o,l);return o=="webgl"==u instanceof WebGLRenderingContext?u:null};e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=a}var r=e.getContext("webgl",t);if(!r)return 0;var n=GL.registerContext(r,t);return n},registerContext:(e,t)=>{var r=GL.getNewId(GL.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),GL.contexts[r]=n,(typeof t.enableExtensionsByDefault>"u"||t.enableExtensionsByDefault)&&GL.initExtensions(n),r},makeContextCurrent:e=>{var t;return GL.currentContext=GL.contexts[e],Module.ctx=GLctx=(t=GL.currentContext)==null?void 0:t.GLctx,!(e&&!GLctx)},getContext:e=>GL.contexts[e],deleteContext:e=>{GL.currentContext===GL.contexts[e]&&(GL.currentContext=null),typeof JSEvents=="object"&&JSEvents.removeAllHandlersOnTarget(GL.contexts[e].GLctx.canvas),GL.contexts[e]&&GL.contexts[e].GLctx.canvas&&(GL.contexts[e].GLctx.canvas.GLctxObject=void 0),GL.contexts[e]=null},initExtensions:e=>{if(e||(e=GL.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;webgl_enable_WEBGL_multi_draw(t),webgl_enable_EXT_polygon_offset_clamp(t),webgl_enable_EXT_clip_control(t),webgl_enable_WEBGL_polygon_mode(t),webgl_enable_ANGLE_instanced_arrays(t),webgl_enable_OES_vertex_array_object(t),webgl_enable_WEBGL_draw_buffers(t),t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query"),getEmscriptenSupportedExtensions(t).forEach(r=>{!r.includes("lose_context")&&!r.includes("debug")&&t.getExtension(r)})}}},_glActiveTexture=e=>GLctx.activeTexture(e);_glActiveTexture.sig="vi";var _emscripten_glActiveTexture=_glActiveTexture;_emscripten_glActiveTexture.sig="vi";var _glAttachShader=(e,t)=>{GLctx.attachShader(GL.programs[e],GL.shaders[t])};_glAttachShader.sig="vii";var _emscripten_glAttachShader=_glAttachShader;_emscripten_glAttachShader.sig="vii";var _glBeginQueryEXT=(e,t)=>{GLctx.disjointTimerQueryExt.beginQueryEXT(e,GL.queries[t])};_glBeginQueryEXT.sig="vii";var _emscripten_glBeginQueryEXT=_glBeginQueryEXT;function _glBindAttribLocation(e,t,r){r>>>=0,GLctx.bindAttribLocation(GL.programs[e],t,UTF8ToString(r))}_glBindAttribLocation.sig="viip";var _emscripten_glBindAttribLocation=_glBindAttribLocation;_emscripten_glBindAttribLocation.sig="viip";var _glBindBuffer=(e,t)=>{GLctx.bindBuffer(e,GL.buffers[t])};_glBindBuffer.sig="vii";var _emscripten_glBindBuffer=_glBindBuffer;_emscripten_glBindBuffer.sig="vii";var _glBindFramebuffer=(e,t)=>{GLctx.bindFramebuffer(e,GL.framebuffers[t])};_glBindFramebuffer.sig="vii";var _emscripten_glBindFramebuffer=_glBindFramebuffer;_emscripten_glBindFramebuffer.sig="vii";var _glBindRenderbuffer=(e,t)=>{GLctx.bindRenderbuffer(e,GL.renderbuffers[t])};_glBindRenderbuffer.sig="vii";var _emscripten_glBindRenderbuffer=_glBindRenderbuffer;_emscripten_glBindRenderbuffer.sig="vii";var _glBindTexture=(e,t)=>{GLctx.bindTexture(e,GL.textures[t])};_glBindTexture.sig="vii";var _emscripten_glBindTexture=_glBindTexture;_emscripten_glBindTexture.sig="vii";var _glBindVertexArray=e=>{GLctx.bindVertexArray(GL.vaos[e])};_glBindVertexArray.sig="vi";var _glBindVertexArrayOES=_glBindVertexArray;_glBindVertexArrayOES.sig="vi";var _emscripten_glBindVertexArrayOES=_glBindVertexArrayOES;_emscripten_glBindVertexArrayOES.sig="vi";var _glBlendColor=(e,t,r,n)=>GLctx.blendColor(e,t,r,n);_glBlendColor.sig="vffff";var _emscripten_glBlendColor=_glBlendColor;_emscripten_glBlendColor.sig="vffff";var _glBlendEquation=e=>GLctx.blendEquation(e);_glBlendEquation.sig="vi";var _emscripten_glBlendEquation=_glBlendEquation;_emscripten_glBlendEquation.sig="vi";var _glBlendEquationSeparate=(e,t)=>GLctx.blendEquationSeparate(e,t);_glBlendEquationSeparate.sig="vii";var _emscripten_glBlendEquationSeparate=_glBlendEquationSeparate;_emscripten_glBlendEquationSeparate.sig="vii";var _glBlendFunc=(e,t)=>GLctx.blendFunc(e,t);_glBlendFunc.sig="vii";var _emscripten_glBlendFunc=_glBlendFunc;_emscripten_glBlendFunc.sig="vii";var _glBlendFuncSeparate=(e,t,r,n)=>GLctx.blendFuncSeparate(e,t,r,n);_glBlendFuncSeparate.sig="viiii";var _emscripten_glBlendFuncSeparate=_glBlendFuncSeparate;_emscripten_glBlendFuncSeparate.sig="viiii";function _glBufferData(e,t,r,n){t>>>=0,r>>>=0,GLctx.bufferData(e,r?HEAPU8.subarray(r>>>0,r+t>>>0):t,n)}_glBufferData.sig="vippi";var _emscripten_glBufferData=_glBufferData;_emscripten_glBufferData.sig="vippi";function _glBufferSubData(e,t,r,n){t>>>=0,r>>>=0,n>>>=0,GLctx.bufferSubData(e,t,HEAPU8.subarray(n>>>0,n+r>>>0))}_glBufferSubData.sig="vippp";var _emscripten_glBufferSubData=_glBufferSubData;_emscripten_glBufferSubData.sig="vippp";var _glCheckFramebufferStatus=e=>GLctx.checkFramebufferStatus(e);_glCheckFramebufferStatus.sig="ii";var _emscripten_glCheckFramebufferStatus=_glCheckFramebufferStatus;_emscripten_glCheckFramebufferStatus.sig="ii";var _glClear=e=>GLctx.clear(e);_glClear.sig="vi";var _emscripten_glClear=_glClear;_emscripten_glClear.sig="vi";var _glClearColor=(e,t,r,n)=>GLctx.clearColor(e,t,r,n);_glClearColor.sig="vffff";var _emscripten_glClearColor=_glClearColor;_emscripten_glClearColor.sig="vffff";var _glClearDepthf=e=>GLctx.clearDepth(e);_glClearDepthf.sig="vf";var _emscripten_glClearDepthf=_glClearDepthf;_emscripten_glClearDepthf.sig="vf";var _glClearStencil=e=>GLctx.clearStencil(e);_glClearStencil.sig="vi";var _emscripten_glClearStencil=_glClearStencil;_emscripten_glClearStencil.sig="vi";var _glClipControlEXT=(e,t)=>{GLctx.extClipControl.clipControlEXT(e,t)};_glClipControlEXT.sig="vii";var _emscripten_glClipControlEXT=_glClipControlEXT,_glColorMask=(e,t,r,n)=>{GLctx.colorMask(!!e,!!t,!!r,!!n)};_glColorMask.sig="viiii";var _emscripten_glColorMask=_glColorMask;_emscripten_glColorMask.sig="viiii";var _glCompileShader=e=>{GLctx.compileShader(GL.shaders[e])};_glCompileShader.sig="vi";var _emscripten_glCompileShader=_glCompileShader;_emscripten_glCompileShader.sig="vi";function _glCompressedTexImage2D(e,t,r,n,a,o,l,u){u>>>=0,GLctx.compressedTexImage2D(e,t,r,n,a,o,HEAPU8.subarray(u>>>0,u+l>>>0))}_glCompressedTexImage2D.sig="viiiiiiip";var _emscripten_glCompressedTexImage2D=_glCompressedTexImage2D;_emscripten_glCompressedTexImage2D.sig="viiiiiiip";function _glCompressedTexSubImage2D(e,t,r,n,a,o,l,u,_){_>>>=0,GLctx.compressedTexSubImage2D(e,t,r,n,a,o,l,HEAPU8.subarray(_>>>0,_+u>>>0))}_glCompressedTexSubImage2D.sig="viiiiiiiip";var _emscripten_glCompressedTexSubImage2D=_glCompressedTexSubImage2D;_emscripten_glCompressedTexSubImage2D.sig="viiiiiiiip";var _glCopyTexImage2D=(e,t,r,n,a,o,l,u)=>GLctx.copyTexImage2D(e,t,r,n,a,o,l,u);_glCopyTexImage2D.sig="viiiiiiii";var _emscripten_glCopyTexImage2D=_glCopyTexImage2D;_emscripten_glCopyTexImage2D.sig="viiiiiiii";var _glCopyTexSubImage2D=(e,t,r,n,a,o,l,u)=>GLctx.copyTexSubImage2D(e,t,r,n,a,o,l,u);_glCopyTexSubImage2D.sig="viiiiiiii";var _emscripten_glCopyTexSubImage2D=_glCopyTexSubImage2D;_emscripten_glCopyTexSubImage2D.sig="viiiiiiii";var _glCreateProgram=()=>{var e=GL.getNewId(GL.programs),t=GLctx.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,GL.programs[e]=t,e};_glCreateProgram.sig="i";var _emscripten_glCreateProgram=_glCreateProgram;_emscripten_glCreateProgram.sig="i";var _glCreateShader=e=>{var t=GL.getNewId(GL.shaders);return GL.shaders[t]=GLctx.createShader(e),t};_glCreateShader.sig="ii";var _emscripten_glCreateShader=_glCreateShader;_emscripten_glCreateShader.sig="ii";var _glCullFace=e=>GLctx.cullFace(e);_glCullFace.sig="vi";var _emscripten_glCullFace=_glCullFace;_emscripten_glCullFace.sig="vi";function _glDeleteBuffers(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.buffers[n];a&&(GLctx.deleteBuffer(a),a.name=0,GL.buffers[n]=null)}}_glDeleteBuffers.sig="vip";var _emscripten_glDeleteBuffers=_glDeleteBuffers;_emscripten_glDeleteBuffers.sig="vip";function _glDeleteFramebuffers(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.framebuffers[n];a&&(GLctx.deleteFramebuffer(a),a.name=0,GL.framebuffers[n]=null)}}_glDeleteFramebuffers.sig="vip";var _emscripten_glDeleteFramebuffers=_glDeleteFramebuffers;_emscripten_glDeleteFramebuffers.sig="vip";var _glDeleteProgram=e=>{if(e){var t=GL.programs[e];if(!t){GL.recordError(1281);return}GLctx.deleteProgram(t),t.name=0,GL.programs[e]=null}};_glDeleteProgram.sig="vi";var _emscripten_glDeleteProgram=_glDeleteProgram;_emscripten_glDeleteProgram.sig="vi";function _glDeleteQueriesEXT(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.queries[n];a&&(GLctx.disjointTimerQueryExt.deleteQueryEXT(a),GL.queries[n]=null)}}_glDeleteQueriesEXT.sig="vip";var _emscripten_glDeleteQueriesEXT=_glDeleteQueriesEXT;function _glDeleteRenderbuffers(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.renderbuffers[n];a&&(GLctx.deleteRenderbuffer(a),a.name=0,GL.renderbuffers[n]=null)}}_glDeleteRenderbuffers.sig="vip";var _emscripten_glDeleteRenderbuffers=_glDeleteRenderbuffers;_emscripten_glDeleteRenderbuffers.sig="vip";var _glDeleteShader=e=>{if(e){var t=GL.shaders[e];if(!t){GL.recordError(1281);return}GLctx.deleteShader(t),GL.shaders[e]=null}};_glDeleteShader.sig="vi";var _emscripten_glDeleteShader=_glDeleteShader;_emscripten_glDeleteShader.sig="vi";function _glDeleteTextures(e,t){t>>>=0;for(var r=0;r>>2>>>0],a=GL.textures[n];a&&(GLctx.deleteTexture(a),a.name=0,GL.textures[n]=null)}}_glDeleteTextures.sig="vip";var _emscripten_glDeleteTextures=_glDeleteTextures;_emscripten_glDeleteTextures.sig="vip";function _glDeleteVertexArrays(e,t){t>>>=0;for(var r=0;r>>2>>>0];GLctx.deleteVertexArray(GL.vaos[n]),GL.vaos[n]=null}}_glDeleteVertexArrays.sig="vip";var _glDeleteVertexArraysOES=_glDeleteVertexArrays;_glDeleteVertexArraysOES.sig="vip";var _emscripten_glDeleteVertexArraysOES=_glDeleteVertexArraysOES;_emscripten_glDeleteVertexArraysOES.sig="vip";var _glDepthFunc=e=>GLctx.depthFunc(e);_glDepthFunc.sig="vi";var _emscripten_glDepthFunc=_glDepthFunc;_emscripten_glDepthFunc.sig="vi";var _glDepthMask=e=>{GLctx.depthMask(!!e)};_glDepthMask.sig="vi";var _emscripten_glDepthMask=_glDepthMask;_emscripten_glDepthMask.sig="vi";var _glDepthRangef=(e,t)=>GLctx.depthRange(e,t);_glDepthRangef.sig="vff";var _emscripten_glDepthRangef=_glDepthRangef;_emscripten_glDepthRangef.sig="vff";var _glDetachShader=(e,t)=>{GLctx.detachShader(GL.programs[e],GL.shaders[t])};_glDetachShader.sig="vii";var _emscripten_glDetachShader=_glDetachShader;_emscripten_glDetachShader.sig="vii";var _glDisable=e=>GLctx.disable(e);_glDisable.sig="vi";var _emscripten_glDisable=_glDisable;_emscripten_glDisable.sig="vi";var _glDisableVertexAttribArray=e=>{GLctx.disableVertexAttribArray(e)};_glDisableVertexAttribArray.sig="vi";var _emscripten_glDisableVertexAttribArray=_glDisableVertexAttribArray;_emscripten_glDisableVertexAttribArray.sig="vi";var _glDrawArrays=(e,t,r)=>{GLctx.drawArrays(e,t,r)};_glDrawArrays.sig="viii";var _emscripten_glDrawArrays=_glDrawArrays;_emscripten_glDrawArrays.sig="viii";var _glDrawArraysInstanced=(e,t,r,n)=>{GLctx.drawArraysInstanced(e,t,r,n)};_glDrawArraysInstanced.sig="viiii";var _glDrawArraysInstancedANGLE=_glDrawArraysInstanced,_emscripten_glDrawArraysInstancedANGLE=_glDrawArraysInstancedANGLE,tempFixedLengthArray=[];function _glDrawBuffers(e,t){t>>>=0;for(var r=tempFixedLengthArray[e],n=0;n>>2>>>0];GLctx.drawBuffers(r)}_glDrawBuffers.sig="vip";var _glDrawBuffersWEBGL=_glDrawBuffers,_emscripten_glDrawBuffersWEBGL=_glDrawBuffersWEBGL;function _glDrawElements(e,t,r,n){n>>>=0,GLctx.drawElements(e,t,r,n)}_glDrawElements.sig="viiip";var _emscripten_glDrawElements=_glDrawElements;_emscripten_glDrawElements.sig="viiip";function _glDrawElementsInstanced(e,t,r,n,a){n>>>=0,GLctx.drawElementsInstanced(e,t,r,n,a)}_glDrawElementsInstanced.sig="viiipi";var _glDrawElementsInstancedANGLE=_glDrawElementsInstanced,_emscripten_glDrawElementsInstancedANGLE=_glDrawElementsInstancedANGLE,_glEnable=e=>GLctx.enable(e);_glEnable.sig="vi";var _emscripten_glEnable=_glEnable;_emscripten_glEnable.sig="vi";var _glEnableVertexAttribArray=e=>{GLctx.enableVertexAttribArray(e)};_glEnableVertexAttribArray.sig="vi";var _emscripten_glEnableVertexAttribArray=_glEnableVertexAttribArray;_emscripten_glEnableVertexAttribArray.sig="vi";var _glEndQueryEXT=e=>{GLctx.disjointTimerQueryExt.endQueryEXT(e)};_glEndQueryEXT.sig="vi";var _emscripten_glEndQueryEXT=_glEndQueryEXT,_glFinish=()=>GLctx.finish();_glFinish.sig="v";var _emscripten_glFinish=_glFinish;_emscripten_glFinish.sig="v";var _glFlush=()=>GLctx.flush();_glFlush.sig="v";var _emscripten_glFlush=_glFlush;_emscripten_glFlush.sig="v";var _glFramebufferRenderbuffer=(e,t,r,n)=>{GLctx.framebufferRenderbuffer(e,t,r,GL.renderbuffers[n])};_glFramebufferRenderbuffer.sig="viiii";var _emscripten_glFramebufferRenderbuffer=_glFramebufferRenderbuffer;_emscripten_glFramebufferRenderbuffer.sig="viiii";var _glFramebufferTexture2D=(e,t,r,n,a)=>{GLctx.framebufferTexture2D(e,t,r,GL.textures[n],a)};_glFramebufferTexture2D.sig="viiiii";var _emscripten_glFramebufferTexture2D=_glFramebufferTexture2D;_emscripten_glFramebufferTexture2D.sig="viiiii";var _glFrontFace=e=>GLctx.frontFace(e);_glFrontFace.sig="vi";var _emscripten_glFrontFace=_glFrontFace;_emscripten_glFrontFace.sig="vi";function _glGenBuffers(e,t){t>>>=0,GL.genObject(e,t,"createBuffer",GL.buffers)}_glGenBuffers.sig="vip";var _emscripten_glGenBuffers=_glGenBuffers;_emscripten_glGenBuffers.sig="vip";function _glGenFramebuffers(e,t){t>>>=0,GL.genObject(e,t,"createFramebuffer",GL.framebuffers)}_glGenFramebuffers.sig="vip";var _emscripten_glGenFramebuffers=_glGenFramebuffers;_emscripten_glGenFramebuffers.sig="vip";function _glGenQueriesEXT(e,t){t>>>=0;for(var r=0;r>>2>>>0]=0;return}var a=GL.getNewId(GL.queries);n.name=a,GL.queries[a]=n,HEAP32[t+r*4>>>2>>>0]=a}}_glGenQueriesEXT.sig="vip";var _emscripten_glGenQueriesEXT=_glGenQueriesEXT;function _glGenRenderbuffers(e,t){t>>>=0,GL.genObject(e,t,"createRenderbuffer",GL.renderbuffers)}_glGenRenderbuffers.sig="vip";var _emscripten_glGenRenderbuffers=_glGenRenderbuffers;_emscripten_glGenRenderbuffers.sig="vip";function _glGenTextures(e,t){t>>>=0,GL.genObject(e,t,"createTexture",GL.textures)}_glGenTextures.sig="vip";var _emscripten_glGenTextures=_glGenTextures;_emscripten_glGenTextures.sig="vip";function _glGenVertexArrays(e,t){t>>>=0,GL.genObject(e,t,"createVertexArray",GL.vaos)}_glGenVertexArrays.sig="vip";var _glGenVertexArraysOES=_glGenVertexArrays;_glGenVertexArraysOES.sig="vip";var _emscripten_glGenVertexArraysOES=_glGenVertexArraysOES;_emscripten_glGenVertexArraysOES.sig="vip";var _glGenerateMipmap=e=>GLctx.generateMipmap(e);_glGenerateMipmap.sig="vi";var _emscripten_glGenerateMipmap=_glGenerateMipmap;_emscripten_glGenerateMipmap.sig="vi";var __glGetActiveAttribOrUniform=(e,t,r,n,a,o,l,u)=>{t=GL.programs[t];var _=GLctx[e](t,r);if(_){var d=u&&stringToUTF8(_.name,u,n);a&&(HEAP32[a>>>2>>>0]=d),o&&(HEAP32[o>>>2>>>0]=_.size),l&&(HEAP32[l>>>2>>>0]=_.type)}};function _glGetActiveAttrib(e,t,r,n,a,o,l){n>>>=0,a>>>=0,o>>>=0,l>>>=0,__glGetActiveAttribOrUniform("getActiveAttrib",e,t,r,n,a,o,l)}_glGetActiveAttrib.sig="viiipppp";var _emscripten_glGetActiveAttrib=_glGetActiveAttrib;_emscripten_glGetActiveAttrib.sig="viiipppp";function _glGetActiveUniform(e,t,r,n,a,o,l){n>>>=0,a>>>=0,o>>>=0,l>>>=0,__glGetActiveAttribOrUniform("getActiveUniform",e,t,r,n,a,o,l)}_glGetActiveUniform.sig="viiipppp";var _emscripten_glGetActiveUniform=_glGetActiveUniform;_emscripten_glGetActiveUniform.sig="viiipppp";function _glGetAttachedShaders(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getAttachedShaders(GL.programs[e]),o=a.length;o>t&&(o=t),HEAP32[r>>>2>>>0]=o;for(var l=0;l>>2>>>0]=u}}_glGetAttachedShaders.sig="viipp";var _emscripten_glGetAttachedShaders=_glGetAttachedShaders;_emscripten_glGetAttachedShaders.sig="viipp";function _glGetAttribLocation(e,t){return t>>>=0,GLctx.getAttribLocation(GL.programs[e],UTF8ToString(t))}_glGetAttribLocation.sig="iip";var _emscripten_glGetAttribLocation=_glGetAttribLocation;_emscripten_glGetAttribLocation.sig="iip";var writeI53ToI64=(e,t)=>{HEAPU32[e>>>2>>>0]=t;var r=HEAPU32[e>>>2>>>0];HEAPU32[e+4>>>2>>>0]=(t-r)/4294967296},emscriptenWebGLGet=(e,t,r)=>{if(!t){GL.recordError(1281);return}var n=void 0;switch(e){case 36346:n=1;break;case 36344:r!=0&&r!=1&&GL.recordError(1280);return;case 36345:n=0;break;case 34466:var a=GLctx.getParameter(34467);n=a?a.length:0;break}if(n===void 0){var o=GLctx.getParameter(e);switch(typeof o){case"number":n=o;break;case"boolean":n=o?1:0;break;case"string":GL.recordError(1280);return;case"object":if(o===null)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 34068:{n=0;break}default:{GL.recordError(1280);return}}else if(o instanceof Float32Array||o instanceof Uint32Array||o instanceof Int32Array||o instanceof Array){for(var l=0;l>>2>>>0]=o[l];break;case 2:HEAPF32[t+l*4>>>2>>>0]=o[l];break;case 4:HEAP8[t+l>>>0]=o[l]?1:0;break}return}else try{n=o.name|0}catch(u){GL.recordError(1280),err("GL_INVALID_ENUM in glGet".concat(r,"v: Unknown object returned from WebGL getParameter(").concat(e,")! (error: ").concat(u,")"));return}break;default:GL.recordError(1280),err("GL_INVALID_ENUM in glGet".concat(r,"v: Native code calling glGet").concat(r,"v(").concat(e,") and it returns ").concat(o," of type ").concat(typeof o,"!"));return}}switch(r){case 1:writeI53ToI64(t,n);break;case 0:HEAP32[t>>>2>>>0]=n;break;case 2:HEAPF32[t>>>2>>>0]=n;break;case 4:HEAP8[t>>>0]=n?1:0;break}};function _glGetBooleanv(e,t){return t>>>=0,emscriptenWebGLGet(e,t,4)}_glGetBooleanv.sig="vip";var _emscripten_glGetBooleanv=_glGetBooleanv;_emscripten_glGetBooleanv.sig="vip";function _glGetBufferParameteriv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.getBufferParameter(e,t)}_glGetBufferParameteriv.sig="viip";var _emscripten_glGetBufferParameteriv=_glGetBufferParameteriv;_emscripten_glGetBufferParameteriv.sig="viip";var _glGetError=()=>{var e=GLctx.getError()||GL.lastError;return GL.lastError=0,e};_glGetError.sig="i";var _emscripten_glGetError=_glGetError;_emscripten_glGetError.sig="i";function _glGetFloatv(e,t){return t>>>=0,emscriptenWebGLGet(e,t,2)}_glGetFloatv.sig="vip";var _emscripten_glGetFloatv=_glGetFloatv;_emscripten_glGetFloatv.sig="vip";function _glGetFramebufferAttachmentParameteriv(e,t,r,n){n>>>=0;var a=GLctx.getFramebufferAttachmentParameter(e,t,r);(a instanceof WebGLRenderbuffer||a instanceof WebGLTexture)&&(a=a.name|0),HEAP32[n>>>2>>>0]=a}_glGetFramebufferAttachmentParameteriv.sig="viiip";var _emscripten_glGetFramebufferAttachmentParameteriv=_glGetFramebufferAttachmentParameteriv;_emscripten_glGetFramebufferAttachmentParameteriv.sig="viiip";function _glGetIntegerv(e,t){return t>>>=0,emscriptenWebGLGet(e,t,0)}_glGetIntegerv.sig="vip";var _emscripten_glGetIntegerv=_glGetIntegerv;_emscripten_glGetIntegerv.sig="vip";function _glGetProgramInfoLog(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getProgramInfoLog(GL.programs[e]);a===null&&(a="(unknown error)");var o=t>0&&n?stringToUTF8(a,n,t):0;r&&(HEAP32[r>>>2>>>0]=o)}_glGetProgramInfoLog.sig="viipp";var _emscripten_glGetProgramInfoLog=_glGetProgramInfoLog;_emscripten_glGetProgramInfoLog.sig="viipp";function _glGetProgramiv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}if(e>=GL.counter){GL.recordError(1281);return}if(e=GL.programs[e],t==35716){var n=GLctx.getProgramInfoLog(e);n===null&&(n="(unknown error)"),HEAP32[r>>>2>>>0]=n.length+1}else if(t==35719){if(!e.maxUniformLength)for(var a=GLctx.getProgramParameter(e,35718),o=0;o>>2>>>0]=e.maxUniformLength}else if(t==35722){if(!e.maxAttributeLength)for(var l=GLctx.getProgramParameter(e,35721),o=0;o>>2>>>0]=e.maxAttributeLength}else if(t==35381){if(!e.maxUniformBlockNameLength)for(var u=GLctx.getProgramParameter(e,35382),o=0;o>>2>>>0]=e.maxUniformBlockNameLength}else HEAP32[r>>>2>>>0]=GLctx.getProgramParameter(e,t)}_glGetProgramiv.sig="viip";var _emscripten_glGetProgramiv=_glGetProgramiv;_emscripten_glGetProgramiv.sig="viip";function _glGetQueryObjecti64vEXT(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}var n=GL.queries[e],a;a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(n,t);var o;typeof a=="boolean"?o=a?1:0:o=a,writeI53ToI64(r,o)}_glGetQueryObjecti64vEXT.sig="viip";var _emscripten_glGetQueryObjecti64vEXT=_glGetQueryObjecti64vEXT;function _glGetQueryObjectivEXT(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}var n=GL.queries[e],a=GLctx.disjointTimerQueryExt.getQueryObjectEXT(n,t),o;typeof a=="boolean"?o=a?1:0:o=a,HEAP32[r>>>2>>>0]=o}_glGetQueryObjectivEXT.sig="viip";var _emscripten_glGetQueryObjectivEXT=_glGetQueryObjectivEXT,_glGetQueryObjectui64vEXT=_glGetQueryObjecti64vEXT,_emscripten_glGetQueryObjectui64vEXT=_glGetQueryObjectui64vEXT,_glGetQueryObjectuivEXT=_glGetQueryObjectivEXT,_emscripten_glGetQueryObjectuivEXT=_glGetQueryObjectuivEXT;function _glGetQueryivEXT(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.disjointTimerQueryExt.getQueryEXT(e,t)}_glGetQueryivEXT.sig="viip";var _emscripten_glGetQueryivEXT=_glGetQueryivEXT;function _glGetRenderbufferParameteriv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.getRenderbufferParameter(e,t)}_glGetRenderbufferParameteriv.sig="viip";var _emscripten_glGetRenderbufferParameteriv=_glGetRenderbufferParameteriv;_emscripten_glGetRenderbufferParameteriv.sig="viip";function _glGetShaderInfoLog(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getShaderInfoLog(GL.shaders[e]);a===null&&(a="(unknown error)");var o=t>0&&n?stringToUTF8(a,n,t):0;r&&(HEAP32[r>>>2>>>0]=o)}_glGetShaderInfoLog.sig="viipp";var _emscripten_glGetShaderInfoLog=_glGetShaderInfoLog;_emscripten_glGetShaderInfoLog.sig="viipp";function _glGetShaderPrecisionFormat(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getShaderPrecisionFormat(e,t);HEAP32[r>>>2>>>0]=a.rangeMin,HEAP32[r+4>>>2>>>0]=a.rangeMax,HEAP32[n>>>2>>>0]=a.precision}_glGetShaderPrecisionFormat.sig="viipp";var _emscripten_glGetShaderPrecisionFormat=_glGetShaderPrecisionFormat;_emscripten_glGetShaderPrecisionFormat.sig="viipp";function _glGetShaderSource(e,t,r,n){r>>>=0,n>>>=0;var a=GLctx.getShaderSource(GL.shaders[e]);if(a){var o=t>0&&n?stringToUTF8(a,n,t):0;r&&(HEAP32[r>>>2>>>0]=o)}}_glGetShaderSource.sig="viipp";var _emscripten_glGetShaderSource=_glGetShaderSource;_emscripten_glGetShaderSource.sig="viipp";function _glGetShaderiv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}if(t==35716){var n=GLctx.getShaderInfoLog(GL.shaders[e]);n===null&&(n="(unknown error)");var a=n?n.length+1:0;HEAP32[r>>>2>>>0]=a}else if(t==35720){var o=GLctx.getShaderSource(GL.shaders[e]),l=o?o.length+1:0;HEAP32[r>>>2>>>0]=l}else HEAP32[r>>>2>>>0]=GLctx.getShaderParameter(GL.shaders[e],t)}_glGetShaderiv.sig="viip";var _emscripten_glGetShaderiv=_glGetShaderiv;_emscripten_glGetShaderiv.sig="viip";var webglGetExtensions=function e(){var t=getEmscriptenSupportedExtensions(GLctx);return t=t.concat(t.map(r=>"GL_"+r)),t};function _glGetString(e){var t=GL.stringCache[e];if(!t){switch(e){case 7939:t=stringToNewUTF8(webglGetExtensions().join(" "));break;case 7936:case 7937:case 37445:case 37446:var r=GLctx.getParameter(e);r||GL.recordError(1280),t=r?stringToNewUTF8(r):0;break;case 7938:var n=GLctx.getParameter(7938),a="OpenGL ES 2.0 (".concat(n,")");t=stringToNewUTF8(a);break;case 35724:var o=GLctx.getParameter(35724),l=/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/,u=o.match(l);u!==null&&(u[1].length==3&&(u[1]=u[1]+"0"),o="OpenGL ES GLSL ES ".concat(u[1]," (").concat(o,")")),t=stringToNewUTF8(o);break;default:GL.recordError(1280)}GL.stringCache[e]=t}return t}_glGetString.sig="pi";var _emscripten_glGetString=_glGetString;_emscripten_glGetString.sig="pi";function _glGetTexParameterfv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAPF32[r>>>2>>>0]=GLctx.getTexParameter(e,t)}_glGetTexParameterfv.sig="viip";var _emscripten_glGetTexParameterfv=_glGetTexParameterfv;_emscripten_glGetTexParameterfv.sig="viip";function _glGetTexParameteriv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.getTexParameter(e,t)}_glGetTexParameteriv.sig="viip";var _emscripten_glGetTexParameteriv=_glGetTexParameteriv;_emscripten_glGetTexParameteriv.sig="viip";var webglGetLeftBracePos=e=>e.slice(-1)=="]"&&e.lastIndexOf("["),webglPrepareUniformLocationsBeforeFirstUse=e=>{var t=e.uniformLocsById,r=e.uniformSizeAndIdsByName,n,a;if(!t){e.uniformLocsById=t={},e.uniformArrayNamesById={};var o=GLctx.getProgramParameter(e,35718);for(n=0;n0?u.slice(0,d):u,f=e.uniformIdCounter;for(e.uniformIdCounter+=_,r[p]=[_,f],a=0;a<_;++a)t[f]=a,e.uniformArrayNamesById[f++]=p}}};function _glGetUniformLocation(e,t){if(t>>>=0,t=UTF8ToString(t),e=GL.programs[e]){webglPrepareUniformLocationsBeforeFirstUse(e);var r=e.uniformLocsById,n=0,a=t,o=webglGetLeftBracePos(t);o>0&&(n=jstoi_q(t.slice(o+1))>>>0,a=t.slice(0,o));var l=e.uniformSizeAndIdsByName[a];if(l&&n{var t=GLctx.currentProgram;if(t){var r=t.uniformLocsById[e];return typeof r=="number"&&(t.uniformLocsById[e]=r=GLctx.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"[".concat(r,"]"):""))),r}else GL.recordError(1282)},emscriptenWebGLGetUniform=(e,t,r,n)=>{if(!r){GL.recordError(1281);return}e=GL.programs[e],webglPrepareUniformLocationsBeforeFirstUse(e);var a=GLctx.getUniform(e,webglGetUniformLocation(t));if(typeof a=="number"||typeof a=="boolean")switch(n){case 0:HEAP32[r>>>2>>>0]=a;break;case 2:HEAPF32[r>>>2>>>0]=a;break}else for(var o=0;o>>2>>>0]=a[o];break;case 2:HEAPF32[r+o*4>>>2>>>0]=a[o];break}};function _glGetUniformfv(e,t,r){r>>>=0,emscriptenWebGLGetUniform(e,t,r,2)}_glGetUniformfv.sig="viip";var _emscripten_glGetUniformfv=_glGetUniformfv;_emscripten_glGetUniformfv.sig="viip";function _glGetUniformiv(e,t,r){r>>>=0,emscriptenWebGLGetUniform(e,t,r,0)}_glGetUniformiv.sig="viip";var _emscripten_glGetUniformiv=_glGetUniformiv;_emscripten_glGetUniformiv.sig="viip";function _glGetVertexAttribPointerv(e,t,r){if(r>>>=0,!r){GL.recordError(1281);return}HEAP32[r>>>2>>>0]=GLctx.getVertexAttribOffset(e,t)}_glGetVertexAttribPointerv.sig="viip";var _emscripten_glGetVertexAttribPointerv=_glGetVertexAttribPointerv;_emscripten_glGetVertexAttribPointerv.sig="viip";var emscriptenWebGLGetVertexAttrib=(e,t,r,n)=>{if(!r){GL.recordError(1281);return}var a=GLctx.getVertexAttrib(e,t);if(t==34975)HEAP32[r>>>2>>>0]=a&&a.name;else if(typeof a=="number"||typeof a=="boolean")switch(n){case 0:HEAP32[r>>>2>>>0]=a;break;case 2:HEAPF32[r>>>2>>>0]=a;break;case 5:HEAP32[r>>>2>>>0]=Math.fround(a);break}else for(var o=0;o>>2>>>0]=a[o];break;case 2:HEAPF32[r+o*4>>>2>>>0]=a[o];break;case 5:HEAP32[r+o*4>>>2>>>0]=Math.fround(a[o]);break}};function _glGetVertexAttribfv(e,t,r){r>>>=0,emscriptenWebGLGetVertexAttrib(e,t,r,2)}_glGetVertexAttribfv.sig="viip";var _emscripten_glGetVertexAttribfv=_glGetVertexAttribfv;_emscripten_glGetVertexAttribfv.sig="viip";function _glGetVertexAttribiv(e,t,r){r>>>=0,emscriptenWebGLGetVertexAttrib(e,t,r,5)}_glGetVertexAttribiv.sig="viip";var _emscripten_glGetVertexAttribiv=_glGetVertexAttribiv;_emscripten_glGetVertexAttribiv.sig="viip";var _glHint=(e,t)=>GLctx.hint(e,t);_glHint.sig="vii";var _emscripten_glHint=_glHint;_emscripten_glHint.sig="vii";var _glIsBuffer=e=>{var t=GL.buffers[e];return t?GLctx.isBuffer(t):0};_glIsBuffer.sig="ii";var _emscripten_glIsBuffer=_glIsBuffer;_emscripten_glIsBuffer.sig="ii";var _glIsEnabled=e=>GLctx.isEnabled(e);_glIsEnabled.sig="ii";var _emscripten_glIsEnabled=_glIsEnabled;_emscripten_glIsEnabled.sig="ii";var _glIsFramebuffer=e=>{var t=GL.framebuffers[e];return t?GLctx.isFramebuffer(t):0};_glIsFramebuffer.sig="ii";var _emscripten_glIsFramebuffer=_glIsFramebuffer;_emscripten_glIsFramebuffer.sig="ii";var _glIsProgram=e=>(e=GL.programs[e],e?GLctx.isProgram(e):0);_glIsProgram.sig="ii";var _emscripten_glIsProgram=_glIsProgram;_emscripten_glIsProgram.sig="ii";var _glIsQueryEXT=e=>{var t=GL.queries[e];return t?GLctx.disjointTimerQueryExt.isQueryEXT(t):0};_glIsQueryEXT.sig="ii";var _emscripten_glIsQueryEXT=_glIsQueryEXT,_glIsRenderbuffer=e=>{var t=GL.renderbuffers[e];return t?GLctx.isRenderbuffer(t):0};_glIsRenderbuffer.sig="ii";var _emscripten_glIsRenderbuffer=_glIsRenderbuffer;_emscripten_glIsRenderbuffer.sig="ii";var _glIsShader=e=>{var t=GL.shaders[e];return t?GLctx.isShader(t):0};_glIsShader.sig="ii";var _emscripten_glIsShader=_glIsShader;_emscripten_glIsShader.sig="ii";var _glIsTexture=e=>{var t=GL.textures[e];return t?GLctx.isTexture(t):0};_glIsTexture.sig="ii";var _emscripten_glIsTexture=_glIsTexture;_emscripten_glIsTexture.sig="ii";var _glIsVertexArray=e=>{var t=GL.vaos[e];return t?GLctx.isVertexArray(t):0};_glIsVertexArray.sig="ii";var _glIsVertexArrayOES=_glIsVertexArray;_glIsVertexArrayOES.sig="ii";var _emscripten_glIsVertexArrayOES=_glIsVertexArrayOES;_emscripten_glIsVertexArrayOES.sig="ii";var _glLineWidth=e=>GLctx.lineWidth(e);_glLineWidth.sig="vf";var _emscripten_glLineWidth=_glLineWidth;_emscripten_glLineWidth.sig="vf";var _glLinkProgram=e=>{e=GL.programs[e],GLctx.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}};_glLinkProgram.sig="vi";var _emscripten_glLinkProgram=_glLinkProgram;_emscripten_glLinkProgram.sig="vi";var _glPixelStorei=(e,t)=>{e==3317?GL.unpackAlignment=t:e==3314&&(GL.unpackRowLength=t),GLctx.pixelStorei(e,t)};_glPixelStorei.sig="vii";var _emscripten_glPixelStorei=_glPixelStorei;_emscripten_glPixelStorei.sig="vii";var _glPolygonModeWEBGL=(e,t)=>{GLctx.webglPolygonMode.polygonModeWEBGL(e,t)};_glPolygonModeWEBGL.sig="vii";var _emscripten_glPolygonModeWEBGL=_glPolygonModeWEBGL,_glPolygonOffset=(e,t)=>GLctx.polygonOffset(e,t);_glPolygonOffset.sig="vff";var _emscripten_glPolygonOffset=_glPolygonOffset;_emscripten_glPolygonOffset.sig="vff";var _glPolygonOffsetClampEXT=(e,t,r)=>{GLctx.extPolygonOffsetClamp.polygonOffsetClampEXT(e,t,r)};_glPolygonOffsetClampEXT.sig="vfff";var _emscripten_glPolygonOffsetClampEXT=_glPolygonOffsetClampEXT,_glQueryCounterEXT=(e,t)=>{GLctx.disjointTimerQueryExt.queryCounterEXT(GL.queries[e],t)};_glQueryCounterEXT.sig="vii";var _emscripten_glQueryCounterEXT=_glQueryCounterEXT,computeUnpackAlignedImageSize=(e,t,r)=>{function n(l,u){return l+u-1&-u}var a=(GL.unpackRowLength||e)*r,o=n(a,GL.unpackAlignment);return t*o},colorChannelsInGlTextureFormat=e=>{var t={5:3,6:4,8:2,29502:3,29504:4};return t[e-6402]||1},heapObjectForWebGLType=e=>(e-=5120,e==1?HEAPU8:e==4?HEAP32:e==6?HEAPF32:e==5||e==28922?HEAPU32:HEAPU16),toTypedArrayIndex=(e,t)=>e>>>31-Math.clz32(t.BYTES_PER_ELEMENT),emscriptenWebGLGetTexPixelData=(e,t,r,n,a,o)=>{var l=heapObjectForWebGLType(e),u=colorChannelsInGlTextureFormat(t)*l.BYTES_PER_ELEMENT,_=computeUnpackAlignedImageSize(r,n,u);return l.subarray(toTypedArrayIndex(a,l)>>>0,toTypedArrayIndex(a+_,l)>>>0)};function _glReadPixels(e,t,r,n,a,o,l){l>>>=0;var u=emscriptenWebGLGetTexPixelData(o,a,r,n,l);if(!u){GL.recordError(1280);return}GLctx.readPixels(e,t,r,n,a,o,u)}_glReadPixels.sig="viiiiiip";var _emscripten_glReadPixels=_glReadPixels;_emscripten_glReadPixels.sig="viiiiiip";var _glReleaseShaderCompiler=()=>{};_glReleaseShaderCompiler.sig="v";var _emscripten_glReleaseShaderCompiler=_glReleaseShaderCompiler;_emscripten_glReleaseShaderCompiler.sig="v";var _glRenderbufferStorage=(e,t,r,n)=>GLctx.renderbufferStorage(e,t,r,n);_glRenderbufferStorage.sig="viiii";var _emscripten_glRenderbufferStorage=_glRenderbufferStorage;_emscripten_glRenderbufferStorage.sig="viiii";var _glSampleCoverage=(e,t)=>{GLctx.sampleCoverage(e,!!t)};_glSampleCoverage.sig="vfi";var _emscripten_glSampleCoverage=_glSampleCoverage;_emscripten_glSampleCoverage.sig="vfi";var _glScissor=(e,t,r,n)=>GLctx.scissor(e,t,r,n);_glScissor.sig="viiii";var _emscripten_glScissor=_glScissor;_emscripten_glScissor.sig="viiii";function _glShaderBinary(e,t,r,n,a){GL.recordError(1280)}_glShaderBinary.sig="vipipi";var _emscripten_glShaderBinary=_glShaderBinary;_emscripten_glShaderBinary.sig="vipipi";function _glShaderSource(e,t,r,n){r>>>=0,n>>>=0;var a=GL.getSource(e,t,r,n);GLctx.shaderSource(GL.shaders[e],a)}_glShaderSource.sig="viipp";var _emscripten_glShaderSource=_glShaderSource;_emscripten_glShaderSource.sig="viipp";var _glStencilFunc=(e,t,r)=>GLctx.stencilFunc(e,t,r);_glStencilFunc.sig="viii";var _emscripten_glStencilFunc=_glStencilFunc;_emscripten_glStencilFunc.sig="viii";var _glStencilFuncSeparate=(e,t,r,n)=>GLctx.stencilFuncSeparate(e,t,r,n);_glStencilFuncSeparate.sig="viiii";var _emscripten_glStencilFuncSeparate=_glStencilFuncSeparate;_emscripten_glStencilFuncSeparate.sig="viiii";var _glStencilMask=e=>GLctx.stencilMask(e);_glStencilMask.sig="vi";var _emscripten_glStencilMask=_glStencilMask;_emscripten_glStencilMask.sig="vi";var _glStencilMaskSeparate=(e,t)=>GLctx.stencilMaskSeparate(e,t);_glStencilMaskSeparate.sig="vii";var _emscripten_glStencilMaskSeparate=_glStencilMaskSeparate;_emscripten_glStencilMaskSeparate.sig="vii";var _glStencilOp=(e,t,r)=>GLctx.stencilOp(e,t,r);_glStencilOp.sig="viii";var _emscripten_glStencilOp=_glStencilOp;_emscripten_glStencilOp.sig="viii";var _glStencilOpSeparate=(e,t,r,n)=>GLctx.stencilOpSeparate(e,t,r,n);_glStencilOpSeparate.sig="viiii";var _emscripten_glStencilOpSeparate=_glStencilOpSeparate;_emscripten_glStencilOpSeparate.sig="viiii";function _glTexImage2D(e,t,r,n,a,o,l,u,_){_>>>=0;var d=_?emscriptenWebGLGetTexPixelData(u,l,n,a,_):null;GLctx.texImage2D(e,t,r,n,a,o,l,u,d)}_glTexImage2D.sig="viiiiiiiip";var _emscripten_glTexImage2D=_glTexImage2D;_emscripten_glTexImage2D.sig="viiiiiiiip";var _glTexParameterf=(e,t,r)=>GLctx.texParameterf(e,t,r);_glTexParameterf.sig="viif";var _emscripten_glTexParameterf=_glTexParameterf;_emscripten_glTexParameterf.sig="viif";function _glTexParameterfv(e,t,r){r>>>=0;var n=HEAPF32[r>>>2>>>0];GLctx.texParameterf(e,t,n)}_glTexParameterfv.sig="viip";var _emscripten_glTexParameterfv=_glTexParameterfv;_emscripten_glTexParameterfv.sig="viip";var _glTexParameteri=(e,t,r)=>GLctx.texParameteri(e,t,r);_glTexParameteri.sig="viii";var _emscripten_glTexParameteri=_glTexParameteri;_emscripten_glTexParameteri.sig="viii";function _glTexParameteriv(e,t,r){r>>>=0;var n=HEAP32[r>>>2>>>0];GLctx.texParameteri(e,t,n)}_glTexParameteriv.sig="viip";var _emscripten_glTexParameteriv=_glTexParameteriv;_emscripten_glTexParameteriv.sig="viip";function _glTexSubImage2D(e,t,r,n,a,o,l,u,_){_>>>=0;var d=_?emscriptenWebGLGetTexPixelData(u,l,a,o,_):null;GLctx.texSubImage2D(e,t,r,n,a,o,l,u,d)}_glTexSubImage2D.sig="viiiiiiiip";var _emscripten_glTexSubImage2D=_glTexSubImage2D;_emscripten_glTexSubImage2D.sig="viiiiiiiip";var _glUniform1f=(e,t)=>{GLctx.uniform1f(webglGetUniformLocation(e),t)};_glUniform1f.sig="vif";var _emscripten_glUniform1f=_glUniform1f;_emscripten_glUniform1f.sig="vif";var miniTempWebGLFloatBuffers=[];function _glUniform1fv(e,t,r){if(r>>>=0,t<=288)for(var a=miniTempWebGLFloatBuffers[t],n=0;n>>2>>>0];else var a=HEAPF32.subarray(r>>>2>>>0,r+t*4>>>2>>>0);GLctx.uniform1fv(webglGetUniformLocation(e),a)}_glUniform1fv.sig="viip";var _emscripten_glUniform1fv=_glUniform1fv;_emscripten_glUniform1fv.sig="viip";var _glUniform1i=(e,t)=>{GLctx.uniform1i(webglGetUniformLocation(e),t)};_glUniform1i.sig="vii";var _emscripten_glUniform1i=_glUniform1i;_emscripten_glUniform1i.sig="vii";var miniTempWebGLIntBuffers=[];function _glUniform1iv(e,t,r){if(r>>>=0,t<=288)for(var a=miniTempWebGLIntBuffers[t],n=0;n>>2>>>0];else var a=HEAP32.subarray(r>>>2>>>0,r+t*4>>>2>>>0);GLctx.uniform1iv(webglGetUniformLocation(e),a)}_glUniform1iv.sig="viip";var _emscripten_glUniform1iv=_glUniform1iv;_emscripten_glUniform1iv.sig="viip";var _glUniform2f=(e,t,r)=>{GLctx.uniform2f(webglGetUniformLocation(e),t,r)};_glUniform2f.sig="viff";var _emscripten_glUniform2f=_glUniform2f;_emscripten_glUniform2f.sig="viff";function _glUniform2fv(e,t,r){if(r>>>=0,t<=144){t*=2;for(var a=miniTempWebGLFloatBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAPF32[r+(4*n+4)>>>2>>>0]}else var a=HEAPF32.subarray(r>>>2>>>0,r+t*8>>>2>>>0);GLctx.uniform2fv(webglGetUniformLocation(e),a)}_glUniform2fv.sig="viip";var _emscripten_glUniform2fv=_glUniform2fv;_emscripten_glUniform2fv.sig="viip";var _glUniform2i=(e,t,r)=>{GLctx.uniform2i(webglGetUniformLocation(e),t,r)};_glUniform2i.sig="viii";var _emscripten_glUniform2i=_glUniform2i;_emscripten_glUniform2i.sig="viii";function _glUniform2iv(e,t,r){if(r>>>=0,t<=144){t*=2;for(var a=miniTempWebGLIntBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAP32[r+(4*n+4)>>>2>>>0]}else var a=HEAP32.subarray(r>>>2>>>0,r+t*8>>>2>>>0);GLctx.uniform2iv(webglGetUniformLocation(e),a)}_glUniform2iv.sig="viip";var _emscripten_glUniform2iv=_glUniform2iv;_emscripten_glUniform2iv.sig="viip";var _glUniform3f=(e,t,r,n)=>{GLctx.uniform3f(webglGetUniformLocation(e),t,r,n)};_glUniform3f.sig="vifff";var _emscripten_glUniform3f=_glUniform3f;_emscripten_glUniform3f.sig="vifff";function _glUniform3fv(e,t,r){if(r>>>=0,t<=96){t*=3;for(var a=miniTempWebGLFloatBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAPF32[r+(4*n+4)>>>2>>>0],a[n+2]=HEAPF32[r+(4*n+8)>>>2>>>0]}else var a=HEAPF32.subarray(r>>>2>>>0,r+t*12>>>2>>>0);GLctx.uniform3fv(webglGetUniformLocation(e),a)}_glUniform3fv.sig="viip";var _emscripten_glUniform3fv=_glUniform3fv;_emscripten_glUniform3fv.sig="viip";var _glUniform3i=(e,t,r,n)=>{GLctx.uniform3i(webglGetUniformLocation(e),t,r,n)};_glUniform3i.sig="viiii";var _emscripten_glUniform3i=_glUniform3i;_emscripten_glUniform3i.sig="viiii";function _glUniform3iv(e,t,r){if(r>>>=0,t<=96){t*=3;for(var a=miniTempWebGLIntBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAP32[r+(4*n+4)>>>2>>>0],a[n+2]=HEAP32[r+(4*n+8)>>>2>>>0]}else var a=HEAP32.subarray(r>>>2>>>0,r+t*12>>>2>>>0);GLctx.uniform3iv(webglGetUniformLocation(e),a)}_glUniform3iv.sig="viip";var _emscripten_glUniform3iv=_glUniform3iv;_emscripten_glUniform3iv.sig="viip";var _glUniform4f=(e,t,r,n,a)=>{GLctx.uniform4f(webglGetUniformLocation(e),t,r,n,a)};_glUniform4f.sig="viffff";var _emscripten_glUniform4f=_glUniform4f;_emscripten_glUniform4f.sig="viffff";function _glUniform4fv(e,t,r){if(r>>>=0,t<=72){var l=miniTempWebGLFloatBuffers[4*t],n=HEAPF32;r=r>>>2,t*=4;for(var a=0;a>>0],l[a+1]=n[o+1>>>0],l[a+2]=n[o+2>>>0],l[a+3]=n[o+3>>>0]}}else var l=HEAPF32.subarray(r>>>2>>>0,r+t*16>>>2>>>0);GLctx.uniform4fv(webglGetUniformLocation(e),l)}_glUniform4fv.sig="viip";var _emscripten_glUniform4fv=_glUniform4fv;_emscripten_glUniform4fv.sig="viip";var _glUniform4i=(e,t,r,n,a)=>{GLctx.uniform4i(webglGetUniformLocation(e),t,r,n,a)};_glUniform4i.sig="viiiii";var _emscripten_glUniform4i=_glUniform4i;_emscripten_glUniform4i.sig="viiiii";function _glUniform4iv(e,t,r){if(r>>>=0,t<=72){t*=4;for(var a=miniTempWebGLIntBuffers[t],n=0;n>>2>>>0],a[n+1]=HEAP32[r+(4*n+4)>>>2>>>0],a[n+2]=HEAP32[r+(4*n+8)>>>2>>>0],a[n+3]=HEAP32[r+(4*n+12)>>>2>>>0]}else var a=HEAP32.subarray(r>>>2>>>0,r+t*16>>>2>>>0);GLctx.uniform4iv(webglGetUniformLocation(e),a)}_glUniform4iv.sig="viip";var _emscripten_glUniform4iv=_glUniform4iv;_emscripten_glUniform4iv.sig="viip";function _glUniformMatrix2fv(e,t,r,n){if(n>>>=0,t<=72){t*=4;for(var o=miniTempWebGLFloatBuffers[t],a=0;a>>2>>>0],o[a+1]=HEAPF32[n+(4*a+4)>>>2>>>0],o[a+2]=HEAPF32[n+(4*a+8)>>>2>>>0],o[a+3]=HEAPF32[n+(4*a+12)>>>2>>>0]}else var o=HEAPF32.subarray(n>>>2>>>0,n+t*16>>>2>>>0);GLctx.uniformMatrix2fv(webglGetUniformLocation(e),!!r,o)}_glUniformMatrix2fv.sig="viiip";var _emscripten_glUniformMatrix2fv=_glUniformMatrix2fv;_emscripten_glUniformMatrix2fv.sig="viiip";function _glUniformMatrix3fv(e,t,r,n){if(n>>>=0,t<=32){t*=9;for(var o=miniTempWebGLFloatBuffers[t],a=0;a>>2>>>0],o[a+1]=HEAPF32[n+(4*a+4)>>>2>>>0],o[a+2]=HEAPF32[n+(4*a+8)>>>2>>>0],o[a+3]=HEAPF32[n+(4*a+12)>>>2>>>0],o[a+4]=HEAPF32[n+(4*a+16)>>>2>>>0],o[a+5]=HEAPF32[n+(4*a+20)>>>2>>>0],o[a+6]=HEAPF32[n+(4*a+24)>>>2>>>0],o[a+7]=HEAPF32[n+(4*a+28)>>>2>>>0],o[a+8]=HEAPF32[n+(4*a+32)>>>2>>>0]}else var o=HEAPF32.subarray(n>>>2>>>0,n+t*36>>>2>>>0);GLctx.uniformMatrix3fv(webglGetUniformLocation(e),!!r,o)}_glUniformMatrix3fv.sig="viiip";var _emscripten_glUniformMatrix3fv=_glUniformMatrix3fv;_emscripten_glUniformMatrix3fv.sig="viiip";function _glUniformMatrix4fv(e,t,r,n){if(n>>>=0,t<=18){var u=miniTempWebGLFloatBuffers[16*t],a=HEAPF32;n=n>>>2,t*=16;for(var o=0;o>>0],u[o+1]=a[l+1>>>0],u[o+2]=a[l+2>>>0],u[o+3]=a[l+3>>>0],u[o+4]=a[l+4>>>0],u[o+5]=a[l+5>>>0],u[o+6]=a[l+6>>>0],u[o+7]=a[l+7>>>0],u[o+8]=a[l+8>>>0],u[o+9]=a[l+9>>>0],u[o+10]=a[l+10>>>0],u[o+11]=a[l+11>>>0],u[o+12]=a[l+12>>>0],u[o+13]=a[l+13>>>0],u[o+14]=a[l+14>>>0],u[o+15]=a[l+15>>>0]}}else var u=HEAPF32.subarray(n>>>2>>>0,n+t*64>>>2>>>0);GLctx.uniformMatrix4fv(webglGetUniformLocation(e),!!r,u)}_glUniformMatrix4fv.sig="viiip";var _emscripten_glUniformMatrix4fv=_glUniformMatrix4fv;_emscripten_glUniformMatrix4fv.sig="viiip";var _glUseProgram=e=>{e=GL.programs[e],GLctx.useProgram(e),GLctx.currentProgram=e};_glUseProgram.sig="vi";var _emscripten_glUseProgram=_glUseProgram;_emscripten_glUseProgram.sig="vi";var _glValidateProgram=e=>{GLctx.validateProgram(GL.programs[e])};_glValidateProgram.sig="vi";var _emscripten_glValidateProgram=_glValidateProgram;_emscripten_glValidateProgram.sig="vi";var _glVertexAttrib1f=(e,t)=>GLctx.vertexAttrib1f(e,t);_glVertexAttrib1f.sig="vif";var _emscripten_glVertexAttrib1f=_glVertexAttrib1f;_emscripten_glVertexAttrib1f.sig="vif";function _glVertexAttrib1fv(e,t){t>>>=0,GLctx.vertexAttrib1f(e,HEAPF32[t>>>2])}_glVertexAttrib1fv.sig="vip";var _emscripten_glVertexAttrib1fv=_glVertexAttrib1fv;_emscripten_glVertexAttrib1fv.sig="vip";var _glVertexAttrib2f=(e,t,r)=>GLctx.vertexAttrib2f(e,t,r);_glVertexAttrib2f.sig="viff";var _emscripten_glVertexAttrib2f=_glVertexAttrib2f;_emscripten_glVertexAttrib2f.sig="viff";function _glVertexAttrib2fv(e,t){t>>>=0,GLctx.vertexAttrib2f(e,HEAPF32[t>>>2],HEAPF32[t+4>>>2])}_glVertexAttrib2fv.sig="vip";var _emscripten_glVertexAttrib2fv=_glVertexAttrib2fv;_emscripten_glVertexAttrib2fv.sig="vip";var _glVertexAttrib3f=(e,t,r,n)=>GLctx.vertexAttrib3f(e,t,r,n);_glVertexAttrib3f.sig="vifff";var _emscripten_glVertexAttrib3f=_glVertexAttrib3f;_emscripten_glVertexAttrib3f.sig="vifff";function _glVertexAttrib3fv(e,t){t>>>=0,GLctx.vertexAttrib3f(e,HEAPF32[t>>>2],HEAPF32[t+4>>>2],HEAPF32[t+8>>>2])}_glVertexAttrib3fv.sig="vip";var _emscripten_glVertexAttrib3fv=_glVertexAttrib3fv;_emscripten_glVertexAttrib3fv.sig="vip";var _glVertexAttrib4f=(e,t,r,n,a)=>GLctx.vertexAttrib4f(e,t,r,n,a);_glVertexAttrib4f.sig="viffff";var _emscripten_glVertexAttrib4f=_glVertexAttrib4f;_emscripten_glVertexAttrib4f.sig="viffff";function _glVertexAttrib4fv(e,t){t>>>=0,GLctx.vertexAttrib4f(e,HEAPF32[t>>>2],HEAPF32[t+4>>>2],HEAPF32[t+8>>>2],HEAPF32[t+12>>>2])}_glVertexAttrib4fv.sig="vip";var _emscripten_glVertexAttrib4fv=_glVertexAttrib4fv;_emscripten_glVertexAttrib4fv.sig="vip";var _glVertexAttribDivisor=(e,t)=>{GLctx.vertexAttribDivisor(e,t)};_glVertexAttribDivisor.sig="vii";var _glVertexAttribDivisorANGLE=_glVertexAttribDivisor,_emscripten_glVertexAttribDivisorANGLE=_glVertexAttribDivisorANGLE;function _glVertexAttribPointer(e,t,r,n,a,o){o>>>=0,GLctx.vertexAttribPointer(e,t,r,!!n,a,o)}_glVertexAttribPointer.sig="viiiiip";var _emscripten_glVertexAttribPointer=_glVertexAttribPointer;_emscripten_glVertexAttribPointer.sig="viiiiip";var _glViewport=(e,t,r,n)=>GLctx.viewport(e,t,r,n);_glViewport.sig="viiii";var _emscripten_glViewport=_glViewport;_emscripten_glViewport.sig="viiii";function _emscripten_out(e){return e>>>=0,out(UTF8ToString(e))}_emscripten_out.sig="vp";class HandleAllocator{constructor(){this.allocated=[void 0],this.freelist=[]}get(t){return this.allocated[t]}has(t){return this.allocated[t]!==void 0}allocate(t){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=t,r}free(t){this.allocated[t]=void 0,this.freelist.push(t)}}var promiseMap=new HandleAllocator,makePromise=()=>{var e={};return e.promise=new Promise((t,r)=>{e.reject=r,e.resolve=t}),e.id=promiseMap.allocate(e),e};function _emscripten_promise_create(){return makePromise().id}_emscripten_promise_create.sig="p";function _emscripten_promise_destroy(e){e>>>=0,promiseMap.free(e)}_emscripten_promise_destroy.sig="vp";var getPromise=e=>promiseMap.get(e).promise;function _emscripten_promise_resolve(e,t,r){e>>>=0,r>>>=0;var n=promiseMap.get(e);switch(t){case 0:n.resolve(r);return;case 1:n.resolve(getPromise(r));return;case 2:n.resolve(getPromise(r)),_emscripten_promise_destroy(r);return;case 3:n.reject(r);return}}_emscripten_promise_resolve.sig="vpip";var growMemory=e=>{var t=wasmMemory.buffer,r=(e-t.byteLength+65535)/65536;try{return wasmMemory.grow(r),updateMemoryViews(),1}catch{}};function _emscripten_resize_heap(e){e>>>=0;var t=HEAPU8.length,r=getHeapMax();if(e>r)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);a=Math.min(a,e+100663296);var o=Math.min(r,alignMemory(Math.max(e,a),65536)),l=growMemory(o);if(l)return!0}return!1}_emscripten_resize_heap.sig="ip";function _emscripten_wget_data(e,t,r,n){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_wget_data"}_emscripten_wget_data.sig="vpppp";var getEnvStrings=()=>{if(!getEnvStrings.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:getExecutableName()};for(var r in ENV)ENV[r]===void 0?delete t[r]:t[r]=ENV[r];var n=[];for(var r in t)n.push("".concat(r,"=").concat(t[r]));getEnvStrings.strings=n}return getEnvStrings.strings},stringToAscii=(e,t)=>{for(var r=0;r>>0]=e.charCodeAt(r);HEAP8[t>>>0]=0},_environ_get=function(e,t){e>>>=0,t>>>=0;var r=0;return getEnvStrings().forEach((n,a)=>{var o=t+r;HEAPU32[e+a*4>>>2>>>0]=o,stringToAscii(n,o),r+=n.length+1}),0};_environ_get.sig="ipp";var _environ_sizes_get=function(e,t){e>>>=0,t>>>=0;var r=getEnvStrings();HEAPU32[e>>>2>>>0]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),HEAPU32[t>>>2>>>0]=n,0};_environ_sizes_get.sig="ipp";function _fd_close(e){try{var t=SYSCALLS.getStreamFromFD(e);return FS.close(t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return r.errno}}_fd_close.sig="ii";function _fd_fdstat_get(e,t){t>>>=0;try{var r=0,n=0,a=0,o=SYSCALLS.getStreamFromFD(e),l=o.tty?2:FS.isDir(o.mode)?3:FS.isLink(o.mode)?7:4;return HEAP8[t>>>0]=l,HEAP16[t+2>>>1>>>0]=a,tempI64=[r>>>0,(tempDouble=r,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+8>>>2>>>0]=tempI64[0],HEAP32[t+12>>>2>>>0]=tempI64[1],tempI64=[n>>>0,(tempDouble=n,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+16>>>2>>>0]=tempI64[0],HEAP32[t+20>>>2>>>0]=tempI64[1],0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return u.errno}}_fd_fdstat_get.sig="iip";var doReadv=(e,t,r,n)=>{for(var a=0,o=0;o>>2>>>0],u=HEAPU32[t+4>>>2>>>0];t+=8;var _=FS.read(e,HEAP8,l,u,n);if(_<0)return-1;if(a+=_,_>>=0,r>>>=0;var l=convertI32PairToI53Checked(n,a);o>>>=0;try{if(isNaN(l))return 61;var u=SYSCALLS.getStreamFromFD(e),_=doReadv(u,t,r,l);return HEAPU32[o>>>2>>>0]=_,0}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return d.errno}}_fd_pread.sig="iippiip";var doWritev=(e,t,r,n)=>{for(var a=0,o=0;o>>2>>>0],u=HEAPU32[t+4>>>2>>>0];t+=8;var _=FS.write(e,HEAP8,l,u,n);if(_<0)return-1;if(a+=_,_>>=0,r>>>=0;var l=convertI32PairToI53Checked(n,a);o>>>=0;try{if(isNaN(l))return 61;var u=SYSCALLS.getStreamFromFD(e),_=doWritev(u,t,r,l);return HEAPU32[o>>>2>>>0]=_,0}catch(d){if(typeof FS>"u"||d.name!=="ErrnoError")throw d;return d.errno}}_fd_pwrite.sig="iippiip";function _fd_read(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;try{var a=SYSCALLS.getStreamFromFD(e),o=doReadv(a,t,r);return HEAPU32[n>>>2>>>0]=o,0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return l.errno}}_fd_read.sig="iippp";function _fd_seek(e,t,r,n,a){var o=convertI32PairToI53Checked(t,r);a>>>=0;try{if(isNaN(o))return 61;var l=SYSCALLS.getStreamFromFD(e);return FS.llseek(l,o,n),tempI64=[l.position>>>0,(tempDouble=l.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[a>>>2>>>0]=tempI64[0],HEAP32[a+4>>>2>>>0]=tempI64[1],l.getdents&&o===0&&n===0&&(l.getdents=null),0}catch(u){if(typeof FS>"u"||u.name!=="ErrnoError")throw u;return u.errno}}_fd_seek.sig="iiiiip";function _fd_sync(e){var t;try{var r=SYSCALLS.getStreamFromFD(e);return(t=r.stream_ops)!=null&&t.fsync?r.stream_ops.fsync(r):0}catch(n){if(typeof FS>"u"||n.name!=="ErrnoError")throw n;return n.errno}}_fd_sync.sig="ii";function _fd_write(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;try{var a=SYSCALLS.getStreamFromFD(e),o=doWritev(a,t,r);return HEAPU32[n>>>2>>>0]=o,0}catch(l){if(typeof FS>"u"||l.name!=="ErrnoError")throw l;return l.errno}}_fd_write.sig="iippp";function _getaddrinfo(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=0,o=0,l=0,u=0,_=0,d=0,p;function f(m,h,g,b,v,S){var L,T,A,M;return T=m===10?28:16,v=m===10?inetNtop6(v):inetNtop4(v),L=_malloc(T),M=writeSockaddr(L,m,v,S),assert(!M),A=_malloc(32),HEAP32[A+4>>>2>>>0]=m,HEAP32[A+8>>>2>>>0]=h,HEAP32[A+12>>>2>>>0]=g,HEAPU32[A+24>>>2>>>0]=b,HEAPU32[A+20>>>2>>>0]=L,m===10?HEAP32[A+16>>>2>>>0]=28:HEAP32[A+16>>>2>>>0]=16,HEAP32[A+28>>>2>>>0]=0,A}if(r&&(l=HEAP32[r>>>2>>>0],u=HEAP32[r+4>>>2>>>0],_=HEAP32[r+8>>>2>>>0],d=HEAP32[r+12>>>2>>>0]),_&&!d&&(d=_===2?17:6),!_&&d&&(_=d===17?2:1),d===0&&(d=6),_===0&&(_=1),!e&&!t)return-2;if(l&-1088||r!==0&&HEAP32[r>>>2>>>0]&2&&!e)return-1;if(l&32)return-2;if(_!==0&&_!==1&&_!==2)return-7;if(u!==0&&u!==2&&u!==10)return-6;if(t&&(t=UTF8ToString(t),o=parseInt(t,10),isNaN(o)))return l&1024?-2:-8;if(!e)return u===0&&(u=2),l&1||(u===2?a=_htonl(2130706433):a=[0,0,0,1]),p=f(u,_,d,null,a,o),HEAPU32[n>>>2>>>0]=p,0;if(e=UTF8ToString(e),a=inetPton4(e),a!==null)if(u===0||u===2)u=2;else if(u===10&&l&8)a=[0,0,_htonl(65535),a],u=10;else return-2;else if(a=inetPton6(e),a!==null)if(u===0||u===10)u=10;else return-2;return a!=null?(p=f(u,_,d,e,a,o),HEAPU32[n>>>2>>>0]=p,0):l&4?-2:(e=DNS.lookup_name(e),a=inetPton4(e),u===0?u=2:u===10&&(a=[0,0,_htonl(65535),a]),p=f(u,_,d,null,a,o),HEAPU32[n>>>2>>>0]=p,0)}_getaddrinfo.sig="ipppp";function _getentropy(e,t){return e>>>=0,t>>>=0,randomFill(HEAPU8.subarray(e>>>0,e+t>>>0)),0}_getentropy.sig="ipp";function _getnameinfo(e,t,r,n,a,o,l){e>>>=0,r>>>=0,a>>>=0;var u=readSockaddr(e,t);if(u.errno)return-6;var _=u.port,d=u.addr,p=!1;if(r&&n){var f;if(l&1||!(f=DNS.lookup_addr(d))){if(l&8)return-2}else d=f;var m=stringToUTF8(d,r,n);m+1>=n&&(p=!0)}if(a&&o){_=""+_;var m=stringToUTF8(_,a,o);m+1>=o&&(p=!0)}return p?-12:0}_getnameinfo.sig="ipipipii";function _llvm_eh_typeid_for(e){return e>>>=0,e}_llvm_eh_typeid_for.sig="vp";function _pthread_kill(...e){return wasmImports.pthread_kill(...e)}_pthread_kill.stub=!0;var arraySum=(e,t)=>{for(var r=0,n=0;n<=t;r+=e[n++]);return r},MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31],addDays=(e,t)=>{for(var r=new Date(e.getTime());t>0;){var n=isLeapYear(r.getFullYear()),a=r.getMonth(),o=(n?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[a];if(t>o-r.getDate())t-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+t),r}return r};function _strptime(e,t,r){e>>>=0,t>>>=0,r>>>=0;for(var n=UTF8ToString(t),a="\\!@#$^&*()+=-[]/{}|:<>?,.",o=0,l=a.length;ou[Q]||I).replace(/%(.)/g,(I,Q)=>{let oe=_[Q];return oe?(m.push(Q),"(".concat(oe,")")):Q}).replace(/\s+/g,"\\s*"),g=new RegExp("^"+h,"i").exec(UTF8ToString(e));function b(){function I(Q,oe,we){return typeof Q!="number"||isNaN(Q)?oe:Q>=oe?Q<=we?Q:we:oe}return{year:I(HEAP32[r+20>>>2>>>0]+1900,1970,9999),month:I(HEAP32[r+16>>>2>>>0],0,11),day:I(HEAP32[r+12>>>2>>>0],1,31),hour:I(HEAP32[r+8>>>2>>>0],0,23),min:I(HEAP32[r+4>>>2>>>0],0,59),sec:I(HEAP32[r>>>2>>>0],0,59),gmtoff:0}}if(g){var v=b(),S,L=I=>{var Q=m.indexOf(I);if(Q>=0)return g[Q+1]};if((S=L("S"))&&(v.sec=jstoi_q(S)),(S=L("M"))&&(v.min=jstoi_q(S)),S=L("H"))v.hour=jstoi_q(S);else if(S=L("I")){var T=jstoi_q(S);(S=L("p"))&&(T+=S.toUpperCase()[0]==="P"?12:0),v.hour=T}if(S=L("Y"))v.year=jstoi_q(S);else if(S=L("y")){var A=jstoi_q(S);(S=L("C"))?A+=jstoi_q(S)*100:A+=A<69?2e3:1900,v.year=A}if((S=L("m"))?v.month=jstoi_q(S)-1:(S=L("b"))&&(v.month=d[S.substring(0,3).toUpperCase()]||0),S=L("d"))v.day=jstoi_q(S);else if(S=L("j"))for(var M=jstoi_q(S),X=isLeapYear(v.year),x=0;x<12;++x){var w=arraySum(X?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,x-1);M<=w+(X?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR)[x]&&(v.day=M-w)}else if(S=L("a")){var E=S.substring(0,3).toUpperCase();if(S=L("U")){var P=p[E],k=jstoi_q(S),C=new Date(v.year,0,1),F;C.getDay()===0?F=addDays(C,P+7*(k-1)):F=addDays(C,7-C.getDay()+P+7*(k-1)),v.day=F.getDate(),v.month=F.getMonth()}else if(S=L("W")){var P=f[E],k=jstoi_q(S),C=new Date(v.year,0,1),F;C.getDay()===1?F=addDays(C,P+7*(k-1)):F=addDays(C,7-C.getDay()+1+P+7*(k-1)),v.day=F.getDate(),v.month=F.getMonth()}}if(S=L("z"))if(S.toLowerCase()==="z")v.gmtoff=0;else{var U=S.match(/^((?:\-|\+)\d\d):?(\d\d)?/);v.gmtoff=U[1]*3600,U[2]&&(v.gmtoff+=v.gmtoff>0?U[2]*60:-U[2]*60)}var D=new Date(v.year,v.month,v.day,v.hour,v.min,v.sec,0);return HEAP32[r>>>2>>>0]=D.getSeconds(),HEAP32[r+4>>>2>>>0]=D.getMinutes(),HEAP32[r+8>>>2>>>0]=D.getHours(),HEAP32[r+12>>>2>>>0]=D.getDate(),HEAP32[r+16>>>2>>>0]=D.getMonth(),HEAP32[r+20>>>2>>>0]=D.getFullYear()-1900,HEAP32[r+24>>>2>>>0]=D.getDay(),HEAP32[r+28>>>2>>>0]=arraySum(isLeapYear(D.getFullYear())?MONTH_DAYS_LEAP:MONTH_DAYS_REGULAR,D.getMonth()-1)+D.getDate()-1,HEAP32[r+32>>>2>>>0]=0,HEAP32[r+36>>>2>>>0]=v.gmtoff,e+intArrayFromString(g[0]).length-1}return 0}_strptime.sig="pppp";var getCFunc=e=>{var t=Module["_"+e];return t},writeArrayToMemory=(e,t)=>{HEAP8.set(e,t>>>0)},ccall=(e,t,r,n,a)=>{var o={string:g=>{var b=0;return g!=null&&g!==0&&(b=stringToUTF8OnStack(g)),b},array:g=>{var b=stackAlloc(g.length);return writeArrayToMemory(g,b),b}};function l(g){return t==="string"?UTF8ToString(g):t==="boolean"?!!g:g}var u=getCFunc(e),_=[],d=0;if(n)for(var p=0;p(e>>>0)+t*4294967296,convertU32PairToI53=(e,t)=>(e>>>0)+(t>>>0)*4294967296,getTempRet0=e=>__emscripten_tempret_get(),_stackAlloc=stackAlloc,_stackSave=stackSave,_stackRestore=stackSave,_getTempRet0=getTempRet0;Module._getTempRet0=_getTempRet0;function _emscripten_notify_memory_growth(e){updateMemoryViews()}_emscripten_notify_memory_growth.sig="vp";var Protocols={list:[],map:{}},_setprotoent=e=>{function t(o,l,u){var _=_malloc(o.length+1);stringToAscii(o,_);for(var d=0,p=u.length,f=_malloc((p+1)*4),m=0;m>>2>>>0]=g}HEAPU32[f+d>>>2>>>0]=0;var b=_malloc(12);return HEAPU32[b>>>2>>>0]=_,HEAPU32[b+4>>>2>>>0]=f,HEAP32[b+8>>>2>>>0]=l,b}var r=Protocols.list,n=Protocols.map;if(r.length===0){var a=t("tcp",6,["TCP"]);r.push(a),n.tcp=n[6]=a,a=t("udp",17,["UDP"]),r.push(a),n.udp=n[17]=a}_setprotoent.index=0};_setprotoent.sig="vi";var _endprotoent=()=>{};_endprotoent.sig="v";function _getprotoent(e){if(_setprotoent.index===Protocols.list.length)return 0;var t=Protocols.list[_setprotoent.index++];return t}_getprotoent.sig="p";function _getprotobyname(e){e>>>=0,e=UTF8ToString(e),_setprotoent();var t=Protocols.map[e];return t}_getprotobyname.sig="pp";function _getprotobynumber(e){_setprotoent();var t=Protocols.map[e];return t}_getprotobynumber.sig="pi";function _emscripten_run_script(ptr){ptr>>>=0,eval(UTF8ToString(ptr))}_emscripten_run_script.sig="vp";function _emscripten_run_script_int(ptr){return ptr>>>=0,eval(UTF8ToString(ptr))|0}_emscripten_run_script_int.sig="ip";function _emscripten_run_script_string(ptr){ptr>>>=0;var s=eval(UTF8ToString(ptr));if(s==null)return 0;s+="";var me=_emscripten_run_script_string,len=lengthBytesUTF8(s);return(!me.bufferSize||me.bufferSizeMath.random();_emscripten_random.sig="f";var warnOnce=e=>{warnOnce.shown||(warnOnce.shown={}),warnOnce.shown[e]||(warnOnce.shown[e]=1,ENVIRONMENT_IS_NODE&&(e="warning: "+e),err(e))};function jsStackTrace(){return new Error().stack.toString()}function getCallstack(e){var t=jsStackTrace(),r=t.lastIndexOf("_emscripten_log"),n=t.lastIndexOf("_emscripten_get_callstack"),a=t.indexOf(` +`,Math.max(r,n))+1;t=t.slice(a),e&8&&typeof emscripten_source_map>"u"&&(warnOnce('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e^=8,e|=16);var o=t.split(` +`);t="";var l=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),u=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),_=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var d in o){var p=o[d],f="",m="",h=0,g=0,b=_.exec(p);if(b&&b.length==5)f=b[1],m=b[2],h=b[3],g=b[4];else if(b=l.exec(p)||u.exec(p),b&&b.length>=4)f=b[1],m=b[2],h=b[3],g=b[4]|0;else{t+=p+` +`;continue}var v=!1;if(e&8){var S=emscripten_source_map.originalPositionFor({line:h,column:g});v=S==null?void 0:S.source,v&&(e&64&&(S.source=S.source.substring(S.source.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=" at ".concat(f," (").concat(S.source,":").concat(S.line,":").concat(S.column,`) +`))}(e&16||!v)&&(e&64&&(m=m.substring(m.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=(v?" = ".concat(f):" at ".concat(f))+" (".concat(m,":").concat(h,":").concat(g,`) +`))}return t=t.replace(/\s+$/,""),t}var emscriptenLog=(e,t)=>{e&24&&(t=t.replace(/\s+$/,""),t+=(t.length>0?` +`:"")+getCallstack(e)),e&1?e&4?console.error(t):e&2?console.warn(t):e&512?console.info(t):e&256?console.debug(t):console.log(t):e&6?err(t):out(t)},reallyNegative=e=>e<0||e===0&&1/e===-1/0,reSign=(e,t)=>{if(e<=0)return e;var r=t<=32?Math.abs(1<=r&&(t<=32||e>r)&&(e=-2*r+e),e},unSign=(e,t)=>e>=0?e:t<=32?2*Math.abs(1<{for(var t=e;HEAPU8[t>>>0];)++t;return t-e},formatString=(e,t)=>{var r=e,n=t;function a(_e,Z){return(Z==="double"||Z==="i64")&&_e&7&&(_e+=4),_e}function o(_e){var Z;return n=a(n,_e),_e==="double"?(Z=HEAPF64[n>>>3>>>0],n+=8):_e=="i64"?(Z=[HEAP32[n>>>2>>>0],HEAP32[n+4>>>2>>>0]],n+=8):(_e="i32",Z=HEAP32[n>>>2>>>0],n+=4),Z}for(var l=[],u,_,d;;){var p=r;if(u=HEAP8[r>>>0],u===0)break;if(_=HEAP8[r+1>>>0],u==37){var f=!1,m=!1,h=!1,g=!1,b=!1;e:for(;;){switch(_){case 43:f=!0;break;case 45:m=!0;break;case 35:h=!0;break;case 48:if(g)break e;g=!0;break;case 32:b=!0;break;default:break e}r++,_=HEAP8[r+1>>>0]}var v=0;if(_==42)v=o("i32"),r++,_=HEAP8[r+1>>>0];else for(;_>=48&&_<=57;)v=v*10+(_-48),r++,_=HEAP8[r+1>>>0];var S=!1,L=-1;if(_==46){if(L=0,S=!0,r++,_=HEAP8[r+1>>>0],_==42)L=o("i32"),r++;else for(;;){var T=HEAP8[r+1>>>0];if(T<48||T>57)break;L=L*10+(T-48),r++}_=HEAP8[r+1>>>0]}L<0&&(L=6,S=!1);var A;switch(String.fromCharCode(_)){case"h":var M=HEAP8[r+2>>>0];M==104?(r++,A=1):A=2;break;case"l":var M=HEAP8[r+2>>>0];M==108?(r++,A=8):A=4;break;case"L":case"q":case"j":A=8;break;case"z":case"t":case"I":A=4;break;default:A=null}switch(A&&r++,_=HEAP8[r+1>>>0],String.fromCharCode(_)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var X=_==100||_==105;A=A||4,d=o("i"+A*8);var x;if(A==8&&(d=_==117?convertU32PairToI53(d[0],d[1]):convertI32PairToI53(d[0],d[1])),A<=4){var w=Math.pow(256,A)-1;d=(X?reSign:unSign)(d&w,A*8)}var E=Math.abs(d),P="";if(_==100||_==105)x=reSign(d,8*A).toString(10);else if(_==117)x=unSign(d,8*A).toString(10),d=Math.abs(d);else if(_==111)x=(h?"0":"")+E.toString(8);else if(_==120||_==88){if(P=h&&d!=0?"0x":"",d<0){d=-d,x=(E-1).toString(16);for(var k=[],C=0;C=0&&(f?P="+"+P:b&&(P=" "+P)),x.charAt(0)=="-"&&(P="-"+P,x=x.substr(1));P.length+x.lengthl.push(_e.charCodeAt(0)));break}case"f":case"F":case"e":case"E":case"g":case"G":{d=o("double");var x;if(isNaN(d))x="nan",g=!1;else if(!isFinite(d))x=(d<0?"-":"")+"inf",g=!1;else{var F=!1,U=Math.min(L,20);if(_==103||_==71){F=!0,L=L||1;var D=parseInt(d.toExponential(U).split("e")[1],10);L>D&&D>=-4?(_=(_==103?"f":"F").charCodeAt(0),L-=D+1):(_=(_==103?"e":"E").charCodeAt(0),L--),U=Math.min(L,20)}_==101||_==69?(x=d.toExponential(U),/[eE][-+]\d$/.test(x)&&(x=x.slice(0,-1)+"0"+x.slice(-1))):(_==102||_==70)&&(x=d.toFixed(U),d===0&&reallyNegative(d)&&(x="-"+x));var I=x.split("e");if(F&&!h)for(;I[0].length>1&&I[0].includes(".")&&(I[0].slice(-1)=="0"||I[0].slice(-1)==".");)I[0]=I[0].slice(0,-1);else for(h&&x.indexOf(".")==-1&&(I[0]+=".");L>U++;)I[0]+="0";x=I[0]+(I.length>1?"e"+I[1]:""),_==69&&(x=x.toUpperCase()),d>=0&&(f?x="+"+x:b&&(x=" "+x))}for(;x.lengthl.push(Z.charCodeAt(0)));break}case"s":{var Q=o("i8*"),oe=Q?strLen(Q):6;if(S&&(oe=Math.min(oe,L)),!m)for(;oe>>0]);else l=l.concat(intArrayFromString("(null)".substr(0,oe),!0));if(m)for(;oe0;)l.push(32);m||l.push(o("i8"));break}case"n":{var we=o("i32*");HEAP32[we>>>2>>>0]=l.length;break}case"%":{l.push(u);break}default:for(var C=p;C>>0])}r+=2}else l.push(u),r+=1}return l};function _emscripten_log(e,t,r){t>>>=0,r>>>=0;var n=formatString(t,r),a=UTF8ArrayToString(n,0);emscriptenLog(e,a)}_emscripten_log.sig="vipp";function _emscripten_get_compiler_setting(e){throw"You must build with -sRETAIN_COMPILER_SETTINGS for getCompilerSetting or emscripten_get_compiler_setting to work"}_emscripten_get_compiler_setting.sig="pp";var _emscripten_has_asyncify=()=>0;_emscripten_has_asyncify.sig="i";function _emscripten_debugger(){debugger}_emscripten_debugger.sig="v";function _emscripten_print_double(e,t,r){t>>>=0;var n=e+"";return t?stringToUTF8(n,t,r):lengthBytesUTF8(n)}_emscripten_print_double.sig="idpi";function _emscripten_asm_const_double(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runEmAsmFunction(e,t,r)}_emscripten_asm_const_double.sig="dppp";var runMainThreadEmAsm=(e,t,r,n)=>{var a=readEmAsmArgs(t,r);return ASM_CONSTS[e](...a)};function _emscripten_asm_const_int_sync_on_main_thread(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runMainThreadEmAsm(e,t,r)}_emscripten_asm_const_int_sync_on_main_thread.sig="ippp";function _emscripten_asm_const_ptr_sync_on_main_thread(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runMainThreadEmAsm(e,t,r)}_emscripten_asm_const_ptr_sync_on_main_thread.sig="pppp";var _emscripten_asm_const_double_sync_on_main_thread=_emscripten_asm_const_int_sync_on_main_thread;_emscripten_asm_const_double_sync_on_main_thread.sig="dppp";function _emscripten_asm_const_async_on_main_thread(e,t,r){return e>>>=0,t>>>=0,r>>>=0,runMainThreadEmAsm(e,t,r)}_emscripten_asm_const_async_on_main_thread.sig="vppp";function __Unwind_Backtrace(e,t){e>>>=0,t>>>=0;for(var r=getCallstack(),n=r.split(` +`),a=0;a>>=0,err("Warning: _Unwind_RaiseException is not correctly implemented"),___cxa_throw(e,0,0)}__Unwind_RaiseException.sig="ip";function __Unwind_DeleteException(e){err("TODO: Unwind_DeleteException")}__Unwind_DeleteException.sig="vp";var getDynCaller=(e,t)=>(...r)=>dynCall(e,t,r),_emscripten_exit_with_live_runtime=()=>{throw"unwind"};_emscripten_exit_with_live_runtime.sig="v";var _emscripten_force_exit=e=>{__emscripten_runtime_keepalive_clear(),_exit(e)};_emscripten_force_exit.sig="vi";function _emscripten_outn(e,t){return e>>>=0,t>>>=0,out(UTF8ToString(e,t))}_emscripten_outn.sig="vpp";function _emscripten_errn(e,t){return e>>>=0,t>>>=0,err(UTF8ToString(e,t))}_emscripten_errn.sig="vpp";var _emscripten_throw_number=e=>{throw e};_emscripten_throw_number.sig="vd";function _emscripten_throw_string(e){throw e>>>=0,UTF8ToString(e)}_emscripten_throw_string.sig="vp";var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};runtimeKeepalivePush.sig="v";var runtimeKeepalivePop=()=>{runtimeKeepaliveCounter-=1};runtimeKeepalivePop.sig="v";var _emscripten_runtime_keepalive_push=runtimeKeepalivePush;_emscripten_runtime_keepalive_push.sig="v";var _emscripten_runtime_keepalive_pop=runtimeKeepalivePop;_emscripten_runtime_keepalive_pop.sig="v";var _emscripten_runtime_keepalive_check=keepRuntimeAlive;_emscripten_runtime_keepalive_check.sig="i";var ___global_base=1024;function __emscripten_fs_load_embedded_files(e){e>>>=0;do{var t=HEAPU32[e>>>2>>>0];e+=4;var r=HEAPU32[e>>>2>>>0];e+=4;var n=HEAPU32[e>>>2>>>0];e+=4;var a=UTF8ToString(t);FS.createPath("/",PATH.dirname(a),!0,!0),FS.createDataFile(a,null,HEAP8.subarray(n>>>0,n+r>>>0),!0,!0,!0)}while(HEAPU32[e>>>2>>>0])}__emscripten_fs_load_embedded_files.sig="vp";var POINTER_SIZE=4,_emscripten_math_cbrt=Math.cbrt;_emscripten_math_cbrt.sig="dd";var _emscripten_math_pow=Math.pow;_emscripten_math_pow.sig="ddd";var _emscripten_math_random=Math.random;_emscripten_math_random.sig="d";var _emscripten_math_sign=Math.sign;_emscripten_math_sign.sig="dd";var _emscripten_math_sqrt=Math.sqrt;_emscripten_math_sqrt.sig="dd";var _emscripten_math_exp=Math.exp;_emscripten_math_exp.sig="dd";var _emscripten_math_expm1=Math.expm1;_emscripten_math_expm1.sig="dd";var _emscripten_math_fmod=(e,t)=>e%t;_emscripten_math_fmod.sig="ddd";var _emscripten_math_log=Math.log;_emscripten_math_log.sig="dd";var _emscripten_math_log1p=Math.log1p;_emscripten_math_log1p.sig="dd";var _emscripten_math_log10=Math.log10;_emscripten_math_log10.sig="dd";var _emscripten_math_log2=Math.log2;_emscripten_math_log2.sig="dd";var _emscripten_math_round=Math.round;_emscripten_math_round.sig="dd";var _emscripten_math_acos=Math.acos;_emscripten_math_acos.sig="dd";var _emscripten_math_acosh=Math.acosh;_emscripten_math_acosh.sig="dd";var _emscripten_math_asin=Math.asin;_emscripten_math_asin.sig="dd";var _emscripten_math_asinh=Math.asinh;_emscripten_math_asinh.sig="dd";var _emscripten_math_atan=Math.atan;_emscripten_math_atan.sig="dd";var _emscripten_math_atanh=Math.atanh;_emscripten_math_atanh.sig="dd";var _emscripten_math_atan2=Math.atan2;_emscripten_math_atan2.sig="ddd";var _emscripten_math_cos=Math.cos;_emscripten_math_cos.sig="dd";var _emscripten_math_cosh=Math.cosh;_emscripten_math_cosh.sig="dd";function _emscripten_math_hypot(e,t){t>>>=0;for(var r=[],n=0;n>>3>>>0]);return Math.hypot(...r)}_emscripten_math_hypot.sig="dip";var _emscripten_math_sin=Math.sin;_emscripten_math_sin.sig="dd";var _emscripten_math_sinh=Math.sinh;_emscripten_math_sinh.sig="dd";var _emscripten_math_tan=Math.tan;_emscripten_math_tan.sig="dd";var _emscripten_math_tanh=Math.tanh;_emscripten_math_tanh.sig="dd";var JSEvents={removeAllEventListeners(){for(;JSEvents.eventHandlers.length;)JSEvents._removeHandler(JSEvents.eventHandlers.length-1);JSEvents.deferredCalls=[]},inEventHandler:0,deferredCalls:[],deferCall(e,t,r){function n(o,l){if(o.length!=l.length)return!1;for(var u in o)if(o[u]!=l[u])return!1;return!0}for(var a of JSEvents.deferredCalls)if(a.targetFunction==e&&n(a.argsList,r))return;JSEvents.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),JSEvents.deferredCalls.sort((o,l)=>o.precedencet.targetFunction!=e)},canPerformEventHandlerRequests(){return navigator.userActivation?navigator.userActivation.isActive:JSEvents.inEventHandler&&JSEvents.currentEventHandler.allowsDeferredCalls},runDeferredCalls(){if(JSEvents.canPerformEventHandlerRequests()){var e=JSEvents.deferredCalls;JSEvents.deferredCalls=[];for(var t of e)t.targetFunction(...t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:(e,t)=>{for(var r=0;re>2?UTF8ToString(e):e,specialHTMLTargets=[0,typeof document<"u"?document:0,typeof window<"u"?window:0],findEventTarget=e=>{e=maybeCStringToJsString(e);var t=specialHTMLTargets[e]||(typeof document<"u"?document.querySelector(e):void 0);return t},registerKeyEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.keyEvent||(JSEvents.keyEvent=_malloc(160));var u=d=>{var p=JSEvents.keyEvent;HEAPF64[p>>>3>>>0]=d.timeStamp;var f=p>>>2;HEAP32[f+2>>>0]=d.location,HEAP8[p+12>>>0]=d.ctrlKey,HEAP8[p+13>>>0]=d.shiftKey,HEAP8[p+14>>>0]=d.altKey,HEAP8[p+15>>>0]=d.metaKey,HEAP8[p+16>>>0]=d.repeat,HEAP32[f+5>>>0]=d.charCode,HEAP32[f+6>>>0]=d.keyCode,HEAP32[f+7>>>0]=d.which,stringToUTF8(d.key||"",p+32,32),stringToUTF8(d.code||"",p+64,32),stringToUTF8(d.char||"",p+96,32),stringToUTF8(d.locale||"",p+128,32),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)},findCanvasEventTarget=findEventTarget;function _emscripten_set_keypress_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerKeyEventCallback(e,t,r,n,1,"keypress")}_emscripten_set_keypress_callback_on_thread.sig="ippipp";function _emscripten_set_keydown_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerKeyEventCallback(e,t,r,n,2,"keydown")}_emscripten_set_keydown_callback_on_thread.sig="ippipp";function _emscripten_set_keyup_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerKeyEventCallback(e,t,r,n,3,"keyup")}_emscripten_set_keyup_callback_on_thread.sig="ippipp";var getBoundingClientRect=e=>specialHTMLTargets.indexOf(e)<0?e.getBoundingClientRect():{left:0,top:0},fillMouseEventData=(e,t,r)=>{HEAPF64[e>>>3>>>0]=t.timeStamp;var n=e>>>2;HEAP32[n+2>>>0]=t.screenX,HEAP32[n+3>>>0]=t.screenY,HEAP32[n+4>>>0]=t.clientX,HEAP32[n+5>>>0]=t.clientY,HEAP8[e+24>>>0]=t.ctrlKey,HEAP8[e+25>>>0]=t.shiftKey,HEAP8[e+26>>>0]=t.altKey,HEAP8[e+27>>>0]=t.metaKey,HEAP16[n*2+14>>>0]=t.button,HEAP16[n*2+15>>>0]=t.buttons,HEAP32[n+8>>>0]=t.movementX,HEAP32[n+9>>>0]=t.movementY;var a=getBoundingClientRect(r);HEAP32[n+10>>>0]=t.clientX-(a.left|0),HEAP32[n+11>>>0]=t.clientY-(a.top|0)},registerMouseEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.mouseEvent||(JSEvents.mouseEvent=_malloc(64)),e=findEventTarget(e);var u=(d=event)=>{fillMouseEventData(JSEvents.mouseEvent,d,e),getWasmTableEntry(n)(a,JSEvents.mouseEvent,t)&&d.preventDefault()},_={target:e,allowsDeferredCalls:o!="mousemove"&&o!="mouseenter"&&o!="mouseleave",eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_click_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,4,"click")}_emscripten_set_click_callback_on_thread.sig="ippipp";function _emscripten_set_mousedown_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,5,"mousedown")}_emscripten_set_mousedown_callback_on_thread.sig="ippipp";function _emscripten_set_mouseup_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,6,"mouseup")}_emscripten_set_mouseup_callback_on_thread.sig="ippipp";function _emscripten_set_dblclick_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,7,"dblclick")}_emscripten_set_dblclick_callback_on_thread.sig="ippipp";function _emscripten_set_mousemove_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,8,"mousemove")}_emscripten_set_mousemove_callback_on_thread.sig="ippipp";function _emscripten_set_mouseenter_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,33,"mouseenter")}_emscripten_set_mouseenter_callback_on_thread.sig="ippipp";function _emscripten_set_mouseleave_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,34,"mouseleave")}_emscripten_set_mouseleave_callback_on_thread.sig="ippipp";function _emscripten_set_mouseover_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,35,"mouseover")}_emscripten_set_mouseover_callback_on_thread.sig="ippipp";function _emscripten_set_mouseout_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerMouseEventCallback(e,t,r,n,36,"mouseout")}_emscripten_set_mouseout_callback_on_thread.sig="ippipp";function _emscripten_get_mouse_status(e){return e>>>=0,JSEvents.mouseEvent?(HEAP8.set(HEAP8.subarray(JSEvents.mouseEvent>>>0,JSEvents.mouseEvent+64>>>0),e>>>0),0):-7}_emscripten_get_mouse_status.sig="ip";var registerWheelEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.wheelEvent||(JSEvents.wheelEvent=_malloc(96));var u=(d=event)=>{var p=JSEvents.wheelEvent;fillMouseEventData(p,d,e),HEAPF64[p+64>>>3>>>0]=d.deltaX,HEAPF64[p+72>>>3>>>0]=d.deltaY,HEAPF64[p+80>>>3>>>0]=d.deltaZ,HEAP32[p+88>>>2>>>0]=d.deltaMode,getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,allowsDeferredCalls:!0,eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_wheel_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,e=findEventTarget(e),e?typeof e.onwheel<"u"?registerWheelEventCallback(e,t,r,n,9,"wheel"):-1:-4}_emscripten_set_wheel_callback_on_thread.sig="ippipp";var registerUiEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.uiEvent||(JSEvents.uiEvent=_malloc(36)),e=findEventTarget(e);var u=(d=event)=>{if(d.target==e){var p=document.body;if(p){var f=JSEvents.uiEvent;HEAP32[f>>>2>>>0]=0,HEAP32[f+4>>>2>>>0]=p.clientWidth,HEAP32[f+8>>>2>>>0]=p.clientHeight,HEAP32[f+12>>>2>>>0]=innerWidth,HEAP32[f+16>>>2>>>0]=innerHeight,HEAP32[f+20>>>2>>>0]=outerWidth,HEAP32[f+24>>>2>>>0]=outerHeight,HEAP32[f+28>>>2>>>0]=pageXOffset|0,HEAP32[f+32>>>2>>>0]=pageYOffset|0,getWasmTableEntry(n)(a,f,t)&&d.preventDefault()}}},_={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_resize_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerUiEventCallback(e,t,r,n,10,"resize")}_emscripten_set_resize_callback_on_thread.sig="ippipp";function _emscripten_set_scroll_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerUiEventCallback(e,t,r,n,11,"scroll")}_emscripten_set_scroll_callback_on_thread.sig="ippipp";var registerFocusEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.focusEvent||(JSEvents.focusEvent=_malloc(256));var u=(d=event)=>{var p=JSEvents.getNodeNameForTarget(d.target),f=d.target.id?d.target.id:"",m=JSEvents.focusEvent;stringToUTF8(p,m+0,128),stringToUTF8(f,m+128,128),getWasmTableEntry(n)(a,m,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_blur_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerFocusEventCallback(e,t,r,n,12,"blur")}_emscripten_set_blur_callback_on_thread.sig="ippipp";function _emscripten_set_focus_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerFocusEventCallback(e,t,r,n,13,"focus")}_emscripten_set_focus_callback_on_thread.sig="ippipp";function _emscripten_set_focusin_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerFocusEventCallback(e,t,r,n,14,"focusin")}_emscripten_set_focusin_callback_on_thread.sig="ippipp";function _emscripten_set_focusout_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerFocusEventCallback(e,t,r,n,15,"focusout")}_emscripten_set_focusout_callback_on_thread.sig="ippipp";var fillDeviceOrientationEventData=(e,t,r)=>{HEAPF64[e>>>3>>>0]=t.alpha,HEAPF64[e+8>>>3>>>0]=t.beta,HEAPF64[e+16>>>3>>>0]=t.gamma,HEAP8[e+24>>>0]=t.absolute},registerDeviceOrientationEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.deviceOrientationEvent||(JSEvents.deviceOrientationEvent=_malloc(32));var u=(d=event)=>{fillDeviceOrientationEventData(JSEvents.deviceOrientationEvent,d),getWasmTableEntry(n)(a,JSEvents.deviceOrientationEvent,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_deviceorientation_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,registerDeviceOrientationEventCallback(2,e,t,r,16,"deviceorientation")}_emscripten_set_deviceorientation_callback_on_thread.sig="ipipp";function _emscripten_get_deviceorientation_status(e){return e>>>=0,JSEvents.deviceOrientationEvent?(HEAP32.set(HEAP32.subarray(JSEvents.deviceOrientationEvent>>>0,32),e>>>0),0):-7}_emscripten_get_deviceorientation_status.sig="ip";var fillDeviceMotionEventData=(e,t,r)=>{var n=t.acceleration,a=t.accelerationIncludingGravity,o=t.rotationRate;n=n||{},a=a||{},o=o||{},HEAPF64[e>>>3>>>0]=n.x,HEAPF64[e+8>>>3>>>0]=n.y,HEAPF64[e+16>>>3>>>0]=n.z,HEAPF64[e+24>>>3>>>0]=a.x,HEAPF64[e+32>>>3>>>0]=a.y,HEAPF64[e+40>>>3>>>0]=a.z,HEAPF64[e+48>>>3>>>0]=o.alpha,HEAPF64[e+56>>>3>>>0]=o.beta,HEAPF64[e+64>>>3>>>0]=o.gamma},registerDeviceMotionEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.deviceMotionEvent||(JSEvents.deviceMotionEvent=_malloc(80));var u=(d=event)=>{fillDeviceMotionEventData(JSEvents.deviceMotionEvent,d),getWasmTableEntry(n)(a,JSEvents.deviceMotionEvent,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_devicemotion_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,registerDeviceMotionEventCallback(2,e,t,r,17,"devicemotion")}_emscripten_set_devicemotion_callback_on_thread.sig="ipipp";function _emscripten_get_devicemotion_status(e){return e>>>=0,JSEvents.deviceMotionEvent?(HEAP32.set(HEAP32.subarray(JSEvents.deviceMotionEvent>>>0,80),e>>>0),0):-7}_emscripten_get_devicemotion_status.sig="ip";var screenOrientation=()=>{if(window.screen)return screen.orientation||screen.mozOrientation||screen.webkitOrientation},fillOrientationChangeEventData=e=>{var t=["portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"],r=["portrait","portrait","landscape","landscape"],n=0,a=0,o=screenOrientation();typeof o=="object"?(n=t.indexOf(o.type),n<0&&(n=r.indexOf(o.type)),n>=0&&(n=1<>>2>>>0]=n,HEAP32[e+4>>>2>>>0]=a},registerOrientationChangeEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.orientationChangeEvent||(JSEvents.orientationChangeEvent=_malloc(8));var u=(d=event)=>{var p=JSEvents.orientationChangeEvent;fillOrientationChangeEventData(p),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_orientationchange_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,!window.screen||!screen.orientation?-1:registerOrientationChangeEventCallback(screen.orientation,e,t,r,18,"change")}_emscripten_set_orientationchange_callback_on_thread.sig="ipipp";function _emscripten_get_orientation_status(e){return e>>>=0,!screenOrientation()&&typeof orientation>"u"?-1:(fillOrientationChangeEventData(e),0)}_emscripten_get_orientation_status.sig="ip";var _emscripten_lock_orientation=e=>{var t=[];e&1&&t.push("portrait-primary"),e&2&&t.push("portrait-secondary"),e&4&&t.push("landscape-primary"),e&8&&t.push("landscape-secondary");var r;if(screen.lockOrientation)r=screen.lockOrientation(t);else if(screen.mozLockOrientation)r=screen.mozLockOrientation(t);else if(screen.webkitLockOrientation)r=screen.webkitLockOrientation(t);else return-1;return r?0:-6};_emscripten_lock_orientation.sig="ii";var _emscripten_unlock_orientation=()=>{if(screen.unlockOrientation)screen.unlockOrientation();else if(screen.mozUnlockOrientation)screen.mozUnlockOrientation();else if(screen.webkitUnlockOrientation)screen.webkitUnlockOrientation();else return-1;return 0};_emscripten_unlock_orientation.sig="i";var fillFullscreenChangeEventData=e=>{var t=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement,r=!!t;HEAP8[e>>>0]=r,HEAP8[e+1>>>0]=JSEvents.fullscreenEnabled();var n=r?t:JSEvents.previousFullscreenElement,a=JSEvents.getNodeNameForTarget(n),o=(n==null?void 0:n.id)||"";stringToUTF8(a,e+2,128),stringToUTF8(o,e+130,128),HEAP32[e+260>>>2>>>0]=n?n.clientWidth:0,HEAP32[e+264>>>2>>>0]=n?n.clientHeight:0,HEAP32[e+268>>>2>>>0]=screen.width,HEAP32[e+272>>>2>>>0]=screen.height,r&&(JSEvents.previousFullscreenElement=t)},registerFullscreenChangeEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.fullscreenChangeEvent||(JSEvents.fullscreenChangeEvent=_malloc(276));var u=(d=event)=>{var p=JSEvents.fullscreenChangeEvent;fillFullscreenChangeEventData(p),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_fullscreenchange_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,JSEvents.fullscreenEnabled()?(e=findEventTarget(e),e?(registerFullscreenChangeEventCallback(e,t,r,n,19,"webkitfullscreenchange"),registerFullscreenChangeEventCallback(e,t,r,n,19,"fullscreenchange")):-4):-1}_emscripten_set_fullscreenchange_callback_on_thread.sig="ippipp";function _emscripten_get_fullscreen_status(e){return e>>>=0,JSEvents.fullscreenEnabled()?(fillFullscreenChangeEventData(e),0):-1}_emscripten_get_fullscreen_status.sig="ip";function _emscripten_get_canvas_element_size(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=findCanvasEventTarget(e);if(!n)return-4;HEAP32[t>>>2>>>0]=n.width,HEAP32[r>>>2>>>0]=n.height}_emscripten_get_canvas_element_size.sig="ippp";var getCanvasElementSize=e=>{var t=stackSave(),r=stackAlloc(8),n=r+4,a=stringToUTF8OnStack(e.id);_emscripten_get_canvas_element_size(a,r,n);var o=[HEAP32[r>>>2>>>0],HEAP32[n>>>2>>>0]];return stackRestore(t),o};function _emscripten_set_canvas_element_size(e,t,r){e>>>=0;var n=findCanvasEventTarget(e);return n?(n.width=t,n.height=r,0):-4}_emscripten_set_canvas_element_size.sig="ipii";var setCanvasElementSize=(e,t,r)=>{if(!e.controlTransferredOffscreen)e.width=t,e.height=r;else{var n=stackSave(),a=stringToUTF8OnStack(e.id);_emscripten_set_canvas_element_size(a,t,r),stackRestore(n)}},registerRestoreOldStyle=e=>{var t=getCanvasElementSize(e),r=t[0],n=t[1],a=e.style.width,o=e.style.height,l=e.style.backgroundColor,u=document.body.style.backgroundColor,_=e.style.paddingLeft,d=e.style.paddingRight,p=e.style.paddingTop,f=e.style.paddingBottom,m=e.style.marginLeft,h=e.style.marginRight,g=e.style.marginTop,b=e.style.marginBottom,v=document.body.style.margin,S=document.documentElement.style.overflow,L=document.body.scroll,T=e.style.imageRendering;function A(){var M=document.fullscreenElement||document.webkitFullscreenElement;M||(document.removeEventListener("fullscreenchange",A),document.removeEventListener("webkitfullscreenchange",A),setCanvasElementSize(e,r,n),e.style.width=a,e.style.height=o,e.style.backgroundColor=l,u||(document.body.style.backgroundColor="white"),document.body.style.backgroundColor=u,e.style.paddingLeft=_,e.style.paddingRight=d,e.style.paddingTop=p,e.style.paddingBottom=f,e.style.marginLeft=m,e.style.marginRight=h,e.style.marginTop=g,e.style.marginBottom=b,document.body.style.margin=v,document.documentElement.style.overflow=S,document.body.scroll=L,e.style.imageRendering=T,e.GLctxObject&&e.GLctxObject.GLctx.viewport(0,0,r,n),currentFullscreenStrategy.canvasResizedCallback&&getWasmTableEntry(currentFullscreenStrategy.canvasResizedCallback)(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData))}return document.addEventListener("fullscreenchange",A),document.addEventListener("webkitfullscreenchange",A),A},setLetterbox=(e,t,r)=>{e.style.paddingLeft=e.style.paddingRight=r+"px",e.style.paddingTop=e.style.paddingBottom=t+"px"},JSEvents_resizeCanvasForFullscreen=(e,t)=>{var r,n,a=registerRestoreOldStyle(e),o=t.softFullscreen?innerWidth:screen.width,l=t.softFullscreen?innerHeight:screen.height,u=getBoundingClientRect(e),_=u.width,d=u.height,p=getCanvasElementSize(e),f=p[0],m=p[1];if(t.scaleMode==3)setLetterbox(e,(l-d)/2,(o-_)/2),o=_,l=d;else if(t.scaleMode==2)if(o*m{if((t.scaleMode!=0||t.canvasResolutionScaleMode!=0)&&JSEvents_resizeCanvasForFullscreen(e,t),e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);else return JSEvents.fullscreenEnabled()?-3:-1;return currentFullscreenStrategy=t,t.canvasResizedCallback&&getWasmTableEntry(t.canvasResizedCallback)(37,0,t.canvasResizedCallbackUserData),0},hideEverythingExceptGivenElement=e=>{for(var t=e,r=t.parentNode,n=[];t!=document.body;){for(var a=r.children,o=0;o{for(var t of e)t.node.style.display=t.displayState},currentFullscreenStrategy={},restoreOldWindowedStyle=null,softFullscreenResizeWebGLRenderTarget=()=>{var e=devicePixelRatio,t=currentFullscreenStrategy.canvasResolutionScaleMode==2,r=currentFullscreenStrategy.scaleMode==2,n=currentFullscreenStrategy.canvasResolutionScaleMode!=0,a=currentFullscreenStrategy.scaleMode==3,o=t?Math.round(innerWidth*e):innerWidth,l=t?Math.round(innerHeight*e):innerHeight,u=o,_=l,d=currentFullscreenStrategy.target,p=getCanvasElementSize(d),f=p[0],m=p[1],h;if(r&&(u*mf*_&&(u=_*f/m|0),h=(l-_)/2|0),n&&(setCanvasElementSize(d,u,_),d.GLctxObject&&d.GLctxObject.GLctx.viewport(0,0,u,_)),t&&(h/=e,u/=e,_/=e,u=Math.round(u*1e4)/1e4,_=Math.round(_*1e4)/1e4,h=Math.round(h*1e4)/1e4),a){var g=(innerHeight-jstoi_q(d.style.height))/2,b=(innerWidth-jstoi_q(d.style.width))/2;setLetterbox(d,g,b)}else{d.style.width=u+"px",d.style.height=_+"px";var b=(innerWidth-u)/2;setLetterbox(d,h,b)}!a&¤tFullscreenStrategy.canvasResizedCallback&&getWasmTableEntry(currentFullscreenStrategy.canvasResizedCallback)(37,0,currentFullscreenStrategy.canvasResizedCallbackUserData)},doRequestFullscreen=(e,t)=>JSEvents.fullscreenEnabled()?(e=findEventTarget(e),e?!e.requestFullscreen&&!e.webkitRequestFullscreen?-3:JSEvents.canPerformEventHandlerRequests()?JSEvents_requestFullscreen(e,t):t.deferUntilInEventHandler?(JSEvents.deferCall(JSEvents_requestFullscreen,1,[e,t]),1):-2:-4):-1;function _emscripten_request_fullscreen(e,t){e>>>=0;var r={scaleMode:0,canvasResolutionScaleMode:0,filteringMode:0,deferUntilInEventHandler:t,canvasResizedCallbackTargetThread:2};return doRequestFullscreen(e,r)}_emscripten_request_fullscreen.sig="ipi";function _emscripten_request_fullscreen_strategy(e,t,r){e>>>=0,r>>>=0;var n={scaleMode:HEAP32[r>>>2>>>0],canvasResolutionScaleMode:HEAP32[r+4>>>2>>>0],filteringMode:HEAP32[r+8>>>2>>>0],deferUntilInEventHandler:t,canvasResizedCallback:HEAP32[r+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[r+16>>>2>>>0]};return doRequestFullscreen(e,n)}_emscripten_request_fullscreen_strategy.sig="ipip";function _emscripten_enter_soft_fullscreen(e,t){if(e>>>=0,t>>>=0,e=findEventTarget(e),!e)return-4;var r={scaleMode:HEAP32[t>>>2>>>0],canvasResolutionScaleMode:HEAP32[t+4>>>2>>>0],filteringMode:HEAP32[t+8>>>2>>>0],canvasResizedCallback:HEAP32[t+12>>>2>>>0],canvasResizedCallbackUserData:HEAP32[t+16>>>2>>>0],target:e,softFullscreen:!0},n=JSEvents_resizeCanvasForFullscreen(e,r);document.documentElement.style.overflow="hidden",document.body.scroll="no",document.body.style.margin="0px";var a=hideEverythingExceptGivenElement(e);function o(){n(),restoreHiddenElements(a),removeEventListener("resize",softFullscreenResizeWebGLRenderTarget),r.canvasResizedCallback&&getWasmTableEntry(r.canvasResizedCallback)(37,0,r.canvasResizedCallbackUserData),currentFullscreenStrategy=0}return restoreOldWindowedStyle=o,currentFullscreenStrategy=r,addEventListener("resize",softFullscreenResizeWebGLRenderTarget),r.canvasResizedCallback&&getWasmTableEntry(r.canvasResizedCallback)(37,0,r.canvasResizedCallbackUserData),0}_emscripten_enter_soft_fullscreen.sig="ipp";var _emscripten_exit_soft_fullscreen=()=>(restoreOldWindowedStyle==null||restoreOldWindowedStyle(),restoreOldWindowedStyle=null,0);_emscripten_exit_soft_fullscreen.sig="i";var _emscripten_exit_fullscreen=()=>{if(!JSEvents.fullscreenEnabled())return-1;JSEvents.removeDeferredCalls(JSEvents_requestFullscreen);var e=specialHTMLTargets[1];if(e.exitFullscreen)e.fullscreenElement&&e.exitFullscreen();else if(e.webkitExitFullscreen)e.webkitFullscreenElement&&e.webkitExitFullscreen();else return-1;return 0};_emscripten_exit_fullscreen.sig="i";var fillPointerlockChangeEventData=e=>{var t=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement||document.msPointerLockElement,r=!!t;HEAP8[e>>>0]=r;var n=JSEvents.getNodeNameForTarget(t),a=(t==null?void 0:t.id)||"";stringToUTF8(n,e+1,128),stringToUTF8(a,e+129,128)},registerPointerlockChangeEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.pointerlockChangeEvent||(JSEvents.pointerlockChangeEvent=_malloc(257));var u=(d=event)=>{var p=JSEvents.pointerlockChangeEvent;fillPointerlockChangeEventData(p),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_pointerlockchange_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,!document||!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:(e=findEventTarget(e),e?(registerPointerlockChangeEventCallback(e,t,r,n,20,"mozpointerlockchange"),registerPointerlockChangeEventCallback(e,t,r,n,20,"webkitpointerlockchange"),registerPointerlockChangeEventCallback(e,t,r,n,20,"mspointerlockchange"),registerPointerlockChangeEventCallback(e,t,r,n,20,"pointerlockchange")):-4)}_emscripten_set_pointerlockchange_callback_on_thread.sig="ippipp";var registerPointerlockErrorEventCallback=(e,t,r,n,a,o,l)=>{var u=(d=event)=>{getWasmTableEntry(n)(a,0,t)&&d.preventDefault()},_={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_pointerlockerror_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,!document||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:(e=findEventTarget(e),e?(registerPointerlockErrorEventCallback(e,t,r,n,38,"mozpointerlockerror"),registerPointerlockErrorEventCallback(e,t,r,n,38,"webkitpointerlockerror"),registerPointerlockErrorEventCallback(e,t,r,n,38,"mspointerlockerror"),registerPointerlockErrorEventCallback(e,t,r,n,38,"pointerlockerror")):-4)}_emscripten_set_pointerlockerror_callback_on_thread.sig="ippipp";function _emscripten_get_pointerlock_status(e){return e>>>=0,e&&fillPointerlockChangeEventData(e),!document.body||!document.body.requestPointerLock&&!document.body.mozRequestPointerLock&&!document.body.webkitRequestPointerLock&&!document.body.msRequestPointerLock?-1:0}_emscripten_get_pointerlock_status.sig="ip";var requestPointerLock=e=>{if(e.requestPointerLock)e.requestPointerLock();else return document.body.requestPointerLock?-3:-1;return 0};function _emscripten_request_pointerlock(e,t){return e>>>=0,e=findEventTarget(e),e?e.requestPointerLock?JSEvents.canPerformEventHandlerRequests()?requestPointerLock(e):t?(JSEvents.deferCall(requestPointerLock,2,[e]),1):-2:-1:-4}_emscripten_request_pointerlock.sig="ipi";var _emscripten_exit_pointerlock=()=>{if(JSEvents.removeDeferredCalls(requestPointerLock),document.exitPointerLock)document.exitPointerLock();else return-1;return 0};_emscripten_exit_pointerlock.sig="i";var _emscripten_vibrate=e=>navigator.vibrate?(navigator.vibrate(e),0):-1;_emscripten_vibrate.sig="ii";function _emscripten_vibrate_pattern(e,t){if(e>>>=0,!navigator.vibrate)return-1;for(var r=[],n=0;n>>2>>>0];r.push(a)}return navigator.vibrate(r),0}_emscripten_vibrate_pattern.sig="ipi";var fillVisibilityChangeEventData=e=>{var t=["hidden","visible","prerender","unloaded"],r=t.indexOf(document.visibilityState);HEAP8[e>>>0]=document.hidden,HEAP32[e+4>>>2>>>0]=r},registerVisibilityChangeEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.visibilityChangeEvent||(JSEvents.visibilityChangeEvent=_malloc(8));var u=(d=event)=>{var p=JSEvents.visibilityChangeEvent;fillVisibilityChangeEventData(p),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:e,eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_visibilitychange_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,specialHTMLTargets[1]?registerVisibilityChangeEventCallback(specialHTMLTargets[1],e,t,r,21,"visibilitychange"):-4}_emscripten_set_visibilitychange_callback_on_thread.sig="ipipp";function _emscripten_get_visibility_status(e){return e>>>=0,typeof document.visibilityState>"u"&&typeof document.hidden>"u"?-1:(fillVisibilityChangeEventData(e),0)}_emscripten_get_visibility_status.sig="ip";var registerTouchEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.touchEvent||(JSEvents.touchEvent=_malloc(1552)),e=findEventTarget(e);var u=d=>{var p={},f=d.touches;for(let S of f)S.isChanged=S.onTarget=0,p[S.identifier]=S;for(let S of d.changedTouches)S.isChanged=1,p[S.identifier]=S;for(let S of d.targetTouches)p[S.identifier].onTarget=1;var m=JSEvents.touchEvent;HEAPF64[m>>>3>>>0]=d.timeStamp,HEAP8[m+12>>>0]=d.ctrlKey,HEAP8[m+13>>>0]=d.shiftKey,HEAP8[m+14>>>0]=d.altKey,HEAP8[m+15>>>0]=d.metaKey;var h=m+16,g=getBoundingClientRect(e),b=0;for(let S of Object.values(p)){var v=h>>>2;if(HEAP32[v+0>>>0]=S.identifier,HEAP32[v+1>>>0]=S.screenX,HEAP32[v+2>>>0]=S.screenY,HEAP32[v+3>>>0]=S.clientX,HEAP32[v+4>>>0]=S.clientY,HEAP32[v+5>>>0]=S.pageX,HEAP32[v+6>>>0]=S.pageY,HEAP8[h+28>>>0]=S.isChanged,HEAP8[h+29>>>0]=S.onTarget,HEAP32[v+8>>>0]=S.clientX-(g.left|0),HEAP32[v+9>>>0]=S.clientY-(g.top|0),h+=48,++b>31)break}HEAP32[m+8>>>2>>>0]=b,getWasmTableEntry(n)(a,m,t)&&d.preventDefault()},_={target:e,allowsDeferredCalls:o=="touchstart"||o=="touchend",eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_touchstart_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerTouchEventCallback(e,t,r,n,22,"touchstart")}_emscripten_set_touchstart_callback_on_thread.sig="ippipp";function _emscripten_set_touchend_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerTouchEventCallback(e,t,r,n,23,"touchend")}_emscripten_set_touchend_callback_on_thread.sig="ippipp";function _emscripten_set_touchmove_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerTouchEventCallback(e,t,r,n,24,"touchmove")}_emscripten_set_touchmove_callback_on_thread.sig="ippipp";function _emscripten_set_touchcancel_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerTouchEventCallback(e,t,r,n,25,"touchcancel")}_emscripten_set_touchcancel_callback_on_thread.sig="ippipp";var fillGamepadEventData=(e,t)=>{HEAPF64[e>>>3>>>0]=t.timestamp;for(var r=0;r>>3>>>0]=t.axes[r];for(var r=0;r>>3>>>0]=t.buttons[r].value:HEAPF64[e+r*8+528>>>3>>>0]=t.buttons[r];for(var r=0;r>>0]=t.buttons[r].pressed:HEAP8[e+r+1040>>>0]=t.buttons[r]==1;HEAP8[e+1104>>>0]=t.connected,HEAP32[e+1108>>>2>>>0]=t.index,HEAP32[e+8>>>2>>>0]=t.axes.length,HEAP32[e+12>>>2>>>0]=t.buttons.length,stringToUTF8(t.id,e+1112,64),stringToUTF8(t.mapping,e+1176,64)},registerGamepadEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.gamepadEvent||(JSEvents.gamepadEvent=_malloc(1240));var u=(d=event)=>{var p=JSEvents.gamepadEvent;fillGamepadEventData(p,d.gamepad),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:findEventTarget(e),allowsDeferredCalls:!0,eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)},_emscripten_sample_gamepad_data=()=>{try{if(navigator.getGamepads)return(JSEvents.lastGamepadState=navigator.getGamepads())?0:-1}catch{navigator.getGamepads=null}return-1};_emscripten_sample_gamepad_data.sig="i";function _emscripten_set_gamepadconnected_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,_emscripten_sample_gamepad_data()?-1:registerGamepadEventCallback(2,e,t,r,26,"gamepadconnected")}_emscripten_set_gamepadconnected_callback_on_thread.sig="ipipp";function _emscripten_set_gamepaddisconnected_callback_on_thread(e,t,r,n){return e>>>=0,r>>>=0,_emscripten_sample_gamepad_data()?-1:registerGamepadEventCallback(2,e,t,r,27,"gamepaddisconnected")}_emscripten_set_gamepaddisconnected_callback_on_thread.sig="ipipp";var _emscripten_get_num_gamepads=()=>JSEvents.lastGamepadState.length;_emscripten_get_num_gamepads.sig="i";function _emscripten_get_gamepad_status(e,t){return t>>>=0,e<0||e>=JSEvents.lastGamepadState.length?-5:JSEvents.lastGamepadState[e]?(fillGamepadEventData(t,JSEvents.lastGamepadState[e]),0):-7}_emscripten_get_gamepad_status.sig="iip";var registerBeforeUnloadEventCallback=(e,t,r,n,a,o)=>{var l=(_=event)=>{var d=getWasmTableEntry(n)(a,0,t);if(d&&(d=UTF8ToString(d)),d)return _.preventDefault(),_.returnValue=d,d},u={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:l,useCapture:r};return JSEvents.registerOrRemoveHandler(u)};function _emscripten_set_beforeunload_callback_on_thread(e,t,r){return e>>>=0,t>>>=0,r>>>=0,typeof onbeforeunload>"u"?-1:r!==1?-5:registerBeforeUnloadEventCallback(2,e,!0,t,28,"beforeunload")}_emscripten_set_beforeunload_callback_on_thread.sig="ippp";var fillBatteryEventData=(e,t)=>{HEAPF64[e>>>3>>>0]=t.chargingTime,HEAPF64[e+8>>>3>>>0]=t.dischargingTime,HEAPF64[e+16>>>3>>>0]=t.level,HEAP8[e+24>>>0]=t.charging},battery=()=>navigator.battery||navigator.mozBattery||navigator.webkitBattery,registerBatteryEventCallback=(e,t,r,n,a,o,l)=>{JSEvents.batteryEvent||(JSEvents.batteryEvent=_malloc(32));var u=(d=event)=>{var p=JSEvents.batteryEvent;fillBatteryEventData(p,battery()),getWasmTableEntry(n)(a,p,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};return JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_batterychargingchange_callback_on_thread(e,t,r){return e>>>=0,t>>>=0,battery()?registerBatteryEventCallback(battery(),e,!0,t,29,"chargingchange"):-1}_emscripten_set_batterychargingchange_callback_on_thread.sig="ippp";function _emscripten_set_batterylevelchange_callback_on_thread(e,t,r){return e>>>=0,t>>>=0,battery()?registerBatteryEventCallback(battery(),e,!0,t,30,"levelchange"):-1}_emscripten_set_batterylevelchange_callback_on_thread.sig="ippp";function _emscripten_get_battery_status(e){return e>>>=0,battery()?(fillBatteryEventData(e,battery()),0):-1}_emscripten_get_battery_status.sig="ip";function _emscripten_set_element_css_size(e,t,r){return e>>>=0,e=findEventTarget(e),e?(e.style.width=t+"px",e.style.height=r+"px",0):-4}_emscripten_set_element_css_size.sig="ipdd";function _emscripten_get_element_css_size(e,t,r){if(e>>>=0,t>>>=0,r>>>=0,e=findEventTarget(e),!e)return-4;var n=getBoundingClientRect(e);return HEAPF64[t>>>3>>>0]=n.width,HEAPF64[r>>>3>>>0]=n.height,0}_emscripten_get_element_css_size.sig="ippp";var _emscripten_html5_remove_all_event_listeners=()=>JSEvents.removeAllEventListeners();_emscripten_html5_remove_all_event_listeners.sig="v";var _emscripten_request_animation_frame=function(e,t){return e>>>=0,t>>>=0,requestAnimationFrame(r=>getWasmTableEntry(e)(r,t))};_emscripten_request_animation_frame.sig="ipp";var _emscripten_cancel_animation_frame=e=>cancelAnimationFrame(e);_emscripten_cancel_animation_frame.sig="vi";function _emscripten_request_animation_frame_loop(e,t){e>>>=0,t>>>=0;function r(n){getWasmTableEntry(e)(n,t)&&requestAnimationFrame(r)}return requestAnimationFrame(r)}_emscripten_request_animation_frame_loop.sig="vpp";var _emscripten_performance_now=()=>performance.now();_emscripten_performance_now.sig="d";var _emscripten_get_device_pixel_ratio=()=>typeof devicePixelRatio=="number"&&devicePixelRatio||1;_emscripten_get_device_pixel_ratio.sig="d";function _emscripten_get_callstack(e,t,r){t>>>=0;var n=getCallstack(e);if(!t||r<=0)return lengthBytesUTF8(n)+1;var a=stringToUTF8(n,t,r);return a+1}_emscripten_get_callstack.sig="iipi";var convertFrameToPC=e=>(abort("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER"),0);function _emscripten_return_address(e){var t=jsStackTrace().split(` +`);return t[0]=="Error"&&t.shift(),t[e+3],convertFrameToPC()}_emscripten_return_address.sig="pi";var UNWIND_CACHE={},saveInUnwindCache=e=>{e.forEach(t=>{convertFrameToPC()})};function _emscripten_stack_snapshot(){var e=jsStackTrace().split(` +`);return e[0]=="Error"&&e.shift(),saveInUnwindCache(e),UNWIND_CACHE.last_addr=convertFrameToPC(e[3]),UNWIND_CACHE.last_stack=e,UNWIND_CACHE.last_addr}_emscripten_stack_snapshot.sig="p";function _emscripten_stack_unwind_buffer(e,t,r){e>>>=0,t>>>=0;var n;UNWIND_CACHE.last_addr==e?n=UNWIND_CACHE.last_stack:(n=jsStackTrace().split(` +`),n[0]=="Error"&&n.shift(),saveInUnwindCache(n));for(var a=3;n[a]&&convertFrameToPC(n[a])!=e;)++a;for(var o=0;o>>2>>>0]=convertFrameToPC(n[o+a]);return o}_emscripten_stack_unwind_buffer.sig="ippi";function _emscripten_pc_get_function(e){return abort("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER"),0}_emscripten_pc_get_function.sig="pp";var convertPCtoSourceLocation=e=>{if(UNWIND_CACHE.last_get_source_pc==e)return UNWIND_CACHE.last_source;var t,r;if(!r){var n=UNWIND_CACHE[e];if(!n)return null;(t=/\((.*):(\d+):(\d+)\)$/.exec(n))?r={file:t[1],line:t[2],column:t[3]}:(t=/@(.*):(\d+):(\d+)/.exec(n))&&(r={file:t[1],line:t[2],column:t[3]})}return UNWIND_CACHE.last_get_source_pc=e,UNWIND_CACHE.last_source=r,r};function _emscripten_pc_get_file(e){e>>>=0;var t=convertPCtoSourceLocation(e);return t?(_emscripten_pc_get_file.ret&&_free(_emscripten_pc_get_file.ret),_emscripten_pc_get_file.ret=stringToNewUTF8(t.file),_emscripten_pc_get_file.ret):0}_emscripten_pc_get_file.sig="pp";function _emscripten_pc_get_line(e){e>>>=0;var t=convertPCtoSourceLocation(e);return t?t.line:0}_emscripten_pc_get_line.sig="ip";function _emscripten_pc_get_column(e){e>>>=0;var t=convertPCtoSourceLocation(e);return t&&t.column||0}_emscripten_pc_get_column.sig="ip";var _sched_yield=()=>0;Module._sched_yield=_sched_yield,_sched_yield.sig="i";function _random_get(e,t){e>>>=0,t>>>=0;try{return _getentropy(e,t),0}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return r.errno}}_random_get.sig="ipp";var checkWasiClock=e=>e==0||e==1||e==2||e==3;function _clock_time_get(e,t,r,n){if(n>>>=0,!checkWasiClock(e))return 28;var a;e===0?a=Date.now():a=_emscripten_get_now();var o=Math.round(a*1e3*1e3);return HEAP32[n>>>2>>>0]=o>>>0,HEAP32[n+4>>>2>>>0]=o/Math.pow(2,32)>>>0,0}_clock_time_get.sig="iiiip";function _clock_res_get(e,t){if(t>>>=0,!checkWasiClock(e))return 28;var r;return e===0?r=1e6:r=_emscripten_get_now_res(),HEAP32[t>>>2>>>0]=r>>>0,HEAP32[t+4>>>2>>>0]=r/Math.pow(2,32)>>>0,0}_clock_res_get.sig="iip";var _emscripten_unwind_to_js_event_loop=()=>{throw"unwind"};_emscripten_unwind_to_js_event_loop.sig="v";var safeSetTimeout=(e,t)=>setTimeout(()=>{callUserCallback(e)},t),setImmediateWrapped=e=>{setImmediateWrapped.mapping||(setImmediateWrapped.mapping=[]);var t=setImmediateWrapped.mapping.length;return setImmediateWrapped.mapping[t]=setImmediate(()=>{setImmediateWrapped.mapping[t]=void 0,e()}),t},clearImmediateWrapped=e=>{clearImmediate(setImmediateWrapped.mapping[e]),setImmediateWrapped.mapping[e]=void 0},_emscripten_set_immediate=function(e,t){return e>>>=0,t>>>=0,emSetImmediate(()=>{callUserCallback(()=>getWasmTableEntry(e)(t))})};_emscripten_set_immediate.sig="ipp";var _emscripten_clear_immediate=e=>{emClearImmediate(e)};_emscripten_clear_immediate.sig="vi";var _emscripten_set_immediate_loop=function(e,t){e>>>=0,t>>>=0;function r(){callUserCallback(()=>{getWasmTableEntry(e)(t)&&emSetImmediate(r)})}emSetImmediate(r)};_emscripten_set_immediate_loop.sig="vpp";var _emscripten_set_timeout=function(e,t,r){return e>>>=0,r>>>=0,safeSetTimeout(()=>getWasmTableEntry(e)(r),t)};_emscripten_set_timeout.sig="ipdp";var _emscripten_clear_timeout=clearTimeout;_emscripten_clear_timeout.sig="vi";var _emscripten_set_timeout_loop=function(e,t,r){e>>>=0,r>>>=0;function n(){var a=_emscripten_get_now(),o=a+t;callUserCallback(()=>{getWasmTableEntry(e)(a,r)&&setTimeout(n,o-_emscripten_get_now())})}return setTimeout(n,0)};_emscripten_set_timeout_loop.sig="vpdp";var _emscripten_set_interval=function(e,t,r){return e>>>=0,r>>>=0,setInterval(()=>{callUserCallback(()=>getWasmTableEntry(e)(r))},t)};_emscripten_set_interval.sig="ipdp";var _emscripten_clear_interval=e=>{clearInterval(e)};_emscripten_clear_interval.sig="vi";var registerPostMainLoop=e=>{typeof MainLoop<"u"&&MainLoop.postMainLoop.push(e)};function _emscripten_get_main_loop_timing(e,t){e>>>=0,t>>>=0,e&&(HEAP32[e>>>2>>>0]=MainLoop.timingMode),t&&(HEAP32[t>>>2>>>0]=MainLoop.timingValue)}_emscripten_get_main_loop_timing.sig="vpp";function _emscripten_set_main_loop(e,t,r){e>>>=0;var n=getWasmTableEntry(e);setMainLoop(n,t,r)}_emscripten_set_main_loop.sig="vpii";var _emscripten_set_main_loop_arg=function(e,t,r,n){e>>>=0,t>>>=0;var a=()=>getWasmTableEntry(e)(t);setMainLoop(a,r,n,t)};_emscripten_set_main_loop_arg.sig="vppii";var _emscripten_cancel_main_loop=()=>{MainLoop.pause(),MainLoop.func=null};_emscripten_cancel_main_loop.sig="v";var _emscripten_pause_main_loop=()=>{MainLoop.pause()};_emscripten_pause_main_loop.sig="v";var _emscripten_resume_main_loop=()=>{MainLoop.resume()};_emscripten_resume_main_loop.sig="v";var __emscripten_push_main_loop_blocker=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,MainLoop.queue.push({func:()=>{getWasmTableEntry(e)(t)},name:UTF8ToString(r),counted:!0}),MainLoop.updateStatus()};__emscripten_push_main_loop_blocker.sig="vppp";var __emscripten_push_uncounted_main_loop_blocker=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,MainLoop.queue.push({func:()=>{getWasmTableEntry(e)(t)},name:UTF8ToString(r),counted:!1}),MainLoop.updateStatus()};__emscripten_push_uncounted_main_loop_blocker.sig="vppp";var _emscripten_set_main_loop_expected_blockers=e=>{MainLoop.expectedBlockers=e,MainLoop.remainingBlockers=e,MainLoop.updateStatus()};_emscripten_set_main_loop_expected_blockers.sig="vi";var idsToPromises=(e,t)=>{for(var r=[],n=0;n>>2>>>0];r[n]=getPromise(a)}return r},makePromiseCallback=(e,t)=>r=>{var n=stackSave(),a=stackAlloc(POINTER_SIZE);HEAPU32[a>>>2>>>0]=0;try{var o=getWasmTableEntry(e)(a,t,r),l=HEAPU32[a>>>2>>>0]}catch(_){throw typeof _!="number"?0:_}finally{stackRestore(n)}switch(o){case 0:return l;case 1:return getPromise(l);case 2:var u=getPromise(l);return _emscripten_promise_destroy(l),u;case 3:throw l}};function _emscripten_promise_then(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=getPromise(e),o=promiseMap.allocate({promise:a.then(makePromiseCallback(t,n),makePromiseCallback(r,n))});return o}_emscripten_promise_then.sig="ppppp";var _emscripten_promise_all=function(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=idsToPromises(e,r),a=promiseMap.allocate({promise:Promise.all(n).then(o=>{if(t)for(var l=0;l>>2>>>0]=u}return t})});return a};_emscripten_promise_all.sig="pppp";var setPromiseResult=(e,t,r)=>{var n=t?0:3;HEAP32[e>>>2>>>0]=n,HEAPU32[e+4>>>2>>>0]=r},_emscripten_promise_all_settled=function(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=idsToPromises(e,r),a=promiseMap.allocate({promise:Promise.allSettled(n).then(o=>{if(t)for(var l=t,u=0;u>>=0,t>>>=0,r>>>=0;var n=idsToPromises(e,r),a=promiseMap.allocate({promise:Promise.any(n).catch(o=>{if(t)for(var l=0;l>>2>>>0]=o.errors[l];throw t})});return a};_emscripten_promise_any.sig="pppp";function _emscripten_promise_race(e,t){e>>>=0,t>>>=0;var r=idsToPromises(e,t),n=promiseMap.allocate({promise:Promise.race(r)});return n}_emscripten_promise_race.sig="ppp";function _emscripten_promise_await(e,t){abort("emscripten_promise_await is only available with ASYNCIFY")}_emscripten_promise_await.sig="vpp";function ___cxa_call_unexpected(e){return abort("Unexpected exception thrown, this is not properly supported - aborting")}___cxa_call_unexpected.sig="vp";var Browser={useWebGL:!1,isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init(){if(Browser.initted)return;Browser.initted=!0;var e={};e.canHandle=function(a){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp|webp)$/i.test(a)},e.handle=function(a,o,l,u){var _=new Blob([a],{type:Browser.getMimetype(o)});_.size!==a.length&&(_=new Blob([new Uint8Array(a).buffer],{type:Browser.getMimetype(o)}));var d=URL.createObjectURL(_),p=new Image;p.onload=()=>{var f=document.createElement("canvas");f.width=p.width,f.height=p.height;var m=f.getContext("2d");m.drawImage(p,0,0),preloadedImages[o]=f,URL.revokeObjectURL(d),l==null||l(a)},p.onerror=f=>{err("Image ".concat(d," could not be decoded")),u==null||u()},p.src=d},preloadPlugins.push(e);var t={};t.canHandle=function(a){return!Module.noAudioDecoding&&a.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},t.handle=function(a,o,l,u){var _=!1;function d(h){_||(_=!0,preloadedAudios[o]=h,l==null||l(a))}var p=new Blob([a],{type:Browser.getMimetype(o)}),f=URL.createObjectURL(p),m=new Audio;m.addEventListener("canplaythrough",()=>d(m),!1),m.onerror=function(h){if(_)return;err("warning: browser could not fully decode audio ".concat(o,", trying slower base64 approach"));function g(b){for(var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",S="=",L="",T=0,A=0,M=0;M=6;){var X=T>>A-6&63;A-=6,L+=v[X]}return A==2?(L+=v[(T&3)<<4],L+=S+S):A==4&&(L+=v[(T&15)<<2],L+=S),L}m.src="data:audio/x-"+o.substr(-3)+";base64,"+g(a),d(m)},m.src=f,safeSetTimeout(()=>{d(m)},1e4)},preloadPlugins.push(t);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var n=Module.canvas;n&&(n.requestPointerLock=n.requestPointerLock||n.mozRequestPointerLock||n.webkitRequestPointerLock||n.msRequestPointerLock||(()=>{}),n.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),n.exitPointerLock=n.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",r,!1),document.addEventListener("mozpointerlockchange",r,!1),document.addEventListener("webkitpointerlockchange",r,!1),document.addEventListener("mspointerlockchange",r,!1),Module.elementPointerLock&&n.addEventListener("click",a=>{!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext(e,t,r,n){if(t&&Module.ctx&&e==Module.canvas)return Module.ctx;var a,o;if(t){var l={antialias:!1,alpha:!1,majorVersion:1};if(n)for(var u in n)l[u]=n[u];typeof GL<"u"&&(o=GL.createContext(e,l),o&&(a=GL.getContext(o).GLctx))}else a=e.getContext("2d");return a?(r&&(Module.ctx=a,t&&GL.makeContextCurrent(o),Browser.useWebGL=t,Browser.moduleContextCreatedCallbacks.forEach(_=>_()),Browser.init()),a):null},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen(e,t){Browser.lockPointer=e,Browser.resizeCanvas=t,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1);var r=Module.canvas;function n(){var o,l;Browser.isFullscreen=!1;var u=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===u?(r.exitFullscreen=Browser.exitFullscreen,Browser.lockPointer&&r.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas?Browser.setFullscreenCanvasSize():Browser.updateCanvasDimensions(r)):(u.parentNode.insertBefore(r,u),u.parentNode.removeChild(u),Browser.resizeCanvas?Browser.setWindowedCanvasSize():Browser.updateCanvasDimensions(r)),(o=Module.onFullScreen)==null||o.call(Module,Browser.isFullscreen),(l=Module.onFullscreen)==null||l.call(Module,Browser.isFullscreen)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var a=document.createElement("div");r.parentNode.insertBefore(a,r),a.appendChild(r),a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullscreen?()=>a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(a.webkitRequestFullScreen?()=>a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null),a.requestFullscreen()},exitFullscreen(){if(!Browser.isFullscreen)return!1;var e=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||(()=>{});return e.apply(document,[]),!0},safeSetTimeout(e,t){return safeSetTimeout(e,t)},getMimetype(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta(e){var t=0;switch(e.type){case"DOMMouseScroll":t=e.detail/3;break;case"mousewheel":t=e.wheelDelta/120;break;case"wheel":switch(t=e.deltaY,e.deltaMode){case 0:t/=100;break;case 1:t/=3;break;case 2:t*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return t},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseCoords(e,t){var r=Module.canvas.getBoundingClientRect(),n=Module.canvas.width,a=Module.canvas.height,o=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,l=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset,u=e-(o+r.left),_=t-(l+r.top);return u=u*(n/r.width),_=_*(a/r.height),{x:u,y:_}},setMouseCoords(e,t){let{x:r,y:n}=Browser.calculateMouseCoords(e,t);Browser.mouseMovementX=r-Browser.mouseX,Browser.mouseMovementY=n-Browser.mouseY,Browser.mouseX=r,Browser.mouseY=n},calculateMouseEvent(e){if(Browser.pointerLock)e.type!="mousemove"&&"mozMovementX"in e?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(e),Browser.mouseMovementY=Browser.getMovementY(e)),Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY;else{if(e.type==="touchstart"||e.type==="touchend"||e.type==="touchmove"){var t=e.touch;if(t===void 0)return;var r=Browser.calculateMouseCoords(t.pageX,t.pageY);if(e.type==="touchstart")Browser.lastTouches[t.identifier]=r,Browser.touches[t.identifier]=r;else if(e.type==="touchend"||e.type==="touchmove"){var n=Browser.touches[t.identifier];n||(n=r),Browser.lastTouches[t.identifier]=n,Browser.touches[t.identifier]=r}return}Browser.setMouseCoords(e.pageX,e.pageY)}},resizeListeners:[],updateResizeListeners(){var e=Module.canvas;Browser.resizeListeners.forEach(t=>t(e.width,e.height))},setCanvasSize(e,t,r){var n=Module.canvas;Browser.updateCanvasDimensions(n,e,t),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen>>>2>>>0];e=e|8388608,HEAP32[SDL.screen>>>2>>>0]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},setWindowedCanvasSize(){if(typeof SDL<"u"){var e=HEAPU32[SDL.screen>>>2>>>0];e=e&-8388609,HEAP32[SDL.screen>>>2>>>0]=e}Browser.updateCanvasDimensions(Module.canvas),Browser.updateResizeListeners()},updateCanvasDimensions(e,t,r){t&&r?(e.widthNative=t,e.heightNative=r):(t=e.widthNative,r=e.heightNative);var n=t,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(n/a>>=0,t>>>=0,r>>>=0;var n=UTF8ToString(e),a=FS.analyzePath(n);return a.exists?(FS.createPreloadedFile(PATH.dirname(n),PATH.basename(n),new Uint8Array(a.object.contents),!0,!0,()=>{t&&getWasmTableEntry(t)(e)},()=>{r&&getWasmTableEntry(r)(e)},!0),0):-1};_emscripten_run_preload_plugins.sig="ippp";var Browser_asyncPrepareDataCounter=0,_emscripten_run_preload_plugins_data=function(e,t,r,n,a,o){e>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0;var l=UTF8ToString(r),u="prepare_data_"+Browser_asyncPrepareDataCounter+++"."+l,_=stringToNewUTF8(u);FS.createPreloadedFile("/",u,HEAPU8.subarray(e>>>0,e+t>>>0),!0,!0,()=>{a&&getWasmTableEntry(a)(n,_)},()=>{o&&getWasmTableEntry(o)(n)},!0)};_emscripten_run_preload_plugins_data.sig="vpipppp";var _emscripten_async_run_script=function(e,t){e>>>=0,safeSetTimeout(()=>_emscripten_run_script(e),t)};_emscripten_async_run_script.sig="vpi";var _emscripten_async_load_script=function(url,onload,onerror){url>>>=0,onload>>>=0,onerror>>>=0,url=UTF8ToString(url);var loadDone=()=>{if(onload){var e=()=>callUserCallback(getWasmTableEntry(onload));runDependencies>0?dependenciesFulfilled=e:e()}},loadError=()=>{onerror&&callUserCallback(getWasmTableEntry(onerror))};if(ENVIRONMENT_IS_NODE){readAsync(url,!1).then(data=>{eval(data),loadDone()},loadError);return}var script=document.createElement("script");script.onload=loadDone,script.onerror=loadError,script.src=url,document.body.appendChild(script)};_emscripten_async_load_script.sig="vppp";var safeRequestAnimationFrame=e=>MainLoop.requestAnimationFrame(()=>{callUserCallback(e)});function _emscripten_async_call(e,t,r){e>>>=0,t>>>=0;function n(){getWasmTableEntry(e)(t)}r>=0||ENVIRONMENT_IS_NODE?safeSetTimeout(n,r):safeRequestAnimationFrame(n)}_emscripten_async_call.sig="vppi";function _emscripten_get_window_title(){var e=256;return _emscripten_get_window_title.buffer||(_emscripten_get_window_title.buffer=_malloc(e)),stringToUTF8(document.title,_emscripten_get_window_title.buffer,e),_emscripten_get_window_title.buffer}_emscripten_get_window_title.sig="p";function _emscripten_set_window_title(e){return e>>>=0,document.title=UTF8ToString(e)}_emscripten_set_window_title.sig="vp";function _emscripten_get_screen_size(e,t){e>>>=0,t>>>=0,HEAP32[e>>>2>>>0]=screen.width,HEAP32[t>>>2>>>0]=screen.height}_emscripten_get_screen_size.sig="vpp";var _emscripten_hide_mouse=()=>{for(var e=document.styleSheets[0],t=e.cssRules,r=0;r{Browser.setCanvasSize(e,t)};_emscripten_set_canvas_size.sig="vii";function _emscripten_get_canvas_size(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=Module.canvas;HEAP32[e>>>2>>>0]=n.width,HEAP32[t>>>2>>>0]=n.height,HEAP32[r>>>2>>>0]=Browser.isFullscreen?1:0}_emscripten_get_canvas_size.sig="vppp";function _emscripten_create_worker(e){e>>>=0,e=UTF8ToString(e);var t=Browser.workers.length,r={worker:new Worker(e),callbacks:[],awaited:0,buffer:0,bufferSize:0};return r.worker.onmessage=function(n){if(!ABORT){var a=Browser.workers[t];if(a){var o=n.data.callbackId,l=a.callbacks[o];if(l){n.data.finalResponse&&(a.awaited--,a.callbacks[o]=null);var u=n.data.data;u?(u.byteLength||(u=new Uint8Array(u)),(!a.buffer||a.bufferSize>>0),l.func(a.buffer,u.length,l.arg)):l.func(0,0,l.arg)}}}},Browser.workers.push(r),t}_emscripten_create_worker.sig="ip";var _emscripten_destroy_worker=e=>{var t=Browser.workers[e];t.worker.terminate(),t.buffer&&_free(t.buffer),Browser.workers[e]=null};_emscripten_destroy_worker.sig="vi";function _emscripten_call_worker(e,t,r,n,a,o){t>>>=0,r>>>=0,a>>>=0,o>>>=0,t=UTF8ToString(t);var l=Browser.workers[e],u=-1;a&&(u=l.callbacks.length,l.callbacks.push({func:getWasmTableEntry(a),arg:o}),l.awaited++);var _={funcName:t,callbackId:u,data:r?new Uint8Array(HEAPU8.subarray(r>>>0,r+n>>>0)):0};r?l.worker.postMessage(_,[_.data.buffer]):l.worker.postMessage(_)}_emscripten_call_worker.sig="vippipp";var _emscripten_get_worker_queue_size=e=>{var t=Browser.workers[e];return t?t.awaited:-1};_emscripten_get_worker_queue_size.sig="ii";var getPreloadedImageData=(e,t,r)=>{e=PATH_FS.resolve(e);var n=preloadedImages[e];if(!n)return 0;var a=n.getContext("2d"),o=a.getImageData(0,0,n.width,n.height),l=_malloc(n.width*n.height*4);return HEAPU8.set(o.data,l>>>0),HEAP32[t>>>2>>>0]=n.width,HEAP32[r>>>2>>>0]=n.height,l};function _emscripten_get_preloaded_image_data(e,t,r){return e>>>=0,t>>>=0,r>>>=0,getPreloadedImageData(UTF8ToString(e),t,r)}_emscripten_get_preloaded_image_data.sig="pppp";function _emscripten_get_preloaded_image_data_from_FILE(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=_fileno(e),a=FS.getStream(n);return a?getPreloadedImageData(a.path,t,r):0}_emscripten_get_preloaded_image_data_from_FILE.sig="pppp";var wget={wgetRequests:{},nextWgetRequestHandle:0,getNextWgetRequestHandle(){var e=wget.nextWgetRequestHandle;return wget.nextWgetRequestHandle++,e}},FS_mkdirTree=(e,t)=>FS.mkdirTree(e,t),FS_unlink=e=>FS.unlink(e),_emscripten_async_wget=function(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=UTF8ToString(e),o=UTF8ToString(t);o=PATH_FS.resolve(o);function l(_){_&&callUserCallback(()=>{var d=stackSave();getWasmTableEntry(_)(stringToUTF8OnStack(o)),stackRestore(d)})}var u=PATH.dirname(o);FS_createPreloadedFile(u,PATH.basename(o),a,!0,!0,()=>l(r),()=>l(n),!1,!1,()=>{try{FS_unlink(o)}catch{}FS_mkdirTree(u)})};_emscripten_async_wget.sig="vpppp";var _emscripten_async_wget_data=function(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0,asyncLoad(UTF8ToString(e),a=>{callUserCallback(()=>{var o=_malloc(a.length);HEAPU8.set(a,o>>>0),getWasmTableEntry(r)(t,o,a.length),_free(o)})},()=>{n&&callUserCallback(()=>{getWasmTableEntry(n)(t)})},!0)};_emscripten_async_wget_data.sig="vpppp";var _emscripten_async_wget2=function(e,t,r,n,a,o,l,u){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,l>>>=0,u>>>=0;var _=UTF8ToString(e),d=UTF8ToString(t);d=PATH_FS.resolve(d);var p=UTF8ToString(r),f=UTF8ToString(n),m=d.lastIndexOf("/"),h=new XMLHttpRequest;h.open(p,_,!0),h.responseType="arraybuffer";var g=wget.getNextWgetRequestHandle(),b=PATH.dirname(d);return h.onload=v=>{if(h.status>=200&&h.status<300){try{FS.unlink(d)}catch{}if(FS.mkdirTree(b),FS.createDataFile(d.substr(0,m),d.substr(m+1),new Uint8Array(h.response),!0,!0,!1),o){var S=stackSave();getWasmTableEntry(o)(g,a,stringToUTF8OnStack(d)),stackRestore(S)}}else l&&getWasmTableEntry(l)(g,a,h.status);delete wget.wgetRequests[g]},h.onerror=v=>{l&&getWasmTableEntry(l)(g,a,h.status),delete wget.wgetRequests[g]},h.onprogress=v=>{if(v.lengthComputable||v.lengthComputable===void 0&&v.total!=0){var S=v.loaded/v.total*100;u&&getWasmTableEntry(u)(g,a,S)}},h.onabort=v=>{delete wget.wgetRequests[g]},p=="POST"?(h.setRequestHeader("Content-type","application/x-www-form-urlencoded"),h.send(f)):h.send(null),wget.wgetRequests[g]=h,g};_emscripten_async_wget2.sig="ipppppppp";function _emscripten_async_wget2_data(e,t,r,n,a,o,l,u){e>>>=0,t>>>=0,r>>>=0,n>>>=0,o>>>=0,l>>>=0,u>>>=0;var _=UTF8ToString(e),d=UTF8ToString(t),p=UTF8ToString(r),f=new XMLHttpRequest;f.open(d,_,!0),f.responseType="arraybuffer";var m=wget.getNextWgetRequestHandle();function h(){if(l){var g=stackSave(),b=0;f.statusText&&(b=stringToUTF8OnStack(f.statusText)),getWasmTableEntry(l)(m,n,f.status,b),stackRestore(g)}}return f.onload=g=>{if(f.status>=200&&f.status<300||f.status===0&&_.substr(0,4).toLowerCase()!="http"){var b=new Uint8Array(f.response),v=_malloc(b.length);HEAPU8.set(b,v>>>0),o&&getWasmTableEntry(o)(m,n,v,b.length),a&&_free(v)}else h();delete wget.wgetRequests[m]},f.onerror=g=>{h(),delete wget.wgetRequests[m]},f.onprogress=g=>{u&&getWasmTableEntry(u)(m,n,g.loaded,g.lengthComputable||g.lengthComputable===void 0?g.total:0)},f.onabort=g=>{delete wget.wgetRequests[m]},d=="POST"?(f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),f.send(p)):f.send(null),wget.wgetRequests[m]=f,m}_emscripten_async_wget2_data.sig="ippppippp";var _emscripten_async_wget2_abort=e=>{var t=wget.wgetRequests[e];t==null||t.abort()};_emscripten_async_wget2_abort.sig="vi";function ___asctime_r(e,t){e>>>=0,t>>>=0;var r={tm_sec:HEAP32[e>>>2>>>0],tm_min:HEAP32[e+4>>>2>>>0],tm_hour:HEAP32[e+8>>>2>>>0],tm_mday:HEAP32[e+12>>>2>>>0],tm_mon:HEAP32[e+16>>>2>>>0],tm_year:HEAP32[e+20>>>2>>>0],tm_wday:HEAP32[e+24>>>2>>>0]},n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o=n[r.tm_wday]+" "+a[r.tm_mon]+(r.tm_mday<10?" ":" ")+r.tm_mday+(r.tm_hour<10?" 0":" ")+r.tm_hour+(r.tm_min<10?":0":":")+r.tm_min+(r.tm_sec<10?":0":":")+r.tm_sec+" "+(1900+r.tm_year)+` +`;return stringToUTF8(o,t,26),t}___asctime_r.sig="ppp";function _strptime_l(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,_strptime(e,t,r)}_strptime_l.sig="ppppp";function ___syscall_shutdown(e,t){try{return getSocketFromFD(e),-52}catch(r){if(typeof FS>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}Module.___syscall_shutdown=___syscall_shutdown,___syscall_shutdown.sig="iiiiiii";function __dlsym_catchup_js(e,t){e>>>=0;var r=LDSO.loadedLibsByHandle[e],n=r.exports,a=Object.keys(n)[t],o=n[a],l=addFunction(o,o.sig);return l}__dlsym_catchup_js.sig="ppi",FS.createPath,FS.createDevice,FS.readFile,FS.createLazyFile;var _setNetworkCallback=(e,t,r)=>{function n(a){try{if(e==="error"){var o=stackSave(),l=stringToUTF8OnStack(a[2]);getWasmTableEntry(r)(a[0],a[1],l,t),stackRestore(o)}else getWasmTableEntry(r)(a,t)}catch(u){if(!(u instanceof ExitStatus))throw u&&typeof u=="object"&&u.stack&&err("exception thrown: "+[u,u.stack]),u}}Module.websocket.on(e,r?n:null)};function _emscripten_set_socket_error_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("error",e,t)}_emscripten_set_socket_error_callback.sig="vpp";function _emscripten_set_socket_open_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("open",e,t)}_emscripten_set_socket_open_callback.sig="vpp";function _emscripten_set_socket_listen_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("listen",e,t)}_emscripten_set_socket_listen_callback.sig="vpp";function _emscripten_set_socket_connection_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("connection",e,t)}_emscripten_set_socket_connection_callback.sig="vpp";function _emscripten_set_socket_message_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("message",e,t)}_emscripten_set_socket_message_callback.sig="vpp";function _emscripten_set_socket_close_callback(e,t){e>>>=0,t>>>=0,_setNetworkCallback("close",e,t)}_emscripten_set_socket_close_callback.sig="vpp";function _emscripten_webgl_enable_ANGLE_instanced_arrays(e){return e>>>=0,webgl_enable_ANGLE_instanced_arrays(GL.contexts[e].GLctx)}_emscripten_webgl_enable_ANGLE_instanced_arrays.sig="ip";function _emscripten_webgl_enable_OES_vertex_array_object(e){return e>>>=0,webgl_enable_OES_vertex_array_object(GL.contexts[e].GLctx)}_emscripten_webgl_enable_OES_vertex_array_object.sig="ip";function _emscripten_webgl_enable_WEBGL_draw_buffers(e){return e>>>=0,webgl_enable_WEBGL_draw_buffers(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_draw_buffers.sig="ip";function _emscripten_webgl_enable_WEBGL_multi_draw(e){return e>>>=0,webgl_enable_WEBGL_multi_draw(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_multi_draw.sig="ip";function _emscripten_webgl_enable_EXT_polygon_offset_clamp(e){return e>>>=0,webgl_enable_EXT_polygon_offset_clamp(GL.contexts[e].GLctx)}_emscripten_webgl_enable_EXT_polygon_offset_clamp.sig="ip";function _emscripten_webgl_enable_EXT_clip_control(e){return e>>>=0,webgl_enable_EXT_clip_control(GL.contexts[e].GLctx)}_emscripten_webgl_enable_EXT_clip_control.sig="ip";function _emscripten_webgl_enable_WEBGL_polygon_mode(e){return e>>>=0,webgl_enable_WEBGL_polygon_mode(GL.contexts[e].GLctx)}_emscripten_webgl_enable_WEBGL_polygon_mode.sig="ip";function _glVertexPointer(e,t,r,n){throw"Legacy GL function (glVertexPointer) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."}_glVertexPointer.sig="viiip";var _glMatrixMode=()=>{throw"Legacy GL function (glMatrixMode) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glMatrixMode.sig="vi";var _glBegin=()=>{throw"Legacy GL function (glBegin) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glBegin.sig="vi";var _glLoadIdentity=()=>{throw"Legacy GL function (glLoadIdentity) called. If you want legacy GL emulation, you need to compile with -sLEGACY_GL_EMULATION to enable legacy GL emulation."};_glLoadIdentity.sig="v";var _glVertexAttribDivisorNV=_glVertexAttribDivisor,_glDrawArraysInstancedNV=_glDrawArraysInstanced,_glDrawElementsInstancedNV=_glDrawElementsInstanced,_glVertexAttribDivisorEXT=_glVertexAttribDivisor,_glDrawArraysInstancedEXT=_glDrawArraysInstanced,_glDrawElementsInstancedEXT=_glDrawElementsInstanced,_glVertexAttribDivisorARB=_glVertexAttribDivisor,_glDrawArraysInstancedARB=_glDrawArraysInstanced,_glDrawElementsInstancedARB=_glDrawElementsInstanced,_glDrawBuffersEXT=_glDrawBuffers;function _glMultiDrawArraysWEBGL(e,t,r,n){t>>>=0,r>>>=0,GLctx.multiDrawWebgl.multiDrawArraysWEBGL(e,HEAP32,t>>>2,HEAP32,r>>>2,n)}_glMultiDrawArraysWEBGL.sig="vippi";var _glMultiDrawArrays=_glMultiDrawArraysWEBGL;_glMultiDrawArrays.sig="vippi";var _glMultiDrawArraysANGLE=_glMultiDrawArraysWEBGL;function _glMultiDrawArraysInstancedWEBGL(e,t,r,n,a){t>>>=0,r>>>=0,n>>>=0,GLctx.multiDrawWebgl.multiDrawArraysInstancedWEBGL(e,HEAP32,t>>>2,HEAP32,r>>>2,HEAP32,n>>>2,a)}_glMultiDrawArraysInstancedWEBGL.sig="vipppi";var _glMultiDrawArraysInstancedANGLE=_glMultiDrawArraysInstancedWEBGL;function _glMultiDrawElementsWEBGL(e,t,r,n,a){t>>>=0,n>>>=0,GLctx.multiDrawWebgl.multiDrawElementsWEBGL(e,HEAP32,t>>>2,r,HEAP32,n>>>2,a)}_glMultiDrawElementsWEBGL.sig="vipipi";var _glMultiDrawElements=_glMultiDrawElementsWEBGL;_glMultiDrawElements.sig="vipipi";var _glMultiDrawElementsANGLE=_glMultiDrawElementsWEBGL;function _glMultiDrawElementsInstancedWEBGL(e,t,r,n,a,o){t>>>=0,n>>>=0,a>>>=0,GLctx.multiDrawWebgl.multiDrawElementsInstancedWEBGL(e,HEAP32,t>>>2,r,HEAP32,n>>>2,HEAP32,a>>>2,o)}_glMultiDrawElementsInstancedWEBGL.sig="vipippi";var _glMultiDrawElementsInstancedANGLE=_glMultiDrawElementsInstancedWEBGL,_glClearDepth=e=>GLctx.clearDepth(e);_glClearDepth.sig="vd";var _glDepthRange=(e,t)=>GLctx.depthRange(e,t);_glDepthRange.sig="vdd";var _emscripten_glGenVertexArrays=_glGenVertexArrays;_emscripten_glGenVertexArrays.sig="vip";var _emscripten_glDeleteVertexArrays=_glDeleteVertexArrays;_emscripten_glDeleteVertexArrays.sig="vip";var _emscripten_glBindVertexArray=_glBindVertexArray;_emscripten_glBindVertexArray.sig="vi";var _emscripten_glIsVertexArray=_glIsVertexArray;_emscripten_glIsVertexArray.sig="ii";var _emscripten_glVertexPointer=_glVertexPointer;_emscripten_glVertexPointer.sig="viiip";var _emscripten_glMatrixMode=_glMatrixMode;_emscripten_glMatrixMode.sig="vi";var _emscripten_glBegin=_glBegin;_emscripten_glBegin.sig="vi";var _emscripten_glLoadIdentity=_glLoadIdentity;_emscripten_glLoadIdentity.sig="v";var _emscripten_glVertexAttribDivisor=_glVertexAttribDivisor;_emscripten_glVertexAttribDivisor.sig="vii";var _emscripten_glDrawArraysInstanced=_glDrawArraysInstanced;_emscripten_glDrawArraysInstanced.sig="viiii";var _emscripten_glDrawElementsInstanced=_glDrawElementsInstanced;_emscripten_glDrawElementsInstanced.sig="viiipi";var _emscripten_glVertexAttribDivisorNV=_glVertexAttribDivisorNV,_emscripten_glDrawArraysInstancedNV=_glDrawArraysInstancedNV,_emscripten_glDrawElementsInstancedNV=_glDrawElementsInstancedNV,_emscripten_glVertexAttribDivisorEXT=_glVertexAttribDivisorEXT,_emscripten_glDrawArraysInstancedEXT=_glDrawArraysInstancedEXT,_emscripten_glDrawElementsInstancedEXT=_glDrawElementsInstancedEXT,_emscripten_glVertexAttribDivisorARB=_glVertexAttribDivisorARB,_emscripten_glDrawArraysInstancedARB=_glDrawArraysInstancedARB,_emscripten_glDrawElementsInstancedARB=_glDrawElementsInstancedARB,_emscripten_glDrawBuffers=_glDrawBuffers;_emscripten_glDrawBuffers.sig="vip";var _emscripten_glDrawBuffersEXT=_glDrawBuffersEXT,_emscripten_glMultiDrawArrays=_glMultiDrawArrays;_emscripten_glMultiDrawArrays.sig="vippi";var _emscripten_glMultiDrawArraysANGLE=_glMultiDrawArraysANGLE,_emscripten_glMultiDrawArraysWEBGL=_glMultiDrawArraysWEBGL,_emscripten_glMultiDrawArraysInstancedANGLE=_glMultiDrawArraysInstancedANGLE,_emscripten_glMultiDrawArraysInstancedWEBGL=_glMultiDrawArraysInstancedWEBGL,_emscripten_glMultiDrawElements=_glMultiDrawElements;_emscripten_glMultiDrawElements.sig="vipipi";var _emscripten_glMultiDrawElementsANGLE=_glMultiDrawElementsANGLE,_emscripten_glMultiDrawElementsWEBGL=_glMultiDrawElementsWEBGL,_emscripten_glMultiDrawElementsInstancedANGLE=_glMultiDrawElementsInstancedANGLE,_emscripten_glMultiDrawElementsInstancedWEBGL=_glMultiDrawElementsInstancedWEBGL,_emscripten_glClearDepth=_glClearDepth;_emscripten_glClearDepth.sig="vd";var _emscripten_glDepthRange=_glDepthRange;_emscripten_glDepthRange.sig="vdd";var writeGLArray=(e,t,r,n)=>{var a=e.length,o=r>>2;for(var u=0;u>>0]=e[u];return a},webglPowerPreferences=["default","low-power","high-performance"];function _emscripten_webgl_do_create_context(e,t){e>>>=0,t>>>=0;var r=t>>>2,n=HEAP32[r+2>>>0],a={alpha:!!HEAP8[t+0>>>0],depth:!!HEAP8[t+1>>>0],stencil:!!HEAP8[t+2>>>0],antialias:!!HEAP8[t+3>>>0],premultipliedAlpha:!!HEAP8[t+4>>>0],preserveDrawingBuffer:!!HEAP8[t+5>>>0],powerPreference:webglPowerPreferences[n],failIfMajorPerformanceCaveat:!!HEAP8[t+12>>>0],majorVersion:HEAP32[r+4>>>0],minorVersion:HEAP32[r+5>>>0],enableExtensionsByDefault:HEAP8[t+24>>>0],explicitSwapControl:HEAP8[t+25>>>0],proxyContextToMainThread:HEAP32[r+7>>>0],renderViaOffscreenBackBuffer:HEAP8[t+32>>>0]},o=findCanvasEventTarget(e);if(!o||a.explicitSwapControl)return 0;var l=GL.createContext(o,a);return l}_emscripten_webgl_do_create_context.sig="ppp";var _emscripten_webgl_create_context=_emscripten_webgl_do_create_context;_emscripten_webgl_create_context.sig="ppp";function _emscripten_webgl_do_get_current_context(){return GL.currentContext?GL.currentContext.handle:0}_emscripten_webgl_do_get_current_context.sig="p";var _emscripten_webgl_get_current_context=_emscripten_webgl_do_get_current_context;_emscripten_webgl_get_current_context.sig="p";var _emscripten_webgl_do_commit_frame=()=>!GL.currentContext||!GL.currentContext.GLctx||!GL.currentContext.attributes.explicitSwapControl?-3:0;_emscripten_webgl_do_commit_frame.sig="i";var _emscripten_webgl_commit_frame=_emscripten_webgl_do_commit_frame;_emscripten_webgl_commit_frame.sig="i";function _emscripten_webgl_make_context_current(e){e>>>=0;var t=GL.makeContextCurrent(e);return t?0:-5}_emscripten_webgl_make_context_current.sig="ip";function _emscripten_webgl_get_drawing_buffer_size(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=GL.getContext(e);return!n||!n.GLctx||!t||!r?-5:(HEAP32[t>>>2>>>0]=n.GLctx.drawingBufferWidth,HEAP32[r>>>2>>>0]=n.GLctx.drawingBufferHeight,0)}_emscripten_webgl_get_drawing_buffer_size.sig="ippp";function _emscripten_webgl_get_context_attributes(e,t){if(e>>>=0,t>>>=0,!t)return-5;if(e=GL.contexts[e],!e)return-3;var r=e.GLctx;if(!r)return-3;r=r.getContextAttributes(),HEAP8[t>>>0]=r.alpha,HEAP8[t+1>>>0]=r.depth,HEAP8[t+2>>>0]=r.stencil,HEAP8[t+3>>>0]=r.antialias,HEAP8[t+4>>>0]=r.premultipliedAlpha,HEAP8[t+5>>>0]=r.preserveDrawingBuffer;var n=r.powerPreference&&webglPowerPreferences.indexOf(r.powerPreference);return HEAP32[t+8>>>2>>>0]=n,HEAP8[t+12>>>0]=r.failIfMajorPerformanceCaveat,HEAP32[t+16>>>2>>>0]=e.version,HEAP32[t+20>>>2>>>0]=0,HEAP8[t+24>>>0]=e.attributes.enableExtensionsByDefault,0}_emscripten_webgl_get_context_attributes.sig="ipp";function _emscripten_webgl_destroy_context(e){e>>>=0,GL.currentContext==e&&(GL.currentContext=0),GL.deleteContext(e)}_emscripten_webgl_destroy_context.sig="ip";function _emscripten_webgl_enable_extension(e,t){e>>>=0,t>>>=0;var r=GL.getContext(e),n=UTF8ToString(t);n.startsWith("GL_")&&(n=n.substr(3)),n=="ANGLE_instanced_arrays"&&webgl_enable_ANGLE_instanced_arrays(GLctx),n=="OES_vertex_array_object"&&webgl_enable_OES_vertex_array_object(GLctx),n=="WEBGL_draw_buffers"&&webgl_enable_WEBGL_draw_buffers(GLctx),n=="WEBGL_multi_draw"&&webgl_enable_WEBGL_multi_draw(GLctx),n=="EXT_polygon_offset_clamp"&&webgl_enable_EXT_polygon_offset_clamp(GLctx),n=="EXT_clip_control"&&webgl_enable_EXT_clip_control(GLctx),n=="WEBGL_polygon_mode"&&webgl_enable_WEBGL_polygon_mode(GLctx);var a=r.GLctx.getExtension(n);return!!a}_emscripten_webgl_enable_extension.sig="ipp";var _emscripten_supports_offscreencanvas=()=>0;_emscripten_supports_offscreencanvas.sig="i";var registerWebGlEventCallback=(e,t,r,n,a,o,l)=>{var u=(d=event)=>{getWasmTableEntry(n)(a,0,t)&&d.preventDefault()},_={target:findEventTarget(e),eventTypeString:o,callbackfunc:n,handlerFunc:u,useCapture:r};JSEvents.registerOrRemoveHandler(_)};function _emscripten_set_webglcontextlost_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerWebGlEventCallback(e,t,r,n,31,"webglcontextlost"),0}_emscripten_set_webglcontextlost_callback_on_thread.sig="ippipp";function _emscripten_set_webglcontextrestored_callback_on_thread(e,t,r,n,a){return e>>>=0,t>>>=0,n>>>=0,registerWebGlEventCallback(e,t,r,n,32,"webglcontextrestored"),0}_emscripten_set_webglcontextrestored_callback_on_thread.sig="ippipp";function _emscripten_is_webgl_context_lost(e){return e>>>=0,!GL.contexts[e]||GL.contexts[e].GLctx.isContextLost()}_emscripten_is_webgl_context_lost.sig="ip";function _emscripten_webgl_get_supported_extensions(){return stringToNewUTF8(GLctx.getSupportedExtensions().join(" "))}_emscripten_webgl_get_supported_extensions.sig="p";var _emscripten_webgl_get_program_parameter_d=(e,t)=>GLctx.getProgramParameter(GL.programs[e],t);_emscripten_webgl_get_program_parameter_d.sig="dii";function _emscripten_webgl_get_program_info_log_utf8(e){return stringToNewUTF8(GLctx.getProgramInfoLog(GL.programs[e]))}_emscripten_webgl_get_program_info_log_utf8.sig="pi";var _emscripten_webgl_get_shader_parameter_d=(e,t)=>GLctx.getShaderParameter(GL.shaders[e],t);_emscripten_webgl_get_shader_parameter_d.sig="dii";function _emscripten_webgl_get_shader_info_log_utf8(e){return stringToNewUTF8(GLctx.getShaderInfoLog(GL.shaders[e]))}_emscripten_webgl_get_shader_info_log_utf8.sig="pi";function _emscripten_webgl_get_shader_source_utf8(e){return stringToNewUTF8(GLctx.getShaderSource(GL.shaders[e]))}_emscripten_webgl_get_shader_source_utf8.sig="pi";var _emscripten_webgl_get_vertex_attrib_d=(e,t)=>GLctx.getVertexAttrib(e,t);_emscripten_webgl_get_vertex_attrib_d.sig="dii";var _emscripten_webgl_get_vertex_attrib_o=(e,t)=>{var r=GLctx.getVertexAttrib(e,t);return r==null?void 0:r.name};_emscripten_webgl_get_vertex_attrib_o.sig="iii";function _emscripten_webgl_get_vertex_attrib_v(e,t,r,n,a){return r>>>=0,writeGLArray(GLctx.getVertexAttrib(e,t),r,n,a)}_emscripten_webgl_get_vertex_attrib_v.sig="iiipii";var _emscripten_webgl_get_uniform_d=(e,t)=>GLctx.getUniform(GL.programs[e],webglGetUniformLocation(t));_emscripten_webgl_get_uniform_d.sig="dii";function _emscripten_webgl_get_uniform_v(e,t,r,n,a){return r>>>=0,writeGLArray(GLctx.getUniform(GL.programs[e],webglGetUniformLocation(t)),r,n,a)}_emscripten_webgl_get_uniform_v.sig="iiipii";function _emscripten_webgl_get_parameter_v(e,t,r,n){return t>>>=0,writeGLArray(GLctx.getParameter(e),t,r,n)}_emscripten_webgl_get_parameter_v.sig="iipii";var _emscripten_webgl_get_parameter_d=e=>GLctx.getParameter(e);_emscripten_webgl_get_parameter_d.sig="di";var _emscripten_webgl_get_parameter_o=e=>{var t=GLctx.getParameter(e);return t==null?void 0:t.name};_emscripten_webgl_get_parameter_o.sig="ii";function _emscripten_webgl_get_parameter_utf8(e){return stringToNewUTF8(GLctx.getParameter(e))}_emscripten_webgl_get_parameter_utf8.sig="pi";function _emscripten_webgl_get_parameter_i64v(e,t){return t>>>=0,writeI53ToI64(t,GLctx.getParameter(e))}_emscripten_webgl_get_parameter_i64v.sig="vip";var _glutPostRedisplay=()=>{GLUT.displayFunc&&!GLUT.requestedAnimationFrame&&(GLUT.requestedAnimationFrame=!0,MainLoop.requestAnimationFrame(()=>{GLUT.requestedAnimationFrame=!1,MainLoop.runIter(()=>getWasmTableEntry(GLUT.displayFunc)())}))};_glutPostRedisplay.sig="v";var GLUT={initTime:null,idleFunc:null,displayFunc:null,keyboardFunc:null,keyboardUpFunc:null,specialFunc:null,specialUpFunc:null,reshapeFunc:null,motionFunc:null,passiveMotionFunc:null,mouseFunc:null,buttons:0,modifiers:0,initWindowWidth:256,initWindowHeight:256,initDisplayMode:18,windowX:0,windowY:0,windowWidth:0,windowHeight:0,requestedAnimationFrame:!1,saveModifiers:e=>{GLUT.modifiers=0,e.shiftKey&&(GLUT.modifiers+=1),e.ctrlKey&&(GLUT.modifiers+=2),e.altKey&&(GLUT.modifiers+=4)},onMousemove:e=>{var t=Browser.mouseX,r=Browser.mouseY;Browser.calculateMouseEvent(e);var n=Browser.mouseX,a=Browser.mouseY;n==t&&a==r||(GLUT.buttons==0&&e.target==Module.canvas&&GLUT.passiveMotionFunc?(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.passiveMotionFunc)(t,r)):GLUT.buttons!=0&&GLUT.motionFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.motionFunc)(t,r)))},getSpecialKey:e=>{var t=null;switch(e){case 8:t=120;break;case 46:t=111;break;case 112:t=1;break;case 113:t=2;break;case 114:t=3;break;case 115:t=4;break;case 116:t=5;break;case 117:t=6;break;case 118:t=7;break;case 119:t=8;break;case 120:t=9;break;case 121:t=10;break;case 122:t=11;break;case 123:t=12;break;case 37:t=100;break;case 38:t=101;break;case 39:t=102;break;case 40:t=103;break;case 33:t=104;break;case 34:t=105;break;case 36:t=106;break;case 35:t=107;break;case 45:t=108;break;case 16:case 5:t=112;break;case 6:t=113;break;case 17:case 3:t=114;break;case 4:t=115;break;case 18:case 2:t=116;break;case 1:t=117;break}return t},getASCIIKey:e=>{if(e.ctrlKey||e.altKey||e.metaKey)return null;var t=e.keyCode;if(48<=t&&t<=57)return t;if(65<=t&&t<=90)return e.shiftKey?t:t+32;if(96<=t&&t<=105)return t-48;if(106<=t&&t<=111)return t-106+42;switch(t){case 9:case 13:case 27:case 32:case 61:return t}var r=e.shiftKey;switch(t){case 186:return r?58:59;case 187:return r?43:61;case 188:return r?60:44;case 189:return r?95:45;case 190:return r?62:46;case 191:return r?63:47;case 219:return r?123:91;case 220:return r?124:47;case 221:return r?125:93;case 222:return r?34:39}return null},onKeydown:e=>{if(GLUT.specialFunc||GLUT.keyboardFunc){var t=GLUT.getSpecialKey(e.keyCode);t!==null?GLUT.specialFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.specialFunc)(t,Browser.mouseX,Browser.mouseY)):(t=GLUT.getASCIIKey(e),t!==null&&GLUT.keyboardFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.keyboardFunc)(t,Browser.mouseX,Browser.mouseY)))}},onKeyup:e=>{if(GLUT.specialUpFunc||GLUT.keyboardUpFunc){var t=GLUT.getSpecialKey(e.keyCode);t!==null?GLUT.specialUpFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.specialUpFunc)(t,Browser.mouseX,Browser.mouseY)):(t=GLUT.getASCIIKey(e),t!==null&&GLUT.keyboardUpFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.keyboardUpFunc)(t,Browser.mouseX,Browser.mouseY)))}},touchHandler:e=>{if(e.target==Module.canvas){var t=e.changedTouches,r=t[0],n="";switch(e.type){case"touchstart":n="mousedown";break;case"touchmove":n="mousemove";break;case"touchend":n="mouseup";break;default:return}var a=document.createEvent("MouseEvent");a.initMouseEvent(n,!0,!0,window,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),r.target.dispatchEvent(a),e.preventDefault()}},onMouseButtonDown:e=>{if(Browser.calculateMouseEvent(e),GLUT.buttons|=1<{Browser.calculateMouseEvent(e),GLUT.buttons&=~(1<{Browser.calculateMouseEvent(e);var t=-Browser.getMouseWheelDelta(e);t=t==0?0:t>0?Math.max(t,1):Math.min(t,-1);var r=3;t<0&&(r=4),GLUT.mouseFunc&&(e.preventDefault(),GLUT.saveModifiers(e),getWasmTableEntry(GLUT.mouseFunc)(r,0,Browser.mouseX,Browser.mouseY))},onFullscreenEventChange:e=>{var t,r;document.fullscreen||document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen?(t=screen.width,r=screen.height):(t=GLUT.windowWidth,r=GLUT.windowHeight,document.removeEventListener("fullscreenchange",GLUT.onFullscreenEventChange,!0),document.removeEventListener("mozfullscreenchange",GLUT.onFullscreenEventChange,!0),document.removeEventListener("webkitfullscreenchange",GLUT.onFullscreenEventChange,!0)),Browser.setCanvasSize(t,r,!0),GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(t,r),_glutPostRedisplay()}},_glutGetModifiers=()=>GLUT.modifiers;_glutGetModifiers.sig="i";function _glutInit(e,t){GLUT.initTime=Date.now();var r="ontouchstart"in document.documentElement;r&&(window.addEventListener("touchmove",GLUT.touchHandler,!0),window.addEventListener("touchstart",GLUT.touchHandler,!0),window.addEventListener("touchend",GLUT.touchHandler,!0)),window.addEventListener("keydown",GLUT.onKeydown,!0),window.addEventListener("keyup",GLUT.onKeyup,!0),window.addEventListener("mousemove",GLUT.onMousemove,!0),window.addEventListener("mousedown",GLUT.onMouseButtonDown,!0),window.addEventListener("mouseup",GLUT.onMouseButtonUp,!0),window.addEventListener("mousewheel",GLUT.onMouseWheel,!0),window.addEventListener("DOMMouseScroll",GLUT.onMouseWheel,!0),Browser.resizeListeners.push((n,a)=>{GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(n,a)})}_glutInit.sig="vpp";var _glutInitWindowSize=(e,t)=>{Browser.setCanvasSize(GLUT.initWindowWidth=e,GLUT.initWindowHeight=t)};_glutInitWindowSize.sig="vii";var _glutInitWindowPosition=(e,t)=>{};_glutInitWindowPosition.sig="vii";var _glutGet=e=>{switch(e){case 100:return 0;case 101:return 0;case 102:return Module.canvas.width;case 103:return Module.canvas.height;case 200:return Module.canvas.width;case 201:return Module.canvas.height;case 500:return 0;case 501:return 0;case 502:return GLUT.initWindowWidth;case 503:return GLUT.initWindowHeight;case 700:var t=Date.now();return t-GLUT.initTime;case 105:return Module.ctx.getContextAttributes().stencil?8:0;case 106:return Module.ctx.getContextAttributes().depth?8:0;case 110:return Module.ctx.getContextAttributes().alpha?8:0;case 120:return Module.ctx.getContextAttributes().antialias?1:0;default:throw"glutGet("+e+") not implemented yet"}};_glutGet.sig="ii";function _glutIdleFunc(e){e>>>=0;function t(){GLUT.idleFunc&&(getWasmTableEntry(GLUT.idleFunc)(),safeSetTimeout(t,4))}GLUT.idleFunc||safeSetTimeout(t,0),GLUT.idleFunc=e}_glutIdleFunc.sig="vp";var _glutTimerFunc=function(e,t,r){return t>>>=0,safeSetTimeout(()=>getWasmTableEntry(t)(r),e)};_glutTimerFunc.sig="vipi";function _glutDisplayFunc(e){e>>>=0,GLUT.displayFunc=e}_glutDisplayFunc.sig="vp";function _glutKeyboardFunc(e){e>>>=0,GLUT.keyboardFunc=e}_glutKeyboardFunc.sig="vp";function _glutKeyboardUpFunc(e){e>>>=0,GLUT.keyboardUpFunc=e}_glutKeyboardUpFunc.sig="vp";function _glutSpecialFunc(e){e>>>=0,GLUT.specialFunc=e}_glutSpecialFunc.sig="vp";function _glutSpecialUpFunc(e){e>>>=0,GLUT.specialUpFunc=e}_glutSpecialUpFunc.sig="vp";function _glutReshapeFunc(e){e>>>=0,GLUT.reshapeFunc=e}_glutReshapeFunc.sig="vp";function _glutMotionFunc(e){e>>>=0,GLUT.motionFunc=e}_glutMotionFunc.sig="vp";function _glutPassiveMotionFunc(e){e>>>=0,GLUT.passiveMotionFunc=e}_glutPassiveMotionFunc.sig="vp";function _glutMouseFunc(e){e>>>=0,GLUT.mouseFunc=e}_glutMouseFunc.sig="vp";var _glutSetCursor=e=>{var t="auto";switch(e){case 0:break;case 1:break;case 2:t="pointer";break;case 3:break;case 4:t="help";break;case 5:break;case 6:break;case 7:t="wait";break;case 8:t="text";break;case 9:case 102:t="crosshair";break;case 10:t="ns-resize";break;case 11:t="ew-resize";break;case 12:t="n-resize";break;case 13:t="s-resize";break;case 14:t="w-resize";break;case 15:t="e-resize";break;case 16:t="nw-resize";break;case 17:t="ne-resize";break;case 18:t="se-resize";break;case 19:t="sw-resize";break;case 100:break;case 101:t="none";break;default:throw"glutSetCursor: Unknown cursor type: "+e}Module.canvas.style.cursor=t};_glutSetCursor.sig="vi";function _glutCreateWindow(e){var t={antialias:(GLUT.initDisplayMode&128)!=0,depth:(GLUT.initDisplayMode&16)!=0,stencil:(GLUT.initDisplayMode&32)!=0,alpha:(GLUT.initDisplayMode&8)!=0};return Module.ctx=Browser.createContext(Module.canvas,!0,!0,t),Module.ctx?1:0}_glutCreateWindow.sig="ip";var _glutDestroyWindow=e=>(delete Module.ctx,1);_glutDestroyWindow.sig="vi";var _glutReshapeWindow=(e,t)=>{Browser.exitFullscreen(),Browser.setCanvasSize(e,t,!0),GLUT.reshapeFunc&&getWasmTableEntry(GLUT.reshapeFunc)(e,t),_glutPostRedisplay()};_glutReshapeWindow.sig="vii";var _glutPositionWindow=(e,t)=>{Browser.exitFullscreen(),_glutPostRedisplay()};_glutPositionWindow.sig="vii";var _glutFullScreen=()=>{GLUT.windowX=0,GLUT.windowY=0,GLUT.windowWidth=Module.canvas.width,GLUT.windowHeight=Module.canvas.height,document.addEventListener("fullscreenchange",GLUT.onFullscreenEventChange,!0),document.addEventListener("mozfullscreenchange",GLUT.onFullscreenEventChange,!0),document.addEventListener("webkitfullscreenchange",GLUT.onFullscreenEventChange,!0),Browser.requestFullscreen(!1,!1)};_glutFullScreen.sig="v";var _glutInitDisplayMode=e=>GLUT.initDisplayMode=e;_glutInitDisplayMode.sig="vi";var _glutSwapBuffers=()=>{};_glutSwapBuffers.sig="v";var _glutMainLoop=()=>{throw _glutReshapeWindow(Module.canvas.width,Module.canvas.height),_glutPostRedisplay(),"unwind"};_glutMainLoop.sig="v";function _XOpenDisplay(e){return 1}_XOpenDisplay.sig="pp";function _XCreateWindow(e,t,r,n,a,o,l,u,_,d,p,f){return Browser.setCanvasSize(a,o),2}_XCreateWindow.sig="pppiiiiiiippp";function _XChangeWindowAttributes(e,t,r,n){}_XChangeWindowAttributes.sig="ipppp";function _XSetWMHints(e,t,r){}_XSetWMHints.sig="ippp";function _XMapWindow(e,t){}_XMapWindow.sig="ipp";function _XStoreName(e,t,r){}_XStoreName.sig="ippp";function _XInternAtom(e,t,r){return 0}_XInternAtom.sig="pppi";function _XSendEvent(e,t,r,n,a){}_XSendEvent.sig="ippipp";function _XPending(e){return 0}_XPending.sig="ip";var EGL={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode(e){EGL.errorCode=e},chooseConfig(e,t,r,n,a){if(e!=62e3)return EGL.setErrorCode(12296),0;if(t)for(;;){var o=HEAP32[t>>>2>>>0];if(o==12321){var l=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.alpha=l>0}else if(o==12325){var u=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.depth=u>0}else if(o==12326){var _=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.stencil=_>0}else if(o==12337){var d=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.antialias=d>0}else if(o==12338){var d=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.antialias=d==1}else if(o==12544){var p=HEAP32[t+4>>>2>>>0];EGL.contextAttributes.lowLatency=p!=12547}else if(o==12344)break;t+=8}return(!r||!n)&&!a?(EGL.setErrorCode(12300),0):(a&&(HEAP32[a>>>2>>>0]=1),r&&n>0&&(HEAPU32[r>>>2>>>0]=62002),EGL.setErrorCode(12288),1)}};function _eglGetDisplay(e){return e>>>=0,EGL.setErrorCode(12288),e!=0&&e!=1?0:62e3}_eglGetDisplay.sig="pp";function _eglInitialize(e,t,r){return e>>>=0,t>>>=0,r>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(t&&(HEAP32[t>>>2>>>0]=1),r&&(HEAP32[r>>>2>>>0]=4),EGL.defaultDisplayInitialized=!0,EGL.setErrorCode(12288),1)}_eglInitialize.sig="ippp";function _eglTerminate(e){return e>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(EGL.currentContext=0,EGL.currentReadSurface=0,EGL.currentDrawSurface=0,EGL.defaultDisplayInitialized=!1,EGL.setErrorCode(12288),1)}_eglTerminate.sig="ip";function _eglGetConfigs(e,t,r,n){return e>>>=0,t>>>=0,n>>>=0,EGL.chooseConfig(e,0,t,r,n)}_eglGetConfigs.sig="ippip";function _eglChooseConfig(e,t,r,n,a){return e>>>=0,t>>>=0,r>>>=0,a>>>=0,EGL.chooseConfig(e,t,r,n,a)}_eglChooseConfig.sig="ipppip";function _eglGetConfigAttrib(e,t,r,n){if(e>>>=0,t>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(t!=62002)return EGL.setErrorCode(12293),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),r){case 12320:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.alpha?32:24,1;case 12321:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.alpha?8:0,1;case 12322:return HEAP32[n>>>2>>>0]=8,1;case 12323:return HEAP32[n>>>2>>>0]=8,1;case 12324:return HEAP32[n>>>2>>>0]=8,1;case 12325:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.depth?24:0,1;case 12326:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.stencil?8:0,1;case 12327:return HEAP32[n>>>2>>>0]=12344,1;case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12329:return HEAP32[n>>>2>>>0]=0,1;case 12330:return HEAP32[n>>>2>>>0]=4096,1;case 12331:return HEAP32[n>>>2>>>0]=16777216,1;case 12332:return HEAP32[n>>>2>>>0]=4096,1;case 12333:return HEAP32[n>>>2>>>0]=0,1;case 12334:return HEAP32[n>>>2>>>0]=0,1;case 12335:return HEAP32[n>>>2>>>0]=12344,1;case 12337:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.antialias?4:0,1;case 12338:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.antialias?1:0,1;case 12339:return HEAP32[n>>>2>>>0]=4,1;case 12340:return HEAP32[n>>>2>>>0]=12344,1;case 12341:case 12342:case 12343:return HEAP32[n>>>2>>>0]=-1,1;case 12345:case 12346:return HEAP32[n>>>2>>>0]=0,1;case 12347:return HEAP32[n>>>2>>>0]=0,1;case 12348:return HEAP32[n>>>2>>>0]=1,1;case 12349:case 12350:return HEAP32[n>>>2>>>0]=0,1;case 12351:return HEAP32[n>>>2>>>0]=12430,1;case 12352:return HEAP32[n>>>2>>>0]=4,1;case 12354:return HEAP32[n>>>2>>>0]=0,1;default:return EGL.setErrorCode(12292),0}}_eglGetConfigAttrib.sig="ippip";function _eglCreateWindowSurface(e,t,r,n){return e>>>=0,t>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):t!=62002?(EGL.setErrorCode(12293),0):(EGL.setErrorCode(12288),62006)}_eglCreateWindowSurface.sig="pppip";function _eglDestroySurface(e,t){return e>>>=0,t>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):t!=62006?(EGL.setErrorCode(12301),1):(EGL.currentReadSurface==t&&(EGL.currentReadSurface=0),EGL.currentDrawSurface==t&&(EGL.currentDrawSurface=0),EGL.setErrorCode(12288),1)}_eglDestroySurface.sig="ipp";function _eglCreateContext(e,t,r,n){if(e>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;for(var a=1;;){var o=HEAP32[n>>>2>>>0];if(o==12440)a=HEAP32[n+4>>>2>>>0];else{if(o==12344)break;return EGL.setErrorCode(12292),0}n+=8}return a!=2?(EGL.setErrorCode(12293),0):(EGL.contextAttributes.majorVersion=a-1,EGL.contextAttributes.minorVersion=0,EGL.context=GL.createContext(Module.canvas,EGL.contextAttributes),EGL.context!=0?(EGL.setErrorCode(12288),GL.makeContextCurrent(EGL.context),Browser.useWebGL=!0,Browser.moduleContextCreatedCallbacks.forEach(l=>l()),GL.makeContextCurrent(null),62004):(EGL.setErrorCode(12297),0))}_eglCreateContext.sig="ppppp";function _eglDestroyContext(e,t){return e>>>=0,t>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):t!=62004?(EGL.setErrorCode(12294),0):(GL.deleteContext(EGL.context),EGL.setErrorCode(12288),EGL.currentContext==t&&(EGL.currentContext=0),1)}_eglDestroyContext.sig="ipp";function _eglQuerySurface(e,t,r,n){if(e>>>=0,t>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(t!=62006)return EGL.setErrorCode(12301),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),r){case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12376:return 1;case 12375:return HEAP32[n>>>2>>>0]=Module.canvas.width,1;case 12374:return HEAP32[n>>>2>>>0]=Module.canvas.height,1;case 12432:return HEAP32[n>>>2>>>0]=-1,1;case 12433:return HEAP32[n>>>2>>>0]=-1,1;case 12434:return HEAP32[n>>>2>>>0]=-1,1;case 12422:return HEAP32[n>>>2>>>0]=12420,1;case 12441:return HEAP32[n>>>2>>>0]=12442,1;case 12435:return HEAP32[n>>>2>>>0]=12437,1;case 12416:case 12417:case 12418:case 12419:return 1;default:return EGL.setErrorCode(12292),0}}_eglQuerySurface.sig="ippip";function _eglQueryContext(e,t,r,n){if(e>>>=0,t>>>=0,n>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(t!=62004)return EGL.setErrorCode(12294),0;if(!n)return EGL.setErrorCode(12300),0;switch(EGL.setErrorCode(12288),r){case 12328:return HEAP32[n>>>2>>>0]=62002,1;case 12439:return HEAP32[n>>>2>>>0]=12448,1;case 12440:return HEAP32[n>>>2>>>0]=EGL.contextAttributes.majorVersion+1,1;case 12422:return HEAP32[n>>>2>>>0]=12420,1;default:return EGL.setErrorCode(12292),0}}_eglQueryContext.sig="ippip";var _eglGetError=()=>EGL.errorCode;_eglGetError.sig="i";function _eglQueryString(e,t){if(e>>>=0,e!=62e3)return EGL.setErrorCode(12296),0;if(EGL.setErrorCode(12288),EGL.stringCache[t])return EGL.stringCache[t];var r;switch(t){case 12371:r=stringToNewUTF8("Emscripten");break;case 12372:r=stringToNewUTF8("1.4 Emscripten EGL");break;case 12373:r=stringToNewUTF8("");break;case 12429:r=stringToNewUTF8("OpenGL_ES");break;default:return EGL.setErrorCode(12300),0}return EGL.stringCache[t]=r,r}_eglQueryString.sig="ppi";var _eglBindAPI=e=>e==12448?(EGL.setErrorCode(12288),1):(EGL.setErrorCode(12300),0);_eglBindAPI.sig="ii";var _eglQueryAPI=()=>(EGL.setErrorCode(12288),12448);_eglQueryAPI.sig="i";var _eglWaitClient=()=>(EGL.setErrorCode(12288),1);_eglWaitClient.sig="i";var _eglWaitNative=e=>(EGL.setErrorCode(12288),1);_eglWaitNative.sig="ii";var _eglWaitGL=_eglWaitClient;_eglWaitGL.sig="i";function _eglSwapInterval(e,t){return e>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):(t==0?_emscripten_set_main_loop_timing(0,0):_emscripten_set_main_loop_timing(1,t),EGL.setErrorCode(12288),1)}_eglSwapInterval.sig="ipi";function _eglMakeCurrent(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,e!=62e3?(EGL.setErrorCode(12296),0):n!=0&&n!=62004?(EGL.setErrorCode(12294),0):r!=0&&r!=62006||t!=0&&t!=62006?(EGL.setErrorCode(12301),0):(GL.makeContextCurrent(n?EGL.context:null),EGL.currentContext=n,EGL.currentDrawSurface=t,EGL.currentReadSurface=r,EGL.setErrorCode(12288),1)}_eglMakeCurrent.sig="ipppp";function _eglGetCurrentContext(){return EGL.currentContext}_eglGetCurrentContext.sig="p";function _eglGetCurrentSurface(e){return e==12378?EGL.currentReadSurface:e==12377?EGL.currentDrawSurface:(EGL.setErrorCode(12300),0)}_eglGetCurrentSurface.sig="pi";function _eglGetCurrentDisplay(){return EGL.currentContext?62e3:0}_eglGetCurrentDisplay.sig="p";function _eglSwapBuffers(e,t){if(!EGL.defaultDisplayInitialized)EGL.setErrorCode(12289);else if(!Module.ctx)EGL.setErrorCode(12290);else if(Module.ctx.isContextLost())EGL.setErrorCode(12302);else return EGL.setErrorCode(12288),1;return 0}_eglSwapBuffers.sig="ipp";var _eglReleaseThread=()=>(EGL.currentContext=0,EGL.currentReadSurface=0,EGL.currentDrawSurface=0,EGL.setErrorCode(12288),1);_eglReleaseThread.sig="i";function _uuid_clear(e){return e>>>=0,zeroMemory(e,16)}_uuid_clear.sig="vp";function _uuid_compare(e,t){return e>>>=0,t>>>=0,_memcmp(e,t,16)}_uuid_compare.sig="ipp";function _uuid_copy(e,t){return e>>>=0,t>>>=0,_memcpy(e,t,16)}_uuid_copy.sig="vpp";function _uuid_generate(e){e>>>=0;var t=null;if(ENVIRONMENT_IS_NODE)try{var r=ki("crypto").randomBytes;t=r(16)}catch{}else ENVIRONMENT_IS_WEB&&typeof window.crypto<"u"&&typeof window.crypto.getRandomValues<"u"&&(t=new Uint8Array(16),window.crypto.getRandomValues(t));if(!t){t=new Array(16);for(var n=new Date().getTime(),a=0;a<16;a++){var o=(n+Math.random()*256)%256|0;n=n/256|0,t[a]=o}}t[6]=t[6]&15|64,t[8]=t[8]&63|128,writeArrayToMemory(t,e)}_uuid_generate.sig="vp";function _uuid_is_null(e){e>>>=0;for(var t=0;t<4;t++,e=e+4|0){var r=HEAP32[e>>>2>>>0];if(r)return 0}return 1}_uuid_is_null.sig="ip";function _uuid_parse(e,t){if(e>>>=0,t>>>=0,e=UTF8ToString(e),e.length===36){var r=0,n=new Array(16);return e.toLowerCase().replace(/[0-9a-f]{2}/g,function(a){r<16&&(n[r++]=parseInt(a,16))}),r<16?-1:(writeArrayToMemory(n,t),0)}return-1}_uuid_parse.sig="ipp";function _uuid_unparse(e,t,r){e>>>=0,t>>>=0;var n=0,a="xxxx-xx-xx-xx-xxxxxx".replace(/[x]/g,function(o){var l=r?HEAPU8[e+n>>>0].toString(16).toUpperCase():HEAPU8[e+n>>>0].toString(16);return l=l.length===1?"0"+l:l,n++,l});stringToUTF8(a,t,37)}_uuid_unparse.sig="vpp";function _uuid_unparse_lower(e,t){e>>>=0,t>>>=0,_uuid_unparse(e,t)}_uuid_unparse_lower.sig="vpp";function _uuid_unparse_upper(e,t){e>>>=0,t>>>=0,_uuid_unparse(e,t,!0)}_uuid_unparse_upper.sig="vpp";function _uuid_type(e){return 4}_uuid_type.sig="ip";function _uuid_variant(e){return 1}_uuid_variant.sig="ip";var GLEW={isLinaroFork:1,extensions:null,error:{0:null,1:null,2:null,3:null,4:null,5:null,6:null,7:null,8:null},version:{1:null,2:null,3:null,4:null},errorStringConstantFromCode(e){switch(e){case 4:return"OpenGL ES lib expected, found OpenGL lib";case 5:return"OpenGL lib expected, found OpenGL ES lib";case 6:return"Missing EGL version";case 7:return"EGL 1.1 and up are supported"}switch(e){case 0:return"No error";case 1:return"Missing GL version";case 2:return"GL 1.1 and up are supported";case 3:return"GLX 1.2 and up are supported";default:return null}},errorString(e){if(!GLEW.error[e]){var t=GLEW.errorStringConstantFromCode(e);t||(t="Unknown error",e=8),GLEW.error[e]=stringToNewUTF8(t)}return GLEW.error[e]},versionStringConstantFromCode(e){switch(e){case 1:return"1.10.0";case 2:return"1";case 3:return"10";case 4:return"0";default:return null}},versionString(e){if(!GLEW.version[e]){var t=GLEW.versionStringConstantFromCode(e);if(!t)return 0;GLEW.version[e]=stringToNewUTF8(t)}return GLEW.version[e]},extensionIsSupported(e){return GLEW.extensions||(GLEW.extensions=webglGetExtensions()),GLEW.extensions.includes(e)?1:GLEW.extensions.includes("GL_"+e)}},_glewInit=()=>0;_glewInit.sig="i";function _glewIsSupported(e){e>>>=0;for(var t=UTF8ToString(e).split(" "),r=0;r>>=0,GLEW.extensionIsSupported(UTF8ToString(e))}_glewGetExtension.sig="ip";function _glewGetErrorString(e){return GLEW.errorString(e)}_glewGetErrorString.sig="pi";function _glewGetString(e){return GLEW.versionString(e)}_glewGetString.sig="pi";var IDBStore={indexedDB(){if(typeof indexedDB<"u")return indexedDB;var e=null;return typeof window=="object"&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),assert(e,"IDBStore used, but indexedDB not supported"),e},DB_VERSION:22,DB_STORE_NAME:"FILE_DATA",dbs:{},blobs:[0],getDB(e,t){var r=IDBStore.dbs[e];if(r)return t(null,r);var n;try{n=IDBStore.indexedDB().open(e,IDBStore.DB_VERSION)}catch(a){return t(a)}n.onupgradeneeded=a=>{var o=a.target.result,l=a.target.transaction;o.objectStoreNames.contains(IDBStore.DB_STORE_NAME)?l.objectStore(IDBStore.DB_STORE_NAME):o.createObjectStore(IDBStore.DB_STORE_NAME)},n.onsuccess=()=>{r=n.result,IDBStore.dbs[e]=r,t(null,r)},n.onerror=function(a){t(a.target.error||"unknown error"),a.preventDefault()}},getStore(e,t,r){IDBStore.getDB(e,(n,a)=>{if(n)return r(n);var o=a.transaction([IDBStore.DB_STORE_NAME],t);o.onerror=u=>{r(u.target.error||"unknown error"),u.preventDefault()};var l=o.objectStore(IDBStore.DB_STORE_NAME);r(null,l)})},getFile(e,t,r){IDBStore.getStore(e,"readonly",(n,a)=>{if(n)return r(n);var o=a.get(t);o.onsuccess=l=>{var u=l.target.result;return u?r(null,u):r("file ".concat(t," not found"))},o.onerror=r})},setFile(e,t,r,n){IDBStore.getStore(e,"readwrite",(a,o)=>{if(a)return n(a);var l=o.put(r,t);l.onsuccess=u=>n(),l.onerror=n})},deleteFile(e,t,r){IDBStore.getStore(e,"readwrite",(n,a)=>{if(n)return r(n);var o=a.delete(t);o.onsuccess=l=>r(),o.onerror=r})},existsFile(e,t,r){IDBStore.getStore(e,"readonly",(n,a)=>{if(n)return r(n);var o=a.count(t);o.onsuccess=l=>r(null,l.target.result>0),o.onerror=r})},clearStore(e,t){IDBStore.getStore(e,"readwrite",(r,n)=>{if(r)return t(r);var a=n.clear();a.onsuccess=o=>t(),a.onerror=t})}},_emscripten_idb_async_load=function(e,t,r,n,a){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,IDBStore.getFile(UTF8ToString(e),UTF8ToString(t),(o,l)=>{callUserCallback(()=>{if(o){a&&getWasmTableEntry(a)(r);return}var u=_malloc(l.length);HEAPU8.set(l,u>>>0),getWasmTableEntry(n)(r,u,l.length),_free(u)})})};_emscripten_idb_async_load.sig="vppppp";var _emscripten_idb_async_store=function(e,t,r,n,a,o,l){e>>>=0,t>>>=0,r>>>=0,a>>>=0,o>>>=0,l>>>=0,IDBStore.setFile(UTF8ToString(e),UTF8ToString(t),new Uint8Array(HEAPU8.subarray(r>>>0,r+n>>>0)),u=>{callUserCallback(()=>{if(u){l&&getWasmTableEntry(l)(a);return}o&&getWasmTableEntry(o)(a)})})};_emscripten_idb_async_store.sig="vpppippp";var _emscripten_idb_async_delete=function(e,t,r,n,a){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,IDBStore.deleteFile(UTF8ToString(e),UTF8ToString(t),o=>{callUserCallback(()=>{if(o){a&&getWasmTableEntry(a)(r);return}n&&getWasmTableEntry(n)(r)})})};_emscripten_idb_async_delete.sig="vppppp";var _emscripten_idb_async_exists=function(e,t,r,n,a){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,IDBStore.existsFile(UTF8ToString(e),UTF8ToString(t),(o,l)=>{callUserCallback(()=>{if(o){a&&getWasmTableEntry(a)(r);return}n&&getWasmTableEntry(n)(r,l)})})};_emscripten_idb_async_exists.sig="vppppp";var _emscripten_idb_async_clear=function(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0,IDBStore.clearStore(UTF8ToString(e),a=>{callUserCallback(()=>{if(a){n&&getWasmTableEntry(n)(t);return}r&&getWasmTableEntry(r)(t)})})};_emscripten_idb_async_clear.sig="vpppp";function _emscripten_idb_load(e,t,r,n,a){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_load, etc."}_emscripten_idb_load.sig="vppppp";function _emscripten_idb_store(e,t,r,n,a){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_store, etc."}_emscripten_idb_store.sig="vpppip";function _emscripten_idb_delete(e,t,r){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_delete, etc."}_emscripten_idb_delete.sig="vppp";function _emscripten_idb_exists(e,t,r,n){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_exists, etc."}_emscripten_idb_exists.sig="vpppp";function _emscripten_idb_clear(e,t){throw"Please compile your program with async support in order to use synchronous operations like emscripten_idb_clear, etc."}_emscripten_idb_clear.sig="vpp";var _emscripten_sleep=()=>{throw"Please compile your program with async support in order to use asynchronous operations like emscripten_sleep"};_emscripten_sleep.sig="vi";function _emscripten_wget(e,t){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_wget"}Module._emscripten_wget=_emscripten_wget,_emscripten_wget.sig="ipp";function _emscripten_scan_registers(e){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_scan_registers"}_emscripten_scan_registers.sig="vp";function _emscripten_fiber_swap(e,t){throw"Please compile your program with async support in order to use asynchronous operations like emscripten_fiber_swap"}_emscripten_fiber_swap.sig="vpp";var _SDL_GetTicks=()=>Date.now()-SDL.startTime|0;_SDL_GetTicks.sig="i";function _SDL_LockSurface(e){e>>>=0;var t=SDL.surfaces[e];if(t.locked++,t.locked>1||(t.buffer||(t.buffer=_malloc(t.width*t.height*4),HEAPU32[e+20>>>2>>>0]=t.buffer),HEAPU32[e+20>>>2>>>0]=t.buffer,e==SDL.screen&&Module.screenIsReadOnly&&t.image))return 0;if(t.image=t.ctx.getImageData(0,0,t.width,t.height),e==SDL.screen&&SDL.defaults.opaqueFrontBuffer)for(var r=t.image.data,n=r.length,a=0;a>>0)}return 0}_SDL_LockSurface.sig="ip";var SDL={defaults:{width:320,height:200,copyOnLock:!0,discardOnLock:!1,opaqueFrontBuffer:!0},version:null,surfaces:{},canvasPool:[],events:[],fonts:[null],audios:[null],rwops:[null],music:{audio:null,volume:1},mixerFrequency:22050,mixerFormat:32784,mixerNumChannels:2,mixerChunkSize:1024,channelMinimumNumber:0,GL:!1,glAttributes:{0:3,1:3,2:2,3:0,4:0,5:1,6:16,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:1,16:0,17:0,18:0},keyboardState:null,keyboardMap:{},canRequestFullscreen:!1,isRequestingFullscreen:!1,textInput:!1,unicode:!1,ttfContext:null,audio:null,startTime:null,initFlags:0,buttonState:0,modState:0,DOMButtons:[0,0,0],DOMEventToSDLEvent:{},TOUCH_DEFAULT_ID:0,eventHandler:null,eventHandlerContext:null,eventHandlerTemp:0,keyCodes:{16:1249,17:1248,18:1250,20:1081,33:1099,34:1102,35:1101,36:1098,37:1104,38:1106,39:1103,40:1105,44:316,45:1097,46:127,91:1251,93:1125,96:1122,97:1113,98:1114,99:1115,100:1116,101:1117,102:1118,103:1119,104:1120,105:1121,106:1109,107:1111,109:1110,110:1123,111:1108,112:1082,113:1083,114:1084,115:1085,116:1086,117:1087,118:1088,119:1089,120:1090,121:1091,122:1092,123:1093,124:1128,125:1129,126:1130,127:1131,128:1132,129:1133,130:1134,131:1135,132:1136,133:1137,134:1138,135:1139,144:1107,160:94,161:33,162:34,163:35,164:36,165:37,166:38,167:95,168:40,169:41,170:42,171:43,172:124,173:45,174:123,175:125,176:126,181:127,182:129,183:128,188:44,190:46,191:47,192:96,219:91,220:92,221:93,222:39,224:1251},scanCodes:{8:42,9:43,13:40,27:41,32:44,35:204,39:53,44:54,46:55,47:56,48:39,49:30,50:31,51:32,52:33,53:34,54:35,55:36,56:37,57:38,58:203,59:51,61:46,91:47,92:49,93:48,96:52,97:4,98:5,99:6,100:7,101:8,102:9,103:10,104:11,105:12,106:13,107:14,108:15,109:16,110:17,111:18,112:19,113:20,114:21,115:22,116:23,117:24,118:25,119:26,120:27,121:28,122:29,127:76,305:224,308:226,316:70},loadRect(e){return{x:HEAP32[e>>>2>>>0],y:HEAP32[e+4>>>2>>>0],w:HEAP32[e+8>>>2>>>0],h:HEAP32[e+12>>>2>>>0]}},updateRect(e,t){HEAP32[e>>>2>>>0]=t.x,HEAP32[e+4>>>2>>>0]=t.y,HEAP32[e+8>>>2>>>0]=t.w,HEAP32[e+12>>>2>>>0]=t.h},intersectionOfRects(e,t){var r=Math.max(e.x,t.x),n=Math.max(e.y,t.y),a=Math.min(e.x+e.w,t.x+t.w),o=Math.min(e.y+e.h,t.y+t.h);return{x:r,y:n,w:Math.max(r,a)-r,h:Math.max(n,o)-n}},checkPixelFormat(e){},loadColorToCSSRGB(e){var t=HEAP32[e>>>2>>>0];return"rgb("+(t&255)+","+(t>>8&255)+","+(t>>16&255)+")"},loadColorToCSSRGBA(e){var t=HEAP32[e>>>2>>>0];return"rgba("+(t&255)+","+(t>>8&255)+","+(t>>16&255)+","+(t>>24&255)/255+")"},translateColorToCSSRGBA:e=>"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>>24)/255+")",translateRGBAToCSSRGBA:(e,t,r,n)=>"rgba("+(e&255)+","+(t&255)+","+(r&255)+","+(n&255)/255+")",translateRGBAToColor:(e,t,r,n)=>e|t<<8|r<<16|n<<24,makeSurface(e,t,r,n,a,o,l,u,_){var d=r&1,p=r&2097152,f=r&67108864,m=_malloc(60),h=_malloc(44),g=p?1:4,b=0;!d&&!f&&(b=_malloc(e*t*4)),HEAP32[m>>>2>>>0]=r,HEAPU32[m+4>>>2>>>0]=h,HEAP32[m+8>>>2>>>0]=e,HEAP32[m+12>>>2>>>0]=t,HEAP32[m+16>>>2>>>0]=e*g,HEAPU32[m+20>>>2>>>0]=b,HEAP32[m+36>>>2>>>0]=0,HEAP32[m+40>>>2>>>0]=0,HEAP32[m+44>>>2>>>0]=Module.canvas.width,HEAP32[m+48>>>2>>>0]=Module.canvas.height,HEAP32[m+56>>>2>>>0]=1,HEAP32[h>>>2>>>0]=-2042224636,HEAP32[h+4>>>2>>>0]=0,HEAP8[h+8>>>0]=g*8,HEAP8[h+9>>>0]=g,HEAP32[h+12>>>2>>>0]=o||255,HEAP32[h+16>>>2>>>0]=l||65280,HEAP32[h+20>>>2>>>0]=u||16711680,HEAP32[h+24>>>2>>>0]=_||4278190080,SDL.GL=SDL.GL||f;var v;n?v=Module.canvas:(SDL.canvasPool.length>0?v=SDL.canvasPool.pop():v=document.createElement("canvas"),v.width=e,v.height=t);var S={antialias:SDL.glAttributes[13]!=0&&SDL.glAttributes[14]>1,depth:SDL.glAttributes[6]>0,stencil:SDL.glAttributes[7]>0,alpha:SDL.glAttributes[3]>0},L=Browser.createContext(v,f,n,S);return SDL.surfaces[m]={width:e,height:t,canvas:v,ctx:L,surf:m,buffer:b,pixelFormat:h,alpha:255,flags:r,locked:0,usePageCanvas:n,source:a,isFlagSet:T=>r&T},m},copyIndexedColorData(e,t,r,n,a){if(e.colors){var o=Module.canvas.width,l=Module.canvas.height,u=t||0,_=r||0,d=(n||o-u)+u,p=(a||l-_)+_,f=e.buffer;e.image.data32||(e.image.data32=new Uint32Array(e.image.data.buffer));for(var m=e.image.data32,h=e.colors32,g=_;g>>0]]}},freeSurface(e){var t=e+56,r=HEAP32[t>>>2>>>0];if(r>1){HEAP32[t>>>2>>>0]=r-1;return}var n=SDL.surfaces[e];!n.usePageCanvas&&n.canvas&&SDL.canvasPool.push(n.canvas),n.buffer&&_free(n.buffer),_free(n.pixelFormat),_free(e),SDL.surfaces[e]=null,e===SDL.screen&&(SDL.screen=null)},blitSurface(e,t,r,n,a){var o=SDL.surfaces[e],l=SDL.surfaces[r],u,_;if(t?u=SDL.loadRect(t):u={x:0,y:0,w:o.width,h:o.height},n?_=SDL.loadRect(n):_={x:0,y:0,w:o.width,h:o.height},l.clipRect){var d=!a||u.w===0?1:u.w/_.w,p=!a||u.h===0?1:u.h/_.h;_=SDL.intersectionOfRects(l.clipRect,_),u.w=_.w*d,u.h=_.h*p,n&&SDL.updateRect(n,_)}var f,m;if(a?(f=_.w,m=_.h):(f=u.w,m=u.h),u.w===0||u.h===0||f===0||m===0)return 0;var h=l.ctx.globalAlpha;return l.ctx.globalAlpha=o.alpha/255,l.ctx.drawImage(o.canvas,u.x,u.y,u.w,u.h,_.x,_.y,f,m),l.ctx.globalAlpha=h,r!=SDL.screen&&(warnOnce("WARNING: copying canvas data to memory for compatibility"),_SDL_LockSurface(r),l.locked--),0},downFingers:{},savedKeydown:null,receiveEvent(e){function t(){for(var p in SDL.keyboardMap)SDL.events.push({type:"keyup",keyCode:SDL.keyboardMap[p]})}switch(e.type){case"touchstart":case"touchmove":{e.preventDefault();var r=[];if(e.type==="touchstart")for(var n=0;n0?Math.max(_,1):Math.min(_,-1);var d=_>0?3:4;SDL.events.push({type:"mousedown",button:d,pageX:e.pageX,pageY:e.pageY}),SDL.events.push({type:"mouseup",button:d,pageX:e.pageX,pageY:e.pageY}),SDL.events.push({type:"wheel",deltaX:0,deltaY:_}),e.preventDefault();break;case"mousemove":if(SDL.DOMButtons[0]===1&&SDL.events.push({type:"touchmove",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),Browser.pointerLock&&("mozMovementX"in e&&(e.movementX=e.mozMovementX,e.movementY=e.mozMovementY),e.movementX==0&&e.movementY==0)){e.preventDefault();return}case"keydown":case"keyup":case"keypress":case"mousedown":case"mouseup":if((e.type!=="keydown"||!SDL.unicode&&!SDL.textInput||e.keyCode===8||e.keyCode===9)&&e.preventDefault(),e.type=="mousedown")SDL.DOMButtons[e.button]=1,SDL.events.push({type:"touchstart",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}});else if(e.type=="mouseup"){if(!SDL.DOMButtons[e.button])return;SDL.events.push({type:"touchend",touch:{identifier:0,deviceID:-1,pageX:e.pageX,pageY:e.pageY}}),SDL.DOMButtons[e.button]=0}e.type==="keydown"||e.type==="mousedown"?SDL.canRequestFullscreen=!0:(e.type==="keyup"||e.type==="mouseup")&&(SDL.isRequestingFullscreen&&(Module.requestFullscreen(!0,!0),SDL.isRequestingFullscreen=!1),SDL.canRequestFullscreen=!1),e.type==="keypress"&&SDL.savedKeydown?(SDL.savedKeydown.keypressCharCode=e.charCode,SDL.savedKeydown=null):e.type==="keydown"&&(SDL.savedKeydown=e),(e.type!=="keypress"||SDL.textInput)&&SDL.events.push(e);break;case"mouseout":for(var n=0;n<3;n++)SDL.DOMButtons[n]&&(SDL.events.push({type:"mouseup",button:n,pageX:e.pageX,pageY:e.pageY}),SDL.DOMButtons[n]=0);e.preventDefault();break;case"focus":SDL.events.push(e),e.preventDefault();break;case"blur":SDL.events.push(e),t(),e.preventDefault();break;case"visibilitychange":SDL.events.push({type:"visibilitychange",visible:!document.hidden}),t(),e.preventDefault();break;case"unload":MainLoop.runner&&(SDL.events.push(e),MainLoop.runner());return;case"resize":SDL.events.push(e),e.preventDefault&&e.preventDefault();break}SDL.events.length>=1e4&&(err("SDL event queue full, dropping events"),SDL.events=SDL.events.slice(0,1e4)),SDL.flushEventsToHandler()},lookupKeyCodeForEvent(e){var t=e.keyCode;return t>=65&&t<=90?t+=32:(t=SDL.keyCodes[e.keyCode]||e.keyCode,e.location===2&&t>=1248&&t<=1251&&(t+=4)),t},handleEvent(e){if(!e.handled)switch(e.handled=!0,e.type){case"touchstart":case"touchend":case"touchmove":{Browser.calculateMouseEvent(e);break}case"keydown":case"keyup":{var t=e.type==="keydown",r=SDL.lookupKeyCodeForEvent(e);HEAP8[SDL.keyboardState+r>>>0]=t,SDL.modState=(HEAP8[SDL.keyboardState+1248>>>0]?64:0)|(HEAP8[SDL.keyboardState+1249>>>0]?1:0)|(HEAP8[SDL.keyboardState+1250>>>0]?256:0)|(HEAP8[SDL.keyboardState+1252>>>0]?128:0)|(HEAP8[SDL.keyboardState+1253>>>0]?2:0)|(HEAP8[SDL.keyboardState+1254>>>0]?512:0),t?SDL.keyboardMap[r]=e.keyCode:delete SDL.keyboardMap[r];break}case"mousedown":case"mouseup":e.type=="mousedown"?SDL.buttonState|=1<0;)if(SDL.makeCEvent(SDL.events.shift(),e)!==!1)return 1;return 0}return SDL.events.length>0},makeCEvent(e,t){if(typeof e=="number"){_memcpy(t,e,28),_free(e);return}switch(SDL.handleEvent(e),e.type){case"keydown":case"keyup":{var r=e.type==="keydown",n=SDL.lookupKeyCodeForEvent(e),a;n>=1024?a=n-1024:a=SDL.scanCodes[n]||n,HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[t+8>>>0]=r?1:0,HEAP8[t+9>>>0]=0,HEAP32[t+12>>>2>>>0]=a,HEAP32[t+16>>>2>>>0]=n,HEAP16[t+20>>>1>>>0]=SDL.modState,HEAP32[t+24>>>2>>>0]=e.keypressCharCode||n;break}case"keypress":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type];for(var o=intArrayFromString(String.fromCharCode(e.charCode)),l=0;l>>0]=o[l];break}case"mousedown":case"mouseup":case"mousemove":{if(e.type!="mousemove"){var r=e.type==="mousedown";HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP32[t+8>>>2>>>0]=0,HEAP32[t+12>>>2>>>0]=0,HEAP8[t+16>>>0]=e.button+1,HEAP8[t+17>>>0]=r?1:0,HEAP32[t+20>>>2>>>0]=Browser.mouseX,HEAP32[t+24>>>2>>>0]=Browser.mouseY}else HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP32[t+8>>>2>>>0]=0,HEAP32[t+12>>>2>>>0]=0,HEAP32[t+16>>>2>>>0]=SDL.buttonState,HEAP32[t+20>>>2>>>0]=Browser.mouseX,HEAP32[t+24>>>2>>>0]=Browser.mouseY,HEAP32[t+28>>>2>>>0]=Browser.mouseMovementX,HEAP32[t+32>>>2>>>0]=Browser.mouseMovementY;break}case"wheel":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+16>>>2>>>0]=e.deltaX,HEAP32[t+20>>>2>>>0]=e.deltaY;break}case"touchstart":case"touchend":case"touchmove":{var u=e.touch;if(!Browser.touches[u.identifier])break;var _=Module.canvas.width,d=Module.canvas.height,p=Browser.touches[u.identifier].x/_,f=Browser.touches[u.identifier].y/d,m=Browser.lastTouches[u.identifier].x/_,h=Browser.lastTouches[u.identifier].y/d,g=p-m,b=f-h;if(u.deviceID===void 0&&(u.deviceID=SDL.TOUCH_DEFAULT_ID),g===0&&b===0&&e.type==="touchmove")return!1;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=_SDL_GetTicks(),tempI64=[u.deviceID>>>0,(tempDouble=u.deviceID,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+8>>>2>>>0]=tempI64[0],HEAP32[t+12>>>2>>>0]=tempI64[1],tempI64=[u.identifier>>>0,(tempDouble=u.identifier,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+16>>>2>>>0]=tempI64[0],HEAP32[t+20>>>2>>>0]=tempI64[1],HEAPF32[t+24>>>2>>>0]=p,HEAPF32[t+28>>>2>>>0]=f,HEAPF32[t+32>>>2>>>0]=g,HEAPF32[t+36>>>2>>>0]=b,u.force!==void 0?HEAPF32[t+40>>>2>>>0]=u.force:HEAPF32[t+40>>>2>>>0]=e.type=="touchend"?0:1;break}case"unload":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type];break}case"resize":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=e.w,HEAP32[t+8>>>2>>>0]=e.h;break}case"joystick_button_up":case"joystick_button_down":{var v=e.type==="joystick_button_up"?0:1;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[t+4>>>0]=e.index,HEAP8[t+5>>>0]=e.button,HEAP8[t+6>>>0]=v;break}case"joystick_axis_motion":{HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP8[t+4>>>0]=e.index,HEAP8[t+5>>>0]=e.axis,HEAP32[t+8>>>2>>>0]=SDL.joystickAxisValueConversion(e.value);break}case"focus":{var S=12;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP8[t+8>>>0]=S;break}case"blur":{var L=13;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP8[t+8>>>0]=L;break}case"visibilitychange":{var T=1,A=2,M=e.visible?T:A;HEAP32[t>>>2>>>0]=SDL.DOMEventToSDLEvent[e.type],HEAP32[t+4>>>2>>>0]=0,HEAP8[t+8>>>0]=M;break}default:throw"Unhandled SDL event: "+e.type}},makeFontString(e,t){return t.charAt(0)!="'"&&t.charAt(0)!='"'&&(t='"'+t+'"'),e+"px "+t+", serif"},estimateTextWidth(e,t){var r=e.size,n=SDL.makeFontString(r,e.name),a=SDL.ttfContext;a.font=n;var o=a.measureText(t).width|0;return o},allocateChannels(e){if(!(SDL.numChannels&&SDL.numChannels>=e&&e!=0)){SDL.numChannels=e,SDL.channels=[];for(var t=0;t{e.paused||SDL.playWebAudio(e)});return}e.webAudioNode=SDL.audioContext.createBufferSource(),e.webAudioNode.buffer=t.decodedBuffer,e.webAudioNode.loop=e.loop,e.webAudioNode.onended=e.onended,e.webAudioPannerNode=SDL.audioContext.createPanner(),e.webAudioPannerNode.setPosition(0,0,-.5),e.webAudioPannerNode.panningModel="equalpower",e.webAudioGainNode=SDL.audioContext.createGain(),e.webAudioGainNode.gain.value=e.volume,e.webAudioNode.connect(e.webAudioPannerNode),e.webAudioPannerNode.connect(e.webAudioGainNode),e.webAudioGainNode.connect(SDL.audioContext.destination),e.webAudioNode.start(0,e.currentPosition),e.startTime=SDL.audioContext.currentTime-e.currentPosition}catch(r){err("playWebAudio failed: ".concat(r))}},pauseWebAudio(e){if(e){if(e.webAudioNode)try{e.currentPosition=(SDL.audioContext.currentTime-e.startTime)%e.resource.webAudio.decodedBuffer.duration,e.webAudioNode.onended=void 0,e.webAudioNode.stop(0),e.webAudioNode=void 0}catch(t){err("pauseWebAudio failed: ".concat(t))}e.paused=!0}},openAudioContext(){SDL.audioContext||(typeof AudioContext<"u"?SDL.audioContext=new AudioContext:typeof webkitAudioContext<"u"&&(SDL.audioContext=new webkitAudioContext))},webAudioAvailable:()=>!!SDL.audioContext,fillWebAudioBufferFromHeap(e,t,r){for(var n=SDL.audio,a=n.channels,o=0;o>>1>>>0]/32768;else if(n.format==8)for(var u=0;u>>0];l[u]=(_>=0?_-128:_+128)/128}else if(n.format==33056)for(var u=0;u>>2>>>0];else throw"Invalid SDL audio format "+n.format+"!"}},joystickEventState:1,lastJoystickState:{},joystickNamePool:{},recordJoystickState(e,t){for(var r=new Array(t.buttons.length),n=0;n0},queryJoysticks(){for(var e in SDL.lastJoystickState){var t=SDL.getGamepad(e-1),r=SDL.lastJoystickState[e];if(typeof t>"u"||t===null)return;if(typeof t.timestamp!="number"||t.timestamp!=r.timestamp||!t.timestamp){var n;for(n=0;ne&&e>=0?t[e]:null}};function _SDL_Linked_Version(){return SDL.version===null&&(SDL.version=_malloc(3),HEAP8[SDL.version>>>0]=1,HEAP8[SDL.version+1>>>0]=3,HEAP8[SDL.version+2>>>0]=0),SDL.version}_SDL_Linked_Version.sig="p";var _SDL_Init=e=>{if(SDL.startTime=Date.now(),SDL.initFlags=e,!Module.doNotCaptureKeyboard){var t=Module.keyboardListeningElement||document;t.addEventListener("keydown",SDL.receiveEvent),t.addEventListener("keyup",SDL.receiveEvent),t.addEventListener("keypress",SDL.receiveEvent),window.addEventListener("focus",SDL.receiveEvent),window.addEventListener("blur",SDL.receiveEvent),document.addEventListener("visibilitychange",SDL.receiveEvent)}return window.addEventListener("unload",SDL.receiveEvent),SDL.keyboardState=_calloc(65536,1),SDL.DOMEventToSDLEvent.keydown=768,SDL.DOMEventToSDLEvent.keyup=769,SDL.DOMEventToSDLEvent.keypress=771,SDL.DOMEventToSDLEvent.mousedown=1025,SDL.DOMEventToSDLEvent.mouseup=1026,SDL.DOMEventToSDLEvent.mousemove=1024,SDL.DOMEventToSDLEvent.wheel=1027,SDL.DOMEventToSDLEvent.touchstart=1792,SDL.DOMEventToSDLEvent.touchend=1793,SDL.DOMEventToSDLEvent.touchmove=1794,SDL.DOMEventToSDLEvent.unload=256,SDL.DOMEventToSDLEvent.resize=28673,SDL.DOMEventToSDLEvent.visibilitychange=512,SDL.DOMEventToSDLEvent.focus=512,SDL.DOMEventToSDLEvent.blur=512,SDL.DOMEventToSDLEvent.joystick_axis_motion=1536,SDL.DOMEventToSDLEvent.joystick_button_down=1539,SDL.DOMEventToSDLEvent.joystick_button_up=1540,0};_SDL_Init.sig="ii";var _SDL_WasInit=e=>(SDL.startTime===null&&_SDL_Init(0),1);_SDL_WasInit.sig="ii";function _SDL_GetVideoInfo(){var e=_calloc(20,1);return HEAP32[e+12>>>2>>>0]=Module.canvas.width,HEAP32[e+16>>>2>>>0]=Module.canvas.height,e}_SDL_GetVideoInfo.sig="p";function _SDL_ListModes(e,t){return-1}_SDL_ListModes.sig="ppi";var _SDL_VideoModeOK=(e,t,r,n)=>r;_SDL_VideoModeOK.sig="iiiii";function _SDL_VideoDriverName(e,t){if(e>>>=0,SDL.startTime===null)return 0;var r=[101,109,115,99,114,105,112,116,101,110,95,115,100,108,95,100,114,105,118,101,114],n=0,a=r.length;for(t<=a&&(a=t-1);n>>0]=o,n++}return HEAP8[e+n>>>0]=0,e}_SDL_VideoDriverName.sig="ppi";var _SDL_AudioDriverName=_SDL_VideoDriverName;_SDL_AudioDriverName.sig="ppi";var _SDL_SetVideoMode=function(e,t,r,n){["touchstart","touchend","touchmove","mousedown","mouseup","mousemove","mousewheel","wheel","mouseout","DOMMouseScroll"].forEach(o=>Module.canvas.addEventListener(o,SDL.receiveEvent,!0));var a=Module.canvas;return e==0&&t==0&&(e=a.width,t=a.height),SDL.addedResizeListener||(SDL.addedResizeListener=!0,Browser.resizeListeners.push((o,l)=>{SDL.settingVideoMode||SDL.receiveEvent({type:"resize",w:o,h:l})})),SDL.settingVideoMode=!0,Browser.setCanvasSize(e,t),SDL.settingVideoMode=!1,SDL.screen&&(SDL.freeSurface(SDL.screen),assert(!SDL.screen)),SDL.GL&&(n=n|67108864),SDL.screen=SDL.makeSurface(e,t,n,!0,"screen"),SDL.screen};_SDL_SetVideoMode.sig="piiii";function _SDL_GetVideoSurface(){return SDL.screen}_SDL_GetVideoSurface.sig="p";var _SDL_AudioQuit=()=>{for(var e=0;eout("SDL_VideoQuit called (and ignored)");_SDL_VideoQuit.sig="v";var _SDL_QuitSubSystem=e=>out("SDL_QuitSubSystem called (and ignored)");_SDL_QuitSubSystem.sig="vi";var _SDL_Quit=()=>{_SDL_AudioQuit(),out("SDL_Quit called (and ignored)")};_SDL_Quit.sig="v";function _SDL_UnlockSurface(e){e>>>=0,assert(!SDL.GL);var t=SDL.surfaces[e];if(!(!t.locked||--t.locked>0)){if(t.isFlagSet(2097152))SDL.copyIndexedColorData(t);else if(t.colors)for(var r=Module.canvas.width,n=Module.canvas.height,a=t.buffer,o=t.image.data,l=t.colors,u=0;u>>0]*4,f=_+d*4;o[f]=l[p],o[f+1]=l[p+1],o[f+2]=l[p+2]}a+=r*3}else{var o=t.image.data,m=t.buffer;assert(m%4==0,"Invalid buffer offset: "+m);var h=m>>>2,g=0,b=e==SDL.screen,v;if(typeof CanvasPixelArray<"u"&&o instanceof CanvasPixelArray)for(v=o.length;g>>0];o[g]=p&255,o[g+1]=p>>8&255,o[g+2]=p>>16&255,o[g+3]=b?255:p>>24&255,h++,g+=4}else{var S=new Uint32Array(o.buffer);if(b&&SDL.defaults.opaqueFrontBuffer){v=S.length,S.set(HEAP32.subarray(h>>>0,h+v>>>0));var L=new Uint8Array(o.buffer),T=3,A=T+4*v;if(v%8==0)for(;T>>0,h+S.length>>>0))}}t.ctx.putImageData(t.image,0,0)}}_SDL_UnlockSurface.sig="vp";function _SDL_Flip(e){}_SDL_Flip.sig="ip";function _SDL_UpdateRect(e,t,r,n,a){}_SDL_UpdateRect.sig="vpiiii";function _SDL_UpdateRects(e,t,r){}_SDL_UpdateRects.sig="vpip";var _SDL_Delay=e=>{ENVIRONMENT_IS_WORKER||abort("SDL_Delay called on the main thread! Potential infinite loop, quitting. (consider building with async support like ASYNCIFY)")};_SDL_Delay.sig="vi";function _SDL_WM_SetCaption(e,t){e>>>=0,t>>>=0,e&&_emscripten_set_window_title(e),t&&(t=UTF8ToString(t))}_SDL_WM_SetCaption.sig="vpp";var _SDL_EnableKeyRepeat=(e,t)=>{};_SDL_EnableKeyRepeat.sig="iii";function _SDL_GetKeyboardState(e){return e>>>=0,e&&(HEAP32[e>>>2>>>0]=65536),SDL.keyboardState}_SDL_GetKeyboardState.sig="pp";var _SDL_GetKeyState=()=>_SDL_GetKeyboardState(0);function _SDL_GetKeyName(e){return SDL.keyName||(SDL.keyName=stringToNewUTF8("unknown key")),SDL.keyName}_SDL_GetKeyName.sig="pi";var _SDL_GetModState=()=>SDL.modState;_SDL_GetModState.sig="i";function _SDL_GetMouseState(e,t){return e>>>=0,t>>>=0,e&&(HEAP32[e>>>2>>>0]=Browser.mouseX),t&&(HEAP32[t>>>2>>>0]=Browser.mouseY),SDL.buttonState}_SDL_GetMouseState.sig="ipp";var _SDL_WarpMouse=(e,t)=>{};_SDL_WarpMouse.sig="vii";var _SDL_ShowCursor=e=>{switch(e){case 0:return Browser.isFullscreen?(Module.canvas.requestPointerLock(),0):1;case 1:return Module.canvas.exitPointerLock(),1;case-1:return!Browser.pointerLock;default:err("SDL_ShowCursor called with unknown toggle parameter value: ".concat(e));break}};_SDL_ShowCursor.sig="ii";function _SDL_GetError(){return SDL.errorMessage||(SDL.errorMessage=stringToNewUTF8("unknown SDL-emscripten error")),SDL.errorMessage}_SDL_GetError.sig="p";function _SDL_SetError(e,t){}_SDL_SetError.sig="vpp";function _SDL_CreateRGBSurface(e,t,r,n,a,o,l,u){return SDL.makeSurface(t,r,e,!1,"CreateRGBSurface",a,o,l,u)}_SDL_CreateRGBSurface.sig="piiiiiiii";function _SDL_CreateRGBSurfaceFrom(e,t,r,n,a,o,l,u,_){e>>>=0;var d=SDL.makeSurface(t,r,0,!1,"CreateRGBSurfaceFrom",o,l,u,_);if(n!==32)return err("TODO: Partially unimplemented SDL_CreateRGBSurfaceFrom called!"),d;for(var p=SDL.surfaces[d],f=p.ctx.createImageData(t,r),m=t*4,h=0;h>>0];return p.ctx.putImageData(f,0,0),d}_SDL_CreateRGBSurfaceFrom.sig="ppiiiiiiii";function _SDL_ConvertSurface(e,t,r){e>>>=0;var n=SDL.surfaces[e],a=SDL.makeSurface(n.width,n.height,n.flags,!1,"copy:"+n.source),o=SDL.surfaces[a];return o.ctx.globalCompositeOperation="copy",o.ctx.drawImage(n.canvas,0,0),o.ctx.globalCompositeOperation=n.ctx.globalCompositeOperation,a}_SDL_ConvertSurface.sig="pppi";function _SDL_DisplayFormatAlpha(e){return e>>>=0,_SDL_ConvertSurface(e)}_SDL_DisplayFormatAlpha.sig="pp";function _SDL_FreeSurface(e){e>>>=0,e&&SDL.freeSurface(e)}_SDL_FreeSurface.sig="vp";function _SDL_UpperBlit(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,SDL.blitSurface(e,t,r,n,!1)}_SDL_UpperBlit.sig="ipppp";function _SDL_UpperBlitScaled(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,SDL.blitSurface(e,t,r,n,!0)}_SDL_UpperBlitScaled.sig="ipppp";var _SDL_LowerBlit=_SDL_UpperBlit;_SDL_LowerBlit.sig="ipppp";var _SDL_LowerBlitScaled=_SDL_UpperBlitScaled;_SDL_LowerBlitScaled.sig="ipppp";function _SDL_GetClipRect(e,t){e>>>=0,t>>>=0,assert(t);var r=SDL.surfaces[e],n=r.clipRect||{x:0,y:0,w:r.width,h:r.height};SDL.updateRect(t,n)}_SDL_GetClipRect.sig="vpp";function _SDL_SetClipRect(e,t){e>>>=0,t>>>=0;var r=SDL.surfaces[e];t?r.clipRect=SDL.intersectionOfRects({x:0,y:0,w:r.width,h:r.height},SDL.loadRect(t)):delete r.clipRect}_SDL_SetClipRect.sig="ipp";function _SDL_FillRect(e,t,r){e>>>=0,t>>>=0;var n=SDL.surfaces[e];assert(!n.locked),n.isFlagSet(2097152)&&(r=n.colors32[r]);var a=t?SDL.loadRect(t):{x:0,y:0,w:n.width,h:n.height};return n.clipRect&&(a=SDL.intersectionOfRects(n.clipRect,a),t&&SDL.updateRect(t,a)),n.ctx.save(),n.ctx.fillStyle=SDL.translateColorToCSSRGBA(r),n.ctx.fillRect(a.x,a.y,a.w,a.h),n.ctx.restore(),0}_SDL_FillRect.sig="ippi";function _zoomSurface(e,t,r,n){e>>>=0;var a=SDL.surfaces[e],o=a.width*t,l=a.height*r,u=SDL.makeSurface(Math.abs(o),Math.abs(l),a.flags,!1,"zoomSurface"),_=SDL.surfaces[u];return t>=0&&r>=0?_.ctx.drawImage(a.canvas,0,0,o,l):(_.ctx.save(),_.ctx.scale(t<0?-1:1,r<0?-1:1),_.ctx.drawImage(a.canvas,o<0?o:0,l<0?l:0,Math.abs(o),Math.abs(l)),_.ctx.restore()),u}_zoomSurface.sig="ppddi";function _rotozoomSurface(e,t,r,n){if(e>>>=0,t%360===0)return _zoomSurface(e,r,r);var a=SDL.surfaces[e],o=a.width*r,l=a.height*r,u=Math.ceil(Math.sqrt(Math.pow(o,2)+Math.pow(l,2))),_=SDL.makeSurface(u,u,a.flags,!1,"rotozoomSurface"),d=SDL.surfaces[_];return d.ctx.translate(u/2,u/2),d.ctx.rotate(-t*Math.PI/180),d.ctx.drawImage(a.canvas,-o/2,-l/2,o,l),_}_rotozoomSurface.sig="ppddi";function _SDL_SetAlpha(e,t,r){e>>>=0;var n=SDL.surfaces[e];n.alpha=r,t&65536||(n.alpha=255)}_SDL_SetAlpha.sig="ipii";function _SDL_SetColorKey(e,t,r){return warnOnce("SDL_SetColorKey is a no-op for performance reasons"),0}_SDL_SetColorKey.sig="ipii";function _SDL_PollEvent(e){return e>>>=0,SDL.pollEvent(e)}_SDL_PollEvent.sig="ip";function _SDL_PushEvent(e){e>>>=0;var t=_malloc(28);return _memcpy(t,e,28),SDL.events.push(t),0}_SDL_PushEvent.sig="ip";function _SDL_PeepEvents(e,t,r,n,a){switch(e>>>=0,r){case 2:{assert(t==1);for(var o=0,l=0;oSDL.events.forEach(SDL.handleEvent);_SDL_PumpEvents.sig="v";function _emscripten_SDL_SetEventHandler(e,t){e>>>=0,t>>>=0,SDL.eventHandler=e,SDL.eventHandlerContext=t,SDL.eventHandlerTemp||(SDL.eventHandlerTemp=_malloc(28))}_emscripten_SDL_SetEventHandler.sig="vpp";function _SDL_SetColors(e,t,r,n){e>>>=0,t>>>=0;var a=SDL.surfaces[e];if(!a.colors){var o=new ArrayBuffer(1024);a.colors=new Uint8Array(o),a.colors32=new Uint32Array(o)}for(var l=0;l>>0],a.colors[u+1]=HEAPU8[t+(l*4+1)>>>0],a.colors[u+2]=HEAPU8[t+(l*4+2)>>>0],a.colors[u+3]=255}return 1}_SDL_SetColors.sig="ippii";function _SDL_SetPalette(e,t,r,n,a){return e>>>=0,r>>>=0,_SDL_SetColors(e,r,n,a)}_SDL_SetPalette.sig="ipipii";function _SDL_MapRGB(e,t,r,n){return t&255|(r&255)<<8|(n&255)<<16|4278190080}_SDL_MapRGB.sig="ipiii";function _SDL_MapRGBA(e,t,r,n,a){return t&255|(r&255)<<8|(n&255)<<16|(a&255)<<24}_SDL_MapRGBA.sig="ipiiii";function _SDL_GetRGB(e,t,r,n,a){r>>>=0,n>>>=0,a>>>=0,r&&(HEAP8[r>>>0]=e&255),n&&(HEAP8[n>>>0]=e>>8&255),a&&(HEAP8[a>>>0]=e>>16&255)}_SDL_GetRGB.sig="vipppp";function _SDL_GetRGBA(e,t,r,n,a,o){r>>>=0,n>>>=0,a>>>=0,o>>>=0,r&&(HEAP8[r>>>0]=e&255),n&&(HEAP8[n>>>0]=e>>8&255),a&&(HEAP8[a>>>0]=e>>16&255),o&&(HEAP8[o>>>0]=e>>24&255)}_SDL_GetRGBA.sig="vippppp";var _SDL_GetAppState=()=>{var e=0;return Browser.pointerLock&&(e|=1),document.hasFocus()&&(e|=2),e|=4,e};_SDL_GetAppState.sig="i";var _SDL_WM_GrabInput=()=>{};_SDL_WM_GrabInput.sig="ii";function _SDL_WM_ToggleFullScreen(e){return Browser.exitFullscreen()?1:SDL.canRequestFullscreen?(SDL.isRequestingFullscreen=!0,1):0}_SDL_WM_ToggleFullScreen.sig="ip";var _IMG_Init=e=>e;_IMG_Init.sig="ii";function _SDL_FreeRW(e){for(e>>>=0,SDL.rwops[e]=null;SDL.rwops.length>0&&SDL.rwops[SDL.rwops.length-1]===null;)SDL.rwops.pop()}_SDL_FreeRW.sig="vp";var _IMG_Load_RW=function(e,t){e>>>=0;var r=stackSave();try{var n=()=>{stackRestore(r),l&&t&&_SDL_FreeRW(e)},a=A=>{var M=n;n=()=>{M(),A()}},o=(A,M)=>{var X=stackAlloc(4),x=stackAlloc(4),w=stackAlloc(4),E=Module["_"+A](...M,X,x,w,0);return E?(a(()=>Module._stbi_image_free(E)),{rawData:!0,data:E,width:HEAP32[X>>>2>>>0],height:HEAP32[x>>>2>>>0],size:HEAP32[X>>>2>>>0]*HEAP32[x>>>2>>>0]*HEAP32[w>>>2>>>0],bpp:HEAP32[w>>>2>>>0]}):null},l=SDL.rwops[e];if(l===void 0)return 0;var u,_=l.filename;if(_===void 0)return warnOnce("Only file names that have been preloaded are supported for IMG_Load_RW. Consider using STB_IMAGE=1 if you want synchronous image decoding (see settings.js), or package files with --use-preload-plugins"),0;if(!u)if(_=PATH_FS.resolve(_),u=preloadedImages[_],u)Module.freePreloadedMediaOnUse&&(preloadedImages[_]=null);else return u===null&&err("Trying to reuse preloaded image, but freePreloadedMediaOnUse is set!"),warnOnce("Cannot find preloaded image "+_),warnOnce("Cannot find preloaded image "+_+". Consider using STB_IMAGE=1 if you want synchronous image decoding (see settings.js), or package files with --use-preload-plugins"),0;var d=SDL.makeSurface(u.width,u.height,0,!1,"load:"+_),p=SDL.surfaces[d];if(p.ctx.globalCompositeOperation="copy",!u.rawData)p.ctx.drawImage(u,0,0,u.width,u.height,0,0,u.width,u.height);else{var f=p.ctx.getImageData(0,0,p.width,p.height);if(u.bpp==4)f.data.set(HEAPU8.subarray(u.data>>>0,u.data+u.size>>>0));else if(u.bpp==3)for(var m=u.size/3,h=f.data,g=u.data,b=0,v=0;v>>0],h[b++]=HEAPU8[g++>>>0],h[b++]=HEAPU8[g++>>>0],h[b++]=255;else if(u.bpp==2)for(var m=u.size,h=f.data,g=u.data,b=0,v=0;v>>0],L=HEAPU8[g++>>>0];h[b++]=S,h[b++]=S,h[b++]=S,h[b++]=L}else if(u.bpp==1)for(var m=u.size,h=f.data,g=u.data,b=0,v=0;v>>0];h[b++]=T,h[b++]=T,h[b++]=T,h[b++]=255}else return err("cannot handle bpp ".concat(u.bpp)),0;p.ctx.putImageData(f,0,0)}return p.ctx.globalCompositeOperation="source-over",_SDL_LockSurface(d),p.locked--,SDL.GL&&(p.canvas=p.ctx=null),d}finally{n()}};_IMG_Load_RW.sig="ppi";var _SDL_LoadBMP_RW=_IMG_Load_RW;_SDL_LoadBMP_RW.sig="ppi";function _SDL_RWFromFile(e,t){e>>>=0;var r=SDL.rwops.length,n=UTF8ToString(e);return SDL.rwops.push({filename:n,mimetype:Browser.getMimetype(n)}),r}_SDL_RWFromFile.sig="ppp";function _IMG_Load(e){e>>>=0;var t=_SDL_RWFromFile(e),r=_IMG_Load_RW(t,1);return r}_IMG_Load.sig="pp";var _IMG_Quit=()=>out("IMG_Quit called (and ignored)");_IMG_Quit.sig="v";function _SDL_OpenAudio(e,t){e>>>=0,t>>>=0;try{if(SDL.audio={freq:HEAPU32[e>>>2>>>0],format:HEAPU16[e+4>>>1>>>0],channels:HEAPU8[e+6>>>0],samples:HEAPU16[e+8>>>1>>>0],callback:HEAPU32[e+16>>>2>>>0],userdata:HEAPU32[e+20>>>2>>>0],paused:!0,timer:null},SDL.audio.format==8)SDL.audio.silence=128;else if(SDL.audio.format==32784)SDL.audio.silence=0;else if(SDL.audio.format==33056)SDL.audio.silence=0;else throw"Invalid SDL audio format "+SDL.audio.format+"!";if(SDL.audio.freq<=0)throw"Unsupported sound frequency "+SDL.audio.freq+"!";if(SDL.audio.freq<=22050)SDL.audio.freq=22050;else if(SDL.audio.freq<=32e3)SDL.audio.freq=32e3;else if(SDL.audio.freq<=44100)SDL.audio.freq=44100;else if(SDL.audio.freq<=48e3)SDL.audio.freq=48e3;else if(SDL.audio.freq<=96e3)SDL.audio.freq=96e3;else throw"Unsupported sound frequency ".concat(SDL.audio.freq,"!");if(SDL.audio.channels==0)SDL.audio.channels=1;else{if(SDL.audio.channels<0||SDL.audio.channels>32)throw"Unsupported number of audio channels for SDL audio: ".concat(SDL.audio.channels,"!");SDL.audio.channels!=1&&SDL.audio.channels!=2&&out("Warning: Using untested number of audio channels ".concat(SDL.audio.channels))}if(SDL.audio.samples<128||SDL.audio.samples>524288)throw"Unsupported audio callback buffer size ".concat(SDL.audio.samples,"!");if(SDL.audio.samples&SDL.audio.samples-1)throw"Audio callback buffer size ".concat(SDL.audio.samples," must be a power-of-two!");var r=SDL.audio.samples*SDL.audio.channels;if(SDL.audio.format==8)SDL.audio.bytesPerSample=1;else if(SDL.audio.format==32784)SDL.audio.bytesPerSample=2;else if(SDL.audio.format==33056)SDL.audio.bytesPerSample=4;else throw"Invalid SDL audio format ".concat(SDL.audio.format,"!");if(SDL.audio.bufferSize=r*SDL.audio.bytesPerSample,SDL.audio.bufferDurationSecs=SDL.audio.bufferSize/SDL.audio.bytesPerSample/SDL.audio.channels/SDL.audio.freq,SDL.audio.bufferingDelay=.05,SDL.audio.buffer=_malloc(SDL.audio.bufferSize),SDL.audio.numSimultaneouslyQueuedBuffers=Module.SDL_numSimultaneouslyQueuedBuffers||5,SDL.audio.queueNewAudioData=()=>{if(SDL.audio)for(var n=0;n=SDL.audio.bufferingDelay+SDL.audio.bufferDurationSecs*SDL.audio.numSimultaneouslyQueuedBuffers)return;getWasmTableEntry(SDL.audio.callback)(SDL.audio.userdata,SDL.audio.buffer,SDL.audio.bufferSize),SDL.audio.pushAudio(SDL.audio.buffer,SDL.audio.bufferSize)}},SDL.audio.caller=()=>{if(SDL.audio){--SDL.audio.numAudioTimersPending,SDL.audio.queueNewAudioData();var n=SDL.audio.nextPlayTime-SDL.audioContext.currentTime,a=SDL.audio.bufferDurationSecs/2;SDL.audio.numAudioTimersPending{try{if(SDL.audio.paused)return;var o=a/SDL.audio.bytesPerSample,l=o/SDL.audio.channels;if(l!=SDL.audio.samples)throw"Received mismatching audio buffer size!";var u=SDL.audioContext.createBufferSource(),_=SDL.audioContext.createBuffer(SDL.audio.channels,l,SDL.audio.freq);u.connect(SDL.audioContext.destination),SDL.fillWebAudioBufferFromHeap(n,l,_),u.buffer=_;var d=SDL.audioContext.currentTime,p=Math.max(d+SDL.audio.bufferingDelay,SDL.audio.nextPlayTime);typeof u.start<"u"?u.start(p):typeof u.noteOn<"u"&&u.noteOn(p),SDL.audio.nextPlayTime=p+SDL.audio.bufferDurationSecs}catch(f){err("Web Audio API error playing back audio: ".concat(f.toString()))}},t&&(HEAP32[t>>>2>>>0]=SDL.audio.freq,HEAP16[t+4>>>1>>>0]=SDL.audio.format,HEAP8[t+6>>>0]=SDL.audio.channels,HEAP8[t+7>>>0]=SDL.audio.silence,HEAP16[t+8>>>1>>>0]=SDL.audio.samples,HEAPU32[t+16>>>2>>>0]=SDL.audio.callback,HEAPU32[t+20>>>2>>>0]=SDL.audio.userdata),SDL.allocateChannels(32)}catch(n){err('Initializing SDL audio threw an exception: "'.concat(n.toString(),'"! Continuing without audio')),SDL.audio=null,SDL.allocateChannels(0),t&&(HEAP32[t>>>2>>>0]=0,HEAP16[t+4>>>1>>>0]=0,HEAP8[t+6>>>0]=0,HEAP8[t+7>>>0]=0,HEAP16[t+8>>>1>>>0]=0,HEAPU32[t+16>>>2>>>0]=0,HEAPU32[t+20>>>2>>>0]=0)}return SDL.audio?0:-1}_SDL_OpenAudio.sig="ipp";var _SDL_PauseAudio=e=>{SDL.audio&&(e?SDL.audio.timer!==void 0&&(clearTimeout(SDL.audio.timer),SDL.audio.numAudioTimersPending=0,SDL.audio.timer=void 0):SDL.audio.timer||(SDL.audio.numAudioTimersPending=1,SDL.audio.timer=safeSetTimeout(SDL.audio.caller,1)),SDL.audio.paused=e)};_SDL_PauseAudio.sig="vi";var _SDL_CloseAudio=()=>{SDL.audio&&(SDL.audio.callbackRemover&&(SDL.audio.callbackRemover(),SDL.audio.callbackRemover=null),_SDL_PauseAudio(1),_free(SDL.audio.buffer),SDL.audio=null,SDL.allocateChannels(0))};_SDL_CloseAudio.sig="v";var _SDL_LockAudio=()=>{};_SDL_LockAudio.sig="v";var _SDL_UnlockAudio=()=>{};_SDL_UnlockAudio.sig="v";function _SDL_CreateMutex(){return 0}_SDL_CreateMutex.sig="p";function _SDL_mutexP(e){return 0}_SDL_mutexP.sig="ip";function _SDL_mutexV(e){return 0}_SDL_mutexV.sig="ip";function _SDL_DestroyMutex(e){}_SDL_DestroyMutex.sig="vp";function _SDL_CreateCond(){return 0}_SDL_CreateCond.sig="p";function _SDL_CondSignal(e){}_SDL_CondSignal.sig="ip";function _SDL_CondWait(e,t){}_SDL_CondWait.sig="ipp";function _SDL_DestroyCond(e){}_SDL_DestroyCond.sig="vp";var _SDL_StartTextInput=()=>{SDL.textInput=!0};_SDL_StartTextInput.sig="v";var _SDL_StopTextInput=()=>{SDL.textInput=!1};_SDL_StopTextInput.sig="v";var _Mix_Init=e=>e?8:0;_Mix_Init.sig="ii";var _Mix_Quit=()=>{};_Mix_Quit.sig="v";var _Mix_OpenAudio=(e,t,r,n)=>(SDL.openAudioContext(),autoResumeAudioContext(SDL.audioContext),SDL.allocateChannels(32),SDL.mixerFrequency=e,SDL.mixerFormat=t,SDL.mixerNumChannels=r,SDL.mixerChunkSize=n,0);_Mix_OpenAudio.sig="iiiii";var _Mix_CloseAudio=_SDL_CloseAudio;_Mix_CloseAudio.sig="v";var _Mix_AllocateChannels=e=>(SDL.allocateChannels(e),e);_Mix_AllocateChannels.sig="ii";function _Mix_ChannelFinished(e){e>>>=0,SDL.channelFinished=e}_Mix_ChannelFinished.sig="vp";var _Mix_Volume=(e,t)=>{if(e==-1){for(var r=0;r(t/=255,r/=255,SDL.setPannerPosition(SDL.channels[e],r-t,0,.1),1);_Mix_SetPanning.sig="iiii";function _Mix_LoadWAV_RW(e,t){e>>>=0;var r=SDL.rwops[e];if(r===void 0)return 0;var n="",a,o,l;if(r.filename!==void 0){n=PATH_FS.resolve(r.filename);var u=preloadedAudios[n];if(!u){u===null&&err("Trying to reuse preloaded audio, but freePreloadedMediaOnUse is set!"),Module.noAudioDecoding||warnOnce("Cannot find preloaded audio "+n);try{l=FS.readFile(n)}catch{return err("Couldn't find file for: ".concat(n)),0}}Module.freePreloadedMediaOnUse&&(preloadedAudios[n]=null),a=u}else if(r.bytes!==void 0)SDL.webAudioAvailable()?l=HEAPU8.buffer.slice(r.bytes,r.bytes+r.count):l=HEAPU8.subarray(r.bytes>>>0,r.bytes+r.count>>>0);else return 0;var _=l&&(l.buffer||l),d=Module.SDL_canPlayWithWebAudio===void 0||Module.SDL_canPlayWithWebAudio(n,_);if(l!==void 0&&SDL.webAudioAvailable()&&d){a=void 0,o={},o.onDecodeComplete=[];var p=g=>{o.decodedBuffer=g,o.onDecodeComplete.forEach(b=>b()),o.onDecodeComplete=void 0};SDL.audioContext.decodeAudioData(_,p)}else if(a===void 0&&l){var f=new Blob([l],{type:r.mimetype}),m=URL.createObjectURL(f);a=new Audio,a.src=m,a.mozAudioChannelType="content"}var h=SDL.audios.length;return SDL.audios.push({source:n,audio:a,webAudio:o}),h}_Mix_LoadWAV_RW.sig="ppi";function _Mix_LoadWAV(e){e>>>=0;var t=_SDL_RWFromFile(e),r=_Mix_LoadWAV_RW(t);return _SDL_FreeRW(t),r}_Mix_LoadWAV.sig="pp";function _Mix_QuickLoad_RAW(e,t){e>>>=0;for(var r,n,a=t>>1,o=new Float32Array(a),l=0;l>>1>>>0]/32768;SDL.webAudioAvailable()?(n={},n.decodedBuffer=o):(r=new Audio,r.mozAudioChannelType="content",r.numChannels=SDL.mixerNumChannels,r.frequency=SDL.mixerFrequency);var u=SDL.audios.length;return SDL.audios.push({source:"",audio:r,webAudio:n,buffer:o}),u}_Mix_QuickLoad_RAW.sig="ppi";function _Mix_FreeChunk(e){e>>>=0,SDL.audios[e]=null}_Mix_FreeChunk.sig="vp";var _Mix_ReserveChannels=e=>{SDL.channelMinimumNumber=e};_Mix_ReserveChannels.sig="ii";function _Mix_PlayChannelTimed(e,t,r,n){t>>>=0,assert(n==-1);var a=SDL.audios[t];if(!a||!a.audio&&!a.webAudio)return-1;if(e==-1){for(var o=SDL.channelMinimumNumber;o0;_Mix_FadingChannel.sig="ii";var _Mix_HaltChannel=e=>{function t(n){var a=SDL.channels[n];a.audio&&(a.audio.pause(),a.audio=null),SDL.channelFinished&&getWasmTableEntry(SDL.channelFinished)(n)}if(e!=-1)t(e);else for(var r=0;r{var e=SDL.music.audio;return e&&(e.src=e.src,e.currentPosition=0,e.pause()),SDL.music.audio=null,SDL.hookMusicFinished&&getWasmTableEntry(SDL.hookMusicFinished)(),0};_Mix_HaltMusic.sig="i";function _Mix_HookMusicFinished(e){e>>>=0,SDL.hookMusicFinished=e,SDL.music.audio&&(SDL.music.audio.onended=_Mix_HaltMusic)}_Mix_HookMusicFinished.sig="vp";var _Mix_VolumeMusic=e=>SDL.setGetVolume(SDL.music,e);_Mix_VolumeMusic.sig="ii";function _Mix_LoadMUS_RW(e){return e>>>=0,_Mix_LoadWAV_RW(e)}_Mix_LoadMUS_RW.sig="pp";function _Mix_LoadMUS(e){e>>>=0;var t=_SDL_RWFromFile(e),r=_Mix_LoadMUS_RW(t);return _SDL_FreeRW(t),r}_Mix_LoadMUS.sig="pp";var _Mix_FreeMusic=_Mix_FreeChunk;_Mix_FreeMusic.sig="vp";function _Mix_PlayMusic(e,t){e>>>=0,SDL.music.audio&&(SDL.music.audio.paused||err("Music is already playing. ".concat(SDL.music.source)),SDL.music.audio.pause());var r=SDL.audios[e],n;return r.webAudio?(n={},n.resource=r,n.paused=!1,n.currentPosition=0,n.play=function(){SDL.playWebAudio(this)},n.pause=function(){SDL.pauseWebAudio(this)}):r.audio&&(n=r.audio),n.onended=function(){SDL.music.audio==this&&_Mix_HaltMusic()},n.loop=t!=0&&t!=1,n.volume=SDL.music.volume,SDL.music.audio=n,n.play(),0}_Mix_PlayMusic.sig="ipi";var _Mix_PauseMusic=()=>{var e=SDL.music.audio;e==null||e.pause()};_Mix_PauseMusic.sig="v";var _Mix_ResumeMusic=()=>{var e=SDL.music.audio;e==null||e.play()};_Mix_ResumeMusic.sig="v";var _Mix_FadeInMusicPos=_Mix_PlayMusic;_Mix_FadeInMusicPos.sig="ipiid";var _Mix_FadeOutMusic=_Mix_HaltMusic;_Mix_FadeOutMusic.sig="ii";var _Mix_PlayingMusic=()=>SDL.music.audio&&!SDL.music.audio.paused?1:0;_Mix_PlayingMusic.sig="i";var _Mix_Playing=e=>{if(e===-1){for(var t=0,r=0;r{if(e===-1){for(var t=0;t{var t;if(e===-1){for(var r=0,n=0;n{var e;return(e=SDL.music.audio)!=null&&e.paused?1:0};_Mix_PausedMusic.sig="i";var _Mix_Resume=e=>{if(e===-1){for(var t=0;t{try{var e=new OffscreenCanvas(0,0);if(SDL.ttfContext=e.getContext("2d"),typeof SDL.ttfContext.measureText!="function")throw"bad context"}catch{var t=document.createElement("canvas");SDL.ttfContext=t.getContext("2d")}return 0};_TTF_Init.sig="i";function _TTF_OpenFont(e,t){e>>>=0,e=PATH.normalize(UTF8ToString(e));var r=SDL.fonts.length;return SDL.fonts.push({name:e,size:t}),r}_TTF_OpenFont.sig="ppi";function _TTF_CloseFont(e){e>>>=0,SDL.fonts[e]=null}_TTF_CloseFont.sig="vp";function _TTF_RenderText_Solid(e,t,r){e>>>=0,t>>>=0,r>>>=0,t=UTF8ToString(t)||" ";var n=SDL.fonts[e],a=SDL.estimateTextWidth(n,t),o=n.size;r=SDL.loadColorToCSSRGB(r);var l=SDL.makeFontString(o,n.name),u=SDL.makeSurface(a,o,0,!1,"text:"+t),_=SDL.surfaces[u];return _.ctx.save(),_.ctx.fillStyle=r,_.ctx.font=l,_.ctx.textBaseline="bottom",_.ctx.fillText(t,0,o|0),_.ctx.restore(),u}_TTF_RenderText_Solid.sig="pppp";var _TTF_RenderText_Blended=_TTF_RenderText_Solid;_TTF_RenderText_Blended.sig="pppp";var _TTF_RenderText_Shaded=_TTF_RenderText_Solid;_TTF_RenderText_Shaded.sig="ppppp";var _TTF_RenderUTF8_Solid=_TTF_RenderText_Solid;_TTF_RenderUTF8_Solid.sig="pppp";function _TTF_SizeText(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var a=SDL.fonts[e];return r&&(HEAP32[r>>>2>>>0]=SDL.estimateTextWidth(a,UTF8ToString(t))),n&&(HEAP32[n>>>2>>>0]=a.size),0}_TTF_SizeText.sig="ipppp";var _TTF_SizeUTF8=_TTF_SizeText;_TTF_SizeUTF8.sig="ipppp";function _TTF_GlyphMetrics(e,t,r,n,a,o,l){e>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,l>>>=0;var u=SDL.fonts[e],_=SDL.estimateTextWidth(u,String.fromCharCode(t));l&&(HEAP32[l>>>2>>>0]=_),r&&(HEAP32[r>>>2>>>0]=0),n&&(HEAP32[n>>>2>>>0]=_),a&&(HEAP32[a>>>2>>>0]=0),o&&(HEAP32[o>>>2>>>0]=u.size)}_TTF_GlyphMetrics.sig="ipippppp";function _TTF_FontAscent(e){e>>>=0;var t=SDL.fonts[e];return t.size*.98|0}_TTF_FontAscent.sig="ip";function _TTF_FontDescent(e){e>>>=0;var t=SDL.fonts[e];return t.size*.02|0}_TTF_FontDescent.sig="ip";function _TTF_FontHeight(e){e>>>=0;var t=SDL.fonts[e];return t.size}_TTF_FontHeight.sig="ip";var _TTF_FontLineSkip=_TTF_FontHeight;_TTF_FontLineSkip.sig="ip";var _TTF_Quit=()=>out("TTF_Quit called (and ignored)");_TTF_Quit.sig="v";var SDL_gfx={drawRectangle:(e,t,r,n,a,o,l)=>{t=t<<16>>16,r=r<<16>>16,n=n<<16>>16,a=a<<16>>16;var u=SDL.surfaces[e];assert(!u.locked);var _=t{t=t<<16>>16,r=r<<16>>16,n=n<<16>>16,a=a<<16>>16;var l=SDL.surfaces[e];assert(!l.locked),l.ctx.save(),l.ctx.strokeStyle=o,l.ctx.beginPath(),l.ctx.moveTo(t,r),l.ctx.lineTo(n,a),l.ctx.stroke(),l.ctx.restore()},drawEllipse:(e,t,r,n,a,o,l)=>{t=t<<16>>16,r=r<<16>>16,n=n<<16>>16,a=a<<16>>16;var u=SDL.surfaces[e];assert(!u.locked),u.ctx.save(),u.ctx.beginPath(),u.ctx.translate(t,r),u.ctx.scale(n,a),u.ctx.arc(0,0,1,0,2*Math.PI),u.ctx.restore(),u.ctx.save(),u.ctx[o+"Style"]=l,u.ctx[o](),u.ctx.restore()},translateColorToCSSRGBA:e=>"rgba(".concat(e>>>24,",").concat(e>>16&255,",").concat(e>>8&255,",").concat(e&255,")")};function _boxColor(e,t,r,n,a,o){return e>>>=0,SDL_gfx.drawRectangle(e,t,r,n,a,"fill",SDL_gfx.translateColorToCSSRGBA(o))}_boxColor.sig="ipiiiii";function _boxRGBA(e,t,r,n,a,o,l,u,_){return e>>>=0,SDL_gfx.drawRectangle(e,t,r,n,a,"fill",SDL.translateRGBAToCSSRGBA(o,l,u,_))}_boxRGBA.sig="ipiiiiiiii";function _rectangleColor(e,t,r,n,a,o){return e>>>=0,SDL_gfx.drawRectangle(e,t,r,n,a,"stroke",SDL_gfx.translateColorToCSSRGBA(o))}_rectangleColor.sig="ipiiiii";function _rectangleRGBA(e,t,r,n,a,o,l,u,_){return e>>>=0,SDL_gfx.drawRectangle(e,t,r,n,a,"stroke",SDL.translateRGBAToCSSRGBA(o,l,u,_))}_rectangleRGBA.sig="ipiiiiiiii";function _ellipseColor(e,t,r,n,a,o){return e>>>=0,SDL_gfx.drawEllipse(e,t,r,n,a,"stroke",SDL_gfx.translateColorToCSSRGBA(o))}_ellipseColor.sig="ipiiiii";function _ellipseRGBA(e,t,r,n,a,o,l,u,_){return e>>>=0,SDL_gfx.drawEllipse(e,t,r,n,a,"stroke",SDL.translateRGBAToCSSRGBA(o,l,u,_))}_ellipseRGBA.sig="ipiiiiiiii";function _filledEllipseColor(e,t,r,n,a,o){return e>>>=0,SDL_gfx.drawEllipse(e,t,r,n,a,"fill",SDL_gfx.translateColorToCSSRGBA(o))}_filledEllipseColor.sig="ipiiiii";function _filledEllipseRGBA(e,t,r,n,a,o,l,u,_){return e>>>=0,SDL_gfx.drawEllipse(e,t,r,n,a,"fill",SDL.translateRGBAToCSSRGBA(o,l,u,_))}_filledEllipseRGBA.sig="ipiiiiiiii";function _lineColor(e,t,r,n,a,o){return e>>>=0,SDL_gfx.drawLine(e,t,r,n,a,SDL_gfx.translateColorToCSSRGBA(o))}_lineColor.sig="ipiiiii";function _lineRGBA(e,t,r,n,a,o,l,u,_){return e>>>=0,SDL_gfx.drawLine(e,t,r,n,a,SDL.translateRGBAToCSSRGBA(o,l,u,_))}_lineRGBA.sig="ipiiiiiiii";function _pixelRGBA(e,t,r,n,a,o,l){return e>>>=0,_boxRGBA(e,t,r,t,r,n,a,o,l)}_pixelRGBA.sig="ipiiiiii";var _SDL_GL_SetAttribute=(e,t)=>{e in SDL.glAttributes||abort("Unknown SDL GL attribute ("+e+"). Please check if your SDL version is supported."),SDL.glAttributes[e]=t};_SDL_GL_SetAttribute.sig="iii";function _SDL_GL_GetAttribute(e,t){return t>>>=0,e in SDL.glAttributes||abort("Unknown SDL GL attribute ("+e+"). Please check if your SDL version is supported."),t&&(HEAP32[t>>>2>>>0]=SDL.glAttributes[e]),0}_SDL_GL_GetAttribute.sig="iip";var _SDL_GL_SwapBuffers=()=>{var e;(e=Browser.doSwapBuffers)==null||e.call(Browser)};_SDL_GL_SwapBuffers.sig="v";function _SDL_GL_ExtensionSupported(e){return e>>>=0,Module.ctx.getExtension(e)|0}_SDL_GL_ExtensionSupported.sig="ip";function _SDL_DestroyWindow(e){}_SDL_DestroyWindow.sig="vp";function _SDL_DestroyRenderer(e){}_SDL_DestroyRenderer.sig="vp";function _SDL_GetWindowFlags(e){return Browser.isFullscreen?1:0}_SDL_GetWindowFlags.sig="ip";function _SDL_GL_SwapWindow(e){}_SDL_GL_SwapWindow.sig="vp";function _SDL_GL_MakeCurrent(e,t){}_SDL_GL_MakeCurrent.sig="ipp";function _SDL_GL_DeleteContext(e){}_SDL_GL_DeleteContext.sig="vp";var _SDL_GL_GetSwapInterval=()=>MainLoop.timingMode==1?MainLoop.timingValue:0;_SDL_GL_GetSwapInterval.sig="i";var _SDL_GL_SetSwapInterval=e=>{_emscripten_set_main_loop_timing(1,e)};_SDL_GL_SetSwapInterval.sig="ii";function _SDL_SetWindowTitle(e,t){t>>>=0,t&&(document.title=UTF8ToString(t))}_SDL_SetWindowTitle.sig="vpp";function _SDL_GetWindowSize(e,t,r){t>>>=0,r>>>=0;var n=Module.canvas.width,a=Module.canvas.height;t&&(HEAP32[t>>>2>>>0]=n),r&&(HEAP32[r>>>2>>>0]=a)}_SDL_GetWindowSize.sig="vppp";function _SDL_LogSetOutputFunction(e,t){}_SDL_LogSetOutputFunction.sig="vpp";function _SDL_SetWindowFullscreen(e,t){return Browser.isFullscreen?(Module.canvas.exitFullscreen(),1):0}_SDL_SetWindowFullscreen.sig="ipi";var _SDL_ClearError=()=>{};_SDL_ClearError.sig="v";var _SDL_SetGamma=(e,t,r)=>-1;_SDL_SetGamma.sig="ifff";function _SDL_SetGammaRamp(e,t,r){return-1}_SDL_SetGammaRamp.sig="ippp";var _SDL_NumJoysticks=()=>{for(var e=0,t=SDL.getGamepads(),r=0;rSDL.lastJoystickState.hasOwnProperty(e+1)?1:0;_SDL_JoystickOpened.sig="ii";function _SDL_JoystickIndex(e){return e>>>=0,e-1}_SDL_JoystickIndex.sig="ip";function _SDL_JoystickNumAxes(e){e>>>=0;var t=SDL.getGamepad(e-1);return t?t.axes.length:0}_SDL_JoystickNumAxes.sig="ip";function _SDL_JoystickNumBalls(e){return 0}_SDL_JoystickNumBalls.sig="ip";function _SDL_JoystickNumHats(e){return 0}_SDL_JoystickNumHats.sig="ip";function _SDL_JoystickNumButtons(e){e>>>=0;var t=SDL.getGamepad(e-1);return t?t.buttons.length:0}_SDL_JoystickNumButtons.sig="ip";var _SDL_JoystickUpdate=()=>SDL.queryJoysticks();_SDL_JoystickUpdate.sig="v";var _SDL_JoystickEventState=e=>e<0?SDL.joystickEventState:SDL.joystickEventState=e;_SDL_JoystickEventState.sig="ii";function _SDL_JoystickGetAxis(e,t){e>>>=0;var r=SDL.getGamepad(e-1);return r&&r.axes.length>t?SDL.joystickAxisValueConversion(r.axes[t]):0}_SDL_JoystickGetAxis.sig="ipi";function _SDL_JoystickGetHat(e,t){return 0}_SDL_JoystickGetHat.sig="ipi";function _SDL_JoystickGetBall(e,t,r,n){return-1}_SDL_JoystickGetBall.sig="ipipp";function _SDL_JoystickGetButton(e,t){e>>>=0;var r=SDL.getGamepad(e-1);return r&&r.buttons.length>t&&SDL.getJoystickButtonState(r.buttons[t])?1:0}_SDL_JoystickGetButton.sig="ipi";function _SDL_JoystickClose(e){e>>>=0,delete SDL.lastJoystickState[e]}_SDL_JoystickClose.sig="vp";var _SDL_InitSubSystem=e=>0;_SDL_InitSubSystem.sig="ii";function _SDL_RWFromConstMem(e,t){e>>>=0;var r=SDL.rwops.length;return SDL.rwops.push({bytes:e,count:t}),r}_SDL_RWFromConstMem.sig="ppi";var _SDL_RWFromMem=_SDL_RWFromConstMem;_SDL_RWFromMem.sig="ppi";var _SDL_GetNumAudioDrivers=()=>1;_SDL_GetNumAudioDrivers.sig="i";function _SDL_GetCurrentAudioDriver(){return stringToNewUTF8("Emscripten Audio")}_SDL_GetCurrentAudioDriver.sig="p";var _SDL_GetScancodeFromKey=e=>SDL.scanCodes[e];_SDL_GetScancodeFromKey.sig="ii";function _SDL_GetAudioDriver(e){return _SDL_GetCurrentAudioDriver()}_SDL_GetAudioDriver.sig="pi";var _SDL_EnableUNICODE=e=>{var t=SDL.unicode||0;return SDL.unicode=e,t};_SDL_EnableUNICODE.sig="ii";var _SDL_AddTimer=function(e,t,r){return t>>>=0,r>>>=0,safeSetTimeout(()=>getWasmTableEntry(t)(e,r),e)};_SDL_AddTimer.sig="iipp";var _SDL_RemoveTimer=e=>(clearTimeout(e),!0);_SDL_RemoveTimer.sig="ii";function _SDL_CreateThread(e,t,r,n){throw"SDL threads cannot be supported in the web platform because they assume shared state. See emscripten_create_worker etc. for a message-passing concurrency model that does let you run code in another thread."}_SDL_CreateThread.sig="ppp";function _SDL_WaitThread(e,t){throw"SDL_WaitThread"}_SDL_WaitThread.sig="vpp";function _SDL_GetThreadID(e){throw"SDL_GetThreadID"}_SDL_GetThreadID.sig="pp";function _SDL_ThreadID(){return 0}_SDL_ThreadID.sig="p";function _SDL_AllocRW(){throw"SDL_AllocRW: TODO"}_SDL_AllocRW.sig="p";function _SDL_CondBroadcast(e){throw"SDL_CondBroadcast: TODO"}_SDL_CondBroadcast.sig="ip";function _SDL_CondWaitTimeout(e,t,r){throw"SDL_CondWaitTimeout: TODO"}_SDL_CondWaitTimeout.sig="ippi";var _SDL_WM_IconifyWindow=()=>{throw"SDL_WM_IconifyWindow TODO"};_SDL_WM_IconifyWindow.sig="i";function _Mix_SetPostMix(e,t){return warnOnce("Mix_SetPostMix: TODO")}_Mix_SetPostMix.sig="vpp";function _Mix_VolumeChunk(e,t){throw"Mix_VolumeChunk: TODO"}_Mix_VolumeChunk.sig="ipi";var _Mix_SetPosition=(e,t,r)=>{throw"Mix_SetPosition: TODO"};_Mix_SetPosition.sig="iiii";function _Mix_QuerySpec(e,t,r){throw"Mix_QuerySpec: TODO"}_Mix_QuerySpec.sig="ippp";function _Mix_FadeInChannelTimed(e,t,r,n,a){throw"Mix_FadeInChannelTimed"}_Mix_FadeInChannelTimed.sig="iipiii";var _Mix_FadeOutChannel=()=>{throw"Mix_FadeOutChannel"};_Mix_FadeOutChannel.sig="iii";function _Mix_Linked_Version(){throw"Mix_Linked_Version: TODO"}_Mix_Linked_Version.sig="p";function _SDL_SaveBMP_RW(e,t,r){throw"SDL_SaveBMP_RW: TODO"}_SDL_SaveBMP_RW.sig="ippi";function _SDL_WM_SetIcon(e,t){}_SDL_WM_SetIcon.sig="vpp";var _SDL_HasRDTSC=()=>0;_SDL_HasRDTSC.sig="i";var _SDL_HasMMX=()=>0;_SDL_HasMMX.sig="i";var _SDL_HasMMXExt=()=>0;_SDL_HasMMXExt.sig="i";var _SDL_Has3DNow=()=>0;_SDL_Has3DNow.sig="i";var _SDL_Has3DNowExt=()=>0;_SDL_Has3DNowExt.sig="i";var _SDL_HasSSE=()=>0;_SDL_HasSSE.sig="i";var _SDL_HasSSE2=()=>0;_SDL_HasSSE2.sig="i";var _SDL_HasAltiVec=()=>0;_SDL_HasAltiVec.sig="i";var _emscripten_is_main_browser_thread=()=>!ENVIRONMENT_IS_WORKER,tupleRegistrations={},structRegistrations={},getTypeName=e=>{var t=___getTypeName(e),r=readLatin1String(t);return _free(t),r},getFunctionName=e=>{e=e.trim();let t=e.indexOf("(");return t!==-1?e.substr(0,t):e},heap32VectorToArray=(e,t)=>{for(var r=[],n=0;n>>2>>>0]);return r},requireRegisteredType=(e,t)=>{var r=registeredTypes[e];return r===void 0&&throwBindingError("".concat(t," has unknown type ").concat(getTypeName(e))),r};function usesDestructorStack(e){for(var t=1;tObject.defineProperty(t,"name",{value:e}),extendError=(e,t)=>{var r=createNamedFunction(t,function(n){this.name=t,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` +`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:"".concat(this.name,": ").concat(this.message)},r},UnboundTypeError,PureVirtualError,EmValOptionalType=Object.assign({optional:!0},EmValType),registeredInstances={},getInheritedInstanceCount=()=>Object.keys(registeredInstances).length,getLiveInheritedInstances=()=>{var e=[];for(var t in registeredInstances)registeredInstances.hasOwnProperty(t)&&e.push(registeredInstances[t]);return e},deletionQueue=[],flushPendingDeletes=()=>{for(;deletionQueue.length;){var e=deletionQueue.pop();e.$$.deleteScheduled=!1,e.delete()}},delayFunction,setDelayFunction=e=>{delayFunction=e,deletionQueue.length&&delayFunction&&delayFunction(flushPendingDeletes)},init_embind=()=>{Module.getInheritedInstanceCount=getInheritedInstanceCount,Module.getLiveInheritedInstances=getLiveInheritedInstances,Module.flushPendingDeletes=flushPendingDeletes,Module.setDelayFunction=setDelayFunction},throwUnboundTypeError=(e,t)=>{var r=[],n={};function a(o){if(!n[o]&&!registeredTypes[o]){if(typeDependencies[o]){typeDependencies[o].forEach(a);return}r.push(o),n[o]=!0}}throw t.forEach(a),new UnboundTypeError("".concat(e,": ")+r.map(getTypeName).join([", "]))},ensureOverloadTable=(e,t,r)=>{if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(...a){return e[t].overloadTable.hasOwnProperty(a.length)||throwBindingError("Function '".concat(r,"' called with an invalid number of arguments (").concat(a.length,") - expects one of (").concat(e[t].overloadTable,")!")),e[t].overloadTable[a.length].apply(this,a)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},exposePublicSymbol=(e,t,r)=>{Module.hasOwnProperty(e)?((r===void 0||Module[e].overloadTable!==void 0&&Module[e].overloadTable[r]!==void 0)&&throwBindingError("Cannot register public name '".concat(e,"' twice")),ensureOverloadTable(Module,e,e),Module.hasOwnProperty(r)&&throwBindingError("Cannot register multiple overloads of a function with the same number of arguments (".concat(r,")!")),Module[e].overloadTable[r]=t):(Module[e]=t,r!==void 0&&(Module[e].numArguments=r))},replacePublicSymbol=(e,t,r)=>{Module.hasOwnProperty(e)||throwInternalError("Replacing nonexistent public symbol"),Module[e].overloadTable!==void 0&&r!==void 0?Module[e].overloadTable[r]=t:(Module[e]=t,Module[e].argCount=r)},getBasestPointer=(e,t)=>{for(t===void 0&&throwBindingError("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},registerInheritedInstance=(e,t,r)=>{t=getBasestPointer(e,t),registeredInstances.hasOwnProperty(t)?throwBindingError("Tried to register registered instance: ".concat(t)):registeredInstances[t]=r},unregisterInheritedInstance=(e,t)=>{t=getBasestPointer(e,t),registeredInstances.hasOwnProperty(t)?delete registeredInstances[t]:throwBindingError("Tried to unregister unregistered instance: ".concat(t))},getInheritedInstance=(e,t)=>(t=getBasestPointer(e,t),registeredInstances[t]),registeredPointers={},enumReadValueFromPointer=(e,t,r)=>{switch(t){case 1:return r?function(n){return this.fromWireType(HEAP8[n>>>0])}:function(n){return this.fromWireType(HEAPU8[n>>>0])};case 2:return r?function(n){return this.fromWireType(HEAP16[n>>>1>>>0])}:function(n){return this.fromWireType(HEAPU16[n>>>1>>>0])};case 4:return r?function(n){return this.fromWireType(HEAP32[n>>>2>>>0])}:function(n){return this.fromWireType(HEAPU32[n>>>2>>>0])};default:throw new TypeError("invalid integer width (".concat(t,"): ").concat(e))}};function __embind_register_user_type(e,t){e>>>=0,__embind_register_emval(e)}__embind_register_user_type.sig="vpp";function __embind_register_optional(e,t){e>>>=0,registerType(e,EmValOptionalType)}__embind_register_optional.sig="vpp";var runDestructors=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t)}};function newFunc(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type ".concat(typeof e," which is not a function"));var r=createNamedFunction(e.name||"unknownFunctionName",function(){});r.prototype=e.prototype;var n=new r,a=e.apply(n,t);return a instanceof Object?a:n}function craftInvokerFunction(e,t,r,n,a,o){var l=t.length;l<2&&throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var u=t[1]!==null&&r!==null,_=usesDestructorStack(t),d=t[0].name!=="void",p=l-2,f=[e,throwBindingError,n,a,runDestructors,t[0],t[1]],m=0;m{e=readLatin1String(e);function r(){return e.includes("j")||e.includes("p")?getDynCaller(e,t):getWasmTableEntry(t)}var n=r();return typeof n!="function"&&throwBindingError("unknown function pointer with signature ".concat(e,": ").concat(t)),n};function __embind_register_function(e,t,r,n,a,o,l,u){e>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0;var _=heap32VectorToArray(t,r);e=readLatin1String(e),e=getFunctionName(e),a=embind__requireFunction(n,a),exposePublicSymbol(e,function(){throwUnboundTypeError("Cannot call ".concat(e," due to unbound types"),_)},t-1),whenDependentTypesAreResolved([],_,d=>{var p=[d[0],null].concat(d.slice(1));return replacePublicSymbol(e,craftInvokerFunction(e,p,null,a,o,l),t-1),[]})}__embind_register_function.sig="vpippppii";function __embind_register_value_array(e,t,r,n,a,o){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,tupleRegistrations[e]={name:readLatin1String(t),rawConstructor:embind__requireFunction(r,n),rawDestructor:embind__requireFunction(a,o),elements:[]}}__embind_register_value_array.sig="vpppppp";function __embind_register_value_array_element(e,t,r,n,a,o,l,u,_){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,l>>>=0,u>>>=0,_>>>=0,tupleRegistrations[e].elements.push({getterReturnType:t,getter:embind__requireFunction(r,n),getterContext:a,setterArgumentType:o,setter:embind__requireFunction(l,u),setterContext:_})}__embind_register_value_array_element.sig="vppppppppp";var __embind_finalize_value_array=function(e){e>>>=0;var t=tupleRegistrations[e];delete tupleRegistrations[e];var r=t.elements,n=r.length,a=r.map(u=>u.getterReturnType).concat(r.map(u=>u.setterArgumentType)),o=t.rawConstructor,l=t.rawDestructor;whenDependentTypesAreResolved([e],a,u=>(r.forEach((_,d)=>{var p=u[d],f=_.getter,m=_.getterContext,h=u[d+n],g=_.setter,b=_.setterContext;_.read=v=>p.fromWireType(f(m,v)),_.write=(v,S)=>{var L=[];g(b,v,h.toWireType(L,S)),runDestructors(L)}}),[{name:t.name,fromWireType:_=>{for(var d=new Array(n),p=0;p{if(n!==d.length)throw new TypeError("Incorrect number of tuple elements for ".concat(t.name,": expected=").concat(n,", actual=").concat(d.length));for(var p=o(),f=0;f>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,structRegistrations[e]={name:readLatin1String(t),rawConstructor:embind__requireFunction(r,n),rawDestructor:embind__requireFunction(a,o),fields:[]}}__embind_register_value_object.sig="vpppppp";function __embind_register_value_object_field(e,t,r,n,a,o,l,u,_,d){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,l>>>=0,u>>>=0,_>>>=0,d>>>=0,structRegistrations[e].fields.push({fieldName:readLatin1String(t),getterReturnType:r,getter:embind__requireFunction(n,a),getterContext:o,setterArgumentType:l,setter:embind__requireFunction(u,_),setterContext:d})}__embind_register_value_object_field.sig="vpppppppppp";var __embind_finalize_value_object=function(e){e>>>=0;var t=structRegistrations[e];delete structRegistrations[e];var r=t.rawConstructor,n=t.rawDestructor,a=t.fields,o=a.map(l=>l.getterReturnType).concat(a.map(l=>l.setterArgumentType));whenDependentTypesAreResolved([e],o,l=>{var u={};return a.forEach((_,d)=>{var p=_.fieldName,f=l[d],m=_.getter,h=_.getterContext,g=l[d+a.length],b=_.setter,v=_.setterContext;u[p]={read:S=>f.fromWireType(m(h,S)),write:(S,L)=>{var T=[];b(v,S,g.toWireType(T,L)),runDestructors(T)}}}),[{name:t.name,fromWireType:_=>{var d={};for(var p in u)d[p]=u[p].read(_);return n(_),d},toWireType:(_,d)=>{for(var p in u)if(!(p in d))throw new TypeError('Missing field: "'.concat(p,'"'));var f=r();for(p in u)u[p].write(f,d[p]);return _!==null&&_.push(n,f),f},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,destructorFunction:n}]})};__embind_finalize_value_object.sig="vp";var upcastPointer=(e,t,r)=>{for(;t!==r;)t.upcast||throwBindingError("Expected null or instance of ".concat(r.name,", got an instance of ").concat(t.name)),e=t.upcast(e),t=t.baseClass;return e};function genericPointerToWireType(e,t){var r;if(t===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&throwBindingError('Cannot pass "'.concat(embindRepr(t),'" as a ').concat(this.name)),t.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name)),!this.isConst&&t.$$.ptrType.isConst&&throwBindingError("Cannot convert argument of type ".concat(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name," to parameter type ").concat(this.name));var n=t.$$.ptrType.registeredClass;if(r=upcastPointer(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&throwBindingError("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:throwBindingError("Cannot convert argument of type ".concat(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name," to parameter type ").concat(this.name));break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var a=t.clone();r=this.rawShare(r,Emval.toHandle(()=>a.delete())),e!==null&&e.push(this.rawDestructor,r)}break;default:throwBindingError("Unsupporting sharing policy")}return r}function constNoSmartPtrRawPointerToWireType(e,t){if(t===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),0;t.$$||throwBindingError('Cannot pass "'.concat(embindRepr(t),'" as a ').concat(this.name)),t.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name));var r=t.$$.ptrType.registeredClass,n=upcastPointer(t.$$.ptr,r,this.registeredClass);return n}function nonConstNoSmartPtrRawPointerToWireType(e,t){if(t===null)return this.isReference&&throwBindingError("null is not a valid ".concat(this.name)),0;t.$$||throwBindingError('Cannot pass "'.concat(embindRepr(t),'" as a ').concat(this.name)),t.$$.ptr||throwBindingError("Cannot pass deleted object as a pointer of type ".concat(this.name)),t.$$.ptrType.isConst&&throwBindingError("Cannot convert argument of type ".concat(t.$$.ptrType.name," to parameter type ").concat(this.name));var r=t.$$.ptrType.registeredClass,n=upcastPointer(t.$$.ptr,r,this.registeredClass);return n}function RegisteredPointer(e,t,r,n,a,o,l,u,_,d,p){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=l,this.rawGetPointee=u,this.rawConstructor=_,this.rawShare=d,this.rawDestructor=p,!a&&t.baseClass===void 0?n?(this.toWireType=constNoSmartPtrRawPointerToWireType,this.destructorFunction=null):(this.toWireType=nonConstNoSmartPtrRawPointerToWireType,this.destructorFunction=null):this.toWireType=genericPointerToWireType}var downcastPointer=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var n=downcastPointer(e,t,r.baseClass);return n===null?null:r.downcast(n)},finalizationRegistry=!1,detachFinalizer=e=>{},runDestructor=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},releaseClassHandle=e=>{e.count.value-=1;var t=e.count.value===0;t&&runDestructor(e)},attachFinalizer=e=>typeof FinalizationRegistry>"u"?(attachFinalizer=t=>t,e):(finalizationRegistry=new FinalizationRegistry(t=>{releaseClassHandle(t.$$)}),attachFinalizer=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var a={$$:r};finalizationRegistry.register(t,a,t)}return t},detachFinalizer=t=>finalizationRegistry.unregister(t),attachFinalizer(e)),makeClassHandle=(e,t)=>{(!t.ptrType||!t.ptr)&&throwInternalError("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&throwInternalError("Both smartPtrType and smartPtr must be specified"),t.count={value:1},attachFinalizer(Object.create(e,{$$:{value:t,writable:!0}}))};function RegisteredPointer_fromWireType(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=getInheritedInstance(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o=this.registeredClass.getActualType(t),l=registeredPointers[o];if(!l)return a.call(this);var u;this.isConst?u=l.constPointerType:u=l.pointerType;var _=downcastPointer(t,this.registeredClass,u.registeredClass);return _===null?a.call(this):this.isSmartPointer?makeClassHandle(u.registeredClass.instancePrototype,{ptrType:u,ptr:_,smartPtrType:this,smartPtr:e}):makeClassHandle(u.registeredClass.instancePrototype,{ptrType:u,ptr:_})}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)==null||t.call(this,e)},argPackAdvance:GenericWireTypeSize,readValueFromPointer:readPointer,fromWireType:RegisteredPointer_fromWireType})};function ClassHandle(){}var shallowCopyInternalPointer=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),throwInstanceAlreadyDeleted=e=>{function t(r){return r.$$.ptrType.registeredClass.name}throwBindingError(t(e)+" instance already deleted")},init_ClassHandle=()=>{Object.assign(ClassHandle.prototype,{isAliasOf(e){if(!(this instanceof ClassHandle)||!(e instanceof ClassHandle))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,a=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return t===n&&r===a},clone(){if(this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&throwBindingError("Object already scheduled for deletion"),detachFinalizer(this),releaseClassHandle(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||throwInstanceAlreadyDeleted(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&throwBindingError("Object already scheduled for deletion"),deletionQueue.push(this),deletionQueue.length===1&&delayFunction&&delayFunction(flushPendingDeletes),this.$$.deleteScheduled=!0,this}})};function RegisteredClass(e,t,r,n,a,o,l,u){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=l,this.downcast=u,this.pureVirtualFunctions=[]}var char_0=48,char_9=57,makeLegalFunctionName=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=char_0&&t<=char_9?"_".concat(e):e};function __embind_register_class(e,t,r,n,a,o,l,u,_,d,p,f,m){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,l>>>=0,u>>>=0,_>>>=0,d>>>=0,p>>>=0,f>>>=0,m>>>=0,p=readLatin1String(p),o=embind__requireFunction(a,o),u&&(u=embind__requireFunction(l,u)),d&&(d=embind__requireFunction(_,d)),m=embind__requireFunction(f,m);var h=makeLegalFunctionName(p);exposePublicSymbol(h,function(){throwUnboundTypeError("Cannot construct ".concat(p," due to unbound types"),[n])}),whenDependentTypesAreResolved([e,t,r],n?[n]:[],g=>{var b;g=g[0];var v,S;n?(v=g.registeredClass,S=v.instancePrototype):S=ClassHandle.prototype;var L=createNamedFunction(p,function(...w){if(Object.getPrototypeOf(this)!==T)throw new BindingError("Use 'new' to construct "+p);if(A.constructor_body===void 0)throw new BindingError(p+" has no accessible constructor");var E=A.constructor_body[w.length];if(E===void 0)throw new BindingError("Tried to invoke ctor of ".concat(p," with invalid number of parameters (").concat(w.length,") - expected (").concat(Object.keys(A.constructor_body).toString(),") parameters instead!"));return E.apply(this,w)}),T=Object.create(S,{constructor:{value:L}});L.prototype=T;var A=new RegisteredClass(p,L,T,m,v,o,u,d);A.baseClass&&((b=A.baseClass).__derivedClasses!=null||(b.__derivedClasses=[]),A.baseClass.__derivedClasses.push(A));var M=new RegisteredPointer(p,A,!0,!1,!1),X=new RegisteredPointer(p+"*",A,!1,!1,!1),x=new RegisteredPointer(p+" const*",A,!1,!0,!1);return registeredPointers[e]={pointerType:X,constPointerType:x},replacePublicSymbol(h,L),[M,X,x]})}__embind_register_class.sig="vppppppppppppp";var __embind_register_class_constructor=function(e,t,r,n,a,o){e>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0;var l=heap32VectorToArray(t,r);a=embind__requireFunction(n,a),whenDependentTypesAreResolved([],[e],u=>{u=u[0];var _="constructor ".concat(u.name);if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[t-1]!==void 0)throw new BindingError("Cannot register multiple constructors with identical number of parameters (".concat(t-1,") for class '").concat(u.name,"'! Overload resolution is currently only performed using the parameter count, not actual type info!"));return u.registeredClass.constructor_body[t-1]=()=>{throwUnboundTypeError("Cannot construct ".concat(u.name," due to unbound types"),l)},whenDependentTypesAreResolved([],l,d=>(d.splice(1,0,null),u.registeredClass.constructor_body[t-1]=craftInvokerFunction(_,d,null,a,o),[])),[]})};__embind_register_class_constructor.sig="vpipppp";var validateThis=(e,t,r)=>(e instanceof Object||throwBindingError("".concat(r,' with invalid "this": ').concat(e)),e instanceof t.registeredClass.constructor||throwBindingError("".concat(r,' incompatible with "this" of type ').concat(e.constructor.name)),e.$$.ptr||throwBindingError("cannot call emscripten binding method ".concat(r," on deleted object")),upcastPointer(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass)),__embind_register_class_function=function(e,t,r,n,a,o,l,u,_,d){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,l>>>=0;var p=heap32VectorToArray(r,n);t=readLatin1String(t),t=getFunctionName(t),o=embind__requireFunction(a,o),whenDependentTypesAreResolved([],[e],f=>{f=f[0];var m="".concat(f.name,".").concat(t);t.startsWith("@@")&&(t=Symbol[t.substring(2)]),u&&f.registeredClass.pureVirtualFunctions.push(t);function h(){throwUnboundTypeError("Cannot call ".concat(m," due to unbound types"),p)}var g=f.registeredClass.instancePrototype,b=g[t];return b===void 0||b.overloadTable===void 0&&b.className!==f.name&&b.argCount===r-2?(h.argCount=r-2,h.className=f.name,g[t]=h):(ensureOverloadTable(g,t,m),g[t].overloadTable[r-2]=h),whenDependentTypesAreResolved([],p,v=>{var S=craftInvokerFunction(m,v,f,o,l,_);return g[t].overloadTable===void 0?(S.argCount=r-2,g[t]=S):g[t].overloadTable[r-2]=S,[]}),[]})};__embind_register_class_function.sig="vppippppiii";var __embind_register_class_property=function(e,t,r,n,a,o,l,u,_,d){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,l>>>=0,u>>>=0,_>>>=0,d>>>=0,t=readLatin1String(t),a=embind__requireFunction(n,a),whenDependentTypesAreResolved([],[e],p=>{p=p[0];var f="".concat(p.name,".").concat(t),m={get(){throwUnboundTypeError("Cannot access ".concat(f," due to unbound types"),[r,l])},enumerable:!0,configurable:!0};return _?m.set=()=>throwUnboundTypeError("Cannot access ".concat(f," due to unbound types"),[r,l]):m.set=h=>throwBindingError(f+" is a read-only property"),Object.defineProperty(p.registeredClass.instancePrototype,t,m),whenDependentTypesAreResolved([],_?[r,l]:[r],h=>{var g=h[0],b={get(){var S=validateThis(this,p,f+" getter");return g.fromWireType(a(o,S))},enumerable:!0};if(_){_=embind__requireFunction(u,_);var v=h[1];b.set=function(S){var L=validateThis(this,p,f+" setter"),T=[];_(d,L,v.toWireType(T,S)),runDestructors(T)}}return Object.defineProperty(p.registeredClass.instancePrototype,t,b),[]}),[]})};__embind_register_class_property.sig="vpppppppppp";var __embind_register_class_class_function=function(e,t,r,n,a,o,l,u,_){e>>>=0,t>>>=0,n>>>=0,a>>>=0,o>>>=0,l>>>=0;var d=heap32VectorToArray(r,n);t=readLatin1String(t),t=getFunctionName(t),o=embind__requireFunction(a,o),whenDependentTypesAreResolved([],[e],p=>{p=p[0];var f="".concat(p.name,".").concat(t);function m(){throwUnboundTypeError("Cannot call ".concat(f," due to unbound types"),d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var h=p.registeredClass.constructor;return h[t]===void 0?(m.argCount=r-1,h[t]=m):(ensureOverloadTable(h,t,f),h[t].overloadTable[r-1]=m),whenDependentTypesAreResolved([],d,g=>{var b=[g[0],null].concat(g.slice(1)),v=craftInvokerFunction(f,b,null,o,l,u);if(h[t].overloadTable===void 0?(v.argCount=r-1,h[t]=v):h[t].overloadTable[r-1]=v,p.registeredClass.__derivedClasses)for(let S of p.registeredClass.__derivedClasses)S.constructor.hasOwnProperty(t)||(S.constructor[t]=v);return[]}),[]})};__embind_register_class_class_function.sig="vppippppii";var __embind_register_class_class_property=function(e,t,r,n,a,o,l,u){e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,o>>>=0,l>>>=0,u>>>=0,t=readLatin1String(t),o=embind__requireFunction(a,o),whenDependentTypesAreResolved([],[e],_=>{_=_[0];var d="".concat(_.name,".").concat(t),p={get(){throwUnboundTypeError("Cannot access ".concat(d," due to unbound types"),[r])},enumerable:!0,configurable:!0};return u?p.set=()=>{throwUnboundTypeError("Cannot access ".concat(d," due to unbound types"),[r])}:p.set=f=>{throwBindingError("".concat(d," is a read-only property"))},Object.defineProperty(_.registeredClass.constructor,t,p),whenDependentTypesAreResolved([],[r],f=>{f=f[0];var m={get(){return f.fromWireType(o(n))},enumerable:!0};return u&&(u=embind__requireFunction(l,u),m.set=h=>{var g=[];u(n,f.toWireType(g,h)),runDestructors(g)}),Object.defineProperty(_.registeredClass.constructor,t,m),[]}),[]})};__embind_register_class_class_property.sig="vpppppppp";function __embind_create_inheriting_constructor(e,t,r){e>>>=0,t>>>=0,r>>>=0,e=readLatin1String(e),t=requireRegisteredType(t,"wrapper"),r=Emval.toValue(r);var n=t.registeredClass,a=n.instancePrototype,o=n.baseClass,l=o.instancePrototype,u=n.baseClass.constructor,_=createNamedFunction(e,function(...d){n.baseClass.pureVirtualFunctions.forEach((function(p){if(this[p]===l[p])throw new PureVirtualError("Pure virtual function ".concat(p," must be implemented in JavaScript"))}).bind(this)),Object.defineProperty(this,"__parent",{value:a}),this.__construct(...d)});return a.__construct=function(...d){this===a&&throwBindingError("Pass correct 'this' to __construct");var p=u.implement(this,...d);detachFinalizer(p);var f=p.$$;p.notifyOnDestruction(),f.preservePointerOnDelete=!0,Object.defineProperties(this,{$$:{value:f}}),attachFinalizer(this),registerInheritedInstance(n,f.ptr,this)},a.__destruct=function(){this===a&&throwBindingError("Pass correct 'this' to __destruct"),detachFinalizer(this),unregisterInheritedInstance(n,this.$$.ptr)},_.prototype=Object.create(a),Object.assign(_.prototype,r),Emval.toHandle(_)}__embind_create_inheriting_constructor.sig="pppp";var __embind_register_smart_ptr=function(e,t,r,n,a,o,l,u,_,d,p,f){e>>>=0,t>>>=0,r>>>=0,a>>>=0,o>>>=0,l>>>=0,u>>>=0,_>>>=0,d>>>=0,p>>>=0,f>>>=0,r=readLatin1String(r),o=embind__requireFunction(a,o),u=embind__requireFunction(l,u),d=embind__requireFunction(_,d),f=embind__requireFunction(p,f),whenDependentTypesAreResolved([e],[t],m=>{m=m[0];var h=new RegisteredPointer(r,m.registeredClass,!1,!1,!0,m,n,o,u,d,f);return[h]})};__embind_register_smart_ptr.sig="vpppipppppppp";function __embind_register_enum(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,t=readLatin1String(t);function a(){}a.values={},registerType(e,{name:t,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,l)=>l.value,argPackAdvance:GenericWireTypeSize,readValueFromPointer:enumReadValueFromPointer(t,r,n),destructorFunction:null}),exposePublicSymbol(t,a)}__embind_register_enum.sig="vpppi";function __embind_register_enum_value(e,t,r){e>>>=0,t>>>=0;var n=requireRegisteredType(e,"enum");t=readLatin1String(t);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:createNamedFunction("".concat(n.name,"_").concat(t),function(){})}});a.values[r]=o,a[t]=o}__embind_register_enum_value.sig="vppi";var __embind_register_constant=function(e,t,r){e>>>=0,t>>>=0,e=readLatin1String(e),whenDependentTypesAreResolved([],[t],n=>(n=n[0],Module[e]=n.fromWireType(r),[]))};__embind_register_constant.sig="vppd";var emval_symbols={};function __emval_register_symbol(e){e>>>=0,emval_symbols[e]=readLatin1String(e)}__emval_register_symbol.sig="vp";var getStringOrSymbol=e=>{var t=emval_symbols[e];return t===void 0?readLatin1String(e):t};function __emval_incref(e){e>>>=0,e>9&&(emval_handles[e+1]+=1)}__emval_incref.sig="vp";function __emval_run_destructors(e){e>>>=0;var t=Emval.toValue(e);runDestructors(t),__emval_decref(e)}__emval_run_destructors.sig="vp";function __emval_new_array(){return Emval.toHandle([])}__emval_new_array.sig="p";function __emval_new_array_from_memory_view(e){e>>>=0,e=Emval.toValue(e);for(var t=new Array(e.length),r=0;r>>=0,Emval.toHandle(getStringOrSymbol(e))}__emval_new_cstring.sig="pp";function __emval_new_u8string(e){return e>>>=0,Emval.toHandle(UTF8ToString(e))}__emval_new_u8string.sig="pp";function __emval_new_u16string(e){return e>>>=0,Emval.toHandle(UTF16ToString(e))}__emval_new_u16string.sig="pp";function __emval_take_value(e,t){e>>>=0,t>>>=0,e=requireRegisteredType(e,"_emval_take_value");var r=e.readValueFromPointer(t);return Emval.toHandle(r)}__emval_take_value.sig="ppp";var emval_get_global=()=>typeof globalThis=="object"?globalThis:function(){return Function}()("return this")();function __emval_get_global(e){return e>>>=0,e===0?Emval.toHandle(emval_get_global()):(e=getStringOrSymbol(e),Emval.toHandle(emval_get_global()[e]))}__emval_get_global.sig="pp";function __emval_get_module_property(e){return e>>>=0,e=getStringOrSymbol(e),Emval.toHandle(Module[e])}__emval_get_module_property.sig="pp";function __emval_get_property(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),Emval.toHandle(e[t])}__emval_get_property.sig="ppp";function __emval_set_property(e,t,r){e>>>=0,t>>>=0,r>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),r=Emval.toValue(r),e[t]=r}__emval_set_property.sig="vppp";var emval_returnValue=(e,t,r)=>{var n=[],a=e.toWireType(n,r);return n.length&&(HEAPU32[t>>>2>>>0]=Emval.toHandle(n)),a};function __emval_as(e,t,r){return e>>>=0,t>>>=0,r>>>=0,e=Emval.toValue(e),t=requireRegisteredType(t,"emval::as"),emval_returnValue(t,r,e)}__emval_as.sig="dppp";function __emval_as_int64(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=requireRegisteredType(t,"emval::as"),t.toWireType(null,e)}__emval_as_int64.sig="ipp";function __emval_as_uint64(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=requireRegisteredType(t,"emval::as"),t.toWireType(null,e)}__emval_as_uint64.sig="ipp";function __emval_equals(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e==t}__emval_equals.sig="ipp";function __emval_strictly_equals(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e===t}__emval_strictly_equals.sig="ipp";function __emval_greater_than(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e>t}__emval_greater_than.sig="ipp";function __emval_less_than(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e>>=0,e=Emval.toValue(e),!e}__emval_not.sig="ip";var emval_methodCallers=[];function __emval_call(e,t,r,n){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,e=emval_methodCallers[e],t=Emval.toValue(t),e(null,t,r,n)}__emval_call.sig="dpppp";var emval_lookupTypes=(e,t)=>{for(var r=new Array(e),n=0;n>>2>>>0],"parameter "+n);return r},emval_addMethodCaller=e=>{var t=emval_methodCallers.length;return emval_methodCallers.push(e),t};function __emval_get_method_caller(e,t,r){t>>>=0;var n=emval_lookupTypes(e,t),a=n.shift();e--;var o=`return function (obj, func, destructorsRef, args) { +`,l=0,u=[];r===0&&u.push("obj");for(var _=["retType"],d=[a],p=0;pg.name).join(", "),") => ").concat(a.name,">");return emval_addMethodCaller(createNamedFunction(h,m))}__emval_get_method_caller.sig="pipi";function __emval_call_method(e,t,r,n,a){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,a>>>=0,e=emval_methodCallers[e],t=Emval.toValue(t),r=getStringOrSymbol(r),e(t,t[r],n,a)}__emval_call_method.sig="dppppp";function __emval_typeof(e){return e>>>=0,e=Emval.toValue(e),Emval.toHandle(typeof e)}__emval_typeof.sig="pp";function __emval_instanceof(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e instanceof t}__emval_instanceof.sig="ipp";function __emval_is_number(e){return e>>>=0,e=Emval.toValue(e),typeof e=="number"}__emval_is_number.sig="ip";function __emval_is_string(e){return e>>>=0,e=Emval.toValue(e),typeof e=="string"}__emval_is_string.sig="ip";function __emval_in(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),e in t}__emval_in.sig="ipp";function __emval_delete(e,t){return e>>>=0,t>>>=0,e=Emval.toValue(e),t=Emval.toValue(t),delete e[t]}__emval_delete.sig="ipp";function __emval_throw(e){throw e>>>=0,e=Emval.toValue(e),e}__emval_throw.sig="ip";function __emval_iter_begin(e){return e>>>=0,e=Emval.toValue(e),Emval.toHandle(e[Symbol.iterator]())}__emval_iter_begin.sig="pp";function __emval_iter_next(e){e>>>=0,e=Emval.toValue(e);var t=e.next();return t.done?0:Emval.toHandle(t.value)}__emval_iter_next.sig="pp";var __emval_coro_suspend=function(e,t){e>>>=0,t>>>=0,Emval.toValue(e).then(r=>{__emval_coro_resume(t,Emval.toHandle(r))})};__emval_coro_suspend.sig="vpp";var __emval_coro_make_promise=function(e,t){return e>>>=0,t>>>=0,Emval.toHandle(new Promise((r,n)=>{let a=()=>{try{___cxa_rethrow()}catch(o){n(o)}};HEAPU32[e>>>2>>>0]=Emval.toHandle(r),HEAPU32[t>>>2>>>0]=Emval.toHandle(a)}))};__emval_coro_make_promise.sig="ppp";function _duckdb_web_fs_file_sync(e){return globalThis.DUCKDB_RUNTIME.syncFile(Module,e)}_duckdb_web_fs_file_sync.sig="vi";function _duckdb_web_fs_file_remove(e,t){return globalThis.DUCKDB_RUNTIME.removeFile(Module,e,t)}registerWasmPlugin(),FS.createPreloadedFile=FS_createPreloadedFile,FS.staticInit(),embind_init_charCodes(),BindingError=Module.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},InternalError=Module.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},init_emval(),Module.requestAnimationFrame=MainLoop.requestAnimationFrame,Module.pauseMainLoop=MainLoop.pause,Module.resumeMainLoop=MainLoop.resume,MainLoop.init();for(var i=0;i<32;++i)tempFixedLengthArray.push(new Array(i));for(var miniTempWebGLFloatBuffersStorage=new Float32Array(288),i=0;i<=288;++i)miniTempWebGLFloatBuffers[i]=miniTempWebGLFloatBuffersStorage.subarray(0,i);for(var miniTempWebGLIntBuffersStorage=new Int32Array(288),i=0;i<=288;++i)miniTempWebGLIntBuffers[i]=miniTempWebGLIntBuffersStorage.subarray(0,i);var emSetImmediate,emClearImmediate;if(typeof setImmediate<"u")emSetImmediate=setImmediateWrapped,emClearImmediate=clearImmediateWrapped;else if(typeof addEventListener=="function"){var __setImmediate_id_counter=0,__setImmediate_queue=[],__setImmediate_message_id="_si",__setImmediate_cb=e=>{e.data===__setImmediate_message_id&&(e.stopPropagation(),__setImmediate_queue.shift()(),++__setImmediate_id_counter)};addEventListener("message",__setImmediate_cb,!0),emSetImmediate=e=>(postMessage(__setImmediate_message_id,"*"),__setImmediate_id_counter+__setImmediate_queue.push(e)-1),emClearImmediate=e=>{var t=e-__setImmediate_id_counter;t>=0&&t<__setImmediate_queue.length&&(__setImmediate_queue[t]=()=>{})}}Module.requestFullscreen=Browser.requestFullscreen,Module.setCanvasSize=Browser.setCanvasSize,Module.getUserMedia=Browser.getUserMedia,Module.createContext=Browser.createContext;var preloadedImages={},preloadedAudios={};registerPostMainLoop(()=>{var e,t;return(t=(e=SDL.audio)==null?void 0:e.queueNewAudioData)==null?void 0:t.call(e)}),UnboundTypeError=Module.UnboundTypeError=extendError(Error,"UnboundTypeError"),PureVirtualError=Module.PureVirtualError=extendError(Error,"PureVirtualError"),init_embind(),init_RegisteredPointer(),init_ClassHandle();var wasmImports={IMG_Init:_IMG_Init,IMG_Load:_IMG_Load,IMG_Load_RW:_IMG_Load_RW,IMG_Quit:_IMG_Quit,Mix_AllocateChannels:_Mix_AllocateChannels,Mix_ChannelFinished:_Mix_ChannelFinished,Mix_CloseAudio:_Mix_CloseAudio,Mix_FadeInChannelTimed:_Mix_FadeInChannelTimed,Mix_FadeInMusicPos:_Mix_FadeInMusicPos,Mix_FadeOutChannel:_Mix_FadeOutChannel,Mix_FadeOutMusic:_Mix_FadeOutMusic,Mix_FadingChannel:_Mix_FadingChannel,Mix_FreeChunk:_Mix_FreeChunk,Mix_FreeMusic:_Mix_FreeMusic,Mix_HaltChannel:_Mix_HaltChannel,Mix_HaltMusic:_Mix_HaltMusic,Mix_HookMusicFinished:_Mix_HookMusicFinished,Mix_Init:_Mix_Init,Mix_Linked_Version:_Mix_Linked_Version,Mix_LoadMUS:_Mix_LoadMUS,Mix_LoadMUS_RW:_Mix_LoadMUS_RW,Mix_LoadWAV:_Mix_LoadWAV,Mix_LoadWAV_RW:_Mix_LoadWAV_RW,Mix_OpenAudio:_Mix_OpenAudio,Mix_Pause:_Mix_Pause,Mix_PauseMusic:_Mix_PauseMusic,Mix_Paused:_Mix_Paused,Mix_PausedMusic:_Mix_PausedMusic,Mix_PlayChannelTimed:_Mix_PlayChannelTimed,Mix_PlayMusic:_Mix_PlayMusic,Mix_Playing:_Mix_Playing,Mix_PlayingMusic:_Mix_PlayingMusic,Mix_QuerySpec:_Mix_QuerySpec,Mix_QuickLoad_RAW:_Mix_QuickLoad_RAW,Mix_Quit:_Mix_Quit,Mix_ReserveChannels:_Mix_ReserveChannels,Mix_Resume:_Mix_Resume,Mix_ResumeMusic:_Mix_ResumeMusic,Mix_SetPanning:_Mix_SetPanning,Mix_SetPosition:_Mix_SetPosition,Mix_SetPostMix:_Mix_SetPostMix,Mix_Volume:_Mix_Volume,Mix_VolumeChunk:_Mix_VolumeChunk,Mix_VolumeMusic:_Mix_VolumeMusic,SDL_AddTimer:_SDL_AddTimer,SDL_AllocRW:_SDL_AllocRW,SDL_AudioDriverName:_SDL_AudioDriverName,SDL_AudioQuit:_SDL_AudioQuit,SDL_ClearError:_SDL_ClearError,SDL_CloseAudio:_SDL_CloseAudio,SDL_CondBroadcast:_SDL_CondBroadcast,SDL_CondSignal:_SDL_CondSignal,SDL_CondWait:_SDL_CondWait,SDL_CondWaitTimeout:_SDL_CondWaitTimeout,SDL_ConvertSurface:_SDL_ConvertSurface,SDL_CreateCond:_SDL_CreateCond,SDL_CreateMutex:_SDL_CreateMutex,SDL_CreateRGBSurface:_SDL_CreateRGBSurface,SDL_CreateRGBSurfaceFrom:_SDL_CreateRGBSurfaceFrom,SDL_CreateThread:_SDL_CreateThread,SDL_Delay:_SDL_Delay,SDL_DestroyCond:_SDL_DestroyCond,SDL_DestroyMutex:_SDL_DestroyMutex,SDL_DestroyRenderer:_SDL_DestroyRenderer,SDL_DestroyWindow:_SDL_DestroyWindow,SDL_DisplayFormatAlpha:_SDL_DisplayFormatAlpha,SDL_EnableKeyRepeat:_SDL_EnableKeyRepeat,SDL_EnableUNICODE:_SDL_EnableUNICODE,SDL_FillRect:_SDL_FillRect,SDL_Flip:_SDL_Flip,SDL_FreeRW:_SDL_FreeRW,SDL_FreeSurface:_SDL_FreeSurface,SDL_GL_DeleteContext:_SDL_GL_DeleteContext,SDL_GL_ExtensionSupported:_SDL_GL_ExtensionSupported,SDL_GL_GetAttribute:_SDL_GL_GetAttribute,SDL_GL_GetSwapInterval:_SDL_GL_GetSwapInterval,SDL_GL_MakeCurrent:_SDL_GL_MakeCurrent,SDL_GL_SetAttribute:_SDL_GL_SetAttribute,SDL_GL_SetSwapInterval:_SDL_GL_SetSwapInterval,SDL_GL_SwapBuffers:_SDL_GL_SwapBuffers,SDL_GL_SwapWindow:_SDL_GL_SwapWindow,SDL_GetAppState:_SDL_GetAppState,SDL_GetAudioDriver:_SDL_GetAudioDriver,SDL_GetClipRect:_SDL_GetClipRect,SDL_GetCurrentAudioDriver:_SDL_GetCurrentAudioDriver,SDL_GetError:_SDL_GetError,SDL_GetKeyName:_SDL_GetKeyName,SDL_GetKeyState:_SDL_GetKeyState,SDL_GetKeyboardState:_SDL_GetKeyboardState,SDL_GetModState:_SDL_GetModState,SDL_GetMouseState:_SDL_GetMouseState,SDL_GetNumAudioDrivers:_SDL_GetNumAudioDrivers,SDL_GetRGB:_SDL_GetRGB,SDL_GetRGBA:_SDL_GetRGBA,SDL_GetScancodeFromKey:_SDL_GetScancodeFromKey,SDL_GetThreadID:_SDL_GetThreadID,SDL_GetTicks:_SDL_GetTicks,SDL_GetVideoInfo:_SDL_GetVideoInfo,SDL_GetVideoSurface:_SDL_GetVideoSurface,SDL_GetWindowFlags:_SDL_GetWindowFlags,SDL_GetWindowSize:_SDL_GetWindowSize,SDL_Has3DNow:_SDL_Has3DNow,SDL_Has3DNowExt:_SDL_Has3DNowExt,SDL_HasAltiVec:_SDL_HasAltiVec,SDL_HasMMX:_SDL_HasMMX,SDL_HasMMXExt:_SDL_HasMMXExt,SDL_HasRDTSC:_SDL_HasRDTSC,SDL_HasSSE:_SDL_HasSSE,SDL_HasSSE2:_SDL_HasSSE2,SDL_Init:_SDL_Init,SDL_InitSubSystem:_SDL_InitSubSystem,SDL_JoystickClose:_SDL_JoystickClose,SDL_JoystickEventState:_SDL_JoystickEventState,SDL_JoystickGetAxis:_SDL_JoystickGetAxis,SDL_JoystickGetBall:_SDL_JoystickGetBall,SDL_JoystickGetButton:_SDL_JoystickGetButton,SDL_JoystickGetHat:_SDL_JoystickGetHat,SDL_JoystickIndex:_SDL_JoystickIndex,SDL_JoystickName:_SDL_JoystickName,SDL_JoystickNumAxes:_SDL_JoystickNumAxes,SDL_JoystickNumBalls:_SDL_JoystickNumBalls,SDL_JoystickNumButtons:_SDL_JoystickNumButtons,SDL_JoystickNumHats:_SDL_JoystickNumHats,SDL_JoystickOpen:_SDL_JoystickOpen,SDL_JoystickOpened:_SDL_JoystickOpened,SDL_JoystickUpdate:_SDL_JoystickUpdate,SDL_Linked_Version:_SDL_Linked_Version,SDL_ListModes:_SDL_ListModes,SDL_LoadBMP_RW:_SDL_LoadBMP_RW,SDL_LockAudio:_SDL_LockAudio,SDL_LockSurface:_SDL_LockSurface,SDL_LogSetOutputFunction:_SDL_LogSetOutputFunction,SDL_LowerBlit:_SDL_LowerBlit,SDL_LowerBlitScaled:_SDL_LowerBlitScaled,SDL_MapRGB:_SDL_MapRGB,SDL_MapRGBA:_SDL_MapRGBA,SDL_NumJoysticks:_SDL_NumJoysticks,SDL_OpenAudio:_SDL_OpenAudio,SDL_PauseAudio:_SDL_PauseAudio,SDL_PeepEvents:_SDL_PeepEvents,SDL_PollEvent:_SDL_PollEvent,SDL_PumpEvents:_SDL_PumpEvents,SDL_PushEvent:_SDL_PushEvent,SDL_Quit:_SDL_Quit,SDL_QuitSubSystem:_SDL_QuitSubSystem,SDL_RWFromConstMem:_SDL_RWFromConstMem,SDL_RWFromFile:_SDL_RWFromFile,SDL_RWFromMem:_SDL_RWFromMem,SDL_RemoveTimer:_SDL_RemoveTimer,SDL_SaveBMP_RW:_SDL_SaveBMP_RW,SDL_SetAlpha:_SDL_SetAlpha,SDL_SetClipRect:_SDL_SetClipRect,SDL_SetColorKey:_SDL_SetColorKey,SDL_SetColors:_SDL_SetColors,SDL_SetError:_SDL_SetError,SDL_SetGamma:_SDL_SetGamma,SDL_SetGammaRamp:_SDL_SetGammaRamp,SDL_SetPalette:_SDL_SetPalette,SDL_SetVideoMode:_SDL_SetVideoMode,SDL_SetWindowFullscreen:_SDL_SetWindowFullscreen,SDL_SetWindowTitle:_SDL_SetWindowTitle,SDL_ShowCursor:_SDL_ShowCursor,SDL_StartTextInput:_SDL_StartTextInput,SDL_StopTextInput:_SDL_StopTextInput,SDL_ThreadID:_SDL_ThreadID,SDL_UnlockAudio:_SDL_UnlockAudio,SDL_UnlockSurface:_SDL_UnlockSurface,SDL_UpdateRect:_SDL_UpdateRect,SDL_UpdateRects:_SDL_UpdateRects,SDL_UpperBlit:_SDL_UpperBlit,SDL_UpperBlitScaled:_SDL_UpperBlitScaled,SDL_VideoDriverName:_SDL_VideoDriverName,SDL_VideoModeOK:_SDL_VideoModeOK,SDL_VideoQuit:_SDL_VideoQuit,SDL_WM_GrabInput:_SDL_WM_GrabInput,SDL_WM_IconifyWindow:_SDL_WM_IconifyWindow,SDL_WM_SetCaption:_SDL_WM_SetCaption,SDL_WM_SetIcon:_SDL_WM_SetIcon,SDL_WM_ToggleFullScreen:_SDL_WM_ToggleFullScreen,SDL_WaitThread:_SDL_WaitThread,SDL_WarpMouse:_SDL_WarpMouse,SDL_WasInit:_SDL_WasInit,SDL_mutexP:_SDL_mutexP,SDL_mutexV:_SDL_mutexV,TTF_CloseFont:_TTF_CloseFont,TTF_FontAscent:_TTF_FontAscent,TTF_FontDescent:_TTF_FontDescent,TTF_FontHeight:_TTF_FontHeight,TTF_FontLineSkip:_TTF_FontLineSkip,TTF_GlyphMetrics:_TTF_GlyphMetrics,TTF_Init:_TTF_Init,TTF_OpenFont:_TTF_OpenFont,TTF_Quit:_TTF_Quit,TTF_RenderText_Blended:_TTF_RenderText_Blended,TTF_RenderText_Shaded:_TTF_RenderText_Shaded,TTF_RenderText_Solid:_TTF_RenderText_Solid,TTF_RenderUTF8_Solid:_TTF_RenderUTF8_Solid,TTF_SizeText:_TTF_SizeText,TTF_SizeUTF8:_TTF_SizeUTF8,XChangeWindowAttributes:_XChangeWindowAttributes,XCreateWindow:_XCreateWindow,XInternAtom:_XInternAtom,XMapWindow:_XMapWindow,XOpenDisplay:_XOpenDisplay,XPending:_XPending,XSendEvent:_XSendEvent,XSetWMHints:_XSetWMHints,XStoreName:_XStoreName,_Unwind_Backtrace:__Unwind_Backtrace,_Unwind_DeleteException:__Unwind_DeleteException,_Unwind_FindEnclosingFunction:__Unwind_FindEnclosingFunction,_Unwind_GetIPInfo:__Unwind_GetIPInfo,_Unwind_RaiseException:__Unwind_RaiseException,_ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm:__ZN18duckdb_skiplistlib9skip_list19_throw_exceeds_sizeEm,__asctime_r:___asctime_r,__assert_fail:___assert_fail,__call_sighandler:___call_sighandler,__cxa_begin_catch:___cxa_begin_catch,__cxa_call_unexpected:___cxa_call_unexpected,__cxa_current_primary_exception:___cxa_current_primary_exception,__cxa_end_catch:___cxa_end_catch,__cxa_find_matching_catch_2:___cxa_find_matching_catch_2,__cxa_find_matching_catch_3:___cxa_find_matching_catch_3,__cxa_find_matching_catch_4:___cxa_find_matching_catch_4,__cxa_rethrow:___cxa_rethrow,__cxa_rethrow_primary_exception:___cxa_rethrow_primary_exception,__cxa_throw:___cxa_throw,__cxa_uncaught_exceptions:___cxa_uncaught_exceptions,__global_base:___global_base,__heap_base:___heap_base,__indirect_function_table:wasmTable,__memory_base:___memory_base,__resumeException:___resumeException,__stack_high:___stack_high,__stack_low:___stack_low,__stack_pointer:___stack_pointer,__syscall__newselect:___syscall__newselect,__syscall_accept4:___syscall_accept4,__syscall_bind:___syscall_bind,__syscall_chdir:___syscall_chdir,__syscall_chmod:___syscall_chmod,__syscall_connect:___syscall_connect,__syscall_dup:___syscall_dup,__syscall_dup3:___syscall_dup3,__syscall_faccessat:___syscall_faccessat,__syscall_fadvise64:___syscall_fadvise64,__syscall_fallocate:___syscall_fallocate,__syscall_fchdir:___syscall_fchdir,__syscall_fchmod:___syscall_fchmod,__syscall_fchmodat2:___syscall_fchmodat2,__syscall_fchown32:___syscall_fchown32,__syscall_fchownat:___syscall_fchownat,__syscall_fcntl64:___syscall_fcntl64,__syscall_fdatasync:___syscall_fdatasync,__syscall_fstat64:___syscall_fstat64,__syscall_fstatfs64:___syscall_fstatfs64,__syscall_ftruncate64:___syscall_ftruncate64,__syscall_getcwd:___syscall_getcwd,__syscall_getdents64:___syscall_getdents64,__syscall_getpeername:___syscall_getpeername,__syscall_getsockname:___syscall_getsockname,__syscall_getsockopt:___syscall_getsockopt,__syscall_ioctl:___syscall_ioctl,__syscall_listen:___syscall_listen,__syscall_lstat64:___syscall_lstat64,__syscall_mkdirat:___syscall_mkdirat,__syscall_mknodat:___syscall_mknodat,__syscall_newfstatat:___syscall_newfstatat,__syscall_openat:___syscall_openat,__syscall_pipe:___syscall_pipe,__syscall_poll:___syscall_poll,__syscall_readlinkat:___syscall_readlinkat,__syscall_recvfrom:___syscall_recvfrom,__syscall_recvmsg:___syscall_recvmsg,__syscall_renameat:___syscall_renameat,__syscall_rmdir:___syscall_rmdir,__syscall_sendmsg:___syscall_sendmsg,__syscall_sendto:___syscall_sendto,__syscall_socket:___syscall_socket,__syscall_stat64:___syscall_stat64,__syscall_statfs64:___syscall_statfs64,__syscall_symlink:___syscall_symlink,__syscall_symlinkat:___syscall_symlinkat,__syscall_truncate64:___syscall_truncate64,__syscall_unlinkat:___syscall_unlinkat,__syscall_utimensat:___syscall_utimensat,__table_base:___table_base,_abort_js:__abort_js,_dlopen_js:__dlopen_js,_dlsym_catchup_js:__dlsym_catchup_js,_dlsym_js:__dlsym_js,_embind_create_inheriting_constructor:__embind_create_inheriting_constructor,_embind_finalize_value_array:__embind_finalize_value_array,_embind_finalize_value_object:__embind_finalize_value_object,_embind_register_bigint:__embind_register_bigint,_embind_register_bool:__embind_register_bool,_embind_register_class:__embind_register_class,_embind_register_class_class_function:__embind_register_class_class_function,_embind_register_class_class_property:__embind_register_class_class_property,_embind_register_class_constructor:__embind_register_class_constructor,_embind_register_class_function:__embind_register_class_function,_embind_register_class_property:__embind_register_class_property,_embind_register_constant:__embind_register_constant,_embind_register_emval:__embind_register_emval,_embind_register_enum:__embind_register_enum,_embind_register_enum_value:__embind_register_enum_value,_embind_register_float:__embind_register_float,_embind_register_function:__embind_register_function,_embind_register_integer:__embind_register_integer,_embind_register_memory_view:__embind_register_memory_view,_embind_register_optional:__embind_register_optional,_embind_register_smart_ptr:__embind_register_smart_ptr,_embind_register_std_string:__embind_register_std_string,_embind_register_std_wstring:__embind_register_std_wstring,_embind_register_user_type:__embind_register_user_type,_embind_register_value_array:__embind_register_value_array,_embind_register_value_array_element:__embind_register_value_array_element,_embind_register_value_object:__embind_register_value_object,_embind_register_value_object_field:__embind_register_value_object_field,_embind_register_void:__embind_register_void,_emscripten_dlopen_js:__emscripten_dlopen_js,_emscripten_fs_load_embedded_files:__emscripten_fs_load_embedded_files,_emscripten_get_now_is_monotonic:__emscripten_get_now_is_monotonic,_emscripten_get_progname:__emscripten_get_progname,_emscripten_lookup_name:__emscripten_lookup_name,_emscripten_memcpy_js:__emscripten_memcpy_js,_emscripten_push_main_loop_blocker:__emscripten_push_main_loop_blocker,_emscripten_push_uncounted_main_loop_blocker:__emscripten_push_uncounted_main_loop_blocker,_emscripten_runtime_keepalive_clear:__emscripten_runtime_keepalive_clear,_emscripten_set_offscreencanvas_size:__emscripten_set_offscreencanvas_size,_emscripten_system:__emscripten_system,_emscripten_throw_longjmp:__emscripten_throw_longjmp,_emval_as:__emval_as,_emval_as_int64:__emval_as_int64,_emval_as_uint64:__emval_as_uint64,_emval_call:__emval_call,_emval_call_method:__emval_call_method,_emval_coro_make_promise:__emval_coro_make_promise,_emval_coro_suspend:__emval_coro_suspend,_emval_decref:__emval_decref,_emval_delete:__emval_delete,_emval_equals:__emval_equals,_emval_get_global:__emval_get_global,_emval_get_method_caller:__emval_get_method_caller,_emval_get_module_property:__emval_get_module_property,_emval_get_property:__emval_get_property,_emval_greater_than:__emval_greater_than,_emval_in:__emval_in,_emval_incref:__emval_incref,_emval_instanceof:__emval_instanceof,_emval_is_number:__emval_is_number,_emval_is_string:__emval_is_string,_emval_iter_begin:__emval_iter_begin,_emval_iter_next:__emval_iter_next,_emval_less_than:__emval_less_than,_emval_new_array:__emval_new_array,_emval_new_array_from_memory_view:__emval_new_array_from_memory_view,_emval_new_cstring:__emval_new_cstring,_emval_new_object:__emval_new_object,_emval_new_u16string:__emval_new_u16string,_emval_new_u8string:__emval_new_u8string,_emval_not:__emval_not,_emval_register_symbol:__emval_register_symbol,_emval_run_destructors:__emval_run_destructors,_emval_set_property:__emval_set_property,_emval_strictly_equals:__emval_strictly_equals,_emval_take_value:__emval_take_value,_emval_throw:__emval_throw,_emval_typeof:__emval_typeof,_glGetActiveAttribOrUniform:__glGetActiveAttribOrUniform,_gmtime_js:__gmtime_js,_localtime_js:__localtime_js,_mktime_js:__mktime_js,_mmap_js:__mmap_js,_msync_js:__msync_js,_munmap_js:__munmap_js,_setitimer_js:__setitimer_js,_timegm_js:__timegm_js,_tzset_js:__tzset_js,alBuffer3f:_alBuffer3f,alBuffer3i:_alBuffer3i,alBufferData:_alBufferData,alBufferf:_alBufferf,alBufferfv:_alBufferfv,alBufferi:_alBufferi,alBufferiv:_alBufferiv,alDeleteBuffers:_alDeleteBuffers,alDeleteSources:_alDeleteSources,alDisable:_alDisable,alDistanceModel:_alDistanceModel,alDopplerFactor:_alDopplerFactor,alDopplerVelocity:_alDopplerVelocity,alEnable:_alEnable,alGenBuffers:_alGenBuffers,alGenSources:_alGenSources,alGetBoolean:_alGetBoolean,alGetBooleanv:_alGetBooleanv,alGetBuffer3f:_alGetBuffer3f,alGetBuffer3i:_alGetBuffer3i,alGetBufferf:_alGetBufferf,alGetBufferfv:_alGetBufferfv,alGetBufferi:_alGetBufferi,alGetBufferiv:_alGetBufferiv,alGetDouble:_alGetDouble,alGetDoublev:_alGetDoublev,alGetEnumValue:_alGetEnumValue,alGetError:_alGetError,alGetFloat:_alGetFloat,alGetFloatv:_alGetFloatv,alGetInteger:_alGetInteger,alGetIntegerv:_alGetIntegerv,alGetListener3f:_alGetListener3f,alGetListener3i:_alGetListener3i,alGetListenerf:_alGetListenerf,alGetListenerfv:_alGetListenerfv,alGetListeneri:_alGetListeneri,alGetListeneriv:_alGetListeneriv,alGetSource3f:_alGetSource3f,alGetSource3i:_alGetSource3i,alGetSourcef:_alGetSourcef,alGetSourcefv:_alGetSourcefv,alGetSourcei:_alGetSourcei,alGetSourceiv:_alGetSourceiv,alGetString:_alGetString,alIsBuffer:_alIsBuffer,alIsEnabled:_alIsEnabled,alIsExtensionPresent:_alIsExtensionPresent,alIsSource:_alIsSource,alListener3f:_alListener3f,alListener3i:_alListener3i,alListenerf:_alListenerf,alListenerfv:_alListenerfv,alListeneri:_alListeneri,alListeneriv:_alListeneriv,alSource3f:_alSource3f,alSource3i:_alSource3i,alSourcePause:_alSourcePause,alSourcePausev:_alSourcePausev,alSourcePlay:_alSourcePlay,alSourcePlayv:_alSourcePlayv,alSourceQueueBuffers:_alSourceQueueBuffers,alSourceRewind:_alSourceRewind,alSourceRewindv:_alSourceRewindv,alSourceStop:_alSourceStop,alSourceStopv:_alSourceStopv,alSourceUnqueueBuffers:_alSourceUnqueueBuffers,alSourcef:_alSourcef,alSourcefv:_alSourcefv,alSourcei:_alSourcei,alSourceiv:_alSourceiv,alSpeedOfSound:_alSpeedOfSound,alcCaptureCloseDevice:_alcCaptureCloseDevice,alcCaptureOpenDevice:_alcCaptureOpenDevice,alcCaptureSamples:_alcCaptureSamples,alcCaptureStart:_alcCaptureStart,alcCaptureStop:_alcCaptureStop,alcCloseDevice:_alcCloseDevice,alcCreateContext:_alcCreateContext,alcDestroyContext:_alcDestroyContext,alcGetContextsDevice:_alcGetContextsDevice,alcGetCurrentContext:_alcGetCurrentContext,alcGetEnumValue:_alcGetEnumValue,alcGetError:_alcGetError,alcGetIntegerv:_alcGetIntegerv,alcGetString:_alcGetString,alcIsExtensionPresent:_alcIsExtensionPresent,alcMakeContextCurrent:_alcMakeContextCurrent,alcOpenDevice:_alcOpenDevice,alcProcessContext:_alcProcessContext,alcSuspendContext:_alcSuspendContext,boxColor:_boxColor,boxRGBA:_boxRGBA,clock_res_get:_clock_res_get,clock_time_get:_clock_time_get,duckdb_web_fs_directory_create:_duckdb_web_fs_directory_create,duckdb_web_fs_directory_exists:_duckdb_web_fs_directory_exists,duckdb_web_fs_directory_list_files:_duckdb_web_fs_directory_list_files,duckdb_web_fs_directory_remove:_duckdb_web_fs_directory_remove,duckdb_web_fs_file_close:_duckdb_web_fs_file_close,duckdb_web_fs_file_exists:_duckdb_web_fs_file_exists,duckdb_web_fs_file_get_last_modified_time:_duckdb_web_fs_file_get_last_modified_time,duckdb_web_fs_file_move:_duckdb_web_fs_file_move,duckdb_web_fs_file_open:_duckdb_web_fs_file_open,duckdb_web_fs_file_read:_duckdb_web_fs_file_read,duckdb_web_fs_file_remove:_duckdb_web_fs_file_remove,duckdb_web_fs_file_sync:_duckdb_web_fs_file_sync,duckdb_web_fs_file_truncate:_duckdb_web_fs_file_truncate,duckdb_web_fs_file_write:_duckdb_web_fs_file_write,duckdb_web_fs_get_default_data_protocol:_duckdb_web_fs_get_default_data_protocol,duckdb_web_fs_glob:_duckdb_web_fs_glob,duckdb_web_test_platform_feature:_duckdb_web_test_platform_feature,duckdb_web_udf_scalar_call:_duckdb_web_udf_scalar_call,eglBindAPI:_eglBindAPI,eglChooseConfig:_eglChooseConfig,eglCreateContext:_eglCreateContext,eglCreateWindowSurface:_eglCreateWindowSurface,eglDestroyContext:_eglDestroyContext,eglDestroySurface:_eglDestroySurface,eglGetConfigAttrib:_eglGetConfigAttrib,eglGetConfigs:_eglGetConfigs,eglGetCurrentContext:_eglGetCurrentContext,eglGetCurrentDisplay:_eglGetCurrentDisplay,eglGetCurrentSurface:_eglGetCurrentSurface,eglGetDisplay:_eglGetDisplay,eglGetError:_eglGetError,eglInitialize:_eglInitialize,eglMakeCurrent:_eglMakeCurrent,eglQueryAPI:_eglQueryAPI,eglQueryContext:_eglQueryContext,eglQueryString:_eglQueryString,eglQuerySurface:_eglQuerySurface,eglReleaseThread:_eglReleaseThread,eglSwapBuffers:_eglSwapBuffers,eglSwapInterval:_eglSwapInterval,eglTerminate:_eglTerminate,eglWaitClient:_eglWaitClient,eglWaitGL:_eglWaitGL,eglWaitNative:_eglWaitNative,ellipseColor:_ellipseColor,ellipseRGBA:_ellipseRGBA,emscripten_SDL_SetEventHandler:_emscripten_SDL_SetEventHandler,emscripten_alcDevicePauseSOFT:_emscripten_alcDevicePauseSOFT,emscripten_alcDeviceResumeSOFT:_emscripten_alcDeviceResumeSOFT,emscripten_alcGetStringiSOFT:_emscripten_alcGetStringiSOFT,emscripten_alcResetDeviceSOFT:_emscripten_alcResetDeviceSOFT,emscripten_asm_const_async_on_main_thread:_emscripten_asm_const_async_on_main_thread,emscripten_asm_const_double:_emscripten_asm_const_double,emscripten_asm_const_double_sync_on_main_thread:_emscripten_asm_const_double_sync_on_main_thread,emscripten_asm_const_int:_emscripten_asm_const_int,emscripten_asm_const_int_sync_on_main_thread:_emscripten_asm_const_int_sync_on_main_thread,emscripten_asm_const_ptr:_emscripten_asm_const_ptr,emscripten_asm_const_ptr_sync_on_main_thread:_emscripten_asm_const_ptr_sync_on_main_thread,emscripten_async_call:_emscripten_async_call,emscripten_async_load_script:_emscripten_async_load_script,emscripten_async_run_script:_emscripten_async_run_script,emscripten_async_wget:_emscripten_async_wget,emscripten_async_wget2:_emscripten_async_wget2,emscripten_async_wget2_abort:_emscripten_async_wget2_abort,emscripten_async_wget2_data:_emscripten_async_wget2_data,emscripten_async_wget_data:_emscripten_async_wget_data,emscripten_call_worker:_emscripten_call_worker,emscripten_cancel_animation_frame:_emscripten_cancel_animation_frame,emscripten_cancel_main_loop:_emscripten_cancel_main_loop,emscripten_clear_immediate:_emscripten_clear_immediate,emscripten_clear_interval:_emscripten_clear_interval,emscripten_clear_timeout:_emscripten_clear_timeout,emscripten_console_error:_emscripten_console_error,emscripten_console_log:_emscripten_console_log,emscripten_console_trace:_emscripten_console_trace,emscripten_console_warn:_emscripten_console_warn,emscripten_create_worker:_emscripten_create_worker,emscripten_date_now:_emscripten_date_now,emscripten_debugger:_emscripten_debugger,emscripten_destroy_worker:_emscripten_destroy_worker,emscripten_enter_soft_fullscreen:_emscripten_enter_soft_fullscreen,emscripten_err:_emscripten_err,emscripten_errn:_emscripten_errn,emscripten_exit_fullscreen:_emscripten_exit_fullscreen,emscripten_exit_pointerlock:_emscripten_exit_pointerlock,emscripten_exit_soft_fullscreen:_emscripten_exit_soft_fullscreen,emscripten_exit_with_live_runtime:_emscripten_exit_with_live_runtime,emscripten_fiber_swap:_emscripten_fiber_swap,emscripten_force_exit:_emscripten_force_exit,emscripten_get_battery_status:_emscripten_get_battery_status,emscripten_get_callstack:_emscripten_get_callstack,emscripten_get_canvas_element_size:_emscripten_get_canvas_element_size,emscripten_get_canvas_size:_emscripten_get_canvas_size,emscripten_get_compiler_setting:_emscripten_get_compiler_setting,emscripten_get_device_pixel_ratio:_emscripten_get_device_pixel_ratio,emscripten_get_devicemotion_status:_emscripten_get_devicemotion_status,emscripten_get_deviceorientation_status:_emscripten_get_deviceorientation_status,emscripten_get_element_css_size:_emscripten_get_element_css_size,emscripten_get_fullscreen_status:_emscripten_get_fullscreen_status,emscripten_get_gamepad_status:_emscripten_get_gamepad_status,emscripten_get_heap_max:_emscripten_get_heap_max,emscripten_get_main_loop_timing:_emscripten_get_main_loop_timing,emscripten_get_mouse_status:_emscripten_get_mouse_status,emscripten_get_now:_emscripten_get_now,emscripten_get_now_res:_emscripten_get_now_res,emscripten_get_num_gamepads:_emscripten_get_num_gamepads,emscripten_get_orientation_status:_emscripten_get_orientation_status,emscripten_get_pointerlock_status:_emscripten_get_pointerlock_status,emscripten_get_preloaded_image_data:_emscripten_get_preloaded_image_data,emscripten_get_preloaded_image_data_from_FILE:_emscripten_get_preloaded_image_data_from_FILE,emscripten_get_screen_size:_emscripten_get_screen_size,emscripten_get_visibility_status:_emscripten_get_visibility_status,emscripten_get_window_title:_emscripten_get_window_title,emscripten_get_worker_queue_size:_emscripten_get_worker_queue_size,emscripten_glActiveTexture:_emscripten_glActiveTexture,emscripten_glAttachShader:_emscripten_glAttachShader,emscripten_glBegin:_emscripten_glBegin,emscripten_glBeginQueryEXT:_emscripten_glBeginQueryEXT,emscripten_glBindAttribLocation:_emscripten_glBindAttribLocation,emscripten_glBindBuffer:_emscripten_glBindBuffer,emscripten_glBindFramebuffer:_emscripten_glBindFramebuffer,emscripten_glBindRenderbuffer:_emscripten_glBindRenderbuffer,emscripten_glBindTexture:_emscripten_glBindTexture,emscripten_glBindVertexArray:_emscripten_glBindVertexArray,emscripten_glBindVertexArrayOES:_emscripten_glBindVertexArrayOES,emscripten_glBlendColor:_emscripten_glBlendColor,emscripten_glBlendEquation:_emscripten_glBlendEquation,emscripten_glBlendEquationSeparate:_emscripten_glBlendEquationSeparate,emscripten_glBlendFunc:_emscripten_glBlendFunc,emscripten_glBlendFuncSeparate:_emscripten_glBlendFuncSeparate,emscripten_glBufferData:_emscripten_glBufferData,emscripten_glBufferSubData:_emscripten_glBufferSubData,emscripten_glCheckFramebufferStatus:_emscripten_glCheckFramebufferStatus,emscripten_glClear:_emscripten_glClear,emscripten_glClearColor:_emscripten_glClearColor,emscripten_glClearDepth:_emscripten_glClearDepth,emscripten_glClearDepthf:_emscripten_glClearDepthf,emscripten_glClearStencil:_emscripten_glClearStencil,emscripten_glClipControlEXT:_emscripten_glClipControlEXT,emscripten_glColorMask:_emscripten_glColorMask,emscripten_glCompileShader:_emscripten_glCompileShader,emscripten_glCompressedTexImage2D:_emscripten_glCompressedTexImage2D,emscripten_glCompressedTexSubImage2D:_emscripten_glCompressedTexSubImage2D,emscripten_glCopyTexImage2D:_emscripten_glCopyTexImage2D,emscripten_glCopyTexSubImage2D:_emscripten_glCopyTexSubImage2D,emscripten_glCreateProgram:_emscripten_glCreateProgram,emscripten_glCreateShader:_emscripten_glCreateShader,emscripten_glCullFace:_emscripten_glCullFace,emscripten_glDeleteBuffers:_emscripten_glDeleteBuffers,emscripten_glDeleteFramebuffers:_emscripten_glDeleteFramebuffers,emscripten_glDeleteProgram:_emscripten_glDeleteProgram,emscripten_glDeleteQueriesEXT:_emscripten_glDeleteQueriesEXT,emscripten_glDeleteRenderbuffers:_emscripten_glDeleteRenderbuffers,emscripten_glDeleteShader:_emscripten_glDeleteShader,emscripten_glDeleteTextures:_emscripten_glDeleteTextures,emscripten_glDeleteVertexArrays:_emscripten_glDeleteVertexArrays,emscripten_glDeleteVertexArraysOES:_emscripten_glDeleteVertexArraysOES,emscripten_glDepthFunc:_emscripten_glDepthFunc,emscripten_glDepthMask:_emscripten_glDepthMask,emscripten_glDepthRange:_emscripten_glDepthRange,emscripten_glDepthRangef:_emscripten_glDepthRangef,emscripten_glDetachShader:_emscripten_glDetachShader,emscripten_glDisable:_emscripten_glDisable,emscripten_glDisableVertexAttribArray:_emscripten_glDisableVertexAttribArray,emscripten_glDrawArrays:_emscripten_glDrawArrays,emscripten_glDrawArraysInstanced:_emscripten_glDrawArraysInstanced,emscripten_glDrawArraysInstancedANGLE:_emscripten_glDrawArraysInstancedANGLE,emscripten_glDrawArraysInstancedARB:_emscripten_glDrawArraysInstancedARB,emscripten_glDrawArraysInstancedEXT:_emscripten_glDrawArraysInstancedEXT,emscripten_glDrawArraysInstancedNV:_emscripten_glDrawArraysInstancedNV,emscripten_glDrawBuffers:_emscripten_glDrawBuffers,emscripten_glDrawBuffersEXT:_emscripten_glDrawBuffersEXT,emscripten_glDrawBuffersWEBGL:_emscripten_glDrawBuffersWEBGL,emscripten_glDrawElements:_emscripten_glDrawElements,emscripten_glDrawElementsInstanced:_emscripten_glDrawElementsInstanced,emscripten_glDrawElementsInstancedANGLE:_emscripten_glDrawElementsInstancedANGLE,emscripten_glDrawElementsInstancedARB:_emscripten_glDrawElementsInstancedARB,emscripten_glDrawElementsInstancedEXT:_emscripten_glDrawElementsInstancedEXT,emscripten_glDrawElementsInstancedNV:_emscripten_glDrawElementsInstancedNV,emscripten_glEnable:_emscripten_glEnable,emscripten_glEnableVertexAttribArray:_emscripten_glEnableVertexAttribArray,emscripten_glEndQueryEXT:_emscripten_glEndQueryEXT,emscripten_glFinish:_emscripten_glFinish,emscripten_glFlush:_emscripten_glFlush,emscripten_glFramebufferRenderbuffer:_emscripten_glFramebufferRenderbuffer,emscripten_glFramebufferTexture2D:_emscripten_glFramebufferTexture2D,emscripten_glFrontFace:_emscripten_glFrontFace,emscripten_glGenBuffers:_emscripten_glGenBuffers,emscripten_glGenFramebuffers:_emscripten_glGenFramebuffers,emscripten_glGenQueriesEXT:_emscripten_glGenQueriesEXT,emscripten_glGenRenderbuffers:_emscripten_glGenRenderbuffers,emscripten_glGenTextures:_emscripten_glGenTextures,emscripten_glGenVertexArrays:_emscripten_glGenVertexArrays,emscripten_glGenVertexArraysOES:_emscripten_glGenVertexArraysOES,emscripten_glGenerateMipmap:_emscripten_glGenerateMipmap,emscripten_glGetActiveAttrib:_emscripten_glGetActiveAttrib,emscripten_glGetActiveUniform:_emscripten_glGetActiveUniform,emscripten_glGetAttachedShaders:_emscripten_glGetAttachedShaders,emscripten_glGetAttribLocation:_emscripten_glGetAttribLocation,emscripten_glGetBooleanv:_emscripten_glGetBooleanv,emscripten_glGetBufferParameteriv:_emscripten_glGetBufferParameteriv,emscripten_glGetError:_emscripten_glGetError,emscripten_glGetFloatv:_emscripten_glGetFloatv,emscripten_glGetFramebufferAttachmentParameteriv:_emscripten_glGetFramebufferAttachmentParameteriv,emscripten_glGetIntegerv:_emscripten_glGetIntegerv,emscripten_glGetProgramInfoLog:_emscripten_glGetProgramInfoLog,emscripten_glGetProgramiv:_emscripten_glGetProgramiv,emscripten_glGetQueryObjecti64vEXT:_emscripten_glGetQueryObjecti64vEXT,emscripten_glGetQueryObjectivEXT:_emscripten_glGetQueryObjectivEXT,emscripten_glGetQueryObjectui64vEXT:_emscripten_glGetQueryObjectui64vEXT,emscripten_glGetQueryObjectuivEXT:_emscripten_glGetQueryObjectuivEXT,emscripten_glGetQueryivEXT:_emscripten_glGetQueryivEXT,emscripten_glGetRenderbufferParameteriv:_emscripten_glGetRenderbufferParameteriv,emscripten_glGetShaderInfoLog:_emscripten_glGetShaderInfoLog,emscripten_glGetShaderPrecisionFormat:_emscripten_glGetShaderPrecisionFormat,emscripten_glGetShaderSource:_emscripten_glGetShaderSource,emscripten_glGetShaderiv:_emscripten_glGetShaderiv,emscripten_glGetString:_emscripten_glGetString,emscripten_glGetTexParameterfv:_emscripten_glGetTexParameterfv,emscripten_glGetTexParameteriv:_emscripten_glGetTexParameteriv,emscripten_glGetUniformLocation:_emscripten_glGetUniformLocation,emscripten_glGetUniformfv:_emscripten_glGetUniformfv,emscripten_glGetUniformiv:_emscripten_glGetUniformiv,emscripten_glGetVertexAttribPointerv:_emscripten_glGetVertexAttribPointerv,emscripten_glGetVertexAttribfv:_emscripten_glGetVertexAttribfv,emscripten_glGetVertexAttribiv:_emscripten_glGetVertexAttribiv,emscripten_glHint:_emscripten_glHint,emscripten_glIsBuffer:_emscripten_glIsBuffer,emscripten_glIsEnabled:_emscripten_glIsEnabled,emscripten_glIsFramebuffer:_emscripten_glIsFramebuffer,emscripten_glIsProgram:_emscripten_glIsProgram,emscripten_glIsQueryEXT:_emscripten_glIsQueryEXT,emscripten_glIsRenderbuffer:_emscripten_glIsRenderbuffer,emscripten_glIsShader:_emscripten_glIsShader,emscripten_glIsTexture:_emscripten_glIsTexture,emscripten_glIsVertexArray:_emscripten_glIsVertexArray,emscripten_glIsVertexArrayOES:_emscripten_glIsVertexArrayOES,emscripten_glLineWidth:_emscripten_glLineWidth,emscripten_glLinkProgram:_emscripten_glLinkProgram,emscripten_glLoadIdentity:_emscripten_glLoadIdentity,emscripten_glMatrixMode:_emscripten_glMatrixMode,emscripten_glMultiDrawArrays:_emscripten_glMultiDrawArrays,emscripten_glMultiDrawArraysANGLE:_emscripten_glMultiDrawArraysANGLE,emscripten_glMultiDrawArraysInstancedANGLE:_emscripten_glMultiDrawArraysInstancedANGLE,emscripten_glMultiDrawArraysInstancedWEBGL:_emscripten_glMultiDrawArraysInstancedWEBGL,emscripten_glMultiDrawArraysWEBGL:_emscripten_glMultiDrawArraysWEBGL,emscripten_glMultiDrawElements:_emscripten_glMultiDrawElements,emscripten_glMultiDrawElementsANGLE:_emscripten_glMultiDrawElementsANGLE,emscripten_glMultiDrawElementsInstancedANGLE:_emscripten_glMultiDrawElementsInstancedANGLE,emscripten_glMultiDrawElementsInstancedWEBGL:_emscripten_glMultiDrawElementsInstancedWEBGL,emscripten_glMultiDrawElementsWEBGL:_emscripten_glMultiDrawElementsWEBGL,emscripten_glPixelStorei:_emscripten_glPixelStorei,emscripten_glPolygonModeWEBGL:_emscripten_glPolygonModeWEBGL,emscripten_glPolygonOffset:_emscripten_glPolygonOffset,emscripten_glPolygonOffsetClampEXT:_emscripten_glPolygonOffsetClampEXT,emscripten_glQueryCounterEXT:_emscripten_glQueryCounterEXT,emscripten_glReadPixels:_emscripten_glReadPixels,emscripten_glReleaseShaderCompiler:_emscripten_glReleaseShaderCompiler,emscripten_glRenderbufferStorage:_emscripten_glRenderbufferStorage,emscripten_glSampleCoverage:_emscripten_glSampleCoverage,emscripten_glScissor:_emscripten_glScissor,emscripten_glShaderBinary:_emscripten_glShaderBinary,emscripten_glShaderSource:_emscripten_glShaderSource,emscripten_glStencilFunc:_emscripten_glStencilFunc,emscripten_glStencilFuncSeparate:_emscripten_glStencilFuncSeparate,emscripten_glStencilMask:_emscripten_glStencilMask,emscripten_glStencilMaskSeparate:_emscripten_glStencilMaskSeparate,emscripten_glStencilOp:_emscripten_glStencilOp,emscripten_glStencilOpSeparate:_emscripten_glStencilOpSeparate,emscripten_glTexImage2D:_emscripten_glTexImage2D,emscripten_glTexParameterf:_emscripten_glTexParameterf,emscripten_glTexParameterfv:_emscripten_glTexParameterfv,emscripten_glTexParameteri:_emscripten_glTexParameteri,emscripten_glTexParameteriv:_emscripten_glTexParameteriv,emscripten_glTexSubImage2D:_emscripten_glTexSubImage2D,emscripten_glUniform1f:_emscripten_glUniform1f,emscripten_glUniform1fv:_emscripten_glUniform1fv,emscripten_glUniform1i:_emscripten_glUniform1i,emscripten_glUniform1iv:_emscripten_glUniform1iv,emscripten_glUniform2f:_emscripten_glUniform2f,emscripten_glUniform2fv:_emscripten_glUniform2fv,emscripten_glUniform2i:_emscripten_glUniform2i,emscripten_glUniform2iv:_emscripten_glUniform2iv,emscripten_glUniform3f:_emscripten_glUniform3f,emscripten_glUniform3fv:_emscripten_glUniform3fv,emscripten_glUniform3i:_emscripten_glUniform3i,emscripten_glUniform3iv:_emscripten_glUniform3iv,emscripten_glUniform4f:_emscripten_glUniform4f,emscripten_glUniform4fv:_emscripten_glUniform4fv,emscripten_glUniform4i:_emscripten_glUniform4i,emscripten_glUniform4iv:_emscripten_glUniform4iv,emscripten_glUniformMatrix2fv:_emscripten_glUniformMatrix2fv,emscripten_glUniformMatrix3fv:_emscripten_glUniformMatrix3fv,emscripten_glUniformMatrix4fv:_emscripten_glUniformMatrix4fv,emscripten_glUseProgram:_emscripten_glUseProgram,emscripten_glValidateProgram:_emscripten_glValidateProgram,emscripten_glVertexAttrib1f:_emscripten_glVertexAttrib1f,emscripten_glVertexAttrib1fv:_emscripten_glVertexAttrib1fv,emscripten_glVertexAttrib2f:_emscripten_glVertexAttrib2f,emscripten_glVertexAttrib2fv:_emscripten_glVertexAttrib2fv,emscripten_glVertexAttrib3f:_emscripten_glVertexAttrib3f,emscripten_glVertexAttrib3fv:_emscripten_glVertexAttrib3fv,emscripten_glVertexAttrib4f:_emscripten_glVertexAttrib4f,emscripten_glVertexAttrib4fv:_emscripten_glVertexAttrib4fv,emscripten_glVertexAttribDivisor:_emscripten_glVertexAttribDivisor,emscripten_glVertexAttribDivisorANGLE:_emscripten_glVertexAttribDivisorANGLE,emscripten_glVertexAttribDivisorARB:_emscripten_glVertexAttribDivisorARB,emscripten_glVertexAttribDivisorEXT:_emscripten_glVertexAttribDivisorEXT,emscripten_glVertexAttribDivisorNV:_emscripten_glVertexAttribDivisorNV,emscripten_glVertexAttribPointer:_emscripten_glVertexAttribPointer,emscripten_glVertexPointer:_emscripten_glVertexPointer,emscripten_glViewport:_emscripten_glViewport,emscripten_has_asyncify:_emscripten_has_asyncify,emscripten_hide_mouse:_emscripten_hide_mouse,emscripten_html5_remove_all_event_listeners:_emscripten_html5_remove_all_event_listeners,emscripten_idb_async_clear:_emscripten_idb_async_clear,emscripten_idb_async_delete:_emscripten_idb_async_delete,emscripten_idb_async_exists:_emscripten_idb_async_exists,emscripten_idb_async_load:_emscripten_idb_async_load,emscripten_idb_async_store:_emscripten_idb_async_store,emscripten_idb_clear:_emscripten_idb_clear,emscripten_idb_delete:_emscripten_idb_delete,emscripten_idb_exists:_emscripten_idb_exists,emscripten_idb_load:_emscripten_idb_load,emscripten_idb_store:_emscripten_idb_store,emscripten_is_main_browser_thread:_emscripten_is_main_browser_thread,emscripten_is_webgl_context_lost:_emscripten_is_webgl_context_lost,emscripten_lock_orientation:_emscripten_lock_orientation,emscripten_log:_emscripten_log,emscripten_math_acos:_emscripten_math_acos,emscripten_math_acosh:_emscripten_math_acosh,emscripten_math_asin:_emscripten_math_asin,emscripten_math_asinh:_emscripten_math_asinh,emscripten_math_atan:_emscripten_math_atan,emscripten_math_atan2:_emscripten_math_atan2,emscripten_math_atanh:_emscripten_math_atanh,emscripten_math_cbrt:_emscripten_math_cbrt,emscripten_math_cos:_emscripten_math_cos,emscripten_math_cosh:_emscripten_math_cosh,emscripten_math_exp:_emscripten_math_exp,emscripten_math_expm1:_emscripten_math_expm1,emscripten_math_fmod:_emscripten_math_fmod,emscripten_math_hypot:_emscripten_math_hypot,emscripten_math_log:_emscripten_math_log,emscripten_math_log10:_emscripten_math_log10,emscripten_math_log1p:_emscripten_math_log1p,emscripten_math_log2:_emscripten_math_log2,emscripten_math_pow:_emscripten_math_pow,emscripten_math_random:_emscripten_math_random,emscripten_math_round:_emscripten_math_round,emscripten_math_sign:_emscripten_math_sign,emscripten_math_sin:_emscripten_math_sin,emscripten_math_sinh:_emscripten_math_sinh,emscripten_math_sqrt:_emscripten_math_sqrt,emscripten_math_tan:_emscripten_math_tan,emscripten_math_tanh:_emscripten_math_tanh,emscripten_notify_memory_growth:_emscripten_notify_memory_growth,emscripten_out:_emscripten_out,emscripten_outn:_emscripten_outn,emscripten_pause_main_loop:_emscripten_pause_main_loop,emscripten_pc_get_column:_emscripten_pc_get_column,emscripten_pc_get_file:_emscripten_pc_get_file,emscripten_pc_get_function:_emscripten_pc_get_function,emscripten_pc_get_line:_emscripten_pc_get_line,emscripten_performance_now:_emscripten_performance_now,emscripten_print_double:_emscripten_print_double,emscripten_promise_all:_emscripten_promise_all,emscripten_promise_all_settled:_emscripten_promise_all_settled,emscripten_promise_any:_emscripten_promise_any,emscripten_promise_await:_emscripten_promise_await,emscripten_promise_create:_emscripten_promise_create,emscripten_promise_destroy:_emscripten_promise_destroy,emscripten_promise_race:_emscripten_promise_race,emscripten_promise_resolve:_emscripten_promise_resolve,emscripten_promise_then:_emscripten_promise_then,emscripten_random:_emscripten_random,emscripten_request_animation_frame:_emscripten_request_animation_frame,emscripten_request_animation_frame_loop:_emscripten_request_animation_frame_loop,emscripten_request_fullscreen:_emscripten_request_fullscreen,emscripten_request_fullscreen_strategy:_emscripten_request_fullscreen_strategy,emscripten_request_pointerlock:_emscripten_request_pointerlock,emscripten_resize_heap:_emscripten_resize_heap,emscripten_resume_main_loop:_emscripten_resume_main_loop,emscripten_return_address:_emscripten_return_address,emscripten_run_preload_plugins:_emscripten_run_preload_plugins,emscripten_run_preload_plugins_data:_emscripten_run_preload_plugins_data,emscripten_run_script:_emscripten_run_script,emscripten_run_script_int:_emscripten_run_script_int,emscripten_run_script_string:_emscripten_run_script_string,emscripten_runtime_keepalive_check:_emscripten_runtime_keepalive_check,emscripten_runtime_keepalive_pop:_emscripten_runtime_keepalive_pop,emscripten_runtime_keepalive_push:_emscripten_runtime_keepalive_push,emscripten_sample_gamepad_data:_emscripten_sample_gamepad_data,emscripten_scan_registers:_emscripten_scan_registers,emscripten_set_batterychargingchange_callback_on_thread:_emscripten_set_batterychargingchange_callback_on_thread,emscripten_set_batterylevelchange_callback_on_thread:_emscripten_set_batterylevelchange_callback_on_thread,emscripten_set_beforeunload_callback_on_thread:_emscripten_set_beforeunload_callback_on_thread,emscripten_set_blur_callback_on_thread:_emscripten_set_blur_callback_on_thread,emscripten_set_canvas_element_size:_emscripten_set_canvas_element_size,emscripten_set_canvas_size:_emscripten_set_canvas_size,emscripten_set_click_callback_on_thread:_emscripten_set_click_callback_on_thread,emscripten_set_dblclick_callback_on_thread:_emscripten_set_dblclick_callback_on_thread,emscripten_set_devicemotion_callback_on_thread:_emscripten_set_devicemotion_callback_on_thread,emscripten_set_deviceorientation_callback_on_thread:_emscripten_set_deviceorientation_callback_on_thread,emscripten_set_element_css_size:_emscripten_set_element_css_size,emscripten_set_focus_callback_on_thread:_emscripten_set_focus_callback_on_thread,emscripten_set_focusin_callback_on_thread:_emscripten_set_focusin_callback_on_thread,emscripten_set_focusout_callback_on_thread:_emscripten_set_focusout_callback_on_thread,emscripten_set_fullscreenchange_callback_on_thread:_emscripten_set_fullscreenchange_callback_on_thread,emscripten_set_gamepadconnected_callback_on_thread:_emscripten_set_gamepadconnected_callback_on_thread,emscripten_set_gamepaddisconnected_callback_on_thread:_emscripten_set_gamepaddisconnected_callback_on_thread,emscripten_set_immediate:_emscripten_set_immediate,emscripten_set_immediate_loop:_emscripten_set_immediate_loop,emscripten_set_interval:_emscripten_set_interval,emscripten_set_keydown_callback_on_thread:_emscripten_set_keydown_callback_on_thread,emscripten_set_keypress_callback_on_thread:_emscripten_set_keypress_callback_on_thread,emscripten_set_keyup_callback_on_thread:_emscripten_set_keyup_callback_on_thread,emscripten_set_main_loop:_emscripten_set_main_loop,emscripten_set_main_loop_arg:_emscripten_set_main_loop_arg,emscripten_set_main_loop_expected_blockers:_emscripten_set_main_loop_expected_blockers,emscripten_set_main_loop_timing:_emscripten_set_main_loop_timing,emscripten_set_mousedown_callback_on_thread:_emscripten_set_mousedown_callback_on_thread,emscripten_set_mouseenter_callback_on_thread:_emscripten_set_mouseenter_callback_on_thread,emscripten_set_mouseleave_callback_on_thread:_emscripten_set_mouseleave_callback_on_thread,emscripten_set_mousemove_callback_on_thread:_emscripten_set_mousemove_callback_on_thread,emscripten_set_mouseout_callback_on_thread:_emscripten_set_mouseout_callback_on_thread,emscripten_set_mouseover_callback_on_thread:_emscripten_set_mouseover_callback_on_thread,emscripten_set_mouseup_callback_on_thread:_emscripten_set_mouseup_callback_on_thread,emscripten_set_orientationchange_callback_on_thread:_emscripten_set_orientationchange_callback_on_thread,emscripten_set_pointerlockchange_callback_on_thread:_emscripten_set_pointerlockchange_callback_on_thread,emscripten_set_pointerlockerror_callback_on_thread:_emscripten_set_pointerlockerror_callback_on_thread,emscripten_set_resize_callback_on_thread:_emscripten_set_resize_callback_on_thread,emscripten_set_scroll_callback_on_thread:_emscripten_set_scroll_callback_on_thread,emscripten_set_socket_close_callback:_emscripten_set_socket_close_callback,emscripten_set_socket_connection_callback:_emscripten_set_socket_connection_callback,emscripten_set_socket_error_callback:_emscripten_set_socket_error_callback,emscripten_set_socket_listen_callback:_emscripten_set_socket_listen_callback,emscripten_set_socket_message_callback:_emscripten_set_socket_message_callback,emscripten_set_socket_open_callback:_emscripten_set_socket_open_callback,emscripten_set_timeout:_emscripten_set_timeout,emscripten_set_timeout_loop:_emscripten_set_timeout_loop,emscripten_set_touchcancel_callback_on_thread:_emscripten_set_touchcancel_callback_on_thread,emscripten_set_touchend_callback_on_thread:_emscripten_set_touchend_callback_on_thread,emscripten_set_touchmove_callback_on_thread:_emscripten_set_touchmove_callback_on_thread,emscripten_set_touchstart_callback_on_thread:_emscripten_set_touchstart_callback_on_thread,emscripten_set_visibilitychange_callback_on_thread:_emscripten_set_visibilitychange_callback_on_thread,emscripten_set_webglcontextlost_callback_on_thread:_emscripten_set_webglcontextlost_callback_on_thread,emscripten_set_webglcontextrestored_callback_on_thread:_emscripten_set_webglcontextrestored_callback_on_thread,emscripten_set_wheel_callback_on_thread:_emscripten_set_wheel_callback_on_thread,emscripten_set_window_title:_emscripten_set_window_title,emscripten_sleep:_emscripten_sleep,emscripten_stack_snapshot:_emscripten_stack_snapshot,emscripten_stack_unwind_buffer:_emscripten_stack_unwind_buffer,emscripten_supports_offscreencanvas:_emscripten_supports_offscreencanvas,emscripten_throw_number:_emscripten_throw_number,emscripten_throw_string:_emscripten_throw_string,emscripten_unlock_orientation:_emscripten_unlock_orientation,emscripten_unwind_to_js_event_loop:_emscripten_unwind_to_js_event_loop,emscripten_vibrate:_emscripten_vibrate,emscripten_vibrate_pattern:_emscripten_vibrate_pattern,emscripten_webgl_commit_frame:_emscripten_webgl_commit_frame,emscripten_webgl_create_context:_emscripten_webgl_create_context,emscripten_webgl_destroy_context:_emscripten_webgl_destroy_context,emscripten_webgl_do_commit_frame:_emscripten_webgl_do_commit_frame,emscripten_webgl_do_create_context:_emscripten_webgl_do_create_context,emscripten_webgl_do_get_current_context:_emscripten_webgl_do_get_current_context,emscripten_webgl_enable_ANGLE_instanced_arrays:_emscripten_webgl_enable_ANGLE_instanced_arrays,emscripten_webgl_enable_EXT_clip_control:_emscripten_webgl_enable_EXT_clip_control,emscripten_webgl_enable_EXT_polygon_offset_clamp:_emscripten_webgl_enable_EXT_polygon_offset_clamp,emscripten_webgl_enable_OES_vertex_array_object:_emscripten_webgl_enable_OES_vertex_array_object,emscripten_webgl_enable_WEBGL_draw_buffers:_emscripten_webgl_enable_WEBGL_draw_buffers,emscripten_webgl_enable_WEBGL_multi_draw:_emscripten_webgl_enable_WEBGL_multi_draw,emscripten_webgl_enable_WEBGL_polygon_mode:_emscripten_webgl_enable_WEBGL_polygon_mode,emscripten_webgl_enable_extension:_emscripten_webgl_enable_extension,emscripten_webgl_get_context_attributes:_emscripten_webgl_get_context_attributes,emscripten_webgl_get_current_context:_emscripten_webgl_get_current_context,emscripten_webgl_get_drawing_buffer_size:_emscripten_webgl_get_drawing_buffer_size,emscripten_webgl_get_parameter_d:_emscripten_webgl_get_parameter_d,emscripten_webgl_get_parameter_i64v:_emscripten_webgl_get_parameter_i64v,emscripten_webgl_get_parameter_o:_emscripten_webgl_get_parameter_o,emscripten_webgl_get_parameter_utf8:_emscripten_webgl_get_parameter_utf8,emscripten_webgl_get_parameter_v:_emscripten_webgl_get_parameter_v,emscripten_webgl_get_program_info_log_utf8:_emscripten_webgl_get_program_info_log_utf8,emscripten_webgl_get_program_parameter_d:_emscripten_webgl_get_program_parameter_d,emscripten_webgl_get_shader_info_log_utf8:_emscripten_webgl_get_shader_info_log_utf8,emscripten_webgl_get_shader_parameter_d:_emscripten_webgl_get_shader_parameter_d,emscripten_webgl_get_shader_source_utf8:_emscripten_webgl_get_shader_source_utf8,emscripten_webgl_get_supported_extensions:_emscripten_webgl_get_supported_extensions,emscripten_webgl_get_uniform_d:_emscripten_webgl_get_uniform_d,emscripten_webgl_get_uniform_v:_emscripten_webgl_get_uniform_v,emscripten_webgl_get_vertex_attrib_d:_emscripten_webgl_get_vertex_attrib_d,emscripten_webgl_get_vertex_attrib_o:_emscripten_webgl_get_vertex_attrib_o,emscripten_webgl_get_vertex_attrib_v:_emscripten_webgl_get_vertex_attrib_v,emscripten_webgl_make_context_current:_emscripten_webgl_make_context_current,emscripten_wget_data:_emscripten_wget_data,endprotoent:_endprotoent,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,exit:_exit,fd_close:_fd_close,fd_fdstat_get:_fd_fdstat_get,fd_pread:_fd_pread,fd_pwrite:_fd_pwrite,fd_read:_fd_read,fd_seek:_fd_seek,fd_sync:_fd_sync,fd_write:_fd_write,filledEllipseColor:_filledEllipseColor,filledEllipseRGBA:_filledEllipseRGBA,getaddrinfo:_getaddrinfo,getentropy:_getentropy,getnameinfo:_getnameinfo,getprotobyname:_getprotobyname,getprotobynumber:_getprotobynumber,getprotoent:_getprotoent,glActiveTexture:_glActiveTexture,glAttachShader:_glAttachShader,glBegin:_glBegin,glBeginQueryEXT:_glBeginQueryEXT,glBindAttribLocation:_glBindAttribLocation,glBindBuffer:_glBindBuffer,glBindFramebuffer:_glBindFramebuffer,glBindRenderbuffer:_glBindRenderbuffer,glBindTexture:_glBindTexture,glBindVertexArray:_glBindVertexArray,glBindVertexArrayOES:_glBindVertexArrayOES,glBlendColor:_glBlendColor,glBlendEquation:_glBlendEquation,glBlendEquationSeparate:_glBlendEquationSeparate,glBlendFunc:_glBlendFunc,glBlendFuncSeparate:_glBlendFuncSeparate,glBufferData:_glBufferData,glBufferSubData:_glBufferSubData,glCheckFramebufferStatus:_glCheckFramebufferStatus,glClear:_glClear,glClearColor:_glClearColor,glClearDepth:_glClearDepth,glClearDepthf:_glClearDepthf,glClearStencil:_glClearStencil,glClipControlEXT:_glClipControlEXT,glColorMask:_glColorMask,glCompileShader:_glCompileShader,glCompressedTexImage2D:_glCompressedTexImage2D,glCompressedTexSubImage2D:_glCompressedTexSubImage2D,glCopyTexImage2D:_glCopyTexImage2D,glCopyTexSubImage2D:_glCopyTexSubImage2D,glCreateProgram:_glCreateProgram,glCreateShader:_glCreateShader,glCullFace:_glCullFace,glDeleteBuffers:_glDeleteBuffers,glDeleteFramebuffers:_glDeleteFramebuffers,glDeleteProgram:_glDeleteProgram,glDeleteQueriesEXT:_glDeleteQueriesEXT,glDeleteRenderbuffers:_glDeleteRenderbuffers,glDeleteShader:_glDeleteShader,glDeleteTextures:_glDeleteTextures,glDeleteVertexArrays:_glDeleteVertexArrays,glDeleteVertexArraysOES:_glDeleteVertexArraysOES,glDepthFunc:_glDepthFunc,glDepthMask:_glDepthMask,glDepthRange:_glDepthRange,glDepthRangef:_glDepthRangef,glDetachShader:_glDetachShader,glDisable:_glDisable,glDisableVertexAttribArray:_glDisableVertexAttribArray,glDrawArrays:_glDrawArrays,glDrawArraysInstanced:_glDrawArraysInstanced,glDrawArraysInstancedANGLE:_glDrawArraysInstancedANGLE,glDrawArraysInstancedARB:_glDrawArraysInstancedARB,glDrawArraysInstancedEXT:_glDrawArraysInstancedEXT,glDrawArraysInstancedNV:_glDrawArraysInstancedNV,glDrawBuffers:_glDrawBuffers,glDrawBuffersEXT:_glDrawBuffersEXT,glDrawBuffersWEBGL:_glDrawBuffersWEBGL,glDrawElements:_glDrawElements,glDrawElementsInstanced:_glDrawElementsInstanced,glDrawElementsInstancedANGLE:_glDrawElementsInstancedANGLE,glDrawElementsInstancedARB:_glDrawElementsInstancedARB,glDrawElementsInstancedEXT:_glDrawElementsInstancedEXT,glDrawElementsInstancedNV:_glDrawElementsInstancedNV,glEnable:_glEnable,glEnableVertexAttribArray:_glEnableVertexAttribArray,glEndQueryEXT:_glEndQueryEXT,glFinish:_glFinish,glFlush:_glFlush,glFramebufferRenderbuffer:_glFramebufferRenderbuffer,glFramebufferTexture2D:_glFramebufferTexture2D,glFrontFace:_glFrontFace,glGenBuffers:_glGenBuffers,glGenFramebuffers:_glGenFramebuffers,glGenQueriesEXT:_glGenQueriesEXT,glGenRenderbuffers:_glGenRenderbuffers,glGenTextures:_glGenTextures,glGenVertexArrays:_glGenVertexArrays,glGenVertexArraysOES:_glGenVertexArraysOES,glGenerateMipmap:_glGenerateMipmap,glGetActiveAttrib:_glGetActiveAttrib,glGetActiveUniform:_glGetActiveUniform,glGetAttachedShaders:_glGetAttachedShaders,glGetAttribLocation:_glGetAttribLocation,glGetBooleanv:_glGetBooleanv,glGetBufferParameteriv:_glGetBufferParameteriv,glGetError:_glGetError,glGetFloatv:_glGetFloatv,glGetFramebufferAttachmentParameteriv:_glGetFramebufferAttachmentParameteriv,glGetIntegerv:_glGetIntegerv,glGetProgramInfoLog:_glGetProgramInfoLog,glGetProgramiv:_glGetProgramiv,glGetQueryObjecti64vEXT:_glGetQueryObjecti64vEXT,glGetQueryObjectivEXT:_glGetQueryObjectivEXT,glGetQueryObjectui64vEXT:_glGetQueryObjectui64vEXT,glGetQueryObjectuivEXT:_glGetQueryObjectuivEXT,glGetQueryivEXT:_glGetQueryivEXT,glGetRenderbufferParameteriv:_glGetRenderbufferParameteriv,glGetShaderInfoLog:_glGetShaderInfoLog,glGetShaderPrecisionFormat:_glGetShaderPrecisionFormat,glGetShaderSource:_glGetShaderSource,glGetShaderiv:_glGetShaderiv,glGetString:_glGetString,glGetTexParameterfv:_glGetTexParameterfv,glGetTexParameteriv:_glGetTexParameteriv,glGetUniformLocation:_glGetUniformLocation,glGetUniformfv:_glGetUniformfv,glGetUniformiv:_glGetUniformiv,glGetVertexAttribPointerv:_glGetVertexAttribPointerv,glGetVertexAttribfv:_glGetVertexAttribfv,glGetVertexAttribiv:_glGetVertexAttribiv,glHint:_glHint,glIsBuffer:_glIsBuffer,glIsEnabled:_glIsEnabled,glIsFramebuffer:_glIsFramebuffer,glIsProgram:_glIsProgram,glIsQueryEXT:_glIsQueryEXT,glIsRenderbuffer:_glIsRenderbuffer,glIsShader:_glIsShader,glIsTexture:_glIsTexture,glIsVertexArray:_glIsVertexArray,glIsVertexArrayOES:_glIsVertexArrayOES,glLineWidth:_glLineWidth,glLinkProgram:_glLinkProgram,glLoadIdentity:_glLoadIdentity,glMatrixMode:_glMatrixMode,glMultiDrawArrays:_glMultiDrawArrays,glMultiDrawArraysANGLE:_glMultiDrawArraysANGLE,glMultiDrawArraysInstancedANGLE:_glMultiDrawArraysInstancedANGLE,glMultiDrawArraysInstancedWEBGL:_glMultiDrawArraysInstancedWEBGL,glMultiDrawArraysWEBGL:_glMultiDrawArraysWEBGL,glMultiDrawElements:_glMultiDrawElements,glMultiDrawElementsANGLE:_glMultiDrawElementsANGLE,glMultiDrawElementsInstancedANGLE:_glMultiDrawElementsInstancedANGLE,glMultiDrawElementsInstancedWEBGL:_glMultiDrawElementsInstancedWEBGL,glMultiDrawElementsWEBGL:_glMultiDrawElementsWEBGL,glPixelStorei:_glPixelStorei,glPolygonModeWEBGL:_glPolygonModeWEBGL,glPolygonOffset:_glPolygonOffset,glPolygonOffsetClampEXT:_glPolygonOffsetClampEXT,glQueryCounterEXT:_glQueryCounterEXT,glReadPixels:_glReadPixels,glReleaseShaderCompiler:_glReleaseShaderCompiler,glRenderbufferStorage:_glRenderbufferStorage,glSampleCoverage:_glSampleCoverage,glScissor:_glScissor,glShaderBinary:_glShaderBinary,glShaderSource:_glShaderSource,glStencilFunc:_glStencilFunc,glStencilFuncSeparate:_glStencilFuncSeparate,glStencilMask:_glStencilMask,glStencilMaskSeparate:_glStencilMaskSeparate,glStencilOp:_glStencilOp,glStencilOpSeparate:_glStencilOpSeparate,glTexImage2D:_glTexImage2D,glTexParameterf:_glTexParameterf,glTexParameterfv:_glTexParameterfv,glTexParameteri:_glTexParameteri,glTexParameteriv:_glTexParameteriv,glTexSubImage2D:_glTexSubImage2D,glUniform1f:_glUniform1f,glUniform1fv:_glUniform1fv,glUniform1i:_glUniform1i,glUniform1iv:_glUniform1iv,glUniform2f:_glUniform2f,glUniform2fv:_glUniform2fv,glUniform2i:_glUniform2i,glUniform2iv:_glUniform2iv,glUniform3f:_glUniform3f,glUniform3fv:_glUniform3fv,glUniform3i:_glUniform3i,glUniform3iv:_glUniform3iv,glUniform4f:_glUniform4f,glUniform4fv:_glUniform4fv,glUniform4i:_glUniform4i,glUniform4iv:_glUniform4iv,glUniformMatrix2fv:_glUniformMatrix2fv,glUniformMatrix3fv:_glUniformMatrix3fv,glUniformMatrix4fv:_glUniformMatrix4fv,glUseProgram:_glUseProgram,glValidateProgram:_glValidateProgram,glVertexAttrib1f:_glVertexAttrib1f,glVertexAttrib1fv:_glVertexAttrib1fv,glVertexAttrib2f:_glVertexAttrib2f,glVertexAttrib2fv:_glVertexAttrib2fv,glVertexAttrib3f:_glVertexAttrib3f,glVertexAttrib3fv:_glVertexAttrib3fv,glVertexAttrib4f:_glVertexAttrib4f,glVertexAttrib4fv:_glVertexAttrib4fv,glVertexAttribDivisor:_glVertexAttribDivisor,glVertexAttribDivisorANGLE:_glVertexAttribDivisorANGLE,glVertexAttribDivisorARB:_glVertexAttribDivisorARB,glVertexAttribDivisorEXT:_glVertexAttribDivisorEXT,glVertexAttribDivisorNV:_glVertexAttribDivisorNV,glVertexAttribPointer:_glVertexAttribPointer,glVertexPointer:_glVertexPointer,glViewport:_glViewport,glewGetErrorString:_glewGetErrorString,glewGetExtension:_glewGetExtension,glewGetString:_glewGetString,glewInit:_glewInit,glewIsSupported:_glewIsSupported,glutCreateWindow:_glutCreateWindow,glutDestroyWindow:_glutDestroyWindow,glutDisplayFunc:_glutDisplayFunc,glutFullScreen:_glutFullScreen,glutGet:_glutGet,glutGetModifiers:_glutGetModifiers,glutIdleFunc:_glutIdleFunc,glutInit:_glutInit,glutInitDisplayMode:_glutInitDisplayMode,glutInitWindowPosition:_glutInitWindowPosition,glutInitWindowSize:_glutInitWindowSize,glutKeyboardFunc:_glutKeyboardFunc,glutKeyboardUpFunc:_glutKeyboardUpFunc,glutMainLoop:_glutMainLoop,glutMotionFunc:_glutMotionFunc,glutMouseFunc:_glutMouseFunc,glutPassiveMotionFunc:_glutPassiveMotionFunc,glutPositionWindow:_glutPositionWindow,glutPostRedisplay:_glutPostRedisplay,glutReshapeFunc:_glutReshapeFunc,glutReshapeWindow:_glutReshapeWindow,glutSetCursor:_glutSetCursor,glutSpecialFunc:_glutSpecialFunc,glutSpecialUpFunc:_glutSpecialUpFunc,glutSwapBuffers:_glutSwapBuffers,glutTimerFunc:_glutTimerFunc,invoke_dd,invoke_di,invoke_dii,invoke_diii,invoke_diiid,invoke_diiii,invoke_diiiid,invoke_diiiiid,invoke_diiji,invoke_dij,invoke_dijjjj,invoke_dijjjjij,invoke_dj,invoke_ff,invoke_fi,invoke_fiii,invoke_fiiii,invoke_fiiji,invoke_fijjjj,invoke_fijjjjij,invoke_i,invoke_id,invoke_idd,invoke_idi,invoke_idii,invoke_idiii,invoke_idiiii,invoke_if,invoke_iff,invoke_ifi,invoke_ifii,invoke_ii,invoke_iid,invoke_iidi,invoke_iidii,invoke_iidiii,invoke_iidiiii,invoke_iidj,invoke_iif,invoke_iifii,invoke_iii,invoke_iiid,invoke_iiidi,invoke_iiidj,invoke_iiii,invoke_iiiid,invoke_iiiidjj,invoke_iiiii,invoke_iiiiid,invoke_iiiiii,invoke_iiiiiid,invoke_iiiiiii,invoke_iiiiiiii,invoke_iiiiiiiii,invoke_iiiiiiiiii,invoke_iiiiiiiiiii,invoke_iiiiiiiiiiii,invoke_iiiiiiiiiiiii,invoke_iiiiiiiiiiiiii,invoke_iiiiiiiiiiiiiiiii,invoke_iiiiiiiiiiiiiiiiii,invoke_iiiiiiiiiijii,invoke_iiiiiiiiiijiiiiiii,invoke_iiiiiiiiiji,invoke_iiiiiiiij,invoke_iiiiiiij,invoke_iiiiiiiji,invoke_iiiiiiijii,invoke_iiiiiiijj,invoke_iiiiiiijjjjjjii,invoke_iiiiiij,invoke_iiiiiiji,invoke_iiiiiijji,invoke_iiiiiijjiiiiiii,invoke_iiiiiijjiijjji,invoke_iiiiij,invoke_iiiiiji,invoke_iiiiijii,invoke_iiiiijiii,invoke_iiiiijiiii,invoke_iiiiijij,invoke_iiiiijj,invoke_iiiij,invoke_iiiiji,invoke_iiiijii,invoke_iiiijiii,invoke_iiiijiijjiii,invoke_iiiijj,invoke_iiiijji,invoke_iiiijjii,invoke_iiiijjiii,invoke_iiiijjj,invoke_iiiijjjj,invoke_iiij,invoke_iiiji,invoke_iiijii,invoke_iiijiii,invoke_iiijiiiii,invoke_iiijiiiij,invoke_iiijiiiijj,invoke_iiijiiij,invoke_iiijiiiji,invoke_iiijiiijj,invoke_iiijiij,invoke_iiijiijj,invoke_iiijij,invoke_iiijijj,invoke_iiijj,invoke_iiijji,invoke_iiijjii,invoke_iiijjiii,invoke_iiijjijj,invoke_iiijjijjiii,invoke_iiijjj,invoke_iiijjji,invoke_iiijjjj,invoke_iij,invoke_iiji,invoke_iijii,invoke_iijiii,invoke_iijiiii,invoke_iijiiiiiij,invoke_iijiiijj,invoke_iijiiji,invoke_iijiijj,invoke_iijij,invoke_iijiji,invoke_iijj,invoke_iijji,invoke_iijjii,invoke_iijjiii,invoke_iijjiiiii,invoke_iijjj,invoke_iijjjj,invoke_ij,invoke_iji,invoke_ijii,invoke_ijji,invoke_ijjiii,invoke_ijjj,invoke_j,invoke_jd,invoke_jf,invoke_ji,invoke_jii,invoke_jiii,invoke_jiiii,invoke_jiiiii,invoke_jiiiiii,invoke_jiiiiiii,invoke_jiiiiijiiii,invoke_jiiiij,invoke_jiiiiji,invoke_jiiiijii,invoke_jiiiijiiii,invoke_jiiiijiiiii,invoke_jiiij,invoke_jiiiji,invoke_jiiijii,invoke_jiiijiii,invoke_jiiijiijiii,invoke_jiiijj,invoke_jiiijjj,invoke_jiij,invoke_jiiji,invoke_jiijiiii,invoke_jiijj,invoke_jiijjjii,invoke_jij,invoke_jiji,invoke_jijij,invoke_jijj,invoke_jijjij,invoke_jijjjj,invoke_jj,invoke_jji,invoke_jjj,invoke_jjjd,invoke_jjjji,invoke_v,invoke_vi,invoke_vid,invoke_viddddi,invoke_vidi,invoke_vidii,invoke_vif,invoke_vifi,invoke_vifii,invoke_vii,invoke_viid,invoke_viiddji,invoke_viif,invoke_viii,invoke_viiid,invoke_viiidi,invoke_viiidii,invoke_viiifi,invoke_viiii,invoke_viiiii,invoke_viiiiii,invoke_viiiiiii,invoke_viiiiiiii,invoke_viiiiiiiii,invoke_viiiiiiiiii,invoke_viiiiiiiiiii,invoke_viiiiiiiiiiii,invoke_viiiiiiiiiiiii,invoke_viiiiiiiiiiiiiii,invoke_viiiiiiij,invoke_viiiiiiijjjji,invoke_viiiiiij,invoke_viiiiiijii,invoke_viiiiij,invoke_viiiiiji,invoke_viiiiijii,invoke_viiiiijiii,invoke_viiiiijiiii,invoke_viiiiijiijii,invoke_viiiiijj,invoke_viiiiijjii,invoke_viiiiijjji,invoke_viiiij,invoke_viiiiji,invoke_viiiijii,invoke_viiiijiii,invoke_viiiijiiii,invoke_viiiijiiiii,invoke_viiiijiiiiiiii,invoke_viiiijiijjii,invoke_viiiijijji,invoke_viiiijijjj,invoke_viiiijj,invoke_viiiijji,invoke_viiiijjij,invoke_viiij,invoke_viiijd,invoke_viiiji,invoke_viiijii,invoke_viiijiii,invoke_viiijiiii,invoke_viiijiiiijjj,invoke_viiijiiijii,invoke_viiijiij,invoke_viiijij,invoke_viiijijij,invoke_viiijijj,invoke_viiijijjj,invoke_viiijj,invoke_viiijji,invoke_viiijjii,invoke_viiijjiii,invoke_viiijjij,invoke_viiijjijj,invoke_viiijjj,invoke_viiijjjj,invoke_viij,invoke_viijd,invoke_viiji,invoke_viijii,invoke_viijiii,invoke_viijiiii,invoke_viijiiiii,invoke_viijiiiiii,invoke_viijiiiij,invoke_viijiiij,invoke_viijiiijj,invoke_viijiij,invoke_viijiiji,invoke_viijiijj,invoke_viijiijji,invoke_viijij,invoke_viijiji,invoke_viijijiiii,invoke_viijijiiiijjj,invoke_viijijj,invoke_viijj,invoke_viijji,invoke_viijjii,invoke_viijjj,invoke_viijjji,invoke_viijjjji,invoke_vij,invoke_viji,invoke_vijii,invoke_vijiii,invoke_vijiiii,invoke_vijiiiii,invoke_vijiiiiii,invoke_vijiiiiji,invoke_vijiiiji,invoke_vijiij,invoke_vijiji,invoke_vijijiiiijjj,invoke_vijijiij,invoke_vijijj,invoke_vijijjji,invoke_vijj,invoke_vijji,invoke_vijjiii,invoke_vijjij,invoke_vijjj,invoke_vijjji,invoke_vijjjiiji,invoke_vijjjj,invoke_vj,invoke_vji,invoke_vjii,invoke_vjiii,invoke_vjiiii,invoke_vjiiij,invoke_vjjii,invoke_vjjijij,lineColor:_lineColor,lineRGBA:_lineRGBA,llvm_eh_typeid_for:_llvm_eh_typeid_for,memory:wasmMemory,pixelRGBA:_pixelRGBA,proc_exit:_proc_exit,pthread_kill:_pthread_kill,random_get:_random_get,rectangleColor:_rectangleColor,rectangleRGBA:_rectangleRGBA,rotozoomSurface:_rotozoomSurface,setNetworkCallback:_setNetworkCallback,setprotoent:_setprotoent,stackAlloc:_stackAlloc,stackRestore:_stackRestore,stackSave:_stackSave,strptime:_strptime,strptime_l:_strptime_l,uuid_clear:_uuid_clear,uuid_compare:_uuid_compare,uuid_copy:_uuid_copy,uuid_generate:_uuid_generate,uuid_is_null:_uuid_is_null,uuid_parse:_uuid_parse,uuid_type:_uuid_type,uuid_unparse:_uuid_unparse,uuid_unparse_lower:_uuid_unparse_lower,uuid_unparse_upper:_uuid_unparse_upper,uuid_variant:_uuid_variant,zoomSurface:_zoomSurface},wasmExports=createWasm(),__emval_coro_resume=(e,t)=>(__emval_coro_resume=wasmExports._emval_coro_resume)(e,t);Module._main=(e,t)=>(Module._main=wasmExports.main)(e,t),Module._duckdb_web_fs_glob_add_path=e=>(Module._duckdb_web_fs_glob_add_path=wasmExports.duckdb_web_fs_glob_add_path)(e),Module._duckdb_web_clear_response=()=>(Module._duckdb_web_clear_response=wasmExports.duckdb_web_clear_response)(),Module._duckdb_web_fail_with=e=>(Module._duckdb_web_fail_with=wasmExports.duckdb_web_fail_with)(e),Module._duckdb_web_reset=e=>(Module._duckdb_web_reset=wasmExports.duckdb_web_reset)(e),Module._duckdb_web_connect=()=>(Module._duckdb_web_connect=wasmExports.duckdb_web_connect)(),Module._duckdb_web_disconnect=e=>(Module._duckdb_web_disconnect=wasmExports.duckdb_web_disconnect)(e),Module._duckdb_web_flush_files=()=>(Module._duckdb_web_flush_files=wasmExports.duckdb_web_flush_files)(),Module._duckdb_web_flush_file=e=>(Module._duckdb_web_flush_file=wasmExports.duckdb_web_flush_file)(e),Module._duckdb_web_open=(e,t)=>(Module._duckdb_web_open=wasmExports.duckdb_web_open)(e,t),Module._duckdb_web_get_global_file_info=(e,t)=>(Module._duckdb_web_get_global_file_info=wasmExports.duckdb_web_get_global_file_info)(e,t),Module._duckdb_web_collect_file_stats=(e,t,r)=>(Module._duckdb_web_collect_file_stats=wasmExports.duckdb_web_collect_file_stats)(e,t,r),Module._duckdb_web_export_file_stats=(e,t)=>(Module._duckdb_web_export_file_stats=wasmExports.duckdb_web_export_file_stats)(e,t),Module._duckdb_web_fs_drop_file=(e,t)=>(Module._duckdb_web_fs_drop_file=wasmExports.duckdb_web_fs_drop_file)(e,t),Module._duckdb_web_fs_drop_files=e=>(Module._duckdb_web_fs_drop_files=wasmExports.duckdb_web_fs_drop_files)(e),Module._duckdb_web_fs_glob_file_infos=(e,t)=>(Module._duckdb_web_fs_glob_file_infos=wasmExports.duckdb_web_fs_glob_file_infos)(e,t),Module._duckdb_web_fs_get_file_info_by_id=(e,t,r)=>(Module._duckdb_web_fs_get_file_info_by_id=wasmExports.duckdb_web_fs_get_file_info_by_id)(e,t,r),Module._duckdb_web_fs_get_file_info_by_name=(e,t,r)=>(Module._duckdb_web_fs_get_file_info_by_name=wasmExports.duckdb_web_fs_get_file_info_by_name)(e,t,r),Module._duckdb_web_fs_register_file_url=(e,t,r,n,a)=>(Module._duckdb_web_fs_register_file_url=wasmExports.duckdb_web_fs_register_file_url)(e,t,r,n,a),Module._duckdb_web_fs_register_file_buffer=(e,t,r,n)=>(Module._duckdb_web_fs_register_file_buffer=wasmExports.duckdb_web_fs_register_file_buffer)(e,t,r,n),Module._duckdb_web_copy_file_to_buffer=(e,t)=>(Module._duckdb_web_copy_file_to_buffer=wasmExports.duckdb_web_copy_file_to_buffer)(e,t),Module._duckdb_web_copy_file_to_path=(e,t,r)=>(Module._duckdb_web_copy_file_to_path=wasmExports.duckdb_web_copy_file_to_path)(e,t,r),Module._duckdb_web_get_version=e=>(Module._duckdb_web_get_version=wasmExports.duckdb_web_get_version)(e),Module._duckdb_web_get_feature_flags=()=>(Module._duckdb_web_get_feature_flags=wasmExports.duckdb_web_get_feature_flags)(),Module._duckdb_web_tokenize=(e,t)=>(Module._duckdb_web_tokenize=wasmExports.duckdb_web_tokenize)(e,t),Module._duckdb_web_udf_scalar_create=(e,t,r)=>(Module._duckdb_web_udf_scalar_create=wasmExports.duckdb_web_udf_scalar_create)(e,t,r),Module._duckdb_web_prepared_create=(e,t,r)=>(Module._duckdb_web_prepared_create=wasmExports.duckdb_web_prepared_create)(e,t,r),Module._duckdb_web_prepared_close=(e,t,r)=>(Module._duckdb_web_prepared_close=wasmExports.duckdb_web_prepared_close)(e,t,r),Module._duckdb_web_prepared_run=(e,t,r,n)=>(Module._duckdb_web_prepared_run=wasmExports.duckdb_web_prepared_run)(e,t,r,n),Module._duckdb_web_prepared_send=(e,t,r,n)=>(Module._duckdb_web_prepared_send=wasmExports.duckdb_web_prepared_send)(e,t,r,n),Module._duckdb_web_query_run=(e,t,r)=>(Module._duckdb_web_query_run=wasmExports.duckdb_web_query_run)(e,t,r),Module._duckdb_web_query_run_buffer=(e,t,r,n)=>(Module._duckdb_web_query_run_buffer=wasmExports.duckdb_web_query_run_buffer)(e,t,r,n),Module._duckdb_web_pending_query_start=(e,t,r)=>(Module._duckdb_web_pending_query_start=wasmExports.duckdb_web_pending_query_start)(e,t,r),Module._duckdb_web_pending_query_poll=(e,t,r)=>(Module._duckdb_web_pending_query_poll=wasmExports.duckdb_web_pending_query_poll)(e,t,r),Module._duckdb_web_pending_query_cancel=(e,t)=>(Module._duckdb_web_pending_query_cancel=wasmExports.duckdb_web_pending_query_cancel)(e,t),Module._duckdb_web_query_fetch_results=(e,t)=>(Module._duckdb_web_query_fetch_results=wasmExports.duckdb_web_query_fetch_results)(e,t),Module._duckdb_web_get_tablenames=(e,t,r)=>(Module._duckdb_web_get_tablenames=wasmExports.duckdb_web_get_tablenames)(e,t,r),Module._duckdb_web_insert_arrow_from_ipc_stream=(e,t,r,n,a)=>(Module._duckdb_web_insert_arrow_from_ipc_stream=wasmExports.duckdb_web_insert_arrow_from_ipc_stream)(e,t,r,n,a),Module._duckdb_web_insert_csv_from_path=(e,t,r,n)=>(Module._duckdb_web_insert_csv_from_path=wasmExports.duckdb_web_insert_csv_from_path)(e,t,r,n),Module._duckdb_web_insert_json_from_path=(e,t,r,n)=>(Module._duckdb_web_insert_json_from_path=wasmExports.duckdb_web_insert_json_from_path)(e,t,r,n);var ___dl_seterr=(e,t)=>(___dl_seterr=wasmExports.__dl_seterr)(e,t),__emscripten_timeout=(e,t)=>(__emscripten_timeout=wasmExports._emscripten_timeout)(e,t),_malloc=Module._malloc=e=>(_malloc=Module._malloc=wasmExports.malloc)(e),_free=Module._free=e=>(_free=Module._free=wasmExports.free)(e),_calloc=Module._calloc=(e,t)=>(_calloc=Module._calloc=wasmExports.calloc)(e,t),_emscripten_builtin_memalign=(e,t)=>(_emscripten_builtin_memalign=wasmExports.emscripten_builtin_memalign)(e,t),__emscripten_tempret_set=e=>(__emscripten_tempret_set=wasmExports._emscripten_tempret_set)(e),__emscripten_tempret_get=()=>(__emscripten_tempret_get=wasmExports._emscripten_tempret_get)(),__emscripten_stack_restore=e=>(__emscripten_stack_restore=wasmExports._emscripten_stack_restore)(e),__emscripten_stack_alloc=e=>(__emscripten_stack_alloc=wasmExports._emscripten_stack_alloc)(e),_emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports.emscripten_stack_get_current)();function invoke_ii(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_vii(e,t,r){var n=stackSave();try{getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_viii(e,t,r,n){var a=stackSave();try{getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viiii(e,t,r,n,a){var o=stackSave();try{getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iii(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_viiiiii(e,t,r,n,a,o,l){var u=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_dii(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_viiiiiii(e,t,r,n,a,o,l,u){var _=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vi(e,t){var r=stackSave();try{getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_iiiii(e,t,r,n,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiiii(e,t,r,n,a,o){var l=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiiiiii(e,t,r,n,a,o,l){var u=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiiiiiii(e,t,r,n,a,o,l,u){var _=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiiiiiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiii(e,t,r,n){var a=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_v(e){var t=stackSave();try{getWasmTableEntry(e)()}catch(r){if(stackRestore(t),r!==r+0)throw r;_setThrew(1,0)}}function invoke_i(e){var t=stackSave();try{return getWasmTableEntry(e)()}catch(r){if(stackRestore(t),r!==r+0)throw r;_setThrew(1,0)}}function invoke_iiiiiiiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiii(e,t,r,n,a,o){var l=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viif(e,t,r,n){var a=stackSave();try{getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viid(e,t,r,n){var a=stackSave();try{getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iid(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_diiii(e,t,r,n,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiiiiid(e,t,r,n,a,o,l){var u=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_di(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_id(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_vid(e,t,r){var n=stackSave();try{getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_vif(e,t,r){var n=stackSave();try{getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_iiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiiiiiiiii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiid(e,t,r,n){var a=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viiid(e,t,r,n,a){var o=stackSave();try{getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S){var L=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S)}catch(T){if(stackRestore(L),T!==T+0)throw T;_setThrew(1,0)}}function invoke_iidii(e,t,r,n,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v){var S=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v)}catch(L){if(stackRestore(S),L!==L+0)throw L;_setThrew(1,0)}}function invoke_fi(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_vifi(e,t,r,n){var a=stackSave();try{getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_vidi(e,t,r,n){var a=stackSave();try{getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_ff(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_dd(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_iiiiiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h){var g=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p,f,m,h)}catch(b){if(stackRestore(g),b!==b+0)throw b;_setThrew(1,0)}}function invoke_iiiiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_viddddi(e,t,r,n,a,o,l){var u=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_diiiiid(e,t,r,n,a,o,l){var u=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiiid(e,t,r,n,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_idiii(e,t,r,n,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiidi(e,t,r,n,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiidii(e,t,r,n,a,o,l){var u=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viiiiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h){var g=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p,f,m,h)}catch(b){if(stackRestore(g),b!==b+0)throw b;_setThrew(1,0)}}function invoke_viiiiiiiii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iff(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_idd(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_diiiid(e,t,r,n,a,o){var l=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_iiiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_if(e,t){var r=stackSave();try{return getWasmTableEntry(e)(t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_ifii(e,t,r,n){var a=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_idii(e,t,r,n){var a=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_ifi(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_idi(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_idiiii(e,t,r,n,a,o){var l=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_diii(e,t,r,n){var a=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_diiid(e,t,r,n,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iifii(e,t,r,n,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iidiii(e,t,r,n,a,o){var l=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iidiiii(e,t,r,n,a,o,l){var u=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iidi(e,t,r,n){var a=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_vifii(e,t,r,n,a){var o=stackSave();try{getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_vidii(e,t,r,n,a){var o=stackSave();try{getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iif(e,t,r){var n=stackSave();try{return getWasmTableEntry(e)(t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_fiiii(e,t,r,n,a){var o=stackSave();try{return getWasmTableEntry(e)(t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiifi(e,t,r,n,a,o){var l=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiidi(e,t,r,n,a,o){var l=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiiiid(e,t,r,n,a,o){var l=stackSave();try{return getWasmTableEntry(e)(t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_fiii(e,t,r,n){var a=stackSave();try{return getWasmTableEntry(e)(t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viiiiiiiiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b){var v=stackSave();try{getWasmTableEntry(e)(t,r,n,a,o,l,u,_,d,p,f,m,h,g,b)}catch(S){if(stackRestore(v),S!==S+0)throw S;_setThrew(1,0)}}function invoke_viji(e,t,r,n,a){var o=stackSave();try{Module.dynCall_viji(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_ji(e,t){var r=stackSave();try{return Module.dynCall_ji(e,t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_viijii(e,t,r,n,a,o,l){var u=stackSave();try{Module.dynCall_viijii(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iij(e,t,r,n){var a=stackSave();try{return Module.dynCall_iij(e,t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iiijiijj(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iiijiijj(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viij(e,t,r,n,a){var o=stackSave();try{Module.dynCall_viij(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiijj(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_iiijj(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viiijj(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_viiijj(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_jii(e,t,r){var n=stackSave();try{return Module.dynCall_jii(e,t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_vij(e,t,r,n){var a=stackSave();try{Module.dynCall_vij(e,t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iiijii(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_iiijii(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiij(e,t,r,n,a){var o=stackSave();try{return Module.dynCall_iiij(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiij(e,t,r,n,a,o){var l=stackSave();try{Module.dynCall_viiij(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiji(e,t,r,n,a,o){var l=stackSave();try{Module.dynCall_viiji(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viijijj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viijijj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viijiijj(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_viijiijj(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiiij(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_iiiij(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viijiii(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_viijiii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiji(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_iiiji(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiji(e,t,r,n,a){var o=stackSave();try{return Module.dynCall_iiji(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_jiiij(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_jiiij(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiiji(e,t,r,n,a,o,l){var u=stackSave();try{Module.dynCall_viiiji(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_jj(e,t,r){var n=stackSave();try{return Module.dynCall_jj(e,t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_iijji(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_iijji(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiiiij(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_iiiiij(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiijjj(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiijjj(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiijjj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viiijjj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiiij(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iiiiiij(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_jiiiii(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_jiiiii(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iijiii(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_iijiii(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_dij(e,t,r,n){var a=stackSave();try{return Module.dynCall_dij(e,t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iijii(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_iijii(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_vijji(e,t,r,n,a,o,l){var u=stackSave();try{Module.dynCall_vijji(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiiiijj(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiiiijj(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiiij(e,t,r,n,a,o,l){var u=stackSave();try{Module.dynCall_viiiij(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viiijii(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_viiijii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiijii(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iiiijii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiiijii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viiiijii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jij(e,t,r,n){var a=stackSave();try{return Module.dynCall_jij(e,t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_iiiijj(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iiiijj(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiiijii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiiiijii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iijiiii(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iijiiii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijiii(e,t,r,n,a,o,l){var u=stackSave();try{Module.dynCall_vijiii(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iijjiiiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iijjiiiii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiijjiii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiijjiii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiijjii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiijjii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiii(e,t,r,n){var a=stackSave();try{return Module.dynCall_jiii(e,t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_vjjii(e,t,r,n,a,o,l){var u=stackSave();try{Module.dynCall_vjjii(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viiiiijii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viiiiijii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiiiij(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiiiiiij(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiiijj(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viiiijj(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_vijiiiiii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_vijiiiiii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_vijiiii(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_vijiiii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijiiiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_vijiiiii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iijjiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iijjiii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_ij(e,t,r){var n=stackSave();try{return Module.dynCall_ij(e,t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_vijj(e,t,r,n,a,o){var l=stackSave();try{Module.dynCall_vijj(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiiiji(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_iiiiji(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_ijji(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_ijji(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viijd(e,t,r,n,a,o){var l=stackSave();try{Module.dynCall_viijd(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiijd(e,t,r,n,a,o,l){var u=stackSave();try{Module.dynCall_viiijd(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiiiiiiji(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiiiiiiji(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiiji(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iiiiiji(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vj(e,t,r){var n=stackSave();try{Module.dynCall_vj(e,t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_viiiiiij(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viiiiiij(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiiijiiiii(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viiiijiiiii(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viiiijiiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_viiiijiiii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_vijii(e,t,r,n,a,o){var l=stackSave();try{Module.dynCall_vijii(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_dj(e,t,r){var n=stackSave();try{return Module.dynCall_dj(e,t,r)}catch(a){if(stackRestore(n),a!==a+0)throw a;_setThrew(1,0)}}function invoke_viijji(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_viijji(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viijj(e,t,r,n,a,o,l){var u=stackSave();try{Module.dynCall_viijj(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_viiiiijiiii(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viiiiijiiii(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viijiiiii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viijiiiii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_vijiji(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_vijiji(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijjij(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_vijjij(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jijij(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_jijij(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_ijjj(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_ijjj(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_jjjd(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_jjjd(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_vjii(e,t,r,n,a){var o=stackSave();try{Module.dynCall_vjii(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_vjiiii(e,t,r,n,a,o,l){var u=stackSave();try{Module.dynCall_vjiiii(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_jiiii(e,t,r,n,a){var o=stackSave();try{return Module.dynCall_jiiii(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiiiijiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_viiiiijiii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiiijiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g){var b=stackSave();try{Module.dynCall_viiiijiiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g)}catch(v){if(stackRestore(b),v!==v+0)throw v;_setThrew(1,0)}}function invoke_jjj(e,t,r,n,a){var o=stackSave();try{return Module.dynCall_jjj(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_jjjji(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_jjjji(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viijij(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_viijij(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iijjjj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iijjjj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viijjj(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viijjj(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viijiiiiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_viijiiiiii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_j(e){var t=stackSave();try{return Module.dynCall_j(e)}catch(r){if(stackRestore(t),r!==r+0)throw r;_setThrew(1,0)}}function invoke_jji(e,t,r,n){var a=stackSave();try{return Module.dynCall_jji(e,t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_fijjjj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_fijjjj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_dijjjj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_dijjjj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_fijjjjij(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{return Module.dynCall_fijjjjij(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_dijjjjij(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{return Module.dynCall_dijjjjij(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_jiiiij(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_jiiiij(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_ijjiii(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_ijjiii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiiiiijii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iiiiiiijii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_jiiji(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_jiiji(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_fiiji(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_fiiji(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_diiji(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_diiji(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viijjji(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viijjji(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiddji(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_viiddji(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iji(e,t,r,n){var a=stackSave();try{return Module.dynCall_iji(e,t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viiiijijjj(e,t,r,n,a,o,l,u,_,d,p,f,m,h){var g=stackSave();try{Module.dynCall_viiiijijjj(e,t,r,n,a,o,l,u,_,d,p,f,m,h)}catch(b){if(stackRestore(g),b!==b+0)throw b;_setThrew(1,0)}}function invoke_viiiiij(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_viiiiij(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiiiji(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_viiiiji(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iijiji(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iijiji(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijjji(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_vijjji(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_vjiiij(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_vjiiij(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viijjjji(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viijjjji(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viiijijj(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_viiijijj(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiijijij(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viiijijij(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viiijij(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viiijij(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiij(e,t,r,n,a){var o=stackSave();try{return Module.dynCall_jiij(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_viiiiiji(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viiiiiji(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiijiii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiiiijiii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_jiiiiii(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_jiiiiii(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiiijiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiiijiii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiiiiiij(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viiiiiiij(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiijiii(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iiijiii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiiiiiiij(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiiiiiiij(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iijj(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_iijj(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiijjij(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_viiijjij(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_vijijiij(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_vijijiij(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viijiiiij(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_viijiiiij(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiijiiiijjj(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b){var v=stackSave();try{Module.dynCall_viiijiiiijjj(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b)}catch(S){if(stackRestore(v),S!==S+0)throw S;_setThrew(1,0)}}function invoke_viijijiiiijjj(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S){var L=stackSave();try{Module.dynCall_viijijiiiijjj(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S)}catch(T){if(stackRestore(L),T!==T+0)throw T;_setThrew(1,0)}}function invoke_viiijiij(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viiijiij(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_jiiijiijiii(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{return Module.dynCall_jiiijiijiii(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_viijijiiii(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viijijiiii(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_jiiijiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_jiiijiii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiiijii(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_jiiijii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iijjj(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iijjj(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiijji(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iiijji(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijijiiiijjj(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v){var S=stackSave();try{Module.dynCall_vijijiiiijjj(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v)}catch(L){if(stackRestore(S),L!==L+0)throw L;_setThrew(1,0)}}function invoke_viiiiijj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viiiiijj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_jiiiiji(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_jiiiiji(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiiijijji(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{Module.dynCall_viiiijijji(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_viiiijjij(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viiiijjij(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viiijiiii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viiijiiii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiijiiijii(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{Module.dynCall_viiijiiijii(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_vijjj(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_vijjj(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_vijijj(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_vijijj(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viiijjjj(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viiijjjj(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_jd(e,t){var r=stackSave();try{return Module.dynCall_jd(e,t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_jf(e,t){var r=stackSave();try{return Module.dynCall_jf(e,t)}catch(n){if(stackRestore(r),n!==n+0)throw n;_setThrew(1,0)}}function invoke_viiiiijjii(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viiiiijjii(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viiiiiijii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_viiiiiijii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiiiiiijjjji(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v){var S=stackSave();try{Module.dynCall_viiiiiiijjjji(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v)}catch(L){if(stackRestore(S),L!==L+0)throw L;_setThrew(1,0)}}function invoke_vji(e,t,r,n){var a=stackSave();try{Module.dynCall_vji(e,t,r,n)}catch(o){if(stackRestore(a),o!==o+0)throw o;_setThrew(1,0)}}function invoke_viiijjiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_viiijjiii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_jiijj(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_jiijj(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_jiiiiijiiii(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{return Module.dynCall_jiiiiijiiii(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_jiiiijii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_jiiiijii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiijiiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_jiijiiii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viijjii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viijjii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiijjiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iiiijjiii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiijijj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiijijj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiiiji(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiiiiiji(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiijjjj(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{return Module.dynCall_iiiijjjj(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_iiijiij(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiijiij(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iijiiiiiij(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{return Module.dynCall_iijiiiiiij(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viijiijji(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viijiijji(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viiiijiijjii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g){var b=stackSave();try{Module.dynCall_viiiijiijjii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g)}catch(v){if(stackRestore(b),v!==v+0)throw v;_setThrew(1,0)}}function invoke_viijiiji(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viijiiji(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiiijjiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v){var S=stackSave();try{return Module.dynCall_iiiiiijjiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v)}catch(L){if(stackRestore(S),L!==L+0)throw L;_setThrew(1,0)}}function invoke_iiiiijiiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iiiiijiiii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiiijiijjiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g){var b=stackSave();try{return Module.dynCall_iiiijiijjiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g)}catch(v){if(stackRestore(b),v!==v+0)throw v;_setThrew(1,0)}}function invoke_iiidj(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_iiidj(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_iiiiiiiiiijii(e,t,r,n,a,o,l,u,_,d,p,f,m,h){var g=stackSave();try{return Module.dynCall_iiiiiiiiiijii(e,t,r,n,a,o,l,u,_,d,p,f,m,h)}catch(b){if(stackRestore(g),b!==b+0)throw b;_setThrew(1,0)}}function invoke_iiiiiiijj(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iiiiiiijj(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiiijji(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiiijji(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiiijjj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_jiiijjj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiijij(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiiiijij(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_jiiiiiii(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_jiiiiiii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiijiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viiijiii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiiiijji(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iiiiiijji(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiiiiiiiiijiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S,L){var T=stackSave();try{return Module.dynCall_iiiiiiiiiijiiiiiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S,L)}catch(A){if(stackRestore(T),A!==A+0)throw A;_setThrew(1,0)}}function invoke_iiiidjj(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iiiidjj(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiiijjj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiiijjj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiiiiiiiiji(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{return Module.dynCall_iiiiiiiiiji(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_iiijiiiij(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iiijiiiij(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiijiiij(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiijiiij(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iijjii(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iijjii(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_viiijji(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viiijji(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_jiiiijiiii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_jiiiijiiii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_jiiiijiiiii(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{return Module.dynCall_jiiiijiiiii(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_jiijjjii(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_jiijjjii(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiiijji(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viiiijji(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_ijii(e,t,r,n,a){var o=stackSave();try{return Module.dynCall_ijii(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_iiiiiiijjjjjjii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S,L,T,A){var M=stackSave();try{return Module.dynCall_iiiiiiijjjjjjii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S,L,T,A)}catch(X){if(stackRestore(M),X!==X+0)throw X;_setThrew(1,0)}}function invoke_iiijjijj(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{return Module.dynCall_iiijjijj(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viiijjijj(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{Module.dynCall_viiijjijj(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_iijij(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_iijij(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_vjiii(e,t,r,n,a,o){var l=stackSave();try{Module.dynCall_vjiii(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_jiiijj(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_jiiijj(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iiijij(e,t,r,n,a,o,l,u){var _=stackSave();try{return Module.dynCall_iiijij(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_iidj(e,t,r,n,a){var o=stackSave();try{return Module.dynCall_iidj(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function invoke_vjjijij(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_vjjijij(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_jiiiji(e,t,r,n,a,o,l){var u=stackSave();try{return Module.dynCall_jiiiji(e,t,r,n,a,o,l)}catch(_){if(stackRestore(u),_!==_+0)throw _;_setThrew(1,0)}}function invoke_iiiiiijjiijjji(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S,L){var T=stackSave();try{return Module.dynCall_iiiiiijjiijjji(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g,b,v,S,L)}catch(A){if(stackRestore(T),A!==A+0)throw A;_setThrew(1,0)}}function invoke_iiijjijjiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g){var b=stackSave();try{return Module.dynCall_iiijjijjiii(e,t,r,n,a,o,l,u,_,d,p,f,m,h,g)}catch(v){if(stackRestore(b),v!==v+0)throw v;_setThrew(1,0)}}function invoke_iiiijjii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiiijjii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiijjii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viiijjii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiijjjj(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iiijjjj(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viijiiij(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viijiiij(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_vijiiiji(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_vijiiiji(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_jijjij(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_jijjij(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_viijiij(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viijiij(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiijiiiji(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iiijiiiji(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iijiiji(e,t,r,n,a,o,l,u,_){var d=stackSave();try{return Module.dynCall_iijiiji(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iijiijj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iijiijj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_vijjjj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_vijjjj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viiiiijiijii(e,t,r,n,a,o,l,u,_,d,p,f,m,h){var g=stackSave();try{Module.dynCall_viiiiijiijii(e,t,r,n,a,o,l,u,_,d,p,f,m,h)}catch(b){if(stackRestore(g),b!==b+0)throw b;_setThrew(1,0)}}function invoke_jijj(e,t,r,n,a,o){var l=stackSave();try{return Module.dynCall_jijj(e,t,r,n,a,o)}catch(u){if(stackRestore(l),u!==u+0)throw u;_setThrew(1,0)}}function invoke_viiiiijjji(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{Module.dynCall_viiiiijjji(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_iiijiiijj(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{return Module.dynCall_iiijiiijj(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_viiijijjj(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{Module.dynCall_viiijijjj(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_vijijjji(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_vijijjji(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_vijiij(e,t,r,n,a,o,l,u){var _=stackSave();try{Module.dynCall_vijiij(e,t,r,n,a,o,l,u)}catch(d){if(stackRestore(_),d!==d+0)throw d;_setThrew(1,0)}}function invoke_jijjjj(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_jijjjj(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_iiijiiiijj(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{return Module.dynCall_iiijiiiijj(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_iijiiijj(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{return Module.dynCall_iijiiijj(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_iiijiiiii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiijiiiii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_vijjjiiji(e,t,r,n,a,o,l,u,_,d,p,f,m){var h=stackSave();try{Module.dynCall_vijjjiiji(e,t,r,n,a,o,l,u,_,d,p,f,m)}catch(g){if(stackRestore(h),g!==g+0)throw g;_setThrew(1,0)}}function invoke_viijiji(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viijiji(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_vijiiiiji(e,t,r,n,a,o,l,u,_,d,p){var f=stackSave();try{Module.dynCall_vijiiiiji(e,t,r,n,a,o,l,u,_,d,p)}catch(m){if(stackRestore(f),m!==m+0)throw m;_setThrew(1,0)}}function invoke_viiiijiii(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{Module.dynCall_viiiijiii(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viijiiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_viijiiii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_vijjiii(e,t,r,n,a,o,l,u,_){var d=stackSave();try{Module.dynCall_vijjiii(e,t,r,n,a,o,l,u,_)}catch(p){if(stackRestore(d),p!==p+0)throw p;_setThrew(1,0)}}function invoke_iiijjji(e,t,r,n,a,o,l,u,_,d){var p=stackSave();try{return Module.dynCall_iiijjji(e,t,r,n,a,o,l,u,_,d)}catch(f){if(stackRestore(p),f!==f+0)throw f;_setThrew(1,0)}}function invoke_viijiiijj(e,t,r,n,a,o,l,u,_,d,p,f){var m=stackSave();try{Module.dynCall_viijiiijj(e,t,r,n,a,o,l,u,_,d,p,f)}catch(h){if(stackRestore(m),h!==h+0)throw h;_setThrew(1,0)}}function invoke_jiji(e,t,r,n,a){var o=stackSave();try{return Module.dynCall_jiji(e,t,r,n,a)}catch(l){if(stackRestore(o),l!==l+0)throw l;_setThrew(1,0)}}function applySignatureConversions(e){e=Object.assign({},e);var t=u=>_=>u(_)>>>0,r=u=>()=>u()>>>0,n=u=>(_,d,p)=>u(_,d,p)>>>0,a=u=>(_,d)=>u(_,d)>>>0,o=u=>_=>u(_)>>>0,l=u=>_=>u(_)>>>0;return e.__getTypeName=t(e.__getTypeName),e.pthread_self=r(e.pthread_self),e.memcpy=n(e.memcpy),e.malloc=t(e.malloc),e.calloc=a(e.calloc),e.__errno_location=r(e.__errno_location),e.strerror=o(e.strerror),e.emscripten_builtin_malloc=t(e.emscripten_builtin_malloc),e.emscripten_stack_get_base=r(e.emscripten_stack_get_base),e.emscripten_stack_get_end=r(e.emscripten_stack_get_end),e.emscripten_builtin_memalign=a(e.emscripten_builtin_memalign),e.emscripten_stack_get_current=r(e.emscripten_stack_get_current),e.emscripten_main_runtime_thread_id=r(e.emscripten_main_runtime_thread_id),e.sbrk=l(e.sbrk),e.memalign=a(e.memalign),e.emscripten_builtin_calloc=a(e.emscripten_builtin_calloc),e._emscripten_stack_alloc=t(e._emscripten_stack_alloc),e.__cxa_get_exception_ptr=t(e.__cxa_get_exception_ptr),e}Module.stackSave=stackSave,Module.stackRestore=stackRestore,Module.stackAlloc=stackAlloc,Module.ccall=ccall;var calledRun;dependenciesFulfilled=function e(){calledRun||run(),calledRun||(dependenciesFulfilled=e)};function callMain(e=[]){var t=resolveGlobalSymbol("main").sym;if(t){e.unshift(thisProgram);var r=e.length,n=stackAlloc((r+1)*4),a=n;e.forEach(l=>{HEAPU32[a>>>2>>>0]=stringToUTF8OnStack(l),a+=4}),HEAPU32[a>>>2>>>0]=0;try{var o=t(r,n);return exitJS(o,!0),o}catch(l){return handleException(l)}}}function run(e=arguments_){if(runDependencies>0||(preRun(),runDependencies>0))return;function t(){var r;calledRun||(calledRun=!0,Module.calledRun=!0,!ABORT&&(initRuntime(),preMain(),readyPromiseResolve(Module),(r=Module.onRuntimeInitialized)==null||r.call(Module),shouldRunNow&&callMain(e),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>Module.setStatus(""),1),t()},1)):t()}if(Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),run(),moduleRtn=readyPromise,moduleRtn}})();typeof exports=="object"&&typeof module=="object"&&(module.exports=DuckDB)}),Rl=fr(()=>{}),Gl=fr(()=>{}),Ul=fr((e,t)=>{(function(){var r="input is invalid type",n=typeof window=="object",a=n?window:{};a.JS_SHA256_NO_WINDOW&&(n=!1);var o=!n&&typeof self=="object",l=!a.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;l?a=commonjsGlobal:o&&(a=self);var u=!a.JS_SHA256_NO_COMMON_JS&&typeof t=="object"&&t.exports,_=!1,d=!a.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",p="0123456789abcdef".split(""),f=[-2147483648,8388608,32768,128],m=[24,16,8,0],h=[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],g=["hex","array","digest","arrayBuffer"],b=[];(a.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(w){return Object.prototype.toString.call(w)==="[object Array]"}),d&&(a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(w){return typeof w=="object"&&w.buffer&&w.buffer.constructor===ArrayBuffer});var v=function(w,E){return function(P){return new M(E,!0).update(P)[w]()}},S=function(w){var E=v("hex",w);l&&(E=L(E,w)),E.create=function(){return new M(w)},E.update=function(C){return E.create().update(C)};for(var P=0;P>>2]|=w[C]<>>2]|=k<>>2]|=(192|k>>>6)<>>2]|=(128|k&63)<=57344?(D[F>>>2]|=(224|k>>>12)<>>2]|=(128|k>>>6&63)<>>2]|=(128|k&63)<>>2]|=(240|k>>>18)<>>2]|=(128|k>>>12&63)<>>2]|=(128|k>>>6&63)<>>2]|=(128|k&63)<=64?(this.block=D[16],this.start=F-64,this.hash(),this.hashed=!0):this.start=F}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},M.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var w=this.blocks,E=this.lastByteIndex;w[16]=this.block,w[E>>>2]|=f[E&3],this.block=w[16],E>=56&&(this.hashed||this.hash(),w[0]=this.block,w[16]=w[1]=w[2]=w[3]=w[4]=w[5]=w[6]=w[7]=w[8]=w[9]=w[10]=w[11]=w[12]=w[13]=w[14]=w[15]=0),w[14]=this.hBytes<<3|this.bytes>>>29,w[15]=this.bytes<<3,this.hash()}},M.prototype.hash=function(){var w=this.h0,E=this.h1,P=this.h2,k=this.h3,C=this.h4,F=this.h5,U=this.h6,D=this.h7,I=this.blocks,Q,oe,we,_e,Z,Ie,ke,pt,To,xo,Wn;for(Q=16;Q<64;++Q)Z=I[Q-15],oe=(Z>>>7|Z<<25)^(Z>>>18|Z<<14)^Z>>>3,Z=I[Q-2],we=(Z>>>17|Z<<15)^(Z>>>19|Z<<13)^Z>>>10,I[Q]=I[Q-16]+oe+I[Q-7]+we<<0;for(Wn=E&P,Q=0;Q<64;Q+=4)this.first?(this.is224?(pt=300032,Z=I[0]-1413257819,D=Z-150054599<<0,k=Z+24177077<<0):(pt=704751109,Z=I[0]-210244248,D=Z-1521486534<<0,k=Z+143694565<<0),this.first=!1):(oe=(w>>>2|w<<30)^(w>>>13|w<<19)^(w>>>22|w<<10),we=(C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7),pt=w&E,_e=pt^w&P^Wn,ke=C&F^~C&U,Z=D+we+ke+h[Q]+I[Q],Ie=oe+_e,D=k+Z<<0,k=Z+Ie<<0),oe=(k>>>2|k<<30)^(k>>>13|k<<19)^(k>>>22|k<<10),we=(D>>>6|D<<26)^(D>>>11|D<<21)^(D>>>25|D<<7),To=k&w,_e=To^k&E^pt,ke=D&C^~D&F,Z=U+we+ke+h[Q+1]+I[Q+1],Ie=oe+_e,U=P+Z<<0,P=Z+Ie<<0,oe=(P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10),we=(U>>>6|U<<26)^(U>>>11|U<<21)^(U>>>25|U<<7),xo=P&k,_e=xo^P&w^To,ke=U&D^~U&C,Z=F+we+ke+h[Q+2]+I[Q+2],Ie=oe+_e,F=E+Z<<0,E=Z+Ie<<0,oe=(E>>>2|E<<30)^(E>>>13|E<<19)^(E>>>22|E<<10),we=(F>>>6|F<<26)^(F>>>11|F<<21)^(F>>>25|F<<7),Wn=E&P,_e=Wn^E&k^xo,ke=F&U^~F&D,Z=C+we+ke+h[Q+3]+I[Q+3],Ie=oe+_e,C=w+Z<<0,w=Z+Ie<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+w<<0,this.h1=this.h1+E<<0,this.h2=this.h2+P<<0,this.h3=this.h3+k<<0,this.h4=this.h4+C<<0,this.h5=this.h5+F<<0,this.h6=this.h6+U<<0,this.h7=this.h7+D<<0},M.prototype.hex=function(){this.finalize();var w=this.h0,E=this.h1,P=this.h2,k=this.h3,C=this.h4,F=this.h5,U=this.h6,D=this.h7,I=p[w>>>28&15]+p[w>>>24&15]+p[w>>>20&15]+p[w>>>16&15]+p[w>>>12&15]+p[w>>>8&15]+p[w>>>4&15]+p[w&15]+p[E>>>28&15]+p[E>>>24&15]+p[E>>>20&15]+p[E>>>16&15]+p[E>>>12&15]+p[E>>>8&15]+p[E>>>4&15]+p[E&15]+p[P>>>28&15]+p[P>>>24&15]+p[P>>>20&15]+p[P>>>16&15]+p[P>>>12&15]+p[P>>>8&15]+p[P>>>4&15]+p[P&15]+p[k>>>28&15]+p[k>>>24&15]+p[k>>>20&15]+p[k>>>16&15]+p[k>>>12&15]+p[k>>>8&15]+p[k>>>4&15]+p[k&15]+p[C>>>28&15]+p[C>>>24&15]+p[C>>>20&15]+p[C>>>16&15]+p[C>>>12&15]+p[C>>>8&15]+p[C>>>4&15]+p[C&15]+p[F>>>28&15]+p[F>>>24&15]+p[F>>>20&15]+p[F>>>16&15]+p[F>>>12&15]+p[F>>>8&15]+p[F>>>4&15]+p[F&15]+p[U>>>28&15]+p[U>>>24&15]+p[U>>>20&15]+p[U>>>16&15]+p[U>>>12&15]+p[U>>>8&15]+p[U>>>4&15]+p[U&15];return this.is224||(I+=p[D>>>28&15]+p[D>>>24&15]+p[D>>>20&15]+p[D>>>16&15]+p[D>>>12&15]+p[D>>>8&15]+p[D>>>4&15]+p[D&15]),I},M.prototype.toString=M.prototype.hex,M.prototype.digest=function(){this.finalize();var w=this.h0,E=this.h1,P=this.h2,k=this.h3,C=this.h4,F=this.h5,U=this.h6,D=this.h7,I=[w>>>24&255,w>>>16&255,w>>>8&255,w&255,E>>>24&255,E>>>16&255,E>>>8&255,E&255,P>>>24&255,P>>>16&255,P>>>8&255,P&255,k>>>24&255,k>>>16&255,k>>>8&255,k&255,C>>>24&255,C>>>16&255,C>>>8&255,C&255,F>>>24&255,F>>>16&255,F>>>8&255,F&255,U>>>24&255,U>>>16&255,U>>>8&255,U&255];return this.is224||I.push(D>>>24&255,D>>>16&255,D>>>8&255,D&255),I},M.prototype.array=M.prototype.digest,M.prototype.arrayBuffer=function(){this.finalize();var w=new ArrayBuffer(this.is224?28:32),E=new DataView(w);return E.setUint32(0,this.h0),E.setUint32(4,this.h1),E.setUint32(8,this.h2),E.setUint32(12,this.h3),E.setUint32(16,this.h4),E.setUint32(20,this.h5),E.setUint32(24,this.h6),this.is224||E.setUint32(28,this.h7),w};function X(w,E,P){var k,C=typeof w;if(C==="string"){var F=[],U=w.length,D=0,I;for(k=0;k>>6,F[D++]=128|I&63):I<55296||I>=57344?(F[D++]=224|I>>>12,F[D++]=128|I>>>6&63,F[D++]=128|I&63):(I=65536+((I&1023)<<10|w.charCodeAt(++k)&1023),F[D++]=240|I>>>18,F[D++]=128|I>>>12&63,F[D++]=128|I>>>6&63,F[D++]=128|I&63);w=F}else if(C==="object"){if(w===null)throw new Error(r);if(d&&w.constructor===ArrayBuffer)w=new Uint8Array(w);else if(!Array.isArray(w)&&(!d||!ArrayBuffer.isView(w)))throw new Error(r)}else throw new Error(r);w.length>64&&(w=new M(E,!0).update(w).array());var Q=[],oe=[];for(k=0;k<64;++k){var we=w[k]||0;Q[k]=92^we,oe[k]=54^we}M.call(this,E,P),this.update(oe),this.oKeyPad=Q,this.inner=!0,this.sharedMemory=P}X.prototype=new M,X.prototype.finalize=function(){if(M.prototype.finalize.call(this),this.inner){this.inner=!1;var w=this.array();M.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(w),M.prototype.finalize.call(this)}};var x=S();x.sha256=x,x.sha224=S(!0),x.sha256.hmac=A(),x.sha224.hmac=A(!0),u?t.exports=x:(a.sha256=x.sha256,a.sha224=x.sha224)})()}),wd={};pr(wd,{registerWorker:()=>Nl});function Bo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ee(e){return this instanceof ee?(this.v=e,this):new ee(e)}function Qe(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),a,o=[];return a={},l("next"),l("throw"),l("return"),a[Symbol.asyncIterator]=function(){return this},a;function l(m){n[m]&&(a[m]=function(h){return new Promise(function(g,b){o.push([m,h,g,b])>1||u(m,h)})})}function u(m,h){try{_(n[m](h))}catch(g){f(o[0][3],g)}}function _(m){m.value instanceof ee?Promise.resolve(m.value.v).then(d,p):f(o[0][2],m)}function d(m){u("next",m)}function p(m){u("throw",m)}function f(m,h){m(h),o.shift(),o.length&&u(o[0][0],o[0][1])}}function ei(e){var t,r;return t={},n("next"),n("throw",function(a){throw a}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(a,o){t[a]=e[a]?function(l){return(r=!r)?{value:ee(e[a](l)),done:!1}:o?o(l):l}:o}}function ut(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Io=="function"?Io(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(l){return new Promise(function(u,_){l=e[o](l),a(u,_,l.done,l.value)})}}function a(o,l,u,_){Promise.resolve(_).then(function(d){o({value:d,done:u})},l)}}var Ea={};pr(Ea,{compareArrayLike:()=>wa,joinUint8Arrays:()=>Ye,memcpy:()=>xi,rebaseValueOffsets:()=>Rn,toArrayBufferView:()=>re,toArrayBufferViewAsyncIterator:()=>ft,toArrayBufferViewIterator:()=>xt,toBigInt64Array:()=>Bn,toBigUint64Array:()=>nu,toFloat32Array:()=>su,toFloat32ArrayAsyncIterator:()=>Su,toFloat32ArrayIterator:()=>fu,toFloat64Array:()=>au,toFloat64ArrayAsyncIterator:()=>wu,toFloat64ArrayIterator:()=>pu,toInt16Array:()=>tu,toInt16ArrayAsyncIterator:()=>gu,toInt16ArrayIterator:()=>lu,toInt32Array:()=>Pr,toInt32ArrayAsyncIterator:()=>vu,toInt32ArrayIterator:()=>uu,toInt8Array:()=>eu,toInt8ArrayAsyncIterator:()=>hu,toInt8ArrayIterator:()=>cu,toUint16Array:()=>ru,toUint16ArrayAsyncIterator:()=>yu,toUint16ArrayIterator:()=>_u,toUint32Array:()=>iu,toUint32ArrayAsyncIterator:()=>bu,toUint32ArrayIterator:()=>du,toUint8Array:()=>z,toUint8ArrayAsyncIterator:()=>Sa,toUint8ArrayIterator:()=>ba,toUint8ClampedArray:()=>ou,toUint8ClampedArrayAsyncIterator:()=>Eu,toUint8ClampedArrayIterator:()=>mu});var Yl=new TextDecoder("utf-8"),Ti=e=>Yl.decode(e),Jl=new TextEncoder,Ft=e=>Jl.encode(e),Kl=e=>typeof e=="number",Ro=e=>typeof e=="boolean",xe=e=>typeof e=="function",Oe=e=>e!=null&&Object(e)===e,_t=e=>Oe(e)&&xe(e.then),dt=e=>Oe(e)&&xe(e[Symbol.iterator]),rt=e=>Oe(e)&&xe(e[Symbol.asyncIterator]),Fn=e=>Oe(e)&&Oe(e.schema),xn=e=>Oe(e)&&"done"in e&&"value"in e,Cn=e=>Oe(e)&&xe(e.stat)&&Kl(e.fd),Mn=e=>Oe(e)&&Fi(e.body),Pn=e=>"_getDOMStream"in e&&"_getNodeStream"in e,Go=e=>Oe(e)&&xe(e.abort)&&xe(e.getWriter)&&!Pn(e),Fi=e=>Oe(e)&&xe(e.cancel)&&xe(e.getReader)&&!Pn(e),Uo=e=>Oe(e)&&xe(e.end)&&xe(e.write)&&Ro(e.writable)&&!Pn(e),In=e=>Oe(e)&&xe(e.read)&&xe(e.pipe)&&Ro(e.readable)&&!Pn(e),jo=e=>Oe(e)&&xe(e.clear)&&xe(e.bytes)&&xe(e.position)&&xe(e.setPosition)&&xe(e.capacity)&&xe(e.getBufferIdentifier)&&xe(e.createLong),ya=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:ArrayBuffer;function Zl(e){let t=e[0]?[e[0]]:[],r,n,a,o;for(let l,u,_=0,d=0,p=e.length;++_p+f.byteLength,0),a,o,l,u=0,_=-1,d=Math.min(t||Number.POSITIVE_INFINITY,n);for(let p=r.length;++_re(Int8Array,e),tu=e=>re(Int16Array,e),Pr=e=>re(Int32Array,e),Bn=e=>re(BigInt64Array,e),z=e=>re(Uint8Array,e),ru=e=>re(Uint16Array,e),iu=e=>re(Uint32Array,e),nu=e=>re(BigUint64Array,e),su=e=>re(Float32Array,e),au=e=>re(Float64Array,e),ou=e=>re(Uint8ClampedArray,e),va=e=>(e.next(),e);function*xt(e,t){let r=function*(a){yield a},n=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof ya?r(t):dt(t)?t:r(t);return yield*Mr(va(function*(a){let o=null;do o=a.next(yield re(e,o));while(!o.done)}(n[Symbol.iterator]()))),new e}var cu=e=>xt(Int8Array,e),lu=e=>xt(Int16Array,e),uu=e=>xt(Int32Array,e),ba=e=>xt(Uint8Array,e),_u=e=>xt(Uint16Array,e),du=e=>xt(Uint32Array,e),fu=e=>xt(Float32Array,e),pu=e=>xt(Float64Array,e),mu=e=>xt(Uint8ClampedArray,e);function ft(e,t){return Qe(this,arguments,function*(){if(_t(t))return yield ee(yield ee(yield*Mr(ei(ut(ft(e,yield ee(t)))))));let r=function(o){return Qe(this,arguments,function*(){yield yield ee(yield ee(o))})},n=function(o){return Qe(this,arguments,function*(){yield ee(yield*Mr(ei(ut(va(function*(l){let u=null;do u=l.next(yield u==null?void 0:u.value);while(!u.done)}(o[Symbol.iterator]()))))))})},a=typeof t=="string"||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||t instanceof ya?r(t):dt(t)?n(t):rt(t)?t:r(t);return yield ee(yield*Mr(ei(ut(va(function(o){return Qe(this,arguments,function*(){let l=null;do l=yield ee(o.next(yield yield ee(re(e,l))));while(!l.done)})}(a[Symbol.asyncIterator]())))))),yield ee(new e)})}var hu=e=>ft(Int8Array,e),gu=e=>ft(Int16Array,e),vu=e=>ft(Int32Array,e),Sa=e=>ft(Uint8Array,e),yu=e=>ft(Uint16Array,e),bu=e=>ft(Uint32Array,e),Su=e=>ft(Float32Array,e),wu=e=>ft(Float64Array,e),Eu=e=>ft(Uint8ClampedArray,e);function Rn(e,t,r){if(e!==0){r=r.slice(0,t);for(let n=-1,a=r.length;++n0)do if(e[r]!==t[r])return!1;while(++r(e.next(),e);function*Lu(e){let t,r=!1,n=[],a,o,l,u=0;function _(){return o==="peek"?Ye(n,l)[0]:([a,n,u]=Ye(n,l),a)}({cmd:o,size:l}=(yield null)||{cmd:"read",size:0});let d=ba(e)[Symbol.iterator]();try{do if({done:t,value:a}=Number.isNaN(l-u)?d.next():d.next(l-u),!t&&a.byteLength>0&&(n.push(a),u+=a.byteLength),t||l<=u)do({cmd:o,size:l}=yield _());while(l0&&(n.push(a),u+=a.byteLength),t||l<=u)do({cmd:o,size:l}=yield yield ee(_()));while(l0&&(n.push(z(a)),u+=a.byteLength),t||l<=u)do({cmd:o,size:l}=yield yield ee(_()));while(l{})}get closed(){return this.reader?this.reader.closed.catch(()=>{}):Promise.resolve()}releaseLock(){this.reader&&this.reader.releaseLock(),this.reader=null}cancel(e){return B(this,void 0,void 0,function*(){let{reader:t,source:r}=this;t&&(yield t.cancel(e).catch(()=>{})),r&&r.locked&&this.releaseLock()})}read(e){return B(this,void 0,void 0,function*(){if(e===0)return{done:this.reader==null,value:new Uint8Array(0)};let t=yield this.reader.read();return!t.done&&(t.value=z(t)),t})}},La=(e,t)=>{let r=a=>n([t,a]),n;return[t,r,new Promise(a=>(n=a)&&e.once(t,r))]};function ku(e){return Qe(this,arguments,function*(){let t=[],r="error",n=!1,a=null,o,l,u=0,_=[],d;function p(){return o==="peek"?Ye(_,l)[0]:([d,_,u]=Ye(_,l),d)}if({cmd:o,size:l}=(yield yield ee(null))||{cmd:"read",size:0},e.isTTY)return yield yield ee(new Uint8Array(0)),yield ee(null);try{t[0]=La(e,"end"),t[1]=La(e,"error");do{if(t[2]=La(e,"readable"),[r,a]=yield ee(Promise.race(t.map(m=>m[2]))),r==="error")break;if((n=r==="end")||(Number.isFinite(l-u)?(d=z(e.read(l-u)),d.byteLength0&&(_.push(d),u+=d.byteLength)),n||l<=u)do({cmd:o,size:l}=yield yield ee(p()));while(l{for(let[v,S]of m)e.off(v,S);try{let v=e.destroy;v&&v.call(e,h),h=void 0}catch(v){h=v||h}finally{h!=null?b(h):g()}})}})}var ue;(function(e){e[e.V1=0]="V1",e[e.V2=1]="V2",e[e.V3=2]="V3",e[e.V4=3]="V4",e[e.V5=4]="V5"})(ue||(ue={}));var he;(function(e){e[e.Sparse=0]="Sparse",e[e.Dense=1]="Dense"})(he||(he={}));var pe;(function(e){e[e.HALF=0]="HALF",e[e.SINGLE=1]="SINGLE",e[e.DOUBLE=2]="DOUBLE"})(pe||(pe={}));var Ae;(function(e){e[e.DAY=0]="DAY",e[e.MILLISECOND=1]="MILLISECOND"})(Ae||(Ae={}));var G;(function(e){e[e.SECOND=0]="SECOND",e[e.MILLISECOND=1]="MILLISECOND",e[e.MICROSECOND=2]="MICROSECOND",e[e.NANOSECOND=3]="NANOSECOND"})(G||(G={}));var Ce;(function(e){e[e.YEAR_MONTH=0]="YEAR_MONTH",e[e.DAY_TIME=1]="DAY_TIME",e[e.MONTH_DAY_NANO=2]="MONTH_DAY_NANO"})(Ce||(Ce={}));var Ct=new Int32Array(2),Un=new Float32Array(Ct.buffer),jn=new Float64Array(Ct.buffer),ti=new Uint16Array(new Uint8Array([1,0]).buffer)[0]===1,Ci;(function(e){e[e.UTF8_BYTES=1]="UTF8_BYTES",e[e.UTF16_STRING=2]="UTF16_STRING"})(Ci||(Ci={}));var Je=class Hd{constructor(t){this.bytes_=t,this.position_=0,this.text_decoder_=new TextDecoder}static allocate(t){return new Hd(new Uint8Array(t))}clear(){this.position_=0}bytes(){return this.bytes_}position(){return this.position_}setPosition(t){this.position_=t}capacity(){return this.bytes_.length}readInt8(t){return this.readUint8(t)<<24>>24}readUint8(t){return this.bytes_[t]}readInt16(t){return this.readUint16(t)<<16>>16}readUint16(t){return this.bytes_[t]|this.bytes_[t+1]<<8}readInt32(t){return this.bytes_[t]|this.bytes_[t+1]<<8|this.bytes_[t+2]<<16|this.bytes_[t+3]<<24}readUint32(t){return this.readInt32(t)>>>0}readInt64(t){return BigInt.asIntN(64,BigInt(this.readUint32(t))+(BigInt(this.readUint32(t+4))<>8}writeUint16(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8}writeInt32(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8,this.bytes_[t+2]=r>>16,this.bytes_[t+3]=r>>24}writeUint32(t,r){this.bytes_[t]=r,this.bytes_[t+1]=r>>8,this.bytes_[t+2]=r>>16,this.bytes_[t+3]=r>>24}writeInt64(t,r){this.writeInt32(t,Number(BigInt.asIntN(32,r))),this.writeInt32(t+4,Number(BigInt.asIntN(32,r>>BigInt(32))))}writeUint64(t,r){this.writeUint32(t,Number(BigInt.asUintN(32,r))),this.writeUint32(t+4,Number(BigInt.asUintN(32,r>>BigInt(32))))}writeFloat32(t,r){Un[0]=r,this.writeInt32(t,Ct[0])}writeFloat64(t,r){jn[0]=r,this.writeInt32(t,Ct[ti?0:1]),this.writeInt32(t+4,Ct[ti?1:0])}getBufferIdentifier(){if(this.bytes_.lengththis.minalign&&(this.minalign=t);let n=~(this.bb.capacity()-this.space+r)+1&t-1;for(;this.space=0&&this.vtable[r]==0;r--);let n=r+1;for(;r>=0;r--)this.addInt16(this.vtable[r]!=0?t-this.vtable[r]:0);let a=2;this.addInt16(t-this.object_start);let o=(n+a)*2;this.addInt16(o);let l=0,u=this.space;e:for(r=0;r=0;l--)this.writeInt8(o.charCodeAt(l))}this.prep(this.minalign,4+a),this.addOffset(t),a&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)}finishSizePrefixed(t,r){this.finish(t,r,!0)}requiredField(t,r){let n=this.bb.capacity()-t,a=n-this.bb.readInt32(n);if(!(r=0;n--)t.addInt32(r[n]);return t.endVector()}static startTypeIdsVector(t,r){t.startVector(4,r,4)}static endUnion(t){return t.endObject()}static createUnion(t,r,n){return Jn.startUnion(t),Jn.addMode(t,r),Jn.addTypeIds(t,n),Jn.endUnion(t)}},Ni=class Td{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsUtf8(t,r){return(r||new Td).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsUtf8(t,r){return t.setPosition(t.position()+4),(r||new Td).__init(t.readInt32(t.position())+t.position(),t)}static startUtf8(t){t.startObject(0)}static endUtf8(t){return t.endObject()}static createUtf8(t){return Td.startUtf8(t),Td.endUtf8(t)}},ge;(function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.FloatingPoint=3]="FloatingPoint",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct_=13]="Struct_",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Duration=18]="Duration",e[e.LargeBinary=19]="LargeBinary",e[e.LargeUtf8=20]="LargeUtf8",e[e.LargeList=21]="LargeList",e[e.RunEndEncoded=22]="RunEndEncoded"})(ge||(ge={}));var je=class xd{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsField(t,r){return(r||new xd).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsField(t,r){return t.setPosition(t.position()+4),(r||new xd).__init(t.readInt32(t.position())+t.position(),t)}name(t){let r=this.bb.__offset(this.bb_pos,4);return r?this.bb.__string(this.bb_pos+r,t):null}nullable(){let t=this.bb.__offset(this.bb_pos,6);return t?!!this.bb.readInt8(this.bb_pos+t):!1}typeType(){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readUint8(this.bb_pos+t):ge.NONE}type(t){let r=this.bb.__offset(this.bb_pos,10);return r?this.bb.__union(t,this.bb_pos+r):null}dictionary(t){let r=this.bb.__offset(this.bb_pos,12);return r?(t||new Mt).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}children(t,r){let n=this.bb.__offset(this.bb_pos,14);return n?(r||new xd).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}childrenLength(){let t=this.bb.__offset(this.bb_pos,14);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,r){let n=this.bb.__offset(this.bb_pos,16);return n?(r||new Me).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,16);return t?this.bb.__vector_len(this.bb_pos+t):0}static startField(t){t.startObject(7)}static addName(t,r){t.addFieldOffset(0,r,0)}static addNullable(t,r){t.addFieldInt8(1,+r,0)}static addTypeType(t,r){t.addFieldInt8(2,r,ge.NONE)}static addType(t,r){t.addFieldOffset(3,r,0)}static addDictionary(t,r){t.addFieldOffset(4,r,0)}static addChildren(t,r){t.addFieldOffset(5,r,0)}static createChildrenVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startChildrenVector(t,r){t.startVector(4,r,4)}static addCustomMetadata(t,r){t.addFieldOffset(6,r,0)}static createCustomMetadataVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startCustomMetadataVector(t,r){t.startVector(4,r,4)}static endField(t){return t.endObject()}},Ve=class dr{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsSchema(t,r){return(r||new dr).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsSchema(t,r){return t.setPosition(t.position()+4),(r||new dr).__init(t.readInt32(t.position())+t.position(),t)}endianness(){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):mr.Little}fields(t,r){let n=this.bb.__offset(this.bb_pos,6);return n?(r||new je).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}fieldsLength(){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,r){let n=this.bb.__offset(this.bb_pos,8);return n?(r||new Me).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}features(t){let r=this.bb.__offset(this.bb_pos,10);return r?this.bb.readInt64(this.bb.__vector(this.bb_pos+r)+t*8):BigInt(0)}featuresLength(){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}static startSchema(t){t.startObject(4)}static addEndianness(t,r){t.addFieldInt16(0,r,mr.Little)}static addFields(t,r){t.addFieldOffset(1,r,0)}static createFieldsVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startFieldsVector(t,r){t.startVector(4,r,4)}static addCustomMetadata(t,r){t.addFieldOffset(2,r,0)}static createCustomMetadataVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startCustomMetadataVector(t,r){t.startVector(4,r,4)}static addFeatures(t,r){t.addFieldOffset(3,r,0)}static createFeaturesVector(t,r){t.startVector(8,r.length,8);for(let n=r.length-1;n>=0;n--)t.addInt64(r[n]);return t.endVector()}static startFeaturesVector(t,r){t.startVector(8,r,8)}static endSchema(t){return t.endObject()}static finishSchemaBuffer(t,r){t.finish(r)}static finishSizePrefixedSchemaBuffer(t,r){t.finish(r,void 0,!0)}static createSchema(t,r,n,a,o){return dr.startSchema(t),dr.addEndianness(t,r),dr.addFields(t,n),dr.addCustomMetadata(t,a),dr.addFeatures(t,o),dr.endSchema(t)}},ne;(function(e){e[e.NONE=0]="NONE",e[e.Schema=1]="Schema",e[e.DictionaryBatch=2]="DictionaryBatch",e[e.RecordBatch=3]="RecordBatch",e[e.Tensor=4]="Tensor",e[e.SparseTensor=5]="SparseTensor"})(ne||(ne={}));var y;(function(e){e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Duration=18]="Duration",e[e.LargeBinary=19]="LargeBinary",e[e.LargeUtf8=20]="LargeUtf8",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth",e[e.DurationSecond=-27]="DurationSecond",e[e.DurationMillisecond=-28]="DurationMillisecond",e[e.DurationMicrosecond=-29]="DurationMicrosecond",e[e.DurationNanosecond=-30]="DurationNanosecond"})(y||(y={}));var nt;(function(e){e[e.OFFSET=0]="OFFSET",e[e.DATA=1]="DATA",e[e.VALIDITY=2]="VALIDITY",e[e.TYPE=3]="TYPE"})(nt||(nt={}));var za={};pr(za,{clampRange:()=>$i,createElementComparator:()=>Dr,wrapIndex:()=>Br});var Da={};pr(Da,{valueToString:()=>gt});function gt(e){if(e===null)return"null";if(e===void 0)return"undefined";switch(typeof e){case"number":return"".concat(e);case"bigint":return"".concat(e);case"string":return'"'.concat(e,'"')}return typeof e[Symbol.toPrimitive]=="function"?e[Symbol.toPrimitive]("string"):ArrayBuffer.isView(e)?e instanceof BigInt64Array||e instanceof BigUint64Array?"[".concat([...e].map(t=>gt(t)),"]"):"[".concat(e,"]"):ArrayBuffer.isView(e)?"[".concat(e,"]"):JSON.stringify(e,(t,r)=>typeof r=="bigint"?"".concat(r):r)}var xa={};pr(xa,{BN:()=>Vi,bigNumToBigInt:()=>Ho,bigNumToNumber:()=>Fa,bigNumToString:()=>ai,isArrowBigNumSymbol:()=>Oo});function ae(e){if(typeof e=="bigint"&&(eNumber.MAX_SAFE_INTEGER))throw new TypeError("".concat(e," is not safe to convert to a number."));return Number(e)}function ka(e,t){return ae(e/t)+ae(e%t)/ae(t)}var Oo=Symbol.for("isArrowBigNum");function vt(e,...t){return t.length===0?Object.setPrototypeOf(re(this.TypedArray,e),this.constructor.prototype):Object.setPrototypeOf(new this.TypedArray(e,...t),this.constructor.prototype)}vt.prototype[Oo]=!0,vt.prototype.toJSON=function(){return'"'.concat(ai(this),'"')},vt.prototype.valueOf=function(e){return Fa(this,e)},vt.prototype.toString=function(){return ai(this)},vt.prototype[Symbol.toPrimitive]=function(e="default"){switch(e){case"number":return Fa(this);case"string":return ai(this);case"default":return Ho(this)}return ai(this)};function ni(...e){return vt.apply(this,e)}function si(...e){return vt.apply(this,e)}function Wi(...e){return vt.apply(this,e)}Object.setPrototypeOf(ni.prototype,Object.create(Int32Array.prototype)),Object.setPrototypeOf(si.prototype,Object.create(Uint32Array.prototype)),Object.setPrototypeOf(Wi.prototype,Object.create(Uint32Array.prototype)),Object.assign(ni.prototype,vt.prototype,{constructor:ni,signed:!0,TypedArray:Int32Array,BigIntArray:BigInt64Array}),Object.assign(si.prototype,vt.prototype,{constructor:si,signed:!1,TypedArray:Uint32Array,BigIntArray:BigUint64Array}),Object.assign(Wi.prototype,vt.prototype,{constructor:Wi,signed:!0,TypedArray:Uint32Array,BigIntArray:BigUint64Array});var Tu=BigInt(4294967296)*BigInt(4294967296),Fu=Tu-BigInt(1);function Fa(e,t){let{buffer:r,byteOffset:n,byteLength:a,signed:o}=e,l=new BigUint64Array(r,n,a/8),u=o&&l.at(-1)&BigInt(1)<=0)return Ta(e);t=t.slice();let r=1;for(let a=0;a(e.children=null,e.ArrayType=Array,e.OffsetArrayType=Int32Array,e[Symbol.toStringTag]="DataType"))(R.prototype);var He=class extends R{constructor(){super(y.Null)}toString(){return"Null"}};Wo=Symbol.toStringTag,He[Wo]=(e=>e[Symbol.toStringTag]="Null")(He.prototype);var Pe=class extends R{constructor(e,t){super(y.Int),this.isSigned=e,this.bitWidth=t}get ArrayType(){switch(this.bitWidth){case 8:return this.isSigned?Int8Array:Uint8Array;case 16:return this.isSigned?Int16Array:Uint16Array;case 32:return this.isSigned?Int32Array:Uint32Array;case 64:return this.isSigned?BigInt64Array:BigUint64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}toString(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}};Vo=Symbol.toStringTag,Pe[Vo]=(e=>(e.isSigned=null,e.bitWidth=null,e[Symbol.toStringTag]="Int"))(Pe.prototype);var It=class extends Pe{constructor(){super(!0,32)}get ArrayType(){return Int32Array}};Object.defineProperty(It.prototype,"ArrayType",{value:Int32Array});var st=class extends R{constructor(e){super(y.Float),this.precision=e}get ArrayType(){switch(this.precision){case pe.HALF:return Uint16Array;case pe.SINGLE:return Float32Array;case pe.DOUBLE:return Float64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}toString(){return"Float".concat(this.precision<<5||16)}};zo=Symbol.toStringTag,st[zo]=(e=>(e.precision=null,e[Symbol.toStringTag]="Float"))(st.prototype);var Wt=class extends R{constructor(){super(y.Binary)}toString(){return"Binary"}};$o=Symbol.toStringTag,Wt[$o]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Binary"))(Wt.prototype);var Vt=class extends R{constructor(){super(y.LargeBinary)}toString(){return"LargeBinary"}};qo=Symbol.toStringTag,Vt[qo]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]="LargeBinary"))(Vt.prototype);var zt=class extends R{constructor(){super(y.Utf8)}toString(){return"Utf8"}};Xo=Symbol.toStringTag,zt[Xo]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Utf8"))(zt.prototype);var $t=class extends R{constructor(){super(y.LargeUtf8)}toString(){return"LargeUtf8"}};Qo=Symbol.toStringTag,$t[Qo]=(e=>(e.ArrayType=Uint8Array,e.OffsetArrayType=BigInt64Array,e[Symbol.toStringTag]="LargeUtf8"))($t.prototype);var qt=class extends R{constructor(){super(y.Bool)}toString(){return"Bool"}};Yo=Symbol.toStringTag,qt[Yo]=(e=>(e.ArrayType=Uint8Array,e[Symbol.toStringTag]="Bool"))(qt.prototype);var Xt=class extends R{constructor(e,t,r=128){super(y.Decimal),this.scale=e,this.precision=t,this.bitWidth=r}toString(){return"Decimal[".concat(this.precision,"e").concat(this.scale>0?"+":"").concat(this.scale,"]")}};Jo=Symbol.toStringTag,Xt[Jo]=(e=>(e.scale=null,e.precision=null,e.ArrayType=Uint32Array,e[Symbol.toStringTag]="Decimal"))(Xt.prototype);var Qt=class extends R{constructor(e){super(y.Date),this.unit=e}toString(){return"Date".concat((this.unit+1)*32,"<").concat(Ae[this.unit],">")}get ArrayType(){return this.unit===Ae.DAY?Int32Array:BigInt64Array}};Ko=Symbol.toStringTag,Qt[Ko]=(e=>(e.unit=null,e[Symbol.toStringTag]="Date"))(Qt.prototype);var Yt=class extends R{constructor(e,t){super(y.Time),this.unit=e,this.bitWidth=t}toString(){return"Time".concat(this.bitWidth,"<").concat(G[this.unit],">")}get ArrayType(){switch(this.bitWidth){case 32:return Int32Array;case 64:return BigInt64Array}throw new Error("Unrecognized ".concat(this[Symbol.toStringTag]," type"))}};Zo=Symbol.toStringTag,Yt[Zo]=(e=>(e.unit=null,e.bitWidth=null,e[Symbol.toStringTag]="Time"))(Yt.prototype);var Jt=class extends R{constructor(e,t){super(y.Timestamp),this.unit=e,this.timezone=t}toString(){return"Timestamp<".concat(G[this.unit]).concat(this.timezone?", ".concat(this.timezone):"",">")}};ec=Symbol.toStringTag,Jt[ec]=(e=>(e.unit=null,e.timezone=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]="Timestamp"))(Jt.prototype);var Kt=class extends R{constructor(e){super(y.Interval),this.unit=e}toString(){return"Interval<".concat(Ce[this.unit],">")}};tc=Symbol.toStringTag,Kt[tc]=(e=>(e.unit=null,e.ArrayType=Int32Array,e[Symbol.toStringTag]="Interval"))(Kt.prototype);var Zt=class extends R{constructor(e){super(y.Duration),this.unit=e}toString(){return"Duration<".concat(G[this.unit],">")}};rc=Symbol.toStringTag,Zt[rc]=(e=>(e.unit=null,e.ArrayType=BigInt64Array,e[Symbol.toStringTag]="Duration"))(Zt.prototype);var yt=class extends R{constructor(e){super(y.List),this.children=[e]}toString(){return"List<".concat(this.valueType,">")}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}};ic=Symbol.toStringTag,yt[ic]=(e=>(e.children=null,e[Symbol.toStringTag]="List"))(yt.prototype);var ve=class extends R{constructor(e){super(y.Struct),this.children=e}toString(){return"Struct<{".concat(this.children.map(e=>"".concat(e.name,":").concat(e.type)).join(", "),"}>")}};nc=Symbol.toStringTag,ve[nc]=(e=>(e.children=null,e[Symbol.toStringTag]="Struct"))(ve.prototype);var bt=class extends R{constructor(e,t,r){super(y.Union),this.mode=e,this.children=r,this.typeIds=t=Int32Array.from(t),this.typeIdToChildIndex=t.reduce((n,a,o)=>(n[a]=o)&&n||n,Object.create(null))}toString(){return"".concat(this[Symbol.toStringTag],"<").concat(this.children.map(e=>"".concat(e.type)).join(" | "),">")}};sc=Symbol.toStringTag,bt[sc]=(e=>(e.mode=null,e.typeIds=null,e.children=null,e.typeIdToChildIndex=null,e.ArrayType=Int8Array,e[Symbol.toStringTag]="Union"))(bt.prototype);var er=class extends R{constructor(e){super(y.FixedSizeBinary),this.byteWidth=e}toString(){return"FixedSizeBinary[".concat(this.byteWidth,"]")}};ac=Symbol.toStringTag,er[ac]=(e=>(e.byteWidth=null,e.ArrayType=Uint8Array,e[Symbol.toStringTag]="FixedSizeBinary"))(er.prototype);var St=class extends R{constructor(e,t){super(y.FixedSizeList),this.listSize=e,this.children=[t]}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get ArrayType(){return this.valueType.ArrayType}toString(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}};oc=Symbol.toStringTag,St[oc]=(e=>(e.children=null,e.listSize=null,e[Symbol.toStringTag]="FixedSizeList"))(St.prototype);var wt=class extends R{constructor(e,t=!1){var r,n,a;if(super(y.Map),this.children=[e],this.keysSorted=t,e&&(e.name="entries",!((r=e==null?void 0:e.type)===null||r===void 0)&&r.children)){let o=(n=e==null?void 0:e.type)===null||n===void 0?void 0:n.children[0];o&&(o.name="key");let l=(a=e==null?void 0:e.type)===null||a===void 0?void 0:a.children[1];l&&(l.name="value")}}get keyType(){return this.children[0].type.children[0].type}get valueType(){return this.children[0].type.children[1].type}get childType(){return this.children[0].type}toString(){return"Map<{".concat(this.children[0].type.children.map(e=>"".concat(e.name,":").concat(e.type)).join(", "),"}>")}};cc=Symbol.toStringTag,wt[cc]=(e=>(e.children=null,e.keysSorted=null,e[Symbol.toStringTag]="Map_"))(wt.prototype);var xu=(e=>()=>++e)(-1),Ze=class extends R{constructor(e,t,r,n){super(y.Dictionary),this.indices=t,this.dictionary=e,this.isOrdered=n||!1,this.id=r==null?xu():ae(r)}get children(){return this.dictionary.children}get valueType(){return this.dictionary}get ArrayType(){return this.dictionary.ArrayType}toString(){return"Dictionary<".concat(this.indices,", ").concat(this.dictionary,">")}};lc=Symbol.toStringTag,Ze[lc]=(e=>(e.id=null,e.indices=null,e.isOrdered=null,e.dictionary=null,e[Symbol.toStringTag]="Dictionary"))(Ze.prototype);function et(e){let t=e;switch(e.typeId){case y.Decimal:return e.bitWidth/32;case y.Interval:return 1+t.unit;case y.FixedSizeList:return t.listSize;case y.FixedSizeBinary:return t.byteWidth;default:return 1}}var j=class{visitMany(e,...t){return e.map((r,n)=>this.visit(r,...t.map(a=>a[n])))}visit(...e){return this.getVisitFn(e[0],!1).apply(this,e)}getVisitFn(e,t=!0){return Cu(this,e,t)}getVisitFnByTypeId(e,t=!0){return oi(this,e,t)}visitNull(e,...t){return null}visitBool(e,...t){return null}visitInt(e,...t){return null}visitFloat(e,...t){return null}visitUtf8(e,...t){return null}visitLargeUtf8(e,...t){return null}visitBinary(e,...t){return null}visitLargeBinary(e,...t){return null}visitFixedSizeBinary(e,...t){return null}visitDate(e,...t){return null}visitTimestamp(e,...t){return null}visitTime(e,...t){return null}visitDecimal(e,...t){return null}visitList(e,...t){return null}visitStruct(e,...t){return null}visitUnion(e,...t){return null}visitDictionary(e,...t){return null}visitInterval(e,...t){return null}visitDuration(e,...t){return null}visitFixedSizeList(e,...t){return null}visitMap(e,...t){return null}};function Cu(e,t,r=!0){return typeof t=="number"?oi(e,t,r):typeof t=="string"&&t in y?oi(e,y[t],r):t&&t instanceof R?oi(e,uc(t),r):t!=null&&t.type&&t.type instanceof R?oi(e,uc(t.type),r):oi(e,y.NONE,r)}function oi(e,t,r=!0){let n=null;switch(t){case y.Null:n=e.visitNull;break;case y.Bool:n=e.visitBool;break;case y.Int:n=e.visitInt;break;case y.Int8:n=e.visitInt8||e.visitInt;break;case y.Int16:n=e.visitInt16||e.visitInt;break;case y.Int32:n=e.visitInt32||e.visitInt;break;case y.Int64:n=e.visitInt64||e.visitInt;break;case y.Uint8:n=e.visitUint8||e.visitInt;break;case y.Uint16:n=e.visitUint16||e.visitInt;break;case y.Uint32:n=e.visitUint32||e.visitInt;break;case y.Uint64:n=e.visitUint64||e.visitInt;break;case y.Float:n=e.visitFloat;break;case y.Float16:n=e.visitFloat16||e.visitFloat;break;case y.Float32:n=e.visitFloat32||e.visitFloat;break;case y.Float64:n=e.visitFloat64||e.visitFloat;break;case y.Utf8:n=e.visitUtf8;break;case y.LargeUtf8:n=e.visitLargeUtf8;break;case y.Binary:n=e.visitBinary;break;case y.LargeBinary:n=e.visitLargeBinary;break;case y.FixedSizeBinary:n=e.visitFixedSizeBinary;break;case y.Date:n=e.visitDate;break;case y.DateDay:n=e.visitDateDay||e.visitDate;break;case y.DateMillisecond:n=e.visitDateMillisecond||e.visitDate;break;case y.Timestamp:n=e.visitTimestamp;break;case y.TimestampSecond:n=e.visitTimestampSecond||e.visitTimestamp;break;case y.TimestampMillisecond:n=e.visitTimestampMillisecond||e.visitTimestamp;break;case y.TimestampMicrosecond:n=e.visitTimestampMicrosecond||e.visitTimestamp;break;case y.TimestampNanosecond:n=e.visitTimestampNanosecond||e.visitTimestamp;break;case y.Time:n=e.visitTime;break;case y.TimeSecond:n=e.visitTimeSecond||e.visitTime;break;case y.TimeMillisecond:n=e.visitTimeMillisecond||e.visitTime;break;case y.TimeMicrosecond:n=e.visitTimeMicrosecond||e.visitTime;break;case y.TimeNanosecond:n=e.visitTimeNanosecond||e.visitTime;break;case y.Decimal:n=e.visitDecimal;break;case y.List:n=e.visitList;break;case y.Struct:n=e.visitStruct;break;case y.Union:n=e.visitUnion;break;case y.DenseUnion:n=e.visitDenseUnion||e.visitUnion;break;case y.SparseUnion:n=e.visitSparseUnion||e.visitUnion;break;case y.Dictionary:n=e.visitDictionary;break;case y.Interval:n=e.visitInterval;break;case y.IntervalDayTime:n=e.visitIntervalDayTime||e.visitInterval;break;case y.IntervalYearMonth:n=e.visitIntervalYearMonth||e.visitInterval;break;case y.Duration:n=e.visitDuration;break;case y.DurationSecond:n=e.visitDurationSecond||e.visitDuration;break;case y.DurationMillisecond:n=e.visitDurationMillisecond||e.visitDuration;break;case y.DurationMicrosecond:n=e.visitDurationMicrosecond||e.visitDuration;break;case y.DurationNanosecond:n=e.visitDurationNanosecond||e.visitDuration;break;case y.FixedSizeList:n=e.visitFixedSizeList;break;case y.Map:n=e.visitMap;break}if(typeof n=="function")return n;if(!r)return()=>null;throw new Error("Unrecognized type '".concat(y[t],"'"))}function uc(e){switch(e.typeId){case y.Null:return y.Null;case y.Int:{let{bitWidth:t,isSigned:r}=e;switch(t){case 8:return r?y.Int8:y.Uint8;case 16:return r?y.Int16:y.Uint16;case 32:return r?y.Int32:y.Uint32;case 64:return r?y.Int64:y.Uint64}return y.Int}case y.Float:switch(e.precision){case pe.HALF:return y.Float16;case pe.SINGLE:return y.Float32;case pe.DOUBLE:return y.Float64}return y.Float;case y.Binary:return y.Binary;case y.LargeBinary:return y.LargeBinary;case y.Utf8:return y.Utf8;case y.LargeUtf8:return y.LargeUtf8;case y.Bool:return y.Bool;case y.Decimal:return y.Decimal;case y.Time:switch(e.unit){case G.SECOND:return y.TimeSecond;case G.MILLISECOND:return y.TimeMillisecond;case G.MICROSECOND:return y.TimeMicrosecond;case G.NANOSECOND:return y.TimeNanosecond}return y.Time;case y.Timestamp:switch(e.unit){case G.SECOND:return y.TimestampSecond;case G.MILLISECOND:return y.TimestampMillisecond;case G.MICROSECOND:return y.TimestampMicrosecond;case G.NANOSECOND:return y.TimestampNanosecond}return y.Timestamp;case y.Date:switch(e.unit){case Ae.DAY:return y.DateDay;case Ae.MILLISECOND:return y.DateMillisecond}return y.Date;case y.Interval:switch(e.unit){case Ce.DAY_TIME:return y.IntervalDayTime;case Ce.YEAR_MONTH:return y.IntervalYearMonth}return y.Interval;case y.Duration:switch(e.unit){case G.SECOND:return y.DurationSecond;case G.MILLISECOND:return y.DurationMillisecond;case G.MICROSECOND:return y.DurationMicrosecond;case G.NANOSECOND:return y.DurationNanosecond}return y.Duration;case y.Map:return y.Map;case y.List:return y.List;case y.Struct:return y.Struct;case y.Union:switch(e.mode){case he.Dense:return y.DenseUnion;case he.Sparse:return y.SparseUnion}return y.Union;case y.FixedSizeBinary:return y.FixedSizeBinary;case y.FixedSizeList:return y.FixedSizeList;case y.Dictionary:return y.Dictionary}throw new Error("Unrecognized type '".concat(y[e.typeId],"'"))}j.prototype.visitInt8=null,j.prototype.visitInt16=null,j.prototype.visitInt32=null,j.prototype.visitInt64=null,j.prototype.visitUint8=null,j.prototype.visitUint16=null,j.prototype.visitUint32=null,j.prototype.visitUint64=null,j.prototype.visitFloat16=null,j.prototype.visitFloat32=null,j.prototype.visitFloat64=null,j.prototype.visitDateDay=null,j.prototype.visitDateMillisecond=null,j.prototype.visitTimestampSecond=null,j.prototype.visitTimestampMillisecond=null,j.prototype.visitTimestampMicrosecond=null,j.prototype.visitTimestampNanosecond=null,j.prototype.visitTimeSecond=null,j.prototype.visitTimeMillisecond=null,j.prototype.visitTimeMicrosecond=null,j.prototype.visitTimeNanosecond=null,j.prototype.visitDenseUnion=null,j.prototype.visitSparseUnion=null,j.prototype.visitIntervalDayTime=null,j.prototype.visitIntervalYearMonth=null,j.prototype.visitDuration=null,j.prototype.visitDurationSecond=null,j.prototype.visitDurationMillisecond=null,j.prototype.visitDurationMicrosecond=null,j.prototype.visitDurationNanosecond=null;var Ca={};pr(Ca,{float64ToUint16:()=>zi,uint16ToFloat64:()=>Kn});var _c=new Float64Array(1),ci=new Uint32Array(_c.buffer);function Kn(e){let t=(e&31744)>>10,r=(e&1023)/1024,n=Math.pow(-1,(e&32768)>>15);switch(t){case 31:return n*(r?Number.NaN:1/0);case 0:return n*(r?6103515625e-14*r:0)}return n*Math.pow(2,t-15)*(1+r)}function zi(e){if(e!==e)return 32256;_c[0]=e;let t=(ci[1]&2147483648)>>16&65535,r=ci[1]&2146435072,n=0;return r>=1089470464?ci[0]>0?r=31744:(r=(r&2080374784)>>16,n=(ci[1]&1048575)>>10):r<=1056964608?(n=1048576+(ci[1]&1048575),n=1048576+(n<<(r>>20)-998)>>21,r=0):(r=r-1056964608>>10,n=(ci[1]&1048575)+512>>10),t|r|n&65535}var V=class extends j{};function Y(e){return(t,r,n)=>{if(t.setValid(r,n!=null))return e(t,r,n)}}var Mu=(e,t,r)=>{e[t]=Math.floor(r/864e5)},dc=(e,t,r,n)=>{if(r+1{let a=e+r;n?t[a>>3]|=1<>3]&=~(1<{e[t]=r},Ma=({values:e},t,r)=>{e[t]=r},fc=({values:e},t,r)=>{e[t]=zi(r)},Iu=(e,t,r)=>{switch(e.type.precision){case pe.HALF:return fc(e,t,r);case pe.SINGLE:case pe.DOUBLE:return Ma(e,t,r)}},Zn=({values:e},t,r)=>{Mu(e,t,r.valueOf())},es=({values:e},t,r)=>{e[t]=BigInt(r)},Pa=({stride:e,values:t},r,n)=>{t.set(n.subarray(0,e),e*r)},pc=({values:e,valueOffsets:t},r,n)=>dc(e,t,r,n),mc=({values:e,valueOffsets:t},r,n)=>dc(e,t,r,Ft(n)),Ia=(e,t,r)=>{e.type.unit===Ae.DAY?Zn(e,t,r):es(e,t,r)},ts=({values:e},t,r)=>{e[t]=BigInt(r/1e3)},rs=({values:e},t,r)=>{e[t]=BigInt(r)},is=({values:e},t,r)=>{e[t]=BigInt(r*1e3)},ns=({values:e},t,r)=>{e[t]=BigInt(r*1e6)},Ba=(e,t,r)=>{switch(e.type.unit){case G.SECOND:return ts(e,t,r);case G.MILLISECOND:return rs(e,t,r);case G.MICROSECOND:return is(e,t,r);case G.NANOSECOND:return ns(e,t,r)}},ss=({values:e},t,r)=>{e[t]=r},as=({values:e},t,r)=>{e[t]=r},os=({values:e},t,r)=>{e[t]=r},cs=({values:e},t,r)=>{e[t]=r},Ra=(e,t,r)=>{switch(e.type.unit){case G.SECOND:return ss(e,t,r);case G.MILLISECOND:return as(e,t,r);case G.MICROSECOND:return os(e,t,r);case G.NANOSECOND:return cs(e,t,r)}},Ga=({values:e,stride:t},r,n)=>{e.set(n.subarray(0,t),t*r)},Bu=(e,t,r)=>{let n=e.children[0],a=e.valueOffsets,o=Re.getVisitFn(n);if(Array.isArray(r))for(let l=-1,u=a[t],_=a[t+1];u<_;)o(n,u++,r[++l]);else for(let l=-1,u=a[t],_=a[t+1];u<_;)o(n,u++,r.get(++l))},Ru=(e,t,r)=>{let n=e.children[0],{valueOffsets:a}=e,o=Re.getVisitFn(n),{[t]:l,[t+1]:u}=a,_=r instanceof Map?r.entries():Object.entries(r);for(let d of _)if(o(n,l,d),++l>=u)break},Gu=(e,t)=>(r,n,a,o)=>n&&r(n,e,t[o]),Uu=(e,t)=>(r,n,a,o)=>n&&r(n,e,t.get(o)),ju=(e,t)=>(r,n,a,o)=>n&&r(n,e,t.get(a.name)),Ou=(e,t)=>(r,n,a,o)=>n&&r(n,e,t[a.name]),Hu=(e,t,r)=>{let n=e.type.children.map(o=>Re.getVisitFn(o.type)),a=r instanceof Map?ju(t,r):r instanceof se?Uu(t,r):Array.isArray(r)?Gu(t,r):Ou(t,r);e.type.children.forEach((o,l)=>a(n[l],e.children[l],o,l))},Nu=(e,t,r)=>{e.type.mode===he.Dense?hc(e,t,r):gc(e,t,r)},hc=(e,t,r)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],a=e.children[n];Re.visit(a,e.valueOffsets[t],r)},gc=(e,t,r)=>{let n=e.type.typeIdToChildIndex[e.typeIds[t]],a=e.children[n];Re.visit(a,t,r)},Wu=(e,t,r)=>{var n;(n=e.dictionary)===null||n===void 0||n.set(e.values[t],r)},Ua=(e,t,r)=>{e.type.unit===Ce.DAY_TIME?ls(e,t,r):us(e,t,r)},ls=({values:e},t,r)=>{e.set(r.subarray(0,2),2*t)},us=({values:e},t,r)=>{e[t]=r[0]*12+r[1]%12},_s=({values:e},t,r)=>{e[t]=r},ds=({values:e},t,r)=>{e[t]=r},ps=({values:e},t,r)=>{e[t]=r},ms=({values:e},t,r)=>{e[t]=r},ja=(e,t,r)=>{switch(e.type.unit){case G.SECOND:return _s(e,t,r);case G.MILLISECOND:return ds(e,t,r);case G.MICROSECOND:return ps(e,t,r);case G.NANOSECOND:return ms(e,t,r)}},Vu=(e,t,r)=>{let{stride:n}=e,a=e.children[0],o=Re.getVisitFn(a);if(Array.isArray(r))for(let l=-1,u=t*n;++l"".concat(gt(e),": ").concat(gt(t))).join(", "),"}")}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}[Symbol.iterator](){return new Oa(this[Et],this[li])}},Oa=class{constructor(e,t){this.childIndex=0,this.children=e.children,this.rowIndex=t,this.childFields=e.type.children,this.numChildren=this.childFields.length}[Symbol.iterator](){return this}next(){let e=this.childIndex;return et.name)}has(e,t){return e[Et].type.children.findIndex(r=>r.name===t)!==-1}getOwnPropertyDescriptor(e,t){if(e[Et].type.children.findIndex(r=>r.name===t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let r=e[Et].type.children.findIndex(n=>n.name===t);if(r!==-1){let n=Te.visit(e[Et].children[r],e[li]);return Reflect.set(e,t,n),n}}set(e,t,r){let n=e[Et].type.children.findIndex(a=>a.name===t);return n!==-1?(Re.visit(e[Et].children[n],e[li],r),Reflect.set(e,t,r)):Reflect.has(e,t)||typeof t=="symbol"?Reflect.set(e,t,r):!1}},O=class extends j{};function $(e){return(t,r)=>t.getValid(r)?e(t,r):null}var zu=(e,t)=>864e5*e[t],$u=(e,t)=>null,vc=(e,t,r)=>{if(r+1>=t.length)return null;let n=ae(t[r]),a=ae(t[r+1]);return e.subarray(n,a)},qu=({offset:e,values:t},r)=>{let n=e+r;return(t[n>>3]&1<zu(e,t),bc=({values:e},t)=>ae(e[t]),Lr=({stride:e,values:t},r)=>t[e*r],Xu=({stride:e,values:t},r)=>Kn(t[e*r]),Sc=({values:e},t)=>e[t],Qu=({stride:e,values:t},r)=>t.subarray(e*r,e*(r+1)),wc=({values:e,valueOffsets:t},r)=>vc(e,t,r),Ec=({values:e,valueOffsets:t},r)=>{let n=vc(e,t,r);return n!==null?Ti(n):null},Yu=({values:e},t)=>e[t],Ju=({type:e,values:t},r)=>e.precision!==pe.HALF?t[r]:Kn(t[r]),Ku=(e,t)=>e.type.unit===Ae.DAY?yc(e,t):bc(e,t),Lc=({values:e},t)=>1e3*ae(e[t]),Ac=({values:e},t)=>ae(e[t]),Dc=({values:e},t)=>ka(e[t],BigInt(1e3)),kc=({values:e},t)=>ka(e[t],BigInt(1e6)),Zu=(e,t)=>{switch(e.type.unit){case G.SECOND:return Lc(e,t);case G.MILLISECOND:return Ac(e,t);case G.MICROSECOND:return Dc(e,t);case G.NANOSECOND:return kc(e,t)}},Tc=({values:e},t)=>e[t],Fc=({values:e},t)=>e[t],xc=({values:e},t)=>e[t],Cc=({values:e},t)=>e[t],e_=(e,t)=>{switch(e.type.unit){case G.SECOND:return Tc(e,t);case G.MILLISECOND:return Fc(e,t);case G.MICROSECOND:return xc(e,t);case G.NANOSECOND:return Cc(e,t)}},t_=({values:e,stride:t},r)=>Vi.decimal(e.subarray(t*r,t*(r+1))),r_=(e,t)=>{let{valueOffsets:r,stride:n,children:a}=e,{[t*n]:o,[t*n+1]:l}=r,u=a[0].slice(o,l-o);return new se([u])},i_=(e,t)=>{let{valueOffsets:r,children:n}=e,{[t]:a,[t+1]:o}=r,l=n[0];return new Bt(l.slice(a,o-a))},n_=(e,t)=>new Er(e,t),s_=(e,t)=>e.type.mode===he.Dense?Mc(e,t):Pc(e,t),Mc=(e,t)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],n=e.children[r];return Te.visit(n,e.valueOffsets[t])},Pc=(e,t)=>{let r=e.type.typeIdToChildIndex[e.typeIds[t]],n=e.children[r];return Te.visit(n,t)},a_=(e,t)=>{var r;return(r=e.dictionary)===null||r===void 0?void 0:r.get(e.values[t])},o_=(e,t)=>e.type.unit===Ce.DAY_TIME?Ic(e,t):Bc(e,t),Ic=({values:e},t)=>e.subarray(2*t,2*(t+1)),Bc=({values:e},t)=>{let r=e[t],n=new Int32Array(2);return n[0]=Math.trunc(r/12),n[1]=Math.trunc(r%12),n},Rc=({values:e},t)=>e[t],Gc=({values:e},t)=>e[t],Uc=({values:e},t)=>e[t],jc=({values:e},t)=>e[t],c_=(e,t)=>{switch(e.type.unit){case G.SECOND:return Rc(e,t);case G.MILLISECOND:return Gc(e,t);case G.MICROSECOND:return Uc(e,t);case G.NANOSECOND:return jc(e,t)}},l_=(e,t)=>{let{stride:r,children:n}=e,a=n[0].slice(t*r,r);return new se([a])};O.prototype.visitNull=$($u),O.prototype.visitBool=$(qu),O.prototype.visitInt=$(Yu),O.prototype.visitInt8=$(Lr),O.prototype.visitInt16=$(Lr),O.prototype.visitInt32=$(Lr),O.prototype.visitInt64=$(Sc),O.prototype.visitUint8=$(Lr),O.prototype.visitUint16=$(Lr),O.prototype.visitUint32=$(Lr),O.prototype.visitUint64=$(Sc),O.prototype.visitFloat=$(Ju),O.prototype.visitFloat16=$(Xu),O.prototype.visitFloat32=$(Lr),O.prototype.visitFloat64=$(Lr),O.prototype.visitUtf8=$(Ec),O.prototype.visitLargeUtf8=$(Ec),O.prototype.visitBinary=$(wc),O.prototype.visitLargeBinary=$(wc),O.prototype.visitFixedSizeBinary=$(Qu),O.prototype.visitDate=$(Ku),O.prototype.visitDateDay=$(yc),O.prototype.visitDateMillisecond=$(bc),O.prototype.visitTimestamp=$(Zu),O.prototype.visitTimestampSecond=$(Lc),O.prototype.visitTimestampMillisecond=$(Ac),O.prototype.visitTimestampMicrosecond=$(Dc),O.prototype.visitTimestampNanosecond=$(kc),O.prototype.visitTime=$(e_),O.prototype.visitTimeSecond=$(Tc),O.prototype.visitTimeMillisecond=$(Fc),O.prototype.visitTimeMicrosecond=$(xc),O.prototype.visitTimeNanosecond=$(Cc),O.prototype.visitDecimal=$(t_),O.prototype.visitList=$(r_),O.prototype.visitStruct=$(n_),O.prototype.visitUnion=$(s_),O.prototype.visitDenseUnion=$(Mc),O.prototype.visitSparseUnion=$(Pc),O.prototype.visitDictionary=$(a_),O.prototype.visitInterval=$(o_),O.prototype.visitIntervalDayTime=$(Ic),O.prototype.visitIntervalYearMonth=$(Bc),O.prototype.visitDuration=$(c_),O.prototype.visitDurationSecond=$(Rc),O.prototype.visitDurationMillisecond=$(Gc),O.prototype.visitDurationMicrosecond=$(Uc),O.prototype.visitDurationNanosecond=$(jc),O.prototype.visitFixedSizeList=$(l_),O.prototype.visitMap=$(i_);var Te=new O,Ar=Symbol.for("keys"),_i=Symbol.for("vals"),ui=Symbol.for("kKeysAsStrings"),Na=Symbol.for("_kKeysAsStrings"),Bt=class{constructor(e){return this[Ar]=new se([e.children[0]]).memoize(),this[_i]=e.children[1],new Proxy(this,new Va)}get[ui](){return this[Na]||(this[Na]=Array.from(this[Ar].toArray(),String))}[Symbol.iterator](){return new Wa(this[Ar],this[_i])}get size(){return this[Ar].length}toArray(){return Object.values(this.toJSON())}toJSON(){let e=this[Ar],t=this[_i],r={};for(let n=-1,a=e.length;++n"".concat(gt(e),": ").concat(gt(t))).join(", "),"}")}[Symbol.for("nodejs.util.inspect.custom")](){return this.toString()}},Wa=class{constructor(e,t){this.keys=e,this.vals=t,this.keyIndex=0,this.numKeys=e.length}[Symbol.iterator](){return this}next(){let e=this.keyIndex;return e===this.numKeys?{done:!0,value:null}:(this.keyIndex++,{done:!1,value:[this.keys.get(e),Te.visit(this.vals,e)]})}},Va=class{isExtensible(){return!1}deleteProperty(){return!1}preventExtensions(){return!0}ownKeys(e){return e[ui]}has(e,t){return e[ui].includes(t)}getOwnPropertyDescriptor(e,t){if(e[ui].indexOf(t)!==-1)return{writable:!0,enumerable:!0,configurable:!0}}get(e,t){if(Reflect.has(e,t))return e[t];let r=e[ui].indexOf(t);if(r!==-1){let n=Te.visit(Reflect.get(e,_i),r);return Reflect.set(e,t,n),n}}set(e,t,r){let n=e[ui].indexOf(t);return n!==-1?(Re.visit(Reflect.get(e,_i),n,r),Reflect.set(e,t,r)):Reflect.has(e,t)?Reflect.set(e,t,r):!1}};Object.defineProperties(Bt.prototype,{[Symbol.toStringTag]:{enumerable:!1,configurable:!1,value:"Row"},[Ar]:{writable:!0,enumerable:!1,configurable:!1,value:null},[_i]:{writable:!0,enumerable:!1,configurable:!1,value:null},[Na]:{writable:!0,enumerable:!1,configurable:!1,value:null}});var Oc;function $i(e,t,r,n){let{length:a=0}=e,o=typeof t!="number"?0:t,l=typeof r!="number"?a:r;return o<0&&(o=(o%a+a)%a),l<0&&(l=(l%a+a)%a),la&&(l=a),n?n(e,o,l):[o,l]}var Br=(e,t)=>e<0?t+e:e,Hc=e=>e!==e;function Dr(e){if(typeof e!="object"||e===null)return Hc(e)?Hc:t=>t===e;if(e instanceof Date){let t=e.valueOf();return r=>r instanceof Date?r.valueOf()===t:!1}return ArrayBuffer.isView(e)?t=>t?wa(e,t):!1:e instanceof Map?__(e):Array.isArray(e)?u_(e):e instanceof se?d_(e):f_(e,!0)}function u_(e){let t=[];for(let r=-1,n=e.length;++r!1;let n=[];for(let a=-1,o=r.length;++a{if(!r||typeof r!="object")return!1;switch(r.constructor){case Array:return p_(e,r);case Map:return Nc(e,r,r.keys());case Bt:case Er:case Object:case void 0:return Nc(e,r,t||Object.keys(r))}return r instanceof se?m_(e,r):!1}}function p_(e,t){let r=e.length;if(t.length!==r)return!1;for(let n=-1;++nRr,getBit:()=>Wc,getBool:()=>vs,packBools:()=>Ur,popcnt_array:()=>Vc,popcnt_bit_range:()=>qi,popcnt_uint32:()=>gs,setBool:()=>h_,truncateBitmap:()=>Gr});function vs(e,t,r,n){return(r&1<>n}function h_(e,t,r){return r?!!(e[t>>3]|=1<>3]&=~(1<0||r.byteLength>3):Ur(new Rr(r,e,t,null,vs)).subarray(0,n)),a}return r}function Ur(e){let t=[],r=0,n=0,a=0;for(let l of e)l&&(a|=1<0)&&(t[r++]=a);let o=new Uint8Array(t.length+7&-8);return o.set(t),o}var Rr=class{constructor(e,t,r,n,a){this.bytes=e,this.length=r,this.context=n,this.get=a,this.bit=t%8,this.byteIndex=t>>3,this.byte=e[this.byteIndex++],this.index=0}next(){return this.index>3<<3,a=t+(t%8===0?0:8-t%8);return qi(e,t,a)+qi(e,n,r)+Vc(e,a>>3,n-a>>3)}function Vc(e,t,r){let n=0,a=Math.trunc(t),o=new DataView(e.buffer,e.byteOffset,e.byteLength),l=r===void 0?e.byteLength:a+r;for(;l-a>=4;)n+=gs(o.getUint32(a)),a+=4;for(;l-a>=2;)n+=gs(o.getUint16(a)),a+=2;for(;l-a>=1;)n+=gs(o.getUint8(a)),a+=1;return n}function gs(e){let t=Math.trunc(e);return t=t-(t>>>1&1431655765),t=(t&858993459)+(t>>>2&858993459),(t+(t>>>4)&252645135)*16843009>>>24}var g_=-1,le=class jd{get typeId(){return this.type.typeId}get ArrayType(){return this.type.ArrayType}get buffers(){return[this.valueOffsets,this.values,this.nullBitmap,this.typeIds]}get nullable(){if(this._nullCount!==0){let{type:t}=this;return R.isSparseUnion(t)?this.children.some(r=>r.nullable):R.isDenseUnion(t)?this.children.some(r=>r.nullable):this.nullBitmap&&this.nullBitmap.byteLength>0}return!0}get byteLength(){let t=0,{valueOffsets:r,values:n,nullBitmap:a,typeIds:o}=this;return r&&(t+=r.byteLength),n&&(t+=n.byteLength),a&&(t+=a.byteLength),o&&(t+=o.byteLength),this.children.reduce((l,u)=>l+u.byteLength,t)}get nullCount(){if(R.isUnion(this.type))return this.children.reduce((n,a)=>n+a.nullCount,0);let t=this._nullCount,r;return t<=g_&&(r=this.nullBitmap)&&(this._nullCount=t=r.length===0?0:this.length-qi(r,this.offset,this.offset+this.length)),t}constructor(t,r,n,a,o,l=[],u){this.type=t,this.children=l,this.dictionary=u,this.offset=Math.floor(Math.max(r||0,0)),this.length=Math.floor(Math.max(n||0,0)),this._nullCount=Math.floor(Math.max(a||0,-1));let _;o instanceof jd?(this.stride=o.stride,this.values=o.values,this.typeIds=o.typeIds,this.nullBitmap=o.nullBitmap,this.valueOffsets=o.valueOffsets):(this.stride=et(t),o&&((_=o[0])&&(this.valueOffsets=_),(_=o[1])&&(this.values=_),(_=o[2])&&(this.nullBitmap=_),(_=o[3])&&(this.typeIds=_)))}getValid(t){let{type:r}=this;if(R.isUnion(r)){let n=r,a=this.children[n.typeIdToChildIndex[this.typeIds[t]]],o=n.mode===he.Dense?this.valueOffsets[t]:t;return a.getValid(o)}if(this.nullable&&this.nullCount>0){let n=this.offset+t;return(this.nullBitmap[n>>3]&1<>3;(!o||o.byteLength<=p)&&(o=new Uint8Array((l+u+63&-64)>>3).fill(255),this.nullCount>0?(o.set(Gr(l,u,this.nullBitmap),0),Object.assign(this,{nullBitmap:o})):Object.assign(this,{nullBitmap:o,_nullCount:0}));let f=o[p];n=(f&d)!==0,o[p]=r?f|d:f&~d}return n!==!!r&&(this._nullCount=this.nullCount+(r?-1:1)),r}clone(t=this.type,r=this.offset,n=this.length,a=this._nullCount,o=this,l=this.children){return new jd(t,r,n,a,o,l,this.dictionary)}slice(t,r){let{stride:n,typeId:a,children:o}=this,l=+(this._nullCount===0)-1,u=a===16?n:1,_=this._sliceBuffers(t,r,n,a);return this.clone(this.type,this.offset+t,r,l,_,o.length===0||this.valueOffsets?o:this._sliceChildren(o,u*t,u*r))}_changeLengthAndBackfillNullBitmap(t){if(this.typeId===y.Null)return this.clone(this.type,0,t,0);let{length:r,nullCount:n}=this,a=new Uint8Array((t+63&-64)>>3).fill(255,0,r>>3);a[r>>3]=(1<0&&a.set(Gr(this.offset,r,this.nullBitmap),0);let o=this.buffers;return o[nt.VALIDITY]=a,this.clone(this.type,0,t,n+(t-r),o)}_sliceBuffers(t,r,n,a){let o,{buffers:l}=this;return(o=l[nt.TYPE])&&(l[nt.TYPE]=o.subarray(t,t+r)),(o=l[nt.OFFSET])&&(l[nt.OFFSET]=o.subarray(t,t+r+1))||(o=l[nt.DATA])&&(l[nt.DATA]=a===6?o:o.subarray(n*t,n*(t+r))),l}_sliceChildren(t,r,n){return t.map(a=>a.slice(r,n))}};le.prototype.children=Object.freeze([]);var qa=class Fd extends j{visit(t){return this.getVisitFn(t.type).call(this,t)}visitNull(t){let{["type"]:r,["offset"]:n=0,["length"]:a=0}=t;return new le(r,n,a,a)}visitBool(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length>>3,["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitInt(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length,["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitFloat(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length,["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitUtf8(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.data),o=z(t.nullBitmap),l=Pr(t.valueOffsets),{["length"]:u=l.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new le(r,n,u,_,[l,a,o])}visitLargeUtf8(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.data),o=z(t.nullBitmap),l=Bn(t.valueOffsets),{["length"]:u=l.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new le(r,n,u,_,[l,a,o])}visitBinary(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.data),o=z(t.nullBitmap),l=Pr(t.valueOffsets),{["length"]:u=l.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new le(r,n,u,_,[l,a,o])}visitLargeBinary(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.data),o=z(t.nullBitmap),l=Bn(t.valueOffsets),{["length"]:u=l.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new le(r,n,u,_,[l,a,o])}visitFixedSizeBinary(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitDate(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitTimestamp(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitTime(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitDecimal(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitList(t){let{["type"]:r,["offset"]:n=0,["child"]:a}=t,o=z(t.nullBitmap),l=Pr(t.valueOffsets),{["length"]:u=l.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new le(r,n,u,_,[l,void 0,o],[a])}visitStruct(t){let{["type"]:r,["offset"]:n=0,["children"]:a=[]}=t,o=z(t.nullBitmap),{length:l=a.reduce((_,{length:d})=>Math.max(_,d),0),nullCount:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,void 0,o],a)}visitUnion(t){let{["type"]:r,["offset"]:n=0,["children"]:a=[]}=t,o=re(r.ArrayType,t.typeIds),{["length"]:l=o.length,["nullCount"]:u=-1}=t;if(R.isSparseUnion(r))return new le(r,n,l,u,[void 0,void 0,void 0,o],a);let _=Pr(t.valueOffsets);return new le(r,n,l,u,[_,void 0,void 0,o],a)}visitDictionary(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.indices.ArrayType,t.data),{["dictionary"]:l=new se([new Fd().visit({type:r.dictionary})])}=t,{["length"]:u=o.length,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new le(r,n,u,_,[void 0,o,a],[],l)}visitInterval(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitDuration(t){let{["type"]:r,["offset"]:n=0}=t,a=z(t.nullBitmap),o=re(r.ArrayType,t.data),{["length"]:l=o.length,["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,o,a])}visitFixedSizeList(t){let{["type"]:r,["offset"]:n=0,["child"]:a=new Fd().visit({type:r.valueType})}=t,o=z(t.nullBitmap),{["length"]:l=a.length/et(r),["nullCount"]:u=t.nullBitmap?-1:0}=t;return new le(r,n,l,u,[void 0,void 0,o],[a])}visitMap(t){let{["type"]:r,["offset"]:n=0,["child"]:a=new Fd().visit({type:r.childType})}=t,o=z(t.nullBitmap),l=Pr(t.valueOffsets),{["length"]:u=l.length-1,["nullCount"]:_=t.nullBitmap?-1:0}=t;return new le(r,n,u,_,[l,void 0,o],[a])}},v_=new qa;function J(e){return v_.visit(e)}var Xi=class{constructor(e=0,t){this.numChunks=e,this.getChunkIterator=t,this.chunkIndex=0,this.chunkIterator=this.getChunkIterator(0)}next(){for(;this.chunkIndext.nullable)}function ys(e){return e.reduce((t,r)=>t+r.nullCount,0)}function bs(e){return e.reduce((t,r,n)=>(t[n+1]=t[n]+r.length,t),new Uint32Array(e.length+1))}function Ss(e,t,r,n){let a=[];for(let o=-1,l=e.length;++o=n)break;if(r>=_+d)continue;if(_>=r&&_+d<=n){a.push(u);continue}let p=Math.max(0,r-_),f=Math.min(n-_,d);a.push(u.slice(p,f-p))}return a.length===0&&a.push(e[0].slice(0,0)),a}function Xa(e,t,r,n){let a=0,o=0,l=t.length-1;do{if(a>=l-1)return r0?0:-1}function b_(e,t){let{nullBitmap:r}=e;if(!r||e.nullCount<=0)return-1;let n=0;for(let a of new Rr(r,e.offset+(t||0),e.length,r,vs)){if(!a)return n;++n}return-1}function K(e,t,r){if(t===void 0)return-1;if(t===null)switch(e.typeId){case y.Union:break;case y.Dictionary:break;default:return b_(e,r)}let n=Te.getVisitFn(e),a=Dr(t);for(let o=(r||0)-1,l=e.length;++o{let a=e.data[n];return a.values.subarray(0,a.length)[Symbol.iterator]()});let r=0;return new Xi(e.data.length,n=>{let a=e.data[n].length,o=e.slice(r,r+a);return r+=a,new Qa(o)})}var Qa=class{constructor(e){this.vector=e,this.index=0}next(){return this.indexu.data):t;if(o.length===0||o.some(u=>!(u instanceof le)))throw new TypeError("Vector constructor expects an Array of Data instances.");let l=(r=o[0])===null||r===void 0?void 0:r.type;switch(o.length){case 0:this._offsets=[0];break;case 1:{let{get:u,set:_,indexOf:d}=Xc[l.typeId],p=o[0];this.isValid=f=>Qi(p,f),this.get=f=>u(p,f),this.set=(f,m)=>_(p,f,m),this.indexOf=f=>d(p,f),this._offsets=[0,p.length];break}default:Object.setPrototypeOf(this,Qc[l.typeId]),this._offsets=bs(o);break}this.data=o,this.type=l,this.stride=et(l),this.numChildren=(a=(n=l.children)===null||n===void 0?void 0:n.length)!==null&&a!==void 0?a:0,this.length=this._offsets.at(-1)}get byteLength(){return this.data.reduce((t,r)=>t+r.byteLength,0)}get nullable(){return zc(this.data)}get nullCount(){return ys(this.data)}get ArrayType(){return this.type.ArrayType}get[Symbol.toStringTag](){return"".concat(this.VectorName,"<").concat(this.type[Symbol.toStringTag],">")}get VectorName(){return"".concat(y[this.type.typeId],"Vector")}isValid(t){return!1}get(t){return null}at(t){return this.get(Br(t,this.length))}set(t,r){}indexOf(t,r){return-1}includes(t,r){return this.indexOf(t,r)>-1}[Symbol.iterator](){return fi.visit(this)}concat(...t){return new Qn(this.data.concat(t.flatMap(r=>r.data).flat(Number.POSITIVE_INFINITY)))}slice(t,r){return new Qn($i(this,t,r,({data:n,_offsets:a},o,l)=>Ss(n,a,o,l)))}toJSON(){return[...this]}toArray(){let{type:t,data:r,length:n,stride:a,ArrayType:o}=this;switch(t.typeId){case y.Int:case y.Float:case y.Decimal:case y.Time:case y.Timestamp:switch(r.length){case 0:return new o;case 1:return r[0].values.subarray(0,n*a);default:return r.reduce((l,{values:u,length:_})=>(l.array.set(u.subarray(0,_*a),l.offset),l.offset+=_*a,l),{array:new o(n*a),offset:0}).array}}return[...this]}toString(){return"[".concat([...this].join(","),"]")}getChild(t){var r;return this.getChildAt((r=this.type.children)===null||r===void 0?void 0:r.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&tr[t])):null}get isMemoized(){return R.isDictionary(this.type)?this.data[0].dictionary.isMemoized:!1}memoize(){if(R.isDictionary(this.type)){let t=new Ls(this.data[0].dictionary),r=this.data.map(n=>{let a=n.clone();return a.dictionary=t,a});return new Qn(r)}return new Ls(this)}unmemoize(){if(R.isDictionary(this.type)&&this.isMemoized){let t=this.data[0].dictionary.unmemoize(),r=this.data.map(n=>{let a=n.clone();return a.dictionary=t,a});return new Qn(r)}return this}};qc=Symbol.toStringTag,se[qc]=(e=>{e.type=R.prototype,e.data=[],e.length=0,e.stride=1,e.numChildren=0,e._offsets=new Uint32Array([0]),e[Symbol.isConcatSpreadable]=!0;let t=Object.keys(y).map(r=>y[r]).filter(r=>typeof r=="number"&&r!==y.NONE);for(let r of t){let n=Te.getVisitFnByTypeId(r),a=Re.getVisitFnByTypeId(r),o=jr.getVisitFnByTypeId(r);Xc[r]={get:n,set:a,indexOf:o},Qc[r]=Object.create(e,{isValid:{value:di(Qi)},get:{value:di(Te.getVisitFnByTypeId(r))},set:{value:ws(Re.getVisitFnByTypeId(r))},indexOf:{value:Es(jr.getVisitFnByTypeId(r))}})}return"Vector"})(se.prototype);var Ls=class Wd extends se{constructor(t){super(t.data);let r=this.get,n=this.set,a=this.slice,o=new Array(this.length);Object.defineProperty(this,"get",{value(l){let u=o[l];if(u!==void 0)return u;let _=r.call(this,l);return o[l]=_,_}}),Object.defineProperty(this,"set",{value(l,u){n.call(this,l,u),o[l]=u}}),Object.defineProperty(this,"slice",{value:(l,u)=>new Wd(a.call(this,l,u))}),Object.defineProperty(this,"isMemoized",{value:!0}),Object.defineProperty(this,"unmemoize",{value:()=>new se(this.data)}),Object.defineProperty(this,"memoize",{value:()=>this})}};function Yc(e){if(!e||e.length<=0)return function(n){return!0};let t="",r=e.filter(n=>n===n);return r.length>0&&(t=` + switch (x) {`.concat(r.map(n=>` + case `.concat(S_(n),":")).join(""),` + return false; + }`)),e.length!==r.length&&(t=`if (x !== x) return false; +`.concat(t)),new Function("x","".concat(t,` +return true;`))}function S_(e){return typeof e!="bigint"?gt(e):"".concat(gt(e),"n")}function Ya(e,t){let r=Math.ceil(e)*t-1;return(r-r%64+64||64)/t}function Jc(e,t=0){return e.length>=t?e.subarray(0,t):xi(new e.constructor(t),e,0)}var Lt=class{constructor(e,t=0,r=1){this.length=Math.ceil(t/r),this.buffer=new e(this.length),this.stride=r,this.BYTES_PER_ELEMENT=e.BYTES_PER_ELEMENT,this.ArrayType=e}get byteLength(){return Math.ceil(this.length*this.stride)*this.BYTES_PER_ELEMENT}get reservedLength(){return this.buffer.length/this.stride}get reservedByteLength(){return this.buffer.byteLength}set(e,t){return this}append(e){return this.set(this.length,e)}reserve(e){if(e>0){this.length+=e;let t=this.stride,r=this.length*t,n=this.buffer.length;r>=n&&this._resize(n===0?Ya(r*1,this.BYTES_PER_ELEMENT):Ya(r*2,this.BYTES_PER_ELEMENT))}return this}flush(e=this.length){e=Ya(e*this.stride,this.BYTES_PER_ELEMENT);let t=Jc(this.buffer,e);return this.clear(),t}clear(){return this.length=0,this.buffer=new this.ArrayType,this}_resize(e){return this.buffer=Jc(this.buffer,e)}},rr=class extends Lt{last(){return this.get(this.length-1)}get(e){return this.buffer[e]}set(e,t){return this.reserve(e-this.length+1),this.buffer[e*this.stride]=t,this}},pi=class extends rr{constructor(){super(Uint8Array,0,1/8),this.numValid=0}get numInvalid(){return this.length-this.numValid}get(e){return this.buffer[e>>3]>>e%8&1}set(e,t){let{buffer:r}=this.reserve(e-this.length+1),n=e>>3,a=e%8,o=r[n]>>a&1;return t?o===0&&(r[n]|=1<=0&&n.fill(n[r],r,e),n[e]=n[e-1]+t,this}flush(e=this.length-1){return e>this.length&&this.set(e-1,this.BYTES_PER_ELEMENT>4?BigInt(0):0),super.flush(e+1)}},Se=class{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e){throw new Error('"throughDOM" not available in this environment')}constructor({type:e,nullValues:t}){this.length=0,this.finished=!1,this.type=e,this.children=[],this.nullValues=t,this.stride=et(e),this._nulls=new pi,t&&t.length>0&&(this._isValid=Yc(t))}toVector(){return new se([this.flush()])}get ArrayType(){return this.type.ArrayType}get nullCount(){return this._nulls.numInvalid}get numChildren(){return this.children.length}get byteLength(){let e=0,{_offsets:t,_values:r,_nulls:n,_typeIds:a,children:o}=this;return t&&(e+=t.byteLength),r&&(e+=r.byteLength),n&&(e+=n.byteLength),a&&(e+=a.byteLength),o.reduce((l,u)=>l+u.byteLength,e)}get reservedLength(){return this._nulls.reservedLength}get reservedByteLength(){let e=0;return this._offsets&&(e+=this._offsets.reservedByteLength),this._values&&(e+=this._values.reservedByteLength),this._nulls&&(e+=this._nulls.reservedByteLength),this._typeIds&&(e+=this._typeIds.reservedByteLength),this.children.reduce((t,r)=>t+r.reservedByteLength,e)}get valueOffsets(){return this._offsets?this._offsets.buffer:null}get values(){return this._values?this._values.buffer:null}get nullBitmap(){return this._nulls?this._nulls.buffer:null}get typeIds(){return this._typeIds?this._typeIds.buffer:null}append(e){return this.set(this.length,e)}isValid(e){return this._isValid(e)}set(e,t){return this.setValid(e,this.isValid(t))&&this.setValue(e,t),this}setValue(e,t){this._setValue(this,e,t)}setValid(e,t){return this.length=this._nulls.set(e,+t).length,t}addChild(e,t="".concat(this.numChildren)){throw new Error('Cannot append children to non-nested type "'.concat(this.type,'"'))}getChildAt(e){return this.children[e]||null}flush(){let e,t,r,n,{type:a,length:o,nullCount:l,_typeIds:u,_offsets:_,_values:d,_nulls:p}=this;(t=u==null?void 0:u.flush(o))?n=_==null?void 0:_.flush(o):(n=_==null?void 0:_.flush(o))?e=d==null?void 0:d.flush(_.last()):e=d==null?void 0:d.flush(o),l>0&&(r=p==null?void 0:p.flush(o));let f=this.children.map(m=>m.flush());return this.clear(),J({type:a,length:o,nullCount:l,children:f,child:f[0],data:e,typeIds:t,nullBitmap:r,valueOffsets:n})}finish(){this.finished=!0;for(let e of this.children)e.finish();return this}clear(){var e,t,r,n;this.length=0,(e=this._nulls)===null||e===void 0||e.clear(),(t=this._values)===null||t===void 0||t.clear(),(r=this._offsets)===null||r===void 0||r.clear(),(n=this._typeIds)===null||n===void 0||n.clear();for(let a of this.children)a.clear();return this}};Se.prototype.length=1,Se.prototype.stride=1,Se.prototype.children=null,Se.prototype.finished=!1,Se.prototype.nullValues=null,Se.prototype._isValid=()=>!0;var Fe=class extends Se{constructor(e){super(e),this._values=new rr(this.ArrayType,0,this.stride)}setValue(e,t){let r=this._values;return r.reserve(e-r.length+1),super.setValue(e,t)}},ze=class extends Se{constructor(e){super(e),this._pendingLength=0,this._offsets=new mi(e.type)}setValue(e,t){let r=this._pending||(this._pending=new Map),n=r.get(e);n&&(this._pendingLength-=n.length),this._pendingLength+=t instanceof Bt?t[Ar].length:t.length,r.set(e,t)}setValid(e,t){return super.setValid(e,t)?!0:((this._pending||(this._pending=new Map)).set(e,void 0),!1)}clear(){return this._pendingLength=0,this._pending=void 0,super.clear()}flush(){return this._flush(),super.flush()}finish(){return this._flush(),super.finish()}_flush(){let e=this._pending,t=this._pendingLength;return this._pendingLength=0,this._pending=void 0,e&&e.size>0&&this._flushPending(e,t),this}},Or=class{constructor(){this.bb=null,this.bb_pos=0}__init(e,t){return this.bb_pos=e,this.bb=t,this}offset(){return this.bb.readInt64(this.bb_pos)}metaDataLength(){return this.bb.readInt32(this.bb_pos+8)}bodyLength(){return this.bb.readInt64(this.bb_pos+16)}static sizeOf(){return 24}static createBlock(e,t,r,n){return e.prep(8,24),e.writeInt64(BigInt(n??0)),e.pad(4),e.writeInt32(r),e.writeInt64(BigInt(t??0)),e.offset()}},tt=class Bd{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsFooter(t,r){return(r||new Bd).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsFooter(t,r){return t.setPosition(t.position()+4),(r||new Bd).__init(t.readInt32(t.position())+t.position(),t)}version(){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):ue.V1}schema(t){let r=this.bb.__offset(this.bb_pos,6);return r?(t||new Ve).__init(this.bb.__indirect(this.bb_pos+r),this.bb):null}dictionaries(t,r){let n=this.bb.__offset(this.bb_pos,8);return n?(r||new Or).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}dictionariesLength(){let t=this.bb.__offset(this.bb_pos,8);return t?this.bb.__vector_len(this.bb_pos+t):0}recordBatches(t,r){let n=this.bb.__offset(this.bb_pos,10);return n?(r||new Or).__init(this.bb.__vector(this.bb_pos+n)+t*24,this.bb):null}recordBatchesLength(){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.__vector_len(this.bb_pos+t):0}customMetadata(t,r){let n=this.bb.__offset(this.bb_pos,12);return n?(r||new Me).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startFooter(t){t.startObject(5)}static addVersion(t,r){t.addFieldInt16(0,r,ue.V1)}static addSchema(t,r){t.addFieldOffset(1,r,0)}static addDictionaries(t,r){t.addFieldOffset(2,r,0)}static startDictionariesVector(t,r){t.startVector(24,r,8)}static addRecordBatches(t,r){t.addFieldOffset(3,r,0)}static startRecordBatchesVector(t,r){t.startVector(24,r,8)}static addCustomMetadata(t,r){t.addFieldOffset(4,r,0)}static createCustomMetadataVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startCustomMetadataVector(t,r){t.startVector(4,r,4)}static endFooter(t){return t.endObject()}static finishFooterBuffer(t,r){t.finish(r)}static finishSizePrefixedFooterBuffer(t,r){t.finish(r,void 0,!0)}},de=class $n{constructor(t=[],r,n,a=ue.V5){this.fields=t||[],this.metadata=r||new Map,n||(n=Ja(this.fields)),this.dictionaries=n,this.metadataVersion=a}get[Symbol.toStringTag](){return"Schema"}get names(){return this.fields.map(t=>t.name)}toString(){return"Schema<{ ".concat(this.fields.map((t,r)=>"".concat(r,": ").concat(t)).join(", ")," }>")}select(t){let r=new Set(t),n=this.fields.filter(a=>r.has(a.name));return new $n(n,this.metadata)}selectAt(t){let r=t.map(n=>this.fields[n]).filter(Boolean);return new $n(r,this.metadata)}assign(...t){let r=t[0]instanceof $n?t[0]:Array.isArray(t[0])?new $n(t[0]):new $n(t),n=[...this.fields],a=As(As(new Map,this.metadata),r.metadata),o=r.fields.filter(u=>{let _=n.findIndex(d=>d.name===u.name);return~_?(n[_]=u.clone({metadata:As(As(new Map,n[_].metadata),u.metadata)}))&&!1:!0}),l=Ja(o,new Map);return new $n([...n,...o],a,new Map([...this.dictionaries,...l]))}};de.prototype.fields=null,de.prototype.metadata=null,de.prototype.dictionaries=null;var ie=class Rd{static new(...t){let[r,n,a,o]=t;return t[0]&&typeof t[0]=="object"&&({name:r}=t[0],n===void 0&&(n=t[0].type),a===void 0&&(a=t[0].nullable),o===void 0&&(o=t[0].metadata)),new Rd("".concat(r),n,a,o)}constructor(t,r,n=!1,a){this.name=t,this.type=r,this.nullable=n,this.metadata=a||new Map}get typeId(){return this.type.typeId}get[Symbol.toStringTag](){return"Field"}toString(){return"".concat(this.name,": ").concat(this.type)}clone(...t){let[r,n,a,o]=t;return!t[0]||typeof t[0]!="object"?[r=this.name,n=this.type,a=this.nullable,o=this.metadata]=t:{name:r=this.name,type:n=this.type,nullable:a=this.nullable,metadata:o=this.metadata}=t[0],Rd.new(r,n,a,o)}};ie.prototype.type=null,ie.prototype.name=null,ie.prototype.nullable=null,ie.prototype.metadata=null;function As(e,t){return new Map([...e||new Map,...t||new Map])}function Ja(e,t=new Map){for(let r=-1,n=e.length;++r0&&Ja(a.children,t)}return t}var w_=Ir,E_=Je,ir=class{static decode(e){e=new E_(z(e));let t=tt.getRootAsFooter(e),r=de.decode(t.schema(),new Map,t.version());return new Ka(r,t)}static encode(e){let t=new w_,r=de.encode(t,e.schema);tt.startRecordBatchesVector(t,e.numRecordBatches);for(let o of[...e.recordBatches()].slice().reverse())nr.encode(t,o);let n=t.endVector();tt.startDictionariesVector(t,e.numDictionaries);for(let o of[...e.dictionaryBatches()].slice().reverse())nr.encode(t,o);let a=t.endVector();return tt.startFooter(t),tt.addSchema(t,r),tt.addVersion(t,ue.V5),tt.addRecordBatches(t,n),tt.addDictionaries(t,a),tt.finishFooterBuffer(t,tt.endFooter(t)),t.asUint8Array()}get numRecordBatches(){return this._recordBatches.length}get numDictionaries(){return this._dictionaryBatches.length}constructor(e,t=ue.V5,r,n){this.schema=e,this.version=t,r&&(this._recordBatches=r),n&&(this._dictionaryBatches=n)}*recordBatches(){for(let e,t=-1,r=this.numRecordBatches;++t=0&&e=0&&e=0&&e=0&&ethis._closedPromiseResolve=e)}get closed(){return this._closedPromise}cancel(e){return B(this,void 0,void 0,function*(){yield this.return(e)})}write(e){this._ensureOpen()&&(this.resolvers.length<=0?this._values.push(e):this.resolvers.shift().resolve({done:!1,value:e}))}abort(e){this._closedPromiseResolve&&(this.resolvers.length<=0?this._error={error:e}:this.resolvers.shift().reject({done:!0,value:e}))}close(){if(this._closedPromiseResolve){let{resolvers:e}=this;for(;e.length>0;)e.shift().resolve(ye);this._closedPromiseResolve(),this._closedPromiseResolve=void 0}}[Symbol.asyncIterator](){return this}toDOMStream(e){return Be.toDOMStream(this._closedPromiseResolve||this._error?this:this._values,e)}toNodeStream(e){return Be.toNodeStream(this._closedPromiseResolve||this._error?this:this._values,e)}throw(e){return B(this,void 0,void 0,function*(){return yield this.abort(e),ye})}return(e){return B(this,void 0,void 0,function*(){return yield this.close(),ye})}read(e){return B(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return B(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(...e){return this._values.length>0?Promise.resolve({done:!1,value:this._values.shift()}):this._error?Promise.reject({done:!0,value:this._error.error}):this._closedPromiseResolve?new Promise((t,r)=>{this.resolvers.push({resolve:t,reject:r})}):Promise.resolve(ye)}_ensureOpen(){if(this._closedPromiseResolve)return!0;throw new Error("AsyncQueue is closed")}},Rt=class extends Ds{write(e){if((e=z(e)).byteLength>0)return super.write(e)}toString(e=!1){return e?Ti(this.toUint8Array(!0)):this.toUint8Array(!1).then(Ti)}toUint8Array(e=!1){return e?Ye(this._values)[0]:B(this,void 0,void 0,function*(){var t,r,n,a;let o=[],l=0;try{for(var u=!0,_=ut(this),d;d=yield _.next(),t=d.done,!t;u=!0){a=d.value,u=!1;let p=a;o.push(p),l+=p.byteLength}}catch(p){r={error:p}}finally{try{!u&&!t&&(n=_.return)&&(yield n.call(_))}finally{if(r)throw r.error}}return Ye(o,l)[0]})}},Gt=class{constructor(e){e&&(this.source=new Za(Be.fromIterable(e)))}[Symbol.iterator](){return this}next(e){return this.source.next(e)}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}peek(e){return this.source.peek(e)}read(e){return this.source.read(e)}},at=class zd{constructor(t){t instanceof zd?this.source=t.source:t instanceof Rt?this.source=new sr(Be.fromAsyncIterable(t)):In(t)?this.source=new sr(Be.fromNodeStream(t)):Fi(t)?this.source=new sr(Be.fromDOMStream(t)):Mn(t)?this.source=new sr(Be.fromDOMStream(t.body)):dt(t)?this.source=new sr(Be.fromIterable(t)):_t(t)?this.source=new sr(Be.fromAsyncIterable(t)):rt(t)&&(this.source=new sr(Be.fromAsyncIterable(t)))}[Symbol.asyncIterator](){return this}next(t){return this.source.next(t)}throw(t){return this.source.throw(t)}return(t){return this.source.return(t)}get closed(){return this.source.closed}cancel(t){return this.source.cancel(t)}peek(t){return this.source.peek(t)}read(t){return this.source.read(t)}},Za=class{constructor(e){this.source=e}cancel(e){this.return(e)}peek(e){return this.next(e,"peek").value}read(e){return this.next(e,"read").value}next(e,t="read"){return this.source.next({cmd:t,size:e})}throw(e){return Object.create(this.source.throw&&this.source.throw(e)||ye)}return(e){return Object.create(this.source.return&&this.source.return(e)||ye)}},sr=class{constructor(e){this.source=e,this._closedPromise=new Promise(t=>this._closedPromiseResolve=t)}cancel(e){return B(this,void 0,void 0,function*(){yield this.return(e)})}get closed(){return this._closedPromise}read(e){return B(this,void 0,void 0,function*(){return(yield this.next(e,"read")).value})}peek(e){return B(this,void 0,void 0,function*(){return(yield this.next(e,"peek")).value})}next(e){return B(this,arguments,void 0,function*(t,r="read"){return yield this.source.next({cmd:r,size:t})})}throw(e){return B(this,void 0,void 0,function*(){let t=this.source.throw&&(yield this.source.throw(e))||ye;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}return(e){return B(this,void 0,void 0,function*(){let t=this.source.return&&(yield this.source.return(e))||ye;return this._closedPromiseResolve&&this._closedPromiseResolve(),this._closedPromiseResolve=void 0,Object.create(t)})}},Ji=class extends Gt{constructor(e,t){super(),this.position=0,this.buffer=z(e),this.size=t===void 0?this.buffer.byteLength:t}readInt32(e){let{buffer:t,byteOffset:r}=this.readAt(e,4);return new DataView(t,r).getInt32(0,!0)}seek(e){return this.position=Math.min(e,this.size),eKi,Int128:()=>Zi,Int64:()=>ar,Uint64:()=>Le});function hi(e){return e<0&&(e=4294967295+e+1),"0x".concat(e.toString(16))}var gi=8,eo=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8],Ki=class{constructor(e){this.buffer=e}high(){return this.buffer[1]}low(){return this.buffer[0]}_times(e){let t=new Uint32Array([this.buffer[1]>>>16,this.buffer[1]&65535,this.buffer[0]>>>16,this.buffer[0]&65535]),r=new Uint32Array([e.buffer[1]>>>16,e.buffer[1]&65535,e.buffer[0]>>>16,e.buffer[0]&65535]),n=t[3]*r[3];this.buffer[0]=n&65535;let a=n>>>16;return n=t[2]*r[3],a+=n,n=t[3]*r[2]>>>0,a+=n,this.buffer[0]+=a<<16,this.buffer[1]=a>>>0>>16,this.buffer[1]+=t[1]*r[3]+t[2]*r[2]+t[3]*r[1],this.buffer[1]+=t[0]*r[3]+t[1]*r[2]+t[2]*r[1]+t[3]*r[0]<<16,this}_plus(e){let t=this.buffer[0]+e.buffer[0]>>>0;this.buffer[1]+=e.buffer[1],t>>0&&++this.buffer[1],this.buffer[0]=t}lessThan(e){return this.buffer[1]>>0,r[2]=this.buffer[2]+t.buffer[2]>>>0,r[1]=this.buffer[1]+t.buffer[1]>>>0,r[0]=this.buffer[0]+t.buffer[0]>>>0,r[0]>>0&&++r[1],r[1]>>0&&++r[2],r[2]>>0&&++r[3],this.buffer[3]=r[3],this.buffer[2]=r[2],this.buffer[1]=r[1],this.buffer[0]=r[0],this}hex(){return"".concat(hi(this.buffer[3])," ").concat(hi(this.buffer[2])," ").concat(hi(this.buffer[1])," ").concat(hi(this.buffer[0]))}static multiply(t,r){return new On(new Uint32Array(t.buffer)).times(r)}static add(t,r){return new On(new Uint32Array(t.buffer)).plus(r)}static from(t,r=new Uint32Array(4)){return On.fromString(typeof t=="string"?t:t.toString(),r)}static fromNumber(t,r=new Uint32Array(4)){return On.fromString(t.toString(),r)}static fromString(t,r=new Uint32Array(4)){let n=t.startsWith("-"),a=t.length,o=new On(r);for(let l=n?1:0;l0&&this.readData(e,r)||new Uint8Array(0)}readOffsets(e,t){return this.readData(e,t)}readTypeIds(e,t){return this.readData(e,t)}readData(e,{length:t,offset:r}=this.nextBufferRange()){return this.bytes.subarray(r,r+t)}readDictionary(e){return this.dictionaries.get(e.id)}},ks=class extends en{constructor(e,t,r,n,a){super(new Uint8Array(0),t,r,n,a),this.sources=e}readNullBitmap(e,t,{offset:r}=this.nextBufferRange()){return t<=0?new Uint8Array(0):Ur(this.sources[r])}readOffsets(e,{offset:t}=this.nextBufferRange()){return re(Uint8Array,re(e.OffsetArrayType,this.sources[t]))}readTypeIds(e,{offset:t}=this.nextBufferRange()){return re(Uint8Array,re(e.ArrayType,this.sources[t]))}readData(e,{offset:t}=this.nextBufferRange()){let{sources:r}=this;return R.isTimestamp(e)||(R.isInt(e)||R.isTime(e))&&e.bitWidth===64||R.isDuration(e)||R.isDate(e)&&e.unit===Ae.MILLISECOND?re(Uint8Array,ar.convertArray(r[t])):R.isDecimal(e)?re(Uint8Array,Zi.convertArray(r[t])):R.isBinary(e)||R.isLargeBinary(e)||R.isFixedSizeBinary(e)?L_(r[t]):R.isBool(e)?Ur(r[t]):R.isUtf8(e)||R.isLargeUtf8(e)?Ft(r[t].join("")):re(Uint8Array,re(e.ArrayType,r[t].map(n=>+n)))}};function L_(e){let t=e.join(""),r=new Uint8Array(t.length/2);for(let n=0;n>1]=Number.parseInt(t.slice(n,n+2),16);return r}var vi=class extends ze{constructor(e){super(e),this._values=new Lt(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,z(t))}_flushPending(e,t){let r=this._offsets,n=this._values.reserve(t).buffer,a=0;for(let[o,l]of e)if(l===void 0)r.set(o,0);else{let u=l.length;n.set(l,a),r.set(o,u),a+=u}}},yi=class extends ze{constructor(e){super(e),this._values=new Lt(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,z(t))}_flushPending(e,t){let r=this._offsets,n=this._values.reserve(t).buffer,a=0;for(let[o,l]of e)if(l===void 0)r.set(o,BigInt(0));else{let u=l.length;n.set(l,a),r.set(o,BigInt(u)),a+=u}}},Ts=class extends Se{constructor(e){super(e),this._values=new pi}setValue(e,t){this._values.set(e,+t)}},Nr=class extends Fe{};Nr.prototype._setValue=Ia;var tn=class extends Nr{};tn.prototype._setValue=Zn;var rn=class extends Nr{};rn.prototype._setValue=es;var nn=class extends Fe{};nn.prototype._setValue=Ga;var Fs=class extends Se{constructor({type:e,nullValues:t,dictionaryHashFunction:r}){super({type:new Ze(e.dictionary,e.indices,e.id,e.isOrdered)}),this._nulls=null,this._dictionaryOffset=0,this._keysToIndices=Object.create(null),this.indices=Wr({type:this.type.indices,nullValues:t}),this.dictionary=Wr({type:this.type.dictionary,nullValues:null}),typeof r=="function"&&(this.valueToKey=r)}get values(){return this.indices.values}get nullCount(){return this.indices.nullCount}get nullBitmap(){return this.indices.nullBitmap}get byteLength(){return this.indices.byteLength+this.dictionary.byteLength}get reservedLength(){return this.indices.reservedLength+this.dictionary.reservedLength}get reservedByteLength(){return this.indices.reservedByteLength+this.dictionary.reservedByteLength}isValid(e){return this.indices.isValid(e)}setValid(e,t){let r=this.indices;return t=r.setValid(e,t),this.length=r.length,t}setValue(e,t){let r=this._keysToIndices,n=this.valueToKey(t),a=r[n];return a===void 0&&(r[n]=a=this._dictionaryOffset+this.dictionary.append(t).length-1),this.indices.setValue(e,a)}flush(){let e=this.type,t=this._dictionary,r=this.dictionary.toVector(),n=this.indices.flush().clone(e);return n.dictionary=t?t.concat(r):r,this.finished||(this._dictionaryOffset+=r.length),this._dictionary=n.dictionary,this.clear(),n}finish(){return this.indices.finish(),this.dictionary.finish(),this._dictionaryOffset=0,this._keysToIndices=Object.create(null),super.finish()}clear(){return this.indices.clear(),this.dictionary.clear(),super.clear()}valueToKey(e){return typeof e=="string"?e:"".concat(e)}},sn=class extends Fe{};sn.prototype._setValue=Pa;var xs=class extends Se{setValue(e,t){let[r]=this.children,n=e*this.stride;for(let a=-1,o=t.length;++a0)throw new Error("FixedSizeListBuilder can only have one child.");let r=this.children.push(e);return this.type=new St(this.type.listSize,new ie(t,e.type,!0)),r}},Vr=class extends Fe{setValue(e,t){this._values.set(e,t)}},Cs=class extends Vr{setValue(e,t){super.setValue(e,zi(t))}},Ms=class extends Vr{},Ps=class extends Vr{},zr=class extends Fe{};zr.prototype._setValue=Ua;var an=class extends zr{};an.prototype._setValue=ls;var on=class extends zr{};on.prototype._setValue=us;var or=class extends Fe{};or.prototype._setValue=ja;var cn=class extends or{};cn.prototype._setValue=_s;var ln=class extends or{};ln.prototype._setValue=ds;var un=class extends or{};un.prototype._setValue=ps;var _n=class extends or{};_n.prototype._setValue=ms;var ot=class extends Fe{setValue(e,t){this._values.set(e,t)}},Is=class extends ot{},Bs=class extends ot{},Rs=class extends ot{},Gs=class extends ot{},Us=class extends ot{},js=class extends ot{},Os=class extends ot{},Hs=class extends ot{},Ns=class extends ze{constructor(e){super(e),this._offsets=new mi(e.type)}addChild(e,t="0"){if(this.numChildren>0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new yt(new ie(t,e.type,!0)),this.numChildren-1}_flushPending(e){let t=this._offsets,[r]=this.children;for(let[n,a]of e)if(typeof a>"u")t.set(n,0);else{let o=a,l=o.length,u=t.set(n,l).buffer[n];for(let _=-1;++_0)throw new Error("ListBuilder can only have one child.");return this.children[this.numChildren]=e,this.type=new wt(new ie(t,e.type,!0),this.type.keysSorted),this.numChildren-1}_flushPending(e){let t=this._offsets,[r]=this.children;for(let[n,a]of e)if(a===void 0)t.set(n,0);else{let{[n]:o,[n+1]:l}=t.set(n,a.size).buffer;for(let u of a.entries())if(r.set(o,u),++o>=l)break}}},Vs=class extends Se{setValue(e,t){}setValid(e,t){return this.length=Math.max(e+1,this.length),t}},zs=class extends Se{setValue(e,t){let{children:r,type:n}=this;switch(Array.isArray(t)||t.constructor){case!0:return n.children.forEach((a,o)=>r[o].set(e,t[o]));case Map:return n.children.forEach((a,o)=>r[o].set(e,t.get(a.name)));default:return n.children.forEach((a,o)=>r[o].set(e,t[a.name]))}}setValid(e,t){return super.setValid(e,t)||this.children.forEach(r=>r.setValid(e,t)),t}addChild(e,t="".concat(this.numChildren)){let r=this.children.push(e);return this.type=new ve([...this.type.children,new ie(t,e.type,!0)]),r}},cr=class extends Fe{};cr.prototype._setValue=Ba;var dn=class extends cr{};dn.prototype._setValue=ts;var fn=class extends cr{};fn.prototype._setValue=rs;var pn=class extends cr{};pn.prototype._setValue=is;var mn=class extends cr{};mn.prototype._setValue=ns;var lr=class extends Fe{};lr.prototype._setValue=Ra;var hn=class extends lr{};hn.prototype._setValue=ss;var gn=class extends lr{};gn.prototype._setValue=as;var vn=class extends lr{};vn.prototype._setValue=os;var yn=class extends lr{};yn.prototype._setValue=cs;var bi=class extends Se{constructor(e){super(e),this._typeIds=new rr(Int8Array,0,1),typeof e.valueToChildTypeId=="function"&&(this._valueToChildTypeId=e.valueToChildTypeId)}get typeIdToChildIndex(){return this.type.typeIdToChildIndex}append(e,t){return this.set(this.length,e,t)}set(e,t,r){return r===void 0&&(r=this._valueToChildTypeId(this,t,e)),this.setValue(e,t,r),this}setValue(e,t,r){this._typeIds.set(e,r);let n=this.type.typeIdToChildIndex[r],a=this.children[n];a==null||a.set(e,t)}addChild(e,t="".concat(this.children.length)){let r=this.children.push(e),{type:{children:n,mode:a,typeIds:o}}=this,l=[...n,new ie(t,e.type)];return this.type=new bt(a,[...o,r],l),r}_valueToChildTypeId(e,t,r){throw new Error("Cannot map UnionBuilder value to child typeId. Pass the `childTypeId` as the second argument to unionBuilder.append(), or supply a `valueToChildTypeId` function as part of the UnionBuilder constructor options.")}},$s=class extends bi{},qs=class extends bi{constructor(e){super(e),this._offsets=new rr(Int32Array)}setValue(e,t,r){let n=this._typeIds.set(e,r).buffer[e],a=this.getChildAt(this.type.typeIdToChildIndex[n]),o=this._offsets.set(e,a.length).buffer[e];a==null||a.set(o,t)}},bn=class extends ze{constructor(e){super(e),this._values=new Lt(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,Ft(t))}_flushPending(e,t){}};bn.prototype._flushPending=vi.prototype._flushPending;var Sn=class extends ze{constructor(e){super(e),this._values=new Lt(Uint8Array)}get byteLength(){let e=this._pendingLength+this.length*4;return this._offsets&&(e+=this._offsets.byteLength),this._values&&(e+=this._values.byteLength),this._nulls&&(e+=this._nulls.byteLength),e}setValue(e,t){return super.setValue(e,Ft(t))}_flushPending(e,t){}};Sn.prototype._flushPending=yi.prototype._flushPending;var ro=class extends j{visitNull(){return Vs}visitBool(){return Ts}visitInt(){return ot}visitInt8(){return Is}visitInt16(){return Bs}visitInt32(){return Rs}visitInt64(){return Gs}visitUint8(){return Us}visitUint16(){return js}visitUint32(){return Os}visitUint64(){return Hs}visitFloat(){return Vr}visitFloat16(){return Cs}visitFloat32(){return Ms}visitFloat64(){return Ps}visitUtf8(){return bn}visitLargeUtf8(){return Sn}visitBinary(){return vi}visitLargeBinary(){return yi}visitFixedSizeBinary(){return sn}visitDate(){return Nr}visitDateDay(){return tn}visitDateMillisecond(){return rn}visitTimestamp(){return cr}visitTimestampSecond(){return dn}visitTimestampMillisecond(){return fn}visitTimestampMicrosecond(){return pn}visitTimestampNanosecond(){return mn}visitTime(){return lr}visitTimeSecond(){return hn}visitTimeMillisecond(){return gn}visitTimeMicrosecond(){return vn}visitTimeNanosecond(){return yn}visitDecimal(){return nn}visitList(){return Ns}visitStruct(){return zs}visitUnion(){return bi}visitDenseUnion(){return qs}visitSparseUnion(){return $s}visitDictionary(){return Fs}visitInterval(){return zr}visitIntervalDayTime(){return an}visitIntervalYearMonth(){return on}visitDuration(){return or}visitDurationSecond(){return cn}visitDurationMillisecond(){return ln}visitDurationMicrosecond(){return un}visitDurationNanosecond(){return _n}visitFixedSizeList(){return xs}visitMap(){return Ws}},Kc=new ro,W=class extends j{compareSchemas(e,t){return e===t||t instanceof e.constructor&&this.compareManyFields(e.fields,t.fields)}compareManyFields(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((r,n)=>this.compareFields(r,t[n]))}compareFields(e,t){return e===t||t instanceof e.constructor&&e.name===t.name&&e.nullable===t.nullable&&this.visit(e.type,t.type)}};function Ne(e,t){return t instanceof e.constructor}function $r(e,t){return e===t||Ne(e,t)}function ur(e,t){return e===t||Ne(e,t)&&e.bitWidth===t.bitWidth&&e.isSigned===t.isSigned}function Xs(e,t){return e===t||Ne(e,t)&&e.precision===t.precision}function A_(e,t){return e===t||Ne(e,t)&&e.byteWidth===t.byteWidth}function io(e,t){return e===t||Ne(e,t)&&e.unit===t.unit}function wn(e,t){return e===t||Ne(e,t)&&e.unit===t.unit&&e.timezone===t.timezone}function En(e,t){return e===t||Ne(e,t)&&e.unit===t.unit&&e.bitWidth===t.bitWidth}function D_(e,t){return e===t||Ne(e,t)&&e.children.length===t.children.length&&Ut.compareManyFields(e.children,t.children)}function k_(e,t){return e===t||Ne(e,t)&&e.children.length===t.children.length&&Ut.compareManyFields(e.children,t.children)}function no(e,t){return e===t||Ne(e,t)&&e.mode===t.mode&&e.typeIds.every((r,n)=>r===t.typeIds[n])&&Ut.compareManyFields(e.children,t.children)}function T_(e,t){return e===t||Ne(e,t)&&e.id===t.id&&e.isOrdered===t.isOrdered&&Ut.visit(e.indices,t.indices)&&Ut.visit(e.dictionary,t.dictionary)}function so(e,t){return e===t||Ne(e,t)&&e.unit===t.unit}function Ln(e,t){return e===t||Ne(e,t)&&e.unit===t.unit}function F_(e,t){return e===t||Ne(e,t)&&e.listSize===t.listSize&&e.children.length===t.children.length&&Ut.compareManyFields(e.children,t.children)}function x_(e,t){return e===t||Ne(e,t)&&e.keysSorted===t.keysSorted&&e.children.length===t.children.length&&Ut.compareManyFields(e.children,t.children)}W.prototype.visitNull=$r,W.prototype.visitBool=$r,W.prototype.visitInt=ur,W.prototype.visitInt8=ur,W.prototype.visitInt16=ur,W.prototype.visitInt32=ur,W.prototype.visitInt64=ur,W.prototype.visitUint8=ur,W.prototype.visitUint16=ur,W.prototype.visitUint32=ur,W.prototype.visitUint64=ur,W.prototype.visitFloat=Xs,W.prototype.visitFloat16=Xs,W.prototype.visitFloat32=Xs,W.prototype.visitFloat64=Xs,W.prototype.visitUtf8=$r,W.prototype.visitLargeUtf8=$r,W.prototype.visitBinary=$r,W.prototype.visitLargeBinary=$r,W.prototype.visitFixedSizeBinary=A_,W.prototype.visitDate=io,W.prototype.visitDateDay=io,W.prototype.visitDateMillisecond=io,W.prototype.visitTimestamp=wn,W.prototype.visitTimestampSecond=wn,W.prototype.visitTimestampMillisecond=wn,W.prototype.visitTimestampMicrosecond=wn,W.prototype.visitTimestampNanosecond=wn,W.prototype.visitTime=En,W.prototype.visitTimeSecond=En,W.prototype.visitTimeMillisecond=En,W.prototype.visitTimeMicrosecond=En,W.prototype.visitTimeNanosecond=En,W.prototype.visitDecimal=$r,W.prototype.visitList=D_,W.prototype.visitStruct=k_,W.prototype.visitUnion=no,W.prototype.visitDenseUnion=no,W.prototype.visitSparseUnion=no,W.prototype.visitDictionary=T_,W.prototype.visitInterval=so,W.prototype.visitIntervalDayTime=so,W.prototype.visitIntervalYearMonth=so,W.prototype.visitDuration=Ln,W.prototype.visitDurationSecond=Ln,W.prototype.visitDurationMillisecond=Ln,W.prototype.visitDurationMicrosecond=Ln,W.prototype.visitDurationNanosecond=Ln,W.prototype.visitFixedSizeList=F_,W.prototype.visitMap=x_;var Ut=new W;function qr(e,t){return Ut.compareSchemas(e,t)}function Zc(e,t){return Ut.compareFields(e,t)}function el(e,t){return Ut.visit(e,t)}function Wr(e){let t=e.type,r=new(Kc.getVisitFn(t)())(e);if(t.children&&t.children.length>0){let n=e.children||[],a={nullValues:e.nullValues},o=Array.isArray(n)?(l,u)=>n[u]||a:({name:l})=>n[l]||a;for(let[l,u]of t.children.entries()){let{type:_}=u,d=o(u,l);r.children.push(Wr(Object.assign(Object.assign({},d),{type:_})))}}return r}function Qs(e,t){return C_(e,t.map(r=>r.data.concat()))}function C_(e,t){let r=[...e.fields],n=[],a={numBatches:t.reduce((f,m)=>Math.max(f,m.length),0)},o=0,l=0,u=-1,_=t.length,d,p=[];for(;a.numBatches-- >0;){for(l=Number.POSITIVE_INFINITY,u=-1;++u<_;)p[u]=d=t[u].shift(),l=Math.min(l,d?d.length:l);Number.isFinite(l)&&(p=M_(r,l,p,t,a),l>0&&(n[o++]=J({type:new ve(r),length:l,nullCount:0,children:p.slice()})))}return[e=e.assign(r),n.map(f=>new De(e,f))]}function M_(e,t,r,n,a){var o;let l=(t+63&-64)>>3;for(let u=-1,_=n.length;++u<_;){let d=r[u],p=d==null?void 0:d.length;if(p>=t)p===t?r[u]=d:(r[u]=d.slice(0,t),a.numBatches=Math.max(a.numBatches,n[u].unshift(d.slice(t,p-t))));else{let f=e[u];e[u]=f.clone({nullable:!0}),r[u]=(o=d==null?void 0:d._changeLengthAndBackfillNullBitmap(t))!==null&&o!==void 0?o:J({type:f.type,length:t,nullCount:t,nullBitmap:new Uint8Array(l)})}}return r}var tl,We=class ha{constructor(...t){var r,n;if(t.length===0)return this.batches=[],this.schema=new de([]),this._offsets=[0],this;let a,o;t[0]instanceof de&&(a=t.shift()),t.at(-1)instanceof Uint32Array&&(o=t.pop());let l=_=>{if(_){if(_ instanceof De)return[_];if(_ instanceof ha)return _.batches;if(_ instanceof le){if(_.type instanceof ve)return[new De(new de(_.type.children),_)]}else{if(Array.isArray(_))return _.flatMap(d=>l(d));if(typeof _[Symbol.iterator]=="function")return[..._].flatMap(d=>l(d));if(typeof _=="object"){let d=Object.keys(_),p=d.map(h=>new se([_[h]])),f=a??new de(d.map((h,g)=>new ie(String(h),p[g].type,p[g].nullable))),[,m]=Qs(f,p);return m.length===0?[new De(_)]:m}}}return[]},u=t.flatMap(_=>l(_));if(a=(n=a??((r=u[0])===null||r===void 0?void 0:r.schema))!==null&&n!==void 0?n:new de([]),!(a instanceof de))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");for(let _ of u){if(!(_ instanceof De))throw new TypeError("Table constructor expects a [Schema, RecordBatch[]] pair.");if(!qr(a,_.schema))throw new TypeError("Table and inner RecordBatch schemas must be equivalent.")}this.schema=a,this.batches=u,this._offsets=o??bs(this.data)}get data(){return this.batches.map(({data:t})=>t)}get numCols(){return this.schema.fields.length}get numRows(){return this.data.reduce((t,r)=>t+r.length,0)}get nullCount(){return this._nullCount===-1&&(this._nullCount=ys(this.data)),this._nullCount}isValid(t){return!1}get(t){return null}at(t){return this.get(Br(t,this.numRows))}set(t,r){}indexOf(t,r){return-1}[Symbol.iterator](){return this.batches.length>0?fi.visit(new se(this.data)):new Array(0)[Symbol.iterator]()}toArray(){return[...this]}toString(){return`[ + `.concat(this.toArray().join(`, + `),` +]`)}concat(...t){let r=this.schema,n=this.data.concat(t.flatMap(({data:a})=>a));return new ha(r,n.map(a=>new De(r,a)))}slice(t,r){let n=this.schema;[t,r]=$i({length:this.numRows},t,r);let a=Ss(this.data,this._offsets,t,r);return new ha(n,a.map(o=>new De(n,o)))}getChild(t){return this.getChildAt(this.schema.fields.findIndex(r=>r.name===t))}getChildAt(t){if(t>-1&&tn.children[t]);if(r.length===0){let{type:n}=this.schema.fields[t],a=J({type:n,length:0,nullCount:0});r.push(a._changeLengthAndBackfillNullBitmap(this.numRows))}return new se(r)}return null}setChild(t,r){var n;return this.setChildAt((n=this.schema.fields)===null||n===void 0?void 0:n.findIndex(a=>a.name===t),r)}setChildAt(t,r){let n=this.schema,a=[...this.batches];if(t>-1&&tthis.getChildAt(d));[o[t],u[t]]=[l,r],[n,a]=Qs(n,u)}return new ha(n,a)}select(t){let r=this.schema.fields.reduce((n,a,o)=>n.set(a.name,o),new Map);return this.selectAt(t.map(n=>r.get(n)).filter(n=>n>-1))}selectAt(t){let r=this.schema.selectAt(t),n=this.batches.map(a=>a.selectAt(t));return new ha(r,n)}assign(t){let r=this.schema.fields,[n,a]=t.schema.fields.reduce((u,_,d)=>{let[p,f]=u,m=r.findIndex(h=>h.name===_.name);return~m?f[m]=d:p.push(d),u},[[],[]]),o=this.schema.assign(t.schema),l=[...r.map((u,_)=>[_,a[_]]).map(([u,_])=>_===void 0?this.getChildAt(u):t.getChildAt(_)),...n.map(u=>t.getChildAt(u))].filter(Boolean);return new ha(...Qs(o,l))}};tl=Symbol.toStringTag,We[tl]=(e=>(e.schema=null,e.batches=[],e._offsets=new Uint32Array([0]),e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,e.isValid=di(Qi),e.get=di(Te.getVisitFn(y.Struct)),e.set=ws(Re.getVisitFn(y.Struct)),e.indexOf=Es(jr.getVisitFn(y.Struct)),"Table"))(We.prototype);var il,De=class Dd{constructor(...t){switch(t.length){case 2:{if([this.schema]=t,!(this.schema instanceof de))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");if([,this.data=J({nullCount:0,type:new ve(this.schema.fields),children:this.schema.fields.map(r=>J({type:r.type,nullCount:0}))})]=t,!(this.data instanceof le))throw new TypeError("RecordBatch constructor expects a [Schema, Data] pair.");[this.schema,this.data]=rl(this.schema,this.data.children);break}case 1:{let[r]=t,{fields:n,children:a,length:o}=Object.keys(r).reduce((_,d,p)=>(_.children[p]=r[d],_.length=Math.max(_.length,r[d].length),_.fields[p]=ie.new({name:d,type:r[d].type,nullable:!0}),_),{length:0,fields:new Array,children:new Array}),l=new de(n),u=J({type:new ve(n),length:o,children:a,nullCount:0});[this.schema,this.data]=rl(l,u.children,o);break}default:throw new TypeError("RecordBatch constructor expects an Object mapping names to child Data, or a [Schema, Data] pair.")}}get dictionaries(){return this._dictionaries||(this._dictionaries=nl(this.schema.fields,this.data.children))}get numCols(){return this.schema.fields.length}get numRows(){return this.data.length}get nullCount(){return this.data.nullCount}isValid(t){return this.data.getValid(t)}get(t){return Te.visit(this.data,t)}at(t){return this.get(Br(t,this.numRows))}set(t,r){return Re.visit(this.data,t,r)}indexOf(t,r){return jr.visit(this.data,t,r)}[Symbol.iterator](){return fi.visit(new se([this.data]))}toArray(){return[...this]}concat(...t){return new We(this.schema,[this,...t])}slice(t,r){let[n]=new se([this.data]).slice(t,r).data;return new Dd(this.schema,n)}getChild(t){var r;return this.getChildAt((r=this.schema.fields)===null||r===void 0?void 0:r.findIndex(n=>n.name===t))}getChildAt(t){return t>-1&&ta.name===t),r)}setChildAt(t,r){let n=this.schema,a=this.data;if(t>-1&&tu.name===o);~l&&(a[l]=this.data.children[l])}return new Dd(r,J({type:n,length:this.numRows,children:a}))}selectAt(t){let r=this.schema.selectAt(t),n=t.map(o=>this.data.children[o]).filter(Boolean),a=J({type:new ve(r.fields),length:this.numRows,children:n});return new Dd(r,a)}};il=Symbol.toStringTag,De[il]=(e=>(e._nullCount=-1,e[Symbol.isConcatSpreadable]=!0,"RecordBatch"))(De.prototype);function rl(e,t,r=t.reduce((n,a)=>Math.max(n,a.length),0)){var n;let a=[...e.fields],o=[...t],l=(r+63&-64)>>3;for(let[u,_]of e.fields.entries()){let d=t[u];(!d||d.length!==r)&&(a[u]=_.clone({nullable:!0}),o[u]=(n=d==null?void 0:d._changeLengthAndBackfillNullBitmap(r))!==null&&n!==void 0?n:J({type:_.type,length:r,nullCount:r,nullBitmap:new Uint8Array(l)}))}return[e.assign(a),J({type:new ve(a),length:r,children:o})]}function nl(e,t,r=new Map){var n,a;if(((n=e==null?void 0:e.length)!==null&&n!==void 0?n:0)>0&&(e==null?void 0:e.length)===(t==null?void 0:t.length))for(let o=-1,l=e.length;++oJ({type:n.type})),r=J({type:new ve(e.fields),nullCount:0,children:t});super(e,r)}},At=class it{constructor(){this.bb=null,this.bb_pos=0}__init(t,r){return this.bb_pos=t,this.bb=r,this}static getRootAsMessage(t,r){return(r||new it).__init(t.readInt32(t.position())+t.position(),t)}static getSizePrefixedRootAsMessage(t,r){return t.setPosition(t.position()+4),(r||new it).__init(t.readInt32(t.position())+t.position(),t)}version(){let t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readInt16(this.bb_pos+t):ue.V1}headerType(){let t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb_pos+t):ne.NONE}header(t){let r=this.bb.__offset(this.bb_pos,8);return r?this.bb.__union(t,this.bb_pos+r):null}bodyLength(){let t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readInt64(this.bb_pos+t):BigInt("0")}customMetadata(t,r){let n=this.bb.__offset(this.bb_pos,12);return n?(r||new Me).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+t*4),this.bb):null}customMetadataLength(){let t=this.bb.__offset(this.bb_pos,12);return t?this.bb.__vector_len(this.bb_pos+t):0}static startMessage(t){t.startObject(5)}static addVersion(t,r){t.addFieldInt16(0,r,ue.V1)}static addHeaderType(t,r){t.addFieldInt8(1,r,ne.NONE)}static addHeader(t,r){t.addFieldOffset(2,r,0)}static addBodyLength(t,r){t.addFieldInt64(3,r,BigInt("0"))}static addCustomMetadata(t,r){t.addFieldOffset(4,r,0)}static createCustomMetadataVector(t,r){t.startVector(4,r.length,4);for(let n=r.length-1;n>=0;n--)t.addOffset(r[n]);return t.endVector()}static startCustomMetadataVector(t,r){t.startVector(4,r,4)}static endMessage(t){return t.endObject()}static finishMessageBuffer(t,r){t.finish(r)}static finishSizePrefixedMessageBuffer(t,r){t.finish(r,void 0,!0)}static createMessage(t,r,n,a,o,l){return it.startMessage(t),it.addVersion(t,r),it.addHeaderType(t,n),it.addHeader(t,a),it.addBodyLength(t,o),it.addCustomMetadata(t,l),it.endMessage(t)}},ao=class extends j{visit(e,t){return e==null||t==null?void 0:super.visit(e,t)}visitNull(e,t){return Oi.startNull(t),Oi.endNull(t)}visitInt(e,t){return mt.startInt(t),mt.addBitWidth(t,e.bitWidth),mt.addIsSigned(t,e.isSigned),mt.endInt(t)}visitFloat(e,t){return br.startFloatingPoint(t),br.addPrecision(t,e.precision),br.endFloatingPoint(t)}visitBinary(e,t){return Bi.startBinary(t),Bi.endBinary(t)}visitLargeBinary(e,t){return Gi.startLargeBinary(t),Gi.endLargeBinary(t)}visitBool(e,t){return Ri.startBool(t),Ri.endBool(t)}visitUtf8(e,t){return Ni.startUtf8(t),Ni.endUtf8(t)}visitLargeUtf8(e,t){return Ui.startLargeUtf8(t),Ui.endLargeUtf8(t)}visitDecimal(e,t){return Pt.startDecimal(t),Pt.addScale(t,e.scale),Pt.addPrecision(t,e.precision),Pt.addBitWidth(t,e.bitWidth),Pt.endDecimal(t)}visitDate(e,t){return hr.startDate(t),hr.addUnit(t,e.unit),hr.endDate(t)}visitTime(e,t){return Ht.startTime(t),Ht.addUnit(t,e.unit),Ht.addBitWidth(t,e.bitWidth),Ht.endTime(t)}visitTimestamp(e,t){let r=e.timezone&&t.createString(e.timezone)||void 0;return Nt.startTimestamp(t),Nt.addUnit(t,e.unit),r!==void 0&&Nt.addTimezone(t,r),Nt.endTimestamp(t)}visitInterval(e,t){return Sr.startInterval(t),Sr.addUnit(t,e.unit),Sr.endInterval(t)}visitDuration(e,t){return gr.startDuration(t),gr.addUnit(t,e.unit),gr.endDuration(t)}visitList(e,t){return ji.startList(t),ji.endList(t)}visitStruct(e,t){return Hi.startStruct_(t),Hi.endStruct_(t)}visitUnion(e,t){ht.startTypeIdsVector(t,e.typeIds.length);let r=ht.createTypeIdsVector(t,e.typeIds);return ht.startUnion(t),ht.addMode(t,e.mode),ht.addTypeIds(t,r),ht.endUnion(t)}visitDictionary(e,t){let r=this.visit(e.indices,t);return Mt.startDictionaryEncoding(t),Mt.addId(t,BigInt(e.id)),Mt.addIsOrdered(t,e.isOrdered),r!==void 0&&Mt.addIndexType(t,r),Mt.endDictionaryEncoding(t)}visitFixedSizeBinary(e,t){return vr.startFixedSizeBinary(t),vr.addByteWidth(t,e.byteWidth),vr.endFixedSizeBinary(t)}visitFixedSizeList(e,t){return yr.startFixedSizeList(t),yr.addListSize(t,e.listSize),yr.endFixedSizeList(t)}visitMap(e,t){return wr.startMap(t),wr.addKeysSorted(t,e.keysSorted),wr.endMap(t)}},Ys=new ao;function cl(e,t=new Map){return new de(I_(e,t),Js(e.metadata),t)}function oo(e){return new Ge(e.count,ul(e.columns),_l(e.columns))}function ll(e){return new qe(oo(e.data),e.id,e.isDelta)}function I_(e,t){return(e.fields||[]).filter(Boolean).map(r=>ie.fromJSON(r,t))}function sl(e,t){return(e.children||[]).filter(Boolean).map(r=>ie.fromJSON(r,t))}function ul(e){return(e||[]).reduce((t,r)=>[...t,new ct(r.count,B_(r.VALIDITY)),...ul(r.children)],[])}function _l(e,t=[]){for(let r=-1,n=(e||[]).length;++rt+ +(r===0),0)}function dl(e,t){let r,n,a,o,l,u;return!t||!(o=e.dictionary)?(l=ol(e,sl(e,t)),a=new ie(e.name,l,e.nullable,Js(e.metadata))):t.has(r=o.id)?(n=(n=o.indexType)?al(n):new It,u=new Ze(t.get(r),n,r,o.isOrdered),a=new ie(e.name,u,e.nullable,Js(e.metadata))):(n=(n=o.indexType)?al(n):new It,t.set(r,l=ol(e,sl(e,t))),u=new Ze(l,n,r,o.isOrdered),a=new ie(e.name,u,e.nullable,Js(e.metadata))),a||null}function Js(e=[]){return new Map(e.map(({key:t,value:r})=>[t,r]))}function al(e){return new Pe(e.isSigned,e.bitWidth)}function ol(e,t){let r=e.type.name;switch(r){case"NONE":return new He;case"null":return new He;case"binary":return new Wt;case"largebinary":return new Vt;case"utf8":return new zt;case"largeutf8":return new $t;case"bool":return new qt;case"list":return new yt((t||[])[0]);case"struct":return new ve(t||[]);case"struct_":return new ve(t||[])}switch(r){case"int":{let n=e.type;return new Pe(n.isSigned,n.bitWidth)}case"floatingpoint":{let n=e.type;return new st(pe[n.precision])}case"decimal":{let n=e.type;return new Xt(n.scale,n.precision,n.bitWidth)}case"date":{let n=e.type;return new Qt(Ae[n.unit])}case"time":{let n=e.type;return new Yt(G[n.unit],n.bitWidth)}case"timestamp":{let n=e.type;return new Jt(G[n.unit],n.timezone)}case"interval":{let n=e.type;return new Kt(Ce[n.unit])}case"duration":{let n=e.type;return new Zt(G[n.unit])}case"union":{let n=e.type,[a,...o]=(n.mode+"").toLowerCase(),l=a.toUpperCase()+o.join("");return new bt(he[l],n.typeIds||[],t||[])}case"fixedsizebinary":{let n=e.type;return new er(n.byteWidth)}case"fixedsizelist":{let n=e.type;return new St(n.listSize,(t||[])[0])}case"map":{let n=e.type;return new wt((t||[])[0],n.keysSorted)}}throw new Error('Unrecognized type: "'.concat(r,'"'))}var R_=Ir,G_=Je,Xe=class dd{static fromJSON(t,r){let n=new dd(0,ue.V5,r);return n._createHeader=U_(t,r),n}static decode(t){t=new G_(z(t));let r=At.getRootAsMessage(t),n=r.bodyLength(),a=r.version(),o=r.headerType(),l=new dd(n,a,o);return l._createHeader=j_(r,o),l}static encode(t){let r=new R_,n=-1;return t.isSchema()?n=de.encode(r,t.header()):t.isRecordBatch()?n=Ge.encode(r,t.header()):t.isDictionaryBatch()&&(n=qe.encode(r,t.header())),At.startMessage(r),At.addVersion(r,ue.V5),At.addHeader(r,n),At.addHeaderType(r,t.headerType),At.addBodyLength(r,BigInt(t.bodyLength)),At.finishMessageBuffer(r,At.endMessage(r)),r.asUint8Array()}static from(t,r=0){if(t instanceof de)return new dd(0,ue.V5,ne.Schema,t);if(t instanceof Ge)return new dd(r,ue.V5,ne.RecordBatch,t);if(t instanceof qe)return new dd(r,ue.V5,ne.DictionaryBatch,t);throw new Error("Unrecognized Message header: ".concat(t))}get type(){return this.headerType}get version(){return this._version}get headerType(){return this._headerType}get bodyLength(){return this._bodyLength}header(){return this._createHeader()}isSchema(){return this.headerType===ne.Schema}isRecordBatch(){return this.headerType===ne.RecordBatch}isDictionaryBatch(){return this.headerType===ne.DictionaryBatch}constructor(t,r,n,a){this._version=r,this._headerType=n,this.body=new Uint8Array(0),a&&(this._createHeader=()=>a),this._bodyLength=ae(t)}},Ge=class{get nodes(){return this._nodes}get length(){return this._length}get buffers(){return this._buffers}constructor(e,t,r){this._nodes=t,this._buffers=r,this._length=ae(e)}},qe=class{get id(){return this._id}get data(){return this._data}get isDelta(){return this._isDelta}get length(){return this.data.length}get nodes(){return this.data.nodes}get buffers(){return this.data.buffers}constructor(e,t,r=!1){this._data=e,this._isDelta=r,this._id=ae(t)}},$e=class{constructor(e,t){this.offset=ae(e),this.length=ae(t)}},ct=class{constructor(e,t){this.length=ae(e),this.nullCount=ae(t)}};function U_(e,t){return()=>{switch(t){case ne.Schema:return de.fromJSON(e);case ne.RecordBatch:return Ge.fromJSON(e);case ne.DictionaryBatch:return qe.fromJSON(e)}throw new Error("Unrecognized Message type: { name: ".concat(ne[t],", type: ").concat(t," }"))}}function j_(e,t){return()=>{switch(t){case ne.Schema:return de.decode(e.header(new Ve),new Map,e.version());case ne.RecordBatch:return Ge.decode(e.header(new Ke),e.version());case ne.DictionaryBatch:return qe.decode(e.header(new Ot),e.version())}throw new Error("Unrecognized Message type: { name: ".concat(ne[t],", type: ").concat(t," }"))}}ie.encode=Y_,ie.decode=X_,ie.fromJSON=dl,de.encode=Q_,de.decode=O_,de.fromJSON=cl,Ge.encode=J_,Ge.decode=H_,Ge.fromJSON=oo,qe.encode=K_,qe.decode=N_,qe.fromJSON=ll,ct.encode=Z_,ct.decode=V_,$e.encode=ed,$e.decode=W_;function O_(e,t=new Map,r=ue.V5){let n=q_(e,t);return new de(n,Ks(e),t,r)}function H_(e,t=ue.V5){if(e.compression()!==null)throw new Error("Record batch compression not implemented");return new Ge(e.length(),z_(e),$_(e,t))}function N_(e,t=ue.V5){return new qe(Ge.decode(e.data(),t),e.id(),e.isDelta())}function W_(e){return new $e(e.offset(),e.length())}function V_(e){return new ct(e.length(),e.nullCount())}function z_(e){let t=[];for(let r,n=-1,a=-1,o=e.nodesLength();++nie.encode(e,o));Ve.startFieldsVector(e,r.length);let n=Ve.createFieldsVector(e,r),a=t.metadata&&t.metadata.size>0?Ve.createCustomMetadataVector(e,[...t.metadata].map(([o,l])=>{let u=e.createString("".concat(o)),_=e.createString("".concat(l));return Me.startKeyValue(e),Me.addKey(e,u),Me.addValue(e,_),Me.endKeyValue(e)})):-1;return Ve.startSchema(e),Ve.addFields(e,n),Ve.addEndianness(e,td?mr.Little:mr.Big),a!==-1&&Ve.addCustomMetadata(e,a),Ve.endSchema(e)}function Y_(e,t){let r=-1,n=-1,a=-1,o=t.type,l=t.typeId;R.isDictionary(o)?(l=o.dictionary.typeId,a=Ys.visit(o,e),n=Ys.visit(o.dictionary,e)):n=Ys.visit(o,e);let u=(o.children||[]).map(p=>ie.encode(e,p)),_=je.createChildrenVector(e,u),d=t.metadata&&t.metadata.size>0?je.createCustomMetadataVector(e,[...t.metadata].map(([p,f])=>{let m=e.createString("".concat(p)),h=e.createString("".concat(f));return Me.startKeyValue(e),Me.addKey(e,m),Me.addValue(e,h),Me.endKeyValue(e)})):-1;return t.name&&(r=e.createString(t.name)),je.startField(e),je.addType(e,n),je.addTypeType(e,l),je.addChildren(e,_),je.addNullable(e,!!t.nullable),r!==-1&&je.addName(e,r),a!==-1&&je.addDictionary(e,a),d!==-1&&je.addCustomMetadata(e,d),je.endField(e)}function J_(e,t){let r=t.nodes||[],n=t.buffers||[];Ke.startNodesVector(e,r.length);for(let l of r.slice().reverse())ct.encode(e,l);let a=e.endVector();Ke.startBuffersVector(e,n.length);for(let l of n.slice().reverse())$e.encode(e,l);let o=e.endVector();return Ke.startRecordBatch(e),Ke.addLength(e,BigInt(t.length)),Ke.addNodes(e,a),Ke.addBuffers(e,o),Ke.endRecordBatch(e)}function K_(e,t){let r=Ge.encode(e,t.data);return Ot.startDictionaryBatch(e),Ot.addId(e,BigInt(t.id)),Ot.addIsDelta(e,t.isDelta),Ot.addData(e,r),Ot.endDictionaryBatch(e)}function Z_(e,t){return ii.createFieldNode(e,BigInt(t.length),BigInt(t.nullCount))}function ed(e,t){return ri.createBuffer(e,BigInt(t.offset),BigInt(t.length))}var td=(()=>{let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),new Int16Array(e)[0]===256})(),lo=e=>"Expected ".concat(ne[e]," Message in stream, but was null or length 0."),uo=e=>"Header pointer of flatbuffer-encoded ".concat(ne[e]," Message is null or length 0."),hl=(e,t)=>"Expected to read ".concat(e," metadata bytes, but only read ").concat(t,"."),gl=(e,t)=>"Expected to read ".concat(e," bytes for message body, but only read ").concat(t,"."),Si=class{constructor(e){this.source=e instanceof Gt?e:new Gt(e)}[Symbol.iterator](){return this}next(){let e;return(e=this.readMetadataLength()).done||e.value===-1&&(e=this.readMetadataLength()).done||(e=this.readMetadata(e.value)).done?ye:e}throw(e){return this.source.throw(e)}return(e){return this.source.return(e)}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(lo(e));return t.value}readMessageBody(e){if(e<=0)return new Uint8Array(0);let t=z(this.source.read(e));if(t.byteLength[...n,...a.VALIDITY&&[a.VALIDITY]||[],...a.TYPE_ID&&[a.TYPE_ID]||[],...a.OFFSET&&[a.OFFSET]||[],...a.DATA&&[a.DATA]||[],...t(a.children)],[])}}readMessage(e){let t;if((t=this.next()).done)return null;if(e!=null&&t.value.headerType!==e)throw new Error(lo(e));return t.value}readSchema(){let e=ne.Schema,t=this.readMessage(e),r=t==null?void 0:t.header();if(!t||!r)throw new Error(uo(e));return r}},Zs=4,co="ARROW1",wi=new Uint8Array(co.length);for(let e=0;ethis):this}readRecordBatch(t){return this._impl.isFile()?this._impl.readRecordBatch(t):null}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}toDOMStream(){return Be.toDOMStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this})}toNodeStream(){return Be.toNodeStream(this.isSync()?{[Symbol.iterator]:()=>this}:{[Symbol.asyncIterator]:()=>this},{objectMode:!0})}static throughNode(t){throw new Error('"throughNode" not available in this environment')}static throughDOM(t,r){throw new Error('"throughDOM" not available in this environment')}static from(t){return t instanceof Cd?t:Fn(t)?id(t):Cn(t)?ad(t):_t(t)?B(this,void 0,void 0,function*(){return yield Cd.from(yield t)}):Mn(t)||Fi(t)||In(t)||rt(t)?sd(new at(t)):nd(new Gt(t))}static readAll(t){return t instanceof Cd?t.isSync()?yl(t):bl(t):Fn(t)||ArrayBuffer.isView(t)||dt(t)||xn(t)?yl(t):bl(t)}},jt=class extends Ue{constructor(e){super(e),this._impl=e}readAll(){return[...this]}[Symbol.iterator](){return this._impl[Symbol.iterator]()}[Symbol.asyncIterator](){return Qe(this,arguments,function*(){yield ee(yield*Mr(ei(ut(this[Symbol.iterator]()))))})}},Tr=class extends Ue{constructor(e){super(e),this._impl=e}readAll(){return B(this,void 0,void 0,function*(){var e,t,r,n;let a=new Array;try{for(var o=!0,l=ut(this),u;u=yield l.next(),e=u.done,!e;o=!0){n=u.value,o=!1;let _=n;a.push(_)}}catch(_){t={error:_}}finally{try{!o&&!e&&(r=l.return)&&(yield r.call(l))}finally{if(t)throw t.error}}return a})}[Symbol.iterator](){throw new Error("AsyncRecordBatchStreamReader is not Iterable")}[Symbol.asyncIterator](){return this._impl[Symbol.asyncIterator]()}},Fr=class extends jt{constructor(e){super(e),this._impl=e}},kn=class extends Tr{constructor(e){super(e),this._impl=e}},ta=class{get numDictionaries(){return this._dictionaryIndex}get numRecordBatches(){return this._recordBatchIndex}constructor(e=new Map){this.closed=!1,this.autoDestroy=!0,this._dictionaryIndex=0,this._recordBatchIndex=0,this.dictionaries=e}isSync(){return!1}isAsync(){return!1}isFile(){return!1}isStream(){return!1}reset(e){return this._dictionaryIndex=0,this._recordBatchIndex=0,this.schema=e,this.dictionaries=new Map,this}_loadRecordBatch(e,t){let r=this._loadVectors(e,t,this.schema.fields),n=J({type:new ve(this.schema.fields),length:e.length,children:r});return new De(this.schema,n)}_loadDictionaryBatch(e,t){let{id:r,isDelta:n}=e,{dictionaries:a,schema:o}=this,l=a.get(r),u=o.dictionaries.get(r),_=this._loadVectors(e.data,t,[u]);return(l&&n?l.concat(new se(_)):new se(_)).memoize()}_loadVectors(e,t,r){return new en(t,e.nodes,e.buffers,this.dictionaries,this.schema.metadataVersion).visitMany(r)}},Li=class extends ta{constructor(e,t){super(t),this._reader=Fn(e)?new Dn(this._handle=e):new Si(this._handle=e)}isSync(){return!0}isStream(){return!0}[Symbol.iterator](){return this}cancel(){!this.closed&&(this.closed=!0)&&(this.reset()._reader.return(),this._reader=null,this.dictionaries=null)}open(e){return this.closed||(this.autoDestroy=Sl(this,e),this.schema||(this.schema=this._reader.readSchema())||this.cancel()),this}throw(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.throw(e):ye}return(e){return!this.closed&&this.autoDestroy&&(this.closed=!0)?this.reset()._reader.return(e):ye}next(){if(this.closed)return ye;let e,{_reader:t}=this;for(;e=this._readNextMessageAndValidate();)if(e.isSchema())this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(r,n)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Xr(this.schema)}):this.return()}_readNextMessageAndValidate(e){return this._reader.readMessage(e)}},Ai=class extends ta{constructor(e,t){super(t),this._reader=new An(this._handle=e)}isAsync(){return!0}isStream(){return!0}[Symbol.asyncIterator](){return this}cancel(){return B(this,void 0,void 0,function*(){!this.closed&&(this.closed=!0)&&(yield this.reset()._reader.return(),this._reader=null,this.dictionaries=null)})}open(e){return B(this,void 0,void 0,function*(){return this.closed||(this.autoDestroy=Sl(this,e),this.schema||(this.schema=yield this._reader.readSchema())||(yield this.cancel())),this})}throw(e){return B(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.throw(e):ye})}return(e){return B(this,void 0,void 0,function*(){return!this.closed&&this.autoDestroy&&(this.closed=!0)?yield this.reset()._reader.return(e):ye})}next(){return B(this,void 0,void 0,function*(){if(this.closed)return ye;let e,{_reader:t}=this;for(;e=yield this._readNextMessageAndValidate();)if(e.isSchema())yield this.reset(e.header());else if(e.isRecordBatch()){this._recordBatchIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength);return{done:!1,value:this._loadRecordBatch(r,n)}}else if(e.isDictionaryBatch()){this._dictionaryIndex++;let r=e.header(),n=yield t.readMessageBody(e.bodyLength),a=this._loadDictionaryBatch(r,n);this.dictionaries.set(r.id,a)}return this.schema&&this._recordBatchIndex===0?(this._recordBatchIndex++,{done:!1,value:new Xr(this.schema)}):yield this.return()})}_readNextMessageAndValidate(e){return B(this,void 0,void 0,function*(){return yield this._reader.readMessage(e)})}},ra=class extends Li{get footer(){return this._footer}get numDictionaries(){return this._footer?this._footer.numDictionaries:0}get numRecordBatches(){return this._footer?this._footer.numRecordBatches:0}constructor(e,t){super(e instanceof Ji?e:new Ji(e),t)}isSync(){return!0}isFile(){return!0}open(e){if(!this.closed&&!this._footer){this.schema=(this._footer=this._readFooter()).schema;for(let t of this._footer.dictionaryBatches())t&&this._readDictionaryBatch(this._dictionaryIndex++)}return super.open(e)}readRecordBatch(e){var t;if(this.closed)return null;this._footer||this.open();let r=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(r&&this._handle.seek(r.offset)){let n=this._reader.readMessage(ne.RecordBatch);if(n!=null&&n.isRecordBatch()){let a=n.header(),o=this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(a,o)}}return null}_readDictionaryBatch(e){var t;let r=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(r&&this._handle.seek(r.offset)){let n=this._reader.readMessage(ne.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){let a=n.header(),o=this._reader.readMessageBody(n.bodyLength),l=this._loadDictionaryBatch(a,o);this.dictionaries.set(a.id,l)}}}_readFooter(){let{_handle:e}=this,t=e.size-_o,r=e.readInt32(t),n=e.readAt(t-r,r);return ir.decode(n)}_readNextMessageAndValidate(e){var t;if(this._footer||this.open(),this._footer&&this._recordBatchIndexsuper.open}});return B(this,void 0,void 0,function*(){if(!this.closed&&!this._footer){this.schema=(this._footer=yield this._readFooter()).schema;for(let r of this._footer.dictionaryBatches())r&&(yield this._readDictionaryBatch(this._dictionaryIndex++))}return yield t.open.call(this,e)})}readRecordBatch(e){return B(this,void 0,void 0,function*(){var t;if(this.closed)return null;this._footer||(yield this.open());let r=(t=this._footer)===null||t===void 0?void 0:t.getRecordBatch(e);if(r&&(yield this._handle.seek(r.offset))){let n=yield this._reader.readMessage(ne.RecordBatch);if(n!=null&&n.isRecordBatch()){let a=n.header(),o=yield this._reader.readMessageBody(n.bodyLength);return this._loadRecordBatch(a,o)}}return null})}_readDictionaryBatch(e){return B(this,void 0,void 0,function*(){var t;let r=(t=this._footer)===null||t===void 0?void 0:t.getDictionaryBatch(e);if(r&&(yield this._handle.seek(r.offset))){let n=yield this._reader.readMessage(ne.DictionaryBatch);if(n!=null&&n.isDictionaryBatch()){let a=n.header(),o=yield this._reader.readMessageBody(n.bodyLength),l=this._loadDictionaryBatch(a,o);this.dictionaries.set(a.id,l)}}})}_readFooter(){return B(this,void 0,void 0,function*(){let{_handle:e}=this;e._pending&&(yield e._pending);let t=e.size-_o,r=yield e.readInt32(t),n=yield e.readAt(t-r,r);return ir.decode(n)})}_readNextMessageAndValidate(e){return B(this,void 0,void 0,function*(){if(this._footer||(yield this.open()),this._footer&&this._recordBatchIndex=4?ea(t)?new Fr(new ra(e.read())):new jt(new Li(e)):new jt(new Li(function*(){}()))}function sd(e){return B(this,void 0,void 0,function*(){let t=yield e.peek(Ei+7&-8);return t&&t.byteLength>=4?ea(t)?new Fr(new ra(yield e.read())):new Tr(new Ai(e)):new Tr(new Ai(function(){return Qe(this,arguments,function*(){})}()))})}function ad(e){return B(this,void 0,void 0,function*(){let{size:t}=yield e.stat(),r=new kr(e,t);return t>=vl&&ea(yield r.readAt(0,Ei+7&-8))?new kn(new fo(r)):new Tr(new Ai(r))})}var Ee=class qd extends j{static assemble(...t){let r=a=>a.flatMap(o=>Array.isArray(o)?r(o):o instanceof De?o.data.children:o.data),n=new qd;return n.visitMany(r(t)),n}constructor(){super(),this._byteLength=0,this._nodes=[],this._buffers=[],this._bufferRegions=[]}visit(t){if(t instanceof se)return this.visitMany(t.data),this;let{type:r}=t;if(!R.isDictionary(r)){let{length:n}=t;if(n>2147483647)throw new RangeError("Cannot write arrays larger than 2^31 - 1 in length");if(R.isUnion(r))this.nodes.push(new ct(n,0));else{let{nullCount:a}=t;R.isNull(r)||Dt.call(this,a<=0?new Uint8Array(0):Gr(t.offset,n,t.nullBitmap)),this.nodes.push(new ct(n,a))}}return super.visit(t)}visitNull(t){return this}visitDictionary(t){return this.visit(t.clone(t.type.indices))}get nodes(){return this._nodes}get buffers(){return this._buffers}get byteLength(){return this._byteLength}get bufferRegions(){return this._bufferRegions}};function Dt(e){let t=e.byteLength+7&-8;return this.buffers.push(e),this.bufferRegions.push(new $e(this._byteLength,t)),this._byteLength+=t,this}function od(e){var t;let{type:r,length:n,typeIds:a,valueOffsets:o}=e;if(Dt.call(this,a),r.mode===he.Sparse)return mo.call(this,e);if(r.mode===he.Dense){if(e.offset<=0)return Dt.call(this,o),mo.call(this,e);{let l=new Int32Array(n),u=Object.create(null),_=Object.create(null);for(let d,p,f=-1;++f{let f=r.typeIds[p],m=u[f],h=_[f];return d.slice(m,Math.min(n,h))}))}}return this}function cd(e){let t;return e.nullCount>=e.length?Dt.call(this,new Uint8Array(0)):(t=e.values)instanceof Uint8Array?Dt.call(this,Gr(e.offset,e.length,t)):Dt.call(this,Ur(e.values))}function _r(e){return Dt.call(this,e.values.subarray(0,e.length*e.stride))}function ia(e){let{length:t,values:r,valueOffsets:n}=e,a=ae(n[0]),o=ae(n[t]),l=Math.min(o-a,r.byteLength-a);return Dt.call(this,Rn(-a,t+1,n)),Dt.call(this,r.subarray(a,a+l)),this}function ho(e){let{length:t,valueOffsets:r}=e;if(r){let{[0]:n,[t]:a}=r;return Dt.call(this,Rn(-n,t+1,r)),this.visit(e.children[0].slice(n,a-n))}return this.visit(e.children[0])}function mo(e){return this.visitMany(e.type.children.map((t,r)=>e.children[r]).filter(Boolean))[0]}Ee.prototype.visitBool=cd,Ee.prototype.visitInt=_r,Ee.prototype.visitFloat=_r,Ee.prototype.visitUtf8=ia,Ee.prototype.visitLargeUtf8=ia,Ee.prototype.visitBinary=ia,Ee.prototype.visitLargeBinary=ia,Ee.prototype.visitFixedSizeBinary=_r,Ee.prototype.visitDate=_r,Ee.prototype.visitTimestamp=_r,Ee.prototype.visitTime=_r,Ee.prototype.visitDecimal=_r,Ee.prototype.visitList=ho,Ee.prototype.visitStruct=mo,Ee.prototype.visitUnion=od,Ee.prototype.visitInterval=_r,Ee.prototype.visitDuration=_r,Ee.prototype.visitFixedSizeList=ho,Ee.prototype.visitMap=ho;var Qr=class extends Hr{static throughNode(e){throw new Error('"throughNode" not available in this environment')}static throughDOM(e,t){throw new Error('"throughDOM" not available in this environment')}constructor(e){super(),this._position=0,this._started=!1,this._sink=new Rt,this._schema=null,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,Oe(e)||(e={autoDestroy:!0,writeLegacyIpcFormat:!1}),this._autoDestroy=typeof e.autoDestroy=="boolean"?e.autoDestroy:!0,this._writeLegacyIpcFormat=typeof e.writeLegacyIpcFormat=="boolean"?e.writeLegacyIpcFormat:!1}toString(e=!1){return this._sink.toString(e)}toUint8Array(e=!1){return this._sink.toUint8Array(e)}writeAll(e){return _t(e)?e.then(t=>this.writeAll(t)):rt(e)?vo(this,e):go(this,e)}get closed(){return this._sink.closed}[Symbol.asyncIterator](){return this._sink[Symbol.asyncIterator]()}toDOMStream(e){return this._sink.toDOMStream(e)}toNodeStream(e){return this._sink.toNodeStream(e)}close(){return this.reset()._sink.close()}abort(e){return this.reset()._sink.abort(e)}finish(){return this._autoDestroy?this.close():this.reset(this._sink,this._schema),this}reset(e=this._sink,t=null){return e===this._sink||e instanceof Rt?this._sink=e:(this._sink=new Rt,e&&Go(e)?this.toDOMStream({type:"bytes"}).pipeTo(e):e&&Uo(e)&&this.toNodeStream({objectMode:!1}).pipe(e)),this._started&&this._schema&&this._writeFooter(this._schema),this._started=!1,this._dictionaryBlocks=[],this._recordBatchBlocks=[],this._seenDictionaries=new Map,this._dictionaryDeltaOffsets=new Map,(!t||!qr(t,this._schema))&&(t==null?(this._position=0,this._schema=null):(this._started=!0,this._schema=t,this._writeSchema(t))),this}write(e){let t=null;if(this._sink){if(e==null)return this.finish()&&void 0;if(e instanceof We&&!(t=e.schema))return this.finish()&&void 0;if(e instanceof De&&!(t=e.schema))return this.finish()&&void 0}else throw new Error("RecordBatchWriter is closed");if(t&&!qr(t,this._schema)){if(this._started&&this._autoDestroy)return this.close();this.reset(this._sink,t)}e instanceof De?e instanceof Xr||this._writeRecordBatch(e):e instanceof We?this.writeAll(e.batches):dt(e)&&this.writeAll(e)}_writeMessage(e,t=8){let r=t-1,n=Xe.encode(e),a=n.byteLength,o=this._writeLegacyIpcFormat?4:8,l=a+o+r&~r,u=l-a-o;return e.headerType===ne.RecordBatch?this._recordBatchBlocks.push(new nr(l,e.bodyLength,this._position)):e.headerType===ne.DictionaryBatch&&this._dictionaryBlocks.push(new nr(l,e.bodyLength,this._position)),this._writeLegacyIpcFormat||this._write(Int32Array.of(-1)),this._write(Int32Array.of(l-o)),a>0&&this._write(n),this._writePadding(u)}_write(e){if(this._started){let t=z(e);t&&t.byteLength>0&&(this._sink.write(t),this._position+=t.byteLength)}return this}_writeSchema(e){return this._writeMessage(Xe.from(e))}_writeFooter(e){return this._writeLegacyIpcFormat?this._write(Int32Array.of(0)):this._write(Int32Array.of(-1,0))}_writeMagic(){return this._write(wi)}_writePadding(e){return e>0?this._write(new Uint8Array(e)):this}_writeRecordBatch(e){let{byteLength:t,nodes:r,bufferRegions:n,buffers:a}=Ee.assemble(e),o=new Ge(e.numRows,r,n),l=Xe.from(o,t);return this._writeDictionaries(e)._writeMessage(l)._writeBodyBuffers(a)}_writeDictionaryBatch(e,t,r=!1){let{byteLength:n,nodes:a,bufferRegions:o,buffers:l}=Ee.assemble(new se([e])),u=new Ge(e.length,a,o),_=new qe(u,t,r),d=Xe.from(_,n);return this._writeMessage(d)._writeBodyBuffers(l)}_writeBodyBuffers(e){let t,r,n;for(let a=-1,o=e.length;++a0&&(this._write(t),(n=(r+7&-8)-r)>0&&this._writePadding(n));return this}_writeDictionaries(e){var t,r;for(let[n,a]of e.dictionaries){let o=(t=a==null?void 0:a.data)!==null&&t!==void 0?t:[],l=this._seenDictionaries.get(n),u=(r=this._dictionaryDeltaOffsets.get(n))!==null&&r!==void 0?r:0;if(!l||l.data[0]!==o[0])for(let[_,d]of o.entries())this._writeDictionaryBatch(d,n,_>0);else if(un.writeAll(a)):rt(t)?vo(n,t):go(n,t)}},Jr=class Xd extends Qr{static writeAll(t){let r=new Xd;return _t(t)?t.then(n=>r.writeAll(n)):rt(t)?vo(r,t):go(r,t)}constructor(){super(),this._autoDestroy=!0}_writeSchema(t){return this._writeMagic()._writePadding(2)}_writeDictionaryBatch(t,r,n=!1){if(!n&&this._seenDictionaries.has(r))throw new Error("The Arrow File format does not support replacement dictionaries. ");return super._writeDictionaryBatch(t,r,n)}_writeFooter(t){let r=ir.encode(new ir(t,ue.V5,this._recordBatchBlocks,this._dictionaryBlocks));return super._writeFooter(t)._write(r)._write(Int32Array.of(r.byteLength))._writeMagic()}};function go(e,t){let r=t;t instanceof We&&(r=t.batches,e.reset(void 0,t.schema));for(let n of r)e.write(n);return e.finish()}function vo(e,t){return B(this,void 0,void 0,function*(){var r,n,a,o,l,u,_;try{for(r=!0,n=ut(t);a=yield n.next(),o=a.done,!o;r=!0){_=a.value,r=!1;let d=_;e.write(d)}}catch(d){l={error:d}}finally{try{!r&&!o&&(u=n.return)&&(yield u.call(n))}finally{if(l)throw l.error}}return e.finish()})}function wl(e,t){if(rt(e))return ud(e,t);if(dt(e))return ld(e,t);throw new Error("toDOMStream() must be called with an Iterable or AsyncIterable")}function ld(e,t){let r=null,n=(t==null?void 0:t.type)==="bytes"||!1,a=(t==null?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(l){o(l,r||(r=e[Symbol.iterator]()))},pull(l){r?o(l,r):l.close()},cancel(){(r!=null&&r.return&&r.return()||!0)&&(r=null)}}),Object.assign({highWaterMark:n?a:void 0},t));function o(l,u){let _,d=null,p=l.desiredSize||null;for(;!(d=u.next(n?p:null)).done;)if(ArrayBuffer.isView(d.value)&&(_=z(d.value))&&(p!=null&&n&&(p=p-_.byteLength+1),d.value=_),l.enqueue(d.value),p!=null&&--p<=0)return;l.close()}}function ud(e,t){let r=null,n=(t==null?void 0:t.type)==="bytes"||!1,a=(t==null?void 0:t.highWaterMark)||Math.pow(2,24);return new ReadableStream(Object.assign(Object.assign({},t),{start(l){return B(this,void 0,void 0,function*(){yield o(l,r||(r=e[Symbol.asyncIterator]()))})},pull(l){return B(this,void 0,void 0,function*(){r?yield o(l,r):l.close()})},cancel(){return B(this,void 0,void 0,function*(){(r!=null&&r.return&&(yield r.return())||!0)&&(r=null)})}}),Object.assign({highWaterMark:n?a:void 0},t));function o(l,u){return B(this,void 0,void 0,function*(){let _,d=null,p=l.desiredSize||null;for(;!(d=yield u.next(n?p:null)).done;)if(ArrayBuffer.isView(d.value)&&(_=z(d.value))&&(p!=null&&n&&(p=p-_.byteLength+1),d.value=_),l.enqueue(d.value),p!=null&&--p<=0)return;l.close()})}}function Al(e){return new yo(e)}var yo=class{constructor(e){this._numChunks=0,this._finished=!1,this._bufferedSize=0;let{["readableStrategy"]:t,["writableStrategy"]:r,["queueingStrategy"]:n="count"}=e,a=Bo(e,["readableStrategy","writableStrategy","queueingStrategy"]);this._controller=null,this._builder=Wr(a),this._getSize=n!=="bytes"?El:Ll;let{["highWaterMark"]:o=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},t),{["highWaterMark"]:l=n==="bytes"?Math.pow(2,14):1e3}=Object.assign({},r);this.readable=new ReadableStream({cancel:()=>{this._builder.clear()},pull:u=>{this._maybeFlush(this._builder,this._controller=u)},start:u=>{this._maybeFlush(this._builder,this._controller=u)}},{highWaterMark:o,size:n!=="bytes"?El:Ll}),this.writable=new WritableStream({abort:()=>{this._builder.clear()},write:()=>{this._maybeFlush(this._builder,this._controller)},close:()=>{this._maybeFlush(this._builder.finish(),this._controller)}},{highWaterMark:l,size:u=>this._writeValueAndReturnChunkSize(u)})}_writeValueAndReturnChunkSize(e){let t=this._bufferedSize;return this._bufferedSize=this._getSize(this._builder.append(e)),this._bufferedSize-t}_maybeFlush(e,t){t!=null&&(this._bufferedSize>=t.desiredSize&&++this._numChunks&&this._enqueue(t,e.toVector()),e.finished&&((e.length>0||this._numChunks===0)&&++this._numChunks&&this._enqueue(t,e.toVector()),!this._finished&&(this._finished=!0)&&this._enqueue(t,null)))}_enqueue(e,t){this._bufferedSize=0,this._controller=null,t==null?e.close():e.enqueue(t)}},El=e=>{var t;return(t=e==null?void 0:e.length)!==null&&t!==void 0?t:0},Ll=e=>{var t;return(t=e==null?void 0:e.byteLength)!==null&&t!==void 0?t:0};function na(e,t){let r=new Rt,n=null,a=new ReadableStream({cancel(){return B(this,void 0,void 0,function*(){yield r.close()})},start(u){return B(this,void 0,void 0,function*(){yield l(u,n||(n=yield o()))})},pull(u){return B(this,void 0,void 0,function*(){n?yield l(u,n):u.close()})}});return{writable:new WritableStream(r,Object.assign({highWaterMark:Math.pow(2,14)},e)),readable:a};function o(){return B(this,void 0,void 0,function*(){return yield(yield Ue.from(r)).open(t)})}function l(u,_){return B(this,void 0,void 0,function*(){let d=u.desiredSize,p=null;for(;!(p=yield _.next()).done;)if(u.enqueue(p.value),d!=null&&--d<=0)return;u.close()})}}function sa(e,t){let r=new this(e),n=new at(r),a=new ReadableStream({cancel(){return B(this,void 0,void 0,function*(){yield n.cancel()})},pull(l){return B(this,void 0,void 0,function*(){yield o(l)})},start(l){return B(this,void 0,void 0,function*(){yield o(l)})}},Object.assign({highWaterMark:Math.pow(2,14)},t));return{writable:new WritableStream(r,e),readable:a};function o(l){return B(this,void 0,void 0,function*(){let u=null,_=l.desiredSize;for(;u=yield n.read(_||null);)if(l.enqueue(u),_!=null&&(_-=u.byteLength)<=0)return;l.close()})}}function aa(e,t="stream"){return(t==="stream"?Yr:Jr).writeAll(e).toUint8Array(!0)}Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},xa),to),$a),Ca),Ea),za),Da),{compareSchemas:qr,compareFields:Zc,compareTypes:el}),Be.toDOMStream=wl,Se.throughDOM=Al,Ue.throughDOM=na,Fr.throughDOM=na,jt.throughDOM=na,Qr.throughDOM=sa,Jr.throughDOM=sa,Yr.throughDOM=sa;function Di(e){switch(e.typeId){case y.Binary:return{sqlType:"binary"};case y.Bool:return{sqlType:"bool"};case y.Date:return{sqlType:"date"};case y.DateDay:return{sqlType:"date32[d]"};case y.DateMillisecond:return{sqlType:"date64[ms]"};case y.Decimal:{let t=e;return{sqlType:"decimal",precision:t.precision,scale:t.scale}}case y.Float:return{sqlType:"float"};case y.Float16:return{sqlType:"float16"};case y.Float32:return{sqlType:"float32"};case y.Float64:return{sqlType:"float64"};case y.Int:return{sqlType:"int32"};case y.Int16:return{sqlType:"int16"};case y.Int32:return{sqlType:"int32"};case y.Int64:return{sqlType:"int64"};case y.Uint16:return{sqlType:"uint16"};case y.Uint32:return{sqlType:"uint32"};case y.Uint64:return{sqlType:"uint64"};case y.Uint8:return{sqlType:"uint8"};case y.IntervalDayTime:return{sqlType:"interval[dt]"};case y.IntervalYearMonth:return{sqlType:"interval[m]"};case y.List:return{sqlType:"list",valueType:Di(e.valueType)};case y.FixedSizeBinary:return{sqlType:"fixedsizebinary",byteWidth:e.byteWidth};case y.Null:return{sqlType:"null"};case y.Utf8:return{sqlType:"utf8"};case y.Struct:return{sqlType:"struct",fields:e.children.map(t=>oa(t.name,t.type))};case y.Map:{let t=e;return{sqlType:"map",keyType:Di(t.keyType),valueType:Di(t.valueType)}}case y.Time:return{sqlType:"time[s]"};case y.TimeMicrosecond:return{sqlType:"time[us]"};case y.TimeMillisecond:return{sqlType:"time[ms]"};case y.TimeNanosecond:return{sqlType:"time[ns]"};case y.TimeSecond:return{sqlType:"time[s]"};case y.Timestamp:return{sqlType:"timestamp",timezone:e.timezone||void 0};case y.TimestampSecond:return{sqlType:"timestamp[s]",timezone:e.timezone||void 0};case y.TimestampMicrosecond:return{sqlType:"timestamp[us]",timezone:e.timezone||void 0};case y.TimestampNanosecond:return{sqlType:"timestamp[ns]",timezone:e.timezone||void 0};case y.TimestampMillisecond:return{sqlType:"timestamp[ms]",timezone:e.timezone||void 0}}throw new Error("unsupported arrow type: ".concat(e.toString()))}function oa(e,t){let r=Di(t);return r.name=e,r}var ca=class{constructor(){this._bindings=null,this._nextMessageId=0}log(e){this.postMessage({messageId:this._nextMessageId++,requestId:0,type:"LOG",data:e},[])}sendOK(e){this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"OK",data:null},[])}failWith(e,t){let r={name:t.name,message:t.message,stack:t.stack||void 0};this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"ERROR",data:r},[])}async onMessage(e){switch(e.type){case"PING":this.sendOK(e);return;case"INSTANTIATE":this._bindings!=null&&this.failWith(e,new Error("duckdb already initialized"));try{this._bindings=await this.instantiate(e.data[0],e.data[1],t=>{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"INSTANTIATE_PROGRESS",data:t},[])}),this.sendOK(e)}catch(t){console.log(t),this._bindings=null,this.failWith(e,t)}return}if(!this._bindings)return this.failWith(e,new Error("duckdb is not initialized"));try{switch(e.type){case"GET_VERSION":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"VERSION_STRING",data:this._bindings.getVersion()},[]);break;case"GET_FEATURE_FLAGS":this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FEATURE_FLAGS",data:this._bindings.getFeatureFlags()},[]);break;case"RESET":this._bindings.reset(),this.sendOK(e);break;case"OPEN":this._bindings.open(e.data),this.sendOK(e);break;case"DROP_FILE":this._bindings.dropFile(e.data),this.sendOK(e);break;case"DROP_FILES":this._bindings.dropFiles(),this.sendOK(e);break;case"FLUSH_FILES":this._bindings.flushFiles(),this.sendOK(e);break;case"CONNECT":{let t=this._bindings.connect();this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"CONNECTION_INFO",data:t.useUnsafe((r,n)=>n)},[]);break}case"DISCONNECT":this._bindings.disconnect(e.data),this.sendOK(e);break;case"CREATE_PREPARED":{let t=this._bindings.createPrepared(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"PREPARED_STATEMENT_ID",data:t},[]);break}case"CLOSE_PREPARED":{this._bindings.closePrepared(e.data[0],e.data[1]),this.sendOK(e);break}case"RUN_PREPARED":{let t=this._bindings.runPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"RUN_QUERY":{let t=this._bindings.runQuery(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT",data:t},[t.buffer]);break}case"SEND_PREPARED":{let t=this._bindings.sendPrepared(e.data[0],e.data[1],e.data[2]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_HEADER",data:t},[t.buffer]);break}case"START_PENDING_QUERY":{let t=this._bindings.startPendingQuery(e.data[0],e.data[1]),r=[];t&&r.push(t.buffer),this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_HEADER_OR_NULL",data:t},r);break}case"POLL_PENDING_QUERY":{let t=this._bindings.pollPendingQuery(e.data),r=[];t&&r.push(t.buffer),this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_HEADER_OR_NULL",data:t},r);break}case"CANCEL_PENDING_QUERY":{let t=this._bindings.cancelPendingQuery(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"SUCCESS",data:t},[]);break}case"FETCH_QUERY_RESULTS":{let t=this._bindings.fetchQueryResults(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"QUERY_RESULT_CHUNK",data:t},[t.buffer]);break}case"GET_TABLE_NAMES":{let t=this._bindings.getTableNames(e.data[0],e.data[1]);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"TABLE_NAMES",data:t},[]);break}case"GLOB_FILE_INFOS":{let t=this._bindings.globFiles(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_INFOS",data:t},[]);break}case"REGISTER_FILE_URL":this._bindings.registerFileURL(e.data[0],e.data[1],e.data[2],e.data[3]),this.sendOK(e);break;case"REGISTER_FILE_BUFFER":this._bindings.registerFileBuffer(e.data[0],e.data[1]),this.sendOK(e);break;case"REGISTER_FILE_HANDLE":this._bindings.registerFileHandle(e.data[0],e.data[1],e.data[2],e.data[3]),this.sendOK(e);break;case"COPY_FILE_TO_PATH":this._bindings.copyFileToPath(e.data[0],e.data[1]),this.sendOK(e);break;case"COPY_FILE_TO_BUFFER":{let t=this._bindings.copyFileToBuffer(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_BUFFER",data:t},[]);break}case"COLLECT_FILE_STATISTICS":this._bindings.collectFileStatistics(e.data[0],e.data[1]),this.sendOK(e);break;case"EXPORT_FILE_STATISTICS":{this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"FILE_STATISTICS",data:this._bindings.exportFileStatistics(e.data)},[]);break}case"INSERT_ARROW_FROM_IPC_STREAM":{this._bindings.insertArrowFromIPCStream(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_CSV_FROM_PATH":{this._bindings.insertCSVFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"IMPORT_JSON_FROM_PATH":{this._bindings.insertJSONFromPath(e.data[0],e.data[1],e.data[2]),this.sendOK(e);break}case"TOKENIZE":{let t=this._bindings.tokenize(e.data);this.postMessage({messageId:this._nextMessageId++,requestId:e.messageId,type:"SCRIPT_TOKENS",data:t},[]);break}}}catch(t){return console.log(t),this.failWith(e,t)}}},Bl=Po(Fl()),la=class{constructor(e,t){this._bindings=e,this._conn=t}close(){this._bindings.disconnect(this._conn)}useUnsafe(e){return e(this._bindings,this._conn)}query(e){let t=this._bindings.runQuery(this._conn,e),r=Ue.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),new We(r)}async send(e){let t=this._bindings.startPendingQuery(this._conn,e);for(;t==null;)t=await new Promise((a,o)=>{try{a(this._bindings.pollPendingQuery(this._conn))}catch(l){console.log(l),o(l)}});let r=new ua(this._bindings,this._conn,t),n=Ue.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}cancelSent(){return this._bindings.cancelPendingQuery(this._conn)}getTableNames(e){return this._bindings.getTableNames(this._conn,e)}prepare(e){let t=this._bindings.createPrepared(this._conn,e);return new Eo(this._bindings,this._conn,t)}createScalarFunction(e,t,r){this._bindings.createScalarFunction(this._conn,e,t,r)}insertArrowTable(e,t){let r=aa(e,"stream");this.insertArrowFromIPCStream(r,t)}insertArrowFromIPCStream(e,t){this._bindings.insertArrowFromIPCStream(this._conn,e,t)}insertCSVFromPath(e,t){this._bindings.insertCSVFromPath(this._conn,e,t)}insertJSONFromPath(e,t){this._bindings.insertJSONFromPath(this._conn,e,t)}},ua=class{constructor(e,t,r){this.bindings=e,this.conn=t,this.header=r,this._first=!0,this._depleted=!1}next(){if(this._first)return this._first=!1,{done:!1,value:this.header};if(this._depleted)return{done:!0,value:null};let e=this.bindings.fetchQueryResults(this.conn);return this._depleted=e.length==0,{done:this._depleted,value:e}}[Symbol.iterator](){return this}},Eo=class{constructor(e,t,r){this.bindings=e,this.connectionId=t,this.statementId=r}close(){this.bindings.closePrepared(this.connectionId,this.statementId)}query(...e){let t=this.bindings.runPrepared(this.connectionId,this.statementId,e),r=Ue.from(t);return console.assert(r.isSync()),console.assert(r.isFile()),new We(r)}send(...e){let t=this.bindings.sendPrepared(this.connectionId,this.statementId,e),r=new ua(this.bindings,this.connectionId,t),n=Ue.from(r);return console.assert(n.isSync()),console.assert(n.isStream()),n}},Ml=new TextEncoder,xl=new TextDecoder("utf-8");function Lo(e,t,r){let n=Ml.encode(r),a=e._malloc(n.byteLength),o=e.HEAPU8.subarray(a,a+n.byteLength);o.set(n),e.HEAPF64[(t>>3)+0]=1,e.HEAPF64[(t>>3)+1]=a,e.HEAPF64[(t>>3)+2]=o.byteLength}function Do(e){switch(e){case"UINT8":case"INT8":return 1;case"INT32":case"FLOAT":return 4;case"INT64":case"UINT64":case"DOUBLE":case"VARCHAR":return 8;default:return 0}}function Ao(e,t,r,n){let a=e.HEAPU8.subarray(t,t+n*Do(r));switch(r){case"UINT8":return new Uint8Array(a.buffer,a.byteOffset,n);case"INT8":return new Int8Array(a.buffer,a.byteOffset,n);case"INT32":return new Int32Array(a.buffer,a.byteOffset,n);case"FLOAT":return new Float32Array(a.buffer,a.byteOffset,n);case"DOUBLE":return new Float64Array(a.buffer,a.byteOffset,n);case"VARCHAR":return new Float64Array(a.buffer,a.byteOffset,n);default:return new Array(0)}}function Cl(e,t,r){let n=e.HEAPU8.subarray(t,t+r);return new Uint8Array(n.buffer,n.byteOffset,r)}function _a(e,t,r){let n=e.HEAPU8.subarray(t,t+r*8);return new Float64Array(n.buffer,n.byteOffset,r)}function Pl(e,t,r,n,a,o,l,u){try{let _=e._udfFunctions.get(n);if(!_){Lo(t,r,"Unknown UDF with id: "+n);return}let d=xl.decode(t.HEAPU8.subarray(a,a+o)),p=JSON.parse(d),f=_a(t,l,u/8),m=E=>{var P;let k=null;switch(E.validityBuffer!==void 0&&(k=Cl(t,f[E.validityBuffer],p.rows)),E.physicalType){case"VARCHAR":{if(E.dataBuffer===null||E.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for VARCHAR argument");if(E.lengthBuffer===null||E.lengthBuffer===void 0)throw new Error("malformed data view, expected data length buffer for VARCHAR argument");let C=Ao(t,f[E.dataBuffer],E.physicalType,p.rows),F=[],U=_a(t,f[E.lengthBuffer],p.rows);for(let D=0;DF[D]}case"STRUCT":{let C={},F=[];for(let U=0;U<(((P=E.children)==null?void 0:P.length)||0);++U){let D=E.children[U],I=m(D);F.push(Q=>{C[D.name]=I(Q)})}return k!=null?U=>{if(!k[U])return null;for(let D of F)D(U);return C}:U=>{for(let D of F)D(U);return C}}default:{if(E.dataBuffer===void 0)throw new Error("malformed data view, expected data buffer for argument of type: "+E.physicalType);let C=Ao(t,f[E.dataBuffer],E.physicalType,p.rows);return k!=null?F=>k[F]?C[F]:null:F=>C[F]}}},h=[];for(let E=0;E>3)+0]=0,t.HEAPF64[(r>>3)+1]=x,t.HEAPF64[(r>>3)+2]=0}catch(_){Lo(t,r,_.toString())}}function hd(){let e=new TextDecoder;return t=>(typeof SharedArrayBuffer<"u"&&t.buffer instanceof SharedArrayBuffer&&(t=new Uint8Array(t)),e.decode(t))}var gd=hd();function lt(e,t){console.error("FAIL WITH: ".concat(t)),e.ccall("duckdb_web_fail_with",null,["string"],[t])}function Kr(e,t,r){let n=e.HEAPU8.subarray(t,t+r),a=new Uint8Array(new ArrayBuffer(n.byteLength));return a.set(n),a}function te(e,t,r){return gd(e.HEAPU8.subarray(t,t+r))}function fe(e,t,r,n){let a=e.stackSave(),o=e.stackAlloc(3*8);r.unshift("number"),n.unshift(o),e.ccall(t,null,r,n);let l=e.HEAPF64[(o>>3)+0],u=e.HEAPF64[(o>>3)+1],_=e.HEAPF64[(o>>3)+2];return e.stackRestore(a),[l,u,_]}function be(e){e.ccall("duckdb_web_clear_response",null,[],[])}var da=class{constructor(e){let t=new Float64Array(e.buffer,e.byteOffset,e.byteLength/8),r=new Uint8Array(new ArrayBuffer(e.byteLength));r.set(e.subarray(7*8)),this.totalFileReadsCold=t[0],this.totalFileReadsAhead=t[1],this.totalFileReadsCached=t[2],this.totalFileWrites=t[3],this.totalPageAccesses=t[4],this.totalPageLoads=t[5],this.blockSize=t[6],this.blockStats=r}getBlockStats(e,t){return t=t||{file_reads_cold:0,file_reads_ahead:0,file_reads_cached:0,file_writes:0,page_accesses:0,page_loads:0},t.file_writes=this.blockStats[e*3+0]&15,t.file_reads_cold=this.blockStats[e*3+0]>>4,t.file_reads_ahead=this.blockStats[e*3+1]&15,t.file_reads_cached=this.blockStats[e*3+1]>>4,t.page_accesses=this.blockStats[e*3+1]&15,t.page_loads=this.blockStats[e*3+1]>>4,t}},Il=new TextEncoder,fa=class{constructor(e,t){this._instance=null,this._initPromise=null,this._initPromiseResolver=()=>{},this.onInstantiationProgress=[],this._logger=e,this._runtime=t,this._nextUDFId=1}get logger(){return this._logger}get mod(){return this._instance}get pthread(){return this.mod.PThread||null}async instantiate(e=t=>{}){return this._instance!=null?this:(this._initPromise!=null&&(this.onInstantiationProgress.push(e),await this._initPromise),this._initPromise=new Promise(t=>{this._initPromiseResolver=t}),this.onInstantiationProgress=[e],this._instance=await this.instantiateImpl({print:console.log.bind(console),printErr:console.log.bind(console),onRuntimeInitialized:this._initPromiseResolver}),await this._initPromise,this._initPromise=null,this.onInstantiationProgress=this.onInstantiationProgress.filter(t=>t!=e),globalThis.DUCKDB_BINDINGS=this,this)}open(e){let[t,r,n]=fe(this.mod,"duckdb_web_open",["string"],[JSON.stringify(e)]);if(t!==0)throw new Error(te(this.mod,r,n));be(this.mod)}reset(){let[e,t,r]=fe(this.mod,"duckdb_web_reset",[],[]);if(e!==0)throw new Error(te(this.mod,t,r));be(this.mod)}getVersion(){let[e,t,r]=fe(this.mod,"duckdb_web_get_version",[],[]);if(e!==0)throw new Error(te(this.mod,t,r));let n=te(this.mod,t,r);return be(this.mod),n}getFeatureFlags(){return this.mod.ccall("duckdb_web_get_feature_flags","number",[],[])}tokenize(e){let[t,r,n]=fe(this.mod,"duckdb_web_tokenize",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));let a=te(this.mod,r,n);return be(this.mod),JSON.parse(a)}connect(){let e=this.mod.ccall("duckdb_web_connect","number",[],[]);return new la(this,e)}disconnect(e){if(this.mod.ccall("duckdb_web_disconnect",null,["number"],[e]),this.pthread)for(let t of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])t.postMessage({cmd:"dropUDFFunctions",connectionId:e})}runQuery(e,t){let r=Il.encode(t),n=this.mod._malloc(r.length);this.mod.HEAPU8.subarray(n,n+r.length).set(r);let[a,o,l]=fe(this.mod,"duckdb_web_query_run_buffer",["number","number","number"],[e,n,r.length]);if(a!==0)throw new Error(te(this.mod,o,l));let u=Kr(this.mod,o,l);return be(this.mod),this.mod._free(n),u}startPendingQuery(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_pending_query_start",["number","string"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));if(n==0)return null;let o=Kr(this.mod,n,a);return be(this.mod),o}pollPendingQuery(e){let[t,r,n]=fe(this.mod,"duckdb_web_pending_query_poll",["number"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));if(r==0)return null;let a=Kr(this.mod,r,n);return be(this.mod),a}cancelPendingQuery(e){return this.mod.ccall("duckdb_web_pending_query_cancel","boolean",["number"],[e])}fetchQueryResults(e){let[t,r,n]=fe(this.mod,"duckdb_web_query_fetch_results",["number"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));let a=Kr(this.mod,r,n);return be(this.mod),a}getTableNames(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_get_tablenames",["number","string"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));let o=te(this.mod,n,a);return be(this.mod),JSON.parse(o)}createScalarFunction(e,t,r,n){let a={functionId:this._nextUDFId,name:t,returnType:Di(r)},o={functionId:a.functionId,connectionId:e,name:t,returnType:r,func:n};this._nextUDFId+=1;let[l,u,_]=fe(this.mod,"duckdb_web_udf_scalar_create",["number","string"],[e,JSON.stringify(a)]);if(l!==0)throw new Error(te(this.mod,u,_));if(be(this.mod),globalThis.DUCKDB_RUNTIME._udfFunctions=(globalThis.DUCKDB_RUNTIME._udfFunctions||new Map).set(o.functionId,o),this.pthread)for(let d of[...this.pthread.runningWorkers,...this.pthread.unusedWorkers])d.postMessage({cmd:"registerUDFFunction",udf:o})}createPrepared(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_prepared_create",["number","string"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));return be(this.mod),n}closePrepared(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_prepared_close",["number","number"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));be(this.mod)}runPrepared(e,t,r){let[n,a,o]=fe(this.mod,"duckdb_web_prepared_run",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(te(this.mod,a,o));let l=Kr(this.mod,a,o);return be(this.mod),l}sendPrepared(e,t,r){let[n,a,o]=fe(this.mod,"duckdb_web_prepared_send",["number","number","string"],[e,t,JSON.stringify(r)]);if(n!==0)throw new Error(te(this.mod,a,o));let l=Kr(this.mod,a,o);return be(this.mod),l}insertArrowFromIPCStream(e,t,r){if(t.length==0)return;let n=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(n,n+t.length).set(t);let a=r?JSON.stringify(r):"",[o,l,u]=fe(this.mod,"duckdb_web_insert_arrow_from_ipc_stream",["number","number","number","string"],[e,n,t.length,a]);if(o!==0)throw new Error(te(this.mod,l,u))}insertCSVFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let _ in r.columns)r.columnsFlat.push(oa(_,r.columns[_]))}let n={...r};n.columns=n.columnsFlat,delete n.columnsFlat;let a=JSON.stringify(n),[o,l,u]=fe(this.mod,"duckdb_web_insert_csv_from_path",["number","string","string"],[e,t,a]);if(o!==0)throw new Error(te(this.mod,l,u))}insertJSONFromPath(e,t,r){if(r.columns!==void 0){r.columnsFlat=[];for(let _ in r.columns)r.columnsFlat.push(oa(_,r.columns[_]))}let n={...r};n.columns=n.columnsFlat,delete n.columnsFlat;let a=JSON.stringify(n),[o,l,u]=fe(this.mod,"duckdb_web_insert_json_from_path",["number","string","string"],[e,t,a]);if(o!==0)throw new Error(te(this.mod,l,u))}globFiles(e){let[t,r,n]=fe(this.mod,"duckdb_web_fs_glob_file_infos",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));let a=te(this.mod,r,n);be(this.mod);let o=JSON.parse(a);return o??[]}registerFileURL(e,t,r,n=!1){t===void 0&&(t=e);let[a,o,l]=fe(this.mod,"duckdb_web_fs_register_file_url",["string","string"],[e,t,r,n]);if(a!==0)throw new Error(te(this.mod,o,l));be(this.mod)}registerFileText(e,t){let r=Il.encode(t);this.registerFileBuffer(e,r)}registerFileBuffer(e,t){let r=this.mod._malloc(t.length);this.mod.HEAPU8.subarray(r,r+t.length).set(t);let[n,a,o]=fe(this.mod,"duckdb_web_fs_register_file_buffer",["string","number","number"],[e,r,t.length]);if(n!==0)throw new Error(te(this.mod,a,o));be(this.mod)}registerFileHandle(e,t,r,n){let[a,o,l]=fe(this.mod,"duckdb_web_fs_register_file_url",["string","string","number","boolean"],[e,e,r,n]);if(a!==0)throw new Error(te(this.mod,o,l));if(be(this.mod),globalThis.DUCKDB_RUNTIME._files=(globalThis.DUCKDB_RUNTIME._files||new Map).set(e,t),this.pthread){for(let u of this.pthread.runningWorkers)u.postMessage({cmd:"registerFileHandle",fileName:e,fileHandle:t});for(let u of this.pthread.unusedWorkers)u.postMessage({cmd:"dropFileHandle",fileName:e})}}dropFile(e){let[t,r,n]=fe(this.mod,"duckdb_web_fs_drop_file",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));be(this.mod)}dropFiles(){let[e,t,r]=fe(this.mod,"duckdb_web_fs_drop_files",[],[]);if(e!==0)throw new Error(te(this.mod,t,r));be(this.mod)}flushFiles(){this.mod.ccall("duckdb_web_flush_files",null,[],[])}copyFileToPath(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_copy_file_to_path",["string","string"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a));be(this.mod)}copyFileToBuffer(e){let[t,r,n]=fe(this.mod,"duckdb_web_copy_file_to_buffer",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));let a=this.mod.HEAPU8.subarray(r,r+n),o=new Uint8Array(a.length);return o.set(a),be(this.mod),o}collectFileStatistics(e,t){let[r,n,a]=fe(this.mod,"duckdb_web_collect_file_stats",["string","boolean"],[e,t]);if(r!==0)throw new Error(te(this.mod,n,a))}exportFileStatistics(e){let[t,r,n]=fe(this.mod,"duckdb_web_export_file_stats",["string"],[e]);if(t!==0)throw new Error(te(this.mod,r,n));return new da(this.mod.HEAPU8.subarray(r,r+n))}},pa=class extends fa{constructor(e,t,r,n){super(e,t),this.mainModuleURL=r,this.pthreadWorkerURL=n}locateFile(e,t){if(e.endsWith(".wasm"))return this.mainModuleURL;if(e.endsWith(".worker.js")){if(!this.pthreadWorkerURL)throw new Error("Missing DuckDB worker URL!");return this.pthreadWorkerURL}throw new Error("WASM instantiation requested unexpected file: prefix=".concat(t," path=").concat(e))}instantiateWasm(e,t){globalThis.DUCKDB_RUNTIME=this._runtime;let r=this.onInstantiationProgress;if(WebAssembly.instantiateStreaming)if(typeof TransformStream=="function"){let n=(async()=>{var a;let o=new Request(this.mainModuleURL),l=await fetch(o),u=l.headers.get("content-length"),_=u&&parseInt(u,10)||0,d=new Date,p={startedAt:d,updatedAt:d,bytesTotal:_||0,bytesLoaded:0},f={transform(h,g){p.bytesLoaded+=h.byteLength;let b=new Date;if(b.getTime()-p.updatedAt.getTime()<20){p.updatedAt=b,g.enqueue(h);return}for(let v of r)v(p);g.enqueue(h)}},m=new TransformStream(f);return new Response((a=l.body)==null?void 0:a.pipeThrough(m),l)})();WebAssembly.instantiateStreaming(n,e).then(a=>{t(a.instance,a.module)})}else{console.warn("instantiating without progress handler since transform streams are unavailable");let n=new Request(this.mainModuleURL);WebAssembly.instantiateStreaming(fetch(n),e).then(a=>{t(a.instance,a.module)})}else if(typeof XMLHttpRequest=="function"){let n=new XMLHttpRequest,a=this.mainModuleURL,o=new Date,l={startedAt:o,updatedAt:o,bytesTotal:0,bytesLoaded:0};n.open("GET",a),n.responseType="arraybuffer",n.onerror=u=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to load WASM: "+u}),new Error(u.toString())},n.onprogress=u=>{l.bytesTotal=u.total,l.bytesLoaded=u.loaded;let _=new Date;if(_.getTime()-l.updatedAt.getTime()<20){l.updatedAt=_;return}for(let d of r)d(l)},n.onload=()=>{WebAssembly.instantiate(n.response,e).then(u=>{t(u.instance,u.module)}).catch(u=>{throw this.logger.log({timestamp:new Date,level:4,origin:3,topic:5,event:2,value:"Failed to instantiate WASM: "+u}),new Error(u)})},n.send()}else console.warn("instantiating with manual fetch since streaming instantiation and xhrs are unavailable"),(async()=>{let n=new Request(this.mainModuleURL),a=await(await fetch(n)).arrayBuffer();WebAssembly.instantiate(a,e).then(o=>{t(o.instance,o.module)})})();return[]}},ma=class extends pa{constructor(e,t,r,n=null){super(e,t,r,n)}instantiateImpl(e){return(0,Bl.default)({...e,instantiateWasm:this.instantiateWasm.bind(this),locateFile:this.locateFile.bind(this)})}},xr=Po(Ul()),jl=function(e,t,r){var n;if((n=e==null?void 0:e.endpoint)!=null&&n.startsWith("http")){let a="".concat(e==null?void 0:e.endpoint),o=a.indexOf("://")+3;return a.substring(o)}else return e!=null&&e.endpoint?"".concat(r,".").concat(e==null?void 0:e.endpoint):"".concat(r,".s3.amazonaws.com")};function vd(e,t,r){var n,a,o,l;let u=Ol(t),_=u.path;return Hl(e)&&(_="/".concat(u.bucket).concat(_)),{url:_,query:"",host:jl(e,t,u.bucket),region:(n=e==null?void 0:e.region)!=null?n:"",service:"s3",method:r,accessKeyId:(a=e==null?void 0:e.accessKeyId)!=null?a:"",secretAccessKey:(o=e==null?void 0:e.secretAccessKey)!=null?o:"",sessionToken:(l=e==null?void 0:e.sessionToken)!=null?l:"",dateNow:new Date().toISOString().replace(/-/g,"").split("T")[0],datetimeNow:new Date().toISOString().replace(/-/g,"").replace(/:/g,"").split(".")[0]+"Z"}}function yd(e,t=!1){let r="0123456789ABCDEF",n="";for(let a=0;a="A"&&o<="Z"||o>="a"&&o<="z"||o>="0"&&o<="9"||o=="_"||o=="-"||o=="~"||o=="."?n+=o:o=="/"?t?n+="%2F":n+=o:(n+="%",n+=r[o.charCodeAt(0)>>4],n+=r[o.charCodeAt(0)&15])}return n}function bd(e,t=null){var r;let n=(r=t==null?void 0:t.contentHash)!=null?r:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",a=new Map;a.set("x-amz-date",e.datetimeNow),a.set("x-amz-content-sha256",n),e.sessionToken&&a.set("x-amz-security-token",e.sessionToken);let o="";t!=null&&t.contentType&&(o+="content-type;"),o+="host;x-amz-content-sha256;x-amz-date",e.sessionToken&&(o+=";x-amz-security-token");let l=e.method+` +`+yd(e.url)+` +`+e.query;t!=null&&t.contentType&&(l+=` +content-type:`+(t==null?void 0:t.contentType)),l+=` +host:`+e.host+` +x-amz-content-sha256:`+n+` +x-amz-date:`+e.datetimeNow,e.sessionToken&&e.sessionToken.length>0&&(l+=` +x-amz-security-token:`+e.sessionToken),l+=` + +`+o+` +`+n;let u=(0,xr.sha256)(l),_=`AWS4-HMAC-SHA256 +`+e.datetimeNow+` +`+e.dateNow+"/"+e.region+"/"+e.service+`/aws4_request +`+u,d="AWS4"+e.secretAccessKey,p=xr.sha256.hmac.arrayBuffer(d,e.dateNow),f=xr.sha256.hmac.arrayBuffer(p,e.region),m=xr.sha256.hmac.arrayBuffer(f,e.service),h=xr.sha256.hmac.arrayBuffer(m,"aws4_request"),g=xr.sha256.hmac(h,_);return a.set("Authorization","AWS4-HMAC-SHA256 Credential="+e.accessKeyId+"/"+e.dateNow+"/"+e.region+"/"+e.service+"/aws4_request, SignedHeaders="+o+", Signature="+g),a}var Sd=function(e,t,r,n=null,a=null){let o=vd(e,t,r),l={contentType:n,contentHash:a?xr.sha256.hex(a):null};return bd(o,l)};function kt(e,t,r,n,a=null,o=null){(t!=null&&t.accessKeyId||t!=null&&t.sessionToken)&&(Sd(t,r,n,a,o).forEach((l,u)=>{e.setRequestHeader(u,l)}),a&&e.setRequestHeader("content-type",a))}function Ol(e){if(e.indexOf("s3://")!=0)throw new Error("URL needs to start with s3://");let t=e.indexOf("/",5);if(t==-1)throw new Error("URL needs to contain a '/' after the host");let r=e.substring(5,t);if(!r)throw new Error("URL needs to contain a bucket name");let n=e.substring(t);if(!n)throw new Error("URL needs to contain key");return{bucket:r,path:n}}function Hl(e){var t;return!!((t=e==null?void 0:e.endpoint)!=null&&t.startsWith("http"))}function Tt(e,t){let r=Ol(t);return Hl(e)?"".concat(e==null?void 0:e.endpoint,"/").concat(r.bucket)+r.path:"https://"+jl(e,t,r.bucket)+r.path}var ce={_files:new Map,_fileInfoCache:new Map,_udfFunctions:new Map,_globalFileInfo:null,getFileInfo(e,t){try{let r=ce._fileInfoCache.get(t),[n,a,o]=fe(e,"duckdb_web_fs_get_file_info_by_id",["number","number"],[t,(r==null?void 0:r.cacheEpoch)||0]);if(n!==0)return null;if(o===0)return r;let l=te(e,a,o);be(e);try{let u=JSON.parse(l);if(u==null)return null;let _={...u,blob:null};return ce._fileInfoCache.set(t,_),_}catch(u){return console.warn(u),null}}catch(r){return console.log(r),null}},getGlobalFileInfo(e){var t;try{let[r,n,a]=fe(e,"duckdb_web_get_global_file_info",["number"],[((t=ce._globalFileInfo)==null?void 0:t.cacheEpoch)||0]);if(r!==0)return null;if(a===0)return ce._globalFileInfo;let o=te(e,n,a);be(e);let l=JSON.parse(o);return l==null?null:(ce._globalFileInfo={...l,blob:null},ce._globalFileInfo)}catch(r){return console.log(r),null}},testPlatformFeature:(e,t)=>{switch(t){case 1:return typeof BigInt64Array<"u";default:return console.warn("test for unknown feature: ".concat(t)),!1}},getDefaultDataProtocol(e){return 2},openFile:(e,t,r)=>{var n,a;try{ce._fileInfoCache.delete(t);let o=ce.getFileInfo(e,t);switch(o==null?void 0:o.dataProtocol){case 4:case 5:{if(r&1&&r&2)throw new Error("Opening file ".concat(o.fileName," failed: cannot open file with both read and write flags set"));if(r&32)throw new Error("Opening file ".concat(o.fileName," failed: appending to HTTP/S3 files is not supported"));if(r&2){let _=new XMLHttpRequest;if(o.dataProtocol==5?(_.open("HEAD",Tt(o.s3Config,o.dataUrl),!1),kt(_,o.s3Config,o.dataUrl,"HEAD")):_.open("HEAD",o.dataUrl,!1),_.send(null),_.status!=200&&_.status!=404)throw new Error("Opening file ".concat(o.fileName," failed: Unexpected return status from server (").concat(_.status,")"));if(_.status==404&&!(r&8||r&16))throw new Error("Opening file ".concat(o.fileName," failed: Cannot write to non-existent file without FILE_FLAGS_FILE_CREATE or FILE_FLAGS_FILE_CREATE_NEW flag."));let d=e._malloc(1),p=new Uint8Array;e.HEAPU8.set(p,d);let f=e._malloc(2*8);return e.HEAPF64[(f>>3)+0]=1,e.HEAPF64[(f>>3)+1]=d,f}else if(!(r&1))throw new Error("Opening file ".concat(o.fileName," failed: unsupported file flags: ").concat(r));let l=null,u=null;if(o.reliableHeadRequests||!o.allowFullHttpReads)try{let _=new XMLHttpRequest;if(o.dataProtocol==5?(_.open("HEAD",Tt(o.s3Config,o.dataUrl),!1),kt(_,o.s3Config,o.dataUrl,"HEAD")):_.open("HEAD",o.dataUrl,!1),_.setRequestHeader("Range","bytes=0-"),_.send(null),l=_.getResponseHeader("Content-Length"),l!==null&&_.status==206){let d=e._malloc(16);return e.HEAPF64[(d>>3)+0]=+l,e.HEAPF64[(d>>3)+1]=0,d}}catch(_){u=_,console.warn("HEAD request with range header failed: ".concat(_))}if(o.allowFullHttpReads){{let d=new XMLHttpRequest;o.dataProtocol==5?(d.open("GET",Tt(o.s3Config,o.dataUrl),!1),kt(d,o.s3Config,o.dataUrl,"GET")):d.open("GET",o.dataUrl,!1),d.responseType="arraybuffer",d.setRequestHeader("Range","bytes=0-0"),d.send(null);let p=(n=d.getResponseHeader("Content-Range"))==null?void 0:n.split("/")[1],f=d.getResponseHeader("Content-Length"),m=null;if(p!==void 0)m=p;else if(!o.reliableHeadRequests){let h=new XMLHttpRequest;o.dataProtocol==5?(h.open("HEAD",Tt(o.s3Config,o.dataUrl),!1),kt(h,o.s3Config,o.dataUrl,"HEAD")):h.open("HEAD",o.dataUrl,!1),h.setRequestHeader("Range","bytes=0-"),h.send(null),l=h.getResponseHeader("Content-Length"),l!==null&&+l>1&&(m=l)}if(d.status==206&&f!==null&&+f==1&&m!==null){let h=e._malloc(16);return e.HEAPF64[(h>>3)+0]=+m,e.HEAPF64[(h>>3)+1]=0,h}if(d.status==200&&f!==null&&l!==null&&+f==+l){console.warn("fall back to full HTTP read for: ".concat(o.dataUrl));let h=e._malloc(d.response.byteLength),g=new Uint8Array(d.response,0,d.response.byteLength);e.HEAPU8.set(g,h);let b=e._malloc(2*8);return e.HEAPF64[(b>>3)+0]=d.response.byteLength,e.HEAPF64[(b>>3)+1]=h,b}}console.warn("falling back to full HTTP read for: ".concat(o.dataUrl));let _=new XMLHttpRequest;if(o.dataProtocol==5?(_.open("GET",Tt(o.s3Config,o.dataUrl),!1),kt(_,o.s3Config,o.dataUrl,"GET")):_.open("GET",o.dataUrl,!1),_.responseType="arraybuffer",_.send(null),_.status==200){let d=e._malloc(_.response.byteLength),p=new Uint8Array(_.response,0,_.response.byteLength);e.HEAPU8.set(p,d);let f=e._malloc(2*8);return e.HEAPF64[(f>>3)+0]=_.response.byteLength,e.HEAPF64[(f>>3)+1]=d,f}}if(u!=null)throw new Error("Reading file ".concat(o.fileName," failed with error: ").concat(u));return 0}case 2:{let l=(a=ce._files)==null?void 0:a.get(o.fileName);if(l){let d=e._malloc(16);return e.HEAPF64[(d>>3)+0]=l.size,e.HEAPF64[(d>>3)+1]=0,d}console.warn("Buffering missing file: ".concat(o.fileName));let u=e._malloc(2*8),_=e._malloc(1);return e.HEAPF64[(u>>3)+0]=1,e.HEAPF64[(u>>3)+1]=_,u}}}catch(o){console.error(o.toString()),lt(e,o.toString())}return 0},glob:(e,t,r)=>{var n;try{let a=te(e,t,r);if(a.startsWith("http")||a.startsWith("s3://")){let o=new XMLHttpRequest;if(a.startsWith("s3://")){let l=ce.getGlobalFileInfo(e);o.open("HEAD",Tt(l==null?void 0:l.s3Config,a),!1),kt(o,l==null?void 0:l.s3Config,a,"HEAD")}else o.open("HEAD",a,!1);if(o.send(null),o.status!=200&&o.status!==206){if(!((n=ce.getGlobalFileInfo(e))!=null&&n.allowFullHttpReads))return lt(e,"HEAD request failed: ".concat(a,", with full http reads are disabled")),0;let l=new XMLHttpRequest;if(a.startsWith("s3://")){let _=ce.getGlobalFileInfo(e);l.open("GET",Tt(_==null?void 0:_.s3Config,a),!1),kt(l,_==null?void 0:_.s3Config,a,"HEAD")}else l.open("GET",a,!1);if(l.setRequestHeader("Range","bytes=0-0"),l.send(null),l.status!=200&&l.status!==206)return lt(e,"HEAD and GET requests failed: ".concat(a)),0;let u=l.getResponseHeader("Content-Length");u&&+u>1&&console.warn("Range request for ".concat(a," did not return a partial response: ").concat(l.status,' "').concat(l.statusText,'"'))}e.ccall("duckdb_web_fs_glob_add_path",null,["string"],[a])}}catch(a){return console.log(a),lt(e,a.toString()),0}},checkFile:(e,t,r)=>{try{let n=te(e,t,r);if(n.startsWith("http")||n.startsWith("s3://")){let a=new XMLHttpRequest;if(n.startsWith("s3://")){let o=ce.getGlobalFileInfo(e);a.open("HEAD",Tt(o==null?void 0:o.s3Config,n),!1),kt(a,o==null?void 0:o.s3Config,n,"HEAD")}else a.open("HEAD",n,!1);return a.send(null),a.status==206||a.status==200}}catch(n){return console.log(n),!1}return!1},syncFile:(e,t)=>{},closeFile:(e,t)=>{var r;let n=ce.getFileInfo(e,t);switch(ce._fileInfoCache.delete(t),n==null?void 0:n.dataProtocol){case 0:case 4:case 5:break;case 1:case 2:return;case 3:{let a=(r=ce._files)==null?void 0:r.get(n.fileName);if(!a)throw new Error("No OPFS access handle registered with name: ".concat(n.fileName));return a.flush()}}},truncateFile:(e,t,r)=>{var n;let a=ce.getFileInfo(e,t);switch(a==null?void 0:a.dataProtocol){case 4:lt(e,"Cannot truncate a http file");return;case 5:lt(e,"Cannot truncate an s3 file");return;case 0:case 1:case 2:lt(e,"truncateFile not implemented");return;case 3:{let o=(n=ce._files)==null?void 0:n.get(a.fileName);if(!o)throw new Error("No OPFS access handle registered with name: ".concat(a.fileName));return o.truncate(r)}}return 0},readFile(e,t,r,n,a){var o,l;if(n==0)return 0;try{let u=ce.getFileInfo(e,t);switch(u==null?void 0:u.dataProtocol){case 4:case 5:{if(!u.dataUrl)throw new Error("Missing data URL for file ".concat(t));try{let _=new XMLHttpRequest;if(u.dataProtocol==5?(_.open("GET",Tt(u==null?void 0:u.s3Config,u.dataUrl),!1),kt(_,u==null?void 0:u.s3Config,u.dataUrl,"GET")):_.open("GET",u.dataUrl,!1),_.responseType="arraybuffer",_.setRequestHeader("Range","bytes=".concat(a,"-").concat(a+n-1)),_.send(null),_.status==206||_.status==200&&n==_.response.byteLength&&a==0){let d=new Uint8Array(_.response,0,Math.min(_.response.byteLength,n));return e.HEAPU8.set(d,r),d.byteLength}else if(_.status==200){console.warn("Range request for ".concat(u.dataUrl," did not return a partial response: ").concat(_.status,' "').concat(_.statusText,'"'));let d=new Uint8Array(_.response,a,Math.min(_.response.byteLength-a,n));return e.HEAPU8.set(d,r),d.byteLength}else throw new Error("Range request for ".concat(u.dataUrl," did returned non-success status: ").concat(_.status,' "').concat(_.statusText,'"'))}catch(_){throw console.log(_),new Error("Range request for ".concat(u.dataUrl," failed with error: ").concat(_,'"'))}}case 2:{let _=(o=ce._files)==null?void 0:o.get(u.fileName);if(!_)throw new Error("No HTML5 file registered with name: ".concat(u.fileName));let d=_.slice(a,a+n),p=new Uint8Array(new FileReaderSync().readAsArrayBuffer(d));return e.HEAPU8.set(p,r),p.byteLength}case 3:{let _=(l=ce._files)==null?void 0:l.get(u.fileName);if(!_)throw new Error("No OPFS access handle registered with name: ".concat(u.fileName));let d=e.HEAPU8.subarray(r,r+n);return _.read(d,{at:a})}}return 0}catch(u){return console.log(u),lt(e,u.toString()),0}},writeFile:(e,t,r,n,a)=>{var o;let l=ce.getFileInfo(e,t);switch(l==null?void 0:l.dataProtocol){case 4:return lt(e,"Cannot write to HTTP file"),0;case 5:{let u=e.HEAPU8.subarray(r,r+n),_=new XMLHttpRequest;return _.open("PUT",Tt(l==null?void 0:l.s3Config,l.dataUrl),!1),kt(_,l==null?void 0:l.s3Config,l.dataUrl,"PUT","",u),_.send(u),_.status!==200?(lt(e,"Failed writing file: HTTP "+_.status),0):n}case 2:return lt(e,"cannot write using the html5 file reader api"),0;case 3:{let u=(o=ce._files)==null?void 0:o.get(l.fileName);if(!u)throw new Error("No OPFS access handle registered with name: ".concat(l.fileName));let _=e.HEAPU8.subarray(r,r+n);return u.write(_,{at:a})}}return 0},getLastFileModificationTime:(e,t)=>{var r;let n=ce.getFileInfo(e,t);switch(n==null?void 0:n.dataProtocol){case 2:{if(!((r=ce._files)!=null&&r.get(n.fileName)))throw Error("No handle available for file: ".concat(n.fileName));return 0}case 4:case 5:return new Date().getTime()}return 0},checkDirectory:(e,t,r)=>{let n=te(e,t,r);return console.log("checkDirectory: ".concat(n)),!1},createDirectory:(e,t,r)=>{let n=te(e,t,r);console.log("createDirectory: ".concat(n))},removeDirectory:(e,t,r)=>{let n=te(e,t,r);console.log("removeDirectory: ".concat(n))},listDirectoryEntries:(e,t,r)=>{let n=te(e,t,r);return console.log("listDirectoryEntries: ".concat(n)),!1},moveFile:(e,t,r,n,a)=>{var o,l;let u=te(e,t,r),_=te(e,n,a),d=(o=ce._files)==null?void 0:o.get(u);d!==void 0&&(ce._files.delete(d),ce._files.set(_,d));for(let[p,f]of((l=ce._fileInfoCache)==null?void 0:l.entries())||[])if(f.dataUrl==u){ce._fileInfoCache.delete(p);break}return!0},removeFile:(e,t,r)=>{},callScalarUDF:(e,t,r,n,a,o,l)=>{Pl(ce,e,t,r,n,a,o,l)}},ko=class extends ca{postMessage(e,t){globalThis.postMessage(e,t)}async instantiate(e,t,r){return await new ma(this,ce,e,t).instantiate(r)}};function Nl(){let e=new ko;globalThis.onmessage=async t=>{await e.onMessage(t.data)}}return Nl(),Xl(wd)})()})(); diff --git a/_app/version.json b/_app/version.json index dbb9e252aa06d8bf57a5d3de473f38c4bd658a6a..1071a9800c872194ea1dd05af36045418427c45e 100644 --- a/_app/version.json +++ b/_app/version.json @@ -1 +1 @@ -{"version":"1733950131561"} \ No newline at end of file +{"version":"1734537012847"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/0011189de7016cf57b53729b0ea1fbf7/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/0011189de7016cf57b53729b0ea1fbf7/all-queries.json index 09613370dc368166d3b6e7adb0e81caf54a0adb7..507b1e1d1732f1827b351d295c05aaa53d674620 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/0011189de7016cf57b53729b0ea1fbf7/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/0011189de7016cf57b53729b0ea1fbf7/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"b40f637c4558906057724f4544a01fa8","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"f2d945ff02dcfdab3c06b33bc1a2b2b7","fares_by_pickup_location_data":"3b971f17d9961069d0124ac02cbc7c7c"} \ No newline at end of file +{"date_range_columns":"f7bdad478ae33930eabc8a291b3d5f9b","date_range_length":"0366946b753f3585e20c83b79735742f","date_range_data":"d426e7eaac5a7a29edc105487c3085c0","DateRange-date_range_columns":"a92360c9f6b17f86ccb9f4774261a600","DateRange-date_range_length":"8f05d21742286e7429ef1ec4d695c73c","DateRange-date_range_data":"bb0ef251b0d0d12b3fe0e4cbc5f259bf","aggregate_stats_columns":"2c6cc491f37e13b7dfd157596ca268ea","aggregate_stats_length":"8f05d21742286e7429ef1ec4d695c73c","aggregate_stats_data":"935b63e8c98281a18288f74ca50d93ed","fares_by_pickup_location_columns":"e11173160ec05058c1315e784c0e2015","fares_by_pickup_location_length":"7150ce17df9d7d3aa7c2d18ad9319253","fares_by_pickup_location_data":"b6fcf485f5d9ad9f52ae954d8540f24b"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/352e3847f7de0b8eefc772140ff3542b/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/352e3847f7de0b8eefc772140ff3542b/all-queries.json index 60d066c2ae86d00505d7f98b09cf15649854569c..6cf43fb88b0b0f58eec4025a28375f457cab9005 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/352e3847f7de0b8eefc772140ff3542b/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/352e3847f7de0b8eefc772140ff3542b/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"d37e4f43c8888db3946520160c06f838","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"e3908548cc2bc736bcf93c803bd2c41a","fares_by_pickup_location_data":"4c503ca9cff53d1f55d94005cd109677"} \ No newline at end of file +{"date_range_columns":"f7bdad478ae33930eabc8a291b3d5f9b","date_range_length":"0366946b753f3585e20c83b79735742f","date_range_data":"d426e7eaac5a7a29edc105487c3085c0","DateRange-date_range_columns":"a92360c9f6b17f86ccb9f4774261a600","DateRange-date_range_length":"8f05d21742286e7429ef1ec4d695c73c","DateRange-date_range_data":"bb0ef251b0d0d12b3fe0e4cbc5f259bf","aggregate_stats_columns":"2c6cc491f37e13b7dfd157596ca268ea","aggregate_stats_length":"8f05d21742286e7429ef1ec4d695c73c","aggregate_stats_data":"df641b4ec452e6a2bf6c4aac60af7060","fares_by_pickup_location_columns":"e11173160ec05058c1315e784c0e2015","fares_by_pickup_location_length":"8f05d21742286e7429ef1ec4d695c73c","fares_by_pickup_location_data":"af40b3f9b30bb5c0185801f90f72af33"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/46162ca608616836bd81cf680ada81eb/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/46162ca608616836bd81cf680ada81eb/all-queries.json index e7036f0916c8897aa43a4dc4b59cb2ac631d97e3..dfd4c198767e729039df8f2ec74bbcb708ca998d 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/46162ca608616836bd81cf680ada81eb/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/46162ca608616836bd81cf680ada81eb/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"988b73fcc8fb1139fe897699ca754204","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"7fe880bf15a93b8bae4f183f20cfd278","fares_by_pickup_location_data":"1fcc01aa0762458f8dfaf4040df18491"} \ No newline at end of file +{"date_range_columns":"f7bdad478ae33930eabc8a291b3d5f9b","date_range_length":"0366946b753f3585e20c83b79735742f","date_range_data":"d426e7eaac5a7a29edc105487c3085c0","DateRange-date_range_columns":"a92360c9f6b17f86ccb9f4774261a600","DateRange-date_range_length":"8f05d21742286e7429ef1ec4d695c73c","DateRange-date_range_data":"bb0ef251b0d0d12b3fe0e4cbc5f259bf","aggregate_stats_columns":"2c6cc491f37e13b7dfd157596ca268ea","aggregate_stats_length":"8f05d21742286e7429ef1ec4d695c73c","aggregate_stats_data":"1c8b306071174abede7cbf92c94f01dd","fares_by_pickup_location_columns":"e11173160ec05058c1315e784c0e2015","fares_by_pickup_location_length":"b855249a39309369998e6529433365a8","fares_by_pickup_location_data":"f2c54028e11fcf860d82697e3eff74ba"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/cd3f4b14f1b959ee4e040fcd2a3c8e67/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/cd3f4b14f1b959ee4e040fcd2a3c8e67/all-queries.json index d4facdcdbbd7f2a24cc2ecda0186e79246c5a982..ac9353c610af1c58abc21aef74c40439ed303c87 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/cd3f4b14f1b959ee4e040fcd2a3c8e67/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/cd3f4b14f1b959ee4e040fcd2a3c8e67/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"a2a66abf7f9cf00a0b180233784d1d68","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"c8c9d62d2589778940803b887bcc59d0","fares_by_pickup_location_data":"1eb40411e84c7124e6cf854646423c27"} \ No newline at end of file +{"date_range_columns":"f7bdad478ae33930eabc8a291b3d5f9b","date_range_length":"0366946b753f3585e20c83b79735742f","date_range_data":"d426e7eaac5a7a29edc105487c3085c0","DateRange-date_range_columns":"a92360c9f6b17f86ccb9f4774261a600","DateRange-date_range_length":"8f05d21742286e7429ef1ec4d695c73c","DateRange-date_range_data":"bb0ef251b0d0d12b3fe0e4cbc5f259bf","aggregate_stats_columns":"2c6cc491f37e13b7dfd157596ca268ea","aggregate_stats_length":"8f05d21742286e7429ef1ec4d695c73c","aggregate_stats_data":"8372071974fde4692f318b0dce467f10","fares_by_pickup_location_columns":"e11173160ec05058c1315e784c0e2015","fares_by_pickup_location_length":"4bbc83358057604f2f99a16d0bbd0866","fares_by_pickup_location_data":"4bfe33abcb8d66a7218b7a9d921c9de0"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/d07e56a477cd71bf36ecce2af6c517c3/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/d07e56a477cd71bf36ecce2af6c517c3/all-queries.json index 6e93fc0d40125a491b42dd449c31c4550c18f50d..4b63d156a3009ccc9423bfc52a1ab1aebed9a8a8 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/d07e56a477cd71bf36ecce2af6c517c3/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/d07e56a477cd71bf36ecce2af6c517c3/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"d97cd91fc8787fa580a76b443f9eb84e","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"79e2ecfc7f1033328692475b8592d706","fares_by_pickup_location_data":"2121aac8a9e34684f539813908eb5d65"} \ No newline at end of file +{"date_range_columns":"f7bdad478ae33930eabc8a291b3d5f9b","date_range_length":"0366946b753f3585e20c83b79735742f","date_range_data":"d426e7eaac5a7a29edc105487c3085c0","DateRange-date_range_columns":"a92360c9f6b17f86ccb9f4774261a600","DateRange-date_range_length":"8f05d21742286e7429ef1ec4d695c73c","DateRange-date_range_data":"bb0ef251b0d0d12b3fe0e4cbc5f259bf","aggregate_stats_columns":"2c6cc491f37e13b7dfd157596ca268ea","aggregate_stats_length":"8f05d21742286e7429ef1ec4d695c73c","aggregate_stats_data":"d6984cb2bfeea60d62d2c10778cfa0d0","fares_by_pickup_location_columns":"e11173160ec05058c1315e784c0e2015","fares_by_pickup_location_length":"03b26fcc212427bcbda59649ab60f050","fares_by_pickup_location_data":"e0be5fad79462a29cd273ad6579070fc"} \ No newline at end of file diff --git a/api/4e049e3b2a8bb91efd330a1ee52e17df/f0651133fe873ff649c5000577832cea/all-queries.json b/api/4e049e3b2a8bb91efd330a1ee52e17df/f0651133fe873ff649c5000577832cea/all-queries.json index b1d38f95213476125e37fa9520b798cae526e9c0..58196ba7b26689a29770676f261ada71feaa61af 100644 --- a/api/4e049e3b2a8bb91efd330a1ee52e17df/f0651133fe873ff649c5000577832cea/all-queries.json +++ b/api/4e049e3b2a8bb91efd330a1ee52e17df/f0651133fe873ff649c5000577832cea/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"21282200b8cff329bd8caad0c52dd0fb","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"50027c71871ec549d2ac65e37094d22e","fares_by_pickup_location_data":"6c4dad7dc6e61ed60b816f4f3c159f54"} \ No newline at end of file +{"date_range_columns":"f7bdad478ae33930eabc8a291b3d5f9b","date_range_length":"0366946b753f3585e20c83b79735742f","date_range_data":"d426e7eaac5a7a29edc105487c3085c0","DateRange-date_range_columns":"a92360c9f6b17f86ccb9f4774261a600","DateRange-date_range_length":"8f05d21742286e7429ef1ec4d695c73c","DateRange-date_range_data":"bb0ef251b0d0d12b3fe0e4cbc5f259bf","aggregate_stats_columns":"2c6cc491f37e13b7dfd157596ca268ea","aggregate_stats_length":"8f05d21742286e7429ef1ec4d695c73c","aggregate_stats_data":"d1054fee9fe3a8d10b64e86a95f3e0a4","fares_by_pickup_location_columns":"e11173160ec05058c1315e784c0e2015","fares_by_pickup_location_length":"3d7ae2ea44f32aea6ca454272f88a826","fares_by_pickup_location_data":"e0486830bbb7ec1b09e43235808b72c4"} \ No newline at end of file diff --git a/api/6666cd76f96956469e7be39d750cc7d9/d41d8cd98f00b204e9800998ecf8427e/all-queries.json b/api/6666cd76f96956469e7be39d750cc7d9/d41d8cd98f00b204e9800998ecf8427e/all-queries.json index ad3c99906cd98017bad1740fc7b9367a123ab216..b4fe9edf241b5260013daf75bb15e4ceff3a0c7d 100644 --- a/api/6666cd76f96956469e7be39d750cc7d9/d41d8cd98f00b204e9800998ecf8427e/all-queries.json +++ b/api/6666cd76f96956469e7be39d750cc7d9/d41d8cd98f00b204e9800998ecf8427e/all-queries.json @@ -1 +1 @@ -{"date_range_columns":"aa07f3d3486a789e7418e3d859791987","date_range_length":"37b2f0f112a2b0031997f9aba8922f2f","date_range_data":"d08ab5b543346cc532f53725b8c5a51c","DateRange-date_range_columns":"9bc2a27f28fce6a49dc70b20b34a5382","DateRange-date_range_length":"e3908548cc2bc736bcf93c803bd2c41a","DateRange-date_range_data":"c9201e879d8c8d6f161ecb4055159d6e","aggregate_stats_columns":"03f3b0c2900e064a82e42eac08f8e5b1","aggregate_stats_length":"e3908548cc2bc736bcf93c803bd2c41a","aggregate_stats_data":"c0f2aa584943b9a5ff311220f92de0c9","fares_by_day_columns":"dd4f2b997eb7ab01a0d40a96741ba4f0","fares_by_day_length":"37b2f0f112a2b0031997f9aba8922f2f","fares_by_day_data":"19c9f4f25977587e480c3ff8bae925dd","fares_by_pickup_location_columns":"01e961a532cda8f1c4ecdbdcd9822a2b","fares_by_pickup_location_length":"b030f26c553a8559cfe61bef934c22d6","fares_by_pickup_location_data":"3b946f67842652892d8fd212bc0d0039","fares_by_pickup_borough_columns":"1a756d542046c968c275b844b04bba01","fares_by_pickup_borough_length":"d6057bb060d5dc6b39a83ba03ee572a5","fares_by_pickup_borough_data":"39b8934e87ac6a1c4ee81eeab88d6ec0"} \ No newline at end of file +{"date_range_columns":"f7bdad478ae33930eabc8a291b3d5f9b","date_range_length":"0366946b753f3585e20c83b79735742f","date_range_data":"d426e7eaac5a7a29edc105487c3085c0","DateRange-date_range_columns":"a92360c9f6b17f86ccb9f4774261a600","DateRange-date_range_length":"8f05d21742286e7429ef1ec4d695c73c","DateRange-date_range_data":"bb0ef251b0d0d12b3fe0e4cbc5f259bf","aggregate_stats_columns":"2c6cc491f37e13b7dfd157596ca268ea","aggregate_stats_length":"8f05d21742286e7429ef1ec4d695c73c","aggregate_stats_data":"2066398554ffe112bbfc7a6f954efb3c","fares_by_day_columns":"a19b057c53e3389d94b31c199958121b","fares_by_day_length":"0366946b753f3585e20c83b79735742f","fares_by_day_data":"575b47bb40b5b49f5edd168f6e200e19","fares_by_pickup_location_columns":"e11173160ec05058c1315e784c0e2015","fares_by_pickup_location_length":"0b6ce89094955a3f20928fad2e773cfa","fares_by_pickup_location_data":"273fa7b5d068e207c48f2945d02c2bbd","fares_by_pickup_borough_columns":"bb71defb990717ef624aa6d85b21fcbd","fares_by_pickup_borough_length":"4db840f5510b779ba5a753dfd81ff19c","fares_by_pickup_borough_data":"610524252adda4b227e3cd7fa56a6916"} \ No newline at end of file diff --git a/api/prerendered_queries/0366946b753f3585e20c83b79735742f.arrow b/api/prerendered_queries/0366946b753f3585e20c83b79735742f.arrow new file mode 100644 index 0000000000000000000000000000000000000000..dad2ff29a4b20a41bf528b75bc6a0e7683277412 --- /dev/null +++ b/api/prerendered_queries/0366946b753f3585e20c83b79735742f.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea902d2f1a40d0346c0e24be65d768cb155b82468b4adaa7b24d6c8c7a4dc047 +size 304 diff --git a/api/prerendered_queries/03b26fcc212427bcbda59649ab60f050.arrow b/api/prerendered_queries/03b26fcc212427bcbda59649ab60f050.arrow new file mode 100644 index 0000000000000000000000000000000000000000..005d05ce12db61274da4407764816e5b2cc1077c --- /dev/null +++ b/api/prerendered_queries/03b26fcc212427bcbda59649ab60f050.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dc237e78c47d92c29044475a0c112458f2041ad63fa23c2276cb01f1a2724d7 +size 304 diff --git a/api/prerendered_queries/0b6ce89094955a3f20928fad2e773cfa.arrow b/api/prerendered_queries/0b6ce89094955a3f20928fad2e773cfa.arrow new file mode 100644 index 0000000000000000000000000000000000000000..4e730fc5fa9fe33cdaa7c0512a11e5229b41a483 --- /dev/null +++ b/api/prerendered_queries/0b6ce89094955a3f20928fad2e773cfa.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31a0939c7689e3a799a256e32d5aec2d7e4d9427256f9c729bdbeb05450c7b6b +size 304 diff --git a/api/prerendered_queries/1c8b306071174abede7cbf92c94f01dd.arrow b/api/prerendered_queries/1c8b306071174abede7cbf92c94f01dd.arrow new file mode 100644 index 0000000000000000000000000000000000000000..3ca9c9a936d48f04253d9b2b9dc8850692648c13 --- /dev/null +++ b/api/prerendered_queries/1c8b306071174abede7cbf92c94f01dd.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34bf2ee58a8b6d0c93ecdb0e7690b770d2ee6b6ca8378ea71b184161f79319fc +size 640 diff --git a/api/prerendered_queries/2066398554ffe112bbfc7a6f954efb3c.arrow b/api/prerendered_queries/2066398554ffe112bbfc7a6f954efb3c.arrow new file mode 100644 index 0000000000000000000000000000000000000000..68f162ae95fde7e6685352b559aef0181eaf9b31 --- /dev/null +++ b/api/prerendered_queries/2066398554ffe112bbfc7a6f954efb3c.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a968021636aae7e4428a3a6f53e4cdfc058dce2eb88273325f739f6d2e845691 +size 640 diff --git a/api/prerendered_queries/273fa7b5d068e207c48f2945d02c2bbd.arrow b/api/prerendered_queries/273fa7b5d068e207c48f2945d02c2bbd.arrow new file mode 100644 index 0000000000000000000000000000000000000000..573c4a8af63307b72e34602ccf6d8518c73f2ac3 --- /dev/null +++ b/api/prerendered_queries/273fa7b5d068e207c48f2945d02c2bbd.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52c753929bf9e80ecbd4fe56c5b2cc4403f547b719941ad63052a99bf9e9e156 +size 17056 diff --git a/api/prerendered_queries/2c6cc491f37e13b7dfd157596ca268ea.arrow b/api/prerendered_queries/2c6cc491f37e13b7dfd157596ca268ea.arrow new file mode 100644 index 0000000000000000000000000000000000000000..fbbedd471b2e9945fc3f5e721db962dcc44f0db4 --- /dev/null +++ b/api/prerendered_queries/2c6cc491f37e13b7dfd157596ca268ea.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:191fbe19e60fb0e0a3c7162201b82fb76e6344e78d45389272ba33e00bcbbe98 +size 1120 diff --git a/api/prerendered_queries/3d7ae2ea44f32aea6ca454272f88a826.arrow b/api/prerendered_queries/3d7ae2ea44f32aea6ca454272f88a826.arrow new file mode 100644 index 0000000000000000000000000000000000000000..1e69eb6807d525710f62d7af5ed78bd0be259e53 --- /dev/null +++ b/api/prerendered_queries/3d7ae2ea44f32aea6ca454272f88a826.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:802500dd141b0960c565e8e76d8d2ff12eeb5ab071d53bb2d8c8ef1312cc419c +size 304 diff --git a/api/prerendered_queries/4bbc83358057604f2f99a16d0bbd0866.arrow b/api/prerendered_queries/4bbc83358057604f2f99a16d0bbd0866.arrow new file mode 100644 index 0000000000000000000000000000000000000000..dfac9599bbc622e875f0d99a0054ec62f2f82711 --- /dev/null +++ b/api/prerendered_queries/4bbc83358057604f2f99a16d0bbd0866.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:094c2594f86eeaee7a8685cdfb6624296feb6a6937b274b80e8c00ac51359aac +size 304 diff --git a/api/prerendered_queries/4bfe33abcb8d66a7218b7a9d921c9de0.arrow b/api/prerendered_queries/4bfe33abcb8d66a7218b7a9d921c9de0.arrow new file mode 100644 index 0000000000000000000000000000000000000000..11b80d09257ddbe000f10671412f497e53ed0989 --- /dev/null +++ b/api/prerendered_queries/4bfe33abcb8d66a7218b7a9d921c9de0.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24268e00b321a6c0e80bfc6512816023ea6ec45728073adc6238178306c38819 +size 4624 diff --git a/api/prerendered_queries/4db840f5510b779ba5a753dfd81ff19c.arrow b/api/prerendered_queries/4db840f5510b779ba5a753dfd81ff19c.arrow new file mode 100644 index 0000000000000000000000000000000000000000..9a1d78d2bb0fb17e97da87be7257d4a60d6e03d1 --- /dev/null +++ b/api/prerendered_queries/4db840f5510b779ba5a753dfd81ff19c.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df7d2ce53ac3c429c1ea3aa33d028b1f8cfbc91e88bce71f37f639251d11dc26 +size 304 diff --git a/api/prerendered_queries/575b47bb40b5b49f5edd168f6e200e19.arrow b/api/prerendered_queries/575b47bb40b5b49f5edd168f6e200e19.arrow new file mode 100644 index 0000000000000000000000000000000000000000..fdafe84ad3a165dd0f6c19bb2ffdf50092d24ab8 --- /dev/null +++ b/api/prerendered_queries/575b47bb40b5b49f5edd168f6e200e19.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6851e6883a33017eb458c79616947b029202cdf9238f480ee930d39da461a4ff +size 14144 diff --git a/api/prerendered_queries/610524252adda4b227e3cd7fa56a6916.arrow b/api/prerendered_queries/610524252adda4b227e3cd7fa56a6916.arrow new file mode 100644 index 0000000000000000000000000000000000000000..718ac59263bfea23c8a0e7bc1518e4535bd43a8a --- /dev/null +++ b/api/prerendered_queries/610524252adda4b227e3cd7fa56a6916.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18e55c94a711781a9a474514c995768ca7cbac6beaf4e64583da690dffd2187a +size 1096 diff --git a/api/prerendered_queries/7150ce17df9d7d3aa7c2d18ad9319253.arrow b/api/prerendered_queries/7150ce17df9d7d3aa7c2d18ad9319253.arrow new file mode 100644 index 0000000000000000000000000000000000000000..639af4e116968c33bd762636874f02cfd9602137 --- /dev/null +++ b/api/prerendered_queries/7150ce17df9d7d3aa7c2d18ad9319253.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bcb96eb9d1c086d56197846f553a743f93ed3bdd89949991fad3904fbf2037d +size 304 diff --git a/api/prerendered_queries/8372071974fde4692f318b0dce467f10.arrow b/api/prerendered_queries/8372071974fde4692f318b0dce467f10.arrow new file mode 100644 index 0000000000000000000000000000000000000000..5c28d1639fe3173a58d5c2268ee81aac5149254f --- /dev/null +++ b/api/prerendered_queries/8372071974fde4692f318b0dce467f10.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f07f1bb9383aa2edfda9a272de020f84768fb1d78943b2512db1b4cd860bd55c +size 640 diff --git a/api/prerendered_queries/8f05d21742286e7429ef1ec4d695c73c.arrow b/api/prerendered_queries/8f05d21742286e7429ef1ec4d695c73c.arrow new file mode 100644 index 0000000000000000000000000000000000000000..046cba64dcafa77af0e07fd4d3266781d5885263 --- /dev/null +++ b/api/prerendered_queries/8f05d21742286e7429ef1ec4d695c73c.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18ef1476982ca67c4f11f2ccdbc8018f7b9941025c995db89eb582e6c1da978d +size 304 diff --git a/api/prerendered_queries/935b63e8c98281a18288f74ca50d93ed.arrow b/api/prerendered_queries/935b63e8c98281a18288f74ca50d93ed.arrow new file mode 100644 index 0000000000000000000000000000000000000000..78c5a26b0f9ecdb2f519cb1d4389a569ff84734c --- /dev/null +++ b/api/prerendered_queries/935b63e8c98281a18288f74ca50d93ed.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45333e84fa2230bd162423db52d0ade074aed6830c4cbb8a74b5895912ad3743 +size 640 diff --git a/api/prerendered_queries/a19b057c53e3389d94b31c199958121b.arrow b/api/prerendered_queries/a19b057c53e3389d94b31c199958121b.arrow new file mode 100644 index 0000000000000000000000000000000000000000..d06ab1c082807d11108d884129941c9c89819c91 --- /dev/null +++ b/api/prerendered_queries/a19b057c53e3389d94b31c199958121b.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e065c686a16c007186ed5aa4d165475371573f51ca9039d8a62e7b833fcc41f +size 1136 diff --git a/api/prerendered_queries/a92360c9f6b17f86ccb9f4774261a600.arrow b/api/prerendered_queries/a92360c9f6b17f86ccb9f4774261a600.arrow new file mode 100644 index 0000000000000000000000000000000000000000..73508e1ce1700c824c79a7bfa42eb57820adbc24 --- /dev/null +++ b/api/prerendered_queries/a92360c9f6b17f86ccb9f4774261a600.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5d5b83a09901e7d9c6b4e956cf2d7ea903c6ffae6cd8834fa6f17a1d103db66 +size 1024 diff --git a/api/prerendered_queries/af40b3f9b30bb5c0185801f90f72af33.arrow b/api/prerendered_queries/af40b3f9b30bb5c0185801f90f72af33.arrow new file mode 100644 index 0000000000000000000000000000000000000000..ceb1d4e3a4d8c8cdb00a268b8db27771563b262a --- /dev/null +++ b/api/prerendered_queries/af40b3f9b30bb5c0185801f90f72af33.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8aef690099e800c660c9076576a8096eab793d622a227ddaf572a88458f7e697 +size 936 diff --git a/api/prerendered_queries/b6fcf485f5d9ad9f52ae954d8540f24b.arrow b/api/prerendered_queries/b6fcf485f5d9ad9f52ae954d8540f24b.arrow new file mode 100644 index 0000000000000000000000000000000000000000..3f9e7ac34ae31c87f92078ded2d961aa2836cbfe --- /dev/null +++ b/api/prerendered_queries/b6fcf485f5d9ad9f52ae954d8540f24b.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ac3aa541fc3566baa6c9d13236e4c14b0c4f9f19aea2554856fd897159f84fe +size 4872 diff --git a/api/prerendered_queries/b855249a39309369998e6529433365a8.arrow b/api/prerendered_queries/b855249a39309369998e6529433365a8.arrow new file mode 100644 index 0000000000000000000000000000000000000000..2c5001ce00c6a9a9ff3513ee6928f8716aee55e4 --- /dev/null +++ b/api/prerendered_queries/b855249a39309369998e6529433365a8.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c53342842e46ff3d40d4259f0e8dd955a8fe541f02ba3913ebe04ae5797950e9 +size 304 diff --git a/api/prerendered_queries/bb0ef251b0d0d12b3fe0e4cbc5f259bf.arrow b/api/prerendered_queries/bb0ef251b0d0d12b3fe0e4cbc5f259bf.arrow new file mode 100644 index 0000000000000000000000000000000000000000..5c6edaf7981429b0493cb143066e72847260d3e4 --- /dev/null +++ b/api/prerendered_queries/bb0ef251b0d0d12b3fe0e4cbc5f259bf.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79b4cf60a4cff61923bb70221a8e195f75442cbf8dd03ec248d736f112f0a5e8 +size 392 diff --git a/api/prerendered_queries/bb71defb990717ef624aa6d85b21fcbd.arrow b/api/prerendered_queries/bb71defb990717ef624aa6d85b21fcbd.arrow new file mode 100644 index 0000000000000000000000000000000000000000..d47ba08c075faf4735edffa42730fa0a3495d8c6 --- /dev/null +++ b/api/prerendered_queries/bb71defb990717ef624aa6d85b21fcbd.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2053f4aa2c208749426602683dbfbc2f271caf54321e86a36be766928ccd4272 +size 1128 diff --git a/api/prerendered_queries/d1054fee9fe3a8d10b64e86a95f3e0a4.arrow b/api/prerendered_queries/d1054fee9fe3a8d10b64e86a95f3e0a4.arrow new file mode 100644 index 0000000000000000000000000000000000000000..3afaa59d3a2568113a61704682a53857c5c474b5 --- /dev/null +++ b/api/prerendered_queries/d1054fee9fe3a8d10b64e86a95f3e0a4.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bde3682fe6ec168a3dc2df6216ceae8694d1d1b8d279d4a18003ded807149ca +size 640 diff --git a/api/prerendered_queries/d426e7eaac5a7a29edc105487c3085c0.arrow b/api/prerendered_queries/d426e7eaac5a7a29edc105487c3085c0.arrow new file mode 100644 index 0000000000000000000000000000000000000000..3e5c8848acfda9e363627ba5ec6a87f480aceaaf --- /dev/null +++ b/api/prerendered_queries/d426e7eaac5a7a29edc105487c3085c0.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47573003cf10a14ffb0eaf3d2f1332fd3bd31a4357bd5d97d132af78d2554c42 +size 2968 diff --git a/api/prerendered_queries/d6984cb2bfeea60d62d2c10778cfa0d0.arrow b/api/prerendered_queries/d6984cb2bfeea60d62d2c10778cfa0d0.arrow new file mode 100644 index 0000000000000000000000000000000000000000..841752314a416d41a22cd570d11ec8ab7457f08b --- /dev/null +++ b/api/prerendered_queries/d6984cb2bfeea60d62d2c10778cfa0d0.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47adac6862024ba338fdf4559f30c666adf8970c56045613fc64ebcc37a1ee7f +size 640 diff --git a/api/prerendered_queries/df641b4ec452e6a2bf6c4aac60af7060.arrow b/api/prerendered_queries/df641b4ec452e6a2bf6c4aac60af7060.arrow new file mode 100644 index 0000000000000000000000000000000000000000..ebb735581b7099f7b3a3b1b4b1d1cf299d51d614 --- /dev/null +++ b/api/prerendered_queries/df641b4ec452e6a2bf6c4aac60af7060.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86895c89892d278bbd389a83c1da166b3b9dd67c7763127b947076809a5dd4bc +size 640 diff --git a/api/prerendered_queries/e0486830bbb7ec1b09e43235808b72c4.arrow b/api/prerendered_queries/e0486830bbb7ec1b09e43235808b72c4.arrow new file mode 100644 index 0000000000000000000000000000000000000000..39f102640f54d9e60ea0bf39d18f2cf4e1db1ebb --- /dev/null +++ b/api/prerendered_queries/e0486830bbb7ec1b09e43235808b72c4.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4823bcd96702e31a807d00d105344eb6f1a85b9989930ce047a02f382c3182b3 +size 5120 diff --git a/api/prerendered_queries/e0be5fad79462a29cd273ad6579070fc.arrow b/api/prerendered_queries/e0be5fad79462a29cd273ad6579070fc.arrow new file mode 100644 index 0000000000000000000000000000000000000000..38cb0eb350140308701736188d315799b8b289d0 --- /dev/null +++ b/api/prerendered_queries/e0be5fad79462a29cd273ad6579070fc.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:973ec09e28914d78f1f374526a19fa6c198e2cf294ebd7fbfc8f94410133fb81 +size 2200 diff --git a/api/prerendered_queries/e11173160ec05058c1315e784c0e2015.arrow b/api/prerendered_queries/e11173160ec05058c1315e784c0e2015.arrow new file mode 100644 index 0000000000000000000000000000000000000000..1818b83a2260df52cb46e56f4346b05cbb949426 --- /dev/null +++ b/api/prerendered_queries/e11173160ec05058c1315e784c0e2015.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c0edcd7ab4f72ccc2cfff6fdc2b441ec19d50dce6a7f3428973bc3a85195634 +size 1208 diff --git a/api/prerendered_queries/f2c54028e11fcf860d82697e3eff74ba.arrow b/api/prerendered_queries/f2c54028e11fcf860d82697e3eff74ba.arrow new file mode 100644 index 0000000000000000000000000000000000000000..7c9d7c1684512844c8c56e41eb4015bda456dbfd --- /dev/null +++ b/api/prerendered_queries/f2c54028e11fcf860d82697e3eff74ba.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ada759df7fc1e4b281e66fbda085c180af440f7a5703af3b7cbffb95694a8089 +size 3472 diff --git a/api/prerendered_queries/f7bdad478ae33930eabc8a291b3d5f9b.arrow b/api/prerendered_queries/f7bdad478ae33930eabc8a291b3d5f9b.arrow new file mode 100644 index 0000000000000000000000000000000000000000..2dfae58cfb30ab48d640385416dd4cb53a446ab6 --- /dev/null +++ b/api/prerendered_queries/f7bdad478ae33930eabc8a291b3d5f9b.arrow @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7cbd73c9575888f5b26f1aa494ab3b4fd2b7eafdc5ff90567894ed695215d23a +size 968 diff --git a/borough/Bronx/index.html b/borough/Bronx/index.html index 367f51e8d63c2e4d83740e96e22e33dc943c6fb9..9c70f3ec3e749a62c72c58b7e1fb06d7f55a4e0a 100644 --- a/borough/Bronx/index.html +++ b/borough/Bronx/index.html @@ -7,27 +7,36 @@ + - - - - - - + + + + + + - - + + + - - - - + + + - - - - - Evidence + + + + + Evidence
    -
    Home borough Bronx

    Bronx

    Home borough Bronx

    Bronx

    Rides

    47,271

    Rides

    47,271

    Fare Amount

    $1.4M

    Fare Amount

    $1.4M

    Trip Distance

    1,564,637 mi

    Trip Distance

    1,564,637 mi

    Fare Per Mile

    $0.86

    Rides by Pickup Location

    + ">

    Fare Per Mile

    $0.86

    Rides by Pickup Location

    + - - - - diff --git a/borough/Brooklyn/index.html b/borough/Brooklyn/index.html index 5918033b689e06344c9c13f39e1ea048fc7cef4a..7d6d5209ff244d2d305f522ace4dc33767775cf3 100644 --- a/borough/Brooklyn/index.html +++ b/borough/Brooklyn/index.html @@ -7,27 +7,36 @@ + - - - - - - + + + + + + - - + + + - - - - + + + - - - - - Evidence + + + + + Evidence
    -

    Brooklyn

    Brooklyn

    Rides

    267,460

    Rides

    267,460

    Fare Amount

    $6.1M

    Fare Amount

    $6.1M

    Trip Distance

    12,473,323 mi

    Trip Distance

    12,473,323 mi

    Fare Per Mile

    $0.49

    Rides by Pickup Location

    + ">

    Fare Per Mile

    $0.49

    Rides by Pickup Location

    + - - - - diff --git a/borough/EWR/index.html b/borough/EWR/index.html index 3f15a9ef7177d74dff5b667686dac3ab879d8733..e587e283d4a3d0b286ec1fe70083a1b1426ae811 100644 --- a/borough/EWR/index.html +++ b/borough/EWR/index.html @@ -7,27 +7,36 @@ + - - - - - - + + + + + + - - + + + - - - - + + + - - - - - Evidence + + + + + Evidence
    -
    Home borough EWR

    EWR

    Home borough EWR

    EWR

    Rides

    9,171

    Rides

    9,171

    Fare Amount

    $0.8M

    Fare Amount

    $0.8M

    Trip Distance

    7,541 mi

    Trip Distance

    7,541 mi

    Fare Per Mile

    $103.35

    Rides by Pickup Location

    + ">

    Fare Per Mile

    $103.35

    Rides by Pickup Location

    + - - - - diff --git a/borough/Manhattan/index.html b/borough/Manhattan/index.html index 373eecbeba0918f717e3e1a1334249175f0a201d..bd82cf5963337f3ccb5ba2afdcc9a6fc93edae1d 100644 --- a/borough/Manhattan/index.html +++ b/borough/Manhattan/index.html @@ -7,27 +7,36 @@ + - - - - - - + + + + + + - - + + + - - - - + + + - - - - - Evidence + + + + + Evidence
    -

    Manhattan

    Manhattan

    Rides

    32,279,222

    Rides

    32,279,222

    Fare Amount

    $386.3M

    Fare Amount

    $386.3M

    Trip Distance

    160,245,044 mi

    Trip Distance

    160,245,044 mi

    Fare Per Mile

    $2.41

    Rides by Pickup Location

    + ">

    Fare Per Mile

    $2.41

    Rides by Pickup Location

    + - - - - diff --git a/borough/Queens/index.html b/borough/Queens/index.html index 5bb2e16c52b4690b0c0958527a92049bbb88a020..314f8a36a6255780bfa1c9c08d7c8f1ec0ce8d74 100644 --- a/borough/Queens/index.html +++ b/borough/Queens/index.html @@ -7,27 +7,36 @@ + - - - - - - + + + + + + - - + + + - - - - + + + - - - - - Evidence + + + + + Evidence
    -
    Home borough Queens

    Queens

    Home borough Queens

    Queens

    Rides

    3,140,654

    Rides

    3,140,654

    Fare Amount

    $122.3M

    Fare Amount

    $122.3M

    Trip Distance

    42,880,069 mi

    Trip Distance

    42,880,069 mi

    Fare Per Mile

    $2.85

    Rides by Pickup Location

    + ">

    Fare Per Mile

    $2.85

    Rides by Pickup Location

    + - - - - diff --git a/borough/Staten Island/index.html b/borough/Staten Island/index.html index f621caa8a39d5903fb79d2381ae6d6b5e6d0a115..23ca26b07a397c1216318d29408e4f58b768ab72 100644 --- a/borough/Staten Island/index.html +++ b/borough/Staten Island/index.html @@ -7,27 +7,36 @@ + - - - - - - + + + + + + - - + + + - - - - + + + - - - - - Evidence + + + + + Evidence
    -

    Staten Island

    Staten Island

    Rides

    2,867

    Rides

    2,867

    Fare Amount

    $0.2M

    Fare Amount

    $0.2M

    Trip Distance

    29,934 mi

    Trip Distance

    29,934 mi

    Fare Per Mile

    $5.24

    Rides by Pickup Location

    + ">

    Fare Per Mile

    $5.24

    Rides by Pickup Location

    + - - - - diff --git a/data/manifest.json b/data/manifest.json index 6d750bd70817d252e9446fda81e593f4e8262d28..bfa48590fdb6c166306035a8e2de603f3904a345 100644 --- a/data/manifest.json +++ b/data/manifest.json @@ -1 +1 @@ -{"renderedFiles":{"taxi":["static/data/taxi/daily/daily.parquet","static/data/taxi/dates/dates.parquet","static/data/taxi/location/location.parquet","static/data/taxi/summary/summary.parquet","static/data/taxi/summary_borough/summary_borough.parquet"],"zones":["static/data/zones/zones/zones.parquet"]}} \ No newline at end of file +{"renderedFiles":{"taxi":["static/data/taxi/daily/37985ece6fd9eaa2f0c60f6231d8b8ba/daily.parquet","static/data/taxi/dates/6e754f19329f45e01690414df035e78e/dates.parquet","static/data/taxi/location/b1c3d1d3f2832756359eb5f8298e3ef8/location.parquet","static/data/taxi/summary/9d9d1e8ef3f068e106b0ffe13f8e2b30/summary.parquet","static/data/taxi/summary_borough/b2ee01c3fdd6d3eed769f113d7cb355a/summary_borough.parquet"],"zones":["static/data/zones/zones/a45c7e947c355e3f116a5905e099e343/zones.parquet"]}} diff --git a/data/taxi/daily/37985ece6fd9eaa2f0c60f6231d8b8ba/daily.parquet b/data/taxi/daily/37985ece6fd9eaa2f0c60f6231d8b8ba/daily.parquet new file mode 100644 index 0000000000000000000000000000000000000000..faaf590b187722a5a0a63ace54b0b2e72aba3c2b --- /dev/null +++ b/data/taxi/daily/37985ece6fd9eaa2f0c60f6231d8b8ba/daily.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36c75efe73e4912f76f04ff72ef11fac448a64321674f5ae7b4c0b34a4f1f769 +size 9254 diff --git a/data/taxi/dates/6e754f19329f45e01690414df035e78e/dates.parquet b/data/taxi/dates/6e754f19329f45e01690414df035e78e/dates.parquet new file mode 100644 index 0000000000000000000000000000000000000000..e00afb0463858a6473741a95172f17752cc15862 --- /dev/null +++ b/data/taxi/dates/6e754f19329f45e01690414df035e78e/dates.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5ee272cb508c2afe65e555a6c76bd605d64991f3af73d1e793025e55b871dc3 +size 1952 diff --git a/data/taxi/location/b1c3d1d3f2832756359eb5f8298e3ef8/location.parquet b/data/taxi/location/b1c3d1d3f2832756359eb5f8298e3ef8/location.parquet new file mode 100644 index 0000000000000000000000000000000000000000..742834a90ea980028e6cb03e93394a01dbcabfd0 --- /dev/null +++ b/data/taxi/location/b1c3d1d3f2832756359eb5f8298e3ef8/location.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22dc3c25deb5b83570cb1860d27389068f84a60a9a038b4d518829f4489502b5 +size 751742 diff --git a/data/taxi/summary/9d9d1e8ef3f068e106b0ffe13f8e2b30/summary.parquet b/data/taxi/summary/9d9d1e8ef3f068e106b0ffe13f8e2b30/summary.parquet new file mode 100644 index 0000000000000000000000000000000000000000..12a830ad2fc181f9999565e13b42d0f00c65239f --- /dev/null +++ b/data/taxi/summary/9d9d1e8ef3f068e106b0ffe13f8e2b30/summary.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42dae2a37c7e7d7c4ef5c1d1ac82e2c32466a293c9e2fb20c6e999848597205e +size 9238 diff --git a/data/taxi/summary_borough/b2ee01c3fdd6d3eed769f113d7cb355a/summary_borough.parquet b/data/taxi/summary_borough/b2ee01c3fdd6d3eed769f113d7cb355a/summary_borough.parquet new file mode 100644 index 0000000000000000000000000000000000000000..3d8e9c5d97d1dc0960447cfb0e6604c26c27c869 --- /dev/null +++ b/data/taxi/summary_borough/b2ee01c3fdd6d3eed769f113d7cb355a/summary_borough.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c88a9a6226a82eb6816487db48bcda380a652e143fdf1fc2f571d103208e1a6 +size 1241826 diff --git a/data/zones/zones/a45c7e947c355e3f116a5905e099e343/zones.parquet b/data/zones/zones/a45c7e947c355e3f116a5905e099e343/zones.parquet new file mode 100644 index 0000000000000000000000000000000000000000..642d5ffb94c2541c5ac6176d2b817d8f6aec4cd5 --- /dev/null +++ b/data/zones/zones/a45c7e947c355e3f116a5905e099e343/zones.parquet @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a20ae0f394eb1e08e60763b0fb6d020793116fdd10806aca9adf974f4ad6c54 +size 8312 diff --git a/index.html b/index.html index 83945736c37b4aea89075308bcc1860d4b0f8442..7d2c154ad39794f4431700bdd4fd2c2a456b2781 100644 --- a/index.html +++ b/index.html @@ -7,27 +7,36 @@ + - - - - - - + + + + + + - - + + + - - - - + + + - - - - - NYC Taxi Data 2022 + + + + + NYC Taxi Data 2022
    -
    Home

    NYC Taxi Data 2022

    This is an exploration of NYC taxi data in 2022. It includes a summary of the data, rides by day, and rides by pickup location.

    NYC Taxi Data 2022

    This is an exploration of NYC taxi data in 2022. It includes a summary of the data, rides by day, and rides by pickup location.

    Rides

    36,255,983

    Rides

    36,255,983

    Fare Amount

    $531.1M

    Fare Amount

    $531.1M

    Trip Distance

    220,352,930 mi

    Trip Distance

    220,352,930 mi

    Fare Per Mile

    $2.41
    Loading...
    Loading...
    Loading...
    Loading...

    Rides by Pickup Location

    + ">

    Fare Per Mile

    $2.41
    Loading...
    Loading...
    Loading...
    Loading...

    Rides by Pickup Location

    + - - - -